diff --git a/Buffs/Summon/TacticalPlagueEngineBuff.cs b/Buffs/Summon/TacticalPlagueEngineBuff.cs index a3d148afac..79c38a7a82 100644 --- a/Buffs/Summon/TacticalPlagueEngineBuff.cs +++ b/Buffs/Summon/TacticalPlagueEngineBuff.cs @@ -13,13 +13,13 @@ namespace CalamityMod.Buffs.Summon Description.SetDefault("A giant plague jet is following you"); Main.buffNoTimeDisplay[Type] = true; Main.buffNoSave[Type] = true; - //Main.persistentBuff[Type] = true; - } + //Main.persistentBuff[Type] = true; + } public override void Update(Player player, ref int buffIndex) { CalamityPlayer modPlayer = player.Calamity(); - if (player.ownedProjectileCounts[ModContent.ProjectileType()] > 0) + if (player.ownedProjectileCounts[ModContent.ProjectileType()] > 0) { modPlayer.plagueEngine = true; } diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 39f1ef0124..52991d32a7 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -5128,7 +5128,7 @@ namespace CalamityMod.CalPlayer } if (silvaMelee && proj.melee) { - double multiplier = (double)player.statLife / (double)player.statLifeMax2; + double multiplier = player.statLife / (double)player.statLifeMax2; damageMult += multiplier * 0.2; } } diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 6f76b8ef88..b1e6fe4444 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -67,7 +67,7 @@ namespace CalamityMod.CalPlayer CalamityPlayer.areThereAnyDamnEvents = CalamityGlobalNPC.AnyEvents(player); // If any boss NPC is active, apply Zen to the player to reduce spawn rate - if (CalamityPlayer.areThereAnyDamnBosses) + if (CalamityPlayer.areThereAnyDamnBosses && CalamityConfig.Instance.BossZen) { if (player.whoAmI == Main.myPlayer) player.AddBuff(ModContent.BuffType(), 2, false); @@ -1227,7 +1227,7 @@ namespace CalamityMod.CalPlayer if (modPlayer.absorber) { player.moveSpeed += 0.06f; - player.jumpSpeedBoost += 1.2f; + player.jumpSpeedBoost += player.autoJump ? 0.3f : 1.2f; player.thorns += 0.5f; player.endurance += 0.05f; @@ -2649,7 +2649,6 @@ namespace CalamityMod.CalPlayer if (modPlayer.eGauntlet) { - player.longInvince = true; player.kbGlove = true; player.magmaStone = true; player.meleeDamage += 0.15f; @@ -3018,7 +3017,8 @@ namespace CalamityMod.CalPlayer if (modPlayer.tarraSet) { - player.calmed = modPlayer.tarraMelee ? false : true; + if (!modPlayer.tarraMelee) + player.calmed = true; player.lifeMagnet = true; } @@ -3269,7 +3269,6 @@ namespace CalamityMod.CalPlayer if (modPlayer.yInsignia) { - player.longInvince = true; player.meleeDamage += 0.1f; player.lavaMax += 240; if (player.statLife <= (int)(player.statLifeMax2 * 0.5)) diff --git a/Items/Accessories/AstralArcanum.cs b/Items/Accessories/AstralArcanum.cs index 31f0944cec..1e095680da 100644 --- a/Items/Accessories/AstralArcanum.cs +++ b/Items/Accessories/AstralArcanum.cs @@ -25,9 +25,9 @@ namespace CalamityMod.Items.Accessories { item.width = 26; item.height = 26; - item.value = CalamityGlobalItem.Rarity13BuyPrice; + item.value = CalamityGlobalItem.Rarity12BuyPrice; item.accessory = true; - item.Calamity().customRarity = CalamityRarity.PureGreen; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override void ModifyTooltips(List list) diff --git a/Items/Accessories/ElementalGauntlet.cs b/Items/Accessories/ElementalGauntlet.cs index 155382723f..fde102b84c 100644 --- a/Items/Accessories/ElementalGauntlet.cs +++ b/Items/Accessories/ElementalGauntlet.cs @@ -17,7 +17,6 @@ namespace CalamityMod.Items.Accessories Tooltip.SetDefault("Melee attacks and projectiles inflict most debuffs\n" + "15% increased melee speed, damage, and 5% increased melee critical strike chance\n" + "20% increased true melee damage\n" + - "Increased invincibility after taking damage\n" + "Temporary immunity to lava\n" + "Increased melee knockback"); } diff --git a/Items/Accessories/GrandGelatin.cs b/Items/Accessories/GrandGelatin.cs index e28518e65d..cef6570aca 100644 --- a/Items/Accessories/GrandGelatin.cs +++ b/Items/Accessories/GrandGelatin.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Items.Accessories { DisplayName.SetDefault("Grand Gelatin"); Tooltip.SetDefault("10% increased movement speed\n" + - "40% increased jump speed\n" + + "24% increased jump speed\n" + "+20 max life and mana\n" + "Standing still boosts life and mana regen"); } @@ -29,21 +29,19 @@ namespace CalamityMod.Items.Accessories public override void ModifyTooltips(List list) { bool autoJump = Main.player[Main.myPlayer].autoJump; - string jumpAmt = autoJump ? "10" : "40"; + string jumpAmt = autoJump ? "6" : "24"; foreach (TooltipLine line2 in list) { if (line2.mod == "Terraria" && line2.Name == "Tooltip1") - { line2.text = jumpAmt + "% increased jump speed"; - } } } public override void UpdateAccessory(Player player, bool hideVisual) { player.moveSpeed += 0.1f; - player.jumpSpeedBoost += player.autoJump ? 0.5f : 2f; - player.statLifeMax2 += 20; + player.jumpSpeedBoost += player.autoJump ? 0.3f : 1.2f; + player.statLifeMax2 += 20; player.statManaMax2 += 20; if (Math.Abs(player.velocity.X) < 0.05f && Math.Abs(player.velocity.Y) < 0.05f && player.itemAnimation == 0) { diff --git a/Items/Accessories/HeartoftheElements.cs b/Items/Accessories/HeartoftheElements.cs index 896f2658a4..88f77fb545 100644 --- a/Items/Accessories/HeartoftheElements.cs +++ b/Items/Accessories/HeartoftheElements.cs @@ -3,6 +3,7 @@ using CalamityMod.CalPlayer; using CalamityMod.Projectiles.Summon; using CalamityMod.World; using Microsoft.Xna.Framework; +using System.Collections.Generic; using Terraria; using Terraria.DataStructures; using Terraria.ID; @@ -17,9 +18,9 @@ namespace CalamityMod.Items.Accessories { DisplayName.SetDefault("Heart of the Elements"); Tooltip.SetDefault("The heart of the world\n" + - "Increases max life by 20, life regen by 1, and all damage by 5%\n" + - "Increases movement speed by 5% and jump speed by 20%\n" + - "Increases damage reduction by 5%\n" + + "Increases max life by 20, life regen by 1 and all damage by 5%\n" + + "Increases jump speed by 24%\n" + + "Increases damage reduction and movement speed by 5%\n" + "Increases max mana by 50 and reduces mana usage by 5%\n" + "You grow flowers on the grass beneath you, chance to grow very random dye plants on grassless dirt\n" + "Summons all elementals to protect you\n" + @@ -39,7 +40,36 @@ namespace CalamityMod.Items.Accessories item.Calamity().customRarity = CalamityRarity.Rainbow; } - public override bool CanEquipAccessory(Player player, int slot) + public override void ModifyTooltips(List list) + { + bool autoJump = Main.player[Main.myPlayer].autoJump; + bool hideVisual = false; + for (int i = 3; i < 10; i++) + { + if (Main.player[Main.myPlayer].armor[i].type == item.type) + hideVisual = Main.player[Main.myPlayer].hideVisual[i]; + } + string lifeAmt = hideVisual ? "25" : "20"; + string lifeRegenAmt = hideVisual ? "2" : "1"; + string damageAmt = hideVisual ? "7" : "5"; + string jumpAmt = hideVisual ? (autoJump ? "6" : "24") : (autoJump ? "5" : "20"); + string damageReductionAndMoveSpeedAmt = hideVisual ? "6" : "5"; + string manaAmt = hideVisual ? "60" : "50"; + string manaUsageAmt = hideVisual ? "7" : "5"; + foreach (TooltipLine line2 in list) + { + if (line2.mod == "Terraria" && line2.Name == "Tooltip1") + line2.text = "Increases max life by " + lifeAmt + ", life regen by " + lifeRegenAmt + " and all damage by " + damageAmt + "%"; + if (line2.mod == "Terraria" && line2.Name == "Tooltip2") + line2.text = jumpAmt + "% increased jump speed"; + if (line2.mod == "Terraria" && line2.Name == "Tooltip3") + line2.text = "Increases damage reduction and movement speed by " + damageReductionAndMoveSpeedAmt + "%"; + if (line2.mod == "Terraria" && line2.Name == "Tooltip4") + line2.text = "Increases max mana by " + manaAmt + " and reduces mana usage by " + manaUsageAmt + "%"; + } + } + + public override bool CanEquipAccessory(Player player, int slot) { CalamityPlayer modPlayer = player.Calamity(); if (modPlayer.brimstoneWaifu || modPlayer.sandWaifu || modPlayer.sandBoobWaifu || modPlayer.cloudWaifu || modPlayer.sirenWaifu) @@ -52,9 +82,8 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { if (player != null && !player.dead) - { Lighting.AddLight((int)player.Center.X / 16, (int)player.Center.Y / 16, Main.DiscoR / 255f, Main.DiscoG / 255f, Main.DiscoB / 255f); - } + CalamityPlayer modPlayer = player.Calamity(); modPlayer.allWaifus = !hideVisual; modPlayer.elementalHeart = true; @@ -62,7 +91,7 @@ namespace CalamityMod.Items.Accessories player.lifeRegen += hideVisual ? 2 : 1; player.statLifeMax2 += hideVisual ? 25 : 20; player.moveSpeed += hideVisual ? 0.06f : 0.05f; - player.jumpSpeedBoost += hideVisual ? (player.autoJump ? 0.3f : 1.1f) : (player.autoJump ? 0.25f : 1f); + player.jumpSpeedBoost += hideVisual ? (player.autoJump ? 0.3f : 1.2f) : (player.autoJump ? 0.25f : 1f); player.endurance += hideVisual ? 0.06f : 0.05f; player.statManaMax2 += hideVisual ? 60 : 50; player.manaCost *= hideVisual ? 0.93f : 0.95f; diff --git a/Items/Accessories/Sponge.cs b/Items/Accessories/Sponge.cs index 4d30d096e2..107bcab7ec 100644 --- a/Items/Accessories/Sponge.cs +++ b/Items/Accessories/Sponge.cs @@ -14,7 +14,6 @@ namespace CalamityMod.Items.Accessories { public class Sponge : ModItem { - public override string Texture => (DateTime.Now.Month == 4 && DateTime.Now.Day == 1) ? "CalamityMod/Items/Accessories/SpongeReal" : "CalamityMod/Items/Accessories/Sponge"; public override void SetStaticDefaults() @@ -48,6 +47,14 @@ namespace CalamityMod.Items.Accessories public override void ModifyTooltips(List list) { + bool autoJump = Main.player[Main.myPlayer].autoJump; + string jumpAmt = autoJump ? "6" : "24"; + foreach (TooltipLine line2 in list) + { + if (line2.mod == "Terraria" && line2.Name == "Tooltip5") + line2.text = jumpAmt + "% increased jump speed and 12% increased movement speed"; + } + if (CalamityWorld.death) { foreach (TooltipLine line2 in list) diff --git a/Items/Accessories/StatisNinjaBelt.cs b/Items/Accessories/StatisNinjaBelt.cs index a2c6ef75a9..2850eb5fb8 100644 --- a/Items/Accessories/StatisNinjaBelt.cs +++ b/Items/Accessories/StatisNinjaBelt.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.Accessories public override void SetStaticDefaults() { DisplayName.SetDefault("Statis' Ninja Belt"); - Tooltip.SetDefault("8% increased jump speed and allows constant jumping\n" + + Tooltip.SetDefault("12% increased jump speed and allows constant jumping\n" + "Increased fall damage resistance by 35 blocks\n" + "Can climb walls, dash, and dodge attacks"); } @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Accessories { CalamityPlayer modPlayer = player.Calamity(); player.autoJump = true; - player.jumpSpeedBoost += 0.4f; + player.jumpSpeedBoost += 0.6f; player.extraFall += 35; player.blackBelt = true; player.dash = 1; diff --git a/Items/Accessories/TheAbsorber.cs b/Items/Accessories/TheAbsorber.cs index 64cca5291a..784dbdb90e 100644 --- a/Items/Accessories/TheAbsorber.cs +++ b/Items/Accessories/TheAbsorber.cs @@ -1,6 +1,7 @@ using CalamityMod.CalPlayer; using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables; +using System.Collections.Generic; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -34,7 +35,18 @@ namespace CalamityMod.Items.Accessories item.accessory = true; } - public override void UpdateAccessory(Player player, bool hideVisual) + public override void ModifyTooltips(List list) + { + bool autoJump = Main.player[Main.myPlayer].autoJump; + string jumpAmt = autoJump ? "6" : "24"; + foreach (TooltipLine line2 in list) + { + if (line2.mod == "Terraria" && line2.Name == "Tooltip1") + line2.text = jumpAmt + "% increased jump speed"; + } + } + + public override void UpdateAccessory(Player player, bool hideVisual) { CalamityPlayer modPlayer = player.Calamity(); modPlayer.aSpark = true; diff --git a/Items/Accessories/Wings/CelestialTracers.cs b/Items/Accessories/Wings/CelestialTracers.cs index c39c43f93c..9741a28757 100644 --- a/Items/Accessories/Wings/CelestialTracers.cs +++ b/Items/Accessories/Wings/CelestialTracers.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.Accessories.Wings "Horizontal speed: 12\n" + "Acceleration multiplier: 3\n" + "Excellent vertical speed\n" + - "Flight time: 280\n" + + "Flight time: 250\n" + "50% increased running acceleration\n" + "Greater mobility on ice\n" + "Water and lava walking\n" + @@ -79,7 +79,7 @@ namespace CalamityMod.Items.Accessories.Wings player.waterWalk = true; player.fireWalk = true; player.lavaMax += 240; - player.wingTimeMax = 280; + player.wingTimeMax = 250; player.noFallDmg = true; modPlayer.IBoots = !hideVisual; modPlayer.elysianFire = !hideVisual; diff --git a/Items/Accessories/Wings/ElysianTracers.cs b/Items/Accessories/Wings/ElysianTracers.cs index b152440cd3..72796177e8 100644 --- a/Items/Accessories/Wings/ElysianTracers.cs +++ b/Items/Accessories/Wings/ElysianTracers.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.Accessories.Wings "Horizontal speed: 10.5\n" + "Acceleration multiplier: 2.75\n" + "Great vertical speed\n" + - "Flight time: 160\n" + + "Flight time: 140\n" + "36% increased running acceleration\n" + "Greater mobility on ice\n" + "Water and lava walking\n" + @@ -78,7 +78,7 @@ namespace CalamityMod.Items.Accessories.Wings player.waterWalk = true; player.fireWalk = true; player.lavaMax += 240; - player.wingTimeMax = 160; + player.wingTimeMax = 140; player.noFallDmg = true; modPlayer.IBoots = !hideVisual; modPlayer.elysianFire = !hideVisual; diff --git a/Items/Accessories/Wings/InfinityBoots.cs b/Items/Accessories/Wings/InfinityBoots.cs index 8a7cb2377e..1502b3ef65 100644 --- a/Items/Accessories/Wings/InfinityBoots.cs +++ b/Items/Accessories/Wings/InfinityBoots.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.Accessories.Wings "Horizontal speed: 9\n" + "Acceleration multiplier: 2.5\n" + "Good vertical speed\n" + - "Flight time: 120\n" + + "Flight time: 100\n" + "24% increased running acceleration\n" + "Greater mobility on ice\n" + "Water and lava walking\n" + @@ -78,7 +78,7 @@ namespace CalamityMod.Items.Accessories.Wings player.waterWalk = true; player.fireWalk = true; player.lavaMax += 240; - player.wingTimeMax = 120; + player.wingTimeMax = 100; player.noFallDmg = true; modPlayer.IBoots = !hideVisual; modPlayer.sTracers = true; diff --git a/Items/Accessories/YharimsInsignia.cs b/Items/Accessories/YharimsInsignia.cs index 0eeee58579..52b090ca64 100644 --- a/Items/Accessories/YharimsInsignia.cs +++ b/Items/Accessories/YharimsInsignia.cs @@ -17,7 +17,6 @@ namespace CalamityMod.Items.Accessories "10% increased melee speed\n" + "10% increased melee and true melee damage\n" + "Melee attacks and melee projectiles inflict holy fire\n" + - "Increased invincibility after taking damage\n" + "Temporary immunity to lava\n" + "Increased melee knockback"); } @@ -60,7 +59,6 @@ namespace CalamityMod.Items.Accessories recipe.AddIngredient(ModContent.ItemType()); recipe.AddIngredient(ModContent.ItemType(), 5); recipe.AddIngredient(ModContent.ItemType(), 5); - recipe.AddIngredient(ItemID.CrossNecklace); recipe.AddTile(TileID.LunarCraftingStation); recipe.SetResult(this); recipe.AddRecipe(); diff --git a/Items/Ammo/BloodfireArrow.cs b/Items/Ammo/BloodfireArrow.cs index a0771bc5c0..5691cc88d9 100644 --- a/Items/Ammo/BloodfireArrow.cs +++ b/Items/Ammo/BloodfireArrow.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Ammo public override void SetDefaults() { - item.damage = 40; + item.damage = 26; item.ranged = true; item.width = 14; item.height = 36; diff --git a/Items/Ammo/BloodfireBullet.cs b/Items/Ammo/BloodfireBullet.cs index 474ce754ef..333fe96972 100644 --- a/Items/Ammo/BloodfireBullet.cs +++ b/Items/Ammo/BloodfireBullet.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Ammo public override void SetDefaults() { - item.damage = 40; + item.damage = 26; item.ranged = true; item.width = 14; item.height = 30; diff --git a/Items/Armor/AerospecHelm.cs b/Items/Armor/AerospecHelm.cs index f150ad2d28..ca459edf8b 100644 --- a/Items/Armor/AerospecHelm.cs +++ b/Items/Armor/AerospecHelm.cs @@ -37,6 +37,7 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { player.setBonus = "5% increased movement speed and melee critical strike chance\n" + + "Enemies are more likely to target you\n" + "Taking over 25 damage in one hit will cause a spread of homing feathers to fall\n" + "Allows you to fall more quickly and disables fall damage"; CalamityPlayer modPlayer = player.Calamity(); @@ -44,6 +45,7 @@ namespace CalamityMod.Items.Armor player.noFallDmg = true; player.moveSpeed += 0.05f; player.meleeCrit += 5; + player.aggro += 300; } public override void UpdateEquip(Player player) diff --git a/Items/Armor/AtaxiaHelm.cs b/Items/Armor/AtaxiaHelm.cs index 463b2c1373..f33a93b88e 100644 --- a/Items/Armor/AtaxiaHelm.cs +++ b/Items/Armor/AtaxiaHelm.cs @@ -58,6 +58,7 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { player.setBonus = "5% increased melee damage\n" + + "Enemies are more likely to target you\n" + "Inferno effect when below 50% life\n" + "Melee attacks and projectiles cause chaos flames to erupt on enemy hits\n" + "You have a 20% chance to emit a blazing explosion when you are hit"; @@ -65,6 +66,7 @@ namespace CalamityMod.Items.Armor modPlayer.ataxiaBlaze = true; modPlayer.ataxiaGeyser = true; player.meleeDamage += 0.05f; + player.aggro += 700; } public override void UpdateEquip(Player player) diff --git a/Items/Armor/AuricTeslaHelm.cs b/Items/Armor/AuricTeslaHelm.cs index 891f53bdca..878ec5d2ae 100644 --- a/Items/Armor/AuricTeslaHelm.cs +++ b/Items/Armor/AuricTeslaHelm.cs @@ -39,6 +39,7 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { player.setBonus = "Melee Tarragon, Bloodflare, God Slayer, and Silva armor effects\n" + + "Enemies are more likely to target you\n" + "All projectiles spawn healing auric orbs on enemy hits\n" + "Max run speed and acceleration boosted by 10%\n" + "Your melee damage is multiplied based on how high your HP is; at full HP this effect is at max"; diff --git a/Items/Armor/BrimflameScowl.cs b/Items/Armor/BrimflameScowl.cs index 0f6f5539d2..432cfb162c 100644 --- a/Items/Armor/BrimflameScowl.cs +++ b/Items/Armor/BrimflameScowl.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Armor item.defense = 7; //41 } - private void updateFrenzy(Player player) + private void UpdateFrenzy(Player player) { CalamityPlayer modPlayer = player.Calamity(); if (!frenzy) @@ -63,7 +63,7 @@ namespace CalamityMod.Items.Armor player.buffImmune[ModContent.BuffType()] = true; player.buffImmune[BuffID.OnFire] = true; player.buffImmune[BuffID.Frostburn] = true; - updateFrenzy(player); + UpdateFrenzy(player); } public override bool IsArmorSet(Item head, Item body, Item legs) diff --git a/Items/Armor/DaedalusHelm.cs b/Items/Armor/DaedalusHelm.cs index 466ef8b65d..24e8c802b2 100644 --- a/Items/Armor/DaedalusHelm.cs +++ b/Items/Armor/DaedalusHelm.cs @@ -39,11 +39,13 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { player.setBonus = "5% increased melee damage\n" + + "Enemies are more likely to target you\n" + "You have a 33% chance to reflect projectiles back at enemies\n" + "If you reflect a projectile you are also healed for 1/5 of that projectile's damage"; CalamityPlayer modPlayer = player.Calamity(); modPlayer.daedalusReflect = true; player.meleeDamage += 0.05f; + player.aggro += 500; } public override void UpdateEquip(Player player) diff --git a/Items/Armor/GodSlayerHelm.cs b/Items/Armor/GodSlayerHelm.cs index 8e359834e0..8c51094372 100644 --- a/Items/Armor/GodSlayerHelm.cs +++ b/Items/Armor/GodSlayerHelm.cs @@ -42,10 +42,12 @@ namespace CalamityMod.Items.Armor player.setBonus = "You will survive fatal damage and will be healed 150 HP if an attack would have killed you\n" + "This effect can only occur once every 45 seconds\n" + "While the cooldown for this effect is active all life regen is halved\n" + + "Enemies are more likely to target you\n" + "Taking over 80 damage in one hit will cause you to release a swarm of high-damage god killer darts\n" + "Enemies take a lot of damage when they hit you\n" + "An attack that would deal 80 damage or less will have its damage reduced to 1"; player.thorns += 2.5f; + player.aggro += 1000; } public override void UpdateEquip(Player player) diff --git a/Items/Armor/ReaverHelm.cs b/Items/Armor/ReaverHelm.cs index e62e24b70a..75a2f4a714 100644 --- a/Items/Armor/ReaverHelm.cs +++ b/Items/Armor/ReaverHelm.cs @@ -45,9 +45,11 @@ namespace CalamityMod.Items.Armor player.moveSpeed -= 0.2f; player.statDefense += 10; player.lifeRegen += 3; + player.aggro += 600; modPlayer.reaverDefense = true; modPlayer.wearingRogueArmor = true; player.setBonus = "+10 defense and +3 life regen\n" + + "Enemies are more likely to target you\n" + "Reduces the life regen lost from damage over time debuffs by 20%\n" + "All attacks have a small chance to steal life and speed up the rate of life regen\n" + "20% decreased movement speed and flight time\n" + diff --git a/Items/Armor/ReaverVisage.cs b/Items/Armor/ReaverVisage.cs index ecc00b8150..1fb4176efd 100644 --- a/Items/Armor/ReaverVisage.cs +++ b/Items/Armor/ReaverVisage.cs @@ -1,5 +1,6 @@ using CalamityMod.CalPlayer; using CalamityMod.Items.Materials; +using System.Collections.Generic; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -13,7 +14,7 @@ namespace CalamityMod.Items.Armor public override void SetStaticDefaults() { DisplayName.SetDefault("Reaver Visage"); - Tooltip.SetDefault("25% increased movement speed and 20% increased jump speed"); + Tooltip.SetDefault("20% increased jump speed and 25% increased movement speed"); } public override void SetDefaults() @@ -25,7 +26,18 @@ namespace CalamityMod.Items.Armor item.defense = 13; //46 } - public override bool IsArmorSet(Item head, Item body, Item legs) + public override void ModifyTooltips(List list) + { + bool autoJump = Main.player[Main.myPlayer].autoJump; + string jumpAmt = autoJump ? "5" : "20"; + foreach (TooltipLine line2 in list) + { + if (line2.mod == "Terraria" && line2.Name == "Tooltip0") + line2.text = jumpAmt + "% increased jump speed and 25% increased movement speed"; + } + } + + public override bool IsArmorSet(Item head, Item body, Item legs) { return body.type == ModContent.ItemType() && legs.type == ModContent.ItemType(); } @@ -53,7 +65,7 @@ namespace CalamityMod.Items.Armor public override void UpdateEquip(Player player) { - player.jumpSpeedBoost += 1f; + player.jumpSpeedBoost += player.autoJump ? 0.25f : 1f; player.moveSpeed += 0.25f; } diff --git a/Items/Armor/StatigelCap.cs b/Items/Armor/StatigelCap.cs index 9dc3c1101b..e1e76f569b 100644 --- a/Items/Armor/StatigelCap.cs +++ b/Items/Armor/StatigelCap.cs @@ -33,14 +33,15 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { + string jumpSpeedBonus = player.autoJump ? "7.5" : "30"; player.setBonus = "When you take over 100 damage in one hit you become immune to damage for an extended period of time\n" + "Grants an extra jump and increased jump height\n" + - "30% increased jump speed"; + jumpSpeedBonus + "% increased jump speed"; CalamityPlayer modPlayer = player.Calamity(); modPlayer.statigelSet = true; modPlayer.statigelJump = true; Player.jumpHeight += 5; - player.jumpSpeedBoost += 1.5f; + player.jumpSpeedBoost += player.autoJump ? 0.375f : 1.5f; } public override void UpdateEquip(Player player) diff --git a/Items/Armor/StatigelHeadgear.cs b/Items/Armor/StatigelHeadgear.cs index 7a03113433..a3fb83eacb 100644 --- a/Items/Armor/StatigelHeadgear.cs +++ b/Items/Armor/StatigelHeadgear.cs @@ -33,15 +33,16 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - player.setBonus = "When you take over 100 damage in one hit you become immune to damage for an extended period of time\n" + - "Grants an extra jump and increased jump height\n" + - "30% increased jump speed"; - CalamityPlayer modPlayer = player.Calamity(); - modPlayer.statigelSet = true; + string jumpSpeedBonus = player.autoJump ? "7.5" : "30"; + player.setBonus = "When you take over 100 damage in one hit you become immune to damage for an extended period of time\n" + + "Grants an extra jump and increased jump height\n" + + jumpSpeedBonus + "% increased jump speed"; + CalamityPlayer modPlayer = player.Calamity(); + modPlayer.statigelSet = true; modPlayer.statigelJump = true; Player.jumpHeight += 5; - player.jumpSpeedBoost += 1.5f; - } + player.jumpSpeedBoost += player.autoJump ? 0.375f : 1.5f; + } public override void UpdateEquip(Player player) { diff --git a/Items/Armor/StatigelHelm.cs b/Items/Armor/StatigelHelm.cs index ae3d6fd38d..0ade0becc7 100644 --- a/Items/Armor/StatigelHelm.cs +++ b/Items/Armor/StatigelHelm.cs @@ -33,15 +33,18 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - player.setBonus = "When you take over 100 damage in one hit you become immune to damage for an extended period of time\n" + - "Grants an extra jump and increased jump height\n" + - "30% increased jump speed"; - CalamityPlayer modPlayer = player.Calamity(); - modPlayer.statigelSet = true; + string jumpSpeedBonus = player.autoJump ? "7.5" : "30"; + player.setBonus = "Enemies are more likely to target you\n" + + "When you take over 100 damage in one hit you become immune to damage for an extended period of time\n" + + "Grants an extra jump and increased jump height\n" + + jumpSpeedBonus + "% increased jump speed"; + CalamityPlayer modPlayer = player.Calamity(); + modPlayer.statigelSet = true; modPlayer.statigelJump = true; Player.jumpHeight += 5; - player.jumpSpeedBoost += 1.5f; - } + player.jumpSpeedBoost += player.autoJump ? 0.375f : 1.5f; + player.aggro += 400; + } public override void UpdateEquip(Player player) { diff --git a/Items/Armor/StatigelHood.cs b/Items/Armor/StatigelHood.cs index 089c3540e9..cf93c36764 100644 --- a/Items/Armor/StatigelHood.cs +++ b/Items/Armor/StatigelHood.cs @@ -34,18 +34,19 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - player.setBonus = "18% increased minion damage\n" + + string jumpSpeedBonus = player.autoJump ? "7.5" : "30"; + player.setBonus = "18% increased minion damage\n" + "Summons a mini slime god to fight for you, the type depends on what world evil you have\n" + "When you take over 100 damage in one hit you become immune to damage for an extended period of time\n" + "Grants an extra jump and increased jump height\n" + - "30% increased jump speed"; + jumpSpeedBonus + "% increased jump speed"; CalamityPlayer modPlayer = player.Calamity(); modPlayer.statigelSet = true; modPlayer.slimeGod = true; modPlayer.statigelJump = true; Player.jumpHeight += 5; - player.jumpSpeedBoost += 1.5f; - player.minionDamage += 0.18f; + player.jumpSpeedBoost += player.autoJump ? 0.375f : 1.5f; + player.minionDamage += 0.18f; if (player.whoAmI == Main.myPlayer) { if (player.FindBuffIndex(ModContent.BuffType()) == -1) diff --git a/Items/Armor/StatigelMask.cs b/Items/Armor/StatigelMask.cs index bac001ee47..cec627f8fb 100644 --- a/Items/Armor/StatigelMask.cs +++ b/Items/Armor/StatigelMask.cs @@ -33,9 +33,10 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - player.setBonus = "When you take over 100 damage in one hit you become immune to damage for an extended period of time\n" + + string jumpSpeedBonus = player.autoJump ? "7.5" : "30"; + player.setBonus = "When you take over 100 damage in one hit you become immune to damage for an extended period of time\n" + "Grants an extra jump and increased jump height\n" + - "30% increased jump speed\n" + + jumpSpeedBonus + "% increased jump speed\n" + "Rogue stealth builds while not attacking and slower while moving, up to a max of 100\n" + "Once you have built max stealth, you will be able to perform a Stealth Strike\n" + "Rogue stealth only reduces when you attack, it does not reduce while moving\n" + @@ -46,8 +47,8 @@ namespace CalamityMod.Items.Armor modPlayer.rogueStealthMax += 1f; modPlayer.wearingRogueArmor = true; Player.jumpHeight += 5; - player.jumpSpeedBoost += 1.5f; - } + player.jumpSpeedBoost += player.autoJump ? 0.375f : 1.5f; + } public override void UpdateEquip(Player player) { diff --git a/Items/Armor/TarragonHelm.cs b/Items/Armor/TarragonHelm.cs index 92116f98ca..d124b99c40 100644 --- a/Items/Armor/TarragonHelm.cs +++ b/Items/Armor/TarragonHelm.cs @@ -61,9 +61,11 @@ namespace CalamityMod.Items.Armor CalamityPlayer modPlayer = player.Calamity(); modPlayer.tarraSet = true; modPlayer.tarraMelee = true; + player.aggro += 800; string hotkey = CalamityMod.TarraHotKey.TooltipHotkeyString(); player.setBonus = "Increased heart pickup range\n" + "Enemies have a chance to drop extra hearts on death\n" + + "Enemies are more likely to target you\n" + "You have a 25% chance to gain a life regen buff when you take damage\n" + "Press " + hotkey + " to cloak yourself in life energy that heavily reduces enemy contact damage for 10 seconds\n" + "This has a 30 second cooldown"; diff --git a/Items/Armor/VictideHelm.cs b/Items/Armor/VictideHelm.cs index 786d277b0b..9fc2c57692 100644 --- a/Items/Armor/VictideHelm.cs +++ b/Items/Armor/VictideHelm.cs @@ -31,7 +31,8 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - player.setBonus = "Increased life regen and melee damage while submerged in liquid\n" + + player.setBonus = "Enemies are more likely to target you\n" + + "Increased life regen and melee damage while submerged in liquid\n" + "When using any weapon you have a 10% chance to throw a returning seashell projectile\n" + "This seashell does true damage and does not benefit from any damage class\n" + "Provides increased underwater mobility and slightly reduces breath loss in the abyss"; @@ -43,6 +44,7 @@ namespace CalamityMod.Items.Armor player.meleeDamage += 0.1f; player.lifeRegen += 3; } + player.aggro += 200; } public override void UpdateEquip(Player player) diff --git a/Items/Armor/WulfrumHelm.cs b/Items/Armor/WulfrumHelm.cs index 8aa0a192c9..add54c9c7c 100644 --- a/Items/Armor/WulfrumHelm.cs +++ b/Items/Armor/WulfrumHelm.cs @@ -30,13 +30,15 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - player.setBonus = "+3 defense\n" + + player.setBonus = "Enemies are more likely to target you\n" + + "+3 defense\n" + "+5 defense when below 50% life"; player.statDefense += 3; //11 - if (player.statLife <= (int)((double)player.statLifeMax2 * 0.5)) + if (player.statLife <= (int)(player.statLifeMax2 * 0.5)) { player.statDefense += 5; //16 } + player.aggro += 100; } public override void UpdateEquip(Player player) diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index 34a6eafe6f..b260635bcd 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -100,8 +100,8 @@ namespace CalamityMod.Items #region SetDefaults public override void SetDefaults(Item item) { - if (customRarity.IsPostML() && item.rare != ItemRarityID.Red) - item.rare = ItemRarityID.Red; + if (customRarity.IsPostML() && item.rare != ItemRarityID.Purple) + item.rare = ItemRarityID.Purple; if (item.maxStack == 99 || item.type == ItemID.Dynamite || item.type == ItemID.StickyDynamite || item.type == ItemID.BouncyDynamite || item.type == ItemID.StickyBomb || item.type == ItemID.BouncyBomb) diff --git a/Items/LoreItems/KnowledgeKingSlime.cs b/Items/LoreItems/KnowledgeKingSlime.cs index 8806f465d3..f3c2399bb4 100644 --- a/Items/LoreItems/KnowledgeKingSlime.cs +++ b/Items/LoreItems/KnowledgeKingSlime.cs @@ -29,12 +29,12 @@ namespace CalamityMod.Items.LoreItems { bool autoJump = Main.player[Main.myPlayer].autoJump; string hasJumpBoost = "Favorite this item to gain 5% increased movement speed and 2% increased jump speed."; - string noJumpBoost = "Favorite this item to gain 5% increased movement speed."; + string lessJumpBoost = "Favorite this item to gain 5% increased movement speed and 0.5% increased jump speed."; foreach (TooltipLine line2 in list) { if (line2.mod == "Terraria" && line2.Name == "Tooltip2") { - line2.text = autoJump ? noJumpBoost : hasJumpBoost; + line2.text = autoJump ? lessJumpBoost : hasJumpBoost; } } } diff --git a/Items/Tools/BlossomPickaxe.cs b/Items/Tools/BlossomPickaxe.cs index 2812d72289..3f8aa12668 100644 --- a/Items/Tools/BlossomPickaxe.cs +++ b/Items/Tools/BlossomPickaxe.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Tools public override void SetDefaults() { - item.damage = 90; + item.damage = 60; item.melee = true; item.width = 50; item.height = 52; diff --git a/Items/Tools/Grax.cs b/Items/Tools/Grax.cs index 2ed04dc688..4af98dd66a 100644 --- a/Items/Tools/Grax.cs +++ b/Items/Tools/Grax.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.Tools item.width = 62; item.height = 62; item.scale = 1.5f; - item.damage = 500; + item.damage = 325; item.melee = true; item.useAnimation = 16; item.useStyle = ItemUseStyleID.SwingThrow; @@ -33,10 +33,10 @@ namespace CalamityMod.Items.Tools item.UseSound = SoundID.Item1; item.autoReuse = true; item.tileBoost += 5; - item.value = Item.buyPrice(1, 20, 0, 0); - item.rare = 10; - item.Calamity().customRarity = CalamityRarity.Turquoise; - } + item.value = CalamityGlobalItem.Rarity12BuyPrice; + item.rare = ItemRarityID.Purple; + item.Calamity().customRarity = CalamityRarity.Turquoise; + } public override bool AltFunctionUse(Player player) => true; diff --git a/Items/Weapons/DraedonsArsenal/LaserRifle.cs b/Items/Weapons/DraedonsArsenal/LaserRifle.cs index 266056f4d0..3e727a4784 100644 --- a/Items/Weapons/DraedonsArsenal/LaserRifle.cs +++ b/Items/Weapons/DraedonsArsenal/LaserRifle.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal item.width = 84; item.height = 28; item.ranged = true; - item.damage = 270; + item.damage = 176; item.knockBack = 4f; item.useTime = 25; item.useAnimation = 25; diff --git a/Items/Weapons/DraedonsArsenal/Phaseslayer.cs b/Items/Weapons/DraedonsArsenal/Phaseslayer.cs index a7d8a08b87..aeaec0dba5 100644 --- a/Items/Weapons/DraedonsArsenal/Phaseslayer.cs +++ b/Items/Weapons/DraedonsArsenal/Phaseslayer.cs @@ -45,8 +45,8 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal item.noUseGraphic = true; - item.value = CalamityGlobalItem.RarityVioletBuyPrice; - item.rare = ItemRarityID.Red; + item.value = CalamityGlobalItem.Rarity14BuyPrice; + item.rare = ItemRarityID.Purple; modItem.customRarity = CalamityRarity.DraedonRust; item.UseSound = SoundID.Item1; diff --git a/Items/Weapons/DraedonsArsenal/PlasmaCaster.cs b/Items/Weapons/DraedonsArsenal/PlasmaCaster.cs index 282369b18b..bd196ddcaf 100644 --- a/Items/Weapons/DraedonsArsenal/PlasmaCaster.cs +++ b/Items/Weapons/DraedonsArsenal/PlasmaCaster.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal // still awkward that the item called Plasma Rifle is the same class and exact same tier as this item public class PlasmaCaster : ModItem { - public const int BaseDamage = 1100; + public const int BaseDamage = 715; public override void SetStaticDefaults() { DisplayName.SetDefault("Plasma Caster"); diff --git a/Items/Weapons/DraedonsArsenal/PlasmaGrenade.cs b/Items/Weapons/DraedonsArsenal/PlasmaGrenade.cs index f2a1bce19d..ac95a98634 100644 --- a/Items/Weapons/DraedonsArsenal/PlasmaGrenade.cs +++ b/Items/Weapons/DraedonsArsenal/PlasmaGrenade.cs @@ -37,8 +37,8 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal item.UseSound = SoundID.Item1; item.autoReuse = true; - item.value = Item.sellPrice(silver: 80); - item.rare = ItemRarityID.Red; + item.value = Item.sellPrice(silver: 10); + item.rare = ItemRarityID.Purple; modItem.customRarity = CalamityRarity.DraedonRust; item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/DraedonsArsenal/PoleWarper.cs b/Items/Weapons/DraedonsArsenal/PoleWarper.cs index 0c28a83580..964a9d2a2a 100644 --- a/Items/Weapons/DraedonsArsenal/PoleWarper.cs +++ b/Items/Weapons/DraedonsArsenal/PoleWarper.cs @@ -31,8 +31,8 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal item.noMelee = true; item.knockBack = 8f; - item.value = CalamityGlobalItem.RarityVioletBuyPrice; - item.rare = ItemRarityID.Red; + item.value = CalamityGlobalItem.Rarity14BuyPrice; + item.rare = ItemRarityID.Purple; modItem.customRarity = CalamityRarity.DraedonRust; item.UseSound = SoundID.Item15; diff --git a/Items/Weapons/DraedonsArsenal/PulseDragon.cs b/Items/Weapons/DraedonsArsenal/PulseDragon.cs index d25d2dfabc..d081a255cb 100644 --- a/Items/Weapons/DraedonsArsenal/PulseDragon.cs +++ b/Items/Weapons/DraedonsArsenal/PulseDragon.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal { CalamityGlobalItem modItem = item.Calamity(); - item.damage = 420; + item.damage = 273; item.melee = true; item.width = 30; item.height = 10; diff --git a/Items/Weapons/DraedonsArsenal/PulseRifle.cs b/Items/Weapons/DraedonsArsenal/PulseRifle.cs index 30ad18f4f7..a6acfeeb40 100644 --- a/Items/Weapons/DraedonsArsenal/PulseRifle.cs +++ b/Items/Weapons/DraedonsArsenal/PulseRifle.cs @@ -37,8 +37,8 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal item.UseSound = mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/PulseRifleFire"); item.noMelee = true; - item.value = CalamityGlobalItem.RarityVioletBuyPrice; - item.rare = ItemRarityID.Red; + item.value = CalamityGlobalItem.Rarity14BuyPrice; + item.rare = ItemRarityID.Purple; modItem.customRarity = CalamityRarity.DraedonRust; item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/DraedonsArsenal/PulseTurretRemote.cs b/Items/Weapons/DraedonsArsenal/PulseTurretRemote.cs index 2a17704d19..9cc1ac8f71 100644 --- a/Items/Weapons/DraedonsArsenal/PulseTurretRemote.cs +++ b/Items/Weapons/DraedonsArsenal/PulseTurretRemote.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal item.UseSound = SoundID.Item15; item.noMelee = true; - item.value = CalamityGlobalItem.Rarity5BuyPrice; + item.value = CalamityGlobalItem.Rarity8BuyPrice; item.rare = ItemRarityID.Red; modItem.customRarity = CalamityRarity.DraedonRust; diff --git a/Items/Weapons/DraedonsArsenal/SnakeEyes.cs b/Items/Weapons/DraedonsArsenal/SnakeEyes.cs index 1cb501276d..2051589a03 100644 --- a/Items/Weapons/DraedonsArsenal/SnakeEyes.cs +++ b/Items/Weapons/DraedonsArsenal/SnakeEyes.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal CalamityGlobalItem modItem = item.Calamity(); item.shootSpeed = 10f; - item.damage = 55; + item.damage = 36; item.mana = 12; item.width = 38; item.height = 24; diff --git a/Items/Weapons/DraedonsArsenal/TeslaCannon.cs b/Items/Weapons/DraedonsArsenal/TeslaCannon.cs index 931267cb5f..81d02b4f57 100644 --- a/Items/Weapons/DraedonsArsenal/TeslaCannon.cs +++ b/Items/Weapons/DraedonsArsenal/TeslaCannon.cs @@ -38,8 +38,8 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal item.UseSound = mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/TeslaCannonFire"); item.noMelee = true; - item.value = CalamityGlobalItem.RarityVioletBuyPrice; - item.rare = ItemRarityID.Red; + item.value = CalamityGlobalItem.Rarity14BuyPrice; + item.rare = ItemRarityID.Purple; modItem.customRarity = CalamityRarity.DraedonRust; item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/DraedonsArsenal/WavePounder.cs b/Items/Weapons/DraedonsArsenal/WavePounder.cs index a56b4f7923..b408b316a1 100644 --- a/Items/Weapons/DraedonsArsenal/WavePounder.cs +++ b/Items/Weapons/DraedonsArsenal/WavePounder.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal { CalamityGlobalItem modItem = item.Calamity(); - item.damage = 102; + item.damage = 66; modItem.rogue = true; item.noMelee = true; item.noUseGraphic = true; diff --git a/Items/Weapons/Magic/GammaFusillade.cs b/Items/Weapons/Magic/GammaFusillade.cs index c5990b03df..25dd485020 100644 --- a/Items/Weapons/Magic/GammaFusillade.cs +++ b/Items/Weapons/Magic/GammaFusillade.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Magic public override void SetDefaults() { - item.damage = 110; + item.damage = 72; item.magic = true; item.mana = 4; item.width = 28; diff --git a/Items/Weapons/Magic/MagneticMeltdown.cs b/Items/Weapons/Magic/MagneticMeltdown.cs index 3593909b93..7ba0b1305c 100644 --- a/Items/Weapons/Magic/MagneticMeltdown.cs +++ b/Items/Weapons/Magic/MagneticMeltdown.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Magic public override void SetDefaults() { - item.damage = 52; + item.damage = 33; item.magic = true; item.mana = 25; item.width = 78; @@ -29,13 +29,13 @@ namespace CalamityMod.Items.Weapons.Magic item.useStyle = ItemUseStyleID.HoldingOut; item.noMelee = true; item.knockBack = 4f; - item.value = Item.buyPrice(1, 80, 0, 0); - item.rare = 10; + item.value = CalamityGlobalItem.Rarity12BuyPrice; + item.rare = ItemRarityID.Purple; item.UseSound = SoundID.Item20; item.autoReuse = true; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 12f; - item.Calamity().customRarity = CalamityRarity.DarkBlue; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override Vector2? HoldoutOrigin() => new Vector2(15, 15); diff --git a/Items/Weapons/Magic/Mistlestorm.cs b/Items/Weapons/Magic/Mistlestorm.cs index d386c8fcff..b8987036f7 100644 --- a/Items/Weapons/Magic/Mistlestorm.cs +++ b/Items/Weapons/Magic/Mistlestorm.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Magic public override void SetDefaults() { - item.damage = 66; + item.damage = 43; item.magic = true; item.mana = 5; item.width = 48; diff --git a/Items/Weapons/Magic/PlasmaRifle.cs b/Items/Weapons/Magic/PlasmaRifle.cs index c9b7130f6e..514f24e4ef 100644 --- a/Items/Weapons/Magic/PlasmaRifle.cs +++ b/Items/Weapons/Magic/PlasmaRifle.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Magic public override void SetDefaults() { - item.damage = 183; + item.damage = 120; item.mana = 40; item.magic = true; item.width = 48; @@ -27,13 +27,13 @@ namespace CalamityMod.Items.Weapons.Magic item.useStyle = ItemUseStyleID.HoldingOut; item.noMelee = true; item.knockBack = 4f; - item.value = Item.buyPrice(1, 20, 0, 0); - item.rare = 10; - item.UseSound = mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/PlasmaBlast"); + item.value = CalamityGlobalItem.Rarity12BuyPrice; + item.rare = ItemRarityID.Purple; + item.Calamity().customRarity = CalamityRarity.Turquoise; + item.UseSound = mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/PlasmaBlast"); item.autoReuse = true; item.shootSpeed = 12f; item.shoot = ModContent.ProjectileType(); - item.Calamity().customRarity = CalamityRarity.Turquoise; } public override Vector2? HoldoutOffset() => new Vector2(-10, 0); diff --git a/Items/Weapons/Magic/PurgeGuzzler.cs b/Items/Weapons/Magic/PurgeGuzzler.cs index 8b231d57b1..9c5540705f 100644 --- a/Items/Weapons/Magic/PurgeGuzzler.cs +++ b/Items/Weapons/Magic/PurgeGuzzler.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.Weapons.Magic public override void SetDefaults() { - item.damage = 80; + item.damage = 52; item.magic = true; item.mana = 12; item.width = 58; @@ -26,12 +26,12 @@ namespace CalamityMod.Items.Weapons.Magic item.noMelee = true; item.knockBack = 4.5f; item.UseSound = mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/LaserCannon"); - item.value = Item.buyPrice(1, 20, 0, 0); - item.rare = 10; - item.autoReuse = true; + item.value = CalamityGlobalItem.Rarity12BuyPrice; + item.rare = ItemRarityID.Purple; + item.Calamity().customRarity = CalamityRarity.Turquoise; + item.autoReuse = true; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 6f; - item.Calamity().customRarity = CalamityRarity.Turquoise; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/Magic/SanguineFlare.cs b/Items/Weapons/Magic/SanguineFlare.cs index 2dc72febbf..a4d62c4d3c 100644 --- a/Items/Weapons/Magic/SanguineFlare.cs +++ b/Items/Weapons/Magic/SanguineFlare.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Magic public override void SetDefaults() { - item.damage = 220; + item.damage = 143; item.magic = true; item.mana = 22; item.width = 56; diff --git a/Items/Weapons/Magic/Viscera.cs b/Items/Weapons/Magic/Viscera.cs index 8560f6835d..d682546636 100644 --- a/Items/Weapons/Magic/Viscera.cs +++ b/Items/Weapons/Magic/Viscera.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Magic public override void SetDefaults() { - item.damage = 153; + item.damage = 100; item.magic = true; item.mana = 15; item.width = 50; diff --git a/Items/Weapons/Melee/AquaticDissolution.cs b/Items/Weapons/Melee/AquaticDissolution.cs index 427d7ae530..2f9c1c362b 100644 --- a/Items/Weapons/Melee/AquaticDissolution.cs +++ b/Items/Weapons/Melee/AquaticDissolution.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetDefaults() { item.width = 50; - item.damage = 200; + item.damage = 130; item.melee = true; item.useAnimation = 16; item.useTime = 16; @@ -29,8 +29,9 @@ namespace CalamityMod.Items.Weapons.Melee item.UseSound = SoundID.Item60; item.autoReuse = true; item.height = 72; - item.value = CalamityGlobalItem.Rarity11BuyPrice; + item.value = CalamityGlobalItem.Rarity12BuyPrice; item.rare = ItemRarityID.Purple; + item.Calamity().customRarity = CalamityRarity.Turquoise; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 12f; } diff --git a/Items/Weapons/Melee/DivineHatchet.cs b/Items/Weapons/Melee/DivineHatchet.cs index a0f6c55d17..e12a152174 100644 --- a/Items/Weapons/Melee/DivineHatchet.cs +++ b/Items/Weapons/Melee/DivineHatchet.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetDefaults() { item.width = 60; - item.damage = 241; + item.damage = 157; item.noMelee = true; item.noUseGraphic = true; item.autoReuse = true; @@ -29,11 +29,11 @@ namespace CalamityMod.Items.Weapons.Melee item.UseSound = SoundID.Item1; item.melee = true; item.height = 62; - item.value = Item.buyPrice(1, 20, 0, 0); - item.rare = 8; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 14f; - item.Calamity().customRarity = CalamityRarity.Turquoise; + item.value = CalamityGlobalItem.Rarity12BuyPrice; + item.rare = ItemRarityID.Purple; + item.Calamity().customRarity = CalamityRarity.Turquoise; } public override void AddRecipes() diff --git a/Items/Weapons/Melee/GalacticaBlade.cs b/Items/Weapons/Melee/GalacticaBlade.cs index 2587f4ab2d..ace3c9fd8c 100644 --- a/Items/Weapons/Melee/GalacticaBlade.cs +++ b/Items/Weapons/Melee/GalacticaBlade.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetDefaults() { item.width = 60; - item.damage = 135; + item.damage = 88; item.melee = true; item.useAnimation = 17; item.useStyle = ItemUseStyleID.SwingThrow; @@ -30,11 +30,11 @@ namespace CalamityMod.Items.Weapons.Melee item.UseSound = SoundID.Item105; item.autoReuse = true; item.height = 58; - item.value = Item.buyPrice(1, 20, 0, 0); - item.rare = 10; - item.shoot = ModContent.ProjectileType(); + item.value = CalamityGlobalItem.Rarity12BuyPrice; + item.rare = ItemRarityID.Purple; + item.Calamity().customRarity = CalamityRarity.Turquoise; + item.shoot = ModContent.ProjectileType(); item.shootSpeed = 23f; - item.Calamity().customRarity = CalamityRarity.Turquoise; } public override void AddRecipes() diff --git a/Items/Weapons/Melee/HolyCollider.cs b/Items/Weapons/Melee/HolyCollider.cs index 376f43b412..ec6cc33063 100644 --- a/Items/Weapons/Melee/HolyCollider.cs +++ b/Items/Weapons/Melee/HolyCollider.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Melee item.width = 94; item.height = 80; item.scale = 1.5f; - item.damage = 400; + item.damage = 260; item.melee = true; item.useAnimation = 22; item.useStyle = ItemUseStyleID.SwingThrow; @@ -29,8 +29,9 @@ namespace CalamityMod.Items.Weapons.Melee item.knockBack = 7.75f; item.UseSound = SoundID.Item1; item.autoReuse = true; - item.value = CalamityGlobalItem.Rarity11BuyPrice; + item.value = CalamityGlobalItem.Rarity12BuyPrice; item.rare = ItemRarityID.Purple; + item.Calamity().customRarity = CalamityRarity.Turquoise; item.shootSpeed = 10f; } diff --git a/Items/Weapons/Melee/Lacerator.cs b/Items/Weapons/Melee/Lacerator.cs index c46a07977a..3af27ff365 100644 --- a/Items/Weapons/Melee/Lacerator.cs +++ b/Items/Weapons/Melee/Lacerator.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Weapons.Melee item.width = 30; item.height = 26; item.melee = true; - item.damage = 100; + item.damage = 65; item.knockBack = 7f; item.useTime = 20; item.useAnimation = 20; diff --git a/Items/Weapons/Melee/LifefruitScythe.cs b/Items/Weapons/Melee/LifefruitScythe.cs index 49797fa2eb..cf224d73e9 100644 --- a/Items/Weapons/Melee/LifefruitScythe.cs +++ b/Items/Weapons/Melee/LifefruitScythe.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetDefaults() { item.width = 62; - item.damage = 250; + item.damage = 163; item.melee = true; item.useAnimation = 18; item.useStyle = ItemUseStyleID.SwingThrow; @@ -28,11 +28,11 @@ namespace CalamityMod.Items.Weapons.Melee item.UseSound = SoundID.Item71; item.autoReuse = true; item.height = 72; - item.value = Item.buyPrice(1, 20, 0, 0); - item.rare = 10; - item.shoot = ModContent.ProjectileType(); + item.value = CalamityGlobalItem.Rarity12BuyPrice; + item.rare = ItemRarityID.Purple; + item.Calamity().customRarity = CalamityRarity.Turquoise; + item.shoot = ModContent.ProjectileType(); item.shootSpeed = 9f; - item.Calamity().customRarity = CalamityRarity.Turquoise; } public override void AddRecipes() diff --git a/Items/Weapons/Melee/MirrorBlade.cs b/Items/Weapons/Melee/MirrorBlade.cs index 34d0f058cb..0cd39d1988 100644 --- a/Items/Weapons/Melee/MirrorBlade.cs +++ b/Items/Weapons/Melee/MirrorBlade.cs @@ -8,7 +8,7 @@ namespace CalamityMod.Items.Weapons.Melee { public class MirrorBlade : ModItem { - private int baseDamage = 295; + private int baseDamage = 192; public override void SetStaticDefaults() { diff --git a/Items/Weapons/Melee/Mourningstar.cs b/Items/Weapons/Melee/Mourningstar.cs index 65bb92e1c4..0826222ebf 100644 --- a/Items/Weapons/Melee/Mourningstar.cs +++ b/Items/Weapons/Melee/Mourningstar.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Melee { item.width = 16; item.height = 16; - item.damage = 230; + item.damage = 150; item.noMelee = true; item.noUseGraphic = true; item.channel = true; @@ -30,11 +30,11 @@ namespace CalamityMod.Items.Weapons.Melee item.useStyle = ItemUseStyleID.HoldingOut; item.knockBack = 2.5f; item.UseSound = SoundID.Item116; - item.value = Item.buyPrice(1, 20, 0, 0); - item.rare = 10; - item.shootSpeed = 24f; + item.value = CalamityGlobalItem.Rarity12BuyPrice; + item.rare = ItemRarityID.Purple; + item.Calamity().customRarity = CalamityRarity.Turquoise; + item.shootSpeed = 24f; item.shoot = ModContent.ProjectileType(); - item.Calamity().customRarity = CalamityRarity.Turquoise; } public override void AddRecipes() diff --git a/Items/Weapons/Melee/PlagueKeeper.cs b/Items/Weapons/Melee/PlagueKeeper.cs index 0a8dc4f232..f2e62911c2 100644 --- a/Items/Weapons/Melee/PlagueKeeper.cs +++ b/Items/Weapons/Melee/PlagueKeeper.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetDefaults() { item.width = 74; - item.damage = 90; + item.damage = 75; item.melee = true; item.useAnimation = 20; item.useStyle = ItemUseStyleID.SwingThrow; @@ -28,9 +28,9 @@ namespace CalamityMod.Items.Weapons.Melee item.UseSound = SoundID.Item1; item.autoReuse = true; item.height = 90; - item.value = CalamityGlobalItem.Rarity11BuyPrice; - item.rare = ItemRarityID.Purple; - item.shoot = ModContent.ProjectileType(); + item.value = CalamityGlobalItem.Rarity11BuyPrice; + item.rare = ItemRarityID.Purple; + item.shoot = ModContent.ProjectileType(); item.shootSpeed = 9f; } @@ -40,7 +40,7 @@ namespace CalamityMod.Items.Weapons.Melee recipe.AddIngredient(ModContent.ItemType()); recipe.AddIngredient(ItemID.BeeKeeper); recipe.AddIngredient(ItemID.FragmentSolar, 10); - recipe.AddIngredient(ModContent.ItemType(), 5); + recipe.AddIngredient(ModContent.ItemType(), 5); recipe.AddIngredient(ItemID.LunarBar, 5); recipe.AddTile(TileID.LunarCraftingStation); recipe.SetResult(this); @@ -54,11 +54,11 @@ namespace CalamityMod.Items.Weapons.Melee { int bee = Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, 0f, player.beeType(), player.beeDamage((int)(item.damage * player.MeleeDamage()) / 3), player.beeKB(0f), player.whoAmI); - if (bee.WithinBounds(Main.maxProjectiles)) - { - Main.projectile[bee].penetrate = 1; - Main.projectile[bee].Calamity().forceMelee = true; - } + if (bee.WithinBounds(Main.maxProjectiles)) + { + Main.projectile[bee].penetrate = 1; + Main.projectile[bee].Calamity().forceMelee = true; + } } } @@ -69,12 +69,12 @@ namespace CalamityMod.Items.Weapons.Melee { int bee = Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, 0f, player.beeType(), player.beeDamage((int)(item.damage * player.MeleeDamage()) / 3), player.beeKB(0f), player.whoAmI); - if (bee.WithinBounds(Main.maxProjectiles)) - { - Main.projectile[bee].penetrate = 1; - Main.projectile[bee].Calamity().forceMelee = true; - } + if (bee.WithinBounds(Main.maxProjectiles)) + { + Main.projectile[bee].penetrate = 1; + Main.projectile[bee].Calamity().forceMelee = true; + } } - } + } } } diff --git a/Items/Weapons/Melee/SolarFlare.cs b/Items/Weapons/Melee/SolarFlare.cs index f99be3b328..8dd6c5f076 100644 --- a/Items/Weapons/Melee/SolarFlare.cs +++ b/Items/Weapons/Melee/SolarFlare.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Weapons.Melee item.width = 40; item.height = 38; item.melee = true; - item.damage = 60; + item.damage = 39; item.knockBack = 7.5f; item.useTime = 20; item.useAnimation = 20; @@ -37,9 +37,9 @@ namespace CalamityMod.Items.Weapons.Melee item.shoot = ModContent.ProjectileType(); item.shootSpeed = 16f; - item.rare = 10; - item.Calamity().customRarity = CalamityRarity.Turquoise; - item.value = Item.buyPrice(platinum: 1, gold: 20); - } + item.value = CalamityGlobalItem.Rarity12BuyPrice; + item.rare = ItemRarityID.Purple; + item.Calamity().customRarity = CalamityRarity.Turquoise; + } } } diff --git a/Items/Weapons/Melee/TheMutilator.cs b/Items/Weapons/Melee/TheMutilator.cs index 55de807630..60474d8f14 100644 --- a/Items/Weapons/Melee/TheMutilator.cs +++ b/Items/Weapons/Melee/TheMutilator.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.Weapons.Melee item.width = 90; item.height = 90; item.scale = 1.5f; - item.damage = 700; + item.damage = 455; item.melee = true; item.useAnimation = 18; item.useStyle = ItemUseStyleID.SwingThrow; @@ -30,10 +30,10 @@ namespace CalamityMod.Items.Weapons.Melee item.knockBack = 8f; item.UseSound = SoundID.Item1; item.autoReuse = true; - item.value = Item.buyPrice(1, 40, 0, 0); - item.rare = 10; - item.shootSpeed = 10f; - item.Calamity().customRarity = CalamityRarity.PureGreen; + item.value = CalamityGlobalItem.Rarity12BuyPrice; + item.rare = ItemRarityID.Purple; + item.Calamity().customRarity = CalamityRarity.Turquoise; + item.shootSpeed = 10f; } public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit) diff --git a/Items/Weapons/Melee/TrueTyrantYharimsUltisword.cs b/Items/Weapons/Melee/TrueTyrantYharimsUltisword.cs index dcf49794ce..040916800f 100644 --- a/Items/Weapons/Melee/TrueTyrantYharimsUltisword.cs +++ b/Items/Weapons/Melee/TrueTyrantYharimsUltisword.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetDefaults() { item.width = 102; - item.damage = 185; + item.damage = 120; item.melee = true; item.useAnimation = 18; item.useStyle = ItemUseStyleID.SwingThrow; @@ -32,11 +32,11 @@ namespace CalamityMod.Items.Weapons.Melee item.UseSound = SoundID.Item1; item.autoReuse = true; item.height = 102; - item.value = Item.buyPrice(1, 20, 0, 0); - item.rare = 10; - item.shoot = ModContent.ProjectileType(); + item.value = CalamityGlobalItem.Rarity12BuyPrice; + item.rare = ItemRarityID.Purple; + item.Calamity().customRarity = CalamityRarity.Turquoise; + item.shoot = ModContent.ProjectileType(); item.shootSpeed = 12f; - item.Calamity().customRarity = CalamityRarity.Turquoise; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/Melee/Verdant.cs b/Items/Weapons/Melee/Verdant.cs index 7928ad08cf..9f7b96e4b0 100644 --- a/Items/Weapons/Melee/Verdant.cs +++ b/Items/Weapons/Melee/Verdant.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Weapons.Melee item.width = 30; item.height = 30; item.melee = true; - item.damage = 110; + item.damage = 72; item.knockBack = 6f; item.useTime = 22; item.useAnimation = 22; @@ -38,11 +38,11 @@ namespace CalamityMod.Items.Weapons.Melee item.shoot = ModContent.ProjectileType(); item.shootSpeed = 16f; - item.rare = 10; item.autoReuse = true; - item.Calamity().customRarity = CalamityRarity.Turquoise; - item.value = Item.buyPrice(platinum: 1, gold: 20); - } + item.value = CalamityGlobalItem.Rarity12BuyPrice; + item.rare = ItemRarityID.Purple; + item.Calamity().customRarity = CalamityRarity.Turquoise; + } public override void AddRecipes() { diff --git a/Items/Weapons/Ranged/ArterialAssault.cs b/Items/Weapons/Ranged/ArterialAssault.cs index 066d7acd2e..72bec5d9c6 100644 --- a/Items/Weapons/Ranged/ArterialAssault.cs +++ b/Items/Weapons/Ranged/ArterialAssault.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 200; + item.damage = 130; item.ranged = true; item.width = 44; item.height = 100; diff --git a/Items/Weapons/Ranged/BlissfulBombardier.cs b/Items/Weapons/Ranged/BlissfulBombardier.cs index d93c0bf3b5..5012dbadfb 100644 --- a/Items/Weapons/Ranged/BlissfulBombardier.cs +++ b/Items/Weapons/Ranged/BlissfulBombardier.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 75; + item.damage = 50; item.ranged = true; item.width = 76; item.height = 30; diff --git a/Items/Weapons/Ranged/BloodBoiler.cs b/Items/Weapons/Ranged/BloodBoiler.cs index 3688a55ea8..4a3797fecb 100644 --- a/Items/Weapons/Ranged/BloodBoiler.cs +++ b/Items/Weapons/Ranged/BloodBoiler.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 415; + item.damage = 270; item.ranged = true; item.width = 60; item.height = 30; diff --git a/Items/Weapons/Ranged/ClaretCannon.cs b/Items/Weapons/Ranged/ClaretCannon.cs index 78bc102653..55d696b811 100644 --- a/Items/Weapons/Ranged/ClaretCannon.cs +++ b/Items/Weapons/Ranged/ClaretCannon.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 215; + item.damage = 140; item.ranged = true; item.width = 48; item.height = 30; diff --git a/Items/Weapons/Ranged/ClockworkBow.cs b/Items/Weapons/Ranged/ClockworkBow.cs index c56461509b..328751b216 100644 --- a/Items/Weapons/Ranged/ClockworkBow.cs +++ b/Items/Weapons/Ranged/ClockworkBow.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 45; + item.damage = 49; item.ranged = true; item.width = 34; item.height = 100; @@ -26,9 +26,9 @@ namespace CalamityMod.Items.Weapons.Ranged item.useStyle = ItemUseStyleID.HoldingOut; item.noMelee = true; item.knockBack = 4.25f; - item.value = CalamityGlobalItem.Rarity11BuyPrice; - item.rare = ItemRarityID.Purple; - item.UseSound = SoundID.Item5; + item.value = CalamityGlobalItem.Rarity11BuyPrice; + item.rare = ItemRarityID.Purple; + item.UseSound = SoundID.Item5; item.autoReuse = true; item.shoot = ProjectileID.PurificationPowder; item.shootSpeed = 30f; diff --git a/Items/Weapons/Ranged/ElementalBlaster.cs b/Items/Weapons/Ranged/ElementalBlaster.cs index e5f2922ef3..e72e79d38d 100644 --- a/Items/Weapons/Ranged/ElementalBlaster.cs +++ b/Items/Weapons/Ranged/ElementalBlaster.cs @@ -1,7 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Ranged; using Microsoft.Xna.Framework; -using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -27,9 +26,9 @@ namespace CalamityMod.Items.Weapons.Ranged item.useStyle = ItemUseStyleID.HoldingOut; item.noMelee = true; item.knockBack = 1.75f; - item.value = CalamityGlobalItem.Rarity11BuyPrice; - item.rare = ItemRarityID.Purple; - item.UseSound = mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/PlasmaBolt"); + item.value = CalamityGlobalItem.Rarity11BuyPrice; + item.rare = ItemRarityID.Purple; + item.UseSound = mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/PlasmaBolt"); item.autoReuse = true; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 18f; diff --git a/Items/Weapons/Ranged/ElementalEruption.cs b/Items/Weapons/Ranged/ElementalEruption.cs index d6eeae5f2d..5f80285d74 100644 --- a/Items/Weapons/Ranged/ElementalEruption.cs +++ b/Items/Weapons/Ranged/ElementalEruption.cs @@ -18,33 +18,30 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 45; + item.damage = 77; item.ranged = true; item.width = 64; item.height = 34; - item.useTime = 7; + item.useTime = 14; item.useAnimation = 14; item.useStyle = ItemUseStyleID.HoldingOut; item.noMelee = true; item.knockBack = 3.5f; item.UseSound = SoundID.Item34; - item.value = CalamityGlobalItem.Rarity11BuyPrice; - item.rare = ItemRarityID.Purple; - item.autoReuse = true; + item.value = CalamityGlobalItem.Rarity11BuyPrice; + item.rare = ItemRarityID.Purple; + item.autoReuse = true; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 10f; item.useAmmo = AmmoID.Gel; } - public override Vector2? HoldoutOffset() - { - return new Vector2(-10, 0); - } + public override Vector2? HoldoutOffset() => new Vector2(-10, 0); public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { - int num6 = Main.rand.Next(3, 5); - for (int index = 0; index < num6; ++index) + int numFirestreams = Main.rand.Next(3, 5); + for (int index = 0; index < numFirestreams; ++index) { float SpeedX = speedX + Main.rand.Next(-20, 21) * 0.05f; float SpeedY = speedY + Main.rand.Next(-20, 21) * 0.05f; @@ -53,12 +50,7 @@ namespace CalamityMod.Items.Weapons.Ranged return false; } - public override bool ConsumeAmmo(Player player) - { - if (Main.rand.Next(0, 100) < 90) - return false; - return true; - } + public override bool ConsumeAmmo(Player player) => Main.rand.NextFloat() > 0.9f; public override void AddRecipes() { diff --git a/Items/Weapons/Ranged/GoldenEagle.cs b/Items/Weapons/Ranged/GoldenEagle.cs index ba714fd098..1c8196c2f1 100644 --- a/Items/Weapons/Ranged/GoldenEagle.cs +++ b/Items/Weapons/Ranged/GoldenEagle.cs @@ -15,28 +15,25 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 36; + item.damage = 86; item.ranged = true; item.noMelee = true; item.width = 46; item.height = 30; - item.useTime = 10; - item.useAnimation = 10; + item.useTime = 19; + item.useAnimation = 19; item.useStyle = ItemUseStyleID.HoldingOut; item.knockBack = 3f; - item.value = CalamityGlobalItem.Rarity11BuyPrice; - item.rare = ItemRarityID.Purple; - item.UseSound = SoundID.Item41; + item.value = CalamityGlobalItem.Rarity11BuyPrice; + item.rare = ItemRarityID.Purple; + item.UseSound = SoundID.Item41; item.autoReuse = true; - item.shoot = ProjectileID.PurificationPowder; + item.shoot = ProjectileID.Bullet; item.shootSpeed = 20f; item.useAmmo = AmmoID.Bullet; } - public override Vector2? HoldoutOffset() - { - return new Vector2(-5, 0); - } + public override Vector2? HoldoutOffset() => new Vector2(-5, 0); public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { diff --git a/Items/Weapons/Ranged/MolecularManipulator.cs b/Items/Weapons/Ranged/MolecularManipulator.cs index b0b39d91cc..48fbdf4a94 100644 --- a/Items/Weapons/Ranged/MolecularManipulator.cs +++ b/Items/Weapons/Ranged/MolecularManipulator.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 890; + item.damage = 580; item.ranged = true; item.width = 56; item.height = 34; diff --git a/Items/Weapons/Ranged/NettlelineGreatbow.cs b/Items/Weapons/Ranged/NettlelineGreatbow.cs index b25289ec8e..1a0ed05d5e 100644 --- a/Items/Weapons/Ranged/NettlelineGreatbow.cs +++ b/Items/Weapons/Ranged/NettlelineGreatbow.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 115; + item.damage = 75; item.ranged = true; item.width = 36; item.height = 64; @@ -26,14 +26,14 @@ namespace CalamityMod.Items.Weapons.Ranged item.useStyle = ItemUseStyleID.HoldingOut; item.noMelee = true; item.knockBack = 3f; - item.value = Item.buyPrice(1, 20, 0, 0); - item.rare = 10; - item.UseSound = SoundID.Item5; + item.value = CalamityGlobalItem.Rarity12BuyPrice; + item.rare = ItemRarityID.Purple; + item.Calamity().customRarity = CalamityRarity.Turquoise; + item.UseSound = SoundID.Item5; item.autoReuse = true; item.shoot = ProjectileID.PurificationPowder; item.shootSpeed = 16f; item.useAmmo = AmmoID.Arrow; - item.Calamity().customRarity = CalamityRarity.Turquoise; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/Ranged/PlanetaryAnnihilation.cs b/Items/Weapons/Ranged/PlanetaryAnnihilation.cs index 8780fce79b..a96c8ad2db 100644 --- a/Items/Weapons/Ranged/PlanetaryAnnihilation.cs +++ b/Items/Weapons/Ranged/PlanetaryAnnihilation.cs @@ -19,18 +19,18 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 52; + item.damage = 54; item.ranged = true; item.width = 58; item.height = 102; - item.useTime = 23; - item.useAnimation = 23; + item.useTime = 22; + item.useAnimation = 22; item.useStyle = ItemUseStyleID.HoldingOut; item.noMelee = true; item.knockBack = 5.5f; - item.value = CalamityGlobalItem.Rarity11BuyPrice; - item.rare = ItemRarityID.Purple; - item.UseSound = SoundID.Item75; + item.value = CalamityGlobalItem.Rarity11BuyPrice; + item.rare = ItemRarityID.Purple; + item.UseSound = SoundID.Item75; item.autoReuse = true; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 12f; diff --git a/Items/Weapons/Ranged/PristineFury.cs b/Items/Weapons/Ranged/PristineFury.cs index 727bd67c4b..1bc0c811bc 100644 --- a/Items/Weapons/Ranged/PristineFury.cs +++ b/Items/Weapons/Ranged/PristineFury.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.Weapons.Ranged { public int frameCounter = 0; public int frame = 0; - public static int BaseDamage = 140; + public static int BaseDamage = 91; public override void SetStaticDefaults() { @@ -33,9 +33,9 @@ namespace CalamityMod.Items.Weapons.Ranged item.useStyle = ItemUseStyleID.HoldingOut; item.noMelee = true; item.knockBack = 5f; - item.rare = 10; - item.value = Item.buyPrice(1, 20, 0, 0); - item.Calamity().customRarity = CalamityRarity.ItemSpecific; + item.value = CalamityGlobalItem.Rarity12BuyPrice; + item.rare = ItemRarityID.Purple; + item.Calamity().customRarity = CalamityRarity.ItemSpecific; item.UseSound = SoundID.Item34; item.autoReuse = true; item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Ranged/Seadragon.cs b/Items/Weapons/Ranged/Seadragon.cs index 3cce907465..88f2b8952c 100644 --- a/Items/Weapons/Ranged/Seadragon.cs +++ b/Items/Weapons/Ranged/Seadragon.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 108; + item.damage = 70; item.ranged = true; item.width = 78; item.height = 26; diff --git a/Items/Weapons/Ranged/Shredder.cs b/Items/Weapons/Ranged/Shredder.cs index a11696fce6..a32617e1be 100644 --- a/Items/Weapons/Ranged/Shredder.cs +++ b/Items/Weapons/Ranged/Shredder.cs @@ -29,24 +29,18 @@ namespace CalamityMod.Items.Weapons.Ranged item.useStyle = ItemUseStyleID.HoldingOut; item.noMelee = true; item.knockBack = 1.5f; - item.value = CalamityGlobalItem.Rarity11BuyPrice; - item.rare = ItemRarityID.Purple; - item.UseSound = SoundID.Item31; + item.value = CalamityGlobalItem.Rarity11BuyPrice; + item.rare = ItemRarityID.Purple; + item.UseSound = SoundID.Item31; item.autoReuse = true; - item.shoot = ProjectileID.PurificationPowder; + item.shoot = ProjectileID.Bullet; item.shootSpeed = 12f; item.useAmmo = AmmoID.Bullet; } - public override Vector2? HoldoutOffset() - { - return new Vector2(-5, 0); - } + public override Vector2? HoldoutOffset() => new Vector2(-5, 0); - public override bool AltFunctionUse(Player player) - { - return true; - } + public override bool AltFunctionUse(Player player) => true; public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { @@ -68,7 +62,8 @@ namespace CalamityMod.Items.Weapons.Ranged { float SpeedX = speedX + Main.rand.Next(-30, 31) * 0.05f; float SpeedY = speedY + Main.rand.Next(-30, 31) * 0.05f; - int shot = Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, ModContent.ProjectileType(), damage, knockBack, player.whoAmI, 0f, 0f); + int shredderBoltDamage = (int)(0.85f * damage); + int shot = Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, ModContent.ProjectileType(), shredderBoltDamage, knockBack, player.whoAmI, 0f, 0f); Main.projectile[shot].timeLeft = 180; } return false; diff --git a/Items/Weapons/Ranged/Spyker.cs b/Items/Weapons/Ranged/Spyker.cs index 834abf780c..93049ee446 100644 --- a/Items/Weapons/Ranged/Spyker.cs +++ b/Items/Weapons/Ranged/Spyker.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 240; + item.damage = 156; item.ranged = true; item.width = 44; item.height = 26; @@ -26,14 +26,14 @@ namespace CalamityMod.Items.Weapons.Ranged item.useStyle = ItemUseStyleID.HoldingOut; item.noMelee = true; item.knockBack = 6f; - item.value = Item.buyPrice(1, 20, 0, 0); - item.rare = 10; - item.UseSound = SoundID.Item108; + item.value = CalamityGlobalItem.Rarity12BuyPrice; + item.rare = ItemRarityID.Purple; + item.Calamity().customRarity = CalamityRarity.Turquoise; + item.UseSound = SoundID.Item108; item.autoReuse = true; item.shootSpeed = 9f; item.shoot = ModContent.ProjectileType(); item.useAmmo = AmmoID.Bullet; - item.Calamity().customRarity = CalamityRarity.Turquoise; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/Ranged/StormDragoon.cs b/Items/Weapons/Ranged/StormDragoon.cs index f36901c455..d4b0f1c398 100644 --- a/Items/Weapons/Ranged/StormDragoon.cs +++ b/Items/Weapons/Ranged/StormDragoon.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 94; + item.damage = 62; item.ranged = true; item.width = 74; item.height = 34; diff --git a/Items/Weapons/Ranged/TelluricGlare.cs b/Items/Weapons/Ranged/TelluricGlare.cs index 2c7308a797..32d698c76d 100644 --- a/Items/Weapons/Ranged/TelluricGlare.cs +++ b/Items/Weapons/Ranged/TelluricGlare.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 70; + item.damage = 46; item.ranged = true; item.width = 54; item.height = 92; @@ -25,14 +25,14 @@ namespace CalamityMod.Items.Weapons.Ranged item.useStyle = ItemUseStyleID.HoldingOut; item.noMelee = true; item.knockBack = 4f; - item.value = Item.buyPrice(1, 20, 0, 0); - item.rare = 10; - item.UseSound = SoundID.Item5; + item.value = CalamityGlobalItem.Rarity12BuyPrice; + item.rare = ItemRarityID.Purple; + item.Calamity().customRarity = CalamityRarity.Turquoise; + item.UseSound = SoundID.Item5; item.autoReuse = true; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 12f; item.useAmmo = AmmoID.Arrow; - item.Calamity().customRarity = CalamityRarity.Turquoise; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/Ranged/TheStorm.cs b/Items/Weapons/Ranged/TheStorm.cs index a8dc33c77f..c1d1bc9411 100644 --- a/Items/Weapons/Ranged/TheStorm.cs +++ b/Items/Weapons/Ranged/TheStorm.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 44; + item.damage = 29; item.ranged = true; item.width = 34; item.height = 50; diff --git a/Items/Weapons/Rogue/AlphaVirus.cs b/Items/Weapons/Rogue/AlphaVirus.cs index 91fc6a9860..386418fec3 100644 --- a/Items/Weapons/Rogue/AlphaVirus.cs +++ b/Items/Weapons/Rogue/AlphaVirus.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Rogue public override void SafeSetDefaults() { item.width = 44; - item.damage = 400; + item.damage = 260; item.noMelee = true; item.noUseGraphic = true; item.useAnimation = 31; @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Rogue item.autoReuse = true; item.height = 44; item.maxStack = 1; - item.value = CalamityGlobalItem.Rarity13BuyPrice; + item.value = CalamityGlobalItem.Rarity12BuyPrice; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 4f; item.rare = ItemRarityID.Purple; diff --git a/Items/Weapons/Rogue/BloodsoakedCrasher.cs b/Items/Weapons/Rogue/BloodsoakedCrasher.cs index 4a94480ecb..e0315bcd67 100644 --- a/Items/Weapons/Rogue/BloodsoakedCrasher.cs +++ b/Items/Weapons/Rogue/BloodsoakedCrasher.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Rogue public override void SafeSetDefaults() { - item.damage = 300; + item.damage = 195; item.knockBack = 3f; item.autoReuse = true; item.Calamity().rogue = true; diff --git a/Items/Weapons/Rogue/CosmicKunai.cs b/Items/Weapons/Rogue/CosmicKunai.cs index c825c6810e..b72bf8ac65 100644 --- a/Items/Weapons/Rogue/CosmicKunai.cs +++ b/Items/Weapons/Rogue/CosmicKunai.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Rogue public override void SafeSetDefaults() { item.width = 26; - item.damage = 165; + item.damage = 108; item.noMelee = true; item.noUseGraphic = true; item.useTime = 2; diff --git a/Items/Weapons/Rogue/DeificThunderbolt.cs b/Items/Weapons/Rogue/DeificThunderbolt.cs index ff7249587a..254f740866 100644 --- a/Items/Weapons/Rogue/DeificThunderbolt.cs +++ b/Items/Weapons/Rogue/DeificThunderbolt.cs @@ -20,7 +20,7 @@ Stealth strikes summon more lightning and travel faster"); public override void SafeSetDefaults() { - item.damage = 567; + item.damage = 370; item.knockBack = 10f; item.width = 56; diff --git a/Items/Weapons/Rogue/HellsSun.cs b/Items/Weapons/Rogue/HellsSun.cs index d5e790ac47..2624fec774 100644 --- a/Items/Weapons/Rogue/HellsSun.cs +++ b/Items/Weapons/Rogue/HellsSun.cs @@ -8,9 +8,9 @@ using CalamityMod.CalPlayer; namespace CalamityMod.Items.Weapons.Rogue { - public class HellsSun : RogueWeapon + public class HellsSun : RogueWeapon { - private static int damage = 75; + private static int damage = 85; private static int knockBack = 5; private static float SdamageMult = 0.6f; @@ -18,10 +18,10 @@ namespace CalamityMod.Items.Weapons.Rogue { DisplayName.SetDefault("Hell's Sun"); Tooltip.SetDefault("The Subterranean Sun in the palm of your hand.\n" + - "Shoots a gravity-defying spiky ball. Stacks up to 10.\n" + + "Shoots a gravity-defying spiky ball. Stacks up to 10.\n" + "Once stationary, periodically emits small suns that explode on hit\n" + "Stealth strikes emit suns at a faster rate and last for a longer amount of time\n" + - "Right click to delete all existing spiky balls"); + "Right click to delete all existing spiky balls"); } public override void SafeSetDefaults() @@ -36,9 +36,9 @@ namespace CalamityMod.Items.Weapons.Rogue item.useAnimation = 15; item.useStyle = ItemUseStyleID.SwingThrow; item.knockBack = knockBack; - item.value = CalamityGlobalItem.Rarity11BuyPrice; - item.rare = ItemRarityID.Purple; - item.UseSound = SoundID.Item1; + item.value = CalamityGlobalItem.Rarity11BuyPrice; + item.rare = ItemRarityID.Purple; + item.UseSound = SoundID.Item1; item.autoReuse = true; item.maxStack = 10; @@ -46,36 +46,36 @@ namespace CalamityMod.Items.Weapons.Rogue item.shoot = ModContent.ProjectileType(); } - public override bool CanUseItem(Player player) - { - if (player.altFunctionUse == 2) - { - item.shoot = 0; - item.shootSpeed = 0f; - return player.ownedProjectileCounts[ModContent.ProjectileType()] > 0; - } - else - { - item.shoot = ModContent.ProjectileType(); - item.shootSpeed = 5f; - int UseMax = item.stack; - return player.ownedProjectileCounts[ModContent.ProjectileType()] < UseMax; - } - } + public override bool CanUseItem(Player player) + { + if (player.altFunctionUse == 2) + { + item.shoot = 0; + item.shootSpeed = 0f; + return player.ownedProjectileCounts[ModContent.ProjectileType()] > 0; + } + else + { + item.shoot = ModContent.ProjectileType(); + item.shootSpeed = 5f; + int UseMax = item.stack; + return player.ownedProjectileCounts[ModContent.ProjectileType()] < UseMax; + } + } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { CalamityPlayer modPlayer = player.Calamity(); - modPlayer.killSpikyBalls = false; + modPlayer.killSpikyBalls = false; if (modPlayer.StealthStrikeAvailable()) //setting the stealth strike { int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), ModContent.ProjectileType(), (int)(damage * SdamageMult), knockBack, player.whoAmI); - if (stealth.WithinBounds(Main.maxProjectiles)) - { - Main.projectile[stealth].Calamity().stealthStrike = true; - Main.projectile[stealth].penetrate = -1; - Main.projectile[stealth].timeLeft = 2400; - } + if (stealth.WithinBounds(Main.maxProjectiles)) + { + Main.projectile[stealth].Calamity().stealthStrike = true; + Main.projectile[stealth].penetrate = -1; + Main.projectile[stealth].timeLeft = 2400; + } return false; } return true; @@ -84,7 +84,7 @@ namespace CalamityMod.Items.Weapons.Rogue public override bool AltFunctionUse(Player player) { CalamityPlayer modPlayer = player.Calamity(); - modPlayer.killSpikyBalls = true; + modPlayer.killSpikyBalls = true; return true; } diff --git a/Items/Weapons/Rogue/MoltenAmputator.cs b/Items/Weapons/Rogue/MoltenAmputator.cs index e589d13102..a64893b975 100644 --- a/Items/Weapons/Rogue/MoltenAmputator.cs +++ b/Items/Weapons/Rogue/MoltenAmputator.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Rogue public override void SafeSetDefaults() { item.width = 60; - item.damage = 169; + item.damage = 110; item.noMelee = true; item.noUseGraphic = true; item.autoReuse = true; @@ -28,12 +28,12 @@ namespace CalamityMod.Items.Weapons.Rogue item.knockBack = 9f; item.UseSound = SoundID.Item1; item.height = 60; - item.value = Item.buyPrice(1, 20, 0, 0); - item.rare = 10; - item.shoot = ModContent.ProjectileType(); + item.value = CalamityGlobalItem.Rarity12BuyPrice; + item.rare = ItemRarityID.Purple; + item.Calamity().customRarity = CalamityRarity.Turquoise; + item.shoot = ModContent.ProjectileType(); item.shootSpeed = 12f; item.Calamity().rogue = true; - item.Calamity().customRarity = CalamityRarity.Turquoise; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/Rogue/ProfanedPartisan.cs b/Items/Weapons/Rogue/ProfanedPartisan.cs index 253d8390b8..8fbaa1de84 100644 --- a/Items/Weapons/Rogue/ProfanedPartisan.cs +++ b/Items/Weapons/Rogue/ProfanedPartisan.cs @@ -18,7 +18,7 @@ Stealth strikes spawn smaller spears to fly along side it"); public override void SafeSetDefaults() { - item.damage = 231; + item.damage = 150; item.knockBack = 8f; item.width = 56; @@ -27,13 +27,13 @@ Stealth strikes spawn smaller spears to fly along side it"); item.noMelee = true; item.noUseGraphic = true; - item.value = Item.buyPrice(1, 20, 0, 0); item.useTime = 18; item.useAnimation = 18; item.UseSound = SoundID.Item1; - item.rare = 10; - item.Calamity().customRarity = CalamityRarity.Turquoise; //12 - item.Calamity().rogue = true; + item.value = CalamityGlobalItem.Rarity12BuyPrice; + item.rare = ItemRarityID.Purple; + item.Calamity().customRarity = CalamityRarity.Turquoise; + item.Calamity().rogue = true; item.autoReuse = true; item.shootSpeed = 6f; diff --git a/Items/Weapons/Rogue/SealedSingularity.cs b/Items/Weapons/Rogue/SealedSingularity.cs index 328ba524c8..1f9de88eeb 100644 --- a/Items/Weapons/Rogue/SealedSingularity.cs +++ b/Items/Weapons/Rogue/SealedSingularity.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Rogue public override void SafeSetDefaults() { - item.damage = 169; + item.damage = 110; item.knockBack = 5f; item.useAnimation = item.useTime = 25; item.useStyle = 1; @@ -30,8 +30,8 @@ namespace CalamityMod.Items.Weapons.Rogue item.noMelee = item.noUseGraphic = true; item.height = item.width = 34; item.UseSound = SoundID.Item106; - item.value = CalamityGlobalItem.Rarity13BuyPrice; - item.rare = 10; + item.value = CalamityGlobalItem.Rarity12BuyPrice; + item.rare = ItemRarityID.Purple; item.Calamity().customRarity = CalamityRarity.Dedicated; } diff --git a/Items/Weapons/Rogue/ShatteredSun.cs b/Items/Weapons/Rogue/ShatteredSun.cs index bb1b36d66f..ebebd3798c 100644 --- a/Items/Weapons/Rogue/ShatteredSun.cs +++ b/Items/Weapons/Rogue/ShatteredSun.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Rogue { item.width = 56; item.height = 56; - item.damage = 82; + item.damage = 54; item.noMelee = true; item.noUseGraphic = true; item.useAnimation = 12; @@ -29,12 +29,12 @@ namespace CalamityMod.Items.Weapons.Rogue item.knockBack = 6f; item.UseSound = SoundID.Item1; item.autoReuse = true; - item.value = Item.buyPrice(1, 20, 0, 0); - item.rare = 10; - item.shoot = ModContent.ProjectileType(); + item.value = CalamityGlobalItem.Rarity12BuyPrice; + item.rare = ItemRarityID.Purple; + item.Calamity().customRarity = CalamityRarity.Turquoise; + item.shoot = ModContent.ProjectileType(); item.shootSpeed = 25f; item.Calamity().rogue = true; - item.Calamity().customRarity = CalamityRarity.Turquoise; } // Terraria seems to really dislike high crit values in SetDefaults diff --git a/Items/Weapons/Rogue/SylvanSlasher.cs b/Items/Weapons/Rogue/SylvanSlasher.cs index 86ba61433a..eabb7f4454 100644 --- a/Items/Weapons/Rogue/SylvanSlasher.cs +++ b/Items/Weapons/Rogue/SylvanSlasher.cs @@ -18,7 +18,7 @@ Does not consume stealth and cannot stealth strike"); public override void SafeSetDefaults() { item.width = 72; - item.damage = 87; + item.damage = 57; item.Calamity().rogue = true; item.noMelee = true; item.noUseGraphic = true; @@ -29,11 +29,11 @@ Does not consume stealth and cannot stealth strike"); item.knockBack = 3f; item.autoReuse = false; item.height = 78; - item.value = Item.buyPrice(1, 20, 0, 0); - item.rare = 10; - item.shoot = ModContent.ProjectileType(); + item.value = CalamityGlobalItem.Rarity12BuyPrice; + item.rare = ItemRarityID.Purple; + item.Calamity().customRarity = CalamityRarity.Turquoise; + item.shoot = ModContent.ProjectileType(); item.shootSpeed = 24f; - item.Calamity().customRarity = CalamityRarity.Turquoise; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/Rogue/TarragonThrowingDart.cs b/Items/Weapons/Rogue/TarragonThrowingDart.cs index 99b7d247b7..2d24e39167 100644 --- a/Items/Weapons/Rogue/TarragonThrowingDart.cs +++ b/Items/Weapons/Rogue/TarragonThrowingDart.cs @@ -19,7 +19,7 @@ Stealth strikes erupt into thorns on enemy hits"); public override void SafeSetDefaults() { item.width = 34; - item.damage = 380; + item.damage = 247; item.noMelee = true; item.consumable = true; item.noUseGraphic = true; @@ -32,6 +32,7 @@ Stealth strikes erupt into thorns on enemy hits"); item.height = 34; item.maxStack = 999; item.value = Item.sellPrice(silver: 3); + item.rare = ItemRarityID.Purple; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 24f; item.Calamity().rogue = true; diff --git a/Items/Weapons/Summon/Cosmilamp.cs b/Items/Weapons/Summon/Cosmilamp.cs index 059afb3da6..8b5f616b8f 100644 --- a/Items/Weapons/Summon/Cosmilamp.cs +++ b/Items/Weapons/Summon/Cosmilamp.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Summon public override void SetDefaults() { - item.damage = 130; + item.damage = 85; item.mana = 10; item.width = 42; item.height = 60; diff --git a/Items/Weapons/Summon/DazzlingStabberStaff.cs b/Items/Weapons/Summon/DazzlingStabberStaff.cs index b72b590298..def30d830b 100644 --- a/Items/Weapons/Summon/DazzlingStabberStaff.cs +++ b/Items/Weapons/Summon/DazzlingStabberStaff.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Weapons.Summon item.UseSound = SoundID.DD2_DarkMageHealImpact; item.summon = true; item.mana = 12; - item.damage = 40; + item.damage = 26; item.knockBack = 2f; item.autoReuse = true; item.useTime = item.useAnimation = 15; diff --git a/Items/Weapons/Summon/DragonbloodDisgorger.cs b/Items/Weapons/Summon/DragonbloodDisgorger.cs index ee6c13c63a..fce7c624f1 100644 --- a/Items/Weapons/Summon/DragonbloodDisgorger.cs +++ b/Items/Weapons/Summon/DragonbloodDisgorger.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Summon public override void SetDefaults() { - item.damage = 300; + item.damage = 195; item.mana = 30; item.width = 64; item.height = 62; diff --git a/Items/Weapons/Summon/ElementalAxe.cs b/Items/Weapons/Summon/ElementalAxe.cs index 3dcee843c4..ad1c4edb2f 100644 --- a/Items/Weapons/Summon/ElementalAxe.cs +++ b/Items/Weapons/Summon/ElementalAxe.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Summon public override void SetDefaults() { - item.damage = 100; + item.damage = 50; item.summon = true; item.mana = 10; item.width = 36; diff --git a/Items/Weapons/Summon/TacticalPlagueEngine.cs b/Items/Weapons/Summon/TacticalPlagueEngine.cs index 56c657f61f..e57ab79416 100644 --- a/Items/Weapons/Summon/TacticalPlagueEngine.cs +++ b/Items/Weapons/Summon/TacticalPlagueEngine.cs @@ -1,5 +1,5 @@ -using CalamityMod.Projectiles.Summon; using CalamityMod.Items.Materials; +using CalamityMod.Projectiles.Summon; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; @@ -13,13 +13,13 @@ namespace CalamityMod.Items.Weapons.Summon { DisplayName.SetDefault("Tactical Plague Engine"); Tooltip.SetDefault("Summons a plague jet to pummel your enemies into submission\n" + - "Consumes bullets\n" + + "Jets will fire ammo from your inventory, 66% chance to not consume ammo\n" + "Sometimes shoots a missile instead of a bullet"); } public override void SetDefaults() { - item.damage = 34; + item.damage = 52; item.mana = 10; item.width = 28; item.height = 20; @@ -27,21 +27,19 @@ namespace CalamityMod.Items.Weapons.Summon item.useStyle = ItemUseStyleID.HoldingUp; item.noMelee = true; item.knockBack = 0.5f; - item.value = CalamityGlobalItem.Rarity11BuyPrice; - item.rare = ItemRarityID.Purple; - item.UseSound = SoundID.Item14; + item.value = CalamityGlobalItem.Rarity11BuyPrice; + item.rare = ItemRarityID.Purple; + item.UseSound = SoundID.Item14; item.autoReuse = true; item.summon = true; - item.shoot = ModContent.ProjectileType(); + item.shoot = ModContent.ProjectileType(); item.shootSpeed = 16f; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { if (player.altFunctionUse != 2) - { Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, damage, knockBack, player.whoAmI, 0f, 1f); - } return false; } @@ -52,7 +50,7 @@ namespace CalamityMod.Items.Weapons.Summon recipe.AddIngredient(ModContent.ItemType()); recipe.AddIngredient(ModContent.ItemType()); recipe.AddIngredient(ModContent.ItemType(), 15); - recipe.AddIngredient(ModContent.ItemType(), 8); + recipe.AddIngredient(ModContent.ItemType(), 8); recipe.AddIngredient(ItemID.LunarBar, 5); recipe.AddTile(TileID.LunarCraftingStation); recipe.SetResult(this); diff --git a/Items/Weapons/Typeless/AethersWhisper.cs b/Items/Weapons/Typeless/AethersWhisper.cs index 8d84a0cbba..064aff07fd 100644 --- a/Items/Weapons/Typeless/AethersWhisper.cs +++ b/Items/Weapons/Typeless/AethersWhisper.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Weapons.Typeless public override void SetDefaults() { - item.damage = 1150; + item.damage = 750; item.knockBack = 5.5f; item.useTime = item.useAnimation = 24; item.shootSpeed = 12f; diff --git a/ModSupport/WeakReferenceSupport.cs b/ModSupport/WeakReferenceSupport.cs index 1511c8fe34..4c007d4ef3 100644 --- a/ModSupport/WeakReferenceSupport.cs +++ b/ModSupport/WeakReferenceSupport.cs @@ -859,7 +859,7 @@ namespace CalamityMod RegisterSummon(ItemType(), BuffType(), ProjectileType()); RegisterSummon(ItemType(), BuffType(), ProjectileType()); RegisterSummon(ItemType(), BuffType(), ProjectileType()); - RegisterSummon(ItemType(), BuffType(), ProjectileType()); + RegisterSummon(ItemType(), BuffType(), ProjectileType()); RegisterSummon(ItemType(), BuffType(), ProjectileType()); RegisterSummon(ItemType(), BuffType(), ProjectileType()); RegisterSummon(ItemType(), BuffType(), ProjectileType()); diff --git a/NPCs/AquaticScourge/AquaticScourgeBody.cs b/NPCs/AquaticScourge/AquaticScourgeBody.cs index 217551fedc..77826a21a8 100644 --- a/NPCs/AquaticScourge/AquaticScourgeBody.cs +++ b/NPCs/AquaticScourge/AquaticScourgeBody.cs @@ -1,6 +1,7 @@ using CalamityMod.Events; using CalamityMod.World; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using System.IO; using Terraria; using Terraria.ID; @@ -73,7 +74,29 @@ namespace CalamityMod.NPCs.AquaticScourge CalamityAI.AquaticScourgeAI(npc, mod, false); } - public override bool? CanBeHitByProjectile(Projectile projectile) + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + SpriteEffects spriteEffects = SpriteEffects.None; + if (npc.spriteDirection == 1) + spriteEffects = SpriteEffects.FlipHorizontally; + + Texture2D texture2D15 = Main.npcTexture[npc.type]; + Vector2 vector11 = new Vector2(Main.npcTexture[npc.type].Width / 2, Main.npcTexture[npc.type].Height / 2); + + Vector2 vector43 = npc.Center - Main.screenPosition; + vector43 -= new Vector2(texture2D15.Width, texture2D15.Height) * npc.scale / 2f; + vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + Color color = npc.GetAlpha(lightColor); + + if (Main.npc[(int)npc.ai[2]].Calamity().newAI[3] > 480f && (CalamityWorld.revenge || BossRushEvent.BossRushActive)) + color = Color.Lerp(color, Color.SandyBrown, MathHelper.Clamp((Main.npc[(int)npc.ai[2]].Calamity().newAI[3] - 480f) / 180f, 0f, 1f)); + + spriteBatch.Draw(texture2D15, vector43, npc.frame, color, npc.rotation, vector11, npc.scale, spriteEffects, 0f); + + return false; + } + + public override bool? CanBeHitByProjectile(Projectile projectile) { if (projectile.minion) { diff --git a/NPCs/AquaticScourge/AquaticScourgeBodyAlt.cs b/NPCs/AquaticScourge/AquaticScourgeBodyAlt.cs index c7e1962ed8..d2ef90c770 100644 --- a/NPCs/AquaticScourge/AquaticScourgeBodyAlt.cs +++ b/NPCs/AquaticScourge/AquaticScourgeBodyAlt.cs @@ -1,6 +1,7 @@ using CalamityMod.Events; using CalamityMod.World; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using System.IO; using Terraria; using Terraria.ID; @@ -73,7 +74,29 @@ namespace CalamityMod.NPCs.AquaticScourge CalamityAI.AquaticScourgeAI(npc, mod, false); } - public override bool? CanBeHitByProjectile(Projectile projectile) + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + SpriteEffects spriteEffects = SpriteEffects.None; + if (npc.spriteDirection == 1) + spriteEffects = SpriteEffects.FlipHorizontally; + + Texture2D texture2D15 = Main.npcTexture[npc.type]; + Vector2 vector11 = new Vector2(Main.npcTexture[npc.type].Width / 2, Main.npcTexture[npc.type].Height / 2); + + Vector2 vector43 = npc.Center - Main.screenPosition; + vector43 -= new Vector2(texture2D15.Width, texture2D15.Height) * npc.scale / 2f; + vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + Color color = npc.GetAlpha(lightColor); + + if (Main.npc[(int)npc.ai[2]].Calamity().newAI[3] > 480f && (CalamityWorld.revenge || BossRushEvent.BossRushActive)) + color = Color.Lerp(color, Color.SandyBrown, MathHelper.Clamp((Main.npc[(int)npc.ai[2]].Calamity().newAI[3] - 480f) / 180f, 0f, 1f)); + + spriteBatch.Draw(texture2D15, vector43, npc.frame, color, npc.rotation, vector11, npc.scale, spriteEffects, 0f); + + return false; + } + + public override bool? CanBeHitByProjectile(Projectile projectile) { if (projectile.minion) { diff --git a/NPCs/AquaticScourge/AquaticScourgeHead.cs b/NPCs/AquaticScourge/AquaticScourgeHead.cs index 173a41ec5f..a8b2c475a7 100644 --- a/NPCs/AquaticScourge/AquaticScourgeHead.cs +++ b/NPCs/AquaticScourge/AquaticScourgeHead.cs @@ -1,4 +1,3 @@ -using CalamityMod.Buffs.StatDebuffs; using CalamityMod.Events; using CalamityMod.Items.Accessories; using CalamityMod.Items.LoreItems; @@ -14,6 +13,7 @@ using CalamityMod.Items.Weapons.Rogue; using CalamityMod.NPCs.TownNPCs; using CalamityMod.World; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using System.IO; using Terraria; using Terraria.ID; @@ -96,7 +96,29 @@ namespace CalamityMod.NPCs.AquaticScourge CalamityAI.AquaticScourgeAI(npc, mod, true); } - public override bool CanHitPlayer(Player target, ref int cooldownSlot) + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + SpriteEffects spriteEffects = SpriteEffects.None; + if (npc.spriteDirection == 1) + spriteEffects = SpriteEffects.FlipHorizontally; + + Texture2D texture2D15 = Main.npcTexture[npc.type]; + Vector2 vector11 = new Vector2(Main.npcTexture[npc.type].Width / 2, Main.npcTexture[npc.type].Height / 2); + + Vector2 vector43 = npc.Center - Main.screenPosition; + vector43 -= new Vector2(texture2D15.Width, texture2D15.Height) * npc.scale / 2f; + vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + Color color = npc.GetAlpha(lightColor); + + if (npc.Calamity().newAI[3] > 480f && (CalamityWorld.revenge || BossRushEvent.BossRushActive)) + color = Color.Lerp(color, Color.SandyBrown, MathHelper.Clamp((npc.Calamity().newAI[3] - 480f) / 180f, 0f, 1f)); + + spriteBatch.Draw(texture2D15, vector43, npc.frame, color, npc.rotation, vector11, npc.scale, spriteEffects, 0f); + + return false; + } + + public override bool CanHitPlayer(Player target, ref int cooldownSlot) { Rectangle targetHitbox = target.Hitbox; diff --git a/NPCs/AquaticScourge/AquaticScourgeTail.cs b/NPCs/AquaticScourge/AquaticScourgeTail.cs index 11011c5002..4dd1ec7e24 100644 --- a/NPCs/AquaticScourge/AquaticScourgeTail.cs +++ b/NPCs/AquaticScourge/AquaticScourgeTail.cs @@ -1,6 +1,7 @@ using CalamityMod.Events; using CalamityMod.World; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using System.IO; using Terraria; using Terraria.ID; @@ -73,7 +74,29 @@ namespace CalamityMod.NPCs.AquaticScourge CalamityAI.AquaticScourgeAI(npc, mod, false); } - public override bool? CanBeHitByProjectile(Projectile projectile) + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + SpriteEffects spriteEffects = SpriteEffects.None; + if (npc.spriteDirection == 1) + spriteEffects = SpriteEffects.FlipHorizontally; + + Texture2D texture2D15 = Main.npcTexture[npc.type]; + Vector2 vector11 = new Vector2(Main.npcTexture[npc.type].Width / 2, Main.npcTexture[npc.type].Height / 2); + + Vector2 vector43 = npc.Center - Main.screenPosition; + vector43 -= new Vector2(texture2D15.Width, texture2D15.Height) * npc.scale / 2f; + vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + Color color = npc.GetAlpha(lightColor); + + if (Main.npc[(int)npc.ai[2]].Calamity().newAI[3] > 480f && (CalamityWorld.revenge || BossRushEvent.BossRushActive)) + color = Color.Lerp(color, Color.SandyBrown, MathHelper.Clamp((Main.npc[(int)npc.ai[2]].Calamity().newAI[3] - 480f) / 180f, 0f, 1f)); + + spriteBatch.Draw(texture2D15, vector43, npc.frame, color, npc.rotation, vector11, npc.scale, spriteEffects, 0f); + + return false; + } + + public override bool? CanBeHitByProjectile(Projectile projectile) { if (projectile.minion) { diff --git a/NPCs/AstrumAureus/AstrumAureus.cs b/NPCs/AstrumAureus/AstrumAureus.cs index 5b8c7641e1..63f0a18594 100644 --- a/NPCs/AstrumAureus/AstrumAureus.cs +++ b/NPCs/AstrumAureus/AstrumAureus.cs @@ -48,7 +48,7 @@ namespace CalamityMod.NPCs.AstrumAureus npc.height = 280; npc.defense = 40; npc.DR_NERD(0.15f); - npc.LifeMaxNERB(84000, NPC.downedMoonlord ? 390000 : 107000, 7400000); // 30 seconds in boss rush + npc.LifeMaxNERB(84000, NPC.downedMoonlord ? 292500 : 107000, 7400000); // 30 seconds in boss rush npc.aiStyle = -1; aiType = -1; npc.knockBackResist = 0f; diff --git a/NPCs/BrimstoneElemental/Brimling.cs b/NPCs/BrimstoneElemental/Brimling.cs index 714fef215a..341064d544 100644 --- a/NPCs/BrimstoneElemental/Brimling.cs +++ b/NPCs/BrimstoneElemental/Brimling.cs @@ -43,7 +43,7 @@ namespace CalamityMod.NPCs.BrimstoneElemental npc.DeathSound = SoundID.NPCDeath39; if (CalamityWorld.downedProvidence) { - npc.lifeMax = 40000; + npc.lifeMax = 26000; } if (BossRushEvent.BossRushActive) { diff --git a/NPCs/BrimstoneElemental/BrimstoneElemental.cs b/NPCs/BrimstoneElemental/BrimstoneElemental.cs index 8dd7a5f588..843c442d21 100644 --- a/NPCs/BrimstoneElemental/BrimstoneElemental.cs +++ b/NPCs/BrimstoneElemental/BrimstoneElemental.cs @@ -44,7 +44,7 @@ namespace CalamityMod.NPCs.BrimstoneElemental { npc.damage *= 3; npc.defense *= 4; - npc.lifeMax *= 8; + npc.lifeMax *= 5; npc.value *= 3f; } double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; diff --git a/NPCs/Bumblebirb/Bumblefuck2.cs b/NPCs/Bumblebirb/Bumblefuck2.cs index 657a89e5a7..1516697b20 100644 --- a/NPCs/Bumblebirb/Bumblefuck2.cs +++ b/NPCs/Bumblebirb/Bumblefuck2.cs @@ -45,7 +45,7 @@ namespace CalamityMod.NPCs.Bumblebirb { return 0f; } - return SpawnCondition.SurfaceJungle.Chance * 0.09f; + return SpawnCondition.SurfaceJungle.Chance * 0.14f; } public override void AI() diff --git a/NPCs/Calamitas/Calamitas.cs b/NPCs/Calamitas/Calamitas.cs index d882d53d42..687c0b8a84 100644 --- a/NPCs/Calamitas/Calamitas.cs +++ b/NPCs/Calamitas/Calamitas.cs @@ -35,7 +35,7 @@ namespace CalamityMod.NPCs.Calamitas { npc.damage *= 3; npc.defense *= 3; - npc.lifeMax *= 3; + npc.lifeMax *= 2; } double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; npc.lifeMax += (int)(npc.lifeMax * HPBoost); diff --git a/NPCs/Calamitas/CalamitasRun.cs b/NPCs/Calamitas/CalamitasRun.cs index 151abbd645..af94911c1a 100644 --- a/NPCs/Calamitas/CalamitasRun.cs +++ b/NPCs/Calamitas/CalamitasRun.cs @@ -35,7 +35,7 @@ namespace CalamityMod.NPCs.Calamitas { npc.damage *= 3; npc.defense *= 5; - npc.lifeMax *= 3; + npc.lifeMax *= 2; } double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; npc.lifeMax += (int)(npc.lifeMax * HPBoost); diff --git a/NPCs/Calamitas/CalamitasRun2.cs b/NPCs/Calamitas/CalamitasRun2.cs index 6547b7956b..36b6e10dc2 100644 --- a/NPCs/Calamitas/CalamitasRun2.cs +++ b/NPCs/Calamitas/CalamitasRun2.cs @@ -35,7 +35,7 @@ namespace CalamityMod.NPCs.Calamitas { npc.damage *= 3; npc.defense *= 5; - npc.lifeMax *= 3; + npc.lifeMax *= 2; } double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; npc.lifeMax += (int)(npc.lifeMax * HPBoost); diff --git a/NPCs/Calamitas/CalamitasRun3.cs b/NPCs/Calamitas/CalamitasRun3.cs index 82f5971825..c614977de6 100644 --- a/NPCs/Calamitas/CalamitasRun3.cs +++ b/NPCs/Calamitas/CalamitasRun3.cs @@ -48,7 +48,7 @@ namespace CalamityMod.NPCs.Calamitas { npc.damage *= 3; npc.defense *= 3; - npc.lifeMax *= 3; + npc.lifeMax *= 2; npc.value *= 2.5f; } double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; diff --git a/NPCs/CalamityAI.cs b/NPCs/CalamityAI.cs index 401ad3eb3f..14351329ee 100644 --- a/NPCs/CalamityAI.cs +++ b/NPCs/CalamityAI.cs @@ -98,71 +98,74 @@ namespace CalamityMod.NPCs bool doSpiral = false; if (head && calamityGlobalNPC.newAI[0] == 1f && calamityGlobalNPC.newAI[2] == 1f && revenge) { - if (Vector2.Distance(npc.Center, player.Center) > 320f || calamityGlobalNPC.newAI[3] > 0f) + float ai3 = 660f; + calamityGlobalNPC.newAI[3] += 1f; + doSpiral = calamityGlobalNPC.newAI[1] == 0f && calamityGlobalNPC.newAI[3] >= ai3; + if (doSpiral) { - float ai3 = 660f; - calamityGlobalNPC.newAI[3] += 1f; - doSpiral = calamityGlobalNPC.newAI[1] == 0f && calamityGlobalNPC.newAI[3] >= ai3; - if (doSpiral) + // Barf + if (calamityGlobalNPC.newAI[3] % 40f == 0f) { - // Barf - if (calamityGlobalNPC.newAI[3] % 40f == 0f) + Main.PlaySound(4, (int)npc.position.X, (int)npc.position.Y, 13); + + if (Main.netMode != NetmodeID.MultiplayerClient) { - Main.PlaySound(4, (int)npc.position.X, (int)npc.position.Y, 13); + float num742 = BossRushEvent.BossRushActive ? 16f : death ? 10f : 8f; + float num743 = player.Center.X - vectorCenter.X; + float num744 = player.Center.Y - vectorCenter.Y; + float num745 = (float)Math.Sqrt(num743 * num743 + num744 * num744); - if (Main.netMode != NetmodeID.MultiplayerClient) + num745 = num742 / num745; + num743 *= num745; + num744 *= num745; + + int type = ModContent.ProjectileType(); + int damage = npc.GetProjectileDamage(type); + int numProj = death ? 5 : 3; + int spread = death ? 60 : 36; + float rotation = MathHelper.ToRadians(spread); + float baseSpeed = (float)Math.Sqrt(num743 * num743 + num744 * num744); + double startAngle = Math.Atan2(num743, num744) - rotation / 2; + double deltaAngle = rotation / numProj; + double offsetAngle; + + for (int i = 0; i < numProj; i++) { - float num742 = BossRushEvent.BossRushActive ? 16f : death ? 10f : 8f; - float num743 = player.Center.X - vectorCenter.X; - float num744 = player.Center.Y - vectorCenter.Y; - float num745 = (float)Math.Sqrt(num743 * num743 + num744 * num744); - - num745 = num742 / num745; - num743 *= num745; - num744 *= num745; - - int type = ModContent.ProjectileType(); - int damage = npc.GetProjectileDamage(type); - int numProj = death ? 5 : 3; - int spread = death ? 60 : 36; - float rotation = MathHelper.ToRadians(spread); - float baseSpeed = (float)Math.Sqrt(num743 * num743 + num744 * num744); - double startAngle = Math.Atan2(num743, num744) - rotation / 2; - double deltaAngle = rotation / numProj; - double offsetAngle; - - for (int i = 0; i < numProj; i++) - { - offsetAngle = startAngle + deltaAngle * i; - int proj = Projectile.NewProjectile(vectorCenter.X, vectorCenter.Y, baseSpeed * (float)Math.Sin(offsetAngle), baseSpeed * (float)Math.Cos(offsetAngle), type, damage, 0f, Main.myPlayer, 0f, 0f); - Main.projectile[proj].tileCollide = false; - } + offsetAngle = startAngle + deltaAngle * i; + int proj = Projectile.NewProjectile(vectorCenter.X, vectorCenter.Y, baseSpeed * (float)Math.Sin(offsetAngle), baseSpeed * (float)Math.Cos(offsetAngle), type, damage, 0f, Main.myPlayer, 0f, 0f); + Main.projectile[proj].tileCollide = false; } } - - // Velocity boost - if (calamityGlobalNPC.newAI[3] == ai3) - { - npc.velocity.Normalize(); - npc.velocity *= 24f; - } - - // Spin velocity - float velocity = (float)(Math.PI * 2D) / 120f; - npc.velocity = npc.velocity.RotatedBy(-(double)velocity * npc.localAI[1]); - npc.rotation = (float)Math.Atan2(npc.velocity.Y, npc.velocity.X) + MathHelper.PiOver2; - - // Reset and charge at target - if (calamityGlobalNPC.newAI[3] >= ai3 + 120f) - { - calamityGlobalNPC.newAI[3] = 0f; - float chargeVelocity = (BossRushEvent.BossRushActive ? 24f : death ? 16f : 12f) + 3f * enrageScale; - npc.velocity = Vector2.Normalize(player.Center - npc.Center) * chargeVelocity; - npc.TargetClosest(); - } } - else - npc.localAI[1] = npc.Center.X - player.Center.X < 0 ? 1f : -1f; + + // Velocity boost + if (calamityGlobalNPC.newAI[3] == ai3) + { + npc.velocity.Normalize(); + npc.velocity *= 24f; + } + + // Spin velocity + float velocity = (float)(Math.PI * 2D) / 120f; + npc.velocity = npc.velocity.RotatedBy(-(double)velocity * npc.localAI[1]); + npc.rotation = (float)Math.Atan2(npc.velocity.Y, npc.velocity.X) + MathHelper.PiOver2; + + // Reset and charge at target + if (calamityGlobalNPC.newAI[3] >= ai3 + 120f) + { + // Add 2 seconds to timer so that spinning happens more often if Scourge isn't wet when spin ends + calamityGlobalNPC.newAI[3] = npc.wet ? 0f : 120f; + float chargeVelocity = (BossRushEvent.BossRushActive ? 24f : death ? 16f : 12f) + 3f * enrageScale; + npc.velocity = Vector2.Normalize(player.Center - npc.Center) * chargeVelocity; + npc.TargetClosest(); + } + } + else + { + if (npc.wet && calamityGlobalNPC.newAI[3] > 0f) + calamityGlobalNPC.newAI[3] -= 2f; + + npc.localAI[1] = npc.Center.X - player.Center.X < 0 ? 1f : -1f; } } diff --git a/NPCs/CeaselessVoid/DarkEnergy.cs b/NPCs/CeaselessVoid/DarkEnergy.cs index 018a49eb3b..806c1e718d 100644 --- a/NPCs/CeaselessVoid/DarkEnergy.cs +++ b/NPCs/CeaselessVoid/DarkEnergy.cs @@ -31,10 +31,10 @@ namespace CalamityMod.NPCs.CeaselessVoid npc.width = 80; npc.height = 80; npc.defense = 50; - npc.lifeMax = 6000; + npc.lifeMax = 4000; if (CalamityWorld.DoGSecondStageCountdown <= 0 || !CalamityWorld.downedSentinel1) { - npc.lifeMax = 24000; + npc.lifeMax = 16000; } if (BossRushEvent.BossRushActive) { diff --git a/NPCs/CeaselessVoid/DarkEnergy2.cs b/NPCs/CeaselessVoid/DarkEnergy2.cs index ebebc7b72c..a2773cc5bb 100644 --- a/NPCs/CeaselessVoid/DarkEnergy2.cs +++ b/NPCs/CeaselessVoid/DarkEnergy2.cs @@ -31,10 +31,10 @@ namespace CalamityMod.NPCs.CeaselessVoid npc.width = 80; npc.height = 80; npc.defense = 50; - npc.lifeMax = 6000; + npc.lifeMax = 4000; if (CalamityWorld.DoGSecondStageCountdown <= 0 || !CalamityWorld.downedSentinel1) { - npc.lifeMax = 24000; + npc.lifeMax = 16000; } if (BossRushEvent.BossRushActive) { diff --git a/NPCs/CeaselessVoid/DarkEnergy3.cs b/NPCs/CeaselessVoid/DarkEnergy3.cs index 0d9becc070..2ab57d6262 100644 --- a/NPCs/CeaselessVoid/DarkEnergy3.cs +++ b/NPCs/CeaselessVoid/DarkEnergy3.cs @@ -31,10 +31,10 @@ namespace CalamityMod.NPCs.CeaselessVoid npc.width = 80; npc.height = 80; npc.defense = 50; - npc.lifeMax = 6000; + npc.lifeMax = 4000; if (CalamityWorld.DoGSecondStageCountdown <= 0 || !CalamityWorld.downedSentinel1) { - npc.lifeMax = 24000; + npc.lifeMax = 16000; } if (BossRushEvent.BossRushActive) { diff --git a/NPCs/Polterghast/PolterPhantom.cs b/NPCs/Polterghast/PolterPhantom.cs index 88481e66a2..e2716a8522 100644 --- a/NPCs/Polterghast/PolterPhantom.cs +++ b/NPCs/Polterghast/PolterPhantom.cs @@ -406,7 +406,7 @@ namespace CalamityMod.NPCs.Polterghast spriteBatch.Draw(texture2D15, vector43, npc.frame, color, npc.rotation, vector11, npc.scale, spriteEffects, 0f); Texture2D texture2D16 = ModContent.GetTexture("CalamityMod/NPCs/Polterghast/PolterPhantomGlow"); - Color color42 = Color.Lerp(Color.White, Color.Red, 0.5f); + Color color42 = Color.Lerp(Color.White, (Main.npc[CalamityGlobalNPC.ghostBoss].ai[2] < 300f || Main.npc[CalamityGlobalNPC.ghostBoss].Calamity().newAI[0] > 300f) ? Color.Red : Color.Black, 0.5f); if (CalamityConfig.Instance.Afterimages) { diff --git a/NPCs/Polterghast/Polterghast.cs b/NPCs/Polterghast/Polterghast.cs index 489562da96..03a70e6b2a 100644 --- a/NPCs/Polterghast/Polterghast.cs +++ b/NPCs/Polterghast/Polterghast.cs @@ -47,7 +47,7 @@ namespace CalamityMod.NPCs.Polterghast npc.DR_NERD(0.2f, null, null, null, true); CalamityGlobalNPC global = npc.Calamity(); global.multDRReductions.Add(BuffID.CursedInferno, 0.9f); - npc.LifeMaxNERB(412500, 495000, 3250000); + npc.LifeMaxNERB(268125, 321750, 3250000); double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; npc.lifeMax += (int)(npc.lifeMax * HPBoost); npc.knockBackResist = 0f; @@ -223,13 +223,6 @@ namespace CalamityMod.NPCs.Polterghast velocity += phase2 ? 4.5f : 3.5f; acceleration += phase2 ? 0.03f : 0.025f; } - - npc.ai[2] += 1f; - if (reset) - { - npc.ai[2] = 0f; - npc.netUpdate = true; - } } else { @@ -256,13 +249,6 @@ namespace CalamityMod.NPCs.Polterghast acceleration += 0.005f; } } - - npc.ai[2] += 1f; - if (reset) - { - npc.ai[2] = 0f; - npc.netUpdate = true; - } } if (expertMode) @@ -329,6 +315,13 @@ namespace CalamityMod.NPCs.Polterghast if (!chargePhase) { + npc.ai[2] += 1f; + if (reset) + { + npc.ai[2] = 0f; + npc.netUpdate = true; + } + float movementLimitX = 0f; float movementLimitY = 0f; int numHooks = 4; @@ -1016,7 +1009,7 @@ namespace CalamityMod.NPCs.Polterghast if (npc.Calamity().newAI[0] > 300f) color37 = Color.Lerp(color37, lightRed, MathHelper.Clamp((npc.Calamity().newAI[0] - 300f) / 120f, 0f, 1f)); - Color color42 = Color.Lerp(Color.White, Color.Red, 0.5f); + Color color42 = Color.Lerp(Color.White, (npc.ai[2] >= 300f || npc.Calamity().newAI[0] > 300f) ? Color.Red : Color.Black, 0.5f); if (CalamityConfig.Instance.Afterimages) { diff --git a/NPCs/Providence/Providence.cs b/NPCs/Providence/Providence.cs index dcb690897d..156887eaa0 100644 --- a/NPCs/Providence/Providence.cs +++ b/NPCs/Providence/Providence.cs @@ -1605,7 +1605,11 @@ namespace CalamityMod.NPCs.Providence ModContent.ProjectileType(), ModContent.ProjectileType(), ModContent.ProjectileType(), - ModContent.ProjectileType() + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType(), + ModContent.ProjectileType() }; bool allowedClass = projectile.IsSummon() || (!projectile.melee && !projectile.ranged && !projectile.magic && !projectile.thrown && !projectile.Calamity().rogue); diff --git a/NPCs/Ravager/RavagerBody.cs b/NPCs/Ravager/RavagerBody.cs index 1a922ac011..23061572ee 100644 --- a/NPCs/Ravager/RavagerBody.cs +++ b/NPCs/Ravager/RavagerBody.cs @@ -51,7 +51,7 @@ namespace CalamityMod.NPCs.Ravager { npc.damage *= 2; npc.defense *= 2; - npc.lifeMax *= 7; + npc.lifeMax *= 5; npc.value *= 1.5f; } double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; diff --git a/NPCs/Ravager/RavagerClawLeft.cs b/NPCs/Ravager/RavagerClawLeft.cs index 17b0a6b108..748a946ec3 100644 --- a/NPCs/Ravager/RavagerClawLeft.cs +++ b/NPCs/Ravager/RavagerClawLeft.cs @@ -39,7 +39,7 @@ namespace CalamityMod.NPCs.Ravager { npc.damage *= 2; npc.defense *= 2; - npc.lifeMax *= 7; + npc.lifeMax *= 5; } if (BossRushEvent.BossRushActive) { diff --git a/NPCs/Ravager/RavagerClawRight.cs b/NPCs/Ravager/RavagerClawRight.cs index 88df004c7b..8a3d87329a 100644 --- a/NPCs/Ravager/RavagerClawRight.cs +++ b/NPCs/Ravager/RavagerClawRight.cs @@ -39,7 +39,7 @@ namespace CalamityMod.NPCs.Ravager { npc.damage *= 2; npc.defense *= 2; - npc.lifeMax *= 7; + npc.lifeMax *= 5; } if (BossRushEvent.BossRushActive) { diff --git a/NPCs/Ravager/RavagerHead.cs b/NPCs/Ravager/RavagerHead.cs index c4fe687dba..c4813646f2 100644 --- a/NPCs/Ravager/RavagerHead.cs +++ b/NPCs/Ravager/RavagerHead.cs @@ -38,7 +38,7 @@ namespace CalamityMod.NPCs.Ravager if (CalamityWorld.downedProvidence && !BossRushEvent.BossRushActive) { npc.defense *= 2; - npc.lifeMax *= 7; + npc.lifeMax *= 5; } if (BossRushEvent.BossRushActive) { diff --git a/NPCs/Ravager/RavagerLegLeft.cs b/NPCs/Ravager/RavagerLegLeft.cs index b17916793a..5418d3c79f 100644 --- a/NPCs/Ravager/RavagerLegLeft.cs +++ b/NPCs/Ravager/RavagerLegLeft.cs @@ -36,7 +36,7 @@ namespace CalamityMod.NPCs.Ravager if (CalamityWorld.downedProvidence && !BossRushEvent.BossRushActive) { npc.defense *= 2; - npc.lifeMax *= 7; + npc.lifeMax *= 5; } if (BossRushEvent.BossRushActive) { diff --git a/NPCs/Ravager/RavagerLegRight.cs b/NPCs/Ravager/RavagerLegRight.cs index c01f381224..7058a5d0e2 100644 --- a/NPCs/Ravager/RavagerLegRight.cs +++ b/NPCs/Ravager/RavagerLegRight.cs @@ -36,7 +36,7 @@ namespace CalamityMod.NPCs.Ravager if (CalamityWorld.downedProvidence && !BossRushEvent.BossRushActive) { npc.defense *= 2; - npc.lifeMax *= 7; + npc.lifeMax *= 5; } if (BossRushEvent.BossRushActive) { diff --git a/NPCs/Ravager/RockPillar.cs b/NPCs/Ravager/RockPillar.cs index c36ef4e161..7399a2294f 100644 --- a/NPCs/Ravager/RockPillar.cs +++ b/NPCs/Ravager/RockPillar.cs @@ -24,7 +24,7 @@ namespace CalamityMod.NPCs.Ravager npc.defense = 50; npc.DR_NERD(0.3f); npc.chaseable = false; - npc.lifeMax = CalamityWorld.downedProvidence ? 35000 : 5000; + npc.lifeMax = CalamityWorld.downedProvidence ? 22750 : 5000; npc.alpha = 255; npc.aiStyle = -1; aiType = -1; diff --git a/NPCs/Signus/Signus.cs b/NPCs/Signus/Signus.cs index 97a94e34f3..a7839468c8 100644 --- a/NPCs/Signus/Signus.cs +++ b/NPCs/Signus/Signus.cs @@ -48,7 +48,7 @@ namespace CalamityMod.NPCs.Signus else music = MusicID.Boss4; bool notDoGFight = CalamityWorld.DoGSecondStageCountdown <= 0 || !CalamityWorld.downedSentinel3; - npc.LifeMaxNERB(notDoGFight ? 280000 : 70000, notDoGFight ? 445500 : 109500, 2400000); + npc.LifeMaxNERB(notDoGFight ? 182000 : 45500, notDoGFight ? 289575 : 71175, 2400000); if (notDoGFight) { npc.value = Item.buyPrice(0, 35, 0, 0); diff --git a/NPCs/Signus/SignusBomb.cs b/NPCs/Signus/SignusBomb.cs index e942286fd7..8439e734c3 100644 --- a/NPCs/Signus/SignusBomb.cs +++ b/NPCs/Signus/SignusBomb.cs @@ -24,7 +24,7 @@ namespace CalamityMod.NPCs.Signus npc.GetNPCDamage(); npc.width = 30; npc.height = 30; - npc.lifeMax = 6000; + npc.lifeMax = 3900; npc.aiStyle = -1; aiType = -1; npc.knockBackResist = 0f; diff --git a/NPCs/StormWeaver/StormWeaverBody.cs b/NPCs/StormWeaver/StormWeaverBody.cs index 6611bf37f2..0a831e39ad 100644 --- a/NPCs/StormWeaver/StormWeaverBody.cs +++ b/NPCs/StormWeaver/StormWeaverBody.cs @@ -25,8 +25,8 @@ namespace CalamityMod.NPCs.StormWeaver global.DR = 0.999999f; global.unbreakableDR = true; bool notDoGFight = CalamityWorld.DoGSecondStageCountdown <= 0 || !CalamityWorld.downedSentinel2; - npc.LifeMaxNERB(notDoGFight ? 100000 : 20000, notDoGFight ? 100000 : 20000, 170000); - Mod calamityModMusic = ModLoader.GetMod("CalamityModMusic"); + npc.LifeMaxNERB(notDoGFight ? 65000 : 13000, notDoGFight ? 65000 : 13000, 170000); + Mod calamityModMusic = ModLoader.GetMod("CalamityModMusic"); if (calamityModMusic != null) music = calamityModMusic.GetSoundSlot(SoundType.Music, "Sounds/Music/ScourgeofTheUniverse"); else diff --git a/NPCs/StormWeaver/StormWeaverBodyNaked.cs b/NPCs/StormWeaver/StormWeaverBodyNaked.cs index 97cf29072e..855f41bfb9 100644 --- a/NPCs/StormWeaver/StormWeaverBodyNaked.cs +++ b/NPCs/StormWeaver/StormWeaverBodyNaked.cs @@ -28,7 +28,7 @@ namespace CalamityMod.NPCs.StormWeaver npc.height = 40; npc.lifeMax = 100000; bool notDoGFight = CalamityWorld.DoGSecondStageCountdown <= 0 || !CalamityWorld.downedSentinel2; - npc.LifeMaxNERB(notDoGFight ? 900000 : 150000, notDoGFight ? 900000 : 150000, 3500000); + npc.LifeMaxNERB(notDoGFight ? 585000 : 97500, notDoGFight ? 585000 : 97500, 3500000); Mod calamityModMusic = ModLoader.GetMod("CalamityModMusic"); if (calamityModMusic != null) music = calamityModMusic.GetSoundSlot(SoundType.Music, "Sounds/Music/ScourgeofTheUniverse"); diff --git a/NPCs/StormWeaver/StormWeaverHead.cs b/NPCs/StormWeaver/StormWeaverHead.cs index 722289a625..bb53e3a681 100644 --- a/NPCs/StormWeaver/StormWeaverHead.cs +++ b/NPCs/StormWeaver/StormWeaverHead.cs @@ -36,7 +36,7 @@ namespace CalamityMod.NPCs.StormWeaver global.DR = 0.999999f; global.unbreakableDR = true; bool notDoGFight = CalamityWorld.DoGSecondStageCountdown <= 0 || !CalamityWorld.downedSentinel2; - npc.LifeMaxNERB(notDoGFight ? 100000 : 20000, notDoGFight ? 100000 : 20000, 170000); + npc.LifeMaxNERB(notDoGFight ? 65000 : 13000, notDoGFight ? 65000 : 13000, 170000); Mod calamityModMusic = ModLoader.GetMod("CalamityModMusic"); if (calamityModMusic != null) music = calamityModMusic.GetSoundSlot(SoundType.Music, "Sounds/Music/ScourgeofTheUniverse"); diff --git a/NPCs/StormWeaver/StormWeaverHeadNaked.cs b/NPCs/StormWeaver/StormWeaverHeadNaked.cs index ddab19d494..875cb98f39 100644 --- a/NPCs/StormWeaver/StormWeaverHeadNaked.cs +++ b/NPCs/StormWeaver/StormWeaverHeadNaked.cs @@ -40,7 +40,7 @@ namespace CalamityMod.NPCs.StormWeaver npc.width = 74; npc.height = 74; bool notDoGFight = CalamityWorld.DoGSecondStageCountdown <= 0 || !CalamityWorld.downedSentinel2; - npc.LifeMaxNERB(notDoGFight ? 900000 : 150000, notDoGFight ? 900000 : 150000, 3500000); + npc.LifeMaxNERB(notDoGFight ? 585000 : 97500, notDoGFight ? 585000 : 97500, 3500000); Mod calamityModMusic = ModLoader.GetMod("CalamityModMusic"); if (calamityModMusic != null) music = calamityModMusic.GetSoundSlot(SoundType.Music, "Sounds/Music/ScourgeofTheUniverse"); diff --git a/NPCs/StormWeaver/StormWeaverTail.cs b/NPCs/StormWeaver/StormWeaverTail.cs index 1b0837a4fe..2105fe4cba 100644 --- a/NPCs/StormWeaver/StormWeaverTail.cs +++ b/NPCs/StormWeaver/StormWeaverTail.cs @@ -24,7 +24,7 @@ namespace CalamityMod.NPCs.StormWeaver npc.defense = 0; npc.takenDamageMultiplier = CalamityWorld.death ? 3f : 10f; bool notDoGFight = CalamityWorld.DoGSecondStageCountdown <= 0 || !CalamityWorld.downedSentinel2; - npc.LifeMaxNERB(notDoGFight ? 100000 : 20000, notDoGFight ? 100000 : 20000, 170000); + npc.LifeMaxNERB(notDoGFight ? 65000 : 13000, notDoGFight ? 65000 : 13000, 170000); Mod calamityModMusic = ModLoader.GetMod("CalamityModMusic"); if (calamityModMusic != null) music = calamityModMusic.GetSoundSlot(SoundType.Music, "Sounds/Music/ScourgeofTheUniverse"); diff --git a/NPCs/StormWeaver/StormWeaverTailNaked.cs b/NPCs/StormWeaver/StormWeaverTailNaked.cs index fd0c40a377..7d8e0ffa83 100644 --- a/NPCs/StormWeaver/StormWeaverTailNaked.cs +++ b/NPCs/StormWeaver/StormWeaverTailNaked.cs @@ -27,7 +27,7 @@ namespace CalamityMod.NPCs.StormWeaver npc.width = 48; npc.height = 80; bool notDoGFight = CalamityWorld.DoGSecondStageCountdown <= 0 || !CalamityWorld.downedSentinel2; - npc.LifeMaxNERB(notDoGFight ? 900000 : 150000, notDoGFight ? 900000 : 150000, 3500000); + npc.LifeMaxNERB(notDoGFight ? 585000 : 97500, notDoGFight ? 585000 : 97500, 3500000); Mod calamityModMusic = ModLoader.GetMod("CalamityModMusic"); if (calamityModMusic != null) music = calamityModMusic.GetSoundSlot(SoundType.Music, "Sounds/Music/ScourgeofTheUniverse"); diff --git a/NPCs/Yharon/Yharon.cs b/NPCs/Yharon/Yharon.cs index 203ba6004c..88901800fd 100644 --- a/NPCs/Yharon/Yharon.cs +++ b/NPCs/Yharon/Yharon.cs @@ -712,7 +712,7 @@ namespace CalamityMod.NPCs.Yharon // Enter new phase else if (npc.ai[0] == 4f) { - npc.velocity *= 0.98f; + npc.velocity *= 0.9f; npc.velocity.Y = MathHelper.Lerp(npc.velocity.Y, 0f, 0.02f); if (npc.ai[2] == newPhaseTimer - 60) @@ -1031,7 +1031,7 @@ namespace CalamityMod.NPCs.Yharon // Enter new phase else if (npc.ai[0] == 10f) { - npc.velocity *= 0.98f; + npc.velocity *= 0.9f; npc.velocity.Y = MathHelper.Lerp(npc.velocity.Y, 0f, 0.02f); if (npc.ai[2] == newPhaseTimer - 60) @@ -1399,7 +1399,7 @@ namespace CalamityMod.NPCs.Yharon // Enter new phase else if (npc.ai[0] == 17f) { - npc.velocity *= 0.98f; + npc.velocity *= 0.9f; npc.velocity.Y = MathHelper.Lerp(npc.velocity.Y, 0f, 0.02f); if (npc.ai[2] == newPhaseTimer - 60) @@ -2403,7 +2403,7 @@ namespace CalamityMod.NPCs.Yharon // Enter new phase else if (npc.ai[0] == 9f) { - npc.velocity *= 0.95f; + npc.velocity *= 0.9f; Vector2 vector = npc.DirectionTo(targetData.Center); npc.spriteDirection = (vector.X > 0f) ? 1 : -1; diff --git a/Projectiles/DraedonsArsenal/SnakeEyesSummon.cs b/Projectiles/DraedonsArsenal/SnakeEyesSummon.cs index b65237fe32..9253d9304b 100644 --- a/Projectiles/DraedonsArsenal/SnakeEyesSummon.cs +++ b/Projectiles/DraedonsArsenal/SnakeEyesSummon.cs @@ -203,10 +203,13 @@ namespace CalamityMod.Projectiles.DraedonsArsenal { Projectile laser = Projectile.NewProjectileDirect(projectile.Center + Utils.Vector2FromElipse(EyeRotation.ToRotationVector2(), projectile.Size * 0.5f * EyeOutwardness), projectile.DirectionTo(npc.Center) * 4f, ProjectileID.UFOLaser, projectile.damage, projectile.knockBack, projectile.owner); - laser.timeLeft *= 2; - laser.tileCollide = false; - laser.netUpdate = true; - laser.Calamity().forceMinion = true; + if (laser.whoAmI.WithinBounds(Main.maxProjectiles)) + { + laser.timeLeft *= 2; + laser.tileCollide = false; + laser.netUpdate = true; + laser.Calamity().forceMinion = true; + } } projectile.ai[1]++; OldCenter = projectile.Center; diff --git a/Projectiles/Ranged/BloodfireBulletProj.cs b/Projectiles/Ranged/BloodfireBulletProj.cs index 9b80c993a3..96aa569f8a 100644 --- a/Projectiles/Ranged/BloodfireBulletProj.cs +++ b/Projectiles/Ranged/BloodfireBulletProj.cs @@ -65,12 +65,12 @@ namespace CalamityMod.Projectiles.Ranged // Adds 2 frames to lifeRegenTime on every hit. This increased value is used for the damage calculation. owner.lifeRegenTime += 2; - // Deals (1.00 + (0.1 * current lifeRegen))% of current lifeRegenTime as flat bonus damage on hit. + // Deals (1.00 + (0.05 * current lifeRegen))% of current lifeRegenTime as flat bonus damage on hit. // For example, at 0 life regen, you get 1% of lifeRegenTime as bonus damage. // At 10 life regen, you get 2%. At 20 life regen, you get 3%. // Negative life regen does not decrease damage. int regenForCalc = owner.lifeRegen > 0 ? owner.lifeRegen : 0; - float regenDamageRatio = 0.01f + 0.001f * regenForCalc; + float regenDamageRatio = 0.01f + 0.0005f * regenForCalc; // For the sake of bonus damage, life regen time caps at 3600, aka 60 seconds. This is its natural cap in vanilla. int regenTimeForCalc = (int)MathHelper.Clamp(owner.lifeRegenTime, 0f, 3600f); diff --git a/Projectiles/Ranged/ButcherGun.cs b/Projectiles/Ranged/ButcherGun.cs index 1f89300716..0d4147c176 100644 --- a/Projectiles/Ranged/ButcherGun.cs +++ b/Projectiles/Ranged/ButcherGun.cs @@ -104,7 +104,7 @@ namespace CalamityMod.Projectiles.Ranged float kback = player.ActiveItem().knockBack; if (canShoot) { - player.PickAmmo(player.ActiveItem(), ref projType, ref speedMult, ref canShoot, ref damage, ref kback, false); + player.PickAmmo(player.ActiveItem(), ref projType, ref speedMult, ref canShoot, ref damage, ref kback); kback = player.GetWeaponKnockback(player.ActiveItem(), kback); float speed = player.ActiveItem().shootSpeed * projectile.scale; Vector2 targetPos = Main.screenPosition + new Vector2((float)Main.mouseX, (float)Main.mouseY) - source; diff --git a/Projectiles/Ranged/HolyFireBulletProj.cs b/Projectiles/Ranged/HolyFireBulletProj.cs index b816b2c64d..2a36f61514 100644 --- a/Projectiles/Ranged/HolyFireBulletProj.cs +++ b/Projectiles/Ranged/HolyFireBulletProj.cs @@ -11,6 +11,7 @@ namespace CalamityMod.Projectiles.Ranged public class HolyFireBulletProj : ModProjectile { private const int Lifetime = 600; + private static readonly Color Alpha = new Color(1f, 1f, 1f, 0f); public override void SetStaticDefaults() { @@ -49,10 +50,7 @@ namespace CalamityMod.Projectiles.Ranged } } - public override Color? GetAlpha(Color lightColor) - { - return new Color(1f, 1f, 1f, 0f); - } + public override Color? GetAlpha(Color lightColor) => Alpha; public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { @@ -62,14 +60,19 @@ namespace CalamityMod.Projectiles.Ranged public override void Kill(int timeLeft) { + // Spawn an on-hit explosion which deals 75% of the projectile's damage. if (projectile.owner == Main.myPlayer) { int blastDamage = (int)(projectile.damage * 0.75); float scale = 0.85f + Main.rand.NextFloat() * 1.15f; int boom = Projectile.NewProjectile(projectile.Center, Vector2.Zero, ModContent.ProjectileType(), blastDamage, projectile.knockBack, projectile.owner, 0f, scale); - if (boom.WithinBounds(Main.maxProjectiles)) - Main.projectile[boom].Calamity().forceRanged = true; + + // Only declare the explosion as ranged class if the bullet itself is ranged class. + if (boom.WithinBounds(Main.maxProjectiles) && projectile.ranged) + Main.projectile[boom].Calamity().forceRanged = true; } + + // Spawn four shrapnel dust. This deals no damage. for (int k = 0; k < 4; k++) { float scale = Main.rand.NextFloat(1.4f, 1.8f); diff --git a/Projectiles/Summon/PlaguebringerSummon.cs b/Projectiles/Summon/PlaguebringerSummon.cs index fb8a9e01f4..ebe12c499e 100644 --- a/Projectiles/Summon/PlaguebringerSummon.cs +++ b/Projectiles/Summon/PlaguebringerSummon.cs @@ -102,7 +102,8 @@ namespace CalamityMod.Projectiles.Summon if (dealDamage) { Projectile aura = Projectile.NewProjectileDirect(npc.Center, Vector2.Zero, ModContent.ProjectileType(), dmg, 0f, projectile.owner, l); - aura.Calamity().forceMinion = true; + if (aura.whoAmI.WithinBounds(Main.maxProjectiles)) + aura.Calamity().forceMinion = true; } } } diff --git a/Projectiles/Summon/PlateProjectile.cs b/Projectiles/Summon/PlateProjectile.cs index cbdac97176..27f4332fd2 100644 --- a/Projectiles/Summon/PlateProjectile.cs +++ b/Projectiles/Summon/PlateProjectile.cs @@ -51,8 +51,8 @@ namespace CalamityMod.Projectiles.Summon float SpeedX = -projectile.velocity.X * Main.rand.Next(40, 70) * 0.01f + Main.rand.Next(-20, 21) * 0.4f; float SpeedY = -projectile.velocity.Y * Main.rand.Next(40, 70) * 0.01f + Main.rand.Next(-20, 21) * 0.4f; int shard = Projectile.NewProjectile(projectile.Center.X + SpeedX, projectile.Center.Y + SpeedY, SpeedX, SpeedY, ProjectileID.CrystalShard, projectile.damage / 2, 0f, projectile.owner); - Main.projectile[shard].Calamity().forceMinion = true; - ProjectileID.Sets.MinionShot[Main.projectile[shard].type] = true; + if (shard.WithinBounds(Main.maxProjectiles)) + Main.projectile[shard].Calamity().forceMinion = true; } } } diff --git a/Projectiles/Summon/ProfanedSoulCrystalProjectiles.cs b/Projectiles/Summon/ProfanedSoulCrystalProjectiles.cs index 905d11af2a..7feaab6fe9 100644 --- a/Projectiles/Summon/ProfanedSoulCrystalProjectiles.cs +++ b/Projectiles/Summon/ProfanedSoulCrystalProjectiles.cs @@ -51,7 +51,7 @@ namespace CalamityMod.Projectiles.Summon velocity.Normalize(); velocity *= 8f; int proj = Projectile.NewProjectile(projectile.Center + outerPosVec, velocity, ModContent.ProjectileType(), damage, projectile.knockBack, projectile.owner, 0f, 0f); - if (proj != -1) + if (proj.WithinBounds(Main.maxProjectiles)) Main.projectile[proj].Calamity().forceMinion = true; if (innerSplits > 0) //only runs if there's still inner splits to create { @@ -60,7 +60,7 @@ namespace CalamityMod.Projectiles.Summon velocity.Normalize(); velocity *= 5f; proj = Projectile.NewProjectile(projectile.Center + innerPosVec, velocity, ModContent.ProjectileType(), damage, projectile.knockBack, projectile.owner, 0f, 0f); - if (proj != -1) + if (proj.WithinBounds(Main.maxProjectiles)) Main.projectile[proj].Calamity().forceMinion = true; } innerSplits--; @@ -627,7 +627,8 @@ namespace CalamityMod.Projectiles.Summon correctedVelocity.Normalize(); correctedVelocity *= 25f; int proj = Projectile.NewProjectile(pos, correctedVelocity, ModContent.ProjectileType(), (int)((double)projectile.damage * 1.5f), projectile.knockBack, projectile.owner, 2); - Main.projectile[proj].Calamity().forceMinion = true; + if (proj.WithinBounds(Main.maxProjectiles)) + Main.projectile[proj].Calamity().forceMinion = true; ((ProfanedCrystalRangedHuges)Main.projectile[proj].modProjectile).boomerSwarm = true; } } diff --git a/Projectiles/Summon/SolarPixie.cs b/Projectiles/Summon/SolarPixie.cs index 1f1b922daa..9718915629 100644 --- a/Projectiles/Summon/SolarPixie.cs +++ b/Projectiles/Summon/SolarPixie.cs @@ -132,7 +132,8 @@ namespace CalamityMod.Projectiles.Summon velocity.Normalize(); velocity *= shootSpeed; int beam = Projectile.NewProjectile(source, velocity, ProjectileID.HeatRay, projectile.damage, projectile.knockBack, projectile.owner); - Main.projectile[beam].Calamity().forceMinion = true; + if (beam.WithinBounds(Main.maxProjectiles)) + Main.projectile[beam].Calamity().forceMinion = true; projectile.ai[0] = 50f; } } diff --git a/Projectiles/Summon/StormjawBaby.cs b/Projectiles/Summon/StormjawBaby.cs index ca4f622fbf..b691a22377 100644 --- a/Projectiles/Summon/StormjawBaby.cs +++ b/Projectiles/Summon/StormjawBaby.cs @@ -263,12 +263,15 @@ namespace CalamityMod.Projectiles.Summon { Vector2 sparkS = new Vector2(Main.rand.NextFloat(-5f, 5f), Main.rand.NextFloat(-5f, 5f)); int spark = Projectile.NewProjectile(projectile.Center, sparkS, ModContent.ProjectileType(), projectile.damage, projectile.knockBack, projectile.owner); - Main.projectile[spark].Calamity().forceMinion = true; - Main.projectile[spark].timeLeft = 120; - Main.projectile[spark].penetrate = 3; - Main.projectile[spark].usesIDStaticNPCImmunity = true; - Main.projectile[spark].idStaticNPCHitCooldown = 10; - Main.projectile[spark].usesLocalNPCImmunity = false; + if (spark.WithinBounds(Main.maxProjectiles)) + { + Main.projectile[spark].Calamity().forceMinion = true; + Main.projectile[spark].timeLeft = 120; + Main.projectile[spark].penetrate = 3; + Main.projectile[spark].usesIDStaticNPCImmunity = true; + Main.projectile[spark].idStaticNPCHitCooldown = 10; + Main.projectile[spark].usesLocalNPCImmunity = false; + } } sparkCounter = 0; } @@ -507,12 +510,15 @@ namespace CalamityMod.Projectiles.Summon { Vector2 sparkS = new Vector2(Main.rand.NextFloat(-5f, 5f), Main.rand.NextFloat(-5f, 5f)); int spark = Projectile.NewProjectile(projectile.Center, sparkS, ModContent.ProjectileType(), projectile.damage, projectile.knockBack, projectile.owner); - Main.projectile[spark].Calamity().forceMinion = true; - Main.projectile[spark].timeLeft = 120; - Main.projectile[spark].penetrate = 3; - Main.projectile[spark].usesIDStaticNPCImmunity = true; - Main.projectile[spark].idStaticNPCHitCooldown = 10; - Main.projectile[spark].usesLocalNPCImmunity = false; + if (spark.WithinBounds(Main.maxProjectiles)) + { + Main.projectile[spark].Calamity().forceMinion = true; + Main.projectile[spark].timeLeft = 120; + Main.projectile[spark].penetrate = 3; + Main.projectile[spark].usesIDStaticNPCImmunity = true; + Main.projectile[spark].idStaticNPCHitCooldown = 10; + Main.projectile[spark].usesLocalNPCImmunity = false; + } } sparkCounter = 0; } diff --git a/Projectiles/Summon/TacticalPlagueEngineSummon.cs b/Projectiles/Summon/TacticalPlagueJet.cs similarity index 54% rename from Projectiles/Summon/TacticalPlagueEngineSummon.cs rename to Projectiles/Summon/TacticalPlagueJet.cs index 68a5b20f98..f7f7155084 100644 --- a/Projectiles/Summon/TacticalPlagueEngineSummon.cs +++ b/Projectiles/Summon/TacticalPlagueJet.cs @@ -1,17 +1,19 @@ using CalamityMod.Buffs.Summon; -using CalamityMod.Dusts; -using CalamityMod.Items.Weapons.Ranged; using CalamityMod.CalPlayer; +using CalamityMod.Dusts; +using CalamityMod.Projectiles.Ranged; using Microsoft.Xna.Framework; using System; using Terraria; using Terraria.ID; using Terraria.ModLoader; + namespace CalamityMod.Projectiles.Summon { - public class TacticalPlagueEngineSummon : ModProjectile + public class TacticalPlagueJet : ModProjectile { public static Item FalseGun = null; + public override void SetStaticDefaults() { DisplayName.SetDefault("Tactical Plague Jet"); @@ -32,17 +34,34 @@ namespace CalamityMod.Projectiles.Summon projectile.timeLeft *= 5; projectile.minion = true; projectile.tileCollide = false; - projectile.extraUpdates = 1; + projectile.extraUpdates = 1; } + // Defines an Item which is a hacked clone of a P90, edited to be summon class instead of ranged. + // The false gun's damage is changed to the appropriate value every time a Tactical Plague Jet wants to fire a bullet. + private static void DefineFalseGun() + { + int p90ID = ModContent.ItemType(); + FalseGun = new Item(); + FalseGun.SetDefaults(p90ID, true); + FalseGun.ranged = false; + FalseGun.summon = true; + } + + public override bool CanDamage() => false; + public override void AI() { Player player = Main.player[projectile.owner]; CalamityPlayer modPlayer = player.Calamity(); + + // Frame 1 spawning effects. if (projectile.localAI[0] == 0f) { projectile.Calamity().spawnedPlayerMinionDamageValue = player.MinionDamage(); projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage; + + // Spawn dust. for (int i = 0; i < 45; i++) { float angle = MathHelper.TwoPi / 45f * i; @@ -50,18 +69,23 @@ namespace CalamityMod.Projectiles.Summon Dust dust = Dust.NewDustPerfect(projectile.Center + velocity * 2f, (int)CalamityDusts.Plague, velocity); dust.noGravity = true; } - FalseGun = ItemLoader.GetItem(ModContent.ItemType()).item; + + // Construct a fake item to use with vanilla code for the sake of firing bullets. + if (FalseGun is null) + DefineFalseGun(); projectile.localAI[0] = 1f; } + + // Animation handling. if (projectile.frameCounter++ > 6f) { projectile.frame++; projectile.frameCounter = 0; } if (projectile.frame >= Main.projFrames[projectile.type]) - { projectile.frame = 0; - } + + // Correct for minion damage changes every single frame. if (player.MinionDamage() != projectile.Calamity().spawnedPlayerMinionDamageValue) { int trueDamage = (int)((float)projectile.Calamity().spawnedPlayerMinionProjectileDamageValue / @@ -69,73 +93,71 @@ namespace CalamityMod.Projectiles.Summon player.MinionDamage()); projectile.damage = trueDamage; } - bool isCorrectProjectile = projectile.type == ModContent.ProjectileType(); + player.AddBuff(ModContent.BuffType(), 3600); + bool isCorrectProjectile = projectile.type == ModContent.ProjectileType(); if (isCorrectProjectile) { - if (player.dead) - { - modPlayer.plagueEngine = false; - } - if (modPlayer.plagueEngine) - { + if (player.dead) + modPlayer.plagueEngine = false; + if (modPlayer.plagueEngine) projectile.timeLeft = 2; - } } + + // Pick a target and possibly fire at them. NPC potentialTarget = projectile.Center.MinionHoming(1560f, player); + // If the jet has no target or is out of ammo, passively fly around the player. if (potentialTarget is null || !player.HasAmmo(FalseGun, false)) { + float distanceToOwner = (player.Center - projectile.Center).Length(); float acceleration = 0.1f; - Vector2 distanceVector = player.Center - projectile.Center; - if (distanceVector.Length() < 200f) - { - acceleration = 0.07f; - } - if (distanceVector.Length() < 140f) - { + + // Reduce acceleration significantly if close to the player. + if (distanceToOwner < 140f) acceleration = 0.035f; - } - if (distanceVector.Length() > 100f) + else if (distanceToOwner < 200f) + acceleration = 0.07f; + + // Push away from the player constantly, but only if more than 100 pixels away. (What???) + if (distanceToOwner > 100f) { if (Math.Abs(player.Center.X - projectile.Center.X) > 20f) - { projectile.velocity.X += acceleration * Math.Sign(player.Center.X - projectile.Center.X); - } if (Math.Abs(player.Center.Y - projectile.Center.Y) > 10f) - { projectile.velocity.Y += acceleration * Math.Sign(player.Center.Y - projectile.Center.Y); - } - } - else if (projectile.velocity.Length() > 4f) - { - projectile.velocity *= 0.95f; - } - if (Math.Abs(projectile.velocity.Y) < 2f) - { - projectile.velocity.Y += 0.1f * Math.Sign(player.Center.Y - projectile.Center.Y); - } - if (projectile.velocity.Length() > 9f) - { - projectile.velocity = Vector2.Normalize(projectile.velocity) * 9f; } + // If the jet is moving too fast, start giving it air friction. + else if (projectile.velocity.Length() > 4f) + projectile.velocity *= 0.95f; + + // The jet vertically sticks to the player. + if (Math.Abs(projectile.velocity.Y) < 2f) + projectile.velocity.Y += 0.1f * Math.Sign(player.Center.Y - projectile.Center.Y); + + // If the jet is moving WAY too fast, clamp its velocity. + if (projectile.velocity.Length() > 9f) + projectile.velocity = Vector2.Normalize(projectile.velocity) * 9f; + + // Change the sprite direction of the jet if it's moving more than a tiny bit in either direction. if (projectile.velocity.X > 0.25f) - { projectile.spriteDirection = 1; - } else if (projectile.velocity.X < -0.25f) - { projectile.spriteDirection = -1; - } + + // Angle the jet as it moves. projectile.rotation = projectile.rotation.AngleTowards(0f, 0.2f); - if (distanceVector.Length() > 2700f) + // If the jet is absurdly far away, teleport directly onto the player. + if (distanceToOwner > 2700f) { projectile.Center = player.Center; projectile.netUpdate = true; } } + + // The jet has ammo and has a target. Open fire. else { projectile.spriteDirection = 1; @@ -145,34 +167,42 @@ namespace CalamityMod.Projectiles.Summon if (projectile.ai[0]++ % 75f == 24f) { - int damage = projectile.damage; - if (projectile.ai[1]++ % 20f == 0f) + int projID = ProjectileID.Bullet; + float shootSpeed = FalseGun.shootSpeed; + bool canShoot = true; + int damage = FalseGun.damage = projectile.damage; + float kb = projectile.knockBack; + bool shootRocket = ++projectile.ai[1] % 20f == 0f; + // Rockets never consume ammo. + bool dontConsumeAmmo = Main.rand.NextBool() || shootRocket; + int projIndex; + + // Vanilla function tricked into using a fake gun item with the appropriate base damage as the "firing item". + player.PickAmmo(FalseGun, ref projID, ref shootSpeed, ref canShoot, ref damage, ref kb, dontConsumeAmmo); + + // One in every 20 shots is a rocket which deals 1.5x total damage and extreme knockback. + if (shootRocket) { - int idx = Projectile.NewProjectile(projectile.Center, projectile.DirectionTo(potentialTarget.Center) * 18f, ModContent.ProjectileType(), - (int)(damage * 1.5), 5f, projectile.owner); - Main.projectile[idx].Calamity().forceMinion = true; + int rocketDamage = (int)(damage * 1.5f); + float rocketKB = kb + 5f; + projIndex = Projectile.NewProjectile(projectile.Center, projectile.DirectionTo(potentialTarget.Center) * 18f, ModContent.ProjectileType(), + rocketDamage, rocketKB, projectile.owner); } else { - int shoot = 0; - float shootSpeed = 0f; - bool canShoot = true; - float knockBack = projectile.knockBack * 0.5f; - player.PickAmmo(FalseGun, ref shoot, ref shootSpeed, ref canShoot, ref damage, ref knockBack); - int idx = Projectile.NewProjectile(projectile.Center, projectile.DirectionTo(potentialTarget.Center) * shootSpeed, shoot, - damage, knockBack, projectile.owner); - // There's airway for a small bug in here, but the potential alterative (that has indeed been appearing), where - // the projectile simply cannot exist, is far worse than this. If you have another solution, let me know. - if (idx >= 0 && idx < Main.projectile.Length) - { - Main.projectile[idx].Calamity().forceMinion = true; - } + // Fire the selected bullet, nothing special. + projIndex = Projectile.NewProjectile(projectile.Center, projectile.DirectionTo(potentialTarget.Center) * shootSpeed, projID, + damage, kb, projectile.owner); } + + // Regardless of what was fired, force it to be a summon projectile so that summon accessories work. + if (projIndex.WithinBounds(Main.maxProjectiles)) + Main.projectile[projIndex].Calamity().forceMinion = true; } - projectile.MinionAntiClump(0.25f); + + // Prevent minion clumping while firing. + projectile.MinionAntiClump(0.25f); } } - - public override bool CanDamage() => false; } } diff --git a/Projectiles/Summon/TacticalPlagueEngineSummon.png b/Projectiles/Summon/TacticalPlagueJet.png similarity index 100% rename from Projectiles/Summon/TacticalPlagueEngineSummon.png rename to Projectiles/Summon/TacticalPlagueJet.png