From 7acbbce6aa4483f8404c175c472240af1c841412 Mon Sep 17 00:00:00 2001 From: mochi-angel Date: Sat, 6 Apr 2024 13:17:00 -0700 Subject: [PATCH 1/2] Alpha Virus retier and Insidious Impaler javelin --- Items/Weapons/Melee/InsidiousImpaler.cs | 21 ++++----- Items/Weapons/Rogue/AlphaVirus.cs | 4 +- ...Mods.CalamityMod.Items.Weapons.Melee.hjson | 2 +- Projectiles/Melee/InsidiousHarpoon.cs | 20 +++++++- .../Melee/Spears/InsidiousImpalerProj.cs | 43 ------------------ .../Melee/Spears/InsidiousImpalerProj.png | Bin 4140 -> 0 bytes 6 files changed, 29 insertions(+), 61 deletions(-) delete mode 100644 Projectiles/Melee/Spears/InsidiousImpalerProj.cs delete mode 100644 Projectiles/Melee/Spears/InsidiousImpalerProj.png diff --git a/Items/Weapons/Melee/InsidiousImpaler.cs b/Items/Weapons/Melee/InsidiousImpaler.cs index 4d5154830b..ac50ff064d 100644 --- a/Items/Weapons/Melee/InsidiousImpaler.cs +++ b/Items/Weapons/Melee/InsidiousImpaler.cs @@ -1,4 +1,5 @@ -using CalamityMod.Projectiles.Melee.Spears; +using CalamityMod.Projectiles.Melee; +using CalamityMod.Projectiles.Melee.Spears; using CalamityMod.Rarities; using Terraria; using Terraria.ID; @@ -9,32 +10,26 @@ namespace CalamityMod.Items.Weapons.Melee public class InsidiousImpaler : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Weapons.Melee"; - public override void SetStaticDefaults() - { - ItemID.Sets.Spears[Item.type] = true; - } public override void SetDefaults() { Item.width = 66; Item.height = 70; - Item.damage = 320; - Item.DamageType = DamageClass.Melee; + Item.damage = 198; + Item.DamageType = DamageClass.MeleeNoSpeed; Item.noMelee = true; Item.useTurn = true; Item.noUseGraphic = true; - Item.useAnimation = Item.useTime = 15; - Item.useStyle = ItemUseStyleID.Shoot; + Item.useAnimation = Item.useTime = 20; + Item.useStyle = ItemUseStyleID.Swing; Item.knockBack = 8f; Item.UseSound = SoundID.Item1; Item.autoReuse = true; - Item.shoot = ModContent.ProjectileType(); - Item.shootSpeed = 5f; + Item.shoot = ModContent.ProjectileType(); + Item.shootSpeed = 15f; Item.value = CalamityGlobalItem.Rarity13BuyPrice; Item.rare = ModContent.RarityType(); } - - public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0; } } diff --git a/Items/Weapons/Rogue/AlphaVirus.cs b/Items/Weapons/Rogue/AlphaVirus.cs index 4aba181ca5..ee22cf22e4 100644 --- a/Items/Weapons/Rogue/AlphaVirus.cs +++ b/Items/Weapons/Rogue/AlphaVirus.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.Weapons.Rogue { Item.width = 44; Item.height = 44; - Item.damage = 333; + Item.damage = 248; Item.noMelee = true; Item.noUseGraphic = true; Item.useAnimation = 31; @@ -49,7 +49,7 @@ namespace CalamityMod.Items.Weapons.Rogue { CreateRecipe(). AddIngredient(). - AddIngredient(5). + AddIngredient(ItemID.LunarBar, 5). AddTile(TileID.LunarCraftingStation). Register(); } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson index 126a3189dd..a3adbf69de 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson @@ -673,7 +673,7 @@ IllustriousKnives: { InsidiousImpaler: { DisplayName: Insidious Impaler - Tooltip: Fires a harpoon that sticks to enemies and explodes + Tooltip: Fires infected harpoons that stick to enemies and explode } IridescentExcalibur: { diff --git a/Projectiles/Melee/InsidiousHarpoon.cs b/Projectiles/Melee/InsidiousHarpoon.cs index f39bc1d501..252e7c4bf8 100644 --- a/Projectiles/Melee/InsidiousHarpoon.cs +++ b/Projectiles/Melee/InsidiousHarpoon.cs @@ -1,8 +1,10 @@ using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Items.Weapons.Melee; using Microsoft.Xna.Framework; using Terraria; using Terraria.Audio; using Terraria.ID; +using Terraria.Localization; using Terraria.ModLoader; namespace CalamityMod.Projectiles.Melee @@ -10,6 +12,7 @@ namespace CalamityMod.Projectiles.Melee public class InsidiousHarpoon : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Melee"; + public override LocalizedText DisplayName => CalamityUtils.GetItemName(); public override void SetStaticDefaults() { ProjectileID.Sets.TrailCacheLength[Projectile.type] = 8; @@ -23,8 +26,10 @@ namespace CalamityMod.Projectiles.Melee Projectile.friendly = true; Projectile.penetrate = 8; Projectile.alpha = 255; - Projectile.DamageType = DamageClass.Melee; - Projectile.extraUpdates = 2; + Projectile.DamageType = DamageClass.MeleeNoSpeed; + AIType = ProjectileID.BoneJavelin; + Projectile.scale = 1.3f; + Projectile.extraUpdates = 1; Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = 20 * Projectile.extraUpdates; Projectile.tileCollide = true; @@ -37,7 +42,18 @@ namespace CalamityMod.Projectiles.Melee Projectile.alpha -= 25; } if (Projectile.alpha < 0) + { Projectile.alpha = 0; + } + if (Projectile.ai[0] == 0f) + { + Projectile.localAI[1] += 1f; + if (Projectile.localAI[1] >= 45f) + { + Projectile.velocity.X *= 0.98f; + Projectile.velocity.Y += 0.35f; + } + } int dustType = 171; if (Main.rand.NextBool(3)) diff --git a/Projectiles/Melee/Spears/InsidiousImpalerProj.cs b/Projectiles/Melee/Spears/InsidiousImpalerProj.cs deleted file mode 100644 index b07729d034..0000000000 --- a/Projectiles/Melee/Spears/InsidiousImpalerProj.cs +++ /dev/null @@ -1,43 +0,0 @@ -using System; -using CalamityMod.Buffs.DamageOverTime; -using CalamityMod.Items.Weapons.Melee; -using CalamityMod.Projectiles.BaseProjectiles; -using Terraria; -using Terraria.ID; -using Terraria.Localization; -using Terraria.ModLoader; -namespace CalamityMod.Projectiles.Melee.Spears -{ - public class InsidiousImpalerProj : BaseSpearProjectile - { - public override LocalizedText DisplayName => CalamityUtils.GetItemName(); - public override void SetDefaults() - { - Projectile.width = Projectile.height = 40; - Projectile.DamageType = DamageClass.Melee; - Projectile.timeLeft = 90; - Projectile.friendly = true; - Projectile.hostile = false; - Projectile.tileCollide = false; - Projectile.ignoreWater = true; - Projectile.penetrate = -1; - Projectile.ownerHitCheck = true; - Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 5; - } - - public override float InitialSpeed => 3f; - public override float ReelbackSpeed => 1.1f; - public override float ForwardSpeed => 0.95f; - public override Action EffectBeforeReelback => (proj) => - { - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center + Projectile.velocity, Projectile.velocity * 3.5f, ModContent.ProjectileType(), (int)(Projectile.damage * 0.5), Projectile.knockBack * 0.85f, Projectile.owner); - }; - - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) - { - target.AddBuff(ModContent.BuffType(), 180); - target.AddBuff(BuffID.Venom, 180); - } - } -} diff --git a/Projectiles/Melee/Spears/InsidiousImpalerProj.png b/Projectiles/Melee/Spears/InsidiousImpalerProj.png deleted file mode 100644 index ccdd5a9b9dbf5de1c575423c6eccbd3bf776cd2a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4140 zcmV+{5Yz98P)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6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1HLBhdj|*7IRe!8_8$yt zXdjTOrR$jEg)C{Q)K5+|@Fg}~q#?9PfiKsLY zvV$chJ5**#e#qw*QWw66Yp*3o2mz69pJ#8=7g62oL^NStqoPD?Rpyg3DM^k}`SwIj z0z@-5azvBrK@zDInD4vYOAEv;WXDSK$LZX-Xvn3X##F)_m4xZj z++%oDT}`A`JiF14hb{wf=G<{h#Exo2scs@WQKnXy8X+}071Lfz&mkntr~lN5^4KM} zIbv55A=T5Vy2Hs>()Dr^A;Vl@Ge1blxR7&gMkURTV3Pw7Po}JE>^36um8Ko07Rbs< z?;>U9h7A`AH9G*AHRUo3nbmEPV2LP0jwmY0nWTui_q4YHA=1f zyAEmEFwoVhjZ3aDUE{vCpr_kVrso@$h)NOB7QQ#<20jl=_V4) zagB^kd!_Dwq1_U(+lVOkw`{tO>}7781s};J*p@H=GYiFiz9nL}xkjluq$8+K*u;}5 z7vPm=Uee~tiJI~Zh_0000 Date: Sat, 6 Apr 2024 16:43:09 -0400 Subject: [PATCH 2/2] Changes to Insidious Impaler gravity --- Projectiles/Melee/InsidiousHarpoon.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Projectiles/Melee/InsidiousHarpoon.cs b/Projectiles/Melee/InsidiousHarpoon.cs index 252e7c4bf8..dc2c3c4ba3 100644 --- a/Projectiles/Melee/InsidiousHarpoon.cs +++ b/Projectiles/Melee/InsidiousHarpoon.cs @@ -27,7 +27,6 @@ namespace CalamityMod.Projectiles.Melee Projectile.penetrate = 8; Projectile.alpha = 255; Projectile.DamageType = DamageClass.MeleeNoSpeed; - AIType = ProjectileID.BoneJavelin; Projectile.scale = 1.3f; Projectile.extraUpdates = 1; Projectile.usesLocalNPCImmunity = true; @@ -48,10 +47,13 @@ namespace CalamityMod.Projectiles.Melee if (Projectile.ai[0] == 0f) { Projectile.localAI[1] += 1f; - if (Projectile.localAI[1] >= 45f) + if (Projectile.localAI[1] >= 60f) { - Projectile.velocity.X *= 0.98f; - Projectile.velocity.Y += 0.35f; + Projectile.velocity.X *= 0.99f; + Projectile.velocity.Y += 0.3f; + + if (Projectile.velocity.Y > 16f) + Projectile.velocity.Y = 16f; } }