From 3198a04a79b0b37582ebc2114a4e01980d4ae0d6 Mon Sep 17 00:00:00 2001 From: Andrew Marheine Date: Wed, 23 Dec 2020 12:49:53 -0600 Subject: [PATCH] 1 - Added Sand Shark Tooth Necklace. 2 - Bloodworm spawn changes. 3 - Nerfed post-Provi Ravager contact damage. 4 - Soul Piercer creates less fucking dust. --- Items/Accessories/ReaperToothNecklace.cs | 10 ++--- Items/Accessories/SandSharkToothNecklace.cs | 42 +++++++++++++++++++ Items/Accessories/SandSharkToothNecklace.png | Bin 0 -> 821 bytes NPCs/AcidRain/BloodwormNormal.cs | 7 ++-- NPCs/OldDuke/OldDuke.cs | 3 ++ NPCs/Ravager/FlamePillar.cs | 2 +- NPCs/Ravager/RavagerBody.cs | 2 +- NPCs/Ravager/RavagerClawLeft.cs | 4 +- NPCs/Ravager/RavagerClawRight.cs | 4 +- NPCs/Ravager/RockPillar.cs | 4 +- Projectiles/Magic/SoulPiercerBeam.cs | 23 +++++----- Projectiles/Magic/SoulPiercerBolt.cs | 21 ++++------ 12 files changed, 80 insertions(+), 42 deletions(-) create mode 100644 Items/Accessories/SandSharkToothNecklace.cs create mode 100644 Items/Accessories/SandSharkToothNecklace.png diff --git a/Items/Accessories/ReaperToothNecklace.cs b/Items/Accessories/ReaperToothNecklace.cs index d62d7452fe..71657dbd65 100644 --- a/Items/Accessories/ReaperToothNecklace.cs +++ b/Items/Accessories/ReaperToothNecklace.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Items.Accessories public override void SetStaticDefaults() { DisplayName.SetDefault("Reaper Tooth Necklace"); - Tooltip.SetDefault("A grisly trophy from the ultimate predator\n" + "12% increased damage\n" + "Increases armor penetration by 100\n"); + Tooltip.SetDefault("A grisly trophy from the ultimate predator\n" + "12% increased damage\n" + "Increases armor penetration by 45"); } public override void SetDefaults() @@ -21,22 +21,20 @@ namespace CalamityMod.Items.Accessories item.height = 50; item.accessory = true; item.value = CalamityGlobalItem.Rarity13BuyPrice; - item.rare = ItemRarityID.Red; + item.rare = ItemRarityID.Purple; item.Calamity().customRarity = CalamityRarity.PureGreen; } public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.Calamity(); player.allDamage += 0.12f; - player.armorPenetration += 100; + player.armorPenetration += 45; } public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(ItemID.SharkToothNecklace); - recipe.AddIngredient(ItemID.AvengerEmblem); + recipe.AddIngredient(ModContent.ItemType()); recipe.AddIngredient(ModContent.ItemType(), 6); recipe.AddIngredient(ModContent.ItemType(), 15); recipe.AddIngredient(ModContent.ItemType(), 15); diff --git a/Items/Accessories/SandSharkToothNecklace.cs b/Items/Accessories/SandSharkToothNecklace.cs new file mode 100644 index 0000000000..63901be879 --- /dev/null +++ b/Items/Accessories/SandSharkToothNecklace.cs @@ -0,0 +1,42 @@ +using CalamityMod.Items.Materials; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Accessories +{ + public class SandSharkToothNecklace : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Sand Shark Tooth Necklace"); + Tooltip.SetDefault("Increases armor penetration by 15\n" + "6% increased damage"); + } + + public override void SetDefaults() + { + item.width = 32; + item.height = 44; + item.accessory = true; + item.value = CalamityGlobalItem.Rarity7BuyPrice; + item.rare = ItemRarityID.Lime; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + player.allDamage += 0.06f; + player.armorPenetration += 15; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ItemID.SharkToothNecklace); + recipe.AddIngredient(ItemID.AvengerEmblem); + recipe.AddIngredient(ModContent.ItemType()); + recipe.AddTile(TileID.TinkerersWorkbench); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } +} diff --git a/Items/Accessories/SandSharkToothNecklace.png b/Items/Accessories/SandSharkToothNecklace.png new file mode 100644 index 0000000000000000000000000000000000000000..704902033a178847c67a4792b8aa29585d613a6c GIT binary patch literal 821 zcmV-51Iqk~P)Px%?@2^KR9J=Gn9FMuQ5431)1>c5l0GQYS4tP!;G$Fu0T<$?pdb`#L2%>FjempM z;@{xLohuPU5L^gu#D!3(h6<&1QxdF((3i25+SYVj+?-DDO=j96IHTWc=A3&^?)RO? z%*4V2c552|vHl?dil3LAqyFYD+XDEpn#ZtHwrlHS{Xgu!0lg*nSO*Z0F8-Gz^$G5nI08Cqx|v=30{Fjy&@#cZ>8G-jX9w8uTmm8Sl*Zg zDxZSF-0XY1SMAGxQTqZ{z)Gja9e}a!2;egI!lnDu0KA=1*Q%*}2R#M*j+kSL(d^mw!C=g9%Z zd}<;Iz~cNjWtUuf)PVTs4ZA2fS4fM=fel0COFOZW@O~f_(Kwla^cqtJ+1x!f)3Ih{E=ljZ6 z%i21VX;W0y+gzcfy=R190b$e-Q4D^TRR2nChyub`y5sTe1^}(KYTwrWVMuN6gjWG! zkZiBB0CF39nqO)o^ 5 ? 1f : (float)(0.16 * Math.Pow(5 - bloodwormAmt, 2)) + 1f; - float spawnRate = SpawnCondition.WormCritter.Chance * 2.569f * spawnMult; + float baseSpawnRate = CalamityWorld.encounteredOldDuke ? 2.569f : 5.138f; + float spawnRate = SpawnCondition.WormCritter.Chance * baseSpawnRate * spawnMult; return spawnRate; } diff --git a/NPCs/OldDuke/OldDuke.cs b/NPCs/OldDuke/OldDuke.cs index 75a0add39f..289053ebb5 100644 --- a/NPCs/OldDuke/OldDuke.cs +++ b/NPCs/OldDuke/OldDuke.cs @@ -405,6 +405,9 @@ namespace CalamityMod.NPCs.OldDuke // Mark Old Duke as dead CalamityWorld.downedBoomerDuke = true; + + // Mark first acid rain encounter as true even if he wasn't fought in the acid rain, because it makes sense + CalamityWorld.encounteredOldDuke = true; CalamityNetcode.SyncWorld(); } diff --git a/NPCs/Ravager/FlamePillar.cs b/NPCs/Ravager/FlamePillar.cs index f782d75aca..667aaf5228 100644 --- a/NPCs/Ravager/FlamePillar.cs +++ b/NPCs/Ravager/FlamePillar.cs @@ -70,7 +70,7 @@ namespace CalamityMod.NPCs.Ravager else { if (CalamityWorld.downedProvidence && !BossRushEvent.BossRushActive) - npc.damage = npc.defDamage * 2; + npc.damage = (int)(npc.defDamage * 1.5); else npc.damage = npc.defDamage; } diff --git a/NPCs/Ravager/RavagerBody.cs b/NPCs/Ravager/RavagerBody.cs index 23061572ee..e03f7bfc87 100644 --- a/NPCs/Ravager/RavagerBody.cs +++ b/NPCs/Ravager/RavagerBody.cs @@ -49,7 +49,7 @@ namespace CalamityMod.NPCs.Ravager npc.LifeMaxNERB(42700, 53500, 4600000); if (CalamityWorld.downedProvidence && !BossRushEvent.BossRushActive) { - npc.damage *= 2; + npc.damage = (int)(npc.damage * 1.5); npc.defense *= 2; npc.lifeMax *= 5; npc.value *= 1.5f; diff --git a/NPCs/Ravager/RavagerClawLeft.cs b/NPCs/Ravager/RavagerClawLeft.cs index 748a946ec3..3c1992e909 100644 --- a/NPCs/Ravager/RavagerClawLeft.cs +++ b/NPCs/Ravager/RavagerClawLeft.cs @@ -37,8 +37,8 @@ namespace CalamityMod.NPCs.Ravager npc.DeathSound = SoundID.NPCDeath14; if (CalamityWorld.downedProvidence && !BossRushEvent.BossRushActive) { - npc.damage *= 2; - npc.defense *= 2; + npc.damage = (int)(npc.damage * 1.5); + npc.defense *= 2; npc.lifeMax *= 5; } if (BossRushEvent.BossRushActive) diff --git a/NPCs/Ravager/RavagerClawRight.cs b/NPCs/Ravager/RavagerClawRight.cs index 8a3d87329a..b4ef8058ba 100644 --- a/NPCs/Ravager/RavagerClawRight.cs +++ b/NPCs/Ravager/RavagerClawRight.cs @@ -37,8 +37,8 @@ namespace CalamityMod.NPCs.Ravager npc.DeathSound = SoundID.NPCDeath14; if (CalamityWorld.downedProvidence && !BossRushEvent.BossRushActive) { - npc.damage *= 2; - npc.defense *= 2; + npc.damage = (int)(npc.damage * 1.5); + npc.defense *= 2; npc.lifeMax *= 5; } if (BossRushEvent.BossRushActive) diff --git a/NPCs/Ravager/RockPillar.cs b/NPCs/Ravager/RockPillar.cs index 7399a2294f..0d6cd6cb56 100644 --- a/NPCs/Ravager/RockPillar.cs +++ b/NPCs/Ravager/RockPillar.cs @@ -57,8 +57,8 @@ namespace CalamityMod.NPCs.Ravager else { if (CalamityWorld.downedProvidence && !BossRushEvent.BossRushActive) - npc.damage = npc.defDamage * 2; - else + npc.damage = (int)(npc.defDamage * 1.5); + else npc.damage = npc.defDamage; } diff --git a/Projectiles/Magic/SoulPiercerBeam.cs b/Projectiles/Magic/SoulPiercerBeam.cs index 99802f9d3e..1fd75b2d47 100644 --- a/Projectiles/Magic/SoulPiercerBeam.cs +++ b/Projectiles/Magic/SoulPiercerBeam.cs @@ -29,19 +29,16 @@ namespace CalamityMod.Projectiles.Magic public override void AI() { projectile.localAI[0] += 1f; - if (projectile.localAI[0] > 9f) - { - for (int num447 = 0; num447 < 4; num447++) - { - Vector2 vector33 = projectile.position; - vector33 -= projectile.velocity * ((float)num447 * 0.25f); - projectile.alpha = 255; - int num448 = Dust.NewDust(vector33, 1, 1, 173, 0f, 0f, 0, default, 0.5f); - Main.dust[num448].position = vector33; - Main.dust[num448].scale = (float)Main.rand.Next(70, 110) * 0.007f; - Main.dust[num448].velocity *= 0.2f; - } - } + if (projectile.localAI[0] > 9f) + { + Vector2 vector33 = projectile.position; + vector33 -= projectile.velocity; + projectile.alpha = 255; + int num448 = Dust.NewDust(vector33, 1, 1, 173, 0f, 0f, 0, default, 0.5f); + Main.dust[num448].position = vector33; + Main.dust[num448].scale = Main.rand.Next(70, 110) * 0.014f; + Main.dust[num448].velocity *= 0.2f; + } } public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) diff --git a/Projectiles/Magic/SoulPiercerBolt.cs b/Projectiles/Magic/SoulPiercerBolt.cs index cfb95cff4a..2b7d349d7a 100644 --- a/Projectiles/Magic/SoulPiercerBolt.cs +++ b/Projectiles/Magic/SoulPiercerBolt.cs @@ -25,17 +25,14 @@ namespace CalamityMod.Projectiles.Magic projectile.localNPCHitCooldown = 5; } - public override void AI() - { - for (int num447 = 0; num447 < 4; num447++) - { - Vector2 vector33 = projectile.position; - vector33 -= projectile.velocity * ((float)num447 * 0.25f); - int num448 = Dust.NewDust(vector33, 1, 1, 173, 0f, 0f, 0, default, 0.5f); - Main.dust[num448].position = vector33; - Main.dust[num448].scale = (float)Main.rand.Next(70, 110) * 0.007f; - Main.dust[num448].velocity *= 0.2f; - } - } + public override void AI() + { + Vector2 vector33 = projectile.position; + vector33 -= projectile.velocity; + int num448 = Dust.NewDust(vector33, 1, 1, 173, 0f, 0f, 0, default, 0.5f); + Main.dust[num448].position = vector33; + Main.dust[num448].scale = Main.rand.Next(70, 110) * 0.014f; + Main.dust[num448].velocity *= 0.2f; + } } }