diff --git a/Backgrounds/SulphurSeaSurfaceBGStyle.cs b/Backgrounds/SulphurSeaSurfaceBGStyle.cs new file mode 100644 index 0000000000..b5a98e83e9 --- /dev/null +++ b/Backgrounds/SulphurSeaSurfaceBGStyle.cs @@ -0,0 +1,50 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Backgrounds +{ + public class SulphurSeaSurfaceBGStyle : ModSurfaceBgStyle + { + public override int ChooseCloseTexture(ref float scale, ref double parallax, ref float a, ref float b) + { + scale *= 0.75f; + return mod.GetBackgroundSlot("Backgrounds/SulphurSeaSurfaceClose"); + } + + public override bool ChooseBgStyle() + { + return !Main.gameMenu && Main.LocalPlayer.GetModPlayer(mod).ZoneSulphur; + } + + public override void ModifyFarFades(float[] fades, float transitionSpeed) + { + //This just fades in the background and fades out other backgrounds. + for (int i = 0; i < fades.Length; i++) + { + if (i == Slot) + { + fades[i] += transitionSpeed; + if (fades[i] > 1f) + { + fades[i] = 1f; + } + } + else + { + fades[i] -= transitionSpeed; + if (fades[i] < 0f) + { + fades[i] = 0f; + } + } + } + } + } +} diff --git a/Backgrounds/SulphurSeaSurfaceClose.png b/Backgrounds/SulphurSeaSurfaceClose.png new file mode 100644 index 0000000000..9aa53e7244 Binary files /dev/null and b/Backgrounds/SulphurSeaSurfaceClose.png differ diff --git a/Buffs/AbyssalDivingSuitPlates.cs b/Buffs/AbyssalDivingSuitPlates.cs index 0301f72902..7c0630225f 100644 --- a/Buffs/AbyssalDivingSuitPlates.cs +++ b/Buffs/AbyssalDivingSuitPlates.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Buffs public override void SetDefaults() { DisplayName.SetDefault("Abyssal Diving Suit Plates"); - Description.SetDefault("The plates will absorb 25% damage"); + Description.SetDefault("The plates will absorb 15% damage"); Main.buffNoTimeDisplay[Type] = true; Main.debuff[Type] = false; Main.pvpBuff[Type] = true; diff --git a/Buffs/AbyssalFlames.cs b/Buffs/AbyssalFlames.cs index fcc8fd5e61..7a118a7042 100644 --- a/Buffs/AbyssalFlames.cs +++ b/Buffs/AbyssalFlames.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Buffs Main.debuff[Type] = true; Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = true; - longerExpertDebuff = true; + longerExpertDebuff = false; canBeCleared = false; } diff --git a/Buffs/AdrenalineMode.png b/Buffs/AdrenalineMode.png index 9a0de16293..555478a614 100644 Binary files a/Buffs/AdrenalineMode.png and b/Buffs/AdrenalineMode.png differ diff --git a/Buffs/ArmorCrunch.cs b/Buffs/ArmorCrunch.cs index fd5572027e..4e71acb82f 100644 --- a/Buffs/ArmorCrunch.cs +++ b/Buffs/ArmorCrunch.cs @@ -16,7 +16,6 @@ namespace CalamityMod.Buffs Main.debuff[Type] = true; Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = true; - longerExpertDebuff = true; } public override void Update(NPC npc, ref int buffIndex) diff --git a/Buffs/Backfire.cs b/Buffs/Backfire.cs index 57c0257c10..c24965dda7 100644 --- a/Buffs/Backfire.cs +++ b/Buffs/Backfire.cs @@ -22,8 +22,8 @@ namespace CalamityMod.Buffs player.rangedDamage -= 0.9f; player.thrownDamage -= 0.9f; player.minionDamage -= 0.9f; - player.statDefense -= 30; - player.endurance -= 0.3f; + player.statDefense -= 20; + player.endurance -= 0.2f; player.wingTimeMax /= 2; } } diff --git a/Buffs/BearBuff.cs b/Buffs/BearBuff.cs new file mode 100644 index 0000000000..2ba70444f3 --- /dev/null +++ b/Buffs/BearBuff.cs @@ -0,0 +1,30 @@ +using System; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod; + +namespace CalamityMod.Buffs +{ + public class BearBuff : ModBuff + { + public override void SetDefaults() + { + DisplayName.SetDefault("Bear"); + Description.SetDefault("A guardian angel is following you."); + Main.buffNoTimeDisplay[Type] = true; + Main.vanityPet[Type] = true; + } + + public override void Update(Player player, ref int buffIndex) + { + player.buffTime[buffIndex] = 18000; + player.GetModPlayer(mod).bearPet = true; + bool petProjectileNotSpawned = player.ownedProjectileCounts[mod.ProjectileType("Bear")] <= 0; + if (petProjectileNotSpawned && player.whoAmI == Main.myPlayer) + { + Projectile.NewProjectile(player.position.X + (float)(player.width / 2), player.position.Y + (float)(player.height / 2), 0f, 0f, mod.ProjectileType("Bear"), 0, 0f, player.whoAmI, 0f, 0f); + } + } + } +} \ No newline at end of file diff --git a/Buffs/BearBuff.png b/Buffs/BearBuff.png new file mode 100644 index 0000000000..766af2ccfc Binary files /dev/null and b/Buffs/BearBuff.png differ diff --git a/Buffs/BrimstoneFlames.cs b/Buffs/BrimstoneFlames.cs index d7809de3e9..90d3032d84 100644 --- a/Buffs/BrimstoneFlames.cs +++ b/Buffs/BrimstoneFlames.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Buffs Main.debuff[Type] = true; Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = true; - longerExpertDebuff = true; + longerExpertDebuff = false; } public override void Update(Player player, ref int buffIndex) diff --git a/Buffs/BurningBlood.cs b/Buffs/BurningBlood.cs index ae9bd5c2fb..9e529a9e63 100644 --- a/Buffs/BurningBlood.cs +++ b/Buffs/BurningBlood.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Buffs Main.debuff[Type] = true; Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = true; - longerExpertDebuff = true; + longerExpertDebuff = false; } public override void Update(Player player, ref int buffIndex) diff --git a/Buffs/BurntOut.cs b/Buffs/BurntOut.cs new file mode 100644 index 0000000000..f870507598 --- /dev/null +++ b/Buffs/BurntOut.cs @@ -0,0 +1,28 @@ +using System; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod; +using CalamityMod.NPCs; + +namespace CalamityMod.Buffs +{ + public class BurntOut : ModBuff + { + public override void SetDefaults() + { + DisplayName.SetDefault("Burnt Out"); + Description.SetDefault("You've been burnt out and your guardians are less effective"); + Main.debuff[Type] = true; + Main.pvpBuff[Type] = true; + Main.buffNoSave[Type] = true; + longerExpertDebuff = false; + canBeCleared = false; + } + + public override void Update(Player player, ref int buffIndex) + { + player.GetModPlayer(mod).bOut = true; + } + } +} \ No newline at end of file diff --git a/Buffs/BurntOut.png b/Buffs/BurntOut.png new file mode 100644 index 0000000000..abe4b77475 Binary files /dev/null and b/Buffs/BurntOut.png differ diff --git a/Buffs/CalamityGlobalBuff.cs b/Buffs/CalamityGlobalBuff.cs index 87c02d23fb..0c15461d9e 100644 --- a/Buffs/CalamityGlobalBuff.cs +++ b/Buffs/CalamityGlobalBuff.cs @@ -9,6 +9,7 @@ using Terraria.ID; using Terraria.ModLoader; using CalamityMod; using CalamityMod.NPCs; +using CalamityMod.Items.CalamityCustomThrowingDamage; namespace CalamityMod.Buffs { @@ -24,6 +25,30 @@ namespace CalamityMod.Buffs { player.endurance -= 0.1f; } + if (type == BuffID.Rage) + { + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 10; + } + if (type == BuffID.Wrath) + { + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.1f; + } + if (type == BuffID.WellFed) + { + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.05f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 2; + } + if (type >= BuffID.NebulaUpDmg1 && type <= BuffID.NebulaUpDmg3) + { + float nebulaDamage = 0.15f * (float)player.nebulaLevelDamage; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += nebulaDamage; + } + if (type == BuffID.Warmth) + { + player.buffImmune[mod.BuffType("GlacialState")] = true; + player.buffImmune[BuffID.Frozen] = true; + player.buffImmune[BuffID.Chilled] = true; + } } } } diff --git a/Buffs/CrushDepth.cs b/Buffs/CrushDepth.cs index b89a6b5df1..cc0fa992b0 100644 --- a/Buffs/CrushDepth.cs +++ b/Buffs/CrushDepth.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Buffs Main.debuff[Type] = true; Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = true; - longerExpertDebuff = true; + longerExpertDebuff = false; } public override void Update(Player player, ref int buffIndex) diff --git a/Buffs/ExtremeGrav.cs b/Buffs/ExtremeGrav.cs index 8bdbd9406b..66b2e1b476 100644 --- a/Buffs/ExtremeGrav.cs +++ b/Buffs/ExtremeGrav.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Buffs Main.debuff[Type] = true; Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = true; - longerExpertDebuff = true; + longerExpertDebuff = false; canBeCleared = false; } diff --git a/Buffs/ExtremeGravity.cs b/Buffs/ExtremeGravity.cs index 28434d38d2..a7e44cbca8 100644 --- a/Buffs/ExtremeGravity.cs +++ b/Buffs/ExtremeGravity.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Buffs Main.debuff[Type] = true; Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = true; - longerExpertDebuff = true; + longerExpertDebuff = false; } public override void Update(Player player, ref int buffIndex) diff --git a/Buffs/FishAlert.cs b/Buffs/FishAlert.cs index 265b5cf021..518948b6c9 100644 --- a/Buffs/FishAlert.cs +++ b/Buffs/FishAlert.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Buffs Main.debuff[Type] = true; Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = true; - longerExpertDebuff = true; + longerExpertDebuff = false; } public override void Update(Player player, ref int buffIndex) diff --git a/Buffs/GodSlayerInferno.cs b/Buffs/GodSlayerInferno.cs index 87adf6d5e4..dab251db7b 100644 --- a/Buffs/GodSlayerInferno.cs +++ b/Buffs/GodSlayerInferno.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Buffs Main.debuff[Type] = true; Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = true; - longerExpertDebuff = true; + longerExpertDebuff = false; } public override void Update(Player player, ref int buffIndex) diff --git a/Buffs/GuardianDefense.cs b/Buffs/GuardianDefense.cs new file mode 100644 index 0000000000..62a0e32712 --- /dev/null +++ b/Buffs/GuardianDefense.cs @@ -0,0 +1,34 @@ +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Buffs +{ + public class GuardianDefense : ModBuff + { + public override void SetDefaults() + { + DisplayName.SetDefault("Defensive Guardian"); + Description.SetDefault("The defender will protect you"); + Main.buffNoTimeDisplay[Type] = true; + Main.buffNoSave[Type] = true; + } + + public override void Update(Player player, ref int buffIndex) + { + CalamityPlayer modPlayer = player.GetModPlayer(mod); + if (player.ownedProjectileCounts[mod.ProjectileType("MiniGuardianDefense")] > 0) + { + modPlayer.gDefense = true; + } + if (!modPlayer.gDefense) + { + player.DelBuff(buffIndex); + buffIndex--; + } + else + { + player.buffTime[buffIndex] = 18000; + } + } + } +} \ No newline at end of file diff --git a/Buffs/GuardianDefense.png b/Buffs/GuardianDefense.png new file mode 100644 index 0000000000..123f7fdefe Binary files /dev/null and b/Buffs/GuardianDefense.png differ diff --git a/Buffs/GuardianHealer.cs b/Buffs/GuardianHealer.cs new file mode 100644 index 0000000000..e43c3a9bb7 --- /dev/null +++ b/Buffs/GuardianHealer.cs @@ -0,0 +1,34 @@ +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Buffs +{ + public class GuardianHealer : ModBuff + { + public override void SetDefaults() + { + DisplayName.SetDefault("Healer Guardian"); + Description.SetDefault("The guardian will heal you"); + Main.buffNoTimeDisplay[Type] = true; + Main.buffNoSave[Type] = true; + } + + public override void Update(Player player, ref int buffIndex) + { + CalamityPlayer modPlayer = player.GetModPlayer(mod); + if (player.ownedProjectileCounts[mod.ProjectileType("MiniGuardianHealer")] > 0) + { + modPlayer.gHealer = true; + } + if (!modPlayer.gHealer) + { + player.DelBuff(buffIndex); + buffIndex--; + } + else + { + player.buffTime[buffIndex] = 18000; + } + } + } +} \ No newline at end of file diff --git a/Buffs/GuardianHealer.png b/Buffs/GuardianHealer.png new file mode 100644 index 0000000000..123f7fdefe Binary files /dev/null and b/Buffs/GuardianHealer.png differ diff --git a/Buffs/GuardianOffense.cs b/Buffs/GuardianOffense.cs new file mode 100644 index 0000000000..2c87bce3d6 --- /dev/null +++ b/Buffs/GuardianOffense.cs @@ -0,0 +1,34 @@ +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Buffs +{ + public class GuardianOffense : ModBuff + { + public override void SetDefaults() + { + DisplayName.SetDefault("Offensive Guardian"); + Description.SetDefault("The attacker will protect you"); + Main.buffNoTimeDisplay[Type] = true; + Main.buffNoSave[Type] = true; + } + + public override void Update(Player player, ref int buffIndex) + { + CalamityPlayer modPlayer = player.GetModPlayer(mod); + if (player.ownedProjectileCounts[mod.ProjectileType("MiniGuardianAttack")] > 0) + { + modPlayer.gOffense = true; + } + if (!modPlayer.gOffense) + { + player.DelBuff(buffIndex); + buffIndex--; + } + else + { + player.buffTime[buffIndex] = 18000; + } + } + } +} \ No newline at end of file diff --git a/Buffs/GuardianOffense.png b/Buffs/GuardianOffense.png new file mode 100644 index 0000000000..123f7fdefe Binary files /dev/null and b/Buffs/GuardianOffense.png differ diff --git a/Buffs/HeartAttack.cs b/Buffs/HeartAttack.cs index 2410e70e9d..24d1df3c08 100644 --- a/Buffs/HeartAttack.cs +++ b/Buffs/HeartAttack.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Buffs public override void SetDefaults() { DisplayName.SetDefault("Heart Attack"); - Description.SetDefault("You survived a heart attack. Boosts life regen and max life."); + Description.SetDefault("You survived a heart attack. Boosts max life."); Main.debuff[Type] = true; Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = false; diff --git a/Buffs/HolyInferno.cs b/Buffs/HolyInferno.cs index 8ddcde31f7..58cc4a2333 100644 --- a/Buffs/HolyInferno.cs +++ b/Buffs/HolyInferno.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Buffs public override void SetDefaults() { DisplayName.SetDefault("Holy Inferno"); - Description.SetDefault("You've gone too far from the Profaned God!"); + Description.SetDefault("You've gone too far from the Profaned Goddess!"); Main.debuff[Type] = true; Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = true; diff --git a/Buffs/HolyLight.cs b/Buffs/HolyLight.cs index 4ddea2d2d4..d0121a9102 100644 --- a/Buffs/HolyLight.cs +++ b/Buffs/HolyLight.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Buffs Main.debuff[Type] = true; Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = true; - longerExpertDebuff = true; + longerExpertDebuff = false; } public override void Update(Player player, ref int buffIndex) diff --git a/Buffs/Horror.cs b/Buffs/Horror.cs index 9424c27803..05628eff00 100644 --- a/Buffs/Horror.cs +++ b/Buffs/Horror.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Buffs Main.debuff[Type] = true; Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = true; - longerExpertDebuff = true; + longerExpertDebuff = false; } public override void Update(Player player, ref int buffIndex) diff --git a/Buffs/IceShieldBuff.cs b/Buffs/IceShieldBuff.cs index c4f97e1604..7902859b51 100644 --- a/Buffs/IceShieldBuff.cs +++ b/Buffs/IceShieldBuff.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Buffs public override void SetDefaults() { DisplayName.SetDefault("Ice Shield"); - Description.SetDefault("The shield will absorb 50% damage from one hit before breaking"); + Description.SetDefault("The shield will absorb 20% damage from one hit before breaking"); Main.buffNoTimeDisplay[Type] = true; Main.debuff[Type] = false; Main.pvpBuff[Type] = true; diff --git a/Buffs/MarkedforDeath.cs b/Buffs/MarkedforDeath.cs index 6eef570d92..8bd3d2f9f6 100644 --- a/Buffs/MarkedforDeath.cs +++ b/Buffs/MarkedforDeath.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Buffs Main.debuff[Type] = true; Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = true; - longerExpertDebuff = true; + longerExpertDebuff = false; } public override void Update(NPC npc, ref int buffIndex) diff --git a/Buffs/Permafrost/Popo.cs b/Buffs/Permafrost/Popo.cs new file mode 100644 index 0000000000..df27ce67fb --- /dev/null +++ b/Buffs/Permafrost/Popo.cs @@ -0,0 +1,36 @@ +using System; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod; +using CalamityMod.NPCs; + +namespace CalamityMod.Buffs.Permafrost +{ + public class Popo : ModBuff + { + public override void SetDefaults() + { + DisplayName.SetDefault("Popo"); + Description.SetDefault("You are a snowman now!"); + Main.debuff[Type] = true; + Main.buffNoSave[Type] = true; + Main.buffNoTimeDisplay[Type] = true; + canBeCleared = false; + } + + public override void Update(Player player, ref int buffIndex) + { + CalamityPlayer modPlayer = player.GetModPlayer(); + if (modPlayer.snowmanPrevious) + { + modPlayer.snowmanPower = true; + } + else + { + player.DelBuff(buffIndex); + buffIndex--; + } + } + } +} \ No newline at end of file diff --git a/Buffs/Permafrost/Popo.png b/Buffs/Permafrost/Popo.png new file mode 100644 index 0000000000..e85b6c6d24 Binary files /dev/null and b/Buffs/Permafrost/Popo.png differ diff --git a/Buffs/Permafrost/PopoNoseless.cs b/Buffs/Permafrost/PopoNoseless.cs new file mode 100644 index 0000000000..f63dd3851c --- /dev/null +++ b/Buffs/Permafrost/PopoNoseless.cs @@ -0,0 +1,36 @@ +using System; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod; +using CalamityMod.NPCs; + +namespace CalamityMod.Buffs.Permafrost +{ + public class PopoNoseless : ModBuff + { + public override void SetDefaults() + { + DisplayName.SetDefault("Noseless Popo"); + Description.SetDefault("Your nose has been stolen!"); + Main.debuff[Type] = true; + Main.buffNoSave[Type] = true; + canBeCleared = false; + } + + public override void Update(Player player, ref int buffIndex) + { + CalamityPlayer modPlayer = player.GetModPlayer(); + if (modPlayer.snowmanPrevious) + { + modPlayer.snowmanPower = true; + modPlayer.snowmanNoseless = true; + } + else + { + player.DelBuff(buffIndex); + buffIndex--; + } + } + } +} \ No newline at end of file diff --git a/Buffs/Permafrost/PopoNoseless.png b/Buffs/Permafrost/PopoNoseless.png new file mode 100644 index 0000000000..fcb6432284 Binary files /dev/null and b/Buffs/Permafrost/PopoNoseless.png differ diff --git a/Buffs/Plague.cs b/Buffs/Plague.cs index f723a41f5d..2d9fe4900b 100644 --- a/Buffs/Plague.cs +++ b/Buffs/Plague.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Buffs Main.debuff[Type] = true; Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = true; - longerExpertDebuff = true; + longerExpertDebuff = false; } public override void Update(Player player, ref int buffIndex) diff --git a/Buffs/ScarfMeleeBoost.cs b/Buffs/ScarfMeleeBoost.cs index fc7bd4e87d..9c36a7c128 100644 --- a/Buffs/ScarfMeleeBoost.cs +++ b/Buffs/ScarfMeleeBoost.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Buffs public override void SetDefaults() { DisplayName.SetDefault("Scarf Boost"); - Description.SetDefault("10% increased damage, crit chance, and melee speed"); + Description.SetDefault("10% increased damage, 5% increased crit chance, and 10% increased melee speed"); Main.debuff[Type] = false; Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = true; diff --git a/Buffs/SilvaRevival.cs b/Buffs/SilvaRevival.cs new file mode 100644 index 0000000000..48a8703ef5 --- /dev/null +++ b/Buffs/SilvaRevival.cs @@ -0,0 +1,22 @@ +using System; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod; +using CalamityMod.NPCs; + +namespace CalamityMod.Buffs +{ + public class SilvaRevival : ModBuff + { + public override void SetDefaults() + { + DisplayName.SetDefault("Silva Invulnerability"); + Description.SetDefault("You are invulnerable"); + Main.debuff[Type] = false; + Main.pvpBuff[Type] = true; + Main.buffNoSave[Type] = false; + longerExpertDebuff = false; + } + } +} \ No newline at end of file diff --git a/Buffs/SilvaRevival.png b/Buffs/SilvaRevival.png new file mode 100644 index 0000000000..66805fbf1a Binary files /dev/null and b/Buffs/SilvaRevival.png differ diff --git a/Buffs/SirenBobs.cs b/Buffs/SirenBobs.cs index bd23e2db4f..baecc4a97e 100644 --- a/Buffs/SirenBobs.cs +++ b/Buffs/SirenBobs.cs @@ -32,7 +32,6 @@ namespace CalamityMod.Buffs player.detectCreature = true; player.lifeRegen += 0 + (NPC.downedBoss3 ? 1 : 0) + - (Main.hardMode ? 1 : 0) + (NPC.downedMoonlord ? 1 : 0); player.ignoreWater = NPC.downedBoss3; player.accFlipper = true; diff --git a/Buffs/SirenBobsAlt.cs b/Buffs/SirenBobsAlt.cs index fd241e1d28..6a22f11c7c 100644 --- a/Buffs/SirenBobsAlt.cs +++ b/Buffs/SirenBobsAlt.cs @@ -32,7 +32,6 @@ namespace CalamityMod.Buffs player.dangerSense = true; player.lifeRegen += 0 + (NPC.downedBoss3 ? 1 : 0) + - (Main.hardMode ? 1 : 0) + (NPC.downedMoonlord ? 1 : 0); player.ignoreWater = NPC.downedBoss3; player.accFlipper = true; diff --git a/Buffs/TyrantsFury.cs b/Buffs/TyrantsFury.cs index 6a7a2c796e..aa45f43465 100644 --- a/Buffs/TyrantsFury.cs +++ b/Buffs/TyrantsFury.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Buffs public override void SetDefaults() { DisplayName.SetDefault("Tyrant's Fury"); - Description.SetDefault("30% increased melee damage and crit chance"); + Description.SetDefault("30% increased melee damage and 10% increased melee crit chance"); Main.debuff[Type] = false; Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = true; diff --git a/Buffs/VulnerabilityHex.cs b/Buffs/VulnerabilityHex.cs index 6e1ecd3b3e..bc30aaf187 100644 --- a/Buffs/VulnerabilityHex.cs +++ b/Buffs/VulnerabilityHex.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Buffs Main.debuff[Type] = true; Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = true; - longerExpertDebuff = true; + longerExpertDebuff = false; canBeCleared = false; } diff --git a/Buffs/Warped.cs b/Buffs/Warped.cs index bed1503f88..5846b3d410 100644 --- a/Buffs/Warped.cs +++ b/Buffs/Warped.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Buffs Main.debuff[Type] = true; Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = true; - longerExpertDebuff = true; + longerExpertDebuff = false; canBeCleared = false; } diff --git a/Buffs/WeakPetrification.cs b/Buffs/WeakPetrification.cs index d9c37a78aa..a8117fe569 100644 --- a/Buffs/WeakPetrification.cs +++ b/Buffs/WeakPetrification.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Buffs Main.debuff[Type] = true; Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = true; - longerExpertDebuff = true; + longerExpertDebuff = false; canBeCleared = false; } diff --git a/CalamityMod.cs b/CalamityMod.cs index 0a780c9336..01118bc7a6 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -71,6 +71,8 @@ namespace CalamityMod public static Effect CustomShader; + public static IList donatorList; + public static List rangedProjectileExceptionList; public static List projectileMinionList; @@ -97,6 +99,48 @@ namespace CalamityMod public static List alcoholList; + public static List doubleDamageBuffList; //100% buff + + public static List sixtySixDamageBuffList; //66% buff + + public static List fiftyDamageBuffList; //50% buff + + public static List thirtyThreeDamageBuffList; //33% buff + + public static List twentyFiveDamageBuffList; //25% buff + + public static List twentyDamageBuffList; //20% buff + + public static List weaponAutoreuseList; + + public static List quarterDamageNerfList; //25% nerf + + public static List lightGreenThrowingRarityList; + + public static List greenThrowingRarityList; + + public static List blueThrowingRarityList; + + public static List purpleThrowingRarityList; + + public static List throwingProjectileList; + + public static List throwingItemList; + + public static List pumpkinMoonBuffList; + + public static List frostMoonBuffList; + + public static List eclipseBuffList; + + public static List eventProjectileBuffList; + + public static List revengeanceEnemyBuffList; + + public static List revengeanceProjectileBuffList; + + public static List trapProjectileList; + public static CalamityMod Instance; public CalamityMod() @@ -143,6 +187,11 @@ namespace CalamityMod AddEquipTexture(new Items.Armor.SirenBodyAlt(), null, EquipType.Body, "SirenBodyAlt", "CalamityMod/Items/Armor/SirenTransAlt_Body", "CalamityMod/Items/Armor/SirenTransAlt_Arms"); AddEquipTexture(new Items.Armor.SirenLegsAlt(), null, EquipType.Legs, "SirenLegAlt", "CalamityMod/Items/Armor/SirenTransAlt_Legs"); + AddEquipTexture(new Items.Permafrost.PopoHead(), null, EquipType.Head, "PopoHead", "CalamityMod/Items/Permafrost/Popo_Head"); + AddEquipTexture(new Items.Permafrost.PopoNoselessHead(), null, EquipType.Head, "PopoNoselessHead", "CalamityMod/Items/Permafrost/PopoNoseless_Head"); + AddEquipTexture(new Items.Permafrost.PopoBody(), null, EquipType.Body, "PopoBody", "CalamityMod/Items/Permafrost/Popo_Body", "CalamityMod/Items/Permafrost/Popo_Arms"); + AddEquipTexture(new Items.Permafrost.PopoLegs(), null, EquipType.Legs, "PopoLeg", "CalamityMod/Items/Permafrost/Popo_Legs"); + AstralCactusTexture = GetTexture("ExtraTextures/Tiles/AstralCactus"); AstralCactusGlowTexture = GetTexture("ExtraTextures/Tiles/AstralCactusGlow"); AstralSky = GetTexture("ExtraTextures/AstralSky"); @@ -169,6 +218,12 @@ namespace CalamityMod AddMusicBox(GetSoundSlot(SoundType.Music, "Sounds/Music/ProvidenceTheme"), ItemType("ProvidenceMusicbox"), TileType("ProvidenceMusicbox")); AddMusicBox(GetSoundSlot(SoundType.Music, "Sounds/Music/Guardians"), ItemType("ProfanedGuardianMusicbox"), TileType("ProfanedGuardianMusicbox")); AddMusicBox(GetSoundSlot(SoundType.Music, "Sounds/Music/Ravager"), ItemType("RavagerMusicbox"), TileType("RavagerMusicbox")); + AddMusicBox(GetSoundSlot(SoundType.Music, "Sounds/Music/AstrumDeus"), ItemType("AstrumDeusMusicbox"), TileType("AstrumDeusMusicbox")); + AddMusicBox(GetSoundSlot(SoundType.Music, "Sounds/Music/UniversalCollapse"), ItemType("DoGP2Musicbox"), TileType("DoGP2Musicbox")); + AddMusicBox(GetSoundSlot(SoundType.Music, "Sounds/Music/TheDeepAbyss"), ItemType("AbyssLowerMusicbox"), TileType("AbyssLowerMusicbox")); + AddMusicBox(GetSoundSlot(SoundType.Music, "Sounds/Music/Calamity"), ItemType("CalamityMusicbox"), TileType("CalamityMusicbox")); + AddMusicBox(GetSoundSlot(SoundType.Music, "Sounds/Music/Crag"), ItemType("CragMusicbox"), TileType("CragMusicbox")); + AddMusicBox(GetSoundSlot(SoundType.Music, "Sounds/Music/LeftAlone"), ItemType("BrimmyMusicbox"), TileType("BrimmyMusicbox")); Filters.Scene["CalamityMod:DevourerofGodsHead"] = new Filter(new DoGScreenShaderData("FilterMiniTower").UseColor(0.4f, 0.1f, 1.0f).UseOpacity(0.5f), EffectPriority.VeryHigh); SkyManager.Instance["CalamityMod:DevourerofGodsHead"] = new DoGSky(); @@ -207,8 +262,8 @@ namespace CalamityMod BossHealthBarManager.Load(this); base.Load(); - Injections.Load(); - base.Load(); + //Injections.Load(); + //base.Load(); SetupLists(); @@ -592,6 +647,46 @@ namespace CalamityMod text = CreateTranslation("BossRushTierFiveEndText"); text.SetDefault("Hmm? You expected a reward beyond this mere pebble? Patience, the true reward will come apparent in time..."); AddTranslation(text); + + text = CreateTranslation("MeleeLevelUp"); + text.SetDefault("Melee weapon proficiency level up!"); + AddTranslation(text); + + text = CreateTranslation("MeleeLevelUpFinal"); + text.SetDefault("Melee weapon proficiency maxed out!"); + AddTranslation(text); + + text = CreateTranslation("RangedLevelUp"); + text.SetDefault("Ranged weapon proficiency level up!"); + AddTranslation(text); + + text = CreateTranslation("RangedLevelUpFinal"); + text.SetDefault("Ranged weapon proficiency maxed out!"); + AddTranslation(text); + + text = CreateTranslation("MagicLevelUp"); + text.SetDefault("Magic weapon proficiency level up!"); + AddTranslation(text); + + text = CreateTranslation("MagicLevelUpFinal"); + text.SetDefault("Magic weapon proficiency maxed out!"); + AddTranslation(text); + + text = CreateTranslation("SummonLevelUp"); + text.SetDefault("Summoner weapon proficiency level up!"); + AddTranslation(text); + + text = CreateTranslation("SummonLevelUpFinal"); + text.SetDefault("Summoner weapon proficiency maxed out!"); + AddTranslation(text); + + text = CreateTranslation("RogueLevelUp"); + text.SetDefault("Rogue weapon proficiency level up!"); + AddTranslation(text); + + text = CreateTranslation("RogueLevelUpFinal"); + text.SetDefault("Rogue weapon proficiency maxed out!"); + AddTranslation(text); #endregion } #endregion @@ -612,6 +707,8 @@ namespace CalamityMod AstralCactusGlowTexture = null; AstralSky = null; + donatorList = null; + rangedProjectileExceptionList = null; projectileMinionList = null; enemyImmunityList = null; @@ -625,6 +722,26 @@ namespace CalamityMod fireWeaponList = null; natureWeaponList = null; alcoholList = null; + doubleDamageBuffList = null; + sixtySixDamageBuffList = null; + fiftyDamageBuffList = null; + thirtyThreeDamageBuffList = null; + twentyFiveDamageBuffList = null; + weaponAutoreuseList = null; + quarterDamageNerfList = null; + lightGreenThrowingRarityList = null; + greenThrowingRarityList = null; + blueThrowingRarityList = null; + purpleThrowingRarityList = null; + throwingProjectileList = null; + throwingItemList = null; + pumpkinMoonBuffList = null; + frostMoonBuffList = null; + eclipseBuffList = null; + eventProjectileBuffList = null; + revengeanceEnemyBuffList = null; + revengeanceProjectileBuffList = null; + trapProjectileList = null; BossHealthBarManager.Unload(); base.Unload(); @@ -634,8 +751,8 @@ namespace CalamityMod Instance = null; - Injections.Unload(); - base.Unload(); + //Injections.Unload(); + //base.Unload(); if (!Main.dedServ) { @@ -653,6 +770,31 @@ namespace CalamityMod #region SetupLists public static void SetupLists() { + donatorList = new List(); + + donatorList.Add("Vorbis"); + donatorList.Add("SoloMael"); + donatorList.Add("Chaotic Reks"); + donatorList.Add("The Buildmonger"); + donatorList.Add("Yuh"); + donatorList.Add("Littlepiggy"); + donatorList.Add("LompL"); + donatorList.Add("Lilith Saintclaire"); + donatorList.Add("Ben Shapiro"); + donatorList.Add("Frederik Henschel"); + donatorList.Add("Faye"); + donatorList.Add("Gibb50"); + donatorList.Add("Braden Hajer"); + donatorList.Add("Hannes Holmlund"); + donatorList.Add("profoundmango69"); + donatorList.Add("Jack M Sargent"); + donatorList.Add("Hans Volter"); + donatorList.Add("Krankwagon"); + donatorList.Add("MishiroUsui"); + donatorList.Add("pixlgray"); + donatorList.Add("Arkhine"); + donatorList.Add("Lodude"); + rangedProjectileExceptionList = new List(); rangedProjectileExceptionList.Add(ProjectileID.Phantasm); @@ -907,6 +1049,323 @@ namespace CalamityMod alcoholList = new List(); + doubleDamageBuffList = new List(); + + doubleDamageBuffList.Add(ItemID.BallOHurt); + doubleDamageBuffList.Add(ItemID.TheMeatball); + doubleDamageBuffList.Add(ItemID.BlueMoon); + doubleDamageBuffList.Add(ItemID.Sunfury); + doubleDamageBuffList.Add(ItemID.DaoofPow); + doubleDamageBuffList.Add(ItemID.FlowerPow); + doubleDamageBuffList.Add(ItemID.Anchor); + doubleDamageBuffList.Add(ItemID.KOCannon); + doubleDamageBuffList.Add(ItemID.GolemFist); + doubleDamageBuffList.Add(ItemID.BreakerBlade); + doubleDamageBuffList.Add(ItemID.SpectreStaff); + doubleDamageBuffList.Add(ItemID.MonkStaffT2); + doubleDamageBuffList.Add(ItemID.ProximityMineLauncher); + doubleDamageBuffList.Add(ItemID.FireworksLauncher); + + sixtySixDamageBuffList = new List(); + + sixtySixDamageBuffList.Add(ItemID.TerraBlade); + sixtySixDamageBuffList.Add(ItemID.TrueNightsEdge); + sixtySixDamageBuffList.Add(ItemID.WandofSparking); + sixtySixDamageBuffList.Add(ItemID.MedusaHead); + sixtySixDamageBuffList.Add(ItemID.StaffofEarth); + sixtySixDamageBuffList.Add(ItemID.ChristmasTreeSword); + sixtySixDamageBuffList.Add(ItemID.MonkStaffT1); + sixtySixDamageBuffList.Add(ItemID.InfernoFork); + sixtySixDamageBuffList.Add(ItemID.VenomStaff); + + fiftyDamageBuffList = new List(); + + fiftyDamageBuffList.Add(ItemID.NightsEdge); + fiftyDamageBuffList.Add(ItemID.EldMelter); + fiftyDamageBuffList.Add(ItemID.Flamethrower); + fiftyDamageBuffList.Add(ItemID.MoonlordTurretStaff); + fiftyDamageBuffList.Add(ItemID.WaspGun); + fiftyDamageBuffList.Add(ItemID.Keybrand); + fiftyDamageBuffList.Add(ItemID.PulseBow); + fiftyDamageBuffList.Add(ItemID.PaladinsHammer); + + thirtyThreeDamageBuffList = new List(); + + thirtyThreeDamageBuffList.Add(ItemID.CrystalVileShard); + thirtyThreeDamageBuffList.Add(ItemID.SoulDrain); + thirtyThreeDamageBuffList.Add(ItemID.ClingerStaff); + thirtyThreeDamageBuffList.Add(ItemID.ChargedBlasterCannon); + thirtyThreeDamageBuffList.Add(ItemID.NettleBurst); + thirtyThreeDamageBuffList.Add(ItemID.Excalibur); + thirtyThreeDamageBuffList.Add(ItemID.AmberStaff); + thirtyThreeDamageBuffList.Add(ItemID.BluePhasesaber); + thirtyThreeDamageBuffList.Add(ItemID.RedPhasesaber); + thirtyThreeDamageBuffList.Add(ItemID.GreenPhasesaber); + thirtyThreeDamageBuffList.Add(ItemID.WhitePhasesaber); + thirtyThreeDamageBuffList.Add(ItemID.YellowPhasesaber); + thirtyThreeDamageBuffList.Add(ItemID.PurplePhasesaber); + thirtyThreeDamageBuffList.Add(ItemID.TheRottedFork); + thirtyThreeDamageBuffList.Add(ItemID.VampireKnives); + + twentyFiveDamageBuffList = new List(); + + twentyFiveDamageBuffList.Add(ItemID.Muramasa); + twentyFiveDamageBuffList.Add(ItemID.StakeLauncher); + + twentyDamageBuffList = new List(); + + twentyDamageBuffList.Add(ItemID.ChainGuillotines); + twentyDamageBuffList.Add(ItemID.FlowerofFrost); + twentyDamageBuffList.Add(ItemID.PoisonStaff); + twentyDamageBuffList.Add(ItemID.Gungnir); + twentyDamageBuffList.Add(ItemID.BookStaff); + + weaponAutoreuseList = new List(); + + weaponAutoreuseList.Add(ItemID.NightsEdge); + weaponAutoreuseList.Add(ItemID.TrueNightsEdge); + weaponAutoreuseList.Add(ItemID.TrueExcalibur); + weaponAutoreuseList.Add(ItemID.PhoenixBlaster); + weaponAutoreuseList.Add(ItemID.VenusMagnum); + weaponAutoreuseList.Add(ItemID.MagicDagger); + weaponAutoreuseList.Add(ItemID.BeamSword); + weaponAutoreuseList.Add(ItemID.MonkStaffT2); + weaponAutoreuseList.Add(ItemID.PaladinsHammer); + + quarterDamageNerfList = new List(); + + quarterDamageNerfList.Add(ItemID.DaedalusStormbow); + quarterDamageNerfList.Add(ItemID.PhoenixBlaster); + quarterDamageNerfList.Add(ItemID.VenusMagnum); + quarterDamageNerfList.Add(ItemID.BlizzardStaff); + + pumpkinMoonBuffList = new List(); + + pumpkinMoonBuffList.Add(NPCID.Scarecrow1); + pumpkinMoonBuffList.Add(NPCID.Scarecrow2); + pumpkinMoonBuffList.Add(NPCID.Scarecrow3); + pumpkinMoonBuffList.Add(NPCID.Scarecrow4); + pumpkinMoonBuffList.Add(NPCID.Scarecrow5); + pumpkinMoonBuffList.Add(NPCID.Scarecrow6); + pumpkinMoonBuffList.Add(NPCID.Scarecrow7); + pumpkinMoonBuffList.Add(NPCID.Scarecrow8); + pumpkinMoonBuffList.Add(NPCID.Scarecrow9); + pumpkinMoonBuffList.Add(NPCID.Scarecrow10); + pumpkinMoonBuffList.Add(NPCID.HeadlessHorseman); + pumpkinMoonBuffList.Add(NPCID.MourningWood); + pumpkinMoonBuffList.Add(NPCID.Splinterling); + pumpkinMoonBuffList.Add(NPCID.Pumpking); + pumpkinMoonBuffList.Add(NPCID.Hellhound); + pumpkinMoonBuffList.Add(NPCID.Poltergeist); + + frostMoonBuffList = new List(); + + frostMoonBuffList.Add(NPCID.ZombieElf); + frostMoonBuffList.Add(NPCID.ZombieElfBeard); + frostMoonBuffList.Add(NPCID.ZombieElfGirl); + frostMoonBuffList.Add(NPCID.PresentMimic); + frostMoonBuffList.Add(NPCID.GingerbreadMan); + frostMoonBuffList.Add(NPCID.Yeti); + frostMoonBuffList.Add(NPCID.Everscream); + frostMoonBuffList.Add(NPCID.IceQueen); + frostMoonBuffList.Add(NPCID.SantaNK1); + frostMoonBuffList.Add(NPCID.ElfCopter); + frostMoonBuffList.Add(NPCID.Nutcracker); + frostMoonBuffList.Add(NPCID.NutcrackerSpinning); + frostMoonBuffList.Add(NPCID.ElfArcher); + frostMoonBuffList.Add(NPCID.Krampus); + frostMoonBuffList.Add(NPCID.Flocko); + + eclipseBuffList = new List(); + + eclipseBuffList.Add(NPCID.Eyezor); + eclipseBuffList.Add(NPCID.Reaper); + eclipseBuffList.Add(NPCID.Frankenstein); + eclipseBuffList.Add(NPCID.SwampThing); + eclipseBuffList.Add(NPCID.Vampire); + eclipseBuffList.Add(NPCID.VampireBat); + eclipseBuffList.Add(NPCID.Butcher); + eclipseBuffList.Add(NPCID.CreatureFromTheDeep); + eclipseBuffList.Add(NPCID.Fritz); + eclipseBuffList.Add(NPCID.Nailhead); + eclipseBuffList.Add(NPCID.Psycho); + eclipseBuffList.Add(NPCID.DeadlySphere); + eclipseBuffList.Add(NPCID.DrManFly); + eclipseBuffList.Add(NPCID.ThePossessed); + eclipseBuffList.Add(NPCID.Mothron); + eclipseBuffList.Add(NPCID.MothronEgg); + eclipseBuffList.Add(NPCID.MothronSpawn); + + eventProjectileBuffList = new List(); + + eventProjectileBuffList.Add(ProjectileID.FlamingWood); + eventProjectileBuffList.Add(ProjectileID.GreekFire1); + eventProjectileBuffList.Add(ProjectileID.GreekFire2); + eventProjectileBuffList.Add(ProjectileID.GreekFire3); + eventProjectileBuffList.Add(ProjectileID.FlamingScythe); + eventProjectileBuffList.Add(ProjectileID.FlamingArrow); + eventProjectileBuffList.Add(ProjectileID.PineNeedleHostile); + eventProjectileBuffList.Add(ProjectileID.OrnamentHostile); + eventProjectileBuffList.Add(ProjectileID.OrnamentHostileShrapnel); + eventProjectileBuffList.Add(ProjectileID.FrostWave); + eventProjectileBuffList.Add(ProjectileID.FrostShard); + eventProjectileBuffList.Add(ProjectileID.Missile); + eventProjectileBuffList.Add(ProjectileID.Present); + eventProjectileBuffList.Add(ProjectileID.Spike); + eventProjectileBuffList.Add(ProjectileID.BulletDeadeye); + eventProjectileBuffList.Add(ProjectileID.EyeLaser); + eventProjectileBuffList.Add(ProjectileID.Nail); + eventProjectileBuffList.Add(ProjectileID.DrManFlyFlask); + + revengeanceEnemyBuffList = new List(); + + revengeanceEnemyBuffList.Add(NPCID.ServantofCthulhu); + revengeanceEnemyBuffList.Add(NPCID.EyeofCthulhu); + revengeanceEnemyBuffList.Add(NPCID.EaterofWorldsHead); + revengeanceEnemyBuffList.Add(NPCID.DevourerHead); + revengeanceEnemyBuffList.Add(NPCID.GiantWormHead); + revengeanceEnemyBuffList.Add(NPCID.MeteorHead); + revengeanceEnemyBuffList.Add(NPCID.SkeletronHead); + revengeanceEnemyBuffList.Add(NPCID.SkeletronHand); + revengeanceEnemyBuffList.Add(NPCID.BoneSerpentHead); + revengeanceEnemyBuffList.Add(NPCID.ManEater); + revengeanceEnemyBuffList.Add(NPCID.KingSlime); + revengeanceEnemyBuffList.Add(NPCID.Snatcher); + revengeanceEnemyBuffList.Add(NPCID.Piranha); + revengeanceEnemyBuffList.Add(NPCID.Shark); + revengeanceEnemyBuffList.Add(NPCID.SpikeBall); + revengeanceEnemyBuffList.Add(NPCID.BlazingWheel); + revengeanceEnemyBuffList.Add(NPCID.Mimic); + revengeanceEnemyBuffList.Add(NPCID.WyvernHead); + revengeanceEnemyBuffList.Add(NPCID.DiggerHead); + revengeanceEnemyBuffList.Add(NPCID.SeekerHead); + revengeanceEnemyBuffList.Add(NPCID.AnglerFish); + revengeanceEnemyBuffList.Add(NPCID.Werewolf); + revengeanceEnemyBuffList.Add(NPCID.Wraith); + revengeanceEnemyBuffList.Add(NPCID.WallofFlesh); + revengeanceEnemyBuffList.Add(NPCID.TheHungry); + revengeanceEnemyBuffList.Add(NPCID.TheHungryII); + revengeanceEnemyBuffList.Add(NPCID.LeechHead); + revengeanceEnemyBuffList.Add(NPCID.Spazmatism); + revengeanceEnemyBuffList.Add(NPCID.Retinazer); + revengeanceEnemyBuffList.Add(NPCID.SkeletronPrime); + revengeanceEnemyBuffList.Add(NPCID.PrimeSaw); + revengeanceEnemyBuffList.Add(NPCID.PrimeVice); + revengeanceEnemyBuffList.Add(NPCID.TheDestroyer); + revengeanceEnemyBuffList.Add(NPCID.Arapaima); + revengeanceEnemyBuffList.Add(NPCID.BlackRecluse); + revengeanceEnemyBuffList.Add(NPCID.WallCreeper); + revengeanceEnemyBuffList.Add(NPCID.WallCreeperWall); + revengeanceEnemyBuffList.Add(NPCID.BlackRecluseWall); + revengeanceEnemyBuffList.Add(NPCID.AngryTrapper); + revengeanceEnemyBuffList.Add(NPCID.Lihzahrd); + revengeanceEnemyBuffList.Add(NPCID.LihzahrdCrawler); + revengeanceEnemyBuffList.Add(NPCID.PirateCaptain); + revengeanceEnemyBuffList.Add(NPCID.QueenBee); + revengeanceEnemyBuffList.Add(NPCID.FlyingSnake); + revengeanceEnemyBuffList.Add(NPCID.Golem); + revengeanceEnemyBuffList.Add(NPCID.GolemFistLeft); + revengeanceEnemyBuffList.Add(NPCID.GolemFistRight); + revengeanceEnemyBuffList.Add(NPCID.Reaper); + revengeanceEnemyBuffList.Add(NPCID.Plantera); + revengeanceEnemyBuffList.Add(NPCID.PlanterasHook); + revengeanceEnemyBuffList.Add(NPCID.PlanterasTentacle); + revengeanceEnemyBuffList.Add(NPCID.BrainofCthulhu); + revengeanceEnemyBuffList.Add(NPCID.Paladin); + revengeanceEnemyBuffList.Add(NPCID.BoneLee); + revengeanceEnemyBuffList.Add(NPCID.MourningWood); + revengeanceEnemyBuffList.Add(NPCID.Pumpking); + revengeanceEnemyBuffList.Add(NPCID.PumpkingBlade); + revengeanceEnemyBuffList.Add(NPCID.PresentMimic); + revengeanceEnemyBuffList.Add(NPCID.Everscream); + revengeanceEnemyBuffList.Add(NPCID.IceQueen); + revengeanceEnemyBuffList.Add(NPCID.SantaNK1); + revengeanceEnemyBuffList.Add(NPCID.DukeFishron); + revengeanceEnemyBuffList.Add(NPCID.MoonLordHand); + revengeanceEnemyBuffList.Add(NPCID.StardustWormHead); + revengeanceEnemyBuffList.Add(NPCID.SolarCrawltipedeHead); + revengeanceEnemyBuffList.Add(NPCID.CultistDragonHead); + revengeanceEnemyBuffList.Add(NPCID.Butcher); + revengeanceEnemyBuffList.Add(NPCID.Psycho); + revengeanceEnemyBuffList.Add(NPCID.DeadlySphere); + revengeanceEnemyBuffList.Add(NPCID.BigMimicCorruption); + revengeanceEnemyBuffList.Add(NPCID.BigMimicCrimson); + revengeanceEnemyBuffList.Add(NPCID.BigMimicHallow); + revengeanceEnemyBuffList.Add(NPCID.Mothron); + revengeanceEnemyBuffList.Add(NPCID.DuneSplicerHead); + revengeanceEnemyBuffList.Add(NPCID.SlimeSpiked); + revengeanceEnemyBuffList.Add(NPCID.SandShark); + revengeanceEnemyBuffList.Add(NPCID.SandsharkCorrupt); + revengeanceEnemyBuffList.Add(NPCID.SandsharkCrimson); + revengeanceEnemyBuffList.Add(NPCID.SandsharkHallow); + revengeanceEnemyBuffList.Add(NPCID.DD2Betsy); + + revengeanceProjectileBuffList = new List(); + + revengeanceProjectileBuffList.Add(ProjectileID.SandBallFalling); + revengeanceProjectileBuffList.Add(ProjectileID.AshBallFalling); + revengeanceProjectileBuffList.Add(ProjectileID.DemonSickle); + revengeanceProjectileBuffList.Add(ProjectileID.EbonsandBallFalling); + revengeanceProjectileBuffList.Add(ProjectileID.PearlSandBallFalling); + revengeanceProjectileBuffList.Add(ProjectileID.CursedFlameHostile); + revengeanceProjectileBuffList.Add(ProjectileID.EyeFire); + revengeanceProjectileBuffList.Add(ProjectileID.Boulder); + revengeanceProjectileBuffList.Add(ProjectileID.DeathLaser); + revengeanceProjectileBuffList.Add(ProjectileID.PoisonDartTrap); + revengeanceProjectileBuffList.Add(ProjectileID.SpikyBallTrap); + revengeanceProjectileBuffList.Add(ProjectileID.SpearTrap); + revengeanceProjectileBuffList.Add(ProjectileID.FlamethrowerTrap); + revengeanceProjectileBuffList.Add(ProjectileID.FlamesTrap); + revengeanceProjectileBuffList.Add(ProjectileID.CrimsandBallFalling); + revengeanceProjectileBuffList.Add(ProjectileID.Fireball); + revengeanceProjectileBuffList.Add(ProjectileID.EyeBeam); + revengeanceProjectileBuffList.Add(ProjectileID.PoisonSeedPlantera); + revengeanceProjectileBuffList.Add(ProjectileID.ThornBall); + revengeanceProjectileBuffList.Add(ProjectileID.PaladinsHammerHostile); + revengeanceProjectileBuffList.Add(ProjectileID.RocketSkeleton); + revengeanceProjectileBuffList.Add(ProjectileID.FlamingWood); + revengeanceProjectileBuffList.Add(ProjectileID.FlamingScythe); + revengeanceProjectileBuffList.Add(ProjectileID.FrostWave); + revengeanceProjectileBuffList.Add(ProjectileID.Present); + revengeanceProjectileBuffList.Add(ProjectileID.Spike); + revengeanceProjectileBuffList.Add(ProjectileID.SaucerDeathray); + revengeanceProjectileBuffList.Add(ProjectileID.PhantasmalEye); + revengeanceProjectileBuffList.Add(ProjectileID.PhantasmalSphere); + revengeanceProjectileBuffList.Add(ProjectileID.PhantasmalDeathray); + revengeanceProjectileBuffList.Add(ProjectileID.CultistBossIceMist); + revengeanceProjectileBuffList.Add(ProjectileID.CultistBossLightningOrbArc); + revengeanceProjectileBuffList.Add(ProjectileID.CultistBossFireBall); + revengeanceProjectileBuffList.Add(ProjectileID.NebulaBolt); + revengeanceProjectileBuffList.Add(ProjectileID.NebulaSphere); + revengeanceProjectileBuffList.Add(ProjectileID.NebulaLaser); + revengeanceProjectileBuffList.Add(ProjectileID.StardustSoldierLaser); + revengeanceProjectileBuffList.Add(ProjectileID.VortexLaser); + revengeanceProjectileBuffList.Add(ProjectileID.VortexVortexLightning); + revengeanceProjectileBuffList.Add(ProjectileID.VortexLightning); + revengeanceProjectileBuffList.Add(ProjectileID.VortexAcid); + revengeanceProjectileBuffList.Add(ProjectileID.GeyserTrap); + revengeanceProjectileBuffList.Add(ProjectileID.SandnadoHostile); + revengeanceProjectileBuffList.Add(ProjectileID.DD2BetsyFireball); + revengeanceProjectileBuffList.Add(ProjectileID.DD2BetsyFlameBreath); + + trapProjectileList = new List(); + + trapProjectileList.Add(ProjectileID.PoisonDartTrap); + trapProjectileList.Add(ProjectileID.SpikyBallTrap); + trapProjectileList.Add(ProjectileID.SpearTrap); + trapProjectileList.Add(ProjectileID.FlamethrowerTrap); + trapProjectileList.Add(ProjectileID.FlamesTrap); + trapProjectileList.Add(ProjectileID.PoisonDart); + trapProjectileList.Add(ProjectileID.GeyserTrap); + + lightGreenThrowingRarityList = new List(); + greenThrowingRarityList = new List(); + blueThrowingRarityList = new List(); + purpleThrowingRarityList = new List(); + + throwingProjectileList = new List(); + throwingItemList = new List(); + Mod calamity = ModLoader.GetMod("CalamityMod"); if (calamity != null) { @@ -917,6 +1376,7 @@ namespace CalamityMod rangedProjectileExceptionList.Add(calamity.ProjectileType("Drataliornus")); rangedProjectileExceptionList.Add(calamity.ProjectileType("FlakKrakenGun")); rangedProjectileExceptionList.Add(calamity.ProjectileType("Butcher")); + rangedProjectileExceptionList.Add(calamity.ProjectileType("StarfleetMK2")); beeEnemyList.Add(calamity.NPCType("PlaguebringerGoliath")); beeEnemyList.Add(calamity.NPCType("PlaguebringerShade")); @@ -1072,6 +1532,239 @@ namespace CalamityMod alcoholList.Add(calamity.BuffType("Vodka")); alcoholList.Add(calamity.BuffType("Whiskey")); alcoholList.Add(calamity.BuffType("WhiteWine")); + + lightGreenThrowingRarityList.Add(calamity.ItemType("TarragonThrowingDart")); + lightGreenThrowingRarityList.Add(calamity.ItemType("MoltenAmputator")); + lightGreenThrowingRarityList.Add(calamity.ItemType("AccretionDisk")); + + greenThrowingRarityList.Add(calamity.ItemType("CosmicKunai")); + greenThrowingRarityList.Add(calamity.ItemType("Eradicator")); + greenThrowingRarityList.Add(calamity.ItemType("Valediction")); + greenThrowingRarityList.Add(calamity.ItemType("GhoulishGouger")); + + blueThrowingRarityList.Add(calamity.ItemType("EmpyreanKnivesThrown")); + blueThrowingRarityList.Add(calamity.ItemType("ExecutionersBlade")); + blueThrowingRarityList.Add(calamity.ItemType("ProfanedTrident")); + blueThrowingRarityList.Add(calamity.ItemType("ScourgeoftheCosmosThrown")); + + purpleThrowingRarityList.Add(calamity.ItemType("RoyalKnives")); + purpleThrowingRarityList.Add(calamity.ItemType("TriactisTruePaladinianMageHammerofMight")); + + throwingProjectileList.Add(calamity.ProjectileType("XerocPitchforkProjectile")); + throwingProjectileList.Add(calamity.ProjectileType("WulfrumKnife")); + throwingProjectileList.Add(calamity.ProjectileType("Valediction")); + throwingProjectileList.Add(calamity.ProjectileType("UrchinStinger")); + throwingProjectileList.Add(calamity.ProjectileType("OPHammer")); + throwingProjectileList.Add(calamity.ProjectileType("TriactisOPHammer")); + throwingProjectileList.Add(calamity.ProjectileType("ToothBallProjectile")); + throwingProjectileList.Add(calamity.ProjectileType("TitaniumShurikenProjectile")); + throwingProjectileList.Add(calamity.ProjectileType("TarragonThrowingDartProjectile")); + throwingProjectileList.Add(calamity.ProjectileType("FossilShardThrown")); + throwingProjectileList.Add(calamity.ProjectileType("SpearofPaleolith")); + throwingProjectileList.Add(calamity.ProjectileType("SeashellBoomerangProjectile")); + throwingProjectileList.Add(calamity.ProjectileType("ScourgeoftheDesert")); + throwingProjectileList.Add(calamity.ProjectileType("ScourgeoftheCosmosMini")); + throwingProjectileList.Add(calamity.ProjectileType("ScourgeoftheCosmos")); + throwingProjectileList.Add(calamity.ProjectileType("RoyalKnife")); + throwingProjectileList.Add(calamity.ProjectileType("RotBallProjectile")); + throwingProjectileList.Add(calamity.ProjectileType("Pwnagehammer")); + throwingProjectileList.Add(calamity.ProjectileType("ProfanedTrident")); + throwingProjectileList.Add(calamity.ProjectileType("PalladiumJavelinProjectile")); + throwingProjectileList.Add(calamity.ProjectileType("OrichalcumSpikedGemstoneProjectile")); + throwingProjectileList.Add(calamity.ProjectileType("MythrilKnifeProjectile")); + throwingProjectileList.Add(calamity.ProjectileType("Mycoroot")); + throwingProjectileList.Add(calamity.ProjectileType("MoltenBlobThrown")); + throwingProjectileList.Add(calamity.ProjectileType("MoltenAmputator")); + throwingProjectileList.Add(calamity.ProjectileType("MangroveChakramProjectile")); + throwingProjectileList.Add(calamity.ProjectileType("MalachiteBolt")); + throwingProjectileList.Add(calamity.ProjectileType("Malachite")); + throwingProjectileList.Add(calamity.ProjectileType("Lionfish")); + throwingProjectileList.Add(calamity.ProjectileType("IchorSpear")); + throwingProjectileList.Add(calamity.ProjectileType("IceStarProjectile")); + throwingProjectileList.Add(calamity.ProjectileType("GhoulishGouger")); + throwingProjectileList.Add(calamity.ProjectileType("GelDartProjectile")); + throwingProjectileList.Add(calamity.ProjectileType("FlameScytheProjectile")); + throwingProjectileList.Add(calamity.ProjectileType("FeatherKnifeProjectile")); + throwingProjectileList.Add(calamity.ProjectileType("ExecutionersBlade")); + throwingProjectileList.Add(calamity.ProjectileType("EmpyreanKnives")); + throwingProjectileList.Add(calamity.ProjectileType("EradicatorProjectile")); + throwingProjectileList.Add(calamity.ProjectileType("DuststormCloud")); + throwingProjectileList.Add(calamity.ProjectileType("DuststormInABottle")); + throwingProjectileList.Add(calamity.ProjectileType("CursedDagger")); + throwingProjectileList.Add(calamity.ProjectileType("CrystalPiercerProjectile")); + throwingProjectileList.Add(calamity.ProjectileType("Crystalline2")); + throwingProjectileList.Add(calamity.ProjectileType("Crystalline")); + throwingProjectileList.Add(calamity.ProjectileType("Crushax")); + throwingProjectileList.Add(calamity.ProjectileType("CosmicKunai")); + throwingProjectileList.Add(calamity.ProjectileType("CobaltKunaiProjectile")); + throwingProjectileList.Add(calamity.ProjectileType("Celestus2")); + throwingProjectileList.Add(calamity.ProjectileType("Celestus")); + throwingProjectileList.Add(calamity.ProjectileType("Brimblade2")); + throwingProjectileList.Add(calamity.ProjectileType("Brimblade")); + throwingProjectileList.Add(calamity.ProjectileType("BrackishWaterBlast")); + throwingProjectileList.Add(calamity.ProjectileType("BrackishWater")); + throwingProjectileList.Add(calamity.ProjectileType("BrackishFlask")); + throwingProjectileList.Add(calamity.ProjectileType("BallisticPoisonBombSpike")); + throwingProjectileList.Add(calamity.ProjectileType("BallisticPoisonBomb")); + throwingProjectileList.Add(calamity.ProjectileType("AccretionDisk2")); + throwingProjectileList.Add(calamity.ProjectileType("AccretionDisk")); + throwingProjectileList.Add(calamity.ProjectileType("AdamantiteThrowingAxeProjectile")); + throwingProjectileList.Add(calamity.ProjectileType("FrostyFlare")); + throwingProjectileList.Add(calamity.ProjectileType("FrostShardFriendly")); + + throwingItemList.Add(calamity.ItemType("AccretionDisk")); + throwingItemList.Add(calamity.ItemType("AdamantiteThrowingAxe")); + throwingItemList.Add(calamity.ItemType("BallisticPoisonBomb")); + throwingItemList.Add(calamity.ItemType("BrackishFlask")); + throwingItemList.Add(calamity.ItemType("Brimblade")); + throwingItemList.Add(calamity.ItemType("Celestus")); + throwingItemList.Add(calamity.ItemType("CobaltKunai")); + throwingItemList.Add(calamity.ItemType("CosmicKunai")); + throwingItemList.Add(calamity.ItemType("CrushsawCrasher")); + throwingItemList.Add(calamity.ItemType("Crystalline")); + throwingItemList.Add(calamity.ItemType("CrystalPiercer")); + throwingItemList.Add(calamity.ItemType("CursedDagger")); + throwingItemList.Add(calamity.ItemType("DuststormInABottle")); + throwingItemList.Add(calamity.ItemType("EmpyreanKnivesThrown")); + throwingItemList.Add(calamity.ItemType("Eradicator")); + throwingItemList.Add(calamity.ItemType("ExecutionersBlade")); + throwingItemList.Add(calamity.ItemType("FeatherKnife")); + throwingItemList.Add(calamity.ItemType("FlameScythe")); + throwingItemList.Add(calamity.ItemType("GelDart")); + throwingItemList.Add(calamity.ItemType("GhoulishGouger")); + throwingItemList.Add(calamity.ItemType("IceStar")); + throwingItemList.Add(calamity.ItemType("IchorSpear")); + throwingItemList.Add(calamity.ItemType("Lionfish")); + throwingItemList.Add(calamity.ItemType("Malachite")); + throwingItemList.Add(calamity.ItemType("MangroveChakram")); + throwingItemList.Add(calamity.ItemType("MoltenAmputator")); + throwingItemList.Add(calamity.ItemType("Mycoroot")); + throwingItemList.Add(calamity.ItemType("MythrilKnife")); + throwingItemList.Add(calamity.ItemType("OrichalcumSpikedGemstone")); + throwingItemList.Add(calamity.ItemType("PalladiumJavelin")); + throwingItemList.Add(calamity.ItemType("ProfanedTrident")); + throwingItemList.Add(calamity.ItemType("PwnageHammer")); + throwingItemList.Add(calamity.ItemType("RotBall")); + throwingItemList.Add(calamity.ItemType("RoyalKnives")); + throwingItemList.Add(calamity.ItemType("ScourgeoftheCosmosThrown")); + throwingItemList.Add(calamity.ItemType("ScourgeoftheDesert")); + throwingItemList.Add(calamity.ItemType("SeashellBoomerang")); + throwingItemList.Add(calamity.ItemType("SpearofPaleolith")); + throwingItemList.Add(calamity.ItemType("TarragonThrowingDart")); + throwingItemList.Add(calamity.ItemType("TitaniumShuriken")); + throwingItemList.Add(calamity.ItemType("ToothBall")); + throwingItemList.Add(calamity.ItemType("TriactisTruePaladinianMageHammerofMight")); + throwingItemList.Add(calamity.ItemType("TruePaladinsHammer")); + throwingItemList.Add(calamity.ItemType("UrchinStinger")); + throwingItemList.Add(calamity.ItemType("Valediction")); + throwingItemList.Add(calamity.ItemType("WulfrumKnife")); + throwingItemList.Add(calamity.ItemType("XerocPitchfork")); + throwingItemList.Add(calamity.ItemType("FrostyFlare")); + + revengeanceEnemyBuffList.Add(calamity.NPCType("Astrageldon")); + revengeanceEnemyBuffList.Add(calamity.NPCType("AstrumDeusHead")); + revengeanceEnemyBuffList.Add(calamity.NPCType("AstrumDeusHeadSpectral")); + revengeanceEnemyBuffList.Add(calamity.NPCType("Bumblefuck")); + revengeanceEnemyBuffList.Add(calamity.NPCType("CalamitasRun3")); + revengeanceEnemyBuffList.Add(calamity.NPCType("CosmicWraith")); + revengeanceEnemyBuffList.Add(calamity.NPCType("CrabulonIdle")); + revengeanceEnemyBuffList.Add(calamity.NPCType("Cryogen")); + revengeanceEnemyBuffList.Add(calamity.NPCType("DesertScourgeHead")); + revengeanceEnemyBuffList.Add(calamity.NPCType("GreatSandShark")); + revengeanceEnemyBuffList.Add(calamity.NPCType("HiveMindP2")); + revengeanceEnemyBuffList.Add(calamity.NPCType("DankCreeper")); + revengeanceEnemyBuffList.Add(calamity.NPCType("AquaticAberration")); + revengeanceEnemyBuffList.Add(calamity.NPCType("Leviathan")); + revengeanceEnemyBuffList.Add(calamity.NPCType("Siren")); + revengeanceEnemyBuffList.Add(calamity.NPCType("PerforatorHeadLarge")); + revengeanceEnemyBuffList.Add(calamity.NPCType("PerforatorHeadMedium")); + revengeanceEnemyBuffList.Add(calamity.NPCType("PerforatorHeadSmall")); + revengeanceEnemyBuffList.Add(calamity.NPCType("PlaguebringerGoliath")); + revengeanceEnemyBuffList.Add(calamity.NPCType("PlagueHomingMissile")); + revengeanceEnemyBuffList.Add(calamity.NPCType("PlagueMine")); + revengeanceEnemyBuffList.Add(calamity.NPCType("Polterghast")); + revengeanceEnemyBuffList.Add(calamity.NPCType("PolterghastHook")); + revengeanceEnemyBuffList.Add(calamity.NPCType("PolterPhantom")); + revengeanceEnemyBuffList.Add(calamity.NPCType("ProfanedGuardianBoss")); + revengeanceEnemyBuffList.Add(calamity.NPCType("RockPillar")); + revengeanceEnemyBuffList.Add(calamity.NPCType("ScavengerBody")); + revengeanceEnemyBuffList.Add(calamity.NPCType("ScavengerClawRight")); + revengeanceEnemyBuffList.Add(calamity.NPCType("ScavengerClawLeft")); + revengeanceEnemyBuffList.Add(calamity.NPCType("ProfanedGuardianBoss2")); + revengeanceEnemyBuffList.Add(calamity.NPCType("ProvSpawnDefense")); + revengeanceEnemyBuffList.Add(calamity.NPCType("ProvSpawnOffense")); + revengeanceEnemyBuffList.Add(calamity.NPCType("SlimeGod")); + revengeanceEnemyBuffList.Add(calamity.NPCType("SlimeGodRun")); + revengeanceEnemyBuffList.Add(calamity.NPCType("SlimeGodCore")); + revengeanceEnemyBuffList.Add(calamity.NPCType("SlimeGodSplit")); + revengeanceEnemyBuffList.Add(calamity.NPCType("SlimeGodRunSplit")); + revengeanceEnemyBuffList.Add(calamity.NPCType("StormWeaverHead")); + revengeanceEnemyBuffList.Add(calamity.NPCType("StormWeaverHeadNaked")); + revengeanceEnemyBuffList.Add(calamity.NPCType("SupremeCalamitas")); + revengeanceEnemyBuffList.Add(calamity.NPCType("DevourerofGodsHead")); + revengeanceEnemyBuffList.Add(calamity.NPCType("DevourerofGodsHead2")); + revengeanceEnemyBuffList.Add(calamity.NPCType("DevourerofGodsHeadS")); + revengeanceEnemyBuffList.Add(calamity.NPCType("Yharon")); + revengeanceEnemyBuffList.Add(calamity.NPCType("AquaticScourgeHead")); + revengeanceEnemyBuffList.Add(calamity.NPCType("BobbitWormHead")); + revengeanceEnemyBuffList.Add(calamity.NPCType("AquaticSeekerHead")); + revengeanceEnemyBuffList.Add(calamity.NPCType("ColossalSquid")); + revengeanceEnemyBuffList.Add(calamity.NPCType("EidolonWyrmHead")); + revengeanceEnemyBuffList.Add(calamity.NPCType("EidolonWyrmHeadHuge")); + revengeanceEnemyBuffList.Add(calamity.NPCType("GulperEelHead")); + revengeanceEnemyBuffList.Add(calamity.NPCType("Mauler")); + revengeanceEnemyBuffList.Add(calamity.NPCType("Reaper")); + revengeanceEnemyBuffList.Add(calamity.NPCType("Atlas")); + revengeanceEnemyBuffList.Add(calamity.NPCType("ArmoredDiggerHead")); + revengeanceEnemyBuffList.Add(calamity.NPCType("Cnidrion")); + revengeanceEnemyBuffList.Add(calamity.NPCType("Horse")); + revengeanceEnemyBuffList.Add(calamity.NPCType("ScornEater")); + + revengeanceProjectileBuffList.Add(calamity.ProjectileType("AbyssMine")); + revengeanceProjectileBuffList.Add(calamity.ProjectileType("AbyssMine2")); + revengeanceProjectileBuffList.Add(calamity.ProjectileType("AstralFlame")); + revengeanceProjectileBuffList.Add(calamity.ProjectileType("BloodGeyser")); + revengeanceProjectileBuffList.Add(calamity.ProjectileType("BrimstoneBarrage")); + revengeanceProjectileBuffList.Add(calamity.ProjectileType("BrimstoneFireblast")); + revengeanceProjectileBuffList.Add(calamity.ProjectileType("BrimstoneGigaBlast")); + revengeanceProjectileBuffList.Add(calamity.ProjectileType("BrimstoneHellblast")); + revengeanceProjectileBuffList.Add(calamity.ProjectileType("BrimstoneHellblast2")); + revengeanceProjectileBuffList.Add(calamity.ProjectileType("BrimstoneHellfireball")); + revengeanceProjectileBuffList.Add(calamity.ProjectileType("BrimstoneLaser")); + revengeanceProjectileBuffList.Add(calamity.ProjectileType("BrimstoneLaserSplit")); + revengeanceProjectileBuffList.Add(calamity.ProjectileType("BrimstoneMonster")); + revengeanceProjectileBuffList.Add(calamity.ProjectileType("BrimstoneWave")); + revengeanceProjectileBuffList.Add(calamity.ProjectileType("DarkEnergyBall")); + revengeanceProjectileBuffList.Add(calamity.ProjectileType("DeusMine")); + revengeanceProjectileBuffList.Add(calamity.ProjectileType("DoGDeath")); + revengeanceProjectileBuffList.Add(calamity.ProjectileType("DoGFire")); + revengeanceProjectileBuffList.Add(calamity.ProjectileType("CosmicFlameBurst")); + revengeanceProjectileBuffList.Add(calamity.ProjectileType("FlareBomb")); + revengeanceProjectileBuffList.Add(calamity.ProjectileType("Flarenado")); + revengeanceProjectileBuffList.Add(calamity.ProjectileType("HiveBombGoliath")); + revengeanceProjectileBuffList.Add(calamity.ProjectileType("HolyBlast")); + revengeanceProjectileBuffList.Add(calamity.ProjectileType("HolyBomb")); + revengeanceProjectileBuffList.Add(calamity.ProjectileType("HolyShot")); + revengeanceProjectileBuffList.Add(calamity.ProjectileType("HolySpear")); + revengeanceProjectileBuffList.Add(calamity.ProjectileType("IceBomb")); + revengeanceProjectileBuffList.Add(calamity.ProjectileType("IchorShot")); + revengeanceProjectileBuffList.Add(calamity.ProjectileType("Infernado")); + revengeanceProjectileBuffList.Add(calamity.ProjectileType("LeviathanBomb")); + revengeanceProjectileBuffList.Add(calamity.ProjectileType("MoltenBlast")); + revengeanceProjectileBuffList.Add(calamity.ProjectileType("Mushmash")); + revengeanceProjectileBuffList.Add(calamity.ProjectileType("PhantomMine")); + revengeanceProjectileBuffList.Add(calamity.ProjectileType("PhantomBlast")); + revengeanceProjectileBuffList.Add(calamity.ProjectileType("PhantomBlast2")); + revengeanceProjectileBuffList.Add(calamity.ProjectileType("ProfanedSpear")); + revengeanceProjectileBuffList.Add(calamity.ProjectileType("ProvidenceCrystalShard")); + revengeanceProjectileBuffList.Add(calamity.ProjectileType("ProvidenceHolyRay")); + revengeanceProjectileBuffList.Add(calamity.ProjectileType("RedLightningFeather")); + revengeanceProjectileBuffList.Add(calamity.ProjectileType("SandPoisonCloud")); + revengeanceProjectileBuffList.Add(calamity.ProjectileType("ScavengerNuke")); + revengeanceProjectileBuffList.Add(calamity.ProjectileType("SirenSong")); + revengeanceProjectileBuffList.Add(calamity.ProjectileType("YharonFireball")); + revengeanceProjectileBuffList.Add(calamity.ProjectileType("YharonFireball2")); + revengeanceProjectileBuffList.Add(calamity.ProjectileType("YharonFireballHoming")); } } #endregion @@ -1090,29 +1783,29 @@ namespace CalamityMod } if (Main.LocalPlayer.GetModPlayer(this).ZoneCalamity) { - if (!CalamityGlobalNPC.AnyBossNPCS()) { music = mod.GetSoundSlot(SoundType.Music, "Sounds/Music/Crag"); priority = MusicPriority.Environment; } + if (!CalamityPlayer.areThereAnyDamnBosses) { music = mod.GetSoundSlot(SoundType.Music, "Sounds/Music/Crag"); priority = MusicPriority.Environment; } } if (Main.LocalPlayer.GetModPlayer(this).ZoneAstral) { - if (!CalamityGlobalNPC.AnyBossNPCS()) { music = mod.GetSoundSlot(SoundType.Music, "Sounds/Music/Astral"); priority = MusicPriority.Environment; } + if (!CalamityPlayer.areThereAnyDamnBosses) { music = mod.GetSoundSlot(SoundType.Music, "Sounds/Music/Astral"); priority = MusicPriority.Environment; } } if (Main.LocalPlayer.GetModPlayer(this).ZoneAbyssLayer1 || Main.LocalPlayer.GetModPlayer(this).ZoneAbyssLayer2) { - if (!CalamityGlobalNPC.AnyBossNPCS()) { music = mod.GetSoundSlot(SoundType.Music, "Sounds/Music/TheAbyss"); priority = MusicPriority.BiomeHigh; } + if (!CalamityPlayer.areThereAnyDamnBosses) { music = mod.GetSoundSlot(SoundType.Music, "Sounds/Music/TheAbyss"); priority = MusicPriority.BiomeHigh; } } if (Main.LocalPlayer.GetModPlayer(this).ZoneAbyssLayer3) { - if (!CalamityGlobalNPC.AnyBossNPCS()) { music = mod.GetSoundSlot(SoundType.Music, "Sounds/Music/TheDeepAbyss"); priority = MusicPriority.BiomeHigh; } + if (!CalamityPlayer.areThereAnyDamnBosses) { music = mod.GetSoundSlot(SoundType.Music, "Sounds/Music/TheDeepAbyss"); priority = MusicPriority.BiomeHigh; } } if (Main.LocalPlayer.GetModPlayer(this).ZoneAbyssLayer4) { - if (!CalamityGlobalNPC.AnyBossNPCS()) { music = mod.GetSoundSlot(SoundType.Music, "Sounds/Music/TheVoid"); priority = MusicPriority.BiomeHigh; } + if (!CalamityPlayer.areThereAnyDamnBosses) { music = mod.GetSoundSlot(SoundType.Music, "Sounds/Music/TheVoid"); priority = MusicPriority.BiomeHigh; } } if (Main.LocalPlayer.GetModPlayer(this).ZoneSulphur) { - if (!CalamityGlobalNPC.AnyBossNPCS()) { music = mod.GetSoundSlot(SoundType.Music, "Sounds/Music/Sulphur"); priority = MusicPriority.BiomeHigh; } + if (!CalamityPlayer.areThereAnyDamnBosses) { music = mod.GetSoundSlot(SoundType.Music, "Sounds/Music/Sulphur"); priority = MusicPriority.BiomeHigh; } } - if (CalamityGlobalNPC.DoGSecondStageCountdown <= 540 && CalamityGlobalNPC.DoGSecondStageCountdown > 60) //8 seconds before DoG spawns + if (CalamityWorld.DoGSecondStageCountdown <= 540 && CalamityWorld.DoGSecondStageCountdown > 60) //8 seconds before DoG spawns { music = mod.GetSoundSlot(SoundType.Music, "Sounds/Music/UniversalCollapse"); priority = MusicPriority.BossMedium; } @@ -1140,7 +1833,7 @@ namespace CalamityMod bossChecklist.Call("AddBossWithInfo", "Aquatic Scourge", 8.5f, (Func)(() => CalamityWorld.downedAquaticScourge), "Use a [i:" + mod.ItemType("Seafood") + "] in the Sulphuric Sea or wait for it to spawn in the Sulphuric Sea"); //6 bossChecklist.Call("AddBossWithInfo", "Calamitas", 9.7f, (Func)(() => CalamityWorld.downedCalamitas), "Use an [i:" + mod.ItemType("BlightedEyeball") + "] at Night"); //7 bossChecklist.Call("AddBossWithInfo", "Leviathan", 10.5f, (Func)(() => CalamityWorld.downedLeviathan), "By killing an unknown entity in the Ocean Biome"); //8 - bossChecklist.Call("AddBossWithInfo", "Astrageldon Slime", 10.55f, (Func)(() => CalamityWorld.downedAstrageldon), "Use an [i:" + mod.ItemType("AstralChunk") + "] at Night"); //8.25 + bossChecklist.Call("AddBossWithInfo", "Astrum Aureus", 10.55f, (Func)(() => CalamityWorld.downedAstrageldon), "Use an [i:" + mod.ItemType("AstralChunk") + "] at Night"); //8.25 bossChecklist.Call("AddBossWithInfo", "Astrum Deus", 10.6f, (Func)(() => CalamityWorld.downedStarGod), "Use a [i:" + mod.ItemType("Starcore") + "] at Night"); //8.5 bossChecklist.Call("AddBossWithInfo", "Plaguebringer Goliath", 11.5f, (Func)(() => CalamityWorld.downedPlaguebringer), "Use an [i:" + mod.ItemType("Abomination") + "] in the Jungle Biome"); //9 bossChecklist.Call("AddBossWithInfo", "Ravager", 12.5f, (Func)(() => CalamityWorld.downedScavenger), "Use an [i:" + mod.ItemType("AncientMedallion") + "]"); //9.5 @@ -1649,6 +2342,7 @@ namespace CalamityMod 1586, 1797, 1830, + 1866, 1871, 2280, 2494, @@ -1663,6 +2357,8 @@ namespace CalamityMod 3588, 3592, 3883, + 3924, + 3928, ItemType("SkylineWings"), ItemType("StarlightWings"), ItemType("AureateWings"), @@ -1689,19 +2385,31 @@ namespace CalamityMod recipe.AddIngredient(ItemID.IceBlock, 20); recipe.AddIngredient(ItemID.Leather, 5); recipe.AddIngredient(ItemID.IronBar, 5); - recipe.AddTile(TileID.IceMachine); + recipe.anyIronBar = true; + recipe.AddTile(TileID.IceMachine); recipe.SetResult(ItemID.IceSkates); recipe.AddRecipe(); - recipe = new ModRecipe(this); - recipe.AddIngredient(ItemID.IceBlock, 20); - recipe.AddIngredient(ItemID.Leather, 5); - recipe.AddIngredient(ItemID.LeadBar, 5); - recipe.AddTile(TileID.IceMachine); - recipe.SetResult(ItemID.IceSkates); - recipe.AddRecipe(); + recipe = new ModRecipe(this); + recipe.AddIngredient(ItemID.IceBlock, 20); + recipe.AddIngredient(ItemID.Glass, 10); + recipe.AddIngredient(ItemID.FallenStar, 10); + recipe.AddIngredient(ItemID.IronBar, 5); + recipe.anyIronBar = true; + recipe.AddTile(TileID.Anvils); + recipe.SetResult(ItemID.IceMirror); + recipe.AddRecipe(); - recipe = new ModRecipe(this); + recipe = new ModRecipe(this); + recipe.AddIngredient(ItemID.IronBar, 10); + recipe.AddIngredient(ItemID.Glass, 10); + recipe.AddIngredient(ItemID.FallenStar, 10); + recipe.anyIronBar = true; + recipe.AddTile(TileID.Anvils); + recipe.SetResult(ItemID.MagicMirror); + recipe.AddRecipe(); + + recipe = new ModRecipe(this); recipe.AddIngredient(ItemID.Lens); recipe.AddIngredient(ItemID.BlackDye); recipe.AddTile(TileID.DyeVat); @@ -1718,15 +2426,8 @@ namespace CalamityMod recipe.AddIngredient(ItemID.IceBlock, 25); recipe.AddIngredient(ItemID.SnowBlock, 15); recipe.AddIngredient(ItemID.IronBar, 3); - recipe.AddTile(TileID.Anvils); - recipe.SetResult(ItemID.IceMachine); - recipe.AddRecipe(); - - recipe = new ModRecipe(this); - recipe.AddIngredient(ItemID.IceBlock, 25); - recipe.AddIngredient(ItemID.SnowBlock, 15); - recipe.AddIngredient(ItemID.LeadBar, 3); - recipe.AddTile(TileID.Anvils); + recipe.anyIronBar = true; + recipe.AddTile(TileID.Anvils); recipe.SetResult(ItemID.IceMachine); recipe.AddRecipe(); @@ -1790,19 +2491,20 @@ namespace CalamityMod recipe.AddIngredient(ItemID.LavaBucket, 5); recipe.AddIngredient(ItemID.Obsidian, 25); recipe.AddIngredient(ItemID.IronBar, 5); - recipe.AddTile(TileID.Anvils); + recipe.anyIronBar = true; + recipe.AddTile(TileID.Anvils); recipe.SetResult(ItemID.LavaCharm); recipe.AddRecipe(); - recipe = new ModRecipe(this); - recipe.AddIngredient(ItemID.LavaBucket, 5); - recipe.AddIngredient(ItemID.Obsidian, 25); - recipe.AddIngredient(ItemID.LeadBar, 5); - recipe.AddTile(TileID.Anvils); - recipe.SetResult(ItemID.LavaCharm); - recipe.AddRecipe(); + recipe = new ModRecipe(this); + recipe.AddIngredient(ItemID.GoldenKey); + recipe.AddIngredient(ItemID.Obsidian, 20); + recipe.AddIngredient(ItemID.Bone, 5); + recipe.AddTile(TileID.Anvils); + recipe.SetResult(ItemID.ShadowKey); + recipe.AddRecipe(); - recipe = new ModRecipe(this); + recipe = new ModRecipe(this); recipe.AddIngredient(null, "CryoBar", 6); recipe.AddIngredient(ItemID.FrostCore); recipe.AddTile(TileID.IceMachine); @@ -2187,13 +2889,8 @@ namespace CalamityMod recipe = new ModRecipe(this); recipe.AddIngredient(ItemID.IronBar, 5); - recipe.AddTile(TileID.Anvils); - recipe.SetResult(ItemID.Aglet); - recipe.AddRecipe(); - - recipe = new ModRecipe(this); - recipe.AddIngredient(ItemID.LeadBar, 5); - recipe.AddTile(TileID.Anvils); + recipe.anyIronBar = true; + recipe.AddTile(TileID.Anvils); recipe.SetResult(ItemID.Aglet); recipe.AddRecipe(); @@ -2337,12 +3034,7 @@ namespace CalamityMod recipe = new ModRecipe(this); //radar recipe.AddIngredient(ItemID.IronBar, 5); - recipe.AddTile(TileID.Anvils); - recipe.SetResult(ItemID.Radar); - recipe.AddRecipe(); - - recipe = new ModRecipe(this); - recipe.AddIngredient(ItemID.LeadBar, 5); + recipe.anyIronBar = true; recipe.AddTile(TileID.Anvils); recipe.SetResult(ItemID.Radar); recipe.AddRecipe(); @@ -2366,24 +3058,14 @@ namespace CalamityMod recipe = new ModRecipe(this); recipe.AddIngredient(ItemID.IronBar); - recipe.AddTile(TileID.Anvils); - recipe.SetResult(ItemID.ThrowingKnife, 50); - recipe.AddRecipe(); - - recipe = new ModRecipe(this); - recipe.AddIngredient(ItemID.LeadBar); + recipe.anyIronBar = true; recipe.AddTile(TileID.Anvils); recipe.SetResult(ItemID.ThrowingKnife, 50); recipe.AddRecipe(); recipe = new ModRecipe(this); recipe.AddIngredient(ItemID.IronBar); - recipe.AddTile(TileID.Anvils); - recipe.SetResult(ItemID.Shuriken, 50); - recipe.AddRecipe(); - - recipe = new ModRecipe(this); - recipe.AddIngredient(ItemID.LeadBar); + recipe.anyIronBar = true; recipe.AddTile(TileID.Anvils); recipe.SetResult(ItemID.Shuriken, 50); recipe.AddRecipe(); @@ -2409,6 +3091,15 @@ namespace CalamityMod recipe.AddTile(TileID.MythrilAnvil); recipe.SetResult(ItemID.TempleKey); recipe.AddRecipe(); + + recipe = new ModRecipe(this); + recipe.AddIngredient(null, "RogueEmblem"); + recipe.AddIngredient(ItemID.SoulofMight, 5); + recipe.AddIngredient(ItemID.SoulofSight, 5); + recipe.AddIngredient(ItemID.SoulofFright, 5); + recipe.AddTile(TileID.TinkerersWorkbench); + recipe.SetResult(ItemID.AvengerEmblem); + recipe.AddRecipe(); } #endregion @@ -2418,6 +3109,36 @@ namespace CalamityMod CalamityModMessageType msgType = (CalamityModMessageType)reader.ReadByte(); switch (msgType) { + case CalamityModMessageType.MeleeLevelSync: + Main.player[reader.ReadInt32()].GetModPlayer().HandleLevels(reader, 0); + break; + case CalamityModMessageType.RangedLevelSync: + Main.player[reader.ReadInt32()].GetModPlayer().HandleLevels(reader, 1); + break; + case CalamityModMessageType.MagicLevelSync: + Main.player[reader.ReadInt32()].GetModPlayer().HandleLevels(reader, 2); + break; + case CalamityModMessageType.SummonLevelSync: + Main.player[reader.ReadInt32()].GetModPlayer().HandleLevels(reader, 3); + break; + case CalamityModMessageType.RogueLevelSync: + Main.player[reader.ReadInt32()].GetModPlayer().HandleLevels(reader, 4); + break; + case CalamityModMessageType.ExactMeleeLevelSync: + Main.player[reader.ReadInt32()].GetModPlayer().HandleExactLevels(reader, 0); + break; + case CalamityModMessageType.ExactRangedLevelSync: + Main.player[reader.ReadInt32()].GetModPlayer().HandleExactLevels(reader, 1); + break; + case CalamityModMessageType.ExactMagicLevelSync: + Main.player[reader.ReadInt32()].GetModPlayer().HandleExactLevels(reader, 2); + break; + case CalamityModMessageType.ExactSummonLevelSync: + Main.player[reader.ReadInt32()].GetModPlayer().HandleExactLevels(reader, 3); + break; + case CalamityModMessageType.ExactRogueLevelSync: + Main.player[reader.ReadInt32()].GetModPlayer().HandleExactLevels(reader, 4); + break; case CalamityModMessageType.StressSync: Main.player[reader.ReadInt32()].GetModPlayer().HandleStress(reader); break; @@ -2443,7 +3164,7 @@ namespace CalamityMod break; case CalamityModMessageType.BossRushStage: int stage = reader.ReadInt32(); - CalamityPlayer.bossRushStage = stage; + CalamityWorld.bossRushStage = stage; break; case CalamityModMessageType.AdrenalineSync: Main.player[reader.ReadInt32()].GetModPlayer().HandleAdrenaline(reader); @@ -2455,6 +3176,10 @@ namespace CalamityMod int SCalAlive = reader.ReadInt32(); CalamityGlobalNPC.SCal = SCalAlive; break; + case CalamityModMessageType.DoGCountdownSync: + int countdown = reader.ReadInt32(); + CalamityWorld.DoGSecondStageCountdown = countdown; + break; default: ErrorLogger.Log("CalamityMod: Unknown Message type: " + msgType); break; @@ -2470,7 +3195,17 @@ namespace CalamityMod enum CalamityModMessageType : byte { - StressSync, + MeleeLevelSync, + RangedLevelSync, + MagicLevelSync, + SummonLevelSync, + RogueLevelSync, + ExactMeleeLevelSync, + ExactRangedLevelSync, + ExactMagicLevelSync, + ExactSummonLevelSync, + ExactRogueLevelSync, + StressSync, Ravager, DoG, Polterghast, @@ -2479,6 +3214,7 @@ namespace CalamityMod AdrenalineSync, TeleportPlayer, BossRushStage, - SupremeCal + SupremeCal, + DoGCountdownSync } } \ No newline at end of file diff --git a/CalamityPlayer.cs b/CalamityPlayer.cs index 7457a4abe1..8cf3bf91e1 100644 --- a/CalamityPlayer.cs +++ b/CalamityPlayer.cs @@ -22,6 +22,7 @@ using CalamityMod.NPCs.Yharon; using CalamityMod.NPCs.Leviathan; using CalamityMod.Items.Armor; using CalamityMod.UI; +using CalamityMod.Items.CalamityCustomThrowingDamage; using Terraria.ModLoader.IO; namespace CalamityMod @@ -31,9 +32,41 @@ namespace CalamityMod #region InstanceVars #region NormalVars - public int soulEssence = 0; + public int meleeLevel = 0; - public static int bossRushStage = 0; + public int rangedLevel = 0; + + public int magicLevel = 0; + + public int rogueLevel = 0; + + public int summonLevel = 0; + + public int gainLevelCooldown = 120; //120 frames before gaining another stat point, avoiding i-frame nonsense + + public bool shootFireworksLevelUpMelee = true; + + public bool shootFireworksLevelUpRanged = true; + + public bool shootFireworksLevelUpMagic = true; + + public bool shootFireworksLevelUpSummon = true; + + public bool shootFireworksLevelUpRogue = true; + + public int exactMeleeLevel = 0; + + public int exactRangedLevel = 0; + + public int exactMagicLevel = 0; + + public int exactSummonLevel = 0; + + public int exactRogueLevel = 0; + + public int alcoholPoisonLevel = 0; + + public static bool areThereAnyDamnBosses = false; private const int saveVersion = 0; @@ -55,16 +88,6 @@ namespace CalamityMod public int bloodflareManaTimer = 180; - public const int hitLimitNormal = 25; - - public const int hitLimitExpert = 20; - - public const int hitLimitRev = 15; - - public const int hitLimitDeath = 10; - - public const int hitLimitArmageddon = 1; - public float modStealth = 1f; public float aquaticBoost = 1f; @@ -77,21 +100,15 @@ namespace CalamityMod public const float defEndurance = 0.33f; - public const int defLifeRegen = 18; + public bool playFullRageSound = true; - public const int defLifeRegenTime = 1800; - - public const float defDamage = 1.85f; - - public const int defCrit = 75; + public bool playFullAdrenalineSound = true; public bool fab = false; public bool drawBossHPBar = true; public bool shouldDrawSmallText = true; - - public bool deactivateStupidFuckingBullshit = false; #endregion #region PetStuff @@ -104,6 +121,8 @@ namespace CalamityMod public bool chibii = false; public bool brimling = false; + + public bool bearPet = false; #endregion #region StressStuff @@ -185,8 +204,20 @@ namespace CalamityMod #endregion #region AccessoryStuff + public bool fasterMeleeLevel = false; + + public bool fasterRangedLevel = false; + + public bool fasterMagicLevel = false; + + public bool fasterSummonLevel = false; + + public bool fasterRogueLevel = false; + public bool dodgeScarf = false; + public bool badgeOfBravery = false; + public bool scarfCooldown = false; public bool cryogenSoul = false; @@ -326,6 +357,8 @@ namespace CalamityMod public bool dArtifact = false; public bool gArtifact = false; + + public bool pArtifact = false; #endregion #region ArmorSetStuff @@ -379,6 +412,8 @@ namespace CalamityMod public bool bloodflareMage = false; + public int bloodflareMageCooldown = 0; + public bool bloodflareSummon = false; public int bloodflareSummonTimer = 0; @@ -468,6 +503,14 @@ namespace CalamityMod public int silvaHitCounter = 0; public bool auricSet = false; + + public bool omegaBlueChestplate = false; + + public bool omegaBlueSet = false; + + public bool omegaBlueHentai = false; + + public int omegaBlueCooldown = 0; #endregion #region DebuffStuff @@ -510,6 +553,8 @@ namespace CalamityMod public bool cDepth = false; public bool fishAlert = false; + + public bool bOut = false; #endregion #region BuffStuff @@ -637,6 +682,12 @@ namespace CalamityMod public bool pGuy = false; + public bool gDefense = false; + + public bool gOffense = false; + + public bool gHealer = false; + public bool cEnergy = false; public bool sWaifu = false; @@ -696,6 +747,8 @@ namespace CalamityMod public bool reaverOrb = false; public bool daedalusCrystal = false; + + public int healCounter = 300; #endregion #region BiomeStuff @@ -750,13 +803,24 @@ namespace CalamityMod public bool sirenBoobsAltForce; public bool sirenBoobsAltPower; + + public bool snowmanPrevious; + + public bool snowman; + + public bool snowmanHide; + + public bool snowmanForce; + + public bool snowmanNoseless; + + public bool snowmanPower; #endregion #endregion #region SavingAndLoading public override void Initialize() { - deactivateStupidFuckingBullshit = false; extraAccessoryML = false; eCore = false; mFruit = false; @@ -815,7 +879,34 @@ namespace CalamityMod "sCalKillCount", sCalKillCount }, { - "bossRushStage", bossRushStage + "meleeLevel", meleeLevel + }, + { + "exactMeleeLevel", exactMeleeLevel + }, + { + "rangedLevel", rangedLevel + }, + { + "exactRangedLevel", exactRangedLevel + }, + { + "magicLevel", magicLevel + }, + { + "exactMagicLevel", exactMagicLevel + }, + { + "summonLevel", summonLevel + }, + { + "exactSummonLevel", exactSummonLevel + }, + { + "rogueLevel", rogueLevel + }, + { + "exactRogueLevel", exactRogueLevel } }; } @@ -845,7 +936,17 @@ namespace CalamityMod adrenaline = tag.GetInt("adrenaline"); sCalDeathCount = tag.GetInt("sCalDeathCount"); sCalKillCount = tag.GetInt("sCalKillCount"); - bossRushStage = tag.GetInt("bossRushStage"); + + meleeLevel = tag.GetInt("meleeLevel"); + rangedLevel = tag.GetInt("rangedLevel"); + magicLevel = tag.GetInt("magicLevel"); + summonLevel = tag.GetInt("summonLevel"); + rogueLevel = tag.GetInt("rogueLevel"); + exactMeleeLevel = tag.GetInt("exactMeleeLevel"); + exactRangedLevel = tag.GetInt("exactRangedLevel"); + exactMagicLevel = tag.GetInt("exactMagicLevel"); + exactSummonLevel = tag.GetInt("exactSummonLevel"); + exactRogueLevel = tag.GetInt("exactRogueLevel"); } public override void LoadLegacy(BinaryReader reader) @@ -855,8 +956,19 @@ namespace CalamityMod adrenaline = reader.ReadInt32(); sCalDeathCount = reader.ReadInt32(); sCalKillCount = reader.ReadInt32(); - bossRushStage = reader.ReadInt32(); - if (loadVersion == 0) + + meleeLevel = reader.ReadInt32(); + rangedLevel = reader.ReadInt32(); + magicLevel = reader.ReadInt32(); + summonLevel = reader.ReadInt32(); + rogueLevel = reader.ReadInt32(); + exactMeleeLevel = reader.ReadInt32(); + exactRangedLevel = reader.ReadInt32(); + exactMagicLevel = reader.ReadInt32(); + exactSummonLevel = reader.ReadInt32(); + exactRogueLevel = reader.ReadInt32(); + + if (loadVersion == 0) { BitsByte flags = reader.ReadByte(); extraAccessoryML = flags[0]; @@ -895,50 +1007,85 @@ namespace CalamityMod { player.extraAccessorySlots = 2; } + runCheck = 0; dashMod = 0; + alcoholPoisonLevel = 0; + leviPet = false; sirenPet = false; fox = false; chibii = false; brimling = false; + bearPet = false; fab = false; - sirenWaterBuff = false; + abyssalDivingSuitPlates = false; abyssalDivingSuitCooldown = false; + + sirenWaterBuff = false; sirenIce = false; sirenIceCooldown = false; - heartOfDarkness = false; + draedonsHeart = false; draedonsStressGain = false; + afflicted = false; affliction = false; afflictedBuff = false; + + fasterMeleeLevel = false; + fasterRangedLevel = false; + fasterMagicLevel = false; + fasterSummonLevel = false; + fasterRogueLevel = false; + dodgeScarf = false; - elysianAegis = false; - godSlayer = false; + scarfCooldown = false; + + elysianAegis = false; + nCore = false; - godSlayerDamage = false; + + godSlayer = false; + godSlayerDamage = false; godSlayerMage = false; godSlayerRanged = false; godSlayerThrowing = false; godSlayerSummon = false; godSlayerReflect = false; godSlayerCooldown = false; + silvaSet = false; silvaMelee = false; silvaRanged = false; silvaThrowing = false; silvaMage = false; silvaSummon = false; + auricSet = false; - ataxiaBolt = false; + auricBoost = false; + + omegaBlueChestplate = false; + omegaBlueSet = false; + omegaBlueHentai = false; + + ataxiaBolt = false; ataxiaGeyser = false; - shadeRegen = false; - scarfCooldown = false; + ataxiaFire = false; + ataxiaVolley = false; + ataxiaBlaze = false; + ataxiaMage = false; + + shadeRegen = false; + flamethrowerBoost = false; + shadowSpeed = false; - aSpark = false; + dsSetBonus = false; + + badgeOfBravery = false; + aSpark = false; aBulwark = false; dAmulet = false; fCarapace = false; @@ -946,7 +1093,6 @@ namespace CalamityMod absorber = false; aAmpoule = false; pAmulet = false; - auricBoost = false; fBarrier = false; aBrain = false; frostFlare = false; @@ -955,26 +1101,18 @@ namespace CalamityMod projRef = false; nanotech = false; eQuiver = false; - daedalusReflect = false; - daedalusSplit = false; - daedalusAbsorb = false; - daedalusShard = false; - reaverSpore = false; - reaverDoubleTap = false; - cryogenSoul = false; - yInsignia = false; - eGauntlet = false; - eTalisman = false; + cryogenSoul = false; + yInsignia = false; + eGauntlet = false; + eTalisman = false; statisBeltOfCurses = false; - ataxiaFire = false; - ataxiaVolley = false; - ataxiaBlaze = false; - shadowMinions = false; - tearMinions = false; - alchFlask = false; - community = false; - stressPills = false; - laudanum = false; + heartOfDarkness = false; + shadowMinions = false; + tearMinions = false; + alchFlask = false; + community = false; + stressPills = false; + laudanum = false; fleshTotem = false; bloodPact = false; bloodflareCore = false; @@ -984,6 +1122,34 @@ namespace CalamityMod celestialJewel = false; astralArcanum = false; harpyRing = false; + darkSunRing = false; + calamityRing = false; + eArtifact = false; + dArtifact = false; + gArtifact = false; + pArtifact = false; + lol = false; + raiderTalisman = false; + sGenerator = false; + sDefense = false; + sRegen = false; + sPower = false; + IBoots = false; + elysianFire = false; + sTracers = false; + eTracers = false; + cTracers = false; + + daedalusReflect = false; + daedalusSplit = false; + daedalusAbsorb = false; + daedalusShard = false; + + reaverSpore = false; + reaverDoubleTap = false; + reaverBlast = false; + reaverBurst = false; + ironBoots = false; depthCharm = false; anechoicPlating = false; @@ -992,45 +1158,34 @@ namespace CalamityMod lumenousAmulet = false; reaperToothNecklace = false; aquaticEmblem = false; - darkSunRing = false; - calamityRing = false; - eArtifact = false; - dArtifact = false; - gArtifact = false; - reaverBlast = false; - reaverBurst = false; + astralStarRain = false; - ataxiaMage = false; + victideSet = false; + aeroSet = false; + statigelSet = false; + tarraSet = false; tarraMelee = false; tarraMage = false; tarraRanged = false; tarraThrowing = false; tarraSummon = false; + bloodflareSet = false; bloodflareMelee = false; bloodflareRanged = false; bloodflareThrowing = false; bloodflareMage = false; bloodflareSummon = false; + xerocSet = false; - lol = false; - raiderTalisman = false; - sGenerator = false; - sDefense = false; - sRegen = false; - sPower = false; - IBoots = false; - elysianFire = false; - sTracers = false; - eTracers = false; - cTracers = false; - dsSetBonus = false; + NOU = false; weakPetrification = false; + hAttack = false; horror = false; irradiated = false; @@ -1042,16 +1197,23 @@ namespace CalamityMod hInferno = false; gState = false; bBlood = false; - rRage = false; + eGravity = false; + vHex = false; + eGrav = false; + warped = false; + marked = false; + cDepth = false; + fishAlert = false; + bOut = false; + enraged = false; + snowmanNoseless = false; + + rRage = false; xRage = false; xWrath = false; graxDefense = false; - eGravity = false; sMeleeBoost = false; tFury = false; - vHex = false; - eGrav = false; - warped = false; cadence = false; omniscience = false; zerg = false; @@ -1080,18 +1242,15 @@ namespace CalamityMod aWeapon = false; tScale = false; fabsolVodka = false; - marked = false; - cDepth = false; - fishAlert = false; invincible = false; shine = false; anechoicCoating = false; mushy = false; molten = false; - enraged = false; shellBoost = false; cFreeze = false; tRegen = false; + mWorm = false; iClasper = false; herring = false; @@ -1110,6 +1269,9 @@ namespace CalamityMod cLamp = false; pGuy = false; cEnergy = false; + gDefense = false; + gOffense = false; + gHealer = false; sWaifu = false; dWaifu = false; cWaifu = false; @@ -1139,12 +1301,18 @@ namespace CalamityMod chaosSpirit = false; reaverOrb = false; daedalusCrystal = false; + abyssalDivingSuitPrevious = abyssalDivingSuit; abyssalDivingSuit = abyssalDivingSuitHide = abyssalDivingSuitForce = abyssalDivingSuitPower = false; + sirenBoobsPrevious = sirenBoobs; sirenBoobs = sirenBoobsHide = sirenBoobsForce = sirenBoobsPower = false; sirenBoobsAltPrevious = sirenBoobsAlt; sirenBoobsAlt = sirenBoobsAltHide = sirenBoobsAltForce = sirenBoobsAltPower = false; + + snowmanPrevious = snowman; + snowman = snowmanHide = snowmanForce = snowmanPower = false; + rageMode = false; adrenalineMode = false; } @@ -1162,6 +1330,7 @@ namespace CalamityMod raiderStack = 0; fleshTotemCooldown = 0; astralStarRainCooldown = 0; + bloodflareMageCooldown = 0; tarraMageHealCooldown = 0; hAttack = false; horror = false; @@ -1181,6 +1350,8 @@ namespace CalamityMod marked = false; cDepth = false; fishAlert = false; + bOut = false; + snowmanNoseless = false; scarfCooldown = false; godSlayerCooldown = false; abyssalDivingSuitCooldown = false; @@ -1242,6 +1413,7 @@ namespace CalamityMod whiteWine = false; evergreenGin = false; revivifyTimer = 0; + healCounter = 300; #endregion #region Armorbonuses @@ -1265,7 +1437,10 @@ namespace CalamityMod silvaCountdown = 600; silvaHitCounter = 0; auricSet = false; - daedalusReflect = false; + omegaBlueChestplate = false; + omegaBlueSet = false; + omegaBlueCooldown = 0; + daedalusReflect = false; daedalusSplit = false; daedalusAbsorb = false; daedalusShard = false; @@ -1316,13 +1491,13 @@ namespace CalamityMod if (!CalamityGlobalNPC.AnyLivingPlayers()) { CalamityWorld.bossRushActive = false; - bossRushStage = 0; + CalamityWorld.bossRushStage = 0; if (Main.netMode == 2) { NetMessage.SendData(7, -1, -1, null, 0, 0f, 0f, 0f, 0, 0, 0); var netMessage = mod.GetPacket(); netMessage.Write((byte)CalamityModMessageType.BossRushStage); - netMessage.Write(bossRushStage); + netMessage.Write(CalamityWorld.bossRushStage); netMessage.Send(); } for (int doom = 0; doom < 200; doom++) @@ -1335,7 +1510,7 @@ namespace CalamityMod } } } - if (CalamityWorld.armageddon && !CalamityGlobalNPC.AnyBossNPCS()) + if (CalamityWorld.armageddon && !areThereAnyDamnBosses) { player.respawnTimer -= 5; } @@ -1423,12 +1598,11 @@ namespace CalamityMod } //0.4 is the lowest location the rocklayer can be, 0.3 is the highest - ZoneAbyss = (Collision.DrownCollision(player.position, player.width, player.height, player.gravDir) && - (((double)point.Y > ((Main.rockLayer - (double)y * 0.05) /*+ 35*/)) && //rocklayer = (0.4 to 0.3) - 0.04 = 0.36 to 0.26 + ZoneAbyss = (((double)point.Y > ((Main.rockLayer - (double)y * 0.05) /*+ 35*/)) && //rocklayer = (0.4 to 0.3) - 0.04 = 0.36 to 0.26 !player.lavaWet && !player.honeyWet && abyssPosY && - abyssPosX)); + abyssPosX); ZoneAbyssLayer1 = ZoneAbyss && (double)point.Y <= (Main.rockLayer + (double)y * 0.03); //(0.36 to 0.26) to (0.436 to 0.336) @@ -1676,7 +1850,7 @@ namespace CalamityMod } if (aChicken) { - player.lifeRegen += 2; + player.lifeRegen += 1; player.statDefense += 5; player.moveSpeed += 0.1f; } @@ -1737,7 +1911,7 @@ namespace CalamityMod { player.lifeRegenTime = 1800; } - player.lifeRegen += 8; + player.lifeRegen += 4; player.statDefense += 20; } else @@ -1760,8 +1934,7 @@ namespace CalamityMod } if (lesserEffect) { - player.lifeRegen += 1; - player.statDefense += 20; + player.statDefense += 10; } else { @@ -1771,12 +1944,12 @@ namespace CalamityMod { player.lifeRegenTime = 1800; } - player.lifeRegen += 4; + player.lifeRegen += 2; player.statDefense += 10; } else { - player.lifeRegen += 2; + player.lifeRegen += 1; } } } @@ -1793,6 +1966,16 @@ namespace CalamityMod } #endregion #region LastDebuffs + if (omegaBlueChestplate) + { + if (player.lifeRegen > 0) + player.lifeRegen = 0; + + player.lifeRegenTime = 0; + + if (player.lifeRegenCount > 0) + player.lifeRegenCount = 0; + } if (hInferno) { hInfernoBoost++; @@ -1861,7 +2044,7 @@ namespace CalamityMod { player.velocity.Y *= 1.01f; } - if (weakPetrification) + if (weakPetrification || CalamityWorld.bossRushActive) { if (player.mount.Active) { @@ -1872,17 +2055,11 @@ namespace CalamityMod { player.velocity.X *= 0.99f; } - if (CalamityWorld.revenge) + if (silvaCountdown > 0 && hasSilvaEffect && silvaSet) { - if (player.lifeRegenTime > defLifeRegenTime) + if (player.lifeRegen < 0) { - int lifeRegenAboveCap = player.lifeRegenTime - defLifeRegenTime; - player.lifeRegenTime = defLifeRegenTime + (int)((double)lifeRegenAboveCap * 0.25); - } - if (player.lifeRegen > defLifeRegen) - { - int lifeRegenAboveCap = player.lifeRegen - defLifeRegen; - player.lifeRegen = defLifeRegen + (int)((double)lifeRegenAboveCap * 0.25); + player.lifeRegen = 0; } } #endregion @@ -2082,19 +2259,6 @@ namespace CalamityMod } } } - if (CalamityWorld.revenge) - { - if (player.lifeRegenTime > defLifeRegenTime) - { - int lifeRegenAboveCap = player.lifeRegenTime - defLifeRegenTime; - player.lifeRegenTime = defLifeRegenTime + (int)((double)lifeRegenAboveCap * 0.25); - } - if (player.lifeRegen > defLifeRegen) - { - int lifeRegenAboveCap = player.lifeRegen - defLifeRegen; - player.lifeRegen = defLifeRegen + (int)((double)lifeRegenAboveCap * 0.25); - } - } } #endregion #endregion @@ -2170,6 +2334,19 @@ namespace CalamityMod } } } + if (omegaBlueSet && omegaBlueCooldown <= 0) + { + omegaBlueCooldown = 1800; + Main.PlaySound(29, (int)player.position.X, (int)player.position.Y, 104); + for (int i = 0; i < 66; i++) + { + int d = Dust.NewDust(player.position, player.width, player.height, 20, 0, 0, 100, Color.Transparent, 2.6f); + Main.dust[d].noGravity = true; + Main.dust[d].noLight = true; + Main.dust[d].fadeIn = 1f; + Main.dust[d].velocity *= 6.6f; + } + } if (dsSetBonus) { Main.PlaySound(29, (int)player.position.X, (int)player.position.Y, 104); @@ -2201,10 +2378,7 @@ namespace CalamityMod NPC nPC = Main.npc[l]; if (nPC.active && !nPC.friendly && !nPC.dontTakeDamage && Vector2.Distance(player.Center, nPC.Center) <= 3000f) { - if (nPC.FindBuffIndex(mod.BuffType("Enraged")) == -1) - { - nPC.AddBuff(mod.BuffType("Enraged"), 600, false); - } + nPC.AddBuff(mod.BuffType("Enraged"), 600, false); } } } @@ -2557,7 +2731,12 @@ namespace CalamityMod for (int n = 13; n < 18 + player.extraAccessorySlots; n++) { Item item = player.armor[n]; - if (item.type == mod.ItemType()) + if (item.type == mod.ItemType()) + { + snowmanHide = false; + snowmanForce = true; + } + else if (item.type == mod.ItemType()) { abyssalDivingSuitHide = false; abyssalDivingSuitForce = true; @@ -2577,6 +2756,13 @@ namespace CalamityMod public override void UpdateEquips(ref bool wallSpeedBuff, ref bool tileSpeedBuff, ref bool tileRangeBuff) { + if (snowman) + { + if (player.whoAmI == Main.myPlayer && !snowmanNoseless) + { + player.AddBuff(mod.BuffType(), 60, true); + } + } if (abyssalDivingSuit) { player.AddBuff(mod.BuffType(), 60, true); @@ -2634,330 +2820,208 @@ namespace CalamityMod public override void PostUpdateBuffs() { if (NOU) - { NOULOL(); - } + if (CalamityWorld.defiled) + Defiled(); if (weakPetrification) - { WeakPetrification(); + if (player.mount.Active || player.mount.Cart) + { + player.dashDelay = 60; + dashMod = 0; + } + if (silvaCountdown > 0 && hasSilvaEffect && silvaSet) + { + if (player.lifeRegen < 0) + player.lifeRegen = 0; } } public override void PostUpdateEquips() { if (NOU) - { NOULOL(); - } + if (CalamityWorld.defiled) + Defiled(); if (weakPetrification) - { WeakPetrification(); + if (player.mount.Active || player.mount.Cart) + { + player.dashDelay = 60; + dashMod = 0; } - } + if (silvaCountdown > 0 && hasSilvaEffect && silvaSet) + { + if (player.lifeRegen < 0) + player.lifeRegen = 0; + } + } + + private void ExactLevelUp(int levelUpType, int level, bool final) + { + Color messageColor = Color.Orange; + switch (levelUpType) + { + case 0: + exactMeleeLevel = level; + if (shootFireworksLevelUpMelee) + { + string key = (final ? "Mods.CalamityMod.MeleeLevelUpFinal" : "Mods.CalamityMod.MeleeLevelUp"); + shootFireworksLevelUpMelee = false; + if (player.whoAmI == Main.myPlayer) + { + if (final) + { + Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -5f, ProjectileID.RocketFireworkRed + Main.rand.Next(4), + 0, 0f, Main.myPlayer, 0f, 1f); + } + else + { + Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -5f, ProjectileID.RocketFireworksBoxRed + Main.rand.Next(4), + 0, 0f, Main.myPlayer, 0f, 0f); + } + } + if (Main.netMode == 0) + { + Main.NewText(Language.GetTextValue(key), messageColor); + } + else if (Main.netMode == 2) + { + NetMessage.BroadcastChatMessage(NetworkText.FromKey(key), messageColor); + } + } + break; + case 1: + exactRangedLevel = level; + if (shootFireworksLevelUpRanged) + { + string key = (final ? "Mods.CalamityMod.RangedLevelUpFinal" : "Mods.CalamityMod.RangedLevelUp"); + messageColor = Color.GreenYellow; + shootFireworksLevelUpRanged = false; + if (player.whoAmI == Main.myPlayer) + { + if (final) + { + Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -5f, ProjectileID.RocketFireworkRed + Main.rand.Next(4), + 0, 0f, Main.myPlayer, 0f, 1f); + } + else + { + Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -5f, ProjectileID.RocketFireworksBoxRed + Main.rand.Next(4), + 0, 0f, Main.myPlayer, 0f, 0f); + } + } + if (Main.netMode == 0) + { + Main.NewText(Language.GetTextValue(key), messageColor); + } + else if (Main.netMode == 2) + { + NetMessage.BroadcastChatMessage(NetworkText.FromKey(key), messageColor); + } + } + break; + case 2: + exactMagicLevel = level; + if (shootFireworksLevelUpMagic) + { + string key = (final ? "Mods.CalamityMod.MagicLevelUpFinal" : "Mods.CalamityMod.MagicLevelUp"); + messageColor = Color.DodgerBlue; + shootFireworksLevelUpMagic = false; + if (player.whoAmI == Main.myPlayer) + { + if (final) + { + Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -5f, ProjectileID.RocketFireworkRed + Main.rand.Next(4), + 0, 0f, Main.myPlayer, 0f, 1f); + } + else + { + Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -5f, ProjectileID.RocketFireworksBoxRed + Main.rand.Next(4), + 0, 0f, Main.myPlayer, 0f, 0f); + } + } + if (Main.netMode == 0) + { + Main.NewText(Language.GetTextValue(key), messageColor); + } + else if (Main.netMode == 2) + { + NetMessage.BroadcastChatMessage(NetworkText.FromKey(key), messageColor); + } + } + break; + case 3: + exactSummonLevel = level; + if (shootFireworksLevelUpSummon) + { + string key = (final ? "Mods.CalamityMod.SummonLevelUpFinal" : "Mods.CalamityMod.SummonLevelUp"); + messageColor = Color.Aquamarine; + shootFireworksLevelUpSummon = false; + if (player.whoAmI == Main.myPlayer) + { + if (final) + { + Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -5f, ProjectileID.RocketFireworkRed + Main.rand.Next(4), + 0, 0f, Main.myPlayer, 0f, 1f); + } + else + { + Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -5f, ProjectileID.RocketFireworksBoxRed + Main.rand.Next(4), + 0, 0f, Main.myPlayer, 0f, 0f); + } + } + if (Main.netMode == 0) + { + Main.NewText(Language.GetTextValue(key), messageColor); + } + else if (Main.netMode == 2) + { + NetMessage.BroadcastChatMessage(NetworkText.FromKey(key), messageColor); + } + } + break; + case 4: + exactRogueLevel = level; + if (shootFireworksLevelUpRogue) + { + string key = (final ? "Mods.CalamityMod.RogueLevelUpFinal" : "Mods.CalamityMod.RogueLevelUp"); + messageColor = Color.Orchid; + shootFireworksLevelUpRogue = false; + if (player.whoAmI == Main.myPlayer) + { + if (final) + { + Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -5f, ProjectileID.RocketFireworkRed + Main.rand.Next(4), + 0, 0f, Main.myPlayer, 0f, 1f); + } + else + { + Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -5f, ProjectileID.RocketFireworksBoxRed + Main.rand.Next(4), + 0, 0f, Main.myPlayer, 0f, 0f); + } + } + if (Main.netMode == 0) + { + Main.NewText(Language.GetTextValue(key), messageColor); + } + else if (Main.netMode == 2) + { + NetMessage.BroadcastChatMessage(NetworkText.FromKey(key), messageColor); + } + } + break; + } + if (Main.netMode == 1) + { + ExactLevelPacket(false, levelUpType); + } + } public override void PostUpdateMiscEffects() { - #region BossRush - if (!deactivateStupidFuckingBullshit) - { - deactivateStupidFuckingBullshit = true; - CalamityWorld.bossRushActive = false; - if (Main.netMode == 2) - { - NetMessage.SendData(7, -1, -1, null, 0, 0f, 0f, 0f, 0, 0, 0); - } - } - if (CalamityWorld.bossRushActive) - { - if (NPC.MoonLordCountdown > 0) - { - NPC.MoonLordCountdown = 0; - } - if (!CalamityGlobalNPC.AnyBossNPCS()) - { - if (CalamityWorld.bossRushSpawnCountdown > 0) - { - CalamityWorld.bossRushSpawnCountdown--; - if (CalamityWorld.bossRushSpawnCountdown == 180 && bossRushStage == 26) - { - string key = "Mods.CalamityMod.BossRushTierThreeEndText2"; - Color messageColor = Color.LightCoral; - if (Main.netMode == 0) - { - Main.NewText(Language.GetTextValue(key), messageColor); - } - else if (Main.netMode == 2) - { - NetMessage.BroadcastChatMessage(NetworkText.FromKey(key), messageColor); - } - } - if (CalamityWorld.bossRushSpawnCountdown == 210 && bossRushStage == 33) - { - string key = "Mods.CalamityMod.BossRushTierFourEndText2"; - Color messageColor = Color.LightCoral; - if (Main.netMode == 0) - { - Main.NewText(Language.GetTextValue(key), messageColor); - } - else if (Main.netMode == 2) - { - NetMessage.BroadcastChatMessage(NetworkText.FromKey(key), messageColor); - } - } - } - if (CalamityWorld.bossRushSpawnCountdown <= 0) - { - CalamityWorld.bossRushSpawnCountdown = 60; - if (bossRushStage > 25) - { - CalamityWorld.bossRushSpawnCountdown += 120; //3 seconds - } - if (bossRushStage > 32) - { - CalamityWorld.bossRushSpawnCountdown += 180; //6 seconds - } - switch (bossRushStage) - { - case 9: - CalamityWorld.bossRushSpawnCountdown = 240; - break; - case 18: - CalamityWorld.bossRushSpawnCountdown = 300; - break; - case 25: - CalamityWorld.bossRushSpawnCountdown = 360; - break; - case 32: - CalamityWorld.bossRushSpawnCountdown = 420; - break; - default: - break; - } - if (bossRushStage == 13) - { - player.Spawn(); - } - else if (bossRushStage == 36) - { - if (player.FindBuffIndex(mod.BuffType("ExtremeGravity")) > -1) - { - player.ClearBuff(mod.BuffType("ExtremeGravity")); - } - } - if (Main.netMode != 1) - { - Main.PlaySound(SoundID.Roar, player.position, 0); - switch (bossRushStage) - { - case 0: - NPC.SpawnOnPlayer(player.whoAmI, NPCID.QueenBee); - break; - case 1: - NPC.SpawnOnPlayer(player.whoAmI, NPCID.BrainofCthulhu); - break; - case 2: - NPC.SpawnOnPlayer(player.whoAmI, NPCID.KingSlime); - break; - case 3: - ChangeTime(false); - NPC.SpawnOnPlayer(player.whoAmI, NPCID.EyeofCthulhu); - break; - case 4: - ChangeTime(false); - NPC.SpawnOnPlayer(player.whoAmI, NPCID.SkeletronPrime); - break; - case 5: - NPC.NewNPC((int)(player.position.X + (float)(Main.rand.Next(-50, 51))), (int)(player.position.Y - 150f), NPCID.Golem, 0, 0f, 0f, 0f, 0f, 255); - break; - case 6: - ChangeTime(true); - NPC.SpawnOnPlayer(player.whoAmI, mod.NPCType("ProfanedGuardianBoss")); - NPC.SpawnOnPlayer(player.whoAmI, mod.NPCType("ProfanedGuardianBoss2")); - NPC.SpawnOnPlayer(player.whoAmI, mod.NPCType("ProfanedGuardianBoss3")); - break; - case 7: - NPC.SpawnOnPlayer(player.whoAmI, NPCID.EaterofWorldsHead); - break; - case 8: - ChangeTime(false); - NPC.SpawnOnPlayer(player.whoAmI, mod.NPCType("Astrageldon")); - break; - case 9: - ChangeTime(false); - NPC.SpawnOnPlayer(player.whoAmI, NPCID.TheDestroyer); - break; - case 10: - ChangeTime(false); - NPC.SpawnOnPlayer(player.whoAmI, NPCID.Spazmatism); - NPC.SpawnOnPlayer(player.whoAmI, NPCID.Retinazer); - break; - case 11: - NPC.SpawnOnPlayer(player.whoAmI, mod.NPCType("Bumblefuck")); - break; - case 12: - NPC.SpawnWOF(player.position); - break; - case 13: - NPC.SpawnOnPlayer(player.whoAmI, mod.NPCType("HiveMind")); - break; - case 14: - ChangeTime(false); - NPC.SpawnOnPlayer(player.whoAmI, NPCID.SkeletronHead); - break; - case 15: - NPC.SpawnOnPlayer(player.whoAmI, mod.NPCType("StormWeaverHead")); - break; - case 16: - NPC.SpawnOnPlayer(player.whoAmI, mod.NPCType("AquaticScourgeHead")); - break; - case 17: - NPC.SpawnOnPlayer(player.whoAmI, mod.NPCType("DesertScourgeHead")); - NPC.SpawnOnPlayer(player.whoAmI, mod.NPCType("DesertScourgeHeadSmall")); - NPC.SpawnOnPlayer(player.whoAmI, mod.NPCType("DesertScourgeHeadSmall")); - break; - case 18: - int num1302 = NPC.NewNPC((int)player.Center.X + 30, (int)player.Center.Y - 2, NPCID.CultistBoss, 0, 0f, 0f, 0f, 0f, 255); - Main.npc[num1302].direction = (Main.npc[num1302].spriteDirection = Math.Sign(player.Center.X - (float)player.Center.X - 30f)); - break; - case 19: - for (int doom = 0; doom < 200; doom++) - { - if (Main.npc[doom].active && (Main.npc[doom].type == 493 || Main.npc[doom].type == 422 || Main.npc[doom].type == 507 || - Main.npc[doom].type == 517)) - { - Main.npc[doom].active = false; - Main.npc[doom].netUpdate = true; - } - } - NPC.NewNPC((int)(player.position.X + (float)(Main.rand.Next(-50, 51))), (int)(player.position.Y - 50f), mod.NPCType("CrabulonIdle"), 0, 0f, 0f, 0f, 0f, 255); - break; - case 20: - NPC.SpawnOnPlayer(player.whoAmI, NPCID.Plantera); - break; - case 21: - NPC.SpawnOnPlayer(player.whoAmI, mod.NPCType("CeaselessVoid")); - break; - case 22: - NPC.SpawnOnPlayer(player.whoAmI, mod.NPCType("PerforatorHive")); - break; - case 23: - NPC.SpawnOnPlayer(player.whoAmI, mod.NPCType("Cryogen")); - break; - case 24: - NPC.SpawnOnPlayer(player.whoAmI, mod.NPCType("BrimstoneElemental")); - break; - case 25: - NPC.SpawnOnPlayer(player.whoAmI, mod.NPCType("CosmicWraith")); - break; - case 26: - NPC.NewNPC((int)(player.position.X + (float)(Main.rand.Next(-100, 101))), (int)(player.position.Y - 250f), mod.NPCType("ScavengerBody"), 0, 0f, 0f, 0f, 0f, 255); - break; - case 27: - NPC.NewNPC((int)(player.position.X + (float)(Main.rand.Next(-100, 101))), (int)(player.position.Y - 250f), NPCID.DukeFishron, 0, 0f, 0f, 0f, 0f, 255); - break; - case 28: - NPC.SpawnOnPlayer(player.whoAmI, NPCID.MoonLordCore); - break; - case 29: - ChangeTime(false); - for (int x = 0; x < 10; x++) - { - NPC.SpawnOnPlayer(player.whoAmI, mod.NPCType("AstrumDeusHead")); - } - NPC.SpawnOnPlayer(player.whoAmI, mod.NPCType("AstrumDeusHeadSpectral")); - break; - case 30: - NPC.SpawnOnPlayer(player.whoAmI, mod.NPCType("Polterghast")); - break; - case 31: - NPC.SpawnOnPlayer(player.whoAmI, mod.NPCType("PlaguebringerGoliath")); - break; - case 32: - ChangeTime(false); - NPC.SpawnOnPlayer(player.whoAmI, mod.NPCType("Calamitas")); - break; - case 33: - NPC.SpawnOnPlayer(player.whoAmI, mod.NPCType("Siren")); - break; - case 34: - NPC.SpawnOnPlayer(player.whoAmI, mod.NPCType("SlimeGod")); - NPC.SpawnOnPlayer(player.whoAmI, mod.NPCType("SlimeGodRun")); - NPC.SpawnOnPlayer(player.whoAmI, mod.NPCType("SlimeGodCore")); - break; - case 35: - ChangeTime(true); - NPC.SpawnOnPlayer(player.whoAmI, mod.NPCType("Providence")); - break; - case 36: - NPC.SpawnOnPlayer(player.whoAmI, mod.NPCType("SupremeCalamitas")); - break; - case 37: - NPC.SpawnOnPlayer(player.whoAmI, mod.NPCType("Yharon")); - break; - case 38: - NPC.SpawnOnPlayer(player.whoAmI, mod.NPCType("DevourerofGodsHeadS")); - break; - } - } - } - } - } - else - { - CalamityWorld.bossRushSpawnCountdown = 180; - if (bossRushStage != 0) - { - bossRushStage = 0; - if (Main.netMode == 2) - { - var netMessage = mod.GetPacket(); - netMessage.Write((byte)CalamityModMessageType.BossRushStage); - netMessage.Write(bossRushStage); - netMessage.Send(); - } - } - } - #endregion - #region LORESTATUR - soulEssence = 0 + - (NPC.downedSlimeKing ? 20 : 0) + //20 - (NPC.downedBoss1 ? 30 : 0) + //50 - (NPC.downedBoss2 ? 50 : 0) + //100 - (NPC.downedBoss3 ? 100 : 0) + //200 - (NPC.downedQueenBee ? 50 : 0) + //250 - (NPC.downedMechBoss1 ? 250 : 0) + //500 - (NPC.downedMechBoss2 ? 300 : 0) + //800 - (NPC.downedMechBoss3 ? 350 : 0) + //1150 - (NPC.downedPlantBoss ? 450 : 0) + //1600 - (NPC.downedGolemBoss ? 500 : 0) + //2100 - (NPC.downedAncientCultist ? 600 : 0) + //2700 - (NPC.downedMoonlord ? 1000 : 0) + //3700 - (CalamityWorld.downedDesertScourge ? 50 : 0) + //3750 - (CalamityWorld.downedCrabulon ? 50 : 0) + //3800 - ((CalamityWorld.downedHiveMind || CalamityWorld.downedPerforator) ? 100 : 0) + //3900 - (CalamityWorld.downedSlimeGod ? 200 : 0) + //4100 - (Main.hardMode ? 200 : 0) + //4300 - (CalamityWorld.downedCryogen ? 250 : 0) + //4550 - (CalamityWorld.downedAquaticScourge ? 300 : 0) + //4850 - (CalamityWorld.downedBrimstoneElemental ? 350 : 0) + //5200 - (CalamityWorld.downedCalamitas ? 400 : 0) + //5600 - (CalamityWorld.downedLeviathan ? 800 : 0) + //6400 - (CalamityWorld.downedAstrageldon ? 400 : 0) + //6800 - (CalamityWorld.downedStarGod ? 700 : 0) + //7500 - (CalamityWorld.downedPlaguebringer ? 800 : 0) + //8300 - (CalamityWorld.downedScavenger ? 800 : 0) + //9100 - (NPC.downedFishron ? 800 : 0) + //9900 - (CalamityWorld.downedGuardians ? 900 : 0) + //10800 - (CalamityWorld.downedProvidence ? 2500 : 0) + //13300 - (CalamityWorld.downedSentinel1 ? 1000 : 0) + //14300 - (CalamityWorld.downedSentinel2 ? 1000 : 0) + //15300 - (CalamityWorld.downedSentinel3 ? 2000 : 0) + //17300 - (CalamityWorld.downedPolterghast ? 2700 : 0) + //20000 - (CalamityWorld.downedDoG ? 4000 : 0) + //24000 - (CalamityWorld.downedBumble ? 1000 : 0) + //25000 - (CalamityWorld.downedYharon ? 5000 : 0) + //30000 - (CalamityWorld.downedSCal ? 7500 : 0); //37500 - #endregion + Main.expertDebuffTime = 1f; + areThereAnyDamnBosses = CalamityGlobalNPC.AnyBossNPCS(); #region RevengeanceEffects if (CalamityWorld.revenge && player.whoAmI == Main.myPlayer) { @@ -2992,7 +3056,7 @@ namespace CalamityMod } else if (heartOfDarkness) { - stressGain += 35; + stressGain += 25; } } stressCD++; @@ -3006,8 +3070,17 @@ namespace CalamityMod } if (stress >= stressMax) { + if (playFullRageSound) + { + playFullRageSound = false; + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/FullRage"), (int)player.position.X, (int)player.position.Y); + } stress = stressMax; } + else + { + playFullRageSound = true; + } } stressLevel500 = stress >= 9800; if (stressLevel500 && !hAttack) @@ -3048,7 +3121,7 @@ namespace CalamityMod { adrenaline = 0; } - else if (CalamityGlobalNPC.AnyBossNPCS() || CalamityGlobalNPC.DoGSecondStageCountdown > 0) + else if (areThereAnyDamnBosses || CalamityWorld.DoGSecondStageCountdown > 0) { int adrenalineTickBoost = 0 + (adrenalineBoostOne ? 63 : 0) + //286 @@ -3072,8 +3145,17 @@ namespace CalamityMod } if (adrenaline >= adrenalineMax) { + if (playFullAdrenalineSound) + { + playFullAdrenalineSound = false; + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/FullAdrenaline"), (int)player.position.X, (int)player.position.Y); + } adrenaline = adrenalineMax; } + else + { + playFullAdrenalineSound = true; + } } } else if (!CalamityWorld.revenge && player.whoAmI == Main.myPlayer) @@ -3111,38 +3193,29 @@ namespace CalamityMod } if (CalamityWorld.revenge) { - player.thrownDamage += 0.05f; - player.rangedDamage += 0.05f; - player.meleeDamage += 0.05f; - player.magicDamage += 0.05f; - player.minionDamage += 0.05f; + if (player.lifeSteal > (CalamityWorld.death ? 30f : 40f)) + { + player.lifeSteal = (CalamityWorld.death ? 30f : 40f); + } } #endregion #region StressTiedEffects if (stressPills) { player.statDefense += 5; - player.meleeCrit += 5; - player.meleeDamage += 0.05f; - player.magicCrit += 5; - player.magicDamage += 0.05f; - player.rangedCrit += 5; - player.rangedDamage += 0.05f; - player.thrownCrit += 5; - player.thrownDamage += 0.05f; - player.minionDamage += 0.05f; + player.meleeDamage += 0.06f; + player.magicDamage += 0.06f; + player.rangedDamage += 0.06f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.06f; + player.minionDamage += 0.06f; } if (laudanum) { player.statDefense += 8; - player.meleeCrit += 6; player.meleeDamage += 0.06f; - player.magicCrit += 6; player.magicDamage += 0.06f; - player.rangedCrit += 6; player.rangedDamage += 0.06f; - player.thrownCrit += 6; - player.thrownDamage += 0.06f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.06f; player.minionDamage += 0.06f; } if (!stressLevel500 && player.FindBuffIndex(mod.BuffType("HeartAttack")) > -1) { player.ClearBuff(mod.BuffType("HeartAttack")); } @@ -3154,21 +3227,20 @@ namespace CalamityMod { if (heartOfDarkness || draedonsHeart) { - player.thrownDamage += 0.1f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.1f; player.rangedDamage += 0.1f; player.meleeDamage += 0.1f; player.magicDamage += 0.1f; player.minionDamage += 0.1f; } - player.lifeRegen += 1; player.statLifeMax2 += player.statLifeMax / 5 / 20 * 5; } if (affliction) { - player.lifeRegen += CalamityWorld.revenge ? 2 : 1; + player.lifeRegen += 1; player.endurance += CalamityWorld.revenge ? 0.07f : 0.05f; player.statDefense += CalamityWorld.revenge ? 20 : 15; - player.thrownDamage += CalamityWorld.revenge ? 0.12f : 0.1f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += CalamityWorld.revenge ? 0.12f : 0.1f; player.rangedDamage += CalamityWorld.revenge ? 0.12f : 0.1f; player.meleeDamage += CalamityWorld.revenge ? 0.12f : 0.1f; player.magicDamage += CalamityWorld.revenge ? 0.12f : 0.1f; @@ -3177,10 +3249,10 @@ namespace CalamityMod } else if (afflicted) { - player.lifeRegen += CalamityWorld.revenge ? 2 : 1; + player.lifeRegen += 1; player.endurance += CalamityWorld.revenge ? 0.07f : 0.05f; player.statDefense += CalamityWorld.revenge ? 20 : 15; - player.thrownDamage += CalamityWorld.revenge ? 0.12f : 0.1f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += CalamityWorld.revenge ? 0.12f : 0.1f; player.rangedDamage += CalamityWorld.revenge ? 0.12f : 0.1f; player.meleeDamage += CalamityWorld.revenge ? 0.12f : 0.1f; player.magicDamage += CalamityWorld.revenge ? 0.12f : 0.1f; @@ -3195,7 +3267,7 @@ namespace CalamityMod (bOrange ? 25 : 0) + (eBerry ? 25 : 0) + (dFruit ? 25 : 0); - if (silvaSet && silvaHitCounter > 0) + if (silvaHitCounter > 0) { player.statLifeMax2 -= silvaHitCounter * 100; if (player.statLifeMax2 < 200) @@ -3245,6 +3317,268 @@ namespace CalamityMod } #endregion #region MiscEffects + if (gainLevelCooldown > 0) + gainLevelCooldown--; + #region MeleeLevels + switch (meleeLevel) + { + case 100: + ExactLevelUp(0, 1, false); + break; + case 300: + ExactLevelUp(0, 2, false); + break; + case 600: + ExactLevelUp(0, 3, false); + break; + case 1000: + ExactLevelUp(0, 4, false); + break; + case 1500: + ExactLevelUp(0, 5, false); + break; + case 2100: + ExactLevelUp(0, 6, false); + break; + case 2800: + ExactLevelUp(0, 7, false); + break; + case 3600: + ExactLevelUp(0, 8, false); + break; + case 4500: + ExactLevelUp(0, 9, false); + break; + case 5500: + ExactLevelUp(0, 10, false); + break; + case 6600: + ExactLevelUp(0, 11, false); + break; + case 7800: + ExactLevelUp(0, 12, false); + break; + case 9100: + ExactLevelUp(0, 13, false); + break; + case 10500: + ExactLevelUp(0, 14, false); + break; + case 12500: //celebration or some shit for final level, yay + ExactLevelUp(0, 15, true); + break; + default: + break; + } + #endregion + #region RangedLevels + switch (rangedLevel) + { + case 100: + ExactLevelUp(1, 1, false); + break; + case 300: + ExactLevelUp(1, 2, false); + break; + case 600: + ExactLevelUp(1, 3, false); + break; + case 1000: + ExactLevelUp(1, 4, false); + break; + case 1500: + ExactLevelUp(1, 5, false); + break; + case 2100: + ExactLevelUp(1, 6, false); + break; + case 2800: + ExactLevelUp(1, 7, false); + break; + case 3600: + ExactLevelUp(1, 8, false); + break; + case 4500: + ExactLevelUp(1, 9, false); + break; + case 5500: + ExactLevelUp(1, 10, false); + break; + case 6600: + ExactLevelUp(1, 11, false); + break; + case 7800: + ExactLevelUp(1, 12, false); + break; + case 9100: + ExactLevelUp(1, 13, false); + break; + case 10500: + ExactLevelUp(1, 14, false); + break; + case 12500: //celebration or some shit for final level, yay + ExactLevelUp(1, 15, true); + break; + default: + break; + } + #endregion + #region MagicLevels + switch (magicLevel) + { + case 100: + ExactLevelUp(2, 1, false); + break; + case 300: + ExactLevelUp(2, 2, false); + break; + case 600: + ExactLevelUp(2, 3, false); + break; + case 1000: + ExactLevelUp(2, 4, false); + break; + case 1500: + ExactLevelUp(2, 5, false); + break; + case 2100: + ExactLevelUp(2, 6, false); + break; + case 2800: + ExactLevelUp(2, 7, false); + break; + case 3600: + ExactLevelUp(2, 8, false); + break; + case 4500: + ExactLevelUp(2, 9, false); + break; + case 5500: + ExactLevelUp(2, 10, false); + break; + case 6600: + ExactLevelUp(2, 11, false); + break; + case 7800: + ExactLevelUp(2, 12, false); + break; + case 9100: + ExactLevelUp(2, 13, false); + break; + case 10500: + ExactLevelUp(2, 14, false); + break; + case 12500: //celebration or some shit for final level, yay + ExactLevelUp(2, 15, true); + break; + default: + break; + } + #endregion + #region SummonLevels + switch (summonLevel) + { + case 100: + ExactLevelUp(3, 1, false); + break; + case 300: + ExactLevelUp(3, 2, false); + break; + case 600: + ExactLevelUp(3, 3, false); + break; + case 1000: + ExactLevelUp(3, 4, false); + break; + case 1500: + ExactLevelUp(3, 5, false); + break; + case 2100: + ExactLevelUp(3, 6, false); + break; + case 2800: + ExactLevelUp(3, 7, false); + break; + case 3600: + ExactLevelUp(3, 8, false); + break; + case 4500: + ExactLevelUp(3, 9, false); + break; + case 5500: + ExactLevelUp(3, 10, false); + break; + case 6600: + ExactLevelUp(3, 11, false); + break; + case 7800: + ExactLevelUp(3, 12, false); + break; + case 9100: + ExactLevelUp(3, 13, false); + break; + case 10500: + ExactLevelUp(3, 14, false); + break; + case 12500: //celebration or some shit for final level, yay + ExactLevelUp(3, 15, true); + break; + default: + break; + } + #endregion + #region RogueLevels + switch (rogueLevel) + { + case 100: + ExactLevelUp(4, 1, false); + break; + case 300: + ExactLevelUp(4, 2, false); + break; + case 600: + ExactLevelUp(4, 3, false); + break; + case 1000: + ExactLevelUp(4, 4, false); + break; + case 1500: + ExactLevelUp(4, 5, false); + break; + case 2100: + ExactLevelUp(4, 6, false); + break; + case 2800: + ExactLevelUp(4, 7, false); + break; + case 3600: + ExactLevelUp(4, 8, false); + break; + case 4500: + ExactLevelUp(4, 9, false); + break; + case 5500: + ExactLevelUp(4, 10, false); + break; + case 6600: + ExactLevelUp(4, 11, false); + break; + case 7800: + ExactLevelUp(4, 12, false); + break; + case 9100: + ExactLevelUp(4, 13, false); + break; + case 10500: + ExactLevelUp(4, 14, false); + break; + case 12500: //celebration or some shit for final level, yay + ExactLevelUp(4, 15, true); + break; + default: + break; + } + #endregion if (Main.myPlayer == player.whoAmI) { BossHealthBarManager.SHOULD_DRAW_SMALLTEXT_HEALTH = shouldDrawSmallText; @@ -3260,18 +3594,14 @@ namespace CalamityMod { if (Main.myPlayer == player.whoAmI && !player.gills && !player.merman) { - player.breath--; + if (player.breath > 0) + player.breath--; } } } if (ZoneAbyss) { if (abyssalAmulet) { player.statLifeMax2 += player.statLifeMax2 / 5 / 20 * (lumenousAmulet ? 15 : 10); } - player.detectCreature = false; - if (player.chaosState && !NPC.AnyNPCs(mod.NPCType("EidolonWyrmHeadHuge")) && Main.netMode != 1) - { - NPC.SpawnOnPlayer(player.whoAmI, mod.NPCType("EidolonWyrmHeadHuge")); - } if (Main.myPlayer == player.whoAmI) //4200 total tiles small world { Point point = player.Center.ToTileCoordinates(); @@ -3340,15 +3670,30 @@ namespace CalamityMod abyssBreathCD++; if (player.gills || player.merman) { - player.breath -= 3; + if (player.breath > 0) + player.breath -= 3; + } + if (!Collision.DrownCollision(player.position, player.width, player.height, player.gravDir)) + { + if (player.statLife > 100) + { + if (player.lifeRegen > 0) + { + player.lifeRegen = 0; + } + player.lifeRegenTime = 0; + player.lifeRegen -= 160; + } } if (abyssBreathCD >= tick) { abyssBreathCD = 0; - player.breath -= breathLoss; + if (player.breath > 0) + player.breath -= breathLoss; if (cDepth) { - player.breath -= 1; + if (player.breath > 0) + player.breath--; } if (player.breath <= 0) { @@ -3373,15 +3718,93 @@ namespace CalamityMod { player.maxFallSpeed = 15f; } + if (omegaBlueSet) //should apply after rev caps, actually those are gone so AAAAA + { + //add tentacles + if (player.ownedProjectileCounts[mod.ProjectileType("OmegaBlueTentacle")] < 6) + { + bool[] tentaclesPresent = new bool[6]; + for (int i = 0; i < 1000; i++) + { + Projectile projectile = Main.projectile[i]; + if (projectile.active && projectile.type == mod.ProjectileType("OmegaBlueTentacle") && projectile.owner == Main.myPlayer && projectile.ai[1] >= 0f && projectile.ai[1] < 6f) + { + tentaclesPresent[(int)projectile.ai[1]] = true; + } + } + for (int i = 0; i < 6; i++) + { + if (!tentaclesPresent[i]) + { + float modifier = player.meleeDamage + player.magicDamage + player.rangedDamage + + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage + player.minionDamage; + modifier /= 5f; + int damage = (int)(666 * modifier); + Vector2 vel = new Vector2(Main.rand.Next(-13, 14), Main.rand.Next(-13, 14)) * 0.25f; + Projectile.NewProjectile(player.Center, vel, mod.ProjectileType("OmegaBlueTentacle"), damage, 8f, Main.myPlayer, Main.rand.Next(120), i); + } + } + } + float damageUp = 0.1f; + int critUp = 10; + if (omegaBlueHentai) + { + damageUp *= 2f; + critUp *= 2; + } + player.meleeDamage += damageUp; + player.rangedDamage += damageUp; + player.magicDamage += damageUp; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += damageUp; + player.minionDamage += damageUp; + player.meleeCrit += critUp; + player.rangedCrit += critUp; + player.magicCrit += critUp; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += critUp; + } + if (!bOut) + { + if (gHealer) + { + if (healCounter > 0) { healCounter--; } + if (healCounter <= 0) + { + healCounter = 300; + if (player.whoAmI == Main.myPlayer) + { + int healAmount = 5 + + (gDefense ? 5 : 0) + + (gOffense ? 5 : 0); + player.statLife += healAmount; + player.HealEffect(healAmount); + } + } + } + if (gDefense) + { + player.moveSpeed += 0.1f + + (gOffense ? 0.1f : 0f); + player.endurance += 0.025f + + (gOffense ? 0.025f : 0f); + } + if (gOffense) + { + player.minionDamage += 0.1f + + (gDefense ? 0.05f : 0f); + player.maxMinions++; + } + } if (revivifyTimer > 0) { revivifyTimer--; } if (fleshTotemCooldown > 0) { fleshTotemCooldown--; } if (astralStarRainCooldown > 0) { astralStarRainCooldown--; } + if (bloodflareMageCooldown > 0) { bloodflareMageCooldown--; } if (tarraMageHealCooldown > 0) { tarraMageHealCooldown--; } if (ataxiaDmg > 0) { ataxiaDmg--; } if (xerocDmg > 0) { xerocDmg--; } if (godSlayerDmg > 0) { godSlayerDmg--; } if (silvaCountdown > 0 && hasSilvaEffect && silvaSet) { + player.buffImmune[mod.BuffType("VulnerabilityHex")] = true; silvaCountdown--; for (int j = 0; j < 2; j++) { @@ -3446,7 +3869,7 @@ namespace CalamityMod bool shouldAffect = CalamityMod.debuffList.Contains(hasBuff); if (shouldAffect) { - player.thrownDamage += 0.1f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.1f; } } } @@ -3498,11 +3921,7 @@ namespace CalamityMod { if (player.ZoneOverworldHeight || player.ZoneSkyHeight) { player.AddBuff(mod.BuffType("Irradiated"), 2); } } - if (raiderTalisman) { player.thrownDamage += ((float)raiderStack / 250f) * 0.15f; } - if (silvaCountdown <= 0 && hasSilvaEffect && silvaMage) - { - player.magicCrit += 10; - } + if (raiderTalisman) { CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += ((float)raiderStack / 250f) * 0.15f; } if (silvaCountdown <= 0 && hasSilvaEffect && silvaSummon) { player.maxMinions += 2; @@ -3521,7 +3940,7 @@ namespace CalamityMod player.endurance += 0.05f; if ((double)Math.Abs(player.velocity.X) < 0.05 && (double)Math.Abs(player.velocity.Y) < 0.05 && player.itemAnimation == 0) { - player.lifeRegen += 3; + player.lifeRegen += 2; player.manaRegenBonus += 2; } if (Collision.DrownCollision(player.position, player.width, player.height, player.gravDir)) @@ -3545,14 +3964,14 @@ namespace CalamityMod player.buffImmune[20] = true; if (!player.honey && player.lifeRegen < 0) { - player.lifeRegen += 3; + player.lifeRegen += 2; if (player.lifeRegen > 0) { player.lifeRegen = 0; } } player.lifeRegenTime += 1; - player.lifeRegen += 3; + player.lifeRegen += 2; } else if (cFreeze) { @@ -3564,7 +3983,11 @@ namespace CalamityMod } else if (sirenBoobs || sirenBoobsAlt) { - Lighting.AddLight((int)(player.position.X + (float)(player.width / 2)) / 16, (int)(player.position.Y + (float)(player.height / 2)) / 16, 0.55f, 1.5f, 0.55f); + Lighting.AddLight((int)(player.position.X + (float)(player.width / 2)) / 16, (int)(player.position.Y + (float)(player.height / 2)) / 16, 1.5f, 1f, 0.1f); + } + else if (tarraSummon) + { + Lighting.AddLight((int)(player.Center.X / 16f), (int)(player.Center.Y / 16f), 0f, 3f, 0f); } if (cFreeze) { @@ -3594,6 +4017,11 @@ namespace CalamityMod player.thorns = 0f; player.turtleThorns = false; } + if (player.vortexStealthActive) + { + player.rangedDamage -= (1f - player.stealth) * 0.4f; //change 80 to 40 + player.rangedCrit -= (int)((1f - player.stealth) * 5f); //change 20 to 15 + } #endregion #region StandingStillEffects if (aquaticEmblem) @@ -3663,13 +4091,13 @@ namespace CalamityMod } } player.meleeDamage += (1f - modStealth) * 0.2f; - player.meleeCrit += (int)((1f - modStealth) * 20f); + player.meleeCrit += (int)((1f - modStealth) * 10f); player.rangedDamage += (1f - modStealth) * 0.2f; - player.rangedCrit += (int)((1f - modStealth) * 20f); + player.rangedCrit += (int)((1f - modStealth) * 10f); player.magicDamage += (1f - modStealth) * 0.2f; - player.magicCrit += (int)((1f - modStealth) * 20f); - player.thrownDamage += (1f - modStealth) * 0.2f; - player.thrownCrit += (int)((1f - modStealth) * 20f); + player.magicCrit += (int)((1f - modStealth) * 10f); + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += (1f - modStealth) * 0.2f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += (int)((1f - modStealth) * 10f); player.minionDamage += (1f - modStealth) * 0.2f; if (modStealthTimer > 0) { @@ -3710,8 +4138,8 @@ namespace CalamityMod modStealth = 1f; } } - player.meleeDamage += (1f - modStealth) * 0.25f; - player.meleeCrit += (int)((1f - modStealth) * 25f); + player.meleeDamage += (1f - modStealth) * 0.2f; + player.meleeCrit += (int)((1f - modStealth) * 10f); player.aggro -= (int)((1f - modStealth) * 750f); if (modStealthTimer > 0) { @@ -3750,8 +4178,8 @@ namespace CalamityMod player.magicDamage += (5f - shieldInvinc) * 0.02f; player.magicCrit += (int)((5f - shieldInvinc) * 2f); player.minionDamage += (5f - shieldInvinc) * 0.02f; - player.thrownDamage += (5f - shieldInvinc) * 0.02f; - player.thrownCrit += (int)((5f - shieldInvinc) * 2f); + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += (5f - shieldInvinc) * 0.02f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += (int)((5f - shieldInvinc) * 2f); player.aggro += (int)((5f - shieldInvinc) * 220f); player.statDefense += (int)((5f - shieldInvinc) * 5f); player.moveSpeed *= 0.85f; @@ -3830,35 +4258,27 @@ namespace CalamityMod (CalamityWorld.revenge ? 5 : 0); player.endurance -= 0.05f + (CalamityWorld.revenge ? 0.05f : 0f); - player.meleeCrit += 5; player.meleeDamage += 0.05f; - player.magicCrit += 5; player.magicDamage += 0.05f; - player.rangedCrit += 5; player.rangedDamage += 0.05f; - player.thrownCrit += 5; - player.thrownDamage += 0.05f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.05f; player.minionDamage += 0.05f; player.minionKB += 0.5f; player.moveSpeed += 0.05f; } if (rRage) { - player.meleeCrit += 5; player.meleeDamage += 0.05f; - player.magicCrit += 5; player.magicDamage += 0.05f; - player.rangedCrit += 5; player.rangedDamage += 0.05f; - player.thrownCrit += 5; - player.thrownDamage += 0.05f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.05f; player.minionDamage += 0.05f; player.meleeSpeed -= 0.05f; player.moveSpeed += 0.05f; } if (xRage) { - player.thrownDamage += 0.1f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.1f; player.rangedDamage += 0.1f; player.meleeDamage += 0.1f; player.magicDamage += 0.1f; @@ -3866,14 +4286,14 @@ namespace CalamityMod } if (xWrath) { - player.meleeCrit += 10; - player.magicCrit += 10; - player.rangedCrit += 10; - player.thrownCrit += 10; + player.meleeCrit += 5; + player.magicCrit += 5; + player.rangedCrit += 5; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 5; } if (godSlayerCooldown) { - player.thrownDamage += 0.1f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.1f; player.rangedDamage += 0.1f; player.meleeDamage += 0.1f; player.magicDamage += 0.1f; @@ -3885,40 +4305,39 @@ namespace CalamityMod player.endurance += 0.05f; player.meleeSpeed -= 0.05f; player.meleeDamage += 0.1f; - player.meleeCrit += 10; } if (sMeleeBoost) { player.meleeSpeed -= 0.05f; player.meleeDamage += 0.1f; - player.thrownDamage += 0.1f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.1f; player.rangedDamage += 0.1f; player.magicDamage += 0.1f; player.minionDamage += 0.1f; - player.meleeCrit += 10; - player.magicCrit += 10; - player.rangedCrit += 10; - player.thrownCrit += 10; + player.meleeCrit += 5; + player.magicCrit += 5; + player.rangedCrit += 5; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 5; } if (tFury) { player.meleeDamage += 0.3f; - player.meleeCrit += 30; + player.meleeCrit += 10; } if (yPower) { player.endurance += 0.05f; player.statDefense += 5; - player.meleeCrit += 5; - player.meleeDamage += 0.05f; + player.meleeCrit += 2; + player.meleeDamage += 0.06f; player.meleeSpeed -= 0.05f; - player.magicCrit += 5; - player.magicDamage += 0.05f; - player.rangedCrit += 5; - player.rangedDamage += 0.05f; - player.thrownCrit += 5; - player.thrownDamage += 0.05f; - player.minionDamage += 0.05f; + player.magicCrit += 2; + player.magicDamage += 0.06f; + player.rangedCrit += 2; + player.rangedDamage += 0.06f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 2; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.06f; + player.minionDamage += 0.06f; player.minionKB += 1f; player.moveSpeed += 0.15f; } @@ -3928,9 +4347,92 @@ namespace CalamityMod player.statDefense += 5; player.kbBuff = true; } + if (darkSunRing) + { + player.maxMinions += 1; + player.lifeRegen += 1; + player.statDefense += 8; + player.meleeSpeed -= 0.08f; + player.meleeDamage += 0.08f; + player.rangedDamage += 0.08f; + player.magicDamage += 0.08f; + player.pickSpeed -= 0.3f; + player.minionDamage += 0.08f; + player.minionKB += 1f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.08f; + if (Main.dayTime) + { + player.lifeRegen += 1; + } + else + { + player.statDefense += 20; + } + } + if (badgeOfBravery) + { + if (player.statLife <= (player.statLifeMax2 * 0.8f) && player.statLife > (player.statLifeMax2 * 0.6f)) + { + player.meleeSpeed -= 0.05f; + } + else if (player.statLife <= (player.statLifeMax2 * 0.6f) && player.statLife > (player.statLifeMax2 * 0.4f)) + { + player.meleeSpeed -= 0.1f; + } + else if (player.statLife <= (player.statLifeMax2 * 0.4f) && player.statLife > (player.statLifeMax2 * 0.2f)) + { + player.meleeSpeed -= 0.15f; + } + else if (player.statLife <= (player.statLifeMax2 * 0.2f)) + { + player.meleeSpeed -= 0.2f; + } + } + if (eGauntlet) + { + player.longInvince = true; + player.kbGlove = true; + player.meleeDamage += 0.15f; + player.meleeCrit += 5; + player.meleeSpeed -= 0.15f; + player.lavaImmune = true; + } + if (yInsignia) + { + player.longInvince = true; + player.kbGlove = true; + player.meleeDamage += 0.05f; + player.meleeSpeed -= 0.05f; + player.lavaImmune = true; + if (player.statLife <= (player.statLifeMax2 * 0.5f)) + { + player.meleeDamage += 0.1f; + player.magicDamage += 0.1f; + player.rangedDamage += 0.1f; + player.thrownDamage += 0.1f; + player.minionDamage += 0.1f; + } + if (player.statLife <= (player.statLifeMax2 * 0.8f) && player.statLife > (player.statLifeMax2 * 0.6f)) + { + player.meleeSpeed -= 0.05f; + } + else if (player.statLife <= (player.statLifeMax2 * 0.6f) && player.statLife > (player.statLifeMax2 * 0.4f)) + { + player.meleeSpeed -= 0.1f; + } + else if (player.statLife <= (player.statLifeMax2 * 0.4f) && player.statLife > (player.statLifeMax2 * 0.2f)) + { + player.meleeSpeed -= 0.15f; + } + else if (player.statLife <= (player.statLifeMax2 * 0.2f)) + { + player.meleeSpeed -= 0.2f; + } + } if (fabsolVodka) { - player.thrownDamage += 0.1f; + alcoholPoisonLevel++; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.1f; player.rangedDamage += 0.1f; player.meleeDamage += 0.1f; player.magicDamage += 0.1f; @@ -3939,183 +4441,209 @@ namespace CalamityMod } if (vodka) { + alcoholPoisonLevel++; player.lifeRegen -= 2; player.statDefense -= 4; - player.meleeCrit += 5; - player.meleeDamage += 0.05f; - player.magicCrit += 5; - player.magicDamage += 0.05f; - player.rangedCrit += 5; - player.rangedDamage += 0.05f; - player.thrownCrit += 5; - player.thrownDamage += 0.05f; - player.minionDamage += 0.05f; + player.meleeCrit += 2; + player.meleeDamage += 0.08f; + player.magicCrit += 2; + player.magicDamage += 0.08f; + player.rangedCrit += 2; + player.rangedDamage += 0.08f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 2; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.08f; + player.minionDamage += 0.08f; } if (redWine) { + alcoholPoisonLevel++; player.lifeRegen -= 2; } if (grapeBeer) { + alcoholPoisonLevel++; player.lifeRegen -= 1; player.statDefense -= 2; player.moveSpeed -= 0.05f; } if (moonshine) { + alcoholPoisonLevel++; player.lifeRegen -= 2; player.statDefense += 10; player.endurance += 0.05f; } if (rum) { + alcoholPoisonLevel++; player.lifeRegen += 2; player.moveSpeed += 0.1f; player.statDefense -= 8; } if (fireball) { + alcoholPoisonLevel++; player.lifeRegen -= 3; } if (whiskey) { + alcoholPoisonLevel++; player.statDefense -= 8; - player.meleeCrit += 3; - player.meleeDamage += 0.03f; - player.magicCrit += 3; - player.magicDamage += 0.03f; - player.rangedCrit += 3; - player.rangedDamage += 0.03f; - player.thrownCrit += 3; - player.thrownDamage += 0.03f; - player.minionDamage += 0.03f; + player.meleeCrit += 2; + player.meleeDamage += 0.04f; + player.magicCrit += 2; + player.magicDamage += 0.04f; + player.rangedCrit += 2; + player.rangedDamage += 0.04f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 2; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.04f; + player.minionDamage += 0.04f; } if (everclear) { + alcoholPoisonLevel += 2; player.lifeRegen -= 20; player.statDefense -= 40; - player.meleeCrit += 20; - player.meleeDamage += 0.2f; - player.magicCrit += 20; - player.magicDamage += 0.2f; - player.rangedCrit += 20; - player.rangedDamage += 0.2f; - player.thrownCrit += 20; - player.thrownDamage += 0.2f; - player.minionDamage += 0.2f; + player.meleeDamage += 0.25f; + player.magicDamage += 0.25f; + player.rangedDamage += 0.25f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.25f; + player.minionDamage += 0.25f; } if (bloodyMary) { + alcoholPoisonLevel++; player.lifeRegen -= 3; if (Main.bloodMoon) { player.statDefense -= 6; - player.meleeCrit += 15; + player.meleeCrit += 7; player.meleeDamage += 0.15f; player.meleeSpeed -= 0.15f; - player.magicCrit += 15; + player.magicCrit += 7; player.magicDamage += 0.15f; - player.rangedCrit += 15; + player.rangedCrit += 7; player.rangedDamage += 0.15f; - player.thrownCrit += 15; - player.thrownDamage += 0.15f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 7; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.15f; player.minionDamage += 0.15f; player.moveSpeed += 0.15f; } } if (tequila) { + alcoholPoisonLevel++; player.lifeRegen -= 2; if (Main.dayTime) { player.statDefense += 5; - player.meleeCrit += 3; - player.meleeDamage += 0.03f; - player.magicCrit += 3; - player.magicDamage += 0.03f; - player.rangedCrit += 3; - player.rangedDamage += 0.03f; - player.thrownCrit += 3; - player.thrownDamage += 0.03f; - player.minionDamage += 0.03f; - player.endurance += 0.03f; + player.meleeCrit += 2; + player.meleeDamage += 0.04f; + player.magicCrit += 2; + player.magicDamage += 0.04f; + player.rangedCrit += 2; + player.rangedDamage += 0.04f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 2; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.04f; + player.minionDamage += 0.04f; + player.endurance += 0.04f; } } if (tequilaSunrise) { + alcoholPoisonLevel++; player.lifeRegen -= 3; if (Main.dayTime) { player.statDefense += 15; - player.meleeCrit += 9; + player.meleeCrit += 3; player.meleeDamage += 0.09f; - player.magicCrit += 9; + player.magicCrit += 3; player.magicDamage += 0.09f; - player.rangedCrit += 9; + player.rangedCrit += 3; player.rangedDamage += 0.09f; - player.thrownCrit += 9; - player.thrownDamage += 0.09f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 3; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.09f; player.minionDamage += 0.09f; player.endurance += 0.09f; } } if (screwdriver) { + alcoholPoisonLevel++; player.lifeRegen -= 3; } if (caribbeanRum) { + alcoholPoisonLevel++; player.lifeRegen += 2; player.moveSpeed += 0.2f; player.statDefense -= 12; } if (cinnamonRoll) { + alcoholPoisonLevel++; player.statDefense -= 12; player.manaRegenDelay--; player.manaRegenBonus += 10; } if (margarita) { + alcoholPoisonLevel++; player.lifeRegen -= 3; player.statDefense -= 6; } if (starBeamRye) { + alcoholPoisonLevel++; player.lifeRegen -= 3; player.statDefense -= 6; - player.magicCrit += 5; - player.magicDamage += 0.05f; + player.magicDamage += 0.08f; player.manaCost *= 0.9f; } if (moscowMule) { + alcoholPoisonLevel++; player.lifeRegen -= 3; - player.meleeCrit += 12; + player.meleeCrit += 3; player.meleeDamage += 0.12f; - player.magicCrit += 12; + player.magicCrit += 3; player.magicDamage += 0.12f; - player.rangedCrit += 12; + player.rangedCrit += 3; player.rangedDamage += 0.12f; - player.thrownCrit += 12; - player.thrownDamage += 0.12f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 3; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.12f; player.minionDamage += 0.12f; } if (whiteWine) { + alcoholPoisonLevel++; player.lifeRegen -= 3; player.statDefense -= 6; player.magicDamage += 0.1f; } if (evergreenGin) { + alcoholPoisonLevel++; player.lifeRegen -= 3; player.endurance += 0.05f; } - if (nanotech && player.inventory[player.selectedItem].thrown) + if (alcoholPoisonLevel > 3) { - player.endurance += 0.1f; - player.statDefense += 15; + if (player.lifeRegen > 0) + { + player.lifeRegen = 0; + } + player.lifeRegenTime = 0; + player.lifeRegen -= 3 * alcoholPoisonLevel; + } + if (nanotech) + { + if (CalamityMod.throwingItemList.Contains(player.inventory[player.selectedItem].type)) + { + player.endurance += 0.1f; + player.statDefense += 15; + } } if (harpyRing) { @@ -4144,19 +4672,20 @@ namespace CalamityMod (CalamityWorld.downedDoG ? 0.02f : 0f) + //0.17 (CalamityWorld.downedYharon ? 0.03f : 0f); //0.2 int integerTypeBoost = (int)(floatTypeBoost * 50f); + int critBoost = integerTypeBoost / 2; int regenBoost = 1 + (integerTypeBoost / 5); float damageBoost = floatTypeBoost * 0.5f; player.endurance += (floatTypeBoost * 0.25f); player.statDefense += integerTypeBoost; - player.meleeCrit += integerTypeBoost; + player.meleeCrit += critBoost; player.meleeDamage += damageBoost; player.meleeSpeed -= (floatTypeBoost * 0.25f); - player.magicCrit += integerTypeBoost; + player.magicCrit += critBoost; player.magicDamage += damageBoost; - player.rangedCrit += integerTypeBoost; + player.rangedCrit += critBoost; player.rangedDamage += damageBoost; - player.thrownCrit += integerTypeBoost; - player.thrownDamage += damageBoost; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += critBoost; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += damageBoost; player.minionDamage += damageBoost; player.minionKB += floatTypeBoost; player.moveSpeed += floatTypeBoost; @@ -4180,93 +4709,57 @@ namespace CalamityMod player.wingTimeMax = (int)((double)player.wingTimeMax * 1.15); } } - if (CalamityWorld.defiled) - { - player.statLifeMax2 /= 2; - if (player.statLife > player.statLifeMax2) - { - player.statLife = player.statLifeMax2; - } - } if (reaperToothNecklace) { - player.meleeCrit += 25; player.meleeDamage += 0.25f; - player.magicCrit += 25; player.magicDamage += 0.25f; - player.rangedCrit += 25; player.rangedDamage += 0.25f; - player.thrownCrit += 25; - player.thrownDamage += 0.25f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.25f; player.minionDamage += 0.25f; } if (coreOfTheBloodGod) { - if (Main.netMode != 1) - { - int drain = Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, 0f, 476, 40, 0f, Main.myPlayer, 0f, 0f); - Main.projectile[drain].usesLocalNPCImmunity = true; - Main.projectile[drain].localNPCHitCooldown = 5; - } player.endurance += 0.05f; - player.meleeCrit += 5; - player.meleeDamage += 0.05f; - player.magicCrit += 5; - player.magicDamage += 0.05f; - player.rangedCrit += 5; - player.rangedDamage += 0.05f; - player.thrownCrit += 5; - player.thrownDamage += 0.05f; - player.minionDamage += 0.05f; + player.meleeDamage += 0.07f; + player.magicDamage += 0.07f; + player.rangedDamage += 0.07f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.07f; + player.minionDamage += 0.07f; if (player.statDefense < 100) { player.meleeDamage += 0.15f; player.magicDamage += 0.15f; player.rangedDamage += 0.15f; - player.thrownDamage += 0.15f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.15f; player.minionDamage += 0.15f; } } else if (bloodflareCore) { - if (Main.netMode != 1) - { - int drain = Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, 0f, 476, 40, 0f, Main.myPlayer, 0f, 0f); - Main.projectile[drain].usesLocalNPCImmunity = true; - Main.projectile[drain].localNPCHitCooldown = 8; - } if (player.statDefense < 100) { player.meleeDamage += 0.15f; player.magicDamage += 0.15f; player.rangedDamage += 0.15f; - player.thrownDamage += 0.15f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.15f; player.minionDamage += 0.15f; } if (player.statLife <= (int)((double)player.statLifeMax2 * 0.15)) { player.endurance += 0.1f; - player.meleeCrit += 15; - player.meleeDamage += 0.15f; - player.magicCrit += 15; - player.magicDamage += 0.15f; - player.rangedCrit += 15; - player.rangedDamage += 0.15f; - player.thrownCrit += 15; - player.thrownDamage += 0.15f; - player.minionDamage += 0.15f; + player.meleeDamage += 0.2f; + player.magicDamage += 0.2f; + player.rangedDamage += 0.2f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.2f; + player.minionDamage += 0.2f; } else if (player.statLife <= (int)((double)player.statLifeMax2 * 0.5)) { player.endurance += 0.05f; - player.meleeCrit += 10; player.meleeDamage += 0.1f; - player.magicCrit += 10; player.magicDamage += 0.1f; - player.rangedCrit += 10; player.rangedDamage += 0.1f; - player.thrownCrit += 10; - player.thrownDamage += 0.1f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.1f; player.minionDamage += 0.1f; } } @@ -4274,15 +4767,14 @@ namespace CalamityMod { if (player.statLife >= player.statLifeMax2) { - player.thrownCrit += 15; - player.thrownDamage += 0.15f; - player.thrownVelocity += 0.15f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 10; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.1f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingVelocity += 0.1f; } } if (tarraSummon) { int lifeCounter = 0; - Lighting.AddLight((int)(player.Center.X / 16f), (int)(player.Center.Y / 16f), 0f, 3f, 0f); float num2 = 300f; bool flag = lifeCounter % 60 == 0; int num3 = 200; @@ -4319,115 +4811,54 @@ namespace CalamityMod { if (player.statLife > (int)((double)player.statLifeMax2 * 0.8)) { - player.thrownCrit += 5; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 5; player.statDefense += 30; } else { - player.thrownDamage += 0.15f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.1f; } } if (bloodflareSummon) { if (player.statLife >= (int)((double)player.statLifeMax2 * 0.9)) { - player.minionDamage += 0.15f; + player.minionDamage += 0.1f; } else if (player.statLife <= (int)((double)player.statLifeMax2 * 0.5)) { player.statDefense += 20; - player.lifeRegen += 3; + player.lifeRegen += 2; } if (bloodflareSummonTimer > 0) { bloodflareSummonTimer--; } - if (Main.netMode != 1 && bloodflareSummonTimer <= 0) + if (player.whoAmI == Main.myPlayer && bloodflareSummonTimer <= 0) { bloodflareSummonTimer = 900; for (int I = 0; I < 3; I++) { float ai1 = (float)(I * 120); - int mine = Projectile.NewProjectile(player.Center.X + (float)(Math.Sin(I * 120) * 550), player.Center.Y + (float)(Math.Cos(I * 120) * 550), 0f, 0f, + Projectile.NewProjectile(player.Center.X + (float)(Math.Sin(I * 120) * 550), player.Center.Y + (float)(Math.Cos(I * 120) * 550), 0f, 0f, mod.ProjectileType("GhostlyMine"), (int)((auricSet ? 15000f : 5000f) * player.minionDamage), 1f, player.whoAmI, ai1, 0f); } } } #endregion - #region DRAndDamageLimits + #region DRLimitAndOtherShit + if (auricSet && silvaMelee) + { + double multiplier = (double)player.statLife / (double)player.statLifeMax2; + player.meleeDamage += (float)(multiplier * 0.5); //ranges from 1.5 times to 1 times + } + if (player.endurance > defEndurance) //0.33 + { + float damageReductionAboveCap = player.endurance - defEndurance; //0.6 - 0.33 = 0.27 + player.endurance = defEndurance + (damageReductionAboveCap * 0.1f); //0.33 + (0.27 * 0.1) = 0.357 + } if (CalamityWorld.revenge) { - if (player.lifeRegenTime > defLifeRegenTime) - { - int lifeRegenAboveCap = player.lifeRegenTime - defLifeRegenTime; - player.lifeRegenTime = defLifeRegenTime + (int)((double)lifeRegenAboveCap * 0.25); - } - if (player.lifeRegen > defLifeRegen) - { - int lifeRegenAboveCap = player.lifeRegen - defLifeRegen; - player.lifeRegen = defLifeRegen + (int)((double)lifeRegenAboveCap * 0.25); - } - if (player.endurance > defEndurance) //0.33 - { - float damageReductionAboveCap = player.endurance - defEndurance; //0.6 - 0.33 = 0.27 - player.endurance = defEndurance + (damageReductionAboveCap * 0.1f); //0.33 + (0.27 * 0.1) = 0.357 - } - if (!dsSetBonus) - { - if (player.meleeDamage > defDamage) - { - float damageAboveCap = player.meleeDamage - defDamage; - player.meleeDamage = defDamage + (damageAboveCap * 0.25f); - } - if (auricSet && silvaMelee) - { - double multiplier = (double)player.statLife / (double)player.statLifeMax2; - player.meleeDamage += (float)(multiplier * 0.5); //ranges from 1.5 times to 1 times - } - if (player.rangedDamage > defDamage) - { - float damageAboveCap = player.rangedDamage - defDamage; - player.rangedDamage = defDamage + (damageAboveCap * 0.25f); - } - if (player.magicDamage > defDamage) - { - float damageAboveCap = player.magicDamage - defDamage; - player.magicDamage = defDamage + (damageAboveCap * 0.25f); - } - if (player.thrownDamage > defDamage) - { - float damageAboveCap = player.thrownDamage - defDamage; - player.thrownDamage = defDamage + (damageAboveCap * 0.25f); - } - if (!auricSet) - { - if (player.minionDamage > defDamage) - { - float damageAboveCap = player.minionDamage - defDamage; - player.minionDamage = defDamage + (damageAboveCap * 0.25f); - } - } - if (player.meleeCrit > defCrit) - { - int critAboveCap = player.meleeCrit - defCrit; - player.meleeCrit = defCrit + (int)((double)critAboveCap * 0.1); - } - if (player.rangedCrit > defCrit) - { - int critAboveCap = player.rangedCrit - defCrit; - player.rangedCrit = defCrit + (int)((double)critAboveCap * 0.1); - } - if (player.magicCrit > defCrit) - { - int critAboveCap = player.magicCrit - defCrit; - player.magicCrit = defCrit + (int)((double)critAboveCap * 0.1); - } - if (player.thrownCrit > defCrit) - { - int critAboveCap = player.thrownCrit - defCrit; - player.thrownCrit = defCrit + (int)((double)critAboveCap * 0.1); - } - } if (rageMode && adrenalineMode) { - player.thrownDamage += (CalamityWorld.death ? 12f : 3f); + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += (CalamityWorld.death ? 12f : 3f); player.rangedDamage += (CalamityWorld.death ? 12f : 3f); player.meleeDamage += (CalamityWorld.death ? 12f : 3f); player.magicDamage += (CalamityWorld.death ? 12f : 3f); @@ -4439,7 +4870,7 @@ namespace CalamityMod (rageBoostTwo ? (CalamityWorld.death ? 0.8f : 0.2f) : 0f) + //5.6 or 1.4 (rageBoostThree ? (CalamityWorld.death ? 0.8f : 0.2f) : 0f); //6.4 or 1.6 float rageDamage = (CalamityWorld.death ? 4f : 1f) + rageDamageBoost; - player.thrownDamage += rageDamage; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += rageDamage; player.rangedDamage += rageDamage; player.meleeDamage += rageDamage; player.magicDamage += rageDamage; @@ -4447,28 +4878,438 @@ namespace CalamityMod else if (adrenalineMode) { float adrenalineDamageMult = (CalamityWorld.death ? 10f : 2.5f) * adrenalineDmgMult; - player.thrownDamage += adrenalineDamageMult; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += adrenalineDamageMult; player.rangedDamage += adrenalineDamageMult; player.meleeDamage += adrenalineDamageMult; player.magicDamage += adrenalineDamageMult; } } + #region MeleeLevelBoosts + if (meleeLevel >= 12500) + { + player.meleeDamage += 0.12f; + player.meleeSpeed -= 0.12f; + player.meleeCrit += 6; + } + else if (meleeLevel >= 10500) + { + player.meleeDamage += 0.1f; + player.meleeSpeed -= 0.1f; + player.meleeCrit += 5; + } + else if (meleeLevel >= 9100) + { + player.meleeDamage += 0.09f; + player.meleeSpeed -= 0.09f; + player.meleeCrit += 5; + } + else if (meleeLevel >= 7800) + { + player.meleeDamage += 0.08f; + player.meleeSpeed -= 0.08f; + player.meleeCrit += 4; + } + else if (meleeLevel >= 6600) + { + player.meleeDamage += 0.07f; + player.meleeSpeed -= 0.07f; + player.meleeCrit += 4; + } + else if (meleeLevel >= 5500) //hm limit + { + player.meleeDamage += 0.06f; + player.meleeSpeed -= 0.06f; + player.meleeCrit += 3; + } + else if (meleeLevel >= 4500) + { + player.meleeDamage += 0.05f; + player.meleeSpeed -= 0.05f; + player.meleeCrit += 3; + } + else if (meleeLevel >= 3600) + { + player.meleeDamage += 0.05f; + player.meleeSpeed -= 0.05f; + player.meleeCrit += 2; + } + else if (meleeLevel >= 2800) + { + player.meleeDamage += 0.04f; + player.meleeSpeed -= 0.04f; + player.meleeCrit += 2; + } + else if (meleeLevel >= 2100) + { + player.meleeDamage += 0.04f; + player.meleeSpeed -= 0.03f; + player.meleeCrit += 1; + } + else if (meleeLevel >= 1500) //prehm limit + { + player.meleeDamage += 0.03f; + player.meleeSpeed -= 0.02f; + player.meleeCrit += 1; + } + else if (meleeLevel >= 1000) + { + player.meleeDamage += 0.03f; + player.meleeSpeed -= 0.01f; + player.meleeCrit += 1; + } + else if (meleeLevel >= 600) + { + player.meleeDamage += 0.02f; + player.meleeSpeed -= 0.01f; + } + else if (meleeLevel >= 300) + player.meleeDamage += 0.02f; + else if (meleeLevel >= 100) + player.meleeDamage += 0.01f; + #endregion + #region RangedLevelBoosts + if (rangedLevel >= 12500) + { + player.rangedDamage += 0.12f; + player.moveSpeed += 0.12f; + player.rangedCrit += 6; + } + else if (rangedLevel >= 10500) + { + player.rangedDamage += 0.1f; + player.moveSpeed += 0.1f; + player.rangedCrit += 5; + } + else if (rangedLevel >= 9100) + { + player.rangedDamage += 0.09f; + player.moveSpeed += 0.09f; + player.rangedCrit += 5; + } + else if (rangedLevel >= 7800) + { + player.rangedDamage += 0.08f; + player.moveSpeed += 0.08f; + player.rangedCrit += 4; + } + else if (rangedLevel >= 6600) + { + player.rangedDamage += 0.07f; + player.moveSpeed += 0.07f; + player.rangedCrit += 4; + } + else if (rangedLevel >= 5500) + { + player.rangedDamage += 0.06f; + player.moveSpeed += 0.06f; + player.rangedCrit += 3; + } + else if (rangedLevel >= 4500) + { + player.rangedDamage += 0.05f; + player.moveSpeed += 0.05f; + player.rangedCrit += 3; + } + else if (rangedLevel >= 3600) + { + player.rangedDamage += 0.05f; + player.moveSpeed += 0.05f; + player.rangedCrit += 2; + } + else if (rangedLevel >= 2800) + { + player.rangedDamage += 0.04f; + player.moveSpeed += 0.04f; + player.rangedCrit += 2; + } + else if (rangedLevel >= 2100) + { + player.rangedDamage += 0.04f; + player.moveSpeed += 0.03f; + player.rangedCrit += 1; + } + else if (rangedLevel >= 1500) + { + player.rangedDamage += 0.03f; + player.moveSpeed += 0.02f; + player.rangedCrit += 1; + } + else if (rangedLevel >= 1000) + { + player.rangedDamage += 0.03f; + player.moveSpeed += 0.01f; + player.rangedCrit += 1; + } + else if (rangedLevel >= 600) + { + player.rangedDamage += 0.02f; + player.rangedCrit += 1; + } + else if (rangedLevel >= 300) + player.rangedDamage += 0.02f; + else if (rangedLevel >= 100) + player.rangedDamage += 0.01f; + #endregion + #region MagicLevelBoosts + if (magicLevel >= 12500) + { + player.magicDamage += 0.12f; + player.manaCost *= 0.88f; + player.magicCrit += 6; + } + else if (magicLevel >= 10500) + { + player.magicDamage += 0.1f; + player.manaCost *= 0.9f; + player.magicCrit += 5; + } + else if (magicLevel >= 9100) + { + player.magicDamage += 0.09f; + player.manaCost *= 0.91f; + player.magicCrit += 5; + } + else if (magicLevel >= 7800) + { + player.magicDamage += 0.08f; + player.manaCost *= 0.92f; + player.magicCrit += 4; + } + else if (magicLevel >= 6600) + { + player.magicDamage += 0.07f; + player.manaCost *= 0.93f; + player.magicCrit += 4; + } + else if (magicLevel >= 5500) + { + player.magicDamage += 0.06f; + player.manaCost *= 0.94f; + player.magicCrit += 3; + } + else if (magicLevel >= 4500) + { + player.magicDamage += 0.05f; + player.manaCost *= 0.95f; + player.magicCrit += 3; + } + else if (magicLevel >= 3600) + { + player.magicDamage += 0.05f; + player.manaCost *= 0.95f; + player.magicCrit += 2; + } + else if (magicLevel >= 2800) + { + player.magicDamage += 0.04f; + player.manaCost *= 0.96f; + player.magicCrit += 2; + } + else if (magicLevel >= 2100) + { + player.magicDamage += 0.04f; + player.manaCost *= 0.97f; + player.magicCrit += 1; + } + else if (magicLevel >= 1500) + { + player.magicDamage += 0.03f; + player.manaCost *= 0.98f; + player.magicCrit += 1; + } + else if (magicLevel >= 1000) + { + player.magicDamage += 0.03f; + player.manaCost *= 0.99f; + player.magicCrit += 1; + } + else if (magicLevel >= 600) + { + player.magicDamage += 0.02f; + player.manaCost *= 0.99f; + } + else if (magicLevel >= 300) + player.magicDamage += 0.02f; + else if (magicLevel >= 100) + player.magicDamage += 0.01f; + #endregion + #region SummonLevelBoosts + if (summonLevel >= 12500) + { + player.minionDamage += 0.12f; + player.minionKB += 3.0f; + player.maxMinions += 3; + } + else if (summonLevel >= 10500) + { + player.minionDamage += 0.1f; + player.minionKB += 3.0f; + player.maxMinions += 2; + } + else if (summonLevel >= 9100) + { + player.minionDamage += 0.09f; + player.minionKB += 2.7f; + player.maxMinions += 2; + } + else if (summonLevel >= 7800) + { + player.minionDamage += 0.08f; + player.minionKB += 2.4f; + player.maxMinions += 2; + } + else if (summonLevel >= 6600) + { + player.minionDamage += 0.07f; + player.minionKB += 2.1f; + player.maxMinions += 2; + } + else if (summonLevel >= 5500) + { + player.minionDamage += 0.06f; + player.minionKB += 1.8f; + player.maxMinions += 2; + } + else if (summonLevel >= 4500) + { + player.minionDamage += 0.06f; + player.minionKB += 1.8f; + player.maxMinions++; + } + else if (summonLevel >= 3600) + { + player.minionDamage += 0.05f; + player.minionKB += 1.5f; + player.maxMinions++; + } + else if (summonLevel >= 2800) + { + player.minionDamage += 0.04f; + player.minionKB += 1.2f; + player.maxMinions++; + } + else if (summonLevel >= 2100) + { + player.minionDamage += 0.04f; + player.minionKB += 0.9f; + player.maxMinions++; + } + else if (summonLevel >= 1500) + { + player.minionDamage += 0.03f; + player.minionKB += 0.6f; + } + else if (summonLevel >= 1000) + { + player.minionDamage += 0.03f; + player.minionKB += 0.3f; + } + else if (summonLevel >= 600) + { + player.minionDamage += 0.02f; + player.minionKB += 0.3f; + } + else if (summonLevel >= 300) + player.minionDamage += 0.02f; + else if (summonLevel >= 100) + player.minionDamage += 0.01f; + #endregion + #region RogueLevelBoosts + if (rogueLevel >= 12500) + { + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.12f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingVelocity += 0.12f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 6; + } + else if (rogueLevel >= 10500) + { + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.1f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingVelocity += 0.1f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 5; + } + else if (rogueLevel >= 9100) + { + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.09f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingVelocity += 0.09f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 5; + } + else if (rogueLevel >= 7800) + { + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.08f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingVelocity += 0.08f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 4; + } + else if (rogueLevel >= 6600) + { + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.07f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingVelocity += 0.07f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 4; + } + else if (rogueLevel >= 5500) + { + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.06f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingVelocity += 0.06f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 3; + } + else if (rogueLevel >= 4500) + { + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.05f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingVelocity += 0.05f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 3; + } + else if (rogueLevel >= 3600) + { + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.05f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingVelocity += 0.05f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 2; + } + else if (rogueLevel >= 2800) + { + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.04f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingVelocity += 0.04f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 2; + } + else if (rogueLevel >= 2100) + { + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.04f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingVelocity += 0.03f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 1; + } + else if (rogueLevel >= 1500) + { + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.03f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingVelocity += 0.02f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 1; + } + else if (rogueLevel >= 1000) + { + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.03f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingVelocity += 0.01f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 1; + } + else if (rogueLevel >= 600) + { + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.02f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingVelocity += 0.01f; + } + else if (rogueLevel >= 300) + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.02f; + else if (rogueLevel >= 100) + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.01f; + #endregion if (dArtifact) { - player.meleeCrit += 15; - player.meleeDamage += 0.15f; - player.magicCrit += 15; - player.magicDamage += 0.15f; - player.rangedCrit += 15; - player.rangedDamage += 0.15f; - player.thrownCrit += 15; - player.thrownDamage += 0.15f; + player.meleeDamage += 0.25f; + player.magicDamage += 0.25f; + player.rangedDamage += 0.25f; + player.minionDamage += 0.25f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.25f; } if (eArtifact) { player.meleeSpeed -= 0.1f; player.manaCost *= 0.85f; - player.thrownDamage += 0.1f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.1f; player.maxMinions += 2; } if (gArtifact) @@ -4480,12 +5321,48 @@ namespace CalamityMod { player.AddBuff(mod.BuffType("AngryChicken"), 3600, true); } - if (player.ownedProjectileCounts[mod.ProjectileType("AngryChicken")] < 2 && Main.netMode != 1) + if (player.ownedProjectileCounts[mod.ProjectileType("AngryChicken")] < 2) { Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, 0f, mod.ProjectileType("AngryChicken"), (int)(232f * player.minionDamage), 2f, Main.myPlayer, 0f, 0f); } } } + if (pArtifact) + { + if (player.whoAmI == Main.myPlayer) + { + if (player.FindBuffIndex(mod.BuffType("GuardianHealer")) == -1) + { + player.AddBuff(mod.BuffType("GuardianHealer"), 3600, true); + } + if (player.ownedProjectileCounts[mod.ProjectileType("MiniGuardianHealer")] < 1) + { + Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -6f, mod.ProjectileType("MiniGuardianHealer"), 0, 0f, Main.myPlayer, 0f, 0f); + } + if (player.maxMinions >= 8) + { + if (player.FindBuffIndex(mod.BuffType("GuardianDefense")) == -1) + { + player.AddBuff(mod.BuffType("GuardianDefense"), 3600, true); + } + if (player.ownedProjectileCounts[mod.ProjectileType("MiniGuardianDefense")] < 1) + { + Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -3f, mod.ProjectileType("MiniGuardianDefense"), (int)(400f * player.minionDamage), 1f, Main.myPlayer, 0f, 0f); + } + } + if (tarraSummon || bloodflareSummon || godSlayerSummon || silvaSummon || dsSetBonus) + { + if (player.FindBuffIndex(mod.BuffType("GuardianOffense")) == -1) + { + player.AddBuff(mod.BuffType("GuardianOffense"), 3600, true); + } + if (player.ownedProjectileCounts[mod.ProjectileType("MiniGuardianAttack")] < 1) + { + Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, mod.ProjectileType("MiniGuardianAttack"), (int)(400f * player.minionDamage), 1f, Main.myPlayer, 0f, 0f); + } + } + } + } if (marked || reaperToothNecklace) { player.endurance *= 0.5f; @@ -4600,7 +5477,7 @@ namespace CalamityMod } else if (player.grappling[0] == -1 && !player.tongued) { - if (dashMod > 0 && !player.mount.Active) + if (dashMod > 0) { ModHorizontalMovement(); ModDashMovement(); @@ -4619,7 +5496,7 @@ namespace CalamityMod #region PreKill public override bool PreKill(double damage, int hitDirection, bool pvp, ref bool playSound, ref bool genGore, ref PlayerDeathReason damageSource) { - if (invincible) + if (invincible && player.inventory[player.selectedItem].type != mod.ItemType("ColdheartIcicle")) { if (player.statLife <= 0) { @@ -4688,6 +5565,8 @@ namespace CalamityMod { silvaHitCounter++; } + if (player.FindBuffIndex(mod.BuffType("SilvaRevival")) == -1) + player.AddBuff(mod.BuffType("SilvaRevival"), 600); hasSilvaEffect = true; if (player.statLife < 1) { @@ -4711,19 +5590,19 @@ namespace CalamityMod } if (bBlood && damage == 10.0 && hitDirection == 0 && damageSource.SourceOtherIndex == 8) { - damageSource = PlayerDeathReason.ByCustomReason(player.name + " became a blood geyser"); + damageSource = PlayerDeathReason.ByCustomReason(player.name + " became a blood geyser."); } if ((bFlames || aFlames) && damage == 10.0 && hitDirection == 0 && damageSource.SourceOtherIndex == 8) { - damageSource = PlayerDeathReason.ByCustomReason(player.name + " was consumed by the black flames"); + damageSource = PlayerDeathReason.ByCustomReason(player.name + " was consumed by the black flames."); } if (pFlames && damage == 10.0 && hitDirection == 0 && damageSource.SourceOtherIndex == 8) { - damageSource = PlayerDeathReason.ByCustomReason(player.name + "'s flesh was melted by the Plague"); + damageSource = PlayerDeathReason.ByCustomReason(player.name + "'s flesh was melted by the plague."); } if ((hFlames || hInferno) && damage == 10.0 && hitDirection == 0 && damageSource.SourceOtherIndex == 8) { - damageSource = PlayerDeathReason.ByCustomReason(player.name + " fell prey to their sins"); + damageSource = PlayerDeathReason.ByCustomReason(player.name + " fell prey to their sins."); } if (CalamityGlobalNPC.SCal > -1) { @@ -4732,7 +5611,7 @@ namespace CalamityMod sCalDeathCount++; } } - if (CalamityWorld.ironHeart && CalamityGlobalNPC.AnyBossNPCS()) + if (CalamityWorld.ironHeart && areThereAnyDamnBosses) { KillPlayer(); return false; @@ -4744,13 +5623,16 @@ namespace CalamityMod #region UseTimeMult public override float UseTimeMultiplier(Item item) { - if (silvaRanged && item.ranged && item.useTime > 3) + if (silvaRanged) { - return (auricSet ? 1.2f : 1.1f); + if (item.ranged && !CalamityMod.throwingItemList.Contains(item.type) && item.useTime > 3) + return (auricSet ? 1.2f : 1.1f); } - if (player.statLife > (int)((double)player.statLifeMax2 * 0.9) && silvaThrowing && item.thrown && item.useTime > 3) + if (silvaThrowing) { - return 1.1f; + if (player.statLife > (int)((double)player.statLifeMax2 * 0.9) && + CalamityMod.throwingItemList.Contains(item.type) && item.useTime > 3) + return 1.1f; } return 1f; } @@ -4770,31 +5652,23 @@ namespace CalamityMod #region GetWeaponDamageAndKB public override void GetWeaponDamage(Item item, ref int damage) { + if (flamethrowerBoost && item.ranged && item.useAmmo == 23) + { + damage = (int)((double)damage * 1.25); + } + if (dodgeScarf && item.melee && item.shoot == 0) + { + damage = (int)((double)damage * 1.2); + } + if ((cinnamonRoll && CalamityMod.fireWeaponList.Contains(item.type)) || (evergreenGin && CalamityMod.natureWeaponList.Contains(item.type))) + { + damage = (int)((double)damage * 1.15); + } if (fireball && CalamityMod.fireWeaponList.Contains(item.type)) { damage = (int)((double)damage * 1.1); } - if (cinnamonRoll && CalamityMod.fireWeaponList.Contains(item.type)) - { - damage = (int)((double)damage * 1.15); - } - if (evergreenGin && CalamityMod.natureWeaponList.Contains(item.type)) - { - damage = (int)((double)damage * 1.15); - } - if (dodgeScarf && item.melee && item.shoot == 0) - { - damage = (int)((double)damage * 1.2); - } - if (flamethrowerBoost && item.ranged && item.useAmmo == 23) - { - damage = (int)((double)damage * 1.25); - } - if (item.type == ItemID.TerraBlade) - { - damage = (int)((double)damage * 1.66); - } - } + } public override void GetWeaponKnockback(Item item, ref float knockback) { @@ -4808,15 +5682,19 @@ namespace CalamityMod } if (whiskey) { - knockback += 0.03f; + knockback *= 1.04f; } if (tequila && Main.dayTime) { - knockback += 0.03f; + knockback *= 1.04f; + } + if (tequilaSunrise && Main.dayTime) + { + knockback *= 1.09f; } if (moscowMule) { - knockback += 0.12f; + knockback *= 1.12f; } } #endregion @@ -4824,86 +5702,117 @@ namespace CalamityMod #region Shoot public override bool Shoot(Item item, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { - if (eArtifact && item.ranged) + if (CalamityMod.throwingItemList.Contains(item.type)) + { + speedX *= CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingVelocity; + speedY *= CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingVelocity; + } + if (eArtifact && item.ranged && !CalamityMod.throwingItemList.Contains(item.type)) { speedX *= 1.25f; speedY *= 1.25f; } - if (bloodflareMage && item.magic && Main.rand.Next(0, 100) >= 95) //0 - 99 + if (bloodflareMage) //0 - 99 { - if (player.whoAmI == Main.myPlayer) + if (item.magic && Main.rand.Next(0, 100) >= 95) { - Projectile.NewProjectile(position.X, position.Y, speedX, speedY, mod.ProjectileType("GhostlyBolt"), (int)((double)damage * 2.6), 1f, player.whoAmI, 0f, 0f); + if (player.whoAmI == Main.myPlayer) + { + Projectile.NewProjectile(position.X, position.Y, speedX, speedY, mod.ProjectileType("GhostlyBolt"), (int)((double)damage * (auricSet ? 4.2 : 2.6)), 1f, player.whoAmI, 0f, 0f); + } } } - if (bloodflareRanged && item.ranged && Main.rand.Next(0, 100) >= (auricSet ? 98 : 95)) //0 - 99 + if (bloodflareRanged) //0 - 99 { - if (player.whoAmI == Main.myPlayer) + if (item.ranged && !CalamityMod.throwingItemList.Contains(item.type) && Main.rand.Next(0, 100) >= 98) { - Projectile.NewProjectile(position.X, position.Y, speedX, speedY, mod.ProjectileType("BloodBomb"), (int)((double)damage * 1.6), 2f, player.whoAmI, 0f, 0f); + if (player.whoAmI == Main.myPlayer) + { + Projectile.NewProjectile(position.X, position.Y, speedX, speedY, mod.ProjectileType("BloodBomb"), (int)((double)damage * (auricSet ? 2.2 : 1.6)), 2f, player.whoAmI, 0f, 0f); + } } } - if (tarraMage && tarraCrits >= 5) + if (tarraMage) { - tarraCrits = 0; - int num106 = 9 + Main.rand.Next(3); - for (int num107 = 0; num107 < num106; num107++) + if (tarraCrits >= 5 && player.whoAmI == Main.myPlayer) { - float num110 = 0.025f * (float)num107; - float hardar = speedX + (float)Main.rand.Next(-25, 26) * num110; - float hordor = speedY + (float)Main.rand.Next(-25, 26) * num110; - float num84 = (float)Math.Sqrt((double)(speedX * speedX + speedY * speedY)); - num84 = item.shootSpeed / num84; - hardar *= num84; - hordor *= num84; - Projectile.NewProjectile(position.X, position.Y, hardar, hordor, 206, (int)((double)damage * 0.2), knockBack, player.whoAmI, 0.0f, 0.0f); + tarraCrits = 0; + int num106 = 9 + Main.rand.Next(3); + for (int num107 = 0; num107 < num106; num107++) + { + float num110 = 0.025f * (float)num107; + float hardar = speedX + (float)Main.rand.Next(-25, 26) * num110; + float hordor = speedY + (float)Main.rand.Next(-25, 26) * num110; + float num84 = (float)Math.Sqrt((double)(speedX * speedX + speedY * speedY)); + num84 = item.shootSpeed / num84; + hardar *= num84; + hordor *= num84; + Projectile.NewProjectile(position.X, position.Y, hardar, hordor, 206, (int)((double)damage * 0.2), knockBack, player.whoAmI, 0.0f, 0.0f); + } } } - if (ataxiaBolt && item.ranged && Main.rand.Next(2) == 0) + if (ataxiaBolt) { - if (player.whoAmI == Main.myPlayer) - { - Projectile.NewProjectile(position.X, position.Y, speedX * 1.25f, speedY * 1.25f, mod.ProjectileType("ChaosFlare"), (int)((double)damage * 0.25), 2f, player.whoAmI, 0f, 0f); - } - } - if (godSlayerRanged && item.ranged && Main.rand.Next(0, 100) >= 95) //0 - 99 - { - if (player.whoAmI == Main.myPlayer) + if (item.ranged && !CalamityMod.throwingItemList.Contains(item.type) && Main.rand.Next(2) == 0) { - Projectile.NewProjectile(position.X, position.Y, speedX * 1.25f, speedY * 1.25f, mod.ProjectileType("GodSlayerShrapnelRound"), (int)((double)damage * 2.1), 2f, player.whoAmI, 0f, 0f); + if (player.whoAmI == Main.myPlayer) + { + Projectile.NewProjectile(position.X, position.Y, speedX * 1.25f, speedY * 1.25f, mod.ProjectileType("ChaosFlare"), (int)((double)damage * 0.25), 2f, player.whoAmI, 0f, 0f); + } + } + } + if (godSlayerRanged) //0 - 99 + { + if (item.ranged && !CalamityMod.throwingItemList.Contains(item.type) && Main.rand.Next(0, 100) >= 95) + { + if (player.whoAmI == Main.myPlayer) + { + Projectile.NewProjectile(position.X, position.Y, speedX * 1.25f, speedY * 1.25f, mod.ProjectileType("GodSlayerShrapnelRound"), (int)((double)damage * (auricSet ? 3.2 : 2.1)), 2f, player.whoAmI, 0f, 0f); + } } } - if (ataxiaVolley && item.thrown && Main.rand.Next(10) == 0) + if (ataxiaVolley) { - if (player.whoAmI == Main.myPlayer) - { - Main.PlaySound(2, (int)player.position.X, (int)player.position.Y, 20); - float spread = 45f * 0.0174f; - double startAngle = Math.Atan2(player.velocity.X, player.velocity.Y) - spread / 2; - double deltaAngle = spread / 8f; - double offsetAngle; - int i; - for (i = 0; i < 4; i++) - { - Vector2 vector2 = new Vector2(player.Center.X, player.Center.Y); - offsetAngle = (startAngle + deltaAngle * (i + i * i) / 2f) + 32f * i; - Projectile.NewProjectile(vector2.X, vector2.Y, (float)(Math.Sin(offsetAngle) * 5f), (float)(Math.Cos(offsetAngle) * 5f), mod.ProjectileType("ChaosFlare2"), (int)((double)damage * 0.25), 1.25f, player.whoAmI, 0f, 0f); - Projectile.NewProjectile(vector2.X, vector2.Y, (float)( -Math.Sin(offsetAngle) * 5f ), (float)( -Math.Cos(offsetAngle) * 5f ), mod.ProjectileType("ChaosFlare2"), (int)((double)damage * 0.25), 1.25f, player.whoAmI, 0f, 0f); - } - } - } - if (reaverDoubleTap && item.ranged && Main.rand.Next(0, 100) >= 90) //0 - 99 - { - if (player.whoAmI == Main.myPlayer) - { - Projectile.NewProjectile(position.X, position.Y, speedX * 1.25f, speedY * 1.25f, mod.ProjectileType("MiniRocket"), (int)((double)damage * 1.8), 2f, player.whoAmI, 0f, 0f); - } - } - if (victideSet && (item.ranged || item.melee || item.magic || item.thrown || item.summon) && Main.rand.Next(10) == 0) - { - if (player.whoAmI == Main.myPlayer) + if (CalamityMod.throwingItemList.Contains(item.type) && Main.rand.Next(10) == 0) { - Projectile.NewProjectile(position.X, position.Y, speedX * 1.25f, speedY * 1.25f, mod.ProjectileType("Seashell"), damage * 2, 1f, player.whoAmI, 0f, 0f); + if (player.whoAmI == Main.myPlayer) + { + Main.PlaySound(2, (int)player.position.X, (int)player.position.Y, 20); + float spread = 45f * 0.0174f; + double startAngle = Math.Atan2(player.velocity.X, player.velocity.Y) - spread / 2; + double deltaAngle = spread / 8f; + double offsetAngle; + int i; + for (i = 0; i < 4; i++) + { + Vector2 vector2 = new Vector2(player.Center.X, player.Center.Y); + offsetAngle = (startAngle + deltaAngle * (i + i * i) / 2f) + 32f * i; + Projectile.NewProjectile(vector2.X, vector2.Y, (float)(Math.Sin(offsetAngle) * 5f), (float)(Math.Cos(offsetAngle) * 5f), mod.ProjectileType("ChaosFlare2"), (int)((double)damage * 0.5), 1.25f, player.whoAmI, 0f, 0f); + Projectile.NewProjectile(vector2.X, vector2.Y, (float)(-Math.Sin(offsetAngle) * 5f), (float)(-Math.Cos(offsetAngle) * 5f), mod.ProjectileType("ChaosFlare2"), (int)((double)damage * 0.5), 1.25f, player.whoAmI, 0f, 0f); + } + } + } + } + if (reaverDoubleTap) //0 - 99 + { + if (item.ranged && !CalamityMod.throwingItemList.Contains(item.type) && Main.rand.Next(0, 100) >= 90) + { + if (player.whoAmI == Main.myPlayer) + { + Projectile.NewProjectile(position.X, position.Y, speedX * 1.25f, speedY * 1.25f, mod.ProjectileType("MiniRocket"), (int)((double)damage * 1.3), 2f, player.whoAmI, 0f, 0f); + } + } + } + if (victideSet) + { + if ((item.ranged || item.melee || item.magic || + CalamityMod.throwingItemList.Contains(item.type) || + item.summon) && Main.rand.Next(10) == 0) + { + if (player.whoAmI == Main.myPlayer) + { + Projectile.NewProjectile(position.X, position.Y, speedX * 1.25f, speedY * 1.25f, mod.ProjectileType("Seashell"), damage * 2, 1f, player.whoAmI, 0f, 0f); + } } } return true; @@ -4969,6 +5878,9 @@ namespace CalamityMod #region OnHitNPC public override void OnHitNPC(Item item, NPC target, int damage, float knockback, bool crit) { + if (omegaBlueChestplate) + target.AddBuff(mod.BuffType("CrushDepth"), 240); + if (eGauntlet) { target.AddBuff(mod.BuffType("AbyssalFlames"), 120, false); @@ -5002,6 +5914,21 @@ namespace CalamityMod target.AddBuff(mod.BuffType("AbyssalFlames"), 120, false); } } + if (abyssalAmulet) + { + if (Main.rand.Next(4) == 0) + { + target.AddBuff(mod.BuffType("CrushDepth"), 360, false); + } + else if (Main.rand.Next(2) == 0) + { + target.AddBuff(mod.BuffType("CrushDepth"), 240, false); + } + else + { + target.AddBuff(mod.BuffType("CrushDepth"), 120, false); + } + } if (dsSetBonus) { if (Main.rand.Next(4) == 0) @@ -5032,21 +5959,6 @@ namespace CalamityMod target.AddBuff(44, 120, false); } } - if (aChicken) - { - if (Main.rand.Next(4) == 0) - { - target.AddBuff(mod.BuffType("HolyLight"), 360, false); - } - else if (Main.rand.Next(2) == 0) - { - target.AddBuff(mod.BuffType("HolyLight"), 240, false); - } - else - { - target.AddBuff(mod.BuffType("HolyLight"), 120, false); - } - } if (yInsignia) { if (Main.rand.Next(4) == 0) @@ -5094,15 +6006,15 @@ namespace CalamityMod } if (ataxiaGeyser && item.melee && !item.noMelee && !item.noUseGraphic) { - if (player.whoAmI == Main.myPlayer) + if (player.whoAmI == Main.myPlayer && player.ownedProjectileCounts[mod.ProjectileType("ChaosGeyser")] < 3) { Projectile.NewProjectile(target.Center.X, target.Center.Y, 0f, 0f, mod.ProjectileType("ChaosGeyser"), (int)((double)item.damage * 0.15), 2f, player.whoAmI, 0f, 0f); } } + if (target.type == NPCID.TargetDummy) - { return; - } + if (bloodflareMelee) { if (bloodflareMeleeHits < 15 && bloodflareFrenzyTimer <= 0 && bloodflareFrenzyCooldown <= 0) @@ -5111,7 +6023,7 @@ namespace CalamityMod } if (player.whoAmI == Main.myPlayer) { - int healAmount = (Main.rand.Next(5) + 1); + int healAmount = (Main.rand.Next(3) + 1); player.statLife += healAmount; player.HealEffect(healAmount); } @@ -5122,17 +6034,244 @@ namespace CalamityMod #region OnHitNPCWithProj public override void OnHitNPCWithProj(Projectile proj, NPC target, int damage, float knockback, bool crit) { + if (omegaBlueChestplate && proj.friendly && !target.friendly) + target.AddBuff(mod.BuffType("CrushDepth"), 240); + if (proj.melee && silvaMelee && Main.rand.Next(4) == 0) - { target.AddBuff(mod.BuffType("SilvaStun"), 20); - } - if (target.type != NPCID.TargetDummy) + + if (abyssalAmulet) { - if (player.whoAmI == Main.myPlayer && raiderTalisman && raiderStack < 250 && proj.thrown && crit) + if (Main.rand.Next(4) == 0) + { + target.AddBuff(mod.BuffType("CrushDepth"), 360, false); + } + else if (Main.rand.Next(2) == 0) + { + target.AddBuff(mod.BuffType("CrushDepth"), 240, false); + } + else + { + target.AddBuff(mod.BuffType("CrushDepth"), 120, false); + } + } + if (dsSetBonus) + { + if (Main.rand.Next(4) == 0) + { + target.AddBuff(mod.BuffType("DemonFlames"), 360, false); + } + else if (Main.rand.Next(2) == 0) + { + target.AddBuff(mod.BuffType("DemonFlames"), 240, false); + } + else + { + target.AddBuff(mod.BuffType("DemonFlames"), 120, false); + } + } + if (alchFlask) + { + if (Main.rand.Next(4) == 0) + { + target.AddBuff(mod.BuffType("Plague"), 360, false); + } + else if (Main.rand.Next(2) == 0) + { + target.AddBuff(mod.BuffType("Plague"), 240, false); + } + else + { + target.AddBuff(mod.BuffType("Plague"), 120, false); + } + } + if (proj.melee) + { + if (eGauntlet) + { + target.AddBuff(mod.BuffType("AbyssalFlames"), 120, false); + target.AddBuff(mod.BuffType("HolyLight"), 120, false); + target.AddBuff(mod.BuffType("Plague"), 120, false); + target.AddBuff(mod.BuffType("BrimstoneFlames"), 120, false); + if (Main.rand.Next(5) == 0) + { + target.AddBuff(mod.BuffType("GlacialState"), 120, false); + } + target.AddBuff(mod.BuffType("GodSlayerInferno"), 120, false); + target.AddBuff(BuffID.Poisoned, 120, false); + target.AddBuff(BuffID.OnFire, 120, false); + target.AddBuff(BuffID.CursedInferno, 120, false); + target.AddBuff(BuffID.Frostburn, 120, false); + target.AddBuff(BuffID.Ichor, 120, false); + target.AddBuff(BuffID.Venom, 120, false); + } + if (aWeapon) + { + if (Main.rand.Next(4) == 0) + { + target.AddBuff(mod.BuffType("AbyssalFlames"), 360, false); + } + else if (Main.rand.Next(2) == 0) + { + target.AddBuff(mod.BuffType("AbyssalFlames"), 240, false); + } + else + { + target.AddBuff(mod.BuffType("AbyssalFlames"), 120, false); + } + } + if (cryogenSoul || frostFlare) + { + if (Main.rand.Next(4) == 0) + { + target.AddBuff(44, 360, false); + } + else if (Main.rand.Next(2) == 0) + { + target.AddBuff(44, 240, false); + } + else + { + target.AddBuff(44, 120, false); + } + } + if (yInsignia) + { + if (Main.rand.Next(4) == 0) + { + target.AddBuff(mod.BuffType("HolyLight"), 360, false); + } + else if (Main.rand.Next(2) == 0) + { + target.AddBuff(mod.BuffType("HolyLight"), 240, false); + } + else + { + target.AddBuff(mod.BuffType("HolyLight"), 120, false); + } + } + if (ataxiaFire) + { + if (Main.rand.Next(4) == 0) + { + target.AddBuff(BuffID.OnFire, 720, false); + } + else if (Main.rand.Next(2) == 0) + { + target.AddBuff(BuffID.OnFire, 480, false); + } + else + { + target.AddBuff(BuffID.OnFire, 240, false); + } + } + } + if ((target.damage > 5 || target.boss) && player.whoAmI == Main.myPlayer && !target.SpawnedFromStatue) + { + if (gainLevelCooldown <= 0) //max is 12501 to avoid setting off fireworks forever + { + gainLevelCooldown = 120; //2 seconds + if (proj.melee && meleeLevel <= 12500) + { + if (!Main.hardMode && meleeLevel >= 1500) + { + gainLevelCooldown = 1200; //20 seconds + } + if (!NPC.downedMoonlord && meleeLevel >= 5500) + { + gainLevelCooldown = 2400; //40 seconds + } + meleeLevel++; + if (fasterMeleeLevel && meleeLevel % 100 != 0 && Main.rand.Next(10) == 0) //add only to non-multiples of 100 + meleeLevel++; + shootFireworksLevelUpMelee = true; + if (Main.netMode == 1) + { + LevelPacket(false, 0); + } + } + else if (proj.ranged && rangedLevel <= 12500) + { + if (!Main.hardMode && rangedLevel >= 1500) + { + gainLevelCooldown = 1200; //20 seconds + } + if (!NPC.downedMoonlord && rangedLevel >= 5500) + { + gainLevelCooldown = 2400; //40 seconds + } + rangedLevel++; + if (fasterRangedLevel && rangedLevel % 100 != 0 && Main.rand.Next(10) == 0) //add only to non-multiples of 100 + rangedLevel++; + shootFireworksLevelUpRanged = true; + if (Main.netMode == 1) + { + LevelPacket(false, 1); + } + } + else if (proj.magic && magicLevel <= 12500) + { + if (!Main.hardMode && magicLevel >= 1500) + { + gainLevelCooldown = 1200; //20 seconds + } + if (!NPC.downedMoonlord && magicLevel >= 5500) + { + gainLevelCooldown = 2400; //40 seconds + } + magicLevel++; + if (fasterMagicLevel && magicLevel % 100 != 0 && Main.rand.Next(10) == 0) //add only to non-multiples of 100 + magicLevel++; + shootFireworksLevelUpMagic = true; + if (Main.netMode == 1) + { + LevelPacket(false, 2); + } + } + else if (proj.minion && summonLevel <= 12500) + { + if (!Main.hardMode && summonLevel >= 1500) + { + gainLevelCooldown = 1200; //20 seconds + } + if (!NPC.downedMoonlord && summonLevel >= 5500) + { + gainLevelCooldown = 2400; //40 seconds + } + summonLevel++; + if (fasterSummonLevel && summonLevel % 100 != 0 && Main.rand.Next(10) == 0) //add only to non-multiples of 100 + summonLevel++; + shootFireworksLevelUpSummon = true; + if (Main.netMode == 1) + { + LevelPacket(false, 3); + } + } + else if (CalamityMod.throwingProjectileList.Contains(proj.type) && !proj.melee && rogueLevel <= 12500) + { + if (!Main.hardMode && rogueLevel >= 1500) + { + gainLevelCooldown = 1200; //20 seconds + } + if (!NPC.downedMoonlord && rogueLevel >= 5500) + { + gainLevelCooldown = 2400; //40 seconds + } + rogueLevel++; + if (fasterRogueLevel && rogueLevel % 100 != 0 && Main.rand.Next(10) == 0) //add only to non-multiples of 100 + rogueLevel++; + shootFireworksLevelUpRogue = true; + if (Main.netMode == 1) + { + LevelPacket(false, 4); + } + } + } + if (raiderTalisman && raiderStack < 250 && CalamityMod.throwingProjectileList.Contains(proj.type) && !proj.melee && crit) { raiderStack++; } - if (CalamityWorld.revenge && player.whoAmI == Main.myPlayer) + if (CalamityWorld.revenge) { if ((proj.melee && proj.ownerHitCheck) || proj.aiStyle == 15 || (proj.aiStyle == 75 && proj.melee) || proj.type == mod.ProjectileType("Nebulash") || proj.type == mod.ProjectileType("CosmicDischarge") || @@ -5159,6 +6298,244 @@ namespace CalamityMod } #endregion + #region PvP + public override void OnHitPvp(Item item, Player target, int damage, bool crit) + { + if (omegaBlueChestplate) + target.AddBuff(mod.BuffType("CrushDepth"), 240); + + if (eGauntlet) + { + target.AddBuff(mod.BuffType("AbyssalFlames"), 120, false); + target.AddBuff(mod.BuffType("HolyLight"), 120, false); + target.AddBuff(mod.BuffType("Plague"), 120, false); + target.AddBuff(mod.BuffType("BrimstoneFlames"), 120, false); + if (Main.rand.Next(5) == 0) + { + target.AddBuff(mod.BuffType("GlacialState"), 120, false); + } + target.AddBuff(mod.BuffType("GodSlayerInferno"), 120, false); + target.AddBuff(BuffID.Poisoned, 120, false); + target.AddBuff(BuffID.OnFire, 120, false); + target.AddBuff(BuffID.CursedInferno, 120, false); + target.AddBuff(BuffID.Frostburn, 120, false); + target.AddBuff(BuffID.Ichor, 120, false); + target.AddBuff(BuffID.Venom, 120, false); + } + if (aWeapon) + { + if (Main.rand.Next(4) == 0) + { + target.AddBuff(mod.BuffType("AbyssalFlames"), 360, false); + } + else if (Main.rand.Next(2) == 0) + { + target.AddBuff(mod.BuffType("AbyssalFlames"), 240, false); + } + else + { + target.AddBuff(mod.BuffType("AbyssalFlames"), 120, false); + } + } + if (abyssalAmulet) + { + if (Main.rand.Next(4) == 0) + { + target.AddBuff(mod.BuffType("CrushDepth"), 360, false); + } + else if (Main.rand.Next(2) == 0) + { + target.AddBuff(mod.BuffType("CrushDepth"), 240, false); + } + else + { + target.AddBuff(mod.BuffType("CrushDepth"), 120, false); + } + } + if (cryogenSoul || frostFlare) + { + if (Main.rand.Next(4) == 0) + { + target.AddBuff(44, 360, false); + } + else if (Main.rand.Next(2) == 0) + { + target.AddBuff(44, 240, false); + } + else + { + target.AddBuff(44, 120, false); + } + } + if (yInsignia) + { + if (Main.rand.Next(4) == 0) + { + target.AddBuff(mod.BuffType("HolyLight"), 360, false); + } + else if (Main.rand.Next(2) == 0) + { + target.AddBuff(mod.BuffType("HolyLight"), 240, false); + } + else + { + target.AddBuff(mod.BuffType("HolyLight"), 120, false); + } + } + if (ataxiaFire) + { + if (Main.rand.Next(4) == 0) + { + target.AddBuff(BuffID.OnFire, 720, false); + } + else if (Main.rand.Next(2) == 0) + { + target.AddBuff(BuffID.OnFire, 480, false); + } + else + { + target.AddBuff(BuffID.OnFire, 240, false); + } + } + if (alchFlask) + { + if (Main.rand.Next(4) == 0) + { + target.AddBuff(mod.BuffType("Plague"), 360, false); + } + else if (Main.rand.Next(2) == 0) + { + target.AddBuff(mod.BuffType("Plague"), 240, false); + } + else + { + target.AddBuff(mod.BuffType("Plague"), 120, false); + } + } + } + + public override void OnHitPvpWithProj(Projectile proj, Player target, int damage, bool crit) + { + if (omegaBlueChestplate) + target.AddBuff(mod.BuffType("CrushDepth"), 240); + + if (proj.melee && silvaMelee && Main.rand.Next(4) == 0) + target.AddBuff(mod.BuffType("SilvaStun"), 20); + + if (abyssalAmulet) + { + if (Main.rand.Next(4) == 0) + { + target.AddBuff(mod.BuffType("CrushDepth"), 360, false); + } + else if (Main.rand.Next(2) == 0) + { + target.AddBuff(mod.BuffType("CrushDepth"), 240, false); + } + else + { + target.AddBuff(mod.BuffType("CrushDepth"), 120, false); + } + } + if (alchFlask) + { + if (Main.rand.Next(4) == 0) + { + target.AddBuff(mod.BuffType("Plague"), 360, false); + } + else if (Main.rand.Next(2) == 0) + { + target.AddBuff(mod.BuffType("Plague"), 240, false); + } + else + { + target.AddBuff(mod.BuffType("Plague"), 120, false); + } + } + if (proj.melee) + { + if (eGauntlet) + { + target.AddBuff(mod.BuffType("AbyssalFlames"), 120, false); + target.AddBuff(mod.BuffType("HolyLight"), 120, false); + target.AddBuff(mod.BuffType("Plague"), 120, false); + target.AddBuff(mod.BuffType("BrimstoneFlames"), 120, false); + if (Main.rand.Next(5) == 0) + { + target.AddBuff(mod.BuffType("GlacialState"), 120, false); + } + target.AddBuff(mod.BuffType("GodSlayerInferno"), 120, false); + target.AddBuff(BuffID.Poisoned, 120, false); + target.AddBuff(BuffID.OnFire, 120, false); + target.AddBuff(BuffID.CursedInferno, 120, false); + target.AddBuff(BuffID.Frostburn, 120, false); + target.AddBuff(BuffID.Ichor, 120, false); + target.AddBuff(BuffID.Venom, 120, false); + } + if (aWeapon) + { + if (Main.rand.Next(4) == 0) + { + target.AddBuff(mod.BuffType("AbyssalFlames"), 360, false); + } + else if (Main.rand.Next(2) == 0) + { + target.AddBuff(mod.BuffType("AbyssalFlames"), 240, false); + } + else + { + target.AddBuff(mod.BuffType("AbyssalFlames"), 120, false); + } + } + if (cryogenSoul || frostFlare) + { + if (Main.rand.Next(4) == 0) + { + target.AddBuff(44, 360, false); + } + else if (Main.rand.Next(2) == 0) + { + target.AddBuff(44, 240, false); + } + else + { + target.AddBuff(44, 120, false); + } + } + if (yInsignia) + { + if (Main.rand.Next(4) == 0) + { + target.AddBuff(mod.BuffType("HolyLight"), 360, false); + } + else if (Main.rand.Next(2) == 0) + { + target.AddBuff(mod.BuffType("HolyLight"), 240, false); + } + else + { + target.AddBuff(mod.BuffType("HolyLight"), 120, false); + } + } + if (ataxiaFire) + { + if (Main.rand.Next(4) == 0) + { + target.AddBuff(BuffID.OnFire, 720, false); + } + else if (Main.rand.Next(2) == 0) + { + target.AddBuff(BuffID.OnFire, 480, false); + } + else + { + target.AddBuff(BuffID.OnFire, 240, false); + } + } + } + } + #endregion + #region ModifyHitNPC public override void ModifyHitNPC(Item item, NPC target, ref int damage, ref float knockback, ref bool crit) { @@ -5166,9 +6543,32 @@ namespace CalamityMod { damage *= 5; } - if (target.type != NPCID.TargetDummy) + if ((target.damage > 5 || target.boss) && player.whoAmI == Main.myPlayer && !target.SpawnedFromStatue) { - if (CalamityWorld.revenge && player.whoAmI == Main.myPlayer) + if (gainLevelCooldown <= 0) + { + gainLevelCooldown = 120; + if (item.melee && meleeLevel <= 12500) + { + if (!Main.hardMode && meleeLevel >= 1500) + { + gainLevelCooldown = 1200; //20 seconds + } + if (!NPC.downedMoonlord && meleeLevel >= 5500) + { + gainLevelCooldown = 2400; //40 seconds + } + meleeLevel++; + if (fasterMeleeLevel && meleeLevel % 100 != 0 && Main.rand.Next(10) == 0) //add only to non-multiples of 100 + meleeLevel++; + shootFireworksLevelUpMelee = true; + if (Main.netMode == 1) + { + LevelPacket(false, 0); + } + } + } + if (CalamityWorld.revenge) { if (item.shoot == 0 || item.shoot == mod.ProjectileType("NobodyKnows")) { @@ -5194,7 +6594,7 @@ namespace CalamityMod { if (player.whoAmI == Main.myPlayer) { - astralStarRainCooldown = 120; + astralStarRainCooldown = 60; for (int n = 0; n < 3; n++) { float x = target.position.X + (float)Main.rand.Next(-400, 400); @@ -5230,18 +6630,19 @@ namespace CalamityMod public override void ModifyHitNPCWithProj(Projectile proj, NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) { - if (auricSet && silvaThrowing && proj.thrown && crit && player.statLife > (int)((double)player.statLifeMax2 * 0.9)) + if (auricSet && silvaThrowing && CalamityMod.throwingProjectileList.Contains(proj.type) && !proj.melee && + crit && player.statLife > (int)((double)player.statLifeMax2 * 0.9)) { - damage = (int)((double)damage * 3.5); + damage = (int)((double)damage * 3.0); } if (auricSet && silvaMelee && proj.melee) { double multiplier = (double)player.statLife / (double)player.statLifeMax2; - if (multiplier < 0.4) + if (multiplier < 0.5) { - multiplier = 0.4; + multiplier = 0.5; } - damage = (int)(((double)damage * multiplier) * 2.5); //ranges from 2.5 times to 1 times + damage = (int)(((double)damage * multiplier) * 2.0); //ranges from 2.0 times to 1 times } if (godSlayerRanged && crit && proj.ranged) { @@ -5259,7 +6660,7 @@ namespace CalamityMod { tarraCrits++; } - if (tarraRanged && crit && proj.ranged && Main.netMode != 1) + if (tarraRanged && crit && proj.ranged && player.whoAmI == Main.myPlayer) { int num251 = Main.rand.Next(2, 4); for (int num252 = 0; num252 < num251; num252++) @@ -5272,27 +6673,43 @@ namespace CalamityMod value15.Normalize(); value15 *= (float)Main.rand.Next(70, 101) * 0.1f; int FUCKYOU = Projectile.NewProjectile(target.position.X + (float)(target.width / 2), target.position.Y + (float)(target.height / 2), - value15.X, value15.Y, 206, (int)((double)damage * 0.25), 0f, player.whoAmI, 0f, 0f); + value15.X, value15.Y, 206, (int)((double)damage * (auricSet ? 0.4 : 0.25)), 0f, player.whoAmI, 0f, 0f); Main.projectile[FUCKYOU].magic = false; Main.projectile[FUCKYOU].netUpdate = true; } } - if (tarraThrowing && tarraThrowingCritTimer <= 0 && tarraThrowingCrits < 25 && crit && proj.thrown) + if (tarraThrowing && tarraThrowingCritTimer <= 0 && tarraThrowingCrits < 25 && crit && + CalamityMod.throwingProjectileList.Contains(proj.type) && !proj.melee) { tarraThrowingCrits++; } - if (bloodflareThrowing && proj.thrown && crit) + if (bloodflareThrowing && CalamityMod.throwingProjectileList.Contains(proj.type) && !proj.melee && crit && Main.rand.Next(2) == 0) { if (player.whoAmI == Main.myPlayer) { - player.statLife += 1; - player.HealEffect(1); + float num11 = 0.03f; + num11 -= (float)proj.numHits * 0.015f; + if (num11 < 0f) + { + num11 = 0f; + } + float num12 = (float)proj.damage * num11; + if (num12 < 0f) + { + num12 = 0f; + } + if (player.lifeSteal > 0f) + { + player.statLife += 1; + player.HealEffect(1); + player.lifeSteal -= num12 * 2f; + } } } - if (bloodflareMage && crit && proj.magic && Main.netMode != 1) + if (bloodflareMage && bloodflareMageCooldown <= 0 && crit && proj.magic && player.whoAmI == Main.myPlayer) { - int num251 = Main.rand.Next(1, 3); - for (int num252 = 0; num252 < num251; num252++) + bloodflareMageCooldown = 120; + for (int i = 0; i < 3; i++) { Vector2 value15 = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101)); while (value15.X == 0f && value15.Y == 0f) @@ -5302,18 +6719,18 @@ namespace CalamityMod value15.Normalize(); value15 *= (float)Main.rand.Next(70, 101) * 0.1f; int fire = Projectile.NewProjectile(target.position.X + (float)(target.width / 2), target.position.Y + (float)(target.height / 2), - value15.X, value15.Y, 85, (int)((double)damage * 2.0), 0f, player.whoAmI, 0f, 0f); - Main.projectile[fire].ranged = false; + value15.X, value15.Y, 15, (int)((double)damage * (auricSet ? 11.0 : 6.0)), 0f, player.whoAmI, 0f, 0f); + Main.projectile[fire].magic = false; Main.projectile[fire].netUpdate = true; } } if (silvaCountdown > 0 && hasSilvaEffect && silvaRanged && proj.ranged) { - damage = (int)((double)damage * 1.5); + damage = (int)((double)damage * 1.4); } - if (silvaCountdown <= 0 && hasSilvaEffect && silvaThrowing && proj.thrown) + if (silvaCountdown <= 0 && hasSilvaEffect && silvaThrowing && CalamityMod.throwingProjectileList.Contains(proj.type) && !proj.melee) { - damage = (int)((double)damage * 1.2); + damage = (int)((double)damage * 1.1); } if (silvaCountdown <= 0 && hasSilvaEffect && silvaMage && proj.magic) { @@ -5321,7 +6738,7 @@ namespace CalamityMod } if (silvaCountdown <= 0 && hasSilvaEffect && silvaSummon && proj.minion) { - damage = (int)((double)damage * 1.15); + damage = (int)((double)damage * 1.1); } } #endregion @@ -5346,6 +6763,32 @@ namespace CalamityMod { damage /= 2; } + if (CalamityWorld.revenge) + { + if (CalamityMod.revengeanceEnemyBuffList.Contains(npc.type)) + damage = (int)((double)damage * 1.25); + } + if (player.whoAmI == Main.myPlayer && !player.immune && !lol && !invincible && !hasSilvaEffect) + { + if (CalamityWorld.revenge && !npc.SpawnedFromStatue) + { + int stressGain = (int)((double)damage * 10); + int stressMaxGain = 2500; + if (stressGain < 1) + { + stressGain = 1; + } + if (stressGain > stressMaxGain) + { + stressGain = stressMaxGain; + } + stress += stressGain; + if (stress >= stressMax) + { + stress = stressMax; + } + } + } } #endregion @@ -5358,14 +6801,43 @@ namespace CalamityMod } if (beeResist) { - if (CalamityMod.beeProjectileList.Contains(proj.type)) { damage = (int)((double)damage * 0.75); } + if (CalamityMod.beeProjectileList.Contains(proj.type)) + damage = (int)((double)damage * 0.75); } if (Main.hardMode && !CalamityWorld.spawnedHardBoss && proj.active && !proj.friendly && proj.hostile && damage > 0) { if (CalamityMod.hardModeNerfList.Contains(proj.type)) + damage = (int)((double)damage * 0.75); + } + if (CalamityWorld.downedDoG && (Main.pumpkinMoon || Main.snowMoon || Main.eclipse)) + { + if (CalamityMod.eventProjectileBuffList.Contains(proj.type)) + damage = (int)((double)damage * 1.5); + } + if (CalamityWorld.revenge) + { + if (CalamityMod.revengeanceProjectileBuffList.Contains(proj.type)) + damage = (int)((double)damage * 1.25); + } + if (player.whoAmI == Main.myPlayer && !player.immune && !lol && !invincible && !hasSilvaEffect) + { + if (CalamityWorld.revenge && !CalamityMod.trapProjectileList.Contains(proj.type)) { - double multiplier = Main.expertMode ? 0.6 : 0.8; - damage = (int)((double)damage * multiplier); + int stressGain = (int)((double)damage * 10); + int stressMaxGain = 2500; + if (stressGain < 1) + { + stressGain = 1; + } + if (stressGain > stressMaxGain) + { + stressGain = stressMaxGain; + } + stress += stressGain; + if (stress >= stressMax) + { + stress = stressMax; + } } } } @@ -5374,23 +6846,66 @@ namespace CalamityMod #region OnHit public override void OnHitByNPC(NPC npc, int damage, bool crit) { - if (CalamityGlobalNPC.lordeBoss >= 0) + if (CalamityWorld.revenge) { - player.AddBuff(mod.BuffType("NOU"), 15, true); + if (npc.type == NPCID.SkeletronPrime || npc.type == NPCID.PrimeVice || npc.type == NPCID.PrimeSaw) + { + player.AddBuff(BuffID.Bleeding, 300); + } + else if (npc.type == NPCID.Spazmatism && npc.ai[0] != 1f && npc.ai[0] != 2f && npc.ai[0] != 0f) + { + player.AddBuff(BuffID.Bleeding, 300); + } + else if (npc.type == NPCID.Plantera && npc.life < npc.lifeMax / 2) + { + player.AddBuff(BuffID.Poisoned, 180); + player.AddBuff(BuffID.Bleeding, 300); + } + else if (npc.type == NPCID.PlanterasTentacle) + { + player.AddBuff(BuffID.Poisoned, 90); + player.AddBuff(BuffID.Bleeding, 150); + } + else if (npc.type == NPCID.Golem || npc.type == NPCID.GolemFistLeft || npc.type == NPCID.GolemFistRight || + npc.type == NPCID.GolemHead || npc.type == NPCID.GolemHeadFree) + { + player.AddBuff(BuffID.BrokenArmor, 180); + } } } public override void OnHitByProjectile(Projectile proj, int damage, bool crit) { - if (CalamityGlobalNPC.lordeBoss >= 0) + if (CalamityWorld.revenge && proj.hostile) { - player.AddBuff(mod.BuffType("NOU"), 15, true); + if (proj.type == ProjectileID.FrostBeam && !player.frozen && !gState) + { + player.AddBuff(mod.BuffType("GlacialState"), 120); + } + else if (proj.type == ProjectileID.DeathLaser) + { + player.AddBuff(BuffID.OnFire, 180); + } + else if (proj.type == ProjectileID.Skull) + { + player.AddBuff(BuffID.Weak, 120); + } + else if (proj.type == ProjectileID.ThornBall) + { + player.AddBuff(BuffID.Poisoned, 180); + } + else if (proj.type == ProjectileID.CultistBossIceMist) + { + player.AddBuff(BuffID.Frozen, 60); + player.AddBuff(BuffID.Chilled, 120); + player.AddBuff(BuffID.Frostburn, 240); + } + else if (proj.type == ProjectileID.CultistBossLightningOrbArc) + { + player.AddBuff(BuffID.Electrified, 120); + } } - if (proj.type == 257 && proj.hostile && Main.rand.Next(2) == 0 && !player.frozen && !gState) - { - player.AddBuff(mod.BuffType("GlacialState"), 120); - } - if (projRef && proj.active && !proj.friendly && proj.hostile && damage > 0 && Main.rand.Next(10) == 0) + if (projRef && proj.active && !proj.friendly && proj.hostile && damage > 0 && Main.rand.Next(20) == 0) { player.statLife += damage; player.HealEffect(damage); @@ -5486,7 +7001,13 @@ namespace CalamityMod #region FrameEffects public override void FrameEffects() { - if ((abyssalDivingSuitPower || abyssalDivingSuitForce) && !abyssalDivingSuitHide) + if ((snowmanPower || snowmanForce) && !snowmanHide) + { + player.legs = mod.GetEquipSlot("PopoLeg", EquipType.Legs); + player.body = mod.GetEquipSlot("PopoBody", EquipType.Body); + player.head = (snowmanNoseless ? mod.GetEquipSlot("PopoNoselessHead", EquipType.Head) : mod.GetEquipSlot("PopoHead", EquipType.Head)); + } + else if ((abyssalDivingSuitPower || abyssalDivingSuitForce) && !abyssalDivingSuitHide) { player.legs = mod.GetEquipSlot("AbyssalDivingSuitLeg", EquipType.Legs); player.body = mod.GetEquipSlot("AbyssalDivingSuitBody", EquipType.Body); @@ -5505,13 +7026,11 @@ namespace CalamityMod player.head = mod.GetEquipSlot("SirenHeadAlt", EquipType.Head); } if (NOU) - { NOULOL(); - } + if (CalamityWorld.defiled) + Defiled(); if (weakPetrification) - { WeakPetrification(); - } } #endregion @@ -5550,6 +7069,11 @@ namespace CalamityMod player.balloon = -1; weakPetrification = true; } + + private void Defiled() + { + player.wingTimeMax = 0; + } #endregion #region HurtMethods @@ -5557,12 +7081,12 @@ namespace CalamityMod { if (CalamityWorld.armageddon) { - if (CalamityGlobalNPC.AnyBossNPCS()) + if (areThereAnyDamnBosses) { KillPlayer(); } } - if (lol || invincible) + if (lol || (invincible && player.inventory[player.selectedItem].type != mod.ItemType("ColdheartIcicle"))) { return false; } @@ -5570,56 +7094,49 @@ namespace CalamityMod { return false; } + if (player.beetleDefense && player.beetleOrbs > 0) + { + float newMult = 0.05f * (float)player.beetleOrbs; //.05 .1 .15 + damage = (int)((double)(1f + newMult) * (double)damage); //damage added for one orb : 100 damage = 1.05 * 100 = 105 + } if (CalamityGlobalNPC.DraedonMayhem) { damage = (int)((double)damage * 1.2); } - if (Main.pumpkinMoon && CalamityWorld.downedDoG) - { - damage = (int)((double)damage * 1.4); - } - else if (Main.snowMoon && CalamityWorld.downedDoG) - { - damage = (int)((double)damage * 1.3); - } - else if (Main.eclipse && CalamityWorld.downedYharon) - { - damage = (int)((double)damage * 1.6); - } if (dArtifact) { damage = (int)((double)damage * 1.25); } if (CalamityWorld.bossRushActive) { - switch (bossRushStage) + switch (CalamityWorld.bossRushStage) { case 0: - damage = (int)((double)damage * 3.0); //Tier 1 Queen Bee + damage = (int)((double)damage * 5.0); //Tier 1 Queen Bee values adjusted for a median of 250 damage break; case 1: - damage = (int)((double)damage * 3.0); //BoC + damage = (int)((double)damage * 4.0); //BoC break; case 2: - damage = (int)((double)damage * 3.0); //King Slime + damage = (int)((double)damage * 4.0); //King Slime break; case 3: - damage = (int)((double)damage * 4.0); //EoC + damage = (int)((double)damage * 6.0); //EoC break; case 4: - damage = (int)((double)damage * 2.0); //Prime + damage = (int)((double)damage * 2.5); //Prime break; case 5: - damage = (int)((double)damage * 1.75); //Golem + damage = (int)((double)damage * 2.5); //Golem break; case 6: - damage = (int)((double)damage * 1.25); //Guardians + damage = (int)((double)damage * 1.75); //Guardians break; case 7: - damage = (int)((double)damage * 3.5); //EoW + damage = (int)((double)damage * 5.0); //EoW break; case 8: - damage = (int)((double)damage * 2.0); //Tier 2 Astrageldon + damage = (int)((double)damage * 2.0); //Tier 2 Astrageldon values adjusted for a median of 300 damage break; case 9: damage = (int)((double)damage * 3.0); //Destroyer @@ -5631,10 +7148,10 @@ namespace CalamityMod damage = (int)((double)damage * 1.0); //Birb break; case 12: - damage = (int)((double)damage * 3.5); //WoF + damage = (int)((double)damage * 4.0); //WoF break; case 13: - damage = (int)((double)damage * 4.0); //Hive Mind + damage = (int)((double)damage * 4.5); //Hive Mind break; case 14: damage = (int)((double)damage * 4.0); //Skeletron @@ -5643,61 +7160,61 @@ namespace CalamityMod damage = (int)((double)damage * 1.25); //Storm Weaver break; case 16: - damage = (int)((double)damage * 2.5); //Tier 3 Aquatic Scourge + damage = (int)((double)damage * 3.0); //Tier 3 Aquatic Scourge values adjusted for a median of 350 damage break; case 17: - damage = (int)((double)damage * 4.75); //Desert Scourge + damage = (int)((double)damage * 6.0); //Desert Scourge break; case 18: - damage = (int)((double)damage * 2.5); //Cultist + damage = (int)((double)damage * 3.5); //Cultist break; case 19: - damage = (int)((double)damage * 4.75); //Crabulon + damage = (int)((double)damage * 4.5); //Crabulon break; case 20: - damage = (int)((double)damage * 2.5); //Plantera + damage = (int)((double)damage * 3.5); //Plantera break; case 21: - damage = (int)((double)damage * 1.5); //Void + damage = (int)((double)damage * 2.0); //Void break; case 22: - damage = (int)((double)damage * 4.75); //Perfs + damage = (int)((double)damage * 5.0); //Perfs break; case 23: - damage = (int)((double)damage * 3.0); //Cryogen + damage = (int)((double)damage * 4.0); //Cryogen break; case 24: - damage = (int)((double)damage * 3.25); //Tier 4 Brimstone Elemental + damage = (int)((double)damage * 4.0); //Tier 4 Brimstone Elemental values adjusted for a median of 400 damage break; case 25: - damage = (int)((double)damage * 1.75); //Signus + damage = (int)((double)damage * 2.0); //Signus break; case 26: damage = (int)((double)damage * 2.5); //Ravager break; case 27: - damage = (int)((double)damage * 3.25); //Fishron + damage = (int)((double)damage * 2.0); //Fishron break; case 28: damage = (int)((double)damage * 2.5); //Moon Lord break; case 29: - damage = (int)((double)damage * 2.5); //Astrum Deus + damage = (int)((double)damage * 2.75); //Astrum Deus break; case 30: - damage = (int)((double)damage * 1.75); //Polter + damage = (int)((double)damage * 2.0); //Polter break; case 31: damage = (int)((double)damage * 2.5); //Plaguebringer break; case 32: - damage = (int)((double)damage * 4.0); //Tier 5 Calamitas + damage = (int)((double)damage * 4.0); //Tier 5 Calamitas values adjusted for a median of 450 to 500 damage break; case 33: - damage = (int)((double)damage * 3.5); //Levi and Siren + damage = (int)((double)damage * 3.75); //Levi and Siren break; case 34: - damage = (int)((double)damage * 4.75); //Slime God + damage = (int)((double)damage * 5.25); //Slime God break; case 35: damage = (int)((double)damage * 2.5); //Providence @@ -5706,7 +7223,7 @@ namespace CalamityMod damage = (int)((double)damage * 1.0); //SCal break; case 37: - damage = (int)((double)damage * 1.25); //Yharon + damage = (int)((double)damage * 1.1); //Yharon break; case 38: damage = (int)((double)damage * 2.0); //DoG @@ -5719,18 +7236,6 @@ namespace CalamityMod } if (CalamityWorld.revenge) { - if (NPC.golemBoss > 0) - { - damage = (int)((double)damage * CalamityGlobalNPC.golemDamageBonus); - } - else if (NPC.AnyNPCs(NPCID.MoonLordCore)) - { - damage = (int)((double)damage * 1.1); - } - else if (NPC.AnyNPCs(NPCID.CultistBoss)) - { - damage = (int)((double)damage * 1.2); - } if (player.ichor) { damage = (int)((double)damage * 1.25); @@ -5740,14 +7245,14 @@ namespace CalamityMod damage = (int)((double)damage * 1.2); } customDamage = true; - float damageMult = CalamityWorld.downedBossAny ? 1.05f : 0.8f; + float damageMult = CalamityWorld.downedBossAny ? 1f : 0.8f; if (CalamityWorld.death) { - damageMult = 1.5f; + damageMult = 1.25f; } damage = (int)((double)damage * damageMult); - double newDamage = (double)damage - (double)player.statDefense * 0.625; - double newDamageLimit = 5.0 + (Main.hardMode ? 5.0 : 0.0) + (NPC.downedPlantBoss ? 5.0 : 0.0) + (NPC.downedMoonlord ? 15.0 : 0.0); //5, 10, 15, 30 + double newDamage = (double)damage - (double)player.statDefense * (Main.hardMode ? 0.75 : 0.5); + double newDamageLimit = 5.0 + (Main.hardMode ? 5.0 : 0.0) + (NPC.downedPlantBoss ? 5.0 : 0.0) + (NPC.downedMoonlord ? 5.0 : 0.0); //5, 10, 15, 20 if (newDamage < newDamageLimit) { newDamage = newDamageLimit; @@ -5777,23 +7282,19 @@ namespace CalamityMod } if (abyssalDivingSuitPlates) { - damage = (int)((double)damage * 0.75); + damage = (int)((double)damage * 0.85); } if (sirenIce) { - damage = (int)((double)damage * 0.75); + damage = (int)((double)damage * 0.8); } - if (auricSet) - { - damage = (int)((double)damage * 0.9); - } - else if (silvaSet) + if (auricSet || silvaSet) { damage = (int)((double)damage * 0.95); } if (revivifyTimer > 0) { - int healAmt = damage / 10; + int healAmt = damage / 20; player.statLife += healAmt; player.HealEffect(healAmt); } @@ -5805,7 +7306,7 @@ namespace CalamityMod } if (absorber) { - int healAmt = damage / 16; + int healAmt = damage / 20; player.statLife += healAmt; player.HealEffect(healAmt); } @@ -6014,6 +7515,10 @@ namespace CalamityMod public override void PostHurt(bool pvp, bool quiet, double damage, int hitDirection, bool crit) { + if (pArtifact) + { + player.AddBuff(mod.BuffType("BurntOut"), 300, true); + } if (CalamityGlobalNPC.SCal > -1 && CalamityWorld.revenge) { if (damage < 100) @@ -6034,24 +7539,6 @@ namespace CalamityMod bool hardMode = Main.hardMode; if (player.whoAmI == Main.myPlayer) { - if (CalamityWorld.revenge) - { - int stressGain = (int)((double)damage * 10); - int stressMaxGain = 2500; - if (stressGain < 1) - { - stressGain = 1; - } - if (stressGain > stressMaxGain) - { - stressGain = stressMaxGain; - } - stress += stressGain; - if (stress >= stressMax) - { - stress = stressMax; - } - } if (cTracers && damage > 200) { player.immuneTime += 60; @@ -6183,7 +7670,7 @@ namespace CalamityMod double deltaAngle = spread / 8f; double offsetAngle; int i; - int sDamage = hardMode ? 40 : 10; + int sDamage = hardMode ? 36 : 6; if (player.whoAmI == Main.myPlayer) { for (i = 0; i < 4; i++) @@ -6253,8 +7740,8 @@ namespace CalamityMod float xPos = Main.rand.Next(2) == 0 ? player.Center.X + 100 : player.Center.X - 100; Vector2 vector2 = new Vector2(xPos, player.Center.Y + Main.rand.Next(-100, 101)); offsetAngle = (startAngle + deltaAngle * (i + i * i) / 2f) + 32f * i; - int spore1 = Projectile.NewProjectile(vector2.X, vector2.Y, (float)(Math.Sin(offsetAngle) * 5f), (float)(Math.Cos(offsetAngle) * 5f), 567, rDamage, 2f, player.whoAmI, 0f, 0f); - int spore2 = Projectile.NewProjectile(vector2.X, vector2.Y, (float)(-Math.Sin(offsetAngle) * 5f), (float)(-Math.Cos(offsetAngle) * 5f), 568, rDamage, 2f, player.whoAmI, 0f, 0f); + Projectile.NewProjectile(vector2.X, vector2.Y, (float)(Math.Sin(offsetAngle) * 5f), (float)(Math.Cos(offsetAngle) * 5f), 567, rDamage, 2f, player.whoAmI, 0f, 0f); + Projectile.NewProjectile(vector2.X, vector2.Y, (float)(-Math.Sin(offsetAngle) * 5f), (float)(-Math.Cos(offsetAngle) * 5f), 568, rDamage, 2f, player.whoAmI, 0f, 0f); } } } @@ -6287,7 +7774,7 @@ namespace CalamityMod Main.PlaySound(2, (int)player.position.X, (int)player.position.Y, 74); if (player.whoAmI == Main.myPlayer) { - Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, 0f, mod.ProjectileType("GodSlayerBlaze"), 1200, 1f, player.whoAmI, 0f, 0f); + Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, 0f, mod.ProjectileType("GodSlayerBlaze"), (auricSet ? 2400 : 1200), 1f, player.whoAmI, 0f, 0f); } } } @@ -6338,7 +7825,7 @@ namespace CalamityMod player.lastDeathPostion = player.Center; player.lastDeathTime = DateTime.Now; player.showLastDeath = true; - bool specialDeath = CalamityWorld.ironHeart && CalamityGlobalNPC.AnyBossNPCS(); + bool specialDeath = CalamityWorld.ironHeart && areThereAnyDamnBosses; bool flag; int coinsOwned = (int)Utils.CoinsCount(out flag, player.inventory, new int[0]); if (Main.myPlayer == player.whoAmI) @@ -6649,9 +8136,9 @@ namespace CalamityMod if (player.dashDelay < 0) { float num7 = 12f; - float num8 = 0.992f; + float num8 = 0.985f; float num9 = Math.Max(player.accRunSpeed, player.maxRunSpeed); - float num10 = 0.96f; + float num10 = 0.94f; int num11 = 20; if (dashMod == 1) { @@ -6685,9 +8172,6 @@ namespace CalamityMod Main.dust[num14].fadeIn = 0.5f; } } - num7 = 14f; - num8 = 0.985f; - num10 = 0.94f; } else if (dashMod == 3) { @@ -6703,9 +8187,7 @@ namespace CalamityMod Main.dust[num14].fadeIn = 0.5f; } } - num7 = 16f; //14 - num8 = 0.985f; - num10 = 0.94f; + num7 = 14f; //14 } else if (dashMod == 4) { @@ -6721,9 +8203,7 @@ namespace CalamityMod Main.dust[num14].fadeIn = 0.5f; } } - num7 = 18f; //14 - num8 = 0.985f; - num10 = 0.94f; + num7 = 16f; //14 } if (dashMod > 0) { @@ -6793,7 +8273,7 @@ namespace CalamityMod } if (flag) { - player.velocity.X = 16.9f * (float)num16; //16.9 + player.velocity.X = 14.5f * (float)num16; //eoc dash amount Point point = (player.Center + new Vector2((float)(num16 * player.width / 2 + 2), player.gravDir * (float)(-(float)player.height) / 2f + player.gravDir * 2f)).ToTileCoordinates(); Point point2 = (player.Center + new Vector2((float)(num16 * player.width / 2 + 2), 0f)).ToTileCoordinates(); if (WorldGen.SolidOrSlopedTile(point.X, point.Y) || WorldGen.SolidOrSlopedTile(point2.X, point2.Y)) @@ -6855,7 +8335,7 @@ namespace CalamityMod } if (flag3) { - player.velocity.X = 21.9f * (float)num23; //21.9 14*1.564 + player.velocity.X = 16.9f * (float)num23; //tabi dash amount Point point5 = (player.Center + new Vector2((float)(num23 * player.width / 2 + 2), player.gravDir * (float)(-(float)player.height) / 2f + player.gravDir * 2f)).ToTileCoordinates(); Point point6 = (player.Center + new Vector2((float)(num23 * player.width / 2 + 2), 0f)).ToTileCoordinates(); if (WorldGen.SolidOrSlopedTile(point5.X, point5.Y) || WorldGen.SolidOrSlopedTile(point6.X, point6.Y)) @@ -6918,7 +8398,7 @@ namespace CalamityMod } if (flag3) { - player.velocity.X = 25f * (float)num23; //21.9 16*1.564 + player.velocity.X = 21.9f * (float)num23; //solar dash amount Point point5 = (player.Center + new Vector2((float)(num23 * player.width / 2 + 2), player.gravDir * (float)(-(float)player.height) / 2f + player.gravDir * 2f)).ToTileCoordinates(); Point point6 = (player.Center + new Vector2((float)(num23 * player.width / 2 + 2), 0f)).ToTileCoordinates(); if (WorldGen.SolidOrSlopedTile(point5.X, point5.Y) || WorldGen.SolidOrSlopedTile(point6.X, point6.Y)) @@ -6981,7 +8461,7 @@ namespace CalamityMod } if (flag3) { - player.velocity.X = 28.2f * (float)num23; //18*1.564 + player.velocity.X = 23.9f * (float)num23; //slighty more powerful solar dash Point point5 = (player.Center + new Vector2((float)(num23 * player.width / 2 + 2), player.gravDir * (float)(-(float)player.height) / 2f + player.gravDir * 2f)).ToTileCoordinates(); Point point6 = (player.Center + new Vector2((float)(num23 * player.width / 2 + 2), 0f)).ToTileCoordinates(); if (WorldGen.SolidOrSlopedTile(point5.X, point5.Y) || WorldGen.SolidOrSlopedTile(point6.X, point6.Y)) @@ -7012,7 +8492,7 @@ namespace CalamityMod if (player.whoAmI == Main.myPlayer && dodgeScarf && !scarfCooldown) { player.AddBuff(mod.BuffType("ScarfMeleeBoost"), Main.rand.Next(480, 561)); - player.AddBuff(mod.BuffType("ScarfCooldown"), ((player.chaosState && CalamityWorld.revenge) ? 1800 : 900)); + player.AddBuff(mod.BuffType("ScarfCooldown"), (player.chaosState ? 1800 : 900)); player.immune = true; player.immuneTime = 60; if (player.longInvince) @@ -7430,6 +8910,88 @@ namespace CalamityMod #endregion #region PacketStuff + private void ExactLevelPacket(bool server, int levelType) + { + ModPacket packet = mod.GetPacket(256); + switch (levelType) + { + case 0: + packet.Write((byte)CalamityModMessageType.ExactMeleeLevelSync); + packet.Write(player.whoAmI); + packet.Write(exactMeleeLevel); + break; + case 1: + packet.Write((byte)CalamityModMessageType.ExactRangedLevelSync); + packet.Write(player.whoAmI); + packet.Write(exactRangedLevel); + break; + case 2: + packet.Write((byte)CalamityModMessageType.ExactMagicLevelSync); + packet.Write(player.whoAmI); + packet.Write(exactMagicLevel); + break; + case 3: + packet.Write((byte)CalamityModMessageType.ExactSummonLevelSync); + packet.Write(player.whoAmI); + packet.Write(exactSummonLevel); + break; + case 4: + packet.Write((byte)CalamityModMessageType.ExactRogueLevelSync); + packet.Write(player.whoAmI); + packet.Write(exactRogueLevel); + break; + } + if (!server) + { + packet.Send(); + } + else + { + packet.Send(-1, player.whoAmI); + } + } + + private void LevelPacket(bool server, int levelType) + { + ModPacket packet = mod.GetPacket(256); + switch (levelType) + { + case 0: + packet.Write((byte)CalamityModMessageType.MeleeLevelSync); + packet.Write(player.whoAmI); + packet.Write(meleeLevel); + break; + case 1: + packet.Write((byte)CalamityModMessageType.RangedLevelSync); + packet.Write(player.whoAmI); + packet.Write(rangedLevel); + break; + case 2: + packet.Write((byte)CalamityModMessageType.MagicLevelSync); + packet.Write(player.whoAmI); + packet.Write(magicLevel); + break; + case 3: + packet.Write((byte)CalamityModMessageType.SummonLevelSync); + packet.Write(player.whoAmI); + packet.Write(summonLevel); + break; + case 4: + packet.Write((byte)CalamityModMessageType.RogueLevelSync); + packet.Write(player.whoAmI); + packet.Write(rogueLevel); + break; + } + if (!server) + { + packet.Send(); + } + else + { + packet.Send(-1, player.whoAmI); + } + } + private void StressPacket(bool server) { ModPacket packet = mod.GetPacket(256); @@ -7462,6 +9024,58 @@ namespace CalamityMod } } + internal void HandleExactLevels(BinaryReader reader, int levelType) + { + switch (levelType) + { + case 0: + exactMeleeLevel = reader.ReadInt32(); + break; + case 1: + exactRangedLevel = reader.ReadInt32(); + break; + case 2: + exactMagicLevel = reader.ReadInt32(); + break; + case 3: + exactSummonLevel = reader.ReadInt32(); + break; + case 4: + exactRogueLevel = reader.ReadInt32(); + break; + } + if (Main.netMode == 2) + { + ExactLevelPacket(true, levelType); + } + } + + internal void HandleLevels(BinaryReader reader, int levelType) + { + switch (levelType) + { + case 0: + meleeLevel = reader.ReadInt32(); + break; + case 1: + rangedLevel = reader.ReadInt32(); + break; + case 2: + magicLevel = reader.ReadInt32(); + break; + case 3: + summonLevel = reader.ReadInt32(); + break; + case 4: + rogueLevel = reader.ReadInt32(); + break; + } + if (Main.netMode == 2) + { + LevelPacket(true, levelType); + } + } + internal void HandleStress(BinaryReader reader) { stress = reader.ReadInt32(); @@ -7484,30 +9098,20 @@ namespace CalamityMod { if (Main.netMode == 1) { - StressPacket(false); + ExactLevelPacket(false, 0); + ExactLevelPacket(false, 1); + ExactLevelPacket(false, 2); + ExactLevelPacket(false, 3); + ExactLevelPacket(false, 4); + LevelPacket(false, 0); + LevelPacket(false, 1); + LevelPacket(false, 2); + LevelPacket(false, 3); + LevelPacket(false, 4); + StressPacket(false); AdrenalinePacket(false); } } #endregion - - #region ChangeTime - public void ChangeTime(bool day) - { - if (day) - { - Main.time = 0.0; - Main.dayTime = true; - } - else - { - Main.time = 0.0; - Main.dayTime = false; - } - if (Main.netMode == 2) - { - NetMessage.SendData(7, -1, -1, null, 0, 0f, 0f, 0f, 0, 0, 0); - } - } - #endregion } } diff --git a/CalamityWorld.cs b/CalamityWorld.cs index 5bb8fd1d26..7c5b752339 100644 --- a/CalamityWorld.cs +++ b/CalamityWorld.cs @@ -25,8 +25,14 @@ namespace CalamityMod #region InstanceVars #region NormalVars + public static int DoGSecondStageCountdown = 0; + public static bool bossRushActive = false; + public static bool deactivateStupidFuckingBullshit = false; + + public static int bossRushStage = 0; + public static int bossRushSpawnCountdown = 180; private const int ExpandWorldBy = 200; @@ -195,9 +201,9 @@ namespace CalamityMod #region Initialize public override void Initialize() { - CalamityPlayer.bossRushStage = 0; - CalamityGlobalNPC.golemDamageBonus = 1.0; - CalamityGlobalNPC.DoGSecondStageCountdown = 0; + NPC.LunarShieldPowerExpert = 100; + bossRushStage = 0; + DoGSecondStageCountdown = 0; CalamityGlobalNPC.holyBoss = -1; CalamityGlobalNPC.doughnutBoss = -1; CalamityGlobalNPC.voidBoss = -1; @@ -1197,7 +1203,7 @@ namespace CalamityMod int tilesY3 = WorldGen.genRand.Next((int)(y * .3f), (int)(y * .35f)); int tilesY4 = WorldGen.genRand.Next((int)(y * .35f), (int)(y * .5f)); int tilesY5 = WorldGen.genRand.Next((int)(y * .55f), (int)(y * .8f)); - int tilesY6 = y - 50; + int tilesY6 = y - 60; if ((Main.tile[tilesX3, tilesY3].type == 0 || Main.tile[tilesX3, tilesY3].type == 1) && CalamityWorld.genPureHut) { CalamityWorld.genPureHut = false; @@ -1634,13 +1640,14 @@ namespace CalamityMod while (!flag) { float num6 = (float)Main.maxTilesX * 0.08f; - int num7 = Main.rand.Next(150, Main.maxTilesX - 150); + int xLimit = Main.maxTilesX / 2; + int num7 = (abyssSide ? Main.rand.Next(150, xLimit) : Main.rand.Next(xLimit, Main.maxTilesX - 150)); while ((float)num7 > (float)Main.spawnTileX - num6 && (float)num7 < (float)Main.spawnTileX + num6) { - num7 = Main.rand.Next(150, Main.maxTilesX - 150); + num7 = (abyssSide ? Main.rand.Next(150, xLimit) : Main.rand.Next(xLimit, Main.maxTilesX - 150)); } //world surface = 920 large 740 medium 560 small - int k = (int)(Main.worldSurface * 0.5); //Large = 460, Medium = 370, Small = 280 + int k = (int)(Main.worldSurface * 0.6); //Large = 522, Medium = 444, Small = 336 while (k < Main.maxTilesY) { if (Main.tile[num7, k].active() && Main.tileSolid[(int)Main.tile[num7, k].type]) @@ -4622,6 +4629,484 @@ namespace CalamityMod #region PostUpdate public override void PostUpdate() { + int closestPlayer = (int)Player.FindClosest(new Vector2((float)(Main.maxTilesX / 2), (float)Main.worldSurface / 2f) * 16f, 0, 0); + #region BossRush + if (!deactivateStupidFuckingBullshit) + { + deactivateStupidFuckingBullshit = true; + bossRushActive = false; + if (Main.netMode == 2) + { + NetMessage.SendData(7, -1, -1, null, 0, 0f, 0f, 0f, 0, 0, 0); + } + } + if (bossRushActive) + { + if (NPC.MoonLordCountdown > 0) + { + NPC.MoonLordCountdown = 0; + } + if (!CalamityPlayer.areThereAnyDamnBosses) + { + if (bossRushSpawnCountdown > 0) + { + bossRushSpawnCountdown--; + if (bossRushSpawnCountdown == 180 && bossRushStage == 26) + { + string key = "Mods.CalamityMod.BossRushTierThreeEndText2"; + Color messageColor = Color.LightCoral; + if (Main.netMode == 0) + { + Main.NewText(Language.GetTextValue(key), messageColor); + } + else if (Main.netMode == 2) + { + NetMessage.BroadcastChatMessage(NetworkText.FromKey(key), messageColor); + } + } + if (bossRushSpawnCountdown == 210 && bossRushStage == 33) + { + string key = "Mods.CalamityMod.BossRushTierFourEndText2"; + Color messageColor = Color.LightCoral; + if (Main.netMode == 0) + { + Main.NewText(Language.GetTextValue(key), messageColor); + } + else if (Main.netMode == 2) + { + NetMessage.BroadcastChatMessage(NetworkText.FromKey(key), messageColor); + } + } + } + if (bossRushSpawnCountdown <= 0) + { + bossRushSpawnCountdown = 60; + if (bossRushStage > 25) + { + bossRushSpawnCountdown += 120; //3 seconds + } + if (bossRushStage > 32) + { + bossRushSpawnCountdown += 180; //6 seconds + } + switch (bossRushStage) + { + case 9: + bossRushSpawnCountdown = 240; + break; + case 18: + bossRushSpawnCountdown = 300; + break; + case 25: + bossRushSpawnCountdown = 360; + break; + case 32: + bossRushSpawnCountdown = 420; + break; + default: + break; + } + if (bossRushStage == 13) + { + for (int playerIndex = 0; playerIndex < 255; playerIndex++) + { + if (Main.player[playerIndex].active) + { + Player player = Main.player[playerIndex]; + player.Spawn(); + } + } + } + else if (bossRushStage == 36) + { + for (int playerIndex = 0; playerIndex < 255; playerIndex++) + { + if (Main.player[playerIndex].active) + { + Player player = Main.player[playerIndex]; + if (player.FindBuffIndex(mod.BuffType("ExtremeGravity")) > -1) + { + player.ClearBuff(mod.BuffType("ExtremeGravity")); + } + } + } + } + if (Main.netMode != 1) + { + Main.PlaySound(SoundID.Roar, Main.player[closestPlayer].position, 0); + switch (bossRushStage) + { + case 0: + NPC.SpawnOnPlayer(closestPlayer, NPCID.QueenBee); + break; + case 1: + NPC.SpawnOnPlayer(closestPlayer, NPCID.BrainofCthulhu); + break; + case 2: + NPC.SpawnOnPlayer(closestPlayer, NPCID.KingSlime); + break; + case 3: + ChangeTime(false); + NPC.SpawnOnPlayer(closestPlayer, NPCID.EyeofCthulhu); + break; + case 4: + ChangeTime(false); + NPC.SpawnOnPlayer(closestPlayer, NPCID.SkeletronPrime); + break; + case 5: + NPC.NewNPC((int)(Main.player[closestPlayer].position.X + (float)(Main.rand.Next(-100, 101))), + (int)(Main.player[closestPlayer].position.Y - 400f), + NPCID.Golem, 0, 0f, 0f, 0f, 0f, 255); + break; + case 6: + ChangeTime(true); + NPC.SpawnOnPlayer(closestPlayer, mod.NPCType("ProfanedGuardianBoss")); + NPC.SpawnOnPlayer(closestPlayer, mod.NPCType("ProfanedGuardianBoss2")); + NPC.SpawnOnPlayer(closestPlayer, mod.NPCType("ProfanedGuardianBoss3")); + break; + case 7: + NPC.SpawnOnPlayer(closestPlayer, NPCID.EaterofWorldsHead); + break; + case 8: + ChangeTime(false); + NPC.SpawnOnPlayer(closestPlayer, mod.NPCType("Astrageldon")); + break; + case 9: + ChangeTime(false); + NPC.SpawnOnPlayer(closestPlayer, NPCID.TheDestroyer); + break; + case 10: + ChangeTime(false); + NPC.SpawnOnPlayer(closestPlayer, NPCID.Spazmatism); + NPC.SpawnOnPlayer(closestPlayer, NPCID.Retinazer); + break; + case 11: + NPC.SpawnOnPlayer(closestPlayer, mod.NPCType("Bumblefuck")); + break; + case 12: + NPC.SpawnWOF(Main.player[closestPlayer].position); + break; + case 13: + NPC.SpawnOnPlayer(closestPlayer, mod.NPCType("HiveMind")); + break; + case 14: + ChangeTime(false); + NPC.SpawnOnPlayer(closestPlayer, NPCID.SkeletronHead); + break; + case 15: + NPC.SpawnOnPlayer(closestPlayer, mod.NPCType("StormWeaverHead")); + break; + case 16: + NPC.SpawnOnPlayer(closestPlayer, mod.NPCType("AquaticScourgeHead")); + break; + case 17: + NPC.SpawnOnPlayer(closestPlayer, mod.NPCType("DesertScourgeHead")); + NPC.SpawnOnPlayer(closestPlayer, mod.NPCType("DesertScourgeHeadSmall")); + NPC.SpawnOnPlayer(closestPlayer, mod.NPCType("DesertScourgeHeadSmall")); + break; + case 18: + int num1302 = NPC.NewNPC((int)Main.player[closestPlayer].Center.X, (int)Main.player[closestPlayer].Center.Y - 400, NPCID.CultistBoss, 0, 0f, 0f, 0f, 0f, 255); + Main.npc[num1302].direction = (Main.npc[num1302].spriteDirection = Math.Sign(Main.player[closestPlayer].Center.X - (float)Main.player[closestPlayer].Center.X - 90f)); + break; + case 19: + for (int doom = 0; doom < 200; doom++) + { + if (Main.npc[doom].active && (Main.npc[doom].type == 493 || Main.npc[doom].type == 422 || Main.npc[doom].type == 507 || + Main.npc[doom].type == 517)) + { + Main.npc[doom].active = false; + Main.npc[doom].netUpdate = true; + } + } + NPC.NewNPC((int)(Main.player[closestPlayer].position.X + (float)(Main.rand.Next(-100, 101))), (int)(Main.player[closestPlayer].position.Y - 400f), mod.NPCType("CrabulonIdle"), 0, 0f, 0f, 0f, 0f, 255); + break; + case 20: + NPC.SpawnOnPlayer(closestPlayer, NPCID.Plantera); + break; + case 21: + NPC.SpawnOnPlayer(closestPlayer, mod.NPCType("CeaselessVoid")); + break; + case 22: + NPC.SpawnOnPlayer(closestPlayer, mod.NPCType("PerforatorHive")); + break; + case 23: + NPC.SpawnOnPlayer(closestPlayer, mod.NPCType("Cryogen")); + break; + case 24: + NPC.SpawnOnPlayer(closestPlayer, mod.NPCType("BrimstoneElemental")); + break; + case 25: + NPC.SpawnOnPlayer(closestPlayer, mod.NPCType("CosmicWraith")); + break; + case 26: + NPC.NewNPC((int)(Main.player[closestPlayer].position.X + (float)(Main.rand.Next(-100, 101))), (int)(Main.player[closestPlayer].position.Y - 400f), mod.NPCType("ScavengerBody"), 0, 0f, 0f, 0f, 0f, 255); + break; + case 27: + NPC.NewNPC((int)(Main.player[closestPlayer].position.X + (float)(Main.rand.Next(-100, 101))), (int)(Main.player[closestPlayer].position.Y - 400f), NPCID.DukeFishron, 0, 0f, 0f, 0f, 0f, 255); + break; + case 28: + NPC.SpawnOnPlayer(closestPlayer, NPCID.MoonLordCore); + break; + case 29: + ChangeTime(false); + for (int x = 0; x < 10; x++) + { + NPC.SpawnOnPlayer(closestPlayer, mod.NPCType("AstrumDeusHead")); + } + NPC.SpawnOnPlayer(closestPlayer, mod.NPCType("AstrumDeusHeadSpectral")); + break; + case 30: + NPC.SpawnOnPlayer(closestPlayer, mod.NPCType("Polterghast")); + break; + case 31: + NPC.SpawnOnPlayer(closestPlayer, mod.NPCType("PlaguebringerGoliath")); + break; + case 32: + ChangeTime(false); + NPC.SpawnOnPlayer(closestPlayer, mod.NPCType("Calamitas")); + break; + case 33: + NPC.SpawnOnPlayer(closestPlayer, mod.NPCType("Siren")); + break; + case 34: + NPC.SpawnOnPlayer(closestPlayer, mod.NPCType("SlimeGod")); + NPC.SpawnOnPlayer(closestPlayer, mod.NPCType("SlimeGodRun")); + NPC.SpawnOnPlayer(closestPlayer, mod.NPCType("SlimeGodCore")); + break; + case 35: + ChangeTime(true); + NPC.SpawnOnPlayer(closestPlayer, mod.NPCType("Providence")); + break; + case 36: + NPC.SpawnOnPlayer(closestPlayer, mod.NPCType("SupremeCalamitas")); + break; + case 37: + NPC.SpawnOnPlayer(closestPlayer, mod.NPCType("Yharon")); + break; + case 38: + NPC.SpawnOnPlayer(closestPlayer, mod.NPCType("DevourerofGodsHeadS")); + break; + } + } + } + } + } + else + { + bossRushSpawnCountdown = 180; + if (bossRushStage != 0) + { + bossRushStage = 0; + if (Main.netMode == 2) + { + var netMessage = mod.GetPacket(); + netMessage.Write((byte)CalamityModMessageType.BossRushStage); + netMessage.Write(bossRushStage); + netMessage.Send(); + } + } + } + #endregion + #region SpawnDoG + if (DoGSecondStageCountdown > 0) //works + { + DoGSecondStageCountdown--; + if (Main.netMode == 2) + { + var netMessage = mod.GetPacket(); + netMessage.Write((byte)CalamityModMessageType.DoGCountdownSync); + netMessage.Write(DoGSecondStageCountdown); + netMessage.Send(); + } + if (Main.netMode != 1) + { + if (DoGSecondStageCountdown == 21540) + { + NPC.SpawnOnPlayer(closestPlayer, mod.NPCType("CeaselessVoid")); + } + if (DoGSecondStageCountdown == 14340) + { + NPC.SpawnOnPlayer(closestPlayer, mod.NPCType("StormWeaverHead")); + } + if (DoGSecondStageCountdown == 7140) + { + NPC.SpawnOnPlayer(closestPlayer, mod.NPCType("CosmicWraith")); + } + if (DoGSecondStageCountdown <= 60) + { + if (!NPC.AnyNPCs(mod.NPCType("DevourerofGodsHeadS"))) + { + NPC.SpawnOnPlayer(closestPlayer, mod.NPCType("DevourerofGodsHeadS")); + string key = "Mods.CalamityMod.EdgyBossText10"; + Color messageColor = Color.Cyan; + if (Main.netMode == 0) + { + Main.NewText(Language.GetTextValue(key), messageColor); + } + else if (Main.netMode == 2) + { + NetMessage.BroadcastChatMessage(NetworkText.FromKey(key), messageColor); + } + } + } + } + } + #endregion + if (Main.player[closestPlayer].ZoneDungeon && !NPC.downedBoss3) + { + if (!NPC.AnyNPCs(NPCID.DungeonGuardian) && Main.netMode != 1) + NPC.SpawnOnPlayer(closestPlayer, NPCID.DungeonGuardian); //your hell is as vast as my bonergrin, pray your life ends quickly + } + if (Main.player[closestPlayer].ZoneRockLayerHeight && + !Main.player[closestPlayer].ZoneUnderworldHeight) //works + { + if (NPC.downedPlantBoss && + !Main.player[closestPlayer].GetModPlayer(mod).ZoneAbyss && + Main.player[closestPlayer].townNPCs < 3f) + { + if ((Main.player[closestPlayer].GetModPlayer(mod).zerg && Main.rand.Next(1000) == 0) || Main.rand.Next(25000) == 0) + { + if (!NPC.AnyNPCs(mod.NPCType("ArmoredDiggerHead")) && Main.netMode != 1) + NPC.SpawnOnPlayer(closestPlayer, mod.NPCType("ArmoredDiggerHead")); + } + } + } + if (Main.dayTime && Main.hardMode) //works + { + if (Main.player[closestPlayer].townNPCs >= 2f) + { + if (Main.rand.Next(2000) == 0) + { + int steamGril = NPC.FindFirstNPC(NPCID.Steampunker); + if (steamGril == -1 && Main.netMode != 1) + NPC.SpawnOnPlayer(closestPlayer, NPCID.Steampunker); + } + } + } + if (Main.player[closestPlayer].GetModPlayer(mod).ZoneAbyss) + { + if (Main.player[closestPlayer].chaosState) + { + if (!NPC.AnyNPCs(mod.NPCType("EidolonWyrmHeadHuge")) && Main.netMode != 1) + NPC.SpawnOnPlayer(closestPlayer, mod.NPCType("EidolonWyrmHeadHuge")); + } + } + #region DeathModeBossSpawns + if (death) + { + if (!CalamityPlayer.areThereAnyDamnBosses && Main.netMode != 1) + { + if (!NPC.downedBoss1) + if (!Main.dayTime && (Main.player[closestPlayer].ZoneOverworldHeight || Main.player[closestPlayer].ZoneSkyHeight) && Main.rand.Next(1000) == 0) + NPC.SpawnOnPlayer(closestPlayer, NPCID.EyeofCthulhu); + + if (!NPC.downedBoss2) + if (Main.player[closestPlayer].ZoneCorrupt && Main.rand.Next(1000) == 0) + NPC.SpawnOnPlayer(closestPlayer, NPCID.EaterofWorldsHead); + + if (!NPC.downedBoss2) + if (Main.player[closestPlayer].ZoneCrimson && Main.rand.Next(1000) == 0) + NPC.SpawnOnPlayer(closestPlayer, NPCID.BrainofCthulhu); + + if (!NPC.downedQueenBee) + if (Main.player[closestPlayer].ZoneJungle && (Main.player[closestPlayer].ZoneOverworldHeight || Main.player[closestPlayer].ZoneSkyHeight) && Main.rand.Next(1000) == 0) + NPC.SpawnOnPlayer(closestPlayer, NPCID.QueenBee); + + if (!downedDesertScourge) + { + if (Main.player[closestPlayer].ZoneDesert && Main.player[closestPlayer].ZoneOverworldHeight && Main.rand.Next(1000) == 0) + { + NPC.SpawnOnPlayer(closestPlayer, mod.NPCType("DesertScourgeHead")); + NPC.SpawnOnPlayer(closestPlayer, mod.NPCType("DesertScourgeHeadSmall")); + NPC.SpawnOnPlayer(closestPlayer, mod.NPCType("DesertScourgeHeadSmall")); + } + } + + if (!downedPerforator) + if (Main.player[closestPlayer].ZoneCrimson && Main.rand.Next(1000) == 0) + NPC.SpawnOnPlayer(closestPlayer, mod.NPCType("PerforatorHive")); + + if (!downedHiveMind) + if (Main.player[closestPlayer].ZoneCorrupt && Main.rand.Next(1000) == 0) + NPC.SpawnOnPlayer(closestPlayer, mod.NPCType("HiveMind")); + + if (!downedCrabulon) + if (Main.player[closestPlayer].ZoneGlowshroom && Main.rand.Next(1000) == 0) + NPC.SpawnOnPlayer(closestPlayer, mod.NPCType("CrabulonIdle")); + + if (!downedSlimeGod) + { + if (Main.slimeRain && Main.player[closestPlayer].ZoneOverworldHeight && Main.rand.Next(1000) == 0) + { + NPC.SpawnOnPlayer(closestPlayer, mod.NPCType("SlimeGod")); + NPC.SpawnOnPlayer(closestPlayer, mod.NPCType("SlimeGodRun")); + NPC.SpawnOnPlayer(closestPlayer, mod.NPCType("SlimeGodCore")); + } + } + + if (Main.hardMode) + { + if (!NPC.downedMechBoss1) + if (!Main.dayTime && (Main.player[closestPlayer].ZoneOverworldHeight || Main.player[closestPlayer].ZoneSkyHeight) && Main.rand.Next(1000) == 0) + NPC.SpawnOnPlayer(closestPlayer, NPCID.TheDestroyer); + + if (!NPC.downedMechBoss2) + { + if (!Main.dayTime && (Main.player[closestPlayer].ZoneOverworldHeight || Main.player[closestPlayer].ZoneSkyHeight) && Main.rand.Next(1000) == 0) + { + NPC.SpawnOnPlayer(closestPlayer, NPCID.Spazmatism); + NPC.SpawnOnPlayer(closestPlayer, NPCID.Retinazer); + } + } + + if (!NPC.downedMechBoss3) + if (!Main.dayTime && (Main.player[closestPlayer].ZoneOverworldHeight || Main.player[closestPlayer].ZoneSkyHeight) && Main.rand.Next(1000) == 0) + NPC.SpawnOnPlayer(closestPlayer, NPCID.SkeletronPrime); + + if (!NPC.downedPlantBoss) + if (Main.player[closestPlayer].ZoneJungle && !Main.player[closestPlayer].ZoneOverworldHeight && !Main.player[closestPlayer].ZoneSkyHeight && Main.rand.Next(1000) == 0) + NPC.SpawnOnPlayer(closestPlayer, NPCID.Plantera); + + if (!NPC.downedFishron) + if (Main.player[closestPlayer].ZoneBeach && Main.player[closestPlayer].ZoneOverworldHeight && Main.rand.Next(1000) == 0) + NPC.SpawnOnPlayer(closestPlayer, NPCID.DukeFishron); + + if (!downedCryogen) + if (Main.player[closestPlayer].ZoneSnow && Main.player[closestPlayer].ZoneOverworldHeight && Main.rand.Next(1000) == 0) + NPC.SpawnOnPlayer(closestPlayer, mod.NPCType("Cryogen")); + + if (!downedCalamitas) + if (!Main.dayTime && Main.player[closestPlayer].ZoneOverworldHeight && Main.rand.Next(1000) == 0) + NPC.SpawnOnPlayer(closestPlayer, mod.NPCType("Calamitas")); + + if (!downedAstrageldon) + if (Main.player[closestPlayer].GetModPlayer(mod).ZoneAstral && !Main.dayTime && Main.player[closestPlayer].ZoneOverworldHeight && Main.rand.Next(1000) == 0) + NPC.SpawnOnPlayer(closestPlayer, mod.NPCType("Astrageldon")); + + if (!downedPlaguebringer) + if (Main.player[closestPlayer].ZoneJungle && NPC.downedGolemBoss && Main.player[closestPlayer].ZoneOverworldHeight && Main.rand.Next(1000) == 0) + NPC.SpawnOnPlayer(closestPlayer, mod.NPCType("PlaguebringerGoliath")); + + if (NPC.downedMoonlord) + { + if (!downedGuardians) + { + if ((Main.player[closestPlayer].ZoneUnderworldHeight || (Main.player[closestPlayer].ZoneHoly && Main.player[closestPlayer].ZoneOverworldHeight)) && Main.rand.Next(1000) == 0) + { + NPC.SpawnOnPlayer(closestPlayer, mod.NPCType("ProfanedGuardianBoss")); + NPC.SpawnOnPlayer(closestPlayer, mod.NPCType("ProfanedGuardianBoss2")); + NPC.SpawnOnPlayer(closestPlayer, mod.NPCType("ProfanedGuardianBoss3")); + } + } + + if (!downedBumble) + if (Main.player[closestPlayer].ZoneJungle && Main.player[closestPlayer].ZoneOverworldHeight && Main.rand.Next(1000) == 0) + NPC.SpawnOnPlayer(closestPlayer, mod.NPCType("Bumblefuck")); + } + } + } + } + #endregion if (!NPC.downedBoss3 && revenge) { if (Main.netMode != 1) @@ -4727,44 +5212,6 @@ namespace CalamityMod netMessage.Send(); } } - #region SpawnDoG - if (CalamityGlobalNPC.DoGSecondStageCountdown > 0) - { - CalamityGlobalNPC.DoGSecondStageCountdown--; - if (Main.netMode != 1) - { - if (CalamityGlobalNPC.DoGSecondStageCountdown == 21540) - { - NPC.SpawnOnPlayer((int)Player.FindClosest(new Vector2((float)(Main.maxTilesX / 2), (float)Main.worldSurface / 2f) * 16f, 0, 0), mod.NPCType("CeaselessVoid")); - } - if (CalamityGlobalNPC.DoGSecondStageCountdown == 14340) - { - NPC.SpawnOnPlayer((int)Player.FindClosest(new Vector2((float)(Main.maxTilesX / 2), (float)Main.worldSurface / 2f) * 16f, 0, 0), mod.NPCType("StormWeaverHead")); - } - if (CalamityGlobalNPC.DoGSecondStageCountdown == 7140) - { - NPC.SpawnOnPlayer((int)Player.FindClosest(new Vector2((float)(Main.maxTilesX / 2), (float)Main.worldSurface / 2f) * 16f, 0, 0), mod.NPCType("CosmicWraith")); - } - if (CalamityGlobalNPC.DoGSecondStageCountdown <= 60) - { - if (!NPC.AnyNPCs(mod.NPCType("DevourerofGodsHeadS"))) - { - NPC.SpawnOnPlayer((int)Player.FindClosest(new Vector2((float)(Main.maxTilesX / 2), (float)Main.worldSurface / 2f) * 16f, 0, 0), mod.NPCType("DevourerofGodsHeadS")); - string key = "Mods.CalamityMod.EdgyBossText10"; - Color messageColor = Color.Cyan; - if (Main.netMode == 0) - { - Main.NewText(Language.GetTextValue(key), messageColor); - } - else if (Main.netMode == 2) - { - NetMessage.BroadcastChatMessage(NetworkText.FromKey(key), messageColor); - } - } - } - } - } - #endregion if (Main.netMode != 1) { if (revenge) @@ -4783,5 +5230,25 @@ namespace CalamityMod } } #endregion + + #region ChangeTime + public static void ChangeTime(bool day) + { + if (day) + { + Main.time = 0.0; + Main.dayTime = true; + } + else + { + Main.time = 0.0; + Main.dayTime = false; + } + if (Main.netMode == 2) + { + NetMessage.SendData(7, -1, -1, null, 0, 0f, 0f, 0f, 0, 0, 0); + } + } + #endregion } } diff --git a/ExtraTextures/Chains/OmegaBlueTentacleSegment.png b/ExtraTextures/Chains/OmegaBlueTentacleSegment.png new file mode 100644 index 0000000000..f14dd0415f Binary files /dev/null and b/ExtraTextures/Chains/OmegaBlueTentacleSegment.png differ diff --git a/ExtraTextures/Mana3.png b/ExtraTextures/Mana3.png index 66a9e6b12c..a8e3454d64 100644 Binary files a/ExtraTextures/Mana3.png and b/ExtraTextures/Mana3.png differ diff --git a/ExtraTextures/Mana4.png b/ExtraTextures/Mana4.png index a8e3454d64..66a9e6b12c 100644 Binary files a/ExtraTextures/Mana4.png and b/ExtraTextures/Mana4.png differ diff --git a/ExtraTextures/UI/BarAdrenalineBorder.png b/ExtraTextures/UI/BarAdrenalineBorder.png new file mode 100644 index 0000000000..080bea5f35 Binary files /dev/null and b/ExtraTextures/UI/BarAdrenalineBorder.png differ diff --git a/ExtraTextures/UI/BarStressBorder.png b/ExtraTextures/UI/BarStressBorder.png index 7770c7348c..f49eb4f226 100644 Binary files a/ExtraTextures/UI/BarStressBorder.png and b/ExtraTextures/UI/BarStressBorder.png differ diff --git a/Gores/BobbitWorm.png b/Gores/BobbitWorm.png new file mode 100644 index 0000000000..d421321607 Binary files /dev/null and b/Gores/BobbitWorm.png differ diff --git a/Gores/BobbitWorm2.png b/Gores/BobbitWorm2.png new file mode 100644 index 0000000000..a3590cbd8a Binary files /dev/null and b/Gores/BobbitWorm2.png differ diff --git a/Gores/BobbitWorm3.png b/Gores/BobbitWorm3.png new file mode 100644 index 0000000000..433dccd8f2 Binary files /dev/null and b/Gores/BobbitWorm3.png differ diff --git a/Gores/BobbitWorm4.png b/Gores/BobbitWorm4.png new file mode 100644 index 0000000000..288fe8c477 Binary files /dev/null and b/Gores/BobbitWorm4.png differ diff --git a/Gores/BrimstoneGore1.png b/Gores/BrimstoneGore1.png index ee9170aff2..00727f5496 100644 Binary files a/Gores/BrimstoneGore1.png and b/Gores/BrimstoneGore1.png differ diff --git a/Gores/BrimstoneGore2.png b/Gores/BrimstoneGore2.png index b5130d3655..60018b78f0 100644 Binary files a/Gores/BrimstoneGore2.png and b/Gores/BrimstoneGore2.png differ diff --git a/Gores/BrimstoneGore3.png b/Gores/BrimstoneGore3.png index 9552beb0dc..ddd772c6cc 100644 Binary files a/Gores/BrimstoneGore3.png and b/Gores/BrimstoneGore3.png differ diff --git a/Gores/BrimstoneGore4.png b/Gores/BrimstoneGore4.png index 1251ef51ef..bee4416d9d 100644 Binary files a/Gores/BrimstoneGore4.png and b/Gores/BrimstoneGore4.png differ diff --git a/Gores/ColossalSquid.png b/Gores/ColossalSquid.png new file mode 100644 index 0000000000..65a479847e Binary files /dev/null and b/Gores/ColossalSquid.png differ diff --git a/Gores/ColossalSquid2.png b/Gores/ColossalSquid2.png new file mode 100644 index 0000000000..6d652cb849 Binary files /dev/null and b/Gores/ColossalSquid2.png differ diff --git a/Gores/ColossalSquid3.png b/Gores/ColossalSquid3.png new file mode 100644 index 0000000000..1f72e8ab3b Binary files /dev/null and b/Gores/ColossalSquid3.png differ diff --git a/Gores/ColossalSquid4.png b/Gores/ColossalSquid4.png new file mode 100644 index 0000000000..aa4e0d4e67 Binary files /dev/null and b/Gores/ColossalSquid4.png differ diff --git a/Gores/CryoSpirit.png b/Gores/CryoSpirit.png new file mode 100644 index 0000000000..91cf54199d Binary files /dev/null and b/Gores/CryoSpirit.png differ diff --git a/Gores/Cryocore.png b/Gores/Cryocore.png new file mode 100644 index 0000000000..cbf2143aa0 Binary files /dev/null and b/Gores/Cryocore.png differ diff --git a/Gores/Cryocore2.png b/Gores/Cryocore2.png new file mode 100644 index 0000000000..e63a1f27e0 Binary files /dev/null and b/Gores/Cryocore2.png differ diff --git a/Gores/DevilFishMask1.png b/Gores/DevilFishMask1.png new file mode 100644 index 0000000000..9286f11f74 Binary files /dev/null and b/Gores/DevilFishMask1.png differ diff --git a/Gores/DevilFishMask2.png b/Gores/DevilFishMask2.png new file mode 100644 index 0000000000..26db563d73 Binary files /dev/null and b/Gores/DevilFishMask2.png differ diff --git a/Gores/DevilFishMask3.png b/Gores/DevilFishMask3.png new file mode 100644 index 0000000000..f75512e206 Binary files /dev/null and b/Gores/DevilFishMask3.png differ diff --git a/Gores/DoGS.png b/Gores/DoGS.png new file mode 100644 index 0000000000..7932872743 Binary files /dev/null and b/Gores/DoGS.png differ diff --git a/Gores/DoGS2.png b/Gores/DoGS2.png new file mode 100644 index 0000000000..d5ab52b6eb Binary files /dev/null and b/Gores/DoGS2.png differ diff --git a/Gores/DoGS3.png b/Gores/DoGS3.png new file mode 100644 index 0000000000..ec174780d1 Binary files /dev/null and b/Gores/DoGS3.png differ diff --git a/Gores/DoGS4.png b/Gores/DoGS4.png new file mode 100644 index 0000000000..57441bc6f8 Binary files /dev/null and b/Gores/DoGS4.png differ diff --git a/Gores/DoGS5.png b/Gores/DoGS5.png new file mode 100644 index 0000000000..a3c20935ec Binary files /dev/null and b/Gores/DoGS5.png differ diff --git a/Gores/DoGS6.png b/Gores/DoGS6.png new file mode 100644 index 0000000000..f338c5d8e6 Binary files /dev/null and b/Gores/DoGS6.png differ diff --git a/Gores/DoT.png b/Gores/DoT.png new file mode 100644 index 0000000000..f2b6399478 Binary files /dev/null and b/Gores/DoT.png differ diff --git a/Gores/DoT2.png b/Gores/DoT2.png new file mode 100644 index 0000000000..26bb1f3093 Binary files /dev/null and b/Gores/DoT2.png differ diff --git a/Gores/DoT3.png b/Gores/DoT3.png new file mode 100644 index 0000000000..5fad409925 Binary files /dev/null and b/Gores/DoT3.png differ diff --git a/Gores/DoT4.png b/Gores/DoT4.png new file mode 100644 index 0000000000..c39ad60691 Binary files /dev/null and b/Gores/DoT4.png differ diff --git a/Gores/DoT5.png b/Gores/DoT5.png new file mode 100644 index 0000000000..afb32a106d Binary files /dev/null and b/Gores/DoT5.png differ diff --git a/Gores/GiantSquid.png b/Gores/GiantSquid.png new file mode 100644 index 0000000000..c67bf9e0c6 Binary files /dev/null and b/Gores/GiantSquid.png differ diff --git a/Gores/GiantSquid2.png b/Gores/GiantSquid2.png new file mode 100644 index 0000000000..23797b4967 Binary files /dev/null and b/Gores/GiantSquid2.png differ diff --git a/Gores/GiantSquid3.png b/Gores/GiantSquid3.png new file mode 100644 index 0000000000..2267863c0f Binary files /dev/null and b/Gores/GiantSquid3.png differ diff --git a/Gores/GiantSquid4.png b/Gores/GiantSquid4.png new file mode 100644 index 0000000000..49d7793b80 Binary files /dev/null and b/Gores/GiantSquid4.png differ diff --git a/Gores/Gnasher.png b/Gores/Gnasher.png new file mode 100644 index 0000000000..5db74a12a4 Binary files /dev/null and b/Gores/Gnasher.png differ diff --git a/Gores/Gnasher2.png b/Gores/Gnasher2.png new file mode 100644 index 0000000000..d87b47f129 Binary files /dev/null and b/Gores/Gnasher2.png differ diff --git a/Gores/GulperEel.png b/Gores/GulperEel.png new file mode 100644 index 0000000000..65a12da214 Binary files /dev/null and b/Gores/GulperEel.png differ diff --git a/Gores/GulperEel2.png b/Gores/GulperEel2.png new file mode 100644 index 0000000000..306eef3487 Binary files /dev/null and b/Gores/GulperEel2.png differ diff --git a/Gores/GulperEel3.png b/Gores/GulperEel3.png new file mode 100644 index 0000000000..3186171c0f Binary files /dev/null and b/Gores/GulperEel3.png differ diff --git a/Gores/GulperEel4.png b/Gores/GulperEel4.png new file mode 100644 index 0000000000..b8b9bcb777 Binary files /dev/null and b/Gores/GulperEel4.png differ diff --git a/Gores/Hive.png b/Gores/Hive.png new file mode 100644 index 0000000000..95cbe86cfe Binary files /dev/null and b/Gores/Hive.png differ diff --git a/Gores/Hive2.png b/Gores/Hive2.png new file mode 100644 index 0000000000..6ccbbc8fb8 Binary files /dev/null and b/Gores/Hive2.png differ diff --git a/Gores/Hive3.png b/Gores/Hive3.png new file mode 100644 index 0000000000..67ab9cb809 Binary files /dev/null and b/Gores/Hive3.png differ diff --git a/Gores/Hive4.png b/Gores/Hive4.png new file mode 100644 index 0000000000..e9d6776bf1 Binary files /dev/null and b/Gores/Hive4.png differ diff --git a/Gores/LargePerf.png b/Gores/LargePerf.png new file mode 100644 index 0000000000..36a21be47e Binary files /dev/null and b/Gores/LargePerf.png differ diff --git a/Gores/LargePerf2.png b/Gores/LargePerf2.png new file mode 100644 index 0000000000..c449ccb9f7 Binary files /dev/null and b/Gores/LargePerf2.png differ diff --git a/Gores/LargePerf3.png b/Gores/LargePerf3.png new file mode 100644 index 0000000000..4a77ee1e3d Binary files /dev/null and b/Gores/LargePerf3.png differ diff --git a/Gores/LargePerf4.png b/Gores/LargePerf4.png new file mode 100644 index 0000000000..a271f8fc44 Binary files /dev/null and b/Gores/LargePerf4.png differ diff --git a/Gores/LargePerf5.png b/Gores/LargePerf5.png new file mode 100644 index 0000000000..3874a77fe5 Binary files /dev/null and b/Gores/LargePerf5.png differ diff --git a/Gores/Laserfish.png b/Gores/Laserfish.png new file mode 100644 index 0000000000..43978da387 Binary files /dev/null and b/Gores/Laserfish.png differ diff --git a/Gores/Laserfish2.png b/Gores/Laserfish2.png new file mode 100644 index 0000000000..bc545c0957 Binary files /dev/null and b/Gores/Laserfish2.png differ diff --git a/Gores/Laserfish3.png b/Gores/Laserfish3.png new file mode 100644 index 0000000000..125b659259 Binary files /dev/null and b/Gores/Laserfish3.png differ diff --git a/Gores/Mauler.png b/Gores/Mauler.png new file mode 100644 index 0000000000..37e30f5242 Binary files /dev/null and b/Gores/Mauler.png differ diff --git a/Gores/Mauler2.png b/Gores/Mauler2.png new file mode 100644 index 0000000000..d8e7edadf7 Binary files /dev/null and b/Gores/Mauler2.png differ diff --git a/Gores/Mauler3.png b/Gores/Mauler3.png new file mode 100644 index 0000000000..7ef7b71b1d Binary files /dev/null and b/Gores/Mauler3.png differ diff --git a/Gores/Mauler4.png b/Gores/Mauler4.png new file mode 100644 index 0000000000..bb727a0e68 Binary files /dev/null and b/Gores/Mauler4.png differ diff --git a/Gores/Mauler5.png b/Gores/Mauler5.png new file mode 100644 index 0000000000..21d88528cb Binary files /dev/null and b/Gores/Mauler5.png differ diff --git a/Gores/MediumPerf.png b/Gores/MediumPerf.png new file mode 100644 index 0000000000..2d86489dd3 Binary files /dev/null and b/Gores/MediumPerf.png differ diff --git a/Gores/MediumPerf2.png b/Gores/MediumPerf2.png new file mode 100644 index 0000000000..6036a22f6a Binary files /dev/null and b/Gores/MediumPerf2.png differ diff --git a/Gores/MediumPerf3.png b/Gores/MediumPerf3.png new file mode 100644 index 0000000000..f50e28a651 Binary files /dev/null and b/Gores/MediumPerf3.png differ diff --git a/Gores/MediumPerf4.png b/Gores/MediumPerf4.png new file mode 100644 index 0000000000..f10ace6ecb Binary files /dev/null and b/Gores/MediumPerf4.png differ diff --git a/Gores/Pbg.png b/Gores/Pbg.png new file mode 100644 index 0000000000..e926e2c90f Binary files /dev/null and b/Gores/Pbg.png differ diff --git a/Gores/Pbg2.png b/Gores/Pbg2.png new file mode 100644 index 0000000000..6ec9cd478e Binary files /dev/null and b/Gores/Pbg2.png differ diff --git a/Gores/Pbg3.png b/Gores/Pbg3.png new file mode 100644 index 0000000000..2d1440a5ff Binary files /dev/null and b/Gores/Pbg3.png differ diff --git a/Gores/Pbg4.png b/Gores/Pbg4.png new file mode 100644 index 0000000000..a3221e83b7 Binary files /dev/null and b/Gores/Pbg4.png differ diff --git a/Gores/Pbg5.png b/Gores/Pbg5.png new file mode 100644 index 0000000000..abbf008a9e Binary files /dev/null and b/Gores/Pbg5.png differ diff --git a/Gores/Polt Gore 1.png b/Gores/Polt Gore 1.png new file mode 100644 index 0000000000..84f3737e34 Binary files /dev/null and b/Gores/Polt Gore 1.png differ diff --git a/Gores/Polt gore 2.png b/Gores/Polt gore 2.png new file mode 100644 index 0000000000..f32547e3e5 Binary files /dev/null and b/Gores/Polt gore 2.png differ diff --git a/Gores/Polt gore 3.png b/Gores/Polt gore 3.png new file mode 100644 index 0000000000..e473409be4 Binary files /dev/null and b/Gores/Polt gore 3.png differ diff --git a/Gores/Polt gore 4.png b/Gores/Polt gore 4.png new file mode 100644 index 0000000000..f5864e9e89 Binary files /dev/null and b/Gores/Polt gore 4.png differ diff --git a/Gores/Polt gore 5.png b/Gores/Polt gore 5.png new file mode 100644 index 0000000000..02654e52e7 Binary files /dev/null and b/Gores/Polt gore 5.png differ diff --git a/Gores/SWArmor.png b/Gores/SWArmor.png new file mode 100644 index 0000000000..b0c93ce836 Binary files /dev/null and b/Gores/SWArmor.png differ diff --git a/Gores/SWArmor2.png b/Gores/SWArmor2.png new file mode 100644 index 0000000000..d8c80c5da3 Binary files /dev/null and b/Gores/SWArmor2.png differ diff --git a/Gores/SWArmor3.png b/Gores/SWArmor3.png new file mode 100644 index 0000000000..e5180b4086 Binary files /dev/null and b/Gores/SWArmor3.png differ diff --git a/Gores/SWArmor4.png b/Gores/SWArmor4.png new file mode 100644 index 0000000000..33fff6bf81 Binary files /dev/null and b/Gores/SWArmor4.png differ diff --git a/Gores/SWArmor5.png b/Gores/SWArmor5.png new file mode 100644 index 0000000000..2a745c93d8 Binary files /dev/null and b/Gores/SWArmor5.png differ diff --git a/Gores/SWNude.png b/Gores/SWNude.png new file mode 100644 index 0000000000..4529134f6c Binary files /dev/null and b/Gores/SWNude.png differ diff --git a/Gores/SWNude2.png b/Gores/SWNude2.png new file mode 100644 index 0000000000..e6df2fa593 Binary files /dev/null and b/Gores/SWNude2.png differ diff --git a/Gores/SWNude3.png b/Gores/SWNude3.png new file mode 100644 index 0000000000..6798db66c8 Binary files /dev/null and b/Gores/SWNude3.png differ diff --git a/Gores/SWNude4.png b/Gores/SWNude4.png new file mode 100644 index 0000000000..466f39086f Binary files /dev/null and b/Gores/SWNude4.png differ diff --git a/Gores/SWNude5.png b/Gores/SWNude5.png new file mode 100644 index 0000000000..45759858ff Binary files /dev/null and b/Gores/SWNude5.png differ diff --git a/Gores/ScornEater.png b/Gores/ScornEater.png new file mode 100644 index 0000000000..59e6bce7b6 Binary files /dev/null and b/Gores/ScornEater.png differ diff --git a/Gores/ScornEater2.png b/Gores/ScornEater2.png new file mode 100644 index 0000000000..64c4fb2354 Binary files /dev/null and b/Gores/ScornEater2.png differ diff --git a/Gores/ScornEater3.png b/Gores/ScornEater3.png new file mode 100644 index 0000000000..8c126edbdc Binary files /dev/null and b/Gores/ScornEater3.png differ diff --git a/Gores/ScornEater4.png b/Gores/ScornEater4.png new file mode 100644 index 0000000000..43699da7d4 Binary files /dev/null and b/Gores/ScornEater4.png differ diff --git a/Gores/ScornEater5.png b/Gores/ScornEater5.png new file mode 100644 index 0000000000..de7076a086 Binary files /dev/null and b/Gores/ScornEater5.png differ diff --git a/Gores/ScornEater6.png b/Gores/ScornEater6.png new file mode 100644 index 0000000000..73999afdda Binary files /dev/null and b/Gores/ScornEater6.png differ diff --git a/Gores/SmallPerf.png b/Gores/SmallPerf.png new file mode 100644 index 0000000000..bc1a9eec84 Binary files /dev/null and b/Gores/SmallPerf.png differ diff --git a/Gores/SmallPerf2.png b/Gores/SmallPerf2.png new file mode 100644 index 0000000000..7a88e18d04 Binary files /dev/null and b/Gores/SmallPerf2.png differ diff --git a/Gores/SmallPerf3.png b/Gores/SmallPerf3.png new file mode 100644 index 0000000000..a452238a80 Binary files /dev/null and b/Gores/SmallPerf3.png differ diff --git a/Gores/Trasher.png b/Gores/Trasher.png new file mode 100644 index 0000000000..cf84ce02b8 Binary files /dev/null and b/Gores/Trasher.png differ diff --git a/Gores/Trasher2.png b/Gores/Trasher2.png new file mode 100644 index 0000000000..74c2fd202d Binary files /dev/null and b/Gores/Trasher2.png differ diff --git a/Gores/ViperFish.png b/Gores/ViperFish.png new file mode 100644 index 0000000000..ab7a2bfdc4 Binary files /dev/null and b/Gores/ViperFish.png differ diff --git a/Gores/ViperFish2.png b/Gores/ViperFish2.png new file mode 100644 index 0000000000..41ee3dea2d Binary files /dev/null and b/Gores/ViperFish2.png differ diff --git a/Gores/Wyrm.png b/Gores/Wyrm.png new file mode 100644 index 0000000000..653031cd2b Binary files /dev/null and b/Gores/Wyrm.png differ diff --git a/Gores/Wyrm2.png b/Gores/Wyrm2.png new file mode 100644 index 0000000000..8189ddc164 Binary files /dev/null and b/Gores/Wyrm2.png differ diff --git a/Gores/Wyrm3.png b/Gores/Wyrm3.png new file mode 100644 index 0000000000..d3c203eadb Binary files /dev/null and b/Gores/Wyrm3.png differ diff --git a/Gores/Wyrm4.png b/Gores/Wyrm4.png new file mode 100644 index 0000000000..041780c46d Binary files /dev/null and b/Gores/Wyrm4.png differ diff --git a/Gores/WyrmAdult.png b/Gores/WyrmAdult.png new file mode 100644 index 0000000000..47ff0d6882 Binary files /dev/null and b/Gores/WyrmAdult.png differ diff --git a/Gores/WyrmAdult2.png b/Gores/WyrmAdult2.png new file mode 100644 index 0000000000..5865d4738c Binary files /dev/null and b/Gores/WyrmAdult2.png differ diff --git a/Gores/WyrmAdult3.png b/Gores/WyrmAdult3.png new file mode 100644 index 0000000000..d228a18507 Binary files /dev/null and b/Gores/WyrmAdult3.png differ diff --git a/Gores/WyrmAdult4.png b/Gores/WyrmAdult4.png new file mode 100644 index 0000000000..e93425c1eb Binary files /dev/null and b/Gores/WyrmAdult4.png differ diff --git a/Items/AbyssItems/AbyssalAmulet.cs b/Items/AbyssItems/AbyssalAmulet.cs index 76e4d51a2e..64933ee978 100644 --- a/Items/AbyssItems/AbyssalAmulet.cs +++ b/Items/AbyssItems/AbyssalAmulet.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.AbyssItems { item.width = 26; item.height = 26; - item.value = 50000; + item.value = Item.buyPrice(0, 9, 0, 0); item.rare = 3; item.accessory = true; } diff --git a/Items/AbyssItems/AbyssalDivingGear.cs b/Items/AbyssItems/AbyssalDivingGear.cs index f1975595df..02a5c208b3 100644 --- a/Items/AbyssItems/AbyssalDivingGear.cs +++ b/Items/AbyssItems/AbyssalDivingGear.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.AbyssItems { item.width = 26; item.height = 26; - item.value = 250000; + item.value = Item.buyPrice(0, 45, 0, 0); item.rare = 6; item.accessory = true; } diff --git a/Items/AbyssItems/AlluringBait.cs b/Items/AbyssItems/AlluringBait.cs index 6dd709286b..a986801a9d 100644 --- a/Items/AbyssItems/AlluringBait.cs +++ b/Items/AbyssItems/AlluringBait.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.AbyssItems { item.width = 26; item.height = 26; - item.value = 50000; + item.value = Item.buyPrice(0, 9, 0, 0); item.rare = 3; item.accessory = true; } diff --git a/Items/AbyssItems/AnechoicPlating.cs b/Items/AbyssItems/AnechoicPlating.cs index 2030975a02..c02dac8722 100644 --- a/Items/AbyssItems/AnechoicPlating.cs +++ b/Items/AbyssItems/AnechoicPlating.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.AbyssItems { item.width = 26; item.height = 26; - item.value = 50000; + item.value = Item.buyPrice(0, 9, 0, 0); item.rare = 3; item.accessory = true; } diff --git a/Items/AbyssItems/DepthCharm.cs b/Items/AbyssItems/DepthCharm.cs index bd0012df06..a6c37c2706 100644 --- a/Items/AbyssItems/DepthCharm.cs +++ b/Items/AbyssItems/DepthCharm.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.AbyssItems { item.width = 26; item.height = 26; - item.value = 50000; + item.value = Item.buyPrice(0, 9, 0, 0); item.rare = 3; item.accessory = true; } diff --git a/Items/AbyssItems/IronBoots.cs b/Items/AbyssItems/IronBoots.cs index 3573d11dcd..c535a2e413 100644 --- a/Items/AbyssItems/IronBoots.cs +++ b/Items/AbyssItems/IronBoots.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.AbyssItems { item.width = 26; item.height = 26; - item.value = 50000; + item.value = Item.buyPrice(0, 9, 0, 0); item.rare = 3; item.accessory = true; } diff --git a/Items/AbyssItems/LumenousAmulet.cs b/Items/AbyssItems/LumenousAmulet.cs index c56e97ed68..18a053234d 100644 --- a/Items/AbyssItems/LumenousAmulet.cs +++ b/Items/AbyssItems/LumenousAmulet.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.AbyssItems { item.width = 26; item.height = 26; - item.value = 150000; + item.value = Item.buyPrice(0, 15, 0, 0); item.rare = 5; item.accessory = true; } diff --git a/Items/AbyssItems/ReaperTooth.png b/Items/AbyssItems/ReaperTooth.png index 32a9ce871a..9c1624e30e 100644 Binary files a/Items/AbyssItems/ReaperTooth.png and b/Items/AbyssItems/ReaperTooth.png differ diff --git a/Items/AbyssItems/ReaperToothNecklace.cs b/Items/AbyssItems/ReaperToothNecklace.cs index e4d98caa8b..e67a6d6c3d 100644 --- a/Items/AbyssItems/ReaperToothNecklace.cs +++ b/Items/AbyssItems/ReaperToothNecklace.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.AbyssItems { DisplayName.SetDefault("Reaper Tooth Necklace"); Tooltip.SetDefault("Increases armor penetration by 100\n" + - "Increases all damage and critical strike chance by 25%\n" + + "Increases all damage by 25%\n" + "Cuts your defense and damage reduction in half"); } @@ -23,7 +23,7 @@ namespace CalamityMod.Items.AbyssItems { item.width = 26; item.height = 26; - item.value = 500000; + item.value = Item.buyPrice(0, 60, 0, 0); item.rare = 10; item.accessory = true; } diff --git a/Items/AbyssItems/StrangeOrb.cs b/Items/AbyssItems/StrangeOrb.cs index 2858223bd4..4cb76098e4 100644 --- a/Items/AbyssItems/StrangeOrb.cs +++ b/Items/AbyssItems/StrangeOrb.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.AbyssItems { DisplayName.SetDefault("Strange Orb"); Tooltip.SetDefault("Summons a young Siren light pet\n" + - "Provides a large amount of light in the abyss"); + "Provides a large amount of light while underwater"); } public override void SetDefaults() diff --git a/Items/AbyssItems/SunkenStew.cs b/Items/AbyssItems/SunkenStew.cs index 54edde63f3..6a103291ee 100644 --- a/Items/AbyssItems/SunkenStew.cs +++ b/Items/AbyssItems/SunkenStew.cs @@ -13,7 +13,8 @@ namespace CalamityMod.Items.AbyssItems public override void SetStaticDefaults() { DisplayName.SetDefault("Sunken Stew"); - Tooltip.SetDefault("Causes potion sickness for 50 (37 with Philosopher's Stone effect) seconds instead of 60"); + Tooltip.SetDefault("Causes potion sickness for 50 (37 with Philosopher's Stone effect) seconds instead of 60\n" + + "Restores 120 life and 150 mana"); } public override void SetDefaults() @@ -22,16 +23,13 @@ namespace CalamityMod.Items.AbyssItems item.height = 18; item.useTurn = true; item.maxStack = 30; - item.healLife = 120; - item.healMana = 150; item.useAnimation = 17; item.useTime = 17; item.rare = 3; item.useStyle = 2; item.UseSound = SoundID.Item3; item.consumable = true; - //item.potion = true; - item.buffType = 26; + item.buffType = BuffID.WellFed; item.buffTime = 216000; item.value = 10000; } @@ -41,10 +39,31 @@ namespace CalamityMod.Items.AbyssItems return player.FindBuffIndex(BuffID.PotionSickness) == -1; } - public override bool UseItem(Player player) + public override bool ConsumeItem(Player player) { + return player.FindBuffIndex(BuffID.PotionSickness) == -1; + } + + public override void OnConsumeItem(Player player) + { + player.statLife += 120; + player.statMana += 150; + if (player.statLife > player.statLifeMax2) + { + player.statLife = player.statLifeMax2; + } + if (player.statMana > player.statManaMax2) + { + player.statMana = player.statManaMax2; + } + player.AddBuff(BuffID.ManaSickness, Player.manaSickTime, true); + if (Main.myPlayer == player.whoAmI) + { + player.HealEffect(120, true); + player.ManaEffect(150); + } + player.AddBuff(BuffID.WellFed, 216000); player.AddBuff(BuffID.PotionSickness, (player.pStone ? 2220 : 3000)); - return true; } public override void AddRecipes() diff --git a/Items/Accessories/AlchemicalFlask.cs b/Items/Accessories/AlchemicalFlask.cs index 1162cc9bd2..a504986d96 100644 --- a/Items/Accessories/AlchemicalFlask.cs +++ b/Items/Accessories/AlchemicalFlask.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Accessories { item.width = 26; item.height = 26; - item.value = 150000; + item.value = Item.buyPrice(0, 24, 0, 0); item.rare = 8; item.accessory = true; } diff --git a/Items/Accessories/AmalgamatedBrain.cs b/Items/Accessories/AmalgamatedBrain.cs index b7ea05670e..022df5afe0 100644 --- a/Items/Accessories/AmalgamatedBrain.cs +++ b/Items/Accessories/AmalgamatedBrain.cs @@ -5,7 +5,7 @@ using Terraria; using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; -using CalamityMod.Items; +using CalamityMod.Items.CalamityCustomThrowingDamage; namespace CalamityMod.Items.Accessories { @@ -14,7 +14,7 @@ namespace CalamityMod.Items.Accessories public override void SetStaticDefaults() { DisplayName.SetDefault("Amalgamated Brain"); - Tooltip.SetDefault("10% increased damage and 5% increased critical strike chance\n" + + Tooltip.SetDefault("12% increased damage\n" + "Shade rains down when you are hit\n" + "You will confuse nearby enemies when you are struck"); } @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Accessories { item.width = 34; item.height = 34; - item.value = 300000; + item.value = Item.buyPrice(0, 15, 0, 0); item.expert = true; item.accessory = true; } @@ -31,6 +31,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityCustomThrowingDamagePlayer modPlayer2 = CalamityCustomThrowingDamagePlayer.ModPlayer(player); modPlayer.aBrain = true; if (player.immune) { @@ -58,15 +59,11 @@ namespace CalamityMod.Items.Accessories } } } - player.meleeDamage += 0.1f; - player.magicDamage += 0.1f; - player.rangedDamage += 0.1f; - player.thrownDamage += 0.1f; - player.minionDamage += 0.1f; - player.meleeCrit += 5; - player.magicCrit += 5; - player.rangedCrit += 5; - player.thrownCrit += 5; + player.meleeDamage += 0.12f; + player.magicDamage += 0.12f; + player.rangedDamage += 0.12f; + modPlayer2.throwingDamage += 0.12f; + player.minionDamage += 0.12f; } public override void AddRecipes() diff --git a/Items/Accessories/AmbrosialAmpoule.cs b/Items/Accessories/AmbrosialAmpoule.cs index 881c1f3529..99bb806c22 100644 --- a/Items/Accessories/AmbrosialAmpoule.cs +++ b/Items/Accessories/AmbrosialAmpoule.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Accessories item.defense = 4; item.width = 20; item.height = 20; - item.value = 5000000; + item.value = Item.buyPrice(0, 45, 0, 0); item.rare = 10; item.accessory = true; } @@ -46,7 +46,9 @@ namespace CalamityMod.Items.Accessories recipe.AddIngredient(null, "ArchaicPowder"); recipe.AddIngredient(null, "RadiantOoze"); recipe.AddIngredient(null, "HoneyDew"); - recipe.AddTile(TileID.LunarCraftingStation); + recipe.AddIngredient(null, "Stardust", 15); + recipe.AddIngredient(null, "CryoBar", 5); + recipe.AddTile(TileID.MythrilAnvil); recipe.SetResult(this); recipe.AddRecipe(); recipe = new ModRecipe(mod); @@ -54,7 +56,9 @@ namespace CalamityMod.Items.Accessories recipe.AddIngredient(null, "ArchaicPowder"); recipe.AddIngredient(null, "RadiantOoze"); recipe.AddIngredient(null, "HoneyDew"); - recipe.AddTile(TileID.LunarCraftingStation); + recipe.AddIngredient(null, "Stardust", 15); + recipe.AddIngredient(null, "CryoBar", 5); + recipe.AddTile(TileID.MythrilAnvil); recipe.SetResult(this); recipe.AddRecipe(); } diff --git a/Items/Accessories/AmidiasSpark.cs b/Items/Accessories/AmidiasSpark.cs index e5b24c31fa..df3ec50654 100644 --- a/Items/Accessories/AmidiasSpark.cs +++ b/Items/Accessories/AmidiasSpark.cs @@ -7,28 +7,30 @@ using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items; -namespace CalamityMod.Items.Accessories { -public class AmidiasSpark : ModItem +namespace CalamityMod.Items.Accessories { - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Amidias' Spark"); - Tooltip.SetDefault("Taking damage releases a blast of sparks\n" + - "Sparks do extra damage in Hardmode"); - } - - public override void SetDefaults() - { - item.width = 26; - item.height = 26; - item.value = 10000; - item.rare = 1; - item.accessory = true; - } - - public override void UpdateAccessory(Player player, bool hideVisual) - { - CalamityPlayer modPlayer = player.GetModPlayer(mod); - modPlayer.aSpark = true; - } -}} \ No newline at end of file + public class AmidiasSpark : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Amidias' Spark"); + Tooltip.SetDefault("Taking damage releases a blast of sparks\n" + + "Sparks do extra damage in Hardmode"); + } + + public override void SetDefaults() + { + item.width = 26; + item.height = 26; + item.value = Item.buyPrice(0, 3, 0, 0); + item.rare = 1; + item.accessory = true; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + CalamityPlayer modPlayer = player.GetModPlayer(mod); + modPlayer.aSpark = true; + } + } +} \ No newline at end of file diff --git a/Items/Accessories/AncientFossil.cs b/Items/Accessories/AncientFossil.cs index afc38bae09..ae8a9287f4 100644 --- a/Items/Accessories/AncientFossil.cs +++ b/Items/Accessories/AncientFossil.cs @@ -7,38 +7,40 @@ using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items; -namespace CalamityMod.Items.Accessories { -public class AncientFossil : ModItem +namespace CalamityMod.Items.Accessories { - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Ancient Fossil"); - Tooltip.SetDefault("Increases pick speed by 35% while underground"); - } - - public override void SetDefaults() - { - item.width = 26; - item.height = 26; - item.value = 5000; - item.rare = 2; - item.accessory = true; - } - - public override void UpdateAccessory(Player player, bool hideVisual) - { - if (player.ZoneDirtLayerHeight || player.ZoneRockLayerHeight) - { - player.pickSpeed -= 0.35f; - } - } - - public override void AddRecipes() - { - ModRecipe recipe = new ModRecipe(mod); - recipe.AddRecipeGroup("SiltGroup", 100); - recipe.AddTile(TileID.Furnaces); - recipe.SetResult(this); - recipe.AddRecipe(); - } -}} \ No newline at end of file + public class AncientFossil : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Ancient Fossil"); + Tooltip.SetDefault("Increases pick speed by 35% while underground"); + } + + public override void SetDefaults() + { + item.width = 26; + item.height = 26; + item.value = Item.buyPrice(0, 3, 0, 0); + item.rare = 2; + item.accessory = true; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + if (player.ZoneDirtLayerHeight || player.ZoneRockLayerHeight) + { + player.pickSpeed -= 0.35f; + } + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddRecipeGroup("SiltGroup", 100); + recipe.AddTile(TileID.Furnaces); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } +} \ No newline at end of file diff --git a/Items/Accessories/AngelTreads.cs b/Items/Accessories/AngelTreads.cs index d8968dcf6e..1d7def2f8e 100644 --- a/Items/Accessories/AngelTreads.cs +++ b/Items/Accessories/AngelTreads.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Accessories { item.width = 36; item.height = 32; - item.value = 500000; + item.value = Item.buyPrice(0, 36, 0, 0); item.rare = 8; item.accessory = true; } diff --git a/Items/Accessories/ArcanumoftheVoid.cs b/Items/Accessories/ArcanumoftheVoid.cs index 3736766c65..c8b0b4bf55 100644 --- a/Items/Accessories/ArcanumoftheVoid.cs +++ b/Items/Accessories/ArcanumoftheVoid.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Items.Accessories public override void SetStaticDefaults() { DisplayName.SetDefault("Arcanum of the Void"); - Tooltip.SetDefault("You have a 10% chance to reflect projectiles when they hit you\n" + + Tooltip.SetDefault("You have a 5% chance to reflect projectiles when they hit you\n" + "If this effect triggers you get healed for the projectile's damage"); } @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Accessories { item.width = 26; item.height = 26; - item.value = 1500000; + item.value = Item.buyPrice(0, 60, 0, 0); item.accessory = true; } diff --git a/Items/Accessories/ArchaicPowder.cs b/Items/Accessories/ArchaicPowder.cs index ff20ad3b83..7a7219b46c 100644 --- a/Items/Accessories/ArchaicPowder.cs +++ b/Items/Accessories/ArchaicPowder.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.Accessories { item.width = 20; item.height = 20; - item.value = 50000; + item.value = Item.buyPrice(0, 9, 0, 0); item.rare = 3; item.accessory = true; } diff --git a/Items/Accessories/AsgardianAegis.cs b/Items/Accessories/AsgardianAegis.cs index 2bb37275ad..0c99816098 100644 --- a/Items/Accessories/AsgardianAegis.cs +++ b/Items/Accessories/AsgardianAegis.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Accessories DisplayName.SetDefault("Asgardian Aegis"); Tooltip.SetDefault("Grants immunity to fire blocks and knockback\n" + "Immune to most debuffs\n" + - "+40 max life and increased life regen\n" + + "+40 max life\n" + "Grants a supreme holy flame dash\n" + "Can be used to ram enemies\n" + "Press N to activate buffs to all damage, crit chance, and defense\n" + @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Accessories { item.width = 60; item.height = 54; - item.value = 10000000; + item.value = Item.buyPrice(0, 90, 0, 0); //30 gold reforge item.defense = 10; item.accessory = true; } @@ -54,7 +54,6 @@ namespace CalamityMod.Items.Accessories modPlayer.elysianAegis = true; player.noKnockback = true; player.fireWalk = true; - player.lifeRegen += 1; player.statLifeMax2 += 40; player.buffImmune[46] = true; player.buffImmune[44] = true; diff --git a/Items/Accessories/AsgardsValor.cs b/Items/Accessories/AsgardsValor.cs index a479b07937..0f85b59157 100644 --- a/Items/Accessories/AsgardsValor.cs +++ b/Items/Accessories/AsgardsValor.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Accessories "Immune to most debuffs including Brimstone Flames, Holy Flames, and Glacial State\n" + "10% damage reduction while submerged in liquid\n" + "Increased defense by 10 when below 25% life\n" + - "+20 max life and increased life regen\n" + + "+20 max life\n" + "Grants an improved holy dash\n" + "Can be used to ram enemies\n" + "Toggle visibility of this accessory to enable/disable the dash"); @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Accessories { item.width = 38; item.height = 44; - item.value = 5000000; + item.value = Item.buyPrice(0, 45, 0, 0); item.rare = 9; item.defense = 5; item.accessory = true; @@ -55,7 +55,6 @@ namespace CalamityMod.Items.Accessories player.buffImmune[mod.BuffType("BrimstoneFlames")] = true; player.buffImmune[mod.BuffType("HolyLight")] = true; player.buffImmune[mod.BuffType("GlacialState")] = true; - player.lifeRegen += 1; player.statLifeMax2 += 20; if (player.statLife <= (int)((double)player.statLifeMax2 * 0.25)) { player.statDefense += 10; } if (Collision.DrownCollision(player.position, player.width, player.height, player.gravDir)) { player.endurance += 0.1f; } diff --git a/Items/Accessories/AstralArcanum.cs b/Items/Accessories/AstralArcanum.cs index 100aac8011..8d3925c031 100644 --- a/Items/Accessories/AstralArcanum.cs +++ b/Items/Accessories/AstralArcanum.cs @@ -16,10 +16,10 @@ namespace CalamityMod.Items.Accessories DisplayName.SetDefault("Astral Arcanum"); Tooltip.SetDefault("Taking damage drops astral stars from the sky\n" + "Provides immunity to the god slayer inferno debuff\n" + - "You have a 10% chance to reflect projectiles when they hit you\n" + + "You have a 5% chance to reflect projectiles when they hit you\n" + "If this effect triggers you get healed for the projectile's damage\n" + "Boosts life regen even while under the effects of a damaging debuff\n" + - "While under the effects of a damaging debuff you will gain 40 defense\n" + + "While under the effects of a damaging debuff you will gain 20 defense\n" + "Press O to toggle teleportation UI"); } @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Accessories { item.width = 26; item.height = 26; - item.value = 1000000; + item.value = Item.buyPrice(0, 90, 0, 0); item.accessory = true; } diff --git a/Items/Accessories/AstralBulwark.cs b/Items/Accessories/AstralBulwark.cs index 281ae553cd..303599dc95 100644 --- a/Items/Accessories/AstralBulwark.cs +++ b/Items/Accessories/AstralBulwark.cs @@ -7,29 +7,31 @@ using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items; -namespace CalamityMod.Items.Accessories { -public class AstralBulwark : ModItem +namespace CalamityMod.Items.Accessories { - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Astral Bulwark"); - Tooltip.SetDefault("Taking damage drops astral stars from the sky\n" + - "Provides immunity to the god slayer inferno debuff"); - } - - public override void SetDefaults() - { - item.width = 26; - item.height = 26; - item.value = 100000; - item.expert = true; - item.accessory = true; - } - - public override void UpdateAccessory(Player player, bool hideVisual) - { - CalamityPlayer modPlayer = player.GetModPlayer(mod); - modPlayer.aBulwark = true; - player.buffImmune[mod.BuffType("GodSlayerInferno")] = true; - } -}} \ No newline at end of file + public class AstralBulwark : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Astral Bulwark"); + Tooltip.SetDefault("Taking damage drops astral stars from the sky\n" + + "Provides immunity to the god slayer inferno debuff"); + } + + public override void SetDefaults() + { + item.width = 26; + item.height = 26; + item.value = Item.buyPrice(0, 15, 0, 0); + item.expert = true; + item.accessory = true; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + CalamityPlayer modPlayer = player.GetModPlayer(mod); + modPlayer.aBulwark = true; + player.buffImmune[mod.BuffType("GodSlayerInferno")] = true; + } + } +} \ No newline at end of file diff --git a/Items/Accessories/AureateWings.cs b/Items/Accessories/AureateWings.cs index f63cf5bc5e..fe84d43d02 100644 --- a/Items/Accessories/AureateWings.cs +++ b/Items/Accessories/AureateWings.cs @@ -17,15 +17,17 @@ namespace CalamityMod.Items.Accessories { DisplayName.SetDefault("Aureate Booster"); Tooltip.SetDefault("Mach speed with style!\n" + - "Good acceleration: 2\n" + - "Good flight time: 90"); + "Horizontal speed: 8\n" + + "Acceleration multiplier: 1.5\n" + + "Good vertical speed\n" + + "Flight time: 120"); } public override void SetDefaults() { item.width = 22; item.height = 20; - item.value = 500000; + item.value = Item.buyPrice(0, 39, 99, 99); item.rare = 6; item.accessory = true; } @@ -86,22 +88,22 @@ namespace CalamityMod.Items.Accessories } } } - player.wingTimeMax = 90; + player.wingTimeMax = 120; } public override void VerticalWingSpeeds(Player player, ref float ascentWhenFalling, ref float ascentWhenRising, ref float maxCanAscendMultiplier, ref float maxAscentMultiplier, ref float constantAscend) { - ascentWhenFalling = 0.85f; + ascentWhenFalling = 0.75f; ascentWhenRising = 0.15f; maxCanAscendMultiplier = 1f; - maxAscentMultiplier = 3f; - constantAscend = 0.135f; + maxAscentMultiplier = 2.5f; + constantAscend = 0.125f; } public override void HorizontalWingSpeeds(Player player, ref float speed, ref float acceleration) { - speed = 10f; - acceleration *= 2f; + speed = 8f; + acceleration *= 1.5f; } public override void AddRecipes() diff --git a/Items/Accessories/BadgeofBravery.cs b/Items/Accessories/BadgeofBravery.cs index b4c039029d..b3776ed972 100644 --- a/Items/Accessories/BadgeofBravery.cs +++ b/Items/Accessories/BadgeofBravery.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.Accessories { item.width = 30; item.height = 30; - item.value = 150000; + item.value = Item.buyPrice(0, 21, 0, 0); item.accessory = true; } @@ -38,22 +38,8 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - if (player.statLife <= (player.statLifeMax2 * 0.8f) && player.statLife > (player.statLifeMax2 * 0.6f)) - { - player.meleeSpeed += 0.05f; - } - else if (player.statLife <= (player.statLifeMax2 * 0.6f) && player.statLife > (player.statLifeMax2 * 0.4f)) - { - player.meleeSpeed += 0.1f; - } - else if (player.statLife <= (player.statLifeMax2 * 0.4f) && player.statLife > (player.statLifeMax2 * 0.2f)) - { - player.meleeSpeed += 0.15f; - } - else if (player.statLife <= (player.statLifeMax2 * 0.2f)) - { - player.meleeSpeed += 0.2f; - } + CalamityPlayer modPlayer = player.GetModPlayer(mod); + modPlayer.badgeOfBravery = true; } public override void AddRecipes() diff --git a/Items/Accessories/BloodflareCore.cs b/Items/Accessories/BloodflareCore.cs index 0f701cf0b9..d6e5640df9 100644 --- a/Items/Accessories/BloodflareCore.cs +++ b/Items/Accessories/BloodflareCore.cs @@ -14,9 +14,8 @@ namespace CalamityMod.Items.Accessories public override void SetStaticDefaults() { DisplayName.SetDefault("Bloodflare Core"); - Tooltip.SetDefault("You have a damaging life-draining aura around you\n" + - "When below 50% life you gain 5% increased damage reduction, 10% increased damage, and 10% increased critical strike chance\n" + - "When below 15% life you gain 10% increased damage reduction, 15% increased damage, and 15% increased critical strike chance\n" + + Tooltip.SetDefault("When below 50% life you gain 5% increased damage reduction and 10% increased damage\n" + + "When below 15% life you gain 10% increased damage reduction and 20% increased damage\n" + "When below 100 defense you gain 15% increased damage"); } @@ -24,7 +23,7 @@ namespace CalamityMod.Items.Accessories { item.width = 26; item.height = 26; - item.value = 2500000; + item.value = Item.buyPrice(0, 45, 0, 0); item.expert = true; item.accessory = true; } diff --git a/Items/Accessories/BloodyWormScarf.cs b/Items/Accessories/BloodyWormScarf.cs index 4ae97e82ba..5f235e515b 100644 --- a/Items/Accessories/BloodyWormScarf.cs +++ b/Items/Accessories/BloodyWormScarf.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Accessories { item.width = 26; item.height = 42; - item.value = 500000; + item.value = Item.buyPrice(0, 15, 0, 0); item.expert = true; item.accessory = true; } diff --git a/Items/Accessories/BurdenBreaker.cs b/Items/Accessories/BurdenBreaker.cs index b01c1b8981..0cfdb925b4 100644 --- a/Items/Accessories/BurdenBreaker.cs +++ b/Items/Accessories/BurdenBreaker.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Accessories { item.width = 28; item.height = 28; - item.value = 150000; + item.value = Item.buyPrice(0, 5, 0, 0); item.rare = 3; item.accessory = true; } @@ -47,12 +47,7 @@ namespace CalamityMod.Items.Accessories ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ItemID.Bone, 50); recipe.AddIngredient(ItemID.IronBar, 7); - recipe.AddTile(TileID.Anvils); - recipe.SetResult(this); - recipe.AddRecipe(); - recipe = new ModRecipe(mod); - recipe.AddIngredient(ItemID.Bone, 50); - recipe.AddIngredient(ItemID.LeadBar, 7); + recipe.anyIronBar = true; recipe.AddTile(TileID.Anvils); recipe.SetResult(this); recipe.AddRecipe(); diff --git a/Items/Accessories/CelestialJewel.cs b/Items/Accessories/CelestialJewel.cs index 54ef80c656..e9f72842d8 100644 --- a/Items/Accessories/CelestialJewel.cs +++ b/Items/Accessories/CelestialJewel.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Accessories { item.width = 26; item.height = 26; - item.value = 500000; + item.value = Item.buyPrice(0, 15, 0, 0); item.rare = 7; item.accessory = true; } diff --git a/Items/Accessories/CelestialTracers.cs b/Items/Accessories/CelestialTracers.cs index 8d511b3dbd..8902d0ffb2 100644 --- a/Items/Accessories/CelestialTracers.cs +++ b/Items/Accessories/CelestialTracers.cs @@ -18,8 +18,10 @@ namespace CalamityMod.Items.Accessories { DisplayName.SetDefault("Celestial Tracers"); Tooltip.SetDefault("Counts as wings\n" + - "Excellent acceleration: 3\n" + - "Excellent flight time: 280\n" + + "Horizontal speed: 12\n" + + "Acceleration multiplier: 3\n" + + "Excellent vertical speed\n" + + "Flight time: 280\n" + "Taking speed EVEN FURTHER BEYOND!\n" + "Greater mobility on ice\n" + "Water and lava walking\n" + @@ -31,7 +33,7 @@ namespace CalamityMod.Items.Accessories { item.width = 36; item.height = 32; - item.value = 20000000; + item.value = Item.buyPrice(1, 20, 0, 0); item.accessory = true; } @@ -80,16 +82,16 @@ namespace CalamityMod.Items.Accessories public override void VerticalWingSpeeds(Player player, ref float ascentWhenFalling, ref float ascentWhenRising, ref float maxCanAscendMultiplier, ref float maxAscentMultiplier, ref float constantAscend) { - ascentWhenFalling = 0.85f; - ascentWhenRising = 0.15f; - maxCanAscendMultiplier = 1f; - maxAscentMultiplier = 3f; - constantAscend = 0.135f; + ascentWhenFalling = 1f; //0.85 + ascentWhenRising = 0.175f; //0.15 + maxCanAscendMultiplier = 1.2f; //1 + maxAscentMultiplier = 3.25f; //3 + constantAscend = 0.15f; //0.135 } public override void HorizontalWingSpeeds(Player player, ref float speed, ref float acceleration) { - speed = 13f; + speed = 12f; acceleration *= 3f; } diff --git a/Items/Accessories/ChaosAmulet.cs b/Items/Accessories/ChaosAmulet.cs index 246d2a8364..f19b5e2f51 100644 --- a/Items/Accessories/ChaosAmulet.cs +++ b/Items/Accessories/ChaosAmulet.cs @@ -22,8 +22,8 @@ namespace CalamityMod.Items.Accessories item.width = 20; item.height = 24; item.lifeRegen = 2; - item.value = 150000; - item.rare = 8; + item.value = Item.buyPrice(0, 15, 0, 0); + item.rare = 8; item.accessory = true; } diff --git a/Items/Accessories/CoreOfTheBloodGod.cs b/Items/Accessories/CoreOfTheBloodGod.cs index 64fe108e83..4be918eadd 100644 --- a/Items/Accessories/CoreOfTheBloodGod.cs +++ b/Items/Accessories/CoreOfTheBloodGod.cs @@ -14,9 +14,8 @@ namespace CalamityMod.Items.Accessories public override void SetStaticDefaults() { DisplayName.SetDefault("Core of the Blood God"); - Tooltip.SetDefault("You have a damaging life-draining aura around you\n" + - "5% increased damage reduction\n" + - "5% increased damage and critical strike chance\n" + + Tooltip.SetDefault("5% increased damage reduction\n" + + "7% increased damage\n" + "When below 100 defense you gain 15% increased damage\n" + "Halves enemy contact damage\n" + "When you take contact damage this effect has a 15 second cooldown\n" + @@ -27,7 +26,7 @@ namespace CalamityMod.Items.Accessories { item.width = 26; item.height = 26; - item.value = 10000000; + item.value = Item.buyPrice(0, 90, 0, 0); item.expert = true; item.accessory = true; } diff --git a/Items/Accessories/CorruptFlask.cs b/Items/Accessories/CorruptFlask.cs index 0e0bed4644..3a1963e8a1 100644 --- a/Items/Accessories/CorruptFlask.cs +++ b/Items/Accessories/CorruptFlask.cs @@ -7,40 +7,42 @@ using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items; -namespace CalamityMod.Items.Accessories { -public class CorruptFlask : ModItem +namespace CalamityMod.Items.Accessories { - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Corrupt Flask"); - Tooltip.SetDefault("7% increased damage reduction and +3 defense while in the corruption"); - } - - public override void SetDefaults() - { - item.width = 20; - item.height = 20; - item.value = 50000; - item.rare = 2; - item.accessory = true; - } - - public override void UpdateAccessory(Player player, bool hideVisual) - { - if (player.ZoneCorrupt) - { - player.statDefense += 3; - player.endurance += 0.07f; - } - } - - public override void AddRecipes() + public class CorruptFlask : ModItem { - ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(null, "FetidEssence", 3); - recipe.AddIngredient(ItemID.RottenChunk, 10); - recipe.AddTile(TileID.Anvils); - recipe.SetResult(this); - recipe.AddRecipe(); + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Corrupt Flask"); + Tooltip.SetDefault("7% increased damage reduction and +3 defense while in the corruption"); + } + + public override void SetDefaults() + { + item.width = 20; + item.height = 20; + item.value = Item.buyPrice(0, 3, 0, 0); + item.rare = 2; + item.accessory = true; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + if (player.ZoneCorrupt) + { + player.statDefense += 3; + player.endurance += 0.07f; + } + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(null, "FetidEssence", 3); + recipe.AddIngredient(ItemID.RottenChunk, 10); + recipe.AddTile(TileID.Anvils); + recipe.SetResult(this); + recipe.AddRecipe(); + } } -}} \ No newline at end of file +} \ No newline at end of file diff --git a/Items/Accessories/CounterScarf.cs b/Items/Accessories/CounterScarf.cs index 2cc2d86848..992e8f9713 100644 --- a/Items/Accessories/CounterScarf.cs +++ b/Items/Accessories/CounterScarf.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Accessories { item.width = 26; item.height = 26; - item.value = 50000; + item.value = Item.buyPrice(0, 9, 0, 0); item.rare = 5; item.accessory = true; } diff --git a/Items/Accessories/CrawCarapace.cs b/Items/Accessories/CrawCarapace.cs index 9c8096b8df..7f592466da 100644 --- a/Items/Accessories/CrawCarapace.cs +++ b/Items/Accessories/CrawCarapace.cs @@ -23,8 +23,8 @@ namespace CalamityMod.Items.Accessories item.defense = 3; item.width = 20; item.height = 24; - item.value = 30000; - item.rare = 1; + item.value = Item.buyPrice(0, 3, 0, 0); + item.rare = 1; item.accessory = true; } diff --git a/Items/Accessories/CrimsonFlask.cs b/Items/Accessories/CrimsonFlask.cs index 077eb3ff26..cb61f08635 100644 --- a/Items/Accessories/CrimsonFlask.cs +++ b/Items/Accessories/CrimsonFlask.cs @@ -7,40 +7,42 @@ using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items; -namespace CalamityMod.Items.Accessories { -public class CrimsonFlask : ModItem +namespace CalamityMod.Items.Accessories { - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Crimson Flask"); - Tooltip.SetDefault("7% increased damage reduction and +3 defense while in the crimson"); - } - - public override void SetDefaults() - { - item.width = 20; - item.height = 20; - item.value = 50000; - item.rare = 2; - item.accessory = true; - } - - public override void UpdateAccessory(Player player, bool hideVisual) - { - if (player.ZoneCrimson) - { - player.statDefense += 3; - player.endurance += 0.07f; - } - } - - public override void AddRecipes() + public class CrimsonFlask : ModItem { - ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(null, "BloodlettingEssence", 3); - recipe.AddIngredient(ItemID.Vertebrae, 10); - recipe.AddTile(TileID.Anvils); - recipe.SetResult(this); - recipe.AddRecipe(); + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Crimson Flask"); + Tooltip.SetDefault("7% increased damage reduction and +3 defense while in the crimson"); + } + + public override void SetDefaults() + { + item.width = 20; + item.height = 20; + item.value = Item.buyPrice(0, 3, 0, 0); + item.rare = 2; + item.accessory = true; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + if (player.ZoneCrimson) + { + player.statDefense += 3; + player.endurance += 0.07f; + } + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(null, "BloodlettingEssence", 3); + recipe.AddIngredient(ItemID.Vertebrae, 10); + recipe.AddTile(TileID.Anvils); + recipe.SetResult(this); + recipe.AddRecipe(); + } } -}} \ No newline at end of file +} \ No newline at end of file diff --git a/Items/Accessories/CrownJewel.cs b/Items/Accessories/CrownJewel.cs index d15e2685f1..f991b66dc9 100644 --- a/Items/Accessories/CrownJewel.cs +++ b/Items/Accessories/CrownJewel.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Accessories { item.width = 26; item.height = 26; - item.value = 50000; + item.value = Item.buyPrice(0, 3, 0, 0); item.rare = 1; item.accessory = true; } diff --git a/Items/Accessories/DaedalusEmblem.cs b/Items/Accessories/DaedalusEmblem.cs index 2a1f35584f..858088bfe8 100644 --- a/Items/Accessories/DaedalusEmblem.cs +++ b/Items/Accessories/DaedalusEmblem.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Items.Accessories public override void SetStaticDefaults() { DisplayName.SetDefault("Daedalus Emblem"); - Tooltip.SetDefault("5% increased ranged damage, critical strike chance, and 20% reduced ammo usage\n" + + Tooltip.SetDefault("10% increased ranged damage, 5% increased ranged critical strike chance, and 20% reduced ammo usage\n" + "Increases life regen, minion knockback, defense, and pick speed"); } @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Accessories { item.width = 28; item.height = 32; - item.value = 5000000; + item.value = Item.buyPrice(0, 30, 0, 0); item.rare = 9; item.accessory = true; } @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Accessories player.ammoCost80 = true; player.lifeRegen += 2; player.statDefense += 5; - player.rangedDamage += 0.05f; + player.rangedDamage += 0.1f; player.rangedCrit += 5; player.pickSpeed -= 0.15f; player.minionKB += 0.5f; @@ -43,7 +43,7 @@ namespace CalamityMod.Items.Accessories ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ItemID.CelestialStone); recipe.AddIngredient(null, "CoreofCalamity"); - recipe.AddIngredient(ItemID.SniperScope); + recipe.AddIngredient(ItemID.RangerEmblem); recipe.AddTile(TileID.MythrilAnvil); recipe.SetResult(this); recipe.AddRecipe(); diff --git a/Items/Accessories/DarkSunRing.cs b/Items/Accessories/DarkSunRing.cs index f01d30fb31..5e9d880f69 100644 --- a/Items/Accessories/DarkSunRing.cs +++ b/Items/Accessories/DarkSunRing.cs @@ -5,7 +5,7 @@ using Terraria; using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; -using CalamityMod.Items; +using CalamityMod.Items.CalamityCustomThrowingDamage; namespace CalamityMod.Items.Accessories { @@ -14,9 +14,9 @@ namespace CalamityMod.Items.Accessories public override void SetStaticDefaults() { DisplayName.SetDefault("Dark Sun Ring"); - Tooltip.SetDefault("Increase to damage, melee speed, critical strike chance, life regeneration,\n" + + Tooltip.SetDefault("Increase to damage, melee speed, life regeneration,\n" + "defense, pick speed, max minions, and minion knockback\n" + - "During the day the player has +2 life regen\n" + + "During the day the player has +1 life regen\n" + "During the night the player has +20 defense\n" + "Contains the power of the dark sun"); Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(6, 6)); @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Accessories { item.width = 26; item.height = 26; - item.value = 5000000; + item.value = Item.buyPrice(0, 90, 0, 0); item.accessory = true; } @@ -45,29 +45,6 @@ namespace CalamityMod.Items.Accessories { CalamityPlayer modPlayer = player.GetModPlayer(mod); modPlayer.darkSunRing = true; - player.maxMinions += 1; - player.lifeRegen += 1; - player.statDefense += 5; - player.meleeSpeed += 0.05f; - player.meleeDamage += 0.05f; - player.meleeCrit += 5; - player.rangedDamage += 0.05f; - player.rangedCrit += 5; - player.magicDamage += 0.05f; - player.magicCrit += 5; - player.pickSpeed -= 0.3f; - player.minionDamage += 0.05f; - player.minionKB += 1f; - player.thrownDamage += 0.05f; - player.thrownCrit += 5; - if (Main.dayTime) - { - player.lifeRegen += 2; - } - else - { - player.statDefense += 20; - } } public override void AddRecipes() diff --git a/Items/Accessories/DeificAmulet.cs b/Items/Accessories/DeificAmulet.cs index 28859a5fc0..001c9e3b9c 100644 --- a/Items/Accessories/DeificAmulet.cs +++ b/Items/Accessories/DeificAmulet.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Accessories item.width = 26; item.height = 26; item.rare = 8; - item.value = 1500000; + item.value = Item.buyPrice(0, 45, 0, 0); item.accessory = true; } diff --git a/Items/Accessories/DeificAmulet.png b/Items/Accessories/DeificAmulet.png index 0594f60ad6..5556bbee2d 100644 Binary files a/Items/Accessories/DeificAmulet.png and b/Items/Accessories/DeificAmulet.png differ diff --git a/Items/Accessories/DiscordianWings.cs b/Items/Accessories/DiscordianWings.cs index 166a042ca3..d8d94011a5 100644 --- a/Items/Accessories/DiscordianWings.cs +++ b/Items/Accessories/DiscordianWings.cs @@ -16,14 +16,18 @@ namespace CalamityMod.Items.Accessories public override void SetStaticDefaults() { DisplayName.SetDefault("Discordian Wings"); - Tooltip.SetDefault("Formed from the flames of pure chaos\nGood acceleration: 2\nExcellent flight time: 125"); + Tooltip.SetDefault("Formed from the flames of pure chaos\n" + + "Horizontal speed: 7.75\n" + + "Acceleration multiplier: 1.5\n" + + "Average vertical speed\n" + + "Flight time: 180"); } public override void SetDefaults() { item.width = 22; item.height = 20; - item.value = 500000; + item.value = Item.buyPrice(0, 39, 99, 99); item.rare = 8; item.accessory = true; } @@ -46,22 +50,22 @@ namespace CalamityMod.Items.Accessories } Main.dust[num60].shader = GameShaders.Armor.GetSecondaryShader(player.cWings, player); } - player.wingTimeMax = 125; + player.wingTimeMax = 180; } public override void VerticalWingSpeeds(Player player, ref float ascentWhenFalling, ref float ascentWhenRising, ref float maxCanAscendMultiplier, ref float maxAscentMultiplier, ref float constantAscend) { - ascentWhenFalling = 0.85f; - ascentWhenRising = 0.15f; - maxCanAscendMultiplier = 1f; - maxAscentMultiplier = 3f; - constantAscend = 0.135f; + ascentWhenFalling = 0.5f; + ascentWhenRising = 0.1f; + maxCanAscendMultiplier = 0.5f; + maxAscentMultiplier = 1.5f; + constantAscend = 0.1f; } public override void HorizontalWingSpeeds(Player player, ref float speed, ref float acceleration) { - speed = 9f; - acceleration *= 2f; + speed = 7.75f; + acceleration *= 1.5f; } public override void AddRecipes() diff --git a/Items/Accessories/DraedonsHeart.cs b/Items/Accessories/DraedonsHeart.cs index 67aaaf2ac4..6e155d08b8 100644 --- a/Items/Accessories/DraedonsHeart.cs +++ b/Items/Accessories/DraedonsHeart.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Accessories { item.width = 26; item.height = 26; - item.value = 5000000; + item.value = Item.buyPrice(0, 60, 0, 0); item.accessory = true; } diff --git a/Items/Accessories/DrewsWings.cs b/Items/Accessories/DrewsWings.cs index 4dbdb6d273..2ddc3d7ee5 100644 --- a/Items/Accessories/DrewsWings.cs +++ b/Items/Accessories/DrewsWings.cs @@ -17,8 +17,10 @@ namespace CalamityMod.Items.Accessories { DisplayName.SetDefault("Drew's Wings"); Tooltip.SetDefault("Absolutely Fabulous\n" + - "Excellent acceleration: 3\n" + - "Excellent flight time: 361\n" + + "Horizontal speed: 12\n" + + "Acceleration multiplier: 3\n" + + "Excellent vertical speed\n" + + "Flight time: 361\n" + "Revengeance drop"); } @@ -26,7 +28,7 @@ namespace CalamityMod.Items.Accessories { item.width = 22; item.height = 20; - item.value = 10000000; + item.value = Item.buyPrice(1, 0, 0, 0); item.expert = true; item.accessory = true; } @@ -54,16 +56,16 @@ namespace CalamityMod.Items.Accessories public override void VerticalWingSpeeds(Player player, ref float ascentWhenFalling, ref float ascentWhenRising, ref float maxCanAscendMultiplier, ref float maxAscentMultiplier, ref float constantAscend) { - ascentWhenFalling = 0.85f; - ascentWhenRising = 0.15f; - maxCanAscendMultiplier = 1f; - maxAscentMultiplier = 3f; - constantAscend = 0.135f; + ascentWhenFalling = 1f; //0.85 + ascentWhenRising = 0.175f; //0.15 + maxCanAscendMultiplier = 1.2f; //1 + maxAscentMultiplier = 3.25f; //3 + constantAscend = 0.15f; //0.135 } public override void HorizontalWingSpeeds(Player player, ref float speed, ref float acceleration) { - speed = 13f; + speed = 12f; acceleration *= 3f; } } diff --git a/Items/Accessories/ElementalGauntlet.cs b/Items/Accessories/ElementalGauntlet.cs index 290848d791..141ff473fa 100644 --- a/Items/Accessories/ElementalGauntlet.cs +++ b/Items/Accessories/ElementalGauntlet.cs @@ -14,8 +14,8 @@ namespace CalamityMod.Items.Accessories public override void SetStaticDefaults() { DisplayName.SetDefault("Elemental Gauntlet"); - Tooltip.SetDefault("Melee attacks inflict most debuffs\n" + - "10% increased melee speed, damage, and critical strike chance\n" + + Tooltip.SetDefault("Melee attacks and projectiles inflict most debuffs\n" + + "15% increased melee speed, damage, and 5% increased melee critical strike chance\n" + "Increased invincibility after taking damage\n" + "You are immune to lava\n" + "Increased melee knockback\n" + @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Accessories { item.width = 22; item.height = 38; - item.value = 10000000; + item.value = Item.buyPrice(0, 90, 0, 0); item.accessory = true; } @@ -45,12 +45,6 @@ namespace CalamityMod.Items.Accessories { CalamityPlayer modPlayer = player.GetModPlayer(mod); modPlayer.eGauntlet = true; - player.longInvince = true; - player.kbGlove = true; - player.meleeDamage += 0.1f; - player.meleeCrit += 10; - player.meleeSpeed += 0.1f; - player.lavaImmune = true; } public override void AddRecipes() diff --git a/Items/Accessories/ElementalQuiver.cs b/Items/Accessories/ElementalQuiver.cs index b7b473e16d..c7fce59f1e 100644 --- a/Items/Accessories/ElementalQuiver.cs +++ b/Items/Accessories/ElementalQuiver.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Accessories DisplayName.SetDefault("Elemental Quiver"); Tooltip.SetDefault("Ranged projectiles have a chance to split\n" + "Ranged weapons have a chance to instantly kill normal enemies\n" + - "10% increased ranged damage and critical strike chance\n" + + "10% increased ranged damage and 5% increased ranged critical strike chance\n" + "Daedalus Emblem effects"); } @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Accessories { item.width = 28; item.height = 32; - item.value = 10000000; + item.value = Item.buyPrice(0, 90, 0, 0); item.accessory = true; } @@ -44,7 +44,7 @@ namespace CalamityMod.Items.Accessories CalamityPlayer modPlayer = player.GetModPlayer(mod); modPlayer.eQuiver = true; player.rangedDamage += 0.1f; - player.rangedCrit += 10; + player.rangedCrit += 5; player.ammoCost80 = true; player.lifeRegen += 2; player.statDefense += 5; diff --git a/Items/Accessories/ElysianTracers.cs b/Items/Accessories/ElysianTracers.cs index b10a4a7f89..ef616921eb 100644 --- a/Items/Accessories/ElysianTracers.cs +++ b/Items/Accessories/ElysianTracers.cs @@ -18,8 +18,10 @@ namespace CalamityMod.Items.Accessories { DisplayName.SetDefault("Elysian Tracers"); Tooltip.SetDefault("Counts as wings\n" + - "Excellent acceleration: 2.75\n" + - "Excellent flight time: 200\n" + + "Horizontal speed: 10.5\n" + + "Acceleration multiplier: 2.75\n" + + "Great vertical speed\n" + + "Flight time: 160\n" + "Ludicrous speed!\n" + "Greater mobility on ice\n" + "Water and lava walking\n" + @@ -30,7 +32,7 @@ namespace CalamityMod.Items.Accessories { item.width = 36; item.height = 32; - item.value = 10000000; + item.value = Item.buyPrice(0, 90, 0, 0); item.accessory = true; } @@ -71,7 +73,7 @@ namespace CalamityMod.Items.Accessories player.waterWalk = true; player.fireWalk = true; player.lavaMax += 920; - player.wingTimeMax = 200; + player.wingTimeMax = 160; modPlayer.IBoots = !hideVisual; modPlayer.elysianFire = !hideVisual; modPlayer.eTracers = true; @@ -79,16 +81,16 @@ namespace CalamityMod.Items.Accessories public override void VerticalWingSpeeds(Player player, ref float ascentWhenFalling, ref float ascentWhenRising, ref float maxCanAscendMultiplier, ref float maxAscentMultiplier, ref float constantAscend) { - ascentWhenFalling = 0.85f; + ascentWhenFalling = 0.95f; //0.85 ascentWhenRising = 0.15f; - maxCanAscendMultiplier = 1f; - maxAscentMultiplier = 3f; + maxCanAscendMultiplier = 1.1f; //1 + maxAscentMultiplier = 3.15f; //3 constantAscend = 0.135f; } public override void HorizontalWingSpeeds(Player player, ref float speed, ref float acceleration) { - speed = 11f; + speed = 10.5f; acceleration *= 2.75f; } diff --git a/Items/Accessories/EtherealTalisman.cs b/Items/Accessories/EtherealTalisman.cs index fee3e83921..a55d76a01e 100644 --- a/Items/Accessories/EtherealTalisman.cs +++ b/Items/Accessories/EtherealTalisman.cs @@ -14,9 +14,9 @@ namespace CalamityMod.Items.Accessories public override void SetStaticDefaults() { DisplayName.SetDefault("Ethereal Talisman"); - Tooltip.SetDefault("10% increased magic damage, critical strike chance, and 10% decreased mana usage\n" + + Tooltip.SetDefault("15% increased magic damage, 5% increased magic critical strike chance, and 10% decreased mana usage\n" + "+150 max mana\n" + - "Increases life regen and reveals treasure locations\n" + + "Reveals treasure locations\n" + "Reduces the cooldown of healing potions\n" + "You automatically use mana potions when needed\n" + "Magic attacks have a chance to instantly kill normal enemies"); @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Accessories { item.width = 28; item.height = 32; - item.value = 10000000; + item.value = Item.buyPrice(0, 90, 0, 0); item.accessory = true; } @@ -48,11 +48,10 @@ namespace CalamityMod.Items.Accessories player.findTreasure = true; player.pStone = true; player.manaFlower = true; - player.lifeRegen += 2; player.statManaMax2 += 150; - player.magicDamage += 0.1f; + player.magicDamage += 0.15f; player.manaCost *= 0.9f; - player.magicCrit += 10; + player.magicCrit += 5; } public override void AddRecipes() diff --git a/Items/Accessories/EyeoftheStorm.cs b/Items/Accessories/EyeoftheStorm.cs index 546ddc0ae9..b6fa077cb9 100644 --- a/Items/Accessories/EyeoftheStorm.cs +++ b/Items/Accessories/EyeoftheStorm.cs @@ -27,8 +27,8 @@ namespace CalamityMod.Items.Accessories { item.width = 20; item.height = 26; - item.value = 500000; - item.rare = 5; + item.value = Item.buyPrice(0, 15, 0, 0); + item.rare = 5; item.accessory = true; } diff --git a/Items/Accessories/FrigidBulwark.cs b/Items/Accessories/FrigidBulwark.cs index 6461d3855c..46ccedc37b 100644 --- a/Items/Accessories/FrigidBulwark.cs +++ b/Items/Accessories/FrigidBulwark.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Accessories { item.width = 38; item.height = 44; - item.value = 5000000; + item.value = Item.buyPrice(0, 30, 0, 0); item.rare = 9; item.defense = 8; item.accessory = true; diff --git a/Items/Accessories/FrostBarrier.cs b/Items/Accessories/FrostBarrier.cs index 10cf1ddaae..124d8a097d 100644 --- a/Items/Accessories/FrostBarrier.cs +++ b/Items/Accessories/FrostBarrier.cs @@ -23,8 +23,8 @@ namespace CalamityMod.Items.Accessories item.defense = 4; item.width = 20; item.height = 24; - item.value = 50000; - item.rare = 3; + item.value = Item.buyPrice(0, 9, 0, 0); + item.rare = 3; item.accessory = true; } diff --git a/Items/Accessories/FrostFlare.cs b/Items/Accessories/FrostFlare.cs index 2cafc3a260..2dd4bfa057 100644 --- a/Items/Accessories/FrostFlare.cs +++ b/Items/Accessories/FrostFlare.cs @@ -6,6 +6,7 @@ using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items; +using CalamityMod.Items.CalamityCustomThrowingDamage; namespace CalamityMod.Items.Accessories { @@ -17,7 +18,7 @@ namespace CalamityMod.Items.Accessories Tooltip.SetDefault("All melee attacks and projectiles inflict frostburn\n" + "Immunity to frostburn, chilled, and frozen\n" + "Resistant to cold attacks and +1 life regen\n" + - "Being above 75% life grants the player 5% increased damage and critical strike chance\n" + + "Being above 75% life grants the player 10% increased damage\n" + "Being below 25% life grants the player 20 defense and 15% increased max movement speed and acceleration\n" + "Revengeance drop"); Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(5, 10)); @@ -28,8 +29,8 @@ namespace CalamityMod.Items.Accessories item.width = 20; item.height = 24; item.lifeRegen = 1; - item.value = 500000; - item.rare = 5; + item.value = Item.buyPrice(0, 24, 0, 0); + item.rare = 5; item.accessory = true; } @@ -43,15 +44,11 @@ namespace CalamityMod.Items.Accessories player.buffImmune[47] = true; if (player.statLife > (player.statLifeMax2 * 0.75f)) { - player.meleeDamage += 0.05f; - player.magicDamage += 0.05f; - player.rangedDamage += 0.05f; - player.thrownDamage += 0.05f; - player.minionDamage += 0.05f; - player.meleeCrit += 5; - player.magicCrit += 5; - player.rangedCrit += 5; - player.thrownCrit += 5; + player.meleeDamage += 0.1f; + player.magicDamage += 0.1f; + player.rangedDamage += 0.1f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.1f; + player.minionDamage += 0.1f; } if (player.statLife < (player.statLifeMax2 * 0.25f)) { diff --git a/Items/Accessories/FungalCarapace.cs b/Items/Accessories/FungalCarapace.cs index 96b3de5e81..c9d2f578a1 100644 --- a/Items/Accessories/FungalCarapace.cs +++ b/Items/Accessories/FungalCarapace.cs @@ -22,8 +22,8 @@ namespace CalamityMod.Items.Accessories item.defense = 2; item.width = 20; item.height = 24; - item.value = 30000; - item.rare = 1; + item.value = Item.buyPrice(0, 9, 0, 0); + item.rare = 1; item.accessory = true; } diff --git a/Items/Accessories/GiantShell.cs b/Items/Accessories/GiantShell.cs index aaec9948b3..50d639c197 100644 --- a/Items/Accessories/GiantShell.cs +++ b/Items/Accessories/GiantShell.cs @@ -23,8 +23,8 @@ namespace CalamityMod.Items.Accessories item.defense = 6; item.width = 20; item.height = 24; - item.value = 30000; - item.rare = 1; + item.value = Item.buyPrice(0, 3, 0, 0); + item.rare = 1; item.accessory = true; } diff --git a/Items/Accessories/GiantTortoiseShell.cs b/Items/Accessories/GiantTortoiseShell.cs index 42aed65bd8..04dfc64aee 100644 --- a/Items/Accessories/GiantTortoiseShell.cs +++ b/Items/Accessories/GiantTortoiseShell.cs @@ -23,8 +23,8 @@ namespace CalamityMod.Items.Accessories item.defense = 8; item.width = 20; item.height = 24; - item.value = 100000; - item.rare = 5; + item.value = Item.buyPrice(0, 9, 0, 0); + item.rare = 5; item.accessory = true; } diff --git a/Items/Accessories/GoldBurdenBreaker.cs b/Items/Accessories/GoldBurdenBreaker.cs index cd24f65192..420f394801 100644 --- a/Items/Accessories/GoldBurdenBreaker.cs +++ b/Items/Accessories/GoldBurdenBreaker.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Accessories { item.width = 28; item.height = 28; - item.value = 150000; + item.value = Item.buyPrice(0, 9, 0, 0); item.rare = 3; item.accessory = true; } diff --git a/Items/Accessories/GrandGelatin.cs b/Items/Accessories/GrandGelatin.cs index a857d53832..15743b2f59 100644 --- a/Items/Accessories/GrandGelatin.cs +++ b/Items/Accessories/GrandGelatin.cs @@ -24,8 +24,8 @@ namespace CalamityMod.Items.Accessories { item.width = 20; item.height = 24; - item.value = 300000; - item.rare = 6; + item.value = Item.buyPrice(0, 15, 0, 0); + item.rare = 6; item.accessory = true; } @@ -37,7 +37,7 @@ namespace CalamityMod.Items.Accessories player.statManaMax2 += 20; if ((double)Math.Abs(player.velocity.X) < 0.05 && (double)Math.Abs(player.velocity.Y) < 0.05 && player.itemAnimation == 0) { - player.lifeRegen += 5; + player.lifeRegen += 2; player.manaRegenBonus += 2; } } diff --git a/Items/Accessories/HarpyRing.cs b/Items/Accessories/HarpyRing.cs index 7176203f65..81f0c29716 100644 --- a/Items/Accessories/HarpyRing.cs +++ b/Items/Accessories/HarpyRing.cs @@ -22,8 +22,7 @@ namespace CalamityMod.Items.Accessories { item.width = 20; item.height = 22; - item.lifeRegen = 2; - item.value = 50000; + item.value = Item.buyPrice(0, 3, 0, 0); item.rare = 4; item.accessory = true; } diff --git a/Items/Accessories/HeartofDarkness.cs b/Items/Accessories/HeartofDarkness.cs index 9b03520032..1ce2a526ff 100644 --- a/Items/Accessories/HeartofDarkness.cs +++ b/Items/Accessories/HeartofDarkness.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Accessories { item.width = 26; item.height = 26; - item.value = 1500000; + item.value = Item.buyPrice(0, 15, 0, 0); item.rare = 10; item.accessory = true; } diff --git a/Items/Accessories/HeartoftheElements.cs b/Items/Accessories/HeartoftheElements.cs index 2fea76c8e4..bcca46495d 100644 --- a/Items/Accessories/HeartoftheElements.cs +++ b/Items/Accessories/HeartoftheElements.cs @@ -6,6 +6,7 @@ using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items; +using CalamityMod.Items.CalamityCustomThrowingDamage; namespace CalamityMod.Items.Accessories { @@ -15,7 +16,7 @@ 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 2, and all damage and crit chance by 5%\n" + + "Increases max life by 20, life regen by 1, and all damage by 8%\n" + "Increases movement speed by 10% and jump speed by 200%\n" + "Increases damage reduction by 5%\n" + "Increases max mana by 50 and reduces mana usage by 5%\n" + @@ -30,8 +31,8 @@ namespace CalamityMod.Items.Accessories { item.width = 20; item.height = 20; - item.value = 10000000; - item.defense = 6; + item.value = Item.buyPrice(0, 60, 0, 0); + item.defense = 9; item.accessory = true; } @@ -64,22 +65,18 @@ namespace CalamityMod.Items.Accessories modPlayer.elementalHeart = true; if (!hideVisual) { - player.lifeRegen += 2; + player.lifeRegen += 1; player.statLifeMax2 += 20; player.moveSpeed += 0.1f; player.jumpSpeedBoost += 2.0f; player.endurance += 0.05f; player.statManaMax2 += 50; player.manaCost *= 0.95f; - player.meleeCrit += 5; - player.meleeDamage += 0.05f; - player.magicCrit += 5; - player.magicDamage += 0.05f; - player.rangedCrit += 5; - player.rangedDamage += 0.05f; - player.thrownCrit += 5; - player.thrownDamage += 0.05f; - player.minionDamage += 0.05f; + player.meleeDamage += 0.08f; + player.magicDamage += 0.08f; + player.rangedDamage += 0.08f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.08f; + player.minionDamage += 0.08f; int damage = NPC.downedMoonlord ? 150 : 90; float damageMult = CalamityWorld.downedDoG ? 2f : 1f; if (player.ownedProjectileCounts[mod.ProjectileType("BigBustyRose")] > 1 || player.ownedProjectileCounts[mod.ProjectileType("SirenLure")] > 1 || @@ -115,22 +112,18 @@ namespace CalamityMod.Items.Accessories } else { - player.lifeRegen += 3; + player.lifeRegen += 2; player.statLifeMax2 += 25; player.moveSpeed += 0.12f; player.jumpSpeedBoost += 2.2f; player.endurance += 0.06f; player.statManaMax2 += 60; player.manaCost *= 0.93f; - player.meleeCrit += 6; - player.meleeDamage += 0.06f; - player.magicCrit += 6; - player.magicDamage += 0.06f; - player.rangedCrit += 6; - player.rangedDamage += 0.06f; - player.thrownCrit += 6; - player.thrownDamage += 0.06f; - player.minionDamage += 0.06f; + player.meleeDamage += 0.1f; + player.magicDamage += 0.1f; + player.rangedDamage += 0.1f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.1f; + player.minionDamage += 0.1f; if (player.ownedProjectileCounts[mod.ProjectileType("BigBustyRose")] > 0 || player.ownedProjectileCounts[mod.ProjectileType("SirenLure")] > 0 || player.ownedProjectileCounts[mod.ProjectileType("DrewsSandyWaifu")] > 0 || player.ownedProjectileCounts[mod.ProjectileType("SandyWaifu")] > 0 || player.ownedProjectileCounts[mod.ProjectileType("CloudWaifu")] > 0) diff --git a/Items/Accessories/HoneyDew.cs b/Items/Accessories/HoneyDew.cs index 8c57fcf6e3..55c3f752c6 100644 --- a/Items/Accessories/HoneyDew.cs +++ b/Items/Accessories/HoneyDew.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Accessories { item.width = 20; item.height = 20; - item.value = 500000; + item.value = Item.buyPrice(0, 15, 0, 0); item.rare = 7; item.accessory = true; } @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Accessories modPlayer.beeResist = true; if (player.ZoneJungle) { - player.lifeRegen += 2; + player.lifeRegen += 1; player.statDefense += 5; player.endurance += 0.05f; } @@ -43,7 +43,7 @@ namespace CalamityMod.Items.Accessories player.buffImmune[20] = true; if (!player.honey && player.lifeRegen < 0) { - player.lifeRegen += 3; + player.lifeRegen += 2; if (player.lifeRegen > 0) { player.lifeRegen = 0; diff --git a/Items/Accessories/InfinityBoots.cs b/Items/Accessories/InfinityBoots.cs index 2f6823066a..d465a3ce83 100644 --- a/Items/Accessories/InfinityBoots.cs +++ b/Items/Accessories/InfinityBoots.cs @@ -18,8 +18,10 @@ namespace CalamityMod.Items.Accessories { DisplayName.SetDefault("Seraph Tracers"); Tooltip.SetDefault("Counts as wings\n" + - "Excellent acceleration: 2.25\n" + - "Excellent flight time: 120\n" + + "Horizontal speed: 9\n" + + "Acceleration multiplier: 2.5\n" + + "Good vertical speed\n" + + "Flight time: 120\n" + "Ludicrous speed!\n" + "Greater mobility on ice\n" + "Water and lava walking\n" + @@ -30,7 +32,7 @@ namespace CalamityMod.Items.Accessories { item.width = 36; item.height = 32; - item.value = 5000000; + item.value = Item.buyPrice(0, 60, 0, 0); item.accessory = true; } @@ -78,17 +80,17 @@ namespace CalamityMod.Items.Accessories public override void VerticalWingSpeeds(Player player, ref float ascentWhenFalling, ref float ascentWhenRising, ref float maxCanAscendMultiplier, ref float maxAscentMultiplier, ref float constantAscend) { - ascentWhenFalling = 0.85f; + ascentWhenFalling = 0.75f; ascentWhenRising = 0.15f; maxCanAscendMultiplier = 1f; - maxAscentMultiplier = 3f; - constantAscend = 0.135f; + maxAscentMultiplier = 2.5f; + constantAscend = 0.125f; } public override void HorizontalWingSpeeds(Player player, ref float speed, ref float acceleration) { - speed = 10f; - acceleration *= 2.25f; + speed = 9f; + acceleration *= 2.5f; } public override void AddRecipes() diff --git a/Items/Accessories/Laudanum.cs b/Items/Accessories/Laudanum.cs index 67c807d13e..ea4bb047f2 100644 --- a/Items/Accessories/Laudanum.cs +++ b/Items/Accessories/Laudanum.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Items.Accessories public override void SetStaticDefaults() { DisplayName.SetDefault("Laudanum"); - Tooltip.SetDefault("Boosts your damage and crit chance by 6%, \n" + + Tooltip.SetDefault("Boosts your damage by 6%,\n" + "defense by 8, and max movement speed and acceleration by 5%\n" + "Makes you immune to The Horror debuff\n" + "Revengeance drop"); @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Accessories { item.width = 26; item.height = 26; - item.value = 50000; + item.value = Item.buyPrice(0, 9, 0, 0); item.rare = 3; item.accessory = true; } diff --git a/Items/Accessories/LeadCore.cs b/Items/Accessories/LeadCore.cs index 76c433edfd..bd34176bef 100644 --- a/Items/Accessories/LeadCore.cs +++ b/Items/Accessories/LeadCore.cs @@ -7,26 +7,28 @@ using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items; -namespace CalamityMod.Items.Accessories { -public class LeadCore : ModItem +namespace CalamityMod.Items.Accessories { - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Lead Core"); - Tooltip.SetDefault("Grants immunity to the irradiated debuff"); - } - - public override void SetDefaults() - { - item.width = 26; - item.height = 26; - item.rare = 10; - item.value = 150000; - item.accessory = true; - } - - public override void UpdateAccessory(Player player, bool hideVisual) - { - player.buffImmune[mod.BuffType("Irradiated")] = true; - } -}} \ No newline at end of file + public class LeadCore : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Lead Core"); + Tooltip.SetDefault("Grants immunity to the irradiated debuff"); + } + + public override void SetDefaults() + { + item.width = 26; + item.height = 26; + item.rare = 10; + item.value = Item.buyPrice(0, 30, 0, 0); + item.accessory = true; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + player.buffImmune[mod.BuffType("Irradiated")] = true; + } + } +} \ No newline at end of file diff --git a/Items/Accessories/LifeJelly.cs b/Items/Accessories/LifeJelly.cs index a902eb286f..a9cb2b94a3 100644 --- a/Items/Accessories/LifeJelly.cs +++ b/Items/Accessories/LifeJelly.cs @@ -22,8 +22,8 @@ namespace CalamityMod.Items.Accessories { item.width = 20; item.height = 24; - item.value = 30000; - item.rare = 1; + item.value = Item.buyPrice(0, 6, 0, 0); + item.rare = 1; item.accessory = true; } @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Accessories player.statLifeMax2 += 20; if ((double)Math.Abs(player.velocity.X) < 0.05 && (double)Math.Abs(player.velocity.Y) < 0.05 && player.itemAnimation == 0) { - player.lifeRegen += 5; + player.lifeRegen += 2; } } } diff --git a/Items/Accessories/LivingDew.cs b/Items/Accessories/LivingDew.cs index e9310670d6..bba4c6ca70 100644 --- a/Items/Accessories/LivingDew.cs +++ b/Items/Accessories/LivingDew.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.Accessories { item.width = 20; item.height = 20; - item.value = 500000; + item.value = Item.buyPrice(0, 12, 0, 0); item.rare = 5; item.accessory = true; } @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Accessories { if (player.ZoneJungle) { - player.lifeRegen += 2; + player.lifeRegen += 1; player.statDefense += 5; player.endurance += 0.05f; } diff --git a/Items/Accessories/MOAB.cs b/Items/Accessories/MOAB.cs index 5c168cb7e1..12e6ef8799 100644 --- a/Items/Accessories/MOAB.cs +++ b/Items/Accessories/MOAB.cs @@ -17,16 +17,18 @@ namespace CalamityMod.Items.Accessories { DisplayName.SetDefault("MOAB"); Tooltip.SetDefault("The mother of all balloons\n" + - "Counts as wings\n" + - "Decent acceleration: 1.3\n" + - "Low flight time: 50"); + "Counts as wings\n" + + "Horizontal speed: 6\n" + + "Acceleration multiplier: 1\n" + + "Good vertical speed\n" + + "Flight time: 60"); } public override void SetDefaults() { item.width = 28; item.height = 32; - item.value = 5000000; + item.value = Item.buyPrice(0, 39, 99, 99); item.rare = 8; item.accessory = true; } @@ -94,22 +96,21 @@ namespace CalamityMod.Items.Accessories player.autoJump = true; player.noFallDmg = true; player.jumpSpeedBoost += 1.4f; - player.wingTimeMax = 50; + player.wingTimeMax = 60; } public override void VerticalWingSpeeds(Player player, ref float ascentWhenFalling, ref float ascentWhenRising, ref float maxCanAscendMultiplier, ref float maxAscentMultiplier, ref float constantAscend) { - ascentWhenFalling = 0.85f; + ascentWhenFalling = 0.75f; ascentWhenRising = 0.15f; maxCanAscendMultiplier = 1f; - maxAscentMultiplier = 3f; - constantAscend = 0.135f; + maxAscentMultiplier = 2.5f; + constantAscend = 0.125f; } public override void HorizontalWingSpeeds(Player player, ref float speed, ref float acceleration) { - speed = 9f; - acceleration *= 1.3f; + speed = 6f; } public override void AddRecipes() diff --git a/Items/Accessories/MagicLevelMeter.cs b/Items/Accessories/MagicLevelMeter.cs new file mode 100644 index 0000000000..e6f5bb5feb --- /dev/null +++ b/Items/Accessories/MagicLevelMeter.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Items; + +namespace CalamityMod.Items.Accessories +{ + public class MagicLevelMeter : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Magic Level Meter"); + Tooltip.SetDefault("Tells you how high your magic proficiency is"); + } + + public override void SetDefaults() + { + item.width = 26; + item.height = 26; + item.value = Item.buyPrice(0, 6, 0, 0); + item.rare = 1; + item.accessory = true; + } + + public override void ModifyTooltips(List list) + { + int level = Main.player[Main.myPlayer].GetModPlayer(mod).magicLevel; + foreach (TooltipLine line2 in list) + { + if (line2.mod == "Terraria" && line2.Name == "Tooltip0") + { + line2.text = "Tells you how high your magic proficiency is\n" + + "While equipped you will gain magic proficiency faster\n" + + "The higher your magic level the higher your magic damage, critical strike chance, and the lower your mana cost\n" + + "Magic proficiency (max of 12500): " + (level - (level > 12500 ? 1 : 0)) + "\n" + + "Magic level (max of 15): " + Main.player[Main.myPlayer].GetModPlayer(mod).exactMagicLevel; + } + } + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + CalamityPlayer modPlayer = player.GetModPlayer(mod); + modPlayer.fasterMagicLevel = true; + } + } +} \ No newline at end of file diff --git a/Items/Accessories/MagicLevelMeter.png b/Items/Accessories/MagicLevelMeter.png new file mode 100644 index 0000000000..c3e5bff4fc Binary files /dev/null and b/Items/Accessories/MagicLevelMeter.png differ diff --git a/Items/Accessories/ManaJelly.cs b/Items/Accessories/ManaJelly.cs index 5d943ea118..c29686aef7 100644 --- a/Items/Accessories/ManaJelly.cs +++ b/Items/Accessories/ManaJelly.cs @@ -22,8 +22,8 @@ namespace CalamityMod.Items.Accessories { item.width = 20; item.height = 24; - item.value = 30000; - item.rare = 1; + item.value = Item.buyPrice(0, 6, 0, 0); + item.rare = 1; item.accessory = true; } diff --git a/Items/Accessories/MeleeLevelMeter.cs b/Items/Accessories/MeleeLevelMeter.cs new file mode 100644 index 0000000000..429865f27d --- /dev/null +++ b/Items/Accessories/MeleeLevelMeter.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Items; + +namespace CalamityMod.Items.Accessories +{ + public class MeleeLevelMeter : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Melee Level Meter"); + Tooltip.SetDefault("Tells you how high your melee proficiency is"); + } + + public override void SetDefaults() + { + item.width = 26; + item.height = 26; + item.value = Item.buyPrice(0, 6, 0, 0); + item.rare = 1; + item.accessory = true; + } + + public override void ModifyTooltips(List list) + { + int level = Main.player[Main.myPlayer].GetModPlayer(mod).meleeLevel; + foreach (TooltipLine line2 in list) + { + if (line2.mod == "Terraria" && line2.Name == "Tooltip0") + { + line2.text = "Tells you how high your melee proficiency is\n" + + "While equipped you will gain melee proficiency faster\n" + + "The higher your melee level the higher your melee damage, speed, and critical strike chance\n" + + "Melee proficiency (max of 12500): " + (level - (level > 12500 ? 1 : 0)) + "\n" + + "Melee level (max of 15): " + Main.player[Main.myPlayer].GetModPlayer(mod).exactMeleeLevel; + } + } + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + CalamityPlayer modPlayer = player.GetModPlayer(mod); + modPlayer.fasterMeleeLevel = true; + } + } +} \ No newline at end of file diff --git a/Items/Accessories/MeleeLevelMeter.png b/Items/Accessories/MeleeLevelMeter.png new file mode 100644 index 0000000000..c3e5bff4fc Binary files /dev/null and b/Items/Accessories/MeleeLevelMeter.png differ diff --git a/Items/Accessories/Nanotech.cs b/Items/Accessories/Nanotech.cs index 4fc46ecdb3..c6c8717502 100644 --- a/Items/Accessories/Nanotech.cs +++ b/Items/Accessories/Nanotech.cs @@ -6,6 +6,7 @@ using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items; +using CalamityMod.Items.CalamityCustomThrowingDamage; namespace CalamityMod.Items.Accessories { @@ -14,17 +15,17 @@ namespace CalamityMod.Items.Accessories public override void SetStaticDefaults() { DisplayName.SetDefault("Nanotech"); - Tooltip.SetDefault("Throwing projectiles leave behind nanoblades as they travel\n" + - "While holding a throwing weapon your defense is boosted by 15 and your damage reduction is boosted by 10%\n" + - "Throwing weapons have a chance to instantly kill normal enemies\n" + - "10% increased throwing damage, crit chance, and velocity"); + Tooltip.SetDefault("Rogue projectiles leave behind nanoblades as they travel\n" + + "While holding a rogue weapon your defense is boosted by 15 and your damage reduction is boosted by 10%\n" + + "Rogue weapons have a chance to instantly kill normal enemies\n" + + "15% increased rogue damage, 5% increased rogue crit chance, and 15% increased rogue velocity"); } public override void SetDefaults() { item.width = 28; item.height = 32; - item.value = 10000000; + item.value = Item.buyPrice(0, 90, 0, 0); item.accessory = true; } @@ -43,9 +44,9 @@ namespace CalamityMod.Items.Accessories { CalamityPlayer modPlayer = player.GetModPlayer(mod); modPlayer.nanotech = true; - player.thrownDamage += 0.1f; - player.thrownCrit += 10; - player.thrownVelocity += 0.1f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.15f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 5; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingVelocity += 0.15f; } public override void AddRecipes() diff --git a/Items/Accessories/NecklaceofVexation.cs b/Items/Accessories/NecklaceofVexation.cs index 4f24724574..a0a711db82 100644 --- a/Items/Accessories/NecklaceofVexation.cs +++ b/Items/Accessories/NecklaceofVexation.cs @@ -6,6 +6,7 @@ using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items; +using CalamityMod.Items.CalamityCustomThrowingDamage; namespace CalamityMod.Items.Accessories { @@ -22,7 +23,7 @@ namespace CalamityMod.Items.Accessories { item.width = 28; item.height = 28; - item.value = 150000; + item.value = Item.buyPrice(0, 15, 0, 0); item.rare = 6; item.accessory = true; } @@ -34,7 +35,7 @@ namespace CalamityMod.Items.Accessories player.meleeDamage += 0.15f; player.magicDamage += 0.15f; player.rangedDamage += 0.15f; - player.thrownDamage += 0.15f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.15f; player.minionDamage += 0.15f; } } diff --git a/Items/Accessories/OrnateShield.cs b/Items/Accessories/OrnateShield.cs index df8758a11e..d672b10d66 100644 --- a/Items/Accessories/OrnateShield.cs +++ b/Items/Accessories/OrnateShield.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.Accessories { item.width = 36; item.height = 32; - item.value = 150000; + item.value = Item.buyPrice(0, 12, 0, 0); item.rare = 5; item.defense = 4; item.accessory = true; diff --git a/Items/Accessories/PlagueHive.cs b/Items/Accessories/PlagueHive.cs index a580175c04..3478299366 100644 --- a/Items/Accessories/PlagueHive.cs +++ b/Items/Accessories/PlagueHive.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Accessories { item.width = 30; item.height = 38; - item.value = 500000; + item.value = Item.buyPrice(0, 60, 0, 0); item.expert = true; item.accessory = true; } @@ -51,6 +51,7 @@ namespace CalamityMod.Items.Accessories player.buffImmune[mod.BuffType("Plague")] = true; player.bee = true; modPlayer.uberBees = true; + player.strongBees = true; modPlayer.alchFlask = true; if (player.statLife >= (player.statLifeMax * 0.9f)) { diff --git a/Items/Accessories/PsychoticAmulet.cs b/Items/Accessories/PsychoticAmulet.cs index 665883d65a..bca56fc064 100644 --- a/Items/Accessories/PsychoticAmulet.cs +++ b/Items/Accessories/PsychoticAmulet.cs @@ -22,8 +22,8 @@ namespace CalamityMod.Items.Accessories { item.width = 26; item.height = 26; - item.value = 150000; - item.rare = 8; + item.value = Item.buyPrice(0, 15, 0, 0); + item.rare = 6; item.accessory = true; } diff --git a/Items/Accessories/RadiantOoze.cs b/Items/Accessories/RadiantOoze.cs index 9ed76c6e27..f68bcd8be7 100644 --- a/Items/Accessories/RadiantOoze.cs +++ b/Items/Accessories/RadiantOoze.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.Accessories { item.width = 20; item.height = 20; - item.value = 50000; + item.value = Item.buyPrice(0, 6, 0, 0); item.rare = 3; item.accessory = true; } @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Accessories if (!Main.dayTime) { Lighting.AddLight((int)(player.position.X + (float)(player.width / 2)) / 16, (int)(player.position.Y + (float)(player.height / 2)) / 16, 1f, 1f, 0.6f); - player.lifeRegen += 2; + player.lifeRegen += 1; } } diff --git a/Items/Accessories/RaidersTalisman.cs b/Items/Accessories/RaidersTalisman.cs index a461e54028..ea2a892c01 100644 --- a/Items/Accessories/RaidersTalisman.cs +++ b/Items/Accessories/RaidersTalisman.cs @@ -14,16 +14,16 @@ namespace CalamityMod.Items.Accessories public override void SetStaticDefaults() { DisplayName.SetDefault("Raider's Talisman"); - Tooltip.SetDefault("Whenever you crit an enemy with a throwing weapon your throwing damage increases\n" + + Tooltip.SetDefault("Whenever you crit an enemy with a rogue weapon your throwing damage increases\n" + "This effect can stack up to 250 times\n" + - "Max throwing damage boost is 15%"); + "Max rogue damage boost is 15%"); } public override void SetDefaults() { item.width = 20; item.height = 20; - item.value = 30000; + item.value = Item.buyPrice(0, 9, 0, 0); item.rare = 2; item.accessory = true; } diff --git a/Items/Accessories/RampartofDeities.cs b/Items/Accessories/RampartofDeities.cs index 33f2119429..b3071013f1 100644 --- a/Items/Accessories/RampartofDeities.cs +++ b/Items/Accessories/RampartofDeities.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Accessories { item.width = 38; item.height = 44; - item.value = 10000000; + item.value = Item.buyPrice(0, 90, 0, 0); item.defense = 12; item.accessory = true; } diff --git a/Items/Accessories/RangedLevelMeter.cs b/Items/Accessories/RangedLevelMeter.cs new file mode 100644 index 0000000000..701bdd8359 --- /dev/null +++ b/Items/Accessories/RangedLevelMeter.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Items; + +namespace CalamityMod.Items.Accessories +{ + public class RangedLevelMeter : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Ranged Level Meter"); + Tooltip.SetDefault("Tells you how high your ranged proficiency is"); + } + + public override void SetDefaults() + { + item.width = 26; + item.height = 26; + item.value = Item.buyPrice(0, 6, 0, 0); + item.rare = 1; + item.accessory = true; + } + + public override void ModifyTooltips(List list) + { + int level = Main.player[Main.myPlayer].GetModPlayer(mod).rangedLevel; + foreach (TooltipLine line2 in list) + { + if (line2.mod == "Terraria" && line2.Name == "Tooltip0") + { + line2.text = "Tells you how high your ranged proficiency is\n" + + "While equipped you will gain ranged proficiency faster\n" + + "The higher your ranged level the higher your ranged damage, critical strike chance, and movement speed\n" + + "Ranged proficiency (max of 12500): " + (level - (level > 12500 ? 1 : 0)) + "\n" + + "Ranged level (max of 15): " + Main.player[Main.myPlayer].GetModPlayer(mod).exactRangedLevel; + } + } + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + CalamityPlayer modPlayer = player.GetModPlayer(mod); + modPlayer.fasterRangedLevel = true; + } + } +} \ No newline at end of file diff --git a/Items/Accessories/RangedLevelMeter.png b/Items/Accessories/RangedLevelMeter.png new file mode 100644 index 0000000000..c3e5bff4fc Binary files /dev/null and b/Items/Accessories/RangedLevelMeter.png differ diff --git a/Items/Accessories/Revenge.cs b/Items/Accessories/Revenge.cs index 66e6475332..b1c8346e82 100644 --- a/Items/Accessories/Revenge.cs +++ b/Items/Accessories/Revenge.cs @@ -22,10 +22,10 @@ namespace CalamityMod.Items.Accessories "Activates adrenaline, which is a new stat. When adrenaline is maxed press B to activate adrenaline mode.\n" + "You gain adrenaline whenever a boss is alive. Getting hit drops adrenaline back to 0.\n" + "If you hit max adrenaline and don't use it within 5 seconds your adrenaline damage will drop gradually.\n" + - "All enemies drop 5 times the cash and enemy spawn rates are boosted.\n" + - "You do 5% MORE damage but you also take 5% MORE damage (this is only active after your first boss kill).\n" + + "All enemies drop twice the cash and enemy spawn rates are boosted.\n" + "Before you have killed your first boss you take 20% LESS damage from everything.\n" + - "Changes ALL boss AIs in vanilla and the Calamity Mod.\n" + + "Changes the Expert Mode 75% defense back to the Normal Mode 50% defense for the duration of prehardmode.\n" + + "Changes ALL boss AIs in vanilla and the Calamity Mod.\n" + "DO NOT USE IF A BOSS IS ALIVE!\n" + "Only use if you are absolutely sure you want to go through with this!"); } @@ -72,5 +72,13 @@ namespace CalamityMod.Items.Accessories } return true; } - } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddTile(TileID.DemonAltar); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } } \ No newline at end of file diff --git a/Items/Accessories/RogueEmblem.cs b/Items/Accessories/RogueEmblem.cs new file mode 100644 index 0000000000..0f620f85fe --- /dev/null +++ b/Items/Accessories/RogueEmblem.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Items.CalamityCustomThrowingDamage; + +namespace CalamityMod.Items.Accessories +{ + public class RogueEmblem : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Rogue Emblem"); + Tooltip.SetDefault("15% increased rogue damage"); + } + + public override void SetDefaults() + { + item.width = 24; + item.height = 24; + item.value = 100000; + item.rare = 4; + item.accessory = true; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + CalamityCustomThrowingDamagePlayer modPlayer2 = CalamityCustomThrowingDamagePlayer.ModPlayer(player); + modPlayer2.throwingDamage += 0.15f; + } + } +} \ No newline at end of file diff --git a/Items/Accessories/RogueEmblem.png b/Items/Accessories/RogueEmblem.png new file mode 100644 index 0000000000..b4d1c69c50 Binary files /dev/null and b/Items/Accessories/RogueEmblem.png differ diff --git a/Items/Accessories/RogueLevelMeter.cs b/Items/Accessories/RogueLevelMeter.cs new file mode 100644 index 0000000000..5c26868007 --- /dev/null +++ b/Items/Accessories/RogueLevelMeter.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Items; + +namespace CalamityMod.Items.Accessories +{ + public class RogueLevelMeter : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Rogue Level Meter"); + Tooltip.SetDefault("Tells you how high your rogue proficiency is"); + } + + public override void SetDefaults() + { + item.width = 26; + item.height = 26; + item.value = Item.buyPrice(0, 6, 0, 0); + item.rare = 1; + item.accessory = true; + } + + public override void ModifyTooltips(List list) + { + int level = Main.player[Main.myPlayer].GetModPlayer(mod).rogueLevel; + foreach (TooltipLine line2 in list) + { + if (line2.mod == "Terraria" && line2.Name == "Tooltip0") + { + line2.text = "Tells you how high your rogue proficiency is\n" + + "While equipped you will gain rogue proficiency faster\n" + + "The higher your rogue level the higher your rogue damage, critical strike chance, and velocity\n" + + "Rogue proficiency (max of 12500): " + (level - (level > 12500 ? 1 : 0)) + "\n" + + "Rogue level (max of 15): " + Main.player[Main.myPlayer].GetModPlayer(mod).exactRogueLevel; + } + } + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + CalamityPlayer modPlayer = player.GetModPlayer(mod); + modPlayer.fasterRogueLevel = true; + } + } +} \ No newline at end of file diff --git a/Items/Accessories/RogueLevelMeter.png b/Items/Accessories/RogueLevelMeter.png new file mode 100644 index 0000000000..c3e5bff4fc Binary files /dev/null and b/Items/Accessories/RogueLevelMeter.png differ diff --git a/Items/Accessories/SeaShell.cs b/Items/Accessories/SeaShell.cs index 2bf10029df..abe5e85085 100644 --- a/Items/Accessories/SeaShell.cs +++ b/Items/Accessories/SeaShell.cs @@ -23,8 +23,8 @@ namespace CalamityMod.Items.Accessories item.defense = 2; item.width = 20; item.height = 24; - item.value = 30000; - item.rare = 1; + item.value = Item.buyPrice(0, 3, 0, 0); + item.rare = 1; item.accessory = true; } diff --git a/Items/Accessories/ShieldoftheOcean.cs b/Items/Accessories/ShieldoftheOcean.cs index 4a34875d73..9c01111158 100644 --- a/Items/Accessories/ShieldoftheOcean.cs +++ b/Items/Accessories/ShieldoftheOcean.cs @@ -7,40 +7,42 @@ using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items; -namespace CalamityMod.Items.Accessories { -public class ShieldoftheOcean : ModItem +namespace CalamityMod.Items.Accessories { - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Shield of the Ocean"); - Tooltip.SetDefault("Increased defense by 5 when submerged in liquid"); - } - - public override void SetDefaults() - { - item.width = 24; - item.height = 28; - item.value = 50000; - item.rare = 2; - item.defense = 2; - item.accessory = true; - } - - public override void UpdateAccessory(Player player, bool hideVisual) - { - if (Collision.DrownCollision(player.position, player.width, player.height, player.gravDir)) - { - player.statDefense += 5; - } - } - - public override void AddRecipes() - { - ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(null, "VictideBar", 5); - recipe.AddIngredient(ItemID.Coral, 5); - recipe.AddTile(TileID.Anvils); - recipe.SetResult(this); - recipe.AddRecipe(); - } -}} \ No newline at end of file + public class ShieldoftheOcean : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Shield of the Ocean"); + Tooltip.SetDefault("Increased defense by 5 when submerged in liquid"); + } + + public override void SetDefaults() + { + item.width = 24; + item.height = 28; + item.value = Item.buyPrice(0, 3, 0, 0); + item.rare = 2; + item.defense = 2; + item.accessory = true; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + if (Collision.DrownCollision(player.position, player.width, player.height, player.gravDir)) + { + player.statDefense += 5; + } + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(null, "VictideBar", 5); + recipe.AddIngredient(ItemID.Coral, 5); + recipe.AddTile(TileID.Anvils); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } +} \ No newline at end of file diff --git a/Items/Accessories/SigilofCalamitas.cs b/Items/Accessories/SigilofCalamitas.cs index 3755c4a33c..610dc71a17 100644 --- a/Items/Accessories/SigilofCalamitas.cs +++ b/Items/Accessories/SigilofCalamitas.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.Accessories { DisplayName.SetDefault("Sigil of Calamitas"); Tooltip.SetDefault("10% increased magic damage and 10% decreased mana usage\n" + - "+100 max mana, increases life regen, and reveals treasure locations\n" + + "+100 max mana and reveals treasure locations\n" + "Reduces the cooldown of healing potions"); Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(6, 8)); } @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Accessories { item.width = 28; item.height = 32; - item.value = 5000000; + item.value = Item.buyPrice(0, 30, 0, 0); item.rare = 9; item.accessory = true; } @@ -33,7 +33,6 @@ namespace CalamityMod.Items.Accessories { player.findTreasure = true; player.pStone = true; - player.lifeRegen += 1; player.statManaMax2 += 100; player.magicDamage += 0.1f; player.manaCost *= 0.9f; diff --git a/Items/Accessories/SkylineWings.cs b/Items/Accessories/SkylineWings.cs index e36ac77d13..ecb80d8e85 100644 --- a/Items/Accessories/SkylineWings.cs +++ b/Items/Accessories/SkylineWings.cs @@ -15,36 +15,38 @@ namespace CalamityMod.Items.Accessories public override void SetStaticDefaults() { DisplayName.SetDefault("Skyline Wings"); - Tooltip.SetDefault("Low acceleration: 1\nLow flight time: 20"); + Tooltip.SetDefault("Horizontal speed: 6.25\n" + + "Acceleration multiplier: 1\n" + + "Average vertical speed\n" + + "Flight time: 60"); } public override void SetDefaults() { item.width = 22; item.height = 20; - item.value = 50000; + item.value = Item.buyPrice(0, 9, 0, 0); item.rare = 3; item.accessory = true; } public override void UpdateAccessory(Player player, bool hideVisual) { - player.wingTimeMax = 30; + player.wingTimeMax = 60; } public override void VerticalWingSpeeds(Player player, ref float ascentWhenFalling, ref float ascentWhenRising, ref float maxCanAscendMultiplier, ref float maxAscentMultiplier, ref float constantAscend) { - ascentWhenFalling = 0.85f; - ascentWhenRising = 0.15f; - maxCanAscendMultiplier = 1f; - maxAscentMultiplier = 3f; - constantAscend = 0.135f; + ascentWhenFalling = 0.5f; + ascentWhenRising = 0.1f; + maxCanAscendMultiplier = 0.5f; + maxAscentMultiplier = 1.5f; + constantAscend = 0.1f; } public override void HorizontalWingSpeeds(Player player, ref float speed, ref float acceleration) { - speed = 8f; - acceleration *= 1f; + speed = 6.25f; } public override void AddRecipes() diff --git a/Items/Accessories/SkylineWings_Wings.png b/Items/Accessories/SkylineWings_Wings.png index 8e4eee696b..2c0d4b4561 100644 Binary files a/Items/Accessories/SkylineWings_Wings.png and b/Items/Accessories/SkylineWings_Wings.png differ diff --git a/Items/Accessories/SpiritGenerator.cs b/Items/Accessories/SpiritGenerator.cs index eadbce93ef..17ab75fb2f 100644 --- a/Items/Accessories/SpiritGenerator.cs +++ b/Items/Accessories/SpiritGenerator.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Accessories { public override void SetStaticDefaults() { - DisplayName.SetDefault("Spirit Generator"); + DisplayName.SetDefault("Spirit Glyph"); Tooltip.SetDefault("Whenever your minions hit an enemy you will gain a random buff\n" + "These buffs will either boost your defense, summon damage, or life regen for a while"); } @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Accessories { item.width = 26; item.height = 26; - item.value = 50000; + item.value = Item.buyPrice(0, 9, 0, 0); item.rare = 2; item.accessory = true; } diff --git a/Items/Accessories/SpiritGenerator.png b/Items/Accessories/SpiritGenerator.png index 90b067dea0..88fc531645 100644 Binary files a/Items/Accessories/SpiritGenerator.png and b/Items/Accessories/SpiritGenerator.png differ diff --git a/Items/Accessories/Sponge.cs b/Items/Accessories/Sponge.cs index 0a03e71db5..1f40a550fa 100644 --- a/Items/Accessories/Sponge.cs +++ b/Items/Accessories/Sponge.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Accessories item.defense = 10; item.width = 20; item.height = 20; - item.value = 10000000; + item.value = Item.buyPrice(0, 90, 0, 0); item.accessory = true; } diff --git a/Items/Accessories/StarlightWings.cs b/Items/Accessories/StarlightWings.cs index 91d59064b5..42fec2dbaf 100644 --- a/Items/Accessories/StarlightWings.cs +++ b/Items/Accessories/StarlightWings.cs @@ -16,14 +16,18 @@ namespace CalamityMod.Items.Accessories public override void SetStaticDefaults() { DisplayName.SetDefault("Starlight Wings"); - Tooltip.SetDefault("Wings of the Nightingale\nDecent acceleration: 1.5\nGood flight time: 110"); + Tooltip.SetDefault("Wings of the Nightingale\n" + + "Horizontal speed: 7.5\n" + + "Acceleration multiplier: 1\n" + + "Average vertical speed\n" + + "Flight time: 150"); } public override void SetDefaults() { item.width = 22; item.height = 20; - item.value = 500000; + item.value = Item.buyPrice(0, 39, 99, 99); item.rare = 5; item.accessory = true; } @@ -46,22 +50,21 @@ namespace CalamityMod.Items.Accessories } Main.dust[num60].shader = GameShaders.Armor.GetSecondaryShader(player.cWings, player); } - player.wingTimeMax = 110; + player.wingTimeMax = 150; } public override void VerticalWingSpeeds(Player player, ref float ascentWhenFalling, ref float ascentWhenRising, ref float maxCanAscendMultiplier, ref float maxAscentMultiplier, ref float constantAscend) { - ascentWhenFalling = 0.85f; - ascentWhenRising = 0.15f; - maxCanAscendMultiplier = 1f; - maxAscentMultiplier = 3f; - constantAscend = 0.135f; + ascentWhenFalling = 0.5f; + ascentWhenRising = 0.1f; + maxCanAscendMultiplier = 0.5f; + maxAscentMultiplier = 1.5f; + constantAscend = 0.1f; } public override void HorizontalWingSpeeds(Player player, ref float speed, ref float acceleration) { - speed = 9f; - acceleration *= 1.5f; + speed = 7.5f; } public override void AddRecipes() diff --git a/Items/Accessories/StatisBeltOfCurses.cs b/Items/Accessories/StatisBeltOfCurses.cs index 78d01e69c0..3f86d7e359 100644 --- a/Items/Accessories/StatisBeltOfCurses.cs +++ b/Items/Accessories/StatisBeltOfCurses.cs @@ -6,6 +6,7 @@ using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items; +using CalamityMod.Items.CalamityCustomThrowingDamage; namespace CalamityMod.Items.Accessories { @@ -16,8 +17,8 @@ namespace CalamityMod.Items.Accessories DisplayName.SetDefault("Statis' Belt of Curses"); Tooltip.SetDefault("Increases jump speed and allows constant jumping\n" + "Can climb walls, dash, and dodge attacks\n" + - "10% increased throwing damage and velocity\n" + - "10% increased throwing crit chance\n" + + "10% increased rogue damage and velocity\n" + + "5% increased rogue crit chance\n" + "Increased max minions by 3 and 10% increased minion damage\n" + "Increased minion knockback\n" + "Grants shadowflame powers to all minions\n" + @@ -29,7 +30,7 @@ namespace CalamityMod.Items.Accessories { item.width = 28; item.height = 32; - item.value = 15000000; + item.value = Item.buyPrice(0, 90, 0, 0); item.accessory = true; } @@ -59,9 +60,9 @@ namespace CalamityMod.Items.Accessories player.blackBelt = true; player.dash = 1; player.spikedBoots = 2; - player.thrownDamage += 0.1f; - player.thrownCrit += 10; - player.thrownVelocity += 0.1f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.1f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 5; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingVelocity += 0.1f; } public override void AddRecipes() diff --git a/Items/Accessories/StatisBlessing.cs b/Items/Accessories/StatisBlessing.cs index 9413b4d9ca..8d6f41018d 100644 --- a/Items/Accessories/StatisBlessing.cs +++ b/Items/Accessories/StatisBlessing.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Accessories { item.width = 28; item.height = 32; - item.value = 5000000; + item.value = Item.buyPrice(0, 45, 0, 0); item.rare = 9; item.accessory = true; } diff --git a/Items/Accessories/StatisCurse.cs b/Items/Accessories/StatisCurse.cs index 0c5ac774a9..07531b00b0 100644 --- a/Items/Accessories/StatisCurse.cs +++ b/Items/Accessories/StatisCurse.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Accessories { item.width = 28; item.height = 32; - item.value = 10000000; + item.value = Item.buyPrice(0, 60, 0, 0); item.rare = 10; item.accessory = true; } diff --git a/Items/Accessories/StatisNinjaBelt.cs b/Items/Accessories/StatisNinjaBelt.cs index e127e626b7..b7bf93a2d9 100644 --- a/Items/Accessories/StatisNinjaBelt.cs +++ b/Items/Accessories/StatisNinjaBelt.cs @@ -5,7 +5,7 @@ using Terraria; using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; -using CalamityMod.Items; +using CalamityMod.Items.CalamityCustomThrowingDamage; namespace CalamityMod.Items.Accessories { @@ -16,30 +16,31 @@ namespace CalamityMod.Items.Accessories DisplayName.SetDefault("Statis' Ninja Belt"); Tooltip.SetDefault("Increases jump speed and allows constant jumping\n" + "Can climb walls, dash, and dodge attacks\n" + - "5% increased throwing damage and velocity\n" + - "5% increased throwing crit chance"); + "5% increased rogue damage and velocity\n" + + "5% increased rogue crit chance"); } public override void SetDefaults() { item.width = 28; item.height = 32; - item.value = 5000000; + item.value = Item.buyPrice(0, 45, 0, 0); item.rare = 9; item.accessory = true; } public override void UpdateAccessory(Player player, bool hideVisual) { + CalamityCustomThrowingDamagePlayer modPlayer = CalamityCustomThrowingDamagePlayer.ModPlayer(player); player.autoJump = true; player.jumpSpeedBoost += 0.4f; player.extraFall += 35; player.blackBelt = true; player.dash = 1; player.spikedBoots = 2; - player.thrownDamage += 0.05f; - player.thrownCrit += 5; - player.thrownVelocity += 0.05f; + modPlayer.throwingDamage += 0.05f; + modPlayer.throwingCrit += 5; + modPlayer.throwingVelocity += 0.05f; } public override void AddRecipes() diff --git a/Items/Accessories/StressPills.cs b/Items/Accessories/StressPills.cs index 0c72db91ad..ae77a535c0 100644 --- a/Items/Accessories/StressPills.cs +++ b/Items/Accessories/StressPills.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Items.Accessories public override void SetStaticDefaults() { DisplayName.SetDefault("Stress Pills"); - Tooltip.SetDefault("Boosts your damage and crit chance by 5%, \n" + + Tooltip.SetDefault("Boosts your damage by 6%, \n" + "defense by 5, and max movement speed and acceleration by 5%\n" + "Revengeance drop"); } @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Accessories { item.width = 26; item.height = 26; - item.value = 50000; + item.value = Item.buyPrice(0, 6, 0, 0); item.rare = 3; item.accessory = true; } diff --git a/Items/Accessories/SummonLevelMeter.cs b/Items/Accessories/SummonLevelMeter.cs new file mode 100644 index 0000000000..5b16d7ace3 --- /dev/null +++ b/Items/Accessories/SummonLevelMeter.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Items; + +namespace CalamityMod.Items.Accessories +{ + public class SummonLevelMeter : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Summon Level Meter"); + Tooltip.SetDefault("Tells you how high your summon proficiency is"); + } + + public override void SetDefaults() + { + item.width = 26; + item.height = 26; + item.value = Item.buyPrice(0, 6, 0, 0); + item.rare = 1; + item.accessory = true; + } + + public override void ModifyTooltips(List list) + { + int level = Main.player[Main.myPlayer].GetModPlayer(mod).summonLevel; + foreach (TooltipLine line2 in list) + { + if (line2.mod == "Terraria" && line2.Name == "Tooltip0") + { + line2.text = "Tells you how high your summon proficiency is\n" + + "While equipped you will gain summon proficiency faster\n" + + "The higher your summon level the higher your summon damage, knockback, and minion slots\n" + + "Summon proficiency (max of 12500): " + (level - (level > 12500 ? 1 : 0)) + "\n" + + "Summon level (max of 15): " + Main.player[Main.myPlayer].GetModPlayer(mod).exactSummonLevel; + } + } + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + CalamityPlayer modPlayer = player.GetModPlayer(mod); + modPlayer.fasterSummonLevel = true; + } + } +} \ No newline at end of file diff --git a/Items/Accessories/SummonLevelMeter.png b/Items/Accessories/SummonLevelMeter.png new file mode 100644 index 0000000000..c3e5bff4fc Binary files /dev/null and b/Items/Accessories/SummonLevelMeter.png differ diff --git a/Items/Accessories/SupremeBaitTackleBoxFishingStation.cs b/Items/Accessories/SupremeBaitTackleBoxFishingStation.cs index 8f854ebeee..b59587ab56 100644 --- a/Items/Accessories/SupremeBaitTackleBoxFishingStation.cs +++ b/Items/Accessories/SupremeBaitTackleBoxFishingStation.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Accessories { item.width = 26; item.height = 26; - item.value = 1000000; + item.value = Item.buyPrice(0, 45, 0, 0); item.rare = 10; item.accessory = true; } diff --git a/Items/Accessories/TarragonWings.cs b/Items/Accessories/TarragonWings.cs index f7221b866d..97fae2a058 100644 --- a/Items/Accessories/TarragonWings.cs +++ b/Items/Accessories/TarragonWings.cs @@ -16,14 +16,18 @@ namespace CalamityMod.Items.Accessories public override void SetStaticDefaults() { DisplayName.SetDefault("Tarragon Wings"); - Tooltip.SetDefault("Born of the jungle\nExcellent acceleration: 2.5\nExcellent flight time: 250"); + Tooltip.SetDefault("Born of the jungle\n" + + "Horizontal speed: 9.5\n" + + "Acceleration multiplier: 2.5\n" + + "Great vertical speed\n" + + "Flight time: 210"); } public override void SetDefaults() { item.width = 22; item.height = 20; - item.value = 750000; + item.value = Item.buyPrice(0, 39, 99, 99); item.accessory = true; } @@ -56,7 +60,7 @@ namespace CalamityMod.Items.Accessories } Main.dust[num60].shader = GameShaders.Armor.GetSecondaryShader(player.cWings, player); } - player.wingTimeMax = 250; + player.wingTimeMax = 210; } public override void VerticalWingSpeeds(Player player, ref float ascentWhenFalling, ref float ascentWhenRising, ref float maxCanAscendMultiplier, ref float maxAscentMultiplier, ref float constantAscend) @@ -70,7 +74,7 @@ namespace CalamityMod.Items.Accessories public override void HorizontalWingSpeeds(Player player, ref float speed, ref float acceleration) { - speed = 11f; + speed = 9.5f; acceleration *= 2.5f; } diff --git a/Items/Accessories/TheAbsorber.cs b/Items/Accessories/TheAbsorber.cs index ae826fdc95..b4aff32ef2 100644 --- a/Items/Accessories/TheAbsorber.cs +++ b/Items/Accessories/TheAbsorber.cs @@ -32,8 +32,8 @@ namespace CalamityMod.Items.Accessories item.defense = 6; item.width = 20; item.height = 24; - item.value = 3000000; - item.rare = 10; + item.value = Item.buyPrice(0, 60, 0, 0); + item.rare = 10; item.accessory = true; } diff --git a/Items/Accessories/TheAmalgam.cs b/Items/Accessories/TheAmalgam.cs index 7b84a5bc44..b4af0d93a5 100644 --- a/Items/Accessories/TheAmalgam.cs +++ b/Items/Accessories/TheAmalgam.cs @@ -6,6 +6,7 @@ using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items; +using CalamityMod.Items.CalamityCustomThrowingDamage; namespace CalamityMod.Items.Accessories { @@ -18,7 +19,7 @@ namespace CalamityMod.Items.Accessories public override void SetStaticDefaults() { DisplayName.SetDefault("The Amalgam"); - Tooltip.SetDefault("10% increased damage and critical strike chance\n" + + Tooltip.SetDefault("15% increased damage\n" + "Shade rains down when you are hit\n" + "You will confuse nearby enemies when you are struck\n" + "Drops brimstone fireballs from the sky occasionally\n" + @@ -35,7 +36,7 @@ namespace CalamityMod.Items.Accessories { item.width = 34; item.height = 34; - item.value = 10000000; + item.value = Item.buyPrice(0, 90, 0, 0); item.expert = true; item.accessory = true; } @@ -66,21 +67,17 @@ namespace CalamityMod.Items.Accessories Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, mod.ProjectileType("FungalClump"), 250, 1f, Main.myPlayer, 0f, 0f); } } - player.meleeCrit += 10; - player.magicCrit += 10; - player.rangedCrit += 10; - player.thrownCrit += 10; - player.meleeDamage += 0.1f; - player.thrownDamage += 0.1f; - player.rangedDamage += 0.1f; - player.magicDamage += 0.1f; - player.minionDamage += 0.1f; + player.meleeDamage += 0.15f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.15f; + player.rangedDamage += 0.15f; + player.magicDamage += 0.15f; + player.minionDamage += 0.15f; player.ignoreWater = true; player.lavaImmune = true; if (player.lavaWet) { player.meleeDamage += 0.15f; - player.thrownDamage += 0.15f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.15f; player.rangedDamage += 0.15f; player.magicDamage += 0.15f; player.minionDamage += 0.15f; @@ -88,7 +85,7 @@ namespace CalamityMod.Items.Accessories if (Collision.DrownCollision(player.position, player.width, player.height, player.gravDir)) { player.meleeDamage += 0.1f; - player.thrownDamage += 0.1f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.1f; player.rangedDamage += 0.1f; player.magicDamage += 0.1f; player.minionDamage += 0.1f; @@ -105,7 +102,7 @@ namespace CalamityMod.Items.Accessories } if (player.immune) { - if (Main.rand.Next(16) == 0) + if (Main.rand.Next(20) == 0) { if (player.whoAmI == Main.myPlayer) { diff --git a/Items/Accessories/TheCommunity.cs b/Items/Accessories/TheCommunity.cs index 94f82b40b8..d526409ddc 100644 --- a/Items/Accessories/TheCommunity.cs +++ b/Items/Accessories/TheCommunity.cs @@ -29,8 +29,8 @@ namespace CalamityMod.Items.Accessories { item.width = 20; item.height = 20; - item.value = 10000000; - item.accessory = true; + item.value = Item.buyPrice(0, 60, 0, 0); + item.accessory = true; } public override void ModifyTooltips(List list) diff --git a/Items/Accessories/TheFirstShadowflame.cs b/Items/Accessories/TheFirstShadowflame.cs index 6a195af028..aa66a371e7 100644 --- a/Items/Accessories/TheFirstShadowflame.cs +++ b/Items/Accessories/TheFirstShadowflame.cs @@ -7,27 +7,29 @@ using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items; -namespace CalamityMod.Items.Accessories { -public class TheFirstShadowflame : ModItem +namespace CalamityMod.Items.Accessories { - public override void SetStaticDefaults() - { - DisplayName.SetDefault("The First Shadowflame"); - Tooltip.SetDefault("One of the first magical artifacts, granted to a disheveled race of humans long ago by the Tyrant King Yharim\nLittle did the humans know of the horrid curse that lied within...\nGrants shadowflame powers to all minions"); - } - - public override void SetDefaults() - { - item.width = 26; - item.height = 26; - item.value = 150000; - item.rare = 5; - item.accessory = true; - } - - public override void UpdateAccessory(Player player, bool hideVisual) - { - CalamityPlayer modPlayer = player.GetModPlayer(mod); - modPlayer.shadowMinions = true; - } -}} \ No newline at end of file + public class TheFirstShadowflame : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("The First Shadowflame"); + Tooltip.SetDefault("One of the first magical artifacts, granted to a disheveled race of humans long ago by the Tyrant King Yharim\nLittle did the humans know of the horrid curse that lied within...\nGrants shadowflame powers to all minions"); + } + + public override void SetDefaults() + { + item.width = 26; + item.height = 26; + item.value = Item.buyPrice(0, 15, 0, 0); + item.rare = 5; + item.accessory = true; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + CalamityPlayer modPlayer = player.GetModPlayer(mod); + modPlayer.shadowMinions = true; + } + } +} \ No newline at end of file diff --git a/Items/Accessories/VitalJelly.cs b/Items/Accessories/VitalJelly.cs index 69368614c8..47054d2524 100644 --- a/Items/Accessories/VitalJelly.cs +++ b/Items/Accessories/VitalJelly.cs @@ -22,8 +22,8 @@ namespace CalamityMod.Items.Accessories { item.width = 20; item.height = 24; - item.value = 30000; - item.rare = 5; + item.value = Item.buyPrice(0, 12, 0, 0); + item.rare = 5; item.accessory = true; } diff --git a/Items/Accessories/VoidofExtinction.cs b/Items/Accessories/VoidofExtinction.cs index 094b6c1461..1d1f6cdcd7 100644 --- a/Items/Accessories/VoidofExtinction.cs +++ b/Items/Accessories/VoidofExtinction.cs @@ -6,6 +6,7 @@ using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items; +using CalamityMod.Items.CalamityCustomThrowingDamage; namespace CalamityMod.Items.Accessories { @@ -29,7 +30,7 @@ namespace CalamityMod.Items.Accessories { item.width = 26; item.height = 26; - item.value = 500000; + item.value = Item.buyPrice(0, 30, 0, 0); item.expert = true; item.accessory = true; } @@ -61,21 +62,21 @@ namespace CalamityMod.Items.Accessories modPlayer.calamityRing = true; player.lavaImmune = true; player.meleeDamage += 0.15f; - player.thrownDamage += 0.15f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.15f; player.rangedDamage += 0.15f; player.magicDamage += 0.15f; player.minionDamage += 0.15f; if (player.lavaWet) { player.meleeDamage += 0.25f; - player.thrownDamage += 0.25f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.25f; player.rangedDamage += 0.25f; player.magicDamage += 0.25f; player.minionDamage += 0.25f; } if (player.immune) { - if (Main.rand.Next(8) == 0) + if (Main.rand.Next(10) == 0) { if (player.whoAmI == Main.myPlayer) { @@ -100,7 +101,7 @@ namespace CalamityMod.Items.Accessories } if (FireCountdown == 0) { - FireCountdown = 300; + FireCountdown = 600; } if (FireCountdown > 0) { diff --git a/Items/Accessories/WifeinaBottle.cs b/Items/Accessories/WifeinaBottle.cs index 8cbc0555f2..e9025461ce 100644 --- a/Items/Accessories/WifeinaBottle.cs +++ b/Items/Accessories/WifeinaBottle.cs @@ -27,8 +27,8 @@ namespace CalamityMod.Items.Accessories { item.width = 20; item.height = 26; - item.value = 500000; - item.rare = 5; + item.value = Item.buyPrice(0, 15, 0, 0); + item.rare = 5; item.accessory = true; } diff --git a/Items/Accessories/WifeinaBottlewithBoobs.cs b/Items/Accessories/WifeinaBottlewithBoobs.cs index 20478426c2..a39f3a2974 100644 --- a/Items/Accessories/WifeinaBottlewithBoobs.cs +++ b/Items/Accessories/WifeinaBottlewithBoobs.cs @@ -27,8 +27,8 @@ namespace CalamityMod.Items.Accessories { item.width = 20; item.height = 26; - item.value = 500000; - item.expert = true; + item.value = Item.buyPrice(0, 15, 0, 0); + item.expert = true; item.accessory = true; } diff --git a/Items/Accessories/XerocWings.cs b/Items/Accessories/XerocWings.cs index 251181d7fe..f2c70f3fa0 100644 --- a/Items/Accessories/XerocWings.cs +++ b/Items/Accessories/XerocWings.cs @@ -16,14 +16,18 @@ namespace CalamityMod.Items.Accessories public override void SetStaticDefaults() { DisplayName.SetDefault("Xeroc Wings"); - Tooltip.SetDefault("Highly radioactive\nExcellent acceleration: 2.25\nExcellent flight time: 160"); + Tooltip.SetDefault("Highly radioactive\n" + + "Horizontal speed: 8.5\n" + + "Acceleration multiplier: 2\n" + + "Good vertical speed\n" + + "Flight time: 180"); } public override void SetDefaults() { item.width = 22; item.height = 20; - item.value = 500000; + item.value = Item.buyPrice(0, 39, 99, 99); item.rare = 9; item.accessory = true; } @@ -46,22 +50,22 @@ namespace CalamityMod.Items.Accessories } Main.dust[num60].shader = GameShaders.Armor.GetSecondaryShader(player.cWings, player); } - player.wingTimeMax = 160; + player.wingTimeMax = 180; } public override void VerticalWingSpeeds(Player player, ref float ascentWhenFalling, ref float ascentWhenRising, ref float maxCanAscendMultiplier, ref float maxAscentMultiplier, ref float constantAscend) { - ascentWhenFalling = 0.85f; + ascentWhenFalling = 0.75f; ascentWhenRising = 0.15f; maxCanAscendMultiplier = 1f; - maxAscentMultiplier = 3f; - constantAscend = 0.135f; + maxAscentMultiplier = 2.5f; + constantAscend = 0.125f; } public override void HorizontalWingSpeeds(Player player, ref float speed, ref float acceleration) { - speed = 9f; - acceleration *= 2.25f; + speed = 8.5f; + acceleration *= 2f; } public override void AddRecipes() diff --git a/Items/Accessories/YharimsInsignia.cs b/Items/Accessories/YharimsInsignia.cs index 0e6b700e0c..ff2bd1ba49 100644 --- a/Items/Accessories/YharimsInsignia.cs +++ b/Items/Accessories/YharimsInsignia.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Accessories Tooltip.SetDefault("10% increased damage when under 50% life\n" + "Increased melee speed as health lowers\n" + "5% increased melee speed and damage\n" + - "Melee attacks inflict holy fire\n" + + "Melee attacks and melee projectiles inflict holy fire\n" + "Increased invincibility after taking damage\n" + "You are immune to lava\n" + "Increased melee knockback"); @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Accessories { item.width = 22; item.height = 38; - item.value = 5000000; + item.value = Item.buyPrice(0, 30, 0, 0); item.accessory = true; } @@ -46,35 +46,6 @@ namespace CalamityMod.Items.Accessories { CalamityPlayer modPlayer = player.GetModPlayer(mod); modPlayer.yInsignia = true; - player.longInvince = true; - player.kbGlove = true; - player.meleeDamage += 0.05f; - player.meleeSpeed += 0.05f; - player.lavaImmune = true; - if (player.statLife <= (player.statLifeMax2 * 0.5f)) - { - player.meleeDamage += 0.1f; - player.magicDamage += 0.1f; - player.rangedDamage += 0.1f; - player.thrownDamage += 0.1f; - player.minionDamage += 0.1f; - } - if (player.statLife <= (player.statLifeMax2 * 0.8f) && player.statLife > (player.statLifeMax2 * 0.6f)) - { - player.meleeSpeed += 0.05f; - } - else if (player.statLife <= (player.statLifeMax2 * 0.6f) && player.statLife > (player.statLifeMax2 * 0.4f)) - { - player.meleeSpeed += 0.1f; - } - else if (player.statLife <= (player.statLifeMax2 * 0.4f) && player.statLife > (player.statLifeMax2 * 0.2f)) - { - player.meleeSpeed += 0.15f; - } - else if (player.statLife <= (player.statLifeMax2 * 0.2f)) - { - player.meleeSpeed += 0.2f; - } } public override void AddRecipes() diff --git a/Items/AquaticScourge/AquaticEmblem.cs b/Items/AquaticScourge/AquaticEmblem.cs index f9f3105a8b..d00d8850ba 100644 --- a/Items/AquaticScourge/AquaticEmblem.cs +++ b/Items/AquaticScourge/AquaticEmblem.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.AquaticScourge { item.width = 18; item.height = 26; - item.value = 500000; + item.value = Item.buyPrice(0, 30, 0, 0); item.rare = 5; item.accessory = true; item.expert = true; diff --git a/Items/Armor/AbyssalDivingSuit.cs b/Items/Armor/AbyssalDivingSuit.cs index fd16341ff6..f40151dbe5 100644 --- a/Items/Armor/AbyssalDivingSuit.cs +++ b/Items/Armor/AbyssalDivingSuit.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.Armor DisplayName.SetDefault("Abyssal Diving Suit"); Tooltip.SetDefault("Transforms the holder into an armored diver\n" + "Increases movement speed while underwater and moves slowly outside of water\n" + - "The suits' armored plates reduce damage taken by 25%\n" + + "The suits' armored plates reduce damage taken by 15%\n" + "The plates will only take damage if the damage taken is over 50\n" + "After the suit has taken too much damage its armored plates will take 3 minutes to regenerate\n" + "Reduces the damage caused by the pressure of the abyss while out of breath\n" + @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Armor item.width = 18; item.height = 18; item.accessory = true; - item.value = 5000000; + item.value = Item.buyPrice(0, 90, 0, 0); item.rare = 10; } diff --git a/Items/Armor/AerospecBreastplate.cs b/Items/Armor/AerospecBreastplate.cs index 45b1d020f5..4242818411 100644 --- a/Items/Armor/AerospecBreastplate.cs +++ b/Items/Armor/AerospecBreastplate.cs @@ -6,6 +6,7 @@ using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items.Armor; +using CalamityMod.Items.CalamityCustomThrowingDamage; namespace CalamityMod.Items.Armor { @@ -15,7 +16,7 @@ namespace CalamityMod.Items.Armor public override void SetStaticDefaults() { DisplayName.SetDefault("Aerospec Breastplate"); - Tooltip.SetDefault("+20 max mana and +1 max minions"); + Tooltip.SetDefault("3% increased critical strike chance"); } public override void SetDefaults() @@ -29,8 +30,10 @@ namespace CalamityMod.Items.Armor public override void UpdateEquip(Player player) { - player.statManaMax2 += 20; - player.maxMinions++; + player.meleeCrit += 3; + player.rangedCrit += 3; + player.magicCrit += 3; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 3; } public override void AddRecipes() diff --git a/Items/Armor/AerospecHat.cs b/Items/Armor/AerospecHat.cs index 9351bf7e82..d26fe29f73 100644 --- a/Items/Armor/AerospecHat.cs +++ b/Items/Armor/AerospecHat.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.Armor public override void SetStaticDefaults() { DisplayName.SetDefault("Aerospec Hat"); - Tooltip.SetDefault("8% increased magic damage"); + Tooltip.SetDefault("8% increased magic damage and +20 max mana"); } public override void SetDefaults() @@ -52,6 +52,7 @@ namespace CalamityMod.Items.Armor public override void UpdateEquip(Player player) { player.magicDamage += 0.08f; + player.statManaMax2 += 20; } public override void AddRecipes() diff --git a/Items/Armor/AerospecHeadgear.cs b/Items/Armor/AerospecHeadgear.cs index 6f3852471f..0ec17be458 100644 --- a/Items/Armor/AerospecHeadgear.cs +++ b/Items/Armor/AerospecHeadgear.cs @@ -6,6 +6,7 @@ using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items.Armor; +using CalamityMod.Items.CalamityCustomThrowingDamage; namespace CalamityMod.Items.Armor { @@ -15,7 +16,7 @@ namespace CalamityMod.Items.Armor public override void SetStaticDefaults() { DisplayName.SetDefault("Aerospec Headgear"); - Tooltip.SetDefault("8% increased throwing damage"); + Tooltip.SetDefault("8% increased rogue damage"); } public override void SetDefaults() @@ -45,14 +46,14 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - player.setBonus = "5% increased movement speed and throwing critical strike chance\n" + + player.setBonus = "5% increased movement speed and rogue critical strike chance\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.GetModPlayer(mod); modPlayer.aeroSet = true; player.noFallDmg = true; player.moveSpeed += 0.05f; - player.thrownCrit += 5; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 5; } public override void UpdateEquip(Player player) diff --git a/Items/Armor/AerospecHelmet.cs b/Items/Armor/AerospecHelmet.cs index 32a1059452..1d494ee5a3 100644 --- a/Items/Armor/AerospecHelmet.cs +++ b/Items/Armor/AerospecHelmet.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.Armor public override void SetStaticDefaults() { DisplayName.SetDefault("Aerospec Helmet"); - Tooltip.SetDefault("8% increased summon damage"); + Tooltip.SetDefault("5% increased movement speed and +1 max minion"); } public override void SetDefaults() @@ -39,7 +39,7 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - player.setBonus = "5% increased movement speed\n" + + player.setBonus = "16% increased minion damage\n" + "Summons a valkyrie to protect 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"; @@ -58,12 +58,13 @@ namespace CalamityMod.Items.Armor Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, mod.ProjectileType("Valkyrie"), 25, 0f, Main.myPlayer, 0f, 0f); } } - player.moveSpeed += 0.05f; + player.minionDamage += 0.16f; } public override void UpdateEquip(Player player) { - player.minionDamage += 0.08f; + player.moveSpeed += 0.05f; + player.maxMinions++; } public override void AddRecipes() diff --git a/Items/Armor/AstralHelm.cs b/Items/Armor/AstralHelm.cs index 1f36e16450..49b965c807 100644 --- a/Items/Armor/AstralHelm.cs +++ b/Items/Armor/AstralHelm.cs @@ -6,6 +6,7 @@ using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items.Armor; +using CalamityMod.Items.CalamityCustomThrowingDamage; namespace CalamityMod.Items.Armor { @@ -40,20 +41,20 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { player.setBonus = "25% increased movement speed\n" + - "22% increased damage and critical strike chance\n" + + "22% increased damage and 17% increased critical strike chance\n" + "Whenever you crit an enemy fallen, hallowed, and astral stars will rain down\n" + - "This effect has a 2 second cooldown before it can trigger again"; + "This effect has a 1 second cooldown before it can trigger again"; CalamityPlayer modPlayer = player.GetModPlayer(mod); modPlayer.astralStarRain = true; player.moveSpeed += 0.25f; player.meleeDamage += 0.22f; - player.meleeCrit += 22; + player.meleeCrit += 17; player.rangedDamage += 0.22f; - player.rangedCrit += 22; + player.rangedCrit += 17; player.magicDamage += 0.22f; - player.magicCrit += 22; - player.thrownDamage += 0.22f; - player.thrownCrit += 22; + player.magicCrit += 17; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.22f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 17; player.minionDamage += 0.22f; } diff --git a/Items/Armor/AtaxiaArmor.cs b/Items/Armor/AtaxiaArmor.cs index 301ddbbea5..c147f15b2f 100644 --- a/Items/Armor/AtaxiaArmor.cs +++ b/Items/Armor/AtaxiaArmor.cs @@ -6,6 +6,7 @@ using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items; +using CalamityMod.Items.CalamityCustomThrowingDamage; namespace CalamityMod.Items.Armor { @@ -16,7 +17,7 @@ namespace CalamityMod.Items.Armor { DisplayName.SetDefault("Ataxia Armor"); Tooltip.SetDefault("+20 max mana and life\n" + - "8% increased damage and 5% increased critical strike chance"); + "8% increased damage and 4% increased critical strike chance"); } public override void SetDefaults() @@ -32,14 +33,14 @@ namespace CalamityMod.Items.Armor { player.statManaMax2 += 20; player.statLifeMax2 += 20; - player.meleeCrit += 5; + player.meleeCrit += 4; player.meleeDamage += 0.08f; - player.magicCrit += 5; + player.magicCrit += 4; player.magicDamage += 0.08f; - player.rangedCrit += 5; + player.rangedCrit += 4; player.rangedDamage += 0.08f; - player.thrownCrit += 5; - player.thrownDamage += 0.08f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 4; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.08f; player.minionDamage += 0.08f; } diff --git a/Items/Armor/AtaxiaHeadgear.cs b/Items/Armor/AtaxiaHeadgear.cs index 56afd53772..9f5a4857cd 100644 --- a/Items/Armor/AtaxiaHeadgear.cs +++ b/Items/Armor/AtaxiaHeadgear.cs @@ -47,7 +47,7 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - player.setBonus = "5% increased ranged damage and critical strike chance\n" + + player.setBonus = "5% increased ranged damage\n" + "Inferno effect when below 50% life\n" + "You have a 50% chance to fire a homing chaos flare when using ranged weapons\n" + "You have a 20% chance to emit a blazing explosion when you are hit"; @@ -59,7 +59,6 @@ namespace CalamityMod.Items.Armor player.AddBuff(BuffID.Inferno, 2); } player.rangedDamage += 0.05f; - player.rangedCrit += 5; } public override void UpdateEquip(Player player) diff --git a/Items/Armor/AtaxiaHelm.cs b/Items/Armor/AtaxiaHelm.cs index 62910c28be..cc5814eff8 100644 --- a/Items/Armor/AtaxiaHelm.cs +++ b/Items/Armor/AtaxiaHelm.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Armor { DisplayName.SetDefault("Ataxia Helm"); Tooltip.SetDefault("12% increased melee damage and 10% increased melee critical strike chance\n" + - "Melee attacks inflict on fire\n" + + "Melee attacks and melee projectiles inflict on fire\n" + "Immune to lava and fire damage"); } @@ -41,7 +41,7 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - player.setBonus = "5% increased melee damage and critical strike chance\n" + + player.setBonus = "5% increased melee damage\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"; @@ -53,7 +53,6 @@ namespace CalamityMod.Items.Armor player.AddBuff(BuffID.Inferno, 2); } player.meleeDamage += 0.05f; - player.meleeCrit += 5; } public override void UpdateEquip(Player player) diff --git a/Items/Armor/AtaxiaHelmet.cs b/Items/Armor/AtaxiaHelmet.cs index ab265789ed..a1c5161757 100644 --- a/Items/Armor/AtaxiaHelmet.cs +++ b/Items/Armor/AtaxiaHelmet.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.Armor public override void SetStaticDefaults() { DisplayName.SetDefault("Ataxia Helmet"); - Tooltip.SetDefault("12% increased summon damage and increased minion knockback\n" + + Tooltip.SetDefault("5% increased minion damage and increased minion knockback\n" + "+2 max minions\n" + "Immune to lava and fire damage"); } @@ -41,7 +41,7 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - player.setBonus = "5% increased summon damage\n" + + player.setBonus = "40% increased minion damage\n" + "Inferno effect when below 50% life\n" + "Summons a chaos spirit to protect you\n" + "You have a 20% chance to emit a blazing explosion when you are hit"; @@ -63,12 +63,12 @@ namespace CalamityMod.Items.Armor { player.AddBuff(BuffID.Inferno, 2); } - player.minionDamage += 0.05f; + player.minionDamage += 0.4f; } public override void UpdateEquip(Player player) { - player.minionDamage += 0.12f; + player.minionDamage += 0.05f; player.minionKB += 1.5f; player.maxMinions += 2; player.lavaImmune = true; diff --git a/Items/Armor/AtaxiaHood.cs b/Items/Armor/AtaxiaHood.cs index 5b83179d25..3d5e46e092 100644 --- a/Items/Armor/AtaxiaHood.cs +++ b/Items/Armor/AtaxiaHood.cs @@ -6,6 +6,7 @@ using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items; +using CalamityMod.Items.CalamityCustomThrowingDamage; namespace CalamityMod.Items.Armor { @@ -15,8 +16,8 @@ namespace CalamityMod.Items.Armor public override void SetStaticDefaults() { DisplayName.SetDefault("Ataxia Hood"); - Tooltip.SetDefault("12% increased throwing damage and 10% increased throwing critical strike chance\n" + - "50% chance to not consume thrown items\n" + + Tooltip.SetDefault("12% increased rogue damage and 10% increased rogue critical strike chance\n" + + "50% chance to not consume rogue items\n" + "Immune to lava and fire damage"); } @@ -41,9 +42,9 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - player.setBonus = "5% increased throwing damage and critical strike chance\n" + + player.setBonus = "5% increased rogue damage\n" + "Inferno effect when below 50% life\n" + - "Throwing weapons have a 10% chance to unleash a volley of chaos flames around the player that chase enemies when used\n" + + "Rogue weapons have a 10% chance to unleash a volley of chaos flames around the player that chase enemies when used\n" + "You have a 20% chance to emit a blazing explosion when you are hit"; CalamityPlayer modPlayer = player.GetModPlayer(mod); modPlayer.ataxiaBlaze = true; @@ -52,15 +53,14 @@ namespace CalamityMod.Items.Armor { player.AddBuff(BuffID.Inferno, 2); } - player.thrownDamage += 0.05f; - player.thrownCrit += 5; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.05f; } public override void UpdateEquip(Player player) { - player.thrownCost50 = true; - player.thrownDamage += 0.12f; - player.thrownCrit += 10; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingAmmoCost50 = true; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.12f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 10; player.lavaImmune = true; player.buffImmune[BuffID.OnFire] = true; } diff --git a/Items/Armor/AtaxiaMask.cs b/Items/Armor/AtaxiaMask.cs index 7b905aec9b..b880d67325 100644 --- a/Items/Armor/AtaxiaMask.cs +++ b/Items/Armor/AtaxiaMask.cs @@ -41,7 +41,7 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - player.setBonus = "5% increased magic damage and critical strike chance\n" + + player.setBonus = "5% increased magic damage\n" + "Inferno effect when below 50% life\n" + "Magic attacks summon damaging and healing flare orbs on hit\n" + "You have a 20% chance to emit a blazing explosion when you are hit"; @@ -53,7 +53,6 @@ namespace CalamityMod.Items.Armor player.AddBuff(BuffID.Inferno, 2); } player.magicDamage += 0.05f; - player.magicCrit += 5; } public override void UpdateEquip(Player player) diff --git a/Items/Armor/AtaxiaSubligar.cs b/Items/Armor/AtaxiaSubligar.cs index 7b2336d333..b0edc5d6a1 100644 --- a/Items/Armor/AtaxiaSubligar.cs +++ b/Items/Armor/AtaxiaSubligar.cs @@ -6,6 +6,7 @@ using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items.Armor; +using CalamityMod.Items.CalamityCustomThrowingDamage; namespace CalamityMod.Items.Armor { @@ -15,7 +16,7 @@ namespace CalamityMod.Items.Armor public override void SetStaticDefaults() { DisplayName.SetDefault("Ataxia Subligar"); - Tooltip.SetDefault("5% increased critical strike chance\n" + + Tooltip.SetDefault("3% increased critical strike chance\n" + "15% increased movement speed"); } @@ -30,10 +31,10 @@ namespace CalamityMod.Items.Armor public override void UpdateEquip(Player player) { - player.meleeCrit += 5; - player.magicCrit += 5; - player.rangedCrit += 5; - player.thrownCrit += 5; + player.meleeCrit += 3; + player.magicCrit += 3; + player.rangedCrit += 3; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 3; player.moveSpeed += 0.15f; } diff --git a/Items/Armor/AuricTeslaBodyArmor.cs b/Items/Armor/AuricTeslaBodyArmor.cs index 7eb4a3728d..122159ed4d 100644 --- a/Items/Armor/AuricTeslaBodyArmor.cs +++ b/Items/Armor/AuricTeslaBodyArmor.cs @@ -6,6 +6,7 @@ using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items.Armor; +using CalamityMod.Items.CalamityCustomThrowingDamage; namespace CalamityMod.Items.Armor { @@ -55,8 +56,8 @@ namespace CalamityMod.Items.Armor player.rangedCrit += 5; player.magicDamage += 0.08f; player.magicCrit += 5; - player.thrownDamage += 0.08f; - player.thrownCrit += 5; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.08f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 5; player.minionDamage += 0.08f; } diff --git a/Items/Armor/AuricTeslaCuisses.cs b/Items/Armor/AuricTeslaCuisses.cs index 2510b02373..748b15c4c9 100644 --- a/Items/Armor/AuricTeslaCuisses.cs +++ b/Items/Armor/AuricTeslaCuisses.cs @@ -6,6 +6,7 @@ using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items; +using CalamityMod.Items.CalamityCustomThrowingDamage; namespace CalamityMod.Items.Armor { @@ -16,7 +17,7 @@ namespace CalamityMod.Items.Armor { DisplayName.SetDefault("Auric Tesla Cuisses"); Tooltip.SetDefault("50% increased movement speed\n" + - "12% increased damage and 10% increased critical strike chance\n" + + "12% increased damage and 5% increased critical strike chance\n" + "Magic carpet effect"); } @@ -44,13 +45,13 @@ namespace CalamityMod.Items.Armor player.moveSpeed += 0.5f; player.carpet = true; player.meleeDamage += 0.12f; - player.meleeCrit += 10; + player.meleeCrit += 5; player.rangedDamage += 0.12f; - player.rangedCrit += 10; + player.rangedCrit += 5; player.magicDamage += 0.12f; - player.magicCrit += 10; - player.thrownDamage += 0.12f; - player.thrownCrit += 10; + player.magicCrit += 5; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.12f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 5; player.minionDamage += 0.12f; } diff --git a/Items/Armor/AuricTeslaHelm.cs b/Items/Armor/AuricTeslaHelm.cs index 563be1cd0f..256533acb3 100644 --- a/Items/Armor/AuricTeslaHelm.cs +++ b/Items/Armor/AuricTeslaHelm.cs @@ -51,7 +51,7 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { player.setBonus = "Melee Tarragon, Bloodflare, God Slayer, and Silva armor effects\n" + - "Reduces all damage taken by 10%, this is calculated separately from damage reduction\n" + + "Reduces all damage taken by 5%, this is calculated separately from damage reduction\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/AuricTeslaHoodedFacemask.cs b/Items/Armor/AuricTeslaHoodedFacemask.cs index e981ffed8e..4d851600fd 100644 --- a/Items/Armor/AuricTeslaHoodedFacemask.cs +++ b/Items/Armor/AuricTeslaHoodedFacemask.cs @@ -51,7 +51,7 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { player.setBonus = "Ranged Tarragon, Bloodflare, God Slayer, and Silva armor effects\n" + - "Reduces all damage taken by 10%, this is calculated separately from damage reduction\n" + + "Reduces all damage taken by 5%, this is calculated separately from damage reduction\n" + "All projectiles spawn healing auric orbs on enemy hits\n" + "Max run speed and acceleration boosted by 10%"; CalamityPlayer modPlayer = player.GetModPlayer(mod); diff --git a/Items/Armor/AuricTeslaPlumedHelm.cs b/Items/Armor/AuricTeslaPlumedHelm.cs index 0567b3c12d..00fe6bb849 100644 --- a/Items/Armor/AuricTeslaPlumedHelm.cs +++ b/Items/Armor/AuricTeslaPlumedHelm.cs @@ -6,6 +6,7 @@ using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items; +using CalamityMod.Items.CalamityCustomThrowingDamage; namespace CalamityMod.Items.Armor { @@ -15,7 +16,7 @@ namespace CalamityMod.Items.Armor public override void SetStaticDefaults() { DisplayName.SetDefault("Auric Tesla Plumed Helm"); - Tooltip.SetDefault("20% increased throwing damage and critical strike chance\n" + + Tooltip.SetDefault("20% increased rogue damage and critical strike chance\n" + "Not moving boosts all damage and critical strike chance"); } @@ -50,11 +51,11 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - player.setBonus = "Throwing Tarragon, Bloodflare, God Slayer, and Silva armor effects\n" + - "Reduces all damage taken by 10%, this is calculated separately from damage reduction\n" + + player.setBonus = "Rogue Tarragon, Bloodflare, God Slayer, and Silva armor effects\n" + + "Reduces all damage taken by 5%, this is calculated separately from damage reduction\n" + "All projectiles spawn healing auric orbs on enemy hits\n" + "Max run speed and acceleration boosted by 10%\n" + - "Throwing weapon critical strikes will do 3.5 times damage while you are above 90% HP"; + "Rogue weapon critical strikes will do 3 times damage while you are above 90% HP"; CalamityPlayer modPlayer = player.GetModPlayer(mod); modPlayer.tarraSet = true; modPlayer.tarraThrowing = true; @@ -80,8 +81,8 @@ namespace CalamityMod.Items.Armor { CalamityPlayer modPlayer = player.GetModPlayer(mod); modPlayer.auricBoost = true; - player.thrownDamage += 0.2f; - player.thrownCrit += 20; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.2f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 20; } public override void AddRecipes() diff --git a/Items/Armor/AuricTeslaSpaceHelmet.cs b/Items/Armor/AuricTeslaSpaceHelmet.cs index 8c588e1ef2..45b05383d5 100644 --- a/Items/Armor/AuricTeslaSpaceHelmet.cs +++ b/Items/Armor/AuricTeslaSpaceHelmet.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.Armor public override void SetStaticDefaults() { DisplayName.SetDefault("Auric Tesla Space Helmet"); - Tooltip.SetDefault("120% increased summon damage and +7 max minions\n" + + Tooltip.SetDefault("+7 max minions\n" + "Not moving boosts all damage and critical strike chance"); } @@ -51,9 +51,10 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { player.setBonus = "Summoner Tarragon, Bloodflare, God Slayer, and Silva armor effects\n" + - "Reduces all damage taken by 10%, this is calculated separately from damage reduction\n" + + "Reduces all damage taken by 5%, this is calculated separately from damage reduction\n" + "All projectiles spawn healing auric orbs on enemy hits\n" + - "Max run speed and acceleration boosted by 10%"; + "Max run speed and acceleration boosted by 10%\n" + + "120% increased minion damage"; CalamityPlayer modPlayer = player.GetModPlayer(mod); modPlayer.tarraSet = true; modPlayer.tarraSummon = true; @@ -68,6 +69,7 @@ namespace CalamityMod.Items.Armor player.lavaImmune = true; player.ignoreWater = true; player.crimsonRegen = true; + player.minionDamage += 1.2f; if (player.lavaWet) { player.statDefense += 30; @@ -210,7 +212,6 @@ namespace CalamityMod.Items.Armor { CalamityPlayer modPlayer = player.GetModPlayer(mod); modPlayer.auricBoost = true; - player.minionDamage += 1.2f; player.maxMinions += 7; } diff --git a/Items/Armor/AuricTeslaWireHemmedVisage.cs b/Items/Armor/AuricTeslaWireHemmedVisage.cs index d8e4400060..0d41ca69a8 100644 --- a/Items/Armor/AuricTeslaWireHemmedVisage.cs +++ b/Items/Armor/AuricTeslaWireHemmedVisage.cs @@ -51,7 +51,7 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { player.setBonus = "Magic Tarragon, Bloodflare, God Slayer, and Silva armor effects\n" + - "Reduces all damage taken by 10%, this is calculated separately from damage reduction\n" + + "Reduces all damage taken by 5%, this is calculated separately from damage reduction\n" + "All projectiles spawn healing auric orbs on enemy hits\n" + "Max run speed and acceleration boosted by 10%"; CalamityPlayer modPlayer = player.GetModPlayer(mod); diff --git a/Items/Armor/BloodflareBodyArmor.cs b/Items/Armor/BloodflareBodyArmor.cs index b512b8be0e..92a8a63e3c 100644 --- a/Items/Armor/BloodflareBodyArmor.cs +++ b/Items/Armor/BloodflareBodyArmor.cs @@ -6,6 +6,7 @@ using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items.Armor; +using CalamityMod.Items.CalamityCustomThrowingDamage; namespace CalamityMod.Items.Armor { @@ -15,7 +16,7 @@ namespace CalamityMod.Items.Armor public override void SetStaticDefaults() { DisplayName.SetDefault("Bloodflare Body Armor"); - Tooltip.SetDefault("12% increased damage and 7% increased critical strike chance\n" + + Tooltip.SetDefault("12% increased damage and 8% increased critical strike chance\n" + "You regenerate life quickly and gain +30 defense while in lava\n" + "+40 max life and mana"); } @@ -44,13 +45,13 @@ namespace CalamityMod.Items.Armor player.statLifeMax2 += 40; player.statManaMax2 += 40; player.meleeDamage += 0.12f; - player.meleeCrit += 7; + player.meleeCrit += 8; player.magicDamage += 0.12f; - player.magicCrit += 7; + player.magicCrit += 8; player.rangedDamage += 0.12f; - player.rangedCrit += 7; - player.thrownDamage += 0.12f; - player.thrownCrit += 7; + player.rangedCrit += 8; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.12f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 8; player.minionDamage += 0.12f; if (player.lavaWet) { diff --git a/Items/Armor/BloodflareCuisses.cs b/Items/Armor/BloodflareCuisses.cs index 2b030a945f..eeb57cec64 100644 --- a/Items/Armor/BloodflareCuisses.cs +++ b/Items/Armor/BloodflareCuisses.cs @@ -6,6 +6,7 @@ using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items.Armor; +using CalamityMod.Items.CalamityCustomThrowingDamage; namespace CalamityMod.Items.Armor { @@ -15,7 +16,7 @@ namespace CalamityMod.Items.Armor public override void SetStaticDefaults() { DisplayName.SetDefault("Bloodflare Cuisses"); - Tooltip.SetDefault("30% increased movement speed, 10% increased damage and critical strike chance"); + Tooltip.SetDefault("30% increased movement speed, 10% increased damage and 7% increased critical strike chance"); } public override void SetDefaults() @@ -41,13 +42,13 @@ namespace CalamityMod.Items.Armor { player.moveSpeed += 0.3f; player.meleeDamage += 0.1f; - player.meleeCrit += 10; + player.meleeCrit += 7; player.magicDamage += 0.1f; - player.magicCrit += 10; + player.magicCrit += 7; player.rangedDamage += 0.1f; - player.rangedCrit += 10; - player.thrownDamage += 0.1f; - player.thrownCrit += 10; + player.rangedCrit += 7; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.1f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 7; player.minionDamage += 0.1f; } diff --git a/Items/Armor/BloodflareHelm.cs b/Items/Armor/BloodflareHelm.cs index f1752919c7..ed7285c84c 100644 --- a/Items/Armor/BloodflareHelm.cs +++ b/Items/Armor/BloodflareHelm.cs @@ -6,6 +6,7 @@ using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items.Armor; +using CalamityMod.Items.CalamityCustomThrowingDamage; namespace CalamityMod.Items.Armor { @@ -16,7 +17,7 @@ namespace CalamityMod.Items.Armor { DisplayName.SetDefault("Bloodflare Helm"); Tooltip.SetDefault("You can move freely through liquids and you are immune to lava\n" + - "10% increased throwing damage and critical strike chance"); + "10% increased rogue damage and critical strike chance"); } public override void SetDefaults() @@ -57,9 +58,9 @@ namespace CalamityMod.Items.Armor "Enemies below 50% life have a chance to drop hearts when struck\n" + "Enemies above 50% life have a chance to drop mana stars when struck\n" + "Enemies killed during a Blood Moon have a much higher chance to drop Blood Orbs\n" + - "Being over 80% life boosts your defense by 30 and throwing crit by 5%\n" + - "Being below 80% life boosts your throwing damage by 15%\n" + - "Every throwing critical strike will heal you"; + "Being over 80% life boosts your defense by 30 and rogue crit by 5%\n" + + "Being below 80% life boosts your rogue damage by 10%\n" + + "Rogue critical strikes have a 50% chance to heal you"; player.crimsonRegen = true; } @@ -67,8 +68,8 @@ namespace CalamityMod.Items.Armor { player.lavaImmune = true; player.ignoreWater = true; - player.thrownDamage += 0.1f; - player.thrownCrit += 10; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.1f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 10; } public override void AddRecipes() diff --git a/Items/Armor/BloodflareHelmet.cs b/Items/Armor/BloodflareHelmet.cs index ebba0eef9f..ee4288556e 100644 --- a/Items/Armor/BloodflareHelmet.cs +++ b/Items/Armor/BloodflareHelmet.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Armor { DisplayName.SetDefault("Bloodflare Helmet"); Tooltip.SetDefault("You can move freely through liquids and you are immune to lava\n" + - "10% increased summon damage and +3 max minions"); + "+3 max minions"); } public override void SetDefaults() @@ -53,21 +53,22 @@ namespace CalamityMod.Items.Armor CalamityPlayer modPlayer = player.GetModPlayer(mod); modPlayer.bloodflareSet = true; modPlayer.bloodflareSummon = true; - player.setBonus = "Greatly increases life regen\n" + + player.setBonus = "55% increased minion damage\n" + + "Greatly increases life regen\n" + "Enemies below 50% life have a chance to drop hearts when struck\n" + "Enemies above 50% life have a chance to drop mana stars when struck\n" + "Enemies killed during a Blood Moon have a much higher chance to drop Blood Orbs\n" + "Summons polterghast mines to circle you\n" + - "At 90% life and above you gain 15% increased minion damage\n" + - "At 50% life and below you gain 20 defense and 3 life regen"; + "At 90% life and above you gain 10% increased minion damage\n" + + "At 50% life and below you gain 20 defense and 2 life regen"; player.crimsonRegen = true; + player.minionDamage += 0.55f; } public override void UpdateEquip(Player player) { player.lavaImmune = true; player.ignoreWater = true; - player.minionDamage += 0.1f; player.maxMinions += 3; } diff --git a/Items/Armor/BloodflareHornedMask.cs b/Items/Armor/BloodflareHornedMask.cs index 6031b95ff9..656a91f7c0 100644 --- a/Items/Armor/BloodflareHornedMask.cs +++ b/Items/Armor/BloodflareHornedMask.cs @@ -58,7 +58,7 @@ namespace CalamityMod.Items.Armor "Enemies above 50% life have a chance to drop mana stars when struck\n" + "Enemies killed during a Blood Moon have a much higher chance to drop Blood Orbs\n" + "Magic weapons will sometimes fire ghostly bolts\n" + - "Magic critical strikes cause flame explosions"; + "Magic critical strikes cause flame explosions every 2 seconds"; player.crimsonRegen = true; } diff --git a/Items/Armor/DaedalusBreastplate.cs b/Items/Armor/DaedalusBreastplate.cs index 161466a9e3..d4134736a4 100644 --- a/Items/Armor/DaedalusBreastplate.cs +++ b/Items/Armor/DaedalusBreastplate.cs @@ -6,6 +6,7 @@ using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items.Armor; +using CalamityMod.Items.CalamityCustomThrowingDamage; namespace CalamityMod.Items.Armor { @@ -35,8 +36,8 @@ namespace CalamityMod.Items.Armor player.magicDamage += 0.03f; player.rangedCrit += 3; player.rangedDamage += 0.03f; - player.thrownCrit += 3; - player.thrownDamage += 0.03f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 3; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.03f; player.minionDamage += 0.03f; } diff --git a/Items/Armor/DaedalusHat.cs b/Items/Armor/DaedalusHat.cs index 93138a647f..dab231d441 100644 --- a/Items/Armor/DaedalusHat.cs +++ b/Items/Armor/DaedalusHat.cs @@ -41,13 +41,12 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - player.setBonus = "5% increased magic damage and critical strike chance\n" + + player.setBonus = "5% increased magic damage\n" + "You have a 10% chance to absorb physical attacks and projectiles when hit\n" + "If you absorb an attack you are healed for 1/2 of that attack's damage"; CalamityPlayer modPlayer = player.GetModPlayer(mod); modPlayer.daedalusAbsorb = true; player.magicDamage += 0.05f; - player.magicCrit += 5; } public override void UpdateEquip(Player player) diff --git a/Items/Armor/DaedalusHeadgear.cs b/Items/Armor/DaedalusHeadgear.cs index a4e11da902..1a77a65d33 100644 --- a/Items/Armor/DaedalusHeadgear.cs +++ b/Items/Armor/DaedalusHeadgear.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.Armor public override void SetStaticDefaults() { DisplayName.SetDefault("Daedalus Circlet"); - Tooltip.SetDefault("10% increased minion damage and +2 max minions\n" + + Tooltip.SetDefault("5% increased minion damage and +2 max minions\n" + "Immune to Cursed and gives control over gravity"); } @@ -41,7 +41,7 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - player.setBonus = "5% increased summon damage\n" + + player.setBonus = "20% increased minion damage\n" + "A daedalus crystal floats above you to protect you"; CalamityPlayer modPlayer = player.GetModPlayer(mod); modPlayer.daedalusCrystal = true; @@ -56,12 +56,12 @@ namespace CalamityMod.Items.Armor Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, mod.ProjectileType("DaedalusCrystal"), 0, 0f, Main.myPlayer, 0f, 0f); } } - player.minionDamage += 0.05f; + player.minionDamage += 0.2f; } public override void UpdateEquip(Player player) { - player.minionDamage += 0.1f; + player.minionDamage += 0.05f; player.maxMinions += 2; player.AddBuff(BuffID.Gravitation, 2); player.buffImmune[BuffID.Cursed] = true; diff --git a/Items/Armor/DaedalusHelm.cs b/Items/Armor/DaedalusHelm.cs index 6acda3c194..4a06f121ff 100644 --- a/Items/Armor/DaedalusHelm.cs +++ b/Items/Armor/DaedalusHelm.cs @@ -41,13 +41,12 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - player.setBonus = "5% increased melee damage and critical strike chance\n" + + player.setBonus = "5% increased melee damage\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.GetModPlayer(mod); modPlayer.daedalusReflect = true; player.meleeDamage += 0.05f; - player.meleeCrit += 5; } public override void UpdateEquip(Player player) diff --git a/Items/Armor/DaedalusHelmet.cs b/Items/Armor/DaedalusHelmet.cs index 7ea230bc2a..30ed1d5059 100644 --- a/Items/Armor/DaedalusHelmet.cs +++ b/Items/Armor/DaedalusHelmet.cs @@ -41,12 +41,11 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - player.setBonus = "5% increased ranged damage and critical strike chance\n" + + player.setBonus = "5% increased ranged damage\n" + "Getting hit causes you to emit a blast of crystal shards"; CalamityPlayer modPlayer = player.GetModPlayer(mod); modPlayer.daedalusShard = true; player.rangedDamage += 0.05f; - player.rangedCrit += 5; } public override void UpdateEquip(Player player) diff --git a/Items/Armor/DaedalusLeggings.cs b/Items/Armor/DaedalusLeggings.cs index 68617ecfda..3e2b640afc 100644 --- a/Items/Armor/DaedalusLeggings.cs +++ b/Items/Armor/DaedalusLeggings.cs @@ -6,6 +6,7 @@ using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items.Armor; +using CalamityMod.Items.CalamityCustomThrowingDamage; namespace CalamityMod.Items.Armor { @@ -15,7 +16,8 @@ namespace CalamityMod.Items.Armor public override void SetStaticDefaults() { DisplayName.SetDefault("Daedalus Leggings"); - Tooltip.SetDefault("4% increased critical strike chance\n10% increased movement speed"); + Tooltip.SetDefault("3% increased critical strike chance\n" + + "10% increased movement speed"); } public override void SetDefaults() @@ -29,10 +31,10 @@ namespace CalamityMod.Items.Armor public override void UpdateEquip(Player player) { - player.meleeCrit += 4; - player.magicCrit += 4; - player.rangedCrit += 4; - player.thrownCrit += 4; + player.meleeCrit += 3; + player.magicCrit += 3; + player.rangedCrit += 3; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 3; player.moveSpeed += 0.1f; } diff --git a/Items/Armor/DaedalusVisor.cs b/Items/Armor/DaedalusVisor.cs index 762f9f9b9f..a666dcc5fe 100644 --- a/Items/Armor/DaedalusVisor.cs +++ b/Items/Armor/DaedalusVisor.cs @@ -6,6 +6,7 @@ using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items.Armor; +using CalamityMod.Items.CalamityCustomThrowingDamage; namespace CalamityMod.Items.Armor { @@ -15,7 +16,7 @@ namespace CalamityMod.Items.Armor public override void SetStaticDefaults() { DisplayName.SetDefault("Daedalus Facemask"); - Tooltip.SetDefault("10% increased throwing damage and critcal strike chance, increases throwing velocity by 15%\n" + + Tooltip.SetDefault("10% increased rogue damage and critcal strike chance, increases rogue velocity by 15%\n" + "Immune to Cursed and gives control over gravity"); } @@ -47,19 +48,18 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - player.setBonus = "5% increased throwing damage and critical strike chance\n" + - "Throwing projectiles throw out crystal shards as they travel"; + player.setBonus = "5% increased rogue damage\n" + + "Rogue projectiles throw out crystal shards as they travel"; CalamityPlayer modPlayer = player.GetModPlayer(mod); modPlayer.daedalusSplit = true; - player.thrownDamage += 0.05f; - player.thrownCrit += 5; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.05f; } public override void UpdateEquip(Player player) { - player.thrownVelocity += 0.15f; - player.thrownDamage += 0.1f; - player.thrownCrit += 10; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingVelocity += 0.15f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.1f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 10; player.AddBuff(BuffID.Gravitation, 2); player.buffImmune[BuffID.Cursed] = true; } diff --git a/Items/Armor/DemonshadeBreastplate.cs b/Items/Armor/DemonshadeBreastplate.cs index 48b758e57f..076f78d22c 100644 --- a/Items/Armor/DemonshadeBreastplate.cs +++ b/Items/Armor/DemonshadeBreastplate.cs @@ -6,6 +6,7 @@ using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items.Armor; +using CalamityMod.Items.CalamityCustomThrowingDamage; namespace CalamityMod.Items.Armor { @@ -15,7 +16,7 @@ namespace CalamityMod.Items.Armor public override void SetStaticDefaults() { DisplayName.SetDefault("Demonshade Breastplate"); - Tooltip.SetDefault("20% increased melee speed, 20% increased damage and critical strike chance\n" + + Tooltip.SetDefault("20% increased melee speed, 15% increased damage and critical strike chance\n" + "Enemies take ungodly damage when they touch you\n" + "Increased max life and mana by 200\n" + "Standing still lets you absorb the shadows and boost your life regen"); @@ -47,15 +48,15 @@ namespace CalamityMod.Items.Armor player.thorns = 100f; player.statLifeMax2 += 200; player.statManaMax2 += 200; - player.magicCrit += 20; - player.magicDamage += 0.2f; - player.meleeCrit += 20; - player.meleeDamage += 0.2f; - player.thrownCrit += 20; - player.thrownDamage += 0.2f; - player.rangedCrit += 20; - player.rangedDamage += 0.2f; - player.minionDamage += 0.2f; + player.magicCrit += 15; + player.magicDamage += 0.15f; + player.meleeCrit += 15; + player.meleeDamage += 0.15f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 15; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.15f; + player.rangedCrit += 15; + player.rangedDamage += 0.15f; + player.minionDamage += 0.15f; player.meleeSpeed += 0.2f; } diff --git a/Items/Armor/DemonshadeHelm.cs b/Items/Armor/DemonshadeHelm.cs index 260b98f0b3..e1521c59ef 100644 --- a/Items/Armor/DemonshadeHelm.cs +++ b/Items/Armor/DemonshadeHelm.cs @@ -6,6 +6,7 @@ using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items.Armor; +using CalamityMod.Items.CalamityCustomThrowingDamage; namespace CalamityMod.Items.Armor { @@ -15,7 +16,7 @@ namespace CalamityMod.Items.Armor public override void SetStaticDefaults() { DisplayName.SetDefault("Demonshade Helm"); - Tooltip.SetDefault("30% increased damage and critical strike chance, +10 max minions"); + Tooltip.SetDefault("30% increased damage and 15% increased critical strike chance, +10 max minions"); } public override void SetDefaults() @@ -50,12 +51,13 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - player.setBonus = "All attacks inflict the demon flame debuff\n" + + player.setBonus = "100% increased minion damage\n" + + "All attacks inflict the demon flame debuff\n" + "Shadowbeams and demon scythes will fire down when you are hit\n" + "A friendly red devil follows you around\n" + "Removes the damage and critical strike chance caps\n" + "Press Y to enrage nearby enemies with a dark magic spell for 10 seconds\n" + - "This makes them do 1.5 times more damage but they also take three times as much damage"; + "This makes them do 1.5 times more damage but they also take five times as much damage"; CalamityPlayer modPlayer = player.GetModPlayer(mod); modPlayer.dsSetBonus = true; modPlayer.redDevil = true; @@ -70,20 +72,21 @@ namespace CalamityMod.Items.Armor Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, mod.ProjectileType("RedDevil"), 0, 0f, Main.myPlayer, 0f, 0f); } } - } + player.minionDamage += 1f; + } public override void UpdateEquip(Player player) { player.maxMinions += 10; player.meleeDamage += 0.3f; - player.thrownDamage += 0.3f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.3f; player.rangedDamage += 0.3f; player.magicDamage += 0.3f; player.minionDamage += 0.3f; - player.meleeCrit += 30; - player.magicCrit += 30; - player.rangedCrit += 30; - player.thrownCrit += 30; + player.meleeCrit += 15; + player.magicCrit += 15; + player.rangedCrit += 15; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 15; } public override void AddRecipes() diff --git a/Items/Armor/GodSlayerChestplate.cs b/Items/Armor/GodSlayerChestplate.cs index 974d260b99..de7e2858e0 100644 --- a/Items/Armor/GodSlayerChestplate.cs +++ b/Items/Armor/GodSlayerChestplate.cs @@ -6,6 +6,7 @@ using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items.Armor; +using CalamityMod.Items.CalamityCustomThrowingDamage; namespace CalamityMod.Items.Armor { @@ -19,7 +20,7 @@ namespace CalamityMod.Items.Armor "15% increased movement speed\n" + "Enemies take damage when they hit you\n" + "Attacks have a 2% chance to do no damage to you\n" + - "10% increased damage and 6% increased critical strike chance"); + "11% increased damage and 6% increased critical strike chance"); } public override void SetDefaults() @@ -49,15 +50,15 @@ namespace CalamityMod.Items.Armor player.statLifeMax2 += 60; player.statManaMax2 += 60; player.moveSpeed += 0.15f; - player.meleeDamage += 0.1f; + player.meleeDamage += 0.11f; player.meleeCrit += 6; - player.magicDamage += 0.1f; + player.magicDamage += 0.11f; player.magicCrit += 6; - player.rangedDamage += 0.1f; + player.rangedDamage += 0.11f; player.rangedCrit += 6; - player.thrownDamage += 0.1f; - player.thrownCrit += 6; - player.minionDamage += 0.1f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.11f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 6; + player.minionDamage += 0.11f; } public override void AddRecipes() diff --git a/Items/Armor/GodSlayerHornedHelm.cs b/Items/Armor/GodSlayerHornedHelm.cs index e11335893d..be786e7763 100644 --- a/Items/Armor/GodSlayerHornedHelm.cs +++ b/Items/Armor/GodSlayerHornedHelm.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.Armor public override void SetStaticDefaults() { DisplayName.SetDefault("God Slayer Horned Helm"); - Tooltip.SetDefault("14% increased summon damage and +3 max minions"); + Tooltip.SetDefault("+3 max minions"); } public override void SetDefaults() @@ -175,17 +175,18 @@ 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" + + player.setBonus = "65% increased minion damage\n" + + "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 you gain a 10% increase to all damage\n" + "Hitting enemies will summon god slayer phantoms\n" + "Summons a god-eating mechworm to fight for you"; + player.minionDamage += 0.65f; } public override void UpdateEquip(Player player) { player.maxMinions += 3; - player.minionDamage += 0.14f; } public override void AddRecipes() diff --git a/Items/Armor/GodSlayerLeggings.cs b/Items/Armor/GodSlayerLeggings.cs index 92ebaf9d03..f0ab1941c7 100644 --- a/Items/Armor/GodSlayerLeggings.cs +++ b/Items/Armor/GodSlayerLeggings.cs @@ -6,6 +6,7 @@ using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items; +using CalamityMod.Items.CalamityCustomThrowingDamage; namespace CalamityMod.Items.Armor { @@ -16,7 +17,7 @@ namespace CalamityMod.Items.Armor { DisplayName.SetDefault("God Slayer Leggings"); Tooltip.SetDefault("35% increased movement speed\n" + - "10% increased damage and critical strike chance"); + "10% increased damage and 6% increased critical strike chance"); } public override void SetDefaults() @@ -42,13 +43,13 @@ namespace CalamityMod.Items.Armor { player.moveSpeed += 0.35f; player.meleeDamage += 0.1f; - player.meleeCrit += 10; + player.meleeCrit += 6; player.magicDamage += 0.1f; - player.magicCrit += 10; + player.magicCrit += 6; player.rangedDamage += 0.1f; - player.rangedCrit += 10; - player.thrownDamage += 0.1f; - player.thrownCrit += 10; + player.rangedCrit += 6; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.1f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 6; player.minionDamage += 0.1f; } diff --git a/Items/Armor/GodSlayerMask.cs b/Items/Armor/GodSlayerMask.cs index 77eaff9f63..6d0c26d74c 100644 --- a/Items/Armor/GodSlayerMask.cs +++ b/Items/Armor/GodSlayerMask.cs @@ -6,6 +6,7 @@ using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items; +using CalamityMod.Items.CalamityCustomThrowingDamage; namespace CalamityMod.Items.Armor { @@ -15,7 +16,7 @@ namespace CalamityMod.Items.Armor public override void SetStaticDefaults() { DisplayName.SetDefault("God Slayer Mask"); - Tooltip.SetDefault("14% increased throwing damage and critical strike chance"); + Tooltip.SetDefault("14% increased rogue damage and critical strike chance"); } public override void SetDefaults() @@ -55,14 +56,14 @@ 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 you gain a 10% increase to all damage\n" + - "While at full HP all of your throwing stats are boosted by 15%\n" + + "While at full HP all of your rogue stats are boosted by 10%\n" + "If you take over 80 damage in one hit you will be given extra immunity frames"; } public override void UpdateEquip(Player player) { - player.thrownDamage += 0.14f; - player.thrownCrit += 14; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.14f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 14; } public override void AddRecipes() diff --git a/Items/Armor/OmegaBlueChestplate.cs b/Items/Armor/OmegaBlueChestplate.cs new file mode 100644 index 0000000000..cb00826630 --- /dev/null +++ b/Items/Armor/OmegaBlueChestplate.cs @@ -0,0 +1,61 @@ +using Microsoft.Xna.Framework; +using System.Collections.Generic; +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Items.CalamityCustomThrowingDamage; + +namespace CalamityMod.Items.Armor +{ + [AutoloadEquip(EquipType.Body)] + public class OmegaBlueChestplate : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Omega Blue Chestplate"); + Tooltip.SetDefault(@"12% increased damage and 8% increased critical strike chance +Your attacks inflict Crush Depth +No positive life regen"); + } + + public override void SetDefaults() + { + item.width = 18; + item.height = 18; + item.value = Item.sellPrice(0, 38, 0, 0); + item.rare = 13; + item.defense = 28; + } + + public override void UpdateEquip(Player player) + { + const float damageUp = 0.12f; + const int critUp = 8; + player.meleeDamage += damageUp; + player.rangedDamage += damageUp; + player.magicDamage += damageUp; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += damageUp; + player.minionDamage += damageUp; + player.meleeCrit += critUp; + player.rangedCrit += critUp; + player.magicCrit += critUp; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += critUp; + + //insert enable crush depth, disable positive life regen + player.GetModPlayer().omegaBlueChestplate = true; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(mod.ItemType("ReaperTooth"), 16); + recipe.AddIngredient(mod.ItemType("Lumenite"), 8); + recipe.AddIngredient(mod.ItemType("Tenebris"), 8); + recipe.AddIngredient(mod.ItemType("RuinousSoul"), 4); + recipe.AddTile(TileID.LunarCraftingStation); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } +} diff --git a/Items/Armor/OmegaBlueChestplate.png b/Items/Armor/OmegaBlueChestplate.png new file mode 100644 index 0000000000..0f1cc55184 Binary files /dev/null and b/Items/Armor/OmegaBlueChestplate.png differ diff --git a/Items/Armor/OmegaBlueChestplate_Arms.png b/Items/Armor/OmegaBlueChestplate_Arms.png new file mode 100644 index 0000000000..1eae0e7bf7 Binary files /dev/null and b/Items/Armor/OmegaBlueChestplate_Arms.png differ diff --git a/Items/Armor/OmegaBlueChestplate_Body.png b/Items/Armor/OmegaBlueChestplate_Body.png new file mode 100644 index 0000000000..db0c2c5ef2 Binary files /dev/null and b/Items/Armor/OmegaBlueChestplate_Body.png differ diff --git a/Items/Armor/OmegaBlueChestplate_FemaleBody.png b/Items/Armor/OmegaBlueChestplate_FemaleBody.png new file mode 100644 index 0000000000..db0c2c5ef2 Binary files /dev/null and b/Items/Armor/OmegaBlueChestplate_FemaleBody.png differ diff --git a/Items/Armor/OmegaBlueHelmet.cs b/Items/Armor/OmegaBlueHelmet.cs new file mode 100644 index 0000000000..cf11fc15d1 --- /dev/null +++ b/Items/Armor/OmegaBlueHelmet.cs @@ -0,0 +1,114 @@ +using Microsoft.Xna.Framework; +using System.Collections.Generic; +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Items.CalamityCustomThrowingDamage; + +namespace CalamityMod.Items.Armor +{ + [AutoloadEquip(EquipType.Head)] + public class OmegaBlueHelmet : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Omega Blue Helmet"); + Tooltip.SetDefault(@"You can move freely through liquids +12% increased damage and 8% increased critical strike chance ++2 max minions"); + } + + public override void SetDefaults() + { + item.width = 18; + item.height = 18; + item.value = Item.sellPrice(0, 35, 0, 0); + item.rare = 13; + item.defense = 19; + } + + public override void UpdateEquip(Player player) + { + player.ignoreWater = true; + + const float damageUp = 0.12f; + const int critUp = 8; + player.meleeDamage += damageUp; + player.rangedDamage += damageUp; + player.magicDamage += damageUp; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += damageUp; + player.minionDamage += damageUp; + player.meleeCrit += critUp; + player.rangedCrit += critUp; + player.magicCrit += critUp; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += critUp; + + player.maxMinions += 2; + } + + public override bool IsArmorSet(Item head, Item body, Item legs) + { + return body.type == mod.ItemType("OmegaBlueChestplate") && legs.type == mod.ItemType("OmegaBlueLeggings"); + } + + public override void ArmorSetShadows(Player player) + { + player.armorEffectDrawOutlines = true; + } + + public override void UpdateArmorSet(Player player) + { + player.setBonus = @"Increases armor penetration by 50 +10% increased damage and critical strike chance +Short-ranged tentacles heal you by sucking enemy life +Press Y to activate abyssal madness for 5 seconds +Abyssal madness increases damage, critical strike chance, and tentacle aggression/range +This effect has a 30 second cooldown"; + + player.armorPenetration += 50; + + //raise rev caps + player.GetModPlayer().omegaBlueSet = true; + + if (player.GetModPlayer().omegaBlueCooldown > 0) + { + if (player.GetModPlayer().omegaBlueCooldown == 1) //dust when ready to use again + { + for (int i = 0; i < 66; i++) + { + int d = Dust.NewDust(player.position, player.width, player.height, 20, 0, 0, 100, Color.Transparent, 2.6f); + Main.dust[d].noGravity = true; + Main.dust[d].noLight = true; + Main.dust[d].fadeIn = 1f; + Main.dust[d].velocity *= 6.6f; + } + } + player.GetModPlayer().omegaBlueCooldown--; + } + + if (player.GetModPlayer().omegaBlueCooldown > 1500) + { + player.GetModPlayer().omegaBlueHentai = true; + + int d = Dust.NewDust(player.position, player.width, player.height, 20, 0, 0, 100, Color.Transparent, 1.6f); + Main.dust[d].noGravity = true; + Main.dust[d].noLight = true; + Main.dust[d].fadeIn = 1f; + Main.dust[d].velocity *= 3f; + } + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(mod.ItemType("ReaperTooth"), 11); + recipe.AddIngredient(mod.ItemType("Lumenite"), 5); + recipe.AddIngredient(mod.ItemType("Tenebris"), 5); + recipe.AddIngredient(mod.ItemType("RuinousSoul"), 2); + recipe.AddTile(TileID.LunarCraftingStation); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } +} diff --git a/Items/Armor/OmegaBlueHelmet.png b/Items/Armor/OmegaBlueHelmet.png new file mode 100644 index 0000000000..db98d1b648 Binary files /dev/null and b/Items/Armor/OmegaBlueHelmet.png differ diff --git a/Items/Armor/OmegaBlueHelmet_Head.png b/Items/Armor/OmegaBlueHelmet_Head.png new file mode 100644 index 0000000000..7636f85701 Binary files /dev/null and b/Items/Armor/OmegaBlueHelmet_Head.png differ diff --git a/Items/Armor/OmegaBlueLeggings.cs b/Items/Armor/OmegaBlueLeggings.cs new file mode 100644 index 0000000000..689491e8f4 --- /dev/null +++ b/Items/Armor/OmegaBlueLeggings.cs @@ -0,0 +1,59 @@ +using Microsoft.Xna.Framework; +using System.Collections.Generic; +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Items.CalamityCustomThrowingDamage; + +namespace CalamityMod.Items.Armor +{ + [AutoloadEquip(EquipType.Legs)] + public class OmegaBlueLeggings : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Omega Blue Leggings"); + Tooltip.SetDefault(@"30% increased movement speed +12% increased damage and 8% increased critical strike chance"); + } + + public override void SetDefaults() + { + item.width = 18; + item.height = 18; + item.value = Item.sellPrice(0, 35, 25, 0); + item.rare = 13; + item.defense = 22; + } + + public override void UpdateEquip(Player player) + { + const float damageUp = 0.12f; + const int critUp = 8; + player.meleeDamage += damageUp; + player.rangedDamage += damageUp; + player.magicDamage += damageUp; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += damageUp; + player.minionDamage += damageUp; + player.meleeCrit += critUp; + player.rangedCrit += critUp; + player.magicCrit += critUp; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += critUp; + + player.moveSpeed += 0.3f; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(mod.ItemType("ReaperTooth"), 13); + recipe.AddIngredient(mod.ItemType("Lumenite"), 6); + recipe.AddIngredient(mod.ItemType("Tenebris"), 6); + recipe.AddIngredient(mod.ItemType("RuinousSoul"), 3); + recipe.AddTile(TileID.LunarCraftingStation); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } +} diff --git a/Items/Armor/OmegaBlueLeggings.png b/Items/Armor/OmegaBlueLeggings.png new file mode 100644 index 0000000000..d6a885d6d7 Binary files /dev/null and b/Items/Armor/OmegaBlueLeggings.png differ diff --git a/Items/Armor/OmegaBlueLeggings_Legs.png b/Items/Armor/OmegaBlueLeggings_Legs.png new file mode 100644 index 0000000000..462c173936 Binary files /dev/null and b/Items/Armor/OmegaBlueLeggings_Legs.png differ diff --git a/Items/Armor/ReaverCap.cs b/Items/Armor/ReaverCap.cs index 70d2f1a85f..857fd2c05f 100644 --- a/Items/Armor/ReaverCap.cs +++ b/Items/Armor/ReaverCap.cs @@ -6,6 +6,7 @@ using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items.Armor; +using CalamityMod.Items.CalamityCustomThrowingDamage; namespace CalamityMod.Items.Armor { @@ -15,7 +16,7 @@ namespace CalamityMod.Items.Armor public override void SetStaticDefaults() { DisplayName.SetDefault("Reaver Headgear"); - Tooltip.SetDefault("10% increased throwing damage, 5% increased throwing velocity and critical strike chance\n" + + Tooltip.SetDefault("10% increased rogue damage, 5% increased rogue velocity and critical strike chance\n" + "10% increased movement speed and can move freely through liquids"); } @@ -43,19 +44,18 @@ namespace CalamityMod.Items.Armor { CalamityPlayer modPlayer = player.GetModPlayer(mod); modPlayer.reaverSpore = true; - player.setBonus = "5% increased throwing damage and critical strike chance\n" + + player.setBonus = "5% increased rogue damage\n" + "You emit a cloud of spores when you are hit\n" + "Rage activates when you are damaged"; - player.thrownDamage += 0.05f; - player.thrownCrit += 5; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.05f; } public override void UpdateEquip(Player player) { player.ignoreWater = true; - player.thrownDamage += 0.1f; - player.thrownCrit += 5; - player.thrownVelocity += 0.05f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.1f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 5; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingVelocity += 0.05f; player.moveSpeed += 0.1f; } diff --git a/Items/Armor/ReaverCuisses.cs b/Items/Armor/ReaverCuisses.cs index c297996506..3a5418a0c6 100644 --- a/Items/Armor/ReaverCuisses.cs +++ b/Items/Armor/ReaverCuisses.cs @@ -6,6 +6,7 @@ using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items.Armor; +using CalamityMod.Items.CalamityCustomThrowingDamage; namespace CalamityMod.Items.Armor { @@ -15,7 +16,8 @@ namespace CalamityMod.Items.Armor public override void SetStaticDefaults() { DisplayName.SetDefault("Reaver Cuisses"); - Tooltip.SetDefault("5% increased critical strike chance\n12% increased movement speed"); + Tooltip.SetDefault("5% increased critical strike chance\n" + + "12% increased movement speed"); } public override void SetDefaults() @@ -32,7 +34,7 @@ namespace CalamityMod.Items.Armor player.meleeCrit += 5; player.magicCrit += 5; player.rangedCrit += 5; - player.thrownCrit += 5; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 5; player.moveSpeed += 0.12f; } diff --git a/Items/Armor/ReaverHelm.cs b/Items/Armor/ReaverHelm.cs index 3e928d2225..1c72f9286c 100644 --- a/Items/Armor/ReaverHelm.cs +++ b/Items/Armor/ReaverHelm.cs @@ -44,12 +44,11 @@ namespace CalamityMod.Items.Armor CalamityPlayer modPlayer = player.GetModPlayer(mod); player.thorns += 0.33f; modPlayer.reaverBlast = true; - player.setBonus = "5% increased melee damage and critical strike chance\n" + + player.setBonus = "5% increased melee damage\n" + "Melee projectiles explode on hit\n" + "Reaver thorns\n" + "Rage activates when you are damaged"; player.meleeDamage += 0.05f; - player.meleeCrit += 5; } public override void UpdateEquip(Player player) diff --git a/Items/Armor/ReaverHelmet.cs b/Items/Armor/ReaverHelmet.cs index 7e6873aede..92fb550994 100644 --- a/Items/Armor/ReaverHelmet.cs +++ b/Items/Armor/ReaverHelmet.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.Armor public override void SetStaticDefaults() { DisplayName.SetDefault("Reaver Helmet"); - Tooltip.SetDefault("10% increased summon damage, +2 max minions, and increased minion knockback\n" + + Tooltip.SetDefault("5% increased minion damage, +2 max minions, and increased minion knockback\n" + "10% increased movement speed and can move freely through liquids"); } @@ -41,7 +41,7 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - player.setBonus = "5% increased summon damage\n" + + player.setBonus = "16% increased minion damage\n" + "Summons a reaver orb that emits spore gas when enemies are near\n" + "Rage activates when you are damaged"; CalamityPlayer modPlayer = player.GetModPlayer(mod); @@ -57,13 +57,13 @@ namespace CalamityMod.Items.Armor Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, mod.ProjectileType("ReaverOrb"), 0, 0f, Main.myPlayer, 0f, 0f); } } - player.minionDamage += 0.05f; + player.minionDamage += 0.16f; } public override void UpdateEquip(Player player) { player.ignoreWater = true; - player.minionDamage += 0.1f; + player.minionDamage += 0.05f; player.minionKB += 1f; player.maxMinions += 2; player.moveSpeed += 0.1f; diff --git a/Items/Armor/ReaverMask.cs b/Items/Armor/ReaverMask.cs index 700bce5b09..96dc066a7f 100644 --- a/Items/Armor/ReaverMask.cs +++ b/Items/Armor/ReaverMask.cs @@ -43,11 +43,10 @@ namespace CalamityMod.Items.Armor { CalamityPlayer modPlayer = player.GetModPlayer(mod); modPlayer.reaverBurst = true; - player.setBonus = "5% increased magic damage and critical strike chance\n" + + player.setBonus = "5% increased magic damage\n" + "Your magic projectiles emit a burst of spore gas on enemy hits\n" + "Rage activates when you are damaged"; player.magicDamage += 0.05f; - player.magicCrit += 5; } public override void UpdateEquip(Player player) diff --git a/Items/Armor/ReaverScaleMail.cs b/Items/Armor/ReaverScaleMail.cs index 3dc7a4720f..ca15b32c16 100644 --- a/Items/Armor/ReaverScaleMail.cs +++ b/Items/Armor/ReaverScaleMail.cs @@ -6,6 +6,7 @@ using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items.Armor; +using CalamityMod.Items.CalamityCustomThrowingDamage; namespace CalamityMod.Items.Armor { @@ -15,14 +16,14 @@ namespace CalamityMod.Items.Armor public override void SetStaticDefaults() { DisplayName.SetDefault("Reaver Scale Mail"); - Tooltip.SetDefault("9% increased damage and 4% increased critical strike chance\nProvides life regeneration\n+20 max life"); + Tooltip.SetDefault("9% increased damage and 4% increased critical strike chance\n" + + "+20 max life"); } public override void SetDefaults() { item.width = 18; item.height = 18; - item.lifeRegen = 1; item.value = 300000; item.rare = 6; item.defense = 19; @@ -37,8 +38,8 @@ namespace CalamityMod.Items.Armor player.magicDamage += 0.09f; player.rangedCrit += 4; player.rangedDamage += 0.09f; - player.thrownCrit += 4; - player.thrownDamage += 0.09f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 4; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.09f; player.minionDamage += 0.09f; } diff --git a/Items/Armor/ReaverVisage.cs b/Items/Armor/ReaverVisage.cs index 20df3d5442..173499c5e5 100644 --- a/Items/Armor/ReaverVisage.cs +++ b/Items/Armor/ReaverVisage.cs @@ -43,11 +43,10 @@ namespace CalamityMod.Items.Armor { CalamityPlayer modPlayer = player.GetModPlayer(mod); modPlayer.reaverDoubleTap = true; - player.setBonus = "5% increased ranged damage and critical strike chance\n" + + player.setBonus = "5% increased ranged damage\n" + "While using a ranged weapon you have a 10% chance to fire a powerful rocket\n" + "Rage activates when you are damaged"; player.rangedDamage += 0.05f; - player.rangedCrit += 5; } public override void UpdateEquip(Player player) diff --git a/Items/Armor/SilvaArmor.cs b/Items/Armor/SilvaArmor.cs index 01d9200cd1..e4864381cd 100644 --- a/Items/Armor/SilvaArmor.cs +++ b/Items/Armor/SilvaArmor.cs @@ -6,6 +6,7 @@ using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items.Armor; +using CalamityMod.Items.CalamityCustomThrowingDamage; namespace CalamityMod.Items.Armor { @@ -17,7 +18,7 @@ namespace CalamityMod.Items.Armor DisplayName.SetDefault("Silva Armor"); Tooltip.SetDefault("+80 max life and mana\n" + "20% increased movement speed\n" + - "12% increased damage and 10% increased critical strike chance"); + "12% increased damage and 8% increased critical strike chance"); } public override void SetDefaults() @@ -45,13 +46,13 @@ namespace CalamityMod.Items.Armor player.statManaMax2 += 80; player.moveSpeed += 0.2f; player.meleeDamage += 0.12f; - player.meleeCrit += 10; + player.meleeCrit += 8; player.rangedDamage += 0.12f; - player.rangedCrit += 10; + player.rangedCrit += 8; player.magicDamage += 0.12f; - player.magicCrit += 10; - player.thrownDamage += 0.12f; - player.thrownCrit += 10; + player.magicCrit += 8; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.12f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 8; player.minionDamage += 0.12f; } diff --git a/Items/Armor/SilvaHelmet.cs b/Items/Armor/SilvaHelmet.cs index 8bf730da90..b00d3c073f 100644 --- a/Items/Armor/SilvaHelmet.cs +++ b/Items/Armor/SilvaHelmet.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.Armor public override void SetStaticDefaults() { DisplayName.SetDefault("Silva Helmet"); - Tooltip.SetDefault("13% increased summon damage and +5 max minions"); + Tooltip.SetDefault("+5 max minions"); } public override void SetDefaults() @@ -52,7 +52,8 @@ namespace CalamityMod.Items.Armor CalamityPlayer modPlayer = player.GetModPlayer(mod); modPlayer.silvaSet = true; modPlayer.silvaSummon = true; - player.setBonus = "You are immune to almost all debuffs\n" + + player.setBonus = "75% increased minion damage\n" + + "You are immune to almost all debuffs\n" + "Reduces all damage taken by 5%, this is calculated separately from damage reduction\n" + "All projectiles spawn healing leaf orbs on enemy hits\n" + "Max run speed and acceleration boosted by 5%\n" + @@ -61,7 +62,7 @@ namespace CalamityMod.Items.Armor "This effect only triggers once per life\n" + "Your max life will return to normal if you die\n" + "Summons an ancient leaf prism to blast your enemies with life energy\n" + - "After the silva invulnerability time your minions will deal 15% more damage and you will gain +2 max minions"; + "After the silva invulnerability time your minions will deal 10% more damage and you will gain +2 max minions"; if (player.whoAmI == Main.myPlayer) { if (player.FindBuffIndex(mod.BuffType("SilvaCrystal")) == -1) @@ -73,11 +74,11 @@ namespace CalamityMod.Items.Armor Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, mod.ProjectileType("SilvaCrystal"), (int)((double)1500 * player.minionDamage), 0f, Main.myPlayer, 0f, 0f); } } + player.minionDamage += 0.75f; } public override void UpdateEquip(Player player) { - player.minionDamage += 0.13f; player.maxMinions += 5; } diff --git a/Items/Armor/SilvaHornedHelm.cs b/Items/Armor/SilvaHornedHelm.cs index 68f54a2a54..dbfd9d2f55 100644 --- a/Items/Armor/SilvaHornedHelm.cs +++ b/Items/Armor/SilvaHornedHelm.cs @@ -61,7 +61,7 @@ namespace CalamityMod.Items.Armor "This effect only triggers once per life\n" + "Your max life will return to normal if you die\n" + "Increases your rate of fire with all ranged weapons\n" + - "During the silva invulnerability time your ranged weapons will do 50% more damage"; + "During the silva invulnerability time your ranged weapons will do 40% more damage"; } public override void UpdateEquip(Player player) diff --git a/Items/Armor/SilvaLeggings.cs b/Items/Armor/SilvaLeggings.cs index 571dcc014b..ad73fc399f 100644 --- a/Items/Armor/SilvaLeggings.cs +++ b/Items/Armor/SilvaLeggings.cs @@ -6,6 +6,7 @@ using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items; +using CalamityMod.Items.CalamityCustomThrowingDamage; namespace CalamityMod.Items.Armor { @@ -16,7 +17,7 @@ namespace CalamityMod.Items.Armor { DisplayName.SetDefault("Silva Leggings"); Tooltip.SetDefault("45% increased movement speed\n" + - "12% increased damage and 9% increased critical strike chance"); + "12% increased damage and 7% increased critical strike chance"); } public override void SetDefaults() @@ -42,13 +43,13 @@ namespace CalamityMod.Items.Armor { player.moveSpeed += 0.45f; player.meleeDamage += 0.12f; - player.meleeCrit += 9; + player.meleeCrit += 7; player.rangedDamage += 0.12f; - player.rangedCrit += 9; + player.rangedCrit += 7; player.magicDamage += 0.12f; - player.magicCrit += 9; - player.thrownDamage += 0.12f; - player.thrownCrit += 9; + player.magicCrit += 7; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.12f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 7; player.minionDamage += 0.12f; } diff --git a/Items/Armor/SilvaMask.cs b/Items/Armor/SilvaMask.cs index 954bcf763b..ff6ab7fdee 100644 --- a/Items/Armor/SilvaMask.cs +++ b/Items/Armor/SilvaMask.cs @@ -6,6 +6,7 @@ using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items; +using CalamityMod.Items.CalamityCustomThrowingDamage; namespace CalamityMod.Items.Armor { @@ -15,7 +16,7 @@ namespace CalamityMod.Items.Armor public override void SetStaticDefaults() { DisplayName.SetDefault("Silva Mask"); - Tooltip.SetDefault("13% increased throwing damage and critical strike chance"); + Tooltip.SetDefault("13% increased rogue damage and critical strike chance"); } public override void SetDefaults() @@ -60,14 +61,14 @@ namespace CalamityMod.Items.Armor "If you get reduced to 0 HP again while this effect is active you will lose 100 max life\n" + "This effect only triggers once per life\n" + "Your max life will return to normal if you die\n" + - "Throwing weapons have a faster throwing rate while you are above 90% life\n" + - "After the silva invulnerability time your throwing weapons will do 20% more damage"; + "Rogue weapons have a faster throwing rate while you are above 90% life\n" + + "After the silva invulnerability time your rogue weapons will do 10% more damage"; } public override void UpdateEquip(Player player) { - player.thrownDamage += 0.13f; - player.thrownCrit += 13; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.13f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 13; } public override void AddRecipes() diff --git a/Items/Armor/SilvaMaskedCap.cs b/Items/Armor/SilvaMaskedCap.cs index 54f8a907bc..b548edaaf1 100644 --- a/Items/Armor/SilvaMaskedCap.cs +++ b/Items/Armor/SilvaMaskedCap.cs @@ -61,7 +61,7 @@ namespace CalamityMod.Items.Armor "This effect only triggers once per life\n" + "Your max life will return to normal if you die\n" + "Magic projectiles have a 10% chance to cause a massive explosion on enemy hits\n" + - "After the silva invulnerability time your magic weapons will have 10% more critical strike chance and damage"; + "After the silva invulnerability time your magic weapons will do 10% more damage"; } public override void UpdateEquip(Player player) diff --git a/Items/Armor/SirensHeart.cs b/Items/Armor/SirensHeart.cs index 89b1b62a9b..7d4915d7c4 100644 --- a/Items/Armor/SirensHeart.cs +++ b/Items/Armor/SirensHeart.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.Armor "Going underwater gives you a buff\n" + "Greatly reduces breath loss in the abyss\n" + "Enemies become frozen when they touch you\n" + - "You have a layer of ice around you that absorbs 25% damage but breaks after one hit\n" + + "You have a layer of ice around you that absorbs 20% damage but breaks after one hit\n" + "After 30 seconds the ice shield will regenerate\n" + "Your alluring figure allows you to buy items at a reduced price from town npcs (only works in hardmode)\n" + "Wow, you can swim now!\n" + @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Armor item.width = 18; item.height = 18; item.accessory = true; - item.value = 1000000; + item.value = Item.buyPrice(0, 45, 0, 0); item.rare = 7; } diff --git a/Items/Armor/SirensHeartAlt.cs b/Items/Armor/SirensHeartAlt.cs index 677e8f8432..1bb654d9f2 100644 --- a/Items/Armor/SirensHeartAlt.cs +++ b/Items/Armor/SirensHeartAlt.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.Armor "Going underwater gives you a buff\n" + "Greatly reduces breath loss in the abyss\n" + "Enemies become frozen when they touch you\n" + - "You have a layer of ice around you that absorbs 25% damage but breaks after one hit\n" + + "You have a layer of ice around you that absorbs 20% damage but breaks after one hit\n" + "After 30 seconds the ice shield will regenerate\n" + "Your alluring figure allows you to buy items at a reduced price from town npcs (only works in hardmode)\n" + "Wow, you can swim now!\n" + @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Armor item.width = 18; item.height = 18; item.accessory = true; - item.value = 1000000; + item.value = Item.buyPrice(0, 45, 0, 0); item.rare = 7; } diff --git a/Items/Armor/StatigelArmor.cs b/Items/Armor/StatigelArmor.cs index dcedd28cde..7d492dd1da 100644 --- a/Items/Armor/StatigelArmor.cs +++ b/Items/Armor/StatigelArmor.cs @@ -6,6 +6,7 @@ using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items.Armor; +using CalamityMod.Items.CalamityCustomThrowingDamage; namespace CalamityMod.Items.Armor { @@ -32,7 +33,7 @@ namespace CalamityMod.Items.Armor player.meleeCrit += 5; player.magicCrit += 5; player.rangedCrit += 5; - player.thrownCrit += 5; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 5; } public override void AddRecipes() diff --git a/Items/Armor/StatigelGreaves.cs b/Items/Armor/StatigelGreaves.cs index ed5a96fdfd..80cd988ef5 100644 --- a/Items/Armor/StatigelGreaves.cs +++ b/Items/Armor/StatigelGreaves.cs @@ -6,6 +6,7 @@ using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items.Armor; +using CalamityMod.Items.CalamityCustomThrowingDamage; namespace CalamityMod.Items.Armor { @@ -32,7 +33,7 @@ namespace CalamityMod.Items.Armor player.meleeDamage += 0.05f; player.magicDamage += 0.05f; player.rangedDamage += 0.05f; - player.thrownDamage += 0.05f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.05f; player.minionDamage += 0.05f; player.moveSpeed += 0.05f; } diff --git a/Items/Armor/StatigelHood.cs b/Items/Armor/StatigelHood.cs index 2444e992aa..bba7526606 100644 --- a/Items/Armor/StatigelHood.cs +++ b/Items/Armor/StatigelHood.cs @@ -15,8 +15,7 @@ namespace CalamityMod.Items.Armor public override void SetStaticDefaults() { DisplayName.SetDefault("Statigel Hood"); - Tooltip.SetDefault("10% increased summon damage and increased minion knockback\n" + - "+1 max minion"); + Tooltip.SetDefault("Increased minion knockback and +1 max minion"); } public override void SetDefaults() @@ -35,7 +34,8 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - player.setBonus = "Summons a mini slime god to fight for you, the type depends on what world evil you have\n" + + 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"; CalamityPlayer modPlayer = player.GetModPlayer(mod); @@ -43,6 +43,7 @@ namespace CalamityMod.Items.Armor modPlayer.slimeGod = true; player.doubleJumpSail = true; player.jumpBoost = true; + player.minionDamage += 0.18f; if (player.whoAmI == Main.myPlayer) { if (player.FindBuffIndex(mod.BuffType("SlimeGod")) == -1) @@ -63,7 +64,6 @@ namespace CalamityMod.Items.Armor public override void UpdateEquip(Player player) { player.minionKB += 1.5f; - player.minionDamage += 0.1f; player.maxMinions++; } diff --git a/Items/Armor/StatigelMask.cs b/Items/Armor/StatigelMask.cs index cf1a024d6a..229cfa12c9 100644 --- a/Items/Armor/StatigelMask.cs +++ b/Items/Armor/StatigelMask.cs @@ -6,6 +6,7 @@ using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items.Armor; +using CalamityMod.Items.CalamityCustomThrowingDamage; namespace CalamityMod.Items.Armor { @@ -15,8 +16,8 @@ namespace CalamityMod.Items.Armor public override void SetStaticDefaults() { DisplayName.SetDefault("Statigel Mask"); - Tooltip.SetDefault("10% increased throwing damage and 33% chance to not consume thrown items\n" + - "7% increased throwing critical strike chance"); + Tooltip.SetDefault("10% increased rogue damage and 33% chance to not consume rogue items\n" + + "7% increased rogue critical strike chance"); } public override void SetDefaults() @@ -45,9 +46,9 @@ namespace CalamityMod.Items.Armor public override void UpdateEquip(Player player) { - player.thrownCost33 = true; - player.thrownDamage += 0.1f; - player.thrownCrit += 7; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingAmmoCost66 = true; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.1f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 7; } public override void AddRecipes() diff --git a/Items/Armor/TarragonBreastplate.cs b/Items/Armor/TarragonBreastplate.cs index b307e947dc..d480e06a9f 100644 --- a/Items/Armor/TarragonBreastplate.cs +++ b/Items/Armor/TarragonBreastplate.cs @@ -6,6 +6,7 @@ using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items.Armor; +using CalamityMod.Items.CalamityCustomThrowingDamage; namespace CalamityMod.Items.Armor { @@ -16,7 +17,7 @@ namespace CalamityMod.Items.Armor { DisplayName.SetDefault("Tarragon Breastplate"); Tooltip.SetDefault("10% increased damage and 5% increased critical strike chance\n" + - "+3 life regen\n" + + "+2 life regen\n" + "+40 max life and mana\n" + "Breastplate of the exiler"); } @@ -25,7 +26,7 @@ namespace CalamityMod.Items.Armor { item.width = 18; item.height = 18; - item.lifeRegen = 3; + item.lifeRegen = 2; item.value = 1500000; item.defense = 37; } @@ -51,8 +52,8 @@ namespace CalamityMod.Items.Armor player.magicCrit += 5; player.rangedDamage += 0.1f; player.rangedCrit += 5; - player.thrownDamage += 0.1f; - player.thrownCrit += 5; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.1f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 5; player.minionDamage += 0.1f; } diff --git a/Items/Armor/TarragonHelmet.cs b/Items/Armor/TarragonHelmet.cs index 78ec5508c7..5d6767cf1c 100644 --- a/Items/Armor/TarragonHelmet.cs +++ b/Items/Armor/TarragonHelmet.cs @@ -6,6 +6,7 @@ using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items.Armor; +using CalamityMod.Items.CalamityCustomThrowingDamage; namespace CalamityMod.Items.Armor { @@ -17,7 +18,7 @@ namespace CalamityMod.Items.Armor DisplayName.SetDefault("Tarragon Helmet"); Tooltip.SetDefault("Immune to lava, cursed inferno, fire, cursed, and chilled debuffs\n" + "Can move freely through liquids\n" + - "10% increased throwing damage and critical strike chance\n" + + "10% increased rogue damage and critical strike chance\n" + "5% increased damage reduction"); } @@ -59,15 +60,15 @@ namespace CalamityMod.Items.Armor player.setBonus = "Reduces enemy spawn rates\n" + "Increased heart pickup range\n" + "Enemies have a chance to drop extra hearts on death\n" + - "After every 25 throwing critical hits you will gain 5 seconds of damage immunity\n" + + "After every 25 rogue critical hits you will gain 5 seconds of damage immunity\n" + "This effect can only occur once every 30 seconds\n" + - "While under the effects of a debuff you gain 10% increased throwing damage"; + "While under the effects of a debuff you gain 10% increased rogue damage"; } public override void UpdateEquip(Player player) { - player.thrownDamage += 0.1f; - player.thrownCrit += 10; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.1f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 10; player.endurance += 0.05f; player.lavaImmune = true; player.ignoreWater = true; diff --git a/Items/Armor/TarragonHornedHelm.cs b/Items/Armor/TarragonHornedHelm.cs index 26c3af3252..8dec5cc86b 100644 --- a/Items/Armor/TarragonHornedHelm.cs +++ b/Items/Armor/TarragonHornedHelm.cs @@ -17,7 +17,6 @@ namespace CalamityMod.Items.Armor DisplayName.SetDefault("Tarragon Horned Helm"); Tooltip.SetDefault("Immune to lava, cursed inferno, fire, cursed, and chilled debuffs\n" + "Can move freely through liquids\n" + - "10% increased summon damage\n" + "5% increased damage reduction and +3 max minions"); } @@ -56,16 +55,17 @@ namespace CalamityMod.Items.Armor CalamityPlayer modPlayer = player.GetModPlayer(mod); modPlayer.tarraSet = true; modPlayer.tarraSummon = true; - player.setBonus = "Reduces enemy spawn rates\n" + + player.setBonus = "50% increased minion damage\n" + + "Reduces enemy spawn rates\n" + "Increased heart pickup range\n" + "Enemies have a chance to drop extra hearts on death\n" + - "At full health you gain +2 max minions and 10% increased summon damage\n" + + "At full health you gain +2 max minions and 10% increased minion damage\n" + "Summons a life aura around you that damages nearby enemies"; + player.minionDamage += 0.5f; } public override void UpdateEquip(Player player) { - player.minionDamage += 0.1f; player.maxMinions += 3; player.endurance += 0.05f; player.lavaImmune = true; diff --git a/Items/Armor/TarragonLeggings.cs b/Items/Armor/TarragonLeggings.cs index c09f9d707c..f6e549dab7 100644 --- a/Items/Armor/TarragonLeggings.cs +++ b/Items/Armor/TarragonLeggings.cs @@ -6,6 +6,7 @@ using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items.Armor; +using CalamityMod.Items.CalamityCustomThrowingDamage; namespace CalamityMod.Items.Armor { @@ -16,7 +17,7 @@ namespace CalamityMod.Items.Armor { DisplayName.SetDefault("Tarragon Leggings"); Tooltip.SetDefault("20% increased movement speed; greater speed boost if health is lower\n" + - "10% increased damage and critical strike chance\n" + + "6% increased damage and critical strike chance\n" + "Leggings of a fabled explorer"); } @@ -46,15 +47,15 @@ namespace CalamityMod.Items.Armor { player.moveSpeed += 0.15f; } - player.meleeDamage += 0.1f; - player.meleeCrit += 10; - player.magicDamage += 0.1f; - player.magicCrit += 10; - player.rangedDamage += 0.1f; - player.rangedCrit += 10; - player.thrownDamage += 0.1f; - player.thrownCrit += 10; - player.minionDamage += 0.1f; + player.meleeDamage += 0.06f; + player.meleeCrit += 6; + player.magicDamage += 0.06f; + player.magicCrit += 6; + player.rangedDamage += 0.06f; + player.rangedCrit += 6; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.06f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 6; + player.minionDamage += 0.06f; } public override void AddRecipes() diff --git a/Items/Armor/VictideBreastplate.cs b/Items/Armor/VictideBreastplate.cs index b24927136b..1b8576e36f 100644 --- a/Items/Armor/VictideBreastplate.cs +++ b/Items/Armor/VictideBreastplate.cs @@ -6,6 +6,7 @@ using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items; +using CalamityMod.Items.CalamityCustomThrowingDamage; namespace CalamityMod.Items.Armor { @@ -33,7 +34,7 @@ namespace CalamityMod.Items.Armor player.endurance += 0.05f; player.meleeCrit += 5; player.rangedCrit += 5; - player.thrownCrit += 5; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 5; player.magicCrit += 5; if (Collision.DrownCollision(player.position, player.width, player.height, player.gravDir)) { diff --git a/Items/Armor/VictideHeadgear.cs b/Items/Armor/VictideHeadgear.cs index fbea5c880d..8d55c50e60 100644 --- a/Items/Armor/VictideHeadgear.cs +++ b/Items/Armor/VictideHeadgear.cs @@ -6,6 +6,7 @@ using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items.Armor; +using CalamityMod.Items.CalamityCustomThrowingDamage; namespace CalamityMod.Items.Armor { @@ -15,7 +16,7 @@ namespace CalamityMod.Items.Armor public override void SetStaticDefaults() { DisplayName.SetDefault("Victide Headgear"); - Tooltip.SetDefault("5% increased throwing damage"); + Tooltip.SetDefault("5% increased rogue damage"); } public override void SetDefaults() @@ -34,7 +35,7 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - player.setBonus = "Increased life regen and throwing damage while submerged in liquid\n" + + player.setBonus = "Increased life regen and rogue 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" + "Slightly reduces breath loss in the abyss"; @@ -43,14 +44,14 @@ namespace CalamityMod.Items.Armor player.ignoreWater = true; if (Collision.DrownCollision(player.position, player.width, player.height, player.gravDir)) { - player.thrownDamage += 0.1f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.1f; player.lifeRegen += 3; } } public override void UpdateEquip(Player player) { - player.thrownDamage += 0.05f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.05f; } public override void AddRecipes() diff --git a/Items/Armor/VictideHelmet.cs b/Items/Armor/VictideHelmet.cs index 372ed5f388..2c670f0df4 100644 --- a/Items/Armor/VictideHelmet.cs +++ b/Items/Armor/VictideHelmet.cs @@ -15,7 +15,8 @@ namespace CalamityMod.Items.Armor public override void SetStaticDefaults() { DisplayName.SetDefault("Victide Helmet"); - Tooltip.SetDefault("5% increased summon damage"); + Tooltip.SetDefault("9% increased minion damage\n" + + "+1 max minion"); } public override void SetDefaults() @@ -34,7 +35,7 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - player.setBonus = "Increased life regen and summon damage while submerged in liquid\n" + + player.setBonus = "Increased life regen and minion damage while submerged in liquid\n" + "Summons a sea urchin to protect you\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" + @@ -63,7 +64,8 @@ namespace CalamityMod.Items.Armor public override void UpdateEquip(Player player) { - player.minionDamage += 0.05f; + player.minionDamage += 0.09f; + player.maxMinions++; } public override void AddRecipes() diff --git a/Items/Armor/WulfrumArmor.cs b/Items/Armor/WulfrumArmor.cs index 4ef0d23643..3b262999bf 100644 --- a/Items/Armor/WulfrumArmor.cs +++ b/Items/Armor/WulfrumArmor.cs @@ -6,6 +6,7 @@ using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items; +using CalamityMod.Items.CalamityCustomThrowingDamage; namespace CalamityMod.Items.Armor { @@ -32,7 +33,7 @@ namespace CalamityMod.Items.Armor player.meleeCrit += 3; player.magicCrit += 3; player.rangedCrit += 3; - player.thrownCrit += 3; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 3; } public override void AddRecipes() diff --git a/Items/Armor/WulfrumHelmet.cs b/Items/Armor/WulfrumHelmet.cs index 3616186440..a00f1e303d 100644 --- a/Items/Armor/WulfrumHelmet.cs +++ b/Items/Armor/WulfrumHelmet.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.Armor public override void SetStaticDefaults() { DisplayName.SetDefault("Wulfrum Helmet"); - Tooltip.SetDefault("3% increased summon damage\n" + + Tooltip.SetDefault("6% increased minion damage\n" + "+1 max minion"); } @@ -45,7 +45,7 @@ namespace CalamityMod.Items.Armor public override void UpdateEquip(Player player) { - player.minionDamage += 0.03f; + player.minionDamage += 0.06f; player.maxMinions++; } diff --git a/Items/Armor/WulfrumMask.cs b/Items/Armor/WulfrumMask.cs index e602df790a..cd09751a52 100644 --- a/Items/Armor/WulfrumMask.cs +++ b/Items/Armor/WulfrumMask.cs @@ -6,6 +6,7 @@ using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items.Armor; +using CalamityMod.Items.CalamityCustomThrowingDamage; namespace CalamityMod.Items.Armor { @@ -15,7 +16,7 @@ namespace CalamityMod.Items.Armor public override void SetStaticDefaults() { DisplayName.SetDefault("Wulfrum Mask"); - Tooltip.SetDefault("3% increased throwing damage"); + Tooltip.SetDefault("3% increased rogue damage"); } public override void SetDefaults() @@ -45,7 +46,7 @@ namespace CalamityMod.Items.Armor public override void UpdateEquip(Player player) { - player.thrownDamage += 0.03f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.03f; } public override void AddRecipes() diff --git a/Items/Armor/XerocCuisses.cs b/Items/Armor/XerocCuisses.cs index 58fc367f0e..3cd579498d 100644 --- a/Items/Armor/XerocCuisses.cs +++ b/Items/Armor/XerocCuisses.cs @@ -6,6 +6,7 @@ using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items; +using CalamityMod.Items.CalamityCustomThrowingDamage; namespace CalamityMod.Items.Armor { @@ -15,7 +16,7 @@ namespace CalamityMod.Items.Armor public override void SetStaticDefaults() { DisplayName.SetDefault("Xeroc Cuisses"); - Tooltip.SetDefault("5% increased critical strike chance\n" + + Tooltip.SetDefault("5% increased rogue damage and critical strike chance\n" + "20% increased movement speed\n" + "Speed of the cosmos"); } @@ -31,10 +32,8 @@ namespace CalamityMod.Items.Armor public override void UpdateEquip(Player player) { - player.meleeCrit += 5; - player.rangedCrit += 5; - player.thrownCrit += 5; - player.magicCrit += 5; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 5; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.05f; player.moveSpeed += 0.2f; } diff --git a/Items/Armor/XerocMask.cs b/Items/Armor/XerocMask.cs index 62e8880267..588cf60985 100644 --- a/Items/Armor/XerocMask.cs +++ b/Items/Armor/XerocMask.cs @@ -6,6 +6,7 @@ using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items; +using CalamityMod.Items.CalamityCustomThrowingDamage; namespace CalamityMod.Items.Armor { @@ -15,7 +16,7 @@ namespace CalamityMod.Items.Armor public override void SetStaticDefaults() { DisplayName.SetDefault("Xeroc Mask"); - Tooltip.SetDefault("12% increased damage and critical strike chance and +3 max minions\n" + + Tooltip.SetDefault("11% increased rogue damage and critical strike chance\n" + "Immune to lava, cursed, fire, cursed inferno, and chilled\n" + "Wrath of the cosmos"); } @@ -44,7 +45,7 @@ namespace CalamityMod.Items.Armor { CalamityPlayer modPlayer = player.GetModPlayer(mod); modPlayer.xerocSet = true; - player.setBonus = "7% increased damage and critical strike chance\n" + + player.setBonus = "9% increased rogue damage and velocity\n" + "All projectile types have special effects on enemy hits\n" + "Imbued with cosmic wrath and rage when you are damaged"; if (player.statLife <= (int)((double)player.statLifeMax2 * 0.5)) @@ -52,29 +53,14 @@ namespace CalamityMod.Items.Armor player.AddBuff(BuffID.Wrath, 2); player.AddBuff(BuffID.Rage, 2); } - player.meleeDamage += 0.07f; - player.meleeCrit += 7; - player.rangedDamage += 0.07f; - player.rangedCrit += 7; - player.magicDamage += 0.07f; - player.magicCrit += 7; - player.thrownDamage += 0.07f; - player.thrownCrit += 7; - player.minionDamage += 0.07f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.09f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingVelocity += 0.09f; } public override void UpdateEquip(Player player) { - player.maxMinions += 3; - player.meleeDamage += 0.12f; - player.meleeCrit += 12; - player.rangedDamage += 0.12f; - player.rangedCrit += 12; - player.magicDamage += 0.12f; - player.magicCrit += 12; - player.thrownDamage += 0.12f; - player.thrownCrit += 12; - player.minionDamage += 0.12f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.11f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 11; player.lavaImmune = true; player.buffImmune[BuffID.OnFire] = true; player.buffImmune[BuffID.CursedInferno] = true; diff --git a/Items/Armor/XerocPlateMail.cs b/Items/Armor/XerocPlateMail.cs index d328763f2c..97a61cfa52 100644 --- a/Items/Armor/XerocPlateMail.cs +++ b/Items/Armor/XerocPlateMail.cs @@ -6,6 +6,7 @@ using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items.Armor; +using CalamityMod.Items.CalamityCustomThrowingDamage; namespace CalamityMod.Items.Armor { @@ -17,7 +18,7 @@ namespace CalamityMod.Items.Armor DisplayName.SetDefault("Xeroc Plate Mail"); Tooltip.SetDefault("+20 max life and mana\n" + "6% increased movement speed\n" + - "6% increased damage and critical strike chance\n" + + "7% increased rogue damage and critical strike chance\n" + "Armor of the cosmos"); } @@ -35,15 +36,8 @@ namespace CalamityMod.Items.Armor player.statLifeMax2 += 20; player.statManaMax2 += 20; player.moveSpeed += 0.06f; - player.meleeCrit += 6; - player.meleeDamage += 0.06f; - player.magicCrit += 6; - player.magicDamage += 0.06f; - player.rangedCrit += 6; - player.rangedDamage += 0.06f; - player.thrownCrit += 6; - player.thrownDamage += 0.06f; - player.minionDamage += 0.06f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 7; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.07f; } public override void AddRecipes() diff --git a/Items/Astrageldon/AstralJelly.cs b/Items/Astrageldon/AstralJelly.cs index b974589682..4e2ec08473 100644 --- a/Items/Astrageldon/AstralJelly.cs +++ b/Items/Astrageldon/AstralJelly.cs @@ -13,7 +13,8 @@ namespace CalamityMod.Items.Astrageldon public override void SetStaticDefaults() { DisplayName.SetDefault("Aureus Cell"); - Tooltip.SetDefault("Gives mana regeneration and magic power for 6 minutes"); + Tooltip.SetDefault("Gives mana regeneration and magic power for 6 minutes\n" + + "Restores 200 mana"); } public override void SetDefaults() @@ -22,7 +23,6 @@ namespace CalamityMod.Items.Astrageldon item.height = 18; item.useTurn = true; item.maxStack = 30; - item.healMana = 200; item.useAnimation = 17; item.useTime = 17; item.rare = 7; @@ -30,15 +30,25 @@ namespace CalamityMod.Items.Astrageldon item.UseSound = SoundID.Item3; item.consumable = true; item.value = 50000; - item.buffType = 26; + item.buffType = BuffID.WellFed; item.buffTime = 108000; } - public override bool UseItem(Player player) + public override void OnConsumeItem(Player player) { + player.statMana += 200; + if (player.statMana > player.statManaMax2) + { + player.statMana = player.statManaMax2; + } + player.AddBuff(BuffID.ManaSickness, Player.manaSickTime, true); + if (Main.myPlayer == player.whoAmI) + { + player.ManaEffect(200); + } player.AddBuff(BuffID.ManaRegeneration, 21600); player.AddBuff(BuffID.MagicPower, 21600); - return true; + player.AddBuff(BuffID.WellFed, 108000); } - } + } } \ No newline at end of file diff --git a/Items/BearEye.cs b/Items/BearEye.cs new file mode 100644 index 0000000000..13a8fb7d43 --- /dev/null +++ b/Items/BearEye.cs @@ -0,0 +1,40 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items +{ + public class BearEye : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Bear's Eye"); + Tooltip.SetDefault("Summons a pet guardian angel"); + } + public override void SetDefaults() + { + item.damage = 0; + item.useStyle = 1; + item.useAnimation = 20; + item.useTime = 20; + item.noMelee = true; + item.width = 30; + item.height = 30; + item.value = Item.sellPrice(1, 0, 0, 0); + item.shoot = mod.ProjectileType("Bear"); + item.buffType = mod.BuffType("BearBuff"); + item.rare = 5; + item.UseSound = new Terraria.Audio.LegacySoundStyle(SoundID.Meowmere, 5); + } + + public override void UseStyle(Player player) + { + if (player.whoAmI == Main.myPlayer && player.itemTime == 0) + { + player.AddBuff(item.buffType, 15, true); + } + } + } +} diff --git a/Items/BearEye.png b/Items/BearEye.png new file mode 100644 index 0000000000..d6f81dde67 Binary files /dev/null and b/Items/BearEye.png differ diff --git a/Items/BossRush.cs b/Items/BossRush.cs index 7e2388c01f..5964142550 100644 --- a/Items/BossRush.cs +++ b/Items/BossRush.cs @@ -43,7 +43,7 @@ namespace CalamityMod.Items } if (!CalamityWorld.bossRushActive) { - CalamityPlayer.bossRushStage = 0; + CalamityWorld.bossRushStage = 0; CalamityWorld.bossRushActive = true; string key = "Mods.CalamityMod.BossRushStartText"; Color messageColor = Color.LightCoral; @@ -58,7 +58,7 @@ namespace CalamityMod.Items } else { - CalamityPlayer.bossRushStage = 0; + CalamityWorld.bossRushStage = 0; CalamityWorld.bossRushActive = false; } if (Main.netMode == 2) @@ -66,7 +66,7 @@ namespace CalamityMod.Items NetMessage.SendData(7, -1, -1, null, 0, 0f, 0f, 0f, 0, 0, 0); var netMessage = mod.GetPacket(); netMessage.Write((byte)CalamityModMessageType.BossRushStage); - netMessage.Write(CalamityPlayer.bossRushStage); + netMessage.Write(CalamityWorld.bossRushStage); netMessage.Send(); } return true; diff --git a/Items/BrimstoneWaifu/Abaddon.cs b/Items/BrimstoneWaifu/Abaddon.cs index 3365551575..f34f02e832 100644 --- a/Items/BrimstoneWaifu/Abaddon.cs +++ b/Items/BrimstoneWaifu/Abaddon.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.BrimstoneWaifu { item.width = 26; item.height = 26; - item.value = 100000; + item.value = Item.buyPrice(0, 15, 0, 0); item.rare = 5; item.accessory = true; } diff --git a/Items/BrimstoneWaifu/Gehenna.cs b/Items/BrimstoneWaifu/Gehenna.cs index 45483f407e..a422de45f7 100644 --- a/Items/BrimstoneWaifu/Gehenna.cs +++ b/Items/BrimstoneWaifu/Gehenna.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.BrimstoneWaifu { item.width = 26; item.height = 26; - item.value = 100000; + item.value = Item.buyPrice(0, 15, 0, 0); item.expert = true; item.accessory = true; } @@ -34,7 +34,7 @@ namespace CalamityMod.Items.BrimstoneWaifu { if (FireCountdown == 0) { - FireCountdown = 300; + FireCountdown = 600; } if (FireCountdown > 0) { diff --git a/Items/BrimstoneWaifu/RoseStone.cs b/Items/BrimstoneWaifu/RoseStone.cs index a414cd7fe5..fed4ba183e 100644 --- a/Items/BrimstoneWaifu/RoseStone.cs +++ b/Items/BrimstoneWaifu/RoseStone.cs @@ -6,6 +6,7 @@ using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items; +using CalamityMod.Items.CalamityCustomThrowingDamage; namespace CalamityMod.Items.BrimstoneWaifu { @@ -15,7 +16,7 @@ namespace CalamityMod.Items.BrimstoneWaifu { DisplayName.SetDefault("Rose Stone"); Tooltip.SetDefault("One of the ancient relics\n" + - "Increases max life by 20, life regen by 2, and all damage and crit chance by 2%\n" + + "Increases max life by 20, life regen by 1, and all damage by 3%\n" + "Summons a brimstone elemental to protect you"); } @@ -23,7 +24,7 @@ namespace CalamityMod.Items.BrimstoneWaifu { item.width = 20; item.height = 20; - item.value = 500000; + item.value = Item.buyPrice(0, 15, 0, 0); item.rare = 5; item.accessory = true; } @@ -41,17 +42,13 @@ namespace CalamityMod.Items.BrimstoneWaifu public override void UpdateAccessory(Player player, bool hideVisual) { Lighting.AddLight((int)player.Center.X / 16, (int)player.Center.Y / 16, 0.6f, 0f, 0.25f); - player.lifeRegen += 2; + player.lifeRegen += 1; player.statLifeMax2 += 20; - player.meleeCrit += 2; - player.meleeDamage += 0.02f; - player.magicCrit += 2; - player.magicDamage += 0.02f; - player.rangedCrit += 2; - player.rangedDamage += 0.02f; - player.thrownCrit += 2; - player.thrownDamage += 0.02f; - player.minionDamage += 0.02f; + player.meleeDamage += 0.03f; + player.magicDamage += 0.03f; + player.rangedDamage += 0.03f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.03f; + player.minionDamage += 0.03f; CalamityPlayer modPlayer = player.GetModPlayer(mod); modPlayer.brimstoneWaifu = true; if (player.whoAmI == Main.myPlayer) diff --git a/Items/Calamitas/CalamityRing.cs b/Items/Calamitas/CalamityRing.cs index 127b42eec8..fe005d5b75 100644 --- a/Items/Calamitas/CalamityRing.cs +++ b/Items/Calamitas/CalamityRing.cs @@ -6,6 +6,7 @@ using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items; +using CalamityMod.Items.CalamityCustomThrowingDamage; namespace CalamityMod.Items.Calamitas { @@ -21,7 +22,7 @@ namespace CalamityMod.Items.Calamitas { item.width = 20; item.height = 22; - item.value = 500000; + item.value = Item.buyPrice(0, 24, 0, 0); item.rare = 7; item.accessory = true; item.expert = true; @@ -41,17 +42,17 @@ namespace CalamityMod.Items.Calamitas { CalamityPlayer modPlayer = player.GetModPlayer(mod); modPlayer.calamityRing = true; - player.meleeDamage *= 1.15f; - player.thrownDamage *= 1.15f; - player.rangedDamage *= 1.15f; - player.magicDamage *= 1.15f; - player.minionDamage *= 1.15f; + player.meleeDamage += 0.15f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.15f; + player.rangedDamage += 0.15f; + player.magicDamage += 0.15f; + player.minionDamage += 0.15f; player.endurance -= 0.3f; if (player.whoAmI == Main.myPlayer) { if (player.immune) { - if (Main.rand.Next(8) == 0) + if (Main.rand.Next(10) == 0) { for (int l = 0; l < 1; l++) { diff --git a/Items/Calamitas/ChaosStone.cs b/Items/Calamitas/ChaosStone.cs index 9add4125e8..a2c020252c 100644 --- a/Items/Calamitas/ChaosStone.cs +++ b/Items/Calamitas/ChaosStone.cs @@ -6,6 +6,7 @@ using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items; +using CalamityMod.Items.CalamityCustomThrowingDamage; namespace CalamityMod.Items.Calamitas { @@ -15,7 +16,7 @@ namespace CalamityMod.Items.Calamitas { DisplayName.SetDefault("Chaos Stone"); Tooltip.SetDefault("One of the ancient relics\n" + - "Increases max mana by 50, all damage and crit chance by 2%, and reduces mana usage by 5%"); + "Increases max mana by 50, all damage by 3%, and reduces mana usage by 5%"); Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(6, 4)); } @@ -23,7 +24,7 @@ namespace CalamityMod.Items.Calamitas { item.width = 20; item.height = 20; - item.value = 500000; + item.value = Item.buyPrice(0, 15, 0, 0); item.rare = 5; item.accessory = true; } @@ -33,15 +34,11 @@ namespace CalamityMod.Items.Calamitas Lighting.AddLight((int)player.Center.X / 16, (int)player.Center.Y / 16, 0.85f, 0f, 0f); player.statManaMax2 += 50; player.manaCost *= 0.95f; - player.meleeCrit += 2; - player.meleeDamage += 0.02f; - player.magicCrit += 2; - player.magicDamage += 0.02f; - player.rangedCrit += 2; - player.rangedDamage += 0.02f; - player.thrownCrit += 2; - player.thrownDamage += 0.02f; - player.minionDamage += 0.02f; + player.meleeDamage += 0.03f; + player.magicDamage += 0.03f; + player.rangedDamage += 0.03f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.03f; + player.minionDamage += 0.03f; } } } diff --git a/Items/CalamitasBrew.cs b/Items/CalamitasBrew.cs index 847394152a..44fd3c74ce 100644 --- a/Items/CalamitasBrew.cs +++ b/Items/CalamitasBrew.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Items public override void SetStaticDefaults() { DisplayName.SetDefault("Calamitas' Brew"); - Tooltip.SetDefault("Adds abyssal flames to your melee weapons\n" + + Tooltip.SetDefault("Adds abyssal flames to your melee projectiles and melee attacks\n" + "Increases your movement speed by 15%"); } diff --git a/Items/CalamityCustomThrowingDamage/AccretionDisk.cs b/Items/CalamityCustomThrowingDamage/AccretionDisk.cs new file mode 100644 index 0000000000..03ea12f739 --- /dev/null +++ b/Items/CalamityCustomThrowingDamage/AccretionDisk.cs @@ -0,0 +1,52 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Items; + +namespace CalamityMod.Items.CalamityCustomThrowingDamage +{ + public class AccretionDisk : CalamityDamageItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Elemental Disk"); + Tooltip.SetDefault("Shred the fabric of reality!"); + } + + public override void SafeSetDefaults() + { + item.width = 38; + item.damage = 157; + item.noMelee = true; + item.noUseGraphic = true; + item.autoReuse = true; + item.useAnimation = 15; + item.useStyle = 1; + item.useTime = 15; + item.knockBack = 9f; + item.UseSound = SoundID.Item1; + item.height = 38; + item.value = 10000000; + item.shoot = mod.ProjectileType("AccretionDisk"); + item.shootSpeed = 13f; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(null, "MangroveChakram"); + recipe.AddIngredient(null, "FlameScythe"); + recipe.AddIngredient(null, "SeashellBoomerang"); + recipe.AddIngredient(null, "GalacticaSingularity", 5); + recipe.AddIngredient(null, "BarofLife", 5); + recipe.AddIngredient(ItemID.LunarBar, 5); + recipe.AddTile(TileID.LunarCraftingStation); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } +} diff --git a/Items/CalamityCustomThrowingDamage/AccretionDisk.png b/Items/CalamityCustomThrowingDamage/AccretionDisk.png new file mode 100644 index 0000000000..e131c1a252 Binary files /dev/null and b/Items/CalamityCustomThrowingDamage/AccretionDisk.png differ diff --git a/Items/CalamityCustomThrowingDamage/AdamantiteThrowingAxe.cs b/Items/CalamityCustomThrowingDamage/AdamantiteThrowingAxe.cs new file mode 100644 index 0000000000..1d437df246 --- /dev/null +++ b/Items/CalamityCustomThrowingDamage/AdamantiteThrowingAxe.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Items; + +namespace CalamityMod.Items.CalamityCustomThrowingDamage +{ + public class AdamantiteThrowingAxe : CalamityDamageItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Adamantite Throwing Axe"); + } + + public override void SafeSetDefaults() + { + item.width = 26; + item.damage = 37; + item.noMelee = true; + item.consumable = true; + item.noUseGraphic = true; + item.useAnimation = 12; + item.useStyle = 1; + item.useTime = 12; + item.knockBack = 3.25f; + item.UseSound = SoundID.Item1; + item.autoReuse = true; + item.height = 30; + item.maxStack = 999; + item.value = 1600; + item.rare = 4; + item.shoot = mod.ProjectileType("AdamantiteThrowingAxeProjectile"); + item.shootSpeed = 12f; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ItemID.AdamantiteBar); + recipe.AddTile(TileID.MythrilAnvil); + recipe.SetResult(this, 25); + recipe.AddRecipe(); + } + } +} diff --git a/Items/CalamityCustomThrowingDamage/AdamantiteThrowingAxe.png b/Items/CalamityCustomThrowingDamage/AdamantiteThrowingAxe.png new file mode 100644 index 0000000000..e11702e145 Binary files /dev/null and b/Items/CalamityCustomThrowingDamage/AdamantiteThrowingAxe.png differ diff --git a/Items/CalamityCustomThrowingDamage/BallisticPoisonBomb.cs b/Items/CalamityCustomThrowingDamage/BallisticPoisonBomb.cs new file mode 100644 index 0000000000..91459fc2dc --- /dev/null +++ b/Items/CalamityCustomThrowingDamage/BallisticPoisonBomb.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Items; + +namespace CalamityMod.Items.CalamityCustomThrowingDamage +{ + public class BallisticPoisonBomb : CalamityDamageItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Ballistic Poison Bomb"); + } + + public override void SafeSetDefaults() + { + item.width = 30; + item.damage = 55; + item.noMelee = true; + item.noUseGraphic = true; + item.useAnimation = 22; + item.useStyle = 1; + item.useTime = 22; + item.knockBack = 6.5f; + item.UseSound = SoundID.Item1; + item.autoReuse = true; + item.height = 38; + item.value = 500000; + item.rare = 7; + item.shoot = mod.ProjectileType("BallisticPoisonBomb"); + item.shootSpeed = 12f; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(null, "DepthCells", 10); + recipe.AddIngredient(null, "SulphurousSand", 20); + recipe.AddIngredient(null, "Tenebris", 10); + recipe.AddTile(TileID.MythrilAnvil); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } +} diff --git a/Items/CalamityCustomThrowingDamage/BallisticPoisonBomb.png b/Items/CalamityCustomThrowingDamage/BallisticPoisonBomb.png new file mode 100644 index 0000000000..6f037bb9f6 Binary files /dev/null and b/Items/CalamityCustomThrowingDamage/BallisticPoisonBomb.png differ diff --git a/Items/CalamityCustomThrowingDamage/BrackishFlask.cs b/Items/CalamityCustomThrowingDamage/BrackishFlask.cs new file mode 100644 index 0000000000..ae13ee6f2a --- /dev/null +++ b/Items/CalamityCustomThrowingDamage/BrackishFlask.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Items; + +namespace CalamityMod.Items.CalamityCustomThrowingDamage +{ + public class BrackishFlask : CalamityDamageItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Brackish Flask"); + Tooltip.SetDefault("Full of poisonous saltwater"); + } + + public override void SafeSetDefaults() + { + item.width = 28; + item.damage = 40; + item.noMelee = true; + item.noUseGraphic = true; + item.useAnimation = 35; + item.useStyle = 1; + item.useTime = 35; + item.knockBack = 6.5f; + item.UseSound = SoundID.Item106; + item.autoReuse = true; + item.height = 30; + item.value = 600000; + item.rare = 7; + item.shoot = mod.ProjectileType("BrackishFlask"); + item.shootSpeed = 12f; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(null, "IOU"); + recipe.AddIngredient(null, "LivingShard"); + recipe.AddTile(TileID.MythrilAnvil); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } +} diff --git a/Items/CalamityCustomThrowingDamage/BrackishFlask.png b/Items/CalamityCustomThrowingDamage/BrackishFlask.png new file mode 100644 index 0000000000..c0101e465c Binary files /dev/null and b/Items/CalamityCustomThrowingDamage/BrackishFlask.png differ diff --git a/Items/CalamityCustomThrowingDamage/Brimblade.cs b/Items/CalamityCustomThrowingDamage/Brimblade.cs new file mode 100644 index 0000000000..e80b0f645c --- /dev/null +++ b/Items/CalamityCustomThrowingDamage/Brimblade.cs @@ -0,0 +1,47 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Items; + +namespace CalamityMod.Items.CalamityCustomThrowingDamage +{ + public class Brimblade : CalamityDamageItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Brimblade"); + } + + public override void SafeSetDefaults() + { + item.width = 26; + item.damage = 37; + item.noMelee = true; + item.noUseGraphic = true; + item.autoReuse = true; + item.useAnimation = 18; + item.useStyle = 1; + item.useTime = 18; + item.knockBack = 6.5f; + item.UseSound = SoundID.Item1; + item.height = 26; + item.value = 300000; + item.rare = 6; + item.shoot = mod.ProjectileType("Brimblade"); + item.shootSpeed = 12f; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(null, "UnholyCore", 4); + recipe.AddTile(TileID.MythrilAnvil); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } +} diff --git a/Items/CalamityCustomThrowingDamage/Brimblade.png b/Items/CalamityCustomThrowingDamage/Brimblade.png new file mode 100644 index 0000000000..d7de00d24b Binary files /dev/null and b/Items/CalamityCustomThrowingDamage/Brimblade.png differ diff --git a/Items/CalamityCustomThrowingDamage/CalamityCustomThrowingDamagePlayer.cs b/Items/CalamityCustomThrowingDamage/CalamityCustomThrowingDamagePlayer.cs new file mode 100644 index 0000000000..14ff6633fb --- /dev/null +++ b/Items/CalamityCustomThrowingDamage/CalamityCustomThrowingDamagePlayer.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Items.CalamityCustomThrowingDamage +{ + public class CalamityCustomThrowingDamagePlayer : ModPlayer + { + public static CalamityCustomThrowingDamagePlayer ModPlayer(Player player) + { + return player.GetModPlayer(); + } + + public float throwingDamage = 1f; + public float throwingVelocity = 1f; + public int throwingCrit = 4; + public bool throwingAmmoCost66 = false; + public bool throwingAmmoCost50 = false; + + public override void ResetEffects() + { + ResetVariables(); + } + + public override void UpdateDead() + { + ResetVariables(); + } + + private void ResetVariables() + { + throwingDamage = 1f; + throwingVelocity = 1f; + throwingCrit = 4; + throwingAmmoCost66 = false; + throwingAmmoCost50 = false; + } + } +} \ No newline at end of file diff --git a/Items/CalamityCustomThrowingDamage/CalamityDamageItem.cs b/Items/CalamityCustomThrowingDamage/CalamityDamageItem.cs new file mode 100644 index 0000000000..cfc91c6637 --- /dev/null +++ b/Items/CalamityCustomThrowingDamage/CalamityDamageItem.cs @@ -0,0 +1,94 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; +using CalamityMod.Items.CalamityCustomThrowingDamage; + +namespace CalamityMod.Items.CalamityCustomThrowingDamage +{ + public abstract class CalamityDamageItem : ModItem + { + public virtual void SafeSetDefaults() + { + } + + public sealed override void SetDefaults() + { + SafeSetDefaults(); + item.melee = false; + item.ranged = true; + item.magic = false; + item.thrown = false; + item.summon = false; + } + + public override void GetWeaponDamage(Player player, ref int damage) + { + //damage = (int)((float)damage / (player.rangedDamage + 5E-06f)); //change base damage back to normal after all ranged boosts + damage = (int)((double)item.damage * (double)(CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage + 5E-06f)); //plus one otherwise weird shit happens + } + + public override void GetWeaponCrit(Player player, ref int crit) + { + crit = (item.crit + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit); //change crit back to normal + } + + public override void GetWeaponKnockback(Player player, ref float knockback) + { + if (player.shroomiteStealth) + { + knockback /= 1f + (1f - player.stealth) * 0.5f; + } + if (player.setVortex) + { + knockback /= 1f + (1f - player.stealth) * 0.5f; + } + } + + public override void ModifyTooltips(List tooltips) + { + TooltipLine tt = tooltips.FirstOrDefault(x => x.Name == "Damage" && x.mod == "Terraria"); + if (tt != null) + { + string[] splitText = tt.text.Split(' '); + string damageValue = splitText.First(); + string damageWord = splitText.Last(); + tt.text = damageValue + " rogue " + damageWord; + } + TooltipLine tt2 = tooltips.FirstOrDefault(x => x.Name == "ItemName" && x.mod == "Terraria"); + if (tt2 != null) + { + if (CalamityMod.lightGreenThrowingRarityList.Contains(item.type)) + tt2.overrideColor = new Color(0, 255, 200); + else if (CalamityMod.greenThrowingRarityList.Contains(item.type)) + tt2.overrideColor = new Color(0, 255, 0); + else if (CalamityMod.blueThrowingRarityList.Contains(item.type)) + tt2.overrideColor = new Color(43, 96, 222); + else if (item.type == mod.ItemType("Celestus")) + tt2.overrideColor = new Color(108, 45, 199); + else if (CalamityMod.purpleThrowingRarityList.Contains(item.type)) + tt2.overrideColor = new Color(255, 0, 255); + else if (item.type == mod.ItemType("Malachite")) + tt2.overrideColor = new Color(Main.DiscoR, 203, 103); + } + } + + public override bool ConsumeItem(Player player) + { + if (CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingAmmoCost50) + { + if (Main.rand.Next(1, 101) > 50) + return false; + } + if (CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingAmmoCost66) + { + if (Main.rand.Next(1, 101) > 66) + return false; + } + return true; + } + } +} \ No newline at end of file diff --git a/Items/CalamityCustomThrowingDamage/Celestus.cs b/Items/CalamityCustomThrowingDamage/Celestus.cs new file mode 100644 index 0000000000..8e0c48ec50 --- /dev/null +++ b/Items/CalamityCustomThrowingDamage/Celestus.cs @@ -0,0 +1,57 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Items; + +namespace CalamityMod.Items.CalamityCustomThrowingDamage +{ + public class Celestus : CalamityDamageItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Celestus"); + } + + public override void SafeSetDefaults() + { + item.width = 20; + item.damage = 150; + item.noMelee = true; + item.noUseGraphic = true; + item.autoReuse = true; + item.useAnimation = 10; + item.useStyle = 1; + item.useTime = 10; + item.knockBack = 6f; + item.UseSound = SoundID.Item1; + item.height = 20; + item.value = 100000000; + item.shoot = mod.ProjectileType("Celestus"); + item.shootSpeed = 25f; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(null, "AccretionDisk"); + recipe.AddIngredient(null, "Crystalline"); + recipe.AddIngredient(null, "ExecutionersBlade"); + recipe.AddIngredient(null, "Pwnagehammer"); + recipe.AddIngredient(null, "SpearofPaleolith"); + recipe.AddIngredient(null, "NightmareFuel", 5); + recipe.AddIngredient(null, "EndothermicEnergy", 5); + recipe.AddIngredient(null, "CosmiliteBar", 5); + recipe.AddIngredient(null, "DarksunFragment", 5); + recipe.AddIngredient(null, "HellcasterFragment", 3); + recipe.AddIngredient(null, "Phantoplasm", 5); + recipe.AddIngredient(null, "AuricOre", 25); + recipe.AddTile(null, "DraedonsForge"); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } +} diff --git a/Items/CalamityCustomThrowingDamage/Celestus.png b/Items/CalamityCustomThrowingDamage/Celestus.png new file mode 100644 index 0000000000..418c089317 Binary files /dev/null and b/Items/CalamityCustomThrowingDamage/Celestus.png differ diff --git a/Items/CalamityCustomThrowingDamage/CobaltKunai.cs b/Items/CalamityCustomThrowingDamage/CobaltKunai.cs new file mode 100644 index 0000000000..5c25095e4f --- /dev/null +++ b/Items/CalamityCustomThrowingDamage/CobaltKunai.cs @@ -0,0 +1,50 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Items; + +namespace CalamityMod.Items.CalamityCustomThrowingDamage +{ + public class CobaltKunai : CalamityDamageItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Cobalt Kunai"); + } + + public override void SafeSetDefaults() + { + item.width = 18; + item.damage = 28; + item.noMelee = true; + item.consumable = true; + item.noUseGraphic = true; + item.useAnimation = 12; + item.scale = 0.75f; + item.useStyle = 1; + item.useTime = 12; + item.knockBack = 2.5f; + item.UseSound = SoundID.Item1; + item.autoReuse = true; + item.height = 40; + item.maxStack = 999; + item.value = 900; + item.rare = 4; + item.shoot = mod.ProjectileType("CobaltKunaiProjectile"); + item.shootSpeed = 12f; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ItemID.CobaltBar); + recipe.AddTile(TileID.Anvils); + recipe.SetResult(this, 30); + recipe.AddRecipe(); + } + } +} diff --git a/Items/CalamityCustomThrowingDamage/CobaltKunai.png b/Items/CalamityCustomThrowingDamage/CobaltKunai.png new file mode 100644 index 0000000000..60efb60324 Binary files /dev/null and b/Items/CalamityCustomThrowingDamage/CobaltKunai.png differ diff --git a/Items/CalamityCustomThrowingDamage/CosmicKunai.cs b/Items/CalamityCustomThrowingDamage/CosmicKunai.cs new file mode 100644 index 0000000000..50850f8b6e --- /dev/null +++ b/Items/CalamityCustomThrowingDamage/CosmicKunai.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Items; + +namespace CalamityMod.Items.CalamityCustomThrowingDamage +{ + public class CosmicKunai : CalamityDamageItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Cosmic Kunai"); + Tooltip.SetDefault("Fires a stream of short-range kunai"); + } + + public override void SafeSetDefaults() + { + item.width = 26; + item.damage = 200; + item.noMelee = true; + item.noUseGraphic = true; + item.useTime = 1; + item.useAnimation = 5; + item.useStyle = 1; + item.knockBack = 5f; + item.UseSound = SoundID.Item109; + item.autoReuse = true; + item.height = 48; + item.value = 1500000; + item.shoot = mod.ProjectileType("CosmicKunai"); + item.shootSpeed = 28f; + item.rare = 9; + } + } +} diff --git a/Items/CalamityCustomThrowingDamage/CosmicKunai.png b/Items/CalamityCustomThrowingDamage/CosmicKunai.png new file mode 100644 index 0000000000..645149a78c Binary files /dev/null and b/Items/CalamityCustomThrowingDamage/CosmicKunai.png differ diff --git a/Items/CalamityCustomThrowingDamage/CrushsawCrasher.cs b/Items/CalamityCustomThrowingDamage/CrushsawCrasher.cs new file mode 100644 index 0000000000..87d842121c --- /dev/null +++ b/Items/CalamityCustomThrowingDamage/CrushsawCrasher.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Items; + +namespace CalamityMod.Items.CalamityCustomThrowingDamage +{ + public class CrushsawCrasher : CalamityDamageItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Crushsaw Crasher"); + } + + public override void SafeSetDefaults() + { + item.width = 38; + item.damage = 65; + item.useAnimation = 18; + item.useStyle = 1; + item.useTime = 18; + item.knockBack = 7f; + item.UseSound = SoundID.Item1; + item.autoReuse = true; + item.height = 22; + item.value = 500000; + item.rare = 6; + item.shoot = mod.ProjectileType("Crushax"); + item.shootSpeed = 11f; + } + + public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit) + { + target.AddBuff(mod.BuffType("BrimstoneFlames"), 300); + } + } +} diff --git a/Items/CalamityCustomThrowingDamage/CrushsawCrasher.png b/Items/CalamityCustomThrowingDamage/CrushsawCrasher.png new file mode 100644 index 0000000000..160b21d10d Binary files /dev/null and b/Items/CalamityCustomThrowingDamage/CrushsawCrasher.png differ diff --git a/Items/CalamityCustomThrowingDamage/CrystalPiercer.cs b/Items/CalamityCustomThrowingDamage/CrystalPiercer.cs new file mode 100644 index 0000000000..2a7799f1e1 --- /dev/null +++ b/Items/CalamityCustomThrowingDamage/CrystalPiercer.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Items; + +namespace CalamityMod.Items.CalamityCustomThrowingDamage +{ + public class CrystalPiercer : CalamityDamageItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Crystal Piercer"); + } + + public override void SafeSetDefaults() + { + item.width = 62; + item.damage = 43; + item.noMelee = true; + item.consumable = true; + item.noUseGraphic = true; + item.useAnimation = 20; + item.useStyle = 1; + item.useTime = 20; + item.knockBack = 6f; + item.UseSound = SoundID.Item1; + item.autoReuse = true; + item.height = 62; + item.maxStack = 999; + item.value = 2500; + item.rare = 5; + item.shoot = mod.ProjectileType("CrystalPiercerProjectile"); + item.shootSpeed = 20f; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(null, "VerstaltiteBar"); + recipe.AddTile(TileID.MythrilAnvil); + recipe.SetResult(this, 20); + recipe.AddRecipe(); + } + } +} diff --git a/Items/CalamityCustomThrowingDamage/CrystalPiercer.png b/Items/CalamityCustomThrowingDamage/CrystalPiercer.png new file mode 100644 index 0000000000..aa9783fb6e Binary files /dev/null and b/Items/CalamityCustomThrowingDamage/CrystalPiercer.png differ diff --git a/Items/CalamityCustomThrowingDamage/Crystalline.cs b/Items/CalamityCustomThrowingDamage/Crystalline.cs new file mode 100644 index 0000000000..97c1bf665b --- /dev/null +++ b/Items/CalamityCustomThrowingDamage/Crystalline.cs @@ -0,0 +1,50 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Items; + +namespace CalamityMod.Items.CalamityCustomThrowingDamage +{ + public class Crystalline : CalamityDamageItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Crystalline"); + } + + public override void SafeSetDefaults() + { + item.width = 44; + item.damage = 18; + item.crit += 4; + item.noMelee = true; + item.noUseGraphic = true; + item.useAnimation = 18; + item.useStyle = 1; + item.useTime = 18; + item.knockBack = 3f; + item.UseSound = SoundID.Item1; + item.autoReuse = true; + item.height = 44; + item.value = 52000; + item.rare = 2; + item.shoot = mod.ProjectileType("Crystalline"); + item.shootSpeed = 10f; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ItemID.ThrowingKnife, 50); + recipe.AddIngredient(ItemID.Diamond, 3); + recipe.AddIngredient(ItemID.FallenStar, 3); + recipe.AddTile(TileID.Anvils); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } +} diff --git a/Items/CalamityCustomThrowingDamage/Crystalline.png b/Items/CalamityCustomThrowingDamage/Crystalline.png new file mode 100644 index 0000000000..f96d923ad7 Binary files /dev/null and b/Items/CalamityCustomThrowingDamage/Crystalline.png differ diff --git a/Items/CalamityCustomThrowingDamage/CursedDagger.cs b/Items/CalamityCustomThrowingDamage/CursedDagger.cs new file mode 100644 index 0000000000..5fa5b953ac --- /dev/null +++ b/Items/CalamityCustomThrowingDamage/CursedDagger.cs @@ -0,0 +1,38 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Items; + +namespace CalamityMod.Items.CalamityCustomThrowingDamage +{ + public class CursedDagger : CalamityDamageItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Cursed Dagger"); + } + + public override void SafeSetDefaults() + { + item.width = 34; + item.damage = 34; + item.noMelee = true; + item.noUseGraphic = true; + item.useAnimation = 16; + item.useStyle = 1; + item.useTime = 16; + item.knockBack = 4.5f; + item.UseSound = SoundID.Item1; + item.autoReuse = true; + item.height = 34; + item.value = 300000; + item.rare = 5; + item.shoot = mod.ProjectileType("CursedDagger"); + item.shootSpeed = 12f; + } + } +} diff --git a/Items/CalamityCustomThrowingDamage/CursedDagger.png b/Items/CalamityCustomThrowingDamage/CursedDagger.png new file mode 100644 index 0000000000..9a81c1fccc Binary files /dev/null and b/Items/CalamityCustomThrowingDamage/CursedDagger.png differ diff --git a/Items/CalamityCustomThrowingDamage/DuststormInABottle.cs b/Items/CalamityCustomThrowingDamage/DuststormInABottle.cs new file mode 100644 index 0000000000..c07dbc32df --- /dev/null +++ b/Items/CalamityCustomThrowingDamage/DuststormInABottle.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Items; + +namespace CalamityMod.Items.CalamityCustomThrowingDamage +{ + public class DuststormInABottle : CalamityDamageItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Duststorm in a Bottle"); + Tooltip.SetDefault("Explodes into a dust cloud"); + } + + public override void SafeSetDefaults() + { + item.width = 20; + item.damage = 47; + item.noMelee = true; + item.noUseGraphic = true; + item.useAnimation = 25; + item.useStyle = 1; + item.useTime = 25; + item.knockBack = 5f; + item.UseSound = SoundID.Item106; + item.autoReuse = true; + item.height = 24; + item.maxStack = 1; + item.value = 100000; + item.rare = 7; + item.shoot = mod.ProjectileType("DuststormInABottle"); + item.shootSpeed = 12f; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ItemID.HolyWater, 20); + recipe.AddIngredient(null, "GrandScale"); + recipe.AddIngredient(ItemID.SandstorminaBottle); + recipe.AddTile(TileID.MythrilAnvil); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } +} diff --git a/Items/CalamityCustomThrowingDamage/DuststormInABottle.png b/Items/CalamityCustomThrowingDamage/DuststormInABottle.png new file mode 100644 index 0000000000..1e049812e3 Binary files /dev/null and b/Items/CalamityCustomThrowingDamage/DuststormInABottle.png differ diff --git a/Items/CalamityCustomThrowingDamage/EmpyreanKnivesThrown.cs b/Items/CalamityCustomThrowingDamage/EmpyreanKnivesThrown.cs new file mode 100644 index 0000000000..7f01db6c8f --- /dev/null +++ b/Items/CalamityCustomThrowingDamage/EmpyreanKnivesThrown.cs @@ -0,0 +1,110 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Items; + +namespace CalamityMod.Items.CalamityCustomThrowingDamage +{ + public class EmpyreanKnivesThrown : CalamityDamageItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Empyrean Knives"); + } + + public override void SafeSetDefaults() + { + item.width = 18; + item.damage = 650; + item.noMelee = true; + item.noUseGraphic = true; + item.useAnimation = 15; + item.useStyle = 1; + item.useTime = 15; + item.knockBack = 3f; + item.UseSound = SoundID.Item39; + item.autoReuse = true; + item.height = 20; + item.value = 4000000; + item.shoot = mod.ProjectileType("EmpyreanKnives"); + item.shootSpeed = 15f; + } + + public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + float num72 = item.shootSpeed; + Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); + Vector2 value = Vector2.UnitX.RotatedBy((double)player.fullRotation, default(Vector2)); + Vector2 vector3 = Main.MouseWorld - vector2; + float num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; + float num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; + if (player.gravDir == -1f) + { + num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y; + } + float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); + float num81 = num80; + if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f)) + { + num78 = (float)player.direction; + num79 = 0f; + num80 = num72; + } + else + { + num80 = num72 / num80; + } + num78 *= num80; + num79 *= num80; + int num146 = 4; + if (Main.rand.Next(2) == 0) + { + num146++; + } + if (Main.rand.Next(4) == 0) + { + num146++; + } + if (Main.rand.Next(8) == 0) + { + num146++; + } + if (Main.rand.Next(16) == 0) + { + num146++; + } + for (int num147 = 0; num147 < num146; num147++) + { + float num148 = num78; + float num149 = num79; + float num150 = 0.05f * (float)num147; + num148 += (float)Main.rand.Next(-25, 26) * num150; + num149 += (float)Main.rand.Next(-25, 26) * num150; + num80 = (float)Math.Sqrt((double)(num148 * num148 + num149 * num149)); + num80 = num72 / num80; + num148 *= num80; + num149 *= num80; + float x4 = vector2.X; + float y4 = vector2.Y; + Projectile.NewProjectile(x4, y4, num148, num149, type, damage, knockBack, player.whoAmI, 0f, 1f); + } + return false; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ItemID.VampireKnives); + recipe.AddIngredient(null, "CosmiliteBar", 10); + recipe.AddIngredient(null, "DarksunFragment", 10); + recipe.AddIngredient(null, "TheEmpyrean"); + recipe.AddTile(null, "DraedonsForge"); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } +} diff --git a/Items/CalamityCustomThrowingDamage/EmpyreanKnivesThrown.png b/Items/CalamityCustomThrowingDamage/EmpyreanKnivesThrown.png new file mode 100644 index 0000000000..15b3e46fbc Binary files /dev/null and b/Items/CalamityCustomThrowingDamage/EmpyreanKnivesThrown.png differ diff --git a/Items/CalamityCustomThrowingDamage/Eradicator.cs b/Items/CalamityCustomThrowingDamage/Eradicator.cs new file mode 100644 index 0000000000..61a0eff343 --- /dev/null +++ b/Items/CalamityCustomThrowingDamage/Eradicator.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Items; + +namespace CalamityMod.Items.CalamityCustomThrowingDamage +{ + public class Eradicator : CalamityDamageItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Eradicator"); + } + + public override void SafeSetDefaults() + { + item.width = 38; + item.damage = 300; + item.noMelee = true; + item.noUseGraphic = true; + item.autoReuse = true; + item.useAnimation = 19; + item.useStyle = 1; + item.useTime = 19; + item.knockBack = 7f; + item.UseSound = SoundID.Item1; + item.height = 54; + item.value = 1250000; + item.shoot = mod.ProjectileType("EradicatorProjectile"); + item.shootSpeed = 12f; + } + } +} diff --git a/Items/CalamityCustomThrowingDamage/Eradicator.png b/Items/CalamityCustomThrowingDamage/Eradicator.png new file mode 100644 index 0000000000..e12958fc93 Binary files /dev/null and b/Items/CalamityCustomThrowingDamage/Eradicator.png differ diff --git a/Items/CalamityCustomThrowingDamage/ExecutionersBlade.cs b/Items/CalamityCustomThrowingDamage/ExecutionersBlade.cs new file mode 100644 index 0000000000..78e88bf072 --- /dev/null +++ b/Items/CalamityCustomThrowingDamage/ExecutionersBlade.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Items; + +namespace CalamityMod.Items.CalamityCustomThrowingDamage +{ + public class ExecutionersBlade : CalamityDamageItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Executioner's Blade"); + } + + public override void SafeSetDefaults() + { + item.width = 50; + item.damage = 615; + item.noMelee = true; + item.noUseGraphic = true; + item.useTime = 3; + item.useAnimation = 9; + item.useStyle = 1; + item.knockBack = 6.75f; + item.UseSound = SoundID.Item73; + item.autoReuse = true; + item.height = 50; + item.value = 1350000; + item.shoot = mod.ProjectileType("ExecutionersBlade"); + item.shootSpeed = 26f; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(null, "CosmiliteBar", 11); + recipe.AddTile(null, "DraedonsForge"); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } +} diff --git a/Items/CalamityCustomThrowingDamage/ExecutionersBlade.png b/Items/CalamityCustomThrowingDamage/ExecutionersBlade.png new file mode 100644 index 0000000000..1a71859059 Binary files /dev/null and b/Items/CalamityCustomThrowingDamage/ExecutionersBlade.png differ diff --git a/Items/CalamityCustomThrowingDamage/FeatherKnife.cs b/Items/CalamityCustomThrowingDamage/FeatherKnife.cs new file mode 100644 index 0000000000..c39aee5b80 --- /dev/null +++ b/Items/CalamityCustomThrowingDamage/FeatherKnife.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Items; + +namespace CalamityMod.Items.CalamityCustomThrowingDamage +{ + public class FeatherKnife : CalamityDamageItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Feather Knife"); + } + + public override void SafeSetDefaults() + { + item.width = 18; + item.damage = 20; + item.noMelee = true; + item.consumable = true; + item.noUseGraphic = true; + item.useAnimation = 13; + item.useStyle = 1; + item.useTime = 13; + item.knockBack = 2f; + item.UseSound = SoundID.Item1; + item.autoReuse = true; + item.height = 32; + item.maxStack = 999; + item.value = 300; + item.rare = 3; + item.shoot = mod.ProjectileType("FeatherKnifeProjectile"); + item.shootSpeed = 12f; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(null, "AerialiteBar"); + recipe.AddTile(TileID.SkyMill); + recipe.SetResult(this, 30); + recipe.AddRecipe(); + } + } +} diff --git a/Items/CalamityCustomThrowingDamage/FeatherKnife.png b/Items/CalamityCustomThrowingDamage/FeatherKnife.png new file mode 100644 index 0000000000..eb0f069f02 Binary files /dev/null and b/Items/CalamityCustomThrowingDamage/FeatherKnife.png differ diff --git a/Items/CalamityCustomThrowingDamage/FlameScythe.cs b/Items/CalamityCustomThrowingDamage/FlameScythe.cs new file mode 100644 index 0000000000..f07e16f7fd --- /dev/null +++ b/Items/CalamityCustomThrowingDamage/FlameScythe.cs @@ -0,0 +1,47 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Items; + +namespace CalamityMod.Items.CalamityCustomThrowingDamage +{ + public class FlameScythe : CalamityDamageItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Flame Scythe"); + } + + public override void SafeSetDefaults() + { + item.width = 50; + item.damage = 145; + item.noMelee = true; + item.noUseGraphic = true; + item.autoReuse = true; + item.useAnimation = 19; + item.useStyle = 1; + item.useTime = 19; + item.knockBack = 8.5f; + item.UseSound = SoundID.Item1; + item.height = 48; + item.value = 800000; + item.rare = 8; + item.shoot = mod.ProjectileType("FlameScytheProjectile"); + item.shootSpeed = 16f; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(null, "CruptixBar", 9); + recipe.AddTile(TileID.MythrilAnvil); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } +} diff --git a/Items/CalamityCustomThrowingDamage/FlameScythe.png b/Items/CalamityCustomThrowingDamage/FlameScythe.png new file mode 100644 index 0000000000..6df15cd567 Binary files /dev/null and b/Items/CalamityCustomThrowingDamage/FlameScythe.png differ diff --git a/Items/CalamityCustomThrowingDamage/GelDart.cs b/Items/CalamityCustomThrowingDamage/GelDart.cs new file mode 100644 index 0000000000..733cebdf93 --- /dev/null +++ b/Items/CalamityCustomThrowingDamage/GelDart.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Items; + +namespace CalamityMod.Items.CalamityCustomThrowingDamage +{ + public class GelDart : CalamityDamageItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Gel Dart"); + } + + public override void SafeSetDefaults() + { + item.width = 14; + item.damage = 25; + item.noMelee = true; + item.consumable = true; + item.noUseGraphic = true; + item.useAnimation = 11; + item.useStyle = 1; + item.useTime = 11; + item.knockBack = 2.5f; + item.UseSound = SoundID.Item1; + item.autoReuse = true; + item.height = 28; + item.maxStack = 999; + item.value = 1000; + item.rare = 4; + item.shoot = mod.ProjectileType("GelDartProjectile"); + item.shootSpeed = 12f; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(null, "PurifiedGel", 5); + recipe.AddTile(TileID.Anvils); + recipe.SetResult(this, 150); + recipe.AddRecipe(); + } + } +} diff --git a/Items/CalamityCustomThrowingDamage/GelDart.png b/Items/CalamityCustomThrowingDamage/GelDart.png new file mode 100644 index 0000000000..a584390e21 Binary files /dev/null and b/Items/CalamityCustomThrowingDamage/GelDart.png differ diff --git a/Items/CalamityCustomThrowingDamage/GhoulishGouger.cs b/Items/CalamityCustomThrowingDamage/GhoulishGouger.cs new file mode 100644 index 0000000000..3c77d08f3d --- /dev/null +++ b/Items/CalamityCustomThrowingDamage/GhoulishGouger.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.CalamityCustomThrowingDamage +{ + public class GhoulishGouger : CalamityDamageItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Ghoulish Gouger"); + Tooltip.SetDefault("Throws a ghoulish scythe"); + } + + public override void SafeSetDefaults() + { + item.width = 68; + item.damage = 160; + item.noMelee = true; + item.noUseGraphic = true; + item.useAnimation = 12; + item.useTime = 12; + item.useStyle = 1; + item.knockBack = 7.5f; + item.UseSound = SoundID.Item1; + item.autoReuse = true; + item.height = 60; + item.value = 1000000; + item.shoot = mod.ProjectileType("GhoulishGouger"); + item.shootSpeed = 20f; + } + } +} diff --git a/Items/CalamityCustomThrowingDamage/GhoulishGouger.png b/Items/CalamityCustomThrowingDamage/GhoulishGouger.png new file mode 100644 index 0000000000..409d9d01df Binary files /dev/null and b/Items/CalamityCustomThrowingDamage/GhoulishGouger.png differ diff --git a/Items/CalamityCustomThrowingDamage/IceStar.cs b/Items/CalamityCustomThrowingDamage/IceStar.cs new file mode 100644 index 0000000000..813e95264b --- /dev/null +++ b/Items/CalamityCustomThrowingDamage/IceStar.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Items; + +namespace CalamityMod.Items.CalamityCustomThrowingDamage +{ + public class IceStar : CalamityDamageItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Ice Star"); + Tooltip.SetDefault("Ice Stars are too brittle to be recovered after being thrown"); + } + + public override void SafeSetDefaults() + { + item.width = 62; + item.damage = 35; + item.noMelee = true; + item.consumable = true; + item.noUseGraphic = true; + item.useAnimation = 12; + item.crit = 7; + item.useStyle = 1; + item.useTime = 12; + item.knockBack = 2.5f; + item.UseSound = SoundID.Item1; + item.autoReuse = true; + item.height = 62; + item.maxStack = 999; + item.value = 3000; + item.rare = 5; + item.shoot = mod.ProjectileType("IceStarProjectile"); + item.shootSpeed = 14f; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(null, "CryoBar"); + recipe.AddTile(TileID.IceMachine); + recipe.SetResult(this, 50); + recipe.AddRecipe(); + } + } +} diff --git a/Items/CalamityCustomThrowingDamage/IceStar.png b/Items/CalamityCustomThrowingDamage/IceStar.png new file mode 100644 index 0000000000..ec834cdfa5 Binary files /dev/null and b/Items/CalamityCustomThrowingDamage/IceStar.png differ diff --git a/Items/CalamityCustomThrowingDamage/IchorSpear.cs b/Items/CalamityCustomThrowingDamage/IchorSpear.cs new file mode 100644 index 0000000000..c2e4edebc2 --- /dev/null +++ b/Items/CalamityCustomThrowingDamage/IchorSpear.cs @@ -0,0 +1,38 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Items; + +namespace CalamityMod.Items.CalamityCustomThrowingDamage +{ + public class IchorSpear : CalamityDamageItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Ichor Spear"); + } + + public override void SafeSetDefaults() + { + item.width = 52; + item.damage = 40; + item.noMelee = true; + item.noUseGraphic = true; + item.useAnimation = 20; + item.useStyle = 1; + item.useTime = 20; + item.knockBack = 6f; + item.UseSound = SoundID.Item1; + item.autoReuse = true; + item.height = 52; + item.value = 300000; + item.rare = 5; + item.shoot = mod.ProjectileType("IchorSpear"); + item.shootSpeed = 20f; + } + } +} diff --git a/Items/CalamityCustomThrowingDamage/IchorSpear.png b/Items/CalamityCustomThrowingDamage/IchorSpear.png new file mode 100644 index 0000000000..6c8e3be05f Binary files /dev/null and b/Items/CalamityCustomThrowingDamage/IchorSpear.png differ diff --git a/Items/CalamityCustomThrowingDamage/Lionfish.cs b/Items/CalamityCustomThrowingDamage/Lionfish.cs new file mode 100644 index 0000000000..71bb27f829 --- /dev/null +++ b/Items/CalamityCustomThrowingDamage/Lionfish.cs @@ -0,0 +1,38 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Items; + +namespace CalamityMod.Items.CalamityCustomThrowingDamage +{ + public class Lionfish : CalamityDamageItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Lionfish"); + } + + public override void SafeSetDefaults() + { + item.width = 40; + item.damage = 54; + item.noMelee = true; + item.noUseGraphic = true; + item.useAnimation = 22; + item.useStyle = 1; + item.useTime = 22; + item.knockBack = 2.5f; + item.UseSound = SoundID.Item1; + item.autoReuse = true; + item.height = 40; + item.value = 50000; + item.rare = 3; + item.shoot = mod.ProjectileType("Lionfish"); + item.shootSpeed = 12f; + } + } +} diff --git a/Items/CalamityCustomThrowingDamage/Lionfish.png b/Items/CalamityCustomThrowingDamage/Lionfish.png new file mode 100644 index 0000000000..56025eca70 Binary files /dev/null and b/Items/CalamityCustomThrowingDamage/Lionfish.png differ diff --git a/Items/CalamityCustomThrowingDamage/Malachite.cs b/Items/CalamityCustomThrowingDamage/Malachite.cs new file mode 100644 index 0000000000..536b8afda9 --- /dev/null +++ b/Items/CalamityCustomThrowingDamage/Malachite.cs @@ -0,0 +1,77 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Items; + +namespace CalamityMod.Items.CalamityCustomThrowingDamage +{ + public class Malachite : CalamityDamageItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Malachite"); + Tooltip.SetDefault("Legendary Drop\n" + + "Throws a stream of kunai that stick to enemies and explode\n" + + "Right click to throw a single kunai that pierces, after piercing an enemy it emits a massive explosion on the next enemy hit\n" + + "Revengeance drop"); + } + + public override void SafeSetDefaults() + { + item.width = 26; + item.damage = 58; + item.noMelee = true; + item.noUseGraphic = true; + item.useTime = 10; + item.useAnimation = 10; + item.useStyle = 1; + item.knockBack = 1.25f; + item.UseSound = SoundID.Item1; + item.autoReuse = true; + item.height = 58; + item.value = 5000000; + item.shoot = mod.ProjectileType("Malachite"); + item.shootSpeed = 10f; + } + + public override bool AltFunctionUse(Player player) + { + return true; + } + + public override bool CanUseItem(Player player) + { + if (player.altFunctionUse == 2) + { + item.useTime = 10; + item.useAnimation = 10; + item.UseSound = SoundID.Item109; + } + else + { + item.useTime = 5; + item.useAnimation = 5; + item.UseSound = SoundID.Item1; + } + return base.CanUseItem(player); + } + + public override bool Shoot(Player player, ref Microsoft.Xna.Framework.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, mod.ProjectileType("MalachiteBolt"), (int)((double)damage * 2.0), knockBack, player.whoAmI, 0.0f, 0.0f); + return false; + } + else + { + Projectile.NewProjectile(position.X, position.Y, speedX, speedY, mod.ProjectileType("Malachite"), damage, knockBack, player.whoAmI, 0.0f, 0.0f); + return false; + } + } + } +} diff --git a/Items/CalamityCustomThrowingDamage/Malachite.png b/Items/CalamityCustomThrowingDamage/Malachite.png new file mode 100644 index 0000000000..fcd0137dba Binary files /dev/null and b/Items/CalamityCustomThrowingDamage/Malachite.png differ diff --git a/Items/CalamityCustomThrowingDamage/MangroveChakram.cs b/Items/CalamityCustomThrowingDamage/MangroveChakram.cs new file mode 100644 index 0000000000..dd70670fd6 --- /dev/null +++ b/Items/CalamityCustomThrowingDamage/MangroveChakram.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Items; + +namespace CalamityMod.Items.CalamityCustomThrowingDamage +{ + public class MangroveChakram : CalamityDamageItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Mangrove Chakram"); + } + + public override void SafeSetDefaults() + { + item.width = 38; + item.damage = 84; + item.noMelee = true; + item.noUseGraphic = true; + item.useAnimation = 14; + item.useStyle = 1; + item.useTime = 14; + item.knockBack = 7.5f; + item.UseSound = SoundID.Item1; + item.height = 38; + item.value = 500000; + item.rare = 6; + item.shoot = mod.ProjectileType("MangroveChakramProjectile"); + item.shootSpeed = 15.5f; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(null, "DraedonBar", 7); + recipe.AddTile(TileID.MythrilAnvil); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } +} diff --git a/Items/CalamityCustomThrowingDamage/MangroveChakram.png b/Items/CalamityCustomThrowingDamage/MangroveChakram.png new file mode 100644 index 0000000000..aad8e4a516 Binary files /dev/null and b/Items/CalamityCustomThrowingDamage/MangroveChakram.png differ diff --git a/Items/CalamityCustomThrowingDamage/MoltenAmputator.cs b/Items/CalamityCustomThrowingDamage/MoltenAmputator.cs new file mode 100644 index 0000000000..a06e642f2c --- /dev/null +++ b/Items/CalamityCustomThrowingDamage/MoltenAmputator.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Items; + +namespace CalamityMod.Items.CalamityCustomThrowingDamage +{ + public class MoltenAmputator : CalamityDamageItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Molten Amputator"); + } + + public override void SafeSetDefaults() + { + item.width = 60; + item.damage = 250; + item.noMelee = true; + item.noUseGraphic = true; + item.autoReuse = true; + item.useAnimation = 18; + item.useStyle = 1; + item.useTime = 18; + item.knockBack = 9f; + item.UseSound = SoundID.Item1; + item.height = 60; + item.value = 5000000; + item.shoot = mod.ProjectileType("MoltenAmputator"); + item.shootSpeed = 12f; + } + } +} diff --git a/Items/CalamityCustomThrowingDamage/MoltenAmputator.png b/Items/CalamityCustomThrowingDamage/MoltenAmputator.png new file mode 100644 index 0000000000..4e44d58710 Binary files /dev/null and b/Items/CalamityCustomThrowingDamage/MoltenAmputator.png differ diff --git a/Items/CalamityCustomThrowingDamage/Mycoroot.cs b/Items/CalamityCustomThrowingDamage/Mycoroot.cs new file mode 100644 index 0000000000..bec8f89c60 --- /dev/null +++ b/Items/CalamityCustomThrowingDamage/Mycoroot.cs @@ -0,0 +1,47 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Items; + +namespace CalamityMod.Items.CalamityCustomThrowingDamage +{ + public class Mycoroot : CalamityDamageItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Mycoroot"); + Tooltip.SetDefault("Fires a stream of short-range fungal roots"); + } + + public override void SafeSetDefaults() + { + item.width = 32; + item.damage = 10; + item.noMelee = true; + item.noUseGraphic = true; + item.useTime = 5; + item.useAnimation = 5; + item.useStyle = 1; + item.knockBack = 1.5f; + item.UseSound = SoundID.Item1; + item.autoReuse = true; + item.height = 32; + item.rare = 2; + item.value = 40000; + item.shoot = mod.ProjectileType("Mycoroot"); + item.shootSpeed = 20f; + } + + public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + float SpeedX = speedX + (float) Main.rand.Next(-30, 31) * 0.05f; + float SpeedY = speedY + (float) Main.rand.Next(-30, 31) * 0.05f; + Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, damage, knockBack, player.whoAmI, 0.0f, 0.0f); + return false; + } + } +} diff --git a/Items/CalamityCustomThrowingDamage/Mycoroot.png b/Items/CalamityCustomThrowingDamage/Mycoroot.png new file mode 100644 index 0000000000..b8bfd1b5d0 Binary files /dev/null and b/Items/CalamityCustomThrowingDamage/Mycoroot.png differ diff --git a/Items/CalamityCustomThrowingDamage/MythrilKnife.cs b/Items/CalamityCustomThrowingDamage/MythrilKnife.cs new file mode 100644 index 0000000000..869c9998de --- /dev/null +++ b/Items/CalamityCustomThrowingDamage/MythrilKnife.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Items; + +namespace CalamityMod.Items.CalamityCustomThrowingDamage +{ + public class MythrilKnife : CalamityDamageItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Mythril Knife"); + } + + public override void SafeSetDefaults() + { + item.width = 12; + item.damage = 32; + item.noMelee = true; + item.consumable = true; + item.noUseGraphic = true; + item.useAnimation = 10; + item.useStyle = 1; + item.useTime = 10; + item.knockBack = 1.75f; + item.UseSound = SoundID.Item1; + item.autoReuse = true; + item.height = 30; + item.maxStack = 999; + item.value = 1100; + item.rare = 4; + item.shoot = mod.ProjectileType("MythrilKnifeProjectile"); + item.shootSpeed = 12f; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ItemID.MythrilBar); + recipe.AddTile(TileID.MythrilAnvil); + recipe.SetResult(this, 40); + recipe.AddRecipe(); + } + } +} diff --git a/Items/CalamityCustomThrowingDamage/MythrilKnife.png b/Items/CalamityCustomThrowingDamage/MythrilKnife.png new file mode 100644 index 0000000000..8ff7d5aede Binary files /dev/null and b/Items/CalamityCustomThrowingDamage/MythrilKnife.png differ diff --git a/Items/CalamityCustomThrowingDamage/OrichalcumSpikedGemstone.cs b/Items/CalamityCustomThrowingDamage/OrichalcumSpikedGemstone.cs new file mode 100644 index 0000000000..84d1a0c9c9 --- /dev/null +++ b/Items/CalamityCustomThrowingDamage/OrichalcumSpikedGemstone.cs @@ -0,0 +1,50 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Items; + +namespace CalamityMod.Items.CalamityCustomThrowingDamage +{ + public class OrichalcumSpikedGemstone : CalamityDamageItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Orichalcum Spiked Gemstone"); + } + + public override void SafeSetDefaults() + { + item.width = 14; + item.damage = 25; + item.noMelee = true; + item.consumable = true; + item.noUseGraphic = true; + item.useAnimation = 13; + item.useStyle = 1; + item.useTime = 13; + item.knockBack = 2f; + item.UseSound = SoundID.Item1; + item.autoReuse = true; + item.height = 24; + item.shoot = 330; + item.maxStack = 999; + item.value = 1200; + item.rare = 4; + item.shoot = mod.ProjectileType("OrichalcumSpikedGemstoneProjectile"); + item.shootSpeed = 12f; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ItemID.OrichalcumBar); + recipe.AddTile(TileID.MythrilAnvil); + recipe.SetResult(this, 50); + recipe.AddRecipe(); + } + } +} diff --git a/Items/CalamityCustomThrowingDamage/OrichalcumSpikedGemstone.png b/Items/CalamityCustomThrowingDamage/OrichalcumSpikedGemstone.png new file mode 100644 index 0000000000..7f94126948 Binary files /dev/null and b/Items/CalamityCustomThrowingDamage/OrichalcumSpikedGemstone.png differ diff --git a/Items/CalamityCustomThrowingDamage/PalladiumJavelin.cs b/Items/CalamityCustomThrowingDamage/PalladiumJavelin.cs new file mode 100644 index 0000000000..72167ee984 --- /dev/null +++ b/Items/CalamityCustomThrowingDamage/PalladiumJavelin.cs @@ -0,0 +1,50 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Items; + +namespace CalamityMod.Items.CalamityCustomThrowingDamage +{ + public class PalladiumJavelin : CalamityDamageItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Palladium Javelin"); + } + + public override void SafeSetDefaults() + { + item.width = 44; + item.damage = 41; + item.noMelee = true; + item.consumable = true; + item.noUseGraphic = true; + item.useAnimation = 19; + item.useStyle = 1; + item.useTime = 19; + item.knockBack = 5.5f; + item.UseSound = SoundID.Item1; + item.autoReuse = true; + item.height = 44; + item.shoot = 330; + item.maxStack = 999; + item.value = 1200; + item.rare = 4; + item.shoot = mod.ProjectileType("PalladiumJavelinProjectile"); + item.shootSpeed = 16f; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ItemID.PalladiumBar); + recipe.AddTile(TileID.Anvils); + recipe.SetResult(this, 20); + recipe.AddRecipe(); + } + } +} diff --git a/Items/CalamityCustomThrowingDamage/PalladiumJavelin.png b/Items/CalamityCustomThrowingDamage/PalladiumJavelin.png new file mode 100644 index 0000000000..6d94f8c580 Binary files /dev/null and b/Items/CalamityCustomThrowingDamage/PalladiumJavelin.png differ diff --git a/Items/CalamityCustomThrowingDamage/ProfanedTrident.cs b/Items/CalamityCustomThrowingDamage/ProfanedTrident.cs new file mode 100644 index 0000000000..8cff7cb7d8 --- /dev/null +++ b/Items/CalamityCustomThrowingDamage/ProfanedTrident.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Items; + +namespace CalamityMod.Items.CalamityCustomThrowingDamage +{ + public class ProfanedTrident : CalamityDamageItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Infernal Spear"); + } + + public override void SafeSetDefaults() + { + item.width = 72; + item.damage = 1700; + item.noMelee = true; + item.noUseGraphic = true; + item.useAnimation = 13; + item.useStyle = 1; + item.useTime = 13; + item.knockBack = 8f; + item.UseSound = SoundID.Item1; + item.autoReuse = true; + item.height = 72; + item.value = 10000000; + item.shoot = mod.ProjectileType("ProfanedTrident"); + item.shootSpeed = 28f; + } + } +} diff --git a/Items/CalamityCustomThrowingDamage/ProfanedTrident.png b/Items/CalamityCustomThrowingDamage/ProfanedTrident.png new file mode 100644 index 0000000000..77143ba0e5 Binary files /dev/null and b/Items/CalamityCustomThrowingDamage/ProfanedTrident.png differ diff --git a/Items/CalamityCustomThrowingDamage/Pwnagehammer.cs b/Items/CalamityCustomThrowingDamage/Pwnagehammer.cs new file mode 100644 index 0000000000..58ff77c64d --- /dev/null +++ b/Items/CalamityCustomThrowingDamage/Pwnagehammer.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Items; + +namespace CalamityMod.Items.CalamityCustomThrowingDamage +{ + public class Pwnagehammer : CalamityDamageItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Pwnagehammer"); + } + + public override void SafeSetDefaults() + { + item.width = 68; + item.damage = 90; + item.noMelee = true; + item.noUseGraphic = true; + item.autoReuse = true; + item.useAnimation = 15; + item.useStyle = 1; + item.useTime = 15; + item.knockBack = 10f; + item.UseSound = SoundID.Item1; + item.height = 68; + item.value = 300000; + item.rare = 6; + item.shoot = mod.ProjectileType("Pwnagehammer"); + item.shootSpeed = 12f; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ItemID.Pwnhammer); + recipe.AddIngredient(ItemID.HallowedBar, 7); + recipe.AddIngredient(ItemID.SoulofMight, 3); + recipe.AddIngredient(ItemID.SoulofSight, 3); + recipe.AddIngredient(ItemID.SoulofFright, 3); + recipe.AddTile(TileID.MythrilAnvil); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } +} diff --git a/Items/CalamityCustomThrowingDamage/Pwnagehammer.png b/Items/CalamityCustomThrowingDamage/Pwnagehammer.png new file mode 100644 index 0000000000..7a6cb7bc22 Binary files /dev/null and b/Items/CalamityCustomThrowingDamage/Pwnagehammer.png differ diff --git a/Items/CalamityCustomThrowingDamage/RotBall.cs b/Items/CalamityCustomThrowingDamage/RotBall.cs new file mode 100644 index 0000000000..aaaa086a92 --- /dev/null +++ b/Items/CalamityCustomThrowingDamage/RotBall.cs @@ -0,0 +1,52 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Items; + +namespace CalamityMod.Items.CalamityCustomThrowingDamage +{ + public class RotBall : CalamityDamageItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Rot Ball"); + } + + public override void SafeSetDefaults() + { + item.width = 26; + item.damage = 20; + item.noMelee = true; + item.consumable = true; + item.noUseGraphic = true; + item.useAnimation = 13; + item.crit = 8; + item.useStyle = 1; + item.useTime = 13; + item.knockBack = 2.5f; + item.UseSound = SoundID.Item1; + item.autoReuse = true; + item.height = 26; + item.maxStack = 999; + item.value = 1000; + item.rare = 3; + item.shoot = mod.ProjectileType("RotBallProjectile"); + item.shootSpeed = 16f; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(null, "TrueShadowScale"); + recipe.AddIngredient(ItemID.RottenChunk); + recipe.AddIngredient(ItemID.DemoniteBar); + recipe.AddTile(TileID.DemonAltar); + recipe.SetResult(this, 100); + recipe.AddRecipe(); + } + } +} diff --git a/Items/CalamityCustomThrowingDamage/RotBall.png b/Items/CalamityCustomThrowingDamage/RotBall.png new file mode 100644 index 0000000000..d8ca1fc108 Binary files /dev/null and b/Items/CalamityCustomThrowingDamage/RotBall.png differ diff --git a/Items/CalamityCustomThrowingDamage/RoyalKnives.cs b/Items/CalamityCustomThrowingDamage/RoyalKnives.cs new file mode 100644 index 0000000000..572d1873b5 --- /dev/null +++ b/Items/CalamityCustomThrowingDamage/RoyalKnives.cs @@ -0,0 +1,109 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Items; + +namespace CalamityMod.Items.CalamityCustomThrowingDamage +{ + public class RoyalKnives : CalamityDamageItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Illustrious Knives"); + } + + public override void SafeSetDefaults() + { + item.width = 18; + item.damage = 1320; + item.noMelee = true; + item.noUseGraphic = true; + item.useAnimation = 12; + item.useStyle = 1; + item.useTime = 12; + item.knockBack = 3f; + item.UseSound = SoundID.Item39; + item.autoReuse = true; + item.height = 20; + item.value = 8000000; + item.shoot = mod.ProjectileType("RoyalKnife"); + item.shootSpeed = 9f; + } + + public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + float num72 = item.shootSpeed; + Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); + Vector2 value = Vector2.UnitX.RotatedBy((double)player.fullRotation, default(Vector2)); + Vector2 vector3 = Main.MouseWorld - vector2; + float num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; + float num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; + if (player.gravDir == -1f) + { + num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y; + } + float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); + float num81 = num80; + if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f)) + { + num78 = (float)player.direction; + num79 = 0f; + num80 = num72; + } + else + { + num80 = num72 / num80; + } + num78 *= num80; + num79 *= num80; + int num146 = 4; + if (Main.rand.Next(2) == 0) + { + num146++; + } + if (Main.rand.Next(4) == 0) + { + num146++; + } + if (Main.rand.Next(8) == 0) + { + num146++; + } + if (Main.rand.Next(16) == 0) + { + num146++; + } + for (int num147 = 0; num147 < num146; num147++) + { + float num148 = num78; + float num149 = num79; + float num150 = 0.05f * (float)num147; + num148 += (float)Main.rand.Next(-35, 36) * num150; + num149 += (float)Main.rand.Next(-35, 36) * num150; + num80 = (float)Math.Sqrt((double)(num148 * num148 + num149 * num149)); + num80 = num72 / num80; + num148 *= num80; + num149 *= num80; + float x4 = vector2.X; + float y4 = vector2.Y; + Projectile.NewProjectile(x4, y4, num148, num149, mod.ProjectileType("RoyalKnife"), damage, knockBack, player.whoAmI, 0f, 0f); + } + return false; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(null, "ShadowspecBar", 5); + recipe.AddIngredient(null, "CoreofCalamity", 3); + recipe.AddIngredient(null, "EmpyreanKnivesThrown"); + recipe.AddTile(null, "DraedonsForge"); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } +} diff --git a/Items/CalamityCustomThrowingDamage/RoyalKnives.png b/Items/CalamityCustomThrowingDamage/RoyalKnives.png new file mode 100644 index 0000000000..f54945e13e Binary files /dev/null and b/Items/CalamityCustomThrowingDamage/RoyalKnives.png differ diff --git a/Items/CalamityCustomThrowingDamage/ScourgeoftheCosmosThrown.cs b/Items/CalamityCustomThrowingDamage/ScourgeoftheCosmosThrown.cs new file mode 100644 index 0000000000..6bba93f152 --- /dev/null +++ b/Items/CalamityCustomThrowingDamage/ScourgeoftheCosmosThrown.cs @@ -0,0 +1,55 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Items; + +namespace CalamityMod.Items.CalamityCustomThrowingDamage +{ + public class ScourgeoftheCosmosThrown : CalamityDamageItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Scourge of the Cosmos"); + } + + public override void SafeSetDefaults() + { + item.width = 18; + item.damage = 1500; + item.noMelee = true; + item.noUseGraphic = true; + item.useAnimation = 20; + item.useStyle = 5; + item.useTime = 20; + item.knockBack = 5f; + item.UseSound = SoundID.Item109; + item.autoReuse = true; + item.height = 20; + item.value = 4000000; + item.shoot = mod.ProjectileType("ScourgeoftheCosmos"); + item.shootSpeed = 15f; + } + + public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, damage, knockBack, player.whoAmI, 0f, 1f); + return false; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ItemID.ScourgeoftheCorruptor); + recipe.AddIngredient(null, "CosmiliteBar", 10); + recipe.AddIngredient(null, "DarksunFragment", 10); + recipe.AddIngredient(null, "XerocPitchfork", 200); + recipe.AddTile(null, "DraedonsForge"); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } +} diff --git a/Items/CalamityCustomThrowingDamage/ScourgeoftheCosmosThrown.png b/Items/CalamityCustomThrowingDamage/ScourgeoftheCosmosThrown.png new file mode 100644 index 0000000000..bc1fc66277 Binary files /dev/null and b/Items/CalamityCustomThrowingDamage/ScourgeoftheCosmosThrown.png differ diff --git a/Items/CalamityCustomThrowingDamage/ScourgeoftheDesert.cs b/Items/CalamityCustomThrowingDamage/ScourgeoftheDesert.cs new file mode 100644 index 0000000000..a94f2dbe8f --- /dev/null +++ b/Items/CalamityCustomThrowingDamage/ScourgeoftheDesert.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Items; + +namespace CalamityMod.Items.CalamityCustomThrowingDamage +{ + public class ScourgeoftheDesert : CalamityDamageItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Scourge of the Desert"); + Tooltip.SetDefault("Revengeance drop"); + } + + public override void SafeSetDefaults() + { + item.width = 44; + item.damage = 16; + item.noMelee = true; + item.noUseGraphic = true; + item.useAnimation = 20; + item.useStyle = 1; + item.useTime = 20; + item.knockBack = 3.5f; + item.UseSound = SoundID.Item1; + item.autoReuse = true; + item.height = 44; + item.value = 15000; + item.rare = 2; + item.shoot = mod.ProjectileType("ScourgeoftheDesert"); + item.shootSpeed = 12f; + } + } +} diff --git a/Items/CalamityCustomThrowingDamage/ScourgeoftheDesert.png b/Items/CalamityCustomThrowingDamage/ScourgeoftheDesert.png new file mode 100644 index 0000000000..93f9a0eefd Binary files /dev/null and b/Items/CalamityCustomThrowingDamage/ScourgeoftheDesert.png differ diff --git a/Items/CalamityCustomThrowingDamage/SeashellBoomerang.cs b/Items/CalamityCustomThrowingDamage/SeashellBoomerang.cs new file mode 100644 index 0000000000..094f5b9e43 --- /dev/null +++ b/Items/CalamityCustomThrowingDamage/SeashellBoomerang.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Items; + +namespace CalamityMod.Items.CalamityCustomThrowingDamage +{ + public class SeashellBoomerang : CalamityDamageItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Seashell Boomerang"); + } + + public override void SafeSetDefaults() + { + item.width = 18; + item.damage = 15; + item.noMelee = true; + item.noUseGraphic = true; + item.useAnimation = 15; + item.useStyle = 1; + item.useTime = 15; + item.knockBack = 5.5f; + item.UseSound = SoundID.Item1; + item.height = 34; + item.value = 50000; + item.rare = 2; + item.shoot = mod.ProjectileType("SeashellBoomerangProjectile"); + item.shootSpeed = 11.5f; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(null, "VictideBar", 2); + recipe.AddTile(TileID.Anvils); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } +} diff --git a/Items/CalamityCustomThrowingDamage/SeashellBoomerang.png b/Items/CalamityCustomThrowingDamage/SeashellBoomerang.png new file mode 100644 index 0000000000..4e0fba13e0 Binary files /dev/null and b/Items/CalamityCustomThrowingDamage/SeashellBoomerang.png differ diff --git a/Items/CalamityCustomThrowingDamage/SpearofPaleolith.cs b/Items/CalamityCustomThrowingDamage/SpearofPaleolith.cs new file mode 100644 index 0000000000..89d4c8e024 --- /dev/null +++ b/Items/CalamityCustomThrowingDamage/SpearofPaleolith.cs @@ -0,0 +1,56 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Items; + +namespace CalamityMod.Items.CalamityCustomThrowingDamage +{ + public class SpearofPaleolith : CalamityDamageItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Spear of Paleolith"); + Tooltip.SetDefault("Throws an ancient spear that shatters enemy armor at high velocity\nSpears rain fossil shards as they travel"); + } + + public override void SafeSetDefaults() + { + item.width = 54; + item.damage = 50; + item.noMelee = true; + item.noUseGraphic = true; + item.useAnimation = 27; + item.useStyle = 1; + item.useTime = 27; + item.knockBack = 6f; + item.UseSound = SoundID.Item1; + item.autoReuse = true; + item.height = 54; + item.maxStack = 1; + item.value = 330000; + item.rare = 5; + item.shoot = mod.ProjectileType("SpearofPaleolith"); + item.shootSpeed = 35f; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ItemID.AncientBattleArmorMaterial, 2); + recipe.AddIngredient(ItemID.AdamantiteBar, 4); + recipe.AddTile(TileID.Anvils); + recipe.SetResult(this); + recipe.AddRecipe(); + recipe = new ModRecipe(mod); + recipe.AddIngredient(ItemID.AncientBattleArmorMaterial, 2); + recipe.AddIngredient(ItemID.TitaniumBar, 4); + recipe.AddTile(TileID.Anvils); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } +} diff --git a/Items/CalamityCustomThrowingDamage/SpearofPaleolith.png b/Items/CalamityCustomThrowingDamage/SpearofPaleolith.png new file mode 100644 index 0000000000..45ec221cf2 Binary files /dev/null and b/Items/CalamityCustomThrowingDamage/SpearofPaleolith.png differ diff --git a/Items/CalamityCustomThrowingDamage/TarragonThrowingDart.cs b/Items/CalamityCustomThrowingDamage/TarragonThrowingDart.cs new file mode 100644 index 0000000000..01603bf8d2 --- /dev/null +++ b/Items/CalamityCustomThrowingDamage/TarragonThrowingDart.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Items; + +namespace CalamityMod.Items.CalamityCustomThrowingDamage +{ + public class TarragonThrowingDart : CalamityDamageItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Tarragon Throwing Dart"); + } + + public override void SafeSetDefaults() + { + item.width = 34; + item.damage = 230; + item.noMelee = true; + item.consumable = true; + item.noUseGraphic = true; + item.useAnimation = 11; + item.useStyle = 1; + item.useTime = 11; + item.knockBack = 4.5f; + item.UseSound = SoundID.Item1; + item.autoReuse = true; + item.height = 34; + item.maxStack = 999; + item.value = 25000; + item.shoot = mod.ProjectileType("TarragonThrowingDartProjectile"); + item.shootSpeed = 24f; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(null, "UeliaceBar"); + recipe.AddTile(TileID.LunarCraftingStation); + recipe.SetResult(this, 100); + recipe.AddRecipe(); + } + } +} diff --git a/Items/CalamityCustomThrowingDamage/TarragonThrowingDart.png b/Items/CalamityCustomThrowingDamage/TarragonThrowingDart.png new file mode 100644 index 0000000000..0b2aceb318 Binary files /dev/null and b/Items/CalamityCustomThrowingDamage/TarragonThrowingDart.png differ diff --git a/Items/CalamityCustomThrowingDamage/TitaniumShuriken.cs b/Items/CalamityCustomThrowingDamage/TitaniumShuriken.cs new file mode 100644 index 0000000000..3d77ce19e2 --- /dev/null +++ b/Items/CalamityCustomThrowingDamage/TitaniumShuriken.cs @@ -0,0 +1,50 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Items; + +namespace CalamityMod.Items.CalamityCustomThrowingDamage +{ + public class TitaniumShuriken : CalamityDamageItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Titanium Shuriken"); + } + + public override void SafeSetDefaults() + { + item.width = 38; + item.damage = 31; + item.noMelee = true; + item.consumable = true; + item.noUseGraphic = true; + item.useAnimation = 9; + item.crit = 10; + item.useStyle = 1; + item.useTime = 9; + item.knockBack = 3f; + item.UseSound = SoundID.Item1; + item.autoReuse = true; + item.height = 38; + item.maxStack = 999; + item.value = 2000; + item.rare = 4; + item.shoot = mod.ProjectileType("TitaniumShurikenProjectile"); + item.shootSpeed = 16f; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ItemID.TitaniumBar); + recipe.AddTile(TileID.MythrilAnvil); + recipe.SetResult(this, 30); + recipe.AddRecipe(); + } + } +} diff --git a/Items/CalamityCustomThrowingDamage/TitaniumShuriken.png b/Items/CalamityCustomThrowingDamage/TitaniumShuriken.png new file mode 100644 index 0000000000..e3f185f3c3 Binary files /dev/null and b/Items/CalamityCustomThrowingDamage/TitaniumShuriken.png differ diff --git a/Items/CalamityCustomThrowingDamage/ToothBall.cs b/Items/CalamityCustomThrowingDamage/ToothBall.cs new file mode 100644 index 0000000000..53e35152d7 --- /dev/null +++ b/Items/CalamityCustomThrowingDamage/ToothBall.cs @@ -0,0 +1,52 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Items; + +namespace CalamityMod.Items.CalamityCustomThrowingDamage +{ + public class ToothBall : CalamityDamageItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Tooth Ball"); + } + + public override void SafeSetDefaults() + { + item.width = 30; + item.damage = 20; + item.noMelee = true; + item.consumable = true; + item.noUseGraphic = true; + item.useAnimation = 13; + item.crit = 8; + item.useStyle = 1; + item.useTime = 13; + item.knockBack = 2.5f; + item.UseSound = SoundID.Item1; + item.autoReuse = true; + item.height = 30; + item.maxStack = 999; + item.value = 1000; + item.rare = 3; + item.shoot = mod.ProjectileType("ToothBallProjectile"); + item.shootSpeed = 16f; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(null, "BloodSample"); + recipe.AddIngredient(ItemID.Vertebrae); + recipe.AddIngredient(ItemID.CrimtaneBar); + recipe.AddTile(TileID.DemonAltar); + recipe.SetResult(this, 100); + recipe.AddRecipe(); + } + } +} diff --git a/Items/CalamityCustomThrowingDamage/ToothBall.png b/Items/CalamityCustomThrowingDamage/ToothBall.png new file mode 100644 index 0000000000..a60c17ad50 Binary files /dev/null and b/Items/CalamityCustomThrowingDamage/ToothBall.png differ diff --git a/Items/CalamityCustomThrowingDamage/TriactisTruePaladinianMageHammerofMight.cs b/Items/CalamityCustomThrowingDamage/TriactisTruePaladinianMageHammerofMight.cs new file mode 100644 index 0000000000..3b8de25368 --- /dev/null +++ b/Items/CalamityCustomThrowingDamage/TriactisTruePaladinianMageHammerofMight.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Items; + +namespace CalamityMod.Items.CalamityCustomThrowingDamage +{ + public class TriactisTruePaladinianMageHammerofMight : CalamityDamageItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Triactis' True Paladinian Mage-Hammer of Might"); + } + + public override void SafeSetDefaults() + { + item.width = 160; + item.damage = 5000; + item.noMelee = true; + item.noUseGraphic = true; + item.autoReuse = true; + item.useAnimation = 10; + item.useStyle = 1; + item.useTime = 10; + item.knockBack = 50f; + item.UseSound = SoundID.Item1; + item.height = 160; + item.value = 100000000; + item.shoot = mod.ProjectileType("TriactisOPHammer"); + item.shootSpeed = 25f; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(null, "TruePaladinsHammer"); + recipe.AddIngredient(ItemID.SoulofMight, 30); + recipe.AddIngredient(null, "ShadowspecBar", 5); + recipe.AddTile(null, "DraedonsForge"); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } +} diff --git a/Items/CalamityCustomThrowingDamage/TriactisTruePaladinianMageHammerofMight.png b/Items/CalamityCustomThrowingDamage/TriactisTruePaladinianMageHammerofMight.png new file mode 100644 index 0000000000..3f86fa3c6d Binary files /dev/null and b/Items/CalamityCustomThrowingDamage/TriactisTruePaladinianMageHammerofMight.png differ diff --git a/Items/CalamityCustomThrowingDamage/TruePaladinsHammer.cs b/Items/CalamityCustomThrowingDamage/TruePaladinsHammer.cs new file mode 100644 index 0000000000..9d4b088850 --- /dev/null +++ b/Items/CalamityCustomThrowingDamage/TruePaladinsHammer.cs @@ -0,0 +1,50 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Items; + +namespace CalamityMod.Items.CalamityCustomThrowingDamage +{ + public class TruePaladinsHammer : CalamityDamageItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("True Paladin's Hammer"); + } + + public override void SafeSetDefaults() + { + item.width = 14; + item.damage = 180; + item.noMelee = true; + item.noUseGraphic = true; + item.autoReuse = true; + item.useAnimation = 13; + item.useStyle = 1; + item.useTime = 13; + item.knockBack = 20f; + item.UseSound = SoundID.Item1; + item.height = 28; + item.value = 9000000; + item.rare = 9; + item.shoot = mod.ProjectileType("OPHammer"); + item.shootSpeed = 14f; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ItemID.PaladinsHammer); + recipe.AddIngredient(null, "CalamityDust", 5); + recipe.AddIngredient(null, "CoreofChaos", 5); + recipe.AddIngredient(null, "CruptixBar", 5); + recipe.AddTile(TileID.MythrilAnvil); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } +} diff --git a/Items/CalamityCustomThrowingDamage/TruePaladinsHammer.png b/Items/CalamityCustomThrowingDamage/TruePaladinsHammer.png new file mode 100644 index 0000000000..b527ef88b6 Binary files /dev/null and b/Items/CalamityCustomThrowingDamage/TruePaladinsHammer.png differ diff --git a/Items/CalamityCustomThrowingDamage/UrchinStinger.cs b/Items/CalamityCustomThrowingDamage/UrchinStinger.cs new file mode 100644 index 0000000000..300fec2edf --- /dev/null +++ b/Items/CalamityCustomThrowingDamage/UrchinStinger.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Items; + +namespace CalamityMod.Items.CalamityCustomThrowingDamage +{ + public class UrchinStinger : CalamityDamageItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Urchin Stinger"); + } + + public override void SafeSetDefaults() + { + item.width = 10; + item.damage = 15; + item.noMelee = true; + item.consumable = true; + item.noUseGraphic = true; + item.useAnimation = 14; + item.useStyle = 1; + item.useTime = 14; + item.knockBack = 1.5f; + item.UseSound = SoundID.Item1; + item.autoReuse = true; + item.height = 26; + item.maxStack = 999; + item.value = 200; + item.rare = 1; + item.shoot = mod.ProjectileType("UrchinStinger"); + item.shootSpeed = 12f; + } + } +} diff --git a/Items/CalamityCustomThrowingDamage/UrchinStinger.png b/Items/CalamityCustomThrowingDamage/UrchinStinger.png new file mode 100644 index 0000000000..a5c38c11b9 Binary files /dev/null and b/Items/CalamityCustomThrowingDamage/UrchinStinger.png differ diff --git a/Items/CalamityCustomThrowingDamage/Valediction.cs b/Items/CalamityCustomThrowingDamage/Valediction.cs new file mode 100644 index 0000000000..ffe0e1e0ad --- /dev/null +++ b/Items/CalamityCustomThrowingDamage/Valediction.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.CalamityCustomThrowingDamage +{ + public class Valediction : CalamityDamageItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Valediction"); + Tooltip.SetDefault("Throws a homing reaper scythe"); + } + + public override void SafeSetDefaults() + { + item.width = 80; + item.damage = 405; + item.noMelee = true; + item.noUseGraphic = true; + item.useAnimation = 15; + item.useTime = 15; + item.useStyle = 1; + item.knockBack = 7f; + item.UseSound = SoundID.Item1; + item.autoReuse = true; + item.height = 64; + item.value = 3000000; + item.shoot = mod.ProjectileType("Valediction"); + item.shootSpeed = 20f; + } + } +} diff --git a/Items/CalamityCustomThrowingDamage/Valediction.png b/Items/CalamityCustomThrowingDamage/Valediction.png new file mode 100644 index 0000000000..1c3cefaf35 Binary files /dev/null and b/Items/CalamityCustomThrowingDamage/Valediction.png differ diff --git a/Items/CalamityCustomThrowingDamage/WulfrumKnife.cs b/Items/CalamityCustomThrowingDamage/WulfrumKnife.cs new file mode 100644 index 0000000000..86cc8dae2d --- /dev/null +++ b/Items/CalamityCustomThrowingDamage/WulfrumKnife.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Items; + +namespace CalamityMod.Items.CalamityCustomThrowingDamage +{ + public class WulfrumKnife : CalamityDamageItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Wulfrum Knife"); + } + + public override void SafeSetDefaults() + { + item.width = 22; + item.damage = 8; + item.noMelee = true; + item.consumable = true; + item.noUseGraphic = true; + item.useAnimation = 15; + item.useStyle = 1; + item.useTime = 15; + item.knockBack = 1f; + item.UseSound = SoundID.Item1; + item.autoReuse = true; + item.height = 38; + item.maxStack = 999; + item.value = 100; + item.rare = 1; + item.shoot = mod.ProjectileType("WulfrumKnife"); + item.shootSpeed = 12f; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(null, "WulfrumShard"); + recipe.AddTile(TileID.Anvils); + recipe.SetResult(this, 50); + recipe.AddRecipe(); + } + } +} diff --git a/Items/CalamityCustomThrowingDamage/WulfrumKnife.png b/Items/CalamityCustomThrowingDamage/WulfrumKnife.png new file mode 100644 index 0000000000..aab1bf448c Binary files /dev/null and b/Items/CalamityCustomThrowingDamage/WulfrumKnife.png differ diff --git a/Items/CalamityCustomThrowingDamage/XerocPitchfork.cs b/Items/CalamityCustomThrowingDamage/XerocPitchfork.cs new file mode 100644 index 0000000000..34775f5fd2 --- /dev/null +++ b/Items/CalamityCustomThrowingDamage/XerocPitchfork.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Items; + +namespace CalamityMod.Items.CalamityCustomThrowingDamage +{ + public class XerocPitchfork : CalamityDamageItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Xeroc Pitchfork"); + } + + public override void SafeSetDefaults() + { + item.width = 48; + item.damage = 180; + item.noMelee = true; + item.consumable = true; + item.noUseGraphic = true; + item.useAnimation = 19; + item.useStyle = 1; + item.useTime = 19; + item.knockBack = 8f; + item.UseSound = SoundID.Item1; + item.autoReuse = true; + item.height = 48; + item.maxStack = 999; + item.value = 10000; + item.rare = 9; + item.shoot = mod.ProjectileType("XerocPitchforkProjectile"); + item.shootSpeed = 16f; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(null, "MeldiateBar"); + recipe.AddTile(TileID.LunarCraftingStation); + recipe.SetResult(this, 20); + recipe.AddRecipe(); + } + } +} diff --git a/Items/CalamityCustomThrowingDamage/XerocPitchfork.png b/Items/CalamityCustomThrowingDamage/XerocPitchfork.png new file mode 100644 index 0000000000..6b1f401a25 Binary files /dev/null and b/Items/CalamityCustomThrowingDamage/XerocPitchfork.png differ diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index 6fcacbe0fd..77edda95fd 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -11,11 +11,73 @@ using Terraria.ModLoader; using Terraria.ModLoader.IO; using CalamityMod; using CalamityMod.NPCs; +using CalamityMod.Items.CalamityCustomThrowingDamage; namespace CalamityMod.Items { public class CalamityGlobalItem : GlobalItem { + public override void SetDefaults(Item item) + { + if (item.maxStack == 99 || item.type == ItemID.Dynamite || item.type == ItemID.StickyDynamite || + item.type == ItemID.BouncyDynamite || item.type == ItemID.StickyBomb || item.type == ItemID.BouncyBomb) + item.maxStack = 999; + + if (item.type >= ItemID.GreenSolution && item.type <= ItemID.RedSolution) + item.value = Item.buyPrice(0, 0, 5, 0); + + if (CalamityMod.weaponAutoreuseList.Contains(item.type)) + item.autoReuse = true; + + if (item.type == ItemID.PsychoKnife) + item.damage *= 4; + else if (CalamityMod.doubleDamageBuffList.Contains(item.type)) + item.damage *= 2; + else if (CalamityMod.sixtySixDamageBuffList.Contains(item.type)) + item.damage = (int)((double)item.damage * 1.66); + else if (CalamityMod.fiftyDamageBuffList.Contains(item.type)) + item.damage = (int)((double)item.damage * 1.5); + else if (CalamityMod.thirtyThreeDamageBuffList.Contains(item.type)) + item.damage = (int)((double)item.damage * 1.33); + else if (CalamityMod.twentyFiveDamageBuffList.Contains(item.type)) + item.damage = (int)((double)item.damage * 1.25); + else if (CalamityMod.twentyDamageBuffList.Contains(item.type)) + item.damage = (int)((double)item.damage * 1.2); + else if (item.type == ItemID.Frostbrand || item.type == ItemID.MagnetSphere) + item.damage = (int)((double)item.damage * 1.1); + else if (item.type == ItemID.Razorpine) + item.damage = (int)((double)item.damage * 0.95); + else if (CalamityMod.quarterDamageNerfList.Contains(item.type)) + item.damage = (int)((double)item.damage * 0.75); + + if (item.type == ItemID.BookStaff) + item.mana = 10; + else if (item.type == ItemID.UnholyTrident) + item.mana = 14; + else if (item.type == ItemID.FrostStaff) + item.mana = 9; + else if (item.type == ItemID.BookofSkulls) + item.mana = 12; + else if (item.type == ItemID.BlizzardStaff) + item.mana = 7; + else if (item.type == ItemID.SolarFlareHelmet) //total defense pre-buff = 78 post-buff = 94 + item.defense = 29; //5 more defense + else if (item.type == ItemID.SolarFlareBreastplate) + item.defense = 41; //7 more defense + else if (item.type == ItemID.SolarFlareLeggings) + item.defense = 24; //4 more defense + else if (item.type == ItemID.GladiatorHelmet) //total defense pre-buff = 7 post-buff = 21 + item.defense = 4; //2 more defense + else if (item.type == ItemID.GladiatorBreastplate) + item.defense = 7; //4 more defense + else if (item.type == ItemID.GladiatorLeggings) + item.defense = 5; //3 more defense + else if (item.type == ItemID.HallowedPlateMail) //total defense pre-buff = 31, 50, 35 post-buff = 36, 55, 40 + item.defense = 18; //3 more defense + else if (item.type == ItemID.HallowedGreaves) + item.defense = 13; //2 more defense + } + public override bool OnPickup(Item item, Player player) { if (item.type == ItemID.Heart || item.type == ItemID.CandyApple || item.type == ItemID.CandyCane) @@ -35,6 +97,43 @@ namespace CalamityMod.Items public override bool CanUseItem(Item item, Player player) { CalamityPlayer modPlayer = player.GetModPlayer(mod); + if (item.type == ItemID.MonkStaffT1) + { + for (int i = 0; i < 1000; ++i) + { + if (Main.projectile[i].active && Main.projectile[i].owner == Main.myPlayer && Main.projectile[i].type == item.shoot) + { + return false; + } + } + return true; + } + if (item.type == ItemID.SpaceGun && player.spaceGun) + { + if (player.statMana >= (int)((float)3 * player.manaCost)) + { + player.manaRegenDelay = (int)player.maxRegenDelay; + player.statMana -= (int)((float)3 * player.manaCost); + } + else if (player.manaFlower) + { + player.QuickMana(); + if (player.statMana >= (int)((float)3 * player.manaCost)) + { + player.manaRegenDelay = (int)player.maxRegenDelay; + player.statMana -= (int)((float)3 * player.manaCost); + } + else + { + return false; + } + } + else + { + return false; + } + return true; + } if ((item.type == ItemID.SuperAbsorbantSponge || item.type == ItemID.EmptyBucket) && modPlayer.ZoneAbyss) { return false; @@ -43,12 +142,9 @@ namespace CalamityMod.Items { return !NPC.AnyNPCs(mod.NPCType("SupremeCalamitas")); } - if (CalamityWorld.revenge) + if (item.type == ItemID.RodofDiscord && modPlayer.scarfCooldown) { - if (item.type == ItemID.RodofDiscord && modPlayer.scarfCooldown) - { - player.AddBuff(BuffID.ChaosState, 720); - } + player.AddBuff(BuffID.ChaosState, 720); } return true; } @@ -264,19 +360,705 @@ namespace CalamityMod.Items } } } + if (item.type == ItemID.SpectreHood) + { + foreach (TooltipLine line2 in tooltips) + { + if (line2.mod == "Terraria" && line2.Name == "Tooltip0") + { + line2.text = "20% decreased magic damage"; + } + } + } + if (item.type == ItemID.MeteorHelmet || item.type == ItemID.MeteorSuit || item.type == ItemID.MeteorLeggings) + { + foreach (TooltipLine line2 in tooltips) + { + if (line2.mod == "Terraria" && line2.Name == "SetBonus") + { + line2.text = "Set Bonus: Reduces the mana cost of the Space Gun by 50%"; + } + } + } + if (item.type == ItemID.CopperHelmet || item.type == ItemID.CopperChainmail || item.type == ItemID.CopperGreaves) + { + foreach (TooltipLine line2 in tooltips) + { + if (line2.mod == "Terraria" && line2.Name == "SetBonus") + { + line2.text = "Set Bonus: +2 defense and 15% increased mining speed"; + } + } + } + if (item.type == ItemID.TinHelmet || item.type == ItemID.TinChainmail || item.type == ItemID.TinGreaves) + { + foreach (TooltipLine line2 in tooltips) + { + if (line2.mod == "Terraria" && line2.Name == "SetBonus") + { + line2.text = "Set Bonus: +2 defense and 10% increased mining speed"; + } + } + } + if (item.type == ItemID.IronHelmet || item.type == ItemID.IronChainmail || item.type == ItemID.IronGreaves) + { + foreach (TooltipLine line2 in tooltips) + { + if (line2.mod == "Terraria" && line2.Name == "SetBonus") + { + line2.text = "Set Bonus: +2 defense and 25% increased mining speed"; + } + } + } + if (item.type == ItemID.LeadHelmet || item.type == ItemID.LeadChainmail || item.type == ItemID.LeadGreaves) + { + foreach (TooltipLine line2 in tooltips) + { + if (line2.mod == "Terraria" && line2.Name == "SetBonus") + { + line2.text = "Set Bonus: +3 defense and 20% increased mining speed"; + } + } + } + if (item.type == ItemID.SilverHelmet || item.type == ItemID.SilverChainmail || item.type == ItemID.SilverGreaves) + { + foreach (TooltipLine line2 in tooltips) + { + if (line2.mod == "Terraria" && line2.Name == "SetBonus") + { + line2.text = "Set Bonus: +3 defense and 35% increased mining speed"; + } + } + } + if (item.type == ItemID.TungstenHelmet || item.type == ItemID.TungstenChainmail || item.type == ItemID.TungstenGreaves) + { + foreach (TooltipLine line2 in tooltips) + { + if (line2.mod == "Terraria" && line2.Name == "SetBonus") + { + line2.text = "Set Bonus: +3 defense and 30% increased mining speed"; + } + } + } + if (item.type == ItemID.GoldHelmet || item.type == ItemID.GoldChainmail || item.type == ItemID.GoldGreaves) + { + foreach (TooltipLine line2 in tooltips) + { + if (line2.mod == "Terraria" && line2.Name == "SetBonus") + { + line2.text = "Set Bonus: +3 defense and 45% increased mining speed"; + } + } + } + if (item.type == ItemID.PlatinumHelmet || item.type == ItemID.PlatinumChainmail || item.type == ItemID.PlatinumGreaves) + { + foreach (TooltipLine line2 in tooltips) + { + if (line2.mod == "Terraria" && line2.Name == "SetBonus") + { + line2.text = "Set Bonus: +4 defense and 40% increased mining speed"; + } + } + } + if (item.type == ItemID.GladiatorHelmet) + { + foreach (TooltipLine line2 in tooltips) + { + if (line2.mod == "Terraria" && line2.Name == "Defense") + { + line2.text = "4 defense\n" + + "5% increased rogue damage"; + } + } + } + if (item.type == ItemID.GladiatorBreastplate) + { + foreach (TooltipLine line2 in tooltips) + { + if (line2.mod == "Terraria" && line2.Name == "Defense") + { + line2.text = "7 defense\n" + + "5% increased rogue critical strike chance"; + } + } + } + if (item.type == ItemID.GladiatorLeggings) + { + foreach (TooltipLine line2 in tooltips) + { + if (line2.mod == "Terraria" && line2.Name == "Defense") + { + line2.text = "5 defense\n" + + "5% increased rogue velocity"; + } + } + } + if (item.type == ItemID.ObsidianHelm) + { + foreach (TooltipLine line2 in tooltips) + { + if (line2.mod == "Terraria" && line2.Name == "Defense") + { + line2.text = "4 defense\n" + + "5% increased rogue damage"; + } + } + } + if (item.type == ItemID.ObsidianShirt) + { + foreach (TooltipLine line2 in tooltips) + { + if (line2.mod == "Terraria" && line2.Name == "Defense") + { + line2.text = "5 defense\n" + + "5% increased rogue critical strike chance"; + } + } + } + if (item.type == ItemID.ObsidianPants) + { + foreach (TooltipLine line2 in tooltips) + { + if (line2.mod == "Terraria" && line2.Name == "Defense") + { + line2.text = "4 defense\n" + + "5% increased rogue velocity"; + } + } + } + if (item.type == ItemID.MagicQuiver) + { + foreach (TooltipLine line2 in tooltips) + { + if (line2.mod == "Terraria" && line2.Name == "Tooltip0") + { + line2.text = "Increases arrow damage by 10% and greatly increases arrow speed"; + } + } + } + if (item.type == ItemID.AngelWings || item.type == ItemID.DemonWings) + { + foreach (TooltipLine line2 in tooltips) + { + if (line2.mod == "Terraria" && line2.Name == "Tooltip0") + { + line2.text = "Allows flight and slow fall\n" + + "Horizontal speed: 6.25\n" + + "Acceleration multiplier: 1\n" + + "Average vertical speed\n" + + "Flight time: 100"; + } + } + } + if (item.type == ItemID.Jetpack) + { + foreach (TooltipLine line2 in tooltips) + { + if (line2.mod == "Terraria" && line2.Name == "Tooltip0") + { + line2.text = "Allows flight and slow fall\n" + + "Horizontal speed: 6.5\n" + + "Acceleration multiplier: 1\n" + + "Average vertical speed\n" + + "Flight time: 115"; + } + } + } + if (item.type == ItemID.ButterflyWings || item.type == ItemID.FairyWings || item.type == ItemID.BeeWings) + { + foreach (TooltipLine line2 in tooltips) + { + if (line2.mod == "Terraria" && line2.Name == "Tooltip0") + { + line2.text = "Allows flight and slow fall\n" + + "Horizontal speed: 6.75\n" + + "Acceleration multiplier: 1\n" + + "Average vertical speed\n" + + "Flight time: 130"; + } + } + } + if (item.type == ItemID.HarpyWings || item.type == ItemID.BoneWings) + { + foreach (TooltipLine line2 in tooltips) + { + if (line2.mod == "Terraria" && line2.Name == "Tooltip0") + { + line2.text = "Allows flight and slow fall\n" + + "Horizontal speed: 7\n" + + "Acceleration multiplier: 1\n" + + "Average vertical speed\n" + + "Flight time: 140"; + } + } + } + if (item.type == ItemID.FlameWings || item.type == ItemID.FrozenWings || item.type == ItemID.GhostWings || + item.type == ItemID.BeetleWings) + { + foreach (TooltipLine line2 in tooltips) + { + if (line2.mod == "Terraria" && line2.Name == "Tooltip0") + { + line2.text = "Allows flight and slow fall\n" + + "Horizontal speed: 7.5\n" + + "Acceleration multiplier: 1\n" + + "Average vertical speed\n" + + "Flight time: 160"; + } + } + } + if (item.type == ItemID.FinWings) + { + foreach (TooltipLine line2 in tooltips) + { + if (line2.mod == "Terraria" && line2.Name == "Tooltip0") + { + line2.text = "Allows flight and slow fall\n" + + "Horizontal speed: 0\n" + + "Acceleration multiplier: 0\n" + + "Average vertical speed\n" + + "Flight time: 100"; + } + } + } + if (item.type == ItemID.FishronWings) + { + foreach (TooltipLine line2 in tooltips) + { + if (line2.mod == "Terraria" && line2.Name == "Tooltip0") + { + line2.text = "Allows flight and slow fall\n" + + "Horizontal speed: 8\n" + + "Acceleration multiplier: 2\n" + + "Good vertical speed\n" + + "Flight time: 180"; + } + } + } + if (item.type == ItemID.SteampunkWings) + { + foreach (TooltipLine line2 in tooltips) + { + if (line2.mod == "Terraria" && line2.Name == "Tooltip0") + { + line2.text = "Allows flight and slow fall\n" + + "Horizontal speed: 7.75\n" + + "Acceleration multiplier: 1\n" + + "Average vertical speed\n" + + "Flight time: 180"; + } + } + } + if (item.type == ItemID.LeafWings) + { + foreach (TooltipLine line2 in tooltips) + { + if (line2.mod == "Terraria" && line2.Name == "Tooltip0") + { + line2.text = "Allows flight and slow fall\n" + + "Horizontal speed: 6.75\n" + + "Acceleration multiplier: 1\n" + + "Average vertical speed\n" + + "Flight time: 160"; + } + } + } + if (item.type == ItemID.BatWings) + { + foreach (TooltipLine line2 in tooltips) + { + if (line2.mod == "Terraria" && line2.Name == "Tooltip0") + { + line2.text = "Allows flight and slow fall\n" + + "Horizontal speed: 0\n" + + "Acceleration multiplier: 0\n" + + "Average vertical speed\n" + + "Flight time: 140"; + } + } + } + if (item.type == ItemID.Yoraiz0rWings || item.type == ItemID.JimsWings || item.type == ItemID.SkiphsWings || + item.type == ItemID.LokisWings || item.type == ItemID.ArkhalisWings || item.type == ItemID.LeinforsWings || + item.type == ItemID.BejeweledValkyrieWing || item.type == ItemID.RedsWings || item.type == ItemID.DTownsWings || + item.type == ItemID.WillsWings || item.type == ItemID.CrownosWings || item.type == ItemID.CenxsWings) + { + foreach (TooltipLine line2 in tooltips) + { + if (line2.mod == "Terraria" && line2.Name == "Tooltip0") + { + line2.text = "'Great for impersonating devs!'\n" + + "Horizontal speed: 7\n" + + "Acceleration multiplier: 1\n" + + "Average vertical speed\n" + + "Flight time: 150"; + } + } + } + if (item.type == ItemID.TatteredFairyWings || item.type == ItemID.SpookyWings) + { + foreach (TooltipLine line2 in tooltips) + { + if (line2.mod == "Terraria" && line2.Name == "Tooltip0") + { + line2.text = "Allows flight and slow fall\n" + + "Horizontal speed: 7.5\n" + + "Acceleration multiplier: 1\n" + + "Average vertical speed\n" + + "Flight time: 180"; + } + } + } + if (item.type == ItemID.Hoverboard) + { + foreach (TooltipLine line2 in tooltips) + { + if (line2.mod == "Terraria" && line2.Name == "Tooltip0") + { + line2.text = "Allows flight and slow fall\n" + + "Horizontal speed: 6.25\n" + + "Acceleration multiplier: 1\n" + + "Average vertical speed\n" + + "Flight time: 170"; + } + } + } + if (item.type == ItemID.FestiveWings) + { + foreach (TooltipLine line2 in tooltips) + { + if (line2.mod == "Terraria" && line2.Name == "Tooltip0") + { + line2.text = "Allows flight and slow fall\n" + + "Horizontal speed: 7.5\n" + + "Acceleration multiplier: 1\n" + + "Average vertical speed\n" + + "Flight time: 170"; + } + } + } + if (item.type == ItemID.MothronWings) + { + foreach (TooltipLine line2 in tooltips) + { + if (line2.mod == "Terraria" && line2.Name == "Tooltip0") + { + line2.text = "Allows flight and slow fall\n" + + "Horizontal speed: 0\n" + + "Acceleration multiplier: 0\n" + + "Average vertical speed\n" + + "Flight time: 160"; + } + } + } + if (item.type == ItemID.WingsSolar || item.type == ItemID.WingsStardust) + { + foreach (TooltipLine line2 in tooltips) + { + if (line2.mod == "Terraria" && line2.Name == "Tooltip0") + { + line2.text = "Allows flight and slow fall\n" + + "Horizontal speed: 9\n" + + "Acceleration multiplier: 2.5\n" + + "Great vertical speed\n" + + "Flight time: 180"; + } + } + } + if (item.type == ItemID.WingsVortex || item.type == ItemID.WingsNebula) + { + foreach (TooltipLine line2 in tooltips) + { + if (line2.mod == "Terraria" && line2.Name == "Tooltip0") + { + line2.text = "Allows flight and slow fall\n" + + "Horizontal speed: 6.5\n" + + "Acceleration multiplier: 1.5\n" + + "Good vertical speed\n" + + "Flight time: 160"; + } + } + } + if (item.type == ItemID.BetsyWings) + { + foreach (TooltipLine line2 in tooltips) + { + if (line2.mod == "Terraria" && line2.Name == "Equipable") + { + line2.text = "Equipable\n" + + "Allows flight and slow fall\n" + + "Horizontal speed: 6\n" + + "Acceleration multiplier: 2.5\n" + + "Good vertical speed\n" + + "Flight time: 150"; + } + } + } + if (item.accessory) + { + if (item.prefix == 67) + { + foreach (TooltipLine line2 in tooltips) + { + if (line2.mod == "Terraria" && line2.Name == "PrefixAccCritChance") + { + line2.text = "+1% critical strike chance"; + } + } + } + if (item.prefix == 68) + { + foreach (TooltipLine line2 in tooltips) + { + if (line2.mod == "Terraria" && line2.Name == "PrefixAccCritChance") + { + line2.text = "+2% critical strike chance"; + } + } + } + if (item.prefix == 62) + { + foreach (TooltipLine line2 in tooltips) + { + if (line2.mod == "Terraria" && line2.Name == "PrefixAccDefense") + { + line2.text = "+1 defense\n" + + "+0.25% damage reduction"; + } + } + } + if (item.prefix == 63) + { + foreach (TooltipLine line2 in tooltips) + { + if (line2.mod == "Terraria" && line2.Name == "PrefixAccDefense") + { + line2.text = "+2 defense\n" + + "+0.5% damage reduction"; + } + } + } + if (item.prefix == 64) + { + foreach (TooltipLine line2 in tooltips) + { + if (line2.mod == "Terraria" && line2.Name == "PrefixAccDefense") + { + line2.text = "+3 defense\n" + + "+0.75% damage reduction"; + } + } + } + if (item.prefix == 65) + { + foreach (TooltipLine line2 in tooltips) + { + if (line2.mod == "Terraria" && line2.Name == "PrefixAccDefense") + { + line2.text = "+4 defense\n" + + "+1% damage reduction"; + } + } + } + } + } + + public override string IsArmorSet(Item head, Item body, Item legs) + { + if (head.type == ItemID.CopperHelmet && body.type == ItemID.CopperChainmail && legs.type == ItemID.CopperGreaves) + return "Copper"; + if (head.type == ItemID.TinHelmet && body.type == ItemID.TinChainmail && legs.type == ItemID.TinGreaves) + return "Tin"; + if (head.type == ItemID.IronHelmet && body.type == ItemID.IronChainmail && legs.type == ItemID.IronGreaves) + return "Iron"; + if (head.type == ItemID.LeadHelmet && body.type == ItemID.LeadChainmail && legs.type == ItemID.LeadGreaves) + return "Lead"; + if (head.type == ItemID.SilverHelmet && body.type == ItemID.SilverChainmail && legs.type == ItemID.SilverGreaves) + return "Silver"; + if (head.type == ItemID.TungstenHelmet && body.type == ItemID.TungstenChainmail && legs.type == ItemID.TungstenGreaves) + return "Tungsten"; + if (head.type == ItemID.GoldHelmet && body.type == ItemID.GoldChainmail && legs.type == ItemID.GoldGreaves) + return "Gold"; + if (head.type == ItemID.PlatinumHelmet && body.type == ItemID.PlatinumChainmail && legs.type == ItemID.PlatinumGreaves) + return "Platinum"; + if (head.type == ItemID.GladiatorHelmet && body.type == ItemID.GladiatorBreastplate && legs.type == ItemID.GladiatorLeggings) + return "Gladiator"; + if (head.type == ItemID.ObsidianHelm && body.type == ItemID.ObsidianShirt && legs.type == ItemID.ObsidianPants) + return "Obsidian"; + if (head.type == ItemID.PumpkinHelmet && body.type == ItemID.PumpkinBreastplate && legs.type == ItemID.PumpkinLeggings) + return "PumpMyAssFull"; + return ""; + } + + public override void UpdateArmorSet(Player player, string set) + { + if (set == "Copper") + player.pickSpeed -= 0.15f; + else if (set == "Tin") + player.pickSpeed -= 0.1f; + else if (set == "Iron") + player.pickSpeed -= 0.25f; + else if (set == "Lead") + player.pickSpeed -= 0.2f; + else if (set == "Silver") + player.pickSpeed -= 0.35f; + else if (set == "Tungsten") + player.pickSpeed -= 0.3f; + else if (set == "Gold") + player.pickSpeed -= 0.45f; + else if (set == "Platinum") + player.pickSpeed -= 0.4f; + else if (set == "Gladiator") + { + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.1f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingVelocity += 0.1f; + player.statDefense += 5; + player.setBonus = "+5 defense\n" + + "10% increased rogue damage and velocity"; + } + else if (set == "Obsidian") + { + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.1f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 10; + player.statDefense += 3; + player.fireWalk = true; + player.lavaMax += 300; + player.setBonus = "+3 defense\n" + + "10% increased rogue damage and critical strike chance\n" + + "Grants immunity to fire blocks and temporary immunity to lava"; + } + else if (set == "PumpMyAssFull") + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.1f; + } + + public override void UpdateEquip(Item item, Player player) + { + if (item.type == ItemID.SpectreHood) + player.magicDamage += 0.2f; + else if (item.type == ItemID.GladiatorHelmet || item.type == ItemID.ObsidianHelm) + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.05f; + else if (item.type == ItemID.CrimsonHelmet) + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.02f; + + if (item.type == ItemID.GladiatorBreastplate || item.type == ItemID.ObsidianShirt) + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 5; + else if (item.type == ItemID.CrimsonScalemail) + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.02f; + else if (item.type == ItemID.PalladiumBreastplate) + { + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.03f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 2; + } + else if (item.type == ItemID.CobaltBreastplate) + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 3; + else if (item.type == ItemID.MythrilChainmail) + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.05f; + else if (item.type == ItemID.OrichalcumBreastplate) + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 6; + else if (item.type == ItemID.AdamantiteBreastplate) + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.06f; + else if (item.type == ItemID.TitaniumBreastplate) + { + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.04f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 3; + } + else if (item.type == ItemID.HallowedPlateMail) + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 7; + else if (item.type == ItemID.ChlorophytePlateMail) + { + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.05f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 7; + } + else if (item.type == ItemID.Gi) + { + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.05f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 5; + } + + if (item.type == ItemID.GladiatorLeggings || item.type == ItemID.ObsidianPants) + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingVelocity += 0.05f; + else if (item.type == ItemID.CrimsonGreaves) + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.02f; + else if (item.type == ItemID.PalladiumLeggings) + { + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.02f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 1; + } + else if (item.type == ItemID.MythrilGreaves) + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 3; + else if (item.type == ItemID.AdamantiteLeggings) + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 4; + else if (item.type == ItemID.TitaniumLeggings) + { + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.03f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 3; + } + else if (item.type == ItemID.HallowedGreaves) + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.07f; + else if (item.type == ItemID.ChlorophyteGreaves) + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 8; } public override void UpdateAccessory(Item item, Player player, bool hideVisual) { CalamityPlayer modPlayer = player.GetModPlayer(mod); + if (item.type == ItemID.JellyfishNecklace || item.type == ItemID.JellyfishDivingGear || item.type == ItemID.ArcticDivingGear) - { modPlayer.jellyfishNecklace = true; - } + if (item.type == ItemID.WormScarf) - { player.endurance -= 0.07f; + + if (item.type == ItemID.AvengerEmblem) + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.12f; + if (item.type == ItemID.CelestialStone || item.type == ItemID.CelestialShell || (item.type == ItemID.MoonStone && !Main.dayTime) || + (item.type == ItemID.SunStone && Main.dayTime)) + { + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.1f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 2; } + if (item.type == ItemID.DestroyerEmblem) + { + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.1f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 8; + } + if (item.type == ItemID.EyeoftheGolem) + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 10; + if (item.type == ItemID.PutridScent) + { + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.05f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 5; + } + + if (item.prefix == 62) + player.endurance += 0.0025f; + if (item.prefix == 63) + player.endurance += 0.005f; + if (item.prefix == 64) + player.endurance += 0.0075f; + if (item.prefix == 65) + player.endurance += 0.01f; + if (item.prefix == 67) + { + player.meleeCrit -= 1; + player.rangedCrit -= 1; + player.magicCrit -= 1; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 1; + } + if (item.prefix == 68) + { + player.meleeCrit -= 2; + player.rangedCrit -= 2; + player.magicCrit -= 2; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 2; + } + if (item.prefix == 69) + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.01f; + if (item.prefix == 70) + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.02f; + if (item.prefix == 71) + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.03f; + if (item.prefix == 72) + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.04f; } /// diff --git a/Items/Crabulon/FungalClump.cs b/Items/Crabulon/FungalClump.cs index fd0a220c84..89d1d0779d 100644 --- a/Items/Crabulon/FungalClump.cs +++ b/Items/Crabulon/FungalClump.cs @@ -28,8 +28,8 @@ namespace CalamityMod.Items.Crabulon { item.width = 20; item.height = 26; - item.value = 40000; - item.expert = true; + item.value = Item.buyPrice(0, 9, 0, 0); + item.expert = true; item.accessory = true; } diff --git a/Items/Cryogen/CryoStone.cs b/Items/Cryogen/CryoStone.cs index ccd8c36a17..8ace9c4d9a 100644 --- a/Items/Cryogen/CryoStone.cs +++ b/Items/Cryogen/CryoStone.cs @@ -6,6 +6,7 @@ using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items; +using CalamityMod.Items.CalamityCustomThrowingDamage; namespace CalamityMod.Items.Cryogen { @@ -15,7 +16,7 @@ namespace CalamityMod.Items.Cryogen { DisplayName.SetDefault("Cryo Stone"); Tooltip.SetDefault("One of the ancient relics\n" + - "Increases damage reduction by 5% and all damage and crit chance by 2%"); + "Increases damage reduction by 5% and all damage by 3%"); Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(6, 5)); } @@ -23,7 +24,7 @@ namespace CalamityMod.Items.Cryogen { item.width = 20; item.height = 20; - item.value = 500000; + item.value = Item.buyPrice(0, 15, 0, 0); item.rare = 5; item.defense = 6; item.accessory = true; @@ -33,15 +34,11 @@ namespace CalamityMod.Items.Cryogen { Lighting.AddLight((int)player.Center.X / 16, (int)player.Center.Y / 16, 0f, 0.25f, 0.6f); player.endurance += 0.05f; - player.meleeCrit += 2; - player.meleeDamage += 0.02f; - player.magicCrit += 2; - player.magicDamage += 0.02f; - player.rangedCrit += 2; - player.rangedDamage += 0.02f; - player.thrownCrit += 2; - player.thrownDamage += 0.02f; - player.minionDamage += 0.02f; + player.meleeDamage += 0.03f; + player.magicDamage += 0.03f; + player.rangedDamage += 0.03f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.03f; + player.minionDamage += 0.03f; } } } diff --git a/Items/Cryogen/SoulofCryogen.cs b/Items/Cryogen/SoulofCryogen.cs index 2dcc974af4..6e92722f5e 100644 --- a/Items/Cryogen/SoulofCryogen.cs +++ b/Items/Cryogen/SoulofCryogen.cs @@ -5,7 +5,7 @@ using Terraria; using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; -using CalamityMod.Items; +using CalamityMod.Items.CalamityCustomThrowingDamage; namespace CalamityMod.Items.Cryogen { @@ -17,10 +17,12 @@ namespace CalamityMod.Items.Cryogen DisplayName.SetDefault("Soul of Cryogen"); Tooltip.SetDefault("The magic of the ancient ice castle is yours\n" + "Counts as wings\n" + - "Decent acceleration: 1.35\n" + - "Decent flight time: 60\n" + + "Horizontal speed: 6.25\n" + + "Acceleration multiplier: 1\n" + + "Average vertical speed\n" + + "Flight time: 100\n" + "5% increase to all damage and pick speed\n" + - "Frost damage added to melee swings"); + "Frost damage added to melee projectiles and melee attacks"); Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(8, 4)); } @@ -28,7 +30,7 @@ namespace CalamityMod.Items.Cryogen { item.width = 26; item.height = 26; - item.value = 500000; + item.value = Item.buyPrice(0, 39, 99, 99); item.expert = true; item.accessory = true; } @@ -43,30 +45,30 @@ namespace CalamityMod.Items.Cryogen public override void VerticalWingSpeeds(Player player, ref float ascentWhenFalling, ref float ascentWhenRising, ref float maxCanAscendMultiplier, ref float maxAscentMultiplier, ref float constantAscend) { - ascentWhenFalling = 0.85f; - ascentWhenRising = 0.15f; - maxCanAscendMultiplier = 1f; - maxAscentMultiplier = 3f; - constantAscend = 0.135f; + ascentWhenFalling = 0.5f; + ascentWhenRising = 0.1f; + maxCanAscendMultiplier = 0.5f; + maxAscentMultiplier = 1.5f; + constantAscend = 0.1f; } public override void HorizontalWingSpeeds(Player player, ref float speed, ref float acceleration) { - speed = 8f; - acceleration *= 1.35f; + speed = 6.25f; } public override void UpdateAccessory(Player player, bool hideVisual) { CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityCustomThrowingDamagePlayer modPlayer2 = CalamityCustomThrowingDamagePlayer.ModPlayer(player); modPlayer.cryogenSoul = true; player.pickSpeed -= 0.05f; player.magicDamage += 0.05f; player.rangedDamage += 0.05f; player.meleeDamage += 0.05f; player.minionDamage += 0.05f; - player.thrownDamage += 0.05f; - player.wingTimeMax = 60; + modPlayer2.throwingDamage += 0.05f; + player.wingTimeMax = 100; } } } \ No newline at end of file diff --git a/Items/Death.cs b/Items/Death.cs index d92be9b3ea..979caa1841 100644 --- a/Items/Death.cs +++ b/Items/Death.cs @@ -87,5 +87,13 @@ namespace CalamityMod.Items } return true; } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddTile(TileID.DemonAltar); + recipe.SetResult(this); + recipe.AddRecipe(); + } } } \ No newline at end of file diff --git a/Items/DefiledRune.cs b/Items/DefiledRune.cs index 961e025a65..c0760ec37c 100644 --- a/Items/DefiledRune.cs +++ b/Items/DefiledRune.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items public override void SetStaticDefaults() { DisplayName.SetDefault("Defiled Rune"); - Tooltip.SetDefault("Halves your max HP and increases enemy damage resistance by 50%\n" + + Tooltip.SetDefault("Wings do nothing\n" + "Increases most rare item drop chances and enemies drop 2 times the cash\n" + "Using this while a boss is alive will instantly kill you and despawn the boss\n" + "Can only be used in revengeance and death mode\n" + @@ -91,5 +91,13 @@ namespace CalamityMod.Items } return true; } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddTile(TileID.DemonAltar); + recipe.SetResult(this); + recipe.AddRecipe(); + } } } \ No newline at end of file diff --git a/Items/DesertScourge/AeroStone.cs b/Items/DesertScourge/AeroStone.cs index cb79aa3251..87de3e5497 100644 --- a/Items/DesertScourge/AeroStone.cs +++ b/Items/DesertScourge/AeroStone.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.DesertScourge { item.width = 20; item.height = 20; - item.value = 500000; + item.value = Item.buyPrice(0, 15, 0, 0); item.rare = 5; item.accessory = true; } diff --git a/Items/DesertScourge/OceanCrest.cs b/Items/DesertScourge/OceanCrest.cs index d2bc8f3419..1460e0fe80 100644 --- a/Items/DesertScourge/OceanCrest.cs +++ b/Items/DesertScourge/OceanCrest.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.DesertScourge { item.width = 18; item.height = 26; - item.value = 100000; + item.value = Item.buyPrice(0, 6, 0, 0); item.rare = 2; item.accessory = true; item.expert = true; diff --git a/Items/DimensionalSoulArtifact.cs b/Items/DimensionalSoulArtifact.cs index 6946be7490..60f8fadaf3 100644 --- a/Items/DimensionalSoulArtifact.cs +++ b/Items/DimensionalSoulArtifact.cs @@ -14,8 +14,8 @@ namespace CalamityMod.Items { DisplayName.SetDefault("Dimensional Soul Artifact"); Tooltip.SetDefault("Power\n" + - "Boosts all damage and critical strike chance by 15%\n" + - "This boost bypasses the damage and critical strike chance caps, but at what cost?"); + "Boosts all damage by 25%\n" + + "But at what cost?"); } public override void SetDefaults() diff --git a/Items/DraedonsRemote.cs b/Items/DraedonsRemote.cs index 384f6c49f0..8694cb4ab4 100644 --- a/Items/DraedonsRemote.cs +++ b/Items/DraedonsRemote.cs @@ -44,25 +44,5 @@ namespace CalamityMod.Items Main.PlaySound(SoundID.Roar, player.position, 0); return true; } - - public override void AddRecipes() - { - ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(ItemID.IronBar, 10); - recipe.AddIngredient(ItemID.SoulofLight, 15); - recipe.AddIngredient(ItemID.SoulofNight, 15); - recipe.AddIngredient(null, "MeldBlob", 20); - recipe.AddTile(TileID.LunarCraftingStation); - recipe.SetResult(this); - recipe.AddRecipe(); - recipe = new ModRecipe(mod); - recipe.AddIngredient(ItemID.LeadBar, 10); - recipe.AddIngredient(ItemID.SoulofLight, 15); - recipe.AddIngredient(ItemID.SoulofNight, 15); - recipe.AddIngredient(null, "MeldBlob", 20); - recipe.AddTile(TileID.LunarCraftingStation); - recipe.SetResult(this); - recipe.AddRecipe(); - } } } \ No newline at end of file diff --git a/Items/EldritchSoulArtifact.cs b/Items/EldritchSoulArtifact.cs index 548a695cc7..1599b813ff 100644 --- a/Items/EldritchSoulArtifact.cs +++ b/Items/EldritchSoulArtifact.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Items { DisplayName.SetDefault("Eldritch Soul Artifact"); Tooltip.SetDefault("Knowledge\n" + - "Boosts melee speed by 10%, shoot speed by 25%, throwing damage by 10%, max minions by 2, and reduces mana cost by 15%"); + "Boosts melee speed by 10%, shoot speed by 25%, rogue damage by 10%, max minions by 2, and reduces mana cost by 15%"); } public override void SetDefaults() diff --git a/Items/FabsolStuff/BloodyMary.cs b/Items/FabsolStuff/BloodyMary.cs index c86c0932d2..23a46d9eda 100644 --- a/Items/FabsolStuff/BloodyMary.cs +++ b/Items/FabsolStuff/BloodyMary.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.FabsolStuff public override void SetStaticDefaults() { DisplayName.SetDefault("Bloody Mary"); - Tooltip.SetDefault(@"Boosts damage, critical strike chance, movement speed, and melee speed by 15% during a Blood Moon + Tooltip.SetDefault(@"Boosts damage, movement speed, and melee speed by 15% and crit chance by 7% during a Blood Moon Reduces life regen by 3 and defense by 6 Extra spicy and bloody!"); } diff --git a/Items/FabsolStuff/Everclear.cs b/Items/FabsolStuff/Everclear.cs index 2e28e53083..9773845c64 100644 --- a/Items/FabsolStuff/Everclear.cs +++ b/Items/FabsolStuff/Everclear.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.FabsolStuff public override void SetStaticDefaults() { DisplayName.SetDefault("Everclear"); - Tooltip.SetDefault(@"Boosts damage and critical strike chance by 20% + Tooltip.SetDefault(@"Boosts damage by 25% Reduces life regen by 20 and defense by 40 This is the most potent booze I have, be careful with it"); } diff --git a/Items/FabsolStuff/GrapeBeer.cs b/Items/FabsolStuff/GrapeBeer.cs index 90a26ba571..cce27c3272 100644 --- a/Items/FabsolStuff/GrapeBeer.cs +++ b/Items/FabsolStuff/GrapeBeer.cs @@ -12,7 +12,8 @@ namespace CalamityMod.Items.FabsolStuff { DisplayName.SetDefault("Grape Beer"); Tooltip.SetDefault(@"Reduces life regen by 1, defense by 2, and movement speed by 5% -This crap is abhorrent but you might like it"); +This crap is abhorrent but you might like it +Restores 100 life and mana"); } public override void SetDefaults() @@ -27,8 +28,6 @@ This crap is abhorrent but you might like it"); item.useStyle = 2; item.UseSound = SoundID.Item3; item.consumable = true; - item.healLife = 100; - item.healMana = 100; item.buffType = mod.BuffType("GrapeBeer"); item.buffTime = 3600; //3600 = 1 minute item.value = Item.buyPrice(0, 0, 65, 0); @@ -39,10 +38,31 @@ This crap is abhorrent but you might like it"); return player.FindBuffIndex(BuffID.PotionSickness) == -1; } - public override bool UseItem(Player player) + public override bool ConsumeItem(Player player) { + return player.FindBuffIndex(BuffID.PotionSickness) == -1; + } + + public override void OnConsumeItem(Player player) + { + player.statLife += 100; + player.statMana += 100; + if (player.statLife > player.statLifeMax2) + { + player.statLife = player.statLifeMax2; + } + if (player.statMana > player.statManaMax2) + { + player.statMana = player.statManaMax2; + } + player.AddBuff(BuffID.ManaSickness, Player.manaSickTime, true); + if (Main.myPlayer == player.whoAmI) + { + player.HealEffect(100, true); + player.ManaEffect(100); + } + player.AddBuff(mod.BuffType("GrapeBeer"), 3600); player.AddBuff(BuffID.PotionSickness, (player.pStone ? 2700 : 3600)); - return true; } } } diff --git a/Items/FabsolStuff/Margarita.cs b/Items/FabsolStuff/Margarita.cs index 4f8f77855a..082d061357 100644 --- a/Items/FabsolStuff/Margarita.cs +++ b/Items/FabsolStuff/Margarita.cs @@ -13,7 +13,8 @@ namespace CalamityMod.Items.FabsolStuff DisplayName.SetDefault("Margarita"); Tooltip.SetDefault(@"Makes you immune to most debuffs Reduces defense by 6 and life regen by 3 -One of the best drinks ever created, enjoy it while it lasts"); +One of the best drinks ever created, enjoy it while it lasts +Restores 200 life and mana"); } public override void SetDefaults() @@ -28,8 +29,6 @@ One of the best drinks ever created, enjoy it while it lasts"); item.useStyle = 2; item.UseSound = SoundID.Item3; item.consumable = true; - item.healLife = 200; - item.healMana = 200; item.buffType = mod.BuffType("Margarita"); item.buffTime = 10800; //3 minutes item.value = Item.buyPrice(0, 23, 30, 0); @@ -40,10 +39,31 @@ One of the best drinks ever created, enjoy it while it lasts"); return player.FindBuffIndex(BuffID.PotionSickness) == -1; } - public override bool UseItem(Player player) + public override bool ConsumeItem(Player player) { + return player.FindBuffIndex(BuffID.PotionSickness) == -1; + } + + public override void OnConsumeItem(Player player) + { + player.statLife += 200; + player.statMana += 200; + if (player.statLife > player.statLifeMax2) + { + player.statLife = player.statLifeMax2; + } + if (player.statMana > player.statManaMax2) + { + player.statMana = player.statManaMax2; + } + player.AddBuff(BuffID.ManaSickness, Player.manaSickTime, true); + if (Main.myPlayer == player.whoAmI) + { + player.HealEffect(200, true); + player.ManaEffect(200); + } + player.AddBuff(mod.BuffType("Margarita"), 10800); player.AddBuff(BuffID.PotionSickness, (player.pStone ? 2700 : 3600)); - return true; } } } diff --git a/Items/FabsolStuff/MoscowMule.cs b/Items/FabsolStuff/MoscowMule.cs index cdd1831b52..32593e3459 100644 --- a/Items/FabsolStuff/MoscowMule.cs +++ b/Items/FabsolStuff/MoscowMule.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.FabsolStuff public override void SetStaticDefaults() { DisplayName.SetDefault("Moscow Mule"); - Tooltip.SetDefault(@"Boosts damage, critical strike chance, and knockback by 12% + Tooltip.SetDefault(@"Boosts damage and knockback by 12% and critical strike chance by 3% Reduces life regen by 3 I once heard the copper mug can be toxic and I told 'em 'listen dummy, I'm already poisoning myself'"); } diff --git a/Items/FabsolStuff/RedWine.cs b/Items/FabsolStuff/RedWine.cs index 37a2c13f4f..0efd07b1b6 100644 --- a/Items/FabsolStuff/RedWine.cs +++ b/Items/FabsolStuff/RedWine.cs @@ -12,7 +12,9 @@ namespace CalamityMod.Items.FabsolStuff { DisplayName.SetDefault("Red Wine"); Tooltip.SetDefault(@"Reduces life regen by 2 -Too dry for my taste"); +Too dry for my taste +15 second duration +Restores 200 life"); } public override void SetDefaults() @@ -27,9 +29,8 @@ Too dry for my taste"); item.useStyle = 2; item.UseSound = SoundID.Item3; item.consumable = true; - item.healLife = 200; item.buffType = mod.BuffType("RedWine"); - item.buffTime = 900; //3600 = 1 minute + item.buffTime = 900; item.value = Item.buyPrice(0, 2, 0, 0); } @@ -38,10 +39,24 @@ Too dry for my taste"); return player.FindBuffIndex(BuffID.PotionSickness) == -1; } - public override bool UseItem(Player player) + public override bool ConsumeItem(Player player) { + return player.FindBuffIndex(BuffID.PotionSickness) == -1; + } + + public override void OnConsumeItem(Player player) + { + player.statLife += 200; + if (player.statLife > player.statLifeMax2) + { + player.statLife = player.statLifeMax2; + } + if (Main.myPlayer == player.whoAmI) + { + player.HealEffect(200, true); + } + player.AddBuff(mod.BuffType("RedWine"), 900); player.AddBuff(BuffID.PotionSickness, (player.pStone ? 2700 : 3600)); - return true; } } } diff --git a/Items/FabsolStuff/StarBeamRye.cs b/Items/FabsolStuff/StarBeamRye.cs index 63dcc4f125..be847f605f 100644 --- a/Items/FabsolStuff/StarBeamRye.cs +++ b/Items/FabsolStuff/StarBeamRye.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.FabsolStuff public override void SetStaticDefaults() { DisplayName.SetDefault("Star Beam Rye"); - Tooltip.SetDefault(@"Boosts max mana by 50, magic damage and critical strike chance by 5%, + Tooltip.SetDefault(@"Boosts max mana by 50, magic damage by 8%, and reduces mana usage by 10% Reduces defense by 6 and life regen by 3 Made from some stuff I found near the Astral Meteor crash site, don't worry it's safe, trust me"); diff --git a/Items/FabsolStuff/Tequila.cs b/Items/FabsolStuff/Tequila.cs index d939431e75..c94ab55a14 100644 --- a/Items/FabsolStuff/Tequila.cs +++ b/Items/FabsolStuff/Tequila.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.FabsolStuff public override void SetStaticDefaults() { DisplayName.SetDefault("Tequila"); - Tooltip.SetDefault(@"Boosts damage, critical strike chance, damage reduction, and knockback by 3% and defense by 5 during daytime + Tooltip.SetDefault(@"Boosts damage, damage reduction, and knockback by 4%, crit chance by 2%, and defense by 5 during daytime Reduces life regen by 2 Great for mixing up daytime drinks"); } diff --git a/Items/FabsolStuff/TequilaSunrise.cs b/Items/FabsolStuff/TequilaSunrise.cs index ec4169ca0e..d3a626eb47 100644 --- a/Items/FabsolStuff/TequilaSunrise.cs +++ b/Items/FabsolStuff/TequilaSunrise.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.FabsolStuff public override void SetStaticDefaults() { DisplayName.SetDefault("Tequila Sunrise"); - Tooltip.SetDefault(@"Boosts damage, critical strike chance, damage reduction, and knockback by 9% and defense by 15 during daytime + Tooltip.SetDefault(@"Boosts damage, damage reduction, and knockback by 9%, crit chance by 3%, and defense by 15 during daytime Reduces life regen by 3 The greatest daytime drink I've ever had"); } diff --git a/Items/FabsolStuff/Vodka.cs b/Items/FabsolStuff/Vodka.cs index b42f60357d..2a60580dd6 100644 --- a/Items/FabsolStuff/Vodka.cs +++ b/Items/FabsolStuff/Vodka.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.FabsolStuff public override void SetStaticDefaults() { DisplayName.SetDefault("Vodka"); - Tooltip.SetDefault(@"Boosts damage and critical strike chance by 5% + Tooltip.SetDefault(@"Boosts damage by 8% and critical strike chance by 2% Reduces life regen by 2 and defense by 4 The number one alcohol for creating great mixed drinks"); } diff --git a/Items/FabsolStuff/Whiskey.cs b/Items/FabsolStuff/Whiskey.cs index 31e3682806..8fe3fa05d2 100644 --- a/Items/FabsolStuff/Whiskey.cs +++ b/Items/FabsolStuff/Whiskey.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.FabsolStuff public override void SetStaticDefaults() { DisplayName.SetDefault("Whiskey"); - Tooltip.SetDefault(@"Boosts damage, critical strike chance, and knockback by 3% + Tooltip.SetDefault(@"Boosts damage and knockback by 4% and critical strike chance by 2% Reduces defense by 8 The burning sensation makes it tastier"); } diff --git a/Items/GalacticaSingularity.cs b/Items/GalacticaSingularity.cs index 4772a57d64..82b5683b23 100644 --- a/Items/GalacticaSingularity.cs +++ b/Items/GalacticaSingularity.cs @@ -7,42 +7,44 @@ using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items; -namespace CalamityMod.Items { -public class GalacticaSingularity : ModItem +namespace CalamityMod.Items { - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Galactica Singularity"); - Tooltip.SetDefault("A shard of the cosmos"); - Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(3, 19)); - } - - public override void SetDefaults() - { - item.width = 28; - item.height = 28; - item.maxStack = 69; - item.value = 500000; - item.rare = 10; - } - - public override void AddRecipes() - { - ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(ItemID.FragmentSolar); - recipe.AddIngredient(ItemID.FragmentVortex); - recipe.AddIngredient(ItemID.FragmentStardust); - recipe.AddIngredient(ItemID.FragmentNebula); - recipe.AddTile(TileID.LunarCraftingStation); - recipe.SetResult(this); - recipe.AddRecipe(); - } - - public override void Update(ref float gravity, ref float maxFallSpeed) + public class GalacticaSingularity : ModItem { - maxFallSpeed *= 0.0001f; - float num = (float)Main.rand.Next(90, 111) * 0.01f; - num *= Main.essScale; - Lighting.AddLight((int)((item.position.X + (float)(item.width / 2)) / 16f), (int)((item.position.Y + (float)(item.height / 2)) / 16f), 1f * num, 0.3f * num, 0.3f * num); + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Galactica Singularity"); + Tooltip.SetDefault("A shard of the cosmos"); + Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(3, 19)); + } + + public override void SetDefaults() + { + item.width = 28; + item.height = 28; + item.maxStack = 999; + item.value = 500000; + item.rare = 10; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ItemID.FragmentSolar); + recipe.AddIngredient(ItemID.FragmentVortex); + recipe.AddIngredient(ItemID.FragmentStardust); + recipe.AddIngredient(ItemID.FragmentNebula); + recipe.AddTile(TileID.LunarCraftingStation); + recipe.SetResult(this); + recipe.AddRecipe(); + } + + public override void Update(ref float gravity, ref float maxFallSpeed) + { + maxFallSpeed *= 0.0001f; + float num = (float)Main.rand.Next(90, 111) * 0.01f; + num *= Main.essScale; + Lighting.AddLight((int)((item.position.X + (float)(item.width / 2)) / 16f), (int)((item.position.Y + (float)(item.height / 2)) / 16f), 1f * num, 0.3f * num, 0.3f * num); + } } -}} \ No newline at end of file +} \ No newline at end of file diff --git a/Items/HiveMind/RottenBrain.cs b/Items/HiveMind/RottenBrain.cs index c472209f48..53c7a3783f 100644 --- a/Items/HiveMind/RottenBrain.cs +++ b/Items/HiveMind/RottenBrain.cs @@ -6,6 +6,7 @@ using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items; +using CalamityMod.Items.CalamityCustomThrowingDamage; namespace CalamityMod.Items.HiveMind { @@ -21,7 +22,7 @@ namespace CalamityMod.Items.HiveMind { item.width = 34; item.height = 34; - item.value = 100000; + item.value = Item.buyPrice(0, 9, 0, 0); item.expert = true; item.accessory = true; } @@ -59,7 +60,7 @@ namespace CalamityMod.Items.HiveMind player.meleeDamage += 0.1f; player.magicDamage += 0.1f; player.rangedDamage += 0.1f; - player.thrownDamage += 0.1f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.1f; player.minionDamage += 0.1f; } if (player.statLife <= (player.statLifeMax2 * 0.5f)) diff --git a/Items/LORED/NO.cs b/Items/LORED/NO.cs index 7796cb871d..1e69ffca12 100644 --- a/Items/LORED/NO.cs +++ b/Items/LORED/NO.cs @@ -17,18 +17,6 @@ namespace CalamityMod.Items.LORED item.width = 20; item.height = 20; item.rare = 10; - item.useAnimation = 45; - item.useTime = 45; - item.useStyle = 4; - item.consumable = false; - } - - public override bool UseItem(Player player) - { - /*NPC.SpawnOnPlayer(player.whoAmI, mod.NPCType("THELORDE")); - Main.PlaySound(SoundID.Roar, player.position, 0);*/ - Main.instance = null; - return true; } } } \ No newline at end of file diff --git a/Items/Leviathan/EnchantedPearl.cs b/Items/Leviathan/EnchantedPearl.cs index 9471259816..c344b5d415 100644 --- a/Items/Leviathan/EnchantedPearl.cs +++ b/Items/Leviathan/EnchantedPearl.cs @@ -7,27 +7,29 @@ using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items; -namespace CalamityMod.Items.Leviathan { -public class EnchantedPearl : ModItem +namespace CalamityMod.Items.Leviathan { - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Enchanted Pearl"); - Tooltip.SetDefault("Increases fishing skill\nCrate potion effect, does not stack with crate potions"); - } - - public override void SetDefaults() - { - item.width = 26; - item.height = 26; - item.value = 150000; - item.rare = 7; - item.accessory = true; - } - - public override void UpdateAccessory(Player player, bool hideVisual) - { - player.fishingSkill += 10; - player.cratePotion = true; - } -}} \ No newline at end of file + public class EnchantedPearl : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Enchanted Pearl"); + Tooltip.SetDefault("Increases fishing skill\nCrate potion effect, does not stack with crate potions"); + } + + public override void SetDefaults() + { + item.width = 26; + item.height = 26; + item.value = Item.buyPrice(0, 9, 0, 0); + item.rare = 7; + item.accessory = true; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + player.fishingSkill += 10; + player.cratePotion = true; + } + } +} \ No newline at end of file diff --git a/Items/Leviathan/LeviathanAmbergris.cs b/Items/Leviathan/LeviathanAmbergris.cs index 11475b3a16..cb21970376 100644 --- a/Items/Leviathan/LeviathanAmbergris.cs +++ b/Items/Leviathan/LeviathanAmbergris.cs @@ -6,6 +6,7 @@ using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items; +using CalamityMod.Items.CalamityCustomThrowingDamage; namespace CalamityMod.Items.Leviathan { @@ -24,7 +25,7 @@ namespace CalamityMod.Items.Leviathan { item.width = 20; item.height = 22; - item.value = 900000; + item.value = Item.buyPrice(0, 30, 0, 0); item.accessory = true; item.expert = true; } @@ -36,7 +37,7 @@ namespace CalamityMod.Items.Leviathan { player.endurance += 0.05f; player.meleeDamage -= 0.05f; - player.thrownDamage -= 0.05f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage -= 0.05f; player.rangedDamage -= 0.05f; player.magicDamage -= 0.05f; player.minionDamage -= 0.05f; @@ -44,7 +45,7 @@ namespace CalamityMod.Items.Leviathan else { player.meleeDamage += 0.1f; - player.thrownDamage += 0.1f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.1f; player.rangedDamage += 0.1f; player.magicDamage += 0.1f; player.minionDamage += 0.1f; diff --git a/Items/Mounts/Fab.cs b/Items/Mounts/Fab.cs index dfe8de9d53..5c6f4391a2 100644 --- a/Items/Mounts/Fab.cs +++ b/Items/Mounts/Fab.cs @@ -4,6 +4,7 @@ using Terraria.ID; using Microsoft.Xna.Framework; using System; using CalamityMod.Items; +using CalamityMod.Items.CalamityCustomThrowingDamage; namespace CalamityMod.Items.Mounts { @@ -72,7 +73,7 @@ namespace CalamityMod.Items.Mounts player.rangedDamage += 0.1f; player.magicDamage += 0.1f; player.minionDamage += 0.1f; - player.thrownDamage += 0.1f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.1f; } if (Math.Abs(player.velocity.X) > 15f) { diff --git a/Items/OmegaHealingPotion.cs b/Items/OmegaHealingPotion.cs index 7ee1e72f0c..a7faf7ad34 100644 --- a/Items/OmegaHealingPotion.cs +++ b/Items/OmegaHealingPotion.cs @@ -47,7 +47,7 @@ namespace CalamityMod.Items ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(null, "SupremeHealingPotion"); recipe.AddIngredient(null, "BloodOrb", 10); - recipe.AddTile(TileID.LunarCraftingStation); + recipe.AddTile(null, "DraedonsForge"); recipe.SetResult(this); recipe.AddRecipe(); } diff --git a/Items/Patreon/DarkSpark.cs b/Items/Patreon/DarkSpark.cs new file mode 100644 index 0000000000..e29b9b0aa8 --- /dev/null +++ b/Items/Patreon/DarkSpark.cs @@ -0,0 +1,72 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Items; + +namespace CalamityMod.Items.Patreon +{ + public class DarkSpark : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Dark Spark"); + Tooltip.SetDefault("And everything under the sun is in tune,\n" + + "But the sun is eclipsed by the moon."); + Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(6, 4)); + } + + public override void SetDefaults() + { + item.damage = 100; + item.magic = true; + item.mana = 10; + item.width = 16; + item.height = 16; + item.useTime = 10; + item.useAnimation = 10; + item.reuseDelay = 5; + item.useStyle = 4; + item.UseSound = SoundID.Item13; + item.noMelee = true; + item.noUseGraphic = true; + item.channel = true; + item.knockBack = 0f; + item.value = 5000000; + item.shoot = mod.ProjectileType("DarkSpark"); + item.shootSpeed = 30f; + } + + public override void ModifyTooltips(List list) + { + foreach (TooltipLine line2 in list) + { + if (line2.mod == "Terraria" && line2.Name == "ItemName") + { + line2.overrideColor = new Color(139, 0, 0); + } + } + } + + public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + Projectile.NewProjectile(position.X, position.Y, speedX, speedY, mod.ProjectileType("DarkSpark"), damage, knockBack, player.whoAmI, 0.0f, 0.0f); + return false; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ItemID.LastPrism); + recipe.AddIngredient(null, "DarkPlasma", 10); + recipe.AddIngredient(null, "RuinousSoul", 20); + recipe.AddIngredient(null, "DivineGeode", 30); + recipe.AddTile(TileID.LunarCraftingStation); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } +} \ No newline at end of file diff --git a/Items/Patreon/DarkSpark.png b/Items/Patreon/DarkSpark.png new file mode 100644 index 0000000000..7eb75eddbe Binary files /dev/null and b/Items/Patreon/DarkSpark.png differ diff --git a/Items/Patreon/DivineRetribution.cs b/Items/Patreon/DivineRetribution.cs new file mode 100644 index 0000000000..e4e45bc373 --- /dev/null +++ b/Items/Patreon/DivineRetribution.cs @@ -0,0 +1,110 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Patreon +{ + public class DivineRetribution : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Divine Retribution"); + Item.staff[item.type] = true; + } + + public override void SetDefaults() + { + item.damage = 60; + item.magic = true; + item.mana = 15; + item.width = 66; + item.height = 88; + item.useTime = 12; + item.useAnimation = 12; + item.useStyle = 5; + item.noMelee = true; + item.knockBack = 3.5f; + item.value = Item.sellPrice(1, 0, 0, 0); + item.UseSound = SoundID.Item73; + item.autoReuse = true; + item.shootSpeed = 19f; + item.shoot = mod.ProjectileType("DivineRetribution"); + } + + public override void ModifyTooltips(List list) + { + foreach (TooltipLine line2 in list) + { + if (line2.mod == "Terraria" && line2.Name == "ItemName") + { + line2.overrideColor = new Color(139, 0, 0); + } + } + } + + public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + float num72 = item.shootSpeed; + Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); + float num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; + float num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; + if (player.gravDir == -1f) + { + num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y; + } + float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); + if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f)) + { + num78 = (float)player.direction; + num79 = 0f; + num80 = num72; + } + else + { + num80 = num72 / num80; + } + int num107 = Main.rand.Next(5, 7); + for (int num108 = 0; num108 < num107; num108++) + { + vector2 = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(51) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - /* - */ player.position.X), player.MountedCenter.Y + 600f); //- + vector2.X = (vector2.X + player.Center.X) / 2f + (float)Main.rand.Next(-50, 51); //200 + vector2.Y += (float)(100 * num108); //-= + num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; //+ - + num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; //+ - + if (num79 < 0f) + { + num79 *= -1f; + } + if (num79 < 20f) + { + num79 = 20f; + } + num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); + num80 = num72 / num80; + num78 *= num80; + num79 *= num80; + float speedX6 = num78 + (float)Main.rand.Next(-60, 61) * 0.02f; + float speedY7 = num79 + (float)Main.rand.Next(-60, 61) * 0.02f; + float ai1 = (Main.rand.NextFloat() + 0.5f); + int bullet2 = Projectile.NewProjectile(vector2.X, vector2.Y, speedX6, -speedY7, type, damage, knockBack, player.whoAmI, 0.0f, ai1); + } + return false; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(null, "DivineGeode", 8); + recipe.AddIngredient(null, "UndinesRetribution"); + recipe.AddIngredient(null, "UeliaceBar", 6); + recipe.AddIngredient(null, "UnholyEssence", 10); + recipe.AddTile(TileID.LunarCraftingStation); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } +} \ No newline at end of file diff --git a/Items/Patreon/DivineRetribution.png b/Items/Patreon/DivineRetribution.png new file mode 100644 index 0000000000..4a5c496127 Binary files /dev/null and b/Items/Patreon/DivineRetribution.png differ diff --git a/Items/Patreon/LightGodsBrilliance.cs b/Items/Patreon/LightGodsBrilliance.cs new file mode 100644 index 0000000000..c93953dfdf --- /dev/null +++ b/Items/Patreon/LightGodsBrilliance.cs @@ -0,0 +1,85 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Items; + +namespace CalamityMod.Items.Patreon +{ + public class LightGodsBrilliance : ModItem + { + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Light God's Brilliance"); + Tooltip.SetDefault("Casts small, homing light beads along with explosive light balls"); + } + + public override void SetDefaults() + { + item.damage = 100; + item.magic = true; + item.mana = 4; + item.width = 34; + item.height = 36; + item.useTime = 3; + item.useAnimation = 3; + item.useStyle = 5; + item.noMelee = true; + item.knockBack = 3f; + item.value = 2000000; + item.UseSound = SoundID.Item9; + item.autoReuse = true; + item.shoot = mod.ProjectileType("LightBead"); + item.shootSpeed = 25f; + } + + public override void ModifyTooltips(List list) + { + foreach (TooltipLine line2 in list) + { + if (line2.mod == "Terraria" && line2.Name == "ItemName") + { + line2.overrideColor = new Color(139, 0, 0); + } + } + } + + public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + int num6 = Main.rand.Next(2, 5); + for (int index = 0; index < num6; ++index) + { + float num7 = speedX; + float num8 = speedY; + float SpeedX = speedX + (float) Main.rand.Next(-50, 51) * 0.05f; + float SpeedY = speedY + (float) Main.rand.Next(-50, 51) * 0.05f; + Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, (int)((double)damage), knockBack, player.whoAmI, 0.0f, 0.0f); + } + if (Main.rand.Next(3) == 0) + { + Projectile.NewProjectile(position.X, position.Y, speedX, speedY, mod.ProjectileType("LightBall"), (int)((double)damage * 2.0), knockBack, player.whoAmI, 0.0f, 0.0f); + } + + return false; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(null, "ShadecrystalTome"); + recipe.AddIngredient(null, "AbyssalTome"); + recipe.AddIngredient(ItemID.HolyWater, 10); + recipe.AddIngredient(null, "EndothermicEnergy", 5); + recipe.AddIngredient(null, "NightmareFuel", 5); + recipe.AddIngredient(ItemID.SoulofLight, 30); + recipe.AddIngredient(null, "EffulgentFeather", 5); + recipe.AddTile(TileID.Bookcases); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } +} \ No newline at end of file diff --git a/Items/Patreon/LightGodsBrilliance.png b/Items/Patreon/LightGodsBrilliance.png new file mode 100644 index 0000000000..eeba4455b5 Binary files /dev/null and b/Items/Patreon/LightGodsBrilliance.png differ diff --git a/Items/Patreon/ProfanedSoulArtifact.cs b/Items/Patreon/ProfanedSoulArtifact.cs new file mode 100644 index 0000000000..7bd8f8539d --- /dev/null +++ b/Items/Patreon/ProfanedSoulArtifact.cs @@ -0,0 +1,62 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.NPCs; + +namespace CalamityMod.Items.Patreon +{ + public class ProfanedSoulArtifact : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Profaned Soul Artifact"); + Tooltip.SetDefault("Profanation\n" + //idk what tooltip haha + "Summons a healer guardian which heals for a certain amount of health every few seconds\n" + + "Summons a defensive guardian if you have at least 8 minion slots, which boosts your movement speed and your damage resistance\n" + + "Summons an offensive guardian if you are wearing the tarragon summon set (or stronger), which boosts your summon damage and your minion slots\n" + + "If you get hit their effects will disappear for 5 seconds"); + Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(6, 6)); + } + + public override void SetDefaults() + { + item.width = 32; + item.height = 40; + item.value = Item.buyPrice(2, 50, 0, 0); + item.accessory = true; + } + + public override void ModifyTooltips(List list) + { + foreach (TooltipLine line2 in list) + { + if (line2.mod == "Terraria" && line2.Name == "ItemName") + { + line2.overrideColor = new Color(139, 0, 0); + } + } + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + CalamityPlayer modPlayer = player.GetModPlayer(mod); + modPlayer.pArtifact = true; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(null, "Cinderplate", 5); + recipe.AddIngredient(null, "CoreofCinder"); + recipe.AddIngredient(null, "DivineGeode", 5); + recipe.AddIngredient(null, "ExodiumClusterOre", 15); + recipe.AddTile(TileID.DemonAltar); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } +} \ No newline at end of file diff --git a/Items/Patreon/ProfanedSoulArtifact.png b/Items/Patreon/ProfanedSoulArtifact.png new file mode 100644 index 0000000000..b4154ec205 Binary files /dev/null and b/Items/Patreon/ProfanedSoulArtifact.png differ diff --git a/Items/Perforator/BloodyWormTooth.cs b/Items/Perforator/BloodyWormTooth.cs index f3f138dee4..7b04957cd5 100644 --- a/Items/Perforator/BloodyWormTooth.cs +++ b/Items/Perforator/BloodyWormTooth.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Perforator { item.width = 12; item.height = 15; - item.value = 100000; + item.value = Item.buyPrice(0, 9, 0, 0); item.expert = true; item.accessory = true; } diff --git a/Items/Permafrost/AbsoluteZero.cs b/Items/Permafrost/AbsoluteZero.cs index 5a83fecaa4..09b0783cd0 100644 --- a/Items/Permafrost/AbsoluteZero.cs +++ b/Items/Permafrost/AbsoluteZero.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.Permafrost } public override void SetDefaults() { - item.damage = 56; + item.damage = 51; item.melee = true; item.width = 58; item.height = 58; diff --git a/Items/Permafrost/FrostyFlare.cs b/Items/Permafrost/FrostyFlare.cs index b09ef3bb65..6d23d753f7 100644 --- a/Items/Permafrost/FrostyFlare.cs +++ b/Items/Permafrost/FrostyFlare.cs @@ -3,6 +3,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.Items.CalamityCustomThrowingDamage; namespace CalamityMod.Items.Permafrost { @@ -18,7 +19,6 @@ namespace CalamityMod.Items.Permafrost item.damage = 32; item.noUseGraphic = true; item.noMelee = true; - item.thrown = true; item.width = 10; item.height = 22; item.useTime = 16; diff --git a/Items/Permafrost/IcicleArrow.cs b/Items/Permafrost/IcicleArrow.cs index 0a9ebb85b5..8866a3692c 100644 --- a/Items/Permafrost/IcicleArrow.cs +++ b/Items/Permafrost/IcicleArrow.cs @@ -13,6 +13,7 @@ namespace CalamityMod.Items.Permafrost DisplayName.SetDefault("Icicle Arrow"); Tooltip.SetDefault("Shatters into shards on impact"); } + public override void SetDefaults() { item.damage = 14; @@ -22,7 +23,7 @@ namespace CalamityMod.Items.Permafrost item.height = 50; item.knockBack = 2.5f; item.value = Item.buyPrice(0, 0, 0, 15); - item.rare = 5; + item.rare = 3; item.shoot = mod.ProjectileType("IcicleArrow"); item.shootSpeed = 1.0f; item.ammo = AmmoID.Arrow; diff --git a/Items/Permafrost/IcyBullet.cs b/Items/Permafrost/IcyBullet.cs index 5fafbf882a..2c320fffcb 100644 --- a/Items/Permafrost/IcyBullet.cs +++ b/Items/Permafrost/IcyBullet.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Permafrost item.height = 16; item.knockBack = 2f; item.value = Item.buyPrice(0, 0, 0, 15); - item.rare = 5; + item.rare = 3; item.shoot = mod.ProjectileType("IcyBullet"); item.shootSpeed = 5f; item.ammo = AmmoID.Bullet; diff --git a/Items/Permafrost/Popo.cs b/Items/Permafrost/Popo.cs new file mode 100644 index 0000000000..600164b6e5 --- /dev/null +++ b/Items/Permafrost/Popo.cs @@ -0,0 +1,66 @@ +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Permafrost +{ + public class Popo : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Magic Scarf and Hat"); + Tooltip.SetDefault("Transforms the holder into a snowman\n" + + "Don't let the demons steal your nose"); + } + + public override void SetDefaults() + { + item.width = 26; + item.height = 30; + item.accessory = true; + item.value = 1000000; + item.rare = 5; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + CalamityPlayer modPlayer = player.GetModPlayer(); + modPlayer.snowman = true; + if (hideVisual) + { + modPlayer.snowmanHide = true; + } + } + } + + public class PopoHead : EquipTexture + { + public override bool DrawHead() + { + return false; + } + } + + public class PopoNoselessHead : EquipTexture + { + public override bool DrawHead() + { + return false; + } + } + + public class PopoBody : EquipTexture + { + public override bool DrawBody() + { + return false; + } + } + + public class PopoLegs : EquipTexture + { + public override bool DrawLegs() + { + return false; + } + } +} \ No newline at end of file diff --git a/Items/Permafrost/Popo.png b/Items/Permafrost/Popo.png new file mode 100644 index 0000000000..5466d48dbe Binary files /dev/null and b/Items/Permafrost/Popo.png differ diff --git a/Items/Permafrost/PopoNoseless_Head.png b/Items/Permafrost/PopoNoseless_Head.png new file mode 100644 index 0000000000..0d67d5eec9 Binary files /dev/null and b/Items/Permafrost/PopoNoseless_Head.png differ diff --git a/Items/Permafrost/Popo_Arms.png b/Items/Permafrost/Popo_Arms.png new file mode 100644 index 0000000000..cb32901015 Binary files /dev/null and b/Items/Permafrost/Popo_Arms.png differ diff --git a/Items/Permafrost/Popo_Body.png b/Items/Permafrost/Popo_Body.png new file mode 100644 index 0000000000..a946071107 Binary files /dev/null and b/Items/Permafrost/Popo_Body.png differ diff --git a/Items/Permafrost/Popo_Head.png b/Items/Permafrost/Popo_Head.png new file mode 100644 index 0000000000..36643b761c Binary files /dev/null and b/Items/Permafrost/Popo_Head.png differ diff --git a/Items/Permafrost/Popo_Legs.png b/Items/Permafrost/Popo_Legs.png new file mode 100644 index 0000000000..e4e8af70a8 Binary files /dev/null and b/Items/Permafrost/Popo_Legs.png differ diff --git a/Items/Placeables/AbyssChest.cs b/Items/Placeables/AbyssChest.cs index 954a5a1c7e..2927b882c8 100644 --- a/Items/Placeables/AbyssChest.cs +++ b/Items/Placeables/AbyssChest.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Placeables recipe.AddIngredient(null, "SmoothAbyssGravel", 8); recipe.AddIngredient(ItemID.IronBar, 2); recipe.anyIronBar = true; - recipe.SetResult(this, 1); + recipe.SetResult(this); recipe.AddTile(null, "VoidCondenser"); recipe.AddRecipe(); } diff --git a/Items/Placeables/AbyssLowerMusicbox.cs b/Items/Placeables/AbyssLowerMusicbox.cs new file mode 100644 index 0000000000..d68cbb72df --- /dev/null +++ b/Items/Placeables/AbyssLowerMusicbox.cs @@ -0,0 +1,28 @@ +using Terraria.ModLoader; + +namespace CalamityMod.Items.Placeables +{ + public class AbyssLowerMusicbox : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Music Box (Lower Abyss)"); + } + + public override void SetDefaults() + { + item.useStyle = 1; + item.useTurn = true; + item.useAnimation = 15; + item.useTime = 10; + item.autoReuse = true; + item.consumable = true; + item.createTile = mod.TileType("AbyssLowerMusicbox"); + item.width = 24; + item.height = 24; + item.rare = 4; + item.value = 100000; + item.accessory = true; + } + } +} \ No newline at end of file diff --git a/Items/Placeables/AbyssLowerMusicbox.png b/Items/Placeables/AbyssLowerMusicbox.png new file mode 100644 index 0000000000..4b5537eb85 Binary files /dev/null and b/Items/Placeables/AbyssLowerMusicbox.png differ diff --git a/Items/Placeables/AncientBath.cs b/Items/Placeables/AncientBath.cs index e13cbc1b15..66c9a52bd5 100644 --- a/Items/Placeables/AncientBath.cs +++ b/Items/Placeables/AncientBath.cs @@ -27,19 +27,19 @@ namespace CalamityMod.Items.Placeables { ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(null, "BrimstoneSlag", 14); - recipe.SetResult(this, 1); + recipe.SetResult(this); recipe.AddTile(null, "AncientAltar"); recipe.AddRecipe(); recipe = new ModRecipe(mod); - recipe.AddIngredient(null, "AshenBath", 1); - recipe.AddIngredient(null, "EssenceofChaos", 1); - recipe.SetResult(this, 1); + recipe.AddIngredient(null, "AshenBath"); + recipe.AddIngredient(null, "EssenceofChaos"); + recipe.SetResult(this); recipe.AddTile(null, "AncientAltar"); recipe.AddRecipe(); recipe = new ModRecipe(mod); - recipe.AddIngredient(null, "AshenBath", 1); - recipe.AddIngredient(null, "EssenceofChaos", 1); - recipe.SetResult(this, 1); + recipe.AddIngredient(null, "AshenBath"); + recipe.AddIngredient(null, "EssenceofChaos"); + recipe.SetResult(this); recipe.AddTile(null, "AshenAltar"); recipe.AddRecipe(); } diff --git a/Items/Placeables/AstralDirtWall.cs b/Items/Placeables/AstralDirtWall.cs index e3d99e549f..0733c092ec 100644 --- a/Items/Placeables/AstralDirtWall.cs +++ b/Items/Placeables/AstralDirtWall.cs @@ -17,8 +17,7 @@ namespace CalamityMod.Items.Placeables public override void SetDefaults() { - //item.createWall = mod.TileType("AstralDirtWall"); - item.createWall = Terraria.ID.WallID.Cave8Unsafe; + item.createWall = mod.WallType("AstralDirtWall"); item.useStyle = 1; item.useTurn = true; item.useAnimation = 15; diff --git a/Items/Placeables/AstralIceWall.cs b/Items/Placeables/AstralIceWall.cs index abbfaa2656..49b1c8bbcf 100644 --- a/Items/Placeables/AstralIceWall.cs +++ b/Items/Placeables/AstralIceWall.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Placeables public override void SetDefaults() { - item.createTile = mod.TileType("AstralIceWall"); + item.createWall = mod.WallType("AstralIceWall"); item.useStyle = 1; item.useTurn = true; item.useAnimation = 15; diff --git a/Items/Placeables/AstralSandstoneWall.cs b/Items/Placeables/AstralSandstoneWall.cs index 37143b2c11..19c0c4f69f 100644 --- a/Items/Placeables/AstralSandstoneWall.cs +++ b/Items/Placeables/AstralSandstoneWall.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Placeables public override void SetDefaults() { - item.createTile = mod.WallType("AstralSandstoneWall"); + item.createWall = mod.WallType("AstralSandstoneWall"); item.useStyle = 1; item.useTurn = true; item.useAnimation = 15; diff --git a/Items/Placeables/AstralStoneWall.cs b/Items/Placeables/AstralStoneWall.cs index 61ff3a53ac..df756994fd 100644 --- a/Items/Placeables/AstralStoneWall.cs +++ b/Items/Placeables/AstralStoneWall.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Placeables public override void SetDefaults() { - item.createTile = mod.WallType("AstralStoneWall"); + item.createWall = mod.WallType("AstralStoneWall"); item.useStyle = 1; item.useTurn = true; item.useAnimation = 15; diff --git a/Items/Placeables/AstrumDeusMusicbox.cs b/Items/Placeables/AstrumDeusMusicbox.cs new file mode 100644 index 0000000000..813fba7fd4 --- /dev/null +++ b/Items/Placeables/AstrumDeusMusicbox.cs @@ -0,0 +1,28 @@ +using Terraria.ModLoader; + +namespace CalamityMod.Items.Placeables +{ + public class AstrumDeusMusicbox : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Music Box (Astrum Deus)"); + } + + public override void SetDefaults() + { + item.useStyle = 1; + item.useTurn = true; + item.useAnimation = 15; + item.useTime = 10; + item.autoReuse = true; + item.consumable = true; + item.createTile = mod.TileType("AstrumDeusMusicbox"); + item.width = 24; + item.height = 24; + item.rare = 4; + item.value = 100000; + item.accessory = true; + } + } +} \ No newline at end of file diff --git a/Items/Placeables/AstrumDeusMusicbox.png b/Items/Placeables/AstrumDeusMusicbox.png new file mode 100644 index 0000000000..49b53b3bd5 Binary files /dev/null and b/Items/Placeables/AstrumDeusMusicbox.png differ diff --git a/Items/Placeables/BrimmyMusicbox.cs b/Items/Placeables/BrimmyMusicbox.cs new file mode 100644 index 0000000000..ed04fac7b8 --- /dev/null +++ b/Items/Placeables/BrimmyMusicbox.cs @@ -0,0 +1,28 @@ +using Terraria.ModLoader; + +namespace CalamityMod.Items.Placeables +{ + public class BrimmyMusicbox : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Music Box (Brimstone Elemental)"); + } + + public override void SetDefaults() + { + item.useStyle = 1; + item.useTurn = true; + item.useAnimation = 15; + item.useTime = 10; + item.autoReuse = true; + item.consumable = true; + item.createTile = mod.TileType("BrimmyMusicbox"); + item.width = 24; + item.height = 24; + item.rare = 4; + item.value = 100000; + item.accessory = true; + } + } +} \ No newline at end of file diff --git a/Items/Placeables/BrimmyMusicbox.png b/Items/Placeables/BrimmyMusicbox.png new file mode 100644 index 0000000000..773a275f1b Binary files /dev/null and b/Items/Placeables/BrimmyMusicbox.png differ diff --git a/Items/Placeables/CalamityMusicbox.cs b/Items/Placeables/CalamityMusicbox.cs new file mode 100644 index 0000000000..99f40780ef --- /dev/null +++ b/Items/Placeables/CalamityMusicbox.cs @@ -0,0 +1,38 @@ +using Terraria.ModLoader; + +namespace CalamityMod.Items.Placeables +{ + public class CalamityMusicbox : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Music Box (Calamity)"); + } + + public override void SetDefaults() + { + item.useStyle = 1; + item.useTurn = true; + item.useAnimation = 15; + item.useTime = 10; + item.autoReuse = true; + item.consumable = true; + item.createTile = mod.TileType("CalamityMusicbox"); + item.width = 24; + item.height = 24; + item.rare = 4; + item.value = 100000; + item.accessory = true; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(null, "BrimstoneSlag", 12); + recipe.AddIngredient(null, "EssenceofChaos", 3); + recipe.SetResult(this); + recipe.AddTile(null, "AshenAltar"); + recipe.AddRecipe(); + } + } +} \ No newline at end of file diff --git a/Items/Placeables/CalamityMusicbox.png b/Items/Placeables/CalamityMusicbox.png new file mode 100644 index 0000000000..adc00eac29 Binary files /dev/null and b/Items/Placeables/CalamityMusicbox.png differ diff --git a/Items/Placeables/CragMusicbox.cs b/Items/Placeables/CragMusicbox.cs new file mode 100644 index 0000000000..8c4ef61b02 --- /dev/null +++ b/Items/Placeables/CragMusicbox.cs @@ -0,0 +1,28 @@ +using Terraria.ModLoader; + +namespace CalamityMod.Items.Placeables +{ + public class CragMusicbox : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Music Box (Brimstone Crag)"); + } + + public override void SetDefaults() + { + item.useStyle = 1; + item.useTurn = true; + item.useAnimation = 15; + item.useTime = 10; + item.autoReuse = true; + item.consumable = true; + item.createTile = mod.TileType("CragMusicbox"); + item.width = 24; + item.height = 24; + item.rare = 4; + item.value = 100000; + item.accessory = true; + } + } +} \ No newline at end of file diff --git a/Items/Placeables/CragMusicbox.png b/Items/Placeables/CragMusicbox.png new file mode 100644 index 0000000000..b568044821 Binary files /dev/null and b/Items/Placeables/CragMusicbox.png differ diff --git a/Items/Placeables/DoGP2Musicbox.cs b/Items/Placeables/DoGP2Musicbox.cs new file mode 100644 index 0000000000..a463aba420 --- /dev/null +++ b/Items/Placeables/DoGP2Musicbox.cs @@ -0,0 +1,28 @@ +using Terraria.ModLoader; + +namespace CalamityMod.Items.Placeables +{ + public class DoGP2Musicbox : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Music Box (DoG Phase 2)"); + } + + public override void SetDefaults() + { + item.useStyle = 1; + item.useTurn = true; + item.useAnimation = 15; + item.useTime = 10; + item.autoReuse = true; + item.consumable = true; + item.createTile = mod.TileType("DoGP2Musicbox"); + item.width = 24; + item.height = 24; + item.rare = 4; + item.value = 100000; + item.accessory = true; + } + } +} \ No newline at end of file diff --git a/Items/Placeables/DoGP2Musicbox.png b/Items/Placeables/DoGP2Musicbox.png new file mode 100644 index 0000000000..afd6448e77 Binary files /dev/null and b/Items/Placeables/DoGP2Musicbox.png differ diff --git a/Items/Placeables/HardenedAstralSandWall.cs b/Items/Placeables/HardenedAstralSandWall.cs index f3b78dfba6..99e93c6619 100644 --- a/Items/Placeables/HardenedAstralSandWall.cs +++ b/Items/Placeables/HardenedAstralSandWall.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Placeables public override void SetDefaults() { - item.createTile = mod.WallType("HardenedAstralSandWall"); + item.createWall = mod.WallType("HardenedAstralSandWall"); item.useStyle = 1; item.useTurn = true; item.useAnimation = 15; diff --git a/Items/PlaguebringerGoliath/Abomination.cs b/Items/PlaguebringerGoliath/Abomination.cs index 8e0d8652a9..44c2c05970 100644 --- a/Items/PlaguebringerGoliath/Abomination.cs +++ b/Items/PlaguebringerGoliath/Abomination.cs @@ -46,15 +46,8 @@ namespace CalamityMod.Items.PlaguebringerGoliath ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(null, "PlagueCellCluster", 10); recipe.AddIngredient(ItemID.IronBar, 5); - recipe.AddIngredient(ItemID.Stinger, 2); - recipe.AddIngredient(ItemID.Obsidian, 3); - recipe.AddTile(TileID.MythrilAnvil); - recipe.SetResult(this); - recipe.AddRecipe(); - recipe = new ModRecipe(mod); - recipe.AddIngredient(null, "PlagueCellCluster", 10); - recipe.AddIngredient(ItemID.LeadBar, 5); - recipe.AddIngredient(ItemID.Stinger, 2); + recipe.anyIronBar = true; + recipe.AddIngredient(ItemID.Stinger, 2); recipe.AddIngredient(ItemID.Obsidian, 3); recipe.AddTile(TileID.MythrilAnvil); recipe.SetResult(this); diff --git a/Items/PlaguebringerGoliath/BloomStone.cs b/Items/PlaguebringerGoliath/BloomStone.cs index 58579f76a6..ddbbacd798 100644 --- a/Items/PlaguebringerGoliath/BloomStone.cs +++ b/Items/PlaguebringerGoliath/BloomStone.cs @@ -5,7 +5,7 @@ using Terraria; using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; -using CalamityMod.Items; +using CalamityMod.Items.CalamityCustomThrowingDamage; namespace CalamityMod.Items.PlaguebringerGoliath { @@ -15,7 +15,7 @@ namespace CalamityMod.Items.PlaguebringerGoliath { DisplayName.SetDefault("Bloom Stone"); Tooltip.SetDefault("One of the ancient relics\n" + - "Enemies that get near you take damage and all damage and crit chance is increased by 2%\n" + + "Enemies that get near you take damage and all damage is increased by 3%\n" + "You grow flowers on the grass beneath you, chance to grow very random dye plants on grassless dirt"); Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(4, 7)); } @@ -24,23 +24,20 @@ namespace CalamityMod.Items.PlaguebringerGoliath { item.width = 20; item.height = 20; - item.value = 500000; + item.value = Item.buyPrice(0, 15, 0, 0); item.rare = 5; item.accessory = true; } public override void UpdateAccessory(Player player, bool hideVisual) { - Lighting.AddLight((int)player.Center.X / 16, (int)player.Center.Y / 16, 0.25f, 0.4f, 0.2f); - player.meleeCrit += 2; - player.meleeDamage += 0.02f; - player.magicCrit += 2; - player.magicDamage += 0.02f; - player.rangedCrit += 2; - player.rangedDamage += 0.02f; - player.thrownCrit += 2; - player.thrownDamage += 0.02f; - player.minionDamage += 0.02f; + CalamityCustomThrowingDamagePlayer modPlayer2 = CalamityCustomThrowingDamagePlayer.ModPlayer(player); + Lighting.AddLight((int)player.Center.X / 16, (int)player.Center.Y / 16, 0.25f, 0.4f, 0.2f); + player.meleeDamage += 0.03f; + player.magicDamage += 0.03f; + player.rangedDamage += 0.03f; + modPlayer2.throwingDamage += 0.03f; + player.minionDamage += 0.03f; int bloomCounter = 0; int num = 186; float num2 = 150f; diff --git a/Items/PlaguebringerGoliath/ToxicHeart.cs b/Items/PlaguebringerGoliath/ToxicHeart.cs index 9d28489c69..ba7f5c2111 100644 --- a/Items/PlaguebringerGoliath/ToxicHeart.cs +++ b/Items/PlaguebringerGoliath/ToxicHeart.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.PlaguebringerGoliath { item.width = 28; item.height = 32; - item.value = 500000; + item.value = Item.buyPrice(0, 30, 0, 0); item.expert = true; item.accessory = true; } diff --git a/Items/Polterghast/Affliction.cs b/Items/Polterghast/Affliction.cs index a762d74a5c..86050c161b 100644 --- a/Items/Polterghast/Affliction.cs +++ b/Items/Polterghast/Affliction.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Polterghast { item.width = 20; item.height = 20; - item.value = 500000; + item.value = Item.buyPrice(0, 60, 0, 0); item.accessory = true; item.expert = true; } diff --git a/Items/Providence/ElysianAegis.cs b/Items/Providence/ElysianAegis.cs index d628bae153..3feea5d83a 100644 --- a/Items/Providence/ElysianAegis.cs +++ b/Items/Providence/ElysianAegis.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Providence { item.width = 48; item.height = 42; - item.value = 10000000; + item.value = Item.buyPrice(0, 60, 0, 0); item.expert = true; item.rare = 9; item.defense = 8; @@ -42,7 +42,7 @@ namespace CalamityMod.Items.Providence modPlayer.elysianAegis = true; player.noKnockback = true; player.fireWalk = true; - player.lifeRegen += 3; + player.lifeRegen += 2; player.statLifeMax2 += 40; } } diff --git a/Items/Providence/ElysianWings.cs b/Items/Providence/ElysianWings.cs index 7f8a5d9dff..bb05147403 100644 --- a/Items/Providence/ElysianWings.cs +++ b/Items/Providence/ElysianWings.cs @@ -16,14 +16,17 @@ namespace CalamityMod.Items.Providence public override void SetStaticDefaults() { DisplayName.SetDefault("Elysian Wings"); - Tooltip.SetDefault("Excellent acceleration: 2.5\nExcellent flight time: 220\nTemporary immunity to lava"); + Tooltip.SetDefault("Horizontal speed: 9.75\n" + + "Acceleration multiplier: 2.5\n" + + "Great vertical speed\n" + + "Flight time: 180"); } public override void SetDefaults() { item.width = 36; item.height = 32; - item.value = 10000000; + item.value = Item.buyPrice(0, 45, 0, 0); item.expert = true; item.accessory = true; } @@ -33,7 +36,7 @@ namespace CalamityMod.Items.Providence CalamityPlayer modPlayer = player.GetModPlayer(mod); player.moveSpeed += 0.4f; player.lavaMax += 920; - player.wingTimeMax = 220; + player.wingTimeMax = 180; modPlayer.elysianFire = true; if (hideVisual) { @@ -52,7 +55,7 @@ namespace CalamityMod.Items.Providence public override void HorizontalWingSpeeds(Player player, ref float speed, ref float acceleration) { - speed = 11f; + speed = 9.75f; acceleration *= 2.5f; } } diff --git a/Items/Rock.cs b/Items/Rock.cs new file mode 100644 index 0000000000..21b5d51ed6 --- /dev/null +++ b/Items/Rock.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Items; + +namespace CalamityMod.Items +{ + public class Rock : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Rock"); + Tooltip.SetDefault("The first object Xeroc ever created"); + } + + public override void SetDefaults() + { + item.width = 20; + item.height = 20; + item.value = 1; + } + } +} \ No newline at end of file diff --git a/Items/Rock.png b/Items/Rock.png new file mode 100644 index 0000000000..272b278c61 Binary files /dev/null and b/Items/Rock.png differ diff --git a/Items/Scavenger/BloodPact.cs b/Items/Scavenger/BloodPact.cs index cb17d70e63..b802f3334a 100644 --- a/Items/Scavenger/BloodPact.cs +++ b/Items/Scavenger/BloodPact.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Scavenger item.width = 26; item.height = 26; item.rare = 8; - item.value = 500000; + item.value = Item.buyPrice(0, 24, 0, 0); item.accessory = true; } diff --git a/Items/Scavenger/BloodPact.png b/Items/Scavenger/BloodPact.png index 6ac1acbcd2..de1b2f0dec 100644 Binary files a/Items/Scavenger/BloodPact.png and b/Items/Scavenger/BloodPact.png differ diff --git a/Items/Scavenger/FleshTotem.cs b/Items/Scavenger/FleshTotem.cs index 1564a5008c..ad1d6b3c6e 100644 --- a/Items/Scavenger/FleshTotem.cs +++ b/Items/Scavenger/FleshTotem.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Scavenger item.width = 26; item.height = 26; item.rare = 8; - item.value = 500000; + item.value = Item.buyPrice(0, 24, 0, 0); item.accessory = true; } diff --git a/Items/SlimeGod/ManaOverloader.cs b/Items/SlimeGod/ManaOverloader.cs index 87ac4dc822..2cb969d31f 100644 --- a/Items/SlimeGod/ManaOverloader.cs +++ b/Items/SlimeGod/ManaOverloader.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.SlimeGod { item.width = 30; item.height = 30; - item.value = 15000; + item.value = Item.buyPrice(0, 15, 0, 0); item.rare = 5; item.accessory = true; item.expert = true; diff --git a/Items/SupremeManaPotion.cs b/Items/SupremeManaPotion.cs new file mode 100644 index 0000000000..89437a0da0 --- /dev/null +++ b/Items/SupremeManaPotion.cs @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using Terraria.DataStructures; + +namespace CalamityMod.Items +{ + public class SupremeManaPotion : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Supreme Mana Potion"); + } + + public override void SetDefaults() + { + item.width = 28; + item.height = 18; + item.useTurn = true; + item.maxStack = 30; + item.healMana = 400; + item.useAnimation = 17; + item.useTime = 17; + item.useStyle = 2; + item.UseSound = SoundID.Item3; + item.consumable = true; + item.value = 10000; + } + + public override void ModifyTooltips(List list) + { + foreach (TooltipLine line2 in list) + { + if (line2.mod == "Terraria" && line2.Name == "ItemName") + { + line2.overrideColor = new Color(0, 255, 200); + } + } + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ItemID.SuperManaPotion); + recipe.AddIngredient(null, "Phantoplasm"); + recipe.AddTile(TileID.LunarCraftingStation); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } +} \ No newline at end of file diff --git a/Items/SupremeManaPotion.png b/Items/SupremeManaPotion.png new file mode 100644 index 0000000000..ee77e5efa4 Binary files /dev/null and b/Items/SupremeManaPotion.png differ diff --git a/Items/TheDevourerofGods/CosmicWorm.cs b/Items/TheDevourerofGods/CosmicWorm.cs index 2f25674f86..1e5171d297 100644 --- a/Items/TheDevourerofGods/CosmicWorm.cs +++ b/Items/TheDevourerofGods/CosmicWorm.cs @@ -42,7 +42,7 @@ namespace CalamityMod.Items.TheDevourerofGods public override bool CanUseItem(Player player) { - return !NPC.AnyNPCs(mod.NPCType("DevourerofGodsHead")) && !NPC.AnyNPCs(mod.NPCType("DevourerofGodsHeadS")) && CalamityGlobalNPC.DoGSecondStageCountdown <= 0; + return !NPC.AnyNPCs(mod.NPCType("DevourerofGodsHead")) && !NPC.AnyNPCs(mod.NPCType("DevourerofGodsHeadS")) && CalamityWorld.DoGSecondStageCountdown <= 0; } public override bool UseItem(Player player) diff --git a/Items/TheDevourerofGods/NebulousCore.cs b/Items/TheDevourerofGods/NebulousCore.cs index de317b1fc4..d6a9311d93 100644 --- a/Items/TheDevourerofGods/NebulousCore.cs +++ b/Items/TheDevourerofGods/NebulousCore.cs @@ -6,6 +6,7 @@ using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items; +using CalamityMod.Items.CalamityCustomThrowingDamage; namespace CalamityMod.Items.TheDevourerofGods { @@ -14,7 +15,7 @@ namespace CalamityMod.Items.TheDevourerofGods public override void SetStaticDefaults() { DisplayName.SetDefault("Nebulous Core"); - Tooltip.SetDefault("10% increased damage and critical strike chance\n" + + Tooltip.SetDefault("12% increased damage\n" + "Summons floating nebula stars to protect you\n" + "You have a 10% chance to survive an attack that would have killed you\n" + "If this effect activates you will be healed by 100 HP"); @@ -24,7 +25,7 @@ namespace CalamityMod.Items.TheDevourerofGods { item.width = 16; item.height = 14; - item.value = 500000; + item.value = Item.buyPrice(0, 60, 0, 0); item.accessory = true; item.expert = true; } @@ -40,15 +41,11 @@ namespace CalamityMod.Items.TheDevourerofGods { CalamityPlayer modPlayer = player.GetModPlayer(mod); modPlayer.nCore = true; - player.magicCrit += 10; - player.magicDamage += 0.1f; - player.meleeCrit += 10; - player.meleeDamage += 0.1f; - player.thrownCrit += 10; - player.thrownDamage += 0.1f; - player.rangedCrit += 10; - player.rangedDamage += 0.1f; - player.minionDamage += 0.1f; + player.magicDamage += 0.12f; + player.meleeDamage += 0.12f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.12f; + player.rangedDamage += 0.12f; + player.minionDamage += 0.12f; int damage = 300; float knockBack = 3f; if (Main.rand.Next(15) == 0) diff --git a/Items/Weapons/AMR.cs b/Items/Weapons/AMR.cs index a862b5b3c5..3cb7d4ad48 100644 --- a/Items/Weapons/AMR.cs +++ b/Items/Weapons/AMR.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { - item.damage = 4000; + item.damage = 7000; item.ranged = true; item.width = 76; item.crit += 20; diff --git a/Items/Weapons/AbyssBlade.cs b/Items/Weapons/AbyssBlade.cs index bd52f3fbd9..45e3219d8e 100644 --- a/Items/Weapons/AbyssBlade.cs +++ b/Items/Weapons/AbyssBlade.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { item.width = 60; - item.damage = 80; + item.damage = 100; item.melee = true; item.useAnimation = 17; item.useTime = 17; diff --git a/Items/Weapons/AbyssWeapons/HalibutCannon.cs b/Items/Weapons/AbyssWeapons/HalibutCannon.cs index 9753d3172f..d4f00b9349 100644 --- a/Items/Weapons/AbyssWeapons/HalibutCannon.cs +++ b/Items/Weapons/AbyssWeapons/HalibutCannon.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.AbyssWeapons public override void SetDefaults() { - item.damage = 6; + item.damage = 3; item.ranged = true; item.width = 108; item.height = 54; @@ -44,8 +44,8 @@ namespace CalamityMod.Items.Weapons.AbyssWeapons public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { - if (Main.hardMode) { item.damage = 12; } - if (NPC.downedMoonlord) { item.damage = 24; } + if (Main.hardMode) { item.damage = 6; } + if (NPC.downedMoonlord) { item.damage = 12; } int num6 = Main.rand.Next(25, 36); for (int index = 0; index < num6; ++index) { diff --git a/Items/Weapons/AbyssWeapons/SoulEdge.cs b/Items/Weapons/AbyssWeapons/SoulEdge.cs index ab94a8d2af..b93fab9f9e 100644 --- a/Items/Weapons/AbyssWeapons/SoulEdge.cs +++ b/Items/Weapons/AbyssWeapons/SoulEdge.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.AbyssWeapons public override void SetDefaults() { item.width = 88; - item.damage = 265; + item.damage = 365; item.melee = true; item.useAnimation = 18; item.useStyle = 1; diff --git a/Items/Weapons/AbyssWeapons/UndinesRetribution.cs b/Items/Weapons/AbyssWeapons/UndinesRetribution.cs index ce93d93650..da4a3cfc9c 100644 --- a/Items/Weapons/AbyssWeapons/UndinesRetribution.cs +++ b/Items/Weapons/AbyssWeapons/UndinesRetribution.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.AbyssWeapons public override void SetDefaults() { - item.damage = 40; + item.damage = 36; item.magic = true; item.mana = 15; item.width = 64; @@ -58,8 +58,7 @@ namespace CalamityMod.Items.Weapons.AbyssWeapons { num80 = num72 / num80; } - int num107 = Main.rand.Next(3, 5); - for (int num108 = 0; num108 < num107; num108++) + for (int num108 = 0; num108 < 3; num108++) { vector2 = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(51) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - /* - */ player.position.X), player.MountedCenter.Y + 600f); //- vector2.X = (vector2.X + player.Center.X) / 2f + (float)Main.rand.Next(-50, 51); //200 diff --git a/Items/Weapons/AccelerationBullet.cs b/Items/Weapons/AccelerationBullet.cs index 934ce61922..f64dcacdd8 100644 --- a/Items/Weapons/AccelerationBullet.cs +++ b/Items/Weapons/AccelerationBullet.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { - item.damage = 7; + item.damage = 9; item.ranged = true; item.width = 8; item.height = 8; diff --git a/Items/Weapons/AcidBullet.cs b/Items/Weapons/AcidBullet.cs index fe2cf52686..89bf6cc90b 100644 --- a/Items/Weapons/AcidBullet.cs +++ b/Items/Weapons/AcidBullet.cs @@ -13,12 +13,13 @@ namespace CalamityMod.Items.Weapons public override void SetStaticDefaults() { DisplayName.SetDefault("Acid Round"); - Tooltip.SetDefault("Explodes into acid that inflicts the plague"); + Tooltip.SetDefault("Explodes into acid that inflicts the plague\n" + + "Does more damage the higher the target's defense"); } public override void SetDefaults() { - item.damage = 24; + item.damage = 36; item.ranged = true; item.width = 8; item.height = 8; diff --git a/Items/Weapons/Aeries.cs b/Items/Weapons/Aeries.cs index 80cc73620f..faab6af4e1 100644 --- a/Items/Weapons/Aeries.cs +++ b/Items/Weapons/Aeries.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { - item.damage = 40; + item.damage = 35; item.ranged = true; item.width = 50; item.height = 32; @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons item.value = 350000; item.rare = 7; item.UseSound = SoundID.Item41; - item.autoReuse = false; + item.autoReuse = true; item.shootSpeed = 24f; item.shoot = mod.ProjectileType("ShockblastRound"); item.useAmmo = 97; @@ -52,7 +52,7 @@ namespace CalamityMod.Items.Weapons { ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ItemID.SpectreBar, 5); - recipe.AddIngredient(ItemID.PhoenixBlaster); + recipe.AddIngredient(null, "CursedCapper"); recipe.AddIngredient(ItemID.ShroomiteBar, 5); recipe.AddTile(TileID.MythrilAnvil); recipe.SetResult(this); diff --git a/Items/Weapons/Aftershock.cs b/Items/Weapons/Aftershock.cs index 691c46f765..380df2300e 100644 --- a/Items/Weapons/Aftershock.cs +++ b/Items/Weapons/Aftershock.cs @@ -79,9 +79,7 @@ namespace CalamityMod.Items.Weapons num79 *= num80; float speedX4 = num78; float speedY5 = num79 + (float)Main.rand.Next(-10, 11) * 0.02f; - int boulder = Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, speedY5, ProjectileID.BoulderStaffOfEarth, (int)((float)item.damage * player.meleeDamage), knockback, player.whoAmI, 0f, (float)Main.rand.Next(10)); - Main.projectile[boulder].magic = false; - Main.projectile[boulder].melee = true; + Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, speedY5, mod.ProjectileType("Aftershock"), (int)((float)item.damage * player.meleeDamage), knockback, player.whoAmI, 0f, (float)Main.rand.Next(10)); } public override void MeleeEffects(Player player, Rectangle hitbox) diff --git a/Items/Weapons/Alluvion.cs b/Items/Weapons/Alluvion.cs index 429e26284f..cfe93f0820 100644 --- a/Items/Weapons/Alluvion.cs +++ b/Items/Weapons/Alluvion.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { - item.damage = 53; + item.damage = 45; item.ranged = true; item.width = 44; item.height = 58; @@ -75,20 +75,17 @@ namespace CalamityMod.Items.Weapons } if (type == ProjectileID.WoodenArrowFriendly) { - switch (Main.rand.Next(12)) + if (Main.rand.Next(12) == 0) { - case 1: type = mod.ProjectileType("TorrentialArrow"); break; - default: break; + type = mod.ProjectileType("TorrentialArrow"); } - switch (Main.rand.Next(25)) + if (Main.rand.Next(25) == 0) { - case 1: type = 408; break; - default: break; + type = 408; } - switch (Main.rand.Next(100)) + if (Main.rand.Next(100) == 0) { - case 1: type = mod.ProjectileType("TyphoonArrow"); break; - default: break; + type = mod.ProjectileType("TyphoonArrow"); } int num121 = Projectile.NewProjectile(vector2.X + value9.X, vector2.Y + value9.Y, speedX, speedY, type, (int)((double)damage), knockBack, player.whoAmI, 0.0f, 0.0f); Main.projectile[num121].noDropItem = true; diff --git a/Items/Weapons/AlphaRay.cs b/Items/Weapons/AlphaRay.cs index 026010ad28..277d38ccc8 100644 --- a/Items/Weapons/AlphaRay.cs +++ b/Items/Weapons/AlphaRay.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { - item.damage = 280; + item.damage = 240; item.magic = true; item.mana = 5; item.width = 84; @@ -62,7 +62,7 @@ namespace CalamityMod.Items.Weapons { if (player.altFunctionUse == 2) { - Projectile.NewProjectile(position.X, position.Y, speedX, speedY, mod.ProjectileType("BigBeamofDeath"), (int)((double)damage * 2f), knockBack, player.whoAmI, 0.0f, 0.0f); + Projectile.NewProjectile(position.X, position.Y, speedX, speedY, mod.ProjectileType("BigBeamofDeath"), (int)((double)damage * 1.7), knockBack, player.whoAmI, 0.0f, 0.0f); return false; } else @@ -82,8 +82,8 @@ namespace CalamityMod.Items.Weapons { value9 -= vector7; } - Projectile.NewProjectile(vector2.X + value9.X, vector2.Y + value9.Y, speedX, speedY, type, (int)((double)damage), knockBack, player.whoAmI, 0.0f, 0.0f); - int laser = Projectile.NewProjectile(vector2.X + value9.X, vector2.Y + value9.Y, speedX * 2f, speedY * 2f, 440, (int)((double)damage * 0.5f), knockBack, player.whoAmI, 0.0f, 0.0f); + Projectile.NewProjectile(vector2.X + value9.X, vector2.Y + value9.Y, speedX, speedY, type, (int)((double)damage * 0.8), knockBack, player.whoAmI, 0.0f, 0.0f); + int laser = Projectile.NewProjectile(vector2.X + value9.X, vector2.Y + value9.Y, speedX * 2f, speedY * 2f, 440, (int)((double)damage * 0.4), knockBack, player.whoAmI, 0.0f, 0.0f); Main.projectile[laser].timeLeft = 120; Main.projectile[laser].tileCollide = false; } @@ -95,8 +95,8 @@ namespace CalamityMod.Items.Weapons { ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(null, "GalacticaSingularity", 5); - recipe.AddIngredient(null, "CosmiliteBar", 8); - recipe.AddIngredient(null, "Wingman", 2); + recipe.AddIngredient(null, "DarksunFragment", 15); + recipe.AddIngredient(null, "Wingman", 2); recipe.AddIngredient(null, "Genisis"); recipe.AddTile(TileID.LunarCraftingStation); recipe.SetResult(this); diff --git a/Items/Weapons/AnarchyBlade.cs b/Items/Weapons/AnarchyBlade.cs index 3c4c096bfa..fb808f5510 100644 --- a/Items/Weapons/AnarchyBlade.cs +++ b/Items/Weapons/AnarchyBlade.cs @@ -55,7 +55,7 @@ namespace CalamityMod.Items.Weapons public override void GetWeaponDamage(Player player, ref int damage) { int lifeAmount = player.statLifeMax2 - player.statLife; - float damageAdd = (((float)lifeAmount * 0.1f) + 110f); + float damageAdd = (((float)lifeAmount * 0.1f) + (float)item.damage); damage = (int)(damageAdd * player.meleeDamage); } diff --git a/Items/Weapons/Animus.cs b/Items/Weapons/Animus.cs index adabfe91fe..338b239c44 100644 --- a/Items/Weapons/Animus.cs +++ b/Items/Weapons/Animus.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { item.width = 84; - item.damage = 2500; + item.damage = 4000; item.melee = true; item.useAnimation = 11; item.useStyle = 1; @@ -59,11 +59,11 @@ namespace CalamityMod.Items.Weapons int damageRan = Main.rand.Next(195); //0 to 195 if (damageRan >= 50 && damageRan <= 99) //25% { - item.damage = 4000; + item.damage = 6000; } else if (damageRan >= 100 && damageRan <= 139) //20% { - item.damage = 7500; + item.damage = 9000; } else if (damageRan >= 140 && damageRan <= 169) //15% { @@ -79,7 +79,7 @@ namespace CalamityMod.Items.Weapons } else { - item.damage = 2500; + item.damage = 4000; } } } diff --git a/Items/Weapons/Apotheosis.cs b/Items/Weapons/Apotheosis.cs index c661bc1eeb..b995127dd7 100644 --- a/Items/Weapons/Apotheosis.cs +++ b/Items/Weapons/Apotheosis.cs @@ -1,3 +1,4 @@ +using System.Collections.Generic; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; @@ -16,7 +17,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { - item.damage = 267; + item.damage = 333; item.magic = true; item.mana = 42; item.width = 16; @@ -26,15 +27,25 @@ namespace CalamityMod.Items.Weapons item.useStyle = 5; item.useTurn = false; item.noMelee = true; - item.knockBack = 4; + item.knockBack = 4f; item.value = 85000000; - item.rare = 12; item.UseSound = SoundID.Item92; item.autoReuse = true; item.shoot = mod.ProjectileType("ApothMark"); item.shootSpeed = 15; } + public override void ModifyTooltips(List list) + { + foreach (TooltipLine line2 in list) + { + if (line2.mod == "Terraria" && line2.Name == "ItemName") + { + line2.overrideColor = new Color(255, 0, 255); + } + } + } + public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); @@ -47,6 +58,7 @@ namespace CalamityMod.Items.Weapons recipe.AddIngredient(null, "EndothermicEnergy", 77); recipe.AddIngredient(null, "CosmiliteBar", 77); recipe.AddIngredient(null, "Phantoplasm", 77); + recipe.AddIngredient(null, "ShadowspecBar", 5); recipe.AddTile(null, "DraedonsForge"); recipe.SetResult(this); recipe.AddRecipe(); diff --git a/Items/Weapons/ArcticArrow.cs b/Items/Weapons/ArcticArrow.cs index 64378be909..a3817bbc6c 100644 --- a/Items/Weapons/ArcticArrow.cs +++ b/Items/Weapons/ArcticArrow.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { - item.damage = 13; + item.damage = 16; item.ranged = true; item.width = 22; item.height = 36; diff --git a/Items/Weapons/ArkoftheAncients.cs b/Items/Weapons/ArkoftheAncients.cs index 8fa9dbc82c..3740e464c6 100644 --- a/Items/Weapons/ArkoftheAncients.cs +++ b/Items/Weapons/ArkoftheAncients.cs @@ -88,9 +88,7 @@ namespace CalamityMod.Items.Weapons num79 *= num80; float speedX4 = num78 + (float)Main.rand.Next(-120, 121) * 0.02f; float speedY5 = num79 + (float)Main.rand.Next(-120, 121) * 0.02f; - int star = Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, speedY5, 92, damage, knockBack, player.whoAmI, 0f, (float)Main.rand.Next(5)); - Main.projectile[star].ranged = false; - Main.projectile[star].melee = true; + Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, speedY5, 92, damage, knockBack, player.whoAmI, 1f, (float)Main.rand.Next(5)); } return false; } diff --git a/Items/Weapons/ArkoftheCosmos.cs b/Items/Weapons/ArkoftheCosmos.cs index 1496293442..b86f32f063 100644 --- a/Items/Weapons/ArkoftheCosmos.cs +++ b/Items/Weapons/ArkoftheCosmos.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { item.width = 100; - item.damage = 320; + item.damage = 350; item.melee = true; item.useAnimation = 15; item.useTime = 15; diff --git a/Items/Weapons/AstralBlaster.cs b/Items/Weapons/AstralBlaster.cs index 656d17fce8..b133797fef 100644 --- a/Items/Weapons/AstralBlaster.cs +++ b/Items/Weapons/AstralBlaster.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { - item.damage = 72; + item.damage = 100; item.crit += 25; item.ranged = true; item.width = 40; diff --git a/Items/Weapons/AstralStaff.cs b/Items/Weapons/AstralStaff.cs index 0a1b109bfe..48f001db11 100644 --- a/Items/Weapons/AstralStaff.cs +++ b/Items/Weapons/AstralStaff.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { - item.damage = 110; + item.damage = 180; item.crit += 15; item.magic = true; item.mana = 26; diff --git a/Items/Weapons/AstrumDeus/Starfall.cs b/Items/Weapons/AstrumDeus/Starfall.cs index 574554759f..bd983a4271 100644 --- a/Items/Weapons/AstrumDeus/Starfall.cs +++ b/Items/Weapons/AstrumDeus/Starfall.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.AstrumDeus public override void SetDefaults() { - item.damage = 45; + item.damage = 39; item.crit += 25; item.magic = true; item.mana = 15; diff --git a/Items/Weapons/Azathoth.cs b/Items/Weapons/Azathoth.cs index dd3d120c44..3787264c5d 100644 --- a/Items/Weapons/Azathoth.cs +++ b/Items/Weapons/Azathoth.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { item.CloneDefaults(ItemID.Kraken); - item.damage = 100; + item.damage = 240; item.useTime = 20; item.useAnimation = 20; item.useStyle = 5; diff --git a/Items/Weapons/BladecrestOathsword.png b/Items/Weapons/BladecrestOathsword.png index 50f77a274f..fb687ddfc0 100644 Binary files a/Items/Weapons/BladecrestOathsword.png and b/Items/Weapons/BladecrestOathsword.png differ diff --git a/Items/Weapons/BloodfireArrow.cs b/Items/Weapons/BloodfireArrow.cs index bd76e7dd8a..fd7f3972f1 100644 --- a/Items/Weapons/BloodfireArrow.cs +++ b/Items/Weapons/BloodfireArrow.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { - item.damage = 30; + item.damage = 40; item.ranged = true; item.width = 14; item.height = 36; diff --git a/Items/Weapons/BlossomFlux.png b/Items/Weapons/BlossomFlux.png index e26e8984d1..65ff75f648 100644 Binary files a/Items/Weapons/BlossomFlux.png and b/Items/Weapons/BlossomFlux.png differ diff --git a/Items/Weapons/BrimstoneFury.cs b/Items/Weapons/BrimstoneFury.cs index d7290a0f23..026df784d2 100644 --- a/Items/Weapons/BrimstoneFury.cs +++ b/Items/Weapons/BrimstoneFury.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { - item.damage = 17; + item.damage = 21; item.ranged = true; item.width = 30; item.height = 58; @@ -45,7 +45,7 @@ namespace CalamityMod.Items.Weapons 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 numProj = 2; - float rotation = MathHelper.ToRadians(9); + float rotation = MathHelper.ToRadians(3); for (int i = 0; i < numProj + 1; i++) { Vector2 perturbedSpeed = new Vector2(speedX, speedY).RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (numProj - 1))); diff --git a/Items/Weapons/Bumblebirb/GoldenEagle.cs b/Items/Weapons/Bumblebirb/GoldenEagle.cs index 6c5f817cf1..8859ccdc24 100644 --- a/Items/Weapons/Bumblebirb/GoldenEagle.cs +++ b/Items/Weapons/Bumblebirb/GoldenEagle.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Bumblebirb public override void SetDefaults() { - item.damage = 145; + item.damage = 160; item.ranged = true; item.noMelee = true; item.width = 46; diff --git a/Items/Weapons/Bumblebirb/RougeSlash.cs b/Items/Weapons/Bumblebirb/RougeSlash.cs index 81225366c9..2e0816b67b 100644 --- a/Items/Weapons/Bumblebirb/RougeSlash.cs +++ b/Items/Weapons/Bumblebirb/RougeSlash.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Bumblebirb public override void SetDefaults() { - item.damage = 130; + item.damage = 370; item.magic = true; item.mana = 30; item.width = 28; @@ -27,12 +27,12 @@ namespace CalamityMod.Items.Weapons.Bumblebirb item.useTime = 19; item.useAnimation = 19; item.useStyle = 5; - item.noMelee = true; //so the item's animation doesn't do damage + item.noMelee = true; item.knockBack = 7.5f; item.UseSound = SoundID.Item91; item.value = 1000000; item.autoReuse = true; - item.shoot = mod.ProjectileType("RougeSlashLarge"); //idk why but all the guns in the vanilla source have this + item.shoot = mod.ProjectileType("RougeSlashLarge"); item.shootSpeed = 24f; } diff --git a/Items/Weapons/CarnageRay.cs b/Items/Weapons/CarnageRay.cs index bd4195e27d..64d5e72b0c 100644 --- a/Items/Weapons/CarnageRay.cs +++ b/Items/Weapons/CarnageRay.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { - item.damage = 30; + item.damage = 35; item.magic = true; item.mana = 10; item.width = 46; diff --git a/Items/Weapons/CausticEdge.cs b/Items/Weapons/CausticEdge.cs index 8e7f1c94b4..52c64489a3 100644 --- a/Items/Weapons/CausticEdge.cs +++ b/Items/Weapons/CausticEdge.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons item.useTime = 27; item.knockBack = 5; item.UseSound = SoundID.Item1; - item.autoReuse = false; + item.autoReuse = true; item.height = 48; item.value = 160000; item.rare = 3; diff --git a/Items/Weapons/Chaotrix.cs b/Items/Weapons/Chaotrix.cs index 42a77830bd..972ff6f826 100644 --- a/Items/Weapons/Chaotrix.cs +++ b/Items/Weapons/Chaotrix.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { item.CloneDefaults(ItemID.Yelets); - item.damage = 110; + item.damage = 150; item.useTime = 22; item.useAnimation = 22; item.useStyle = 5; diff --git a/Items/Weapons/ClaretCannon.cs b/Items/Weapons/ClaretCannon.cs index 1345943730..ec634dc3d9 100644 --- a/Items/Weapons/ClaretCannon.cs +++ b/Items/Weapons/ClaretCannon.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { - item.damage = 255; + item.damage = 215; item.ranged = true; item.width = 48; item.height = 30; diff --git a/Items/Weapons/CleansingBlaze.cs b/Items/Weapons/CleansingBlaze.cs index 451d1e3cd3..0a98a27a19 100644 --- a/Items/Weapons/CleansingBlaze.cs +++ b/Items/Weapons/CleansingBlaze.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { - item.damage = 150; + item.damage = 250; item.ranged = true; item.width = 60; item.height = 34; diff --git a/Items/Weapons/Climax.cs b/Items/Weapons/Climax.cs index e4f86655b1..acefefd65d 100644 --- a/Items/Weapons/Climax.cs +++ b/Items/Weapons/Climax.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { - item.damage = 110; + item.damage = 90; item.magic = true; item.mana = 30; item.width = 78; @@ -70,11 +70,7 @@ namespace CalamityMod.Items.Weapons { num80 = num72 / num80; } - float num208 = num78; - float num209 = num79; - num208 += (float)Main.rand.Next(-1, 2) * 0.5f; - num209 += (float)Main.rand.Next(-1, 2) * 0.5f; - vector2 += new Vector2(num208, num209); + vector2 += new Vector2(num78, num79); float spread = 45f * 0.0174f; double startAngle = Math.Atan2(speedX, speedY) - spread / 2; double deltaAngle = spread / 8f; diff --git a/Items/Weapons/CometQuasher.cs b/Items/Weapons/CometQuasher.cs index 12ab7f3940..e0b0f9343e 100644 --- a/Items/Weapons/CometQuasher.cs +++ b/Items/Weapons/CometQuasher.cs @@ -85,10 +85,7 @@ namespace CalamityMod.Items.Weapons num79 *= num80; float num114 = num78; float num115 = num79 + (float)Main.rand.Next(-40, 41) * 0.02f; - int meteor = Projectile.NewProjectile(vector2.X, vector2.Y, num114 * 0.75f, num115 * 0.75f, 424 + Main.rand.Next(3), (int)((double)((float)item.damage * player.meleeDamage) * 0.75), knockback, player.whoAmI, 0f, 0.5f + (float)Main.rand.NextDouble() * 0.3f); - Main.projectile[meteor].tileCollide = false; - Main.projectile[meteor].magic = false; - Main.projectile[meteor].melee = true; + Projectile.NewProjectile(vector2.X, vector2.Y, num114 * 0.75f, num115 * 0.75f, 424 + Main.rand.Next(3), (int)((double)((float)item.damage * player.meleeDamage) * 0.75), knockback, player.whoAmI, 1f, 0.5f + (float)Main.rand.NextDouble() * 0.3f); } } diff --git a/Items/Weapons/Contagion.cs b/Items/Weapons/Contagion.cs index 8cc02bc2f4..4c92c7129c 100644 --- a/Items/Weapons/Contagion.cs +++ b/Items/Weapons/Contagion.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { - item.damage = 300; + item.damage = 600; item.ranged = true; item.width = 22; item.height = 50; diff --git a/Items/Weapons/Contagion.png b/Items/Weapons/Contagion.png index 4f4f3ffd5e..3c9e396326 100644 Binary files a/Items/Weapons/Contagion.png and b/Items/Weapons/Contagion.png differ diff --git a/Items/Weapons/CosmicBolter.cs b/Items/Weapons/CosmicBolter.cs index dfb00e9451..592d9dfc16 100644 --- a/Items/Weapons/CosmicBolter.cs +++ b/Items/Weapons/CosmicBolter.cs @@ -23,8 +23,8 @@ namespace CalamityMod.Items.Weapons item.ranged = true; item.width = 40; item.height = 76; - item.useTime = 21; - item.useAnimation = 21; + item.useTime = 19; + item.useAnimation = 19; item.useStyle = 5; item.noMelee = true; item.knockBack = 2.75f; diff --git a/Items/Weapons/CosmicBolter.png b/Items/Weapons/CosmicBolter.png index 09035f16c5..87db9b0226 100644 Binary files a/Items/Weapons/CosmicBolter.png and b/Items/Weapons/CosmicBolter.png differ diff --git a/Items/Weapons/CosmicDischarge.cs b/Items/Weapons/CosmicDischarge.cs index a224ad2a23..82fd7b63b0 100644 --- a/Items/Weapons/CosmicDischarge.cs +++ b/Items/Weapons/CosmicDischarge.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Weapons { item.width = 16; item.height = 16; - item.damage = 1050; + item.damage = 1000; item.noMelee = true; item.noUseGraphic = true; item.channel = true; diff --git a/Items/Weapons/Cosmilamp.cs b/Items/Weapons/Cosmilamp.cs index 4cb970a84b..d0f5ab607d 100644 --- a/Items/Weapons/Cosmilamp.cs +++ b/Items/Weapons/Cosmilamp.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { - item.damage = 150; //80 + item.damage = 200; //80 item.mana = 10; item.width = 42; item.height = 60; diff --git a/Items/Weapons/Crabulon/HyphaeRod.cs b/Items/Weapons/Crabulon/HyphaeRod.cs index 86cc64fd5c..e2f4561332 100644 --- a/Items/Weapons/Crabulon/HyphaeRod.cs +++ b/Items/Weapons/Crabulon/HyphaeRod.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Crabulon public override void SetDefaults() { - item.damage = 13; + item.damage = 20; item.magic = true; item.mana = 7; item.width = 34; @@ -28,8 +28,8 @@ namespace CalamityMod.Items.Weapons.Crabulon item.useTime = 24; item.useAnimation = 24; item.useStyle = 5; - item.noMelee = true; //so the item's animation doesn't do damage - item.knockBack = 4.25f; + item.noMelee = true; + item.knockBack = 2f; item.value = 40000; item.rare = 2; item.UseSound = SoundID.Item8; diff --git a/Items/Weapons/Crimsaber.cs b/Items/Weapons/Crimsaber.cs index 277ab32c43..c70bed32d5 100644 --- a/Items/Weapons/Crimsaber.cs +++ b/Items/Weapons/Crimsaber.cs @@ -97,9 +97,7 @@ namespace CalamityMod.Items.Weapons num79 *= num80; float speedX4 = num78; float speedY5 = num79 + (float)Main.rand.Next(-180, 181) * 0.02f; - int piss = Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, speedY5, ProjectileID.GoldenShowerFriendly, (int)((float)item.damage * player.meleeDamage), knockback, player.whoAmI, 0f, (float)Main.rand.Next(10)); - Main.projectile[piss].magic = false; - Main.projectile[piss].melee = true; + Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, speedY5, ProjectileID.GoldenShowerFriendly, (int)((float)item.damage * player.meleeDamage), knockback, player.whoAmI, 1f, (float)Main.rand.Next(10)); } } diff --git a/Items/Weapons/CrystalBlade.cs b/Items/Weapons/CrystalBlade.cs index 49944542a7..2d7f03a035 100644 --- a/Items/Weapons/CrystalBlade.cs +++ b/Items/Weapons/CrystalBlade.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { item.width = 66; - item.damage = 32; + item.damage = 45; item.melee = true; item.useAnimation = 25; item.useStyle = 1; diff --git a/Items/Weapons/CursedCapper.cs b/Items/Weapons/CursedCapper.cs index 5a9402f939..d63a2de886 100644 --- a/Items/Weapons/CursedCapper.cs +++ b/Items/Weapons/CursedCapper.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { - item.damage = 30; + item.damage = 24; item.ranged = true; item.width = 44; item.height = 32; @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons item.value = 150000; item.rare = 5; item.UseSound = SoundID.Item41; - item.autoReuse = false; + item.autoReuse = true; item.shootSpeed = 14f; item.shoot = mod.ProjectileType("CursedRound"); item.useAmmo = 97; diff --git a/Items/Weapons/DesertScourge/Barinade.cs b/Items/Weapons/DesertScourge/Barinade.cs index 98e3a00be2..608b16690e 100644 --- a/Items/Weapons/DesertScourge/Barinade.cs +++ b/Items/Weapons/DesertScourge/Barinade.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.DesertScourge public override void SetDefaults() { - item.damage = 10; + item.damage = 8; item.ranged = true; item.width = 30; item.height = 44; diff --git a/Items/Weapons/DesertScourge/StormSpray.cs b/Items/Weapons/DesertScourge/StormSpray.cs index 417aac5031..eaa7947f8e 100644 --- a/Items/Weapons/DesertScourge/StormSpray.cs +++ b/Items/Weapons/DesertScourge/StormSpray.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.DesertScourge public override void SetDefaults() { - item.damage = 15; + item.damage = 18; item.magic = true; item.mana = 8; item.width = 42; diff --git a/Items/Weapons/DevilsDevastation.cs b/Items/Weapons/DevilsDevastation.cs index dc68f74e97..1870f9b036 100644 --- a/Items/Weapons/DevilsDevastation.cs +++ b/Items/Weapons/DevilsDevastation.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { item.width = 74; - item.damage = 359; + item.damage = 450; item.melee = true; item.useAnimation = 20; item.useTime = 20; diff --git a/Items/Weapons/DevourerofGods/DeathhailStaff.cs b/Items/Weapons/DevourerofGods/DeathhailStaff.cs index ee9b3e42ed..12b604e583 100644 --- a/Items/Weapons/DevourerofGods/DeathhailStaff.cs +++ b/Items/Weapons/DevourerofGods/DeathhailStaff.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.DevourerofGods public override void SetDefaults() { - item.damage = 100; + item.damage = 180; item.magic = true; item.mana = 12; item.width = 62; diff --git a/Items/Weapons/DevourerofGods/Deathwind.cs b/Items/Weapons/DevourerofGods/Deathwind.cs index 778ffe75f8..f10b3b64db 100644 --- a/Items/Weapons/DevourerofGods/Deathwind.cs +++ b/Items/Weapons/DevourerofGods/Deathwind.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.DevourerofGods public override void SetDefaults() { - item.damage = 200; + item.damage = 265; item.ranged = true; item.width = 38; item.height = 66; diff --git a/Items/Weapons/DevourerofGods/EradicatorMelee.cs b/Items/Weapons/DevourerofGods/EradicatorMelee.cs index dd23ef99fa..ee7b0e936d 100644 --- a/Items/Weapons/DevourerofGods/EradicatorMelee.cs +++ b/Items/Weapons/DevourerofGods/EradicatorMelee.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.DevourerofGods public override void SetDefaults() { item.width = 38; - item.damage = 225; + item.damage = 300; item.noMelee = true; item.noUseGraphic = true; item.autoReuse = true; diff --git a/Items/Weapons/DevourerofGods/Excelsus.cs b/Items/Weapons/DevourerofGods/Excelsus.cs index 0b3d78ed8a..b818acc31e 100644 --- a/Items/Weapons/DevourerofGods/Excelsus.cs +++ b/Items/Weapons/DevourerofGods/Excelsus.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.DevourerofGods public override void SetDefaults() { item.width = 70; - item.damage = 161; + item.damage = 235; item.melee = true; item.useAnimation = 15; item.useStyle = 1; diff --git a/Items/Weapons/DevourerofGods/TheObliterator.cs b/Items/Weapons/DevourerofGods/TheObliterator.cs index 919008c045..38cc853387 100644 --- a/Items/Weapons/DevourerofGods/TheObliterator.cs +++ b/Items/Weapons/DevourerofGods/TheObliterator.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.DevourerofGods public override void SetDefaults() { item.CloneDefaults(ItemID.TheEyeOfCthulhu); - item.damage = 88; + item.damage = 63; item.useTime = 20; item.useAnimation = 20; item.useStyle = 5; diff --git a/Items/Weapons/DraconicDestruction.cs b/Items/Weapons/DraconicDestruction.cs index 3694d10f98..c18b3904ef 100644 --- a/Items/Weapons/DraconicDestruction.cs +++ b/Items/Weapons/DraconicDestruction.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { item.width = 94; - item.damage = 150; + item.damage = 210; item.melee = true; item.useAnimation = 24; item.useStyle = 1; diff --git a/Items/Weapons/DraedonsExoblade.cs b/Items/Weapons/DraedonsExoblade.cs index 292edbba52..26bb10d307 100644 --- a/Items/Weapons/DraedonsExoblade.cs +++ b/Items/Weapons/DraedonsExoblade.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { item.width = 80; - item.damage = 2500; + item.damage = 3500; item.useAnimation = 14; item.useStyle = 1; item.useTime = 14; @@ -53,7 +53,7 @@ namespace CalamityMod.Items.Weapons public override void GetWeaponDamage(Player player, ref int damage) { int lifeAmount = player.statLifeMax2 - player.statLife; - float damageAdd = ((float)lifeAmount + 2100f); + float damageAdd = ((float)lifeAmount + (float)item.damage); damage = (int)(damageAdd * player.meleeDamage); } @@ -121,7 +121,7 @@ namespace CalamityMod.Items.Weapons { return; } - int healAmount = (Main.rand.Next(10) + 5); + int healAmount = (Main.rand.Next(5) + 5); player.statLife += healAmount; player.HealEffect(healAmount); } diff --git a/Items/Weapons/Drataliornus.cs b/Items/Weapons/Drataliornus.cs index c608d888b0..b509ba6942 100644 --- a/Items/Weapons/Drataliornus.cs +++ b/Items/Weapons/Drataliornus.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; @@ -20,7 +21,7 @@ Right click to fire two devastating barrages of five empowered fireballs. public override void SetDefaults() { - item.damage = 360; + item.damage = 410; item.knockBack = 1f; item.shootSpeed = 18f; item.useStyle = 5; @@ -31,7 +32,6 @@ Right click to fire two devastating barrages of five empowered fireballs. item.height = 84; item.UseSound = SoundID.Item5; item.shoot = mod.ProjectileType("Drataliornus"); - item.rare = 15; item.value = Item.sellPrice(18, 0, 0, 0); item.noMelee = true; item.noUseGraphic = true; @@ -42,6 +42,17 @@ Right click to fire two devastating barrages of five empowered fireballs. item.autoReuse = true; } + public override void ModifyTooltips(List list) + { + foreach (TooltipLine line2 in list) + { + if (line2.mod == "Terraria" && line2.Name == "ItemName") + { + line2.overrideColor = new Color(255, 0, 255); + } + } + } + public override bool AltFunctionUse(Player player) { return true; diff --git a/Items/Weapons/Dualpoon.cs b/Items/Weapons/Dualpoon.cs index 790573668d..427d1811d0 100644 --- a/Items/Weapons/Dualpoon.cs +++ b/Items/Weapons/Dualpoon.cs @@ -34,15 +34,20 @@ namespace CalamityMod.Items.Weapons item.shootSpeed = 20f; item.shoot = mod.ProjectileType("Triploon"); } - - public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + + public override Vector2? HoldoutOffset() + { + return new Vector2(-5, 0); + } + + public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); float num117 = 0.314159274f; int num118 = 2; Vector2 vector7 = new Vector2(speedX, speedY); vector7.Normalize(); - vector7 *= 80f; + vector7 *= 40f; bool flag11 = Collision.CanHit(vector2, 0, 0, vector2 + vector7, 0, 0); for (int num119 = 0; num119 < num118; num119++) { @@ -62,7 +67,8 @@ namespace CalamityMod.Items.Weapons { ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ItemID.Harpoon, 2); - recipe.AddIngredient(ItemID.SoulofMight, 10); + recipe.AddIngredient(ItemID.HallowedBar, 5); + recipe.AddIngredient(ItemID.SoulofMight, 10); recipe.AddTile(TileID.MythrilAnvil); recipe.SetResult(this); recipe.AddRecipe(); diff --git a/Items/Weapons/Dualpoon.png b/Items/Weapons/Dualpoon.png index 525a2a87f0..dec099369a 100644 Binary files a/Items/Weapons/Dualpoon.png and b/Items/Weapons/Dualpoon.png differ diff --git a/Items/Weapons/Earth.cs b/Items/Weapons/Earth.cs index 14968406f6..d1cfda8e43 100644 --- a/Items/Weapons/Earth.cs +++ b/Items/Weapons/Earth.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { item.width = 92; - item.damage = 300; + item.damage = 840; item.melee = true; item.useAnimation = 16; item.useStyle = 1; @@ -59,7 +59,7 @@ namespace CalamityMod.Items.Weapons { target.defense -= 50; } - int heal = Main.rand.Next(20, 69); + int heal = Main.rand.Next(1, 69); player.statLife += heal; player.HealEffect(heal); float num72 = 25f; diff --git a/Items/Weapons/EmpyreanKnives.cs b/Items/Weapons/EmpyreanKnives.cs index b19e1e4403..6e97097038 100644 --- a/Items/Weapons/EmpyreanKnives.cs +++ b/Items/Weapons/EmpyreanKnives.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { item.width = 18; - item.damage = 800; + item.damage = 650; item.melee = true; item.noMelee = true; item.noUseGraphic = true; diff --git a/Items/Weapons/EnhancedNanoRound.cs b/Items/Weapons/EnhancedNanoRound.cs index 392c736dcd..2db84e5ed9 100644 --- a/Items/Weapons/EnhancedNanoRound.cs +++ b/Items/Weapons/EnhancedNanoRound.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons item.consumable = true; item.knockBack = 5.5f; item.value = 500; - item.rare = 1; + item.rare = 3; item.shoot = mod.ProjectileType("EnhancedNanoRound"); item.shootSpeed = 8f; item.ammo = 97; diff --git a/Items/Weapons/EssenceFlayer.cs b/Items/Weapons/EssenceFlayer.cs index 07386696dd..1038f317cf 100644 --- a/Items/Weapons/EssenceFlayer.cs +++ b/Items/Weapons/EssenceFlayer.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { item.width = 60; - item.damage = 280; + item.damage = 450; item.melee = true; item.useAnimation = 19; item.useStyle = 1; diff --git a/Items/Weapons/Fabstaff.cs b/Items/Weapons/Fabstaff.cs index e06e21c29e..99f6418f3d 100644 --- a/Items/Weapons/Fabstaff.cs +++ b/Items/Weapons/Fabstaff.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { - item.damage = 330; + item.damage = 700; item.magic = true; item.mana = 50; item.width = 84; diff --git a/Items/Weapons/Fabstaff.png b/Items/Weapons/Fabstaff.png index 0e36ca8917..6658464065 100644 Binary files a/Items/Weapons/Fabstaff.png and b/Items/Weapons/Fabstaff.png differ diff --git a/Items/Weapons/FellerofEvergreens.cs b/Items/Weapons/FellerofEvergreens.cs index dc36bda0ca..f5a3d3008b 100644 --- a/Items/Weapons/FellerofEvergreens.cs +++ b/Items/Weapons/FellerofEvergreens.cs @@ -38,14 +38,16 @@ namespace CalamityMod.Items.Weapons { ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ItemID.Wood, 15); - recipe.AddIngredient(ItemID.TungstenBar, 10); + recipe.anyWood = true; + recipe.AddIngredient(ItemID.TungstenBar, 10); recipe.AddIngredient(ItemID.TungstenAxe); recipe.AddTile(TileID.Anvils); recipe.SetResult(this); recipe.AddRecipe(); recipe = new ModRecipe(mod); recipe.AddIngredient(ItemID.Wood, 15); - recipe.AddIngredient(ItemID.SilverBar, 10); + recipe.anyWood = true; + recipe.AddIngredient(ItemID.SilverBar, 10); recipe.AddIngredient(ItemID.SilverAxe); recipe.AddTile(TileID.Anvils); recipe.SetResult(this); diff --git a/Items/Weapons/FeralthornClaymore.cs b/Items/Weapons/FeralthornClaymore.cs index d69250a8d9..08c86cd466 100644 --- a/Items/Weapons/FeralthornClaymore.cs +++ b/Items/Weapons/FeralthornClaymore.cs @@ -21,9 +21,9 @@ namespace CalamityMod.Items.Weapons item.width = 66; item.damage = 63; item.melee = true; - item.useAnimation = 19; + item.useAnimation = 13; item.useStyle = 1; - item.useTime = 19; + item.useTime = 13; item.useTurn = true; item.knockBack = 7.25f; item.UseSound = SoundID.Item8; @@ -31,8 +31,6 @@ namespace CalamityMod.Items.Weapons item.height = 66; item.value = 355000; item.rare = 6; - item.shoot = 8; - item.shootSpeed = 16f; } public override void AddRecipes() @@ -44,14 +42,6 @@ namespace CalamityMod.Items.Weapons recipe.AddRecipe(); } - public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) - { - int thorn = Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, damage, knockBack, player.whoAmI, 0.0f, 0.0f); - Main.projectile[thorn].magic = false; - Main.projectile[thorn].melee = true; - return false; - } - public override void MeleeEffects(Player player, Rectangle hitbox) { if (Main.rand.Next(4) == 0) diff --git a/Items/Weapons/FlameScytheMelee.cs b/Items/Weapons/FlameScytheMelee.cs index bc5421d2bb..24133055c5 100644 --- a/Items/Weapons/FlameScytheMelee.cs +++ b/Items/Weapons/FlameScytheMelee.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { item.width = 50; - item.damage = 130; + item.damage = 145; item.noMelee = true; item.noUseGraphic = true; item.autoReuse = true; diff --git a/Items/Weapons/Floodtide.cs b/Items/Weapons/Floodtide.cs index 7bca626a8e..e85547120e 100644 --- a/Items/Weapons/Floodtide.cs +++ b/Items/Weapons/Floodtide.cs @@ -35,7 +35,13 @@ namespace CalamityMod.Items.Weapons item.shoot = 408; item.shootSpeed = 11f; } - + + public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, damage, knockBack, player.whoAmI, 1f, 0.0f); + return false; + } + public override void MeleeEffects(Player player, Rectangle hitbox) { if (Main.rand.Next(5) == 0) diff --git a/Items/Weapons/ForsakenSaber.cs b/Items/Weapons/ForsakenSaber.cs index 911a0bdf3a..c02cd56b53 100644 --- a/Items/Weapons/ForsakenSaber.cs +++ b/Items/Weapons/ForsakenSaber.cs @@ -21,9 +21,9 @@ namespace CalamityMod.Items.Weapons item.width = 54; item.damage = 65; item.melee = true; - item.useAnimation = 23; + item.useAnimation = 18; item.useStyle = 1; - item.useTime = 23; + item.useTime = 18; item.useTurn = true; item.knockBack = 6; item.UseSound = SoundID.Item1; diff --git a/Items/Weapons/FourSeasonsGalaxia.cs b/Items/Weapons/FourSeasonsGalaxia.cs index 813fd92da4..09994e307e 100644 --- a/Items/Weapons/FourSeasonsGalaxia.cs +++ b/Items/Weapons/FourSeasonsGalaxia.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { item.width = 70; - item.damage = 336; + item.damage = 425; item.melee = true; item.useAnimation = 17; item.useTime = 17; diff --git a/Items/Weapons/FrostsparkBullet.cs b/Items/Weapons/FrostsparkBullet.cs index fd68d44758..fdc0036702 100644 --- a/Items/Weapons/FrostsparkBullet.cs +++ b/Items/Weapons/FrostsparkBullet.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons item.consumable = true; item.knockBack = 1.25f; item.value = 600; - item.rare = 5; + item.rare = 3; item.shoot = mod.ProjectileType("FrostsparkBullet"); item.shootSpeed = 14f; item.ammo = 97; diff --git a/Items/Weapons/Galeforce.cs b/Items/Weapons/Galeforce.cs index 77615dfd73..1687490edb 100644 --- a/Items/Weapons/Galeforce.cs +++ b/Items/Weapons/Galeforce.cs @@ -19,12 +19,12 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { - item.damage = 16; + item.damage = 18; item.ranged = true; item.width = 32; item.height = 52; - item.useTime = 19; - item.useAnimation = 19; + item.useTime = 17; + item.useAnimation = 17; item.useStyle = 5; item.noMelee = true; item.knockBack = 4; diff --git a/Items/Weapons/GrandGuardian.cs b/Items/Weapons/GrandGuardian.cs index f8d76ea24f..171d7f6ac4 100644 --- a/Items/Weapons/GrandGuardian.cs +++ b/Items/Weapons/GrandGuardian.cs @@ -41,7 +41,7 @@ namespace CalamityMod.Items.Weapons public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit) { - if (target.type == NPCID.TargetDummy || target.type == mod.NPCType("DevourerofGodsBody") || target.type == mod.NPCType("DevourerofGodsBody2")) + if (target.type == mod.NPCType("DevourerofGodsBodyS") || target.type == mod.NPCType("DevourerofGodsBody")) { return; } @@ -51,8 +51,8 @@ namespace CalamityMod.Items.Weapons } if (target.defense <= 0) { - player.statLife += 12; - player.HealEffect(12); + player.statLife += 6; + player.HealEffect(6); } Projectile.NewProjectile(target.Center.X, target.Center.Y, 0f, 0f, mod.ProjectileType("RainbowBoom"), (int)((double)((float)item.damage * player.meleeDamage) * 0.5), knockback, Main.myPlayer); float spread = 180f * 0.0174f; diff --git a/Items/Weapons/GreatSandShark/ShiftingSands.cs b/Items/Weapons/GreatSandShark/ShiftingSands.cs index 908267baca..87399a3f19 100644 --- a/Items/Weapons/GreatSandShark/ShiftingSands.cs +++ b/Items/Weapons/GreatSandShark/ShiftingSands.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.GreatSandShark public override void SetDefaults() { - item.damage = 90; + item.damage = 95; item.magic = true; item.channel = true; item.mana = 20; diff --git a/Items/Weapons/GreatswordofBlah.cs b/Items/Weapons/GreatswordofBlah.cs index a99456ce30..09faac60ce 100644 --- a/Items/Weapons/GreatswordofBlah.cs +++ b/Items/Weapons/GreatswordofBlah.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { item.width = 110; - item.damage = 410; + item.damage = 280; item.melee = true; item.useAnimation = 18; item.useStyle = 1; diff --git a/Items/Weapons/HeavenlyGale.cs b/Items/Weapons/HeavenlyGale.cs index 358f963ac1..54a5067b35 100644 --- a/Items/Weapons/HeavenlyGale.cs +++ b/Items/Weapons/HeavenlyGale.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { - item.damage = 550; + item.damage = 600; item.ranged = true; item.width = 44; item.height = 58; diff --git a/Items/Weapons/HellwingStaff.cs b/Items/Weapons/HellwingStaff.cs index 7300e0dfca..c0f7fd16c0 100644 --- a/Items/Weapons/HellwingStaff.cs +++ b/Items/Weapons/HellwingStaff.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { - item.damage = 18; + item.damage = 20; item.magic = true; item.mana = 18; item.width = 54; diff --git a/Items/Weapons/HolidayHalberd.cs b/Items/Weapons/HolidayHalberd.cs index 7b9bc802bf..e7af2ac233 100644 --- a/Items/Weapons/HolidayHalberd.cs +++ b/Items/Weapons/HolidayHalberd.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { - item.width = 64; + item.width = 70; item.damage = 94; item.melee = true; item.useAnimation = 17; @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons item.knockBack = 7.5f; item.UseSound = SoundID.Item1; item.autoReuse = true; - item.height = 66; + item.height = 72; item.value = 800000; item.rare = 8; item.shoot = mod.ProjectileType("RedBall"); diff --git a/Items/Weapons/HolidayHalberd.png b/Items/Weapons/HolidayHalberd.png index ec611738c4..f41f2f0ebb 100644 Binary files a/Items/Weapons/HolidayHalberd.png and b/Items/Weapons/HolidayHalberd.png differ diff --git a/Items/Weapons/HolyFireBullet.cs b/Items/Weapons/HolyFireBullet.cs index ed498f2f42..84172b70a3 100644 --- a/Items/Weapons/HolyFireBullet.cs +++ b/Items/Weapons/HolyFireBullet.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { - item.damage = 23; + item.damage = 27; item.ranged = true; item.width = 8; item.height = 8; diff --git a/Items/Weapons/HyperiusBullet.cs b/Items/Weapons/HyperiusBullet.cs index c191889aab..8c8484e532 100644 --- a/Items/Weapons/HyperiusBullet.cs +++ b/Items/Weapons/HyperiusBullet.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Weapons item.maxStack = 999; item.consumable = true; item.knockBack = 1.5f; - item.value = 1000; + item.value = 2000; item.rare = 9; item.shoot = mod.ProjectileType("HyperiusBullet"); item.shootSpeed = 16f; diff --git a/Items/Weapons/IcicleStaff.cs b/Items/Weapons/IcicleStaff.cs index 3f4bcf62ca..daef5fec56 100644 --- a/Items/Weapons/IcicleStaff.cs +++ b/Items/Weapons/IcicleStaff.cs @@ -28,13 +28,13 @@ namespace CalamityMod.Items.Weapons item.useAnimation = 30; item.useStyle = 5; item.noMelee = true; - item.knockBack = 4.25f; + item.knockBack = 2f; item.value = 80000; item.rare = 1; item.UseSound = SoundID.Item8; item.autoReuse = true; item.shoot = mod.ProjectileType("WintersFury"); - item.shootSpeed = 11f; + item.shootSpeed = 16f; } public override void AddRecipes() diff --git a/Items/Weapons/Impaler.cs b/Items/Weapons/Impaler.cs index 43fc526bb4..b187fedbb8 100644 --- a/Items/Weapons/Impaler.cs +++ b/Items/Weapons/Impaler.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { - item.damage = 90; + item.damage = 120; item.ranged = true; item.crit += 14; item.width = 40; diff --git a/Items/Weapons/Judgement.cs b/Items/Weapons/Judgement.cs index c38c82802a..5754e6e315 100644 --- a/Items/Weapons/Judgement.cs +++ b/Items/Weapons/Judgement.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { - item.damage = 385; + item.damage = 515; item.magic = true; item.mana = 9; item.width = 28; diff --git a/Items/Weapons/Lacerator.cs b/Items/Weapons/Lacerator.cs index a46d5449fa..3f7956719d 100644 --- a/Items/Weapons/Lacerator.cs +++ b/Items/Weapons/Lacerator.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { item.CloneDefaults(ItemID.TheEyeOfCthulhu); - item.damage = 700; + item.damage = 900; item.useTime = 20; item.useAnimation = 20; item.useStyle = 5; diff --git a/Items/Weapons/Leviathan/Atlantis.cs b/Items/Weapons/Leviathan/Atlantis.cs index af9ff97dd7..abdb64f521 100644 --- a/Items/Weapons/Leviathan/Atlantis.cs +++ b/Items/Weapons/Leviathan/Atlantis.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Leviathan public override void SetDefaults() { - item.damage = 45; + item.damage = 70; item.magic = true; item.mana = 12; item.width = 28; diff --git a/Items/Weapons/Leviathan/Leviatitan.cs b/Items/Weapons/Leviathan/Leviatitan.cs index 48a951b1ee..89235d42e8 100644 --- a/Items/Weapons/Leviathan/Leviatitan.cs +++ b/Items/Weapons/Leviathan/Leviatitan.cs @@ -18,20 +18,20 @@ namespace CalamityMod.Items.Weapons.Leviathan public override void SetDefaults() { - item.damage = 93; + item.damage = 80; item.ranged = true; item.width = 82; item.height = 28; item.useTime = 9; item.useAnimation = 9; item.useStyle = 5; - item.noMelee = true; //so the item's animation doesn't do damage + item.noMelee = true; item.knockBack = 5f; item.value = 750000; item.rare = 7; item.UseSound = SoundID.Item92; item.autoReuse = true; - item.shoot = mod.ProjectileType("AquaBlast"); //idk why but all the guns in the vanilla source have this + item.shoot = mod.ProjectileType("AquaBlast"); item.shootSpeed = 18f; } @@ -52,11 +52,11 @@ namespace CalamityMod.Items.Weapons.Leviathan public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { - float SpeedX = speedX + (float)Main.rand.Next(-20, 21) * 0.05f; - float SpeedY = speedY + (float)Main.rand.Next(-20, 21) * 0.05f; + float SpeedX = speedX + (float)Main.rand.Next(-10, 11) * 0.05f; + float SpeedY = speedY + (float)Main.rand.Next(-10, 11) * 0.05f; if (Main.rand.Next(3) == 0) { - Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, mod.ProjectileType("AquaBlastToxic"), (int)((double)damage * 1.5f), knockBack, player.whoAmI, 0.0f, 0.0f); + Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, mod.ProjectileType("AquaBlastToxic"), (int)((double)damage * 1.5), knockBack, player.whoAmI, 0.0f, 0.0f); } else { diff --git a/Items/Weapons/Leviathan/SirensSong.cs b/Items/Weapons/Leviathan/SirensSong.cs index f9379ac090..8d112c0f85 100644 --- a/Items/Weapons/Leviathan/SirensSong.cs +++ b/Items/Weapons/Leviathan/SirensSong.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Leviathan public override void SetDefaults() { - item.damage = 55; + item.damage = 77; item.magic = true; item.mana = 7; item.width = 56; diff --git a/Items/Weapons/LifefruitScythe.cs b/Items/Weapons/LifefruitScythe.cs index ce99c08892..b648fb5d7b 100644 --- a/Items/Weapons/LifefruitScythe.cs +++ b/Items/Weapons/LifefruitScythe.cs @@ -69,8 +69,8 @@ namespace CalamityMod.Items.Weapons { return; } - player.statLife += 3; - player.HealEffect(3); + player.statLife += 2; + player.HealEffect(2); target.AddBuff(BuffID.OnFire, 200); target.AddBuff(BuffID.CursedInferno, 200); } diff --git a/Items/Weapons/LunicEye.cs b/Items/Weapons/LunicEye.cs index dcd5ed81c9..11cbe41ea8 100644 --- a/Items/Weapons/LunicEye.cs +++ b/Items/Weapons/LunicEye.cs @@ -5,6 +5,7 @@ using Terraria; using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.Items.CalamityCustomThrowingDamage; namespace CalamityMod.Items.Weapons { @@ -41,7 +42,8 @@ namespace CalamityMod.Items.Weapons public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { - float damageMult = player.meleeDamage + player.rangedDamage + player.magicDamage + player.thrownDamage + player.minionDamage; + float damageMult = player.meleeDamage + player.rangedDamage + player.magicDamage + + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage + player.minionDamage; Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, (int)((double)damage * damageMult), knockBack, player.whoAmI, 0.0f, 0.0f); return false; } diff --git a/Items/Weapons/MagneticMeltdown.cs b/Items/Weapons/MagneticMeltdown.cs index b7f41be76c..0859e74563 100644 --- a/Items/Weapons/MagneticMeltdown.cs +++ b/Items/Weapons/MagneticMeltdown.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { - item.damage = 127; + item.damage = 135; item.magic = true; item.mana = 25; item.width = 78; diff --git a/Items/Weapons/MajesticGuard.cs b/Items/Weapons/MajesticGuard.cs index 3b0b14a867..30e6ccf5ee 100644 --- a/Items/Weapons/MajesticGuard.cs +++ b/Items/Weapons/MajesticGuard.cs @@ -36,18 +36,14 @@ namespace CalamityMod.Items.Weapons public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit) { - if (target.type == NPCID.TargetDummy) - { - return; - } if (Main.rand.Next(5) == 0) { target.defense -= 10; } if (target.defense <= 0) { - player.statLife += 6; - player.HealEffect(6); + player.statLife += 4; + player.HealEffect(4); } } diff --git a/Items/Weapons/ManaRose.cs b/Items/Weapons/ManaRose.cs index d6ee8d7465..6d1379dcc9 100644 --- a/Items/Weapons/ManaRose.cs +++ b/Items/Weapons/ManaRose.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { - item.damage = 11; + item.damage = 9; item.magic = true; item.mana = 8; item.width = 38; diff --git a/Items/Weapons/MangroveChakramMelee.cs b/Items/Weapons/MangroveChakramMelee.cs index a3e0950ce4..e1c48d0b92 100644 --- a/Items/Weapons/MangroveChakramMelee.cs +++ b/Items/Weapons/MangroveChakramMelee.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { item.width = 38; - item.damage = 56; + item.damage = 84; item.noMelee = true; item.noUseGraphic = true; item.useAnimation = 14; diff --git a/Items/Weapons/MarkedMagnum.cs b/Items/Weapons/MarkedMagnum.cs index f8a4a8e779..2ff67a979c 100644 --- a/Items/Weapons/MarkedMagnum.cs +++ b/Items/Weapons/MarkedMagnum.cs @@ -6,6 +6,7 @@ using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items; +using CalamityMod.Items.CalamityCustomThrowingDamage; namespace CalamityMod.Items.Weapons { @@ -42,7 +43,8 @@ namespace CalamityMod.Items.Weapons public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { - float damageMult = player.meleeDamage + player.rangedDamage + player.magicDamage + player.thrownDamage + player.minionDamage; + float damageMult = player.meleeDamage + player.rangedDamage + player.magicDamage + + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage + player.minionDamage; Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, (int)((double)damage * damageMult), knockBack, player.whoAmI, 0.0f, 0.0f); return false; } diff --git a/Items/Weapons/Megafleet.cs b/Items/Weapons/Megafleet.cs index bcbaf4e02f..c112991a31 100644 --- a/Items/Weapons/Megafleet.cs +++ b/Items/Weapons/Megafleet.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { - item.damage = 370; + item.damage = 480; item.ranged = true; item.width = 96; item.height = 38; diff --git a/Items/Weapons/Minigun.cs b/Items/Weapons/Minigun.cs index 48392ab600..d1f7d35e4f 100644 --- a/Items/Weapons/Minigun.cs +++ b/Items/Weapons/Minigun.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { - item.damage = 310; + item.damage = 390; item.ranged = true; item.width = 72; item.height = 34; diff --git a/Items/Weapons/MirrorBlade.cs b/Items/Weapons/MirrorBlade.cs index 6eee443cf3..22d8bc4e5d 100644 --- a/Items/Weapons/MirrorBlade.cs +++ b/Items/Weapons/MirrorBlade.cs @@ -13,13 +13,15 @@ namespace CalamityMod.Items.Weapons public override void SetStaticDefaults() { DisplayName.SetDefault("Mirror Blade"); - Tooltip.SetDefault("The amount of contact damage an enemy does is added to this weapons' damage\nYou must hit an enemy with the blade to trigger this effect\nConsumes mana to fire mirror blasts"); + Tooltip.SetDefault("The amount of contact damage an enemy does is added to this weapons' damage\n" + + "You must hit an enemy with the blade to trigger this effect\n" + + "Consumes mana to fire mirror blasts"); } public override void SetDefaults() { item.width = 50; - item.damage = 260; + item.damage = 236; item.melee = true; item.mana = 4; item.useAnimation = 9; @@ -54,10 +56,10 @@ namespace CalamityMod.Items.Weapons public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit) { - int conDamage = target.damage + 260; - if (conDamage < 260) + int conDamage = target.damage + 236; + if (conDamage < 236) { - conDamage = 260; + conDamage = 236; } if (conDamage > 500) { diff --git a/Items/Weapons/Mistlestorm.cs b/Items/Weapons/Mistlestorm.cs index a1846f7045..b3cd09fb9f 100644 --- a/Items/Weapons/Mistlestorm.cs +++ b/Items/Weapons/Mistlestorm.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { - item.damage = 54; + item.damage = 99; item.magic = true; item.mana = 5; item.width = 48; diff --git a/Items/Weapons/Monsoon.cs b/Items/Weapons/Monsoon.cs index e880537204..5809c303ca 100644 --- a/Items/Weapons/Monsoon.cs +++ b/Items/Weapons/Monsoon.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { - item.damage = 55; + item.damage = 63; item.ranged = true; item.width = 30; item.height = 62; @@ -59,18 +59,24 @@ namespace CalamityMod.Items.Weapons { value9 -= vector7; } - switch (Main.rand.Next(12)) - { - case 1: type = 408; break; - default: break; - } - switch (Main.rand.Next(25)) - { - case 1: type = mod.ProjectileType("TyphoonArrow"); break; - default: break; - } - int num121 = Projectile.NewProjectile(vector2.X + value9.X, vector2.Y + value9.Y, speedX, speedY, type, (int)((double)damage), knockBack, player.whoAmI, 0.0f, 0.0f); - Main.projectile[num121].noDropItem = true; + if (type == ProjectileID.WoodenArrowFriendly) + { + if (Main.rand.Next(12) == 0) + { + type = 408; + } + if (Main.rand.Next(25) == 0) + { + type = mod.ProjectileType("TyphoonArrow"); + } + int num121 = Projectile.NewProjectile(vector2.X + value9.X, vector2.Y + value9.Y, speedX, speedY, type, damage, knockBack, player.whoAmI, (type == 408 ? 2f : 0.0f), 0.0f); + Main.projectile[num121].noDropItem = true; + } + else + { + int num121 = Projectile.NewProjectile(vector2.X + value9.X, vector2.Y + value9.Y, speedX, speedY, type, damage, knockBack, player.whoAmI, 0.0f, 0.0f); + Main.projectile[num121].noDropItem = true; + } } return false; } diff --git a/Items/Weapons/Mourningstar.cs b/Items/Weapons/Mourningstar.cs index 274b940e8a..c2ef4d8027 100644 --- a/Items/Weapons/Mourningstar.cs +++ b/Items/Weapons/Mourningstar.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons { item.width = 16; item.height = 16; - item.damage = 330; + item.damage = 650; item.noMelee = true; item.noUseGraphic = true; item.channel = true; diff --git a/Items/Weapons/Needler.cs b/Items/Weapons/Needler.cs index 28eb32eaa1..e07fbed0fc 100644 --- a/Items/Weapons/Needler.cs +++ b/Items/Weapons/Needler.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { - item.damage = 35; + item.damage = 38; item.ranged = true; item.width = 44; item.height = 26; diff --git a/Items/Weapons/NeptunesBounty.cs b/Items/Weapons/NeptunesBounty.cs index 7140a9a9be..3c936fa0df 100644 --- a/Items/Weapons/NeptunesBounty.cs +++ b/Items/Weapons/NeptunesBounty.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { item.width = 80; - item.damage = 345; + item.damage = 540; item.melee = true; item.useAnimation = 17; item.useTime = 17; diff --git a/Items/Weapons/NightsRay.cs b/Items/Weapons/NightsRay.cs index 6fcc9946fe..4234ef9908 100644 --- a/Items/Weapons/NightsRay.cs +++ b/Items/Weapons/NightsRay.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { - item.damage = 30; + item.damage = 35; item.magic = true; item.mana = 10; item.width = 50; diff --git a/Items/Weapons/OldLordOathsword.png b/Items/Weapons/OldLordOathsword.png index 178a8f1f06..c9ce86acec 100644 Binary files a/Items/Weapons/OldLordOathsword.png and b/Items/Weapons/OldLordOathsword.png differ diff --git a/Items/Weapons/P90.cs b/Items/Weapons/P90.cs index e0768c8727..e1a181846e 100644 --- a/Items/Weapons/P90.cs +++ b/Items/Weapons/P90.cs @@ -56,13 +56,8 @@ namespace CalamityMod.Items.Weapons { ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ItemID.IronBar, 10); - recipe.AddIngredient(null, "CoreofEleum", 7); - recipe.AddTile(TileID.MythrilAnvil); - recipe.SetResult(this); - recipe.AddRecipe(); - recipe = new ModRecipe(mod); - recipe.AddIngredient(ItemID.LeadBar, 10); - recipe.AddIngredient(null, "CoreofEleum", 7); + recipe.anyIronBar = true; + recipe.AddIngredient(null, "CoreofEleum", 7); recipe.AddTile(TileID.MythrilAnvil); recipe.SetResult(this); recipe.AddRecipe(); diff --git a/Items/Weapons/Perforators/Eviscerator.cs b/Items/Weapons/Perforators/Eviscerator.cs index d31fcf90a7..a2a0dfe9b7 100644 --- a/Items/Weapons/Perforators/Eviscerator.cs +++ b/Items/Weapons/Perforators/Eviscerator.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Perforators public override void SetDefaults() { - item.damage = 57; + item.damage = 65; item.ranged = true; item.width = 58; item.height = 22; diff --git a/Items/Weapons/Phangasm.cs b/Items/Weapons/Phangasm.cs index 74493df33c..47b1f4eb1b 100644 --- a/Items/Weapons/Phangasm.cs +++ b/Items/Weapons/Phangasm.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { - item.damage = 200; + item.damage = 112; item.width = 20; item.height = 12; item.useTime = 12; diff --git a/Items/Weapons/Phangasm.png b/Items/Weapons/Phangasm.png index 000767334c..c18ca4431f 100644 Binary files a/Items/Weapons/Phangasm.png and b/Items/Weapons/Phangasm.png differ diff --git a/Items/Weapons/PhantasmalFury.cs b/Items/Weapons/PhantasmalFury.cs index 771e60f74a..448ff6a391 100644 --- a/Items/Weapons/PhantasmalFury.cs +++ b/Items/Weapons/PhantasmalFury.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { - item.damage = 400; + item.damage = 363; item.magic = true; item.mana = 20; item.width = 62; @@ -43,7 +43,7 @@ namespace CalamityMod.Items.Weapons { if (line2.mod == "Terraria" && line2.Name == "ItemName") { - line2.overrideColor = new Color(43, 96, 222); + line2.overrideColor = new Color(0, 255, 0); } } } @@ -54,8 +54,8 @@ namespace CalamityMod.Items.Weapons recipe.AddIngredient(ItemID.SpectreStaff); recipe.AddIngredient(null, "Phantoplasm", 5); recipe.AddIngredient(null, "DarkPlasma"); - recipe.AddTile(null, "DraedonsForge"); - recipe.SetResult(this); + recipe.AddTile(TileID.LunarCraftingStation); + recipe.SetResult(this); recipe.AddRecipe(); } } diff --git a/Items/Weapons/Photoviscerator.cs b/Items/Weapons/Photoviscerator.cs index 5d38391722..cbe274e1bf 100644 --- a/Items/Weapons/Photoviscerator.cs +++ b/Items/Weapons/Photoviscerator.cs @@ -15,12 +15,12 @@ namespace CalamityMod.Items.Weapons { DisplayName.SetDefault("Photoviscerator"); Tooltip.SetDefault("90% chance to not consume gel\n" + - "Fires a stream of exo flames that literally melt everything"); + "Fires a stream of exo flames that literally melts everything"); } public override void SetDefaults() { - item.damage = 92; + item.damage = 165; item.ranged = true; item.width = 84; item.height = 30; diff --git a/Items/Weapons/PlagueKeeper.cs b/Items/Weapons/PlagueKeeper.cs new file mode 100644 index 0000000000..a912dd5f8e --- /dev/null +++ b/Items/Weapons/PlagueKeeper.cs @@ -0,0 +1,71 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Items; + +namespace CalamityMod.Items.Weapons +{ + public class PlagueKeeper : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Plague Keeper"); + } + + public override void SetDefaults() + { + item.width = 74; + item.damage = 110; + item.melee = true; + item.useAnimation = 18; + item.useStyle = 1; + item.useTime = 18; + item.useTurn = true; + item.knockBack = 6f; + item.UseSound = SoundID.Item1; + item.autoReuse = true; + item.height = 92; + item.value = 1000000; + item.shoot = mod.ProjectileType("PlagueBeeDust"); + item.shootSpeed = 9f; + } + + public override void ModifyTooltips(List list) + { + foreach (TooltipLine line2 in list) + { + if (line2.mod == "Terraria" && line2.Name == "ItemName") + { + line2.overrideColor = new Color(0, 255, 200); + } + } + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(null, "VirulentKatana"); + recipe.AddIngredient(ItemID.BeeKeeper); + recipe.AddIngredient(ItemID.FragmentSolar, 10); + recipe.AddIngredient(ItemID.LunarBar, 5); + recipe.AddTile(TileID.LunarCraftingStation); + recipe.SetResult(this); + recipe.AddRecipe(); + } + + public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit) + { + target.AddBuff(mod.BuffType("Plague"), 300); + for (int i = 0; i < 3; i++) + { + int bee = Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, 0f, player.beeType(), + player.beeDamage(item.damage / 3), player.beeKB(0f), player.whoAmI, 0f, 0f); + Main.projectile[bee].penetrate = 1; + } + } + } +} diff --git a/Items/Weapons/Plaguebringer/ThePlaguebringer.cs b/Items/Weapons/Plaguebringer/ThePlaguebringer.cs index c11744d2f3..3afb5b3d3a 100644 --- a/Items/Weapons/Plaguebringer/ThePlaguebringer.cs +++ b/Items/Weapons/Plaguebringer/ThePlaguebringer.cs @@ -7,34 +7,36 @@ using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items; -namespace CalamityMod.Items.Weapons.Plaguebringer { -public class ThePlaguebringer : ModItem +namespace CalamityMod.Items.Weapons.Plaguebringer { - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Pandemic"); - Tooltip.SetDefault("Fires plague seekers when enemies are near"); - } + public class ThePlaguebringer : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Pandemic"); + Tooltip.SetDefault("Fires plague seekers when enemies are near"); + } - public override void SetDefaults() - { - item.CloneDefaults(ItemID.TheEyeOfCthulhu); - item.damage = 90; - item.useTime = 22; - item.useAnimation = 22; - item.useStyle = 5; - item.channel = true; - item.melee = true; - item.knockBack = 2.5f; - item.value = 1000000; - item.rare = 8; - item.autoReuse = true; - item.shoot = mod.ProjectileType("ThePlaguebringer"); + public override void SetDefaults() + { + item.CloneDefaults(ItemID.TheEyeOfCthulhu); + item.damage = 100; + item.useTime = 22; + item.useAnimation = 22; + item.useStyle = 5; + item.channel = true; + item.melee = true; + item.knockBack = 2.5f; + item.value = 1000000; + item.rare = 8; + item.autoReuse = true; + item.shoot = mod.ProjectileType("ThePlaguebringer"); + } + + public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, (int)((double)damage), knockBack, player.whoAmI, 0.0f, 0.0f); + return false; + } } - - public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) - { - Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, (int)((double)damage), knockBack, player.whoAmI, 0.0f, 0.0f); - return false; - } -}} \ No newline at end of file +} \ No newline at end of file diff --git a/Items/Weapons/Polterghast/BansheeHook.cs b/Items/Weapons/Polterghast/BansheeHook.cs index 4cb56a848b..f6b667e977 100644 --- a/Items/Weapons/Polterghast/BansheeHook.cs +++ b/Items/Weapons/Polterghast/BansheeHook.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Polterghast public override void SetDefaults() { item.width = 16; - item.damage = 130; + item.damage = 155; item.noMelee = true; item.noUseGraphic = true; item.channel = true; diff --git a/Items/Weapons/Polterghast/DaemonsFlame.cs b/Items/Weapons/Polterghast/DaemonsFlame.cs index a30b0ba4f8..d38837e63f 100644 --- a/Items/Weapons/Polterghast/DaemonsFlame.cs +++ b/Items/Weapons/Polterghast/DaemonsFlame.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Polterghast public override void SetDefaults() { - item.damage = 130; + item.damage = 160; item.width = 20; item.height = 12; item.useTime = 12; diff --git a/Items/Weapons/Polterghast/EtherealSubjugator.cs b/Items/Weapons/Polterghast/EtherealSubjugator.cs index 16f80c0127..09ac5f6aa5 100644 --- a/Items/Weapons/Polterghast/EtherealSubjugator.cs +++ b/Items/Weapons/Polterghast/EtherealSubjugator.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Weapons.Polterghast public override void SetDefaults() { - item.damage = 110; + item.damage = 75; item.mana = 10; item.width = 60; item.height = 60; diff --git a/Items/Weapons/Polterghast/FatesReveal.cs b/Items/Weapons/Polterghast/FatesReveal.cs index a26b8809d8..e9f44db38d 100644 --- a/Items/Weapons/Polterghast/FatesReveal.cs +++ b/Items/Weapons/Polterghast/FatesReveal.cs @@ -50,54 +50,34 @@ namespace CalamityMod.Items.Weapons.Polterghast public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { - int i = Main.myPlayer; - float num72 = item.shootSpeed; - Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); - Vector2 value = Vector2.UnitX.RotatedBy((double)player.fullRotation, default(Vector2)); - Vector2 vector3 = Main.MouseWorld + vector2; - float num78 = (float)Main.mouseX + Main.screenPosition.X + vector2.X; - float num79 = (float)Main.mouseY + Main.screenPosition.Y + vector2.Y; - if (player.gravDir == -1f) - { - num79 = Main.screenPosition.Y + (float)Main.screenHeight + (float)Main.mouseY + vector2.Y; - } - float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - float num81 = num80; - if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f)) - { - num78 = (float)player.direction; - num79 = 0f; - num80 = num72; - } - else - { - num80 = num72 / num80; - } - num78 *= num80; - num79 *= num80; - int num107 = 5; + Vector2 vector = player.RotatedRelativePoint(player.MountedCenter, true); + float num78 = (float)Main.mouseX + Main.screenPosition.X - vector.X; + float num79 = (float)Main.mouseY + Main.screenPosition.Y - vector.Y; + if (player.gravDir == -1f) + { + num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector.Y; + } + float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); + float num81 = num80; + if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f)) + { + num78 = (float)player.direction; + num79 = 0f; + num80 = item.shootSpeed; + } + else + { + num80 = item.shootSpeed / num80; + } + vector += new Vector2(num78, num79); + int num107 = 5; for (int num108 = 0; num108 < num107; num108++) { - vector2 = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y); - vector2.X = (vector2.X + player.Center.X) / 2f + (float)Main.rand.Next(-100, 101); - vector2.Y -= (float)(50 * num108); - num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; - if (num79 < 0f) - { - num79 *= -1f; - } - if (num79 < 20f) - { - num79 = 20f; - } - num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - num80 = num72 / num80; - num78 *= num80; - num79 *= num80; - float speedX4 = num78 + (float)Main.rand.Next(-180, 181) * 0.02f; - float speedY5 = num79 + (float)Main.rand.Next(-180, 181) * 0.02f; - Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, speedY5, type, damage, knockBack, i, 0f, (float)Main.rand.Next(3)); + vector.X = vector.X + (float)Main.rand.Next(-100, 101); + vector.Y += (float)(Main.rand.Next(-25, 26) * num108); + float spawnX = vector.X; + float spawnY = vector.Y; + Projectile.NewProjectile(spawnX, spawnY, 0f, 0f, type, damage, knockBack, player.whoAmI, 0f, (float)Main.rand.Next(3)); } return false; } diff --git a/Items/Weapons/Polterghast/GhastlyVisage.cs b/Items/Weapons/Polterghast/GhastlyVisage.cs index e7a7cf3efa..5a5b597928 100644 --- a/Items/Weapons/Polterghast/GhastlyVisage.cs +++ b/Items/Weapons/Polterghast/GhastlyVisage.cs @@ -20,15 +20,15 @@ namespace CalamityMod.Items.Weapons.Polterghast public override void SetDefaults() { - item.damage = 110; + item.damage = 92; item.magic = true; item.noUseGraphic = true; item.channel = true; item.mana = 20; item.width = 78; item.height = 70; - item.useTime = 30; - item.useAnimation = 30; + item.useTime = 27; + item.useAnimation = 27; item.useStyle = 5; item.noMelee = true; item.knockBack = 5f; @@ -36,8 +36,8 @@ namespace CalamityMod.Items.Weapons.Polterghast item.shootSpeed = 9f; item.shoot = mod.ProjectileType("GhastlyVisage"); } - - public override void ModifyTooltips(List list) + + public override void ModifyTooltips(List list) { foreach (TooltipLine line2 in list) { diff --git a/Items/Weapons/Polterghast/TerrorBlade.cs b/Items/Weapons/Polterghast/TerrorBlade.cs index 5c811e227f..c1953c1920 100644 --- a/Items/Weapons/Polterghast/TerrorBlade.cs +++ b/Items/Weapons/Polterghast/TerrorBlade.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Polterghast public override void SetDefaults() { item.width = 88; - item.damage = 330; + item.damage = 262; item.melee = true; item.useAnimation = 18; item.useTime = 18; diff --git a/Items/Weapons/PrimordialAncient.cs b/Items/Weapons/PrimordialAncient.cs index 8617fa5463..e331c59887 100644 --- a/Items/Weapons/PrimordialAncient.cs +++ b/Items/Weapons/PrimordialAncient.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { - item.damage = 235; + item.damage = 385; item.magic = true; item.mana = 20; item.width = 28; diff --git a/Items/Weapons/PrimordialEarth.cs b/Items/Weapons/PrimordialEarth.cs index 3288426412..66593ed5ca 100644 --- a/Items/Weapons/PrimordialEarth.cs +++ b/Items/Weapons/PrimordialEarth.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { - item.damage = 80; + item.damage = 85; item.magic = true; item.mana = 19; item.width = 28; diff --git a/Items/Weapons/ProporsePistol.cs b/Items/Weapons/ProporsePistol.cs index d8a13eb956..252b307f78 100644 --- a/Items/Weapons/ProporsePistol.cs +++ b/Items/Weapons/ProporsePistol.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { - item.damage = 45; + item.damage = 65; item.ranged = true; item.width = 36; item.height = 20; diff --git a/Items/Weapons/Providence/SolarFlare.cs b/Items/Weapons/Providence/SolarFlare.cs index 74444d3558..2923fa7d95 100644 --- a/Items/Weapons/Providence/SolarFlare.cs +++ b/Items/Weapons/Providence/SolarFlare.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Providence public override void SetDefaults() { item.CloneDefaults(ItemID.TheEyeOfCthulhu); - item.damage = 88; + item.damage = 50; item.useTime = 20; item.useAnimation = 20; item.useStyle = 5; diff --git a/Items/Weapons/Ravager/Hematemesis.png b/Items/Weapons/Ravager/Hematemesis.png index 18e3ababe6..48596f55c8 100644 Binary files a/Items/Weapons/Ravager/Hematemesis.png and b/Items/Weapons/Ravager/Hematemesis.png differ diff --git a/Items/Weapons/RoyalKnivesMelee.cs b/Items/Weapons/RoyalKnivesMelee.cs index 780c764ec1..1eacd619ce 100644 --- a/Items/Weapons/RoyalKnivesMelee.cs +++ b/Items/Weapons/RoyalKnivesMelee.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { item.width = 18; - item.damage = 1200; + item.damage = 1320; item.melee = true; item.noMelee = true; item.noUseGraphic = true; diff --git a/Items/Weapons/SDFMG.cs b/Items/Weapons/SDFMG.cs index 45d8e6b15c..3e64a9f476 100644 --- a/Items/Weapons/SDFMG.cs +++ b/Items/Weapons/SDFMG.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { - item.damage = 172; + item.damage = 250; item.ranged = true; item.width = 74; item.height = 34; diff --git a/Items/Weapons/SanguineFlare.cs b/Items/Weapons/SanguineFlare.cs index 56316869ae..3f2f62cc18 100644 --- a/Items/Weapons/SanguineFlare.cs +++ b/Items/Weapons/SanguineFlare.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { - item.damage = 182; + item.damage = 500; item.magic = true; item.mana = 22; item.width = 56; @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons item.UseSound = SoundID.Item20; item.autoReuse = true; item.shoot = mod.ProjectileType("SanguineFlare"); - item.shootSpeed = 8f; + item.shootSpeed = 14f; } public override void ModifyTooltips(List list) diff --git a/Items/Weapons/ScourgeoftheCosmos.cs b/Items/Weapons/ScourgeoftheCosmos.cs index 2346882186..31917e19c5 100644 --- a/Items/Weapons/ScourgeoftheCosmos.cs +++ b/Items/Weapons/ScourgeoftheCosmos.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { item.width = 18; - item.damage = 2000; + item.damage = 1500; item.melee = true; item.noMelee = true; item.noUseGraphic = true; diff --git a/Items/Weapons/ShadowboltStaff.cs b/Items/Weapons/ShadowboltStaff.cs index 83739b121c..00c8283729 100644 --- a/Items/Weapons/ShadowboltStaff.cs +++ b/Items/Weapons/ShadowboltStaff.cs @@ -43,7 +43,7 @@ namespace CalamityMod.Items.Weapons { if (line2.mod == "Terraria" && line2.Name == "ItemName") { - line2.overrideColor = new Color(43, 96, 222); + line2.overrideColor = new Color(0, 255, 0); } } } @@ -54,7 +54,7 @@ namespace CalamityMod.Items.Weapons recipe.AddIngredient(null, "ArmoredShell", 3); recipe.AddIngredient(null, "Phantoplasm", 5); recipe.AddIngredient(ItemID.ShadowbeamStaff); - recipe.AddTile(null, "DraedonsForge"); + recipe.AddTile(TileID.LunarCraftingStation); recipe.SetResult(this); recipe.AddRecipe(); } diff --git a/Items/Weapons/Shimmerspark.cs b/Items/Weapons/Shimmerspark.cs index 2beb7b5553..ed30ba558c 100644 --- a/Items/Weapons/Shimmerspark.cs +++ b/Items/Weapons/Shimmerspark.cs @@ -7,37 +7,39 @@ using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items; -namespace CalamityMod.Items.Weapons { -public class Shimmerspark : ModItem +namespace CalamityMod.Items.Weapons { - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Shimmerspark"); - Tooltip.SetDefault("Fires stars when enemies are near"); - } - - public override void SetDefaults() + public class Shimmerspark : ModItem { - item.CloneDefaults(ItemID.Chik); - item.damage = 32; - item.useTime = 25; - item.useAnimation = 25; - item.useStyle = 5; - item.channel = true; - item.melee = true; - item.knockBack = 3.2f; - item.value = 100000; - item.rare = 5; - item.autoReuse = true; - item.shoot = mod.ProjectileType("ShimmersparkProjectile"); + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Shimmerspark"); + Tooltip.SetDefault("Fires stars when enemies are near"); + } + + public override void SetDefaults() + { + item.CloneDefaults(ItemID.Chik); + item.damage = 32; + item.useTime = 25; + item.useAnimation = 25; + item.useStyle = 5; + item.channel = true; + item.melee = true; + item.knockBack = 3.2f; + item.value = 100000; + item.rare = 5; + item.autoReuse = true; + item.shoot = mod.ProjectileType("ShimmersparkProjectile"); + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(null, "VerstaltiteBar", 6); + recipe.AddTile(TileID.MythrilAnvil); + recipe.SetResult(this); + recipe.AddRecipe(); + } } - - public override void AddRecipes() - { - ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(null, "VerstaltiteBar", 6); - recipe.AddTile(TileID.MythrilAnvil); - recipe.SetResult(this); - recipe.AddRecipe(); - } -}} \ No newline at end of file +} \ No newline at end of file diff --git a/Items/Weapons/SkyGlaze.cs b/Items/Weapons/SkyGlaze.cs index 9bb289c9dc..eebe652c65 100644 --- a/Items/Weapons/SkyGlaze.cs +++ b/Items/Weapons/SkyGlaze.cs @@ -7,84 +7,86 @@ using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items; -namespace CalamityMod.Items.Weapons { -public class SkyGlaze : ModItem +namespace CalamityMod.Items.Weapons { - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Sky Glaze"); - Tooltip.SetDefault("Fires feathers from the sky that stick to enemies and tiles and explode"); - Item.staff[item.type] = true; - } - - public override void SetDefaults() + public class SkyGlaze : ModItem { - item.damage = 8; - item.magic = true; - item.mana = 8; - item.width = 52; - item.height = 74; - item.useTime = 25; - item.useAnimation = 25; - item.useStyle = 5; - item.noMelee = true; - item.knockBack = 3.5f; - item.value = 30000; - item.rare = 1; - item.UseSound = SoundID.Item102; - item.autoReuse = true; - item.shoot = mod.ProjectileType("StickyFeather"); - item.shootSpeed = 15f; + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Sky Glaze"); + Tooltip.SetDefault("Fires feathers from the sky that stick to enemies and tiles and explode"); + Item.staff[item.type] = true; + } + + public override void SetDefaults() + { + item.damage = 10; + item.magic = true; + item.mana = 8; + item.width = 52; + item.height = 74; + item.useTime = 25; + item.useAnimation = 25; + item.useStyle = 5; + item.noMelee = true; + item.knockBack = 3.5f; + item.value = 30000; + item.rare = 1; + item.UseSound = SoundID.Item102; + item.autoReuse = true; + item.shoot = mod.ProjectileType("StickyFeather"); + item.shootSpeed = 15f; + } + + public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + float num72 = item.shootSpeed; + Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); + float num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; + float num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; + if (player.gravDir == -1f) + { + num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y; + } + float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); + float num81 = num80; + if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f)) + { + num78 = (float)player.direction; + num79 = 0f; + num80 = num72; + } + else + { + num80 = num72 / num80; + } + num78 *= num80; + num79 *= num80; + int num107 = 5; + for (int num108 = 0; num108 < num107; num108++) + { + vector2 = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f); + vector2.X = (vector2.X + player.Center.X) / 2f + (float)Main.rand.Next(-200, 201); + vector2.Y -= (float)(100 * num108); + num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; + num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; + if (num79 < 0f) + { + num79 *= -1f; + } + if (num79 < 20f) + { + num79 = 20f; + } + num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); + num80 = num72 / num80; + num78 *= num80; + num79 *= num80; + float speedX4 = num78 + (float)Main.rand.Next(-30, 31) * 0.02f; + float speedY5 = num79 + (float)Main.rand.Next(-30, 31) * 0.02f; + Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, speedY5, type, damage, knockBack, player.whoAmI, 0f, (float)Main.rand.Next(15)); + } + return false; + } } - - public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) - { - float num72 = item.shootSpeed; - Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); - float num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - float num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; - if (player.gravDir == -1f) - { - num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y; - } - float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - float num81 = num80; - if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f)) - { - num78 = (float)player.direction; - num79 = 0f; - num80 = num72; - } - else - { - num80 = num72 / num80; - } - num78 *= num80; - num79 *= num80; - int num107 = 5; - for (int num108 = 0; num108 < num107; num108++) - { - vector2 = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f); - vector2.X = (vector2.X + player.Center.X) / 2f + (float)Main.rand.Next(-200, 201); - vector2.Y -= (float)(100 * num108); - num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; - if (num79 < 0f) - { - num79 *= -1f; - } - if (num79 < 20f) - { - num79 = 20f; - } - num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - num80 = num72 / num80; - num78 *= num80; - num79 *= num80; - float speedX4 = num78 + (float)Main.rand.Next(-30, 31) * 0.02f; - float speedY5 = num79 + (float)Main.rand.Next(-30, 31) * 0.02f; - Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, speedY5, type, damage, knockBack, player.whoAmI, 0f, (float)Main.rand.Next(15)); - } - return false; - } -}} \ No newline at end of file +} \ No newline at end of file diff --git a/Items/Weapons/SlimeGod/CorruptedCrusherBlade.cs b/Items/Weapons/SlimeGod/CorruptedCrusherBlade.cs index d76c1fe898..3f475d2836 100644 --- a/Items/Weapons/SlimeGod/CorruptedCrusherBlade.cs +++ b/Items/Weapons/SlimeGod/CorruptedCrusherBlade.cs @@ -48,14 +48,7 @@ namespace CalamityMod.Items.Weapons.SlimeGod recipe.AddIngredient(ItemID.EbonstoneBlock, 50); recipe.AddIngredient(ItemID.ShadowScale, 5); recipe.AddIngredient(ItemID.IronBar, 4); - recipe.AddTile(TileID.DemonAltar); - recipe.SetResult(this); - recipe.AddRecipe(); - recipe = new ModRecipe(mod); - recipe.AddIngredient(null, "EbonianGel", 15); - recipe.AddIngredient(ItemID.EbonstoneBlock, 50); - recipe.AddIngredient(ItemID.ShadowScale, 5); - recipe.AddIngredient(ItemID.LeadBar, 4); + recipe.anyIronBar = true; recipe.AddTile(TileID.DemonAltar); recipe.SetResult(this); recipe.AddRecipe(); diff --git a/Items/Weapons/SlimeGod/CrimsonCrusherBlade.cs b/Items/Weapons/SlimeGod/CrimsonCrusherBlade.cs index 2acc40e8d9..102467483c 100644 --- a/Items/Weapons/SlimeGod/CrimsonCrusherBlade.cs +++ b/Items/Weapons/SlimeGod/CrimsonCrusherBlade.cs @@ -48,14 +48,7 @@ namespace CalamityMod.Items.Weapons.SlimeGod recipe.AddIngredient(ItemID.CrimstoneBlock, 50); recipe.AddIngredient(ItemID.TissueSample, 5); recipe.AddIngredient(ItemID.IronBar, 4); - recipe.AddTile(TileID.DemonAltar); - recipe.SetResult(this); - recipe.AddRecipe(); - recipe = new ModRecipe(mod); - recipe.AddIngredient(null, "EbonianGel", 15); - recipe.AddIngredient(ItemID.CrimstoneBlock, 50); - recipe.AddIngredient(ItemID.TissueSample, 5); - recipe.AddIngredient(ItemID.LeadBar, 4); + recipe.anyIronBar = true; recipe.AddTile(TileID.DemonAltar); recipe.SetResult(this); recipe.AddRecipe(); diff --git a/Items/Weapons/SlimeGod/Goobow.cs b/Items/Weapons/SlimeGod/Goobow.cs index 7fd928846f..97a727a742 100644 --- a/Items/Weapons/SlimeGod/Goobow.cs +++ b/Items/Weapons/SlimeGod/Goobow.cs @@ -19,15 +19,15 @@ namespace CalamityMod.Items.Weapons.SlimeGod public override void SetDefaults() { - item.damage = 42; + item.damage = 46; item.ranged = true; item.width = 30; item.height = 48; - item.useTime = 25; - item.useAnimation = 25; + item.useTime = 20; + item.useAnimation = 20; item.useStyle = 5; item.noMelee = true; - item.knockBack = 4.5f; + item.knockBack = 3f; item.value = 105000; item.rare = 4; item.UseSound = SoundID.Item5; diff --git a/Items/Weapons/SlimeGod/GunkShot.cs b/Items/Weapons/SlimeGod/GunkShot.cs index f672f24bd4..4214731914 100644 --- a/Items/Weapons/SlimeGod/GunkShot.cs +++ b/Items/Weapons/SlimeGod/GunkShot.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.SlimeGod public override void SetDefaults() { - item.damage = 25; + item.damage = 30; item.ranged = true; item.width = 42; item.height = 18; @@ -38,11 +38,11 @@ namespace CalamityMod.Items.Weapons.SlimeGod public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { - int num6 = Main.rand.Next(3, 4); + int num6 = Main.rand.Next(3, 5); for (int index = 0; index < num6; ++index) { - float SpeedX = speedX + (float) Main.rand.Next(-30, 31) * 0.05f; - float SpeedY = speedY + (float) Main.rand.Next(-30, 31) * 0.05f; + float SpeedX = speedX + (float) Main.rand.Next(-25, 26) * 0.05f; + float SpeedY = speedY + (float) Main.rand.Next(-25, 26) * 0.05f; Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, damage, knockBack, player.whoAmI, 0.0f, 0.0f); } return false; diff --git a/Items/Weapons/SomaPrime.cs b/Items/Weapons/SomaPrime.cs index c835f75460..a8b8283f13 100644 --- a/Items/Weapons/SomaPrime.cs +++ b/Items/Weapons/SomaPrime.cs @@ -18,11 +18,11 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { - item.damage = 300; + item.damage = 400; item.ranged = true; item.width = 94; item.height = 34; - item.crit += 50; + item.crit += 40; item.useTime = 1; item.useAnimation = 3; item.useStyle = 5; diff --git a/Items/Weapons/SomaPrime.png b/Items/Weapons/SomaPrime.png index 5f91bd4517..f9728bdfc6 100644 Binary files a/Items/Weapons/SomaPrime.png and b/Items/Weapons/SomaPrime.png differ diff --git a/Items/Weapons/SoulPiercer.cs b/Items/Weapons/SoulPiercer.cs index 8d99c225dd..92f4c069d1 100644 --- a/Items/Weapons/SoulPiercer.cs +++ b/Items/Weapons/SoulPiercer.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { - item.damage = 150; + item.damage = 185; item.magic = true; item.mana = 19; item.width = 60; diff --git a/Items/Weapons/SpectralstormCannon.cs b/Items/Weapons/SpectralstormCannon.cs index fc41abaf08..5b8fe73914 100644 --- a/Items/Weapons/SpectralstormCannon.cs +++ b/Items/Weapons/SpectralstormCannon.cs @@ -56,9 +56,7 @@ namespace CalamityMod.Items.Weapons int projectile = Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, damage, knockBack, player.whoAmI, 0.0f, 0.0f); Main.projectile[projectile].timeLeft = 200; } - int projectile2 = Projectile.NewProjectile(position.X, position.Y, speedX, speedY, 297, damage, knockBack, player.whoAmI, 0.0f, 0.0f); - Main.projectile[projectile2].magic = false; - Main.projectile[projectile2].ranged = true; + Projectile.NewProjectile(position.X, position.Y, speedX, speedY, 297, damage, knockBack, player.whoAmI, 1f, 0.0f); return false; } diff --git a/Items/Weapons/SpectreRifle.cs b/Items/Weapons/SpectreRifle.cs index 5b3403bbd2..6bfca11433 100644 --- a/Items/Weapons/SpectreRifle.cs +++ b/Items/Weapons/SpectreRifle.cs @@ -38,9 +38,7 @@ public class SpectreRifle : ModItem public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { - int projectile2 = Projectile.NewProjectile(position.X, position.Y, speedX, speedY, 297, damage, knockBack, player.whoAmI, 0.0f, 0.0f); - Main.projectile[projectile2].magic = false; - Main.projectile[projectile2].ranged = true; + Projectile.NewProjectile(position.X, position.Y, speedX, speedY, 297, damage, knockBack, player.whoAmI, 1f, 0.0f); return false; } diff --git a/Items/Weapons/StarCannonEX.cs b/Items/Weapons/StarCannonEX.cs index cfa3ebd9cb..fc37d98b25 100644 --- a/Items/Weapons/StarCannonEX.cs +++ b/Items/Weapons/StarCannonEX.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { - item.damage = 70; + item.damage = 88; item.ranged = true; item.width = 66; item.height = 22; diff --git a/Items/Weapons/StarfleetMK2.cs b/Items/Weapons/StarfleetMK2.cs index 881d69ce4f..173b3667d2 100644 --- a/Items/Weapons/StarfleetMK2.cs +++ b/Items/Weapons/StarfleetMK2.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { - item.damage = 300; + item.damage = 308; item.knockBack = 15f; item.shootSpeed = 16f; item.useStyle = 5; diff --git a/Items/Weapons/StellarStriker.cs b/Items/Weapons/StellarStriker.cs index 619e0ffe41..3117d58202 100644 --- a/Items/Weapons/StellarStriker.cs +++ b/Items/Weapons/StellarStriker.cs @@ -98,9 +98,7 @@ namespace CalamityMod.Items.Weapons num79 *= num80; float num114 = num78; float num115 = num79 + (float)Main.rand.Next(-80, 81) * 0.02f; - int meteor = Projectile.NewProjectile(vector2.X, vector2.Y, num114, num115, 645, (int)((float)item.damage * player.meleeDamage), knockback, i, 0f, (float)Main.rand.Next(3)); - Main.projectile[meteor].magic = false; - Main.projectile[meteor].melee = true; + Projectile.NewProjectile(vector2.X, vector2.Y, num114, num115, 645, (int)((float)item.damage * player.meleeDamage), knockback, i, 0f, (float)Main.rand.Next(3)); } } diff --git a/Items/Weapons/StormDragoon.cs b/Items/Weapons/StormDragoon.cs index c8485ef661..65a1af6466 100644 --- a/Items/Weapons/StormDragoon.cs +++ b/Items/Weapons/StormDragoon.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { - item.damage = 110; + item.damage = 135; item.ranged = true; item.width = 74; item.height = 34; diff --git a/Items/Weapons/StreamGouge.cs b/Items/Weapons/StreamGouge.cs index 26ab510255..35b6ef9b98 100644 --- a/Items/Weapons/StreamGouge.cs +++ b/Items/Weapons/StreamGouge.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { item.width = 86; - item.damage = 280; + item.damage = 350; item.melee = true; item.noMelee = true; item.useTurn = true; diff --git a/Items/Weapons/SubsumingVortex.cs b/Items/Weapons/SubsumingVortex.cs index 056505108c..94dc405aa4 100644 --- a/Items/Weapons/SubsumingVortex.cs +++ b/Items/Weapons/SubsumingVortex.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { - item.damage = 182; + item.damage = 520; item.magic = true; item.mana = 20; item.width = 28; diff --git a/Items/Weapons/T1000.cs b/Items/Weapons/T1000.cs index 9dc3e4a28a..da037dc6bb 100644 --- a/Items/Weapons/T1000.cs +++ b/Items/Weapons/T1000.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { - item.damage = 174; + item.damage = 370; item.magic = true; item.mana = 10; item.width = 20; diff --git a/Items/Weapons/TeardropCleaver.cs b/Items/Weapons/TeardropCleaver.cs index 44356e680c..88a0018b26 100644 --- a/Items/Weapons/TeardropCleaver.cs +++ b/Items/Weapons/TeardropCleaver.cs @@ -7,35 +7,36 @@ using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items; -namespace CalamityMod.Items.Weapons { -public class TeardropCleaver : ModItem +namespace CalamityMod.Items.Weapons { - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Teardrop Cleaver"); - Tooltip.SetDefault("Makes your enemies cry"); - } - - public override void SetDefaults() - { - item.width = 52; //The width of the .png file in pixels divided by 2. - item.damage = 15; //Keep this reasonable please. - item.melee = true; //Dictates whether this is a melee-class weapon. - item.useAnimation = 24; - item.useStyle = 1; - item.useTime = 24; - item.useTurn = true; - item.knockBack = 4.5f; //Ranges from 1 to 9. - item.UseSound = SoundID.Item1; - item.autoReuse = true; - item.height = 56; //The height of the .png file in pixels divided by 2. - item.maxStack = 1; - item.value = 50000; //Value is calculated in copper coins. - item.rare = 2; //Ranges from 1 to 11. - } - - public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit) + public class TeardropCleaver : ModItem { - target.AddBuff(mod.BuffType("TemporalSadness"), 60); - } -}} + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Teardrop Cleaver"); + Tooltip.SetDefault("Makes your enemies cry"); + } + + public override void SetDefaults() + { + item.width = 52; + item.damage = 18; + item.melee = true; + item.useAnimation = 24; + item.useStyle = 1; + item.useTime = 24; + item.useTurn = true; + item.knockBack = 4.5f; + item.UseSound = SoundID.Item1; + item.autoReuse = true; + item.height = 56; + item.value = 50000; + item.rare = 2; + } + + public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit) + { + target.AddBuff(mod.BuffType("TemporalSadness"), 60); + } + } +} diff --git a/Items/Weapons/TearsofHeaven.cs b/Items/Weapons/TearsofHeaven.cs index 06154f49ae..aea88f5dce 100644 --- a/Items/Weapons/TearsofHeaven.cs +++ b/Items/Weapons/TearsofHeaven.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { - item.damage = 65; + item.damage = 72; item.magic = true; item.mana = 18; item.width = 28; diff --git a/Items/Weapons/TerraArrow.cs b/Items/Weapons/TerraArrow.cs index 114ba79217..c15f6c4734 100644 --- a/Items/Weapons/TerraArrow.cs +++ b/Items/Weapons/TerraArrow.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { - item.damage = 13; + item.damage = 9; item.ranged = true; item.width = 22; item.height = 36; @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons item.consumable = true; item.knockBack = 1.5f; item.value = 2000; - item.rare = 3; + item.rare = 7; item.shoot = mod.ProjectileType("TerraArrow"); item.shootSpeed = 15f; item.ammo = 40; diff --git a/Items/Weapons/TerraArrow.png b/Items/Weapons/TerraArrow.png index 683c3247f1..2fba9fd97b 100644 Binary files a/Items/Weapons/TerraArrow.png and b/Items/Weapons/TerraArrow.png differ diff --git a/Items/Weapons/TerraBullet.cs b/Items/Weapons/TerraBullet.cs index 485fa78476..d4d698ee77 100644 --- a/Items/Weapons/TerraBullet.cs +++ b/Items/Weapons/TerraBullet.cs @@ -18,15 +18,15 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { - item.damage = 12; + item.damage = 9; item.ranged = true; item.width = 8; item.height = 8; item.maxStack = 999; item.consumable = true; item.knockBack = 1.25f; - item.value = 750; - item.rare = 8; + item.value = 2000; + item.rare = 7; item.shoot = mod.ProjectileType("TerraBullet"); item.shootSpeed = 10f; item.ammo = 97; diff --git a/Items/Weapons/TerraBullet.png b/Items/Weapons/TerraBullet.png index 382db505ce..1b78972e17 100644 Binary files a/Items/Weapons/TerraBullet.png and b/Items/Weapons/TerraBullet.png differ diff --git a/Items/Weapons/TerraEdge.png b/Items/Weapons/TerraEdge.png index 5fa9311583..faef3af67d 100644 Binary files a/Items/Weapons/TerraEdge.png and b/Items/Weapons/TerraEdge.png differ diff --git a/Items/Weapons/TerraFlameburster.png b/Items/Weapons/TerraFlameburster.png index 12d14a4c8c..6dd46e5f7a 100644 Binary files a/Items/Weapons/TerraFlameburster.png and b/Items/Weapons/TerraFlameburster.png differ diff --git a/Items/Weapons/TerraLance.png b/Items/Weapons/TerraLance.png index 1cbe24ba15..2ec07315aa 100644 Binary files a/Items/Weapons/TerraLance.png and b/Items/Weapons/TerraLance.png differ diff --git a/Items/Weapons/TerraRay.cs b/Items/Weapons/TerraRay.cs index a599e67589..a71cfd60b4 100644 --- a/Items/Weapons/TerraRay.cs +++ b/Items/Weapons/TerraRay.cs @@ -7,48 +7,50 @@ using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items; -namespace CalamityMod.Items.Weapons { -public class TerraRay : ModItem +namespace CalamityMod.Items.Weapons { - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Terra Ray"); - Item.staff[item.type] = true; - } - - public override void SetDefaults() + public class TerraRay : ModItem { - item.damage = 55; - item.magic = true; - item.mana = 10; - item.width = 54; - item.height = 54; - item.useTime = 20; - item.useAnimation = 20; - item.useStyle = 5; - item.noMelee = true; //so the item's animation doesn't do damage - item.knockBack = 5.5f; - item.value = 1000000; - item.rare = 8; - item.UseSound = SoundID.Item60; - item.autoReuse = true; - item.shoot = mod.ProjectileType("TerraRay"); - item.shootSpeed = 6f; + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Terra Ray"); + Item.staff[item.type] = true; + } + + public override void SetDefaults() + { + item.damage = 70; + item.magic = true; + item.mana = 10; + item.width = 54; + item.height = 54; + item.useTime = 20; + item.useAnimation = 20; + item.useStyle = 5; + item.noMelee = true; + item.knockBack = 4f; + item.value = 1000000; + item.rare = 8; + item.UseSound = SoundID.Item60; + item.autoReuse = true; + item.shoot = mod.ProjectileType("TerraRay"); + item.shootSpeed = 6f; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(null, "LivingShard", 7); + recipe.AddIngredient(null, "NightsRay"); + recipe.AddTile(TileID.MythrilAnvil); + recipe.SetResult(this); + recipe.AddRecipe(); + recipe = new ModRecipe(mod); + recipe.AddIngredient(null, "LivingShard", 7); + recipe.AddIngredient(null, "CarnageRay"); + recipe.AddTile(TileID.MythrilAnvil); + recipe.SetResult(this); + recipe.AddRecipe(); + } } - - public override void AddRecipes() - { - ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(null, "LivingShard", 7); - recipe.AddIngredient(null, "NightsRay"); - recipe.AddTile(TileID.MythrilAnvil); - recipe.SetResult(this); - recipe.AddRecipe(); - recipe = new ModRecipe(mod); - recipe.AddIngredient(null, "LivingShard", 7); - recipe.AddIngredient(null, "CarnageRay"); - recipe.AddTile(TileID.MythrilAnvil); - recipe.SetResult(this); - recipe.AddRecipe(); - } -}} \ No newline at end of file +} \ No newline at end of file diff --git a/Items/Weapons/TerraRay.png b/Items/Weapons/TerraRay.png index d3c796eb03..ffeae7d03e 100644 Binary files a/Items/Weapons/TerraRay.png and b/Items/Weapons/TerraRay.png differ diff --git a/Items/Weapons/TerraShiv.png b/Items/Weapons/TerraShiv.png index 6ad23693b0..6af4659a1e 100644 Binary files a/Items/Weapons/TerraShiv.png and b/Items/Weapons/TerraShiv.png differ diff --git a/Items/Weapons/Terratomere.png b/Items/Weapons/Terratomere.png index c8d070ef99..ebcd82bb9e 100644 Binary files a/Items/Weapons/Terratomere.png and b/Items/Weapons/Terratomere.png differ diff --git a/Items/Weapons/TheBallista.cs b/Items/Weapons/TheBallista.cs index 144598ce10..a09d6f1cfe 100644 --- a/Items/Weapons/TheBallista.cs +++ b/Items/Weapons/TheBallista.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { - item.damage = 95; + item.damage = 145; item.ranged = true; item.width = 40; item.height = 70; diff --git a/Items/Weapons/TheEnforcer.cs b/Items/Weapons/TheEnforcer.cs index 4b3eddbe39..1ebe46d500 100644 --- a/Items/Weapons/TheEnforcer.cs +++ b/Items/Weapons/TheEnforcer.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { item.width = 64; - item.damage = 1650; + item.damage = 2200; item.melee = true; item.useAnimation = 17; item.useStyle = 1; diff --git a/Items/Weapons/TheMutilator.cs b/Items/Weapons/TheMutilator.cs index 27daa4610a..b05a365f1f 100644 --- a/Items/Weapons/TheMutilator.cs +++ b/Items/Weapons/TheMutilator.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { item.width = 80; - item.damage = 630; + item.damage = 950; item.melee = true; item.useAnimation = 18; item.useStyle = 1; diff --git a/Items/Weapons/TheSwarmer.cs b/Items/Weapons/TheSwarmer.cs index 4375a3ee20..b7b1d2e053 100644 --- a/Items/Weapons/TheSwarmer.cs +++ b/Items/Weapons/TheSwarmer.cs @@ -64,7 +64,7 @@ namespace CalamityMod.Items.Weapons { float SpeedX2 = speedX + (float)Main.rand.Next(-35, 36) * 0.05f; float SpeedY2 = speedY + (float)Main.rand.Next(-35, 36) * 0.05f; - int bees = Projectile.NewProjectile(position.X, position.Y, SpeedX2, SpeedY2, 181, damage, 0f, player.whoAmI, 0.0f, 0.0f); + int bees = Projectile.NewProjectile(position.X, position.Y, SpeedX2, SpeedY2, player.beeType(), player.beeDamage(item.damage), player.beeKB(0f), player.whoAmI, 0.0f, 0.0f); Main.projectile[bees].penetrate = 1; } return false; diff --git a/Items/Weapons/TitaniumRailgun.cs b/Items/Weapons/TitaniumRailgun.cs index 9813d6ddd1..dff38ac99c 100644 --- a/Items/Weapons/TitaniumRailgun.cs +++ b/Items/Weapons/TitaniumRailgun.cs @@ -7,51 +7,53 @@ using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items; -namespace CalamityMod.Items.Weapons { -public class TitaniumRailgun : ModItem +namespace CalamityMod.Items.Weapons { - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Titanium Railgun"); - } - - public override void SetDefaults() + public class TitaniumRailgun : ModItem { - item.damage = 50; - item.ranged = true; - item.width = 62; - item.height = 26; - item.useTime = 25; - item.useAnimation = 25; - item.useStyle = 5; - item.noMelee = true; //so the item's animation doesn't do damage - item.knockBack = 3.5f; - item.value = 550000; - item.rare = 5; - item.UseSound = SoundID.Item72; - item.autoReuse = true; - item.shootSpeed = 6f; - item.shoot = mod.ProjectileType("TitRail"); - item.useAmmo = 97; - } - - public override Vector2? HoldoutOffset() - { - return new Vector2(-5, 0); - } - - public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) - { - Projectile.NewProjectile(position.X, position.Y, speedX, speedY, mod.ProjectileType("TitRail"), damage, knockBack, player.whoAmI, 0.0f, 0.0f); - return false; - } + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Titanium Railgun"); + } - public override void AddRecipes() - { - ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(ItemID.TitaniumBar, 10); - recipe.AddTile(TileID.MythrilAnvil); - recipe.SetResult(this); - recipe.AddRecipe(); + public override void SetDefaults() + { + item.damage = 70; + item.ranged = true; + item.width = 62; + item.height = 26; + item.useTime = 25; + item.useAnimation = 25; + item.useStyle = 5; + item.noMelee = true; + item.knockBack = 3f; + item.value = 550000; + item.rare = 5; + item.UseSound = SoundID.Item72; + item.autoReuse = true; + item.shootSpeed = 6f; + item.shoot = mod.ProjectileType("TitRail"); + item.useAmmo = 97; + } + + public override Vector2? HoldoutOffset() + { + return new Vector2(-5, 0); + } + + public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + Projectile.NewProjectile(position.X, position.Y, speedX, speedY, mod.ProjectileType("TitRail"), damage, knockBack, player.whoAmI, 0.0f, 0.0f); + return false; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ItemID.TitaniumBar, 10); + recipe.AddTile(TileID.MythrilAnvil); + recipe.SetResult(this); + recipe.AddRecipe(); + } } -}} \ No newline at end of file +} \ No newline at end of file diff --git a/Items/Weapons/TriactisTruePaladinianMageHammerofMightMelee.cs b/Items/Weapons/TriactisTruePaladinianMageHammerofMightMelee.cs index 49791feb6b..7b56ebed59 100644 --- a/Items/Weapons/TriactisTruePaladinianMageHammerofMightMelee.cs +++ b/Items/Weapons/TriactisTruePaladinianMageHammerofMightMelee.cs @@ -18,19 +18,19 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { - item.width = 160; //The width of the .png file in pixels divided by 2. - item.damage = 3500; //Keep this reasonable please. - item.noMelee = true; //Dictates whether this is a melee-class weapon. + item.width = 160; + item.damage = 5000; + item.noMelee = true; item.noUseGraphic = true; item.autoReuse = true; item.useAnimation = 10; item.useStyle = 1; item.useTime = 10; - item.knockBack = 50f; //Ranges from 1 to 9. + item.knockBack = 50f; item.UseSound = SoundID.Item1; - item.melee = true; //Dictates whether the weapon can be "auto-fired". - item.height = 160; //The height of the .png file in pixels divided by 2. - item.value = 100000000; //Value is calculated in copper coins. + item.melee = true; + item.height = 160; + item.value = 100000000; item.shoot = mod.ProjectileType("TriactisOPHammerMelee"); item.shootSpeed = 25f; } diff --git a/Items/Weapons/Trinity.cs b/Items/Weapons/Trinity.cs index 3dc4ce11ad..1de1520559 100644 --- a/Items/Weapons/Trinity.cs +++ b/Items/Weapons/Trinity.cs @@ -47,9 +47,7 @@ namespace CalamityMod.Items.Weapons { float SpeedX = speedX + (float)Main.rand.Next(-30, 31) * 0.05f; float SpeedY = speedY + (float)Main.rand.Next(-30, 31) * 0.05f; - int projectile1 = Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, (int)((double)damage * 0.6f), knockBack, Main.myPlayer); - Main.projectile[projectile1].magic = false; - Main.projectile[projectile1].melee = true; + Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, (int)((double)damage * 0.6f), knockBack, Main.myPlayer, 1f, 0f); } return false; } diff --git a/Items/Weapons/Triploon.cs b/Items/Weapons/Triploon.cs index 965dc60fde..9689a4b6aa 100644 --- a/Items/Weapons/Triploon.cs +++ b/Items/Weapons/Triploon.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { - item.damage = 70; + item.damage = 80; item.ranged = true; item.width = 46; item.height = 24; @@ -35,6 +35,11 @@ namespace CalamityMod.Items.Weapons item.shoot = mod.ProjectileType("Triploon"); } + public override Vector2? HoldoutOffset() + { + return new Vector2(-10, 0); + } + public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); @@ -63,7 +68,9 @@ namespace CalamityMod.Items.Weapons ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(null, "Dualpoon"); recipe.AddIngredient(ItemID.Harpoon); - recipe.AddIngredient(ItemID.Ectoplasm, 5); + recipe.AddIngredient(null, "DepthCells", 15); + recipe.AddIngredient(null, "Lumenite", 5); + recipe.AddIngredient(null, "Tenebris", 5); recipe.AddTile(TileID.MythrilAnvil); recipe.SetResult(this); recipe.AddRecipe(); diff --git a/Items/Weapons/Triploon.png b/Items/Weapons/Triploon.png index 6c981a9d77..e68939e24b 100644 Binary files a/Items/Weapons/Triploon.png and b/Items/Weapons/Triploon.png differ diff --git a/Items/Weapons/TrueArkoftheAncients.cs b/Items/Weapons/TrueArkoftheAncients.cs index ce1047eb2f..a6a8925be2 100644 --- a/Items/Weapons/TrueArkoftheAncients.cs +++ b/Items/Weapons/TrueArkoftheAncients.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { item.width = 60; - item.damage = 82; + item.damage = 85; item.melee = true; item.useAnimation = 25; item.useTime = 25; @@ -45,7 +45,6 @@ namespace CalamityMod.Items.Weapons Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, damage, knockBack, Main.myPlayer); int i = Main.myPlayer; float num72 = Main.rand.Next(18, 27); - int num73 = Main.rand.Next(60, 91); float num74 = knockBack; num74 = player.GetWeaponKnockback(item, num74); player.itemTime = item.useTime; @@ -94,10 +93,8 @@ namespace CalamityMod.Items.Weapons num79 *= num80; float speedX4 = num78 + (float)Main.rand.Next(-160, 161) * 0.02f; float speedY5 = num79 + (float)Main.rand.Next(-160, 161) * 0.02f; - int star = Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, speedY5, 92, num73, num74, i, 0f, (float)Main.rand.Next(10)); - Main.projectile[star].ranged = false; - Main.projectile[star].melee = true; - Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, speedY5, mod.ProjectileType("TerraBall"), num73, num74, i, 0f, (float)Main.rand.Next(5)); + Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, speedY5, 92, damage, num74, i, 1f, (float)Main.rand.Next(10)); + Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, speedY5, mod.ProjectileType("TerraBall"), damage, num74, i, 0f, (float)Main.rand.Next(5)); } return false; } diff --git a/Items/Weapons/TrueBloodyEdge.cs b/Items/Weapons/TrueBloodyEdge.cs index b076e1152e..073d0f262d 100644 --- a/Items/Weapons/TrueBloodyEdge.cs +++ b/Items/Weapons/TrueBloodyEdge.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { item.width = 48; - item.damage = 88; + item.damage = 70; item.melee = true; item.useAnimation = 24; item.useStyle = 1; diff --git a/Items/Weapons/TruePaladinsHammerMelee.cs b/Items/Weapons/TruePaladinsHammerMelee.cs index d5718c190f..8e15d7cc7f 100644 --- a/Items/Weapons/TruePaladinsHammerMelee.cs +++ b/Items/Weapons/TruePaladinsHammerMelee.cs @@ -18,20 +18,20 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { - item.width = 14; //The width of the .png file in pixels divided by 2. - item.damage = 128; //Keep this reasonable please. - item.noMelee = true; //Dictates whether this is a melee-class weapon. + item.width = 14; + item.damage = 180; + item.noMelee = true; item.noUseGraphic = true; item.autoReuse = true; item.useAnimation = 13; item.useStyle = 1; item.useTime = 13; - item.knockBack = 20f; //Ranges from 1 to 9. + item.knockBack = 20f; item.UseSound = SoundID.Item1; - item.melee = true; //Dictates whether the weapon can be "auto-fired". - item.height = 28; //The height of the .png file in pixels divided by 2. - item.value = 9000000; //Value is calculated in copper coins. - item.rare = 9; //Ranges from 1 to 11. + item.melee = true; + item.height = 28; + item.value = 9000000; + item.rare = 9; item.shoot = mod.ProjectileType("OPHammerMelee"); item.shootSpeed = 14f; } diff --git a/Items/Weapons/TrueTyrantYharimsUltisword.cs b/Items/Weapons/TrueTyrantYharimsUltisword.cs index 5bcc0ba855..d647cfb241 100644 --- a/Items/Weapons/TrueTyrantYharimsUltisword.cs +++ b/Items/Weapons/TrueTyrantYharimsUltisword.cs @@ -13,7 +13,9 @@ namespace CalamityMod.Items.Weapons public override void SetStaticDefaults() { DisplayName.SetDefault("True Tyrant's Ultisword"); - Tooltip.SetDefault("Contains the essence of a forgotten age\n50% chance to give the player the tyrant's fury buff on enemy hits\nThis buff increases melee damage, speed, and crit chance by 30%"); + Tooltip.SetDefault("Contains the essence of a forgotten age\n" + + "50% chance to give the player the tyrant's fury buff on enemy hits\n" + + "This buff increases melee damage by 30% and melee crit chance by 10%"); } public override void SetDefaults() diff --git a/Items/Weapons/TyrantYharimsUltisword.cs b/Items/Weapons/TyrantYharimsUltisword.cs index f8f578d553..aba4b07e49 100644 --- a/Items/Weapons/TyrantYharimsUltisword.cs +++ b/Items/Weapons/TyrantYharimsUltisword.cs @@ -13,7 +13,9 @@ namespace CalamityMod.Items.Weapons public override void SetStaticDefaults() { DisplayName.SetDefault("Tyrant Yharim's Ultisword"); - Tooltip.SetDefault("Necrotic blade of Jungle King Yharim\n50% chance to give the player the tyrant's fury buff on enemy hits\nThis buff increases melee damage, speed, and crit chance by 30%"); + Tooltip.SetDefault("Necrotic blade of Jungle King Yharim\n" + + "50% chance to give the player the tyrant's fury buff on enemy hits\n" + + "This buff increases melee damage by 30% and melee crit chance by 10%"); } public override void SetDefaults() diff --git a/Items/Weapons/VenusianTrident.cs b/Items/Weapons/VenusianTrident.cs index 78e7926ebf..14b4f749aa 100644 --- a/Items/Weapons/VenusianTrident.cs +++ b/Items/Weapons/VenusianTrident.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { - item.damage = 360; + item.damage = 136; item.magic = true; item.mana = 20; item.width = 48; @@ -43,7 +43,7 @@ namespace CalamityMod.Items.Weapons { if (line2.mod == "Terraria" && line2.Name == "ItemName") { - line2.overrideColor = new Color(43, 96, 222); + line2.overrideColor = new Color(0, 255, 0); } } } @@ -54,7 +54,7 @@ namespace CalamityMod.Items.Weapons recipe.AddIngredient(ItemID.InfernoFork); recipe.AddIngredient(null, "Phantoplasm", 5); recipe.AddIngredient(null, "TwistingNether"); - recipe.AddTile(null, "DraedonsForge"); + recipe.AddTile(TileID.LunarCraftingStation); recipe.SetResult(this); recipe.AddRecipe(); } diff --git a/Items/Weapons/VeriumBullet.cs b/Items/Weapons/VeriumBullet.cs index 43ec15a5d1..cf887a8ee8 100644 --- a/Items/Weapons/VeriumBullet.cs +++ b/Items/Weapons/VeriumBullet.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { - item.damage = 9; + item.damage = 8; item.ranged = true; item.width = 8; item.height = 8; @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons item.consumable = true; item.knockBack = 1.25f; item.value = 500; - item.rare = 5; + item.rare = 3; item.shoot = mod.ProjectileType("VeriumBullet"); item.shootSpeed = 16f; item.ammo = 97; diff --git a/Items/Weapons/Viscera.cs b/Items/Weapons/Viscera.cs index bdb9fff9ee..2f7aa2f7d5 100644 --- a/Items/Weapons/Viscera.cs +++ b/Items/Weapons/Viscera.cs @@ -20,9 +20,9 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { - item.damage = 180; + item.damage = 153; item.magic = true; - item.mana = 20; + item.mana = 15; item.width = 50; item.height = 52; item.useTime = 14; diff --git a/Items/Weapons/VividClarity.cs b/Items/Weapons/VividClarity.cs index 1d5b8409bd..e89c45eac1 100644 --- a/Items/Weapons/VividClarity.cs +++ b/Items/Weapons/VividClarity.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { - item.damage = 198; + item.damage = 350; item.magic = true; item.mana = 150; item.width = 90; diff --git a/Items/Weapons/Vortexpopper.cs b/Items/Weapons/Vortexpopper.cs index 5e01dca413..2ad0343fcd 100644 --- a/Items/Weapons/Vortexpopper.cs +++ b/Items/Weapons/Vortexpopper.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { - item.damage = 15; + item.damage = 20; item.ranged = true; item.width = 46; item.height = 22; diff --git a/Items/Weapons/Warblade.cs b/Items/Weapons/Warblade.cs index cb4a896c0d..398108d4a3 100644 --- a/Items/Weapons/Warblade.cs +++ b/Items/Weapons/Warblade.cs @@ -7,28 +7,30 @@ using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items; -namespace CalamityMod.Items.Weapons { -public class Warblade : ModItem +namespace CalamityMod.Items.Weapons { - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Warblade"); - } - - public override void SetDefaults() + public class Warblade : ModItem { - item.damage = 27; - item.melee = true; - item.width = 32; - item.height = 48; - item.useTime = 19; - item.useAnimation = 19; - item.useTurn = true; - item.useStyle = 1; - item.knockBack = 4.25f; - item.value = 50000; - item.rare = 1; - item.UseSound = SoundID.Item1; - item.autoReuse = true; + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Warblade"); + } + + public override void SetDefaults() + { + item.damage = 27; + item.melee = true; + item.width = 32; + item.height = 48; + item.useTime = 19; + item.useAnimation = 19; + item.useTurn = true; + item.useStyle = 1; + item.knockBack = 4.25f; + item.value = 50000; + item.rare = 1; + item.UseSound = SoundID.Item1; + item.autoReuse = true; + } } -}} \ No newline at end of file +} \ No newline at end of file diff --git a/Items/Weapons/WrathoftheAncients.cs b/Items/Weapons/WrathoftheAncients.cs index b2fcec2fcd..24fee6fa50 100644 --- a/Items/Weapons/WrathoftheAncients.cs +++ b/Items/Weapons/WrathoftheAncients.cs @@ -7,65 +7,67 @@ using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items; -namespace CalamityMod.Items.Weapons { -public class WrathoftheAncients : ModItem +namespace CalamityMod.Items.Weapons { - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Wrath of the Ancients"); - } + public class WrathoftheAncients : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Wrath of the Ancients"); + } - public override void SetDefaults() - { - item.damage = 52; - item.magic = true; - item.mana = 20; - item.width = 28; - item.height = 30; - item.useTime = 38; - item.useAnimation = 38; - item.useStyle = 5; - item.noMelee = true; //so the item's animation doesn't do damage - item.knockBack = 6f; - item.value = 500000; - item.rare = 8; - item.autoReuse = true; - item.shoot = mod.ProjectileType("GranitePulse"); - item.shootSpeed = 9f; + public override void SetDefaults() + { + item.damage = 47; + item.magic = true; + item.mana = 20; + item.width = 28; + item.height = 30; + item.useTime = 38; + item.useAnimation = 38; + item.useStyle = 5; + item.noMelee = true; + item.knockBack = 6f; + item.value = 500000; + item.rare = 8; + item.autoReuse = true; + item.shoot = mod.ProjectileType("GranitePulse"); + item.shootSpeed = 9f; + } + + public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + int i = Main.myPlayer; + float num72 = item.shootSpeed; + int num73 = damage; + float num74 = knockBack; + num74 = player.GetWeaponKnockback(item, num74); + player.itemTime = item.useTime; + Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); + float num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; + float num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; + if (player.gravDir == -1f) + { + num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y; + } + float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); + float num81 = num80; + if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f)) + { + num78 = (float)player.direction; + num79 = 0f; + num80 = num72; + } + else + { + num80 = num72 / num80; + } + num78 = 0f; + num79 = 0f; + vector2.X = (float)Main.mouseX + Main.screenPosition.X; + vector2.Y = (float)Main.mouseY + Main.screenPosition.Y; + Projectile.NewProjectile(vector2.X, vector2.Y, num78, num79, mod.ProjectileType("GranitePulse"), num73, num74, i, 0f, 0f); + return false; + } } - - public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) - { - int i = Main.myPlayer; - float num72 = item.shootSpeed; - int num73 = damage; - float num74 = knockBack; - num74 = player.GetWeaponKnockback(item, num74); - player.itemTime = item.useTime; - Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); - float num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - float num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; - if (player.gravDir == -1f) - { - num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y; - } - float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - float num81 = num80; - if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f)) - { - num78 = (float)player.direction; - num79 = 0f; - num80 = num72; - } - else - { - num80 = num72 / num80; - } - num78 = 0f; - num79 = 0f; - vector2.X = (float)Main.mouseX + Main.screenPosition.X; - vector2.Y = (float)Main.mouseY + Main.screenPosition.Y; - Projectile.NewProjectile(vector2.X, vector2.Y, num78, num79, mod.ProjectileType("GranitePulse"), num73, num74, i, 0f, 0f); - return false; - } -}} \ No newline at end of file +} \ No newline at end of file diff --git a/Items/Weapons/WulfrumBlade.cs b/Items/Weapons/WulfrumBlade.cs index 4ae2f74683..d049ab5660 100644 --- a/Items/Weapons/WulfrumBlade.cs +++ b/Items/Weapons/WulfrumBlade.cs @@ -7,37 +7,39 @@ using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items; -namespace CalamityMod.Items.Weapons { -public class WulfrumBlade : ModItem +namespace CalamityMod.Items.Weapons { - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Wulfrum Blade"); - } - - public override void SetDefaults() - { - item.width = 46; - item.damage = 15; - item.melee = true; - item.useAnimation = 20; - item.useStyle = 1; - item.useTime = 20; - item.useTurn = true; - item.knockBack = 3.75f; - item.UseSound = SoundID.Item1; - item.autoReuse = true; - item.height = 54; - item.value = 20000; - item.rare = 1; - } - - public override void AddRecipes() - { - ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(null, "WulfrumShard", 12); - recipe.AddTile(TileID.Anvils); - recipe.SetResult(this); - recipe.AddRecipe(); - } -}} + public class WulfrumBlade : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Wulfrum Blade"); + } + + public override void SetDefaults() + { + item.width = 46; + item.damage = 12; + item.melee = true; + item.useAnimation = 20; + item.useStyle = 1; + item.useTime = 20; + item.useTurn = true; + item.knockBack = 3.75f; + item.UseSound = SoundID.Item1; + item.autoReuse = true; + item.height = 54; + item.value = 20000; + item.rare = 1; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(null, "WulfrumShard", 12); + recipe.AddTile(TileID.Anvils); + recipe.SetResult(this); + recipe.AddRecipe(); + } + } +} diff --git a/Items/Weapons/YharimsCrystal.cs b/Items/Weapons/YharimsCrystal.cs index ea75c5a97c..e2d692bf0a 100644 --- a/Items/Weapons/YharimsCrystal.cs +++ b/Items/Weapons/YharimsCrystal.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { - item.damage = 110; + item.damage = 240; item.magic = true; item.mana = 100; item.width = 16; diff --git a/Items/Weapons/Yharon/AngryChickenStaff.cs b/Items/Weapons/Yharon/AngryChickenStaff.cs index f20e710133..f7f28c8dc1 100644 --- a/Items/Weapons/Yharon/AngryChickenStaff.cs +++ b/Items/Weapons/Yharon/AngryChickenStaff.cs @@ -22,14 +22,13 @@ namespace CalamityMod.Items.Weapons.Yharon DisplayName.SetDefault("Yharon's Kindle Staff"); Tooltip.SetDefault("Summons the Son of Yharon to fight for you\n" + "The dragon increases your life regen, defense, and movement speed while summoned\n" + - "The dragon imbues your melee attacks with Holy Flames while summoned\n" + "Requires 4 minion slots to use"); } public override void SetDefaults() { item.mana = 50; - item.damage = 232; + item.damage = 160; item.useStyle = 1; item.width = 32; item.height = 32; diff --git a/Items/Weapons/Yharon/ChickenCannon.cs b/Items/Weapons/Yharon/ChickenCannon.cs index ee721debe3..a3a375734b 100644 --- a/Items/Weapons/Yharon/ChickenCannon.cs +++ b/Items/Weapons/Yharon/ChickenCannon.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Yharon public override void SetDefaults() { - item.damage = 22; + item.damage = 12; item.ranged = true; item.width = 76; item.height = 24; diff --git a/Items/Weapons/Yharon/DragonRage.cs b/Items/Weapons/Yharon/DragonRage.cs index d7855c57f3..18e2e70601 100644 --- a/Items/Weapons/Yharon/DragonRage.cs +++ b/Items/Weapons/Yharon/DragonRage.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Yharon public override void SetDefaults() { item.width = 68; - item.damage = 683; + item.damage = 800; item.melee = true; item.useAnimation = 25; item.useTime = 25; @@ -28,7 +28,6 @@ namespace CalamityMod.Items.Weapons.Yharon item.UseSound = SoundID.Item1; item.autoReuse = true; item.height = 80; - item.maxStack = 1; item.value = 10000000; item.shoot = mod.ProjectileType("DragonRage"); item.shootSpeed = 14f; diff --git a/Items/Weapons/Yharon/DragonsBreath.cs b/Items/Weapons/Yharon/DragonsBreath.cs index 79ad375415..81996882d9 100644 --- a/Items/Weapons/Yharon/DragonsBreath.cs +++ b/Items/Weapons/Yharon/DragonsBreath.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Yharon public override void SetDefaults() { - item.damage = 236; + item.damage = 220; item.ranged = true; item.width = 64; item.height = 28; diff --git a/Items/Weapons/Yharon/PhoenixFlameBarrage.cs b/Items/Weapons/Yharon/PhoenixFlameBarrage.cs index 06f2aa591e..e564f5506e 100644 --- a/Items/Weapons/Yharon/PhoenixFlameBarrage.cs +++ b/Items/Weapons/Yharon/PhoenixFlameBarrage.cs @@ -7,103 +7,105 @@ using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items; -namespace CalamityMod.Items.Weapons.Yharon { -public class PhoenixFlameBarrage : ModItem +namespace CalamityMod.Items.Weapons.Yharon { - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Phoenix Flame Barrage"); - Tooltip.SetDefault("Baptism by holy fire"); - Item.staff[item.type] = true; - } - - public override void SetDefaults() + public class PhoenixFlameBarrage : ModItem { - item.damage = 235; - item.magic = true; - item.mana = 20; - item.width = 72; - item.height = 70; - item.useTime = 15; - item.useAnimation = 30; - item.useStyle = 5; - item.noMelee = true; //so the item's animation doesn't do damage - item.knockBack = 3.5f; - item.value = 10000000; - item.UseSound = SoundID.Item20; - item.autoReuse = true; - item.shoot = mod.ProjectileType("HolyFlame"); - item.shootSpeed = 30f; - } - - public override void ModifyTooltips(List list) - { - foreach (TooltipLine line2 in list) + public override void SetStaticDefaults() { - if (line2.mod == "Terraria" && line2.Name == "ItemName") + DisplayName.SetDefault("Phoenix Flame Barrage"); + Tooltip.SetDefault("Baptism by holy fire"); + Item.staff[item.type] = true; + } + + public override void SetDefaults() + { + item.damage = 290; + item.magic = true; + item.mana = 20; + item.width = 72; + item.height = 70; + item.useTime = 15; + item.useAnimation = 30; + item.useStyle = 5; + item.noMelee = true; + item.knockBack = 3.5f; + item.value = 10000000; + item.UseSound = SoundID.Item20; + item.autoReuse = true; + item.shoot = mod.ProjectileType("HolyFlame"); + item.shootSpeed = 30f; + } + + public override void ModifyTooltips(List list) + { + foreach (TooltipLine line2 in list) { - line2.overrideColor = new Color(43, 96, 222); + if (line2.mod == "Terraria" && line2.Name == "ItemName") + { + line2.overrideColor = new Color(43, 96, 222); + } } } + + public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) + { + float num72 = item.shootSpeed; + player.itemTime = item.useTime; + Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); + float num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; + float num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; + if (player.gravDir == -1f) + { + num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y; + } + float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); + float num81 = num80; + if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f)) + { + num78 = (float)player.direction; + num79 = 0f; + num80 = num72; + } + else + { + num80 = num72 / num80; + } + num78 *= num80; + num79 *= num80; + int num107 = 30; + if (Main.rand.Next(3) == 0) + { + num107++; + } + if (Main.rand.Next(3) == 0) + { + num107++; + } + for (int num108 = 0; num108 < num107; num108++) + { + vector2 = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f); + vector2.X = (vector2.X + player.Center.X) / 2f + (float)Main.rand.Next(-200, 201); + vector2.Y -= (float)(100 * num108); + num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; + num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; + if (num79 < 0f) + { + num79 *= -1f; + } + if (num79 < 20f) + { + num79 = 20f; + } + num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); + num80 = num72 / num80; + num78 *= num80; + num79 *= num80; + float speedX4 = num78 + (float)Main.rand.Next(-30, 31) * 0.02f; + float speedY5 = num79 + (float)Main.rand.Next(-30, 31) * 0.02f; + Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, speedY5, type, damage, knockBack, player.whoAmI, 0f, (float)Main.rand.Next(15)); + } + return false; + } } - - public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) - { - float num72 = item.shootSpeed; - player.itemTime = item.useTime; - Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); - float num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - float num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; - if (player.gravDir == -1f) - { - num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y; - } - float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - float num81 = num80; - if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f)) - { - num78 = (float)player.direction; - num79 = 0f; - num80 = num72; - } - else - { - num80 = num72 / num80; - } - num78 *= num80; - num79 *= num80; - int num107 = 30; - if (Main.rand.Next(3) == 0) - { - num107++; - } - if (Main.rand.Next(3) == 0) - { - num107++; - } - for (int num108 = 0; num108 < num107; num108++) - { - vector2 = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f); - vector2.X = (vector2.X + player.Center.X) / 2f + (float)Main.rand.Next(-200, 201); - vector2.Y -= (float)(100 * num108); - num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X; - num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y; - if (num79 < 0f) - { - num79 *= -1f; - } - if (num79 < 20f) - { - num79 = 20f; - } - num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79)); - num80 = num72 / num80; - num78 *= num80; - num79 *= num80; - float speedX4 = num78 + (float)Main.rand.Next(-30, 31) * 0.02f; - float speedY5 = num79 + (float)Main.rand.Next(-30, 31) * 0.02f; - Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, speedY5, type, damage, knockBack, player.whoAmI, 0f, (float)Main.rand.Next(15)); - } - return false; - } -}} \ No newline at end of file +} \ No newline at end of file diff --git a/Items/Weapons/Yharon/TheBurningSky.cs b/Items/Weapons/Yharon/TheBurningSky.cs index 5e8a7caf9d..d38bef2292 100644 --- a/Items/Weapons/Yharon/TheBurningSky.cs +++ b/Items/Weapons/Yharon/TheBurningSky.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Yharon public override void SetDefaults() { item.width = 56; - item.damage = 210; + item.damage = 200; item.melee = true; item.useTime = 5; item.useAnimation = 15; @@ -29,7 +29,6 @@ namespace CalamityMod.Items.Weapons.Yharon item.UseSound = SoundID.Item1; item.autoReuse = true; item.height = 68; - item.maxStack = 1; item.value = 10000000; item.shoot = mod.ProjectileType("BurningMeteor"); item.shootSpeed = 35f; diff --git a/Items/Weapons/Zapper.cs b/Items/Weapons/Zapper.cs index 2cdf37a215..23e0c7c215 100644 --- a/Items/Weapons/Zapper.cs +++ b/Items/Weapons/Zapper.cs @@ -19,13 +19,13 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { - item.damage = 30; + item.damage = 40; item.magic = true; item.mana = 4; item.width = 46; item.height = 22; - item.useTime = 7; - item.useAnimation = 7; + item.useTime = 10; + item.useAnimation = 10; item.useStyle = 5; item.noMelee = true; item.knockBack = 2f; diff --git a/Items/WulfrumAxe.cs b/Items/WulfrumAxe.cs index 984a643cc3..9c877bc1e6 100644 --- a/Items/WulfrumAxe.cs +++ b/Items/WulfrumAxe.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items public override void SetDefaults() { - item.damage = 10; + item.damage = 7; item.melee = true; item.width = 62; item.height = 48; diff --git a/Items/WulfrumHammer.cs b/Items/WulfrumHammer.cs index 34db36e12c..d66b1ed703 100644 --- a/Items/WulfrumHammer.cs +++ b/Items/WulfrumHammer.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items public override void SetDefaults() { - item.damage = 8; + item.damage = 7; item.melee = true; item.width = 56; item.height = 56; diff --git a/Items/WulfrumPickaxe.cs b/Items/WulfrumPickaxe.cs index b15287d221..e8ec36008a 100644 --- a/Items/WulfrumPickaxe.cs +++ b/Items/WulfrumPickaxe.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items public override void SetDefaults() { - item.damage = 8; + item.damage = 5; item.melee = true; item.width = 48; item.height = 48; @@ -27,7 +27,7 @@ namespace CalamityMod.Items item.useTurn = true; item.pick = 35; item.useStyle = 1; - item.knockBack = 2; + item.knockBack = 1f; item.value = 25000; item.rare = 1; item.UseSound = SoundID.Item1; diff --git a/Items/Yharon/YharimsGift.cs b/Items/Yharon/YharimsGift.cs index 06972d9d69..b65990efd3 100644 --- a/Items/Yharon/YharimsGift.cs +++ b/Items/Yharon/YharimsGift.cs @@ -6,6 +6,7 @@ using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items; +using CalamityMod.Items.CalamityCustomThrowingDamage; namespace CalamityMod.Items.Yharon { @@ -26,7 +27,7 @@ namespace CalamityMod.Items.Yharon { item.width = 20; item.height = 22; - item.value = 50000000; + item.value = Item.buyPrice(1, 0, 0, 0); item.accessory = true; item.expert = true; } @@ -34,7 +35,7 @@ namespace CalamityMod.Items.Yharon public override void UpdateAccessory(Player player, bool hideVisual) { player.meleeDamage += 0.15f; - player.thrownDamage += 0.15f; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingDamage += 0.15f; player.rangedDamage += 0.15f; player.magicDamage += 0.15f; player.minionDamage += 0.15f; diff --git a/Items/ZenPotion.cs b/Items/ZenPotion.cs index 814e45307d..14dabf7257 100644 --- a/Items/ZenPotion.cs +++ b/Items/ZenPotion.cs @@ -32,9 +32,10 @@ namespace CalamityMod.Items public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(ItemID.CalmingPotion); - recipe.AddIngredient(ItemID.PinkGel, 3); - recipe.AddIngredient(null, "EbonianGel", 3); + recipe.AddIngredient(null, "EssenceofEleum", 3); + recipe.AddIngredient(null, "EbonianGel", 2); + recipe.AddIngredient(ItemID.PinkGel); + recipe.AddIngredient(ItemID.BottledWater); recipe.AddTile(TileID.AlchemyTable); recipe.SetResult(this); recipe.AddRecipe(); diff --git a/Items/ZergPotion.cs b/Items/ZergPotion.cs index 867bb02704..a366615985 100644 --- a/Items/ZergPotion.cs +++ b/Items/ZergPotion.cs @@ -32,10 +32,11 @@ namespace CalamityMod.Items public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(ItemID.BattlePotion); - recipe.AddIngredient(null, "DemonicBoneAsh"); + recipe.AddIngredient(null, "EssenceofChaos", 3); recipe.AddIngredient(null, "MurkySludge", 2); - recipe.AddTile(TileID.AlchemyTable); + recipe.AddIngredient(null, "DemonicBoneAsh"); + recipe.AddIngredient(ItemID.BottledWater); + recipe.AddTile(TileID.AlchemyTable); recipe.SetResult(this); recipe.AddRecipe(); recipe = new ModRecipe(mod); diff --git a/NPCs/AbyssNPCs/AquaticParasite.cs b/NPCs/AbyssNPCs/AquaticParasite.cs index d5c5be644d..97445ccccf 100644 --- a/NPCs/AbyssNPCs/AquaticParasite.cs +++ b/NPCs/AbyssNPCs/AquaticParasite.cs @@ -219,7 +219,7 @@ namespace CalamityMod.NPCs.AbyssNPCs public override void OnHitPlayer(Player player, int damage, bool crit) { - player.AddBuff(BuffID.Venom, 240, true); + player.AddBuff(BuffID.Venom, 120, true); } public override void HitEffect(int hitDirection, double damage) diff --git a/NPCs/AbyssNPCs/AquaticScourgeHead.cs b/NPCs/AbyssNPCs/AquaticScourgeHead.cs index 863f8c43d9..a901e65e6b 100644 --- a/NPCs/AbyssNPCs/AquaticScourgeHead.cs +++ b/NPCs/AbyssNPCs/AquaticScourgeHead.cs @@ -547,9 +547,10 @@ namespace CalamityMod.NPCs.AbyssNPCs { return 0f; } - if (spawnInfo.player.GetModPlayer(mod).ZoneSulphur && spawnInfo.water && !NPC.AnyNPCs(mod.NPCType("AquaticScourgeHead"))) + if (spawnInfo.player.GetModPlayer(mod).ZoneSulphur && spawnInfo.water) { - return 0.01f; + if (!NPC.AnyNPCs(mod.NPCType("AquaticScourgeHead"))) + return 0.01f; } return 0f; } diff --git a/NPCs/AbyssNPCs/AquaticSeekerHead.cs b/NPCs/AbyssNPCs/AquaticSeekerHead.cs index 53253a5a24..19fcd4ad49 100644 --- a/NPCs/AbyssNPCs/AquaticSeekerHead.cs +++ b/NPCs/AbyssNPCs/AquaticSeekerHead.cs @@ -375,9 +375,10 @@ namespace CalamityMod.NPCs.AbyssNPCs { return 0f; } - if (spawnInfo.player.GetModPlayer(mod).ZoneSulphur && spawnInfo.water && NPC.CountNPCS(mod.NPCType("AquaticSeekerHead")) < 1) + if (spawnInfo.player.GetModPlayer(mod).ZoneSulphur && spawnInfo.water) { - return 0.2f; + if (!NPC.AnyNPCs(mod.NPCType("AquaticSeekerHead"))) + return 0.01f; } return 0f; } @@ -420,8 +421,8 @@ namespace CalamityMod.NPCs.AbyssNPCs public override void OnHitPlayer(Player player, int damage, bool crit) { - player.AddBuff(BuffID.Bleeding, 180, true); - player.AddBuff(BuffID.Venom, 180, true); + player.AddBuff(BuffID.Bleeding, 120, true); + player.AddBuff(BuffID.Venom, 120, true); if (CalamityWorld.revenge) { player.AddBuff(mod.BuffType("MarkedforDeath"), 60); diff --git a/NPCs/AbyssNPCs/AquaticUrchin.cs b/NPCs/AbyssNPCs/AquaticUrchin.cs index 1147fa3129..aac1f9edbd 100644 --- a/NPCs/AbyssNPCs/AquaticUrchin.cs +++ b/NPCs/AbyssNPCs/AquaticUrchin.cs @@ -324,7 +324,7 @@ namespace CalamityMod.NPCs.AbyssNPCs public override void OnHitPlayer(Player player, int damage, bool crit) { - player.AddBuff(BuffID.Venom, 180, true); + player.AddBuff(BuffID.Venom, 120, true); } public override float SpawnChance(NPCSpawnInfo spawnInfo) diff --git a/NPCs/AbyssNPCs/BobbitWormHead.cs b/NPCs/AbyssNPCs/BobbitWormHead.cs index acfc6a9db0..833eb55586 100644 --- a/NPCs/AbyssNPCs/BobbitWormHead.cs +++ b/NPCs/AbyssNPCs/BobbitWormHead.cs @@ -21,11 +21,11 @@ namespace CalamityMod.NPCs.AbyssNPCs public override void SetDefaults() { npc.aiStyle = -1; - npc.damage = 110; + npc.damage = 150; npc.width = 80; //324 npc.height = 40; //216 npc.defense = 50; - npc.lifeMax = 7000; + npc.lifeMax = 10000; npc.knockBackResist = 0f; aiType = -1; npc.noGravity = true; @@ -255,6 +255,10 @@ namespace CalamityMod.NPCs.AbyssNPCs { Dust.NewDust(npc.position, npc.width, npc.height, 5, hitDirection, -1f, 0, default(Color), 1f); } + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/BobbitWorm"), 1f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/BobbitWorm2"), 1f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/BobbitWorm3"), 1f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/BobbitWorm4"), 1f); } } } diff --git a/NPCs/AbyssNPCs/BobbitWormSegment.cs b/NPCs/AbyssNPCs/BobbitWormSegment.cs index 1693f4002a..88a9dc85ca 100644 --- a/NPCs/AbyssNPCs/BobbitWormSegment.cs +++ b/NPCs/AbyssNPCs/BobbitWormSegment.cs @@ -53,9 +53,10 @@ namespace CalamityMod.NPCs.AbyssNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.player.GetModPlayer(mod).ZoneAbyssLayer4 && spawnInfo.water && !NPC.AnyNPCs(mod.NPCType("BobbitWormSegment"))) + if (spawnInfo.player.GetModPlayer(mod).ZoneAbyssLayer4 && spawnInfo.water) { - return 0.1f; + if (!NPC.AnyNPCs(mod.NPCType("BobbitWormSegment"))) + return 0.01f; } return 0f; } diff --git a/NPCs/AbyssNPCs/BoxJellyfish.cs b/NPCs/AbyssNPCs/BoxJellyfish.cs index 758071ee18..a42a9255b2 100644 --- a/NPCs/AbyssNPCs/BoxJellyfish.cs +++ b/NPCs/AbyssNPCs/BoxJellyfish.cs @@ -193,7 +193,7 @@ namespace CalamityMod.NPCs.AbyssNPCs public override void OnHitPlayer(Player player, int damage, bool crit) { - player.AddBuff(BuffID.Venom, 240, true); + player.AddBuff(BuffID.Venom, 120, true); } public override void HitEffect(int hitDirection, double damage) diff --git a/NPCs/AbyssNPCs/ChaoticPuffer.cs b/NPCs/AbyssNPCs/ChaoticPuffer.cs new file mode 100644 index 0000000000..4f60c64007 --- /dev/null +++ b/NPCs/AbyssNPCs/ChaoticPuffer.cs @@ -0,0 +1,242 @@ +using System; +using System.Collections.Generic; +using System.IO; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Projectiles; + +namespace CalamityMod.NPCs.AbyssNPCs +{ + public class ChaoticPuffer : ModNPC + { + public bool puffedUp = false; + public bool puffing = false; + public bool unpuffing = false; + public int puffTimer = 0; + public int puffingTimer = 0; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Chaotic Puffer"); + Main.npcFrameCount[npc.type] = 11; + } + + public override void SetDefaults() + { + npc.noGravity = true; + npc.width = 78; + npc.height = 70; + npc.defense = 25; + npc.lifeMax = 7500; + npc.aiStyle = -1; + aiType = -1; + npc.knockBackResist = 0f; + npc.buffImmune[mod.BuffType("CrushDepth")] = true; + npc.value = Item.buyPrice(0, 0, 50, 0); + npc.HitSound = SoundID.NPCHit23; + npc.DeathSound = SoundID.NPCDeath28; + } + + public override void AI() + { + npc.TargetClosest(true); + npc.velocity.X = npc.velocity.X + (float)npc.direction * 0.03f; + npc.velocity.Y = npc.velocity.Y + (float)npc.directionY * 0.03f; + + npc.damage = puffedUp ? (Main.expertMode ? 230 : 115) : 0; + + + if( !puffing || !unpuffing){ + ++puffTimer; + } + + if(puffTimer >= 300){ + + if( !puffedUp ){ + puffing = true; + } else { + unpuffing = true; + } + + puffTimer = 0; + + }else if( puffing || unpuffing){ + + ++puffingTimer; + + if( puffingTimer > 16 && puffing){ + + puffing = false; + puffedUp = true; + puffingTimer = 0; + + } else if( puffingTimer > 16 && unpuffing){ + + unpuffing = false; + puffedUp = false; + puffingTimer = 0; + + } + + } + + if(npc.velocity.X >= 1 || npc.velocity.X <= -1) { + + npc.velocity.X = npc.velocity.X * 0.97f; + + } + + if(npc.velocity.Y >= 1 || npc.velocity.Y <= -1) { + + npc.velocity.Y = npc.velocity.Y * 0.97f; + + } + + npc.rotation += npc.velocity.X * 0.05f; + + } + + public void Boom() + { + Main.PlaySound(4, (int)npc.position.X, (int)npc.position.Y, 14); + if (Main.netMode != 1 && puffedUp) + { + int damageBoom = 100; + int projectileType = mod.ProjectileType("PufferExplosion"); + int boom = Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0, 0, projectileType, damageBoom, 0f, Main.myPlayer, 0f, 0f); + } + npc.netUpdate = true; + } + + + public override void PostDraw(SpriteBatch spriteBatch, Color drawColor) + { + SpriteEffects spriteEffects = SpriteEffects.None; + if (npc.spriteDirection == 1) + { + spriteEffects = SpriteEffects.FlipHorizontally; + } + Vector2 center = new Vector2(npc.Center.X, npc.Center.Y); + Vector2 vector11 = new Vector2((float)(Main.npcTexture[npc.type].Width / 2), (float)(Main.npcTexture[npc.type].Height / Main.npcFrameCount[npc.type] / 2)); + Vector2 vector = center - Main.screenPosition; + vector -= new Vector2((float)mod.GetTexture("NPCs/AbyssNPCs/ChaoticPufferGlow").Width, (float)(mod.GetTexture("NPCs/AbyssNPCs/ChaoticPufferGlow").Height / Main.npcFrameCount[npc.type])) * 1f / 2f; + vector += vector11 * 1f + new Vector2(0f, 0f + 4f + npc.gfxOffY); + Microsoft.Xna.Framework.Color color = new Microsoft.Xna.Framework.Color(127 - npc.alpha, 127 - npc.alpha, 127 - npc.alpha, 0).MultiplyRGBA(Microsoft.Xna.Framework.Color.Yellow); + Main.spriteBatch.Draw(mod.GetTexture("NPCs/AbyssNPCs/ChaoticPufferGlow"), vector, + new Microsoft.Xna.Framework.Rectangle?(npc.frame), color, npc.rotation, vector11, 1f, spriteEffects, 0f); + } + + public override void FindFrame(int frameHeight) + { + npc.frameCounter += 1.0; + if (npc.frameCounter > 6.0) + { + npc.frameCounter = 0.0; + if(!unpuffing){ + npc.frame.Y = npc.frame.Y + frameHeight; + } else { + npc.frame.Y = npc.frame.Y - frameHeight; + } + } + if( puffing ) + { + if (npc.frame.Y < frameHeight * 3) + { + npc.frame.Y = frameHeight * 3; + } + if (npc.frame.Y > frameHeight * 6) + { + npc.frame.Y = frameHeight * 3; + } + } + else if ( unpuffing ) + { + if (npc.frame.Y > frameHeight * 6) + { + npc.frame.Y = frameHeight * 6; + } + if (npc.frame.Y < frameHeight * 3) + { + npc.frame.Y = frameHeight * 6; + } + } + else if (!puffedUp) + { + if (npc.frame.Y > frameHeight * 3) + { + npc.frame.Y = 0; + } + } + else + { + if (npc.frame.Y < frameHeight * 7) + { + npc.frame.Y = frameHeight * 7; + } + if (npc.frame.Y > frameHeight * 10) + { + npc.frame.Y = frameHeight * 7; + } + } + + } + + public override float SpawnChance(NPCSpawnInfo spawnInfo) + { + if (spawnInfo.player.GetModPlayer(mod).ZoneAbyssLayer4 && spawnInfo.water) + { + return 0.1f; + } + return 0f; + } + + public override void NPCLoot() + { + if (Main.rand.Next(1000) == 0 && CalamityWorld.revenge) + { + Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("HalibutCannon")); + } + if (NPC.downedGolemBoss) + { + Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("ChaoticOre"), Main.rand.Next(10, 27)); + } + } + + public override void OnHitPlayer(Player player, int damage, bool crit) + { + player.AddBuff(mod.BuffType("BrimstoneFlames"), 300); + + if (puffedUp) + { + Boom(); + npc.active = false; + } + } + + public override void ModifyHitByProjectile(Projectile projectile, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) + { + npc.velocity.X = projectile.velocity.X; + npc.velocity.Y = projectile.velocity.Y; + } + + public override void HitEffect(int hitDirection, double damage) + { + for (int k = 0; k < 3; k++) + { + Dust.NewDust(npc.position, npc.width, npc.height, 5, hitDirection, -1f, 0, default(Color), 1f); + } + if (npc.life <= 0) + { + Boom(); + + for (int k = 0; k < 15; k++) + { + Dust.NewDust(npc.position, npc.width, npc.height, 5, hitDirection, -1f, 0, default(Color), 1f); + } + } + } + } +} \ No newline at end of file diff --git a/NPCs/AbyssNPCs/ChaoticPuffer.png b/NPCs/AbyssNPCs/ChaoticPuffer.png new file mode 100644 index 0000000000..5c81d9d9e3 Binary files /dev/null and b/NPCs/AbyssNPCs/ChaoticPuffer.png differ diff --git a/NPCs/AbyssNPCs/ChaoticPufferGlow.png b/NPCs/AbyssNPCs/ChaoticPufferGlow.png new file mode 100644 index 0000000000..8c21d503ba Binary files /dev/null and b/NPCs/AbyssNPCs/ChaoticPufferGlow.png differ diff --git a/NPCs/AbyssNPCs/ColossalSquid.cs b/NPCs/AbyssNPCs/ColossalSquid.cs index 12b2226657..6595aa5262 100644 --- a/NPCs/AbyssNPCs/ColossalSquid.cs +++ b/NPCs/AbyssNPCs/ColossalSquid.cs @@ -24,11 +24,11 @@ namespace CalamityMod.NPCs.AbyssNPCs { npc.npcSlots = 9f; npc.noGravity = true; - npc.damage = 110; + npc.damage = 150; npc.width = 180; npc.height = 180; npc.defense = 50; - npc.lifeMax = 181500; + npc.lifeMax = 220000; npc.aiStyle = -1; aiType = -1; npc.knockBackResist = 0f; @@ -312,9 +312,9 @@ namespace CalamityMod.NPCs.AbyssNPCs { Main.PlaySound(29, (int)npc.position.X, (int)npc.position.Y, 34); } - if (Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height)) + if (npc.ai[3] > 0f && !Collision.SolidCollision(npc.position, npc.width, npc.height)) { - if (npc.ai[3] > 0f && !Collision.SolidCollision(npc.position, npc.width, npc.height)) + if (Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height)) { npc.ai[3] = 0f; npc.ai[1] = 0f; @@ -333,12 +333,10 @@ namespace CalamityMod.NPCs.AbyssNPCs } if (npc.ai[3] == 0f) { - npc.alpha = 0; npc.noTileCollide = false; } else { - npc.alpha = 200; npc.noTileCollide = true; } npc.localAI[3] += 1f; @@ -361,10 +359,10 @@ namespace CalamityMod.NPCs.AbyssNPCs { npc.localAI[0] = 0f; npc.netUpdate = true; - int damage = 65; + int damage = 70; if (Main.expertMode) { - damage = 50; + damage = 55; } Main.PlaySound(2, (int)npc.position.X, (int)npc.position.Y, 111); Projectile.NewProjectile(npc.Center.X, npc.Center.Y + 60, 0f, 2f, mod.ProjectileType("InkBomb"), damage, 0f, Main.myPlayer, 0f, 0f); @@ -565,7 +563,11 @@ namespace CalamityMod.NPCs.AbyssNPCs { Dust.NewDust(npc.position, npc.width, npc.height, 5, hitDirection, -1f, 0, default(Color), 1f); } - } + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/ColossalSquid"), 1f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/ColossalSquid2"), 1f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/ColossalSquid3"), 1f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/ColossalSquid4"), 1f); + } } } } \ No newline at end of file diff --git a/NPCs/AbyssNPCs/Cuttlefish.cs b/NPCs/AbyssNPCs/Cuttlefish.cs index ef9ff0cf10..8c124d57b9 100644 --- a/NPCs/AbyssNPCs/Cuttlefish.cs +++ b/NPCs/AbyssNPCs/Cuttlefish.cs @@ -288,10 +288,10 @@ namespace CalamityMod.NPCs.AbyssNPCs public override void OnHitPlayer(Player player, int damage, bool crit) { - player.AddBuff(BuffID.Darkness, 180, true); + player.AddBuff(BuffID.Darkness, 120, true); if (CalamityWorld.revenge) { - player.AddBuff(mod.BuffType("Horror"), 120, true); + player.AddBuff(mod.BuffType("Horror"), 60, true); } } diff --git a/NPCs/AbyssNPCs/DevilFish.cs b/NPCs/AbyssNPCs/DevilFish.cs new file mode 100644 index 0000000000..5c88c3c64b --- /dev/null +++ b/NPCs/AbyssNPCs/DevilFish.cs @@ -0,0 +1,340 @@ +using System; +using System.Collections.Generic; +using System.IO; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using CalamityMod.Projectiles; + +namespace CalamityMod.NPCs.AbyssNPCs +{ + public class DevilFish : ModNPC + { + public bool hasBeenHit = false; + public bool brokenMask = false; + public int hitCounter = 0; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Devil Fish"); + Main.npcFrameCount[npc.type] = 8; + } + + public override void SetDefaults() + { + npc.noGravity = true; + npc.damage = 60; + npc.width = 126; + npc.height = 66; + npc.defense = 999999; + npc.lifeMax = 200; + npc.aiStyle = -1; + aiType = -1; + npc.buffImmune[mod.BuffType("CrushDepth")] = true; + npc.value = Item.buyPrice(0, 0, 15, 0); + npc.HitSound = SoundID.NPCHit4; + npc.DeathSound = SoundID.NPCDeath1; + npc.knockBackResist = 0.85f; + } + + public override void AI() + { + Player player = Main.player[npc.target]; + float speedBoost = brokenMask ? 1.5f : 1; + npc.spriteDirection = ((npc.direction > 0) ? 1 : -1); + npc.noGravity = true; + if (npc.direction == 0) + { + npc.TargetClosest(true); + } + npc.chaseable = hasBeenHit; + + if(hitCounter >= 5 && !brokenMask) + { + brokenMask = true; + npc.HitSound = SoundID.NPCHit1; + npc.defense = 15; + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/DevilFishMask1"), 1f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/DevilFishMask2"), 1f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/DevilFishMask3"), 1f); + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/DevilMaskBreak"), (int)npc.position.X, (int)npc.position.Y); + } + + if (npc.wet) + { + bool flag14 = brokenMask; + npc.TargetClosest(false); + if (player.statLife <= player.statLifeMax2 / 4) + { + flag14 = true; + } + if ((!player.wet || player.dead) && flag14) + { + flag14 = false; + } + if (!flag14) + { + if (npc.collideX) + { + npc.velocity.X = npc.velocity.X * -1f; + npc.direction *= -1; + npc.netUpdate = true; + } + if (npc.collideY) + { + npc.netUpdate = true; + if (npc.velocity.Y > 0f) + { + npc.velocity.Y = Math.Abs(npc.velocity.Y) * -1f; + npc.directionY = -1; + npc.ai[0] = -1f; + } + else if (npc.velocity.Y < 0f) + { + npc.velocity.Y = Math.Abs(npc.velocity.Y); + npc.directionY = 1; + npc.ai[0] = 1f; + } + } + } + if (flag14) + { + npc.TargetClosest(true); + npc.velocity.X = npc.velocity.X + (float)npc.direction * 0.25f * speedBoost; + npc.velocity.Y = npc.velocity.Y + (float)npc.directionY * 0.15f * speedBoost; + if (npc.velocity.X > 6f * speedBoost) + { + npc.velocity.X = 6f * speedBoost; + } + if (npc.velocity.X < -6f * speedBoost) + { + npc.velocity.X = -6f * speedBoost; + } + if (npc.velocity.Y > 6f * speedBoost) + { + npc.velocity.Y = 6f * speedBoost; + } + if (npc.velocity.Y < -6f * speedBoost) + { + npc.velocity.Y = -6f * speedBoost; + } + } + else + { + npc.velocity.X = npc.velocity.X + (float)npc.direction * 0.1f; + if (npc.velocity.X < -2.5f || npc.velocity.X > 2.5f) + { + npc.velocity.X = npc.velocity.X * 0.95f; + } + if (npc.ai[0] == -1f) + { + npc.velocity.Y = npc.velocity.Y - 0.01f; + if ((double)npc.velocity.Y < -0.3) + { + npc.ai[0] = 1f; + } + } + else + { + npc.velocity.Y = npc.velocity.Y + 0.01f; + if ((double)npc.velocity.Y > 0.3) + { + npc.ai[0] = -1f; + } + } + } + int num258 = (int)(npc.position.X + (float)(npc.width / 2)) / 16; + int num259 = (int)(npc.position.Y + (float)(npc.height / 2)) / 16; + if (Main.tile[num258, num259 - 1] == null) + { + Main.tile[num258, num259 - 1] = new Tile(); + } + if (Main.tile[num258, num259 + 1] == null) + { + Main.tile[num258, num259 + 1] = new Tile(); + } + if (Main.tile[num258, num259 + 2] == null) + { + Main.tile[num258, num259 + 2] = new Tile(); + } + if (Main.tile[num258, num259 - 1].liquid > 128) + { + if (Main.tile[num258, num259 + 1].active()) + { + npc.ai[0] = -1f; + } + else if (Main.tile[num258, num259 + 2].active()) + { + npc.ai[0] = -1f; + } + } + if ((double)npc.velocity.Y > 0.4 || (double)npc.velocity.Y < -0.4) + { + npc.velocity.Y = npc.velocity.Y * 0.95f; + } + } + else + { + if (npc.velocity.Y == 0f) + { + npc.velocity.X = npc.velocity.X * 0.94f; + if ((double)npc.velocity.X > -0.2 && (double)npc.velocity.X < 0.2) + { + npc.velocity.X = 0f; + } + } + npc.velocity.Y = npc.velocity.Y + 0.3f; + if (npc.velocity.Y > 10f) + { + npc.velocity.Y = 10f; + } + npc.ai[0] = 1f; + } + npc.rotation = npc.velocity.Y * (float)npc.direction * 0.1f; + if ((double)npc.rotation < -0.2) + { + npc.rotation = -0.2f; + } + if ((double)npc.rotation > 0.2) + { + npc.rotation = 0.2f; + return; + } + } + + public override bool? CanBeHitByProjectile(Projectile projectile) + { + if (projectile.minion) + { + return hasBeenHit; + } + return null; + } + + public override void FindFrame(int frameHeight) + { + if (!npc.wet) + { + npc.frameCounter = 0.0; + return; + } + npc.frameCounter += 1.0; + if (npc.frameCounter > 6.0) + { + npc.frameCounter = 0.0; + npc.frame.Y = npc.frame.Y + frameHeight; + } + if (!brokenMask) + { + if (npc.frame.Y > frameHeight * 3) + { + npc.frame.Y = 0; + } + } + else + { + if (npc.frame.Y < frameHeight * 4) + { + npc.frame.Y = frameHeight * 4; + } + if (npc.frame.Y > frameHeight * 7) + { + npc.frame.Y = frameHeight * 4; + } + } + } + + public override void PostDraw(SpriteBatch spriteBatch, Color drawColor) + { + SpriteEffects spriteEffects = SpriteEffects.None; + if (npc.spriteDirection == 1) + { + spriteEffects = SpriteEffects.FlipHorizontally; + } + Vector2 center = new Vector2(npc.Center.X, npc.Center.Y); + Vector2 vector11 = new Vector2((float)(Main.npcTexture[npc.type].Width / 2), (float)(Main.npcTexture[npc.type].Height / Main.npcFrameCount[npc.type] / 2)); + Vector2 vector = center - Main.screenPosition; + vector -= new Vector2((float)mod.GetTexture("NPCs/AbyssNPCs/DevilFishGlow").Width, (float)(mod.GetTexture("NPCs/AbyssNPCs/DevilFishGlow").Height / Main.npcFrameCount[npc.type])) * 1f / 2f; + vector += vector11 * 1f + new Vector2(0f, 0f + 4f + npc.gfxOffY); + Microsoft.Xna.Framework.Color color = new Microsoft.Xna.Framework.Color(127 - npc.alpha, 127 - npc.alpha, 127 - npc.alpha, 0).MultiplyRGBA(Microsoft.Xna.Framework.Color.Red); + Main.spriteBatch.Draw(mod.GetTexture("NPCs/AbyssNPCs/DevilFishGlow"), vector, + new Microsoft.Xna.Framework.Rectangle?(npc.frame), color, npc.rotation, vector11, 1f, spriteEffects, 0f); + } + + public override void OnHitPlayer(Player player, int damage, bool crit) + { + player.AddBuff(mod.BuffType("CrushDepth"), 180, true); + if (CalamityWorld.revenge) + { + player.AddBuff(mod.BuffType("MarkedforDeath"), 120); + player.AddBuff(mod.BuffType("Horror"), 120, true); + } + } + + public override float SpawnChance(NPCSpawnInfo spawnInfo) + { + if (spawnInfo.player.GetModPlayer(mod).ZoneAbyssLayer1 && spawnInfo.water) + { + return 0.075f; + } + if (spawnInfo.player.GetModPlayer(mod).ZoneAbyssLayer2 && spawnInfo.water) + { + return 0.1f; + } + return 0f; + } + + public override void NPCLoot() + { + if (Main.rand.Next(1000) == 0 && CalamityWorld.revenge) + { + Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("HalibutCannon")); + } + if (NPC.downedPlantBoss) + { + if (Main.rand.Next(2) == 0) + { + Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("Lumenite"), Main.rand.Next(1, 3)); + } + if (Main.expertMode && Main.rand.Next(2) == 0) + { + Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("Lumenite")); + } + if (Main.rand.Next(2) == 0) + { + Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("DepthCells"), Main.rand.Next(1, 3)); + } + if (Main.expertMode && Main.rand.Next(2) == 0) + { + Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("DepthCells")); + } + } + if (NPC.downedGolemBoss) + { + Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("ChaoticOre"), Main.rand.Next(3, 10)); + } + } + + public override void HitEffect(int hitDirection, double damage) + { + for (int k = 0; k < 5; k++) + { + Dust.NewDust(npc.position, npc.width, npc.height, 5, hitDirection, -1f, 0, default(Color), 1f); + } + if (npc.life <= 0) + { + for (int k = 0; k < 25; k++) + { + Dust.NewDust(npc.position, npc.width, npc.height, 5, hitDirection, -1f, 0, default(Color), 1f); + } + } + + if(hitCounter <= 5) + { + ++hitCounter; + } + } + } +} \ No newline at end of file diff --git a/NPCs/AbyssNPCs/DevilFish.png b/NPCs/AbyssNPCs/DevilFish.png new file mode 100644 index 0000000000..cf7e7e2349 Binary files /dev/null and b/NPCs/AbyssNPCs/DevilFish.png differ diff --git a/NPCs/AbyssNPCs/DevilFishGlow.png b/NPCs/AbyssNPCs/DevilFishGlow.png new file mode 100644 index 0000000000..578db358d9 Binary files /dev/null and b/NPCs/AbyssNPCs/DevilFishGlow.png differ diff --git a/NPCs/AbyssNPCs/EidolonWyrmBody.cs b/NPCs/AbyssNPCs/EidolonWyrmBody.cs index 7f99567cea..558d7225c8 100644 --- a/NPCs/AbyssNPCs/EidolonWyrmBody.cs +++ b/NPCs/AbyssNPCs/EidolonWyrmBody.cs @@ -23,8 +23,8 @@ namespace CalamityMod.NPCs.AbyssNPCs public override void SetDefaults() { npc.damage = 0; //70 - npc.width = 32; //36 - npc.height = 32; + npc.width = 48; //36 + npc.height = 58; npc.defense = 0; npc.lifeMax = 200000; npc.aiStyle = -1; //new @@ -267,6 +267,23 @@ namespace CalamityMod.NPCs.AbyssNPCs } } + public override void PostDraw(SpriteBatch spriteBatch, Color drawColor) + { + SpriteEffects spriteEffects = SpriteEffects.None; + if (npc.spriteDirection == 1) + { + spriteEffects = SpriteEffects.FlipHorizontally; + } + Vector2 center = new Vector2(npc.Center.X, npc.Center.Y); + Vector2 vector11 = new Vector2((float)(Main.npcTexture[npc.type].Width / 2), (float)(Main.npcTexture[npc.type].Height / Main.npcFrameCount[npc.type] / 2)); + Vector2 vector = center - Main.screenPosition; + vector -= new Vector2((float)mod.GetTexture("NPCs/AbyssNPCs/EidolonWyrmBodyGlow").Width, (float)(mod.GetTexture("NPCs/AbyssNPCs/EidolonWyrmBodyGlow").Height / Main.npcFrameCount[npc.type])) * 1f / 2f; + vector += vector11 * 1f + new Vector2(0f, 0f + 4f + npc.gfxOffY); + Microsoft.Xna.Framework.Color color = new Microsoft.Xna.Framework.Color(127 - npc.alpha, 127 - npc.alpha, 127 - npc.alpha, 0).MultiplyRGBA(Microsoft.Xna.Framework.Color.LightYellow); + Main.spriteBatch.Draw(mod.GetTexture("NPCs/AbyssNPCs/EidolonWyrmBodyGlow"), vector, + new Microsoft.Xna.Framework.Rectangle?(npc.frame), color, npc.rotation, vector11, 1f, spriteEffects, 0f); + } + public override bool CheckActive() { return false; @@ -289,6 +306,7 @@ namespace CalamityMod.NPCs.AbyssNPCs { Dust.NewDust(npc.position, npc.width, npc.height, 4, hitDirection, -1f, 0, default(Color), 1f); } + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Wyrm2"), 1f); } } diff --git a/NPCs/AbyssNPCs/EidolonWyrmBody.png b/NPCs/AbyssNPCs/EidolonWyrmBody.png index cbf4889e6b..3a0a932ce7 100644 Binary files a/NPCs/AbyssNPCs/EidolonWyrmBody.png and b/NPCs/AbyssNPCs/EidolonWyrmBody.png differ diff --git a/NPCs/AbyssNPCs/EidolonWyrmBodyAlt.cs b/NPCs/AbyssNPCs/EidolonWyrmBodyAlt.cs index 5a3791f597..2cdcdcad7f 100644 --- a/NPCs/AbyssNPCs/EidolonWyrmBodyAlt.cs +++ b/NPCs/AbyssNPCs/EidolonWyrmBodyAlt.cs @@ -23,8 +23,8 @@ namespace CalamityMod.NPCs.AbyssNPCs public override void SetDefaults() { npc.damage = 0; //70 - npc.width = 32; //36 - npc.height = 32; + npc.width = 48; //36 + npc.height = 58; npc.defense = 0; npc.lifeMax = 200000; npc.aiStyle = -1; //new @@ -267,6 +267,23 @@ namespace CalamityMod.NPCs.AbyssNPCs } } + public override void PostDraw(SpriteBatch spriteBatch, Color drawColor) + { + SpriteEffects spriteEffects = SpriteEffects.None; + if (npc.spriteDirection == 1) + { + spriteEffects = SpriteEffects.FlipHorizontally; + } + Vector2 center = new Vector2(npc.Center.X, npc.Center.Y); + Vector2 vector11 = new Vector2((float)(Main.npcTexture[npc.type].Width / 2), (float)(Main.npcTexture[npc.type].Height / Main.npcFrameCount[npc.type] / 2)); + Vector2 vector = center - Main.screenPosition; + vector -= new Vector2((float)mod.GetTexture("NPCs/AbyssNPCs/EidolonWyrmBodyAltGlow").Width, (float)(mod.GetTexture("NPCs/AbyssNPCs/EidolonWyrmBodyAltGlow").Height / Main.npcFrameCount[npc.type])) * 1f / 2f; + vector += vector11 * 1f + new Vector2(0f, 0f + 4f + npc.gfxOffY); + Microsoft.Xna.Framework.Color color = new Microsoft.Xna.Framework.Color(127 - npc.alpha, 127 - npc.alpha, 127 - npc.alpha, 0).MultiplyRGBA(Microsoft.Xna.Framework.Color.LightYellow); + Main.spriteBatch.Draw(mod.GetTexture("NPCs/AbyssNPCs/EidolonWyrmBodyAltGlow"), vector, + new Microsoft.Xna.Framework.Rectangle?(npc.frame), color, npc.rotation, vector11, 1f, spriteEffects, 0f); + } + public override bool CheckActive() { return false; @@ -289,6 +306,7 @@ namespace CalamityMod.NPCs.AbyssNPCs { Dust.NewDust(npc.position, npc.width, npc.height, 4, hitDirection, -1f, 0, default(Color), 1f); } + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Wyrm3"), 1f); } } diff --git a/NPCs/AbyssNPCs/EidolonWyrmBodyAlt.png b/NPCs/AbyssNPCs/EidolonWyrmBodyAlt.png index cf218144b8..9325d113d7 100644 Binary files a/NPCs/AbyssNPCs/EidolonWyrmBodyAlt.png and b/NPCs/AbyssNPCs/EidolonWyrmBodyAlt.png differ diff --git a/NPCs/AbyssNPCs/EidolonWyrmBodyAltGlow.png b/NPCs/AbyssNPCs/EidolonWyrmBodyAltGlow.png new file mode 100644 index 0000000000..b144a521d3 Binary files /dev/null and b/NPCs/AbyssNPCs/EidolonWyrmBodyAltGlow.png differ diff --git a/NPCs/AbyssNPCs/EidolonWyrmBodyAltGlowHuge.png b/NPCs/AbyssNPCs/EidolonWyrmBodyAltGlowHuge.png index 823fdf06dc..d53ea77ae9 100644 Binary files a/NPCs/AbyssNPCs/EidolonWyrmBodyAltGlowHuge.png and b/NPCs/AbyssNPCs/EidolonWyrmBodyAltGlowHuge.png differ diff --git a/NPCs/AbyssNPCs/EidolonWyrmBodyAltHuge.cs b/NPCs/AbyssNPCs/EidolonWyrmBodyAltHuge.cs index 6c4cedcdb3..7305579de9 100644 --- a/NPCs/AbyssNPCs/EidolonWyrmBodyAltHuge.cs +++ b/NPCs/AbyssNPCs/EidolonWyrmBodyAltHuge.cs @@ -23,8 +23,8 @@ namespace CalamityMod.NPCs.AbyssNPCs public override void SetDefaults() { npc.damage = 0; //70 - npc.width = 64; //36 - npc.height = 64; + npc.width = 60; //36 + npc.height = 88; npc.defense = 0; npc.lifeMax = 1000000; npc.aiStyle = -1; //new @@ -306,6 +306,7 @@ namespace CalamityMod.NPCs.AbyssNPCs { Dust.NewDust(npc.position, npc.width, npc.height, 4, hitDirection, -1f, 0, default(Color), 1f); } + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/WyrmAdult3"), 1f); } } diff --git a/NPCs/AbyssNPCs/EidolonWyrmBodyAltHuge.png b/NPCs/AbyssNPCs/EidolonWyrmBodyAltHuge.png index 526d8d1b5e..f65aeb43ac 100644 Binary files a/NPCs/AbyssNPCs/EidolonWyrmBodyAltHuge.png and b/NPCs/AbyssNPCs/EidolonWyrmBodyAltHuge.png differ diff --git a/NPCs/AbyssNPCs/EidolonWyrmBodyGlow.png b/NPCs/AbyssNPCs/EidolonWyrmBodyGlow.png new file mode 100644 index 0000000000..8c673dec66 Binary files /dev/null and b/NPCs/AbyssNPCs/EidolonWyrmBodyGlow.png differ diff --git a/NPCs/AbyssNPCs/EidolonWyrmBodyGlowHuge.png b/NPCs/AbyssNPCs/EidolonWyrmBodyGlowHuge.png index e6d02b2695..941007fbbd 100644 Binary files a/NPCs/AbyssNPCs/EidolonWyrmBodyGlowHuge.png and b/NPCs/AbyssNPCs/EidolonWyrmBodyGlowHuge.png differ diff --git a/NPCs/AbyssNPCs/EidolonWyrmBodyHuge.cs b/NPCs/AbyssNPCs/EidolonWyrmBodyHuge.cs index 35715d26fa..e17b4048a3 100644 --- a/NPCs/AbyssNPCs/EidolonWyrmBodyHuge.cs +++ b/NPCs/AbyssNPCs/EidolonWyrmBodyHuge.cs @@ -23,8 +23,8 @@ namespace CalamityMod.NPCs.AbyssNPCs public override void SetDefaults() { npc.damage = 0; //70 - npc.width = 64; //36 - npc.height = 64; + npc.width = 60; //36 + npc.height = 88; npc.defense = 0; npc.lifeMax = 1000000; npc.aiStyle = -1; //new @@ -306,6 +306,7 @@ namespace CalamityMod.NPCs.AbyssNPCs { Dust.NewDust(npc.position, npc.width, npc.height, 4, hitDirection, -1f, 0, default(Color), 1f); } + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/WyrmAdult2"), 1f); } } diff --git a/NPCs/AbyssNPCs/EidolonWyrmBodyHuge.png b/NPCs/AbyssNPCs/EidolonWyrmBodyHuge.png index 12535f0096..5c613e3319 100644 Binary files a/NPCs/AbyssNPCs/EidolonWyrmBodyHuge.png and b/NPCs/AbyssNPCs/EidolonWyrmBodyHuge.png differ diff --git a/NPCs/AbyssNPCs/EidolonWyrmHead.cs b/NPCs/AbyssNPCs/EidolonWyrmHead.cs index 9d44f63da9..635f7da181 100644 --- a/NPCs/AbyssNPCs/EidolonWyrmHead.cs +++ b/NPCs/AbyssNPCs/EidolonWyrmHead.cs @@ -31,11 +31,11 @@ namespace CalamityMod.NPCs.AbyssNPCs public override void SetDefaults() { npc.npcSlots = 8f; - npc.damage = 0; + npc.damage = 170; npc.width = 126; //36 - npc.height = 56; //20 + npc.height = 76; //20 npc.defense = 300; - npc.lifeMax = 200000; + npc.lifeMax = 160000; npc.aiStyle = -1; aiType = -1; for (int k = 0; k < npc.buffImmune.Length; k++) @@ -58,7 +58,11 @@ namespace CalamityMod.NPCs.AbyssNPCs if (npc.justHit || (double)npc.life <= (double)npc.lifeMax * 0.98 || Main.player[npc.target].chaosState) { detectsPlayer = true; - npc.damage = Main.expertMode ? 260 : 130; + npc.damage = Main.expertMode ? 340 : 170; + } + else + { + npc.damage = 0; } npc.chaseable = detectsPlayer; if (detectsPlayer) @@ -125,7 +129,11 @@ namespace CalamityMod.NPCs.AbyssNPCs npc.localAI[0] = 0f; npc.TargetClosest(true); npc.netUpdate = true; - int damage = 60; + int damage = 80; + if (Main.expertMode) + { + damage = 60; + } float xPos = (Main.rand.Next(2) == 0 ? npc.position.X + 200f : npc.position.X - 200f); Vector2 vector2 = new Vector2(xPos, npc.position.Y + Main.rand.Next(-200, 201)); int random = Main.rand.Next(3); @@ -185,20 +193,6 @@ namespace CalamityMod.NPCs.AbyssNPCs } } } - /*Vector2 value = npc.Center + (npc.rotation - 1.57079637f).ToRotationVector2() * 8f; //8 - Vector2 value2 = npc.rotation.ToRotationVector2() * 60f; //16 - Dust expr_1AAB = Main.dust[Dust.NewDust(value + value2, 0, 0, 20, npc.velocity.X, npc.velocity.Y, 100, Color.Transparent, 1f + Main.rand.NextFloat() * 3f)]; - expr_1AAB.noGravity = true; - expr_1AAB.noLight = true; - expr_1AAB.position -= new Vector2(4f); - expr_1AAB.fadeIn = 1f; - expr_1AAB.velocity = Vector2.Zero; - Dust expr_1B33 = Main.dust[Dust.NewDust(value - value2, 0, 0, 20, npc.velocity.X, npc.velocity.Y, 100, Color.Transparent, 1f + Main.rand.NextFloat() * 3f)]; - expr_1B33.noGravity = true; - expr_1B33.noLight = true; - expr_1B33.position -= new Vector2(4f); - expr_1B33.fadeIn = 1f; - expr_1B33.velocity = Vector2.Zero;*/ int num180 = (int)(npc.position.X / 16f) - 1; int num181 = (int)((npc.position.X + (float)npc.width) / 16f) + 2; int num182 = (int)(npc.position.Y / 16f) - 1; @@ -237,7 +231,7 @@ namespace CalamityMod.NPCs.AbyssNPCs { npc.alpha = 0; } - if (Vector2.Distance(Main.player[npc.target].Center, npc.Center) > 5600f || !NPC.AnyNPCs(mod.NPCType("EidolonWyrmTail"))) + if (Vector2.Distance(Main.player[npc.target].Center, npc.Center) > 6400f || !NPC.AnyNPCs(mod.NPCType("EidolonWyrmTail"))) { npc.active = false; } @@ -570,7 +564,8 @@ namespace CalamityMod.NPCs.AbyssNPCs { Dust.NewDust(npc.position, npc.width, npc.height, 4, hitDirection, -1f, 0, default(Color), 1f); } - } + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Wyrm"), 1f); + } } public override bool CheckActive() @@ -601,8 +596,11 @@ namespace CalamityMod.NPCs.AbyssNPCs public override void OnHitPlayer(Player player, int damage, bool crit) { player.AddBuff(mod.BuffType("CrushDepth"), 1200, true); - player.AddBuff(mod.BuffType("Horror"), 600, true); - player.AddBuff(mod.BuffType("MarkedforDeath"), 600); + if (CalamityWorld.revenge) + { + player.AddBuff(mod.BuffType("Horror"), 600, true); + player.AddBuff(mod.BuffType("MarkedforDeath"), 600); + } } } } \ No newline at end of file diff --git a/NPCs/AbyssNPCs/EidolonWyrmHead.png b/NPCs/AbyssNPCs/EidolonWyrmHead.png index 83650110c5..fb738444a4 100644 Binary files a/NPCs/AbyssNPCs/EidolonWyrmHead.png and b/NPCs/AbyssNPCs/EidolonWyrmHead.png differ diff --git a/NPCs/AbyssNPCs/EidolonWyrmHeadGlow.png b/NPCs/AbyssNPCs/EidolonWyrmHeadGlow.png index bdd0d41b39..d569451843 100644 Binary files a/NPCs/AbyssNPCs/EidolonWyrmHeadGlow.png and b/NPCs/AbyssNPCs/EidolonWyrmHeadGlow.png differ diff --git a/NPCs/AbyssNPCs/EidolonWyrmHeadGlowHuge.png b/NPCs/AbyssNPCs/EidolonWyrmHeadGlowHuge.png index dec1bd0465..98d36bb3fd 100644 Binary files a/NPCs/AbyssNPCs/EidolonWyrmHeadGlowHuge.png and b/NPCs/AbyssNPCs/EidolonWyrmHeadGlowHuge.png differ diff --git a/NPCs/AbyssNPCs/EidolonWyrmHeadHuge.cs b/NPCs/AbyssNPCs/EidolonWyrmHeadHuge.cs index a2457f9441..cd09788f31 100644 --- a/NPCs/AbyssNPCs/EidolonWyrmHeadHuge.cs +++ b/NPCs/AbyssNPCs/EidolonWyrmHeadHuge.cs @@ -31,9 +31,9 @@ namespace CalamityMod.NPCs.AbyssNPCs public override void SetDefaults() { npc.npcSlots = 24f; - npc.damage = 0; - npc.width = 252; //36 - npc.height = 112; //20 + npc.damage = 1500; + npc.width = 254; //36 + npc.height = 138; //20 npc.defense = 3000; npc.lifeMax = 1000000; npc.aiStyle = -1; @@ -57,7 +57,11 @@ namespace CalamityMod.NPCs.AbyssNPCs if (npc.justHit || (double)npc.life <= (double)npc.lifeMax * 0.98 || Main.player[npc.target].chaosState) { detectsPlayer = true; - npc.damage = Main.expertMode ? 1500 : 1100; + npc.damage = 1500; + } + else + { + npc.damage = 0; } npc.chaseable = detectsPlayer; if (detectsPlayer) @@ -186,20 +190,6 @@ namespace CalamityMod.NPCs.AbyssNPCs } } } - /*Vector2 value = npc.Center + (npc.rotation - 1.57079637f).ToRotationVector2() * 8f; //8 - Vector2 value2 = npc.rotation.ToRotationVector2() * 120f; //16 - Dust expr_1AAB = Main.dust[Dust.NewDust(value + value2, 0, 0, 20, npc.velocity.X, npc.velocity.Y, 100, Color.Transparent, 2f + Main.rand.NextFloat() * 3f)]; - expr_1AAB.noGravity = true; - expr_1AAB.noLight = true; - expr_1AAB.position -= new Vector2(4f); - expr_1AAB.fadeIn = 1f; - expr_1AAB.velocity = Vector2.Zero; - Dust expr_1B33 = Main.dust[Dust.NewDust(value - value2, 0, 0, 20, npc.velocity.X, npc.velocity.Y, 100, Color.Transparent, 2f + Main.rand.NextFloat() * 3f)]; - expr_1B33.noGravity = true; - expr_1B33.noLight = true; - expr_1B33.position -= new Vector2(4f); - expr_1B33.fadeIn = 1f; - expr_1B33.velocity = Vector2.Zero;*/ int num180 = (int)(npc.position.X / 16f) - 1; int num181 = (int)((npc.position.X + (float)npc.width) / 16f) + 2; int num182 = (int)(npc.position.Y / 16f) - 1; @@ -238,7 +228,7 @@ namespace CalamityMod.NPCs.AbyssNPCs { npc.alpha = 0; } - if (Vector2.Distance(Main.player[npc.target].Center, npc.Center) > 4200f || !NPC.AnyNPCs(mod.NPCType("EidolonWyrmTailHuge"))) + if (Vector2.Distance(Main.player[npc.target].Center, npc.Center) > 6400f || !NPC.AnyNPCs(mod.NPCType("EidolonWyrmTailHuge"))) { for (int num957 = 0; num957 < 200; num957++) { @@ -565,7 +555,8 @@ namespace CalamityMod.NPCs.AbyssNPCs { Dust.NewDust(npc.position, npc.width, npc.height, 4, hitDirection, -1f, 0, default(Color), 1f); } - } + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/WyrmAdult"), 1f); + } } public override bool CheckActive() @@ -596,8 +587,11 @@ namespace CalamityMod.NPCs.AbyssNPCs public override void OnHitPlayer(Player player, int damage, bool crit) { player.AddBuff(mod.BuffType("CrushDepth"), 1200, true); - player.AddBuff(mod.BuffType("Horror"), 1200, true); - player.AddBuff(mod.BuffType("MarkedforDeath"), 1200); + if (CalamityWorld.revenge) + { + player.AddBuff(mod.BuffType("Horror"), 1200, true); + player.AddBuff(mod.BuffType("MarkedforDeath"), 1200); + } } } } \ No newline at end of file diff --git a/NPCs/AbyssNPCs/EidolonWyrmHeadHuge.png b/NPCs/AbyssNPCs/EidolonWyrmHeadHuge.png index 3f6f3005fe..e4d8c3a596 100644 Binary files a/NPCs/AbyssNPCs/EidolonWyrmHeadHuge.png and b/NPCs/AbyssNPCs/EidolonWyrmHeadHuge.png differ diff --git a/NPCs/AbyssNPCs/EidolonWyrmTail.cs b/NPCs/AbyssNPCs/EidolonWyrmTail.cs index 6fd1097423..9ae4f4c08f 100644 --- a/NPCs/AbyssNPCs/EidolonWyrmTail.cs +++ b/NPCs/AbyssNPCs/EidolonWyrmTail.cs @@ -23,8 +23,8 @@ namespace CalamityMod.NPCs.AbyssNPCs public override void SetDefaults() { npc.damage = 0; //70 - npc.width = 38; //28 - npc.height = 40; //28 + npc.width = 46; //28 + npc.height = 66; //28 npc.defense = 0; npc.lifeMax = 200000; npc.aiStyle = -1; //new @@ -267,6 +267,23 @@ namespace CalamityMod.NPCs.AbyssNPCs } } + public override void PostDraw(SpriteBatch spriteBatch, Color drawColor) + { + SpriteEffects spriteEffects = SpriteEffects.None; + if (npc.spriteDirection == 1) + { + spriteEffects = SpriteEffects.FlipHorizontally; + } + Vector2 center = new Vector2(npc.Center.X, npc.Center.Y); + Vector2 vector11 = new Vector2((float)(Main.npcTexture[npc.type].Width / 2), (float)(Main.npcTexture[npc.type].Height / Main.npcFrameCount[npc.type] / 2)); + Vector2 vector = center - Main.screenPosition; + vector -= new Vector2((float)mod.GetTexture("NPCs/AbyssNPCs/EidolonWyrmTailGlow").Width, (float)(mod.GetTexture("NPCs/AbyssNPCs/EidolonWyrmTailGlow").Height / Main.npcFrameCount[npc.type])) * 1f / 2f; + vector += vector11 * 1f + new Vector2(0f, 0f + 4f + npc.gfxOffY); + Microsoft.Xna.Framework.Color color = new Microsoft.Xna.Framework.Color(127 - npc.alpha, 127 - npc.alpha, 127 - npc.alpha, 0).MultiplyRGBA(Microsoft.Xna.Framework.Color.LightYellow); + Main.spriteBatch.Draw(mod.GetTexture("NPCs/AbyssNPCs/EidolonWyrmTailGlow"), vector, + new Microsoft.Xna.Framework.Rectangle?(npc.frame), color, npc.rotation, vector11, 1f, spriteEffects, 0f); + } + public override bool CheckActive() { return false; @@ -289,6 +306,7 @@ namespace CalamityMod.NPCs.AbyssNPCs { Dust.NewDust(npc.position, npc.width, npc.height, 4, hitDirection, -1f, 0, default(Color), 1f); } + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Wyrm4"), 1f); } } diff --git a/NPCs/AbyssNPCs/EidolonWyrmTail.png b/NPCs/AbyssNPCs/EidolonWyrmTail.png index 04f8f26638..b5bd9cb8c7 100644 Binary files a/NPCs/AbyssNPCs/EidolonWyrmTail.png and b/NPCs/AbyssNPCs/EidolonWyrmTail.png differ diff --git a/NPCs/AbyssNPCs/EidolonWyrmTailGlow.png b/NPCs/AbyssNPCs/EidolonWyrmTailGlow.png new file mode 100644 index 0000000000..a2eeec63d5 Binary files /dev/null and b/NPCs/AbyssNPCs/EidolonWyrmTailGlow.png differ diff --git a/NPCs/AbyssNPCs/EidolonWyrmTailGlowHuge.png b/NPCs/AbyssNPCs/EidolonWyrmTailGlowHuge.png index 7de2777e6d..15d11a8d7e 100644 Binary files a/NPCs/AbyssNPCs/EidolonWyrmTailGlowHuge.png and b/NPCs/AbyssNPCs/EidolonWyrmTailGlowHuge.png differ diff --git a/NPCs/AbyssNPCs/EidolonWyrmTailHuge.cs b/NPCs/AbyssNPCs/EidolonWyrmTailHuge.cs index a6aaeecd78..436b320236 100644 --- a/NPCs/AbyssNPCs/EidolonWyrmTailHuge.cs +++ b/NPCs/AbyssNPCs/EidolonWyrmTailHuge.cs @@ -23,8 +23,8 @@ namespace CalamityMod.NPCs.AbyssNPCs public override void SetDefaults() { npc.damage = 0; //70 - npc.width = 76; //28 - npc.height = 80; //28 + npc.width = 86; //28 + npc.height = 120; //28 npc.defense = 0; npc.lifeMax = 1000000; npc.aiStyle = -1; //new @@ -306,6 +306,7 @@ namespace CalamityMod.NPCs.AbyssNPCs { Dust.NewDust(npc.position, npc.width, npc.height, 4, hitDirection, -1f, 0, default(Color), 1f); } + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/WyrmAdult4"), 1f); } } diff --git a/NPCs/AbyssNPCs/EidolonWyrmTailHuge.png b/NPCs/AbyssNPCs/EidolonWyrmTailHuge.png index a13e9eebb0..4e63dd0139 100644 Binary files a/NPCs/AbyssNPCs/EidolonWyrmTailHuge.png and b/NPCs/AbyssNPCs/EidolonWyrmTailHuge.png differ diff --git a/NPCs/AbyssNPCs/Flounder.cs b/NPCs/AbyssNPCs/Flounder.cs index ab66ffe995..aab41ad6a5 100644 --- a/NPCs/AbyssNPCs/Flounder.cs +++ b/NPCs/AbyssNPCs/Flounder.cs @@ -249,7 +249,7 @@ namespace CalamityMod.NPCs.AbyssNPCs public override void OnHitPlayer(Player player, int damage, bool crit) { - player.AddBuff(BuffID.Venom, 60, true); + player.AddBuff(BuffID.Venom, 120, true); } public override void FindFrame(int frameHeight) diff --git a/NPCs/AbyssNPCs/GiantSquid.cs b/NPCs/AbyssNPCs/GiantSquid.cs index da657f77a9..7f683b55de 100644 --- a/NPCs/AbyssNPCs/GiantSquid.cs +++ b/NPCs/AbyssNPCs/GiantSquid.cs @@ -23,11 +23,11 @@ namespace CalamityMod.NPCs.AbyssNPCs public override void SetDefaults() { npc.noGravity = true; - npc.damage = 50; + npc.damage = 80; npc.width = 50; npc.height = 220; npc.defense = 25; - npc.lifeMax = 200; + npc.lifeMax = 400; npc.aiStyle = -1; aiType = -1; npc.buffImmune[mod.BuffType("CrushDepth")] = true; @@ -222,8 +222,8 @@ namespace CalamityMod.NPCs.AbyssNPCs public override void OnHitPlayer(Player player, int damage, bool crit) { - player.AddBuff(mod.BuffType("CrushDepth"), 300, true); - player.AddBuff(BuffID.Darkness, 300, true); + player.AddBuff(mod.BuffType("CrushDepth"), 180, true); + player.AddBuff(BuffID.Darkness, 180, true); if (CalamityWorld.revenge) { player.AddBuff(mod.BuffType("MarkedforDeath"), 120); @@ -270,7 +270,11 @@ namespace CalamityMod.NPCs.AbyssNPCs { Dust.NewDust(npc.position, npc.width, npc.height, 5, hitDirection, -1f, 0, default(Color), 1f); } - } + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/GiantSquid"), 1f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/GiantSquid2"), 1f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/GiantSquid3"), 1f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/GiantSquid4"), 1f); + } } } } \ No newline at end of file diff --git a/NPCs/AbyssNPCs/Gnasher.cs b/NPCs/AbyssNPCs/Gnasher.cs index fb9668a820..83349d6523 100644 --- a/NPCs/AbyssNPCs/Gnasher.cs +++ b/NPCs/AbyssNPCs/Gnasher.cs @@ -91,8 +91,8 @@ namespace CalamityMod.NPCs.AbyssNPCs public override void OnHitPlayer(Player player, int damage, bool crit) { - player.AddBuff(BuffID.Bleeding, 180, true); - player.AddBuff(BuffID.Venom, 180, true); + player.AddBuff(BuffID.Bleeding, 120, true); + player.AddBuff(BuffID.Venom, 120, true); } public override float SpawnChance(NPCSpawnInfo spawnInfo) @@ -128,7 +128,9 @@ namespace CalamityMod.NPCs.AbyssNPCs { Dust.NewDust(npc.position, npc.width, npc.height, 5, hitDirection, -1f, 0, default(Color), 1f); } - } + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Gnasher"), 1f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Gnasher2"), 1f); + } } } } \ No newline at end of file diff --git a/NPCs/AbyssNPCs/GulperEelBody.cs b/NPCs/AbyssNPCs/GulperEelBody.cs index 3b58c3883d..3552cb6c4e 100644 --- a/NPCs/AbyssNPCs/GulperEelBody.cs +++ b/NPCs/AbyssNPCs/GulperEelBody.cs @@ -22,11 +22,11 @@ namespace CalamityMod.NPCs.AbyssNPCs public override void SetDefaults() { - npc.damage = 70; //70 + npc.damage = 90; //70 npc.width = 56; //36 npc.height = 36; npc.defense = 80; - npc.lifeMax = 35000; + npc.lifeMax = 80000; npc.aiStyle = -1; //new aiType = -1; //new npc.knockBackResist = 0f; @@ -305,6 +305,8 @@ namespace CalamityMod.NPCs.AbyssNPCs { Dust.NewDust(npc.position, npc.width, npc.height, 5, hitDirection, -1f, 0, default(Color), 1f); } + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/GulperEel2"), 1f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/GulperEel3"), 1f); } } diff --git a/NPCs/AbyssNPCs/GulperEelBodyAlt.cs b/NPCs/AbyssNPCs/GulperEelBodyAlt.cs index 0e79a861dc..3fa8950e61 100644 --- a/NPCs/AbyssNPCs/GulperEelBodyAlt.cs +++ b/NPCs/AbyssNPCs/GulperEelBodyAlt.cs @@ -22,11 +22,11 @@ namespace CalamityMod.NPCs.AbyssNPCs public override void SetDefaults() { - npc.damage = 70; //70 + npc.damage = 90; //70 npc.width = 36; //36 npc.height = 36; npc.defense = 80; - npc.lifeMax = 35000; + npc.lifeMax = 80000; npc.aiStyle = -1; //new aiType = -1; //new npc.knockBackResist = 0f; @@ -305,6 +305,8 @@ namespace CalamityMod.NPCs.AbyssNPCs { Dust.NewDust(npc.position, npc.width, npc.height, 5, hitDirection, -1f, 0, default(Color), 1f); } + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/GulperEel2"), 1f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/GulperEel3"), 1f); } } diff --git a/NPCs/AbyssNPCs/GulperEelHead.cs b/NPCs/AbyssNPCs/GulperEelHead.cs index 9289af9866..b534906008 100644 --- a/NPCs/AbyssNPCs/GulperEelHead.cs +++ b/NPCs/AbyssNPCs/GulperEelHead.cs @@ -30,11 +30,11 @@ namespace CalamityMod.NPCs.AbyssNPCs public override void SetDefaults() { - npc.damage = 120; + npc.damage = 135; npc.width = 66; //36 npc.height = 86; //20 npc.defense = 50; - npc.lifeMax = 35000; + npc.lifeMax = 80000; npc.aiStyle = -1; aiType = -1; for (int k = 0; k < npc.buffImmune.Length; k++) @@ -458,7 +458,8 @@ namespace CalamityMod.NPCs.AbyssNPCs { Dust.NewDust(npc.position, npc.width, npc.height, 5, hitDirection, -1f, 0, default(Color), 1f); } - } + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/GulperEel"), 1f); + } } public override bool CheckActive() @@ -488,8 +489,8 @@ namespace CalamityMod.NPCs.AbyssNPCs player.AddBuff(mod.BuffType("CrushDepth"), 300, true); if (CalamityWorld.revenge) { - player.AddBuff(mod.BuffType("MarkedforDeath"), 300); - player.AddBuff(mod.BuffType("Horror"), 300, true); + player.AddBuff(mod.BuffType("MarkedforDeath"), 180); + player.AddBuff(mod.BuffType("Horror"), 180, true); } } } diff --git a/NPCs/AbyssNPCs/GulperEelTail.cs b/NPCs/AbyssNPCs/GulperEelTail.cs index 69e08e8507..fb6f37256e 100644 --- a/NPCs/AbyssNPCs/GulperEelTail.cs +++ b/NPCs/AbyssNPCs/GulperEelTail.cs @@ -22,11 +22,11 @@ namespace CalamityMod.NPCs.AbyssNPCs public override void SetDefaults() { - npc.damage = 50; //70 + npc.damage = 65; //70 npc.width = 54; //28 npc.height = 76; //28 npc.defense = 100; - npc.lifeMax = 35000; + npc.lifeMax = 80000; npc.aiStyle = -1; //new aiType = -1; //new npc.knockBackResist = 0f; @@ -305,6 +305,7 @@ namespace CalamityMod.NPCs.AbyssNPCs { Dust.NewDust(npc.position, npc.width, npc.height, 5, hitDirection, -1f, 0, default(Color), 1f); } + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/GulperEel4"), 1f); } } diff --git a/NPCs/AbyssNPCs/Laserfish.cs b/NPCs/AbyssNPCs/Laserfish.cs index 1f23cabfc5..395216e5ce 100644 --- a/NPCs/AbyssNPCs/Laserfish.cs +++ b/NPCs/AbyssNPCs/Laserfish.cs @@ -27,7 +27,7 @@ namespace CalamityMod.NPCs.AbyssNPCs npc.width = 60; npc.height = 26; npc.defense = 25; - npc.lifeMax = 120; + npc.lifeMax = 240; npc.aiStyle = -1; aiType = -1; npc.buffImmune[mod.BuffType("CrushDepth")] = true; @@ -112,7 +112,7 @@ namespace CalamityMod.NPCs.AbyssNPCs npc.velocity.Y = -4f; } npc.localAI[0] += 1f; - if (Main.netMode != 1 && npc.localAI[0] >= 180f) + if (Main.netMode != 1 && npc.localAI[0] >= 120f) { npc.localAI[0] = 0f; if (Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height)) @@ -125,10 +125,10 @@ namespace CalamityMod.NPCs.AbyssNPCs num8 = speed / num8; num6 *= num8; num7 *= num8; - int damage = 32; + int damage = 40; if (Main.expertMode) { - damage = 25; + damage = 30; } int beam = Projectile.NewProjectile(npc.Center.X + (npc.spriteDirection == 1 ? 15f : -15f), npc.Center.Y, num6, num7, 259, damage, 0f, Main.myPlayer, 0f, 0f); Main.projectile[beam].tileCollide = true; @@ -301,7 +301,10 @@ namespace CalamityMod.NPCs.AbyssNPCs { Dust.NewDust(npc.position, npc.width, npc.height, 5, hitDirection, -1f, 0, default(Color), 1f); } - } + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Laserfish"), 1f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Laserfish2"), 1f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Laserfish3"), 1f); + } } } } \ No newline at end of file diff --git a/NPCs/AbyssNPCs/LuminousCorvina.cs b/NPCs/AbyssNPCs/LuminousCorvina.cs index 40a3e8c007..47517be83b 100644 --- a/NPCs/AbyssNPCs/LuminousCorvina.cs +++ b/NPCs/AbyssNPCs/LuminousCorvina.cs @@ -28,7 +28,7 @@ namespace CalamityMod.NPCs.AbyssNPCs npc.width = 74; npc.height = 56; npc.defense = 20; - npc.lifeMax = 400; + npc.lifeMax = 800; npc.aiStyle = -1; aiType = -1; npc.buffImmune[mod.BuffType("CrushDepth")] = true; @@ -72,7 +72,7 @@ namespace CalamityMod.NPCs.AbyssNPCs { if (!Main.player[npc.target].dead && Main.player[npc.target].active) { - Main.player[npc.target].AddBuff(mod.BuffType("FishAlert"), 180, true); + Main.player[npc.target].AddBuff(mod.BuffType("FishAlert"), 360, true); } } } @@ -251,7 +251,7 @@ namespace CalamityMod.NPCs.AbyssNPCs public override void OnHitPlayer(Player player, int damage, bool crit) { - player.AddBuff(mod.BuffType("CrushDepth"), 120, true); + player.AddBuff(mod.BuffType("CrushDepth"), 180, true); } public override float SpawnChance(NPCSpawnInfo spawnInfo) diff --git a/NPCs/AbyssNPCs/Mauler.cs b/NPCs/AbyssNPCs/Mauler.cs index 62feebb74d..6bac381f18 100644 --- a/NPCs/AbyssNPCs/Mauler.cs +++ b/NPCs/AbyssNPCs/Mauler.cs @@ -23,11 +23,11 @@ namespace CalamityMod.NPCs.AbyssNPCs public override void SetDefaults() { npc.noGravity = true; - npc.damage = 115; - npc.width = 166; - npc.height = 66; + npc.damage = 135; + npc.width = 180; + npc.height = 90; npc.defense = 50; - npc.lifeMax = 144000; + npc.lifeMax = 165000; npc.aiStyle = -1; aiType = -1; for (int k = 0; k < npc.buffImmune.Length; k++) @@ -324,8 +324,8 @@ namespace CalamityMod.NPCs.AbyssNPCs player.AddBuff(BuffID.Rabies, 300, true); if (CalamityWorld.revenge) { - player.AddBuff(mod.BuffType("MarkedforDeath"), 150); - player.AddBuff(mod.BuffType("Horror"), 150, true); + player.AddBuff(mod.BuffType("MarkedforDeath"), 180); + player.AddBuff(mod.BuffType("Horror"), 180, true); } } @@ -377,7 +377,12 @@ namespace CalamityMod.NPCs.AbyssNPCs { Dust.NewDust(npc.position, npc.width, npc.height, 5, hitDirection, -1f, 0, default(Color), 1f); } - } + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Mauler"), 1f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Mauler2"), 1f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Mauler3"), 1f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Mauler4"), 1f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Mauler5"), 1f); + } } } } \ No newline at end of file diff --git a/NPCs/AbyssNPCs/Mauler.png b/NPCs/AbyssNPCs/Mauler.png index 82f0d8d771..ac13375124 100644 Binary files a/NPCs/AbyssNPCs/Mauler.png and b/NPCs/AbyssNPCs/Mauler.png differ diff --git a/NPCs/AbyssNPCs/MirageJelly.cs b/NPCs/AbyssNPCs/MirageJelly.cs index 7e07dfc474..20cddc497a 100644 --- a/NPCs/AbyssNPCs/MirageJelly.cs +++ b/NPCs/AbyssNPCs/MirageJelly.cs @@ -26,11 +26,11 @@ namespace CalamityMod.NPCs.AbyssNPCs { npc.noGravity = true; npc.noTileCollide = true; - npc.damage = 80; + npc.damage = 100; npc.width = 70; npc.height = 162; npc.defense = 10; - npc.lifeMax = 5000; + npc.lifeMax = 6000; npc.aiStyle = -1; aiType = -1; npc.knockBackResist = 0f; diff --git a/NPCs/AbyssNPCs/MorayEel.cs b/NPCs/AbyssNPCs/MorayEel.cs index 3d81c4a510..2cafde2360 100644 --- a/NPCs/AbyssNPCs/MorayEel.cs +++ b/NPCs/AbyssNPCs/MorayEel.cs @@ -23,11 +23,11 @@ namespace CalamityMod.NPCs.AbyssNPCs public override void SetDefaults() { npc.noGravity = true; - npc.damage = 35; + npc.damage = 45; npc.width = 136; npc.height = 40; npc.defense = 8; - npc.lifeMax = 110; + npc.lifeMax = 180; npc.aiStyle = -1; aiType = -1; npc.buffImmune[mod.BuffType("CrushDepth")] = true; diff --git a/NPCs/AbyssNPCs/OarfishHead.cs b/NPCs/AbyssNPCs/OarfishHead.cs index 4a7f997089..637262aada 100644 --- a/NPCs/AbyssNPCs/OarfishHead.cs +++ b/NPCs/AbyssNPCs/OarfishHead.cs @@ -439,11 +439,11 @@ namespace CalamityMod.NPCs.AbyssNPCs public override void OnHitPlayer(Player player, int damage, bool crit) { - player.AddBuff(BuffID.Bleeding, 300, true); + player.AddBuff(BuffID.Bleeding, 180, true); if (CalamityWorld.revenge) { - player.AddBuff(mod.BuffType("MarkedforDeath"), 150); - player.AddBuff(mod.BuffType("Horror"), 120, true); + player.AddBuff(mod.BuffType("MarkedforDeath"), 90); + player.AddBuff(mod.BuffType("Horror"), 90, true); } } } diff --git a/NPCs/AbyssNPCs/Reaper.cs b/NPCs/AbyssNPCs/Reaper.cs index 57dc21e7f5..5a8cbd1878 100644 --- a/NPCs/AbyssNPCs/Reaper.cs +++ b/NPCs/AbyssNPCs/Reaper.cs @@ -26,11 +26,11 @@ namespace CalamityMod.NPCs.AbyssNPCs { npc.npcSlots = 6f; npc.noGravity = true; - npc.damage = 125; + npc.damage = 160; npc.width = 280; npc.height = 150; npc.defense = 70; - npc.lifeMax = 150000; + npc.lifeMax = 190000; npc.aiStyle = -1; aiType = -1; for (int k = 0; k < npc.buffImmune.Length; k++) @@ -164,9 +164,9 @@ namespace CalamityMod.NPCs.AbyssNPCs } if (flag14) { - if (Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height)) + if (npc.ai[3] > 0f && !Collision.SolidCollision(npc.position, npc.width, npc.height)) { - if (npc.ai[3] > 0f && !Collision.SolidCollision(npc.position, npc.width, npc.height)) + if (Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height)) { npc.ai[3] = 0f; npc.ai[1] = 0f; @@ -185,12 +185,10 @@ namespace CalamityMod.NPCs.AbyssNPCs } if (npc.ai[3] == 0f) { - npc.alpha = 0; npc.noTileCollide = false; } else { - npc.alpha = 200; npc.noTileCollide = true; } npc.TargetClosest(true); @@ -612,7 +610,7 @@ namespace CalamityMod.NPCs.AbyssNPCs player.AddBuff(mod.BuffType("CrushDepth"), 300, true); if (CalamityWorld.revenge) { - player.AddBuff(mod.BuffType("MarkedforDeath"), 300); + player.AddBuff(mod.BuffType("MarkedforDeath"), 120); player.AddBuff(mod.BuffType("Horror"), 120, true); } } diff --git a/NPCs/AbyssNPCs/SeaUrchin.cs b/NPCs/AbyssNPCs/SeaUrchin.cs index d35777041e..7b404b4ae7 100644 --- a/NPCs/AbyssNPCs/SeaUrchin.cs +++ b/NPCs/AbyssNPCs/SeaUrchin.cs @@ -316,7 +316,7 @@ namespace CalamityMod.NPCs.AbyssNPCs public override void OnHitPlayer(Player player, int damage, bool crit) { - player.AddBuff(BuffID.Venom, 180, true); + player.AddBuff(BuffID.Venom, 120, true); } public override float SpawnChance(NPCSpawnInfo spawnInfo) diff --git a/NPCs/AbyssNPCs/ToxicMinnow.cs b/NPCs/AbyssNPCs/ToxicMinnow.cs index 35aaa14804..aa43bc6995 100644 --- a/NPCs/AbyssNPCs/ToxicMinnow.cs +++ b/NPCs/AbyssNPCs/ToxicMinnow.cs @@ -164,7 +164,7 @@ namespace CalamityMod.NPCs.AbyssNPCs double deltaAngleBoom = spreadBoom / 8f; double offsetAngleBoom; int iBoom; - int damageBoom = 20; + int damageBoom = 30; for (iBoom = 0; iBoom < 5; iBoom++) { int projectileType = mod.ProjectileType("ToxicMinnowCloud"); diff --git a/NPCs/AbyssNPCs/Trasher.cs b/NPCs/AbyssNPCs/Trasher.cs index 4dab53b3b7..11a324ab19 100644 --- a/NPCs/AbyssNPCs/Trasher.cs +++ b/NPCs/AbyssNPCs/Trasher.cs @@ -314,8 +314,8 @@ namespace CalamityMod.NPCs.AbyssNPCs public override void OnHitPlayer(Player player, int damage, bool crit) { - player.AddBuff(BuffID.Bleeding, 240, true); - player.AddBuff(BuffID.Venom, 240, true); + player.AddBuff(BuffID.Bleeding, 180, true); + player.AddBuff(BuffID.Venom, 180, true); } public override float SpawnChance(NPCSpawnInfo spawnInfo) @@ -360,7 +360,9 @@ namespace CalamityMod.NPCs.AbyssNPCs { Dust.NewDust(npc.position, npc.width, npc.height, 5, hitDirection, -1f, 0, default(Color), 1f); } - } + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Trasher"), 1f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Trasher2"), 1f); + } } } } \ No newline at end of file diff --git a/NPCs/AbyssNPCs/Viperfish.cs b/NPCs/AbyssNPCs/Viperfish.cs index c7654cc497..fbca0b03d0 100644 --- a/NPCs/AbyssNPCs/Viperfish.cs +++ b/NPCs/AbyssNPCs/Viperfish.cs @@ -23,11 +23,11 @@ namespace CalamityMod.NPCs.AbyssNPCs public override void SetDefaults() { npc.noGravity = true; - npc.damage = 30; + npc.damage = 60; npc.width = 72; npc.height = 30; npc.defense = 15; - npc.lifeMax = 80; + npc.lifeMax = 160; npc.aiStyle = -1; aiType = -1; npc.buffImmune[mod.BuffType("CrushDepth")] = true; @@ -236,12 +236,12 @@ namespace CalamityMod.NPCs.AbyssNPCs public override void OnHitPlayer(Player player, int damage, bool crit) { - player.AddBuff(BuffID.Bleeding, 180, true); - player.AddBuff(mod.BuffType("CrushDepth"), 180, true); + player.AddBuff(BuffID.Bleeding, 120, true); + player.AddBuff(mod.BuffType("CrushDepth"), 120, true); if (CalamityWorld.revenge) { - player.AddBuff(mod.BuffType("MarkedforDeath"), 120); - player.AddBuff(mod.BuffType("Horror"), 120, true); + player.AddBuff(mod.BuffType("MarkedforDeath"), 90); + player.AddBuff(mod.BuffType("Horror"), 90, true); } } @@ -297,7 +297,9 @@ namespace CalamityMod.NPCs.AbyssNPCs { Dust.NewDust(npc.position, npc.width, npc.height, 5, hitDirection, -1f, 0, default(Color), 1f); } - } + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/ViperFish"), 1f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/ViperFish2"), 1f); + } } } } \ No newline at end of file diff --git a/NPCs/Astrageldon/Astrageldon.cs b/NPCs/Astrageldon/Astrageldon.cs index 089f740347..208e5d6170 100644 --- a/NPCs/Astrageldon/Astrageldon.cs +++ b/NPCs/Astrageldon/Astrageldon.cs @@ -24,7 +24,7 @@ namespace CalamityMod.NPCs.Astrageldon public override void SetDefaults() { npc.npcSlots = 15f; - npc.damage = 70; + npc.damage = 90; npc.width = 400; npc.height = 280; npc.defense = 120; @@ -66,7 +66,7 @@ namespace CalamityMod.NPCs.Astrageldon } if (CalamityWorld.bossRushActive) { - npc.lifeMax = CalamityWorld.death ? 1150000 : 1000000; + npc.lifeMax = CalamityWorld.death ? 2800000 : 2400000; } } @@ -74,7 +74,6 @@ namespace CalamityMod.NPCs.Astrageldon { bool expertMode = (Main.expertMode || CalamityWorld.bossRushActive); bool revenge = (CalamityWorld.revenge || CalamityWorld.bossRushActive); - int damageBuff = (int)(50f * (1f - (float)npc.life / (float)npc.lifeMax)); int shootBuff = (int)(2f * (1f - (float)npc.life / (float)npc.lifeMax)); float shootTimer = 1f + ((float)shootBuff); bool dayTime = Main.dayTime; @@ -199,7 +198,7 @@ namespace CalamityMod.NPCs.Astrageldon } else if (npc.ai[0] == 2f) //walk around and fire astral flames and lasers { - npc.damage = npc.defDamage + damageBuff; + npc.damage = expertMode ? 144 : 90; float num823 = 4.5f; bool flag51 = false; if ((double)npc.life < (double)npc.lifeMax * 0.5) @@ -297,7 +296,7 @@ namespace CalamityMod.NPCs.Astrageldon } else if (npc.ai[0] == 3f) //leap upwards { - npc.damage = npc.defDamage + damageBuff; + npc.damage = expertMode ? 144 : 90; npc.noTileCollide = false; if (npc.velocity.Y == 0f) { @@ -323,7 +322,7 @@ namespace CalamityMod.NPCs.Astrageldon } else if (npc.ai[0] == 4f) //stomp { - npc.damage = npc.defDamage + damageBuff; + npc.damage = expertMode ? 144 : 90; if (npc.velocity.Y == 0f) { Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/LegStomp"), (int)npc.position.X, (int)npc.position.Y); @@ -407,7 +406,7 @@ namespace CalamityMod.NPCs.Astrageldon } if (npc.localAI[1] >= 60f) { - npc.damage = npc.defDamage + damageBuff; + npc.damage = expertMode ? 144 : 90; } if (npc.localAI[1] >= 240f) { @@ -708,13 +707,9 @@ namespace CalamityMod.NPCs.Astrageldon return false; } - public override void ModifyHitByProjectile(Projectile projectile, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) + public override void BossLoot(ref string name, ref int potionType) { - if (((projectile.type == ProjectileID.HallowStar || projectile.type == ProjectileID.CrystalShard) && projectile.ranged) || - projectile.type == mod.ProjectileType("TerraBulletSplit") || projectile.type == mod.ProjectileType("TerraArrow2")) - { - damage /= 2; - } + potionType = ItemID.GreaterHealingPotion; } public override void NPCLoot() @@ -809,7 +804,7 @@ namespace CalamityMod.NPCs.Astrageldon public override void OnHitPlayer(Player player, int damage, bool crit) { - player.AddBuff(mod.BuffType("GodSlayerInferno"), 150, true); + player.AddBuff(mod.BuffType("GodSlayerInferno"), 180, true); } } } \ No newline at end of file diff --git a/NPCs/Astrageldon/AstrageldonSlime.cs b/NPCs/Astrageldon/AstrageldonSlime.cs index c55e101ed4..e4b8fa34f7 100644 --- a/NPCs/Astrageldon/AstrageldonSlime.cs +++ b/NPCs/Astrageldon/AstrageldonSlime.cs @@ -56,7 +56,7 @@ namespace CalamityMod.NPCs.Astrageldon int num; for (int num245 = 0; num245 < 10; num245 = num + 1) { - int dust = Dust.NewDust(npc.position, npc.width, npc.height, mod.DustType("AstralOrange"), npc.velocity.X, npc.velocity.Y, 255, default(Color), 2f); + int dust = Dust.NewDust(npc.position, npc.width, npc.height, mod.DustType("AstralOrange"), npc.velocity.X, npc.velocity.Y, 255, default(Color), 0.8f); Main.dust[dust].noGravity = true; Main.dust[dust].velocity *= 0.5f; num = num245; @@ -124,7 +124,7 @@ namespace CalamityMod.NPCs.Astrageldon int num; for (int num1449 = 0; num1449 < 20; num1449 = num + 1) { - int num1450 = Dust.NewDust(npc.position, npc.width, npc.height, mod.DustType("AstralOrange"), 0f, 0f, 100, Color.Transparent, 1f); + int num1450 = Dust.NewDust(npc.position, npc.width, npc.height, mod.DustType("AstralOrange"), 0f, 0f, 100, Color.Transparent, 0.6f); Dust dust = Main.dust[num1450]; dust.velocity *= 3f; Main.dust[num1450].noGravity = true; @@ -142,7 +142,7 @@ namespace CalamityMod.NPCs.Astrageldon Main.PlaySound(SoundID.Item8, npc.Center); for (int num1451 = 0; num1451 < 20; num1451 = num + 1) { - int num1452 = Dust.NewDust(npc.position, npc.width, npc.height, mod.DustType("AstralOrange"), 0f, 0f, 100, Color.Transparent, 1f); + int num1452 = Dust.NewDust(npc.position, npc.width, npc.height, mod.DustType("AstralOrange"), 0f, 0f, 100, Color.Transparent, 0.6f); Dust dust = Main.dust[num1452]; dust.velocity *= 3f; Main.dust[num1452].noGravity = true; @@ -213,13 +213,13 @@ namespace CalamityMod.NPCs.Astrageldon public override void HitEffect(int hitDirection, double damage) { - for (int k = 0; k < 5; k++) + for (int k = 0; k < 3; k++) { Dust.NewDust(npc.position, npc.width, npc.height, 173, hitDirection, -1f, 0, default(Color), 1f); } if (npc.life <= 0) { - for (int k = 0; k < 20; k++) + for (int k = 0; k < 10; k++) { Dust.NewDust(npc.position, npc.width, npc.height, 173, hitDirection, -1f, 0, default(Color), 1f); } @@ -237,7 +237,7 @@ namespace CalamityMod.NPCs.Astrageldon npc.position.Y = npc.position.Y - (float)(npc.height / 2); for (int num621 = 0; num621 < 15; num621++) { - int num622 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, mod.DustType("AstralOrange"), 0f, 0f, 100, default(Color), 2f); + int num622 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, mod.DustType("AstralOrange"), 0f, 0f, 100, default(Color), 1f); Main.dust[num622].velocity *= 3f; if (Main.rand.Next(2) == 0) { @@ -248,10 +248,10 @@ namespace CalamityMod.NPCs.Astrageldon } for (int num623 = 0; num623 < 30; num623++) { - int num624 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 173, 0f, 0f, 100, default(Color), 3f); + int num624 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 173, 0f, 0f, 100, default(Color), 2f); Main.dust[num624].noGravity = true; Main.dust[num624].velocity *= 5f; - num624 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, mod.DustType("AstralOrange"), 0f, 0f, 100, default(Color), 2f); + num624 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, mod.DustType("AstralOrange"), 0f, 0f, 100, default(Color), 1f); Main.dust[num624].velocity *= 2f; Main.dust[num624].noGravity = true; } diff --git a/NPCs/AstralBiomeNPCs/Aries.cs b/NPCs/AstralBiomeNPCs/Aries.cs index 67423c25ce..93527e025a 100644 --- a/NPCs/AstralBiomeNPCs/Aries.cs +++ b/NPCs/AstralBiomeNPCs/Aries.cs @@ -33,7 +33,7 @@ namespace CalamityMod.NPCs.AstralBiomeNPCs npc.lifeMax = 450; npc.knockBackResist = 0.5f; npc.value = 380f; - npc.DeathSound = mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AstralEnemyDeath"); + npc.DeathSound = mod.GetLegacySoundSlot(SoundType.NPCKilled, "Sounds/NPCKilled/AstralEnemyDeath"); } public override void FindFrame(int frameHeight) @@ -63,7 +63,18 @@ namespace CalamityMod.NPCs.AstralBiomeNPCs public override void HitEffect(int hitDirection, double damage) { - Main.PlaySound(mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AstralEnemyHit" + Main.rand.Next(3)), npc.Center); + switch (Main.rand.Next(3)) + { + case 0: + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AstralEnemyHit"), npc.Center); + break; + case 1: + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AstralEnemyHit2"), npc.Center); + break; + case 2: + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AstralEnemyHit3"), npc.Center); + break; + } CalamityGlobalNPC.DoHitDust(npc, hitDirection, mod.DustType("AstralOrange"), 1f, 4, 24); } diff --git a/NPCs/AstralBiomeNPCs/AstralProbe.cs b/NPCs/AstralBiomeNPCs/AstralProbe.cs index 7de2490a80..5c860f7df9 100644 --- a/NPCs/AstralBiomeNPCs/AstralProbe.cs +++ b/NPCs/AstralBiomeNPCs/AstralProbe.cs @@ -199,7 +199,18 @@ namespace CalamityMod.NPCs.AstralBiomeNPCs public override void HitEffect(int hitDirection, double damage) { - Main.PlaySound(mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AstralEnemyHit" + Main.rand.Next(3)), npc.Center); + switch (Main.rand.Next(3)) + { + case 0: + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AstralEnemyHit"), npc.Center); + break; + case 1: + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AstralEnemyHit2"), npc.Center); + break; + case 2: + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AstralEnemyHit3"), npc.Center); + break; + } if (npc.life <= 0) { diff --git a/NPCs/AstralBiomeNPCs/AstralachneaGround.cs b/NPCs/AstralBiomeNPCs/AstralachneaGround.cs index e2b927c556..fec74cf7e3 100644 --- a/NPCs/AstralBiomeNPCs/AstralachneaGround.cs +++ b/NPCs/AstralBiomeNPCs/AstralachneaGround.cs @@ -34,7 +34,7 @@ namespace CalamityMod.NPCs.AstralBiomeNPCs npc.damage = 90; npc.defense = 30; npc.lifeMax = 750; - npc.DeathSound = mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AstralEnemyDeath"); + npc.DeathSound = mod.GetLegacySoundSlot(SoundType.NPCKilled, "Sounds/NPCKilled/AstralEnemyDeath"); npc.knockBackResist = 0.28f; npc.value = 900f; npc.buffImmune[20] = true; @@ -98,7 +98,18 @@ namespace CalamityMod.NPCs.AstralBiomeNPCs public override void HitEffect(int hitDirection, double damage) { - Main.PlaySound(mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AstralEnemyHit" + Main.rand.Next(3)), npc.Center); + switch (Main.rand.Next(3)) + { + case 0: + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AstralEnemyHit"), npc.Center); + break; + case 1: + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AstralEnemyHit2"), npc.Center); + break; + case 2: + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AstralEnemyHit3"), npc.Center); + break; + } CalamityGlobalNPC.DoHitDust(npc, hitDirection, (Main.rand.Next(0, Math.Max(0, npc.life)) == 0) ? 5 : mod.DustType("AstralEnemy"), 1f, 4, 22); diff --git a/NPCs/AstralBiomeNPCs/AstralachneaWall.cs b/NPCs/AstralBiomeNPCs/AstralachneaWall.cs index e6291c19da..500afd090c 100644 --- a/NPCs/AstralBiomeNPCs/AstralachneaWall.cs +++ b/NPCs/AstralBiomeNPCs/AstralachneaWall.cs @@ -34,7 +34,7 @@ namespace CalamityMod.NPCs.AstralBiomeNPCs npc.damage = 90; npc.defense = 30; npc.lifeMax = 750; - npc.DeathSound = mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AstralEnemyDeath"); + npc.DeathSound = mod.GetLegacySoundSlot(SoundType.NPCKilled, "Sounds/NPCKilled/AstralEnemyDeath"); npc.knockBackResist = 0f; npc.noGravity = true; npc.value = 900f; @@ -85,7 +85,18 @@ namespace CalamityMod.NPCs.AstralBiomeNPCs public override void HitEffect(int hitDirection, double damage) { - Main.PlaySound(mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AstralEnemyHit" + Main.rand.Next(3)), npc.Center); + switch (Main.rand.Next(3)) + { + case 0: + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AstralEnemyHit"), npc.Center); + break; + case 1: + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AstralEnemyHit2"), npc.Center); + break; + case 2: + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AstralEnemyHit3"), npc.Center); + break; + } CalamityGlobalNPC.DoHitDust(npc, hitDirection, (Main.rand.Next(0, Math.Max(0, npc.life)) == 0) ? 5 : mod.DustType("AstralEnemy"), 1f, 4, 22); diff --git a/NPCs/AstralBiomeNPCs/Atlas.cs b/NPCs/AstralBiomeNPCs/Atlas.cs index 39c8de6cfc..0891e23003 100644 --- a/NPCs/AstralBiomeNPCs/Atlas.cs +++ b/NPCs/AstralBiomeNPCs/Atlas.cs @@ -153,7 +153,7 @@ namespace CalamityMod.NPCs.AstralBiomeNPCs else { //PLAY SOUND (SAD) *but this time it has a target. more like an indicator. he sad because he has to kill you now :c - Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/AtlasSad1"), npc.Center); + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/AtlasSad0"), npc.Center); } } @@ -347,7 +347,7 @@ namespace CalamityMod.NPCs.AstralBiomeNPCs target_counter = 0; //PLAY SOUND (SAD) he sad cos he lost his target :C - Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/AtlasSad2"), npc.Center); + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/AtlasSad1"), npc.Center); } else if (target_counter == 0 && npc.velocity.Y == 0) { @@ -393,7 +393,18 @@ namespace CalamityMod.NPCs.AstralBiomeNPCs public override void HitEffect(int hitDirection, double damage) { //play sound - Main.PlaySound(mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AtlasHurt0" + Main.rand.Next(3)), npc.Center); + switch (Main.rand.Next(3)) + { + case 0: + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AtlasHurt0"), npc.Center); + break; + case 1: + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AtlasHurt1"), npc.Center); + break; + case 2: + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AtlasHurt2"), npc.Center); + break; + } CalamityGlobalNPC.DoHitDust(npc, hitDirection, (Main.rand.Next(0, Math.Max(0, npc.life)) == 0) ? 5 : mod.DustType("AstralEnemy"), 1f, 3, 30); diff --git a/NPCs/AstralBiomeNPCs/BigSightseer.cs b/NPCs/AstralBiomeNPCs/BigSightseer.cs index 75b566f69f..bc963b1e51 100644 --- a/NPCs/AstralBiomeNPCs/BigSightseer.cs +++ b/NPCs/AstralBiomeNPCs/BigSightseer.cs @@ -31,7 +31,7 @@ namespace CalamityMod.NPCs.AstralBiomeNPCs npc.damage = 85; npc.defense = 30; npc.lifeMax = 640; - npc.DeathSound = mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AstralEnemyDeath"); + npc.DeathSound = mod.GetLegacySoundSlot(SoundType.NPCKilled, "Sounds/NPCKilled/AstralEnemyDeath"); npc.noGravity = true; npc.knockBackResist = 0.7f; npc.value = 1000; @@ -99,7 +99,18 @@ namespace CalamityMod.NPCs.AstralBiomeNPCs public override void HitEffect(int hitDirection, double damage) { - Main.PlaySound(mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AstralEnemyHit" + Main.rand.Next(3)), npc.Center); + switch (Main.rand.Next(3)) + { + case 0: + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AstralEnemyHit"), npc.Center); + break; + case 1: + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AstralEnemyHit2"), npc.Center); + break; + case 2: + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AstralEnemyHit3"), npc.Center); + break; + } CalamityGlobalNPC.DoHitDust(npc, hitDirection, (Main.rand.Next(0, Math.Max(0, npc.life)) == 0) ? 5 : mod.DustType("AstralEnemy"), 1f, 4, 22); @@ -154,8 +165,8 @@ namespace CalamityMod.NPCs.AstralBiomeNPCs npc.damage = 75; npc.defense = 0; npc.lifeMax = 1; - npc.HitSound = mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AstralEnemyHit"); - npc.DeathSound = mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AstralEnemyDeath"); + npc.HitSound = null; + npc.DeathSound = SoundID.NPCDeath9; npc.noGravity = true; npc.knockBackResist = 0f; npc.noTileCollide = true; diff --git a/NPCs/AstralBiomeNPCs/FusionFeeder.cs b/NPCs/AstralBiomeNPCs/FusionFeeder.cs index c40d354056..5e487dc450 100644 --- a/NPCs/AstralBiomeNPCs/FusionFeeder.cs +++ b/NPCs/AstralBiomeNPCs/FusionFeeder.cs @@ -36,7 +36,7 @@ namespace CalamityMod.NPCs.AstralBiomeNPCs npc.value = 900f; npc.knockBackResist = 0.7f; npc.behindTiles = true; - npc.DeathSound = mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AstralEnemyDeath"); + npc.DeathSound = mod.GetLegacySoundSlot(SoundType.NPCKilled, "Sounds/NPCKilled/AstralEnemyDeath"); animationType = NPCID.SandShark; } @@ -53,7 +53,18 @@ namespace CalamityMod.NPCs.AstralBiomeNPCs public override void HitEffect(int hitDirection, double damage) { - Main.PlaySound(mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AstralEnemyHit" + Main.rand.Next(3)), npc.Center); + switch (Main.rand.Next(3)) + { + case 0: + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AstralEnemyHit"), npc.Center); + break; + case 1: + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AstralEnemyHit2"), npc.Center); + break; + case 2: + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AstralEnemyHit3"), npc.Center); + break; + } CalamityGlobalNPC.DoHitDust(npc, hitDirection, (Main.rand.Next(0, Math.Max(0, npc.life)) == 0) ? 5 : mod.DustType("AstralEnemy"), 1f, 4, 25); diff --git a/NPCs/AstralBiomeNPCs/Hadarian.cs b/NPCs/AstralBiomeNPCs/Hadarian.cs index d09e6c3de9..f9992cdecd 100644 --- a/NPCs/AstralBiomeNPCs/Hadarian.cs +++ b/NPCs/AstralBiomeNPCs/Hadarian.cs @@ -32,7 +32,7 @@ namespace CalamityMod.NPCs.AstralBiomeNPCs npc.damage = 78; npc.defense = 18; npc.lifeMax = 490; - npc.DeathSound = mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AstralEnemyDeath"); + npc.DeathSound = mod.GetLegacySoundSlot(SoundType.NPCKilled, "Sounds/NPCKilled/AstralEnemyDeath"); npc.knockBackResist = 0.65f; npc.value = 450f; } @@ -139,7 +139,18 @@ namespace CalamityMod.NPCs.AstralBiomeNPCs public override void HitEffect(int hitDirection, double damage) { - Main.PlaySound(mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AstralEnemyHit" + Main.rand.Next(3)), npc.Center); + switch (Main.rand.Next(3)) + { + case 0: + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AstralEnemyHit"), npc.Center); + break; + case 1: + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AstralEnemyHit2"), npc.Center); + break; + case 2: + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AstralEnemyHit3"), npc.Center); + break; + } CalamityGlobalNPC.DoHitDust(npc, hitDirection, (Main.rand.Next(0, Math.Max(0, npc.life)) == 0) ? 5 : mod.DustType("AstralEnemy"), 1f, 3, 20); diff --git a/NPCs/AstralBiomeNPCs/Hive.cs b/NPCs/AstralBiomeNPCs/Hive.cs index b8eafb6e99..b1dd054edc 100644 --- a/NPCs/AstralBiomeNPCs/Hive.cs +++ b/NPCs/AstralBiomeNPCs/Hive.cs @@ -32,7 +32,7 @@ namespace CalamityMod.NPCs.AstralBiomeNPCs npc.damage = 90; npc.defense = 25; npc.lifeMax = 700; - npc.DeathSound = mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AstralEnemyDeath"); + npc.DeathSound = mod.GetLegacySoundSlot(SoundType.NPCKilled, "Sounds/NPCKilled/AstralEnemyDeath"); npc.knockBackResist = 0f; npc.value = 550f; } @@ -76,7 +76,18 @@ namespace CalamityMod.NPCs.AstralBiomeNPCs public override void HitEffect(int hitDirection, double damage) { - Main.PlaySound(mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AstralEnemyHit" + Main.rand.Next(3)), npc.Center); + switch (Main.rand.Next(3)) + { + case 0: + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AstralEnemyHit"), npc.Center); + break; + case 1: + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AstralEnemyHit2"), npc.Center); + break; + case 2: + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AstralEnemyHit3"), npc.Center); + break; + } CalamityGlobalNPC.DoHitDust(npc, hitDirection, (Main.rand.Next(0, Math.Max(0, npc.life)) == 0) ? 5 : mod.DustType("AstralEnemy"), 1f, 3, 20); diff --git a/NPCs/AstralBiomeNPCs/Hiveling.cs b/NPCs/AstralBiomeNPCs/Hiveling.cs index 7883f37559..d1534904c5 100644 --- a/NPCs/AstralBiomeNPCs/Hiveling.cs +++ b/NPCs/AstralBiomeNPCs/Hiveling.cs @@ -32,7 +32,7 @@ namespace CalamityMod.NPCs.AstralBiomeNPCs npc.damage = 50; npc.defense = 8; npc.lifeMax = 220; - npc.DeathSound = mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AstralEnemyDeath"); + npc.DeathSound = mod.GetLegacySoundSlot(SoundType.NPCKilled, "Sounds/NPCKilled/AstralEnemyDeath"); npc.knockBackResist = 0.4f; npc.noGravity = true; npc.value = 100f; @@ -91,7 +91,18 @@ namespace CalamityMod.NPCs.AstralBiomeNPCs public override void HitEffect(int hitDirection, double damage) { - Main.PlaySound(mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AstralEnemyHit" + Main.rand.Next(3)), npc.Center); + switch (Main.rand.Next(3)) + { + case 0: + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AstralEnemyHit"), npc.Center); + break; + case 1: + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AstralEnemyHit2"), npc.Center); + break; + case 2: + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AstralEnemyHit3"), npc.Center); + break; + } CalamityGlobalNPC.DoHitDust(npc, hitDirection, (Main.rand.Next(0, Math.Max(0, npc.life)) == 0) ? 5 : mod.DustType("AstralEnemy"), 1f, 3, 20); diff --git a/NPCs/AstralBiomeNPCs/Mantis.cs b/NPCs/AstralBiomeNPCs/Mantis.cs index 7b476aff51..a2effe0e14 100644 --- a/NPCs/AstralBiomeNPCs/Mantis.cs +++ b/NPCs/AstralBiomeNPCs/Mantis.cs @@ -33,7 +33,7 @@ namespace CalamityMod.NPCs.AstralBiomeNPCs npc.lifeMax = 510; npc.knockBackResist = 0.1f; npc.value = 450f; - npc.DeathSound = mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AstralEnemyDeath"); + npc.DeathSound = mod.GetLegacySoundSlot(SoundType.NPCKilled, "Sounds/NPCKilled/AstralEnemyDeath"); } public override void AI() @@ -110,6 +110,7 @@ namespace CalamityMod.NPCs.AstralBiomeNPCs npc.velocity.X *= 0.95f; if (npc.ai[2] == 25f) { + Main.PlaySound(2, (int)npc.position.X, (int)npc.position.Y, 71); Vector2 vector = Main.player[npc.target].Center - npc.Center; vector.Normalize(); Projectile.NewProjectile(npc.Center + (npc.Center.X < target.Center.X ? -14f : 14f) * Vector2.UnitX, vector * 7f, mod.ProjectileType("MantisRing"), 76, 0.5f); @@ -185,7 +186,18 @@ namespace CalamityMod.NPCs.AstralBiomeNPCs public override void HitEffect(int hitDirection, double damage) { - Main.PlaySound(mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AstralEnemyHit" + Main.rand.Next(3)), npc.Center); + switch (Main.rand.Next(3)) + { + case 0: + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AstralEnemyHit"), npc.Center); + break; + case 1: + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AstralEnemyHit2"), npc.Center); + break; + case 2: + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AstralEnemyHit3"), npc.Center); + break; + } CalamityGlobalNPC.DoHitDust(npc, hitDirection, mod.DustType("AstralOrange"), 1f, 4, 24); } diff --git a/NPCs/AstralBiomeNPCs/Nova.cs b/NPCs/AstralBiomeNPCs/Nova.cs index 150ce09441..b100b770d6 100644 --- a/NPCs/AstralBiomeNPCs/Nova.cs +++ b/NPCs/AstralBiomeNPCs/Nova.cs @@ -39,7 +39,7 @@ namespace CalamityMod.NPCs.AstralBiomeNPCs npc.damage = 75; npc.defense = 25; npc.lifeMax = 350; - npc.DeathSound = mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AstralEnemyDeath"); + npc.DeathSound = mod.GetLegacySoundSlot(SoundType.NPCKilled, "Sounds/NPCKilled/AstralEnemyDeath"); npc.noGravity = true; npc.knockBackResist = 0.4f; npc.value = 1100; @@ -203,7 +203,18 @@ namespace CalamityMod.NPCs.AstralBiomeNPCs public override void HitEffect(int hitDirection, double damage) { - Main.PlaySound(mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AstralEnemyHit" + Main.rand.Next(3)), npc.Center); + switch (Main.rand.Next(3)) + { + case 0: + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AstralEnemyHit"), npc.Center); + break; + case 1: + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AstralEnemyHit2"), npc.Center); + break; + case 2: + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AstralEnemyHit3"), npc.Center); + break; + } CalamityGlobalNPC.DoHitDust(npc, hitDirection, (Main.rand.Next(0, Math.Max(0, npc.life)) == 0) ? 5 : mod.DustType("AstralEnemy"), 1f, 3, 40); diff --git a/NPCs/AstralBiomeNPCs/SmallSightseer.cs b/NPCs/AstralBiomeNPCs/SmallSightseer.cs index 54cd49b70e..c2877d06df 100644 --- a/NPCs/AstralBiomeNPCs/SmallSightseer.cs +++ b/NPCs/AstralBiomeNPCs/SmallSightseer.cs @@ -32,7 +32,7 @@ namespace CalamityMod.NPCs.AstralBiomeNPCs npc.damage = 58; npc.defense = 26; npc.lifeMax = 460; - npc.DeathSound = mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AstralEnemyDeath"); + npc.DeathSound = mod.GetLegacySoundSlot(SoundType.NPCKilled, "Sounds/NPCKilled/AstralEnemyDeath"); npc.noGravity = true; npc.knockBackResist = 0.48f; npc.value = 600; @@ -67,7 +67,18 @@ namespace CalamityMod.NPCs.AstralBiomeNPCs public override void HitEffect(int hitDirection, double damage) { - Main.PlaySound(mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AstralEnemyHit" + Main.rand.Next(3)), npc.Center); + switch (Main.rand.Next(3)) + { + case 0: + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AstralEnemyHit"), npc.Center); + break; + case 1: + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AstralEnemyHit2"), npc.Center); + break; + case 2: + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AstralEnemyHit3"), npc.Center); + break; + } CalamityGlobalNPC.DoHitDust(npc, hitDirection, (Main.rand.Next(0, Math.Max(0, npc.life)) == 0) ? 5 : mod.DustType("AstralEnemy"), 1f, 4, 22); diff --git a/NPCs/AstralBiomeNPCs/StellarCulex.cs b/NPCs/AstralBiomeNPCs/StellarCulex.cs index eff64220cb..8e14c17e1e 100644 --- a/NPCs/AstralBiomeNPCs/StellarCulex.cs +++ b/NPCs/AstralBiomeNPCs/StellarCulex.cs @@ -35,7 +35,7 @@ namespace CalamityMod.NPCs.AstralBiomeNPCs npc.knockBackResist = 0.55f; npc.lifeMax = 320; npc.value = 700f; - npc.DeathSound = mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AstralEnemyDeath"); + npc.DeathSound = mod.GetLegacySoundSlot(SoundType.NPCKilled, "Sounds/NPCKilled/AstralEnemyDeath"); npc.buffImmune[31] = false; animationType = NPCID.GiantFlyingFox; @@ -54,7 +54,18 @@ namespace CalamityMod.NPCs.AstralBiomeNPCs public override void HitEffect(int hitDirection, double damage) { - Main.PlaySound(mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AstralEnemyHit" + Main.rand.Next(3)), npc.Center); + switch (Main.rand.Next(3)) + { + case 0: + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AstralEnemyHit"), npc.Center); + break; + case 1: + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AstralEnemyHit2"), npc.Center); + break; + case 2: + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/AstralEnemyHit3"), npc.Center); + break; + } CalamityGlobalNPC.DoHitDust(npc, hitDirection, (Main.rand.Next(0, Math.Max(0, npc.life)) == 0) ? 5 : mod.DustType("AstralEnemy"), 1f, 4, 22); diff --git a/NPCs/AstrumDeus/AstrumDeusBody.cs b/NPCs/AstrumDeus/AstrumDeusBody.cs index d5868ebd00..3ce03bb7be 100644 --- a/NPCs/AstrumDeus/AstrumDeusBody.cs +++ b/NPCs/AstrumDeus/AstrumDeusBody.cs @@ -33,7 +33,7 @@ namespace CalamityMod.NPCs.AstrumDeus } if (CalamityWorld.bossRushActive) { - npc.lifeMax = CalamityWorld.death ? 740000 : 610000; + npc.lifeMax = CalamityWorld.death ? 840000 : 720000; } npc.aiStyle = 6; //new aiType = -1; //new @@ -169,11 +169,6 @@ namespace CalamityMod.NPCs.AstrumDeus } else { - if (((projectile.type == ProjectileID.HallowStar || projectile.type == ProjectileID.CrystalShard) && projectile.ranged) || - projectile.type == mod.ProjectileType("TerraBulletSplit") || projectile.type == mod.ProjectileType("TerraArrow2")) - { - damage /= 2; - } if (projectile.penetrate == -1 && !projectile.minion && !projectile.thrown) { damage /= 2; @@ -241,10 +236,7 @@ namespace CalamityMod.NPCs.AstrumDeus public override void OnHitPlayer(Player player, int damage, bool crit) { - if (CalamityWorld.downedStarGod) - { - player.AddBuff(mod.BuffType("GodSlayerInferno"), 150, true); - } + player.AddBuff(mod.BuffType("GodSlayerInferno"), 120, true); } public override void ScaleExpertStats(int numPlayers, float bossLifeScale) diff --git a/NPCs/AstrumDeus/AstrumDeusBodySpectral.cs b/NPCs/AstrumDeus/AstrumDeusBodySpectral.cs index bd17d69283..073fbf568e 100644 --- a/NPCs/AstrumDeus/AstrumDeusBodySpectral.cs +++ b/NPCs/AstrumDeus/AstrumDeusBodySpectral.cs @@ -12,7 +12,7 @@ namespace CalamityMod.NPCs.AstrumDeus { public class AstrumDeusBodySpectral : ModNPC { - public int spawn = 0; + private int spawn = 0; public override void SetStaticDefaults() { @@ -33,7 +33,7 @@ namespace CalamityMod.NPCs.AstrumDeus } if (CalamityWorld.bossRushActive) { - npc.lifeMax = CalamityWorld.death ? 2500000 : 1900000; + npc.lifeMax = CalamityWorld.death ? 3000000 : 2500000; } npc.aiStyle = 6; //new aiType = -1; //new @@ -67,8 +67,8 @@ namespace CalamityMod.NPCs.AstrumDeus public override void AI() { - npc.dontTakeDamage = NPC.AnyNPCs(mod.NPCType("AstrumDeusHead")); - npc.chaseable = !NPC.AnyNPCs(mod.NPCType("AstrumDeusHead")); + npc.dontTakeDamage = AstrumDeusHeadSpectral.colorChange; + npc.chaseable = !AstrumDeusHeadSpectral.colorChange; bool expertMode = (Main.expertMode || CalamityWorld.bossRushActive); bool revenge = (CalamityWorld.revenge || CalamityWorld.bossRushActive); Lighting.AddLight((int)((npc.position.X + (float)(npc.width / 2)) / 16f), (int)((npc.position.Y + (float)(npc.height / 2)) / 16f), 0.2f, 0.05f, 0.2f); @@ -144,13 +144,13 @@ namespace CalamityMod.NPCs.AstrumDeus Mod mod = ModLoader.GetMod("CalamityMod"); Texture2D texture = mod.GetTexture("NPCs/AstrumDeus/AstrumDeusBodyAltSpectral"); CalamityMod.DrawTexture(spriteBatch, (npc.localAI[3] == 1f ? texture : Main.npcTexture[npc.type]), 0, npc, - (NPC.AnyNPCs(mod.NPCType("AstrumDeusHead")) ? lightColor : drawColor)); + (AstrumDeusHeadSpectral.colorChange ? lightColor : drawColor)); return false; } public override bool CanHitPlayer(Player target, ref int cooldownSlot) { - if (NPC.AnyNPCs(mod.NPCType("AstrumDeusHead"))) + if (AstrumDeusHeadSpectral.colorChange) { return false; } @@ -169,11 +169,6 @@ namespace CalamityMod.NPCs.AstrumDeus } else { - if (((projectile.type == ProjectileID.HallowStar || projectile.type == ProjectileID.CrystalShard) && projectile.ranged) || - projectile.type == mod.ProjectileType("TerraBulletSplit") || projectile.type == mod.ProjectileType("TerraArrow2")) - { - damage /= 2; - } if (projectile.penetrate == -1 && !projectile.minion && !projectile.thrown) { damage /= 2; @@ -241,10 +236,7 @@ namespace CalamityMod.NPCs.AstrumDeus public override void OnHitPlayer(Player player, int damage, bool crit) { - if (CalamityWorld.downedStarGod) - { - player.AddBuff(mod.BuffType("GodSlayerInferno"), 150, true); - } + player.AddBuff(mod.BuffType("GodSlayerInferno"), 120, true); } public override void ScaleExpertStats(int numPlayers, float bossLifeScale) diff --git a/NPCs/AstrumDeus/AstrumDeusHead.cs b/NPCs/AstrumDeus/AstrumDeusHead.cs index 696c9c0ead..d7aee3a339 100644 --- a/NPCs/AstrumDeus/AstrumDeusHead.cs +++ b/NPCs/AstrumDeus/AstrumDeusHead.cs @@ -47,7 +47,7 @@ namespace CalamityMod.NPCs.AstrumDeus } if (CalamityWorld.bossRushActive) { - npc.lifeMax = CalamityWorld.death ? 740000 : 610000; + npc.lifeMax = CalamityWorld.death ? 840000 : 720000; } npc.aiStyle = 6; //new aiType = -1; //new @@ -256,15 +256,16 @@ namespace CalamityMod.NPCs.AstrumDeus Lighting.AddLight((int)((npc.position.X + (float)(npc.width / 2)) / 16f), (int)((npc.position.Y + (float)(npc.height / 2)) / 16f), 0.2f, 0.05f, 0.2f); npc.localAI[1] = 1f; Rectangle rectangle12 = new Rectangle((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height); - int num954 = (npc.GetGlobalNPC(mod).enraged ? 150 : 300); - bool flag95 = true; + int rectX = 300; + int rectY = (npc.GetGlobalNPC(mod).enraged ? 50 : 100); + bool flag95 = true; if (npc.position.Y > Main.player[npc.target].position.Y) { for (int num955 = 0; num955 < 255; num955++) { if (Main.player[num955].active) { - Rectangle rectangle13 = new Rectangle((int)Main.player[num955].position.X - num954, (int)Main.player[num955].position.Y - num954, num954 * 2, num954 * 2); + Rectangle rectangle13 = new Rectangle((int)Main.player[num955].position.X - rectX, (int)Main.player[num955].position.Y - rectY, rectX * 2, rectY * 2); if (rectangle12.Intersects(rectangle13)) { flag95 = false; @@ -548,11 +549,6 @@ namespace CalamityMod.NPCs.AstrumDeus public override void ModifyHitByProjectile(Projectile projectile, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) { - if (((projectile.type == ProjectileID.HallowStar || projectile.type == ProjectileID.CrystalShard) && projectile.ranged) || - projectile.type == mod.ProjectileType("TerraBulletSplit") || projectile.type == mod.ProjectileType("TerraArrow2")) - { - damage /= 2; - } if (projectile.penetrate == -1 && !projectile.minion && !projectile.thrown) { damage /= 5; @@ -601,10 +597,7 @@ namespace CalamityMod.NPCs.AstrumDeus public override void OnHitPlayer(Player player, int damage, bool crit) { - if (CalamityWorld.downedStarGod) - { - player.AddBuff(mod.BuffType("GodSlayerInferno"), 150, true); - } + player.AddBuff(mod.BuffType("GodSlayerInferno"), 180, true); } public override void ScaleExpertStats(int numPlayers, float bossLifeScale) diff --git a/NPCs/AstrumDeus/AstrumDeusHeadSpectral.cs b/NPCs/AstrumDeus/AstrumDeusHeadSpectral.cs index bebb61f183..a90f2ab7c5 100644 --- a/NPCs/AstrumDeus/AstrumDeusHeadSpectral.cs +++ b/NPCs/AstrumDeus/AstrumDeusHeadSpectral.cs @@ -17,6 +17,7 @@ namespace CalamityMod.NPCs.AstrumDeus [AutoloadBossHead] public class AstrumDeusHeadSpectral : ModNPC { + public static bool colorChange = false; private bool flies = true; private const int minLength = 12; private const int maxLength = 13; @@ -43,7 +44,7 @@ namespace CalamityMod.NPCs.AstrumDeus } if (CalamityWorld.bossRushActive) { - npc.lifeMax = CalamityWorld.death ? 2500000 : 1900000; + npc.lifeMax = CalamityWorld.death ? 3000000 : 2500000; } npc.aiStyle = 6; //new aiType = -1; //new @@ -73,8 +74,9 @@ namespace CalamityMod.NPCs.AstrumDeus public override void AI() { - npc.dontTakeDamage = NPC.AnyNPCs(mod.NPCType("AstrumDeusHead")); - npc.chaseable = !NPC.AnyNPCs(mod.NPCType("AstrumDeusHead")); + colorChange = NPC.AnyNPCs(mod.NPCType("AstrumDeusHead")); + npc.dontTakeDamage = colorChange; + npc.chaseable = !colorChange; bool expertMode = (Main.expertMode || CalamityWorld.bossRushActive); float speedLimit = CalamityWorld.revenge ? 9f : 7f; float turnSpeedLimit = CalamityWorld.revenge ? 0.14f : 0.12f; @@ -378,7 +380,7 @@ namespace CalamityMod.NPCs.AstrumDeus public override Color? GetAlpha(Color drawColor) { - if (NPC.AnyNPCs(mod.NPCType("AstrumDeusHead"))) + if (colorChange) { return new Color(250, 150, Main.DiscoB, npc.alpha); } @@ -387,7 +389,7 @@ namespace CalamityMod.NPCs.AstrumDeus public override bool CanHitPlayer(Player target, ref int cooldownSlot) { - if (NPC.AnyNPCs(mod.NPCType("AstrumDeusHead"))) + if (colorChange) { return false; } @@ -396,11 +398,6 @@ namespace CalamityMod.NPCs.AstrumDeus public override void ModifyHitByProjectile(Projectile projectile, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) { - if (((projectile.type == ProjectileID.HallowStar || projectile.type == ProjectileID.CrystalShard) && projectile.ranged) || - projectile.type == mod.ProjectileType("TerraBulletSplit") || projectile.type == mod.ProjectileType("TerraArrow2")) - { - damage /= 2; - } if (projectile.penetrate == -1 && !projectile.minion && !projectile.thrown) { damage /= 5; @@ -449,10 +446,7 @@ namespace CalamityMod.NPCs.AstrumDeus public override void OnHitPlayer(Player player, int damage, bool crit) { - if (CalamityWorld.downedStarGod) - { - player.AddBuff(mod.BuffType("GodSlayerInferno"), 150, true); - } + player.AddBuff(mod.BuffType("GodSlayerInferno"), 180, true); } public override void ScaleExpertStats(int numPlayers, float bossLifeScale) diff --git a/NPCs/AstrumDeus/AstrumDeusProbe3.cs b/NPCs/AstrumDeus/AstrumDeusProbe3.cs index df42655280..474881891f 100644 --- a/NPCs/AstrumDeus/AstrumDeusProbe3.cs +++ b/NPCs/AstrumDeus/AstrumDeusProbe3.cs @@ -280,10 +280,7 @@ namespace CalamityMod.NPCs.AstrumDeus public override void OnHitPlayer(Player player, int damage, bool crit) { - if (CalamityWorld.downedStarGod) - { - player.AddBuff(mod.BuffType("GodSlayerInferno"), 150, true); - } + player.AddBuff(mod.BuffType("GodSlayerInferno"), 90, true); if (CalamityWorld.revenge) { player.AddBuff(mod.BuffType("MarkedforDeath"), 120); diff --git a/NPCs/AstrumDeus/AstrumDeusTail.cs b/NPCs/AstrumDeus/AstrumDeusTail.cs index 65f654e729..06b4794b9b 100644 --- a/NPCs/AstrumDeus/AstrumDeusTail.cs +++ b/NPCs/AstrumDeus/AstrumDeusTail.cs @@ -31,7 +31,7 @@ namespace CalamityMod.NPCs.AstrumDeus } if (CalamityWorld.bossRushActive) { - npc.lifeMax = CalamityWorld.death ? 740000 : 610000; + npc.lifeMax = CalamityWorld.death ? 840000 : 720000; } npc.aiStyle = 6; //new aiType = -1; //new @@ -94,11 +94,6 @@ namespace CalamityMod.NPCs.AstrumDeus public override void ModifyHitByProjectile(Projectile projectile, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) { - if (((projectile.type == ProjectileID.HallowStar || projectile.type == ProjectileID.CrystalShard) && projectile.ranged) || - projectile.type == mod.ProjectileType("TerraBulletSplit") || projectile.type == mod.ProjectileType("TerraArrow2")) - { - damage /= 2; - } if (projectile.penetrate == -1 && !projectile.minion && !projectile.thrown) { damage /= 5; @@ -152,10 +147,7 @@ namespace CalamityMod.NPCs.AstrumDeus public override void OnHitPlayer(Player player, int damage, bool crit) { - if (CalamityWorld.downedStarGod) - { - player.AddBuff(mod.BuffType("GodSlayerInferno"), 150, true); - } + player.AddBuff(mod.BuffType("GodSlayerInferno"), 90, true); } public override void ScaleExpertStats(int numPlayers, float bossLifeScale) diff --git a/NPCs/AstrumDeus/AstrumDeusTailSpectral.cs b/NPCs/AstrumDeus/AstrumDeusTailSpectral.cs index c75b208198..759cd53fe6 100644 --- a/NPCs/AstrumDeus/AstrumDeusTailSpectral.cs +++ b/NPCs/AstrumDeus/AstrumDeusTailSpectral.cs @@ -31,7 +31,7 @@ namespace CalamityMod.NPCs.AstrumDeus } if (CalamityWorld.bossRushActive) { - npc.lifeMax = CalamityWorld.death ? 2500000 : 1900000; + npc.lifeMax = CalamityWorld.death ? 3000000 : 2500000; } npc.aiStyle = 6; //new aiType = -1; //new @@ -65,8 +65,8 @@ namespace CalamityMod.NPCs.AstrumDeus public override void AI() { - npc.dontTakeDamage = NPC.AnyNPCs(mod.NPCType("AstrumDeusHead")); - npc.chaseable = !NPC.AnyNPCs(mod.NPCType("AstrumDeusHead")); + npc.dontTakeDamage = AstrumDeusHeadSpectral.colorChange; + npc.chaseable = !AstrumDeusHeadSpectral.colorChange; Lighting.AddLight((int)((npc.position.X + (float)(npc.width / 2)) / 16f), (int)((npc.position.Y + (float)(npc.height / 2)) / 16f), 0.2f, 0.05f, 0.2f); if (!Main.npc[(int)npc.ai[1]].active) { @@ -95,7 +95,7 @@ namespace CalamityMod.NPCs.AstrumDeus public override Color? GetAlpha(Color drawColor) { - if (NPC.AnyNPCs(mod.NPCType("AstrumDeusHead"))) + if (AstrumDeusHeadSpectral.colorChange) { return new Color(250, 150, Main.DiscoB, npc.alpha); } @@ -104,7 +104,7 @@ namespace CalamityMod.NPCs.AstrumDeus public override bool CanHitPlayer(Player target, ref int cooldownSlot) { - if (NPC.AnyNPCs(mod.NPCType("AstrumDeusHead"))) + if (AstrumDeusHeadSpectral.colorChange) { return false; } @@ -113,11 +113,6 @@ namespace CalamityMod.NPCs.AstrumDeus public override void ModifyHitByProjectile(Projectile projectile, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) { - if (((projectile.type == ProjectileID.HallowStar || projectile.type == ProjectileID.CrystalShard) && projectile.ranged) || - projectile.type == mod.ProjectileType("TerraBulletSplit") || projectile.type == mod.ProjectileType("TerraArrow2")) - { - damage /= 2; - } if (projectile.penetrate == -1 && !projectile.minion && !projectile.thrown) { damage /= 5; @@ -171,10 +166,7 @@ namespace CalamityMod.NPCs.AstrumDeus public override void OnHitPlayer(Player player, int damage, bool crit) { - if (CalamityWorld.downedStarGod) - { - player.AddBuff(mod.BuffType("GodSlayerInferno"), 150, true); - } + player.AddBuff(mod.BuffType("GodSlayerInferno"), 90, true); } public override void ScaleExpertStats(int numPlayers, float bossLifeScale) diff --git a/NPCs/BrimstoneWaifu/Brimling.cs b/NPCs/BrimstoneWaifu/Brimling.cs index 2ae37cffc7..80d3b0fcb1 100644 --- a/NPCs/BrimstoneWaifu/Brimling.cs +++ b/NPCs/BrimstoneWaifu/Brimling.cs @@ -62,7 +62,7 @@ namespace CalamityMod.NPCs.BrimstoneWaifu } if (CalamityWorld.bossRushActive) { - npc.lifeMax = 150000; + npc.lifeMax = 200000; } } diff --git a/NPCs/BrimstoneWaifu/BrimstoneElemental.cs b/NPCs/BrimstoneWaifu/BrimstoneElemental.cs index 2752b25536..fec244baa4 100644 --- a/NPCs/BrimstoneWaifu/BrimstoneElemental.cs +++ b/NPCs/BrimstoneWaifu/BrimstoneElemental.cs @@ -13,7 +13,7 @@ namespace CalamityMod.NPCs.BrimstoneWaifu [AutoloadBossHead] public class BrimstoneElemental : ModNPC { - private int dustTimer = 60; + private int dustTimer = 90; public override void SetStaticDefaults() { @@ -72,7 +72,7 @@ namespace CalamityMod.NPCs.BrimstoneWaifu } if (CalamityWorld.bossRushActive) { - npc.lifeMax = CalamityWorld.death ? 4000000 : 3500000; + npc.lifeMax = CalamityWorld.death ? 4500000 : 4000000; } } @@ -157,7 +157,7 @@ namespace CalamityMod.NPCs.BrimstoneWaifu Vector2 position = Vector2.Normalize(player.Center - vectorCenter) * (float)(npc.width + 20) / 2f + vectorCenter; int projectile = Projectile.NewProjectile((int)position.X, (int)position.Y, 0f, 0f, mod.ProjectileType("BrimDust"), damage + (provy ? 30 : 0), 0f, Main.myPlayer, 0f, 0f); //changed Main.projectile[projectile].timeLeft = 90; - dustTimer = 60; + dustTimer = 90; } } if (npc.ai[0] == 0f) @@ -237,11 +237,6 @@ namespace CalamityMod.NPCs.BrimstoneWaifu if (npc.alpha <= 0) { npc.damage = expertMode ? 96 : 60; - if (revenge) - { - int damageBoost = (int)(40f * (1f - (float)npc.life / (float)npc.lifeMax)); - npc.damage = npc.damage + damageBoost; - } npc.dontTakeDamage = false; npc.defense = 20; npc.chaseable = true; @@ -269,14 +264,7 @@ namespace CalamityMod.NPCs.BrimstoneWaifu npc.chaseable = true; npc.rotation = npc.velocity.X * 0.04f; npc.spriteDirection = ((npc.direction > 0) ? 1 : -1); - float xVelocity = 6f; //changed from 6 to 7.5 modifies speed while firing projectiles - float yVelocity = 0.12f; //changed from 0.075 to 0.09375 modifies speed while firing projectiles - float yVelocity2 = 0.04f; Vector2 shootFromVectorX = new Vector2(npc.position.X + (float)(npc.width / 2) + (float)(Main.rand.Next(20) * npc.direction), npc.position.Y + (float)npc.height * 0.8f); - Vector2 shootFromVectorY = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); - float playerDistanceX = player.position.X + (float)(player.width / 2) - shootFromVectorY.X; - float playerDistanceY = player.position.Y + (float)(player.height / 2) - 300f - shootFromVectorY.Y; - float totalPlayerDistance = (float)Math.Sqrt((double)(playerDistanceX * playerDistanceX + playerDistanceY * playerDistanceY)); npc.ai[1] += 1f; bool shootProjectile = false; if (npc.GetGlobalNPC(mod).enraged) @@ -348,88 +336,55 @@ namespace CalamityMod.NPCs.BrimstoneWaifu Main.projectile[projectileShot].timeLeft = 240; } } - if (!Collision.CanHit(new Vector2(shootFromVectorX.X, shootFromVectorX.Y - 30f), 1, 1, player.position, player.width, player.height)) - { - xVelocity = 14f; //changed from 14 not a prob - yVelocity = 0.15f; //changed from 0.1 not a prob - yVelocity2 = 0.05f; - shootFromVectorY = shootFromVectorX; - playerDistanceX = player.position.X + (float)(player.width / 2) - shootFromVectorY.X; - playerDistanceY = player.position.Y + (float)(player.height / 2) - shootFromVectorY.Y; - totalPlayerDistance = (float)Math.Sqrt((double)(playerDistanceX * playerDistanceX + playerDistanceY * playerDistanceY)); - totalPlayerDistance = xVelocity / totalPlayerDistance; - if (npc.velocity.X < playerDistanceX) - { - npc.velocity.X = npc.velocity.X + yVelocity; - if (npc.velocity.X < 0f && playerDistanceX > 0f) - { - npc.velocity.X = npc.velocity.X + yVelocity; - } - } - else if (npc.velocity.X > playerDistanceX) - { - npc.velocity.X = npc.velocity.X - yVelocity; - if (npc.velocity.X > 0f && playerDistanceX < 0f) - { - npc.velocity.X = npc.velocity.X - yVelocity; - } - } - if (npc.velocity.Y < playerDistanceY) - { - npc.velocity.Y = npc.velocity.Y + yVelocity2; - if (npc.velocity.Y < 0f && playerDistanceY > 0f) - { - npc.velocity.Y = npc.velocity.Y + yVelocity2; - } - } - else if (npc.velocity.Y > playerDistanceY) - { - npc.velocity.Y = npc.velocity.Y - yVelocity2; - if (npc.velocity.Y > 0f && playerDistanceY < 0f) - { - npc.velocity.Y = npc.velocity.Y - yVelocity2; - } - } - } - else if (totalPlayerDistance > 200f) //100 - { - npc.TargetClosest(true); - npc.spriteDirection = npc.direction; - totalPlayerDistance = xVelocity / totalPlayerDistance; - if (npc.velocity.X < playerDistanceX) - { - npc.velocity.X = npc.velocity.X + yVelocity; - if (npc.velocity.X < 0f && playerDistanceX > 0f) - { - npc.velocity.X = npc.velocity.X + yVelocity * 2f; - } - } - else if (npc.velocity.X > playerDistanceX) - { - npc.velocity.X = npc.velocity.X - yVelocity; - if (npc.velocity.X > 0f && playerDistanceX < 0f) - { - npc.velocity.X = npc.velocity.X - yVelocity * 2f; - } - } - if (npc.velocity.Y < playerDistanceY) - { - npc.velocity.Y = npc.velocity.Y + yVelocity2; - if (npc.velocity.Y < 0f && playerDistanceY > 0f) - { - npc.velocity.Y = npc.velocity.Y + yVelocity2 * 2f; - } - } - else if (npc.velocity.Y > playerDistanceY) - { - npc.velocity.Y = npc.velocity.Y - yVelocity2; - if (npc.velocity.Y > 0f && playerDistanceY < 0f) - { - npc.velocity.Y = npc.velocity.Y - yVelocity2 * 2f; - } - } - } - if (npc.ai[1] > 300f) + if (npc.position.Y > player.position.Y - 150f) //200 + { + if (npc.velocity.Y > 0f) + { + npc.velocity.Y = npc.velocity.Y * 0.98f; + } + npc.velocity.Y = npc.velocity.Y - 0.1f; + if (npc.velocity.Y > 2f) + { + npc.velocity.Y = 2f; + } + } + else if (npc.position.Y < player.position.Y - 400f) //500 + { + if (npc.velocity.Y < 0f) + { + npc.velocity.Y = npc.velocity.Y * 0.98f; + } + npc.velocity.Y = npc.velocity.Y + 0.1f; + if (npc.velocity.Y < -2f) + { + npc.velocity.Y = -2f; + } + } + if (npc.position.X + (float)(npc.width / 2) > player.position.X + (float)(player.width / 2) + 100f) + { + if (npc.velocity.X > 0f) + { + npc.velocity.X = npc.velocity.X * 0.98f; + } + npc.velocity.X = npc.velocity.X - 0.1f; + if (npc.velocity.X > 8f) + { + npc.velocity.X = 8f; + } + } + if (npc.position.X + (float)(npc.width / 2) < player.position.X + (float)(player.width / 2) - 100f) + { + if (npc.velocity.X < 0f) + { + npc.velocity.X = npc.velocity.X * 0.98f; + } + npc.velocity.X = npc.velocity.X + 0.1f; + if (npc.velocity.X < -8f) + { + npc.velocity.X = -8f; + } + } + if (npc.ai[1] > 300f) { npc.ai[0] = 4f; npc.ai[1] = 0f; @@ -518,14 +473,6 @@ namespace CalamityMod.NPCs.BrimstoneWaifu } } - public override void ModifyHitByProjectile(Projectile projectile, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) - { - if ((projectile.type == ProjectileID.HallowStar || projectile.type == ProjectileID.CrystalShard) && projectile.ranged) - { - damage /= 2; - } - } - public override void OnHitPlayer(Player player, int damage, bool crit) { if (CalamityWorld.revenge) @@ -676,9 +623,6 @@ namespace CalamityMod.NPCs.BrimstoneWaifu Gore.NewGore(npc.position, npc.velocity * randomSpread, mod.GetGoreSlot("Gores/BrimstoneGore2"), 1f); Gore.NewGore(npc.position, npc.velocity * randomSpread, mod.GetGoreSlot("Gores/BrimstoneGore3"), 1f); Gore.NewGore(npc.position, npc.velocity * randomSpread, mod.GetGoreSlot("Gores/BrimstoneGore4"), 1f); - Gore.NewGore(npc.position, npc.velocity * randomSpread, mod.GetGoreSlot("Gores/BrimstoneGore5"), 1f); - Gore.NewGore(npc.position, npc.velocity * randomSpread, mod.GetGoreSlot("Gores/BrimstoneGore6"), 1f); - Gore.NewGore(npc.position, npc.velocity * randomSpread, mod.GetGoreSlot("Gores/BrimstoneGore7"), 1f); } } } diff --git a/NPCs/Bumblefuck/Bumblefuck.cs b/NPCs/Bumblefuck/Bumblefuck.cs index 5dc69f7442..a4ad201388 100644 --- a/NPCs/Bumblefuck/Bumblefuck.cs +++ b/NPCs/Bumblefuck/Bumblefuck.cs @@ -24,7 +24,7 @@ namespace CalamityMod.NPCs.Bumblefuck npc.npcSlots = 32f; npc.aiStyle = -1; aiType = -1; - npc.damage = 250; + npc.damage = 200; npc.width = 80; //324 npc.height = 80; //216 npc.defense = 60; @@ -35,7 +35,7 @@ namespace CalamityMod.NPCs.Bumblefuck } if (CalamityWorld.bossRushActive) { - npc.lifeMax = CalamityWorld.death ? 1310000 : 1140000; + npc.lifeMax = CalamityWorld.death ? 1900000 : 1700000; } npc.knockBackResist = 0f; for (int k = 0; k < npc.buffImmune.Length; k++) @@ -83,30 +83,11 @@ namespace CalamityMod.NPCs.Bumblefuck npc.timeLeft = 10; } } - if (npc.target < 0 || player.dead || !player.active) - { - npc.TargetClosest(true); - if (player.dead) - { - npc.ai[0] = -1f; - } - } - else - { - Vector2 vector205 = player.Center - npc.Center; - if (npc.ai[0] > 1f && vector205.Length() > 3600f) - { - npc.ai[0] = 1f; - } - } - if (npc.ai[0] == -1f) - { - Vector2 value50 = new Vector2(0f, -8f); - npc.velocity = (npc.velocity * 9f + value50) / 10f; //9 - npc.noTileCollide = true; - npc.dontTakeDamage = true; - return; - } + Vector2 vector205 = player.Center - npc.Center; + if (npc.ai[0] > 1f && vector205.Length() > 5200f) + { + npc.ai[0] = 1f; + } if (npc.ai[0] == 0f) { npc.TargetClosest(true); @@ -536,22 +517,6 @@ namespace CalamityMod.NPCs.Bumblefuck } } - public override void ModifyHitByProjectile(Projectile projectile, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) - { - Player player = Main.player[npc.target]; - if (player.vortexStealthActive && projectile.ranged) - { - damage /= 2; - crit = false; - } - if (((projectile.type == ProjectileID.HallowStar || projectile.type == ProjectileID.CrystalShard) && projectile.ranged) || - projectile.type == mod.ProjectileType("TerraBulletSplit") || - projectile.type == mod.ProjectileType("TerraArrow2")) - { - damage /= 8; - } - } - public override bool CanHitPlayer(Player target, ref int cooldownSlot) { cooldownSlot = 1; diff --git a/NPCs/Bumblefuck/Bumblefuck2.cs b/NPCs/Bumblefuck/Bumblefuck2.cs index 42075c61f1..63c157e2e0 100644 --- a/NPCs/Bumblefuck/Bumblefuck2.cs +++ b/NPCs/Bumblefuck/Bumblefuck2.cs @@ -23,7 +23,7 @@ namespace CalamityMod.NPCs.Bumblefuck npc.npcSlots = 1f; npc.aiStyle = -1; aiType = -1; - npc.damage = 200; + npc.damage = 140; npc.width = 80; //324 npc.height = 80; //216 npc.scale = 0.66f; diff --git a/NPCs/Bumblefuck/Bumblefuck3.cs b/NPCs/Bumblefuck/Bumblefuck3.cs index f994985411..c229feb435 100644 --- a/NPCs/Bumblefuck/Bumblefuck3.cs +++ b/NPCs/Bumblefuck/Bumblefuck3.cs @@ -23,12 +23,12 @@ namespace CalamityMod.NPCs.Bumblefuck npc.npcSlots = 1f; npc.aiStyle = -1; aiType = -1; - npc.damage = 200; + npc.damage = 170; npc.width = 80; //324 npc.height = 80; //216 npc.scale = 0.85f; npc.defense = 40; - npc.lifeMax = 120000; + npc.lifeMax = 60000; npc.knockBackResist = 0f; for (int k = 0; k < npc.buffImmune.Length; k++) { diff --git a/NPCs/Calamitas/Calamitas.cs b/NPCs/Calamitas/Calamitas.cs index 4444566c4b..51a0f87e55 100644 --- a/NPCs/Calamitas/Calamitas.cs +++ b/NPCs/Calamitas/Calamitas.cs @@ -68,7 +68,7 @@ namespace CalamityMod.NPCs.Calamitas } if (CalamityWorld.bossRushActive) { - npc.lifeMax = CalamityWorld.death ? 2400000 : 2000000; + npc.lifeMax = CalamityWorld.death ? 2600000 : 2200000; } } @@ -154,7 +154,7 @@ namespace CalamityMod.NPCs.Calamitas if (npc.ai[1] == 0f) { float num823 = expertMode ? 10f : 8.5f; - float num824 = expertMode ? 0.2f : 0.175f; + float num824 = expertMode ? 0.185f : 0.165f; Vector2 vector82 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); float num825 = player.position.X + (float)(player.width / 2) - vector82.X; float num826 = player.position.Y + (float)(player.height / 2) - 300f - vector82.Y; @@ -247,7 +247,7 @@ namespace CalamityMod.NPCs.Calamitas num831 = -1; } float num832 = expertMode ? 10f : 8.5f; - float num833 = expertMode ? 0.3f : 0.225f; + float num833 = expertMode ? 0.275f : 0.225f; Vector2 vector83 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); float num834 = player.position.X + (float)(player.width / 2) + (float)(num831 * 360) - vector83.X; float num835 = player.position.Y + (float)(player.height / 2) - vector83.Y; @@ -338,14 +338,6 @@ namespace CalamityMod.NPCs.Calamitas } } - public override void ModifyHitByProjectile(Projectile projectile, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) - { - if (((projectile.type == ProjectileID.HallowStar || projectile.type == ProjectileID.CrystalShard) && projectile.ranged)) - { - damage /= 2; - } - } - public override bool PreNPCLoot() { return false; @@ -423,9 +415,9 @@ namespace CalamityMod.NPCs.Calamitas { if (CalamityWorld.revenge) { - player.AddBuff(mod.BuffType("Horror"), 300, true); + player.AddBuff(mod.BuffType("Horror"), 180, true); } - player.AddBuff(mod.BuffType("BrimstoneFlames"), 200, true); + player.AddBuff(mod.BuffType("BrimstoneFlames"), 300, true); } } } \ No newline at end of file diff --git a/NPCs/Calamitas/CalamitasRun.cs b/NPCs/Calamitas/CalamitasRun.cs index 1bab19994c..da1e7c8534 100644 --- a/NPCs/Calamitas/CalamitasRun.cs +++ b/NPCs/Calamitas/CalamitasRun.cs @@ -23,7 +23,7 @@ namespace CalamityMod.NPCs.Calamitas public override void SetDefaults() { - npc.damage = 70; + npc.damage = 60; npc.npcSlots = 5f; npc.width = 120; //324 npc.height = 120; //216 @@ -69,7 +69,7 @@ namespace CalamityMod.NPCs.Calamitas } if (CalamityWorld.bossRushActive) { - npc.lifeMax = CalamityWorld.death ? 1700000 : 1400000; + npc.lifeMax = CalamityWorld.death ? 1900000 : 1500000; } } @@ -361,14 +361,6 @@ namespace CalamityMod.NPCs.Calamitas } } - public override void ModifyHitByProjectile(Projectile projectile, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) - { - if (((projectile.type == ProjectileID.HallowStar || projectile.type == ProjectileID.CrystalShard) && projectile.ranged)) - { - damage /= 2; - } - } - public override bool CheckActive() { return canDespawn; @@ -437,10 +429,10 @@ namespace CalamityMod.NPCs.Calamitas { if (CalamityWorld.revenge) { - player.AddBuff(mod.BuffType("MarkedforDeath"), 300); - player.AddBuff(mod.BuffType("Horror"), 300, true); + player.AddBuff(mod.BuffType("MarkedforDeath"), 180); + player.AddBuff(mod.BuffType("Horror"), 180, true); } - player.AddBuff(mod.BuffType("BrimstoneFlames"), 180, true); + player.AddBuff(mod.BuffType("BrimstoneFlames"), 300, true); } } } \ No newline at end of file diff --git a/NPCs/Calamitas/CalamitasRun2.cs b/NPCs/Calamitas/CalamitasRun2.cs index 236292301e..d1b1aa6afa 100644 --- a/NPCs/Calamitas/CalamitasRun2.cs +++ b/NPCs/Calamitas/CalamitasRun2.cs @@ -23,7 +23,7 @@ namespace CalamityMod.NPCs.Calamitas public override void SetDefaults() { - npc.damage = 80; + npc.damage = 65; npc.npcSlots = 5f; npc.width = 120; //324 npc.height = 120; //216 @@ -69,7 +69,7 @@ namespace CalamityMod.NPCs.Calamitas } if (CalamityWorld.bossRushActive) { - npc.lifeMax = CalamityWorld.death ? 1400000 : 1100000; + npc.lifeMax = CalamityWorld.death ? 1600000 : 1300000; } } @@ -377,14 +377,6 @@ namespace CalamityMod.NPCs.Calamitas } } - public override void ModifyHitByProjectile(Projectile projectile, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) - { - if (((projectile.type == ProjectileID.HallowStar || projectile.type == ProjectileID.CrystalShard) && projectile.ranged)) - { - damage /= 2; - } - } - public override bool CheckActive() { return canDespawn; @@ -445,10 +437,10 @@ namespace CalamityMod.NPCs.Calamitas { if (CalamityWorld.revenge) { - player.AddBuff(mod.BuffType("MarkedforDeath"), 300); - player.AddBuff(mod.BuffType("Horror"), 300, true); + player.AddBuff(mod.BuffType("MarkedforDeath"), 180); + player.AddBuff(mod.BuffType("Horror"), 180, true); } - player.AddBuff(mod.BuffType("BrimstoneFlames"), 180, true); + player.AddBuff(mod.BuffType("BrimstoneFlames"), 300, true); } } } \ No newline at end of file diff --git a/NPCs/Calamitas/CalamitasRun3.cs b/NPCs/Calamitas/CalamitasRun3.cs index 72d39704fd..9e91ccd0fc 100644 --- a/NPCs/Calamitas/CalamitasRun3.cs +++ b/NPCs/Calamitas/CalamitasRun3.cs @@ -80,7 +80,7 @@ namespace CalamityMod.NPCs.Calamitas } if (CalamityWorld.bossRushActive) { - npc.lifeMax = CalamityWorld.death ? 6200000 : 5500000; + npc.lifeMax = CalamityWorld.death ? 6500000 : 5900000; } } @@ -271,8 +271,8 @@ namespace CalamityMod.NPCs.Calamitas } if (npc.ai[1] == 0f) { - float num823 = expertMode ? 12f : 10.5f; - float num824 = expertMode ? 0.25f : 0.225f; + float num823 = expertMode ? 10.5f : 9f; + float num824 = expertMode ? 0.195f : 0.175f; Vector2 vector82 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); float num825 = player.position.X + (float)(player.width / 2) - vector82.X; float num826 = player.position.Y + (float)(player.height / 2) - 360f - vector82.Y; @@ -372,8 +372,8 @@ namespace CalamityMod.NPCs.Calamitas { num831 = -1; } - float num832 = expertMode ? 13f : 11f; - float num833 = expertMode ? 0.35f : 0.3f; + float num832 = expertMode ? 10.5f : 9f; + float num833 = expertMode ? 0.3f : 0.25f; Vector2 vector83 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); float num834 = player.position.X + (float)(player.width / 2) + (float)(num831 * 360) - vector83.X; float num835 = player.position.Y + (float)(player.height / 2) - vector83.Y; @@ -472,14 +472,6 @@ namespace CalamityMod.NPCs.Calamitas } } - public override void ModifyHitByProjectile(Projectile projectile, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) - { - if (((projectile.type == ProjectileID.HallowStar || projectile.type == ProjectileID.CrystalShard) && projectile.ranged)) - { - damage /= 2; - } - } - public override void NPCLoot() { if (Main.rand.Next(10) == 0) @@ -580,7 +572,7 @@ namespace CalamityMod.NPCs.Calamitas { if (CalamityWorld.revenge) { - player.AddBuff(mod.BuffType("Horror"), 300, true); + player.AddBuff(mod.BuffType("Horror"), 180, true); } player.AddBuff(mod.BuffType("BrimstoneFlames"), 300, true); } diff --git a/NPCs/Calamitas/LifeSeeker.cs b/NPCs/Calamitas/LifeSeeker.cs index 56da35c19a..305e74541f 100644 --- a/NPCs/Calamitas/LifeSeeker.cs +++ b/NPCs/Calamitas/LifeSeeker.cs @@ -49,14 +49,7 @@ namespace CalamityMod.NPCs.Calamitas public override void OnHitPlayer(Player player, int damage, bool crit) { - if (Main.expertMode) - { - player.AddBuff(mod.BuffType("BrimstoneFlames"), 80, true); - } - else - { - player.AddBuff(mod.BuffType("BrimstoneFlames"), 60, true); - } + player.AddBuff(mod.BuffType("BrimstoneFlames"), 120, true); } public override void HitEffect(int hitDirection, double damage) diff --git a/NPCs/CalamityBiomeNPCs/CultistAssassin.cs b/NPCs/CalamityBiomeNPCs/CultistAssassin.cs index d4ac3cff1e..cc5052e01f 100644 --- a/NPCs/CalamityBiomeNPCs/CultistAssassin.cs +++ b/NPCs/CalamityBiomeNPCs/CultistAssassin.cs @@ -65,7 +65,7 @@ namespace CalamityMod.NPCs.CalamityBiomeNPCs { if (CalamityWorld.revenge) { - player.AddBuff(mod.BuffType("Horror"), 300, true); + player.AddBuff(mod.BuffType("Horror"), 180, true); } } diff --git a/NPCs/CalamityBiomeNPCs/DespairStone.cs b/NPCs/CalamityBiomeNPCs/DespairStone.cs index bf1eaa44bd..fefb31eddb 100644 --- a/NPCs/CalamityBiomeNPCs/DespairStone.cs +++ b/NPCs/CalamityBiomeNPCs/DespairStone.cs @@ -333,7 +333,7 @@ namespace CalamityMod.NPCs.CalamityBiomeNPCs { if (CalamityWorld.revenge) { - player.AddBuff(mod.BuffType("Horror"), 300, true); + player.AddBuff(mod.BuffType("Horror"), 180, true); } } diff --git a/NPCs/CalamityBiomeNPCs/Scryllar.cs b/NPCs/CalamityBiomeNPCs/Scryllar.cs index 16279af1e2..0dfeb76835 100644 --- a/NPCs/CalamityBiomeNPCs/Scryllar.cs +++ b/NPCs/CalamityBiomeNPCs/Scryllar.cs @@ -251,7 +251,7 @@ namespace CalamityMod.NPCs.CalamityBiomeNPCs { if (CalamityWorld.revenge) { - player.AddBuff(mod.BuffType("Horror"), 300, true); + player.AddBuff(mod.BuffType("Horror"), 180, true); } } diff --git a/NPCs/CalamityBiomeNPCs/ScryllarRage.cs b/NPCs/CalamityBiomeNPCs/ScryllarRage.cs index 2447bf6538..5381f14e97 100644 --- a/NPCs/CalamityBiomeNPCs/ScryllarRage.cs +++ b/NPCs/CalamityBiomeNPCs/ScryllarRage.cs @@ -251,7 +251,7 @@ namespace CalamityMod.NPCs.CalamityBiomeNPCs { if (CalamityWorld.revenge) { - player.AddBuff(mod.BuffType("Horror"), 300, true); + player.AddBuff(mod.BuffType("Horror"), 180, true); } } diff --git a/NPCs/CalamityBiomeNPCs/SoulSlurper.cs b/NPCs/CalamityBiomeNPCs/SoulSlurper.cs index 3c97cab738..4ccb22b682 100644 --- a/NPCs/CalamityBiomeNPCs/SoulSlurper.cs +++ b/NPCs/CalamityBiomeNPCs/SoulSlurper.cs @@ -217,7 +217,7 @@ namespace CalamityMod.NPCs.CalamityBiomeNPCs { if (CalamityWorld.revenge) { - player.AddBuff(mod.BuffType("Horror"), 300, true); + player.AddBuff(mod.BuffType("Horror"), 180, true); } } diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 440191742a..c66de38450 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -34,8 +34,6 @@ namespace CalamityMod.NPCs #region InstanceVars public static bool DraedonMayhem = false; - public static int DoGSecondStageCountdown = 0; - public float protection = 0f; public float defProtection = 0f; @@ -138,8 +136,6 @@ namespace CalamityMod.NPCs public static int brimstoneElemental = -1; - public static double golemDamageBonus = 1.0; - public int bloodMoonKillCount = 0; #endregion @@ -238,14 +234,13 @@ namespace CalamityMod.NPCs num7++; } } - if (num7 == 0) + if (num7 > 0) { - num7 = 1; - } - npc.lifeRegen -= num7 * 50; - if (damage < num7 * 50 / num8) - { - damage = num7 * 50 / num8; + npc.lifeRegen -= num7 * 50; + if (damage < num7 * 50 / num8) + { + damage = num7 * 50 / num8; + } } } if (irradiated) @@ -450,153 +445,152 @@ namespace CalamityMod.NPCs { if (!CalamityMod.hardModeNerfExceptionList.Contains(npc.type) && npc.lifeMax > 5 && npc.damage > 5) { - double multiplier = Main.expertMode ? 0.6 : 0.8; - npc.lifeMax = (int)((double)npc.lifeMax * multiplier); - npc.damage = (int)((double)npc.damage * multiplier); + npc.lifeMax = (int)((double)npc.lifeMax * 0.75); + npc.damage = (int)((double)npc.damage * 0.75); } } if (CalamityWorld.defiled) { - npc.value = (float)((int)((double)npc.value * 2)); + npc.value = (float)((int)((double)npc.value * 2.0)); } if (CalamityWorld.bossRushActive) { switch (npc.type) { case NPCID.QueenBee: //Tier 1 - npc.lifeMax = 420000; + npc.lifeMax = 840000; break; case NPCID.BrainofCthulhu: - npc.lifeMax = 200000; - break; - case NPCID.Creeper: - npc.lifeMax = 20000; - break; - case NPCID.KingSlime: - npc.lifeMax = 500000; - break; - case NPCID.BlueSlime: - npc.lifeMax = 12000; - break; - case NPCID.SlimeSpiked: - npc.lifeMax = 24000; - break; - case NPCID.EyeofCthulhu: - npc.lifeMax = 600000; - break; - case NPCID.ServantofCthulhu: - npc.lifeMax = 60000; - break; - case NPCID.SkeletronPrime: - npc.lifeMax = 780000; - break; - case NPCID.PrimeCannon: - npc.lifeMax = 350000; - break; - case NPCID.PrimeVice: - npc.lifeMax = 420000; - break; - case NPCID.PrimeSaw: - npc.lifeMax = 450000; - break; - case NPCID.PrimeLaser: - npc.lifeMax = 280000; - break; - case NPCID.Golem: - npc.lifeMax = 780000; - break; - case NPCID.GolemHead: npc.lifeMax = 400000; break; - case NPCID.GolemFistLeft: - npc.lifeMax = 320000; - break; - case NPCID.GolemFistRight: - npc.lifeMax = 320000; - break; - case NPCID.EaterofWorldsHead: - npc.lifeMax = 20000; - break; - case NPCID.EaterofWorldsBody: - npc.lifeMax = 30000; - break; - case NPCID.EaterofWorldsTail: + case NPCID.Creeper: npc.lifeMax = 40000; break; - case NPCID.TheDestroyer: //Tier 2 - npc.lifeMax = 3800000; + case NPCID.KingSlime: + npc.lifeMax = 1000000; break; - case NPCID.TheDestroyerBody: - npc.lifeMax = 3800000; + case NPCID.BlueSlime: + npc.lifeMax = 24000; break; - case NPCID.TheDestroyerTail: - npc.lifeMax = 3800000; + case NPCID.SlimeSpiked: + npc.lifeMax = 48000; break; - case NPCID.Probe: - npc.lifeMax = 85000; + case NPCID.EyeofCthulhu: + npc.lifeMax = 1200000; break; - case NPCID.Spazmatism: - npc.lifeMax = 1300000; + case NPCID.ServantofCthulhu: + npc.lifeMax = 120000; break; - case NPCID.Retinazer: - npc.lifeMax = 950000; + case NPCID.SkeletronPrime: + npc.lifeMax = 1560000; break; - case NPCID.WallofFlesh: - npc.lifeMax = 3200000; + case NPCID.PrimeCannon: + npc.lifeMax = 700000; break; - case NPCID.WallofFleshEye: - npc.lifeMax = 3200000; + case NPCID.PrimeVice: + npc.lifeMax = 880000; break; - case NPCID.SkeletronHead: - npc.lifeMax = 1700000; - break; - case NPCID.SkeletronHand: + case NPCID.PrimeSaw: npc.lifeMax = 900000; break; - case NPCID.CultistBoss: //Tier 3 - npc.lifeMax = 1800000; + case NPCID.PrimeLaser: + npc.lifeMax = 560000; break; - case NPCID.CultistDragonHead: + case NPCID.Golem: + npc.lifeMax = 900000; + break; + case NPCID.GolemHead: + npc.lifeMax = 600000; + break; + case NPCID.GolemFistLeft: npc.lifeMax = 500000; break; - case NPCID.CultistDragonBody1: + case NPCID.GolemFistRight: npc.lifeMax = 500000; break; - case NPCID.CultistDragonBody2: - npc.lifeMax = 500000; + case NPCID.EaterofWorldsHead: + npc.lifeMax = 40000; break; - case NPCID.CultistDragonBody3: - npc.lifeMax = 500000; + case NPCID.EaterofWorldsBody: + npc.lifeMax = 60000; break; - case NPCID.CultistDragonBody4: - npc.lifeMax = 500000; + case NPCID.EaterofWorldsTail: + npc.lifeMax = 80000; break; - case NPCID.CultistDragonTail: - npc.lifeMax = 500000; + case NPCID.TheDestroyer: //Tier 2 + npc.lifeMax = 5000000; break; - case NPCID.AncientCultistSquidhead: - npc.lifeMax = 300000; + case NPCID.TheDestroyerBody: + npc.lifeMax = 5000000; break; - case NPCID.Plantera: - npc.lifeMax = 4200000; + case NPCID.TheDestroyerTail: + npc.lifeMax = 5000000; break; - case NPCID.PlanterasTentacle: - npc.lifeMax = 150000; + case NPCID.Probe: + npc.lifeMax = 100000; break; - case NPCID.DukeFishron: //Tier 4 - npc.lifeMax = 4400000; + case NPCID.Spazmatism: + npc.lifeMax = 1900000; break; - case NPCID.MoonLordCore: + case NPCID.Retinazer: + npc.lifeMax = 1400000; + break; + case NPCID.WallofFlesh: + npc.lifeMax = 4700000; + break; + case NPCID.WallofFleshEye: + npc.lifeMax = 4700000; + break; + case NPCID.SkeletronHead: npc.lifeMax = 2500000; break; + case NPCID.SkeletronHand: + npc.lifeMax = 1000000; + break; + case NPCID.CultistBoss: //Tier 3 + npc.lifeMax = 2200000; + break; + case NPCID.CultistDragonHead: + npc.lifeMax = 800000; + break; + case NPCID.CultistDragonBody1: + npc.lifeMax = 800000; + break; + case NPCID.CultistDragonBody2: + npc.lifeMax = 800000; + break; + case NPCID.CultistDragonBody3: + npc.lifeMax = 800000; + break; + case NPCID.CultistDragonBody4: + npc.lifeMax = 800000; + break; + case NPCID.CultistDragonTail: + npc.lifeMax = 800000; + break; + case NPCID.AncientCultistSquidhead: + npc.lifeMax = 600000; + break; + case NPCID.Plantera: + npc.lifeMax = 5200000; + break; + case NPCID.PlanterasTentacle: + npc.lifeMax = 180000; + break; + case NPCID.DukeFishron: //Tier 4 + npc.lifeMax = 5000000; + break; + case NPCID.MoonLordCore: + npc.lifeMax = 2800000; + break; case NPCID.MoonLordHand: - npc.lifeMax = 875000; + npc.lifeMax = 900000; break; case NPCID.MoonLordHead: - npc.lifeMax = 1250000; + npc.lifeMax = 1200000; break; case NPCID.MoonLordFreeEye: - npc.lifeMax = 1250; + npc.lifeMax = 1500; break; } } @@ -690,7 +684,7 @@ namespace CalamityMod.NPCs } if (CalamityWorld.revenge) { - npc.value = (float)((int)((double)npc.value * 5)); + npc.value = (float)((int)((double)npc.value * 2.0)); if (npc.type == NPCID.MoonLordFreeEye) { npc.lifeMax = (int)((double)npc.lifeMax * 150.0); @@ -777,7 +771,6 @@ namespace CalamityMod.NPCs if (npc.type == NPCID.PlanterasTentacle) { npc.lifeMax = (int)((double)npc.lifeMax * 1.25); - npc.damage = (int)((double)npc.damage * 1.25); } if (!DraedonMayhem) { @@ -799,7 +792,6 @@ namespace CalamityMod.NPCs if (CalamityWorld.death) { npc.lifeMax = (int)((double)npc.lifeMax * 1.9); - npc.damage = (int)((double)npc.damage * 1.5); npc.scale *= 1.2f; } } @@ -871,12 +863,10 @@ namespace CalamityMod.NPCs { npc.noTileCollide = true; npc.lifeMax = (int)((double)npc.lifeMax * 4.5); - npc.damage = (int)((double)npc.damage * 2.5); } else { npc.lifeMax = (int)((double)npc.lifeMax * 2.5); - npc.damage = (int)((double)npc.damage * 1.35); } } if (npc.type == NPCID.LeechHead || npc.type == NPCID.LeechBody || npc.type == NPCID.LeechTail) @@ -884,12 +874,10 @@ namespace CalamityMod.NPCs if (CalamityWorld.death) { npc.lifeMax = (int)((double)npc.lifeMax * 4.5); - npc.damage = (int)((double)npc.damage * 2.5); } else { npc.lifeMax = (int)((double)npc.lifeMax * 3.1); - npc.damage = (int)((double)npc.damage * 1.25); } } if (npc.type == NPCID.SkeletronHead) @@ -932,7 +920,6 @@ namespace CalamityMod.NPCs if (CalamityWorld.death) { npc.lifeMax = (int)((double)npc.lifeMax * 1.9); - npc.damage = (int)((double)npc.damage * 1.25); } else { @@ -945,16 +932,11 @@ namespace CalamityMod.NPCs if (npc.type == NPCID.EaterofWorldsHead) { npc.npcSlots = 10f; - npc.damage = (int)((double)npc.damage * 1.85); if (CalamityWorld.death) { npc.reflectingProjectiles = true; } } - else - { - npc.damage = (int)((double)npc.damage * 1.5); - } if (CalamityWorld.death) { npc.lifeMax = (int)((double)npc.lifeMax * 1.4); //40% boost @@ -1166,10 +1148,6 @@ namespace CalamityMod.NPCs } if (this.protection > 0f) { - if (CalamityWorld.defiled) - { - this.protection += (1f - this.protection) * 0.5f; - } this.defProtection = this.protection; } if (Main.raining && NPC.downedMoonlord && !npc.boss && !npc.friendly && !npc.dontTakeDamage && npc.lifeMax <= 2000) @@ -1186,24 +1164,27 @@ namespace CalamityMod.NPCs npc.life = npc.lifeMax; npc.defDamage = npc.damage; } - if (Main.pumpkinMoon && CalamityWorld.downedDoG && !npc.boss && !npc.friendly && !npc.dontTakeDamage) + if (CalamityWorld.downedDoG) { - npc.lifeMax = (int)((double)npc.lifeMax * 7.5); - npc.damage = (int)((double)npc.damage * 2.0); - npc.life = npc.lifeMax; - npc.defDamage = npc.damage; + if (CalamityMod.pumpkinMoonBuffList.Contains(npc.type)) + { + npc.lifeMax = (int)((double)npc.lifeMax * 7.5); + npc.damage = (int)((double)npc.damage * 2.5); + npc.life = npc.lifeMax; + npc.defDamage = npc.damage; + } + else if (CalamityMod.frostMoonBuffList.Contains(npc.type)) + { + npc.lifeMax = (int)((double)npc.lifeMax * 6.0); + npc.damage = (int)((double)npc.damage * 2.5); + npc.life = npc.lifeMax; + npc.defDamage = npc.damage; + } } - else if (Main.snowMoon && CalamityWorld.downedDoG && !npc.boss && !npc.friendly && !npc.dontTakeDamage) - { - npc.lifeMax = (int)((double)npc.lifeMax * 6.0); - npc.damage = (int)((double)npc.damage * 2.0); - npc.life = npc.lifeMax; - npc.defDamage = npc.damage; - } - else if (Main.eclipse && CalamityWorld.buffedEclipse && !npc.boss && !npc.friendly && !npc.dontTakeDamage) + if (CalamityMod.eclipseBuffList.Contains(npc.type) && CalamityWorld.buffedEclipse) { npc.lifeMax = (int)((double)npc.lifeMax * 32.5); - npc.damage = (int)((double)npc.damage * 2.0); + npc.damage = (int)((double)npc.damage * 3.0); npc.life = npc.lifeMax; npc.defDamage = npc.damage; } @@ -1236,6 +1217,10 @@ namespace CalamityMod.NPCs { playerCount = 20f; } + if (CalamityWorld.bossRushActive && playerCount > 2f) + { + playerCount = 2f; + } float scalar = 0.4f + ((2f * playerCount) / 20f); //lower scaling because fuck u int setToLifeMax = npc.lifeMax; npc.lifeMax = (int)(npc.lifeMax * scalar * bossLifeScale); @@ -1254,7 +1239,7 @@ namespace CalamityMod.NPCs { if (npc.type == NPCID.TargetDummy || npc.type == mod.NPCType("SuperDummy")) { - return Main.player[npc.target].townNPCs >= 3f; + return !CalamityPlayer.areThereAnyDamnBosses; } return null; } @@ -1263,7 +1248,7 @@ namespace CalamityMod.NPCs { if (npc.type == NPCID.TargetDummy || npc.type == mod.NPCType("SuperDummy")) { - return Main.player[npc.target].townNPCs >= 3f; + return !CalamityPlayer.areThereAnyDamnBosses; } return null; } @@ -1273,17 +1258,13 @@ namespace CalamityMod.NPCs public override bool CanHitPlayer(NPC npc, Player target, ref int cooldownSlot) { if (Main.pumpkinMoon && CalamityWorld.downedDoG && !npc.boss && !npc.friendly && !npc.dontTakeDamage) - { cooldownSlot = 1; - } - if (Main.snowMoon && CalamityWorld.downedDoG && !npc.boss && !npc.friendly && !npc.dontTakeDamage) - { + else if (Main.snowMoon && CalamityWorld.downedDoG && !npc.boss && !npc.friendly && !npc.dontTakeDamage) cooldownSlot = 1; - } - if (Main.eclipse && CalamityWorld.buffedEclipse && !npc.boss && !npc.friendly && !npc.dontTakeDamage) - { + else if (Main.eclipse && CalamityWorld.buffedEclipse && !npc.boss && !npc.friendly && !npc.dontTakeDamage) cooldownSlot = 1; - } + if (npc.type == NPCID.BrainofCthulhu && npc.alpha > 0) + return false; return true; } #endregion @@ -1308,9 +1289,14 @@ namespace CalamityMod.NPCs #region StrikeNPC public override bool StrikeNPC(NPC npc, ref double damage, int defense, ref float knockback, int hitDirection, ref bool crit) { + if (npc.type == NPCID.TheDestroyer || npc.type == NPCID.TheDestroyerBody || npc.type == NPCID.TheDestroyerTail) + { + if (this.newAI[1] < 480f) + damage *= 0.1; + } if (enraged) { - damage *= 3.0; + damage *= 5.0; } if (this.protection > 0f) { @@ -1343,7 +1329,7 @@ namespace CalamityMod.NPCs { trueDefense = 0; } - double newDamage = (damage + (int)((double)trueDefense * 0.25)); //defense damage boost 150 * .25 = 45 + 150 = 195 damage 180 defense + double newDamage = (damage + ((double)trueDefense * 0.25)); //defense damage boost 150 * .25 = 45 + 150 = 195 damage 180 defense if (marked) { this.protection *= 0.5f; @@ -1366,7 +1352,7 @@ namespace CalamityMod.NPCs } if (newDamage >= 1.0) { - newDamage = (double)((int)((double)(1f - this.protection) * newDamage)); //DR calc 195 * 0.4 = 78 damage 0.6 DR + newDamage = ((double)(1f - this.protection) * newDamage); //DR calc 195 * 0.4 = 78 damage 0.6 DR if (newDamage < 1.0) { newDamage = 1.0; @@ -1382,14 +1368,29 @@ namespace CalamityMod.NPCs #region PreAI public override bool PreAI(NPC npc) { + if (npc.type == NPCID.KingSlime) + { + if (Main.player[Main.myPlayer].pulley && Main.player[Main.myPlayer].active && + !Main.player[Main.myPlayer].dead && Vector2.Distance(Main.player[Main.myPlayer].Center, npc.Center) < 2800f) + { + Main.player[Main.myPlayer].pulley = false; + } + } if (npc.type == NPCID.TargetDummy || npc.type == mod.NPCType("SuperDummy")) { - npc.chaseable = Main.player[npc.target].townNPCs >= 3f; + npc.chaseable = !CalamityPlayer.areThereAnyDamnBosses; + } + if (npc.type == NPCID.TheDestroyer || npc.type == NPCID.TheDestroyerBody || npc.type == NPCID.TheDestroyerTail) + { + if (this.newAI[1] < 480f) + { + this.newAI[1] += 1f; + } } #region BossRush if (CalamityWorld.bossRushActive && !npc.friendly && !npc.townNPC) { - switch (CalamityPlayer.bossRushStage) + switch (CalamityWorld.bossRushStage) { case 0: if (npc.type != NPCID.QueenBee && npc.type != NPCID.Bee && npc.type != NPCID.BeeSmall) @@ -2061,6 +2062,7 @@ namespace CalamityMod.NPCs else if (npc.type == NPCID.BrainofCthulhu) { NPC.crimsonBoss = npc.whoAmI; + npc.dontTakeDamage = false; if (Main.netMode != 1 && npc.localAI[0] == 0f) { npc.localAI[0] = 1f; @@ -2106,7 +2108,6 @@ namespace CalamityMod.NPCs } npc.netUpdate = true; } - npc.dontTakeDamage = false; npc.knockBackResist = 0f; npc.TargetClosest(true); Vector2 vector98 = new Vector2(npc.Center.X, npc.Center.Y); @@ -5335,7 +5336,7 @@ namespace CalamityMod.NPCs } else { - npc.damage = (int)(28f * Main.expertDamage); //56 + npc.damage = (int)(20f * Main.expertDamage); } if (npc.ai[1] == 0f & flag2) { @@ -5742,21 +5743,24 @@ namespace CalamityMod.NPCs float num1133 = (float)(-(float)flag90.ToDirectionInt()); if (npc.ai[0] == -2f) { - if (npc.type == NPCID.MoonLordHead && NPC.CountNPCS(mod.NPCType("Eidolist")) < 1) + if (npc.type == NPCID.MoonLordHead) { - if (NPC.CountNPCS(NPCID.MoonLordFreeEye) <= 3 || enraged) + if (NPC.CountNPCS(mod.NPCType("Eidolist")) < 1) { - if (this.newAI[1] < 600f) + if (NPC.CountNPCS(NPCID.MoonLordFreeEye) <= 3 || enraged) { - this.newAI[1] += 1f; - } - if (this.newAI[1] >= 600f) - { - this.newAI[1] = 0f; - npc.netUpdate = true; - if (Main.netMode != 1) + if (this.newAI[1] < 600f) { - NPC.NewNPC((int)npc.Center.X, (int)npc.Center.Y, mod.NPCType("Eidolist"), 0, 0f, 0f, 0f, 0f, 255); + this.newAI[1] += 1f; + } + if (this.newAI[1] >= 600f) + { + this.newAI[1] = 0f; + npc.netUpdate = true; + if (Main.netMode != 1) + { + NPC.NewNPC((int)npc.Center.X, (int)npc.Center.Y, mod.NPCType("Eidolist"), 0, 0f, 0f, 0f, 0f, 255); + } } } } @@ -5979,7 +5983,7 @@ namespace CalamityMod.NPCs bool flag4 = npc.ai[0] > 9f; if (flag4) { - npc.damage = (int)((float)npc.defDamage * ((CalamityWorld.death || CalamityWorld.bossRushActive) ? 1.4f : 1.3f) * num); + npc.damage = (int)((float)npc.defDamage * 1.1f * num); npc.defense = 38; this.newAI[0] += 1f; if (this.newAI[0] >= 480f) @@ -5994,13 +5998,13 @@ namespace CalamityMod.NPCs } else if (flag3) { - npc.damage = (int)((float)npc.defDamage * 1.5f * num); + npc.damage = (int)((float)npc.defDamage * 1.2f * num); npc.defense = (int)((float)npc.defDefense * 1.1f); } else { - npc.damage = (int)((float)npc.defDamage * 1.2f * num); - npc.defense = (int)((float)npc.defDefense * 1.2f); + npc.damage = npc.defDamage; + npc.defense = npc.defDefense; } if (npc.ai[0] == -1f || npc.ai[0] == 4f || npc.ai[0] == 9f || (Main.player[npc.target].position.Y < 800f || (double)Main.player[npc.target].position.Y > Main.worldSurface * 16.0 || (Main.player[npc.target].position.X > 6400f && Main.player[npc.target].position.X < (float)(Main.maxTilesX * 16 - 6400)))) { @@ -6037,77 +6041,52 @@ namespace CalamityMod.NPCs } #endregion #region Golem - else if (npc.type == NPCID.GolemHeadFree && NPC.CountNPCS(NPCID.Golem) > 0 && !CalamityWorld.bossRushActive) + else if (npc.type == NPCID.GolemHeadFree && !CalamityWorld.bossRushActive) { - if ((double)Main.npc[NPC.golemBoss].life < (double)Main.npc[NPC.golemBoss].lifeMax * 0.4) + if (NPC.CountNPCS(NPCID.Golem) > 0) { - golemDamageBonus = 1.3; - } - else if ((double)Main.npc[NPC.golemBoss].life < (double)Main.npc[NPC.golemBoss].lifeMax * 0.8) - { - golemDamageBonus = 1.25; - } - npc.ai[1] -= 0.25f; //0.75 - if ((double)Main.npc[NPC.golemBoss].life < (double)Main.npc[NPC.golemBoss].lifeMax * 0.8) - { - npc.ai[1] -= 0.75f; //1 - } - if ((double)Main.npc[NPC.golemBoss].life < (double)Main.npc[NPC.golemBoss].lifeMax * 0.6) - { - npc.ai[1] -= 0.75f; //1.25 - } - if ((double)Main.npc[NPC.golemBoss].life < (double)Main.npc[NPC.golemBoss].lifeMax * 0.2) - { - npc.ai[1] -= 0.75f; //1.5 - } - if ((double)Main.npc[NPC.golemBoss].life < (double)Main.npc[NPC.golemBoss].lifeMax * 0.1) - { - npc.ai[1] -= 0.75f; //1.75 - } - npc.ai[2] -= 0.25f; //0.75 - if (Main.npc[NPC.golemBoss].life < Main.npc[NPC.golemBoss].lifeMax / 2) - { - npc.ai[2] -= 0.75f; //1 - } - if (Main.npc[NPC.golemBoss].life < Main.npc[NPC.golemBoss].lifeMax / 3) - { - npc.ai[2] -= 0.75f; //1.25 - } - if (Main.npc[NPC.golemBoss].life < Main.npc[NPC.golemBoss].lifeMax / 4) - { - npc.ai[2] -= 0.5f; //1.75 - } - if (Main.npc[NPC.golemBoss].life < Main.npc[NPC.golemBoss].lifeMax / 5) - { - npc.ai[2] -= 0.5f; //1.25 - } - if (Main.npc[NPC.golemBoss].life < Main.npc[NPC.golemBoss].lifeMax / 6) - { - npc.ai[2] -= 0.25f; //2 + npc.ai[1] -= 0.25f; //0.75 + if ((double)Main.npc[NPC.golemBoss].life < (double)Main.npc[NPC.golemBoss].lifeMax * 0.8) + { + npc.ai[1] -= 0.75f; //1 + } + if ((double)Main.npc[NPC.golemBoss].life < (double)Main.npc[NPC.golemBoss].lifeMax * 0.6) + { + npc.ai[1] -= 0.75f; //1.25 + } + if ((double)Main.npc[NPC.golemBoss].life < (double)Main.npc[NPC.golemBoss].lifeMax * 0.2) + { + npc.ai[1] -= 0.75f; //1.5 + } + if ((double)Main.npc[NPC.golemBoss].life < (double)Main.npc[NPC.golemBoss].lifeMax * 0.1) + { + npc.ai[1] -= 0.75f; //1.75 + } + npc.ai[2] -= 0.25f; //0.75 + if (Main.npc[NPC.golemBoss].life < Main.npc[NPC.golemBoss].lifeMax / 2) + { + npc.ai[2] -= 0.75f; //1 + } + if (Main.npc[NPC.golemBoss].life < Main.npc[NPC.golemBoss].lifeMax / 3) + { + npc.ai[2] -= 0.75f; //1.25 + } + if (Main.npc[NPC.golemBoss].life < Main.npc[NPC.golemBoss].lifeMax / 4) + { + npc.ai[2] -= 0.5f; //1.75 + } + if (Main.npc[NPC.golemBoss].life < Main.npc[NPC.golemBoss].lifeMax / 5) + { + npc.ai[2] -= 0.5f; //1.25 + } + if (Main.npc[NPC.golemBoss].life < Main.npc[NPC.golemBoss].lifeMax / 6) + { + npc.ai[2] -= 0.25f; //2 + } } } else if (npc.type == NPCID.GolemHead && !CalamityWorld.bossRushActive) { - if ((double)npc.life < (double)npc.lifeMax * 0.15) - { - golemDamageBonus = 1.2; - } - else if ((double)npc.life < (double)npc.lifeMax * 0.33) - { - golemDamageBonus = 1.15; - } - else if ((double)npc.life < (double)npc.lifeMax * 0.5) - { - golemDamageBonus = 1.1; - } - else if ((double)npc.life < (double)npc.lifeMax * 0.8) - { - golemDamageBonus = 1.05; - } - else - { - golemDamageBonus = 1.0; - } if (npc.ai[0] == 1f) { npc.ai[1] -= 0.25f; //0.75 @@ -6137,7 +6116,6 @@ namespace CalamityMod.NPCs else if (npc.type == NPCID.GolemFistLeft || npc.type == NPCID.GolemFistRight) { npc.life = 4000; - npc.damage = 120; npc.dontTakeDamage = true; } #endregion @@ -6163,11 +6141,10 @@ namespace CalamityMod.NPCs if (npc.life > npc.lifeMax / 2) { npc.defense = 42; - npc.damage = (int)(60f * Main.damageMultiplier); //120 if (!jungle && !CalamityWorld.bossRushActive) { - npc.defense *= 2; - npc.damage *= 2; + npc.defense = 200; + npc.damage = (int)(120f * Main.damageMultiplier); } if (Main.netMode != 1) { @@ -6177,11 +6154,10 @@ namespace CalamityMod.NPCs else { npc.defense = 22; - npc.damage = (int)(100f * Main.damageMultiplier); //200 if (!jungle && !CalamityWorld.bossRushActive) { - npc.defense *= 4; - npc.damage *= 2; + npc.defense = 400; + npc.damage = (int)(200f * Main.damageMultiplier); } this.newAI[0] += 1f; if (CalamityWorld.death || CalamityWorld.bossRushActive) @@ -6203,6 +6179,10 @@ namespace CalamityMod.NPCs { this.newAI[1] += 0.5f; } + if (!jungle) + { + this.newAI[1] += 2f; + } if (this.newAI[1] >= (enraged ? 180f : 240f)) { this.newAI[1] = 0f; @@ -6216,7 +6196,7 @@ namespace CalamityMod.NPCs num350 *= num351; if (Main.netMode != 1) { - float num418 = 12f; + float num418 = (!jungle ? 24f : 12f); int num419 = 32; int num420 = 277; num351 = (float)Math.Sqrt((double)(num349 * num349 + num350 * num350)); @@ -6474,7 +6454,6 @@ namespace CalamityMod.NPCs { npc.dontTakeDamage = false; } - npc.damage = (int)((double)npc.defDamage * 1.2); npc.defense = npc.defDefense + 20; if (npc.ai[1] == 0f) { @@ -6557,7 +6536,6 @@ namespace CalamityMod.NPCs { npc.dontTakeDamage = false; } - npc.damage = (int)((double)npc.defDamage * 1.2); npc.defense = npc.defDefense + 30; if (npc.ai[1] == 0f) { @@ -6604,18 +6582,18 @@ namespace CalamityMod.NPCs } else { - npc.ai[2] += (retAlive ? 0.35f : 0.5f); - npc.velocity.X *= (retAlive ? 1.005f : 1.007f); - npc.velocity.Y *= (retAlive ? 1.005f : 1.007f); + npc.ai[2] += (retAlive ? 0.1f : 0.5f); + npc.velocity.X *= (retAlive ? 1.001f : 1.005f); + npc.velocity.Y *= (retAlive ? 1.001f : 1.005f); if (CalamityWorld.death || CalamityWorld.bossRushActive) { - npc.velocity.X *= (retAlive ? 1.001f : 1.002f); - npc.velocity.Y *= (retAlive ? 1.001f : 1.002f); + npc.velocity.X *= (retAlive ? 1.0005f : 1.001f); + npc.velocity.Y *= (retAlive ? 1.0005f : 1.001f); } if (enraged) { - npc.velocity.X *= 1.002f; - npc.velocity.Y *= 1.002f; + npc.velocity.X *= 1.003f; + npc.velocity.Y *= 1.003f; } } } @@ -6657,13 +6635,13 @@ namespace CalamityMod.NPCs laserSpeedBoost = System.Math.Abs(Main.player[npc.target].velocity.Y); } float speed = 2f + laserSpeedBoost; - if (speed < 8f) + if (speed < 7f) { - speed = 8f; + speed = 7f; } - if (speed > 12f) + if (speed > 10f) { - speed = 12f; + speed = 10f; } if ((double)npc.life <= (double)npc.lifeMax * 0.7) { @@ -6677,6 +6655,14 @@ namespace CalamityMod.NPCs { speed += CalamityWorld.death ? 0.5f : 0.33f; } + int num9 = 26; + int num10 = 100; + int value = (CalamityWorld.death || CalamityWorld.bossRushActive) ? 3 : 4; + if (Main.rand.Next(value) == 0 || enraged) + { + num10 = (Main.rand.Next(4) == 0 ? mod.ProjectileType("DestroyerHomingLaser") : 257); + num9 = 29; + } Vector2 vector = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)(npc.height / 2)); float num6 = Main.player[npc.target].position.X + (float)Main.player[npc.target].width * 0.5f - vector.X + (float)Main.rand.Next(-20, 21); float num7 = Main.player[npc.target].position.Y + (float)Main.player[npc.target].height * 0.5f - vector.Y + (float)Main.rand.Next(-20, 21); @@ -6684,18 +6670,13 @@ namespace CalamityMod.NPCs num8 = speed / num8; num6 *= num8; num7 *= num8; - int num9 = 26; - int num10 = 100; - int value = (CalamityWorld.death || CalamityWorld.bossRushActive) ? 3 : 4; - if (Main.rand.Next(value) == 0 || enraged) - { - num10 = 257; - num9 = 23; - } vector.X += num6 * 5f; vector.Y += num7 * 5f; int num11 = Projectile.NewProjectile(vector.X, vector.Y, num6, num7, num10, num9, 0f, Main.myPlayer, 0f, 0f); - Main.projectile[num11].timeLeft = 300; + if (num10 != mod.ProjectileType("DestroyerHomingLaser")) + { + Main.projectile[num11].timeLeft = 300; + } if (shootNoTileCollideLaser) { Main.projectile[num11].tileCollide = false; @@ -6726,106 +6707,109 @@ namespace CalamityMod.NPCs npc.velocity.X *= 1.12f; } } - else if (npc.type == NPCID.WallofFleshEye && NPC.CountNPCS(NPCID.WallofFlesh) > 0) + else if (npc.type == NPCID.WallofFleshEye) { - Vector2 vector34 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); - float num349 = Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2) - vector34.X; - float num350 = Main.player[npc.target].position.Y + (float)(Main.player[npc.target].height / 2) - vector34.Y; - float num351 = (float)Math.Sqrt((double)(num349 * num349 + num350 * num350)); - num349 *= num351; - num350 *= num351; - bool flag30 = true; - if (npc.direction > 0) - { - if (Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2) < npc.position.X + (float)(npc.width / 2)) - { - flag30 = false; - } - } - else if (Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2) > npc.position.X + (float)(npc.width / 2)) - { - flag30 = false; - } - if (Main.netMode != 1) - { - int num352 = (enraged ? 7 : 4); - npc.localAI[1] = 0f; - npc.localAI[3] += (enraged ? 4f : 2f); - if ((double)Main.npc[Main.wof].life < (double)Main.npc[Main.wof].lifeMax * 0.75) - { - npc.localAI[3] += 1f; - num352++; - } - if ((double)Main.npc[Main.wof].life < (double)Main.npc[Main.wof].lifeMax * 0.5) - { - npc.localAI[3] += 1f; - num352++; - } - if ((double)Main.npc[Main.wof].life < (double)Main.npc[Main.wof].lifeMax * 0.25) - { - npc.localAI[3] += 1f; - num352 += 2; - } - if ((double)Main.npc[Main.wof].life < (double)Main.npc[Main.wof].lifeMax * 0.1 || CalamityWorld.bossRushActive) - { - npc.localAI[3] += 2f; - num352 += 3; - } - if (this.newAI[0] == 0f) - { - if (npc.localAI[3] > 600f) - { - this.newAI[0] = 1f; - npc.localAI[3] = 0f; - return; - } - } - else if (npc.localAI[3] > 45f && Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height)) - { - npc.localAI[3] = 0f; - this.newAI[0] += 1f; - if (this.newAI[0] >= (float)num352) - { - this.newAI[0] = 0f; - } - if (flag30) - { - float num353 = (enraged ? 14f : 10f); - int num354 = 18; - int num355 = 83; - if ((double)Main.npc[Main.wof].life < (double)Main.npc[Main.wof].lifeMax * 0.5) - { - num354++; - num353 += 1f; - } - if ((double)Main.npc[Main.wof].life < (double)Main.npc[Main.wof].lifeMax * 0.25) - { - num354++; - num353 += 1f; - } - if ((double)Main.npc[Main.wof].life < (double)Main.npc[Main.wof].lifeMax * 0.1 || CalamityWorld.bossRushActive) - { - num354 += 2; - num353 += 2f; - } - if (CalamityWorld.death || CalamityWorld.bossRushActive) + if (NPC.CountNPCS(NPCID.WallofFlesh) > 0) + { + Vector2 vector34 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); + float num349 = Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2) - vector34.X; + float num350 = Main.player[npc.target].position.Y + (float)(Main.player[npc.target].height / 2) - vector34.Y; + float num351 = (float)Math.Sqrt((double)(num349 * num349 + num350 * num350)); + num349 *= num351; + num350 *= num351; + bool flag30 = true; + if (npc.direction > 0) + { + if (Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2) < npc.position.X + (float)(npc.width / 2)) + { + flag30 = false; + } + } + else if (Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2) > npc.position.X + (float)(npc.width / 2)) + { + flag30 = false; + } + if (Main.netMode != 1) + { + int num352 = (enraged ? 7 : 4); + npc.localAI[1] = 0f; + npc.localAI[3] += (enraged ? 4f : 2f); + if ((double)Main.npc[Main.wof].life < (double)Main.npc[Main.wof].lifeMax * 0.75) + { + npc.localAI[3] += 1f; + num352++; + } + if ((double)Main.npc[Main.wof].life < (double)Main.npc[Main.wof].lifeMax * 0.5) + { + npc.localAI[3] += 1f; + num352++; + } + if ((double)Main.npc[Main.wof].life < (double)Main.npc[Main.wof].lifeMax * 0.25) + { + npc.localAI[3] += 1f; + num352 += 2; + } + if ((double)Main.npc[Main.wof].life < (double)Main.npc[Main.wof].lifeMax * 0.1 || CalamityWorld.bossRushActive) + { + npc.localAI[3] += 2f; + num352 += 3; + } + if (this.newAI[0] == 0f) + { + if (npc.localAI[3] > 600f) { - num353 += 1f; + this.newAI[0] = 1f; + npc.localAI[3] = 0f; + return; } - vector34 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); - num349 = Main.player[npc.target].position.X + (float)Main.player[npc.target].width * 0.5f - vector34.X; - num350 = Main.player[npc.target].position.Y + (float)Main.player[npc.target].height * 0.5f - vector34.Y; - num351 = (float)Math.Sqrt((double)(num349 * num349 + num350 * num350)); - num351 = num353 / num351; - num349 *= num351; - num350 *= num351; - vector34.X += num349; - vector34.Y += num350; - Projectile.NewProjectile(vector34.X, vector34.Y, num349, num350, num355, num354, 0f, Main.myPlayer, 0f, 0f); - return; - } - } - } + } + else if (npc.localAI[3] > 45f && Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height)) + { + npc.localAI[3] = 0f; + this.newAI[0] += 1f; + if (this.newAI[0] >= (float)num352) + { + this.newAI[0] = 0f; + } + if (flag30) + { + float num353 = (enraged ? 14f : 10f); + int num354 = 18; + int num355 = 83; + if ((double)Main.npc[Main.wof].life < (double)Main.npc[Main.wof].lifeMax * 0.5) + { + num354++; + num353 += 1f; + } + if ((double)Main.npc[Main.wof].life < (double)Main.npc[Main.wof].lifeMax * 0.25) + { + num354++; + num353 += 1f; + } + if ((double)Main.npc[Main.wof].life < (double)Main.npc[Main.wof].lifeMax * 0.1 || CalamityWorld.bossRushActive) + { + num354 += 2; + num353 += 2f; + } + if (CalamityWorld.death || CalamityWorld.bossRushActive) + { + num353 += 1f; + } + vector34 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); + num349 = Main.player[npc.target].position.X + (float)Main.player[npc.target].width * 0.5f - vector34.X; + num350 = Main.player[npc.target].position.Y + (float)Main.player[npc.target].height * 0.5f - vector34.Y; + num351 = (float)Math.Sqrt((double)(num349 * num349 + num350 * num350)); + num351 = num353 / num351; + num349 *= num351; + num350 *= num351; + vector34.X += num349; + vector34.Y += num350; + Projectile.NewProjectile(vector34.X, vector34.Y, num349, num350, num355, num354, 0f, Main.myPlayer, 0f, 0f); + return; + } + } + } + } } #endregion #region Skeletron @@ -6895,7 +6879,6 @@ namespace CalamityMod.NPCs float num175 = (float)Math.Sqrt((double)(num173 * num173 + num174 * num174)); float num176 = CalamityWorld.bossRushActive ? 10f : 5f; if (enraged) { num176 += 3f; } - npc.damage = (int)((double)npc.defDamage * 1.2); if (num175 > 150f) { num176 *= 1.05f; @@ -6946,8 +6929,6 @@ namespace CalamityMod.NPCs else if (npc.type == NPCID.QueenBee) { Vector2 vector74 = new Vector2(npc.position.X + (float)(npc.width / 2) + (float)(Main.rand.Next(20) * npc.direction), npc.position.Y + (float)npc.height * 0.8f); - int damageBoost = (int)(40f * (1f - (float)npc.life / (float)npc.lifeMax)); - npc.damage = npc.defDamage + damageBoost; if (npc.ai[0] == 1f) { npc.ai[1] += 1f; @@ -7025,7 +7006,7 @@ namespace CalamityMod.NPCs if (npc.ai[0] < 0f) { this.newAI[0] += 1f; - if (this.newAI[0] >= 240f) + if (this.newAI[0] >= 480f) { this.newAI[0] = 0f; if (Main.netMode != 1 && NPC.CountNPCS(NPCID.Creeper) < 15) @@ -7040,7 +7021,7 @@ namespace CalamityMod.NPCs else { this.newAI[0] += 1f; - if (this.newAI[0] >= 300f) + if (this.newAI[0] >= 600f) { this.newAI[0] = 0f; if (Main.netMode != 1 && NPC.CountNPCS(NPCID.Creeper) < 10) @@ -7169,7 +7150,14 @@ namespace CalamityMod.NPCs #region OnHitPlayer public override void OnHitPlayer(NPC npc, Player target, int damage, bool crit) { - if (CalamityWorld.revenge) + if (target.GetModPlayer(mod).snowman) + { + if (npc.type == NPCID.Demon || npc.type == NPCID.VoodooDemon || npc.type == NPCID.RedDevil) + { + target.AddBuff(mod.BuffType("PopoNoseless"), 36000); + } + } + if (CalamityWorld.revenge) { if (npc.type == NPCID.DemonEye) { @@ -7653,52 +7641,11 @@ namespace CalamityMod.NPCs #region ModifyHitByProjectile public override void ModifyHitByProjectile(NPC npc, Projectile projectile, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) { - if (npc.type == NPCID.TheDestroyerBody || npc.type == NPCID.TheDestroyer || npc.type == NPCID.TheDestroyerTail || npc.type == NPCID.SkeletronPrime || - npc.type == NPCID.PrimeVice || npc.type == NPCID.PrimeCannon || npc.type == NPCID.PrimeSaw || npc.type == NPCID.PrimeLaser || - npc.type == NPCID.Spazmatism || npc.type == NPCID.Retinazer || npc.type == NPCID.Plantera) + if (npc.type == NPCID.TheDestroyerBody || npc.type == mod.NPCType("AquaticScourgeBody") || npc.type == mod.NPCType("AquaticScourgeBodyAlt")) { - if ((projectile.type == ProjectileID.HallowStar || projectile.type == ProjectileID.CrystalShard) && projectile.ranged) - { - damage /= 2; - } - } - else if (npc.type == NPCID.Golem || npc.type == NPCID.DukeFishron || npc.type == NPCID.CultistBoss || npc.type == NPCID.MoonLordFreeEye || - npc.type == NPCID.MoonLordCore || npc.type == NPCID.MoonLordHead || npc.type == NPCID.MoonLordHand) - { - if (((projectile.type == ProjectileID.HallowStar || projectile.type == ProjectileID.CrystalShard) && projectile.ranged) || - projectile.type == mod.ProjectileType("TerraBulletSplit") || projectile.type == mod.ProjectileType("TerraArrow2")) - { - damage /= 4; - } - } - if (CalamityWorld.revenge) - { - if (projectile.type == ProjectileID.BallOHurt || - projectile.type == ProjectileID.TheMeatball || - projectile.type == ProjectileID.BlueMoon || - projectile.type == ProjectileID.Sunfury || - projectile.type == ProjectileID.TheDaoofPow || - projectile.type == ProjectileID.FlowerPow || - projectile.type == ProjectileID.FlowerPowPetal || - projectile.type == ProjectileID.Anchor || - projectile.type == ProjectileID.BoxingGlove || - projectile.type == ProjectileID.GolemFist) - { - damage = (int)((double)damage * 2); - } - if (projectile.type == ProjectileID.ChainGuillotine) - { - damage = (int)((double)damage * 1.2); - } - if (npc.type == NPCID.TheDestroyerBody || npc.type == mod.NPCType("AquaticScourgeBody") || npc.type == mod.NPCType("AquaticScourgeBodyAlt") || - npc.type == mod.NPCType("AquaticScourgeHead") || npc.type == mod.NPCType("AquaticScourgeTail")) - { - if (projectile.type == 239 || projectile.type == 245 || projectile.type == mod.ProjectileType("Shaderain") || projectile.aiStyle == 4 || - projectile.type == 522) - { - damage = (int)((double)damage * 0.65); - } - } + if (projectile.type == 239 || projectile.type == 245 || projectile.type == mod.ProjectileType("Shaderain") || projectile.aiStyle == 4 || + projectile.type == 522) + damage = (int)((double)damage * 0.65); } if (Main.player[projectile.owner].GetModPlayer(mod).eGauntlet) { @@ -7707,7 +7654,7 @@ namespace CalamityMod.NPCs npc.type != mod.NPCType("Reaper") && npc.type != mod.NPCType("Mauler") && npc.type != mod.NPCType("EidolonWyrmHead") && npc.type != mod.NPCType("EidolonWyrmHeadHuge") && npc.type != mod.NPCType("ColossalSquid")) { - if (!AnyBossNPCS()) + if (!CalamityPlayer.areThereAnyDamnBosses) damage = npc.lifeMax * 5; } } @@ -7718,18 +7665,19 @@ namespace CalamityMod.NPCs npc.type != mod.NPCType("Reaper") && npc.type != mod.NPCType("Mauler") && npc.type != mod.NPCType("EidolonWyrmHead") && npc.type != mod.NPCType("EidolonWyrmHeadHuge") && npc.type != mod.NPCType("ColossalSquid")) { - if (!AnyBossNPCS()) + if (!CalamityPlayer.areThereAnyDamnBosses) damage = npc.lifeMax * 5; } } if (Main.player[projectile.owner].GetModPlayer(mod).nanotech) { - if (projectile.thrown && npc.damage > 0 && !npc.boss && !npc.friendly && !npc.dontTakeDamage && Main.rand.Next(15) == 0 && npc.type != 477 && + if (CalamityMod.throwingProjectileList.Contains(projectile.type) && !projectile.melee && + npc.damage > 0 && !npc.boss && !npc.friendly && !npc.dontTakeDamage && Main.rand.Next(15) == 0 && npc.type != 477 && npc.type != 327 && npc.type != 135 && npc.type != 136 && npc.type != 325 && npc.type != 344 && npc.type != 346 && npc.type != 345 && npc.type != mod.NPCType("Reaper") && npc.type != mod.NPCType("Mauler") && npc.type != mod.NPCType("EidolonWyrmHead") && npc.type != mod.NPCType("EidolonWyrmHeadHuge") && npc.type != mod.NPCType("ColossalSquid")) { - if (!AnyBossNPCS()) + if (!CalamityPlayer.areThereAnyDamnBosses) damage = npc.lifeMax * 5; } } @@ -7740,7 +7688,7 @@ namespace CalamityMod.NPCs npc.type != mod.NPCType("Reaper") && npc.type != mod.NPCType("Mauler") && npc.type != mod.NPCType("EidolonWyrmHead") && npc.type != mod.NPCType("EidolonWyrmHeadHuge") && npc.type != mod.NPCType("ColossalSquid")) { - if (!AnyBossNPCS()) + if (!CalamityPlayer.areThereAnyDamnBosses) damage = npc.lifeMax * 5; } } @@ -7751,7 +7699,7 @@ namespace CalamityMod.NPCs npc.type != 344 && npc.type != 346 && npc.type != 345 && npc.type != mod.NPCType("Reaper") && npc.type != mod.NPCType("Mauler") && npc.type != mod.NPCType("EidolonWyrmHead") && npc.type != mod.NPCType("EidolonWyrmHeadHuge") && npc.type != mod.NPCType("ColossalSquid")) { - if (!AnyBossNPCS()) + if (!CalamityPlayer.areThereAnyDamnBosses) damage = npc.lifeMax * 5; } } @@ -7863,75 +7811,75 @@ namespace CalamityMod.NPCs { if (npc.type == mod.NPCType("ProfanedGuardianBoss")) { - CalamityPlayer.bossRushStage = 7; + CalamityWorld.bossRushStage = 7; DespawnProj(); } else if (npc.type == NPCID.EaterofWorldsHead || npc.type == NPCID.EaterofWorldsBody || npc.type == NPCID.EaterofWorldsTail) { if (npc.boss) { - CalamityPlayer.bossRushStage = 8; + CalamityWorld.bossRushStage = 8; DespawnProj(); } } else if (npc.type == mod.NPCType("Astrageldon")) { - CalamityPlayer.bossRushStage = 9; + CalamityWorld.bossRushStage = 9; DespawnProj(); } else if (npc.type == mod.NPCType("Bumblefuck")) { - CalamityPlayer.bossRushStage = 12; + CalamityWorld.bossRushStage = 12; DespawnProj(); } else if (npc.type == mod.NPCType("HiveMindP2")) { - CalamityPlayer.bossRushStage = 14; + CalamityWorld.bossRushStage = 14; DespawnProj(); } else if (npc.type == mod.NPCType("StormWeaverHeadNaked")) { - CalamityPlayer.bossRushStage = 16; + CalamityWorld.bossRushStage = 16; DespawnProj(); } else if (npc.type == mod.NPCType("AquaticScourgeHead")) { - CalamityPlayer.bossRushStage = 17; + CalamityWorld.bossRushStage = 17; DespawnProj(); } else if (npc.type == mod.NPCType("DesertScourgeHead")) { - CalamityPlayer.bossRushStage = 18; + CalamityWorld.bossRushStage = 18; DespawnProj(); } else if (npc.type == mod.NPCType("CrabulonIdle")) { - CalamityPlayer.bossRushStage = 20; + CalamityWorld.bossRushStage = 20; DespawnProj(); } else if (npc.type == mod.NPCType("CeaselessVoid")) { - CalamityPlayer.bossRushStage = 22; + CalamityWorld.bossRushStage = 22; DespawnProj(); } else if (npc.type == mod.NPCType("PerforatorHive")) { - CalamityPlayer.bossRushStage = 23; + CalamityWorld.bossRushStage = 23; DespawnProj(); } else if (npc.type == mod.NPCType("Cryogen")) { - CalamityPlayer.bossRushStage = 24; + CalamityWorld.bossRushStage = 24; DespawnProj(); } else if (npc.type == mod.NPCType("BrimstoneElemental")) { - CalamityPlayer.bossRushStage = 25; + CalamityWorld.bossRushStage = 25; DespawnProj(); } else if (npc.type == mod.NPCType("CosmicWraith")) { - CalamityPlayer.bossRushStage = 26; + CalamityWorld.bossRushStage = 26; DespawnProj(); string key = "Mods.CalamityMod.BossRushTierThreeEndText"; Color messageColor = Color.LightCoral; @@ -7946,27 +7894,27 @@ namespace CalamityMod.NPCs } else if (npc.type == mod.NPCType("ScavengerBody")) { - CalamityPlayer.bossRushStage = 27; + CalamityWorld.bossRushStage = 27; DespawnProj(); } else if (npc.type == mod.NPCType("AstrumDeusHeadSpectral")) { - CalamityPlayer.bossRushStage = 30; + CalamityWorld.bossRushStage = 30; DespawnProj(); } else if (npc.type == mod.NPCType("Polterghast")) { - CalamityPlayer.bossRushStage = 31; + CalamityWorld.bossRushStage = 31; DespawnProj(); } else if (npc.type == mod.NPCType("PlaguebringerGoliath")) { - CalamityPlayer.bossRushStage = 32; + CalamityWorld.bossRushStage = 32; DespawnProj(); } else if (npc.type == mod.NPCType("CalamitasRun3")) { - CalamityPlayer.bossRushStage = 33; + CalamityWorld.bossRushStage = 33; DespawnProj(); string key = "Mods.CalamityMod.BossRushTierFourEndText"; Color messageColor = Color.LightCoral; @@ -7984,7 +7932,7 @@ namespace CalamityMod.NPCs int bossType = (npc.type == mod.NPCType("Siren")) ? mod.NPCType("Leviathan") : mod.NPCType("Siren"); if (!NPC.AnyNPCs(bossType)) { - CalamityPlayer.bossRushStage = 34; + CalamityWorld.bossRushStage = 34; DespawnProj(); } } @@ -7993,40 +7941,41 @@ namespace CalamityMod.NPCs if (npc.type == mod.NPCType("SlimeGodCore") && !NPC.AnyNPCs(mod.NPCType("SlimeGodSplit")) && !NPC.AnyNPCs(mod.NPCType("SlimeGodRunSplit")) && !NPC.AnyNPCs(mod.NPCType("SlimeGod")) && !NPC.AnyNPCs(mod.NPCType("SlimeGodRun"))) { - CalamityPlayer.bossRushStage = 35; + CalamityWorld.bossRushStage = 35; DespawnProj(); } else if (npc.type == mod.NPCType("SlimeGodSplit") && !NPC.AnyNPCs(mod.NPCType("SlimeGodCore")) && !NPC.AnyNPCs(mod.NPCType("SlimeGodRunSplit")) && NPC.CountNPCS(mod.NPCType("SlimeGodSplit")) < 2 && !NPC.AnyNPCs(mod.NPCType("SlimeGodRun"))) { - CalamityPlayer.bossRushStage = 35; + CalamityWorld.bossRushStage = 35; DespawnProj(); } else if (npc.type == mod.NPCType("SlimeGodRunSplit") && !NPC.AnyNPCs(mod.NPCType("SlimeGodCore")) && !NPC.AnyNPCs(mod.NPCType("SlimeGodSplit")) && NPC.CountNPCS(mod.NPCType("SlimeGodRunSplit")) < 2 && !NPC.AnyNPCs(mod.NPCType("SlimeGod"))) { - CalamityPlayer.bossRushStage = 35; + CalamityWorld.bossRushStage = 35; DespawnProj(); } } else if (npc.type == mod.NPCType("Providence")) { - CalamityPlayer.bossRushStage = 36; + CalamityWorld.bossRushStage = 36; DespawnProj(); } else if (npc.type == mod.NPCType("SupremeCalamitas")) { - CalamityPlayer.bossRushStage = 37; + CalamityWorld.bossRushStage = 37; DespawnProj(); } else if (npc.type == mod.NPCType("Yharon")) { - CalamityPlayer.bossRushStage = 38; + CalamityWorld.bossRushStage = 38; DespawnProj(); } else if (npc.type == mod.NPCType("DevourerofGodsHeadS")) { - CalamityPlayer.bossRushStage = 0; + npc.DropItemInstanced(npc.position, npc.Size, mod.ItemType("Rock"), 1, true); + CalamityWorld.bossRushStage = 0; DespawnProj(); CalamityWorld.bossRushActive = false; if (Main.netMode == 2) @@ -8034,7 +7983,7 @@ namespace CalamityMod.NPCs NetMessage.SendData(7, -1, -1, null, 0, 0f, 0f, 0f, 0, 0, 0); var netMessage = mod.GetPacket(); netMessage.Write((byte)CalamityModMessageType.BossRushStage); - netMessage.Write(CalamityPlayer.bossRushStage); + netMessage.Write(CalamityWorld.bossRushStage); netMessage.Send(); } string key = "Mods.CalamityMod.BossRushTierFiveEndText"; @@ -8052,31 +8001,31 @@ namespace CalamityMod.NPCs switch (npc.type) { case NPCID.QueenBee: - CalamityPlayer.bossRushStage = 1; + CalamityWorld.bossRushStage = 1; DespawnProj(); break; case NPCID.BrainofCthulhu: - CalamityPlayer.bossRushStage = 2; + CalamityWorld.bossRushStage = 2; DespawnProj(); break; case NPCID.KingSlime: - CalamityPlayer.bossRushStage = 3; + CalamityWorld.bossRushStage = 3; DespawnProj(); break; case NPCID.EyeofCthulhu: - CalamityPlayer.bossRushStage = 4; + CalamityWorld.bossRushStage = 4; DespawnProj(); break; case NPCID.SkeletronPrime: - CalamityPlayer.bossRushStage = 5; + CalamityWorld.bossRushStage = 5; DespawnProj(); break; case NPCID.Golem: - CalamityPlayer.bossRushStage = 6; + CalamityWorld.bossRushStage = 6; DespawnProj(); break; case NPCID.TheDestroyer: - CalamityPlayer.bossRushStage = 10; + CalamityWorld.bossRushStage = 10; DespawnProj(); string key = "Mods.CalamityMod.BossRushTierOneEndText"; Color messageColor = Color.LightCoral; @@ -8090,23 +8039,23 @@ namespace CalamityMod.NPCs } break; case NPCID.Spazmatism: - CalamityPlayer.bossRushStage = 11; + CalamityWorld.bossRushStage = 11; DespawnProj(); break; case NPCID.Retinazer: - CalamityPlayer.bossRushStage = 11; + CalamityWorld.bossRushStage = 11; DespawnProj(); break; case NPCID.WallofFlesh: - CalamityPlayer.bossRushStage = 13; + CalamityWorld.bossRushStage = 13; DespawnProj(); break; case NPCID.SkeletronHead: - CalamityPlayer.bossRushStage = 15; + CalamityWorld.bossRushStage = 15; DespawnProj(); break; case NPCID.CultistBoss: - CalamityPlayer.bossRushStage = 19; + CalamityWorld.bossRushStage = 19; DespawnProj(); string key2 = "Mods.CalamityMod.BossRushTierTwoEndText"; Color messageColor2 = Color.LightCoral; @@ -8120,15 +8069,15 @@ namespace CalamityMod.NPCs } break; case NPCID.Plantera: - CalamityPlayer.bossRushStage = 21; + CalamityWorld.bossRushStage = 21; DespawnProj(); break; case NPCID.DukeFishron: - CalamityPlayer.bossRushStage = 28; + CalamityWorld.bossRushStage = 28; DespawnProj(); break; case NPCID.MoonLordCore: - CalamityPlayer.bossRushStage = 29; + CalamityWorld.bossRushStage = 29; DespawnProj(); break; default: @@ -8138,7 +8087,7 @@ namespace CalamityMod.NPCs { var netMessage = mod.GetPacket(); netMessage.Write((byte)CalamityModMessageType.BossRushStage); - netMessage.Write(CalamityPlayer.bossRushStage); + netMessage.Write(CalamityWorld.bossRushStage); netMessage.Send(); } return false; @@ -8233,7 +8182,7 @@ namespace CalamityMod.NPCs { if (DraedonMayhem) { - if (!AnyBossNPCS()) + if (!CalamityPlayer.areThereAnyDamnBosses) { DraedonMayhem = false; if (Main.netMode == 2) @@ -8842,7 +8791,7 @@ namespace CalamityMod.NPCs if ((NPC.downedPlantBoss || CalamityWorld.downedCalamitas) && npc.type == NPCID.SandShark && !NPC.AnyNPCs(mod.NPCType("GreatSandShark"))) { CalamityMod.sharkKillCount++; - if (CalamityMod.sharkKillCount >= 20 && Main.netMode != 1) + if (CalamityMod.sharkKillCount >= 10 && Main.netMode != 1) { if (!Main.player[Main.myPlayer].dead && Main.player[Main.myPlayer].active) { @@ -8857,7 +8806,7 @@ namespace CalamityMod.NPCs if (lastPlayer >= 0) { NPC.SpawnOnPlayer(lastPlayer, mod.NPCType("GreatSandShark")); - CalamityMod.sharkKillCount = 0; + CalamityMod.sharkKillCount = -10; } } } @@ -9266,7 +9215,14 @@ namespace CalamityMod.NPCs } else if (npc.type == mod.NPCType("DevourerofGodsHead")) { - DoGSecondStageCountdown = 21600; //6 minutes + CalamityWorld.DoGSecondStageCountdown = 21600; //6 minutes + if (Main.netMode == 2) + { + var netMessage = mod.GetPacket(); + netMessage.Write((byte)CalamityModMessageType.DoGCountdownSync); + netMessage.Write(CalamityWorld.DoGSecondStageCountdown); + netMessage.Send(); + } for (int playerIndex = 0; playerIndex < 255; playerIndex++) { if (Main.player[playerIndex].active) @@ -9386,19 +9342,19 @@ namespace CalamityMod.NPCs #region ArmorSetLoot if (Main.player[(int)Player.FindClosest(npc.position, npc.width, npc.height)].GetModPlayer(mod).tarraSet) { - if (!npc.SpawnedFromStatue && npc.damage > 0 && Main.rand.Next(5) == 0) + if (!npc.SpawnedFromStatue && (npc.damage > 5 || npc.boss) && Main.rand.Next(5) == 0) { Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, 58, 1, false, 0, false, false); } } if (Main.player[(int)Player.FindClosest(npc.position, npc.width, npc.height)].GetModPlayer(mod).bloodflareSet) { - if (!npc.SpawnedFromStatue && npc.damage > 0 && Main.rand.Next(2) == 0 && Main.bloodMoon && npc.HasPlayerTarget && (double)(npc.position.Y / 16f) < Main.worldSurface) + if (!npc.SpawnedFromStatue && (npc.damage > 5 || npc.boss) && Main.rand.Next(2) == 0 && Main.bloodMoon && npc.HasPlayerTarget && (double)(npc.position.Y / 16f) < Main.worldSurface) { Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("BloodOrb")); } } - if (!npc.SpawnedFromStatue && npc.damage > 0 && Main.rand.Next(6) == 0 && Main.bloodMoon && npc.HasPlayerTarget && (double)(npc.position.Y / 16f) < Main.worldSurface) + if (!npc.SpawnedFromStatue && (npc.damage > 5 || npc.boss) && Main.rand.Next(12) == 0 && Main.bloodMoon && npc.HasPlayerTarget && (double)(npc.position.Y / 16f) < Main.worldSurface) { Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("BloodOrb")); } @@ -10397,6 +10353,10 @@ namespace CalamityMod.NPCs { Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("Meowthrower")); } + if (Main.rand.Next(8) == 0) + { + Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("RogueEmblem")); + } if (Main.rand.Next(5) == 0) { Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, ItemID.CrimsonKey); @@ -10509,7 +10469,7 @@ namespace CalamityMod.NPCs { if (!downedPlant) { - CalamityWorld.spawnOre(mod.TileType("PerennialOre"), 12E-05, .4f, .65f); + CalamityWorld.spawnOre(mod.TileType("PerennialOre"), 12E-05, .5f, .7f); if (Main.netMode == 0) { Main.NewText(Language.GetTextValue(key2), messageColor2); @@ -10669,7 +10629,7 @@ namespace CalamityMod.NPCs { string key = "Mods.CalamityMod.SkyOreText"; Color messageColor = Color.Cyan; - CalamityWorld.spawnOre(mod.TileType("AerialiteOre"), 12E-05, .3f, .5f); + CalamityWorld.spawnOre(mod.TileType("AerialiteOre"), 12E-05, .4f, .6f); if (Main.netMode == 0) { Main.NewText(Language.GetTextValue(key), messageColor); @@ -10695,7 +10655,7 @@ namespace CalamityMod.NPCs { string key = "Mods.CalamityMod.SkyOreText"; Color messageColor = Color.Cyan; - CalamityWorld.spawnOre(mod.TileType("AerialiteOre"), 12E-05, .3f, .5f); + CalamityWorld.spawnOre(mod.TileType("AerialiteOre"), 12E-05, .4f, .6f); if (Main.netMode == 0) { Main.NewText(Language.GetTextValue(key), messageColor); @@ -10947,7 +10907,7 @@ namespace CalamityMod.NPCs { string key = "Mods.CalamityMod.IceOreText"; Color messageColor = Color.LightSkyBlue; - CalamityWorld.spawnOre(mod.TileType("CryonicOre"), 15E-05, .35f, .55f); + CalamityWorld.spawnOre(mod.TileType("CryonicOre"), 15E-05, .45f, .65f); if (Main.netMode == 0) { Main.NewText(Language.GetTextValue(key), messageColor); @@ -10997,7 +10957,7 @@ namespace CalamityMod.NPCs Color messageColor3 = Color.LightGreen; if (!CalamityWorld.downedProvidence) { - CalamityWorld.spawnOre(mod.TileType("UelibloomOre"), 15E-05, .3f, .7f); + CalamityWorld.spawnOre(mod.TileType("UelibloomOre"), 15E-05, .4f, .8f); if (Main.netMode == 0) { Main.NewText(Language.GetTextValue(key2), messageColor2); @@ -11018,9 +10978,16 @@ namespace CalamityMod.NPCs else if (npc.type == mod.NPCType("CeaselessVoid")) //boss 12 { CalamityWorld.downedSentinel1 = true; //21600 - if (DoGSecondStageCountdown > 14460) + if (CalamityWorld.DoGSecondStageCountdown > 14460) { - DoGSecondStageCountdown = 14460; + CalamityWorld.DoGSecondStageCountdown = 14460; + if (Main.netMode == 2) + { + var netMessage = mod.GetPacket(); + netMessage.Write((byte)CalamityModMessageType.DoGCountdownSync); + netMessage.Write(CalamityWorld.DoGSecondStageCountdown); + netMessage.Send(); + } } if (Main.netMode == 2) { @@ -11030,9 +10997,16 @@ namespace CalamityMod.NPCs else if (npc.type == mod.NPCType("StormWeaverHeadNaked")) //boss 13 { CalamityWorld.downedSentinel2 = true; //21600 - if (DoGSecondStageCountdown > 7260) + if (CalamityWorld.DoGSecondStageCountdown > 7260) { - DoGSecondStageCountdown = 7260; + CalamityWorld.DoGSecondStageCountdown = 7260; + if (Main.netMode == 2) + { + var netMessage = mod.GetPacket(); + netMessage.Write((byte)CalamityModMessageType.DoGCountdownSync); + netMessage.Write(CalamityWorld.DoGSecondStageCountdown); + netMessage.Send(); + } } if (Main.netMode == 2) { @@ -11042,9 +11016,16 @@ namespace CalamityMod.NPCs else if (npc.type == mod.NPCType("CosmicWraith")) //boss 14 { CalamityWorld.downedSentinel3 = true; //21600 - if (DoGSecondStageCountdown > 600) + if (CalamityWorld.DoGSecondStageCountdown > 600) { - DoGSecondStageCountdown = 600; + CalamityWorld.DoGSecondStageCountdown = 600; + if (Main.netMode == 2) + { + var netMessage = mod.GetPacket(); + netMessage.Write((byte)CalamityModMessageType.DoGCountdownSync); + netMessage.Write(CalamityWorld.DoGSecondStageCountdown); + netMessage.Send(); + } } if (Main.netMode == 2) { @@ -11067,7 +11048,7 @@ namespace CalamityMod.NPCs Color messageColor2 = Color.Gold; if (!CalamityWorld.downedYharon && npc.localAI[2] == 1f) { - CalamityWorld.spawnOre(mod.TileType("AuricOre"), 2E-05, .5f, .8f); + CalamityWorld.spawnOre(mod.TileType("AuricOre"), 2E-05, .6f, .8f); if (Main.netMode == 0) { Main.NewText(Language.GetTextValue(key2), messageColor2); @@ -11169,28 +11150,28 @@ namespace CalamityMod.NPCs { if ((player.ZoneOverworldHeight || player.ZoneSkyHeight) && NPC.downedMoonlord && Main.raining) { - spawnRate = (int)((double)spawnRate * 0.75); - maxSpawns = (int)((float)maxSpawns * 1.25f); + spawnRate = (int)((double)spawnRate * 0.7); + maxSpawns = (int)((float)maxSpawns * 1.2f); } if (player.GetModPlayer(mod).ZoneSulphur) { - spawnRate = (int)((double)spawnRate * 0.6); + spawnRate = (int)((double)spawnRate * 1.1); maxSpawns = (int)((float)maxSpawns * 0.8f); } else if (player.GetModPlayer(mod).ZoneAbyss) { - spawnRate = (int)((double)spawnRate * 0.8); - maxSpawns = (int)((float)maxSpawns * 1.2f); + spawnRate = (int)((double)spawnRate * 0.7); + maxSpawns = (int)((float)maxSpawns * 1.1f); } else if (player.GetModPlayer(mod).ZoneCalamity) { - spawnRate = (int)((double)spawnRate * 0.7); - maxSpawns = (int)((float)maxSpawns * 1.15f); + spawnRate = (int)((double)spawnRate * 0.9); + maxSpawns = (int)((float)maxSpawns * 1.1f); } else if (player.GetModPlayer(mod).ZoneAstral) { - spawnRate = (int)((double)spawnRate * 0.5); - maxSpawns = (int)((float)maxSpawns * 1.15f); + spawnRate = (int)((double)spawnRate * 0.6); + maxSpawns = (int)((float)maxSpawns * 1.2f); } if (CalamityWorld.revenge) { @@ -11209,7 +11190,7 @@ namespace CalamityMod.NPCs spawnRate = (int)((double)spawnRate * 0.01); maxSpawns = (int)((float)maxSpawns * 5f); } - if (AnyBossNPCS() || player.GetModPlayer(mod).zen) + if (CalamityPlayer.areThereAnyDamnBosses || player.GetModPlayer(mod).zen) { spawnRate = (int)((double)spawnRate * (player.GetModPlayer(mod).ZoneAbyss ? 1.5 : 50)); maxSpawns = (int)((float)maxSpawns * (player.GetModPlayer(mod).ZoneAbyss ? 0.75f : 0.01f)); @@ -11231,8 +11212,9 @@ namespace CalamityMod.NPCs #region EditSpawnPool public override void EditSpawnPool(IDictionary pool, NPCSpawnInfo spawnInfo) { - if (spawnInfo.player.GetModPlayer(mod).ZoneAbyss || spawnInfo.player.GetModPlayer(mod).ZoneCalamity || - spawnInfo.player.GetModPlayer(mod).ZoneSulphur || spawnInfo.player.GetModPlayer(mod).ZoneAstral) + if ((spawnInfo.player.GetModPlayer(mod).ZoneAbyss || spawnInfo.player.GetModPlayer(mod).ZoneCalamity || + spawnInfo.player.GetModPlayer(mod).ZoneSulphur || spawnInfo.player.GetModPlayer(mod).ZoneAstral) && + !NPC.LunarApocalypseIsUp) { pool[0] = 0f; } @@ -11636,6 +11618,12 @@ namespace CalamityMod.NPCs } if (type == NPCID.Dryad) { + shop.item[nextSlot].SetDefaults(ItemID.JungleRose); + shop.item[nextSlot].shopCustomPrice = Item.buyPrice(0, 2, 0, 0); + nextSlot++; + shop.item[nextSlot].SetDefaults(ItemID.NaturesGift); + shop.item[nextSlot].shopCustomPrice = Item.buyPrice(0, 10, 0, 0); + nextSlot++; shop.item[nextSlot].SetDefaults(ItemID.GoblinBattleStandard); shop.item[nextSlot].shopCustomPrice = Item.buyPrice(0, 1, 0, 0); nextSlot++; @@ -11739,6 +11727,24 @@ namespace CalamityMod.NPCs nextSlot++; } } + if (type == NPCID.GoblinTinkerer) + { + shop.item[nextSlot].SetDefaults(mod.ItemType("MeleeLevelMeter")); + shop.item[nextSlot].shopCustomPrice = Item.buyPrice(0, 5, 0, 0); + nextSlot++; + shop.item[nextSlot].SetDefaults(mod.ItemType("RangedLevelMeter")); + shop.item[nextSlot].shopCustomPrice = Item.buyPrice(0, 5, 0, 0); + nextSlot++; + shop.item[nextSlot].SetDefaults(mod.ItemType("MagicLevelMeter")); + shop.item[nextSlot].shopCustomPrice = Item.buyPrice(0, 5, 0, 0); + nextSlot++; + shop.item[nextSlot].SetDefaults(mod.ItemType("SummonLevelMeter")); + shop.item[nextSlot].shopCustomPrice = Item.buyPrice(0, 5, 0, 0); + nextSlot++; + shop.item[nextSlot].SetDefaults(mod.ItemType("RogueLevelMeter")); + shop.item[nextSlot].shopCustomPrice = Item.buyPrice(0, 5, 0, 0); + nextSlot++; + } if (type == NPCID.Clothier) { shop.item[nextSlot].SetDefaults(mod.ItemType("BlueBrickWallUnsafe")); @@ -11792,7 +11798,7 @@ namespace CalamityMod.NPCs if (Main.player[Main.myPlayer].GetModPlayer(mod).ZoneAstral && CalamityWorld.spawnAstralMeteor) { shop.item[nextSlot].SetDefaults(mod.ItemType("AstralSolution")); - shop.item[nextSlot].shopCustomPrice = Item.buyPrice(0, 0, 25, 0); + shop.item[nextSlot].shopCustomPrice = Item.buyPrice(0, 0, 5, 0); nextSlot++; } } diff --git a/NPCs/CeaselessVoid/CeaselessVoid.cs b/NPCs/CeaselessVoid/CeaselessVoid.cs index 41b8fdc51f..04def5f2cc 100644 --- a/NPCs/CeaselessVoid/CeaselessVoid.cs +++ b/NPCs/CeaselessVoid/CeaselessVoid.cs @@ -37,7 +37,7 @@ namespace CalamityMod.NPCs.CeaselessVoid npc.lifeMax = 400; } music = mod.GetSoundSlot(SoundType.Music, "Sounds/Music/ScourgeofTheUniverse"); - if (CalamityGlobalNPC.DoGSecondStageCountdown <= 0) + if (CalamityWorld.DoGSecondStageCountdown <= 0) { music = mod.GetSoundSlot(SoundType.Music, "Sounds/Music/Void"); } @@ -88,7 +88,14 @@ namespace CalamityMod.NPCs.CeaselessVoid if (!player.active || player.dead) { npc.velocity = new Vector2(0f, -10f); - CalamityGlobalNPC.DoGSecondStageCountdown = 0; + CalamityWorld.DoGSecondStageCountdown = 0; + if (Main.netMode == 2) + { + var netMessage = mod.GetPacket(); + netMessage.Write((byte)CalamityModMessageType.DoGCountdownSync); + netMessage.Write(CalamityWorld.DoGSecondStageCountdown); + netMessage.Send(); + } if (npc.timeLeft > 150) { npc.timeLeft = 150; diff --git a/NPCs/CeaselessVoid/DarkEnergy.cs b/NPCs/CeaselessVoid/DarkEnergy.cs index 2d4bb20bf1..69f43eb7d5 100644 --- a/NPCs/CeaselessVoid/DarkEnergy.cs +++ b/NPCs/CeaselessVoid/DarkEnergy.cs @@ -28,13 +28,13 @@ namespace CalamityMod.NPCs.CeaselessVoid npc.height = 80; //216 npc.defense = 68; npc.lifeMax = 3000; - if (CalamityGlobalNPC.DoGSecondStageCountdown <= 0) + if (CalamityWorld.DoGSecondStageCountdown <= 0) { npc.lifeMax = 12000; } if (CalamityWorld.bossRushActive) { - npc.lifeMax = 30000; + npc.lifeMax = 37000; } npc.knockBackResist = 0.25f; npc.noGravity = true; @@ -117,7 +117,6 @@ namespace CalamityMod.NPCs.CeaselessVoid if (!player.active || player.dead) { npc.velocity = new Vector2(0f, -10f); - CalamityGlobalNPC.DoGSecondStageCountdown = 0; if (npc.timeLeft > 150) { npc.timeLeft = 150; @@ -186,7 +185,7 @@ namespace CalamityMod.NPCs.CeaselessVoid { if (CalamityWorld.revenge) { - player.AddBuff(mod.BuffType("Horror"), 600, true); + player.AddBuff(mod.BuffType("Horror"), 300, true); } } diff --git a/NPCs/CeaselessVoid/DarkEnergy2.cs b/NPCs/CeaselessVoid/DarkEnergy2.cs index c5a413fa14..38b9e37aa4 100644 --- a/NPCs/CeaselessVoid/DarkEnergy2.cs +++ b/NPCs/CeaselessVoid/DarkEnergy2.cs @@ -28,13 +28,13 @@ namespace CalamityMod.NPCs.CeaselessVoid npc.height = 80; //216 npc.defense = 68; npc.lifeMax = 3000; - if (CalamityGlobalNPC.DoGSecondStageCountdown <= 0) + if (CalamityWorld.DoGSecondStageCountdown <= 0) { npc.lifeMax = 12000; } if (CalamityWorld.bossRushActive) { - npc.lifeMax = 30000; + npc.lifeMax = 37000; } npc.knockBackResist = 0.1f; npc.noGravity = true; @@ -104,7 +104,6 @@ namespace CalamityMod.NPCs.CeaselessVoid if (!player.active || player.dead) { npc.velocity = new Vector2(0f, -10f); - CalamityGlobalNPC.DoGSecondStageCountdown = 0; if (npc.timeLeft > 150) { npc.timeLeft = 150; @@ -137,7 +136,7 @@ namespace CalamityMod.NPCs.CeaselessVoid { if (CalamityWorld.revenge) { - player.AddBuff(mod.BuffType("Horror"), 600, true); + player.AddBuff(mod.BuffType("Horror"), 300, true); } } diff --git a/NPCs/CeaselessVoid/DarkEnergy3.cs b/NPCs/CeaselessVoid/DarkEnergy3.cs index 590e075d58..256ccd07fe 100644 --- a/NPCs/CeaselessVoid/DarkEnergy3.cs +++ b/NPCs/CeaselessVoid/DarkEnergy3.cs @@ -27,13 +27,13 @@ namespace CalamityMod.NPCs.CeaselessVoid npc.height = 80; //216 npc.defense = 68; npc.lifeMax = 3000; - if (CalamityGlobalNPC.DoGSecondStageCountdown <= 0) + if (CalamityWorld.DoGSecondStageCountdown <= 0) { npc.lifeMax = 12000; } if (CalamityWorld.bossRushActive) { - npc.lifeMax = 30000; + npc.lifeMax = 37000; } npc.aiStyle = -1; //new aiType = -1; //new @@ -104,7 +104,6 @@ namespace CalamityMod.NPCs.CeaselessVoid if (!player.active || player.dead) { npc.velocity = new Vector2(0f, -10f); - CalamityGlobalNPC.DoGSecondStageCountdown = 0; if (npc.timeLeft > 150) { npc.timeLeft = 150; @@ -164,7 +163,7 @@ namespace CalamityMod.NPCs.CeaselessVoid { if (CalamityWorld.revenge) { - player.AddBuff(mod.BuffType("Horror"), 600, true); + player.AddBuff(mod.BuffType("Horror"), 300, true); } } diff --git a/NPCs/CosmicWraith/CosmicWraith.cs b/NPCs/CosmicWraith/CosmicWraith.cs index ea8271020d..61cc5e9a1c 100644 --- a/NPCs/CosmicWraith/CosmicWraith.cs +++ b/NPCs/CosmicWraith/CosmicWraith.cs @@ -42,7 +42,7 @@ namespace CalamityMod.NPCs.CosmicWraith { npc.lifeMax = 209250; } - if (CalamityGlobalNPC.DoGSecondStageCountdown <= 0) + if (CalamityWorld.DoGSecondStageCountdown <= 0) { music = mod.GetSoundSlot(SoundType.Music, "Sounds/Music/Signus"); npc.lifeMax = CalamityWorld.revenge ? 445500 : 280000; @@ -53,7 +53,7 @@ namespace CalamityMod.NPCs.CosmicWraith } if (CalamityWorld.bossRushActive) { - npc.lifeMax = CalamityWorld.death ? 4400000 : 3900000; + npc.lifeMax = CalamityWorld.death ? 4800000 : 4300000; } npc.knockBackResist = 0f; npc.aiStyle = -1; //new @@ -124,7 +124,14 @@ namespace CalamityMod.NPCs.CosmicWraith } if (Vector2.Distance(player.Center, vectorCenter) > 6400f) { - CalamityGlobalNPC.DoGSecondStageCountdown = 0; + CalamityWorld.DoGSecondStageCountdown = 0; + if (Main.netMode == 2) + { + var netMessage = mod.GetPacket(); + netMessage.Write((byte)CalamityModMessageType.DoGCountdownSync); + netMessage.Write(CalamityWorld.DoGSecondStageCountdown); + netMessage.Send(); + } if (npc.timeLeft > 10) { npc.timeLeft = 10; @@ -201,7 +208,7 @@ namespace CalamityMod.NPCs.CosmicWraith if (Main.netMode != 1) { npc.localAI[1] += 1f; - if (npc.localAI[1] >= (float)(200 + Main.rand.Next(200))) + if (npc.localAI[1] >= 120f) { npc.localAI[1] = 0f; npc.TargetClosest(true); @@ -649,21 +656,6 @@ namespace CalamityMod.NPCs.CosmicWraith } } - public override void ModifyHitByProjectile(Projectile projectile, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) - { - Player player = Main.player[npc.target]; - if (player.vortexStealthActive && projectile.ranged) - { - damage /= 2; - crit = false; - } - if (((projectile.type == ProjectileID.HallowStar || projectile.type == ProjectileID.CrystalShard) && projectile.ranged) || - projectile.type == mod.ProjectileType("TerraBulletSplit") || projectile.type == mod.ProjectileType("TerraArrow2")) - { - damage /= 8; - } - } - public override bool CanHitPlayer(Player target, ref int cooldownSlot) { cooldownSlot = 1; @@ -743,7 +735,6 @@ namespace CalamityMod.NPCs.CosmicWraith } Microsoft.Xna.Framework.Rectangle frame2 = npc.frame; Vector2 vector11 = new Vector2((float)(Main.npcTexture[npc.type].Width / 2), (float)(Main.npcTexture[npc.type].Height / frameCount / 2)); - Microsoft.Xna.Framework.Color color9 = Lighting.GetColor((int)((double)npc.position.X + (double)npc.width * 0.5) / 16, (int)(((double)npc.position.Y + (double)npc.height * 0.5) / 16.0)); Main.spriteBatch.Draw(NPCTexture, new Vector2(npc.position.X - Main.screenPosition.X + (float)(npc.width / 2) - (float)Main.npcTexture[npc.type].Width * scale / 2f + vector11.X * scale, npc.position.Y - Main.screenPosition.Y + (float)npc.height - (float)Main.npcTexture[npc.type].Height * scale / (float)frameCount + 4f + vector11.Y * scale + 0f + offsetY), @@ -830,7 +821,7 @@ namespace CalamityMod.NPCs.CosmicWraith { if (CalamityWorld.revenge) { - player.AddBuff(mod.BuffType("Horror"), 600, true); + player.AddBuff(mod.BuffType("Horror"), 300, true); } } } diff --git a/NPCs/Crabulon/CrabShroom.cs b/NPCs/Crabulon/CrabShroom.cs index e40dd444fd..6e25c9b103 100644 --- a/NPCs/Crabulon/CrabShroom.cs +++ b/NPCs/Crabulon/CrabShroom.cs @@ -26,7 +26,7 @@ namespace CalamityMod.NPCs.Crabulon npc.lifeMax = 25; if (CalamityWorld.bossRushActive) { - npc.lifeMax = 50000; + npc.lifeMax = 90000; } aiType = -1; npc.knockBackResist = 0.75f; diff --git a/NPCs/Crabulon/CrabulonIdle.cs b/NPCs/Crabulon/CrabulonIdle.cs index 2240c8fe76..425e2f34cd 100644 --- a/NPCs/Crabulon/CrabulonIdle.cs +++ b/NPCs/Crabulon/CrabulonIdle.cs @@ -24,7 +24,7 @@ namespace CalamityMod.NPCs.Crabulon public override void SetDefaults() { npc.npcSlots = 14f; - npc.damage = 30; + npc.damage = 40; npc.width = 164; //324 npc.height = 154; //216 npc.defense = 8; @@ -35,7 +35,7 @@ namespace CalamityMod.NPCs.Crabulon } if (CalamityWorld.bossRushActive) { - npc.lifeMax = CalamityWorld.death ? 3600000 : 3000000; + npc.lifeMax = CalamityWorld.death ? 4500000 : 3900000; } npc.aiStyle = -1; //new aiType = -1; //new @@ -197,8 +197,7 @@ namespace CalamityMod.NPCs.Crabulon } else if (npc.ai[0] == 2f) { - int damageBoost = (int)(20f * (1f - (float)npc.life / (float)npc.lifeMax)); - npc.damage = npc.defDamage + damageBoost; + npc.damage = expertMode ? 64 : 40; float num823 = 1.25f; bool flag51 = false; if ((double)npc.life < (double)npc.lifeMax * 0.5 || CalamityWorld.bossRushActive) @@ -300,8 +299,7 @@ namespace CalamityMod.NPCs.Crabulon } else if (npc.ai[0] == 3f) { - int damageBoost = (int)(20f * (1f - (float)npc.life / (float)npc.lifeMax)); - npc.damage = npc.defDamage + damageBoost; + npc.damage = expertMode ? 64 : 40; npc.noTileCollide = false; if (npc.velocity.Y == 0f) { @@ -377,7 +375,7 @@ namespace CalamityMod.NPCs.Crabulon if (npc.position.X < player.position.X && npc.position.X + (float)npc.width > player.position.X + (float)player.width) { npc.velocity.X = npc.velocity.X * 0.9f; - npc.velocity.Y = npc.velocity.Y + 0.2f; //0.2 + npc.velocity.Y = npc.velocity.Y + 0.15f; //0.2 } else { diff --git a/NPCs/Cryogen/Cryocore.cs b/NPCs/Cryogen/Cryocore.cs index 657ca735c5..bdd9a883a0 100644 --- a/NPCs/Cryogen/Cryocore.cs +++ b/NPCs/Cryogen/Cryocore.cs @@ -92,10 +92,15 @@ namespace CalamityMod.NPCs.Cryogen npc.velocity.Y = (npc.velocity.Y * 7f + num1374) / 8f; } npc.rotation = npc.velocity.X * 0.15f; - return; } - - public override bool PreNPCLoot() + + public override void OnHitPlayer(Player player, int damage, bool crit) + { + player.AddBuff(BuffID.Frostburn, 90, true); + player.AddBuff(BuffID.Chilled, 60, true); + } + + public override bool PreNPCLoot() { return false; } @@ -112,7 +117,8 @@ namespace CalamityMod.NPCs.Cryogen { Dust.NewDust(npc.position, npc.width, npc.height, 67, hitDirection, -1f, 0, default(Color), 1f); } - } + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Cryocore"), 1f); + } } } } \ No newline at end of file diff --git a/NPCs/Cryogen/Cryocore2.cs b/NPCs/Cryogen/Cryocore2.cs index 8b11b4eae1..357dfd2e80 100644 --- a/NPCs/Cryogen/Cryocore2.cs +++ b/NPCs/Cryogen/Cryocore2.cs @@ -92,22 +92,15 @@ namespace CalamityMod.NPCs.Cryogen npc.velocity.Y = (npc.velocity.Y * 7f + num1374) / 8f; } npc.rotation = npc.velocity.X * 0.15f; - return; } - - public override void OnHitPlayer(Player player, int damage, bool crit) - { - if (Main.expertMode && Main.rand.Next(3) == 0) - { - player.AddBuff(BuffID.Frostburn, 60, true); - } - else if (Main.rand.Next(5) == 0) - { - player.AddBuff(BuffID.Frostburn, 60, true); - } - } - - public override bool PreNPCLoot() + + public override void OnHitPlayer(Player player, int damage, bool crit) + { + player.AddBuff(BuffID.Frostburn, 90, true); + player.AddBuff(BuffID.Chilled, 60, true); + } + + public override bool PreNPCLoot() { return false; } @@ -124,7 +117,8 @@ namespace CalamityMod.NPCs.Cryogen { Dust.NewDust(npc.position, npc.width, npc.height, 67, hitDirection, -1f, 0, default(Color), 1f); } - } + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Cryocore2"), 1f); + } } } } \ No newline at end of file diff --git a/NPCs/Cryogen/Cryogen.cs b/NPCs/Cryogen/Cryogen.cs index c33b1cda27..59ceed808c 100644 --- a/NPCs/Cryogen/Cryogen.cs +++ b/NPCs/Cryogen/Cryogen.cs @@ -38,7 +38,7 @@ namespace CalamityMod.NPCs.Cryogen } if (CalamityWorld.bossRushActive) { - npc.lifeMax = CalamityWorld.death ? 4900000 : 4200000; + npc.lifeMax = CalamityWorld.death ? 6000000 : 5400000; } npc.aiStyle = -1; //new aiType = -1; //new @@ -82,7 +82,7 @@ namespace CalamityMod.NPCs.Cryogen bool expertMode = (Main.expertMode || CalamityWorld.bossRushActive); bool revenge = (CalamityWorld.revenge || CalamityWorld.bossRushActive); npc.TargetClosest(true); - if (npc.ai[2] == 0f && npc.localAI[1] == 0f && Main.netMode != 1 && npc.ai[0] != 4f) + if (npc.ai[2] == 0f && npc.localAI[1] == 0f && Main.netMode != 1 && npc.ai[0] < 4f) //spawn shield for phase 0 1 2 3, not 4 5 { int num6 = NPC.NewNPC((int)npc.Center.X, (int)npc.Center.Y, mod.NPCType("CryogenIce"), npc.whoAmI, 0f, 0f, 0f, 0f, 255); npc.ai[2] = (float)(num6 + 1); @@ -676,8 +676,6 @@ namespace CalamityMod.NPCs.Cryogen Gore.NewGore(npc.position, npc.velocity * randomSpread, mod.GetGoreSlot("Gores/CryoGore1"), 1f); Gore.NewGore(npc.position, npc.velocity * randomSpread, mod.GetGoreSlot("Gores/CryoGore2"), 1f); Gore.NewGore(npc.position, npc.velocity * randomSpread, mod.GetGoreSlot("Gores/CryoGore3"), 1f); - npc.dontTakeDamage = false; - npc.chaseable = true; npc.ai[0] = 5f; npc.ai[1] = 0f; npc.localAI[0] = 0f; @@ -700,6 +698,8 @@ namespace CalamityMod.NPCs.Cryogen } else { + npc.dontTakeDamage = false; + npc.chaseable = true; float num1372 = isChill ? 16f : 22f; if (CalamityWorld.bossRushActive) { @@ -841,14 +841,6 @@ namespace CalamityMod.NPCs.Cryogen return true; } - public override void ModifyHitByProjectile(Projectile projectile, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) - { - if (((projectile.type == ProjectileID.HallowStar || projectile.type == ProjectileID.CrystalShard) && projectile.ranged)) - { - damage /= 2; - } - } - public override void ScaleExpertStats(int numPlayers, float bossLifeScale) { npc.lifeMax = (int)(npc.lifeMax * 0.8f * bossLifeScale); @@ -952,7 +944,12 @@ namespace CalamityMod.NPCs.Cryogen public override void NPCLoot() { - if (Main.rand.Next(10) == 0) + int permadongo = NPC.FindFirstNPC(mod.NPCType("DILF")); + if (permadongo == -1 && Main.netMode != 1) + { + NPC.NewNPC((int)npc.Center.X, (int)npc.Center.Y, mod.NPCType("DILF"), 0, 0f, 0f, 0f, 0f, 255); + } + if (Main.rand.Next(10) == 0) { Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("CryogenTrophy")); } @@ -1018,14 +1015,8 @@ namespace CalamityMod.NPCs.Cryogen public override void OnHitPlayer(Player player, int damage, bool crit) { - if (Main.expertMode && Main.rand.Next(3) == 0) - { - player.AddBuff(BuffID.Frostburn, 100, true); - } - else if (Main.rand.Next(5) == 0) - { - player.AddBuff(BuffID.Frostburn, 100, true); - } - } + player.AddBuff(BuffID.Frostburn, 120, true); + player.AddBuff(BuffID.Chilled, 90, true); + } } } \ No newline at end of file diff --git a/NPCs/Cryogen/CryogenIce.cs b/NPCs/Cryogen/CryogenIce.cs index fa295b5898..62555c339e 100644 --- a/NPCs/Cryogen/CryogenIce.cs +++ b/NPCs/Cryogen/CryogenIce.cs @@ -30,7 +30,7 @@ namespace CalamityMod.NPCs.Cryogen npc.lifeMax = 1400; if (CalamityWorld.bossRushActive) { - npc.lifeMax = 170000; + npc.lifeMax = 200000; } npc.alpha = 255; npc.HitSound = SoundID.NPCHit5; @@ -60,11 +60,16 @@ namespace CalamityMod.NPCs.Cryogen npc.life = 0; npc.HitEffect(0, 10.0); npc.active = false; - return; } } - - public override void ScaleExpertStats(int numPlayers, float bossLifeScale) + + public override void OnHitPlayer(Player player, int damage, bool crit) + { + player.AddBuff(BuffID.Frostburn, 90, true); + player.AddBuff(BuffID.Chilled, 60, true); + } + + public override void ScaleExpertStats(int numPlayers, float bossLifeScale) { npc.lifeMax = (int)(npc.lifeMax * 0.5f * bossLifeScale); npc.damage *= 2; diff --git a/NPCs/Cryogen/IceMass.cs b/NPCs/Cryogen/IceMass.cs index 54d6f37de7..edeebbc260 100644 --- a/NPCs/Cryogen/IceMass.cs +++ b/NPCs/Cryogen/IceMass.cs @@ -37,8 +37,14 @@ namespace CalamityMod.NPCs.Cryogen npc.HitSound = SoundID.NPCHit5; npc.DeathSound = SoundID.NPCDeath15; } - - public override void AI() + + public override void OnHitPlayer(Player player, int damage, bool crit) + { + player.AddBuff(BuffID.Frostburn, 90, true); + player.AddBuff(BuffID.Chilled, 60, true); + } + + public override void AI() { Lighting.AddLight((int)((npc.position.X + (float)(npc.width / 2)) / 16f), (int)((npc.position.Y + (float)(npc.height / 2)) / 16f), 0.01f, 0.35f, 0.35f); } @@ -60,7 +66,8 @@ namespace CalamityMod.NPCs.Cryogen { Dust.NewDust(npc.position, npc.width, npc.height, 67, hitDirection, -1f, 0, default(Color), 1f); } - } + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/CryoSpirit"), 1f); + } } } } \ No newline at end of file diff --git a/NPCs/DesertScourge/DesertScourgeBody.cs b/NPCs/DesertScourge/DesertScourgeBody.cs index 9a249c441a..2861775371 100644 --- a/NPCs/DesertScourge/DesertScourgeBody.cs +++ b/NPCs/DesertScourge/DesertScourgeBody.cs @@ -168,10 +168,7 @@ namespace CalamityMod.NPCs.DesertScourge public override void OnHitPlayer(Player player, int damage, bool crit) { - if (Main.expertMode) - { - player.AddBuff(BuffID.Bleeding, 200, true); - } + player.AddBuff(BuffID.Bleeding, 120, true); } } } \ No newline at end of file diff --git a/NPCs/DesertScourge/DesertScourgeBodySmall.cs b/NPCs/DesertScourge/DesertScourgeBodySmall.cs index 840ea0209e..a12acd59b0 100644 --- a/NPCs/DesertScourge/DesertScourgeBodySmall.cs +++ b/NPCs/DesertScourge/DesertScourgeBodySmall.cs @@ -107,7 +107,7 @@ namespace CalamityMod.NPCs.DesertScourge public override void OnHitPlayer(Player player, int damage, bool crit) { - player.AddBuff(BuffID.Bleeding, 100, true); + player.AddBuff(BuffID.Bleeding, 60, true); } } } \ No newline at end of file diff --git a/NPCs/DesertScourge/DesertScourgeHead.cs b/NPCs/DesertScourge/DesertScourgeHead.cs index ac158671f8..2fc483758c 100644 --- a/NPCs/DesertScourge/DesertScourgeHead.cs +++ b/NPCs/DesertScourge/DesertScourgeHead.cs @@ -473,10 +473,7 @@ namespace CalamityMod.NPCs.DesertScourge public override void OnHitPlayer(Player player, int damage, bool crit) { - if (Main.expertMode) - { - player.AddBuff(BuffID.Bleeding, 600, true); - } + player.AddBuff(BuffID.Bleeding, 300, true); } } } \ No newline at end of file diff --git a/NPCs/DesertScourge/DesertScourgeHeadSmall.cs b/NPCs/DesertScourge/DesertScourgeHeadSmall.cs index 797d1f7ef7..7483c9b148 100644 --- a/NPCs/DesertScourge/DesertScourgeHeadSmall.cs +++ b/NPCs/DesertScourge/DesertScourgeHeadSmall.cs @@ -445,7 +445,7 @@ namespace CalamityMod.NPCs.DesertScourge public override void OnHitPlayer(Player player, int damage, bool crit) { - player.AddBuff(BuffID.Bleeding, 200, true); + player.AddBuff(BuffID.Bleeding, 180, true); } } } \ No newline at end of file diff --git a/NPCs/DesertScourge/DesertScourgeTail.cs b/NPCs/DesertScourge/DesertScourgeTail.cs index 1c913bd45b..a0fde47752 100644 --- a/NPCs/DesertScourge/DesertScourgeTail.cs +++ b/NPCs/DesertScourge/DesertScourgeTail.cs @@ -116,10 +116,7 @@ namespace CalamityMod.NPCs.DesertScourge public override void OnHitPlayer(Player player, int damage, bool crit) { - if (Main.expertMode) - { - player.AddBuff(BuffID.Bleeding, 100, true); - } + player.AddBuff(BuffID.Bleeding, 90, true); } } } \ No newline at end of file diff --git a/NPCs/DesertScourge/DesertScourgeTailSmall.cs b/NPCs/DesertScourge/DesertScourgeTailSmall.cs index 34705d61cc..fb4abac897 100644 --- a/NPCs/DesertScourge/DesertScourgeTailSmall.cs +++ b/NPCs/DesertScourge/DesertScourgeTailSmall.cs @@ -104,7 +104,7 @@ namespace CalamityMod.NPCs.DesertScourge public override void OnHitPlayer(Player player, int damage, bool crit) { - player.AddBuff(BuffID.Bleeding, 50, true); + player.AddBuff(BuffID.Bleeding, 30, true); } } } \ No newline at end of file diff --git a/NPCs/DesertScourge/DriedSeekerBody.cs b/NPCs/DesertScourge/DriedSeekerBody.cs index e56344c005..4ac3e45550 100644 --- a/NPCs/DesertScourge/DriedSeekerBody.cs +++ b/NPCs/DesertScourge/DriedSeekerBody.cs @@ -76,13 +76,5 @@ namespace CalamityMod.NPCs.DesertScourge } } } - - public override void OnHitPlayer(Player player, int damage, bool crit) - { - if (Main.expertMode) - { - player.AddBuff(BuffID.Bleeding, 100, true); - } - } } } \ No newline at end of file diff --git a/NPCs/DesertScourge/DriedSeekerHead.cs b/NPCs/DesertScourge/DriedSeekerHead.cs index c3b1cf762a..9babdebdad 100644 --- a/NPCs/DesertScourge/DriedSeekerHead.cs +++ b/NPCs/DesertScourge/DriedSeekerHead.cs @@ -111,13 +111,5 @@ namespace CalamityMod.NPCs.DesertScourge { return false; } - - public override void OnHitPlayer(Player player, int damage, bool crit) - { - if (Main.expertMode) - { - player.AddBuff(BuffID.Bleeding, 200, true); - } - } } } \ No newline at end of file diff --git a/NPCs/DesertScourge/DriedSeekerTail.cs b/NPCs/DesertScourge/DriedSeekerTail.cs index b104b9f988..d16e49d17a 100644 --- a/NPCs/DesertScourge/DriedSeekerTail.cs +++ b/NPCs/DesertScourge/DriedSeekerTail.cs @@ -76,13 +76,5 @@ namespace CalamityMod.NPCs.DesertScourge { return false; } - - public override void OnHitPlayer(Player player, int damage, bool crit) - { - if (Main.expertMode) - { - player.AddBuff(BuffID.Bleeding, 50, true); - } - } } } \ No newline at end of file diff --git a/NPCs/GreatSandShark/GreatSandShark.cs b/NPCs/GreatSandShark/GreatSandShark.cs index 84eba3f308..633442eba3 100644 --- a/NPCs/GreatSandShark/GreatSandShark.cs +++ b/NPCs/GreatSandShark/GreatSandShark.cs @@ -81,6 +81,11 @@ namespace CalamityMod.NPCs.GreatSandShark NetMessage.SendData(7, -1, -1, null, 0, 0f, 0f, 0f, 0, 0, 0); } } + if (npc.soundDelay <= 0) + { + npc.soundDelay = 480; + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/GreatSandSharkRoar"), (int)npc.position.X, (int)npc.position.Y); + } if (npc.localAI[3] >= 1f || Vector2.Distance(Main.player[npc.target].Center, npc.Center) > 1000f) { if (!resetAI) @@ -350,20 +355,6 @@ namespace CalamityMod.NPCs.GreatSandShark } if (flag121) { - if (npc.soundDelay == 0) - { - float num1533 = npc.Distance(vector260) / 40f; - if (num1533 < 10f) - { - num1533 = 10f; - } - if (num1533 > 20f) - { - num1533 = 20f; - } - npc.soundDelay = (int)num1533; - Main.PlaySound(15, npc.Center, 4); - } float num1534 = npc.ai[1]; bool flag123 = false; point15 = (npc.Center + new Vector2(0f, 24f)).ToTileCoordinates(); @@ -387,13 +378,13 @@ namespace CalamityMod.NPCs.GreatSandShark switch ((int)npc.ai[3]) { case 0: - velocityX = 10f; velocityY = 7f; + velocityX = 10f; velocityY = 9f; break; case 1: - velocityX = 14f; velocityY = 5f; + velocityX = 14f; velocityY = 7f; break; case 2: - velocityX = 8f; velocityY = 9f; + velocityX = 8f; velocityY = 11f; break; } if (revenge || lowerLife) @@ -426,16 +417,40 @@ namespace CalamityMod.NPCs.GreatSandShark point15 = vec4.ToTileCoordinates(); tileSafely = Framing.GetTileSafely(point15); bool flag124 = tileSafely.nactive(); - if (!flag124 && Math.Sign(npc.velocity.X) == npc.direction && npc.Distance(vector260) < 400f && (npc.ai[2] >= 30f || npc.ai[2] < 0f)) + if (!flag124 && Math.Sign(npc.velocity.X) == npc.direction && (npc.Distance(vector260) < 600f || youMustDie) && + (npc.ai[2] >= 30f || npc.ai[2] < 0f)) { if (npc.localAI[0] == 0f) { - Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/GreatSandSharkRoar"), (int)npc.position.X, (int)npc.position.Y); + Main.PlaySound(4, (int)npc.position.X, (int)npc.position.Y, 15); npc.localAI[0] = -1f; + for (int num621 = 0; num621 < 25; num621++) + { + int num622 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 32, 0f, 0f, 100, default(Color), 2f); + Main.dust[num622].velocity.Y *= 6f; + Main.dust[num622].velocity.X *= 3f; + if (Main.rand.Next(2) == 0) + { + Main.dust[num622].scale = 0.5f; + Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f; + } + } + for (int num623 = 0; num623 < 50; num623++) + { + int num624 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 85, 0f, 0f, 100, default(Color), 3f); + Main.dust[num624].noGravity = true; + Main.dust[num624].velocity.Y *= 10f; + num624 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 268, 0f, 0f, 100, default(Color), 2f); + Main.dust[num624].velocity.X *= 2f; + } + int spawnX = (int)(npc.width / 2); + for (int sand = 0; sand < 5; sand++) + Projectile.NewProjectile(npc.Center.X + (float)Main.rand.Next(-spawnX, spawnX), npc.Center.Y, + (float)Main.rand.Next(-3, 4), (float)Main.rand.Next(-12, -6), mod.ProjectileType("GreatSandBlast"), 40, 0f, Main.myPlayer, 0f, 0f); } npc.ai[2] = -30f; Vector2 vector261 = npc.DirectionTo(vector260 + new Vector2(0f, -80f)); - npc.velocity = vector261 * 12f; + npc.velocity = vector261 * 18f; //12 } } else @@ -539,19 +554,10 @@ namespace CalamityMod.NPCs.GreatSandShark if (npc.rotation > 0.1f) { npc.rotation = 0.1f; - return; } } } - public override void ModifyHitByProjectile(Projectile projectile, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) - { - if (((projectile.type == ProjectileID.HallowStar || projectile.type == ProjectileID.CrystalShard) && projectile.ranged)) - { - damage /= 2; - } - } - public override void FindFrame(int frameHeight) { if (npc.localAI[3] == 0f) diff --git a/NPCs/HiveMind/DankCreeper.cs b/NPCs/HiveMind/DankCreeper.cs index aa0a142349..a4f40affd5 100644 --- a/NPCs/HiveMind/DankCreeper.cs +++ b/NPCs/HiveMind/DankCreeper.cs @@ -19,7 +19,7 @@ namespace CalamityMod.NPCs.HiveMind public override void SetDefaults() { - npc.damage = 18; + npc.damage = 24; npc.width = 74; //324 npc.height = 74; //216 npc.defense = 5; @@ -110,7 +110,7 @@ namespace CalamityMod.NPCs.HiveMind { if (Main.expertMode && Main.netMode != 1) { - Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0f, 0f, mod.ProjectileType("ShadeNimbusHostile"), 12, 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0f, 0f, mod.ProjectileType("ShadeNimbusHostile"), 14, 0f, Main.myPlayer, 0f, 0f); } } } diff --git a/NPCs/HiveMind/DarkHeart.cs b/NPCs/HiveMind/DarkHeart.cs index 6179c03aec..f0d41fba0c 100644 --- a/NPCs/HiveMind/DarkHeart.cs +++ b/NPCs/HiveMind/DarkHeart.cs @@ -107,10 +107,10 @@ namespace CalamityMod.NPCs.HiveMind npc.ai[0] = 0f; int num1169 = (int)(npc.position.X + 10f + (float)Main.rand.Next(npc.width - 20)); int num1170 = (int)(npc.position.Y + (float)npc.height + 4f); - int num184 = 15; + int num184 = 18; if (Main.expertMode) { - num184 = 12; + num184 = 14; } Projectile.NewProjectile((float)num1169, (float)num1170, 0f, 5f, mod.ProjectileType("ShaderainHostile"), num184, 0f, Main.myPlayer, 0f, 0f); return; diff --git a/NPCs/HiveMind/HiveMind.cs b/NPCs/HiveMind/HiveMind.cs index 323b3e3cad..605eb8ae2b 100644 --- a/NPCs/HiveMind/HiveMind.cs +++ b/NPCs/HiveMind/HiveMind.cs @@ -35,7 +35,7 @@ namespace CalamityMod.NPCs.HiveMind } if (CalamityWorld.bossRushActive) { - npc.lifeMax = CalamityWorld.death ? 790000 : 650000; + npc.lifeMax = CalamityWorld.death ? 1600000 : 1300000; } npc.aiStyle = -1; //new aiType = -1; //new diff --git a/NPCs/HiveMind/HiveMindP2.cs b/NPCs/HiveMind/HiveMindP2.cs index 7edefb420a..611c530d4b 100644 --- a/NPCs/HiveMind/HiveMindP2.cs +++ b/NPCs/HiveMind/HiveMindP2.cs @@ -47,7 +47,7 @@ namespace CalamityMod.NPCs.HiveMind int previousState = 0; int nextState = 0; int reelCount = 0; - int oldDamage = 30; + int oldDamage = 40; Vector2 deceleration; public override void SetStaticDefaults() @@ -59,7 +59,7 @@ namespace CalamityMod.NPCs.HiveMind public override void SetDefaults() { npc.npcSlots = 5f; - npc.damage = 30; + npc.damage = 40; npc.width = 150; //324 npc.height = 120; //216 npc.defense = 5; @@ -70,7 +70,7 @@ namespace CalamityMod.NPCs.HiveMind } if (CalamityWorld.bossRushActive) { - npc.lifeMax = CalamityWorld.death ? 880000 : 740000; + npc.lifeMax = CalamityWorld.death ? 1600000 : 1300000; } npc.aiStyle = -1; //new aiType = -1; //new @@ -554,7 +554,7 @@ namespace CalamityMod.NPCs.HiveMind npc.ai[0]++; if (Main.netMode != 1) { - int damage = Main.expertMode ? 11 : 14; + int damage = Main.expertMode ? 14 : 18; Projectile.NewProjectile(npc.position.X + Main.rand.Next(npc.width), npc.position.Y + Main.rand.Next(npc.height), 0, 0, mod.ProjectileType("ShadeNimbusHostile"), damage, 0, Main.myPlayer, 11, 0); } if (npc.ai[0] == 10) @@ -719,7 +719,7 @@ namespace CalamityMod.NPCs.HiveMind { if (CalamityWorld.revenge) { - player.AddBuff(mod.BuffType("Horror"), 90, true); + player.AddBuff(mod.BuffType("Horror"), 300, true); } } } diff --git a/NPCs/Leviathan/Leviathan.cs b/NPCs/Leviathan/Leviathan.cs index 5a84f52acc..b2b1e5d368 100644 --- a/NPCs/Leviathan/Leviathan.cs +++ b/NPCs/Leviathan/Leviathan.cs @@ -33,7 +33,7 @@ namespace CalamityMod.NPCs.Leviathan } if (CalamityWorld.bossRushActive) { - npc.lifeMax = CalamityWorld.death ? 7600000 : 6700000; + npc.lifeMax = CalamityWorld.death ? 8200000 : 7300000; } npc.knockBackResist = 0f; npc.aiStyle = -1; @@ -228,14 +228,17 @@ namespace CalamityMod.NPCs.Leviathan { npc.ai[2] += 0.5f; } - if (Siren.phase2) - { - npc.ai[2] += 0.5f; - } - if (Siren.phase3) - { - npc.ai[2] += 0.5f; - } + if (sirenAlive) + { + if (Siren.phase2) + { + npc.ai[2] += 0.5f; + } + if (Siren.phase3) + { + npc.ai[2] += 0.5f; + } + } } } if (npc.ai[2] >= 90f) @@ -291,11 +294,11 @@ namespace CalamityMod.NPCs.Leviathan } else { - if (Siren.phase2 || CalamityWorld.bossRushActive) + if ((Siren.phase2 && sirenAlive) || CalamityWorld.bossRushActive) { npc.ai[1] += 0.5f; } - if (Siren.phase3 || CalamityWorld.bossRushActive) + if ((Siren.phase3 && sirenAlive) || CalamityWorld.bossRushActive) { npc.ai[1] += 0.5f; } @@ -516,7 +519,7 @@ namespace CalamityMod.NPCs.Leviathan npc.direction = 1; } npc.spriteDirection = npc.direction; - int num1050 = sirenAlive ? 750 : 600; //600 not a prob + int num1050 = sirenAlive ? 900 : 800; //600 not a prob int num1051 = 1; if (npc.position.X + (float)(npc.width / 2) < Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2)) { @@ -557,15 +560,6 @@ namespace CalamityMod.NPCs.Leviathan } } - public override void ModifyHitByProjectile(Projectile projectile, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) - { - if (((projectile.type == ProjectileID.HallowStar || projectile.type == ProjectileID.CrystalShard) && projectile.ranged) || - projectile.type == mod.ProjectileType("TerraBulletSplit") || projectile.type == mod.ProjectileType("TerraArrow2")) - { - damage /= 2; - } - } - public override void HitEffect(int hitDirection, double damage) { for (int k = 0; k < 5; k++) diff --git a/NPCs/Leviathan/Siren.cs b/NPCs/Leviathan/Siren.cs index 830491526c..034f451c9b 100644 --- a/NPCs/Leviathan/Siren.cs +++ b/NPCs/Leviathan/Siren.cs @@ -46,7 +46,7 @@ namespace CalamityMod.NPCs.Leviathan } if (CalamityWorld.bossRushActive) { - npc.lifeMax = CalamityWorld.death ? 4200000 : 3700000; + npc.lifeMax = CalamityWorld.death ? 4500000 : 4100000; } npc.knockBackResist = 0f; npc.aiStyle = -1; //new @@ -108,11 +108,7 @@ namespace CalamityMod.NPCs.Leviathan bool isNotOcean = player.position.Y < 800f || (double)player.position.Y > Main.worldSurface * 16.0 || (player.position.X > 6400f && player.position.X < (float)(Main.maxTilesX * 16 - 6400)); int npcType = mod.NPCType("Leviathan"); bool halfLife = (double)npc.life <= (double)npc.lifeMax * 0.5; - bool leviAlive = false; - if (NPC.CountNPCS(npcType) > 0) - { - leviAlive = true; - } + bool leviAlive = NPC.AnyNPCs(npcType); float num1000 = leviAlive ? 14f : 18f; float num1005 = leviAlive ? 14f : 18f; num1006 *= num1005; @@ -125,8 +121,8 @@ namespace CalamityMod.NPCs.Leviathan NPC.NewNPC((int)spawnAt.X, (int)spawnAt.Y - 200, mod.NPCType("SirenClone")); } music = mod.GetSoundSlot(SoundType.Music, "Sounds/Music/LeviathanAndSiren"); - NPC.NewNPC((int)spawnAt.X, (int)spawnAt.Y, mod.NPCType("Leviathan")); - spawnedLevi = true; + NPC.SpawnOnPlayer(player.whoAmI, npcType); + spawnedLevi = true; } phase2 = true; } @@ -391,14 +387,7 @@ namespace CalamityMod.NPCs.Leviathan else if (npc.ai[0] == 2f) { npc.rotation = npc.velocity.X * 0.02f; - float num1065 = 6f; - float num1066 = 0.12f; - float num10662 = 0.04f; - Vector2 vector121 = new Vector2(npc.position.X + (float)(npc.width / 2) + (float)(Main.rand.Next(20) * npc.direction), npc.position.Y + (float)npc.height * 0.8f); - Vector2 vector122 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); - float num1067 = player.position.X + (float)(player.width / 2) - vector122.X; - float num1068 = player.position.Y + (float)(player.height / 2) - 300f - vector122.Y; - float num1069 = (float)Math.Sqrt((double)(num1067 * num1067 + num1068 * num1068)); + Vector2 vector121 = new Vector2(npc.position.X + (float)(npc.width / 2) + (float)(Main.rand.Next(20) * npc.direction), npc.position.Y + (float)npc.height * 0.8f); npc.ai[1] += 1f; bool flag104 = false; if (npc.GetGlobalNPC(mod).enraged) @@ -436,7 +425,7 @@ namespace CalamityMod.NPCs.Leviathan flag104 = true; } } - if (flag104 && npc.position.Y + (float)npc.height < player.position.Y && Collision.CanHit(vector121, 1, 1, player.position, player.width, player.height)) + if (flag104 && (npc.position.Y + (float)npc.height < player.position.Y || (!leviAlive && halfLife)) && Collision.CanHit(vector121, 1, 1, player.position, player.width, player.height)) { if (Main.netMode != 1) { @@ -484,88 +473,58 @@ namespace CalamityMod.NPCs.Leviathan Projectile.NewProjectile(vector121.X, vector121.Y, num1071, num1072, num1075, num1074, 0f, Main.myPlayer, 0f, 0f); } } - if (!Collision.CanHit(new Vector2(vector121.X, vector121.Y - 30f), 1, 1, player.position, player.width, player.height)) - { - num1065 = 14f; - num1066 = 0.15f; - num10662 = 0.05f; - vector122 = vector121; - num1067 = player.position.X + (float)(player.width / 2) - vector122.X; - num1068 = player.position.Y + (float)(player.height / 2) - vector122.Y; - num1069 = (float)Math.Sqrt((double)(num1067 * num1067 + num1068 * num1068)); - num1069 = num1065 / num1069; - if (npc.velocity.X < num1067) - { - npc.velocity.X = npc.velocity.X + num1066; - if (npc.velocity.X < 0f && num1067 > 0f) - { - npc.velocity.X = npc.velocity.X + num1066; - } - } - else if (npc.velocity.X > num1067) - { - npc.velocity.X = npc.velocity.X - num1066; - if (npc.velocity.X > 0f && num1067 < 0f) - { - npc.velocity.X = npc.velocity.X - num1066; - } - } - if (npc.velocity.Y < num1068) - { - npc.velocity.Y = npc.velocity.Y + num10662; - if (npc.velocity.Y < 0f && num1068 > 0f) - { - npc.velocity.Y = npc.velocity.Y + num10662; - } - } - else if (npc.velocity.Y > num1068) - { - npc.velocity.Y = npc.velocity.Y - num10662; - if (npc.velocity.Y > 0f && num1068 < 0f) - { - npc.velocity.Y = npc.velocity.Y - num10662; - } - } - } - else if (num1069 > 240f) //120 - { - npc.TargetClosest(true); - npc.spriteDirection = npc.direction; - num1069 = num1065 / num1069; - if (npc.velocity.X < num1067) - { - npc.velocity.X = npc.velocity.X + num1066; - if (npc.velocity.X < 0f && num1067 > 0f) - { - npc.velocity.X = npc.velocity.X + num1066 * 2f; - } - } - else if (npc.velocity.X > num1067) - { - npc.velocity.X = npc.velocity.X - num1066; - if (npc.velocity.X > 0f && num1067 < 0f) - { - npc.velocity.X = npc.velocity.X - num1066 * 2f; - } - } - if (npc.velocity.Y < num1068) - { - npc.velocity.Y = npc.velocity.Y + num10662; - if (npc.velocity.Y < 0f && num1068 > 0f) - { - npc.velocity.Y = npc.velocity.Y + num10662 * 2f; - } - } - else if (npc.velocity.Y > num1068) - { - npc.velocity.Y = npc.velocity.Y - num10662; - if (npc.velocity.Y > 0f && num1068 < 0f) - { - npc.velocity.Y = npc.velocity.Y - num10662 * 2f; - } - } - } - if (npc.ai[1] > 300f) + if (npc.position.Y > player.position.Y - 150f) //200 + { + if (npc.velocity.Y > 0f) + { + npc.velocity.Y = npc.velocity.Y * 0.98f; + } + npc.velocity.Y = npc.velocity.Y - 0.1f; + if (npc.velocity.Y > 2f) + { + npc.velocity.Y = 2f; + } + } + else if (npc.position.Y < player.position.Y - 400f) //500 + { + if (npc.velocity.Y < 0f) + { + npc.velocity.Y = npc.velocity.Y * 0.98f; + } + npc.velocity.Y = npc.velocity.Y + 0.1f; + if (npc.velocity.Y < -2f) + { + npc.velocity.Y = -2f; + } + } + if (npc.position.X + (float)(npc.width / 2) > player.position.X + (float)(player.width / 2) + 100f) + { + if (npc.velocity.X > 0f) + { + npc.velocity.X = npc.velocity.X * 0.98f; + } + npc.velocity.X = npc.velocity.X - 0.1f; + if (npc.velocity.X > 8f) + { + npc.velocity.X = 8f; + } + } + if (npc.position.X + (float)(npc.width / 2) < player.position.X + (float)(player.width / 2) - 100f) + { + if (npc.velocity.X < 0f) + { + npc.velocity.X = npc.velocity.X * 0.98f; + } + npc.velocity.X = npc.velocity.X + 0.1f; + if (npc.velocity.X < -8f) + { + npc.velocity.X = -8f; + } + } + float playerLocation = npc.Center.X - player.Center.X; + npc.direction = (playerLocation < 0 ? 1 : -1); + npc.spriteDirection = npc.direction; + if (npc.ai[1] > 300f) { npc.ai[0] = -1f; npc.ai[1] = 0f; @@ -736,15 +695,6 @@ namespace CalamityMod.NPCs.Leviathan } } - public override void ModifyHitByProjectile(Projectile projectile, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) - { - if (((projectile.type == ProjectileID.HallowStar || projectile.type == ProjectileID.CrystalShard) && projectile.ranged) || - projectile.type == mod.ProjectileType("TerraBulletSplit") || projectile.type == mod.ProjectileType("TerraArrow2")) - { - damage /= 2; - } - } - public override void HitEffect(int hitDirection, double damage) { for (int k = 0; k < 3; k++) diff --git a/NPCs/Leviathan/SirenIce.cs b/NPCs/Leviathan/SirenIce.cs index 07705d8c26..c745b8ecab 100644 --- a/NPCs/Leviathan/SirenIce.cs +++ b/NPCs/Leviathan/SirenIce.cs @@ -36,35 +36,31 @@ namespace CalamityMod.NPCs.Leviathan npc.HitSound = SoundID.NPCHit5; npc.DeathSound = SoundID.NPCDeath7; } - - public override void AI() - { - if (npc.alpha > 100) - { - npc.alpha -= 2; - } - Player player = Main.player[npc.target]; - if (npc.type == mod.NPCType("SirenIce")) - { - int num989 = (int)npc.ai[0]; - if (Main.npc[num989].active && Main.npc[num989].type == mod.NPCType("Siren")) - { - npc.rotation = Main.npc[num989].rotation; - npc.spriteDirection = Main.npc[num989].direction; - npc.velocity = Vector2.Zero; - npc.position = Main.npc[num989].Center; - npc.position.X = npc.position.X - (float)(npc.width / 2) + ((npc.spriteDirection == 1) ? -30f : 30f); - npc.position.Y = npc.position.Y - (float)(npc.height / 2); - npc.gfxOffY = Main.npc[num989].gfxOffY; - Lighting.AddLight((int)npc.Center.X / 16, (int)npc.Center.Y / 16, 0f, 0.8f, 1.1f); - return; - } - npc.life = 0; - npc.HitEffect(0, 10.0); - npc.active = false; - return; - } - } + + public override void AI() + { + if (npc.alpha > 100) + { + npc.alpha -= 2; + } + Player player = Main.player[npc.target]; + int num989 = (int)npc.ai[0]; + if (Main.npc[num989].active && Main.npc[num989].type == mod.NPCType("Siren")) + { + npc.rotation = Main.npc[num989].rotation; + npc.spriteDirection = Main.npc[num989].direction; + npc.velocity = Vector2.Zero; + npc.position = Main.npc[num989].Center; + npc.position.X = npc.position.X - (float)(npc.width / 2) + ((npc.spriteDirection == 1) ? -30f : 30f); + npc.position.Y = npc.position.Y - (float)(npc.height / 2); + npc.gfxOffY = Main.npc[num989].gfxOffY; + Lighting.AddLight((int)npc.Center.X / 16, (int)npc.Center.Y / 16, 0f, 0.8f, 1.1f); + return; + } + npc.life = 0; + npc.HitEffect(0, 10.0); + npc.active = false; + } public override void ModifyHitByProjectile(Projectile projectile, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) { @@ -83,7 +79,7 @@ namespace CalamityMod.NPCs.Leviathan public override void OnHitPlayer(Player player, int damage, bool crit) { - player.AddBuff(BuffID.Frostburn, 150, true); + player.AddBuff(BuffID.Frostburn, 240, true); } public override void HitEffect(int hitDirection, double damage) diff --git a/NPCs/NormalNPCs/AngryDog.cs b/NPCs/NormalNPCs/AngryDog.cs index 3ad830b50b..c8c1c15e2e 100644 --- a/NPCs/NormalNPCs/AngryDog.cs +++ b/NPCs/NormalNPCs/AngryDog.cs @@ -639,7 +639,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override void OnHitPlayer(Player player, int damage, bool crit) { - player.AddBuff(BuffID.Bleeding, 80, true); + player.AddBuff(BuffID.Bleeding, 180, true); } public override void HitEffect(int hitDirection, double damage) diff --git a/NPCs/NormalNPCs/ArmoredDiggerBody.cs b/NPCs/NormalNPCs/ArmoredDiggerBody.cs index cd64492fd6..318175f6f2 100644 --- a/NPCs/NormalNPCs/ArmoredDiggerBody.cs +++ b/NPCs/NormalNPCs/ArmoredDiggerBody.cs @@ -19,13 +19,13 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetDefaults() { - npc.damage = 40; + npc.damage = 70; npc.width = 38; //324 npc.height = 38; //216 npc.defense = 40; - npc.lifeMax = 2000; + npc.lifeMax = 40000; npc.knockBackResist = 0f; - npc.aiStyle = 6; + npc.aiStyle = -1; aiType = -1; animationType = 10; npc.behindTiles = true; @@ -33,7 +33,11 @@ namespace CalamityMod.NPCs.NormalNPCs npc.noTileCollide = true; npc.HitSound = SoundID.NPCHit4; npc.DeathSound = SoundID.NPCDeath14; - npc.netAlways = true; + for (int k = 0; k < npc.buffImmune.Length; k++) + { + npc.buffImmune[k] = true; + } + npc.netAlways = true; npc.dontCountMe = true; } @@ -44,29 +48,356 @@ namespace CalamityMod.NPCs.NormalNPCs public override void AI() { - if (!Main.npc[(int)npc.ai[1]].active) + if (npc.ai[3] > 0f) + { + npc.realLife = (int)npc.ai[3]; + } + if (npc.target < 0 || npc.target == 255 || Main.player[npc.target].dead) + { + npc.TargetClosest(true); + } + npc.velocity.Length(); + bool flag = false; + if (npc.ai[1] <= 0f) + { + flag = true; + } + else if (Main.npc[(int)npc.ai[1]].life <= 0) + { + flag = true; + } + if (flag) { npc.life = 0; npc.HitEffect(0, 10.0); - npc.active = false; + npc.checkDead(); + } + if (Main.netMode != 1) + { + npc.localAI[0] += (float)Main.rand.Next(4); + if (npc.localAI[0] >= (float)Main.rand.Next(1800, 26000)) + { + npc.localAI[0] = 0f; + npc.TargetClosest(true); + if (Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].position, + Main.player[npc.target].width, Main.player[npc.target].height)) + { + float speed = 7f; + Vector2 vector = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)(npc.height / 2)); + float num6 = Main.player[npc.target].position.X + (float)Main.player[npc.target].width * 0.5f - vector.X + (float)Main.rand.Next(-20, 21); + float num7 = Main.player[npc.target].position.Y + (float)Main.player[npc.target].height * 0.5f - vector.Y + (float)Main.rand.Next(-20, 21); + float num8 = (float)Math.Sqrt((double)(num6 * num6 + num7 * num7)); + num8 = speed / num8; + num6 *= num8; + num7 *= num8; + int num9 = 32; + int num10 = 450; + vector.X += num6 * 5f; + vector.Y += num7 * 5f; + Projectile.NewProjectile(vector.X, vector.Y, num6, num7, num10, num9, 0f, Main.myPlayer, 0f, 0f); + npc.netUpdate = true; + } + } + } + int num12 = (int)(npc.position.X / 16f) - 1; + int num13 = (int)((npc.position.X + (float)npc.width) / 16f) + 2; + int num14 = (int)(npc.position.Y / 16f) - 1; + int num15 = (int)((npc.position.Y + (float)npc.height) / 16f) + 2; + if (num12 < 0) + { + num12 = 0; + } + if (num13 > Main.maxTilesX) + { + num13 = Main.maxTilesX; + } + if (num14 < 0) + { + num14 = 0; + } + if (num15 > Main.maxTilesY) + { + num15 = Main.maxTilesY; + } + bool flag2 = false; + if (!flag2) + { + for (int k = num12; k < num13; k++) + { + for (int l = num14; l < num15; l++) + { + if (Main.tile[k, l] != null && ((Main.tile[k, l].nactive() && (Main.tileSolid[(int)Main.tile[k, l].type] || (Main.tileSolidTop[(int)Main.tile[k, l].type] && Main.tile[k, l].frameY == 0))) || Main.tile[k, l].liquid > 64)) + { + Vector2 vector2; + vector2.X = (float)(k * 16); + vector2.Y = (float)(l * 16); + if (npc.position.X + (float)npc.width > vector2.X && npc.position.X < vector2.X + 16f && npc.position.Y + (float)npc.height > vector2.Y && npc.position.Y < vector2.Y + 16f) + { + flag2 = true; + break; + } + } + } + } + } + if (!flag2) + { + npc.localAI[1] = 1f; + } + else + { + npc.localAI[1] = 0f; + } + float num17 = 16f; + if (Main.player[npc.target].dead || (double)Main.player[npc.target].position.Y < Main.rockLayer) + { + flag2 = false; + npc.velocity.Y = npc.velocity.Y + 1f; + if ((double)npc.position.Y > (double)((Main.maxTilesY - 200) * 16)) + { + npc.velocity.Y = npc.velocity.Y + 1f; + num17 = 32f; + } + if ((double)npc.position.Y > (double)((Main.maxTilesY - 200) * 16)) + { + for (int a = 0; a < 200; a++) + { + if (Main.npc[a].type == mod.NPCType("ArmoredDiggerHead") || Main.npc[a].type == mod.NPCType("ArmoredDiggerBody") || + Main.npc[a].type == mod.NPCType("ArmoredDiggerTail")) + { + Main.npc[a].active = false; + } + } + } + } + float num18 = 0.1f; + float num19 = 0.15f; + Vector2 vector3 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); + float num20 = Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2); + float num21 = Main.player[npc.target].position.Y + (float)(Main.player[npc.target].height / 2); + num20 = (float)((int)(num20 / 16f) * 16); + num21 = (float)((int)(num21 / 16f) * 16); + vector3.X = (float)((int)(vector3.X / 16f) * 16); + vector3.Y = (float)((int)(vector3.Y / 16f) * 16); + num20 -= vector3.X; + num21 -= vector3.Y; + float num22 = (float)Math.Sqrt((double)(num20 * num20 + num21 * num21)); + if (npc.ai[1] > 0f && npc.ai[1] < (float)Main.npc.Length) + { + try + { + vector3 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); + num20 = Main.npc[(int)npc.ai[1]].position.X + (float)(Main.npc[(int)npc.ai[1]].width / 2) - vector3.X; + num21 = Main.npc[(int)npc.ai[1]].position.Y + (float)(Main.npc[(int)npc.ai[1]].height / 2) - vector3.Y; + } + catch + { + } + npc.rotation = (float)Math.Atan2((double)num21, (double)num20) + 1.57f; + num22 = (float)Math.Sqrt((double)(num20 * num20 + num21 * num21)); + int num23 = (int)(44f * npc.scale); + num22 = (num22 - (float)num23) / num22; + num20 *= num22; + num21 *= num22; + npc.velocity = Vector2.Zero; + npc.position.X = npc.position.X + num20; + npc.position.Y = npc.position.Y + num21; + return; + } + if (!flag2) + { + npc.TargetClosest(true); + npc.velocity.Y = npc.velocity.Y + 0.15f; + if (npc.velocity.Y > num17) + { + npc.velocity.Y = num17; + } + if ((double)(Math.Abs(npc.velocity.X) + Math.Abs(npc.velocity.Y)) < (double)num17 * 0.4) + { + if (npc.velocity.X < 0f) + { + npc.velocity.X = npc.velocity.X - num18 * 1.1f; + } + else + { + npc.velocity.X = npc.velocity.X + num18 * 1.1f; + } + } + else if (npc.velocity.Y == num17) + { + if (npc.velocity.X < num20) + { + npc.velocity.X = npc.velocity.X + num18; + } + else if (npc.velocity.X > num20) + { + npc.velocity.X = npc.velocity.X - num18; + } + } + else if (npc.velocity.Y > 4f) + { + if (npc.velocity.X < 0f) + { + npc.velocity.X = npc.velocity.X + num18 * 0.9f; + } + else + { + npc.velocity.X = npc.velocity.X - num18 * 0.9f; + } + } + } + else + { + if (npc.soundDelay == 0) + { + float num24 = num22 / 40f; + if (num24 < 10f) + { + num24 = 10f; + } + if (num24 > 20f) + { + num24 = 20f; + } + npc.soundDelay = (int)num24; + Main.PlaySound(15, (int)npc.position.X, (int)npc.position.Y, 1, 1f, 0f); + } + num22 = (float)Math.Sqrt((double)(num20 * num20 + num21 * num21)); + float num25 = Math.Abs(num20); + float num26 = Math.Abs(num21); + float num27 = num17 / num22; + num20 *= num27; + num21 *= num27; + if (((npc.velocity.X > 0f && num20 > 0f) || (npc.velocity.X < 0f && num20 < 0f)) && ((npc.velocity.Y > 0f && num21 > 0f) || (npc.velocity.Y < 0f && num21 < 0f))) + { + if (npc.velocity.X < num20) + { + npc.velocity.X = npc.velocity.X + num19; + } + else if (npc.velocity.X > num20) + { + npc.velocity.X = npc.velocity.X - num19; + } + if (npc.velocity.Y < num21) + { + npc.velocity.Y = npc.velocity.Y + num19; + } + else if (npc.velocity.Y > num21) + { + npc.velocity.Y = npc.velocity.Y - num19; + } + } + if ((npc.velocity.X > 0f && num20 > 0f) || (npc.velocity.X < 0f && num20 < 0f) || (npc.velocity.Y > 0f && num21 > 0f) || (npc.velocity.Y < 0f && num21 < 0f)) + { + if (npc.velocity.X < num20) + { + npc.velocity.X = npc.velocity.X + num18; + } + else if (npc.velocity.X > num20) + { + npc.velocity.X = npc.velocity.X - num18; + } + if (npc.velocity.Y < num21) + { + npc.velocity.Y = npc.velocity.Y + num18; + } + else if (npc.velocity.Y > num21) + { + npc.velocity.Y = npc.velocity.Y - num18; + } + if ((double)Math.Abs(num21) < (double)num17 * 0.2 && ((npc.velocity.X > 0f && num20 < 0f) || (npc.velocity.X < 0f && num20 > 0f))) + { + if (npc.velocity.Y > 0f) + { + npc.velocity.Y = npc.velocity.Y + num18 * 2f; + } + else + { + npc.velocity.Y = npc.velocity.Y - num18 * 2f; + } + } + if ((double)Math.Abs(num20) < (double)num17 * 0.2 && ((npc.velocity.Y > 0f && num21 < 0f) || (npc.velocity.Y < 0f && num21 > 0f))) + { + if (npc.velocity.X > 0f) + { + npc.velocity.X = npc.velocity.X + num18 * 2f; + } + else + { + npc.velocity.X = npc.velocity.X - num18 * 2f; + } + } + } + else if (num25 > num26) + { + if (npc.velocity.X < num20) + { + npc.velocity.X = npc.velocity.X + num18 * 1.1f; + } + else if (npc.velocity.X > num20) + { + npc.velocity.X = npc.velocity.X - num18 * 1.1f; + } + if ((double)(Math.Abs(npc.velocity.X) + Math.Abs(npc.velocity.Y)) < (double)num17 * 0.5) + { + if (npc.velocity.Y > 0f) + { + npc.velocity.Y = npc.velocity.Y + num18; + } + else + { + npc.velocity.Y = npc.velocity.Y - num18; + } + } + } + else + { + if (npc.velocity.Y < num21) + { + npc.velocity.Y = npc.velocity.Y + num18 * 1.1f; + } + else if (npc.velocity.Y > num21) + { + npc.velocity.Y = npc.velocity.Y - num18 * 1.1f; + } + if ((double)(Math.Abs(npc.velocity.X) + Math.Abs(npc.velocity.Y)) < (double)num17 * 0.5) + { + if (npc.velocity.X > 0f) + { + npc.velocity.X = npc.velocity.X + num18; + } + else + { + npc.velocity.X = npc.velocity.X - num18; + } + } + } + } + npc.rotation = (float)Math.Atan2((double)npc.velocity.Y, (double)npc.velocity.X) + 1.57f; + } + + public override void HitEffect(int hitDirection, double damage) + { + for (int k = 0; k < 3; k++) + { + Dust.NewDust(npc.position, npc.width, npc.height, 6, hitDirection, -1f, 0, default(Color), 1f); + } + if (npc.life <= 0) + { + for (int k = 0; k < 10; k++) + { + Dust.NewDust(npc.position, npc.width, npc.height, 6, hitDirection, -1f, 0, default(Color), 1f); + } } } - - public override void OnHitPlayer(Player player, int damage, bool crit) - { - if (Main.expertMode) - { - player.AddBuff(BuffID.Chilled, 200, true); - player.AddBuff(BuffID.Electrified, 120, true); - } - else - { - player.AddBuff(BuffID.Chilled, 100, true); - player.AddBuff(BuffID.Electrified, 60, true); - } - } - - public override bool CheckActive() + + public override void OnHitPlayer(Player player, int damage, bool crit) + { + player.AddBuff(BuffID.Chilled, 180, true); + player.AddBuff(BuffID.Electrified, 120, true); + } + + public override bool CheckActive() { return false; } diff --git a/NPCs/NormalNPCs/ArmoredDiggerBody.png b/NPCs/NormalNPCs/ArmoredDiggerBody.png index 751d9df83e..d161ec9a43 100644 Binary files a/NPCs/NormalNPCs/ArmoredDiggerBody.png and b/NPCs/NormalNPCs/ArmoredDiggerBody.png differ diff --git a/NPCs/NormalNPCs/ArmoredDiggerHead.cs b/NPCs/NormalNPCs/ArmoredDiggerHead.cs index 0ac28e62e9..552c46809c 100644 --- a/NPCs/NormalNPCs/ArmoredDiggerHead.cs +++ b/NPCs/NormalNPCs/ArmoredDiggerHead.cs @@ -21,96 +21,423 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetDefaults() { - npc.damage = 50; - npc.npcSlots = 5f; + npc.damage = 90; + npc.npcSlots = 10f; npc.width = 54; //324 npc.height = 54; //216 npc.defense = 15; - npc.lifeMax = 2000; + npc.lifeMax = 40000; npc.knockBackResist = 0f; - npc.aiStyle = 6; + npc.aiStyle = -1; aiType = -1; animationType = 10; - npc.value = Item.buyPrice(0, 0, 10, 0); + npc.value = Item.buyPrice(0, 5, 0, 0); npc.behindTiles = true; npc.noGravity = true; npc.noTileCollide = true; npc.HitSound = SoundID.NPCHit4; npc.DeathSound = SoundID.NPCDeath14; - npc.netAlways = true; - } - - public override void AI() - { - if (!TailSpawned) + for (int k = 0; k < npc.buffImmune.Length; k++) { - int Previous = npc.whoAmI; - for (int num36 = 0; num36 < 9; num36++) + npc.buffImmune[k] = true; + } + npc.netAlways = true; + } + + public override void AI() + { + if (npc.ai[3] > 0f) + { + npc.realLife = (int)npc.ai[3]; + } + if (npc.target < 0 || npc.target == 255 || Main.player[npc.target].dead) + { + npc.TargetClosest(true); + } + npc.velocity.Length(); + if (Main.netMode != 1) + { + if (!TailSpawned) { - int lol = 0; - if (num36 >= 0 && num36 < 8) + npc.ai[3] = (float)npc.whoAmI; + npc.realLife = npc.whoAmI; + int num2 = npc.whoAmI; + int num3 = 40; + for (int j = 0; j <= num3; j++) { - lol = NPC.NewNPC((int)npc.position.X + (npc.width / 2), (int)npc.position.Y + (npc.height / 2), mod.NPCType("ArmoredDiggerBody"), npc.whoAmI); + int num4 = mod.NPCType("ArmoredDiggerBody"); + if (j == num3) + { + num4 = mod.NPCType("ArmoredDiggerTail"); + } + int num5 = NPC.NewNPC((int)(npc.position.X + (float)(npc.width / 2)), (int)(npc.position.Y + (float)npc.height), num4, npc.whoAmI, 0f, 0f, 0f, 0f, 255); + Main.npc[num5].ai[3] = (float)npc.whoAmI; + Main.npc[num5].realLife = npc.whoAmI; + Main.npc[num5].ai[1] = (float)num2; + Main.npc[num2].ai[0] = (float)num5; + NetMessage.SendData(23, -1, -1, null, num5, 0f, 0f, 0f, 0, 0, 0); + num2 = num5; + } + TailSpawned = true; + } + } + int num12 = (int)(npc.position.X / 16f) - 1; + int num13 = (int)((npc.position.X + (float)npc.width) / 16f) + 2; + int num14 = (int)(npc.position.Y / 16f) - 1; + int num15 = (int)((npc.position.Y + (float)npc.height) / 16f) + 2; + if (num12 < 0) + { + num12 = 0; + } + if (num13 > Main.maxTilesX) + { + num13 = Main.maxTilesX; + } + if (num14 < 0) + { + num14 = 0; + } + if (num15 > Main.maxTilesY) + { + num15 = Main.maxTilesY; + } + bool flag2 = false; + if (!flag2) + { + for (int k = num12; k < num13; k++) + { + for (int l = num14; l < num15; l++) + { + if (Main.tile[k, l] != null && ((Main.tile[k, l].nactive() && (Main.tileSolid[(int)Main.tile[k, l].type] || (Main.tileSolidTop[(int)Main.tile[k, l].type] && Main.tile[k, l].frameY == 0))) || Main.tile[k, l].liquid > 64)) + { + Vector2 vector2; + vector2.X = (float)(k * 16); + vector2.Y = (float)(l * 16); + if (npc.position.X + (float)npc.width > vector2.X && npc.position.X < vector2.X + 16f && npc.position.Y + (float)npc.height > vector2.Y && npc.position.Y < vector2.Y + 16f) + { + flag2 = true; + break; + } + } + } + } + } + if (!flag2) + { + npc.localAI[1] = 1f; + Rectangle rectangle = new Rectangle((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height); + int num16 = 1000; + bool flag3 = true; + if (npc.position.Y > Main.player[npc.target].position.Y) + { + for (int m = 0; m < 255; m++) + { + if (Main.player[m].active) + { + Rectangle rectangle2 = new Rectangle((int)Main.player[m].position.X - num16, (int)Main.player[m].position.Y - num16, num16 * 2, num16 * 2); + if (rectangle.Intersects(rectangle2)) + { + flag3 = false; + break; + } + } + } + if (flag3) + { + flag2 = true; + } + } + } + else + { + npc.localAI[1] = 0f; + } + float num17 = 16f; + if (Main.player[npc.target].dead || (double)Main.player[npc.target].position.Y < Main.rockLayer) + { + flag2 = false; + npc.velocity.Y = npc.velocity.Y + 1f; + if ((double)npc.position.Y > (double)((Main.maxTilesY - 200) * 16)) + { + npc.velocity.Y = npc.velocity.Y + 1f; + num17 = 32f; + } + if ((double)npc.position.Y > (double)((Main.maxTilesY - 200) * 16)) + { + for (int a = 0; a < 200; a++) + { + if (Main.npc[a].type == mod.NPCType("ArmoredDiggerHead") || Main.npc[a].type == mod.NPCType("ArmoredDiggerBody") || + Main.npc[a].type == mod.NPCType("ArmoredDiggerTail")) + { + Main.npc[a].active = false; + } + } + } + } + float num18 = 0.1f; + float num19 = 0.15f; + Vector2 vector3 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); + float num20 = Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2); + float num21 = Main.player[npc.target].position.Y + (float)(Main.player[npc.target].height / 2); + num20 = (float)((int)(num20 / 16f) * 16); + num21 = (float)((int)(num21 / 16f) * 16); + vector3.X = (float)((int)(vector3.X / 16f) * 16); + vector3.Y = (float)((int)(vector3.Y / 16f) * 16); + num20 -= vector3.X; + num21 -= vector3.Y; + float num22 = (float)Math.Sqrt((double)(num20 * num20 + num21 * num21)); + if (npc.ai[1] > 0f && npc.ai[1] < (float)Main.npc.Length) + { + try + { + vector3 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); + num20 = Main.npc[(int)npc.ai[1]].position.X + (float)(Main.npc[(int)npc.ai[1]].width / 2) - vector3.X; + num21 = Main.npc[(int)npc.ai[1]].position.Y + (float)(Main.npc[(int)npc.ai[1]].height / 2) - vector3.Y; + } + catch + { + } + npc.rotation = (float)Math.Atan2((double)num21, (double)num20) + 1.57f; + num22 = (float)Math.Sqrt((double)(num20 * num20 + num21 * num21)); + int num23 = (int)(44f * npc.scale); + num22 = (num22 - (float)num23) / num22; + num20 *= num22; + num21 *= num22; + npc.velocity = Vector2.Zero; + npc.position.X = npc.position.X + num20; + npc.position.Y = npc.position.Y + num21; + return; + } + if (!flag2) + { + npc.TargetClosest(true); + npc.velocity.Y = npc.velocity.Y + 0.15f; + if (npc.velocity.Y > num17) + { + npc.velocity.Y = num17; + } + if ((double)(Math.Abs(npc.velocity.X) + Math.Abs(npc.velocity.Y)) < (double)num17 * 0.4) + { + if (npc.velocity.X < 0f) + { + npc.velocity.X = npc.velocity.X - num18 * 1.1f; } else { - lol = NPC.NewNPC((int)npc.position.X + (npc.width / 2), (int)npc.position.Y + (npc.height / 2), mod.NPCType("ArmoredDiggerTail"), npc.whoAmI); + npc.velocity.X = npc.velocity.X + num18 * 1.1f; + } + } + else if (npc.velocity.Y == num17) + { + if (npc.velocity.X < num20) + { + npc.velocity.X = npc.velocity.X + num18; + } + else if (npc.velocity.X > num20) + { + npc.velocity.X = npc.velocity.X - num18; + } + } + else if (npc.velocity.Y > 4f) + { + if (npc.velocity.X < 0f) + { + npc.velocity.X = npc.velocity.X + num18 * 0.9f; + } + else + { + npc.velocity.X = npc.velocity.X - num18 * 0.9f; } - Main.npc[lol].realLife = npc.whoAmI; - Main.npc[lol].ai[2] = (float)npc.whoAmI; - Main.npc[lol].ai[1] = (float)Previous; - Main.npc[Previous].ai[0] = (float)lol; - NetMessage.SendData(23, -1, -1, null, lol, 0f, 0f, 0f, 0); - Previous = lol; } - TailSpawned = true; } - } - - public override float SpawnChance(NPCSpawnInfo spawnInfo) - { - if (spawnInfo.playerSafe || !NPC.downedPlantBoss || spawnInfo.player.GetModPlayer(mod).ZoneAbyss) - { - return 0f; - } - return SpawnCondition.Cavern.Chance * 0.02f; - } + else + { + if (npc.soundDelay == 0) + { + float num24 = num22 / 40f; + if (num24 < 10f) + { + num24 = 10f; + } + if (num24 > 20f) + { + num24 = 20f; + } + npc.soundDelay = (int)num24; + Main.PlaySound(15, (int)npc.position.X, (int)npc.position.Y, 1, 1f, 0f); + } + num22 = (float)Math.Sqrt((double)(num20 * num20 + num21 * num21)); + float num25 = Math.Abs(num20); + float num26 = Math.Abs(num21); + float num27 = num17 / num22; + num20 *= num27; + num21 *= num27; + if (((npc.velocity.X > 0f && num20 > 0f) || (npc.velocity.X < 0f && num20 < 0f)) && ((npc.velocity.Y > 0f && num21 > 0f) || (npc.velocity.Y < 0f && num21 < 0f))) + { + if (npc.velocity.X < num20) + { + npc.velocity.X = npc.velocity.X + num19; + } + else if (npc.velocity.X > num20) + { + npc.velocity.X = npc.velocity.X - num19; + } + if (npc.velocity.Y < num21) + { + npc.velocity.Y = npc.velocity.Y + num19; + } + else if (npc.velocity.Y > num21) + { + npc.velocity.Y = npc.velocity.Y - num19; + } + } + if ((npc.velocity.X > 0f && num20 > 0f) || (npc.velocity.X < 0f && num20 < 0f) || (npc.velocity.Y > 0f && num21 > 0f) || (npc.velocity.Y < 0f && num21 < 0f)) + { + if (npc.velocity.X < num20) + { + npc.velocity.X = npc.velocity.X + num18; + } + else if (npc.velocity.X > num20) + { + npc.velocity.X = npc.velocity.X - num18; + } + if (npc.velocity.Y < num21) + { + npc.velocity.Y = npc.velocity.Y + num18; + } + else if (npc.velocity.Y > num21) + { + npc.velocity.Y = npc.velocity.Y - num18; + } + if ((double)Math.Abs(num21) < (double)num17 * 0.2 && ((npc.velocity.X > 0f && num20 < 0f) || (npc.velocity.X < 0f && num20 > 0f))) + { + if (npc.velocity.Y > 0f) + { + npc.velocity.Y = npc.velocity.Y + num18 * 2f; + } + else + { + npc.velocity.Y = npc.velocity.Y - num18 * 2f; + } + } + if ((double)Math.Abs(num20) < (double)num17 * 0.2 && ((npc.velocity.Y > 0f && num21 < 0f) || (npc.velocity.Y < 0f && num21 > 0f))) + { + if (npc.velocity.X > 0f) + { + npc.velocity.X = npc.velocity.X + num18 * 2f; + } + else + { + npc.velocity.X = npc.velocity.X - num18 * 2f; + } + } + } + else if (num25 > num26) + { + if (npc.velocity.X < num20) + { + npc.velocity.X = npc.velocity.X + num18 * 1.1f; + } + else if (npc.velocity.X > num20) + { + npc.velocity.X = npc.velocity.X - num18 * 1.1f; + } + if ((double)(Math.Abs(npc.velocity.X) + Math.Abs(npc.velocity.Y)) < (double)num17 * 0.5) + { + if (npc.velocity.Y > 0f) + { + npc.velocity.Y = npc.velocity.Y + num18; + } + else + { + npc.velocity.Y = npc.velocity.Y - num18; + } + } + } + else + { + if (npc.velocity.Y < num21) + { + npc.velocity.Y = npc.velocity.Y + num18 * 1.1f; + } + else if (npc.velocity.Y > num21) + { + npc.velocity.Y = npc.velocity.Y - num18 * 1.1f; + } + if ((double)(Math.Abs(npc.velocity.X) + Math.Abs(npc.velocity.Y)) < (double)num17 * 0.5) + { + if (npc.velocity.X > 0f) + { + npc.velocity.X = npc.velocity.X + num18; + } + else + { + npc.velocity.X = npc.velocity.X - num18; + } + } + } + } + npc.rotation = (float)Math.Atan2((double)npc.velocity.Y, (double)npc.velocity.X) + 1.57f; + if (flag2) + { + if (npc.localAI[0] != 1f) + { + npc.netUpdate = true; + } + npc.localAI[0] = 1f; + } + else + { + if (npc.localAI[0] != 0f) + { + npc.netUpdate = true; + } + npc.localAI[0] = 0f; + } + if (((npc.velocity.X > 0f && npc.oldVelocity.X < 0f) || (npc.velocity.X < 0f && npc.oldVelocity.X > 0f) || (npc.velocity.Y > 0f && npc.oldVelocity.Y < 0f) || (npc.velocity.Y < 0f && npc.oldVelocity.Y > 0f)) && !npc.justHit) + { + npc.netUpdate = true; + } + } + + public override void BossLoot(ref string name, ref int potionType) + { + potionType = ItemID.GreaterHealingPotion; + } + + public override bool CheckActive() + { + return false; + } public override void OnHitPlayer(Player player, int damage, bool crit) { - if (Main.expertMode) - { - player.AddBuff(BuffID.Chilled, 200, true); - player.AddBuff(BuffID.Electrified, 120, true); - } - else - { - player.AddBuff(BuffID.Chilled, 100, true); - player.AddBuff(BuffID.Electrified, 60, true); - } + player.AddBuff(BuffID.Chilled, 240, true); + player.AddBuff(BuffID.Electrified, 180, true); } public override void HitEffect(int hitDirection, double damage) { - for (int k = 0; k < 5; k++) + for (int k = 0; k < 3; k++) { - Dust.NewDust(npc.position, npc.width, npc.height, 234, hitDirection, -1f, 0, default(Color), 1f); + Dust.NewDust(npc.position, npc.width, npc.height, 6, hitDirection, -1f, 0, default(Color), 1f); } if (npc.life <= 0) { - for (int k = 0; k < 20; k++) + for (int k = 0; k < 10; k++) { - Dust.NewDust(npc.position, npc.width, npc.height, 234, hitDirection, -1f, 0, default(Color), 1f); + Dust.NewDust(npc.position, npc.width, npc.height, 6, hitDirection, -1f, 0, default(Color), 1f); } } } public override void NPCLoot() { - if (Main.rand.Next(2) == 0) - { - Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("Ectoblood"), Main.rand.Next(3, 6)); - } - } + if (Main.rand.Next(3) == 0) + { + Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("DraedonsRemote")); + } + Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("DemonicBoneAsh"), Main.rand.Next(2, 5)); + } } } \ No newline at end of file diff --git a/NPCs/NormalNPCs/ArmoredDiggerHead.png b/NPCs/NormalNPCs/ArmoredDiggerHead.png index 1e15cbfd48..827a6e309e 100644 Binary files a/NPCs/NormalNPCs/ArmoredDiggerHead.png and b/NPCs/NormalNPCs/ArmoredDiggerHead.png differ diff --git a/NPCs/NormalNPCs/ArmoredDiggerTail.cs b/NPCs/NormalNPCs/ArmoredDiggerTail.cs index 5a902b5b4b..d7dd329785 100644 --- a/NPCs/NormalNPCs/ArmoredDiggerTail.cs +++ b/NPCs/NormalNPCs/ArmoredDiggerTail.cs @@ -19,11 +19,11 @@ namespace CalamityMod.NPCs.NormalNPCs public override void SetDefaults() { - npc.damage = 20; - npc.width = 38; //324 - npc.height = 38; //216 + npc.damage = 55; + npc.width = 34; //324 + npc.height = 34; //216 npc.defense = 55; - npc.lifeMax = 2000; + npc.lifeMax = 40000; npc.knockBackResist = 0f; npc.aiStyle = 6; aiType = -1; @@ -33,7 +33,11 @@ namespace CalamityMod.NPCs.NormalNPCs npc.noTileCollide = true; npc.HitSound = SoundID.Item4; npc.DeathSound = SoundID.Item14; - npc.netAlways = true; + for (int k = 0; k < npc.buffImmune.Length; k++) + { + npc.buffImmune[k] = true; + } + npc.netAlways = true; npc.dontCountMe = true; } @@ -44,29 +48,314 @@ namespace CalamityMod.NPCs.NormalNPCs public override void AI() { - if (!Main.npc[(int)npc.ai[1]].active) + if (npc.ai[3] > 0f) + { + npc.realLife = (int)npc.ai[3]; + } + if (npc.target < 0 || npc.target == 255 || Main.player[npc.target].dead) + { + npc.TargetClosest(true); + } + npc.velocity.Length(); + bool flag = false; + if (npc.ai[1] <= 0f) + { + flag = true; + } + else if (Main.npc[(int)npc.ai[1]].life <= 0) + { + flag = true; + } + if (flag) { npc.life = 0; npc.HitEffect(0, 10.0); - npc.active = false; + npc.checkDead(); } + int num12 = (int)(npc.position.X / 16f) - 1; + int num13 = (int)((npc.position.X + (float)npc.width) / 16f) + 2; + int num14 = (int)(npc.position.Y / 16f) - 1; + int num15 = (int)((npc.position.Y + (float)npc.height) / 16f) + 2; + if (num12 < 0) + { + num12 = 0; + } + if (num13 > Main.maxTilesX) + { + num13 = Main.maxTilesX; + } + if (num14 < 0) + { + num14 = 0; + } + if (num15 > Main.maxTilesY) + { + num15 = Main.maxTilesY; + } + bool flag2 = false; + if (!flag2) + { + for (int k = num12; k < num13; k++) + { + for (int l = num14; l < num15; l++) + { + if (Main.tile[k, l] != null && ((Main.tile[k, l].nactive() && (Main.tileSolid[(int)Main.tile[k, l].type] || (Main.tileSolidTop[(int)Main.tile[k, l].type] && Main.tile[k, l].frameY == 0))) || Main.tile[k, l].liquid > 64)) + { + Vector2 vector2; + vector2.X = (float)(k * 16); + vector2.Y = (float)(l * 16); + if (npc.position.X + (float)npc.width > vector2.X && npc.position.X < vector2.X + 16f && npc.position.Y + (float)npc.height > vector2.Y && npc.position.Y < vector2.Y + 16f) + { + flag2 = true; + break; + } + } + } + } + } + if (!flag2) + { + npc.localAI[1] = 1f; + } + else + { + npc.localAI[1] = 0f; + } + float num17 = 16f; + if (Main.player[npc.target].dead || (double)Main.player[npc.target].position.Y < Main.rockLayer) + { + flag2 = false; + npc.velocity.Y = npc.velocity.Y + 1f; + if ((double)npc.position.Y > (double)((Main.maxTilesY - 200) * 16)) + { + npc.velocity.Y = npc.velocity.Y + 1f; + num17 = 32f; + } + if ((double)npc.position.Y > (double)((Main.maxTilesY - 200) * 16)) + { + for (int a = 0; a < 200; a++) + { + if (Main.npc[a].type == mod.NPCType("ArmoredDiggerHead") || Main.npc[a].type == mod.NPCType("ArmoredDiggerBody") || + Main.npc[a].type == mod.NPCType("ArmoredDiggerTail")) + { + Main.npc[a].active = false; + } + } + } + } + float num18 = 0.1f; + float num19 = 0.15f; + Vector2 vector3 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); + float num20 = Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2); + float num21 = Main.player[npc.target].position.Y + (float)(Main.player[npc.target].height / 2); + num20 = (float)((int)(num20 / 16f) * 16); + num21 = (float)((int)(num21 / 16f) * 16); + vector3.X = (float)((int)(vector3.X / 16f) * 16); + vector3.Y = (float)((int)(vector3.Y / 16f) * 16); + num20 -= vector3.X; + num21 -= vector3.Y; + float num22 = (float)Math.Sqrt((double)(num20 * num20 + num21 * num21)); + if (npc.ai[1] > 0f && npc.ai[1] < (float)Main.npc.Length) + { + try + { + vector3 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); + num20 = Main.npc[(int)npc.ai[1]].position.X + (float)(Main.npc[(int)npc.ai[1]].width / 2) - vector3.X; + num21 = Main.npc[(int)npc.ai[1]].position.Y + (float)(Main.npc[(int)npc.ai[1]].height / 2) - vector3.Y; + } + catch + { + } + npc.rotation = (float)Math.Atan2((double)num21, (double)num20) + 1.57f; + num22 = (float)Math.Sqrt((double)(num20 * num20 + num21 * num21)); + int num23 = (int)(44f * npc.scale); + num22 = (num22 - (float)num23) / num22; + num20 *= num22; + num21 *= num22; + npc.velocity = Vector2.Zero; + npc.position.X = npc.position.X + num20; + npc.position.Y = npc.position.Y + num21; + return; + } + if (!flag2) + { + npc.TargetClosest(true); + npc.velocity.Y = npc.velocity.Y + 0.15f; + if (npc.velocity.Y > num17) + { + npc.velocity.Y = num17; + } + if ((double)(Math.Abs(npc.velocity.X) + Math.Abs(npc.velocity.Y)) < (double)num17 * 0.4) + { + if (npc.velocity.X < 0f) + { + npc.velocity.X = npc.velocity.X - num18 * 1.1f; + } + else + { + npc.velocity.X = npc.velocity.X + num18 * 1.1f; + } + } + else if (npc.velocity.Y == num17) + { + if (npc.velocity.X < num20) + { + npc.velocity.X = npc.velocity.X + num18; + } + else if (npc.velocity.X > num20) + { + npc.velocity.X = npc.velocity.X - num18; + } + } + else if (npc.velocity.Y > 4f) + { + if (npc.velocity.X < 0f) + { + npc.velocity.X = npc.velocity.X + num18 * 0.9f; + } + else + { + npc.velocity.X = npc.velocity.X - num18 * 0.9f; + } + } + } + else + { + if (npc.soundDelay == 0) + { + float num24 = num22 / 40f; + if (num24 < 10f) + { + num24 = 10f; + } + if (num24 > 20f) + { + num24 = 20f; + } + npc.soundDelay = (int)num24; + Main.PlaySound(15, (int)npc.position.X, (int)npc.position.Y, 1, 1f, 0f); + } + num22 = (float)Math.Sqrt((double)(num20 * num20 + num21 * num21)); + float num25 = Math.Abs(num20); + float num26 = Math.Abs(num21); + float num27 = num17 / num22; + num20 *= num27; + num21 *= num27; + if (((npc.velocity.X > 0f && num20 > 0f) || (npc.velocity.X < 0f && num20 < 0f)) && ((npc.velocity.Y > 0f && num21 > 0f) || (npc.velocity.Y < 0f && num21 < 0f))) + { + if (npc.velocity.X < num20) + { + npc.velocity.X = npc.velocity.X + num19; + } + else if (npc.velocity.X > num20) + { + npc.velocity.X = npc.velocity.X - num19; + } + if (npc.velocity.Y < num21) + { + npc.velocity.Y = npc.velocity.Y + num19; + } + else if (npc.velocity.Y > num21) + { + npc.velocity.Y = npc.velocity.Y - num19; + } + } + if ((npc.velocity.X > 0f && num20 > 0f) || (npc.velocity.X < 0f && num20 < 0f) || (npc.velocity.Y > 0f && num21 > 0f) || (npc.velocity.Y < 0f && num21 < 0f)) + { + if (npc.velocity.X < num20) + { + npc.velocity.X = npc.velocity.X + num18; + } + else if (npc.velocity.X > num20) + { + npc.velocity.X = npc.velocity.X - num18; + } + if (npc.velocity.Y < num21) + { + npc.velocity.Y = npc.velocity.Y + num18; + } + else if (npc.velocity.Y > num21) + { + npc.velocity.Y = npc.velocity.Y - num18; + } + if ((double)Math.Abs(num21) < (double)num17 * 0.2 && ((npc.velocity.X > 0f && num20 < 0f) || (npc.velocity.X < 0f && num20 > 0f))) + { + if (npc.velocity.Y > 0f) + { + npc.velocity.Y = npc.velocity.Y + num18 * 2f; + } + else + { + npc.velocity.Y = npc.velocity.Y - num18 * 2f; + } + } + if ((double)Math.Abs(num20) < (double)num17 * 0.2 && ((npc.velocity.Y > 0f && num21 < 0f) || (npc.velocity.Y < 0f && num21 > 0f))) + { + if (npc.velocity.X > 0f) + { + npc.velocity.X = npc.velocity.X + num18 * 2f; + } + else + { + npc.velocity.X = npc.velocity.X - num18 * 2f; + } + } + } + else if (num25 > num26) + { + if (npc.velocity.X < num20) + { + npc.velocity.X = npc.velocity.X + num18 * 1.1f; + } + else if (npc.velocity.X > num20) + { + npc.velocity.X = npc.velocity.X - num18 * 1.1f; + } + if ((double)(Math.Abs(npc.velocity.X) + Math.Abs(npc.velocity.Y)) < (double)num17 * 0.5) + { + if (npc.velocity.Y > 0f) + { + npc.velocity.Y = npc.velocity.Y + num18; + } + else + { + npc.velocity.Y = npc.velocity.Y - num18; + } + } + } + else + { + if (npc.velocity.Y < num21) + { + npc.velocity.Y = npc.velocity.Y + num18 * 1.1f; + } + else if (npc.velocity.Y > num21) + { + npc.velocity.Y = npc.velocity.Y - num18 * 1.1f; + } + if ((double)(Math.Abs(npc.velocity.X) + Math.Abs(npc.velocity.Y)) < (double)num17 * 0.5) + { + if (npc.velocity.X > 0f) + { + npc.velocity.X = npc.velocity.X + num18; + } + else + { + npc.velocity.X = npc.velocity.X - num18; + } + } + } + } + npc.rotation = (float)Math.Atan2((double)npc.velocity.Y, (double)npc.velocity.X) + 1.57f; } - - public override void OnHitPlayer(Player player, int damage, bool crit) - { - if (Main.expertMode) - { - player.AddBuff(BuffID.Chilled, 200, true); - player.AddBuff(BuffID.Electrified, 120, true); - } - else - { - player.AddBuff(BuffID.Chilled, 100, true); - player.AddBuff(BuffID.Electrified, 60, true); - } - } - - public override bool CheckActive() + + public override void OnHitPlayer(Player player, int damage, bool crit) + { + player.AddBuff(BuffID.Chilled, 120, true); + player.AddBuff(BuffID.Electrified, 90, true); + } + + public override bool CheckActive() { return false; } @@ -75,13 +364,20 @@ namespace CalamityMod.NPCs.NormalNPCs { return false; } - - public override void HitEffect(int hitDirection, double damage) - { - for (int k = 0; k < 5; k++) - { - Dust.NewDust(npc.position, npc.width, npc.height, 234, hitDirection, -1f, 0, default(Color), 1f); - } - } - } + + public override void HitEffect(int hitDirection, double damage) + { + for (int k = 0; k < 3; k++) + { + Dust.NewDust(npc.position, npc.width, npc.height, 6, hitDirection, -1f, 0, default(Color), 1f); + } + if (npc.life <= 0) + { + for (int k = 0; k < 10; k++) + { + Dust.NewDust(npc.position, npc.width, npc.height, 6, hitDirection, -1f, 0, default(Color), 1f); + } + } + } + } } \ No newline at end of file diff --git a/NPCs/NormalNPCs/ArmoredDiggerTail.png b/NPCs/NormalNPCs/ArmoredDiggerTail.png index b27be183f3..bf4a989ceb 100644 Binary files a/NPCs/NormalNPCs/ArmoredDiggerTail.png and b/NPCs/NormalNPCs/ArmoredDiggerTail.png differ diff --git a/NPCs/NormalNPCs/BlightedEye.cs b/NPCs/NormalNPCs/BlightedEye.cs index 9eccf0e677..20cdf43c7a 100644 --- a/NPCs/NormalNPCs/BlightedEye.cs +++ b/NPCs/NormalNPCs/BlightedEye.cs @@ -59,14 +59,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override void OnHitPlayer(Player player, int damage, bool crit) { - if (Main.expertMode) - { - player.AddBuff(BuffID.Weak, 100, true); - } - else - { - player.AddBuff(BuffID.Weak, 60, true); - } + player.AddBuff(BuffID.Weak, 120, true); } public override void NPCLoot() diff --git a/NPCs/NormalNPCs/CalamityEye.cs b/NPCs/NormalNPCs/CalamityEye.cs index 6a1adb02db..cdccfa3c65 100644 --- a/NPCs/NormalNPCs/CalamityEye.cs +++ b/NPCs/NormalNPCs/CalamityEye.cs @@ -59,16 +59,8 @@ namespace CalamityMod.NPCs.NormalNPCs public override void OnHitPlayer(Player player, int damage, bool crit) { - if (Main.expertMode) - { - player.AddBuff(BuffID.Weak, 200, true); - player.AddBuff(mod.BuffType("BrimstoneFlames"), 100, true); - } - else - { - player.AddBuff(BuffID.Weak, 60, true); - player.AddBuff(mod.BuffType("BrimstoneFlames"), 50, true); - } + player.AddBuff(BuffID.Weak, 120, true); + player.AddBuff(mod.BuffType("BrimstoneFlames"), 120, true); } public override void NPCLoot() diff --git a/NPCs/NormalNPCs/CosmicElemental.cs b/NPCs/NormalNPCs/CosmicElemental.cs index f05cc08de5..b76e399e8c 100644 --- a/NPCs/NormalNPCs/CosmicElemental.cs +++ b/NPCs/NormalNPCs/CosmicElemental.cs @@ -47,16 +47,9 @@ namespace CalamityMod.NPCs.NormalNPCs { if (CalamityWorld.revenge) { - player.AddBuff(mod.BuffType("Horror"), 150, true); - } - if (Main.expertMode) - { - player.AddBuff(BuffID.Confused, 200, true); - } - else - { - player.AddBuff(BuffID.Confused, 60, true); + player.AddBuff(mod.BuffType("Horror"), 180, true); } + player.AddBuff(BuffID.Confused, 180, true); } public override void HitEffect(int hitDirection, double damage) diff --git a/NPCs/NormalNPCs/CrimulanBlightSlime.cs b/NPCs/NormalNPCs/CrimulanBlightSlime.cs index 390b9b5c08..7905d71bd3 100644 --- a/NPCs/NormalNPCs/CrimulanBlightSlime.cs +++ b/NPCs/NormalNPCs/CrimulanBlightSlime.cs @@ -64,16 +64,8 @@ namespace CalamityMod.NPCs.NormalNPCs public override void OnHitPlayer(Player player, int damage, bool crit) { - if (Main.expertMode) - { - player.AddBuff(BuffID.ManaSickness, 100, true); - player.AddBuff(BuffID.Confused, 60, true); - } - else - { - player.AddBuff(BuffID.ManaSickness, 60, true); - player.AddBuff(BuffID.Confused, 60, true); - } + player.AddBuff(BuffID.ManaSickness, 120, true); + player.AddBuff(BuffID.Confused, 120, true); } public override void NPCLoot() diff --git a/NPCs/NormalNPCs/Cryon.cs b/NPCs/NormalNPCs/Cryon.cs index a2cc1766be..f6ed644904 100644 --- a/NPCs/NormalNPCs/Cryon.cs +++ b/NPCs/NormalNPCs/Cryon.cs @@ -105,11 +105,6 @@ namespace CalamityMod.NPCs.NormalNPCs if (npc.velocity.Y == 0f && Math.Abs(npc.velocity.X) > 3f && ((npc.Center.X < Main.player[npc.target].Center.X && npc.velocity.X > 0f) || (npc.Center.X > Main.player[npc.target].Center.X && npc.velocity.X < 0f))) { npc.velocity.Y = npc.velocity.Y - 4f; - Main.PlaySound(2, npc.Center, 27); - for (int k = 0; k < 10; k++) - { - Dust.NewDust(npc.position, npc.width, npc.height, 92, 0f, -1f, 0, default(Color), 1f); - } } if (npc.ai[3] < (float)num) { @@ -154,7 +149,7 @@ namespace CalamityMod.NPCs.NormalNPCs num9 = 0f; } num7 = 5f + num9 * (float)npc.direction * 4f; - num8 = 0.2f; + num8 = 0.1f; if (npc.velocity.X < -num7 || npc.velocity.X > num7) { if (npc.velocity.Y == 0f) @@ -316,20 +311,20 @@ namespace CalamityMod.NPCs.NormalNPCs } } } - npc.spriteDirection = -npc.direction; } public override void FindFrame(int frameHeight) { if (npc.velocity.Y > 0f || npc.velocity.Y < 0f) { + npc.spriteDirection = npc.direction; npc.frame.Y = frameHeight * 7; npc.frameCounter = 0.0; } else { npc.spriteDirection = npc.direction; - npc.frameCounter += (double)(npc.velocity.Length() / 8f); + npc.frameCounter += (double)(npc.velocity.Length() / 2f); if (npc.frameCounter > 12.0) { npc.frame.Y = npc.frame.Y + frameHeight; @@ -355,17 +350,10 @@ namespace CalamityMod.NPCs.NormalNPCs public override void OnHitPlayer(Player player, int damage, bool crit) { - if (Main.expertMode) + player.AddBuff(BuffID.Frostburn, 300, true); + if (Main.rand.Next(3) == 0) { - player.AddBuff(BuffID.Frostburn, 300, true); - if (Main.rand.Next(3) == 0) - { - player.AddBuff(mod.BuffType("GlacialState"), 30, true); - } - } - else - { - player.AddBuff(BuffID.Frostburn, 160, true); + player.AddBuff(mod.BuffType("GlacialState"), 30, true); } } diff --git a/NPCs/NormalNPCs/Cryon.png b/NPCs/NormalNPCs/Cryon.png index 850a6bb7ab..3b705c9b93 100644 Binary files a/NPCs/NormalNPCs/Cryon.png and b/NPCs/NormalNPCs/Cryon.png differ diff --git a/NPCs/NormalNPCs/EbonianBlightSlime.cs b/NPCs/NormalNPCs/EbonianBlightSlime.cs index 64ed0eb8c7..ff1eb16e43 100644 --- a/NPCs/NormalNPCs/EbonianBlightSlime.cs +++ b/NPCs/NormalNPCs/EbonianBlightSlime.cs @@ -64,16 +64,8 @@ namespace CalamityMod.NPCs.NormalNPCs public override void OnHitPlayer(Player player, int damage, bool crit) { - if (Main.expertMode) - { - player.AddBuff(BuffID.ManaSickness, 100, true); - player.AddBuff(BuffID.Weak, 260, true); - } - else - { - player.AddBuff(BuffID.ManaSickness, 80, true); - player.AddBuff(BuffID.Weak, 200, true); - } + player.AddBuff(BuffID.ManaSickness, 120, true); + player.AddBuff(BuffID.Weak, 120, true); } public override void NPCLoot() diff --git a/NPCs/NormalNPCs/HeatSpirit.cs b/NPCs/NormalNPCs/HeatSpirit.cs index 89f8e31c73..a8ab7e05d1 100644 --- a/NPCs/NormalNPCs/HeatSpirit.cs +++ b/NPCs/NormalNPCs/HeatSpirit.cs @@ -74,16 +74,8 @@ namespace CalamityMod.NPCs.NormalNPCs public override void OnHitPlayer(Player player, int damage, bool crit) { - if (Main.expertMode) - { - player.AddBuff(BuffID.OnFire, 180, true); - player.AddBuff(mod.BuffType("BrimstoneFlames"), 80, true); - } - else - { - player.AddBuff(BuffID.OnFire, 120, true); - player.AddBuff(mod.BuffType("BrimstoneFlames"), 40, true); - } + player.AddBuff(BuffID.OnFire, 120, true); + player.AddBuff(mod.BuffType("BrimstoneFlames"), 120, true); } public override void HitEffect(int hitDirection, double damage) diff --git a/NPCs/NormalNPCs/IceClasper.cs b/NPCs/NormalNPCs/IceClasper.cs index 97afb75cde..a73a04ae5b 100644 --- a/NPCs/NormalNPCs/IceClasper.cs +++ b/NPCs/NormalNPCs/IceClasper.cs @@ -241,22 +241,15 @@ namespace CalamityMod.NPCs.NormalNPCs !spawnInfo.player.ZoneDungeon && Main.hardMode && !spawnInfo.playerInTown && !spawnInfo.player.ZoneOldOneArmy && !Main.snowMoon && !Main.pumpkinMoon ? 0.007f : 0f; } - - public override void OnHitPlayer(Player player, int damage, bool crit) - { - if (Main.expertMode) - { - player.AddBuff(BuffID.Frostburn, 300, true); - if (Main.rand.Next(3) == 0) - { - player.AddBuff(mod.BuffType("GlacialState"), 30, true); - } - } - else - { - player.AddBuff(BuffID.Frostburn, 160, true); - } - } + + public override void OnHitPlayer(Player player, int damage, bool crit) + { + player.AddBuff(BuffID.Frostburn, 300, true); + if (Main.rand.Next(3) == 0) + { + player.AddBuff(mod.BuffType("GlacialState"), 30, true); + } + } public override void HitEffect(int hitDirection, double damage) { diff --git a/NPCs/NormalNPCs/ImpiousImmolator.cs b/NPCs/NormalNPCs/ImpiousImmolator.cs index bd7841705c..afc0aff0b0 100644 --- a/NPCs/NormalNPCs/ImpiousImmolator.cs +++ b/NPCs/NormalNPCs/ImpiousImmolator.cs @@ -247,16 +247,8 @@ namespace CalamityMod.NPCs.NormalNPCs public override void OnHitPlayer(Player player, int damage, bool crit) { - if (Main.expertMode) - { - player.AddBuff(BuffID.OnFire, 300, true); - player.AddBuff(mod.BuffType("HolyLight"), 120, true); - } - else - { - player.AddBuff(BuffID.OnFire, 150, true); - player.AddBuff(mod.BuffType("HolyLight"), 60, true); - } + player.AddBuff(BuffID.OnFire, 180, true); + player.AddBuff(mod.BuffType("HolyLight"), 180, true); } public override void NPCLoot() diff --git a/NPCs/NormalNPCs/Pitbull.cs b/NPCs/NormalNPCs/Pitbull.cs index fc157f2bd4..513ceb939b 100644 --- a/NPCs/NormalNPCs/Pitbull.cs +++ b/NPCs/NormalNPCs/Pitbull.cs @@ -45,14 +45,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override void OnHitPlayer(Player player, int damage, bool crit) { - if (Main.expertMode) - { - player.AddBuff(BuffID.Bleeding, 300, true); - } - else - { - player.AddBuff(BuffID.Bleeding, 160, true); - } + player.AddBuff(BuffID.Bleeding, 180, true); } public override void HitEffect(int hitDirection, double damage) diff --git a/NPCs/NormalNPCs/PlagueBee.cs b/NPCs/NormalNPCs/PlagueBee.cs index ebf4fb5663..1c1e7d9a8b 100644 --- a/NPCs/NormalNPCs/PlagueBee.cs +++ b/NPCs/NormalNPCs/PlagueBee.cs @@ -64,14 +64,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override void OnHitPlayer(Player player, int damage, bool crit) { - if (Main.expertMode) - { - player.AddBuff(mod.BuffType("Plague"), 280, true); - } - else - { - player.AddBuff(mod.BuffType("Plague"), 260, true); - } + player.AddBuff(mod.BuffType("Plague"), 180, true); } public override void HitEffect(int hitDirection, double damage) diff --git a/NPCs/NormalNPCs/PlagueBeeLarge.cs b/NPCs/NormalNPCs/PlagueBeeLarge.cs index af739ec331..3a1bfd46ce 100644 --- a/NPCs/NormalNPCs/PlagueBeeLarge.cs +++ b/NPCs/NormalNPCs/PlagueBeeLarge.cs @@ -64,14 +64,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override void OnHitPlayer(Player player, int damage, bool crit) { - if (Main.expertMode) - { - player.AddBuff(mod.BuffType("Plague"), 300, true); - } - else - { - player.AddBuff(mod.BuffType("Plague"), 280, true); - } + player.AddBuff(mod.BuffType("Plague"), 180, true); } public override void HitEffect(int hitDirection, double damage) diff --git a/NPCs/NormalNPCs/PlaguedFlyingFox.cs b/NPCs/NormalNPCs/PlaguedFlyingFox.cs index af84283a3c..19731dc33f 100644 --- a/NPCs/NormalNPCs/PlaguedFlyingFox.cs +++ b/NPCs/NormalNPCs/PlaguedFlyingFox.cs @@ -62,7 +62,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override void OnHitPlayer(Player player, int damage, bool crit) { - player.AddBuff(mod.BuffType("Plague"), 180, true); + player.AddBuff(mod.BuffType("Plague"), 300, true); } public override void HitEffect(int hitDirection, double damage) diff --git a/NPCs/NormalNPCs/PlaguedJungleSlime.cs b/NPCs/NormalNPCs/PlaguedJungleSlime.cs index c3731fbbfd..29162d5a5a 100644 --- a/NPCs/NormalNPCs/PlaguedJungleSlime.cs +++ b/NPCs/NormalNPCs/PlaguedJungleSlime.cs @@ -137,7 +137,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override void OnHitPlayer(Player player, int damage, bool crit) { - player.AddBuff(mod.BuffType("Plague"), 180, true); + player.AddBuff(mod.BuffType("Plague"), 300, true); } } } \ No newline at end of file diff --git a/NPCs/NormalNPCs/SandTortoise.cs b/NPCs/NormalNPCs/SandTortoise.cs index 8e72a8065f..dbbd2210aa 100644 --- a/NPCs/NormalNPCs/SandTortoise.cs +++ b/NPCs/NormalNPCs/SandTortoise.cs @@ -64,10 +64,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override void OnHitPlayer(Player player, int damage, bool crit) { - if (Main.expertMode) - { - player.AddBuff(mod.BuffType("HolyLight"), 60, true); - } + player.AddBuff(mod.BuffType("HolyLight"), 180, true); } public override void NPCLoot() diff --git a/NPCs/NormalNPCs/ScornEater.cs b/NPCs/NormalNPCs/ScornEater.cs index 2bc0457b4c..b37ec2e91c 100644 --- a/NPCs/NormalNPCs/ScornEater.cs +++ b/NPCs/NormalNPCs/ScornEater.cs @@ -171,7 +171,13 @@ namespace CalamityMod.NPCs.NormalNPCs { Dust.NewDust(npc.position, npc.width, npc.height, 244, hitDirection, -1f, 0, default(Color), 1f); } - } + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/ScornEater"), 1f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/ScornEater2"), 1f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/ScornEater3"), 1f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/ScornEater4"), 1f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/ScornEater5"), 1f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/ScornEater6"), 1f); + } } public override void NPCLoot() diff --git a/NPCs/NormalNPCs/ShockstormShuttle.cs b/NPCs/NormalNPCs/ShockstormShuttle.cs index b1fac39fe8..7ffde0db62 100644 --- a/NPCs/NormalNPCs/ShockstormShuttle.cs +++ b/NPCs/NormalNPCs/ShockstormShuttle.cs @@ -565,14 +565,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override void OnHitPlayer(Player player, int damage, bool crit) { - if (Main.expertMode) - { - player.AddBuff(BuffID.Electrified, 200, true); - } - else - { - player.AddBuff(BuffID.Electrified, 120, true); - } + player.AddBuff(BuffID.Electrified, 120, true); } public override void NPCLoot() diff --git a/NPCs/NormalNPCs/StormlionCharger.cs b/NPCs/NormalNPCs/StormlionCharger.cs index e59a9bad56..71f8fe4cce 100644 --- a/NPCs/NormalNPCs/StormlionCharger.cs +++ b/NPCs/NormalNPCs/StormlionCharger.cs @@ -61,10 +61,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override void OnHitPlayer(Player player, int damage, bool crit) { - if (Main.expertMode) - { - player.AddBuff(BuffID.Electrified, 60, true); - } + player.AddBuff(BuffID.Electrified, 90, true); } public override void NPCLoot() diff --git a/NPCs/NormalNPCs/SunBat.cs b/NPCs/NormalNPCs/SunBat.cs index 5b3d31d615..e473b85d50 100644 --- a/NPCs/NormalNPCs/SunBat.cs +++ b/NPCs/NormalNPCs/SunBat.cs @@ -57,16 +57,8 @@ namespace CalamityMod.NPCs.NormalNPCs public override void OnHitPlayer(Player player, int damage, bool crit) { - if (Main.expertMode) - { - player.AddBuff(BuffID.OnFire, 300, true); - player.AddBuff(mod.BuffType("HolyLight"), 120, true); - } - else - { - player.AddBuff(BuffID.OnFire, 150, true); - player.AddBuff(mod.BuffType("HolyLight"), 60, true); - } + player.AddBuff(BuffID.OnFire, 120, true); + player.AddBuff(mod.BuffType("HolyLight"), 120, true); } public override void HitEffect(int hitDirection, double damage) diff --git a/NPCs/NormalNPCs/Sunskater.cs b/NPCs/NormalNPCs/Sunskater.cs index c05907a9d0..bf25fee00c 100644 --- a/NPCs/NormalNPCs/Sunskater.cs +++ b/NPCs/NormalNPCs/Sunskater.cs @@ -215,16 +215,8 @@ namespace CalamityMod.NPCs.NormalNPCs public override void OnHitPlayer(Player player, int damage, bool crit) { - if (Main.expertMode) - { - player.AddBuff(BuffID.OnFire, 300, true); - player.AddBuff(mod.BuffType("HolyLight"), 120, true); - } - else - { - player.AddBuff(BuffID.OnFire, 150, true); - player.AddBuff(mod.BuffType("HolyLight"), 60, true); - } + player.AddBuff(BuffID.OnFire, 120, true); + player.AddBuff(mod.BuffType("HolyLight"), 120, true); } public override void NPCLoot() diff --git a/NPCs/Perforator/PerforatorBodyLarge.cs b/NPCs/Perforator/PerforatorBodyLarge.cs index 7c8afeda49..bf18f57cf6 100644 --- a/NPCs/Perforator/PerforatorBodyLarge.cs +++ b/NPCs/Perforator/PerforatorBodyLarge.cs @@ -134,7 +134,10 @@ namespace CalamityMod.NPCs.Perforator { Dust.NewDust(npc.position, npc.width, npc.height, 5, hitDirection, -1f, 0, default(Color), 1f); } - } + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/LargePerf2"), 1f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/LargePerf3"), 1f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/LargePerf4"), 1f); + } } public override void ScaleExpertStats(int numPlayers, float bossLifeScale) @@ -146,10 +149,7 @@ namespace CalamityMod.NPCs.Perforator public override void OnHitPlayer(Player player, int damage, bool crit) { player.AddBuff(mod.BuffType("BurningBlood"), 180, true); - if (Main.expertMode) - { - player.AddBuff(BuffID.Bleeding, 100, true); - } + player.AddBuff(BuffID.Bleeding, 180, true); } } } \ No newline at end of file diff --git a/NPCs/Perforator/PerforatorBodyMedium.cs b/NPCs/Perforator/PerforatorBodyMedium.cs index 4729f2d0ca..c6e2261bc9 100644 --- a/NPCs/Perforator/PerforatorBodyMedium.cs +++ b/NPCs/Perforator/PerforatorBodyMedium.cs @@ -126,7 +126,9 @@ namespace CalamityMod.NPCs.Perforator { Dust.NewDust(npc.position, npc.width, npc.height, 5, hitDirection, -1f, 0, default(Color), 1f); } - } + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/MediumPerf2"), 1f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/MediumPerf3"), 1f); + } } public override void ScaleExpertStats(int numPlayers, float bossLifeScale) @@ -134,5 +136,11 @@ namespace CalamityMod.NPCs.Perforator npc.lifeMax = (int)(npc.lifeMax * 0.7f * bossLifeScale); npc.damage = (int)(npc.damage * 0.7f); } - } + + public override void OnHitPlayer(Player player, int damage, bool crit) + { + player.AddBuff(mod.BuffType("BurningBlood"), 120, true); + player.AddBuff(BuffID.Bleeding, 120, true); + } + } } \ No newline at end of file diff --git a/NPCs/Perforator/PerforatorBodySmall.cs b/NPCs/Perforator/PerforatorBodySmall.cs index 6244a9f01e..32acc90d97 100644 --- a/NPCs/Perforator/PerforatorBodySmall.cs +++ b/NPCs/Perforator/PerforatorBodySmall.cs @@ -126,7 +126,8 @@ namespace CalamityMod.NPCs.Perforator { Dust.NewDust(npc.position, npc.width, npc.height, 5, hitDirection, -1f, 0, default(Color), 1f); } - } + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/SmallPerf2"), 1f); + } } public override void ScaleExpertStats(int numPlayers, float bossLifeScale) @@ -134,5 +135,11 @@ namespace CalamityMod.NPCs.Perforator npc.lifeMax = (int)(npc.lifeMax * 0.7f * bossLifeScale); npc.damage = (int)(npc.damage * 0.7f); } - } + + public override void OnHitPlayer(Player player, int damage, bool crit) + { + player.AddBuff(mod.BuffType("BurningBlood"), 90, true); + player.AddBuff(BuffID.Bleeding, 90, true); + } + } } \ No newline at end of file diff --git a/NPCs/Perforator/PerforatorHeadLarge.cs b/NPCs/Perforator/PerforatorHeadLarge.cs index a9545f71f5..d0cbe187cc 100644 --- a/NPCs/Perforator/PerforatorHeadLarge.cs +++ b/NPCs/Perforator/PerforatorHeadLarge.cs @@ -434,7 +434,9 @@ namespace CalamityMod.NPCs.Perforator { Dust.NewDust(npc.position, npc.width, npc.height, 5, hitDirection, -1f, 0, default(Color), 1f); } - } + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/LargePerf"), 1f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/LargePerf2"), 1f); + } } public override void BossLoot(ref string name, ref int potionType) @@ -458,14 +460,11 @@ namespace CalamityMod.NPCs.Perforator public override void OnHitPlayer(Player player, int damage, bool crit) { - player.AddBuff(mod.BuffType("BurningBlood"), 240, true); - if (Main.expertMode) - { - player.AddBuff(BuffID.Bleeding, 200, true); - } + player.AddBuff(mod.BuffType("BurningBlood"), 300, true); + player.AddBuff(BuffID.Bleeding, 300, true); if (CalamityWorld.revenge) { - player.AddBuff(mod.BuffType("Horror"), 300, true); + player.AddBuff(mod.BuffType("Horror"), 180, true); } } } diff --git a/NPCs/Perforator/PerforatorHeadMedium.cs b/NPCs/Perforator/PerforatorHeadMedium.cs index 8e32a6e274..b0b18c2029 100644 --- a/NPCs/Perforator/PerforatorHeadMedium.cs +++ b/NPCs/Perforator/PerforatorHeadMedium.cs @@ -429,7 +429,9 @@ namespace CalamityMod.NPCs.Perforator { Dust.NewDust(npc.position, npc.width, npc.height, 5, hitDirection, -1f, 0, default(Color), 1f); } - } + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/MediumPerf"), 1f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/MediumPerf2"), 1f); + } } public override void BossLoot(ref string name, ref int potionType) @@ -453,14 +455,11 @@ namespace CalamityMod.NPCs.Perforator public override void OnHitPlayer(Player player, int damage, bool crit) { - player.AddBuff(mod.BuffType("BurningBlood"), 200, true); - if (Main.expertMode) - { - player.AddBuff(BuffID.Bleeding, 160, true); - } + player.AddBuff(mod.BuffType("BurningBlood"), 240, true); + player.AddBuff(BuffID.Bleeding, 240, true); if (CalamityWorld.revenge) { - player.AddBuff(mod.BuffType("Horror"), 300, true); + player.AddBuff(mod.BuffType("Horror"), 180, true); } } } diff --git a/NPCs/Perforator/PerforatorHeadSmall.cs b/NPCs/Perforator/PerforatorHeadSmall.cs index 9941f439ed..350b137e04 100644 --- a/NPCs/Perforator/PerforatorHeadSmall.cs +++ b/NPCs/Perforator/PerforatorHeadSmall.cs @@ -429,7 +429,8 @@ namespace CalamityMod.NPCs.Perforator { Dust.NewDust(npc.position, npc.width, npc.height, 5, hitDirection, -1f, 0, default(Color), 1f); } - } + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/SmallPerf"), 1f); + } } public override void BossLoot(ref string name, ref int potionType) @@ -453,14 +454,11 @@ namespace CalamityMod.NPCs.Perforator public override void OnHitPlayer(Player player, int damage, bool crit) { - player.AddBuff(mod.BuffType("BurningBlood"), 120, true); - if (Main.expertMode) - { - player.AddBuff(BuffID.Bleeding, 120, true); - } + player.AddBuff(mod.BuffType("BurningBlood"), 180, true); + player.AddBuff(BuffID.Bleeding, 180, true); if (CalamityWorld.revenge) { - player.AddBuff(mod.BuffType("Horror"), 300, true); + player.AddBuff(mod.BuffType("Horror"), 180, true); } } } diff --git a/NPCs/Perforator/PerforatorHive.cs b/NPCs/Perforator/PerforatorHive.cs index fb78e8675d..b1950ede60 100644 --- a/NPCs/Perforator/PerforatorHive.cs +++ b/NPCs/Perforator/PerforatorHive.cs @@ -38,7 +38,7 @@ namespace CalamityMod.NPCs.Perforator } if (CalamityWorld.bossRushActive) { - npc.lifeMax = CalamityWorld.death ? 3000000 : 2400000; + npc.lifeMax = CalamityWorld.death ? 4000000 : 3500000; } npc.aiStyle = -1; //new aiType = -1; //new @@ -148,7 +148,7 @@ namespace CalamityMod.NPCs.Perforator num183 = num179 / num183; num180 *= num183; num182 *= num183; - int num184 = expertMode ? 12 : 16; + int num184 = expertMode ? 14 : 18; int num185 = (Main.rand.Next(2) == 0 ? mod.ProjectileType("IchorShot") : mod.ProjectileType("BloodGeyser")); value9.X += num180; value9.Y += num182; @@ -164,100 +164,56 @@ namespace CalamityMod.NPCs.Perforator } } } - if (npc.ai[0] == 0f) - { - npc.rotation = npc.velocity.X * 0.04f; - npc.spriteDirection = ((npc.direction > 0) ? 1 : -1); - float num1065 = 6f; //changed from 6 to 7.5 modifies speed while firing projectiles - float num1066 = 0.12f; //changed from 0.075 to 0.09375 modifies speed while firing projectiles - float num10662 = 0.04f; - Vector2 vector121 = new Vector2(npc.position.X + (float)(npc.width / 2) + (float)(Main.rand.Next(20) * npc.direction), npc.position.Y + (float)npc.height * 0.8f); - Vector2 vector122 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); - float num1067 = player.position.X + (float)(player.width / 2) - vector122.X; - float num1068 = player.position.Y + (float)(player.height / 2) - 300f - vector122.Y; - float num1069 = (float)Math.Sqrt((double)(num1067 * num1067 + num1068 * num1068)); - if (!Collision.CanHit(new Vector2(vector121.X, vector121.Y - 30f), 1, 1, player.position, player.width, player.height)) - { - num1065 = 14f; //changed from 14 not a prob - num1066 = 0.15f; //changed from 0.1 not a prob - num10662 = 0.05f; - vector122 = vector121; - num1067 = player.position.X + (float)(player.width / 2) - vector122.X; - num1068 = player.position.Y + (float)(player.height / 2) - vector122.Y; - num1069 = (float)Math.Sqrt((double)(num1067 * num1067 + num1068 * num1068)); - num1069 = num1065 / num1069; - if (npc.velocity.X < num1067) - { - npc.velocity.X = npc.velocity.X + num1066; - if (npc.velocity.X < 0f && num1067 > 0f) - { - npc.velocity.X = npc.velocity.X + num1066; - } - } - else if (npc.velocity.X > num1067) - { - npc.velocity.X = npc.velocity.X - num1066; - if (npc.velocity.X > 0f && num1067 < 0f) - { - npc.velocity.X = npc.velocity.X - num1066; - } - } - if (npc.velocity.Y < num1068) - { - npc.velocity.Y = npc.velocity.Y + num10662; - if (npc.velocity.Y < 0f && num1068 > 0f) - { - npc.velocity.Y = npc.velocity.Y + num10662; - } - } - else if (npc.velocity.Y > num1068) - { - npc.velocity.Y = npc.velocity.Y - num10662; - if (npc.velocity.Y > 0f && num1068 < 0f) - { - npc.velocity.Y = npc.velocity.Y - num10662; - } - } - } - else if (num1069 > 100f) - { - npc.TargetClosest(true); - npc.spriteDirection = npc.direction; - num1069 = num1065 / num1069; - if (npc.velocity.X < num1067) - { - npc.velocity.X = npc.velocity.X + num1066; - if (npc.velocity.X < 0f && num1067 > 0f) - { - npc.velocity.X = npc.velocity.X + num1066 * 2f; - } - } - else if (npc.velocity.X > num1067) - { - npc.velocity.X = npc.velocity.X - num1066; - if (npc.velocity.X > 0f && num1067 < 0f) - { - npc.velocity.X = npc.velocity.X - num1066 * 2f; - } - } - if (npc.velocity.Y < num1068) - { - npc.velocity.Y = npc.velocity.Y + num10662; - if (npc.velocity.Y < 0f && num1068 > 0f) - { - npc.velocity.Y = npc.velocity.Y + num10662 * 2f; - } - } - else if (npc.velocity.Y > num1068) - { - npc.velocity.Y = npc.velocity.Y - num10662; - if (npc.velocity.Y > 0f && num1068 < 0f) - { - npc.velocity.Y = npc.velocity.Y - num10662 * 2f; - } - } - } - } + npc.rotation = npc.velocity.X * 0.04f; + npc.spriteDirection = ((npc.direction > 0) ? 1 : -1); + if (npc.position.Y > player.position.Y - 100f) //200 + { + if (npc.velocity.Y > 0f) + { + npc.velocity.Y = npc.velocity.Y * 0.98f; + } + npc.velocity.Y = npc.velocity.Y - 0.1f; + if (npc.velocity.Y > 2f) + { + npc.velocity.Y = 2f; + } + } + else if (npc.position.Y < player.position.Y - 300f) //500 + { + if (npc.velocity.Y < 0f) + { + npc.velocity.Y = npc.velocity.Y * 0.98f; + } + npc.velocity.Y = npc.velocity.Y + 0.1f; + if (npc.velocity.Y < -2f) + { + npc.velocity.Y = -2f; + } + } + if (npc.position.X + (float)(npc.width / 2) > player.position.X + (float)(player.width / 2) + 50f) + { + if (npc.velocity.X > 0f) + { + npc.velocity.X = npc.velocity.X * 0.98f; + } + npc.velocity.X = npc.velocity.X - 0.1f; + if (npc.velocity.X > 8f) + { + npc.velocity.X = 8f; + } + } + if (npc.position.X + (float)(npc.width / 2) < player.position.X + (float)(player.width / 2) - 50f) + { + if (npc.velocity.X < 0f) + { + npc.velocity.X = npc.velocity.X * 0.98f; + } + npc.velocity.X = npc.velocity.X + 0.1f; + if (npc.velocity.X < -8f) + { + npc.velocity.X = -8f; + } + } if (npc.ai[3] == 0f && npc.life > 0) { npc.ai[3] = (float)npc.lifeMax; @@ -385,7 +341,11 @@ namespace CalamityMod.NPCs.Perforator } if (npc.life <= 0) { - npc.position.X = npc.position.X + (float)(npc.width / 2); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Hive"), 1f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Hive2"), 1f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Hive3"), 1f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Hive4"), 1f); + npc.position.X = npc.position.X + (float)(npc.width / 2); npc.position.Y = npc.position.Y + (float)(npc.height / 2); npc.width = 100; npc.height = 100; diff --git a/NPCs/Perforator/PerforatorTailLarge.cs b/NPCs/Perforator/PerforatorTailLarge.cs index 37519abc78..d19b22316e 100644 --- a/NPCs/Perforator/PerforatorTailLarge.cs +++ b/NPCs/Perforator/PerforatorTailLarge.cs @@ -81,7 +81,9 @@ namespace CalamityMod.NPCs.Perforator { Dust.NewDust(npc.position, npc.width, npc.height, 5, hitDirection, -1f, 0, default(Color), 1f); } - } + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/LargePerf4"), 1f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/LargePerf5"), 1f); + } } public override bool CheckActive() @@ -99,13 +101,11 @@ namespace CalamityMod.NPCs.Perforator npc.lifeMax = (int)(npc.lifeMax * 0.7f * bossLifeScale); npc.damage = (int)(npc.damage * 0.7f); } - - public override void OnHitPlayer(Player player, int damage, bool crit) - { - if (Main.expertMode) - { - player.AddBuff(BuffID.Bleeding, 100, true); - } - } - } + + public override void OnHitPlayer(Player player, int damage, bool crit) + { + player.AddBuff(mod.BuffType("BurningBlood"), 90, true); + player.AddBuff(BuffID.Bleeding, 90, true); + } + } } \ No newline at end of file diff --git a/NPCs/Perforator/PerforatorTailMedium.cs b/NPCs/Perforator/PerforatorTailMedium.cs index 033ea8d5d8..2e3c5aae46 100644 --- a/NPCs/Perforator/PerforatorTailMedium.cs +++ b/NPCs/Perforator/PerforatorTailMedium.cs @@ -81,7 +81,9 @@ namespace CalamityMod.NPCs.Perforator { Dust.NewDust(npc.position, npc.width, npc.height, 5, hitDirection, -1f, 0, default(Color), 1f); } - } + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/MediumPerf3"), 1f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/MediumPerf4"), 1f); + } } public override bool CheckActive() @@ -99,13 +101,11 @@ namespace CalamityMod.NPCs.Perforator npc.lifeMax = (int)(npc.lifeMax * 0.7f * bossLifeScale); npc.damage = (int)(npc.damage * 0.7f); } - - public override void OnHitPlayer(Player player, int damage, bool crit) - { - if (Main.expertMode) - { - player.AddBuff(BuffID.Bleeding, 80, true); - } - } - } + + public override void OnHitPlayer(Player player, int damage, bool crit) + { + player.AddBuff(mod.BuffType("BurningBlood"), 60, true); + player.AddBuff(BuffID.Bleeding, 60, true); + } + } } \ No newline at end of file diff --git a/NPCs/Perforator/PerforatorTailSmall.cs b/NPCs/Perforator/PerforatorTailSmall.cs index 65f9ea9050..6cc05930e4 100644 --- a/NPCs/Perforator/PerforatorTailSmall.cs +++ b/NPCs/Perforator/PerforatorTailSmall.cs @@ -82,7 +82,8 @@ namespace CalamityMod.NPCs.Perforator { Dust.NewDust(npc.position, npc.width, npc.height, 5, hitDirection, -1f, 0, default(Color), 1f); } - } + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/SmallPerf3"), 1f); + } } public override bool CheckActive() @@ -100,13 +101,11 @@ namespace CalamityMod.NPCs.Perforator npc.lifeMax = (int)(npc.lifeMax * 0.7f * bossLifeScale); npc.damage = (int)(npc.damage * 0.7f); } - - public override void OnHitPlayer(Player player, int damage, bool crit) - { - if (Main.expertMode) - { - player.AddBuff(BuffID.Bleeding, 60, true); - } - } - } + + public override void OnHitPlayer(Player player, int damage, bool crit) + { + player.AddBuff(mod.BuffType("BurningBlood"), 60, true); + player.AddBuff(BuffID.Bleeding, 60, true); + } + } } \ No newline at end of file diff --git a/NPCs/PlaguebringerGoliath/PlagueBeeG.cs b/NPCs/PlaguebringerGoliath/PlagueBeeG.cs index 2577d04cda..6d74233ebb 100644 --- a/NPCs/PlaguebringerGoliath/PlagueBeeG.cs +++ b/NPCs/PlaguebringerGoliath/PlagueBeeG.cs @@ -208,7 +208,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath public override void OnHitPlayer(Player player, int damage, bool crit) { - player.AddBuff(mod.BuffType("Plague"), 60, true); + player.AddBuff(mod.BuffType("Plague"), 120, true); } public override void HitEffect(int hitDirection, double damage) diff --git a/NPCs/PlaguebringerGoliath/PlagueBeeLargeG.cs b/NPCs/PlaguebringerGoliath/PlagueBeeLargeG.cs index bf8ebf9793..6339af9077 100644 --- a/NPCs/PlaguebringerGoliath/PlagueBeeLargeG.cs +++ b/NPCs/PlaguebringerGoliath/PlagueBeeLargeG.cs @@ -104,7 +104,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath public override void OnHitPlayer(Player player, int damage, bool crit) { - player.AddBuff(mod.BuffType("Plague"), 80, true); + player.AddBuff(mod.BuffType("Plague"), 180, true); } public override void HitEffect(int hitDirection, double damage) diff --git a/NPCs/PlaguebringerGoliath/PlagueHomingMissile.cs b/NPCs/PlaguebringerGoliath/PlagueHomingMissile.cs index ef82cd5731..38df2995a5 100644 --- a/NPCs/PlaguebringerGoliath/PlagueHomingMissile.cs +++ b/NPCs/PlaguebringerGoliath/PlagueHomingMissile.cs @@ -194,7 +194,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath public override void OnHitPlayer(Player player, int damage, bool crit) { - player.AddBuff(mod.BuffType("Plague"), 120, true); + player.AddBuff(mod.BuffType("Plague"), 180, true); } public override void HitEffect(int hitDirection, double damage) diff --git a/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs b/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs index a4e3be7ad0..b9a41c4d95 100644 --- a/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs +++ b/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs @@ -34,7 +34,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath public override void SetDefaults() { - npc.damage = 90; //150 + npc.damage = 100; //150 npc.npcSlots = 64f; npc.width = 198; //324 npc.height = 198; //216 @@ -46,7 +46,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath } if (CalamityWorld.bossRushActive) { - npc.lifeMax = CalamityWorld.death ? 7500000 : 6800000; + npc.lifeMax = CalamityWorld.death ? 8000000 : 7200000; } npc.knockBackResist = 0f; npc.aiStyle = -1; //new @@ -114,8 +114,6 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath } if (expertMode) { - int num1041 = (int)(50f * (1f - (float)npc.life / (float)npc.lifeMax)); - npc.damage = npc.defDamage - num1041; int num1040 = (int)(50f * (1f - (float)npc.life / (float)npc.lifeMax)); npc.defense = npc.defDefense + num1040; } @@ -667,14 +665,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath } else if (npc.ai[0] == 3f) { - float num1065 = 6f; //changed from 6 to 7.5 modifies speed while firing projectiles - float num1066 = 0.15f; //changed from 0.075 to 0.09375 modifies speed while firing projectiles - float num10662 = 0.05f; Vector2 vector121 = new Vector2(npc.position.X + (float)(npc.width / 2) + (float)(Main.rand.Next(20) * npc.direction), npc.position.Y + (float)npc.height * 0.8f); - Vector2 vector122 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); - float num1067 = Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2) - vector122.X; - float num1068 = Main.player[npc.target].position.Y + (float)(Main.player[npc.target].height / 2) - 360f - vector122.Y; - float num1069 = (float)Math.Sqrt((double)(num1067 * num1067 + num1068 * num1068)); npc.ai[1] += 1f; bool flag104 = false; if (npc.GetGlobalNPC(mod).enraged) @@ -719,62 +710,21 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath num1071 *= num1073; num1072 *= num1073; int num1074 = 40; //projectile damage - int num1075 = mod.ProjectileType("PlagueStingerGoliathV2"); //projectile type + int num1075 = (Main.rand.Next(2) == 0 ? mod.ProjectileType("PlagueStingerGoliath") : mod.ProjectileType("PlagueStingerGoliathV2")); if (expertMode) { - if (Main.rand.Next(2) == 0) + num1074 = 28; //112 + int damageBoost = (int)(6f * (1f - (float)npc.life / (float)npc.lifeMax)); + num1074 += damageBoost; //112 to 136 + if (Main.rand.Next(6) == 0) { - num1075 = mod.ProjectileType("PlagueStingerGoliath"); - } - num1074 = 28; - if (npc.life >= (npc.lifeMax * 0.75f)) - { - if (Main.rand.Next(13) == 0) - { - num1074 = 36; - num1075 = mod.ProjectileType("HiveBombGoliath"); - } - } - else if (npc.life < (npc.lifeMax * 0.75f) && npc.life >= (npc.lifeMax * 0.5f)) - { - if (Main.rand.Next(9) == 0) - { - num1074 = 38; - num1075 = mod.ProjectileType("HiveBombGoliath"); - } - else - { - num1074 = 30; - } - } - else if (npc.life < (npc.lifeMax * 0.5f) && npc.life >= (npc.lifeMax * 0.25f)) - { - if (Main.rand.Next(5) == 0) - { - num1074 = 40; - num1075 = mod.ProjectileType("HiveBombGoliath"); - } - else - { - num1074 = 32; - } - } - else if (npc.life < (npc.lifeMax * 0.25f)) - { - if (Main.rand.Next(3) == 0) - { - num1074 = 42; - num1075 = mod.ProjectileType("HiveBombGoliath"); - } - else - { - num1074 = 34; - } + num1074 += 8; //144 to 168 + num1075 = mod.ProjectileType("HiveBombGoliath"); } } else { - if (Main.rand.Next(13) == 0) + if (Main.rand.Next(9) == 0) { num1074 = 50; num1075 = mod.ProjectileType("HiveBombGoliath"); @@ -783,87 +733,57 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath Projectile.NewProjectile(vector121.X, vector121.Y, num1071, num1072, num1075, num1074, 0f, Main.myPlayer, -1f, 0f); } } - if (!Collision.CanHit(new Vector2(vector121.X, vector121.Y - 30f), 1, 1, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height)) + if (npc.position.Y > Main.player[npc.target].position.Y - 200f) //200 { - num1065 = 14f; //changed from 14 not a prob - num1066 = 0.2f; //changed from 0.1 not a prob - num10662 = 0.07f; - vector122 = vector121; - num1067 = Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2) - vector122.X; - num1068 = Main.player[npc.target].position.Y + (float)(Main.player[npc.target].height / 2) - vector122.Y; - num1069 = (float)Math.Sqrt((double)(num1067 * num1067 + num1068 * num1068)); - num1069 = num1065 / num1069; - if (npc.velocity.X < num1067) + if (npc.velocity.Y > 0f) { - npc.velocity.X = npc.velocity.X + num1066; - if (npc.velocity.X < 0f && num1067 > 0f) - { - npc.velocity.X = npc.velocity.X + num1066; - } + npc.velocity.Y = npc.velocity.Y * 0.98f; } - else if (npc.velocity.X > num1067) + npc.velocity.Y = npc.velocity.Y - 0.1f; + if (npc.velocity.Y > 2f) { - npc.velocity.X = npc.velocity.X - num1066; - if (npc.velocity.X > 0f && num1067 < 0f) - { - npc.velocity.X = npc.velocity.X - num1066; - } - } - if (npc.velocity.Y < num1068) - { - npc.velocity.Y = npc.velocity.Y + num10662; - if (npc.velocity.Y < 0f && num1068 > 0f) - { - npc.velocity.Y = npc.velocity.Y + num10662; - } - } - else if (npc.velocity.Y > num1068) - { - npc.velocity.Y = npc.velocity.Y - num10662; - if (npc.velocity.Y > 0f && num1068 < 0f) - { - npc.velocity.Y = npc.velocity.Y - num10662; - } + npc.velocity.Y = 2f; } } - else if (num1069 > 250f) + else if (npc.position.Y < Main.player[npc.target].position.Y - 500f) //500 { - npc.TargetClosest(true); - npc.spriteDirection = npc.direction; - num1069 = num1065 / num1069; - if (npc.velocity.X < num1067) + if (npc.velocity.Y < 0f) { - npc.velocity.X = npc.velocity.X + num1066; - if (npc.velocity.X < 0f && num1067 > 0f) - { - npc.velocity.X = npc.velocity.X + num1066 * 2f; - } + npc.velocity.Y = npc.velocity.Y * 0.98f; } - else if (npc.velocity.X > num1067) + npc.velocity.Y = npc.velocity.Y + 0.1f; + if (npc.velocity.Y < -2f) { - npc.velocity.X = npc.velocity.X - num1066; - if (npc.velocity.X > 0f && num1067 < 0f) - { - npc.velocity.X = npc.velocity.X - num1066 * 2f; - } - } - if (npc.velocity.Y < num1068) - { - npc.velocity.Y = npc.velocity.Y + num10662; - if (npc.velocity.Y < 0f && num1068 > 0f) - { - npc.velocity.Y = npc.velocity.Y + num10662 * 2f; - } - } - else if (npc.velocity.Y > num1068) - { - npc.velocity.Y = npc.velocity.Y - num10662; - if (npc.velocity.Y > 0f && num1068 < 0f) - { - npc.velocity.Y = npc.velocity.Y - num10662 * 2f; - } + npc.velocity.Y = -2f; } } + if (npc.position.X + (float)(npc.width / 2) > Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2) + 100f) + { + if (npc.velocity.X > 0f) + { + npc.velocity.X = npc.velocity.X * 0.98f; + } + npc.velocity.X = npc.velocity.X - 0.1f; + if (npc.velocity.X > 8f) + { + npc.velocity.X = 8f; + } + } + if (npc.position.X + (float)(npc.width / 2) < Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2) - 100f) + { + if (npc.velocity.X < 0f) + { + npc.velocity.X = npc.velocity.X * 0.98f; + } + npc.velocity.X = npc.velocity.X + 0.1f; + if (npc.velocity.X < -8f) + { + npc.velocity.X = -8f; + } + } + float playerLocation = npc.Center.X - Main.player[npc.target].Center.X; + npc.direction = (playerLocation < 0 ? 1 : -1); + npc.spriteDirection = npc.direction; if (npc.ai[1] > 300f) { npc.ai[0] = -1f; @@ -1025,15 +945,6 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath } } - public override void ModifyHitByProjectile(Projectile projectile, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) - { - if (((projectile.type == ProjectileID.HallowStar || projectile.type == ProjectileID.CrystalShard) && projectile.ranged) || - projectile.type == mod.ProjectileType("TerraBulletSplit") || projectile.type == mod.ProjectileType("TerraArrow2")) - { - damage /= 4; - } - } - public override bool CheckActive() { return canDespawn; @@ -1047,7 +958,12 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath } if (npc.life <= 0) { - npc.position.X = npc.position.X + (float)(npc.width / 2); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Pbg"), 2f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Pbg2"), 2f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Pbg3"), 2f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Pbg4"), 2f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Pbg5"), 2f); + npc.position.X = npc.position.X + (float)(npc.width / 2); npc.position.Y = npc.position.Y + (float)(npc.height / 2); npc.width = 100; npc.height = 100; @@ -1197,11 +1113,11 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath public override void OnHitPlayer(Player player, int damage, bool crit) { - player.AddBuff(mod.BuffType("Plague"), 180, true); + player.AddBuff(mod.BuffType("Plague"), 300, true); if (CalamityWorld.revenge) { - player.AddBuff(mod.BuffType("Horror"), 300, true); - player.AddBuff(mod.BuffType("MarkedforDeath"), 120); + player.AddBuff(mod.BuffType("Horror"), 180, true); + player.AddBuff(mod.BuffType("MarkedforDeath"), 180); } } } diff --git a/NPCs/PlaguebringerShade/PlaguebringerShade.cs b/NPCs/PlaguebringerShade/PlaguebringerShade.cs index d2606c39f1..581359c948 100644 --- a/NPCs/PlaguebringerShade/PlaguebringerShade.cs +++ b/NPCs/PlaguebringerShade/PlaguebringerShade.cs @@ -31,7 +31,7 @@ namespace CalamityMod.NPCs.PlaguebringerShade npc.lifeMax = CalamityWorld.death ? 4000 : 3000; //250000 if (CalamityWorld.bossRushActive) { - npc.lifeMax = 150000; + npc.lifeMax = 200000; } npc.knockBackResist = 0f; npc.aiStyle = -1; //new @@ -584,7 +584,12 @@ namespace CalamityMod.NPCs.PlaguebringerShade } if (npc.life <= 0) { - npc.position.X = npc.position.X + (float)(npc.width / 2); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Pbg"), 1f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Pbg2"), 1f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Pbg3"), 1f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Pbg4"), 1f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Pbg5"), 1f); + npc.position.X = npc.position.X + (float)(npc.width / 2); npc.position.Y = npc.position.Y + (float)(npc.height / 2); npc.width = 100; npc.height = 100; diff --git a/NPCs/Polterghast/PolterPhantom.cs b/NPCs/Polterghast/PolterPhantom.cs index 0f54d4101c..2209fe872b 100644 --- a/NPCs/Polterghast/PolterPhantom.cs +++ b/NPCs/Polterghast/PolterPhantom.cs @@ -34,7 +34,7 @@ namespace CalamityMod.NPCs.Polterghast } if (CalamityWorld.bossRushActive) { - npc.lifeMax = CalamityWorld.death ? 1900000 : 1500000; + npc.lifeMax = CalamityWorld.death ? 2100000 : 1700000; } npc.knockBackResist = 0f; npc.aiStyle = -1; //new @@ -209,21 +209,6 @@ namespace CalamityMod.NPCs.Polterghast } } - public override void ModifyHitByProjectile(Projectile projectile, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) - { - Player player = Main.player[npc.target]; - if (player.vortexStealthActive && projectile.ranged) - { - damage /= 2; - crit = false; - } - if (((projectile.type == ProjectileID.HallowStar || projectile.type == ProjectileID.CrystalShard) && projectile.ranged) || - projectile.type == mod.ProjectileType("TerraBulletSplit") || projectile.type == mod.ProjectileType("TerraArrow2")) - { - damage /= 8; - } - } - public override Color? GetAlpha(Color drawColor) { return new Color(200, 150, 255, npc.alpha); @@ -245,7 +230,8 @@ namespace CalamityMod.NPCs.Polterghast public override void OnHitPlayer(Player player, int damage, bool crit) { - player.AddBuff(mod.BuffType("Horror"), 180, true); + if (CalamityWorld.revenge) + player.AddBuff(mod.BuffType("Horror"), 180, true); } public override bool CanHitPlayer(Player target, ref int cooldownSlot) diff --git a/NPCs/Polterghast/Polterghast.cs b/NPCs/Polterghast/Polterghast.cs index 269435912c..21e7164756 100644 --- a/NPCs/Polterghast/Polterghast.cs +++ b/NPCs/Polterghast/Polterghast.cs @@ -38,7 +38,7 @@ namespace CalamityMod.NPCs.Polterghast } if (CalamityWorld.bossRushActive) { - npc.lifeMax = CalamityWorld.death ? 6000000 : 5400000; + npc.lifeMax = CalamityWorld.death ? 6600000 : 6000000; } npc.knockBackResist = 0f; npc.aiStyle = -1; //new @@ -281,8 +281,8 @@ namespace CalamityMod.NPCs.Polterghast { if (speedBoost1) { - npc.defense *= 2; - npc.damage *= 2; + npc.defense = 300; + npc.damage = (int)(200f * Main.damageMultiplier); } else { @@ -420,8 +420,8 @@ namespace CalamityMod.NPCs.Polterghast npc.GivenName = "Necroghast"; if (speedBoost1 || npc.GetGlobalNPC(mod).enraged) { - npc.defense *= 3; - npc.damage *= 3; + npc.defense = 200; + npc.damage = (int)(300f * Main.damageMultiplier); } else { @@ -564,8 +564,8 @@ namespace CalamityMod.NPCs.Polterghast npc.GivenName = "Necroplasm"; if (speedBoost1 || npc.GetGlobalNPC(mod).enraged) { - npc.defense = 400; - npc.damage *= 4; + npc.defense = 200; + npc.damage = (int)(400f * Main.damageMultiplier); } else { @@ -661,21 +661,6 @@ namespace CalamityMod.NPCs.Polterghast potionType = ItemID.SuperHealingPotion; } - public override void ModifyHitByProjectile(Projectile projectile, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) - { - Player player = Main.player[npc.target]; - if (player.vortexStealthActive && projectile.ranged) - { - damage /= 2; - crit = false; - } - if (((projectile.type == ProjectileID.HallowStar || projectile.type == ProjectileID.CrystalShard) && projectile.ranged) || - projectile.type == mod.ProjectileType("TerraBulletSplit") || projectile.type == mod.ProjectileType("TerraArrow2")) - { - damage /= 8; - } - } - public override bool StrikeNPC(ref double damage, int defense, ref float knockback, int hitDirection, ref bool crit) { double newDamage = (damage + (int)((double)defense * 0.25)); @@ -683,10 +668,6 @@ namespace CalamityMod.NPCs.Polterghast ((double)npc.life <= (double)npc.lifeMax * 0.75 ? 0.05f : 0f) + //.15 ((double)npc.life <= (double)npc.lifeMax * (CalamityWorld.revenge ? 0.5 : 0.33) ? 0.05f : 0f) + //.2 (boostDR ? 0.6f : 0f); //.8 - if (CalamityWorld.defiled) - { - protection += (1f - protection) * 0.5f; - } if (npc.ichor) { protection *= 0.88f; @@ -753,7 +734,8 @@ namespace CalamityMod.NPCs.Polterghast public override void OnHitPlayer(Player player, int damage, bool crit) { - player.AddBuff(mod.BuffType("Horror"), 180, true); + if (CalamityWorld.revenge) + player.AddBuff(mod.BuffType("Horror"), 300, true); } public override bool CanHitPlayer(Player target, ref int cooldownSlot) diff --git a/NPCs/Polterghast/PolterghastHook.cs b/NPCs/Polterghast/PolterghastHook.cs index 249a64c55a..e027dc9ed3 100644 --- a/NPCs/Polterghast/PolterghastHook.cs +++ b/NPCs/Polterghast/PolterghastHook.cs @@ -199,7 +199,7 @@ namespace CalamityMod.NPCs.Polterghast num147 = Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2) - vector17.X; num148 = Main.player[npc.target].position.Y + (float)(Main.player[npc.target].height / 2) - vector17.Y; num149 = (float)Math.Sqrt((double)(num147 * num147 + num148 * num148)); - if (num149 > 800f) + if (num149 > 1200f) { npc.ai[2] = 0f; npc.ai[3] = 0f; @@ -444,7 +444,8 @@ namespace CalamityMod.NPCs.Polterghast public override void OnHitPlayer(Player player, int damage, bool crit) { - player.AddBuff(mod.BuffType("Horror"), 180, true); + if (CalamityWorld.revenge) + player.AddBuff(mod.BuffType("Horror"), 180, true); } public override void ScaleExpertStats(int numPlayers, float bossLifeScale) diff --git a/NPCs/ProfanedGuardianBoss/ProfanedGuardianBoss.cs b/NPCs/ProfanedGuardianBoss/ProfanedGuardianBoss.cs index 7874fd92f5..1432a8a088 100644 --- a/NPCs/ProfanedGuardianBoss/ProfanedGuardianBoss.cs +++ b/NPCs/ProfanedGuardianBoss/ProfanedGuardianBoss.cs @@ -34,7 +34,7 @@ namespace CalamityMod.NPCs.ProfanedGuardianBoss npc.lifeMax = 102500; if (CalamityWorld.bossRushActive) { - npc.lifeMax = CalamityWorld.death ? 600000 : 500000; + npc.lifeMax = CalamityWorld.death ? 1200000 : 1000000; } npc.knockBackResist = 0f; npc.noGravity = true; diff --git a/NPCs/ProfanedGuardianBoss/ProfanedGuardianBoss2.cs b/NPCs/ProfanedGuardianBoss/ProfanedGuardianBoss2.cs index 20aa286830..263c44f7b6 100644 --- a/NPCs/ProfanedGuardianBoss/ProfanedGuardianBoss2.cs +++ b/NPCs/ProfanedGuardianBoss/ProfanedGuardianBoss2.cs @@ -30,7 +30,7 @@ namespace CalamityMod.NPCs.ProfanedGuardianBoss npc.lifeMax = 40000; if (CalamityWorld.bossRushActive) { - npc.lifeMax = CalamityWorld.death ? 400000 : 300000; + npc.lifeMax = CalamityWorld.death ? 800000 : 600000; } npc.knockBackResist = 0f; npc.noGravity = true; diff --git a/NPCs/ProfanedGuardianBoss/ProfanedGuardianBoss3.cs b/NPCs/ProfanedGuardianBoss/ProfanedGuardianBoss3.cs index 7fdcd78ae3..ffaeeb0302 100644 --- a/NPCs/ProfanedGuardianBoss/ProfanedGuardianBoss3.cs +++ b/NPCs/ProfanedGuardianBoss/ProfanedGuardianBoss3.cs @@ -30,7 +30,7 @@ namespace CalamityMod.NPCs.ProfanedGuardianBoss npc.lifeMax = 25000; if (CalamityWorld.bossRushActive) { - npc.lifeMax = CalamityWorld.death ? 240000 : 200000; + npc.lifeMax = CalamityWorld.death ? 480000 : 400000; } npc.knockBackResist = 0f; npc.noGravity = true; diff --git a/NPCs/Providence/ProvSpawnDefense.cs b/NPCs/Providence/ProvSpawnDefense.cs index 59fbada23a..3065620061 100644 --- a/NPCs/Providence/ProvSpawnDefense.cs +++ b/NPCs/Providence/ProvSpawnDefense.cs @@ -29,7 +29,7 @@ namespace CalamityMod.NPCs.Providence npc.lifeMax = 21875; if (CalamityWorld.bossRushActive) { - npc.lifeMax = CalamityWorld.death ? 180000 : 150000; + npc.lifeMax = CalamityWorld.death ? 360000 : 300000; } npc.knockBackResist = 0f; npc.noGravity = true; diff --git a/NPCs/Providence/ProvSpawnHealer.cs b/NPCs/Providence/ProvSpawnHealer.cs index 9793eb71f3..345d9a2fde 100644 --- a/NPCs/Providence/ProvSpawnHealer.cs +++ b/NPCs/Providence/ProvSpawnHealer.cs @@ -29,7 +29,7 @@ namespace CalamityMod.NPCs.Providence npc.lifeMax = 37500; if (CalamityWorld.bossRushActive) { - npc.lifeMax = CalamityWorld.death ? 250000 : 200000; + npc.lifeMax = CalamityWorld.death ? 500000 : 400000; } npc.knockBackResist = 0f; npc.noGravity = true; diff --git a/NPCs/Providence/ProvSpawnOffense.cs b/NPCs/Providence/ProvSpawnOffense.cs index 380ad63013..baeb7d1f4c 100644 --- a/NPCs/Providence/ProvSpawnOffense.cs +++ b/NPCs/Providence/ProvSpawnOffense.cs @@ -31,7 +31,7 @@ namespace CalamityMod.NPCs.Providence npc.lifeMax = 37500; if (CalamityWorld.bossRushActive) { - npc.lifeMax = CalamityWorld.death ? 250000 : 200000; + npc.lifeMax = CalamityWorld.death ? 500000 : 400000; } npc.knockBackResist = 0f; npc.noGravity = true; diff --git a/NPCs/Providence/Providence.cs b/NPCs/Providence/Providence.cs index 6c8d9cda0a..01002c5b92 100644 --- a/NPCs/Providence/Providence.cs +++ b/NPCs/Providence/Providence.cs @@ -16,6 +16,7 @@ namespace CalamityMod.NPCs.Providence { private bool text = false; private float bossLife; + private float flightPath = 0f; private int phaseChange = 0; private int immuneTimer = 300; private int frameUsed = 0; @@ -41,7 +42,7 @@ namespace CalamityMod.NPCs.Providence } if (CalamityWorld.bossRushActive) { - npc.lifeMax = CalamityWorld.death ? 9900000 : 9000000; + npc.lifeMax = CalamityWorld.death ? 11000000 : 10000000; } npc.knockBackResist = 0f; npc.aiStyle = -1; //new @@ -79,7 +80,7 @@ namespace CalamityMod.NPCs.Providence bool revenge = (CalamityWorld.revenge || CalamityWorld.bossRushActive); bool expertMode = (Main.expertMode || CalamityWorld.bossRushActive); Player player = Main.player[npc.target]; - Vector2 vector = npc.Center; + Vector2 vector = npc.Center; bool isHoly = player.ZoneHoly; bool isHell = player.ZoneUnderworldHeight; bool canAttack = true; @@ -87,9 +88,7 @@ namespace CalamityMod.NPCs.Providence if (!isHoly && !isHell && !CalamityWorld.bossRushActive) { if (immuneTimer > 0) - { immuneTimer--; - } } else { @@ -101,9 +100,7 @@ namespace CalamityMod.NPCs.Providence { Main.raining = false; if (Main.netMode == 2) - { NetMessage.SendData(7, -1, -1, null, 0, 0f, 0f, 0f, 0, 0, 0); - } } if (NPC.CountNPCS(mod.NPCType("ProvSpawnHealer")) > 0) { @@ -155,13 +152,8 @@ namespace CalamityMod.NPCs.Providence } if (tooFarAway) { - if (Main.netMode != 2) - { - if (!Main.player[npc.target].dead && Main.player[npc.target].active) - { - Main.player[npc.target].AddBuff(mod.BuffType("HolyInferno"), 2); - } - } + if (!Main.player[npc.target].dead && Main.player[npc.target].active) + Main.player[npc.target].AddBuff(mod.BuffType("HolyInferno"), 2); } if (bossLife == 0f && npc.life > 0) { @@ -200,30 +192,27 @@ namespace CalamityMod.NPCs.Providence npc.dontTakeDamage = true; canAttack = false; } - if (npc.ai[0] != 2f && npc.ai[0] != 5f && npc.ai[0] != 7f) + if (npc.ai[0] != 2f && npc.ai[0] != 5f) { - if (npc.ai[2] == 0f) + bool firingLaser = npc.ai[0] == 7f; + if (flightPath == 0f) { npc.TargetClosest(true); if (npc.Center.X < player.Center.X) - { - npc.ai[2] = 1f; - } + flightPath = 1f; else - { - npc.ai[2] = -1f; - } + flightPath = -1f; } npc.TargetClosest(true); int num851 = 800; float num852 = Math.Abs(npc.Center.X - player.Center.X); - if (npc.Center.X < player.Center.X && npc.ai[2] < 0f && num852 > (float)num851) + if (npc.Center.X < player.Center.X && flightPath < 0f && num852 > (float)num851) { - npc.ai[2] = 0f; + flightPath = 0f; } - if (npc.Center.X > player.Center.X && npc.ai[2] > 0f && num852 > (float)num851) + if (npc.Center.X > player.Center.X && flightPath > 0f && num852 > (float)num851) { - npc.ai[2] = 0f; + flightPath = 0f; } float num853 = expertMode ? 1.1f : 1.05f; float num854 = expertMode ? 16f : 15f; @@ -247,7 +236,12 @@ namespace CalamityMod.NPCs.Providence num853 = expertMode ? 1.3f : 1.25f; num854 = expertMode ? 20f : 19f; } - npc.velocity.X = npc.velocity.X + npc.ai[2] * num853; + if (firingLaser) + { + num854 *= 0.66f; + num853 *= 0.66f; + } + npc.velocity.X = npc.velocity.X + flightPath * num853; if (npc.velocity.X > num854) { npc.velocity.X = num854; @@ -265,116 +259,106 @@ namespace CalamityMod.NPCs.Providence { npc.velocity.Y = npc.velocity.Y + 0.2f; } - if (npc.velocity.Y > 6f) //8 + if (npc.velocity.Y > (firingLaser ? 4f : 6f)) //8 { - npc.velocity.Y = 6f; + npc.velocity.Y = (firingLaser ? 4f : 6f); } - if (npc.velocity.Y < -6f) //8 + if (npc.velocity.Y < (firingLaser ? -4f : -6f)) //8 { - npc.velocity.Y = -6f; + npc.velocity.Y = (firingLaser ? -4f : -6f); } } - if (npc.ai[0] == 0f) - { - npc.noGravity = true; - npc.noTileCollide = true; - npc.chaseable = true; - float num852 = Math.Abs(npc.Center.X - player.Center.X); - if ((num852 < 500f || npc.ai[3] < 0f) && npc.position.Y < player.position.Y) - { - npc.ai[3] += 1f; - int num856 = expertMode ? 25 : 26; - if ((double)npc.life < (double)npc.lifeMax * 0.5) - { - num856 = expertMode ? 23 : 24; - } - if ((double)npc.life < (double)npc.lifeMax * 0.1 || npc.GetGlobalNPC(mod).enraged) - { - num856 = expertMode ? 21 : 22; - } - if (!canAttack) + if (npc.ai[0] == 0f) + { + npc.noGravity = true; + npc.noTileCollide = true; + npc.chaseable = true; + float num852 = Math.Abs(npc.Center.X - player.Center.X); + if ((num852 < 500f || npc.ai[3] < 0f) && npc.position.Y < player.position.Y) + { + npc.ai[3] += 1f; + int num856 = expertMode ? 25 : 26; + if ((double)npc.life < (double)npc.lifeMax * 0.5) { - if (attackMore) - { - num856 = expertMode ? 35 : 40; - } - else - { - num856 = expertMode ? 40 : 46; - } + num856 = expertMode ? 23 : 24; + } + if ((double)npc.life < (double)npc.lifeMax * 0.1 || npc.GetGlobalNPC(mod).enraged) + { + num856 = expertMode ? 21 : 22; } - num856++; - if (npc.ai[3] > (float)num856) - { - npc.ai[3] = (float)(-(float)num856); - } - if (npc.ai[3] == 0f && Main.netMode != 1) - { - Vector2 vector112 = new Vector2(npc.Center.X, npc.Center.Y); - vector112.X += npc.velocity.X * 7f; - float num857 = player.position.X + (float)player.width * 0.5f - vector112.X; - float num858 = player.Center.Y - vector112.Y; - float num859 = (float)Math.Sqrt((double)(num857 * num857 + num858 * num858)); - float num860 = expertMode ? 10.25f : 9f; - if ((double)npc.life < (double)npc.lifeMax * 0.5) - { - num860 = expertMode ? 11.5f : 10f; - } - if ((double)npc.life < (double)npc.lifeMax * 0.1 || npc.GetGlobalNPC(mod).enraged) - { - num860 = expertMode ? 12.75f : 11f; - } - if (revenge) - { - num860 *= 1.15f; - } - num859 = num860 / num859; - num857 *= num859; - num858 *= num859; - int holyDamage = expertMode ? 46 : 63; - Projectile.NewProjectile(vector112.X, vector112.Y, num857, num858, mod.ProjectileType("HolyBlast"), holyDamage, 0f, Main.myPlayer, 0f, 0f); - } - } - else if (npc.ai[3] < 0f) - { - npc.ai[3] += 1f; - } - if (Main.netMode != 1) - { - npc.ai[1] += 1f; - if (npc.ai[1] > 300f) - { - npc.ai[0] = -1f; - } - } - } - else if (npc.ai[0] == 1f) - { - npc.noGravity = true; - npc.noTileCollide = true; - npc.chaseable = true; - if (Main.netMode != 1) - { - npc.ai[3] += 1f; - int num864 = expertMode ? 33 : 36; - if ((double)npc.life < (double)npc.lifeMax * 0.5) - { - num864 = expertMode ? 30 : 33; - } - if ((double)npc.life < (double)npc.lifeMax * 0.1 || CalamityWorld.bossRushActive) - { - num864 = expertMode ? 26 : 29; - } if (!canAttack) { if (attackMore) - { - num864 = expertMode ? 40 : 45; - } + num856 = expertMode ? 35 : 40; else + num856 = expertMode ? 40 : 46; + } + num856++; + if (npc.ai[3] > (float)num856) + { + npc.ai[3] = (float)(-(float)num856); + } + if (npc.ai[3] == 0f && Main.netMode != 1) + { + Vector2 vector112 = new Vector2(npc.Center.X, npc.Center.Y); + vector112.X += npc.velocity.X * 7f; + float num857 = player.position.X + (float)player.width * 0.5f - vector112.X; + float num858 = player.Center.Y - vector112.Y; + float num859 = (float)Math.Sqrt((double)(num857 * num857 + num858 * num858)); + float num860 = expertMode ? 10.25f : 9f; + if ((double)npc.life < (double)npc.lifeMax * 0.5) { - num864 = expertMode ? 45 : 52; + num860 = expertMode ? 11.5f : 10f; } + if ((double)npc.life < (double)npc.lifeMax * 0.1 || npc.GetGlobalNPC(mod).enraged) + { + num860 = expertMode ? 12.75f : 11f; + } + if (revenge) + { + num860 *= 1.15f; + } + num859 = num860 / num859; + num857 *= num859; + num858 *= num859; + int holyDamage = expertMode ? 46 : 63; + Projectile.NewProjectile(vector112.X, vector112.Y, num857, num858, mod.ProjectileType("HolyBlast"), holyDamage, 0f, Main.myPlayer, 0f, 0f); + } + } + else if (npc.ai[3] < 0f) + { + npc.ai[3] += 1f; + } + if (Main.netMode != 1) + { + npc.ai[1] += 1f; + if (npc.ai[1] > 300f) + npc.ai[0] = -1f; + } + } + else if (npc.ai[0] == 1f) + { + npc.noGravity = true; + npc.noTileCollide = true; + npc.chaseable = true; + if (Main.netMode != 1) + { + npc.ai[3] += 1f; + int num864 = expertMode ? 33 : 36; + if ((double)npc.life < (double)npc.lifeMax * 0.5) + { + num864 = expertMode ? 30 : 33; + } + if ((double)npc.life < (double)npc.lifeMax * 0.1 || CalamityWorld.bossRushActive) + { + num864 = expertMode ? 26 : 29; + } + if (!canAttack) + { + if (attackMore) + num864 = expertMode ? 40 : 45; + else + num864 = expertMode ? 45 : 52; } num864 += 3; if (npc.ai[3] >= (float)num864) @@ -391,113 +375,106 @@ namespace CalamityMod.NPCs.Providence int fireDamage = expertMode ? 40 : 59; //260 200 Projectile.NewProjectile(vector113.X, vector113.Y, speedX2, num865, mod.ProjectileType("HolyFire"), fireDamage, 0f, Main.myPlayer, 0f, 0f); } - } - if (Main.netMode != 1) - { - npc.ai[1] += 1f; - if (npc.ai[1] > 300f) - { - npc.ai[0] = -1f; - } - } - } - else if (npc.ai[0] == 2f) - { - npc.noGravity = true; - npc.noTileCollide = true; - npc.chaseable = false; - npc.TargetClosest(true); - Vector2 vector114 = new Vector2(npc.Center.X, npc.Center.Y - 20f); - float num866 = (float)Main.rand.Next(-1000, 1001); - float num867 = (float)Main.rand.Next(-1000, 1001); - float num868 = (float)Math.Sqrt((double)(num866 * num866 + num867 * num867)); - float num869 = 3f; - npc.velocity *= 0.95f; - num868 = num869 / num868; - num866 *= num868; - num867 *= num868; - vector114.X += num866 * 4f; - vector114.Y += num867 * 4f; - npc.ai[3] += 1f; - int num870 = expertMode ? 3 : 4; + } + if (Main.netMode != 1) + { + npc.ai[1] += 1f; + if (npc.ai[1] > 300f) + npc.ai[0] = -1f; + } + } + else if (npc.ai[0] == 2f) + { + npc.noGravity = true; + npc.noTileCollide = true; + npc.chaseable = false; + npc.TargetClosest(true); + Vector2 vector114 = new Vector2(npc.Center.X, npc.Center.Y - 20f); + float num866 = (float)Main.rand.Next(-1000, 1001); + float num867 = (float)Main.rand.Next(-1000, 1001); + float num868 = (float)Math.Sqrt((double)(num866 * num866 + num867 * num867)); + float num869 = 3f; + npc.velocity *= 0.95f; + num868 = num869 / num868; + num866 *= num868; + num867 *= num868; + vector114.X += num866 * 4f; + vector114.Y += num867 * 4f; + npc.ai[3] += 1f; + int num870 = expertMode ? 3 : 4; if (!canAttack) { if (attackMore) - { num870 = expertMode ? 8 : 11; - } else - { num870 = expertMode ? 12 : 16; - } } - if ((double)npc.life < (double)npc.lifeMax * 0.5 || CalamityWorld.bossRushActive) - { - num870 -= 2; - } - if ((double)npc.life < (double)npc.lifeMax * 0.1 || CalamityWorld.bossRushActive) - { - num870 -= 2; - } - if (npc.ai[3] > (float)num870) - { - npc.ai[3] = 0f; + if ((double)npc.life < (double)npc.lifeMax * 0.5 || CalamityWorld.bossRushActive) + { + num870 -= 2; + } + if ((double)npc.life < (double)npc.lifeMax * 0.1 || CalamityWorld.bossRushActive) + { + num870 -= 2; + } + if (npc.ai[3] > (float)num870) + { + npc.ai[3] = 0f; if (Main.netMode != 1) { if (Main.rand.Next(4) == 0 && !CalamityWorld.death && !CalamityWorld.bossRushActive) - { Projectile.NewProjectile(vector114.X, vector114.Y, num866, num867, mod.ProjectileType("HolyLight"), 0, 0f, Main.myPlayer, 0f, 0f); - } else - { Projectile.NewProjectile(vector114.X, vector114.Y, num866, num867, mod.ProjectileType("HolyBurnOrb"), 0, 0f, Main.myPlayer, 0f, 0f); + } + } + npc.ai[1] += 1f; + if (npc.ai[1] > 450f && !text) + { + text = true; + string key = "Mods.CalamityMod.ProfanedBossText"; + Color messageColor = Color.Orange; + if (Main.netMode == 0) + Main.NewText(Language.GetTextValue(key), messageColor); + else if (Main.netMode == 2) + NetMessage.BroadcastChatMessage(NetworkText.FromKey(key), messageColor); + } + if (npc.ai[1] > 600f) + { + if (Main.netMode != 2) + { + Player player2 = Main.player[Main.myPlayer]; + if (!player2.dead && player2.active && Vector2.Distance(player2.Center, vector) < 2800f) + { + Main.PlaySound(SoundID.Item20, player2.position); + player2.AddBuff(mod.BuffType("ExtremeGravity"), 3000, true); + for (int num621 = 0; num621 < 40; num621++) + { + int num622 = Dust.NewDust(new Vector2(player2.position.X, player2.position.Y), + player2.width, player2.height, 244, 0f, 0f, 100, default(Color), 2f); + Main.dust[num622].velocity *= 3f; + if (Main.rand.Next(2) == 0) + { + Main.dust[num622].scale = 0.5f; + Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f; + } + } + for (int num623 = 0; num623 < 60; num623++) + { + int num624 = Dust.NewDust(new Vector2(player2.position.X, player2.position.Y), + player2.width, player2.height, 244, 0f, 0f, 100, default(Color), 3f); + Main.dust[num624].noGravity = true; + Main.dust[num624].velocity *= 5f; + num624 = Dust.NewDust(new Vector2(player2.position.X, player2.position.Y), + player2.width, player2.height, 244, 0f, 0f, 100, default(Color), 2f); + Main.dust[num624].velocity *= 2f; + } } } - } - if (Main.netMode != 1) - { - npc.ai[1] += 1f; - if (npc.ai[1] > 450f && !text) - { - text = true; - string key = "Mods.CalamityMod.ProfanedBossText"; - Color messageColor = Color.Orange; - if (Main.netMode == 0) - { - Main.NewText(Language.GetTextValue(key), messageColor); - } - else if (Main.netMode == 2) - { - NetMessage.BroadcastChatMessage(NetworkText.FromKey(key), messageColor); - } - } - if (npc.ai[1] > 600f) - { - Main.PlaySound(SoundID.Item20, player.position); - player.AddBuff(mod.BuffType("ExtremeGravity"), 1500, true); - for (int num621 = 0; num621 < 40; num621++) - { - int num622 = Dust.NewDust(new Vector2(player.position.X, player.position.Y), player.width, player.height, 244, 0f, 0f, 100, default(Color), 2f); - Main.dust[num622].velocity *= 3f; - if (Main.rand.Next(2) == 0) - { - Main.dust[num622].scale = 0.5f; - Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f; - } - } - for (int num623 = 0; num623 < 60; num623++) - { - int num624 = Dust.NewDust(new Vector2(player.position.X, player.position.Y), player.width, player.height, 244, 0f, 0f, 100, default(Color), 3f); - Main.dust[num624].noGravity = true; - Main.dust[num624].velocity *= 5f; - num624 = Dust.NewDust(new Vector2(player.position.X, player.position.Y), player.width, player.height, 244, 0f, 0f, 100, default(Color), 2f); - Main.dust[num624].velocity *= 2f; - } - text = false; - npc.ai[0] = -1f; - } - } - } + text = false; + npc.ai[0] = -1f; + } + } if (npc.ai[0] == 3f) { npc.noGravity = true; @@ -519,13 +496,9 @@ namespace CalamityMod.NPCs.Providence if (!canAttack) { if (attackMore) - { num856 = expertMode ? 20 : 23; - } else - { num856 = expertMode ? 30 : 35; - } } num856++; if (npc.ai[3] > (float)num856) @@ -567,9 +540,7 @@ namespace CalamityMod.NPCs.Providence { npc.ai[1] += 1f; if (npc.ai[1] > 300f) - { npc.ai[0] = -1f; - } } } else if (npc.ai[0] == 4f) @@ -592,13 +563,9 @@ namespace CalamityMod.NPCs.Providence if (!canAttack) { if (attackMore) - { num864 = expertMode ? 115 : 135; - } else - { num864 = expertMode ? 148 : 156; - } } num864 += 3; if (npc.ai[3] >= (float)num864) @@ -624,10 +591,8 @@ namespace CalamityMod.NPCs.Providence if (Main.netMode != 1) { npc.ai[1] += 1f; - if (npc.ai[1] > 300f) - { + if (npc.ai[1] > 300f) npc.ai[0] = -1f; - } } } else if (npc.ai[0] == 5f) @@ -680,9 +645,7 @@ namespace CalamityMod.NPCs.Providence { npc.ai[1] += 1f; if (npc.ai[1] > 300f) - { npc.ai[0] = -1f; - } } } else if (npc.ai[0] == 6f) @@ -708,8 +671,6 @@ namespace CalamityMod.NPCs.Providence npc.noGravity = true; npc.noTileCollide = true; npc.chaseable = false; - npc.TargetClosest(true); - npc.velocity *= 0.95f; Vector2 value19 = new Vector2(27f, 59f); npc.ai[2] += 1f; if (npc.ai[2] < 180f) @@ -731,10 +692,10 @@ namespace CalamityMod.NPCs.Providence for (int num1221 = 0; num1221 < 1 + num1220; num1221 = num + 1) { int num1222 = 244; - float num1223 = 0.8f; + float num1223 = 1.2f; if (num1221 % 2 == 1) { - num1223 = 1.65f; + num1223 = 2.8f; } Vector2 vector199 = center20 + ((float)Main.rand.NextDouble() * 6.28318548f).ToRotationVector2() * value19 / 2f; int num1224 = Dust.NewDust(vector199 - Vector2.One * 8f, 16, 16, num1222, npc.velocity.X / 2f, npc.velocity.Y / 2f, 0, default(Color), 1f); @@ -747,20 +708,27 @@ namespace CalamityMod.NPCs.Providence } else if (npc.ai[2] < 360f) { - if (npc.ai[2] == 180f && Main.netMode != 1) + if (npc.ai[2] == 180f) { - npc.TargetClosest(false); - Vector2 vector200 = player.Center - npc.Center; - vector200.Normalize(); - float num1225 = -1f; - if (vector200.X < 0f) + if (Main.player[Main.myPlayer].active && !Main.player[Main.myPlayer].dead && Vector2.Distance(Main.player[Main.myPlayer].Center, vector) < 2800f) { - num1225 = 1f; + Main.PlaySound(29, (int)Main.player[Main.myPlayer].position.X, (int)Main.player[Main.myPlayer].position.Y, 104, 1f, 0f); + } + if (Main.netMode != 1) + { + npc.TargetClosest(false); + Vector2 vector200 = player.Center - npc.Center; + vector200.Normalize(); + float num1225 = -1f; + if (vector200.X < 0f) + { + num1225 = 1f; + } + vector200 = vector200.RotatedBy((double)(-(double)num1225 * 6.28318548f / 6f), default(Vector2)); + Projectile.NewProjectile(npc.Center.X, npc.Center.Y - 16f, vector200.X, vector200.Y, mod.ProjectileType("ProvidenceHolyRay"), 100, 0f, Main.myPlayer, num1225 * 6.28318548f / 450f, (float)npc.whoAmI); + npc.ai[3] = (vector200.ToRotation() + 9.424778f) * num1225; //3.14159265f + npc.netUpdate = true; } - vector200 = vector200.RotatedBy((double)(-(double)num1225 * 6.28318548f / 6f), default(Vector2)); - Projectile.NewProjectile(npc.Center.X, npc.Center.Y - 16f, vector200.X, vector200.Y, mod.ProjectileType("ProvidenceHolyRay"), 100, 0f, Main.myPlayer, num1225 * 6.28318548f / 450f, (float)npc.whoAmI); - npc.ai[3] = (vector200.ToRotation() + 9.424778f) * num1225; //3.14159265f - npc.netUpdate = true; } npc.localAI[1] += 0.05f; if (npc.localAI[1] > 1f) @@ -781,17 +749,13 @@ namespace CalamityMod.NPCs.Providence { npc.localAI[1] -= 0.07f; //15 if (npc.localAI[1] < 0f) - { npc.localAI[1] = 0f; - } } if (Main.netMode != 1) { npc.ai[1] += 1f; if (npc.ai[1] > 375f) - { npc.ai[0] = -1f; - } } } if (npc.ai[0] == -1f) @@ -1035,30 +999,11 @@ namespace CalamityMod.NPCs.Providence potionType = ItemID.SuperHealingPotion; } - public override void ModifyHitByProjectile(Projectile projectile, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) - { - Player player = Main.player[npc.target]; - if (player.vortexStealthActive && projectile.ranged) - { - damage /= 2; - crit = false; - } - if (((projectile.type == ProjectileID.HallowStar || projectile.type == ProjectileID.CrystalShard) && projectile.ranged) || - projectile.type == mod.ProjectileType("TerraBulletSplit") || projectile.type == mod.ProjectileType("TerraArrow2")) - { - damage /= 8; - } - } - public override bool StrikeNPC(ref double damage, int defense, ref float knockback, int hitDirection, ref bool crit) { double newDamage = (damage + (int)((double)defense * 0.25)); float protection = (((npc.ichor || npc.onFire2) ? 0.2f : 0.25f) + ((npc.ai[0] == 2f || npc.ai[0] == 5f || npc.ai[0] == 7f) ? 0.65f : 0f)); //0.85 or 0.9 - if (CalamityWorld.defiled) - { - protection += (1f - protection) * 0.5f; - } if (newDamage < 1.0) { newDamage = 1.0; diff --git a/NPCs/Scavenger/ScavengerBody.cs b/NPCs/Scavenger/ScavengerBody.cs index aac8c87ab7..dec4708957 100644 --- a/NPCs/Scavenger/ScavengerBody.cs +++ b/NPCs/Scavenger/ScavengerBody.cs @@ -65,7 +65,7 @@ namespace CalamityMod.NPCs.Scavenger } if (CalamityWorld.bossRushActive) { - npc.lifeMax = CalamityWorld.death ? 4200000 : 3600000; + npc.lifeMax = CalamityWorld.death ? 4600000 : 4100000; } } @@ -293,9 +293,9 @@ namespace CalamityMod.NPCs.Scavenger { npc.ai[2] = 0f; Vector2 shootFromVector = new Vector2(npc.Center.X + 60f, npc.Center.Y + 60f); - int damage = 0; + int damage = expertMode ? 28 : 40; int fire = Projectile.NewProjectile(shootFromVector.X, shootFromVector.Y, 0f, 2f, 326 + Main.rand.Next(3), damage + (provy ? 30 : 0), 0f, Main.myPlayer, 0f, 0f); - Main.projectile[fire].timeLeft = 210; + Main.projectile[fire].timeLeft = 180; } } } @@ -325,9 +325,9 @@ namespace CalamityMod.NPCs.Scavenger { npc.ai[3] = 0f; Vector2 shootFromVector = new Vector2(npc.Center.X - 60f, npc.Center.Y + 60f); - int damage = 0; + int damage = expertMode ? 28 : 40; int fire = Projectile.NewProjectile(shootFromVector.X, shootFromVector.Y, 0f, 2f, 326 + Main.rand.Next(3), damage + (provy ? 30 : 0), 0f, Main.myPlayer, 0f, 0f); - Main.projectile[fire].timeLeft = 210; + Main.projectile[fire].timeLeft = 180; } } } @@ -469,15 +469,6 @@ namespace CalamityMod.NPCs.Scavenger } } - public override void ModifyHitByProjectile(Projectile projectile, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) - { - if (((projectile.type == ProjectileID.HallowStar || projectile.type == ProjectileID.CrystalShard) && projectile.ranged) || - projectile.type == mod.ProjectileType("TerraBulletSplit") || projectile.type == mod.ProjectileType("TerraArrow2")) - { - damage /= 4; - } - } - public override void PostDraw(SpriteBatch spriteBatch, Color drawColor) { SpriteEffects spriteEffects = SpriteEffects.None; diff --git a/NPCs/SlimeGod/SlimeGod.cs b/NPCs/SlimeGod/SlimeGod.cs index b13d4a2253..8be1d0e1cd 100644 --- a/NPCs/SlimeGod/SlimeGod.cs +++ b/NPCs/SlimeGod/SlimeGod.cs @@ -35,7 +35,7 @@ namespace CalamityMod.NPCs.SlimeGod } if (CalamityWorld.bossRushActive) { - npc.lifeMax = CalamityWorld.death ? 4500000 : 3800000; + npc.lifeMax = CalamityWorld.death ? 5000000 : 4400000; } npc.aiStyle = -1; aiType = -1; @@ -53,7 +53,7 @@ namespace CalamityMod.NPCs.SlimeGod bool expertMode = (Main.expertMode || CalamityWorld.bossRushActive); bool revenge = (CalamityWorld.revenge || CalamityWorld.bossRushActive); Vector2 vector = npc.Center; - if (Vector2.Distance(Main.player[npc.target].Center, vector) > 3600f) + if (Vector2.Distance(Main.player[npc.target].Center, vector) > 5400f) { npc.position.X = (float)(Main.player[npc.target].Center.X / 16) * 16f - (float)(npc.width / 2); npc.position.Y = ((float)(Main.player[npc.target].Center.Y / 16) * 16f - (float)(npc.height / 2)) - 150f; @@ -91,7 +91,7 @@ namespace CalamityMod.NPCs.SlimeGod npc.TargetClosest(true); if (Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height)) { - float num179 = (CalamityWorld.bossRushActive ? 18f : 11f); + float num179 = (CalamityWorld.bossRushActive ? 18f : 8f); Vector2 value9 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); float num180 = Main.player[npc.target].position.X + (float)Main.player[npc.target].width * 0.5f - value9.X; float num181 = Math.Abs(num180) * 0.1f; @@ -126,7 +126,7 @@ namespace CalamityMod.NPCs.SlimeGod npc.TargetClosest(true); if (Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height)) { - float num179 = (CalamityWorld.bossRushActive ? 18f : 11f); + float num179 = (CalamityWorld.bossRushActive ? 18f : 8f); Vector2 value9 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); float num180 = Main.player[npc.target].position.X + (float)Main.player[npc.target].width * 0.5f - value9.X; float num181 = Math.Abs(num180) * 0.1f; @@ -393,7 +393,7 @@ namespace CalamityMod.NPCs.SlimeGod value74.Normalize(); value74 *= 10f; } - npc.velocity = (npc.velocity * 4f + value74) / 4.5f; //5 + npc.velocity = (npc.velocity * 4f + value74) / 4.8f; //5 return; } if (npc.ai[0] == 6f) diff --git a/NPCs/SlimeGod/SlimeGodCore.cs b/NPCs/SlimeGod/SlimeGodCore.cs index 04834ee39e..f583d773c8 100644 --- a/NPCs/SlimeGod/SlimeGodCore.cs +++ b/NPCs/SlimeGod/SlimeGodCore.cs @@ -32,7 +32,7 @@ namespace CalamityMod.NPCs.SlimeGod } if (CalamityWorld.bossRushActive) { - npc.lifeMax = CalamityWorld.death ? 3000000 : 2700000; + npc.lifeMax = CalamityWorld.death ? 3400000 : 3000000; } npc.aiStyle = -1; //new aiType = -1; //new @@ -300,11 +300,11 @@ namespace CalamityMod.NPCs.SlimeGod public override void OnHitPlayer(Player player, int damage, bool crit) { - player.AddBuff(BuffID.VortexDebuff, 180, true); + player.AddBuff(BuffID.VortexDebuff, 240, true); if (CalamityWorld.revenge) { - player.AddBuff(mod.BuffType("Horror"), 300, true); - player.AddBuff(mod.BuffType("MarkedforDeath"), 300); + player.AddBuff(mod.BuffType("Horror"), 120, true); + player.AddBuff(mod.BuffType("MarkedforDeath"), 120); } } } diff --git a/NPCs/SlimeGod/SlimeGodRun.cs b/NPCs/SlimeGod/SlimeGodRun.cs index 18163cc436..01f46bcab3 100644 --- a/NPCs/SlimeGod/SlimeGodRun.cs +++ b/NPCs/SlimeGod/SlimeGodRun.cs @@ -38,7 +38,7 @@ namespace CalamityMod.NPCs.SlimeGod } if (CalamityWorld.bossRushActive) { - npc.lifeMax = CalamityWorld.death ? 3600000 : 3000000; + npc.lifeMax = CalamityWorld.death ? 4000000 : 3400000; } npc.knockBackResist = 0f; animationType = 50; @@ -60,7 +60,7 @@ namespace CalamityMod.NPCs.SlimeGod bool expertMode = (Main.expertMode || CalamityWorld.bossRushActive); bool revenge = (CalamityWorld.revenge || CalamityWorld.bossRushActive); Vector2 vector = npc.Center; - if (Vector2.Distance(Main.player[npc.target].Center, vector) > 3600f) + if (Vector2.Distance(Main.player[npc.target].Center, vector) > 5400f) { npc.position.X = (float)(Main.player[npc.target].Center.X / 16) * 16f - (float)(npc.width / 2); npc.position.Y = ((float)(Main.player[npc.target].Center.Y / 16) * 16f - (float)(npc.height / 2)) - 150f; @@ -113,7 +113,7 @@ namespace CalamityMod.NPCs.SlimeGod npc.TargetClosest(true); if (Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height)) { - float num179 = revenge ? 9f : 11f; + float num179 = revenge ? 9f : 8f; if (CalamityWorld.bossRushActive) num179 += 7f; Vector2 value9 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); @@ -150,7 +150,7 @@ namespace CalamityMod.NPCs.SlimeGod npc.TargetClosest(true); if (Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height)) { - float num179 = revenge ? 12f : 11f; + float num179 = revenge ? 9f : 8f; if (CalamityWorld.bossRushActive) num179 += 7f; Vector2 value9 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); @@ -418,7 +418,7 @@ namespace CalamityMod.NPCs.SlimeGod value74.Normalize(); value74 *= 10f; } - npc.velocity = (npc.velocity * 4f + value74) / 4.5f; //5 + npc.velocity = (npc.velocity * 4f + value74) / 4.8f; //5 return; } if (npc.ai[0] == 6f) @@ -582,16 +582,8 @@ namespace CalamityMod.NPCs.SlimeGod public override void OnHitPlayer(Player player, int damage, bool crit) { - if (Main.expertMode) - { - player.AddBuff(BuffID.Cursed, 30, true); - player.AddBuff(mod.BuffType("BrimstoneFlames"), 120); - } - else - { - player.AddBuff(BuffID.ManaSickness, 120, true); - player.AddBuff(mod.BuffType("BrimstoneFlames"), 120); - } + player.AddBuff(BuffID.ManaSickness, 120, true); + player.AddBuff(mod.BuffType("BrimstoneFlames"), 120); } } } \ No newline at end of file diff --git a/NPCs/SlimeGod/SlimeGodRunSplit.cs b/NPCs/SlimeGod/SlimeGodRunSplit.cs index 1fb5248abd..0a30c5b51b 100644 --- a/NPCs/SlimeGod/SlimeGodRunSplit.cs +++ b/NPCs/SlimeGod/SlimeGodRunSplit.cs @@ -33,7 +33,7 @@ namespace CalamityMod.NPCs.SlimeGod } if (CalamityWorld.bossRushActive) { - npc.lifeMax = CalamityWorld.death ? 1800000 : 1500000; + npc.lifeMax = CalamityWorld.death ? 2000000 : 1700000; } npc.damage = 40; npc.width = 150; @@ -94,7 +94,7 @@ namespace CalamityMod.NPCs.SlimeGod npc.TargetClosest(true); if (Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height)) { - float num179 = revenge ? 9f : 11f; + float num179 = revenge ? 9f : 8f; if (CalamityWorld.bossRushActive) num179 += 7f; Vector2 value9 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); @@ -128,7 +128,7 @@ namespace CalamityMod.NPCs.SlimeGod npc.TargetClosest(true); if (Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height)) { - float num179 = revenge ? 12f : 11f; + float num179 = revenge ? 9f : 8f; if (CalamityWorld.bossRushActive) num179 += 7f; Vector2 value9 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); @@ -196,7 +196,7 @@ namespace CalamityMod.NPCs.SlimeGod } else if (npc.ai[0] == 2f) { - if ((Main.player[npc.target].Center - vector).Length() > (hyperMode ? 1200f : 2400f)) + if ((Main.player[npc.target].Center - vector).Length() > (hyperMode ? 1200f : 3600f)) { npc.ai[0] = 5f; npc.ai[1] = 0f; @@ -393,7 +393,7 @@ namespace CalamityMod.NPCs.SlimeGod value74.Normalize(); value74 *= 10f; } - npc.velocity = (npc.velocity * 4f + value74) / 4.5f; //5 + npc.velocity = (npc.velocity * 4f + value74) / 4.7f; //5 return; } if (npc.ai[0] == 6f) diff --git a/NPCs/SlimeGod/SlimeGodSplit.cs b/NPCs/SlimeGod/SlimeGodSplit.cs index 9e9ad6a047..9cf60d41f1 100644 --- a/NPCs/SlimeGod/SlimeGodSplit.cs +++ b/NPCs/SlimeGod/SlimeGodSplit.cs @@ -30,7 +30,7 @@ namespace CalamityMod.NPCs.SlimeGod } if (CalamityWorld.bossRushActive) { - npc.lifeMax = CalamityWorld.death ? 2250000 : 1900000; + npc.lifeMax = CalamityWorld.death ? 2500000 : 2200000; } npc.damage = 40; npc.width = 150; @@ -80,7 +80,7 @@ namespace CalamityMod.NPCs.SlimeGod npc.TargetClosest(true); if (Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height)) { - float num179 = (CalamityWorld.bossRushActive ? 18f : 11f); + float num179 = (CalamityWorld.bossRushActive ? 18f : 8f); Vector2 value9 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); float num180 = Main.player[npc.target].position.X + (float)Main.player[npc.target].width * 0.5f - value9.X; float num181 = Math.Abs(num180) * 0.1f; @@ -112,7 +112,7 @@ namespace CalamityMod.NPCs.SlimeGod npc.TargetClosest(true); if (Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height)) { - float num179 = (CalamityWorld.bossRushActive ? 18f : 11f); + float num179 = (CalamityWorld.bossRushActive ? 18f : 8f); Vector2 value9 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); float num180 = Main.player[npc.target].position.X + (float)Main.player[npc.target].width * 0.5f - value9.X; float num181 = Math.Abs(num180) * 0.1f; @@ -181,7 +181,7 @@ namespace CalamityMod.NPCs.SlimeGod } else if (npc.ai[0] == 2f) { - if ((Main.player[npc.target].Center - vector).Length() > (hyperMode ? 1200f : 2400f)) + if ((Main.player[npc.target].Center - vector).Length() > (hyperMode ? 1200f : 3600f)) { npc.ai[0] = 5f; npc.ai[1] = 0f; @@ -379,7 +379,7 @@ namespace CalamityMod.NPCs.SlimeGod value74.Normalize(); value74 *= 10f; } - npc.velocity = (npc.velocity * 4f + value74) / 4.5f; + npc.velocity = (npc.velocity * 4f + value74) / 4.7f; return; } if (npc.ai[0] == 6f) diff --git a/NPCs/SlimeGod/SlimeSpawnCorrupt.cs b/NPCs/SlimeGod/SlimeSpawnCorrupt.cs index 424b5252d5..d86fbee662 100644 --- a/NPCs/SlimeGod/SlimeSpawnCorrupt.cs +++ b/NPCs/SlimeGod/SlimeSpawnCorrupt.cs @@ -68,10 +68,7 @@ namespace CalamityMod.NPCs.SlimeGod public override void OnHitPlayer(Player player, int damage, bool crit) { - if (Main.expertMode) - { - player.AddBuff(BuffID.ManaSickness, 60, true); - } + player.AddBuff(BuffID.ManaSickness, 60, true); } } } \ No newline at end of file diff --git a/NPCs/SlimeGod/SlimeSpawnCorrupt2.cs b/NPCs/SlimeGod/SlimeSpawnCorrupt2.cs index 2075590404..afdd106173 100644 --- a/NPCs/SlimeGod/SlimeSpawnCorrupt2.cs +++ b/NPCs/SlimeGod/SlimeSpawnCorrupt2.cs @@ -64,10 +64,7 @@ namespace CalamityMod.NPCs.SlimeGod public override void OnHitPlayer(Player player, int damage, bool crit) { - if (Main.expertMode) - { - player.AddBuff(BuffID.ManaSickness, 60, true); - } + player.AddBuff(BuffID.ManaSickness, 60, true); } } } \ No newline at end of file diff --git a/NPCs/SlimeGod/SlimeSpawnCrimson.cs b/NPCs/SlimeGod/SlimeSpawnCrimson.cs index 238bb246fa..ff2f1ad024 100644 --- a/NPCs/SlimeGod/SlimeSpawnCrimson.cs +++ b/NPCs/SlimeGod/SlimeSpawnCrimson.cs @@ -74,10 +74,7 @@ namespace CalamityMod.NPCs.SlimeGod public override void OnHitPlayer(Player player, int damage, bool crit) { - if (Main.expertMode) - { - player.AddBuff(BuffID.Cursed, 60, true); - } + player.AddBuff(BuffID.Cursed, 60, true); } } } \ No newline at end of file diff --git a/NPCs/SlimeGod/SlimeSpawnCrimson2.cs b/NPCs/SlimeGod/SlimeSpawnCrimson2.cs index 13de9e2212..27b3a82cc9 100644 --- a/NPCs/SlimeGod/SlimeSpawnCrimson2.cs +++ b/NPCs/SlimeGod/SlimeSpawnCrimson2.cs @@ -130,10 +130,7 @@ namespace CalamityMod.NPCs.SlimeGod public override void OnHitPlayer(Player player, int damage, bool crit) { - if (Main.expertMode) - { - player.AddBuff(BuffID.Cursed, 60, true); - } + player.AddBuff(BuffID.Cursed, 60, true); } } } \ No newline at end of file diff --git a/NPCs/StormWeaver/StormWeaverBody.cs b/NPCs/StormWeaver/StormWeaverBody.cs index 7836e7e6a0..beb92b55ab 100644 --- a/NPCs/StormWeaver/StormWeaverBody.cs +++ b/NPCs/StormWeaver/StormWeaverBody.cs @@ -28,7 +28,7 @@ namespace CalamityMod.NPCs.StormWeaver npc.defense = 99999; npc.lifeMax = 20000; music = mod.GetSoundSlot(SoundType.Music, "Sounds/Music/ScourgeofTheUniverse"); - if (CalamityGlobalNPC.DoGSecondStageCountdown <= 0) + if (CalamityWorld.DoGSecondStageCountdown <= 0) { music = mod.GetSoundSlot(SoundType.Music, "Sounds/Music/Weaver"); npc.lifeMax = 100000; @@ -65,7 +65,7 @@ namespace CalamityMod.NPCs.StormWeaver public override void AI() { bool expertMode = Main.expertMode; - if (npc.defense < 99999 && CalamityGlobalNPC.DoGSecondStageCountdown <= 0) + if (npc.defense < 99999 && CalamityWorld.DoGSecondStageCountdown <= 0) { npc.defense = 99999; } @@ -137,6 +137,9 @@ namespace CalamityMod.NPCs.StormWeaver { if (npc.life <= 0) { + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/SWArmor2"), 1f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/SWArmor3"), 1f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/SWArmor4"), 1f); npc.position.X = npc.position.X + (float)(npc.width / 2); npc.position.Y = npc.position.Y + (float)(npc.height / 2); npc.width = 30; diff --git a/NPCs/StormWeaver/StormWeaverBodyNaked.cs b/NPCs/StormWeaver/StormWeaverBodyNaked.cs index 6890826c2f..e8dfc9ea24 100644 --- a/NPCs/StormWeaver/StormWeaverBodyNaked.cs +++ b/NPCs/StormWeaver/StormWeaverBodyNaked.cs @@ -33,14 +33,14 @@ namespace CalamityMod.NPCs.StormWeaver { npc.lifeMax = 75000; } - if (CalamityGlobalNPC.DoGSecondStageCountdown <= 0) + if (CalamityWorld.DoGSecondStageCountdown <= 0) { music = mod.GetSoundSlot(SoundType.Music, "Sounds/Music/Weaver"); npc.lifeMax = 300000; } if (CalamityWorld.bossRushActive) { - npc.lifeMax = 3000000; + npc.lifeMax = 4500000; } npc.aiStyle = 6; //new aiType = -1; //new @@ -125,17 +125,6 @@ namespace CalamityMod.NPCs.StormWeaver public override void ModifyHitByProjectile(Projectile projectile, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) { - Player player = Main.player[npc.target]; - if (player.vortexStealthActive && projectile.ranged) - { - damage /= 2; - crit = false; - } - if (((projectile.type == ProjectileID.HallowStar || projectile.type == ProjectileID.CrystalShard) && projectile.ranged) || - projectile.type == mod.ProjectileType("TerraBulletSplit") || projectile.type == mod.ProjectileType("TerraArrow2")) - { - damage /= 8; - } if (projectile.penetrate == -1) { damage /= 5; @@ -158,6 +147,9 @@ namespace CalamityMod.NPCs.StormWeaver { if (npc.life <= 0) { + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/SWNude2"), 1f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/SWNude3"), 1f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/SWNude4"), 1f); npc.position.X = npc.position.X + (float)(npc.width / 2); npc.position.Y = npc.position.Y + (float)(npc.height / 2); npc.width = 30; diff --git a/NPCs/StormWeaver/StormWeaverHead.cs b/NPCs/StormWeaver/StormWeaverHead.cs index 5c6acd9d7e..b9716e2dc7 100644 --- a/NPCs/StormWeaver/StormWeaverHead.cs +++ b/NPCs/StormWeaver/StormWeaverHead.cs @@ -38,7 +38,7 @@ namespace CalamityMod.NPCs.StormWeaver npc.defense = 99999; npc.lifeMax = 20000; music = mod.GetSoundSlot(SoundType.Music, "Sounds/Music/ScourgeofTheUniverse"); - if (CalamityGlobalNPC.DoGSecondStageCountdown <= 0) + if (CalamityWorld.DoGSecondStageCountdown <= 0) { music = mod.GetSoundSlot(SoundType.Music, "Sounds/Music/Weaver"); npc.lifeMax = 100000; @@ -70,7 +70,7 @@ namespace CalamityMod.NPCs.StormWeaver public override void AI() { bool revenge = (CalamityWorld.revenge || CalamityWorld.bossRushActive); - if (npc.defense < 99999 && CalamityGlobalNPC.DoGSecondStageCountdown <= 0) + if (npc.defense < 99999 && CalamityWorld.DoGSecondStageCountdown <= 0) { npc.defense = 99999; } @@ -177,7 +177,14 @@ namespace CalamityMod.NPCs.StormWeaver } if ((double)npc.position.Y > Main.rockLayer * 16.0) { - CalamityGlobalNPC.DoGSecondStageCountdown = 0; + CalamityWorld.DoGSecondStageCountdown = 0; + if (Main.netMode == 2) + { + var netMessage = mod.GetPacket(); + netMessage.Write((byte)CalamityModMessageType.DoGCountdownSync); + netMessage.Write(CalamityWorld.DoGSecondStageCountdown); + netMessage.Send(); + } for (int num957 = 0; num957 < 200; num957++) { if (Main.npc[num957].aiStyle == npc.aiStyle) @@ -189,7 +196,14 @@ namespace CalamityMod.NPCs.StormWeaver } if (Vector2.Distance(Main.player[npc.target].Center, npc.Center) > 10000f) { - CalamityGlobalNPC.DoGSecondStageCountdown = 0; + CalamityWorld.DoGSecondStageCountdown = 0; + if (Main.netMode == 2) + { + var netMessage = mod.GetPacket(); + netMessage.Write((byte)CalamityModMessageType.DoGCountdownSync); + netMessage.Write(CalamityWorld.DoGSecondStageCountdown); + netMessage.Send(); + } for (int num957 = 0; num957 < 200; num957++) { if (Main.npc[num957].aiStyle == npc.aiStyle) @@ -455,7 +469,8 @@ namespace CalamityMod.NPCs.StormWeaver } if (npc.life <= 0) { - npc.position.X = npc.position.X + (float)(npc.width / 2); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/SWArmor"), 1f); + npc.position.X = npc.position.X + (float)(npc.width / 2); npc.position.Y = npc.position.Y + (float)(npc.height / 2); npc.width = 30; npc.height = 30; diff --git a/NPCs/StormWeaver/StormWeaverHeadNaked.cs b/NPCs/StormWeaver/StormWeaverHeadNaked.cs index e881bf1409..ecc791cceb 100644 --- a/NPCs/StormWeaver/StormWeaverHeadNaked.cs +++ b/NPCs/StormWeaver/StormWeaverHeadNaked.cs @@ -43,14 +43,14 @@ namespace CalamityMod.NPCs.StormWeaver { npc.lifeMax = 75000; } - if (CalamityGlobalNPC.DoGSecondStageCountdown <= 0) + if (CalamityWorld.DoGSecondStageCountdown <= 0) { music = mod.GetSoundSlot(SoundType.Music, "Sounds/Music/Weaver"); npc.lifeMax = 300000; } if (CalamityWorld.bossRushActive) { - npc.lifeMax = 3000000; + npc.lifeMax = 4500000; } npc.aiStyle = 6; //new aiType = -1; //new @@ -185,7 +185,14 @@ namespace CalamityMod.NPCs.StormWeaver } if ((double)npc.position.Y > Main.rockLayer * 16.0) { - CalamityGlobalNPC.DoGSecondStageCountdown = 0; + CalamityWorld.DoGSecondStageCountdown = 0; + if (Main.netMode == 2) + { + var netMessage = mod.GetPacket(); + netMessage.Write((byte)CalamityModMessageType.DoGCountdownSync); + netMessage.Write(CalamityWorld.DoGSecondStageCountdown); + netMessage.Send(); + } for (int num957 = 0; num957 < 200; num957++) { if (Main.npc[num957].aiStyle == npc.aiStyle) @@ -197,7 +204,14 @@ namespace CalamityMod.NPCs.StormWeaver } if (Vector2.Distance(Main.player[npc.target].Center, npc.Center) > 10000f) { - CalamityGlobalNPC.DoGSecondStageCountdown = 0; + CalamityWorld.DoGSecondStageCountdown = 0; + if (Main.netMode == 2) + { + var netMessage = mod.GetPacket(); + netMessage.Write((byte)CalamityModMessageType.DoGCountdownSync); + netMessage.Write(CalamityWorld.DoGSecondStageCountdown); + netMessage.Send(); + } for (int num957 = 0; num957 < 200; num957++) { if (Main.npc[num957].aiStyle == npc.aiStyle) @@ -438,21 +452,6 @@ namespace CalamityMod.NPCs.StormWeaver npc.rotation = (float)System.Math.Atan2((double)npc.velocity.Y, (double)npc.velocity.X) + 1.57f; } - public override void ModifyHitByProjectile(Projectile projectile, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) - { - Player player = Main.player[npc.target]; - if (player.vortexStealthActive && projectile.ranged) - { - damage /= 2; - crit = false; - } - if (((projectile.type == ProjectileID.HallowStar || projectile.type == ProjectileID.CrystalShard) && projectile.ranged) || - projectile.type == mod.ProjectileType("TerraBulletSplit") || projectile.type == mod.ProjectileType("TerraArrow2")) - { - damage /= 8; - } - } - public override bool CanHitPlayer(Player target, ref int cooldownSlot) { cooldownSlot = 1; @@ -472,7 +471,8 @@ namespace CalamityMod.NPCs.StormWeaver } if (npc.life <= 0) { - npc.position.X = npc.position.X + (float)(npc.width / 2); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/SWNude"), 1f); + npc.position.X = npc.position.X + (float)(npc.width / 2); npc.position.Y = npc.position.Y + (float)(npc.height / 2); npc.width = 30; npc.height = 30; diff --git a/NPCs/StormWeaver/StormWeaverTail.cs b/NPCs/StormWeaver/StormWeaverTail.cs index 75f1f30135..e48c30ea20 100644 --- a/NPCs/StormWeaver/StormWeaverTail.cs +++ b/NPCs/StormWeaver/StormWeaverTail.cs @@ -26,7 +26,7 @@ namespace CalamityMod.NPCs.StormWeaver npc.defense = 0; npc.lifeMax = 20000; music = mod.GetSoundSlot(SoundType.Music, "Sounds/Music/ScourgeofTheUniverse"); - if (CalamityGlobalNPC.DoGSecondStageCountdown <= 0) + if (CalamityWorld.DoGSecondStageCountdown <= 0) { music = mod.GetSoundSlot(SoundType.Music, "Sounds/Music/Weaver"); npc.lifeMax = 100000; @@ -117,7 +117,8 @@ namespace CalamityMod.NPCs.StormWeaver } if (npc.life <= 0) { - npc.position.X = npc.position.X + (float)(npc.width / 2); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/SWArmor5"), 1f); + npc.position.X = npc.position.X + (float)(npc.width / 2); npc.position.Y = npc.position.Y + (float)(npc.height / 2); npc.width = 30; npc.height = 30; diff --git a/NPCs/StormWeaver/StormWeaverTailNaked.cs b/NPCs/StormWeaver/StormWeaverTailNaked.cs index 25aed3ce27..69d6f08818 100644 --- a/NPCs/StormWeaver/StormWeaverTailNaked.cs +++ b/NPCs/StormWeaver/StormWeaverTailNaked.cs @@ -32,14 +32,14 @@ namespace CalamityMod.NPCs.StormWeaver { npc.lifeMax = 75000; } - if (CalamityGlobalNPC.DoGSecondStageCountdown <= 0) + if (CalamityWorld.DoGSecondStageCountdown <= 0) { music = mod.GetSoundSlot(SoundType.Music, "Sounds/Music/Weaver"); npc.lifeMax = 300000; } if (CalamityWorld.bossRushActive) { - npc.lifeMax = 3000000; + npc.lifeMax = 4500000; } npc.aiStyle = 6; //new aiType = -1; //new @@ -105,21 +105,6 @@ namespace CalamityMod.NPCs.StormWeaver } } - public override void ModifyHitByProjectile(Projectile projectile, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) - { - Player player = Main.player[npc.target]; - if (player.vortexStealthActive && projectile.ranged) - { - damage /= 2; - crit = false; - } - if (((projectile.type == ProjectileID.HallowStar || projectile.type == ProjectileID.CrystalShard) && projectile.ranged) || - projectile.type == mod.ProjectileType("TerraBulletSplit") || projectile.type == mod.ProjectileType("TerraArrow2")) - { - damage /= 8; - } - } - public override bool CanHitPlayer(Player target, ref int cooldownSlot) { cooldownSlot = 1; @@ -134,7 +119,8 @@ namespace CalamityMod.NPCs.StormWeaver } if (npc.life <= 0) { - npc.position.X = npc.position.X + (float)(npc.width / 2); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/SWNude5"), 1f); + npc.position.X = npc.position.X + (float)(npc.width / 2); npc.position.Y = npc.position.Y + (float)(npc.height / 2); npc.width = 30; npc.height = 30; diff --git a/NPCs/SupremeCalamitas/SCalWormHeart.cs b/NPCs/SupremeCalamitas/SCalWormHeart.cs index a443daef7e..c4923185e4 100644 --- a/NPCs/SupremeCalamitas/SCalWormHeart.cs +++ b/NPCs/SupremeCalamitas/SCalWormHeart.cs @@ -23,14 +23,14 @@ namespace CalamityMod.NPCs.SupremeCalamitas npc.width = 24; //324 npc.height = 24; //216 npc.defense = 0; - npc.lifeMax = CalamityWorld.revenge ? 120000 : 100000; + npc.lifeMax = CalamityWorld.revenge ? 180000 : 160000; if (CalamityWorld.death) { - npc.lifeMax = 150000; + npc.lifeMax = 240000; } if (CalamityWorld.bossRushActive) { - npc.lifeMax = CalamityWorld.death ? 80000 : 60000; + npc.lifeMax = CalamityWorld.death ? 120000 : 90000; } npc.aiStyle = -1; //new aiType = -1; //new @@ -63,21 +63,9 @@ namespace CalamityMod.NPCs.SupremeCalamitas public override void ModifyHitByProjectile(Projectile projectile, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) { - if (projectile.thrown && projectile.penetrate == -1) + if (projectile.type == mod.ProjectileType("Celestus2")) { - damage = (int)((double)damage * 0.8); - } - else if (projectile.penetrate == -1) //not a minion and penetrate is infinite - { - damage = (int)((double)damage * 0.2); - } - else if (projectile.penetrate > 1) //not a minion, penetrate is not infinite, penetrate is greater than 3 - { - damage = (int)((double)damage * 0.4); - } - else //not a minion, penetrate is not infinite, and penetrate is not greater than 1 - { - projectile.penetrate = 1; + damage /= 8; } } diff --git a/NPCs/SupremeCalamitas/SupremeCalamitas.cs b/NPCs/SupremeCalamitas/SupremeCalamitas.cs index f6b52f7279..4589046e8d 100644 --- a/NPCs/SupremeCalamitas/SupremeCalamitas.cs +++ b/NPCs/SupremeCalamitas/SupremeCalamitas.cs @@ -60,7 +60,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas public override void SetDefaults() { - npc.damage = 450; + npc.damage = 350; npc.npcSlots = 50f; npc.width = 120; //324 npc.height = 120; //216 @@ -72,7 +72,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas } if (CalamityWorld.bossRushActive) { - npc.lifeMax = CalamityWorld.death ? 4500000 : 4000000; + npc.lifeMax = CalamityWorld.death ? 4600000 : 4100000; } npc.aiStyle = -1; //new aiType = -1; //new @@ -117,10 +117,6 @@ namespace CalamityMod.NPCs.SupremeCalamitas bool revenge = (CalamityWorld.revenge || CalamityWorld.bossRushActive); bool expertMode = (Main.expertMode || CalamityWorld.bossRushActive); Player player = Main.player[npc.target]; - if (player.ZoneDirtLayerHeight || player.ZoneRockLayerHeight || player.ZoneUnderworldHeight) //works good - { - player.velocity.Y = -100f; - } if (!startText) { if (Main.LocalPlayer.GetModPlayer(mod).sCalKillCount == 4) @@ -484,7 +480,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas npc.rotation = (float)Math.Atan2((double)num741, (double)num740) - 1.57f; if (Main.netMode != 1) { - int damage = expertMode ? 160 : 210; //640 420 + int damage = expertMode ? 150 : 200; if (npc.localAI[2] % 180 == 0) //blasts from top { Projectile.NewProjectile(player.position.X + (float)Main.rand.Next(-1000, 1000), player.position.Y - 1000f, 0f, 5f * uDieLul, mod.ProjectileType("BrimstoneGigaBlast"), damage, 0f, Main.myPlayer, 0f, 0f); @@ -548,7 +544,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas npc.rotation = (float)Math.Atan2((double)num741, (double)num740) - 1.57f; if (Main.netMode != 1) //more clustered attack { - int damage = expertMode ? 175 : 220; //700 440 + int damage = expertMode ? 150 : 200; if (npc.localAI[2] % 180 == 0) //blasts from top { Projectile.NewProjectile(player.position.X + (float)Main.rand.Next(-1000, 1000), player.position.Y - 1000f, 0f, 5f * uDieLul, mod.ProjectileType("BrimstoneGigaBlast"), damage, 0f, Main.myPlayer, 0f, 0f); @@ -617,7 +613,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas npc.rotation = (float)Math.Atan2((double)num741, (double)num740) - 1.57f; if (Main.netMode != 1) { - int damage = expertMode ? 200 : 250; //800 500 + int damage = expertMode ? 150 : 200; if (npc.localAI[2] % 240 == 0) //blasts from top { Projectile.NewProjectile(player.position.X + (float)Main.rand.Next(-1000, 1000), player.position.Y - 1000f, 0f, 5f * uDieLul, mod.ProjectileType("BrimstoneGigaBlast"), damage, 0f, Main.myPlayer, 0f, 0f); @@ -2082,17 +2078,6 @@ namespace CalamityMod.NPCs.SupremeCalamitas { damage /= 2; } - Player player = Main.player[npc.target]; - if (player.vortexStealthActive && projectile.ranged) - { - damage /= 2; - crit = false; - } - if (((projectile.type == ProjectileID.HallowStar || projectile.type == ProjectileID.CrystalShard) && projectile.ranged) || - projectile.type == mod.ProjectileType("TerraBulletSplit") || projectile.type == mod.ProjectileType("TerraArrow2")) - { - damage /= 8; - } if (projectile.type == mod.ProjectileType("ApothMark") || projectile.type == mod.ProjectileType("ApothJaws")) { damage /= 25; @@ -2132,10 +2117,6 @@ namespace CalamityMod.NPCs.SupremeCalamitas { protection = 0.99f; //99% } - if (CalamityWorld.defiled) - { - protection += (1f - protection) * 0.5f; - } if (newDamage >= 1.0) { newDamage = (double)((int)((double)(1f - protection) * newDamage)); diff --git a/NPCs/TheDevourerofGods/DevourerofGodsBody.cs b/NPCs/TheDevourerofGods/DevourerofGodsBody.cs index 349244889d..6d8a3da122 100644 --- a/NPCs/TheDevourerofGods/DevourerofGodsBody.cs +++ b/NPCs/TheDevourerofGods/DevourerofGodsBody.cs @@ -140,29 +140,17 @@ namespace CalamityMod.NPCs.TheDevourerofGods return false; } double protection = CalamityWorld.death ? 0.05 : 0.08; - if (CalamityWorld.defiled) - { - protection *= 0.75; - } damage = (int)((double)damage * protection); return true; } public override void ModifyHitByProjectile(Projectile projectile, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) { - Player player = Main.player[npc.target]; - if (player.vortexStealthActive && projectile.ranged) - { - damage /= 2; - crit = false; - } if (ProjectileID.Sets.StardustDragon[projectile.type]) { damage /= 2; } - if (((projectile.type == ProjectileID.HallowStar || projectile.type == ProjectileID.CrystalShard) && projectile.ranged) || - projectile.type == mod.ProjectileType("SulphuricAcidMist2") || projectile.type == mod.ProjectileType("TerraBulletSplit") || - projectile.type == mod.ProjectileType("TerraArrow2")) + if (projectile.type == mod.ProjectileType("SulphuricAcidMist2")) { damage /= 8; } @@ -237,12 +225,9 @@ namespace CalamityMod.NPCs.TheDevourerofGods public override void OnHitPlayer(Player player, int damage, bool crit) { - player.AddBuff(mod.BuffType("GodSlayerInferno"), 150, true); - if (Main.expertMode) - { - player.AddBuff(BuffID.Frostburn, 200, true); - player.AddBuff(BuffID.Darkness, 100, true); - } + player.AddBuff(mod.BuffType("GodSlayerInferno"), 240, true); + player.AddBuff(BuffID.Frostburn, 240, true); + player.AddBuff(BuffID.Darkness, 240, true); } } } \ No newline at end of file diff --git a/NPCs/TheDevourerofGods/DevourerofGodsBody2.cs b/NPCs/TheDevourerofGods/DevourerofGodsBody2.cs index bb3e13b0a9..f506f99bec 100644 --- a/NPCs/TheDevourerofGods/DevourerofGodsBody2.cs +++ b/NPCs/TheDevourerofGods/DevourerofGodsBody2.cs @@ -118,10 +118,11 @@ namespace CalamityMod.NPCs.TheDevourerofGods if (npc.life <= 0) { float randomSpread = (float)(Main.rand.Next(-100, 100) / 100); - Gore.NewGore(npc.position, npc.velocity * randomSpread * Main.rand.NextFloat(), mod.GetGoreSlot("Gores/DoGBody"), 1f); - Gore.NewGore(npc.position, npc.velocity * randomSpread * Main.rand.NextFloat(), mod.GetGoreSlot("Gores/DoGBody2"), 1f); - Gore.NewGore(npc.position, npc.velocity * randomSpread * Main.rand.NextFloat(), mod.GetGoreSlot("Gores/DoGBody3"), 1f); - npc.position.X = npc.position.X + (float)(npc.width / 2); + Gore.NewGore(npc.position, npc.velocity * randomSpread * Main.rand.NextFloat(), mod.GetGoreSlot("Gores/DoT2"), 1f); + Gore.NewGore(npc.position, npc.velocity * randomSpread * Main.rand.NextFloat(), mod.GetGoreSlot("Gores/DoT3"), 1f); + Gore.NewGore(npc.position, npc.velocity * randomSpread * Main.rand.NextFloat(), mod.GetGoreSlot("Gores/DoT4"), 1f); + Gore.NewGore(npc.position, npc.velocity * randomSpread * Main.rand.NextFloat(), mod.GetGoreSlot("Gores/DoT5"), 1f); + npc.position.X = npc.position.X + (float)(npc.width / 2); npc.position.Y = npc.position.Y + (float)(npc.height / 2); npc.width = 50; npc.height = 50; @@ -150,12 +151,9 @@ namespace CalamityMod.NPCs.TheDevourerofGods public override void OnHitPlayer(Player player, int damage, bool crit) { - player.AddBuff(mod.BuffType("GodSlayerInferno"), 60, true); - if (Main.expertMode) - { - player.AddBuff(BuffID.Frostburn, 200, true); - player.AddBuff(BuffID.Darkness, 100, true); - } + player.AddBuff(mod.BuffType("GodSlayerInferno"), 120, true); + player.AddBuff(BuffID.Frostburn, 120, true); + player.AddBuff(BuffID.Darkness, 120, true); } } } \ No newline at end of file diff --git a/NPCs/TheDevourerofGods/DevourerofGodsBodyS.cs b/NPCs/TheDevourerofGods/DevourerofGodsBodyS.cs index 03b590040f..4d2ac084be 100644 --- a/NPCs/TheDevourerofGods/DevourerofGodsBodyS.cs +++ b/NPCs/TheDevourerofGods/DevourerofGodsBodyS.cs @@ -35,7 +35,7 @@ namespace CalamityMod.NPCs.TheDevourerofGods } if (CalamityWorld.bossRushActive) { - npc.lifeMax = CalamityWorld.death ? 8000000 : 7000000; + npc.lifeMax = CalamityWorld.death ? 12000000 : 11000000; } npc.aiStyle = -1; //new aiType = -1; //new @@ -372,10 +372,6 @@ namespace CalamityMod.NPCs.TheDevourerofGods } damageTaken += (crit ? (damage * 2) : damage); double protection = CalamityWorld.death ? 0.01 : 0.015; - if (CalamityWorld.defiled) - { - protection *= 0.75; - } if (damageTaken >= 5000.0) { damage = (int)((double)damage * protection); @@ -389,19 +385,11 @@ namespace CalamityMod.NPCs.TheDevourerofGods public override void ModifyHitByProjectile(Projectile projectile, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) { - Player player = Main.player[npc.target]; - if (player.vortexStealthActive && projectile.ranged) - { - damage /= 2; - crit = false; - } if (ProjectileID.Sets.StardustDragon[projectile.type]) { damage /= 2; } - if (((projectile.type == ProjectileID.HallowStar || projectile.type == ProjectileID.CrystalShard) && projectile.ranged) || - projectile.type == mod.ProjectileType("SulphuricAcidMist2") || projectile.type == mod.ProjectileType("TerraBulletSplit") || - projectile.type == mod.ProjectileType("TerraArrow2")) + if (projectile.type == mod.ProjectileType("SulphuricAcidMist2")) { damage /= 8; } @@ -438,9 +426,9 @@ namespace CalamityMod.NPCs.TheDevourerofGods if (npc.life <= 0) { float randomSpread = (float)(Main.rand.Next(-100, 100) / 100); - Gore.NewGore(npc.position, npc.velocity * randomSpread * Main.rand.NextFloat(), mod.GetGoreSlot("Gores/DoGBody"), 1f); - Gore.NewGore(npc.position, npc.velocity * randomSpread * Main.rand.NextFloat(), mod.GetGoreSlot("Gores/DoGBody2"), 1f); - Gore.NewGore(npc.position, npc.velocity * randomSpread * Main.rand.NextFloat(), mod.GetGoreSlot("Gores/DoGBody3"), 1f); + Gore.NewGore(npc.position, npc.velocity * randomSpread * Main.rand.NextFloat(), mod.GetGoreSlot("Gores/DoGS3"), 1f); + Gore.NewGore(npc.position, npc.velocity * randomSpread * Main.rand.NextFloat(), mod.GetGoreSlot("Gores/DoGS4"), 1f); + Gore.NewGore(npc.position, npc.velocity * randomSpread * Main.rand.NextFloat(), mod.GetGoreSlot("Gores/DoGS5"), 1f); npc.position.X = npc.position.X + (float)(npc.width / 2); npc.position.Y = npc.position.Y + (float)(npc.height / 2); npc.width = 50; @@ -476,12 +464,9 @@ namespace CalamityMod.NPCs.TheDevourerofGods public override void OnHitPlayer(Player player, int damage, bool crit) { - player.AddBuff(mod.BuffType("GodSlayerInferno"), 150, true); - if (Main.expertMode) - { - player.AddBuff(BuffID.Frostburn, 200, true); - player.AddBuff(BuffID.Darkness, 100, true); - } + player.AddBuff(mod.BuffType("GodSlayerInferno"), 240, true); + player.AddBuff(BuffID.Frostburn, 240, true); + player.AddBuff(BuffID.Darkness, 240, true); } } } \ No newline at end of file diff --git a/NPCs/TheDevourerofGods/DevourerofGodsHead.cs b/NPCs/TheDevourerofGods/DevourerofGodsHead.cs index 7ae4ffd1fc..19a1801f8f 100644 --- a/NPCs/TheDevourerofGods/DevourerofGodsHead.cs +++ b/NPCs/TheDevourerofGods/DevourerofGodsHead.cs @@ -201,12 +201,11 @@ namespace CalamityMod.NPCs.TheDevourerofGods } if (Main.player[npc.target].dead) { - npc.TargetClosest(false); flies = false; - npc.velocity.Y = npc.velocity.Y + 10f; + npc.velocity.Y = npc.velocity.Y + 2f; if ((double)npc.position.Y > Main.worldSurface * 16.0) { - npc.velocity.Y = npc.velocity.Y + 10f; + npc.velocity.Y = npc.velocity.Y + 2f; } if ((double)npc.position.Y > Main.rockLayer * 16.0) { @@ -243,9 +242,9 @@ namespace CalamityMod.NPCs.TheDevourerofGods { if (Main.netMode != 2) { - if (!Main.player[npc.target].dead && Main.player[npc.target].active) + if (!Main.player[Main.myPlayer].dead && Main.player[Main.myPlayer].active && Vector2.Distance(Main.player[Main.myPlayer].Center, vector) < 5600f) { - Main.player[npc.target].AddBuff(mod.BuffType("Warped"), 2); + Main.player[Main.myPlayer].AddBuff(mod.BuffType("Warped"), 2); } } phaseSwitch += 1f; @@ -525,11 +524,11 @@ namespace CalamityMod.NPCs.TheDevourerofGods { if (Main.netMode != 2) { - if (!Main.player[npc.target].dead && Main.player[npc.target].active) - { - Main.player[npc.target].AddBuff(mod.BuffType("ExtremeGrav"), 2); - } - } + if (!Main.player[Main.myPlayer].dead && Main.player[Main.myPlayer].active && Vector2.Distance(Main.player[Main.myPlayer].Center, vector) < 5600f) + { + Main.player[Main.myPlayer].AddBuff(mod.BuffType("ExtremeGrav"), 2); + } + } phaseSwitch += 1f; float speed = playerRunAcceleration * 19f; float turnSpeed = playerRunAcceleration * 0.28f; @@ -847,15 +846,7 @@ namespace CalamityMod.NPCs.TheDevourerofGods public override void ModifyHitByProjectile(Projectile projectile, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) { - Player player = Main.player[npc.target]; - if (player.vortexStealthActive && projectile.ranged) - { - damage /= 2; - crit = false; - } - if (((projectile.type == ProjectileID.HallowStar || projectile.type == ProjectileID.CrystalShard) && projectile.ranged) || - projectile.type == mod.ProjectileType("SulphuricAcidMist2") || projectile.type == mod.ProjectileType("TerraBulletSplit") || - projectile.type == mod.ProjectileType("TerraArrow2")) + if (projectile.type == mod.ProjectileType("SulphuricAcidMist2")) { damage /= 8; } @@ -932,7 +923,7 @@ namespace CalamityMod.NPCs.TheDevourerofGods public override void OnHitPlayer(Player player, int damage, bool crit) { - player.AddBuff(mod.BuffType("GodSlayerInferno"), 150, true); + player.AddBuff(mod.BuffType("GodSlayerInferno"), 300, true); if (CalamityWorld.death) { player.KillMe(PlayerDeathReason.ByOther(10), 1000.0, 0, false); @@ -968,11 +959,8 @@ namespace CalamityMod.NPCs.TheDevourerofGods { NetMessage.BroadcastChatMessage(NetworkText.FromKey(key), messageColor); } - if (Main.expertMode) - { - player.AddBuff(BuffID.Frostburn, 400, true); - player.AddBuff(BuffID.Darkness, 400, true); - } + player.AddBuff(BuffID.Frostburn, 300, true); + player.AddBuff(BuffID.Darkness, 300, true); } } } \ No newline at end of file diff --git a/NPCs/TheDevourerofGods/DevourerofGodsHead2.cs b/NPCs/TheDevourerofGods/DevourerofGodsHead2.cs index dc0861f062..dd85ea6563 100644 --- a/NPCs/TheDevourerofGods/DevourerofGodsHead2.cs +++ b/NPCs/TheDevourerofGods/DevourerofGodsHead2.cs @@ -125,14 +125,24 @@ namespace CalamityMod.NPCs.TheDevourerofGods NetMessage.SendData(28, -1, -1, null, npc.whoAmI, -1f, 0f, 0f, 0, 0, 0); } } + if (!NPC.AnyNPCs(mod.NPCType("DevourerofGodsHead"))) + { + for (int num569 = 0; num569 < 200; num569++) + { + if (Main.npc[num569].active && (Main.npc[num569].type == mod.NPCType("DevourerofGodsHead2") || Main.npc[num569].type == mod.NPCType("DevourerofGodsBody2") || Main.npc[num569].type == mod.NPCType("DevourerofGodsTail2"))) + { + Main.npc[num569].active = false; + } + } + } if (Main.player[npc.target].dead) { npc.TargetClosest(false); flies = false; - npc.velocity.Y = npc.velocity.Y + 10f; + npc.velocity.Y = npc.velocity.Y + 2f; if ((double)npc.position.Y > Main.worldSurface * 16.0) { - npc.velocity.Y = npc.velocity.Y + 10f; + npc.velocity.Y = npc.velocity.Y + 2f; } if ((double)npc.position.Y > Main.rockLayer * 16.0) { @@ -441,16 +451,6 @@ namespace CalamityMod.NPCs.TheDevourerofGods { potionType = ItemID.None; } - - public override void ModifyHitByProjectile(Projectile projectile, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) - { - Player player = Main.player[npc.target]; - if (player.vortexStealthActive && projectile.ranged) - { - damage /= 2; - crit = false; - } - } public override bool StrikeNPC(ref double damage, int defense, ref float knockback, int hitDirection, ref bool crit) { @@ -477,7 +477,7 @@ namespace CalamityMod.NPCs.TheDevourerofGods { if (npc.life <= 0) { - Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/DoGHead"), 1f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/DoT"), 1f); npc.position.X = npc.position.X + (float)(npc.width / 2); npc.position.Y = npc.position.Y + (float)(npc.height / 2); npc.width = 50; @@ -507,16 +507,9 @@ namespace CalamityMod.NPCs.TheDevourerofGods public override void OnHitPlayer(Player player, int damage, bool crit) { - player.AddBuff(mod.BuffType("GodSlayerInferno"), 150, true); - if (CalamityWorld.revenge) - { - player.AddBuff(mod.BuffType("Horror"), 600, true); - } - if (Main.expertMode) - { - player.AddBuff(BuffID.Frostburn, 400, true); - player.AddBuff(BuffID.Darkness, 400, true); - } + player.AddBuff(mod.BuffType("GodSlayerInferno"), 180, true); + player.AddBuff(BuffID.Frostburn, 180, true); + player.AddBuff(BuffID.Darkness, 180, true); } } } \ No newline at end of file diff --git a/NPCs/TheDevourerofGods/DevourerofGodsHeadS.cs b/NPCs/TheDevourerofGods/DevourerofGodsHeadS.cs index 075f740d72..52c64593f9 100644 --- a/NPCs/TheDevourerofGods/DevourerofGodsHeadS.cs +++ b/NPCs/TheDevourerofGods/DevourerofGodsHeadS.cs @@ -51,9 +51,9 @@ namespace CalamityMod.NPCs.TheDevourerofGods } if (CalamityWorld.bossRushActive) { - npc.lifeMax = CalamityWorld.death ? 8000000 : 7000000; + npc.lifeMax = CalamityWorld.death ? 12000000 : 11000000; } - npc.takenDamageMultiplier = 1.25f; + npc.takenDamageMultiplier = CalamityWorld.bossRushActive ? 1.5f : 1.25f; npc.aiStyle = -1; //new aiType = -1; //new animationType = 10; //new @@ -411,15 +411,19 @@ namespace CalamityMod.NPCs.TheDevourerofGods float fallSpeed = 16f; if (Main.player[npc.target].dead) { - npc.TargetClosest(false); flies = false; - npc.velocity.Y = npc.velocity.Y + 20f; - fallSpeed = 48f; - if ((double)npc.position.Y > Main.rockLayer * 16.0) + npc.velocity.Y = npc.velocity.Y + 2f; + if ((double)npc.position.Y > Main.worldSurface * 16.0) + { + npc.velocity.Y = npc.velocity.Y + 2f; + fallSpeed = 32f; + } + if ((double)npc.position.Y > Main.rockLayer * 16.0) { for (int a = 0; a < 200; a++) { - if (Main.npc[a].aiStyle == npc.aiStyle) + if (Main.npc[a].type == mod.NPCType("DevourerofGodsHeadS") || Main.npc[a].type == mod.NPCType("DevourerofGodsBodyS") || + Main.npc[a].type == mod.NPCType("DevourerofGodsTailS")) { Main.npc[a].active = false; } @@ -458,11 +462,11 @@ namespace CalamityMod.NPCs.TheDevourerofGods { if (Main.netMode != 2) { - if (!Main.player[npc.target].dead && Main.player[npc.target].active) - { - Main.player[npc.target].AddBuff(mod.BuffType("Warped"), 2); - } - } + if (!Main.player[Main.myPlayer].dead && Main.player[Main.myPlayer].active && Vector2.Distance(Main.player[Main.myPlayer].Center, vector) < 5600f) + { + Main.player[Main.myPlayer].AddBuff(mod.BuffType("Warped"), 2); + } + } phaseSwitch += 1f; npc.localAI[1] = 0f; float speed = 15f; @@ -760,11 +764,11 @@ namespace CalamityMod.NPCs.TheDevourerofGods { if (Main.netMode != 2) { - if (!Main.player[npc.target].dead && Main.player[npc.target].active) - { - Main.player[npc.target].AddBuff(mod.BuffType("ExtremeGrav"), 2); - } - } + if (!Main.player[Main.myPlayer].dead && Main.player[Main.myPlayer].active && Vector2.Distance(Main.player[Main.myPlayer].Center, vector) < 5600f) + { + Main.player[Main.myPlayer].AddBuff(mod.BuffType("ExtremeGrav"), 2); + } + } phaseSwitch += 1f; float turnSpeed = 0.3f; bool increaseSpeed = Vector2.Distance(Main.player[npc.target].Center, vector) > 3200f; @@ -1069,15 +1073,7 @@ namespace CalamityMod.NPCs.TheDevourerofGods public override void ModifyHitByProjectile(Projectile projectile, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) { - Player player = Main.player[npc.target]; - if (player.vortexStealthActive && projectile.ranged) - { - damage /= 2; - crit = false; - } - if (((projectile.type == ProjectileID.HallowStar || projectile.type == ProjectileID.CrystalShard) && projectile.ranged) || - projectile.type == mod.ProjectileType("SulphuricAcidMist2") || projectile.type == mod.ProjectileType("TerraBulletSplit") || - projectile.type == mod.ProjectileType("TerraArrow2")) + if (projectile.type == mod.ProjectileType("SulphuricAcidMist2")) { damage /= 8; } @@ -1101,10 +1097,6 @@ namespace CalamityMod.NPCs.TheDevourerofGods return false; } double multiplier = 1.0; - if (CalamityWorld.defiled) - { - multiplier = 0.75; - } damageTaken += (crit ? (damage * 2) : damage); damage = (int)((double)damage * multiplier); if (damageTaken >= 50000.0) @@ -1129,8 +1121,9 @@ namespace CalamityMod.NPCs.TheDevourerofGods { if (npc.life <= 0) { - Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/DoGHead"), 1f); - npc.position.X = npc.position.X + (float)(npc.width / 2); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/DoGS"), 1f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/DoGS2"), 1f); + npc.position.X = npc.position.X + (float)(npc.width / 2); npc.position.Y = npc.position.Y + (float)(npc.height / 2); npc.width = 50; npc.height = 50; @@ -1165,7 +1158,7 @@ namespace CalamityMod.NPCs.TheDevourerofGods public override void OnHitPlayer(Player player, int damage, bool crit) { - player.AddBuff(mod.BuffType("GodSlayerInferno"), 150, true); + player.AddBuff(mod.BuffType("GodSlayerInferno"), 300, true); if ((CalamityWorld.death || CalamityWorld.bossRushActive) && npc.alpha <= 0) { player.KillMe(PlayerDeathReason.ByOther(10), 1000.0, 0, false); @@ -1201,11 +1194,8 @@ namespace CalamityMod.NPCs.TheDevourerofGods { NetMessage.BroadcastChatMessage(NetworkText.FromKey(key), messageColor); } - if (Main.expertMode) - { - player.AddBuff(BuffID.Frostburn, 400, true); - player.AddBuff(BuffID.Darkness, 400, true); - } + player.AddBuff(BuffID.Frostburn, 300, true); + player.AddBuff(BuffID.Darkness, 300, true); } } } \ No newline at end of file diff --git a/NPCs/TheDevourerofGods/DevourerofGodsTail.cs b/NPCs/TheDevourerofGods/DevourerofGodsTail.cs index 9f7a2c9d6f..d62d9061a7 100644 --- a/NPCs/TheDevourerofGods/DevourerofGodsTail.cs +++ b/NPCs/TheDevourerofGods/DevourerofGodsTail.cs @@ -98,15 +98,7 @@ namespace CalamityMod.NPCs.TheDevourerofGods public override void ModifyHitByProjectile(Projectile projectile, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) { - Player player = Main.player[npc.target]; - if (player.vortexStealthActive && projectile.ranged) - { - damage /= 2; - crit = false; - } - if (((projectile.type == ProjectileID.HallowStar || projectile.type == ProjectileID.CrystalShard) && projectile.ranged) || - projectile.type == mod.ProjectileType("SulphuricAcidMist2") || projectile.type == mod.ProjectileType("TerraBulletSplit") || - projectile.type == mod.ProjectileType("TerraArrow2")) + if (projectile.type == mod.ProjectileType("SulphuricAcidMist2")) { damage /= 8; } @@ -172,7 +164,7 @@ namespace CalamityMod.NPCs.TheDevourerofGods public override void OnHitPlayer(Player player, int damage, bool crit) { - player.AddBuff(mod.BuffType("GodSlayerInferno"), 50, true); + player.AddBuff(mod.BuffType("GodSlayerInferno"), 180, true); int num = Main.rand.Next(2); string key = "Mods.CalamityMod.EdgyBossText8"; if (num == 0) @@ -192,11 +184,8 @@ namespace CalamityMod.NPCs.TheDevourerofGods { NetMessage.BroadcastChatMessage(NetworkText.FromKey(key), messageColor); } - if (Main.expertMode) - { - player.AddBuff(BuffID.Frostburn, 100, true); - player.AddBuff(BuffID.Darkness, 100, true); - } + player.AddBuff(BuffID.Frostburn, 180, true); + player.AddBuff(BuffID.Darkness, 180, true); } } } \ No newline at end of file diff --git a/NPCs/TheDevourerofGods/DevourerofGodsTail2.cs b/NPCs/TheDevourerofGods/DevourerofGodsTail2.cs index d489c2034e..912385def1 100644 --- a/NPCs/TheDevourerofGods/DevourerofGodsTail2.cs +++ b/NPCs/TheDevourerofGods/DevourerofGodsTail2.cs @@ -92,23 +92,17 @@ namespace CalamityMod.NPCs.TheDevourerofGods cooldownSlot = 1; return true; } - - public override void ModifyHitByProjectile(Projectile projectile, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) - { - Player player = Main.player[npc.target]; - if (player.vortexStealthActive && projectile.ranged) - { - damage /= 2; - crit = false; - } - } public override void HitEffect(int hitDirection, double damage) { if (npc.life <= 0) { - Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/DoGTail"), 1f); - npc.position.X = npc.position.X + (float)(npc.width / 2); + float randomSpread = (float)(Main.rand.Next(-100, 100) / 100); + Gore.NewGore(npc.position, npc.velocity * randomSpread * Main.rand.NextFloat(), mod.GetGoreSlot("Gores/DoT2"), 1f); + Gore.NewGore(npc.position, npc.velocity * randomSpread * Main.rand.NextFloat(), mod.GetGoreSlot("Gores/DoT3"), 1f); + Gore.NewGore(npc.position, npc.velocity * randomSpread * Main.rand.NextFloat(), mod.GetGoreSlot("Gores/DoT4"), 1f); + Gore.NewGore(npc.position, npc.velocity * randomSpread * Main.rand.NextFloat(), mod.GetGoreSlot("Gores/DoT5"), 1f); + npc.position.X = npc.position.X + (float)(npc.width / 2); npc.position.Y = npc.position.Y + (float)(npc.height / 2); npc.width = 50; npc.height = 50; @@ -157,12 +151,9 @@ namespace CalamityMod.NPCs.TheDevourerofGods public override void OnHitPlayer(Player player, int damage, bool crit) { - player.AddBuff(mod.BuffType("GodSlayerInferno"), 50, true); - if (Main.expertMode) - { - player.AddBuff(BuffID.Frostburn, 100, true); - player.AddBuff(BuffID.Darkness, 100, true); - } + player.AddBuff(mod.BuffType("GodSlayerInferno"), 90, true); + player.AddBuff(BuffID.Frostburn, 90, true); + player.AddBuff(BuffID.Darkness, 90, true); } } } \ No newline at end of file diff --git a/NPCs/TheDevourerofGods/DevourerofGodsTailS.cs b/NPCs/TheDevourerofGods/DevourerofGodsTailS.cs index 2bbd9c7b7c..17c2b8a780 100644 --- a/NPCs/TheDevourerofGods/DevourerofGodsTailS.cs +++ b/NPCs/TheDevourerofGods/DevourerofGodsTailS.cs @@ -37,9 +37,9 @@ namespace CalamityMod.NPCs.TheDevourerofGods } if (CalamityWorld.bossRushActive) { - npc.lifeMax = CalamityWorld.death ? 8000000 : 7000000; + npc.lifeMax = CalamityWorld.death ? 12000000 : 11000000; } - npc.takenDamageMultiplier = 1.25f; + npc.takenDamageMultiplier = CalamityWorld.bossRushActive ? 1.5f : 1.25f; npc.aiStyle = -1; //new aiType = -1; //new animationType = 10; //new @@ -405,8 +405,9 @@ namespace CalamityMod.NPCs.TheDevourerofGods { if (npc.life <= 0) { - Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/DoGTail"), 1f); - npc.position.X = npc.position.X + (float)(npc.width / 2); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/DoGS5"), 1f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/DoGS6"), 1f); + npc.position.X = npc.position.X + (float)(npc.width / 2); npc.position.Y = npc.position.Y + (float)(npc.height / 2); npc.width = 50; npc.height = 50; @@ -441,10 +442,6 @@ namespace CalamityMod.NPCs.TheDevourerofGods return false; } double multiplier = 1.0; - if (CalamityWorld.defiled) - { - multiplier = 0.75; - } damageTaken += (crit ? (damage * 2) : damage); damage = (int)((double)damage * multiplier); if (damageTaken >= 50000.0) @@ -456,15 +453,7 @@ namespace CalamityMod.NPCs.TheDevourerofGods public override void ModifyHitByProjectile(Projectile projectile, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) { - Player player = Main.player[npc.target]; - if (player.vortexStealthActive && projectile.ranged) - { - damage /= 2; - crit = false; - } - if (((projectile.type == ProjectileID.HallowStar || projectile.type == ProjectileID.CrystalShard) && projectile.ranged) || - projectile.type == mod.ProjectileType("SulphuricAcidMist2") || projectile.type == mod.ProjectileType("TerraBulletSplit") || - projectile.type == mod.ProjectileType("TerraArrow2")) + if (projectile.type == mod.ProjectileType("SulphuricAcidMist2") || projectile.type == mod.ProjectileType("EidolicWail")) { damage /= 8; } @@ -488,7 +477,7 @@ namespace CalamityMod.NPCs.TheDevourerofGods public override void OnHitPlayer(Player player, int damage, bool crit) { - player.AddBuff(mod.BuffType("GodSlayerInferno"), 50, true); + player.AddBuff(mod.BuffType("GodSlayerInferno"), 180, true); int num = Main.rand.Next(2); string key = "Mods.CalamityMod.EdgyBossText8"; if (num == 0) @@ -508,11 +497,8 @@ namespace CalamityMod.NPCs.TheDevourerofGods { NetMessage.BroadcastChatMessage(NetworkText.FromKey(key), messageColor); } - if (Main.expertMode) - { - player.AddBuff(BuffID.Frostburn, 100, true); - player.AddBuff(BuffID.Darkness, 100, true); - } + player.AddBuff(BuffID.Frostburn, 180, true); + player.AddBuff(BuffID.Darkness, 180, true); } } } \ No newline at end of file diff --git a/NPCs/TownNPCs/DILF.cs b/NPCs/TownNPCs/DILF.cs index 31e3bd56a9..36e7ba9559 100644 --- a/NPCs/TownNPCs/DILF.cs +++ b/NPCs/TownNPCs/DILF.cs @@ -5,7 +5,6 @@ using Terraria.Localization; using Terraria.ID; using Terraria.ModLoader; -//REMINDER TO MAKE CRYOGEN SPAWN A DILF ON KILL IF ONE DOES NOT CURRENTLY EXIST namespace CalamityMod.NPCs.TownNPCs { [AutoloadHead] @@ -161,6 +160,10 @@ namespace CalamityMod.NPCs.TownNPCs nextSlot++; shop.item[nextSlot].SetDefaults(mod.ItemType("EnchantedMetal")); nextSlot++; + shop.item[nextSlot].SetDefaults(mod.ItemType("BearEye")); + nextSlot++; + shop.item[nextSlot].SetDefaults(mod.ItemType("Popo")); + nextSlot++; } public override void TownNPCAttackStrength(ref int damage, ref float knockback) diff --git a/NPCs/TownNPCs/FAP.cs b/NPCs/TownNPCs/FAP.cs index d6f44520a7..a35bc31014 100644 --- a/NPCs/TownNPCs/FAP.cs +++ b/NPCs/TownNPCs/FAP.cs @@ -180,6 +180,10 @@ namespace CalamityMod.NPCs.TownNPCs if (Main.player[Main.myPlayer].GetModPlayer().chibii) dialogue.Add("Is that a toy? Looks like something I'd carry around if I was 5 years old."); + if ((Main.player[Main.myPlayer].GetModPlayer().sirenBoobs && !Main.player[Main.myPlayer].GetModPlayer().sirenBoobsHide) || + (Main.player[Main.myPlayer].GetModPlayer().sirenBoobsAlt && !Main.player[Main.myPlayer].GetModPlayer().sirenBoobsAltHide)) + dialogue.Add("Nice...scales...did it get hot in here?"); + if (Main.player[Main.myPlayer].GetModPlayer().fabsolVodka) dialogue.Add("Oh yeah now you're drinking the good stuff! Do you like it? I created the recipe by mixing fairy dust, crystals, and other magical crap."); @@ -190,6 +194,8 @@ namespace CalamityMod.NPCs.TownNPCs dialogue.Add("If I was a magical horse in this reality I'd be out in space swirling cocktails as I watch space worms battle for my enjoyment."); } + dialogue.Add("Hey " + CalamityMod.donatorList[Main.rand.Next(CalamityMod.donatorList.Count)] + "! You're pretty good! ...wait, what's your name again?"); + return dialogue[Main.rand.Next(dialogue.Count)]; } @@ -299,7 +305,7 @@ namespace CalamityMod.NPCs.TownNPCs public override void TownNPCAttackStrength(ref int damage, ref float knockback) { - damage = 30; + damage = 15; knockback = 2f; } diff --git a/NPCs/Yharon/Yharon.cs b/NPCs/Yharon/Yharon.cs index 7e465a9f04..5f7b45d911 100644 --- a/NPCs/Yharon/Yharon.cs +++ b/NPCs/Yharon/Yharon.cs @@ -43,7 +43,7 @@ namespace CalamityMod.NPCs.Yharon } if (CalamityWorld.bossRushActive) { - npc.lifeMax = CalamityWorld.death ? 10000000 : 9000000; + npc.lifeMax = CalamityWorld.death ? 10500000 : 9500000; } npc.knockBackResist = 0f; npc.aiStyle = -1; //new @@ -344,7 +344,8 @@ namespace CalamityMod.NPCs.Yharon } else { - protectionBoost = false; + npc.damage = expertMode ? 528 : 330; + protectionBoost = false; } #endregion #region Rotation @@ -1940,6 +1941,7 @@ namespace CalamityMod.NPCs.Yharon } else { + npc.damage = expertMode ? 528 : 330; protectionBoost = false; if (npc.timeLeft < 3600) { @@ -2360,7 +2362,7 @@ namespace CalamityMod.NPCs.Yharon } num2 *= 0.85f; bool flag3 = npc.ai[1] == 20f || npc.ai[1] == 45f || npc.ai[1] == 70f; - if (NPC.CountNPCS(mod.NPCType("Bumblefuck3")) > 4) + if (NPC.CountNPCS(mod.NPCType("Bumblefuck3")) > 2) { flag3 = false; } @@ -2372,10 +2374,7 @@ namespace CalamityMod.NPCs.Yharon Point point2 = vector7.ToPoint(); NPC.NewNPC(point2.X, point2.Y, mod.NPCType("Bumblefuck3"), npc.whoAmI, 0f, 0f, 0f, 0f, 255); } - for (int num41 = 0; num41 < 2; num41++) - { - NPC.NewNPC((int)npc.Center.X + (Main.rand.Next(2) == 0 ? 800 : -800), (int)npc.Center.Y - 200, mod.NPCType("Bumblefuck3"), 0, 0f, 0f, 0f, 0f, 255); - } + NPC.NewNPC((int)npc.Center.X + (Main.rand.Next(2) == 0 ? 800 : -800), (int)npc.Center.Y - 200, mod.NPCType("Bumblefuck3"), 0, 0f, 0f, 0f, 0f, 255); } npc.ai[1] += 1f; } @@ -2599,21 +2598,6 @@ namespace CalamityMod.NPCs.Yharon potionType = mod.ItemType("SupremeHealingPotion"); } - public override void ModifyHitByProjectile(Projectile projectile, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) - { - Player player = Main.player[npc.target]; - if (player.vortexStealthActive && projectile.ranged) - { - damage /= 2; - crit = false; - } - if (((projectile.type == ProjectileID.HallowStar || projectile.type == ProjectileID.CrystalShard) && projectile.ranged) || - projectile.type == mod.ProjectileType("TerraBulletSplit") || projectile.type == mod.ProjectileType("TerraArrow2")) - { - damage /= 8; - } - } - #region DamageFormula public override bool StrikeNPC(ref double damage, int defense, ref float knockback, int hitDirection, ref bool crit) { @@ -2633,20 +2617,12 @@ namespace CalamityMod.NPCs.Yharon { float protection = (((npc.ichor || npc.onFire2) ? 0.17f : 0.22f) + (protectionBoost ? 0.68f : 0f)); //0.85 or 0.9 - if (CalamityWorld.defiled) - { - protection += (1f - protection) * 0.5f; - } newDamage = (double)((int)((double)(1f - protection) * newDamage)); } else { float protection = (((npc.ichor || npc.onFire2) ? 0.12f : 0.17f) + (protectionBoost ? 0.73f : 0f)); //0.85 or 0.9 - if (CalamityWorld.defiled) - { - protection += (1f - protection) * 0.5f; - } newDamage = (double)((int)((double)(1f - protection) * newDamage)); } if (newDamage < 1.0) diff --git a/NPCs/Yharon/Yharon_Head_Boss.png b/NPCs/Yharon/Yharon_Head_Boss.png index 5f06b6069a..1f6fd94e4f 100644 Binary files a/NPCs/Yharon/Yharon_Head_Boss.png and b/NPCs/Yharon/Yharon_Head_Boss.png differ diff --git a/Projectiles/AccretionDisk.cs b/Projectiles/AccretionDisk.cs index 186d123fb6..29ad7dc533 100644 --- a/Projectiles/AccretionDisk.cs +++ b/Projectiles/AccretionDisk.cs @@ -19,7 +19,6 @@ namespace CalamityMod.Projectiles projectile.width = 56; projectile.height = 56; projectile.friendly = true; - projectile.thrown = true; projectile.tileCollide = false; projectile.usesLocalNPCImmunity = true; projectile.localNPCHitCooldown = 6; diff --git a/Projectiles/AccretionDisk2.cs b/Projectiles/AccretionDisk2.cs index e6cfd12911..0738d20a8c 100644 --- a/Projectiles/AccretionDisk2.cs +++ b/Projectiles/AccretionDisk2.cs @@ -20,7 +20,6 @@ namespace CalamityMod.Projectiles projectile.height = 56; projectile.alpha = 120; projectile.friendly = true; - projectile.thrown = true; projectile.tileCollide = false; projectile.penetrate = -1; projectile.aiStyle = 3; diff --git a/Projectiles/AcidBullet.cs b/Projectiles/AcidBullet.cs index d19d02598a..33e8e298cd 100644 --- a/Projectiles/AcidBullet.cs +++ b/Projectiles/AcidBullet.cs @@ -64,11 +64,6 @@ namespace CalamityMod.Projectiles public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { target.AddBuff(mod.BuffType("Plague"), 360); - damage += target.defense; - if (damage > 30) - { - damage = 30; - } } public override void Kill(int timeLeft) diff --git a/Projectiles/AdamantiteThrowingAxeProjectile.cs b/Projectiles/AdamantiteThrowingAxeProjectile.cs index d0cc61a632..a401bfb5b2 100644 --- a/Projectiles/AdamantiteThrowingAxeProjectile.cs +++ b/Projectiles/AdamantiteThrowingAxeProjectile.cs @@ -19,7 +19,6 @@ namespace CalamityMod.Projectiles projectile.width = 12; projectile.height = 12; projectile.friendly = true; - projectile.thrown = true; projectile.penetrate = -1; projectile.aiStyle = 2; projectile.timeLeft = 600; diff --git a/Projectiles/Aftershock.cs b/Projectiles/Aftershock.cs new file mode 100644 index 0000000000..b70d22a6a7 --- /dev/null +++ b/Projectiles/Aftershock.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles +{ + public class Aftershock : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Rock"); + } + + public override void SetDefaults() + { + projectile.width = 32; + projectile.height = 34; + projectile.aiStyle = 14; + projectile.friendly = true; + projectile.penetrate = 6; + projectile.melee = true; + projectile.ignoreWater = true; + aiType = 261; + } + } +} \ No newline at end of file diff --git a/Projectiles/Aftershock.png b/Projectiles/Aftershock.png new file mode 100644 index 0000000000..4928a0203a Binary files /dev/null and b/Projectiles/Aftershock.png differ diff --git a/Projectiles/AngryChicken.cs b/Projectiles/AngryChicken.cs index 595b8457d4..bedcd4dc99 100644 --- a/Projectiles/AngryChicken.cs +++ b/Projectiles/AngryChicken.cs @@ -55,7 +55,7 @@ namespace CalamityMod.Projectiles float num633 = 800f; float num634 = 1200f; float num635 = 3000f; - float num636 = 150f; + float num636 = 500f; float num = (float)Main.rand.Next(90, 111) * 0.01f; num *= Main.essScale; Lighting.AddLight(projectile.Center, 1.2f * num, 0.8f * num, 0f * num); diff --git a/Projectiles/AquaticStar.cs b/Projectiles/AquaticStar.cs index 8e3dd047b1..b6b2ec8dcc 100644 --- a/Projectiles/AquaticStar.cs +++ b/Projectiles/AquaticStar.cs @@ -72,10 +72,6 @@ namespace CalamityMod.Projectiles public override bool OnTileCollide(Vector2 oldVelocity) { - if (projectile.penetrate == 0) - { - projectile.Kill(); - } return false; } diff --git a/Projectiles/ArcticArrow.cs b/Projectiles/ArcticArrow.cs index 6c8cd0717a..d83bde7b0e 100644 --- a/Projectiles/ArcticArrow.cs +++ b/Projectiles/ArcticArrow.cs @@ -20,6 +20,7 @@ namespace CalamityMod.Projectiles projectile.height = 10; projectile.friendly = true; projectile.ranged = true; + projectile.arrow = true; projectile.penetrate = 1; projectile.timeLeft = 600; projectile.aiStyle = 1; @@ -57,7 +58,7 @@ namespace CalamityMod.Projectiles public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { - target.AddBuff(mod.BuffType("GlacialState"), 120); + target.AddBuff(mod.BuffType("GlacialState"), 180); } } } \ No newline at end of file diff --git a/Projectiles/ArcticArrow.png b/Projectiles/ArcticArrow.png index d545b77daf..e4023c5037 100644 Binary files a/Projectiles/ArcticArrow.png and b/Projectiles/ArcticArrow.png differ diff --git a/Projectiles/AstralCrystal.cs b/Projectiles/AstralCrystal.cs index ba6b268e30..cf136c21a7 100644 --- a/Projectiles/AstralCrystal.cs +++ b/Projectiles/AstralCrystal.cs @@ -26,6 +26,7 @@ namespace CalamityMod.Projectiles projectile.friendly = true; projectile.penetrate = 5; projectile.tileCollide = false; + projectile.magic = true; } public override void Kill(int timeLeft) diff --git a/Projectiles/AstralCrystalInvisibleExplosion.cs b/Projectiles/AstralCrystalInvisibleExplosion.cs index 59db913597..a0efe9d88c 100644 --- a/Projectiles/AstralCrystalInvisibleExplosion.cs +++ b/Projectiles/AstralCrystalInvisibleExplosion.cs @@ -21,6 +21,7 @@ namespace CalamityMod.Projectiles projectile.friendly = true; projectile.penetrate = -1; projectile.tileCollide = false; + projectile.magic = true; } public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) diff --git a/Projectiles/AstralPike.cs b/Projectiles/AstralPike.cs index aecb601bb0..9c3fc2a5e1 100644 --- a/Projectiles/AstralPike.cs +++ b/Projectiles/AstralPike.cs @@ -40,7 +40,7 @@ namespace CalamityMod.Projectiles projectile.position += projectile.velocity * projectile.ai[0]; if (Main.rand.Next(5) == 0) { - Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 173, projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f); + Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, mod.DustType("AstralOrange"), projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f); } if(projectile.ai[0] == 0f) { diff --git a/Projectiles/AstralRound.cs b/Projectiles/AstralRound.cs index 86ddbe5962..08d1296d4d 100644 --- a/Projectiles/AstralRound.cs +++ b/Projectiles/AstralRound.cs @@ -50,16 +50,15 @@ namespace CalamityMod.Projectiles int randomDust = Main.rand.Next(2); if (randomDust == 0) { - randomDust = 87; + randomDust = mod.DustType("AstralOrange"); } else { - randomDust = 86; + randomDust = mod.DustType("AstralBlue"); } float x2 = projectile.position.X - projectile.velocity.X / 10f * (float)num136; float y2 = projectile.position.Y - projectile.velocity.Y / 10f * (float)num136; int num137 = Dust.NewDust(new Vector2(x2, y2), 1, 1, randomDust, 0f, 0f, 0, default(Color), 1.5f); - Main.dust[num137].alpha = projectile.alpha; Main.dust[num137].position.X = x2; Main.dust[num137].position.Y = y2; Main.dust[num137].velocity *= 0f; diff --git a/Projectiles/AstralStar.cs b/Projectiles/AstralStar.cs index b69ceb4f09..afe71ff767 100644 --- a/Projectiles/AstralStar.cs +++ b/Projectiles/AstralStar.cs @@ -57,7 +57,7 @@ namespace CalamityMod.Projectiles if (Main.rand.Next(16) == 0) { Vector2 value3 = Vector2.UnitX.RotatedByRandom(1.5707963705062866).RotatedBy((double)projectile.velocity.ToRotation(), default(Vector2)); - int num59 = Dust.NewDust(projectile.position, projectile.width, projectile.height, 173, projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f, 150, default(Color), 1.2f); + int num59 = Dust.NewDust(projectile.position, projectile.width, projectile.height, mod.DustType("AstralOrange"), projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f, 150, default(Color), 1.2f); Main.dust[num59].velocity = value3 * 0.66f; Main.dust[num59].position = projectile.Center + value3 * 12f; } @@ -72,7 +72,7 @@ namespace CalamityMod.Projectiles projectile.light = 0.9f; if (Main.rand.Next(10) == 0) { - Dust.NewDust(projectile.position, projectile.width, projectile.height, 173, projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f, 150, default(Color), 1.2f); + Dust.NewDust(projectile.position, projectile.width, projectile.height, mod.DustType("AstralOrange"), projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f, 150, default(Color), 1.2f); } if (Main.rand.Next(20) == 0) { @@ -97,7 +97,7 @@ namespace CalamityMod.Projectiles projectile.position.Y = projectile.position.Y - (float)(projectile.height / 2); for (int num621 = 0; num621 < 5; num621++) { - int num622 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 173, 0f, 0f, 100, default(Color), 1.2f); + int num622 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, mod.DustType("AstralOrange"), 0f, 0f, 100, default(Color), 1.2f); Main.dust[num622].velocity *= 3f; if (Main.rand.Next(2) == 0) { @@ -107,10 +107,10 @@ namespace CalamityMod.Projectiles } for (int num623 = 0; num623 < 5; num623++) { - int num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 173, 0f, 0f, 100, default(Color), 1.7f); + int num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, mod.DustType("AstralOrange"), 0f, 0f, 100, default(Color), 1.7f); Main.dust[num624].noGravity = true; Main.dust[num624].velocity *= 5f; - num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 173, 0f, 0f, 100, default(Color), 1f); + num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, mod.DustType("AstralOrange"), 0f, 0f, 100, default(Color), 1f); Main.dust[num624].velocity *= 2f; } for (int num480 = 0; num480 < 3; num480++) diff --git a/Projectiles/AstralStar.png b/Projectiles/AstralStar.png index bcd3ed059d..dd1ff7e882 100644 Binary files a/Projectiles/AstralStar.png and b/Projectiles/AstralStar.png differ diff --git a/Projectiles/AstralStarMagic.cs b/Projectiles/AstralStarMagic.cs index 2023300d8c..64405c34e6 100644 --- a/Projectiles/AstralStarMagic.cs +++ b/Projectiles/AstralStarMagic.cs @@ -62,7 +62,7 @@ namespace CalamityMod.Projectiles if (Main.rand.Next(16) == 0) { Vector2 value3 = Vector2.UnitX.RotatedByRandom(1.5707963705062866).RotatedBy((double)projectile.velocity.ToRotation(), default(Vector2)); - int num59 = Dust.NewDust(projectile.position, projectile.width, projectile.height, 173, projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f, 150, default(Color), 1.2f); + int num59 = Dust.NewDust(projectile.position, projectile.width, projectile.height, mod.DustType("AstralOrange"), projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f, 150, default(Color), 1.2f); Main.dust[num59].velocity = value3 * 0.66f; Main.dust[num59].position = projectile.Center + value3 * 12f; } @@ -77,7 +77,7 @@ namespace CalamityMod.Projectiles projectile.light = 0.9f; if (Main.rand.Next(10) == 0) { - Dust.NewDust(projectile.position, projectile.width, projectile.height, 173, projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f, 150, default(Color), 1.2f); + Dust.NewDust(projectile.position, projectile.width, projectile.height, mod.DustType("AstralOrange"), projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f, 150, default(Color), 1.2f); } if (Main.rand.Next(20) == 0) { @@ -102,7 +102,7 @@ namespace CalamityMod.Projectiles projectile.position.Y = projectile.position.Y - (float)(projectile.height / 2); for (int num621 = 0; num621 < 5; num621++) { - int num622 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 173, 0f, 0f, 100, default(Color), 1.2f); + int num622 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, mod.DustType("AstralOrange"), 0f, 0f, 100, default(Color), 1.2f); Main.dust[num622].velocity *= 3f; if (Main.rand.Next(2) == 0) { @@ -112,10 +112,10 @@ namespace CalamityMod.Projectiles } for (int num623 = 0; num623 < 5; num623++) { - int num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 173, 0f, 0f, 100, default(Color), 1.7f); + int num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, mod.DustType("AstralOrange"), 0f, 0f, 100, default(Color), 1.7f); Main.dust[num624].noGravity = true; Main.dust[num624].velocity *= 5f; - num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 173, 0f, 0f, 100, default(Color), 1f); + num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, mod.DustType("AstralOrange"), 0f, 0f, 100, default(Color), 1f); Main.dust[num624].velocity *= 2f; } for (int num480 = 0; num480 < 3; num480++) diff --git a/Projectiles/AstralStarMagic.png b/Projectiles/AstralStarMagic.png index bcd3ed059d..dd1ff7e882 100644 Binary files a/Projectiles/AstralStarMagic.png and b/Projectiles/AstralStarMagic.png differ diff --git a/Projectiles/AstrealArrow.cs b/Projectiles/AstrealArrow.cs index a91be1a4f5..483fe71786 100644 --- a/Projectiles/AstrealArrow.cs +++ b/Projectiles/AstrealArrow.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Projectiles { public class AstrealArrow : ModProjectile { - public int flameTimer = 120; + public int flameTimer = 180; public override void SetStaticDefaults() { @@ -51,7 +51,7 @@ namespace CalamityMod.Projectiles projectile.localAI[0] = 0f; } } - int random = Main.rand.Next(1, 5); + int random = Main.rand.Next(1, 4); flameTimer -= random; int choice = Main.rand.Next(2); projectile.velocity.X *= 1.05f; @@ -80,16 +80,38 @@ namespace CalamityMod.Projectiles { Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 173, projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f); } - if (flameTimer == 0) + if (flameTimer <= 0) { - if (projectile.owner == Main.myPlayer) - { - int explosion = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X * 0f, projectile.velocity.Y * 0f, 659, (int)((double)projectile.damage * 0.5f), projectile.knockBack, projectile.owner, 0f, 0f); - Main.projectile[explosion].timeLeft = 180; - Main.projectile[explosion].magic = false; - Main.projectile[explosion].ranged = true; + float xPos = (Main.rand.Next(2) == 0 ? projectile.position.X + 800 : projectile.position.X - 800); + Vector2 vector2 = new Vector2(xPos, projectile.position.Y + Main.rand.Next(-800, 801)); + float num80 = xPos; + float speedX = (float)projectile.position.X - vector2.X; + float speedY = (float)projectile.position.Y - vector2.Y; + float dir = (float)Math.Sqrt((double)(speedX * speedX + speedY * speedY)); + dir = 10 / num80; + speedX *= dir * 150; + speedY *= dir * 150; + if (speedX > 15f) + { + speedX = 15f; } - flameTimer = 120; + if (speedX < -15f) + { + speedX = -15f; + } + if (speedY > 15f) + { + speedY = 15f; + } + if (speedY < -15f) + { + speedY = -15f; + } + if (projectile.owner == Main.myPlayer) + { + Projectile.NewProjectile(vector2.X, vector2.Y, speedX, speedY, mod.ProjectileType("AstrealFlame"), (int)((double)projectile.damage * 0.5), projectile.knockBack, projectile.owner, 0f, 0f); + } + flameTimer = 180; } } diff --git a/Projectiles/AstrealFlame.cs b/Projectiles/AstrealFlame.cs new file mode 100644 index 0000000000..dd400cef39 --- /dev/null +++ b/Projectiles/AstrealFlame.cs @@ -0,0 +1,107 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles +{ + public class AstrealFlame : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Flame"); + Main.projFrames[projectile.type] = 4; + } + + public override void SetDefaults() + { + projectile.width = 20; + projectile.height = 20; + projectile.friendly = true; + projectile.ranged = true; + projectile.penetrate = 1; + projectile.timeLeft = 180; + projectile.alpha = 255; + } + + public override void AI() + { + projectile.alpha -= 5; + projectile.frameCounter++; + if (projectile.frameCounter > 4) + { + projectile.frame++; + projectile.frameCounter = 0; + } + if (projectile.frame > 3) + { + projectile.frame = 0; + } + float num472 = projectile.Center.X; + float num473 = projectile.Center.Y; + float num474 = 500f; + bool flag17 = false; + for (int num475 = 0; num475 < 200; num475++) + { + if (Main.npc[num475].CanBeChasedBy(projectile, false) && Collision.CanHit(projectile.Center, 1, 1, Main.npc[num475].Center, 1, 1)) + { + float num476 = Main.npc[num475].position.X + (float)(Main.npc[num475].width / 2); + float num477 = Main.npc[num475].position.Y + (float)(Main.npc[num475].height / 2); + float num478 = Math.Abs(projectile.position.X + (float)(projectile.width / 2) - num476) + Math.Abs(projectile.position.Y + (float)(projectile.height / 2) - num477); + if (num478 < num474) + { + num474 = num478; + num472 = num476; + num473 = num477; + flag17 = true; + } + } + } + if (flag17) + { + float num483 = 16f; + Vector2 vector35 = new Vector2(projectile.position.X + (float)projectile.width * 0.5f, projectile.position.Y + (float)projectile.height * 0.5f); + float num484 = num472 - vector35.X; + float num485 = num473 - vector35.Y; + float num486 = (float)Math.Sqrt((double)(num484 * num484 + num485 * num485)); + num486 = num483 / num486; + num484 *= num486; + num485 *= num486; + projectile.velocity.X = (projectile.velocity.X * 20f + num484) / 21f; + projectile.velocity.Y = (projectile.velocity.Y * 20f + num485) / 21f; + return; + } + } + + public override void Kill(int timeLeft) + { + Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 74); + projectile.position.X = projectile.position.X + (float)(projectile.width / 2); + projectile.position.Y = projectile.position.Y + (float)(projectile.height / 2); + projectile.width = 50; + projectile.height = 50; + projectile.position.X = projectile.position.X - (float)(projectile.width / 2); + projectile.position.Y = projectile.position.Y - (float)(projectile.height / 2); + for (int num621 = 0; num621 < 10; num621++) + { + int num622 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 173, 0f, 0f, 100, default(Color), 2f); + Main.dust[num622].velocity *= 3f; + if (Main.rand.Next(2) == 0) + { + Main.dust[num622].scale = 0.5f; + Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f; + } + } + for (int num623 = 0; num623 < 15; num623++) + { + int num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 173, 0f, 0f, 100, default(Color), 3f); + Main.dust[num624].noGravity = true; + Main.dust[num624].velocity *= 5f; + num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 173, 0f, 0f, 100, default(Color), 2f); + Main.dust[num624].velocity *= 2f; + } + } + } +} \ No newline at end of file diff --git a/Projectiles/AstrealFlame.png b/Projectiles/AstrealFlame.png new file mode 100644 index 0000000000..2ef4c2dba5 Binary files /dev/null and b/Projectiles/AstrealFlame.png differ diff --git a/Projectiles/AzathothProjectile.cs b/Projectiles/AzathothProjectile.cs index 3d577958e7..2a6ec21bd9 100644 --- a/Projectiles/AzathothProjectile.cs +++ b/Projectiles/AzathothProjectile.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Projectiles public override void AI() { - if (Main.rand.Next(3) == 0) + if (Main.rand.Next(6) == 0) { if (projectile.owner == Main.myPlayer) { diff --git a/Projectiles/BallistaGreatArrow.cs b/Projectiles/BallistaGreatArrow.cs index 82ee68d88e..56f7cace40 100644 --- a/Projectiles/BallistaGreatArrow.cs +++ b/Projectiles/BallistaGreatArrow.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Projectiles public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { - target.immune[projectile.owner] = 6; + target.immune[projectile.owner] = 12; target.AddBuff(mod.BuffType("ArmorCrunch"), 360); } diff --git a/Projectiles/BallisticPoisonBomb.cs b/Projectiles/BallisticPoisonBomb.cs index cb1a89050d..7fd108bd3b 100644 --- a/Projectiles/BallisticPoisonBomb.cs +++ b/Projectiles/BallisticPoisonBomb.cs @@ -21,7 +21,6 @@ namespace CalamityMod.Projectiles projectile.friendly = true; projectile.penetrate = -1; projectile.timeLeft = 200; - projectile.thrown = true; projectile.tileCollide = false; } @@ -57,7 +56,7 @@ namespace CalamityMod.Projectiles { for (int num228 = num225; num228 < num226; num228++) { - if (Main.tile[num227, num228] != null && Main.tile[num227, num228].nactive() && (Main.tileSolid[(int)Main.tile[num227, num228].type] || (Main.tileSolidTop[(int)Main.tile[num227, num228].type] && Main.tile[num227, num228].frameY == 0))) + if (Main.tile[num227, num228] != null && !TileID.Sets.Platforms[Main.tile[num227, num228].type] && Main.tile[num227, num228].nactive() && (Main.tileSolid[(int)Main.tile[num227, num228].type] || (Main.tileSolidTop[(int)Main.tile[num227, num228].type] && Main.tile[num227, num228].frameY == 0))) { Vector2 vector19; vector19.X = (float)(num227 * 16); diff --git a/Projectiles/BallisticPoisonBombSpike.cs b/Projectiles/BallisticPoisonBombSpike.cs index 427f0de4c0..0b4a34e83e 100644 --- a/Projectiles/BallisticPoisonBombSpike.cs +++ b/Projectiles/BallisticPoisonBombSpike.cs @@ -23,7 +23,6 @@ namespace CalamityMod.Projectiles projectile.ignoreWater = true; projectile.penetrate = 3; projectile.alpha = 255; - projectile.thrown = true; projectile.extraUpdates = 2; projectile.aiStyle = 93; aiType = 514; diff --git a/Projectiles/Bear.cs b/Projectiles/Bear.cs new file mode 100644 index 0000000000..d126118486 --- /dev/null +++ b/Projectiles/Bear.cs @@ -0,0 +1,368 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles +{ + public class Bear : ModProjectile + { + public int chosenIdle = 0; + public int idleTimer = 0; + public int playerStill = 0; + public bool fly = false; + public bool easyfix = true; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Bear"); + Main.projFrames[projectile.type] = 22; + Main.projPet[projectile.type] = true; + } + + public override void SetDefaults() + { + projectile.netImportant = true; + projectile.width = 52; + projectile.height = 46; + projectile.friendly = true; + projectile.penetrate = -1; + projectile.timeLeft *= 5; + projectile.tileCollide = true; + } + + public override void AI() + { + Player player = Main.player[projectile.owner]; + if (!player.active) + { + projectile.active = false; + return; + } + CalamityPlayer modPlayer = player.GetModPlayer(mod); + if (player.dead) + { + modPlayer.bearPet = false; + } + if (modPlayer.bearPet) + { + projectile.timeLeft = 2; + } + Vector2 vector46 = projectile.position; + if(easyfix) + { + projectile.position.Y += -3f; + easyfix = false; + } + if (!fly) + { + Vector2 center2 = projectile.Center; + Vector2 vector48 = player.Center - center2; + float playerDistance = vector48.Length(); + if (projectile.velocity.Y == 0 && (HoleBelow() || (playerDistance > 110f && projectile.position.X == projectile.oldPosition.X))) + { + projectile.velocity.Y = -5f; + } + projectile.velocity.Y += 0.20f; + + if(projectile.velocity.Y > 7f) + { + projectile.velocity.Y = 7f; + } + + if (playerDistance > 600f) + { + fly = true; + projectile.velocity.X = 0f; + projectile.velocity.Y = 0f; + projectile.tileCollide = false; + } + if (playerDistance > 100f) + { + if (player.position.X - projectile.position.X > 0f) + { + projectile.velocity.X += 0.10f; + + if(projectile.velocity.X > 7f) + { + projectile.velocity.X = 7f; + } + } + else + { + projectile.velocity.X -= 0.10f; + + if (projectile.velocity.X < -7f) + { + projectile.velocity.X = -7f; + } + } + } + if (playerDistance < 100f) + { + if (projectile.velocity.X != 0f) + { + if (projectile.velocity.X > 0.5f) + { + projectile.velocity.X -= 0.15f; + } + else if (projectile.velocity.X < -0.5f) + { + projectile.velocity.X += 0.15f; + } + else if (projectile.velocity.X < 0.5f && projectile.velocity.X > -0.5f) + { + projectile.velocity.X = 0f; + } + } + } + if (projectile.position.X == projectile.oldPosition.X && projectile.position.Y == projectile.oldPosition.Y && projectile.velocity.X == 0) + { + projectile.frameCounter++; + + switch (chosenIdle) + { + case 1: + if (idleTimer == 0) + { + projectile.frame = 0; + } + ++idleTimer; + if (projectile.frameCounter > 5) + { + projectile.frame++; + projectile.frameCounter = 0; + } + if (projectile.frame > 3) + { + chosenIdle = 0; + } + if (projectile.frame < 1) + { + projectile.frame = 1; + } + break; + + case 2: + if (idleTimer == 0) + { + projectile.frame = 0; + } + ++idleTimer; + if (projectile.frameCounter > 5) + { + projectile.frame++; + projectile.frameCounter = 0; + } + if (projectile.frame > 9) + { + chosenIdle = 0; + } + if (projectile.frame < 4) + { + projectile.frame = 4; + } + break; + + case 3: + if (idleTimer == 0) + { + projectile.frame = 0; + } + ++idleTimer; + if (projectile.frameCounter > 5) + { + projectile.frame++; + projectile.frameCounter = 0; + } + if (projectile.frame > 12) + { + chosenIdle = 0; + } + if (projectile.frame < 10) + { + projectile.frame = 10; + } + break; + } + if (chosenIdle == 0) + { + projectile.frame = 0; + projectile.frameCounter = 5; + ++idleTimer; + if (idleTimer > 120) + { + chosenIdle = Main.rand.Next(1, 4); + idleTimer = 0; + } + } + } + else if (projectile.velocity.Y > 0.3f && projectile.position.Y != projectile.oldPosition.Y) + { + projectile.frame = 13; + projectile.frameCounter = 0; + } + else + { + projectile.frameCounter++; + if (projectile.frameCounter > 5) + { + projectile.frame++; + projectile.frameCounter = 0; + } + if (projectile.frame > 17) + { + projectile.frame = 14; + } + if (projectile.frame < 14) + { + projectile.frame = 14; + } + } + } + else if (fly) + { + float num16 = 0.3f; + projectile.tileCollide = false; + Vector2 vector3 = new Vector2(projectile.position.X + (float)projectile.width * 0.5f, projectile.position.Y + (float)projectile.height * 0.5f); + float horiPos = Main.player[projectile.owner].position.X + (float)(Main.player[projectile.owner].width / 2) - vector3.X; + float vertiPos = Main.player[projectile.owner].position.Y + (float)(Main.player[projectile.owner].height / 2) - vector3.Y; + vertiPos += (float)Main.rand.Next(-10, 21); + horiPos += (float)Main.rand.Next(-10, 21); + horiPos += (float)(60 * -(float)Main.player[projectile.owner].direction); + vertiPos -= 60f; + float playerDistance = (float)Math.Sqrt((double)(horiPos * horiPos + vertiPos * vertiPos)); + float num21 = 18f; + float num27 = (float)Math.Sqrt((double)(horiPos * horiPos + vertiPos * vertiPos)); + + if (playerDistance > 2000f) + { + projectile.position.X = Main.player[projectile.owner].Center.X - (float)(projectile.width / 2); + projectile.position.Y = Main.player[projectile.owner].Center.Y - (float)(projectile.height / 2); + projectile.netUpdate = true; + } + if (playerDistance < 50f) + { + if (Math.Abs(projectile.velocity.X) > 2f || Math.Abs(projectile.velocity.Y) > 2f) + { + projectile.velocity *= 0.90f; + } + num16 = 0.01f; + } + else + { + if (playerDistance < 100f) + { + num16 = 0.1f; + } + if (playerDistance > 300f) + { + num16 = 1f; + } + playerDistance = num21 / playerDistance; + horiPos *= playerDistance; + vertiPos *= playerDistance; + } + + if (projectile.velocity.X < horiPos) + { + projectile.velocity.X = projectile.velocity.X + num16; + if (num16 > 0.05f && projectile.velocity.X < 0f) + { + projectile.velocity.X = projectile.velocity.X + num16; + } + } + if (projectile.velocity.X > horiPos) + { + projectile.velocity.X = projectile.velocity.X - num16; + if (num16 > 0.05f && projectile.velocity.X > 0f) + { + projectile.velocity.X = projectile.velocity.X - num16; + } + } + if (projectile.velocity.Y < vertiPos) + { + projectile.velocity.Y = projectile.velocity.Y + num16; + if (num16 > 0.05f && projectile.velocity.Y < 0f) + { + projectile.velocity.Y = projectile.velocity.Y + num16 * 2f; + } + } + if (projectile.velocity.Y > vertiPos) + { + projectile.velocity.Y = projectile.velocity.Y - num16; + if (num16 > 0.05f && projectile.velocity.Y > 0f) + { + projectile.velocity.Y = projectile.velocity.Y - num16 * 2f; + } + } + + projectile.rotation = projectile.velocity.X * 0.03f; + projectile.frameCounter++; + if (projectile.frameCounter > 4) + { + projectile.frame++; + projectile.frameCounter = 0; + } + if (projectile.frame > 21) + { + projectile.frame = 18; + } + if (projectile.frame < 18) + { + projectile.frame = 18; + } + if (playerDistance < 100f) + { + num16 = 0.1f; + if(player.velocity.Y == 0f) + { + ++playerStill; + } + else + { + playerStill = 0; + } + if(playerStill > 60 && !Collision.SolidCollision(projectile.position, projectile.width, projectile.height)) + { + fly = false; + projectile.tileCollide = true; + projectile.rotation = 0; + } + } + } + if (projectile.velocity.X > 0.25f) + { + projectile.spriteDirection = -1; + } + else if (projectile.velocity.X < -0.25f) + { + projectile.spriteDirection = 1; + } + } + + private bool HoleBelow() //pretty much the same as the one used in mantis + { + int tileWidth = 4; + int tileX = (int)(projectile.Center.X / 16f) - tileWidth; + if (projectile.velocity.X > 0) + { + tileX += tileWidth; + } + int tileY = (int)((projectile.position.Y + projectile.height) / 16f); + for (int y = tileY; y < tileY + 2; y++) + { + for (int x = tileX; x < tileX + tileWidth; x++) + { + if (Main.tile[x, y].active()) + { + return false; + } + } + } + return true; + } + } +} \ No newline at end of file diff --git a/Projectiles/Bear.png b/Projectiles/Bear.png new file mode 100644 index 0000000000..6edb80a201 Binary files /dev/null and b/Projectiles/Bear.png differ diff --git a/Projectiles/BeeRPG.cs b/Projectiles/BeeRPG.cs index 50c94c97a8..dc57a353f4 100644 --- a/Projectiles/BeeRPG.cs +++ b/Projectiles/BeeRPG.cs @@ -101,8 +101,6 @@ namespace CalamityMod.Projectiles num518 += projectile.oldVelocity.X / 6f; num519 += projectile.oldVelocity.Y / 6f; int num520 = Projectile.NewProjectile(value20.X, value20.Y, num518, num519, Main.player[projectile.owner].beeType(), Main.player[projectile.owner].beeDamage(projectile.damage / 4), Main.player[projectile.owner].beeKB(0f), Main.myPlayer, 0f, 0f); - Main.projectile[num520].magic = false; - Main.projectile[num520].ranged = true; Main.projectile[num520].penetrate = 2; } } diff --git a/Projectiles/BigBustyRose.cs b/Projectiles/BigBustyRose.cs index 3e684cb509..e7809bb402 100644 --- a/Projectiles/BigBustyRose.cs +++ b/Projectiles/BigBustyRose.cs @@ -43,200 +43,175 @@ namespace CalamityMod.Projectiles public override void AI() { - bool flag64 = projectile.type == mod.ProjectileType("BigBustyRose"); - Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.GetModPlayer(mod); - if (!modPlayer.brimstoneWaifu && !modPlayer.allWaifus) - { - projectile.active = false; - return; - } - if (flag64) - { - if (player.dead) - { - modPlayer.bWaifu = false; - } - if (modPlayer.bWaifu) - { - projectile.timeLeft = 2; - } - } - dust--; - if (dust >= 0) - { - int num501 = 50; - for (int num502 = 0; num502 < num501; num502++) - { - int num503 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y + 16f), projectile.width, projectile.height - 16, 235, 0f, 0f, 0, default(Color), 1f); - Main.dust[num503].velocity *= 2f; - Main.dust[num503].scale *= 1.15f; - } - } - projectile.frameCounter++; - if (projectile.frameCounter > 20) - { - projectile.frame++; - projectile.frameCounter = 0; - } - if (projectile.frame > 3) - { - projectile.frame = 0; - } - float num = (float)Main.rand.Next(90, 111) * 0.01f; - num *= Main.essScale; - Lighting.AddLight(projectile.Center, 1.25f * num, 0f * num, 0.5f * num); - if ((double)Math.Abs(projectile.velocity.X) > 0.2) - { - projectile.spriteDirection = -projectile.direction; - } + bool flag64 = projectile.type == mod.ProjectileType("BigBustyRose"); + Player player = Main.player[projectile.owner]; + CalamityPlayer modPlayer = player.GetModPlayer(mod); + if (!modPlayer.brimstoneWaifu && !modPlayer.allWaifus) + { + projectile.active = false; + return; + } + if (flag64) + { + if (player.dead) + { + modPlayer.bWaifu = false; + } + if (modPlayer.bWaifu) + { + projectile.timeLeft = 2; + } + } + dust--; + if (dust >= 0) + { + int num501 = 50; + for (int num502 = 0; num502 < num501; num502++) + { + int num503 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y + 16f), projectile.width, projectile.height - 16, 235, 0f, 0f, 0, default(Color), 1f); + Main.dust[num503].velocity *= 2f; + Main.dust[num503].scale *= 1.15f; + } + } + projectile.frameCounter++; + if (projectile.frameCounter > 20) + { + projectile.frame++; + projectile.frameCounter = 0; + } + if (projectile.frame > 3) + { + projectile.frame = 0; + } + float num = (float)Main.rand.Next(90, 111) * 0.01f; + num *= Main.essScale; + Lighting.AddLight(projectile.Center, 1.25f * num, 0f * num, 0.5f * num); + if ((double)Math.Abs(projectile.velocity.X) > 0.2) + { + projectile.spriteDirection = -projectile.direction; + } float num633 = 700f; - float num636 = 300f; //150 - float num637 = 0.05f; - for (int num638 = 0; num638 < 1000; num638++) - { - bool flag23 = (Main.projectile[num638].type == mod.ProjectileType("BigBustyRose")); - if (num638 != projectile.whoAmI && Main.projectile[num638].active && Main.projectile[num638].owner == projectile.owner && flag23 && Math.Abs(projectile.position.X - Main.projectile[num638].position.X) + Math.Abs(projectile.position.Y - Main.projectile[num638].position.Y) < (float)projectile.width) - { - if (projectile.position.X < Main.projectile[num638].position.X) - { - projectile.velocity.X = projectile.velocity.X - num637; - } - else - { - projectile.velocity.X = projectile.velocity.X + num637; - } - if (projectile.position.Y < Main.projectile[num638].position.Y) - { - projectile.velocity.Y = projectile.velocity.Y - num637; - } - else - { - projectile.velocity.Y = projectile.velocity.Y + num637; - } - } - } - Vector2 vector46 = projectile.position; - bool flag25 = false; - if (projectile.ai[0] != 1f) - { - projectile.tileCollide = false; - } - if (projectile.tileCollide && WorldGen.SolidTile(Framing.GetTileSafely((int)projectile.Center.X / 16, (int)projectile.Center.Y / 16))) - { - projectile.tileCollide = false; - } - for (int num645 = 0; num645 < 200; num645++) - { - NPC nPC2 = Main.npc[num645]; - if (nPC2.CanBeChasedBy(projectile, false)) - { - float num646 = Vector2.Distance(nPC2.Center, projectile.Center); - if (((Vector2.Distance(projectile.Center, vector46) > num646 && num646 < num633) || !flag25) && Collision.CanHitLine(projectile.position, projectile.width, projectile.height, nPC2.position, nPC2.width, nPC2.height)) - { - num633 = num646; - vector46 = nPC2.Center; - flag25 = true; - } - } - } - /*if (flag25) - { - num647 = num635; - }*/ - if (Vector2.Distance(player.Center, projectile.Center) > 800f) - { - projectile.ai[0] = 1f; - projectile.tileCollide = false; - projectile.netUpdate = true; - } - /*if (flag25 && projectile.ai[0] == 0f) - { - Vector2 vector47 = vector46 - projectile.Center; - float num648 = vector47.Length(); - vector47.Normalize(); - if (num648 > 200f) - { - float scaleFactor2 = 8f; - vector47 *= scaleFactor2; - projectile.velocity = (projectile.velocity * 40f + vector47) / 41f; - } - else - { - float num649 = 4f; - vector47 *= -num649; - projectile.velocity = (projectile.velocity * 40f + vector47) / 41f; - } - } - else - {*/ - bool flag26 = false; - if (!flag26) - { - flag26 = (projectile.ai[0] == 1f); - } - float num650 = 5f; //6 - if (flag26) - { - num650 = 12f; //15 - } - Vector2 center2 = projectile.Center; - Vector2 vector48 = player.Center - center2 + new Vector2(-500f, -60f); //-60 - float num651 = vector48.Length(); - if (num651 > 200f && num650 < 6.5f) //200 and 8 - { - num650 = 6.5f; //8 - } - if (num651 < num636 && flag26 && !Collision.SolidCollision(projectile.position, projectile.width, projectile.height)) - { - projectile.ai[0] = 0f; - projectile.netUpdate = true; - } - if (num651 > 2000f) - { - projectile.position.X = Main.player[projectile.owner].Center.X - (float)(projectile.width / 2); - projectile.position.Y = Main.player[projectile.owner].Center.Y - (float)(projectile.height / 2); - projectile.netUpdate = true; - } - if (num651 > 70f) - { - vector48.Normalize(); - vector48 *= num650; - projectile.velocity = (projectile.velocity * 40f + vector48) / 41f; - } - else if (projectile.velocity.X == 0f && projectile.velocity.Y == 0f) - { - projectile.velocity.X = -0.18f; - projectile.velocity.Y = -0.08f; - } - //} - if (projectile.ai[1] > 0f) - { - projectile.ai[1] += (float)Main.rand.Next(1, 4); - } - if (projectile.ai[1] > 160f) - { - projectile.ai[1] = 0f; - projectile.netUpdate = true; - } - if (projectile.ai[0] == 0f) - { - float scaleFactor3 = 14f; - int num658 = mod.ProjectileType("BrimstoneHellfireballFriendly"); - if (flag25 && projectile.ai[1] == 0f) - { - projectile.ai[1] += 1f; - if (Main.myPlayer == projectile.owner && Collision.CanHitLine(projectile.position, projectile.width, projectile.height, vector46, 0, 0)) - { - Vector2 value19 = vector46 - projectile.Center; - value19.Normalize(); - value19 *= scaleFactor3; - int num659 = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, value19.X, value19.Y, num658, projectile.damage, 0f, Main.myPlayer, 1f, 0f); - Main.projectile[num659].timeLeft = 200; - projectile.netUpdate = true; - } - } - } + float num636 = 400f; //150 + float num637 = 0.05f; + for (int num638 = 0; num638 < 1000; num638++) + { + bool flag23 = (Main.projectile[num638].type == mod.ProjectileType("BigBustyRose")); + if (num638 != projectile.whoAmI && Main.projectile[num638].active && Main.projectile[num638].owner == projectile.owner && flag23 && Math.Abs(projectile.position.X - Main.projectile[num638].position.X) + Math.Abs(projectile.position.Y - Main.projectile[num638].position.Y) < (float)projectile.width) + { + if (projectile.position.X < Main.projectile[num638].position.X) + { + projectile.velocity.X = projectile.velocity.X - num637; + } + else + { + projectile.velocity.X = projectile.velocity.X + num637; + } + if (projectile.position.Y < Main.projectile[num638].position.Y) + { + projectile.velocity.Y = projectile.velocity.Y - num637; + } + else + { + projectile.velocity.Y = projectile.velocity.Y + num637; + } + } + } + Vector2 vector46 = projectile.position; + bool flag25 = false; + if (projectile.ai[0] != 1f) + { + projectile.tileCollide = false; + } + if (projectile.tileCollide && WorldGen.SolidTile(Framing.GetTileSafely((int)projectile.Center.X / 16, (int)projectile.Center.Y / 16))) + { + projectile.tileCollide = false; + } + for (int num645 = 0; num645 < 200; num645++) + { + NPC nPC2 = Main.npc[num645]; + if (nPC2.CanBeChasedBy(projectile, false)) + { + float num646 = Vector2.Distance(nPC2.Center, projectile.Center); + if (((Vector2.Distance(projectile.Center, vector46) > num646 && num646 < num633) || !flag25) && Collision.CanHitLine(projectile.position, projectile.width, projectile.height, nPC2.position, nPC2.width, nPC2.height)) + { + num633 = num646; + vector46 = nPC2.Center; + flag25 = true; + } + } + } + if (Vector2.Distance(player.Center, projectile.Center) > 1200f) + { + projectile.ai[0] = 1f; + projectile.tileCollide = false; + projectile.netUpdate = true; + } + bool flag26 = false; + if (!flag26) + { + flag26 = (projectile.ai[0] == 1f); + } + float num650 = 5f; //6 + if (flag26) + { + num650 = 12f; //15 + } + Vector2 center2 = projectile.Center; + Vector2 vector48 = player.Center - center2 + new Vector2(-500f, -60f); //-60 + float num651 = vector48.Length(); + if (num651 > 200f && num650 < 6.5f) //200 and 8 + { + num650 = 6.5f; //8 + } + if (num651 < num636 && flag26 && !Collision.SolidCollision(projectile.position, projectile.width, projectile.height)) + { + projectile.ai[0] = 0f; + projectile.netUpdate = true; + } + if (num651 > 2000f) + { + projectile.position.X = Main.player[projectile.owner].Center.X - (float)(projectile.width / 2); + projectile.position.Y = Main.player[projectile.owner].Center.Y - (float)(projectile.height / 2); + projectile.netUpdate = true; + } + if (num651 > 70f) + { + vector48.Normalize(); + vector48 *= num650; + projectile.velocity = (projectile.velocity * 40f + vector48) / 41f; + } + else if (projectile.velocity.X == 0f && projectile.velocity.Y == 0f) + { + projectile.velocity.X = -0.18f; + projectile.velocity.Y = -0.08f; + } + if (projectile.ai[1] > 0f) + { + projectile.ai[1] += (float)Main.rand.Next(1, 4); + } + if (projectile.ai[1] > 160f) + { + projectile.ai[1] = 0f; + projectile.netUpdate = true; + } + if (projectile.ai[0] == 0f) + { + float scaleFactor3 = 14f; + int num658 = mod.ProjectileType("BrimstoneHellfireballFriendly"); + if (flag25 && projectile.ai[1] == 0f) + { + projectile.ai[1] += 1f; + if (Main.myPlayer == projectile.owner && Collision.CanHitLine(projectile.position, projectile.width, projectile.height, vector46, 0, 0)) + { + Vector2 value19 = vector46 - projectile.Center; + value19.Normalize(); + value19 *= scaleFactor3; + int num659 = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, value19.X, value19.Y, num658, projectile.damage, 0f, Main.myPlayer, 0f, 0f); + Main.projectile[num659].timeLeft = 200; + projectile.netUpdate = true; + } + } + } } } } \ No newline at end of file diff --git a/Projectiles/BloodClotMinion.cs b/Projectiles/BloodClotMinion.cs index 8bf4336a38..4ec585df6f 100644 --- a/Projectiles/BloodClotMinion.cs +++ b/Projectiles/BloodClotMinion.cs @@ -107,12 +107,12 @@ namespace CalamityMod.Projectiles } float num535 = projectile.position.X; float num536 = projectile.position.Y; - float num537 = 900f; + float num537 = 1300f; bool flag19 = false; - int num538 = 500; + int num538 = 1100; if (projectile.ai[1] != 0f) { - num538 = 1400; + num538 = 1800; } if (Math.Abs(projectile.Center.X - Main.player[projectile.owner].Center.X) + Math.Abs(projectile.Center.Y - Main.player[projectile.owner].Center.Y) > (float)num538) { @@ -203,7 +203,7 @@ namespace CalamityMod.Projectiles { if (projectile.ai[1] == -1f) { - projectile.ai[1] = 17f; + projectile.ai[1] = 11f; } if (projectile.ai[1] > 0f) { diff --git a/Projectiles/BloodScythe.png b/Projectiles/BloodScythe.png index 0b53daf2ba..ee0bbd4d2b 100644 Binary files a/Projectiles/BloodScythe.png and b/Projectiles/BloodScythe.png differ diff --git a/Projectiles/BloodfireArrow.cs b/Projectiles/BloodfireArrow.cs index 7b370832d4..cf0337d59a 100644 --- a/Projectiles/BloodfireArrow.cs +++ b/Projectiles/BloodfireArrow.cs @@ -20,6 +20,7 @@ namespace CalamityMod.Projectiles projectile.height = 10; projectile.friendly = true; projectile.ranged = true; + projectile.arrow = true; projectile.penetrate = 1; projectile.timeLeft = 300; } @@ -73,9 +74,12 @@ namespace CalamityMod.Projectiles return; } Player player = Main.player[projectile.owner]; - player.statLife += 1; - player.HealEffect(1); - target.AddBuff(mod.BuffType("BrimstoneFlames"), 360); + if (Main.rand.Next(2) == 0) + { + player.statLife += 1; + player.HealEffect(1); + } + target.AddBuff(mod.BuffType("BrimstoneFlames"), 360); } } } \ No newline at end of file diff --git a/Projectiles/BloodfireBullet.cs b/Projectiles/BloodfireBullet.cs index faef54f74d..1c8eea4367 100644 --- a/Projectiles/BloodfireBullet.cs +++ b/Projectiles/BloodfireBullet.cs @@ -48,8 +48,11 @@ namespace CalamityMod.Projectiles return; } Player player = Main.player[projectile.owner]; - player.statLife += 1; - player.HealEffect(1); + if (Main.rand.Next(2) == 0) + { + player.statLife += 1; + player.HealEffect(1); + } target.AddBuff(mod.BuffType("BrimstoneFlames"), 360); } } diff --git a/Projectiles/BloodflareSoul.cs b/Projectiles/BloodflareSoul.cs index 2a00f42525..44c39576df 100644 --- a/Projectiles/BloodflareSoul.cs +++ b/Projectiles/BloodflareSoul.cs @@ -53,12 +53,11 @@ namespace CalamityMod.Projectiles float num954 = 600f; projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) - 1.57f; Lighting.AddLight(projectile.Center, 0.5f, 0.2f, 0.9f); - int num959 = (int)projectile.ai[0]; - if (num959 >= 0 && Main.player[num959].active && !Main.player[num959].dead) + if (Main.player[projectile.owner].active && !Main.player[projectile.owner].dead) { - if (projectile.Distance(Main.player[num959].Center) > num954) + if (projectile.Distance(Main.player[projectile.owner].Center) > num954) { - Vector2 vector102 = projectile.DirectionTo(Main.player[num959].Center); + Vector2 vector102 = projectile.DirectionTo(Main.player[projectile.owner].Center); if (vector102.HasNaNs()) { vector102 = Vector2.UnitY; @@ -107,12 +106,6 @@ namespace CalamityMod.Projectiles { projectile.timeLeft = 30; } - if (projectile.ai[0] != -1f) - { - projectile.ai[0] = -1f; - projectile.netUpdate = true; - return; - } } } diff --git a/Projectiles/BloodyBlade.cs b/Projectiles/BloodyBlade.cs index 29c0c29a6b..849b524caa 100644 --- a/Projectiles/BloodyBlade.cs +++ b/Projectiles/BloodyBlade.cs @@ -52,7 +52,7 @@ namespace CalamityMod.Projectiles public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { - target.immune[projectile.owner] = 7; + target.immune[projectile.owner] = 9; target.AddBuff(BuffID.Ichor, 60); } } diff --git a/Projectiles/BlushieStaffProj.cs b/Projectiles/BlushieStaffProj.cs index 80fc36969d..6238ae4db2 100644 --- a/Projectiles/BlushieStaffProj.cs +++ b/Projectiles/BlushieStaffProj.cs @@ -44,7 +44,7 @@ namespace CalamityMod.Projectiles player.itemAnimation = 2; projectile.ai[0] += 1f; - projectile.damage = ((int)projectile.ai[0] - 120) / 5; + projectile.damage = ((int)projectile.ai[0] - 120) / 2; if (projectile.damage >= 100 && Main.myPlayer == projectile.owner) { if (player.statMana <= 0 && player.manaFlower) diff --git a/Projectiles/BoltArrow.png b/Projectiles/BoltArrow.png index 05fef8838e..5bd3b03409 100644 Binary files a/Projectiles/BoltArrow.png and b/Projectiles/BoltArrow.png differ diff --git a/Projectiles/Boss/AbyssBallVolley.cs b/Projectiles/Boss/AbyssBallVolley.cs index 84e092681e..39c5c3a558 100644 --- a/Projectiles/Boss/AbyssBallVolley.cs +++ b/Projectiles/Boss/AbyssBallVolley.cs @@ -48,8 +48,8 @@ namespace CalamityMod.Projectiles.Boss public override void OnHitPlayer(Player target, int damage, bool crit) { - target.AddBuff(BuffID.ManaSickness, 60); - target.AddBuff(mod.BuffType("BrimstoneFlames"), 60); + target.AddBuff(BuffID.ManaSickness, 120); + target.AddBuff(mod.BuffType("BrimstoneFlames"), 120); } } } \ No newline at end of file diff --git a/Projectiles/Boss/AbyssBallVolley2.cs b/Projectiles/Boss/AbyssBallVolley2.cs index 33a9dc1c01..e28ecab059 100644 --- a/Projectiles/Boss/AbyssBallVolley2.cs +++ b/Projectiles/Boss/AbyssBallVolley2.cs @@ -50,8 +50,8 @@ namespace CalamityMod.Projectiles.Boss public override void OnHitPlayer(Player target, int damage, bool crit) { - target.AddBuff(BuffID.Cursed, 60); - target.AddBuff(mod.BuffType("BrimstoneFlames"), 60); + target.AddBuff(BuffID.Cursed, 120); + target.AddBuff(mod.BuffType("BrimstoneFlames"), 120); } } } \ No newline at end of file diff --git a/Projectiles/Boss/AstralFlame.cs b/Projectiles/Boss/AstralFlame.cs index b4afde88fd..4daa1b9aa2 100644 --- a/Projectiles/Boss/AstralFlame.cs +++ b/Projectiles/Boss/AstralFlame.cs @@ -63,7 +63,7 @@ namespace CalamityMod.Projectiles.Boss projectile.ai[0] += 1f; if (projectile.ai[0] > 15f) { - int num469 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, mod.DustType("AstralOrange"), 0f, 0f, 100, default(Color), 2f); + int num469 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, mod.DustType("AstralOrange"), 0f, 0f, 100, default(Color), 0.8f); Main.dust[num469].noGravity = true; Main.dust[num469].velocity *= 0f; if (projectile.alpha > 0) @@ -102,7 +102,7 @@ namespace CalamityMod.Projectiles.Boss public override void OnHitPlayer(Player target, int damage, bool crit) { - target.AddBuff(mod.BuffType("GodSlayerInferno"), 60); + target.AddBuff(mod.BuffType("GodSlayerInferno"), 120); } public override void Kill(int timeLeft) @@ -114,14 +114,14 @@ namespace CalamityMod.Projectiles.Boss projectile.position.Y = projectile.position.Y - (float)(projectile.height / 2); for (int num193 = 0; num193 < 2; num193++) { - Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, mod.DustType("AstralOrange"), 0f, 0f, 50, default(Color), 1.5f); + Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, mod.DustType("AstralOrange"), 0f, 0f, 50, default(Color), 1f); } for (int num194 = 0; num194 < 20; num194++) { - int num195 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, mod.DustType("AstralOrange"), 0f, 0f, 0, default(Color), 2.5f); + int num195 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, mod.DustType("AstralOrange"), 0f, 0f, 0, default(Color), 1.5f); Main.dust[num195].noGravity = true; Main.dust[num195].velocity *= 3f; - num195 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 173, 0f, 0f, 50, default(Color), 1.5f); + num195 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 173, 0f, 0f, 50, default(Color), 1f); Main.dust[num195].velocity *= 2f; Main.dust[num195].noGravity = true; } diff --git a/Projectiles/Boss/AstralShot2.cs b/Projectiles/Boss/AstralShot2.cs index 0795c7d5db..08d6d89afc 100644 --- a/Projectiles/Boss/AstralShot2.cs +++ b/Projectiles/Boss/AstralShot2.cs @@ -65,7 +65,7 @@ namespace CalamityMod.Projectiles.Boss public override void OnHitPlayer(Player target, int damage, bool crit) { - target.AddBuff(mod.BuffType("GodSlayerInferno"), 60); + target.AddBuff(mod.BuffType("GodSlayerInferno"), 120); } public override Color? GetAlpha(Color lightColor) diff --git a/Projectiles/Boss/BloodClot.cs b/Projectiles/Boss/BloodClot.cs index 09a829f6d2..9d324db6ed 100644 --- a/Projectiles/Boss/BloodClot.cs +++ b/Projectiles/Boss/BloodClot.cs @@ -39,7 +39,7 @@ namespace CalamityMod.Projectiles.Boss public override void OnHitPlayer(Player target, int damage, bool crit) { - target.AddBuff(mod.BuffType("BurningBlood"), 200); + target.AddBuff(mod.BuffType("BurningBlood"), 120); } } } \ No newline at end of file diff --git a/Projectiles/Boss/BloodGeyser.cs b/Projectiles/Boss/BloodGeyser.cs index e9310474fd..6f1e899f82 100644 --- a/Projectiles/Boss/BloodGeyser.cs +++ b/Projectiles/Boss/BloodGeyser.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Projectiles.Boss public override void OnHitPlayer(Player target, int damage, bool crit) { - target.AddBuff(mod.BuffType("BurningBlood"), 200); + target.AddBuff(mod.BuffType("BurningBlood"), 120); } } } \ No newline at end of file diff --git a/Projectiles/Boss/BrimDust.cs b/Projectiles/Boss/BrimDust.cs index eb53d515c6..11d3d02285 100644 --- a/Projectiles/Boss/BrimDust.cs +++ b/Projectiles/Boss/BrimDust.cs @@ -39,7 +39,7 @@ namespace CalamityMod.Projectiles.Boss public override void OnHitPlayer(Player target, int damage, bool crit) { - target.AddBuff(mod.BuffType("BrimstoneFlames"), 300); + target.AddBuff(mod.BuffType("BrimstoneFlames"), 180); } public override void Kill(int timeLeft) diff --git a/Projectiles/Boss/BrimstoneBall.cs b/Projectiles/Boss/BrimstoneBall.cs index 655796cbe5..7cbf055f9e 100644 --- a/Projectiles/Boss/BrimstoneBall.cs +++ b/Projectiles/Boss/BrimstoneBall.cs @@ -65,7 +65,7 @@ namespace CalamityMod.Projectiles.Boss public override void OnHitPlayer(Player target, int damage, bool crit) { - target.AddBuff(mod.BuffType("BrimstoneFlames"), 240); + target.AddBuff(mod.BuffType("BrimstoneFlames"), 180); } } } \ No newline at end of file diff --git a/Projectiles/Boss/BrimstoneBarrage.cs b/Projectiles/Boss/BrimstoneBarrage.cs index ecfcb5818f..e3d9187b69 100644 --- a/Projectiles/Boss/BrimstoneBarrage.cs +++ b/Projectiles/Boss/BrimstoneBarrage.cs @@ -55,9 +55,9 @@ namespace CalamityMod.Projectiles.Boss public override void OnHitPlayer(Player target, int damage, bool crit) { - target.AddBuff(mod.BuffType("AbyssalFlames"), 120); + target.AddBuff(mod.BuffType("AbyssalFlames"), 180); if (NPC.AnyNPCs(mod.NPCType("SupremeCalamitas"))) - target.AddBuff(mod.BuffType("VulnerabilityHex"), 90, true); + target.AddBuff(mod.BuffType("VulnerabilityHex"), 120, true); } public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) diff --git a/Projectiles/Boss/BrimstoneFire.cs b/Projectiles/Boss/BrimstoneFire.cs index e405acff8e..cc6a4905f1 100644 --- a/Projectiles/Boss/BrimstoneFire.cs +++ b/Projectiles/Boss/BrimstoneFire.cs @@ -93,7 +93,7 @@ namespace CalamityMod.Projectiles.Boss public override void OnHitPlayer(Player target, int damage, bool crit) { - target.AddBuff(mod.BuffType("BrimstoneFlames"), 240); + target.AddBuff(mod.BuffType("BrimstoneFlames"), 180); } } } \ No newline at end of file diff --git a/Projectiles/Boss/BrimstoneFireblast.cs b/Projectiles/Boss/BrimstoneFireblast.cs index df334895ca..382aff111e 100644 --- a/Projectiles/Boss/BrimstoneFireblast.cs +++ b/Projectiles/Boss/BrimstoneFireblast.cs @@ -12,7 +12,8 @@ namespace CalamityMod.Projectiles.Boss public override void SetStaticDefaults() { DisplayName.SetDefault("Fireblast"); - } + Main.projFrames[projectile.type] = 6; + } public override void SetDefaults() { @@ -27,7 +28,17 @@ namespace CalamityMod.Projectiles.Boss public override void AI() { - projectile.alpha -= 1; + projectile.frameCounter++; + if (projectile.frameCounter > 4) + { + projectile.frame++; + projectile.frameCounter = 0; + } + if (projectile.frame > 5) + { + projectile.frame = 0; + } + projectile.alpha -= 1; if (projectile.alpha <= 0) { projectile.Kill(); @@ -51,13 +62,6 @@ namespace CalamityMod.Projectiles.Boss projectile.velocity.Normalize(); projectile.velocity *= scaleFactor2; } - if (projectile.ai[0] < 0f) - { - if (projectile.velocity.Length() < 18f) - { - projectile.velocity *= 1.02f; - } - } } public override Color? GetAlpha(Color lightColor) diff --git a/Projectiles/Boss/BrimstoneFireblast.png b/Projectiles/Boss/BrimstoneFireblast.png index 4a3744b8ce..2a93eb6440 100644 Binary files a/Projectiles/Boss/BrimstoneFireblast.png and b/Projectiles/Boss/BrimstoneFireblast.png differ diff --git a/Projectiles/Boss/BrimstoneGigaBlast.cs b/Projectiles/Boss/BrimstoneGigaBlast.cs index 6859afde90..7bf45e9434 100644 --- a/Projectiles/Boss/BrimstoneGigaBlast.cs +++ b/Projectiles/Boss/BrimstoneGigaBlast.cs @@ -12,7 +12,8 @@ namespace CalamityMod.Projectiles.Boss public override void SetStaticDefaults() { DisplayName.SetDefault("Giga Blast"); - } + Main.projFrames[projectile.type] = 6; + } public override void SetDefaults() { @@ -28,7 +29,17 @@ namespace CalamityMod.Projectiles.Boss public override void AI() { - bool revenge = CalamityWorld.revenge; + projectile.frameCounter++; + if (projectile.frameCounter > 4) + { + projectile.frame++; + projectile.frameCounter = 0; + } + if (projectile.frame > 5) + { + projectile.frame = 0; + } + bool revenge = CalamityWorld.revenge; Lighting.AddLight(projectile.Center, ((255 - projectile.alpha) * 0.9f) / 255f, ((255 - projectile.alpha) * 0f) / 255f, ((255 - projectile.alpha) * 0f) / 255f); projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f; if (projectile.ai[1] == 0f) diff --git a/Projectiles/Boss/BrimstoneGigaBlast.png b/Projectiles/Boss/BrimstoneGigaBlast.png index 335d36e530..d3c929375c 100644 Binary files a/Projectiles/Boss/BrimstoneGigaBlast.png and b/Projectiles/Boss/BrimstoneGigaBlast.png differ diff --git a/Projectiles/Boss/BrimstoneHellblast.cs b/Projectiles/Boss/BrimstoneHellblast.cs index 5a806ec381..353c7a307f 100644 --- a/Projectiles/Boss/BrimstoneHellblast.cs +++ b/Projectiles/Boss/BrimstoneHellblast.cs @@ -68,9 +68,9 @@ namespace CalamityMod.Projectiles.Boss public override void OnHitPlayer(Player target, int damage, bool crit) { - target.AddBuff(mod.BuffType("AbyssalFlames"), 120); + target.AddBuff(mod.BuffType("AbyssalFlames"), 180); if (NPC.AnyNPCs(mod.NPCType("SupremeCalamitas"))) - target.AddBuff(mod.BuffType("VulnerabilityHex"), 90, true); + target.AddBuff(mod.BuffType("VulnerabilityHex"), 120, true); } public override void Kill(int timeLeft) diff --git a/Projectiles/Boss/BrimstoneHellblast2.cs b/Projectiles/Boss/BrimstoneHellblast2.cs index b5493a688c..d9843217fa 100644 --- a/Projectiles/Boss/BrimstoneHellblast2.cs +++ b/Projectiles/Boss/BrimstoneHellblast2.cs @@ -62,9 +62,9 @@ namespace CalamityMod.Projectiles.Boss public override void OnHitPlayer(Player target, int damage, bool crit) { - target.AddBuff(mod.BuffType("AbyssalFlames"), 240); + target.AddBuff(mod.BuffType("AbyssalFlames"), 180); if (NPC.AnyNPCs(mod.NPCType("SupremeCalamitas"))) - target.AddBuff(mod.BuffType("VulnerabilityHex"), 180, true); + target.AddBuff(mod.BuffType("VulnerabilityHex"), 120, true); } } } \ No newline at end of file diff --git a/Projectiles/Boss/BrimstoneHellfireball.cs b/Projectiles/Boss/BrimstoneHellfireball.cs index 2a1d398d27..2c662646ef 100644 --- a/Projectiles/Boss/BrimstoneHellfireball.cs +++ b/Projectiles/Boss/BrimstoneHellfireball.cs @@ -34,9 +34,9 @@ namespace CalamityMod.Projectiles.Boss Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 20); projectile.localAI[0] += 1f; } - for (int num457 = 0; num457 < 10; num457++) + for (int num457 = 0; num457 < 5; num457++) { - int num458 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 235, 0f, 0f, 100, default(Color), 1.2f); + int num458 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 235, 0f, 0f, 100, default(Color), 1.6f); Main.dust[num458].noGravity = true; Main.dust[num458].velocity *= 0.5f; Main.dust[num458].velocity += projectile.velocity * 0.1f; @@ -54,7 +54,7 @@ namespace CalamityMod.Projectiles.Boss public override void OnHitPlayer(Player target, int damage, bool crit) { - target.AddBuff(mod.BuffType("BrimstoneFlames"), 360); + target.AddBuff(mod.BuffType("BrimstoneFlames"), 600); } } } \ No newline at end of file diff --git a/Projectiles/Boss/BrimstoneLaser.cs b/Projectiles/Boss/BrimstoneLaser.cs index 8b86167c78..6b83b8ccc0 100644 --- a/Projectiles/Boss/BrimstoneLaser.cs +++ b/Projectiles/Boss/BrimstoneLaser.cs @@ -59,7 +59,7 @@ namespace CalamityMod.Projectiles.Boss public override void OnHitPlayer(Player target, int damage, bool crit) { - target.AddBuff(mod.BuffType("BrimstoneFlames"), 120); + target.AddBuff(mod.BuffType("BrimstoneFlames"), 180); } } } \ No newline at end of file diff --git a/Projectiles/Boss/BrimstoneLaserSplit.cs b/Projectiles/Boss/BrimstoneLaserSplit.cs index 82375a64de..5d6771bc8c 100644 --- a/Projectiles/Boss/BrimstoneLaserSplit.cs +++ b/Projectiles/Boss/BrimstoneLaserSplit.cs @@ -51,7 +51,7 @@ namespace CalamityMod.Projectiles.Boss public override void OnHitPlayer(Player target, int damage, bool crit) { - target.AddBuff(mod.BuffType("BrimstoneFlames"), 120); + target.AddBuff(mod.BuffType("BrimstoneFlames"), 180); } } } \ No newline at end of file diff --git a/Projectiles/Boss/BrimstoneMonster.cs b/Projectiles/Boss/BrimstoneMonster.cs index e3e78c2128..815e18045d 100644 --- a/Projectiles/Boss/BrimstoneMonster.cs +++ b/Projectiles/Boss/BrimstoneMonster.cs @@ -120,10 +120,7 @@ namespace CalamityMod.Projectiles.Boss public override void OnHitPlayer(Player target, int damage, bool crit) { target.AddBuff(mod.BuffType("AbyssalFlames"), 900); - if (CalamityWorld.death) - { - target.AddBuff(mod.BuffType("VulnerabilityHex"), 300, true); - } + target.AddBuff(mod.BuffType("VulnerabilityHex"), 300, true); } } } \ No newline at end of file diff --git a/Projectiles/Boss/BrimstoneWave.cs b/Projectiles/Boss/BrimstoneWave.cs index 378be56635..e96a313ee1 100644 --- a/Projectiles/Boss/BrimstoneWave.cs +++ b/Projectiles/Boss/BrimstoneWave.cs @@ -71,11 +71,8 @@ namespace CalamityMod.Projectiles.Boss public override void OnHitPlayer(Player target, int damage, bool crit) { - target.AddBuff(mod.BuffType("AbyssalFlames"), 240); - if (CalamityWorld.death) - { - target.AddBuff(mod.BuffType("VulnerabilityHex"), 300, true); - } + target.AddBuff(mod.BuffType("AbyssalFlames"), 180); + target.AddBuff(mod.BuffType("VulnerabilityHex"), 120, true); } } } \ No newline at end of file diff --git a/Projectiles/Boss/DestroyerHomingLaser.cs b/Projectiles/Boss/DestroyerHomingLaser.cs new file mode 100644 index 0000000000..8835818935 --- /dev/null +++ b/Projectiles/Boss/DestroyerHomingLaser.cs @@ -0,0 +1,77 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Boss +{ + public class DestroyerHomingLaser : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Laser"); + } + + public override void SetDefaults() + { + projectile.width = 4; + projectile.height = 4; + projectile.hostile = true; + projectile.ignoreWater = true; + projectile.alpha = 255; + projectile.penetrate = 1; + projectile.timeLeft = 600; + projectile.scale = 1.8f; + } + + public override void AI() + { + projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f; + Lighting.AddLight(projectile.Center, ((255 - projectile.alpha) * 0f) / 255f, ((255 - projectile.alpha) * 0.75f) / 255f, ((255 - projectile.alpha) * 0f) / 255f); + if (projectile.alpha > 0) + { + projectile.alpha -= 125; + } + if (projectile.alpha < 0) + { + projectile.alpha = 0; + } + if (projectile.localAI[1] == 0f) + { + Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 33); + } + projectile.localAI[1] += 1f; + if (projectile.localAI[1] >= 120f) + { + int num103 = (int)Player.FindClosest(projectile.Center, 1, 1); + projectile.ai[0] += 1f; + if (projectile.ai[0] < 360f) + { + float scaleFactor2 = projectile.velocity.Length(); + Vector2 vector11 = Main.player[num103].Center - projectile.Center; + vector11.Normalize(); + vector11 *= scaleFactor2; + projectile.velocity = (projectile.velocity * 24f + vector11) / 25f; + projectile.velocity.Normalize(); + projectile.velocity *= scaleFactor2; + } + } + if (projectile.velocity.Length() < 18f) + { + projectile.velocity *= 1.02f; + } + } + + public override Color? GetAlpha(Color lightColor) + { + if (projectile.alpha < 200) + { + return new Color(255 - projectile.alpha, 255 - projectile.alpha, 255 - projectile.alpha, 0); + } + return Color.Transparent; + } + } +} \ No newline at end of file diff --git a/Projectiles/Boss/DestroyerHomingLaser.png b/Projectiles/Boss/DestroyerHomingLaser.png new file mode 100644 index 0000000000..44079c3e9e Binary files /dev/null and b/Projectiles/Boss/DestroyerHomingLaser.png differ diff --git a/Projectiles/Boss/DeusMine.cs b/Projectiles/Boss/DeusMine.cs index db2f9e4fda..8f91d73a03 100644 --- a/Projectiles/Boss/DeusMine.cs +++ b/Projectiles/Boss/DeusMine.cs @@ -101,7 +101,7 @@ namespace CalamityMod.Projectiles.Boss public override void OnHitPlayer(Player target, int damage, bool crit) { - target.AddBuff(mod.BuffType("GodSlayerInferno"), 120); + target.AddBuff(mod.BuffType("GodSlayerInferno"), 240); } } } \ No newline at end of file diff --git a/Projectiles/Boss/DoGFire.cs b/Projectiles/Boss/DoGFire.cs index 7c7cabe99f..64ab6f80de 100644 --- a/Projectiles/Boss/DoGFire.cs +++ b/Projectiles/Boss/DoGFire.cs @@ -115,9 +115,9 @@ namespace CalamityMod.Projectiles.Boss public override void OnHitPlayer(Player target, int damage, bool crit) { - target.AddBuff(mod.BuffType("GodSlayerInferno"), 420); - target.AddBuff(BuffID.Frostburn, 420, true); - target.AddBuff(BuffID.Darkness, 420, true); + target.AddBuff(mod.BuffType("GodSlayerInferno"), 600); + target.AddBuff(BuffID.Frostburn, 600, true); + target.AddBuff(BuffID.Darkness, 600, true); } } } \ No newline at end of file diff --git a/Projectiles/Boss/FlareDust.cs b/Projectiles/Boss/FlareDust.cs index 73600854a1..6497f7f84f 100644 --- a/Projectiles/Boss/FlareDust.cs +++ b/Projectiles/Boss/FlareDust.cs @@ -46,11 +46,6 @@ namespace CalamityMod.Projectiles.Boss Lighting.AddLight(projectile.Center, ((255 - projectile.alpha) * 0.5f) / 255f, ((255 - projectile.alpha) * 0.5f) / 255f, ((255 - projectile.alpha) * 0f) / 255f); } - public override void OnHitPlayer(Player target, int damage, bool crit) - { - target.AddBuff(mod.BuffType("HolyLight"), 120); - } - public override Color? GetAlpha(Color lightColor) { return new Color(255, Main.DiscoG, 53, projectile.alpha); diff --git a/Projectiles/Boss/FlareDust2.cs b/Projectiles/Boss/FlareDust2.cs index adc1ec182d..c6416763fb 100644 --- a/Projectiles/Boss/FlareDust2.cs +++ b/Projectiles/Boss/FlareDust2.cs @@ -48,11 +48,6 @@ namespace CalamityMod.Projectiles.Boss Lighting.AddLight(projectile.Center, ((255 - projectile.alpha) * 0.5f) / 255f, ((255 - projectile.alpha) * 0.5f) / 255f, ((255 - projectile.alpha) * 0f) / 255f); } - public override void OnHitPlayer(Player target, int damage, bool crit) - { - target.AddBuff(mod.BuffType("HolyLight"), 120); - } - public override Color? GetAlpha(Color lightColor) { return new Color(255, Main.DiscoG, 53, projectile.alpha); diff --git a/Projectiles/Boss/FrostMist.cs b/Projectiles/Boss/FrostMist.cs index 44bb6ddaaa..eba02dc485 100644 --- a/Projectiles/Boss/FrostMist.cs +++ b/Projectiles/Boss/FrostMist.cs @@ -103,13 +103,10 @@ namespace CalamityMod.Projectiles.Boss projectile.velocity.Normalize(); projectile.velocity *= scaleFactor2; } - if (projectile.ai[0] < 0f) - { - if (projectile.velocity.Length() < 18f) - { - projectile.velocity *= 1.02f; - } - } + if (projectile.velocity.Length() < 18f) + { + projectile.velocity *= 1.02f; + } projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f; Lighting.AddLight(projectile.Center, ((255 - projectile.alpha) * 0f) / 255f, ((255 - projectile.alpha) * 0.35f) / 255f, ((255 - projectile.alpha) * 0.35f) / 255f); if (Main.rand.Next(3) == 0) @@ -129,7 +126,9 @@ namespace CalamityMod.Projectiles.Boss public override void OnHitPlayer(Player target, int damage, bool crit) { - target.AddBuff(BuffID.Frostburn, 150, true); + target.AddBuff(BuffID.Frostburn, 240, true); + target.AddBuff(BuffID.Chilled, 120, true); + target.AddBuff(BuffID.Frozen, 30, true); } } } \ No newline at end of file diff --git a/Projectiles/Boss/GreatSandBlast.cs b/Projectiles/Boss/GreatSandBlast.cs new file mode 100644 index 0000000000..72e0e9a752 --- /dev/null +++ b/Projectiles/Boss/GreatSandBlast.cs @@ -0,0 +1,74 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Boss +{ + public class GreatSandBlast : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Great Sand Blast"); + } + + public override void SetDefaults() + { + projectile.width = 10; + projectile.height = 10; + projectile.hostile = true; + projectile.tileCollide = false; + projectile.penetrate = 1; + projectile.timeLeft = 300; + projectile.aiStyle = 1; + projectile.alpha = 255; + } + + public override void AI() + { + projectile.tileCollide = projectile.timeLeft < 240; + projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f; + projectile.localAI[0] += 1f; + if (projectile.localAI[0] > 4f) + { + projectile.alpha -= 50; + if (projectile.alpha < 0) + { + projectile.alpha = 0; + } + int num469 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 85, 0f, 0f, 100, default(Color), 1f); + Main.dust[num469].noGravity = true; + Main.dust[num469].velocity *= 0f; + } + } + + public override void Kill(int timeLeft) + { + Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 14); + projectile.position = projectile.Center; + projectile.width = (projectile.height = 20); + projectile.position.X = projectile.position.X - (float)(projectile.width / 2); + projectile.position.Y = projectile.position.Y - (float)(projectile.height / 2); + int num226 = 36; + for (int num227 = 0; num227 < num226; num227++) + { + Vector2 vector6 = Vector2.Normalize(projectile.velocity) * new Vector2((float)projectile.width / 2f, (float)projectile.height) * 0.75f; + vector6 = vector6.RotatedBy((double)((float)(num227 - (num226 / 2 - 1)) * 6.28318548f / (float)num226), default(Vector2)) + projectile.Center; + Vector2 vector7 = vector6 - projectile.Center; + int num228 = Dust.NewDust(vector6 + vector7, 0, 0, 85, vector7.X * 1.5f, vector7.Y * 1.5f, 100, default(Color), 1.2f); + Main.dust[num228].noGravity = true; + Main.dust[num228].noLight = true; + Main.dust[num228].velocity = vector7; + } + projectile.Damage(); + } + + public override void OnHitPlayer(Player target, int damage, bool crit) + { + target.velocity.X *= 0.5f; + target.velocity.Y *= 0.5f; + } + } +} \ No newline at end of file diff --git a/Projectiles/Boss/GreatSandBlast.png b/Projectiles/Boss/GreatSandBlast.png new file mode 100644 index 0000000000..2392a80f7b Binary files /dev/null and b/Projectiles/Boss/GreatSandBlast.png differ diff --git a/Projectiles/Boss/HiveBombGoliath.cs b/Projectiles/Boss/HiveBombGoliath.cs index 30fedd4532..ec2d6832ca 100644 --- a/Projectiles/Boss/HiveBombGoliath.cs +++ b/Projectiles/Boss/HiveBombGoliath.cs @@ -161,7 +161,7 @@ namespace CalamityMod.Projectiles.Boss public override void OnHitPlayer(Player target, int damage, bool crit) { - target.AddBuff(mod.BuffType("Plague"), 500); + target.AddBuff(mod.BuffType("Plague"), 300); } } } \ No newline at end of file diff --git a/Projectiles/Boss/HolyBlast.cs b/Projectiles/Boss/HolyBlast.cs index 25a2ab12be..ad57d2e497 100644 --- a/Projectiles/Boss/HolyBlast.cs +++ b/Projectiles/Boss/HolyBlast.cs @@ -120,7 +120,7 @@ namespace CalamityMod.Projectiles.Boss public override void OnHitPlayer(Player target, int damage, bool crit) { - target.AddBuff(mod.BuffType("HolyLight"), 120); + target.AddBuff(mod.BuffType("HolyLight"), 240); } } } \ No newline at end of file diff --git a/Projectiles/Boss/HolyBomb.cs b/Projectiles/Boss/HolyBomb.cs index c5ea78385f..40b5c47581 100644 --- a/Projectiles/Boss/HolyBomb.cs +++ b/Projectiles/Boss/HolyBomb.cs @@ -107,7 +107,7 @@ namespace CalamityMod.Projectiles.Boss public override void OnHitPlayer(Player target, int damage, bool crit) { - target.AddBuff(mod.BuffType("HolyLight"), 120); + target.AddBuff(mod.BuffType("HolyLight"), 180); } } } \ No newline at end of file diff --git a/Projectiles/Boss/HolyBurnOrb.cs b/Projectiles/Boss/HolyBurnOrb.cs index 1c08ae4feb..84ccac7ce6 100644 --- a/Projectiles/Boss/HolyBurnOrb.cs +++ b/Projectiles/Boss/HolyBurnOrb.cs @@ -74,7 +74,6 @@ namespace CalamityMod.Projectiles.Boss NetMessage.SendData(66, -1, -1, null, num487, (float)num492, 0f, 0f, 0, 0, 0); projectile.Kill(); } - return; } public override void Kill(int timeLeft) diff --git a/Projectiles/Boss/HolyShot.cs b/Projectiles/Boss/HolyShot.cs index e420dcadf3..2e34f00c93 100644 --- a/Projectiles/Boss/HolyShot.cs +++ b/Projectiles/Boss/HolyShot.cs @@ -59,5 +59,10 @@ namespace CalamityMod.Projectiles.Boss } return new Color(255, 255, 255, 100); } + + public override void OnHitPlayer(Player target, int damage, bool crit) + { + target.AddBuff(mod.BuffType("HolyLight"), 120); + } } } \ No newline at end of file diff --git a/Projectiles/Boss/HolySpear.cs b/Projectiles/Boss/HolySpear.cs index 4c91746fe1..a5ea7871d0 100644 --- a/Projectiles/Boss/HolySpear.cs +++ b/Projectiles/Boss/HolySpear.cs @@ -88,5 +88,10 @@ namespace CalamityMod.Projectiles.Boss } return new Color(255, 255, 255, 100); } + + public override void OnHitPlayer(Player target, int damage, bool crit) + { + target.AddBuff(mod.BuffType("HolyLight"), 120); + } } } \ No newline at end of file diff --git a/Projectiles/Boss/IceBlast.cs b/Projectiles/Boss/IceBlast.cs index 28f114fe6e..c260c35c47 100644 --- a/Projectiles/Boss/IceBlast.cs +++ b/Projectiles/Boss/IceBlast.cs @@ -69,10 +69,9 @@ namespace CalamityMod.Projectiles.Boss public override void OnHitPlayer(Player target, int damage, bool crit) { - if (Main.rand.Next(20) == 0) - { - target.AddBuff(47, 60, true); - } + target.AddBuff(BuffID.Frostburn, 90, true); + target.AddBuff(BuffID.Chilled, 60, true); + target.AddBuff(BuffID.Frozen, 30, true); } public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) diff --git a/Projectiles/Boss/IceBomb.cs b/Projectiles/Boss/IceBomb.cs index 48dddd0290..9ef110e3b7 100644 --- a/Projectiles/Boss/IceBomb.cs +++ b/Projectiles/Boss/IceBomb.cs @@ -59,7 +59,9 @@ namespace CalamityMod.Projectiles.Boss public override void OnHitPlayer(Player target, int damage, bool crit) { - target.AddBuff(mod.BuffType("GlacialState"), 60); + target.AddBuff(BuffID.Frostburn, 120, true); + target.AddBuff(BuffID.Chilled, 90, true); + target.AddBuff(mod.BuffType("GlacialState"), 60); } } } \ No newline at end of file diff --git a/Projectiles/Boss/IceRain.cs b/Projectiles/Boss/IceRain.cs index 504f59919f..3e336646aa 100644 --- a/Projectiles/Boss/IceRain.cs +++ b/Projectiles/Boss/IceRain.cs @@ -69,10 +69,8 @@ namespace CalamityMod.Projectiles.Boss public override void OnHitPlayer(Player target, int damage, bool crit) { - if (Main.rand.Next(20) == 0) - { - target.AddBuff(47, 60, true); - } + target.AddBuff(BuffID.Frostburn, 60, true); + target.AddBuff(BuffID.Chilled, 30, true); } } } \ No newline at end of file diff --git a/Projectiles/Boss/IchorShot.cs b/Projectiles/Boss/IchorShot.cs index feb028648d..232dda5c57 100644 --- a/Projectiles/Boss/IchorShot.cs +++ b/Projectiles/Boss/IchorShot.cs @@ -46,7 +46,7 @@ namespace CalamityMod.Projectiles.Boss public override void OnHitPlayer(Player target, int damage, bool crit) { - target.AddBuff(BuffID.Ichor, 200); + target.AddBuff(BuffID.Ichor, 180); } } } \ No newline at end of file diff --git a/Projectiles/Boss/MoltenBlast.cs b/Projectiles/Boss/MoltenBlast.cs index 0fde165cd3..e71f4aa5dd 100644 --- a/Projectiles/Boss/MoltenBlast.cs +++ b/Projectiles/Boss/MoltenBlast.cs @@ -126,7 +126,7 @@ namespace CalamityMod.Projectiles.Boss public override void OnHitPlayer(Player target, int damage, bool crit) { - target.AddBuff(mod.BuffType("HolyLight"), 120); + target.AddBuff(mod.BuffType("HolyLight"), 180); } } } \ No newline at end of file diff --git a/Projectiles/Boss/MoltenBlob.cs b/Projectiles/Boss/MoltenBlob.cs index a4e4d3efd3..d5d588b421 100644 --- a/Projectiles/Boss/MoltenBlob.cs +++ b/Projectiles/Boss/MoltenBlob.cs @@ -100,7 +100,7 @@ namespace CalamityMod.Projectiles.Boss public override void OnHitPlayer(Player target, int damage, bool crit) { - target.AddBuff(mod.BuffType("HolyLight"), 120); + target.AddBuff(mod.BuffType("HolyLight"), 90); } } } \ No newline at end of file diff --git a/Projectiles/Boss/PlagueStingerGoliath.cs b/Projectiles/Boss/PlagueStingerGoliath.cs index cf7f2b1afd..60526d6800 100644 --- a/Projectiles/Boss/PlagueStingerGoliath.cs +++ b/Projectiles/Boss/PlagueStingerGoliath.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Projectiles.Boss public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { - target.AddBuff(mod.BuffType("Plague"), 240); + target.AddBuff(mod.BuffType("Plague"), 180); } public override void PostDraw(SpriteBatch spriteBatch, Color lightColor) diff --git a/Projectiles/Boss/PlagueStingerGoliathV2.cs b/Projectiles/Boss/PlagueStingerGoliathV2.cs index 49c7a68a6f..c5e9800463 100644 --- a/Projectiles/Boss/PlagueStingerGoliathV2.cs +++ b/Projectiles/Boss/PlagueStingerGoliathV2.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Projectiles.Boss public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { - target.AddBuff(mod.BuffType("Plague"), 240); + target.AddBuff(mod.BuffType("Plague"), 180); } public override void PostDraw(SpriteBatch spriteBatch, Color lightColor) diff --git a/Projectiles/Boss/ProfanedSpear.cs b/Projectiles/Boss/ProfanedSpear.cs index 7fbf5bb5a0..3571bc2572 100644 --- a/Projectiles/Boss/ProfanedSpear.cs +++ b/Projectiles/Boss/ProfanedSpear.cs @@ -67,5 +67,10 @@ namespace CalamityMod.Projectiles.Boss { return new Color(250, 150, 0, projectile.alpha); } + + public override void OnHitPlayer(Player target, int damage, bool crit) + { + target.AddBuff(mod.BuffType("HolyLight"), 120); + } } } \ No newline at end of file diff --git a/Projectiles/Boss/ProvidenceHolyRay.cs b/Projectiles/Boss/ProvidenceHolyRay.cs index ef427c4985..d35a88017b 100644 --- a/Projectiles/Boss/ProvidenceHolyRay.cs +++ b/Projectiles/Boss/ProvidenceHolyRay.cs @@ -47,10 +47,6 @@ namespace CalamityMod.Projectiles.Boss { projectile.velocity = -Vector2.UnitY; } - if (projectile.localAI[0] == 0f) - { - Main.PlaySound(29, (int)projectile.position.X, (int)projectile.position.Y, 104, 1f, 0f); - } float num801 = 1f; projectile.localAI[0] += 1f; if (projectile.localAI[0] >= 180f) @@ -176,5 +172,10 @@ namespace CalamityMod.Projectiles.Boss } return false; } + + public override void OnHitPlayer(Player target, int damage, bool crit) + { + target.AddBuff(mod.BuffType("HolyLight"), 300); + } } } \ No newline at end of file diff --git a/Projectiles/Boss/SandPoisonCloud.cs b/Projectiles/Boss/SandPoisonCloud.cs index 5059018565..0010d9f902 100644 --- a/Projectiles/Boss/SandPoisonCloud.cs +++ b/Projectiles/Boss/SandPoisonCloud.cs @@ -71,7 +71,7 @@ namespace CalamityMod.Projectiles.Boss public override void OnHitPlayer(Player target, int damage, bool crit) { - target.AddBuff(BuffID.Venom, 240); + target.AddBuff(BuffID.Venom, 300); } } } \ No newline at end of file diff --git a/Projectiles/Boss/ScavengerLaser.cs b/Projectiles/Boss/ScavengerLaser.cs index f771277af9..ef8774d179 100644 --- a/Projectiles/Boss/ScavengerLaser.cs +++ b/Projectiles/Boss/ScavengerLaser.cs @@ -143,9 +143,13 @@ namespace CalamityMod.Projectiles.Boss Main.dust[num805].noGravity = true; } projectile.rotation = projectile.velocity.ToRotation() + 1.57079637f; - return; } - + + public override void OnHitPlayer(Player target, int damage, bool crit) + { + target.AddBuff(BuffID.OnFire, 180); + } + public override Color? GetAlpha(Color lightColor) { return new Color(255, 50, 50, projectile.alpha); diff --git a/Projectiles/Boss/ShadeNimbusHostile.cs b/Projectiles/Boss/ShadeNimbusHostile.cs index 151e46828c..5dd5f04458 100644 --- a/Projectiles/Boss/ShadeNimbusHostile.cs +++ b/Projectiles/Boss/ShadeNimbusHostile.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Projectiles.Boss } } projectile.ai[1] += 1f; - if (projectile.ai[1] >= 7200f) + if (projectile.ai[1] >= 300f) { projectile.alpha += 5; if (projectile.alpha > 255) @@ -58,33 +58,6 @@ namespace CalamityMod.Projectiles.Boss Projectile.NewProjectile((float)num414, (float)num415, 0f, 5f, mod.ProjectileType("ShaderainHostile"), projectile.damage, 0f, Main.myPlayer, 0f, 0f); } } - projectile.localAI[0] += 1f; - if (projectile.localAI[0] >= 10f) - { - projectile.localAI[0] = 0f; - int num416 = 0; - int num417 = 0; - float num418 = 0f; - int num419 = projectile.type; - for (int num420 = 0; num420 < 1000; num420++) - { - if (Main.projectile[num420].active && Main.projectile[num420].owner == projectile.owner && Main.projectile[num420].type == num419 && Main.projectile[num420].ai[1] < 3600f) - { - num416++; - if (Main.projectile[num420].ai[1] > num418) - { - num417 = num420; - num418 = Main.projectile[num420].ai[1]; - } - } - } - if (num416 > 2) - { - Main.projectile[num417].netUpdate = true; - Main.projectile[num417].ai[1] = 36000f; - return; - } - } } } } \ No newline at end of file diff --git a/Projectiles/Boss/ShaderainHostile.cs b/Projectiles/Boss/ShaderainHostile.cs index 0f4ffbf595..b7f5bc3c90 100644 --- a/Projectiles/Boss/ShaderainHostile.cs +++ b/Projectiles/Boss/ShaderainHostile.cs @@ -28,7 +28,6 @@ namespace CalamityMod.Projectiles.Boss public override void AI() { projectile.alpha = 50; - return; } public override void Kill(int timeLeft) diff --git a/Projectiles/Boss/SirenSong.cs b/Projectiles/Boss/SirenSong.cs index 0e78f07437..39b07a5b75 100644 --- a/Projectiles/Boss/SirenSong.cs +++ b/Projectiles/Boss/SirenSong.cs @@ -52,7 +52,7 @@ namespace CalamityMod.Projectiles.Boss public override void OnHitPlayer(Player target, int damage, bool crit) { - target.AddBuff(BuffID.Confused, 60); + target.AddBuff(BuffID.Confused, 120); } } } \ No newline at end of file diff --git a/Projectiles/BrackishFlask.cs b/Projectiles/BrackishFlask.cs index 8457a3f78e..e1136599cd 100644 --- a/Projectiles/BrackishFlask.cs +++ b/Projectiles/BrackishFlask.cs @@ -19,7 +19,6 @@ namespace CalamityMod.Projectiles projectile.width = 25; projectile.height = 25; projectile.friendly = true; - projectile.thrown = true; projectile.penetrate = 1; projectile.aiStyle = 2; projectile.timeLeft = 180; diff --git a/Projectiles/BrackishWater.cs b/Projectiles/BrackishWater.cs index fc80288203..da20b36c35 100644 --- a/Projectiles/BrackishWater.cs +++ b/Projectiles/BrackishWater.cs @@ -22,7 +22,6 @@ namespace CalamityMod.Projectiles projectile.ignoreWater = true; projectile.penetrate = 1; projectile.timeLeft = 60; - projectile.thrown = true; } public override void AI() diff --git a/Projectiles/BrackishWaterBlast.cs b/Projectiles/BrackishWaterBlast.cs index 189f57fee0..3ea4831deb 100644 --- a/Projectiles/BrackishWaterBlast.cs +++ b/Projectiles/BrackishWaterBlast.cs @@ -23,7 +23,6 @@ namespace CalamityMod.Projectiles projectile.tileCollide = false; projectile.penetrate = -1; projectile.timeLeft = 60; - projectile.thrown = true; } public override void AI() diff --git a/Projectiles/Brimblade.cs b/Projectiles/Brimblade.cs index 73f78dff45..ff10497229 100644 --- a/Projectiles/Brimblade.cs +++ b/Projectiles/Brimblade.cs @@ -19,7 +19,6 @@ namespace CalamityMod.Projectiles projectile.width = 26; projectile.height = 26; projectile.friendly = true; - projectile.thrown = true; projectile.penetrate = -1; projectile.aiStyle = 3; projectile.timeLeft = 300; diff --git a/Projectiles/Brimblade2.cs b/Projectiles/Brimblade2.cs index 3d0374aaf7..b553f77540 100644 --- a/Projectiles/Brimblade2.cs +++ b/Projectiles/Brimblade2.cs @@ -19,7 +19,6 @@ namespace CalamityMod.Projectiles projectile.width = 26; projectile.height = 26; projectile.friendly = true; - projectile.thrown = true; projectile.penetrate = 1; projectile.aiStyle = 3; projectile.timeLeft = 300; diff --git a/Projectiles/BrimstoneHellfireballFriendly.cs b/Projectiles/BrimstoneHellfireballFriendly.cs index ac5215b39e..a2cd52523a 100644 --- a/Projectiles/BrimstoneHellfireballFriendly.cs +++ b/Projectiles/BrimstoneHellfireballFriendly.cs @@ -24,11 +24,7 @@ namespace CalamityMod.Projectiles projectile.penetrate = -1; projectile.magic = true; projectile.usesLocalNPCImmunity = true; - projectile.localNPCHitCooldown = 20 - - (NPC.downedGolemBoss ? 5 : 0) - - (NPC.downedMoonlord ? 5 : 0) - - (CalamityWorld.downedDoG ? 4 : 0) - - (CalamityWorld.downedYharon ? 3 : 0); + projectile.localNPCHitCooldown = 15; } public override void AI() diff --git a/Projectiles/Calamari.cs b/Projectiles/Calamari.cs index 32d8ddb136..25c14c6609 100644 --- a/Projectiles/Calamari.cs +++ b/Projectiles/Calamari.cs @@ -271,7 +271,7 @@ namespace CalamityMod.Projectiles { num21 = 13.5f; //9 } - if (num23 < 100f && projectile.ai[0] == 1f) + if (num23 < 400f && projectile.ai[0] == 1f) { projectile.ai[0] = 0f; projectile.netUpdate = true; diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 1f32d8b5f8..94b57761bb 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -10,18 +10,138 @@ using Terraria.ModLoader; using CalamityMod; using CalamityMod.NPCs.TheDevourerofGods; using CalamityMod.Items.Armor; +using CalamityMod.Items.CalamityCustomThrowingDamage; namespace CalamityMod.Projectiles { public class CalamityGlobalProjectile : GlobalProjectile { - public static int counter = 0; + #region InstancePerEntity + public override bool InstancePerEntity + { + get + { + return true; + } + } + #endregion - public static int counter2 = 0; + public float spawnedPlayerMinionDamageValue = 1f; + + public int spawnedPlayerMinionProjectileDamageValue = 0; + + public bool setPlayerMinionDamageValue = true; + + public int counter = 0; + + public int counter2 = 0; #region AI public override void AI(Projectile projectile) { + if (setPlayerMinionDamageValue) + { + setPlayerMinionDamageValue = false; + spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; + spawnedPlayerMinionProjectileDamageValue = projectile.damage; + } + if (projectile.type == ProjectileID.HallowStar) + { + if (projectile.ai[0] == 1f) + { + projectile.ranged = false; + projectile.melee = true; + } + } + else if (projectile.type == ProjectileID.Meteor1 || projectile.type == ProjectileID.Meteor2 || projectile.type == ProjectileID.Meteor3) + { + if (projectile.ai[0] == 1f) + { + projectile.magic = false; + projectile.melee = true; + projectile.tileCollide = false; + } + } + else if (projectile.type == ProjectileID.GoldenShowerFriendly) + { + if (projectile.ai[0] == 1f) + { + projectile.magic = false; + projectile.melee = true; + } + } + else if (projectile.type == ProjectileID.MiniSharkron) + { + if (projectile.ai[0] == 1f) + projectile.melee = true; + else if (projectile.ai[0] == 2f) + projectile.ranged = true; + } + else if (projectile.type == ProjectileID.LostSoulFriendly) + { + if (projectile.ai[0] == 1f) + { + projectile.magic = false; + projectile.ranged = true; + } + } + else if (projectile.type == ProjectileID.LunarFlare) + { + if (Main.player[projectile.owner].inventory[Main.player[projectile.owner].selectedItem].type == mod.ItemType("StellarStriker")) + { + projectile.magic = false; + projectile.melee = true; + } + } + else if (projectile.type == ProjectileID.RubyBolt || projectile.type == ProjectileID.SapphireBolt || projectile.type == ProjectileID.AmethystBolt) + { + if (projectile.ai[0] == 1f) + { + projectile.magic = false; + projectile.melee = true; + } + } + else if (projectile.type == ProjectileID.SolarWhipSwordExplosion) + { + if (Main.player[projectile.owner].inventory[Main.player[projectile.owner].selectedItem].type == mod.ItemType("TruePaladinsHammer") || + Main.player[projectile.owner].inventory[Main.player[projectile.owner].selectedItem].type == mod.ItemType("FlameScythe")) + { + projectile.melee = false; + } + else if (Main.player[projectile.owner].inventory[Main.player[projectile.owner].selectedItem].ranged) + { + projectile.melee = false; + projectile.ranged = true; + } + else if (Main.player[projectile.owner].inventory[Main.player[projectile.owner].selectedItem].type == mod.ItemType("PurgeGuzzler") || + Main.player[projectile.owner].inventory[Main.player[projectile.owner].selectedItem].type == mod.ItemType("Lazhar")) + { + projectile.melee = false; + projectile.magic = true; + } + } + else if (projectile.type == ProjectileID.GiantBee || projectile.type == ProjectileID.Bee || projectile.type == ProjectileID.Wasp) + { + if (projectile.timeLeft > 570) //all of these have a time left of 600 or 660 + { + if (Main.player[projectile.owner].inventory[Main.player[projectile.owner].selectedItem].type == mod.ItemType("PlagueKeeper")) + { + projectile.magic = false; + projectile.melee = true; + } + else if (Main.player[projectile.owner].inventory[Main.player[projectile.owner].selectedItem].type == mod.ItemType("TheSwarmer")) + { + projectile.magic = true; + } + else if (Main.player[projectile.owner].inventory[Main.player[projectile.owner].selectedItem].type == mod.ItemType("TheHive") || + Main.player[projectile.owner].inventory[Main.player[projectile.owner].selectedItem].type == mod.ItemType("Malevolence") || + Main.player[projectile.owner].inventory[Main.player[projectile.owner].selectedItem].type == ItemID.BeesKnees) + { + projectile.magic = false; + projectile.ranged = true; + } + } + } if (Main.player[projectile.owner].GetModPlayer(mod).eQuiver && projectile.ranged && projectile.friendly && CalamityMod.rangedProjectileExceptionList.TrueForAll(x => projectile.type != x)) { @@ -49,7 +169,8 @@ namespace CalamityMod.Projectiles } } } - if (Main.player[projectile.owner].GetModPlayer(mod).nanotech && projectile.thrown && projectile.friendly) + if (Main.player[projectile.owner].GetModPlayer(mod).nanotech && + CalamityMod.throwingProjectileList.Contains(projectile.type) && !projectile.melee && projectile.friendly) { counter++; if (counter >= 90) @@ -57,11 +178,13 @@ namespace CalamityMod.Projectiles counter = 0; if (projectile.owner == Main.myPlayer && Main.player[projectile.owner].ownedProjectileCounts[mod.ProjectileType("Nanotech")] < 30) { - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, mod.ProjectileType("Nanotech"), projectile.damage, 0f, projectile.owner, 0f, 0f); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, mod.ProjectileType("Nanotech"), + (int)((double)projectile.damage * 0.33), 0f, projectile.owner, 0f, 0f); } } } - if (Main.player[projectile.owner].GetModPlayer(mod).daedalusSplit && projectile.thrown && projectile.friendly) + if (Main.player[projectile.owner].GetModPlayer(mod).daedalusSplit && + CalamityMod.throwingProjectileList.Contains(projectile.type) && !projectile.melee && projectile.friendly) { counter2++; if (counter2 >= 30) @@ -78,7 +201,8 @@ namespace CalamityMod.Projectiles } value15.Normalize(); value15 *= (float)Main.rand.Next(70, 101) * 0.1f; - Projectile.NewProjectile(projectile.oldPosition.X + (float)(projectile.width / 2), projectile.oldPosition.Y + (float)(projectile.height / 2), value15.X, value15.Y, 90, (int)((double)projectile.damage * 0.25), 0f, projectile.owner, 0f, 0f); + int shard = Projectile.NewProjectile(projectile.oldPosition.X + (float)(projectile.width / 2), projectile.oldPosition.Y + (float)(projectile.height / 2), value15.X, value15.Y, 90, (int)((double)projectile.damage * 0.25), 0f, projectile.owner, 0f, 0f); + Main.projectile[shard].ranged = false; } } } @@ -119,103 +243,180 @@ namespace CalamityMod.Projectiles #region ModifyHitNPC public override void ModifyHitNPC(Projectile projectile, NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) { - if (projectile.type == mod.ProjectileType("VeriumBullet") || projectile.type == ProjectileID.ChlorophyteBullet) + if (projectile.ranged) { - damage = (int)((double)damage * 0.8); + //BULLETS + + //musket ball: base 100 + 7 = 107 + //silver: base 100 + 9 = 109 + //meteor shot: base 100 + 9 = 109 pierces once + //acceleration: base 100 + bullet damage 9 = 109 speeds up while travelling + //flash: base 100 + bullet damage 7 = 107 + (flash damage 107 * 0.25 = 26) = 133 AoE confusion + //superball: base 100 + bullet damage 6 = 106 bounces a fucking shitload of times and speeds up + //enhanced nano: base 100 + bullet damage 12 = 112 + (nanobot damage 112 * 0.3 = 33 * 2 nanobots = 66) = 178 + //crystal: base 100 + bullet damage 9 = 109 + (crystal shard damage 109 * 0.6 = 65 * 0.6 = 39 * 3 total shards = 117) = 226 + //frostspark: base 100 + bullet damage 11 = 111 + (explosion damage 111 * 0.5 = 55) = 166 + //icy: base 100 + 10 bullet damage = 110 + (ice shard damage 110 * 0.5 = 55 * 0.6 = 33 * 2 total shards = 66) = 176 + //verium: base 100 + bullet damage 8 = 108 * 0.8 = 86 homing + //chloro: base 100 + bullet damage 10 = 110 * 0.8 = 88 homing + //terra: base 100 + bullet damage 9 = 109 + (terra shard damage 109 * 0.5 = 54 * 2 total shards = 106) = 215 + //acid: base 100 + bullet damage 36 = 136 does more based on enemy defense + //hyperius: base 100 + bullet damage 21 = 121 + (hyperius second bullet damage 121 * 0.8 = 96) = 217 + //holy fire: base 100 + bullet damage 27 = 127 + (explosion damage 127 * 0.85 = 107) = 234 + + //ARROWS + //holy arrow: base 100 + arrow damage 13 = 113 + (star damage 113 * 0.5 = 56 * 0.7 = 39 * 2 total stars = 78) = 191 + //terra arrow: base 100 + arrow damage 9 = 109 + (terra arrow split damage 109 * 0.5 = 54 * 2 total arrows = 106) = 215 + //elysian arrow: base 100 + arrow damage 20 = 120 + meteor damage 120 = 240 + //napalm arrow: base 100 + arrow damage 13 = 113 + (fire shard damage 113 * 0.3 = 33 * 3 total shards = 99) = 212 + //icicle arrow: base 100 + arrow damage 14 = 114 + (ice shard damage 114 * 0.5 = 57 * 0.6 = 34 * 3 total shards = 102) = 216 + //bloodfire arrow: base 100 + arrow damage 40 = 140 but it heals so it's alright + //arctic arrow: base 100 + arrow damage 16 = 116 but it freezes enemies so it's alright + //vanquisher arrow: base 100 + arrow damage 33 = 133 + split arrow damage 93 = 226 fine for endgame arrow + switch (projectile.type) + { + case ProjectileID.CrystalShard: + damage = (int)((double)damage * 0.6); + break; + case ProjectileID.ChlorophyteBullet: + damage = (int)((double)damage * 0.8); + break; + case ProjectileID.HallowStar: + damage = (int)((double)damage * 0.7); + break; + } + if (projectile.type == mod.ProjectileType("VeriumBullet")) + { + damage = (int)((double)damage * 0.8); + } + else if (projectile.type == mod.ProjectileType("FrostsparkBullet")) + { + if (target.buffImmune[mod.BuffType("GlacialState")]) + { + damage = (int)((double)damage * 1.2); + } + } + else if (projectile.type == mod.ProjectileType("AcidBullet")) + { + int defenseAdd = (int)((double)target.defense * 0.2); //100 defense * 0.2 = 20 + damage = damage + defenseAdd; + } } - if (projectile.owner == Main.myPlayer && CalamityWorld.revenge) + if (projectile.owner == Main.myPlayer) { - if ((projectile.minion || projectile.sentry || CalamityMod.projectileMinionList.Contains(projectile.type))) + if (CalamityMod.throwingProjectileList.Contains(projectile.type) && !projectile.melee) + { + crit = (Main.rand.Next(1, 101) < CalamityCustomThrowingDamagePlayer.ModPlayer(Main.player[projectile.owner]).throwingCrit); + } + if (projectile.minion || projectile.sentry || CalamityMod.projectileMinionList.Contains(projectile.type)) { Player player = Main.player[projectile.owner]; - if (!player.inventory[player.selectedItem].summon && - (player.inventory[player.selectedItem].melee || - player.inventory[player.selectedItem].ranged || - player.inventory[player.selectedItem].magic || - player.inventory[player.selectedItem].thrown) && - player.inventory[player.selectedItem].hammer == 0 && - player.inventory[player.selectedItem].pick == 0 && - player.inventory[player.selectedItem].axe == 0) + if (player.minionDamage != spawnedPlayerMinionDamageValue) { - if (NPC.downedMoonlord) + //base stat of 120 + //test going from 120 to 240: minion damage going from 1f to 2f + //120 / 1 = 120 * 2 = 240 + //test going from 240 to 120: minion damage going from 2f to 1f + //240 / 2 = 120 * 1 = 120 + //test going from 150 to 240: minion damage going from 1.25f to 2f + //150 / 1.25 = 120 * 2 = 240 + //test going from 240 to 150: minion damage going from 2f to 1.25f + //240 / 2f = 120 * 1.25 = 150 + float damage2 = (((float)spawnedPlayerMinionProjectileDamageValue / spawnedPlayerMinionDamageValue) * player.minionDamage); + damage = Main.DamageVar(damage2); + } + if (CalamityWorld.revenge) + { + if (!player.inventory[player.selectedItem].summon && + (player.inventory[player.selectedItem].melee || + player.inventory[player.selectedItem].ranged || + player.inventory[player.selectedItem].magic || + player.inventory[player.selectedItem].thrown) && + player.inventory[player.selectedItem].hammer == 0 && + player.inventory[player.selectedItem].pick == 0 && + player.inventory[player.selectedItem].axe == 0) { - damage = (int)((double)damage * 0.33); + if (NPC.downedMoonlord) + { + damage = (int)((double)damage * 0.33); + } + else if (Main.hardMode) + { + damage = (int)((double)damage * 0.66); + } + else + { + damage = (int)((double)damage * 0.9); + } } - else if (Main.hardMode) + else if (!NPC.downedMoonlord) { - damage = (int)((double)damage * 0.66); - } - else - { - damage = (int)((double)damage * 0.9); + damage = (int)((double)damage * 1.1); } } - else if (!NPC.downedMoonlord) + } + if (Main.player[projectile.owner].GetModPlayer(mod).screwdriver) + { + if (projectile.penetrate > 1 || projectile.penetrate == -1) { damage = (int)((double)damage * 1.1); } } - } - if (projectile.owner == Main.myPlayer && Main.player[projectile.owner].GetModPlayer(mod).screwdriver) - { - if (projectile.penetrate > 1 || projectile.penetrate == -1) + if (Main.player[projectile.owner].GetModPlayer(mod).sPower) { - damage = (int)((double)damage * 1.1); + if (projectile.minion || CalamityMod.projectileMinionList.Contains(projectile.type)) + { + damage = (int)((double)damage * 1.1); + } + } + if (Main.player[projectile.owner].GetModPlayer(mod).rageMode && + Main.player[projectile.owner].GetModPlayer(mod).adrenalineMode) + { + if (projectile.minion || CalamityMod.projectileMinionList.Contains(projectile.type)) + { + damage = (int)((double)damage * (CalamityWorld.death ? 13.0 : 4.0)); + } + } + else if (Main.player[projectile.owner].GetModPlayer(mod).rageMode) + { + if (projectile.minion || CalamityMod.projectileMinionList.Contains(projectile.type)) + { + double rageDamageBoost = 0.0 + + (Main.player[projectile.owner].GetModPlayer(mod).rageBoostOne ? (CalamityWorld.death ? 0.8 : 0.2) : 0.0) + //4.8 or 1.2 + (Main.player[projectile.owner].GetModPlayer(mod).rageBoostTwo ? (CalamityWorld.death ? 0.8 : 0.2) : 0.0) + //5.6 or 1.4 + (Main.player[projectile.owner].GetModPlayer(mod).rageBoostThree ? (CalamityWorld.death ? 0.8 : 0.2) : 0.0); //6.4 or 1.6 + double rageDamage = (CalamityWorld.death ? 5.0 : 2.0) + rageDamageBoost; + damage = (int)((double)damage * rageDamage); + } + } + else if (Main.player[projectile.owner].GetModPlayer(mod).adrenalineMode) + { + if (projectile.minion || CalamityMod.projectileMinionList.Contains(projectile.type)) + { + damage = (int)((double)damage * ((CalamityWorld.death ? 11.0 : 3.5) * Main.player[projectile.owner].GetModPlayer(mod).adrenalineDmgMult)); + } + } + if (Main.player[projectile.owner].GetModPlayer(mod).uberBees && + (projectile.type == ProjectileID.GiantBee || projectile.type == ProjectileID.Bee || projectile.type == ProjectileID.Wasp)) + { + if (Main.player[projectile.owner].inventory[Main.player[projectile.owner].selectedItem].type == mod.ItemType("TheSwarmer") || + Main.player[projectile.owner].inventory[Main.player[projectile.owner].selectedItem].type == mod.ItemType("PlagueKeeper")) + { + damage = damage + Main.rand.Next(10, 21); + } + else + { + damage = damage + Main.rand.Next(70, 101); + projectile.penetrate = 1; + } } } - if (projectile.owner == Main.myPlayer && Main.player[projectile.owner].GetModPlayer(mod).sPower) - { - if (projectile.minion || CalamityMod.projectileMinionList.Contains(projectile.type)) - { - damage = (int)((double)damage * 1.1); - } - } - if (projectile.owner == Main.myPlayer && Main.player[projectile.owner].GetModPlayer(mod).rageMode && - Main.player[projectile.owner].GetModPlayer(mod).adrenalineMode) - { - if (projectile.minion || CalamityMod.projectileMinionList.Contains(projectile.type)) - { - damage = (int)((double)damage * (CalamityWorld.death ? 13.0 : 4.0)); - } - } - else if (projectile.owner == Main.myPlayer && Main.player[projectile.owner].GetModPlayer(mod).rageMode) - { - if (projectile.minion || CalamityMod.projectileMinionList.Contains(projectile.type)) - { - double rageDamageBoost = 0.0 + - (Main.player[projectile.owner].GetModPlayer(mod).rageBoostOne ? (CalamityWorld.death ? 0.8 : 0.2) : 0.0) + //4.8 or 1.2 - (Main.player[projectile.owner].GetModPlayer(mod).rageBoostTwo ? (CalamityWorld.death ? 0.8 : 0.2) : 0.0) + //5.6 or 1.4 - (Main.player[projectile.owner].GetModPlayer(mod).rageBoostThree ? (CalamityWorld.death ? 0.8 : 0.2) : 0.0); //6.4 or 1.6 - double rageDamage = (CalamityWorld.death ? 5.0 : 2.0) + rageDamageBoost; - damage = (int)((double)damage * rageDamage); - } - } - else if (projectile.owner == Main.myPlayer && Main.player[projectile.owner].GetModPlayer(mod).adrenalineMode) - { - if (projectile.minion || CalamityMod.projectileMinionList.Contains(projectile.type)) - { - damage = (int)((double)damage * ((CalamityWorld.death ? 11.0 : 3.5) * Main.player[projectile.owner].GetModPlayer(mod).adrenalineDmgMult)); - } - } - if (projectile.owner == Main.myPlayer && Main.player[projectile.owner].GetModPlayer(mod).uberBees && - (projectile.type == 566 || projectile.type == 181 || projectile.type == 189)) - { - if (Main.player[projectile.owner].inventory[Main.player[projectile.owner].selectedItem].type == mod.ItemType("TheSwarmer")) - { - damage = damage + Main.rand.Next(10, 21); - } - else - { - damage = damage + Main.rand.Next(70, 101); - projectile.penetrate = 1; - } - } if (Main.player[projectile.owner].GetModPlayer(mod).astralStarRain && crit && Main.player[projectile.owner].GetModPlayer(mod).astralStarRainCooldown <= 0) { if (projectile.owner == Main.myPlayer) { - Main.player[projectile.owner].GetModPlayer(mod).astralStarRainCooldown = 120; + Main.player[projectile.owner].GetModPlayer(mod).astralStarRainCooldown = 60; for (int n = 0; n < 3; n++) { float x = target.position.X + (float)Main.rand.Next(-400, 400); @@ -255,31 +456,35 @@ namespace CalamityMod.Projectiles { if (projectile.owner == Main.myPlayer) { - if (target.type == NPCID.TargetDummy) - { - return; - } - if (Main.player[projectile.owner].GetModPlayer(mod).abyssalAmulet) + if (projectile.magic && Main.player[projectile.owner].ghostHeal) { - target.AddBuff(mod.BuffType("CrushDepth"), 180); + float num = 0.2f; + num -= (float)projectile.numHits * 0.05f; + if (num < 0f) + { + num = 0f; + } + float num2 = (float)damage * num; + Main.player[Main.myPlayer].lifeSteal -= num2; } - if (Main.player[projectile.owner].GetModPlayer(mod).dsSetBonus) + if (projectile.type == ProjectileID.VampireKnife) { - target.AddBuff(mod.BuffType("DemonFlames"), 180); + float num = (float)damage * 0.075f; + if (num < 0f) + { + num = 0f; + } + Main.player[Main.myPlayer].lifeSteal -= num; } - if (Main.player[projectile.owner].GetModPlayer(mod).frostFlare) - { - target.AddBuff(BuffID.Frostburn, 360); - } if (Main.player[projectile.owner].GetModPlayer(mod).uberBees && (projectile.type == 566 || projectile.type == 181 || projectile.type == 189)) { target.AddBuff(mod.BuffType("Plague"), 360); } if (Main.player[projectile.owner].GetModPlayer(mod).alchFlask && - (projectile.magic || projectile.thrown || projectile.melee || projectile.minion || projectile.ranged)) + (projectile.magic || CalamityMod.throwingProjectileList.Contains(projectile.type) || projectile.melee || projectile.minion || projectile.ranged) && + Main.player[projectile.owner].ownedProjectileCounts[mod.ProjectileType("PlagueSeeker")] < 6) { - target.AddBuff(mod.BuffType("Plague"), 120); int plague = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, mod.ProjectileType("PlagueSeeker"), (int)((double)projectile.damage * 0.25), 0f, projectile.owner, 0f, 0f); Main.projectile[plague].melee = false; } @@ -304,7 +509,7 @@ namespace CalamityMod.Projectiles { return; } - Main.player[Main.myPlayer].lifeSteal -= num12; + Main.player[Main.myPlayer].lifeSteal -= num12 * 2f; float num13 = 0f; int num14 = projectile.owner; for (int i = 0; i < 255; i++) @@ -338,7 +543,7 @@ namespace CalamityMod.Projectiles { return; } - Main.player[Main.myPlayer].lifeSteal -= num12; + Main.player[Main.myPlayer].lifeSteal -= num12 * 2f; float num13 = 0f; int num14 = projectile.owner; for (int i = 0; i < 255; i++) @@ -378,7 +583,7 @@ namespace CalamityMod.Projectiles Main.dust[num195].velocity *= 2f; Main.dust[num195].noGravity = true; } - projectile.damage *= 4; + projectile.damage *= (Main.player[projectile.owner].GetModPlayer(mod).auricSet ? 7 : 4); projectile.Damage(); } if (Main.player[projectile.owner].GetModPlayer(mod).tarraMage) @@ -386,6 +591,22 @@ namespace CalamityMod.Projectiles if (Main.player[projectile.owner].GetModPlayer(mod).tarraMageHealCooldown <= 0) { Main.player[projectile.owner].GetModPlayer(mod).tarraMageHealCooldown = 90; + float num11 = 0.03f; + num11 -= (float)projectile.numHits * 0.015f; + if (num11 <= 0f) + { + return; + } + float num12 = (float)projectile.damage * num11; + if ((int)num12 <= 0) + { + return; + } + if (Main.player[Main.myPlayer].lifeSteal <= 0f) + { + return; + } + Main.player[Main.myPlayer].lifeSteal -= num12 * 2f; int healAmount = (Main.player[projectile.owner].GetModPlayer(mod).auricSet ? projectile.damage / 100 : projectile.damage / 50); Player player = Main.player[projectile.owner]; player.statLife += healAmount; @@ -475,7 +696,7 @@ namespace CalamityMod.Projectiles { return; } - Main.player[Main.myPlayer].lifeSteal -= num12; + Main.player[Main.myPlayer].lifeSteal -= num12 * 2f; float num13 = 0f; int num14 = projectile.owner; for (int i = 0; i < 255; i++) @@ -540,7 +761,7 @@ namespace CalamityMod.Projectiles num10 = num7 / num10; num8 *= num10; num9 *= num10; - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, num8, num9, mod.ProjectileType("XerocOrb"), (int)((double)num * 0.8), 0f, projectile.owner, (float)num6, 0f); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, num8, num9, mod.ProjectileType("XerocOrb"), (int)((double)num * 1.2), 0f, projectile.owner, (float)num6, 0f); float num11 = 0.1f; num11 -= (float)projectile.numHits * 0.05f; if (num11 <= 0f) @@ -556,7 +777,7 @@ namespace CalamityMod.Projectiles { return; } - Main.player[Main.myPlayer].lifeSteal -= num12; + Main.player[Main.myPlayer].lifeSteal -= num12 * 2f; float num13 = 0f; int num14 = projectile.owner; for (int i = 0; i < 255; i++) @@ -621,7 +842,8 @@ namespace CalamityMod.Projectiles num10 = num7 / num10; num8 *= num10; num9 *= num10; - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, num8, num9, mod.ProjectileType("GodSlayerOrb"), (int)((double)num * 1.5), 0f, projectile.owner, (float)num6, 0f); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, num8, num9, mod.ProjectileType("GodSlayerOrb"), + (int)((double)num * (Main.player[projectile.owner].GetModPlayer(mod).auricSet ? 2.0 : 1.5)), 0f, projectile.owner, (float)num6, 0f); float num11 = (Main.player[projectile.owner].GetModPlayer(mod).auricSet ? 0.03f : 0.06f); //0.2 num11 -= (float)projectile.numHits * 0.015f; //0.05 if (num11 <= 0f) @@ -637,7 +859,7 @@ namespace CalamityMod.Projectiles { return; } - Main.player[Main.myPlayer].lifeSteal -= num12; + Main.player[Main.myPlayer].lifeSteal -= num12 * 2f; float num13 = 0f; int num14 = projectile.owner; for (int i = 0; i < 255; i++) @@ -657,23 +879,26 @@ namespace CalamityMod.Projectiles } else if (projectile.melee) { - if (Main.player[projectile.owner].GetModPlayer(mod).ataxiaGeyser) + if (Main.player[projectile.owner].GetModPlayer(mod).ataxiaGeyser && + Main.player[projectile.owner].ownedProjectileCounts[mod.ProjectileType("ChaosGeyser")] < 3) { Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, mod.ProjectileType("ChaosGeyser"), (int)((double)projectile.damage * 0.15), 0f, projectile.owner, 0f, 0f); } - else if (Main.player[projectile.owner].GetModPlayer(mod).xerocSet) + else if (Main.player[projectile.owner].GetModPlayer(mod).xerocSet && + Main.player[projectile.owner].ownedProjectileCounts[mod.ProjectileType("XerocBlast")] < 3) { - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, mod.ProjectileType("XerocBlast"), (int)((double)projectile.damage * 0.15), 0f, projectile.owner, 0f, 0f); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, mod.ProjectileType("XerocBlast"), (int)((double)projectile.damage * 0.2), 0f, projectile.owner, 0f, 0f); } } else if (projectile.ranged) { - if (Main.player[projectile.owner].GetModPlayer(mod).xerocSet) + if (Main.player[projectile.owner].GetModPlayer(mod).xerocSet && + Main.player[projectile.owner].ownedProjectileCounts[mod.ProjectileType("XerocFire")] < 3) { - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, mod.ProjectileType("XerocFire"), (int)((double)projectile.damage * 0.1), 0f, projectile.owner, 0f, 0f); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, mod.ProjectileType("XerocFire"), (int)((double)projectile.damage * 0.15), 0f, projectile.owner, 0f, 0f); } } - else if (projectile.thrown) + else if (CalamityMod.throwingProjectileList.Contains(projectile.type) && !projectile.melee) { if (Main.player[projectile.owner].GetModPlayer(mod).xerocSet && Main.player[projectile.owner].GetModPlayer(mod).xerocDmg <= 0) @@ -723,11 +948,15 @@ namespace CalamityMod.Projectiles num10 = num7 / num10; num8 *= num10; num9 *= num10; - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, num8, num9, mod.ProjectileType("XerocStar"), (int)((double)num * 1.3), 0f, projectile.owner, (float)num6, 0f); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, num8, num9, mod.ProjectileType("XerocStar"), (int)((double)num * 1.6), 0f, projectile.owner, (float)num6, 0f); } } else if (projectile.minion) { + if (Main.player[projectile.owner].GetModPlayer(mod).pArtifact) + { + target.AddBuff(mod.BuffType("HolyLight"), 300); + } if (Main.player[projectile.owner].GetModPlayer(mod).tearMinions) { target.AddBuff(mod.BuffType("TemporalSadness"), 60); @@ -835,7 +1064,7 @@ namespace CalamityMod.Projectiles num10 = num7 / num10; num8 *= num10; num9 *= num10; - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, num8, num9, mod.ProjectileType("XerocBubble"), (int)((double)num * 1.3), 0f, projectile.owner, (float)num6, 0f); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, num8, num9, mod.ProjectileType("XerocBubble"), (int)((double)num * 1.2), 0f, projectile.owner, (float)num6, 0f); } } } diff --git a/Projectiles/Celestus.cs b/Projectiles/Celestus.cs index 0ccacec2bd..8c7ee0208a 100644 --- a/Projectiles/Celestus.cs +++ b/Projectiles/Celestus.cs @@ -16,10 +16,9 @@ namespace CalamityMod.Projectiles public override void SetDefaults() { - projectile.width = 48; - projectile.height = 48; + projectile.width = 94; + projectile.height = 94; projectile.friendly = true; - projectile.thrown = true; projectile.tileCollide = false; projectile.penetrate = -1; projectile.extraUpdates = 3; diff --git a/Projectiles/Celestus.png b/Projectiles/Celestus.png index 8b52214ea1..418c089317 100644 Binary files a/Projectiles/Celestus.png and b/Projectiles/Celestus.png differ diff --git a/Projectiles/Celestus2.cs b/Projectiles/Celestus2.cs index abafcedc9b..1dc5dd3ec7 100644 --- a/Projectiles/Celestus2.cs +++ b/Projectiles/Celestus2.cs @@ -19,7 +19,6 @@ namespace CalamityMod.Projectiles projectile.width = 48; projectile.height = 48; projectile.friendly = true; - projectile.thrown = true; projectile.tileCollide = false; projectile.penetrate = -1; projectile.extraUpdates = 4; diff --git a/Projectiles/Celestus2.png b/Projectiles/Celestus2.png index 8b52214ea1..deef95388d 100644 Binary files a/Projectiles/Celestus2.png and b/Projectiles/Celestus2.png differ diff --git a/Projectiles/ChaosFlare2.cs b/Projectiles/ChaosFlare2.cs index 29943db921..e15d380641 100644 --- a/Projectiles/ChaosFlare2.cs +++ b/Projectiles/ChaosFlare2.cs @@ -22,7 +22,6 @@ namespace CalamityMod.Projectiles projectile.ignoreWater = true; projectile.timeLeft = 300; projectile.penetrate = 1; - projectile.thrown = true; projectile.extraUpdates = 1; } diff --git a/Projectiles/ChaosGeyser.cs b/Projectiles/ChaosGeyser.cs index a8b69bc347..490703a8c1 100644 --- a/Projectiles/ChaosGeyser.cs +++ b/Projectiles/ChaosGeyser.cs @@ -19,8 +19,8 @@ namespace CalamityMod.Projectiles projectile.width = 12; projectile.height = 96; projectile.friendly = true; - projectile.penetrate = -1; - projectile.timeLeft = 60; + projectile.penetrate = 3; + projectile.timeLeft = 120; projectile.usesLocalNPCImmunity = true; projectile.localNPCHitCooldown = 6; } diff --git a/Projectiles/CloudyWaifu.cs b/Projectiles/CloudyWaifu.cs index da45694866..9bb3850f8e 100644 --- a/Projectiles/CloudyWaifu.cs +++ b/Projectiles/CloudyWaifu.cs @@ -80,7 +80,7 @@ namespace CalamityMod.Projectiles float num633 = 500f; //700 float num634 = 800f; float num635 = 1200f; - float num636 = 50f; //150 + float num636 = 400f; //150 float num = (float)Main.rand.Next(90, 111) * 0.01f; num *= Main.essScale; Lighting.AddLight(projectile.Center, 0.25f * num, 0.55f * num, 0.75f * num); diff --git a/Projectiles/CobaltKunaiProjectile.cs b/Projectiles/CobaltKunaiProjectile.cs index b45158daf4..f48aa4ac3d 100644 --- a/Projectiles/CobaltKunaiProjectile.cs +++ b/Projectiles/CobaltKunaiProjectile.cs @@ -17,9 +17,7 @@ namespace CalamityMod.Projectiles { projectile.width = 10; projectile.height = 10; - projectile.scale = 0.75f; projectile.friendly = true; - projectile.thrown = true; projectile.penetrate = 3; projectile.aiStyle = 2; projectile.timeLeft = 600; diff --git a/Projectiles/Contagion.cs b/Projectiles/Contagion.cs index 3eb5142ab0..f37b6610b9 100644 --- a/Projectiles/Contagion.cs +++ b/Projectiles/Contagion.cs @@ -16,8 +16,8 @@ namespace CalamityMod.Projectiles public override void SetDefaults() { - projectile.width = 86; - projectile.height = 36; + projectile.width = 84; + projectile.height = 42; projectile.friendly = true; projectile.penetrate = -1; projectile.tileCollide = false; diff --git a/Projectiles/Contagion.png b/Projectiles/Contagion.png index 3aebefe8cf..070294c643 100644 Binary files a/Projectiles/Contagion.png and b/Projectiles/Contagion.png differ diff --git a/Projectiles/ContagionArrow.cs b/Projectiles/ContagionArrow.cs index a2ed4546f2..48908997fc 100644 --- a/Projectiles/ContagionArrow.cs +++ b/Projectiles/ContagionArrow.cs @@ -15,7 +15,6 @@ namespace CalamityMod.Projectiles public override void SetStaticDefaults() { DisplayName.SetDefault("Contagion Arrow"); - Main.projFrames[projectile.type] = 4; } public override void SetDefaults() @@ -32,16 +31,6 @@ namespace CalamityMod.Projectiles public override void AI() { projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f; - projectile.frameCounter++; - if (projectile.frameCounter > 4) - { - projectile.frame++; - projectile.frameCounter = 0; - } - if (projectile.frame > 3) - { - projectile.frame = 0; - } addBallTimer--; if (addBallTimer <= 0) { @@ -52,7 +41,7 @@ namespace CalamityMod.Projectiles addBallTimer = 5; } Lighting.AddLight(projectile.Center, ((255 - projectile.alpha) * 0.15f) / 255f, ((255 - projectile.alpha) * 0.25f) / 255f, ((255 - projectile.alpha) * 0f) / 255f); - if (projectile.ai[0] <= 3f) + if (projectile.ai[0] <= 60f) { projectile.ai[0] += 1f; return; diff --git a/Projectiles/ContagionArrow.png b/Projectiles/ContagionArrow.png index 0234d51ed4..335c795f3e 100644 Binary files a/Projectiles/ContagionArrow.png and b/Projectiles/ContagionArrow.png differ diff --git a/Projectiles/ContagionBall.cs b/Projectiles/ContagionBall.cs index 664cf4e95b..2bc4d2d86f 100644 --- a/Projectiles/ContagionBall.cs +++ b/Projectiles/ContagionBall.cs @@ -27,36 +27,25 @@ namespace CalamityMod.Projectiles public override void Kill(int timeLeft) { Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, mod.ProjectileType("HiveBombExplosion"), projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); - Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 14); - projectile.position.X = projectile.position.X + (float)(projectile.width / 2); - projectile.position.Y = projectile.position.Y + (float)(projectile.height / 2); - projectile.width = 60; - projectile.height = 60; - projectile.position.X = projectile.position.X - (float)(projectile.width / 2); - projectile.position.Y = projectile.position.Y - (float)(projectile.height / 2); - for (int num621 = 0; num621 < 2; num621++) - { - int num622 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 44, 0f, 0f, 100, default(Color), 0.15f); - Main.dust[num622].velocity *= 1.2f; - if (Main.rand.Next(2) == 0) - { - Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f; - } - } - for (int num623 = 0; num623 < 2; num623++) - { - int num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 44, 0f, 0f, 100, default(Color), 0.35f); - Main.dust[num624].noGravity = true; - Main.dust[num624].velocity *= 1.5f; - num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 44, 0f, 0f, 100, default(Color), 0.15f); - Main.dust[num624].velocity *= 1.1f; - } - projectile.position.X = projectile.position.X + (float)(projectile.width / 2); - projectile.position.Y = projectile.position.Y + (float)(projectile.height / 2); - projectile.width = 60; - projectile.height = 60; - projectile.position.X = projectile.position.X - (float)(projectile.width / 2); - projectile.position.Y = projectile.position.Y - (float)(projectile.height / 2); + Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 14); + projectile.position.X = projectile.position.X + (float)(projectile.width / 2); + projectile.position.Y = projectile.position.Y + (float)(projectile.height / 2); + projectile.width = 60; + projectile.height = 60; + projectile.position.X = projectile.position.X - (float)(projectile.width / 2); + projectile.position.Y = projectile.position.Y - (float)(projectile.height / 2); + int num622 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 44, 0f, 0f, 100, default(Color), 0.15f); + Main.dust[num622].velocity *= 1.2f; + if (Main.rand.Next(2) == 0) + { + Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f; + } + projectile.position.X = projectile.position.X + (float)(projectile.width / 2); + projectile.position.Y = projectile.position.Y + (float)(projectile.height / 2); + projectile.width = 60; + projectile.height = 60; + projectile.position.X = projectile.position.X - (float)(projectile.width / 2); + projectile.position.Y = projectile.position.Y - (float)(projectile.height / 2); } public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) diff --git a/Projectiles/ContagionBall.png b/Projectiles/ContagionBall.png index ccf32cafa4..f4f9412ed7 100644 Binary files a/Projectiles/ContagionBall.png and b/Projectiles/ContagionBall.png differ diff --git a/Projectiles/CosmicEnergy.cs b/Projectiles/CosmicEnergy.cs index f143354d2a..315f9534fb 100644 --- a/Projectiles/CosmicEnergy.cs +++ b/Projectiles/CosmicEnergy.cs @@ -55,7 +55,7 @@ namespace CalamityMod.Projectiles float num633 = 1400f; //700 float num634 = 1600f; //800 float num635 = 2400f; //1200 - float num636 = 150f; + float num636 = 800f; float num637 = 0.05f; for (int num638 = 0; num638 < 1000; num638++) { diff --git a/Projectiles/CosmicKunai.cs b/Projectiles/CosmicKunai.cs index c8ede802b3..9313b7cdb9 100644 --- a/Projectiles/CosmicKunai.cs +++ b/Projectiles/CosmicKunai.cs @@ -18,7 +18,6 @@ namespace CalamityMod.Projectiles projectile.width = 25; projectile.height = 25; projectile.friendly = true; - projectile.thrown = true; projectile.tileCollide = false; projectile.penetrate = 1; } @@ -26,7 +25,7 @@ namespace CalamityMod.Projectiles public override void AI() { projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f; - projectile.alpha += 25; + projectile.alpha += 17; if (projectile.alpha >= 255) { projectile.Kill(); diff --git a/Projectiles/Cosmilamp.cs b/Projectiles/Cosmilamp.cs index aef6cef0dc..1e72d5b225 100644 --- a/Projectiles/Cosmilamp.cs +++ b/Projectiles/Cosmilamp.cs @@ -160,7 +160,7 @@ namespace CalamityMod.Projectiles float num547 = Main.player[projectile.owner].Center.X - vector42.X; float num548 = Main.player[projectile.owner].Center.Y - vector42.Y - 60f; float num549 = (float)Math.Sqrt((double)(num547 * num547 + num548 * num548)); - if (num549 < 100f && projectile.ai[0] == 1f && !Collision.SolidCollision(projectile.position, projectile.width, projectile.height)) + if (num549 < 400f && projectile.ai[0] == 1f && !Collision.SolidCollision(projectile.position, projectile.width, projectile.height)) { projectile.ai[0] = 0f; } diff --git a/Projectiles/Crushax.cs b/Projectiles/Crushax.cs index 52eb4a4a6f..12713dd5e1 100644 --- a/Projectiles/Crushax.cs +++ b/Projectiles/Crushax.cs @@ -18,9 +18,7 @@ namespace CalamityMod.Projectiles { projectile.width = 38; projectile.height = 38; - projectile.scale = 0.8f; projectile.friendly = true; - projectile.thrown = true; projectile.penetrate = 2; projectile.aiStyle = 2; projectile.timeLeft = 300; diff --git a/Projectiles/CrystalPiercerProjectile.cs b/Projectiles/CrystalPiercerProjectile.cs index f9563d3388..c30f4fc56f 100644 --- a/Projectiles/CrystalPiercerProjectile.cs +++ b/Projectiles/CrystalPiercerProjectile.cs @@ -20,7 +20,6 @@ namespace CalamityMod.Projectiles projectile.width = 10; projectile.height = 10; projectile.friendly = true; - projectile.thrown = true; projectile.penetrate = -1; projectile.aiStyle = 113; projectile.timeLeft = 600; diff --git a/Projectiles/Crystalline.cs b/Projectiles/Crystalline.cs index 7d52a45345..d6d227f7fd 100644 --- a/Projectiles/Crystalline.cs +++ b/Projectiles/Crystalline.cs @@ -20,8 +20,6 @@ namespace CalamityMod.Projectiles projectile.width = 10; projectile.height = 10; projectile.friendly = true; - projectile.thrown = true; - projectile.scale = 0.75f; projectile.penetrate = 1; projectile.aiStyle = 113; projectile.timeLeft = 120; diff --git a/Projectiles/Crystalline2.cs b/Projectiles/Crystalline2.cs index c67ead2628..831ed2c509 100644 --- a/Projectiles/Crystalline2.cs +++ b/Projectiles/Crystalline2.cs @@ -20,8 +20,6 @@ namespace CalamityMod.Projectiles projectile.width = 10; projectile.height = 10; projectile.friendly = true; - projectile.thrown = true; - projectile.scale = 0.75f; projectile.penetrate = 1; projectile.aiStyle = 113; projectile.timeLeft = 30; diff --git a/Projectiles/CursedDagger.cs b/Projectiles/CursedDagger.cs index ee7b60ed13..510f10669e 100644 --- a/Projectiles/CursedDagger.cs +++ b/Projectiles/CursedDagger.cs @@ -19,7 +19,6 @@ namespace CalamityMod.Projectiles projectile.width = 14; projectile.height = 14; projectile.friendly = true; - projectile.thrown = true; projectile.penetrate = 3; projectile.aiStyle = 2; projectile.timeLeft = 600; diff --git a/Projectiles/DankCreeper.cs b/Projectiles/DankCreeper.cs index a52af05f38..df7d53bd8e 100644 --- a/Projectiles/DankCreeper.cs +++ b/Projectiles/DankCreeper.cs @@ -68,8 +68,213 @@ namespace CalamityMod.Projectiles projectile.timeLeft = 2; } } - } - + int num3; + for (int num534 = 0; num534 < 1000; num534 = num3 + 1) + { + if (num534 != projectile.whoAmI && Main.projectile[num534].active && Main.projectile[num534].owner == projectile.owner && + Main.projectile[num534].type == mod.ProjectileType("DankCreeper") && + Math.Abs(projectile.position.X - Main.projectile[num534].position.X) + Math.Abs(projectile.position.Y - Main.projectile[num534].position.Y) < (float)projectile.width) + { + if (projectile.position.X < Main.projectile[num534].position.X) + { + projectile.velocity.X = projectile.velocity.X - 0.05f; + } + else + { + projectile.velocity.X = projectile.velocity.X + 0.05f; + } + if (projectile.position.Y < Main.projectile[num534].position.Y) + { + projectile.velocity.Y = projectile.velocity.Y - 0.05f; + } + else + { + projectile.velocity.Y = projectile.velocity.Y + 0.05f; + } + } + num3 = num534; + } + float num535 = projectile.position.X; + float num536 = projectile.position.Y; + float num537 = 1300f; + bool flag19 = false; + int num538 = 1100; + if (projectile.ai[1] != 0f) + { + num538 = 1800; + } + if (Math.Abs(projectile.Center.X - Main.player[projectile.owner].Center.X) + Math.Abs(projectile.Center.Y - Main.player[projectile.owner].Center.Y) > (float)num538) + { + projectile.ai[0] = 1f; + } + if (projectile.ai[0] == 0f) + { + NPC ownerMinionAttackTargetNPC2 = projectile.OwnerMinionAttackTargetNPC; + if (ownerMinionAttackTargetNPC2 != null && ownerMinionAttackTargetNPC2.CanBeChasedBy(projectile, false)) + { + float num539 = ownerMinionAttackTargetNPC2.position.X + (float)(ownerMinionAttackTargetNPC2.width / 2); + float num540 = ownerMinionAttackTargetNPC2.position.Y + (float)(ownerMinionAttackTargetNPC2.height / 2); + float num541 = Math.Abs(projectile.position.X + (float)(projectile.width / 2) - num539) + Math.Abs(projectile.position.Y + (float)(projectile.height / 2) - num540); + if (num541 < num537 && Collision.CanHit(projectile.position, projectile.width, projectile.height, ownerMinionAttackTargetNPC2.position, ownerMinionAttackTargetNPC2.width, ownerMinionAttackTargetNPC2.height)) + { + num537 = num541; + num535 = num539; + num536 = num540; + flag19 = true; + } + } + if (!flag19) + { + for (int num542 = 0; num542 < 200; num542 = num3 + 1) + { + if (Main.npc[num542].CanBeChasedBy(projectile, false)) + { + float num543 = Main.npc[num542].position.X + (float)(Main.npc[num542].width / 2); + float num544 = Main.npc[num542].position.Y + (float)(Main.npc[num542].height / 2); + float num545 = Math.Abs(projectile.position.X + (float)(projectile.width / 2) - num543) + Math.Abs(projectile.position.Y + (float)(projectile.height / 2) - num544); + if (num545 < num537 && Collision.CanHit(projectile.position, projectile.width, projectile.height, Main.npc[num542].position, Main.npc[num542].width, Main.npc[num542].height)) + { + num537 = num545; + num535 = num543; + num536 = num544; + flag19 = true; + } + } + num3 = num542; + } + } + } + if (!flag19) + { + float num546 = 8f; + if (projectile.ai[0] == 1f) + { + num546 = 12f; + } + Vector2 vector42 = new Vector2(projectile.position.X + (float)projectile.width * 0.5f, projectile.position.Y + (float)projectile.height * 0.5f); + float num547 = Main.player[projectile.owner].Center.X - vector42.X; + float num548 = Main.player[projectile.owner].Center.Y - vector42.Y - 60f; + float num549 = (float)Math.Sqrt((double)(num547 * num547 + num548 * num548)); + if (num549 < 100f && projectile.ai[0] == 1f && !Collision.SolidCollision(projectile.position, projectile.width, projectile.height)) + { + projectile.ai[0] = 0f; + } + if (num549 > 2000f) + { + projectile.position.X = Main.player[projectile.owner].Center.X - (float)(projectile.width / 2); + projectile.position.Y = Main.player[projectile.owner].Center.Y - (float)(projectile.width / 2); + } + if (num549 > 70f) + { + num549 = num546 / num549; + num547 *= num549; + num548 *= num549; + projectile.velocity.X = (projectile.velocity.X * 20f + num547) / 21f; + projectile.velocity.Y = (projectile.velocity.Y * 20f + num548) / 21f; + } + else + { + if (projectile.velocity.X == 0f && projectile.velocity.Y == 0f) + { + projectile.velocity.X = -0.15f; + projectile.velocity.Y = -0.05f; + } + projectile.velocity *= 1.01f; + } + projectile.rotation = projectile.velocity.X * 0.05f; + if ((double)Math.Abs(projectile.velocity.X) > 0.2) + { + projectile.spriteDirection = -projectile.direction; + return; + } + } + else + { + if (projectile.ai[1] == -1f) + { + projectile.ai[1] = 11f; + } + if (projectile.ai[1] > 0f) + { + projectile.ai[1] -= 1f; + } + if (projectile.ai[1] == 0f) + { + float num550 = 8f; //12 + Vector2 vector43 = new Vector2(projectile.position.X + (float)projectile.width * 0.5f, projectile.position.Y + (float)projectile.height * 0.5f); + float num551 = num535 - vector43.X; + float num552 = num536 - vector43.Y; + float num553 = (float)Math.Sqrt((double)(num551 * num551 + num552 * num552)); + if (num553 < 100f) + { + num550 = 10f; //14 + } + num553 = num550 / num553; + num551 *= num553; + num552 *= num553; + projectile.velocity.X = (projectile.velocity.X * 14f + num551) / 15f; + projectile.velocity.Y = (projectile.velocity.Y * 14f + num552) / 15f; + } + else + { + if (Math.Abs(projectile.velocity.X) + Math.Abs(projectile.velocity.Y) < 10f) + { + projectile.velocity *= 1.05f; + } + } + projectile.rotation = projectile.velocity.X * 0.05f; + if ((double)Math.Abs(projectile.velocity.X) > 0.2) + { + projectile.spriteDirection = -projectile.direction; + return; + } + } + } + + public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) + { + Rectangle myRect = new Rectangle((int)projectile.position.X, (int)projectile.position.Y, projectile.width, projectile.height); + if (projectile.owner == Main.myPlayer) + { + for (int i = 0; i < 200; i++) + { + if (((Main.npc[i].active && !Main.npc[i].dontTakeDamage)) && + ((projectile.friendly && (!Main.npc[i].friendly || projectile.type == 318 || (Main.npc[i].type == 22 && projectile.owner < 255 && Main.player[projectile.owner].killGuide) || (Main.npc[i].type == 54 && projectile.owner < 255 && Main.player[projectile.owner].killClothier))) || + (projectile.hostile && Main.npc[i].friendly && !Main.npc[i].dontTakeDamageFromHostiles)) && (projectile.owner < 0 || Main.npc[i].immune[projectile.owner] == 0 || projectile.maxPenetrate == 1)) + { + if (Main.npc[i].noTileCollide || !projectile.ownerHitCheck || projectile.CanHit(Main.npc[i])) + { + bool flag3; + if (Main.npc[i].type == 414) + { + Rectangle rect = Main.npc[i].getRect(); + int num5 = 8; + rect.X -= num5; + rect.Y -= num5; + rect.Width += num5 * 2; + rect.Height += num5 * 2; + flag3 = projectile.Colliding(myRect, rect); + } + else + { + flag3 = projectile.Colliding(myRect, Main.npc[i].getRect()); + } + if (flag3) + { + if (Main.npc[i].reflectingProjectiles && projectile.CanReflect()) + { + Main.npc[i].ReflectProjectile(projectile.whoAmI); + return; + } + projectile.ai[1] = -1f; + projectile.netUpdate = true; + } + } + } + } + } + } + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { Texture2D tex = Main.projectileTexture[projectile.type]; diff --git a/Projectiles/DragonBurst.cs b/Projectiles/DragonBurst.cs index d33e2e2156..75b103047e 100644 --- a/Projectiles/DragonBurst.cs +++ b/Projectiles/DragonBurst.cs @@ -50,20 +50,13 @@ namespace CalamityMod.Projectiles Main.dust[num98].velocity *= 0.25f; Main.dust[num98].velocity += projectile.velocity * 0.5f; } - if (projectile.velocity.Y > 20f) - { - projectile.velocity.Y = 20f; - return; - } } public override void Kill(int timeLeft) { if (projectile.owner == Main.myPlayer) { - int boom = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, 612, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); - Main.projectile[boom].melee = false; - Main.projectile[boom].ranged = true; + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, 612, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); } } diff --git a/Projectiles/DrewsSandyWaifu.cs b/Projectiles/DrewsSandyWaifu.cs index 2b6fa7d21f..63aa1aaa21 100644 --- a/Projectiles/DrewsSandyWaifu.cs +++ b/Projectiles/DrewsSandyWaifu.cs @@ -261,10 +261,14 @@ namespace CalamityMod.Projectiles projectile.ai[1] = 0f; projectile.netUpdate = true; } + if (projectile.localAI[0] < 120f) + { + projectile.localAI[0] += 1f; + } if (projectile.ai[0] == 0f) { int num658 = mod.ProjectileType("CactusHealOrb"); - if (projectile.ai[1] == 0f) + if (projectile.ai[1] == 0f && projectile.localAI[0] >= 120f) { projectile.ai[1] += 1f; if (Main.myPlayer == projectile.owner && Main.player[projectile.owner].statLife < Main.player[projectile.owner].statLifeMax2) diff --git a/Projectiles/DuststormCloud.cs b/Projectiles/DuststormCloud.cs index c3c2a6259b..5ffe9b587d 100644 --- a/Projectiles/DuststormCloud.cs +++ b/Projectiles/DuststormCloud.cs @@ -20,7 +20,6 @@ namespace CalamityMod.Projectiles projectile.width = 38; projectile.height = 14; projectile.friendly = true; - projectile.thrown = true; projectile.alpha = 255; projectile.penetrate = -1; projectile.tileCollide = false; diff --git a/Projectiles/DuststormInABottle.cs b/Projectiles/DuststormInABottle.cs index af2ccdbc42..a69dff68fc 100644 --- a/Projectiles/DuststormInABottle.cs +++ b/Projectiles/DuststormInABottle.cs @@ -19,7 +19,6 @@ namespace CalamityMod.Projectiles projectile.width = 20; projectile.height = 20; projectile.friendly = true; - projectile.thrown = true; projectile.penetrate = 1; projectile.aiStyle = 2; projectile.timeLeft = 180; diff --git a/Projectiles/Earth4.cs b/Projectiles/Earth4.cs index d7400d9d01..70173cf095 100644 --- a/Projectiles/Earth4.cs +++ b/Projectiles/Earth4.cs @@ -108,7 +108,7 @@ namespace CalamityMod.Projectiles { return; } - Main.player[Main.myPlayer].lifeSteal -= num; + Main.player[Main.myPlayer].lifeSteal -= num * 2f; int num2 = projectile.owner; Projectile.NewProjectile(target.position.X, target.position.Y, 0f, 0f, mod.ProjectileType("EarthHealOrb"), 0, 0f, projectile.owner, (float)num2, num); } diff --git a/Projectiles/ElementalAxe.cs b/Projectiles/ElementalAxe.cs index 84a0b785bf..4f27d6d807 100644 --- a/Projectiles/ElementalAxe.cs +++ b/Projectiles/ElementalAxe.cs @@ -53,7 +53,7 @@ namespace CalamityMod.Projectiles float num633 = 700f; float num634 = 1200f; float num635 = 2500f; - float num636 = 150f; + float num636 = 400f; float num637 = 0.05f; for (int num638 = 0; num638 < 1000; num638++) { @@ -227,7 +227,7 @@ namespace CalamityMod.Projectiles public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { - target.immune[projectile.owner] = 5; + target.immune[projectile.owner] = 4; target.AddBuff(mod.BuffType("BrimstoneFlames"), 100); target.AddBuff(mod.BuffType("GlacialState"), 100); target.AddBuff(mod.BuffType("Plague"), 100); diff --git a/Projectiles/ElysianArrow.cs b/Projectiles/ElysianArrow.cs index 64f3ed82a4..698a18dd03 100644 --- a/Projectiles/ElysianArrow.cs +++ b/Projectiles/ElysianArrow.cs @@ -20,6 +20,7 @@ namespace CalamityMod.Projectiles projectile.height = 10; projectile.friendly = true; projectile.ranged = true; + projectile.arrow = true; projectile.penetrate = 1; projectile.timeLeft = 600; projectile.aiStyle = 1; @@ -28,10 +29,6 @@ namespace CalamityMod.Projectiles public override void AI() { projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f; - if (Main.rand.Next(5) == 0) - { - Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 244, projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f); - } } public override void Kill(int timeLeft) @@ -43,7 +40,7 @@ namespace CalamityMod.Projectiles projectile.height = 30; projectile.position.X = projectile.position.X - (float)(projectile.width / 2); projectile.position.Y = projectile.position.Y - (float)(projectile.height / 2); - for (int num621 = 0; num621 < 10; num621++) + for (int num621 = 0; num621 < 2; num621++) { int num622 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 244, 0f, 0f, 100, default(Color), 2f); Main.dust[num622].velocity *= 3f; @@ -53,7 +50,7 @@ namespace CalamityMod.Projectiles Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f; } } - for (int num623 = 0; num623 < 20; num623++) + for (int num623 = 0; num623 < 6; num623++) { int num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 244, 0f, 0f, 100, default(Color), 3f); Main.dust[num624].noGravity = true; diff --git a/Projectiles/EmpyreanKnives.cs b/Projectiles/EmpyreanKnives.cs index d9148e6b55..e24e904e40 100644 --- a/Projectiles/EmpyreanKnives.cs +++ b/Projectiles/EmpyreanKnives.cs @@ -31,7 +31,6 @@ namespace CalamityMod.Projectiles { if (projectile.ai[1] == 1f) { - projectile.thrown = true; projectile.melee = false; } projectile.ai[0] += 1f; @@ -140,7 +139,7 @@ namespace CalamityMod.Projectiles { return; } - Main.player[Main.myPlayer].lifeSteal -= num; + Main.player[Main.myPlayer].lifeSteal -= num * 2f; int num2 = projectile.owner; Projectile.NewProjectile(target.position.X, target.position.Y, 0f, 0f, 305, 0, 0f, projectile.owner, (float)num2, num); } diff --git a/Projectiles/EnhancedNanoRound.cs b/Projectiles/EnhancedNanoRound.cs index 61516a70d2..efe080576c 100644 --- a/Projectiles/EnhancedNanoRound.cs +++ b/Projectiles/EnhancedNanoRound.cs @@ -66,10 +66,9 @@ namespace CalamityMod.Projectiles target.AddBuff(BuffID.Confused, 300); if (target.life <= 0) { - int num251 = Main.rand.Next(2, 4); if (projectile.owner == Main.myPlayer) { - for (int num252 = 0; num252 < num251; num252++) + for (int num252 = 0; num252 < 2; num252++) { Vector2 value15 = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101)); while (value15.X == 0f && value15.Y == 0f) @@ -78,7 +77,7 @@ namespace CalamityMod.Projectiles } value15.Normalize(); value15 *= (float)Main.rand.Next(70, 101) * 0.1f; - Projectile.NewProjectile(projectile.oldPosition.X + (float)(projectile.width / 2), projectile.oldPosition.Y + (float)(projectile.height / 2), value15.X, value15.Y, mod.ProjectileType("Nanomachine"), (int)((double)projectile.damage), 0f, projectile.owner, 0f, 0f); + Projectile.NewProjectile(projectile.oldPosition.X + (float)(projectile.width / 2), projectile.oldPosition.Y + (float)(projectile.height / 2), value15.X, value15.Y, mod.ProjectileType("Nanomachine"), (int)((double)projectile.damage * 0.3), 0f, projectile.owner, 0f, 0f); } } } @@ -87,7 +86,7 @@ namespace CalamityMod.Projectiles public override void Kill(int timeLeft) { Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 93); - int num212 = Main.rand.Next(10, 20); + int num212 = Main.rand.Next(5, 10); for (int num213 = 0; num213 < num212; num213++) { int num214 = Dust.NewDust(projectile.Center - projectile.velocity / 2f, 0, 0, 229, 0f, 0f, 100, default(Color), 2f); diff --git a/Projectiles/EradicatorProjectile.cs b/Projectiles/EradicatorProjectile.cs index eb0c88ff5f..b4dfa2a449 100644 --- a/Projectiles/EradicatorProjectile.cs +++ b/Projectiles/EradicatorProjectile.cs @@ -20,7 +20,6 @@ namespace CalamityMod.Projectiles projectile.width = 24; projectile.height = 44; projectile.friendly = true; - projectile.thrown = true; projectile.tileCollide = false; projectile.penetrate = -1; projectile.aiStyle = 3; diff --git a/Projectiles/ExecutionersBlade.cs b/Projectiles/ExecutionersBlade.cs index 333237272a..8626d3acce 100644 --- a/Projectiles/ExecutionersBlade.cs +++ b/Projectiles/ExecutionersBlade.cs @@ -18,7 +18,6 @@ namespace CalamityMod.Projectiles projectile.width = 40; projectile.height = 40; projectile.friendly = true; - projectile.thrown = true; projectile.tileCollide = false; projectile.penetrate = 1; projectile.aiStyle = 2; diff --git a/Projectiles/Exocomet.cs b/Projectiles/Exocomet.cs index 0ee501da79..d3f537fa13 100644 --- a/Projectiles/Exocomet.cs +++ b/Projectiles/Exocomet.cs @@ -64,12 +64,11 @@ namespace CalamityMod.Projectiles } projectile.rotation = projectile.velocity.ToRotation() + 1.57079637f; Lighting.AddLight(projectile.Center, 0f, 0.5f, 0.5f); - int num959 = (int)projectile.ai[0]; - if (num959 >= 0 && Main.player[num959].active && !Main.player[num959].dead) + if (Main.player[projectile.owner].active && !Main.player[projectile.owner].dead) { - if (projectile.Distance(Main.player[num959].Center) > num954) + if (projectile.Distance(Main.player[projectile.owner].Center) > num954) { - Vector2 vector102 = projectile.DirectionTo(Main.player[num959].Center); + Vector2 vector102 = projectile.DirectionTo(Main.player[projectile.owner].Center); if (vector102.HasNaNs()) { vector102 = Vector2.UnitY; @@ -84,12 +83,6 @@ namespace CalamityMod.Projectiles { projectile.timeLeft = 30; } - if (projectile.ai[0] != -1f) - { - projectile.ai[0] = -1f; - projectile.netUpdate = true; - return; - } } } diff --git a/Projectiles/FatesReveal.cs b/Projectiles/FatesReveal.cs index b1d7136a88..3f77f1cf52 100644 --- a/Projectiles/FatesReveal.cs +++ b/Projectiles/FatesReveal.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Projectiles { float num949 = 10f; float scaleFactor11 = 15f; - float num950 = 40f; + float num950 = 160f; if (projectile.timeLeft > 30 && projectile.alpha > 0) { projectile.alpha -= 25; @@ -102,18 +102,16 @@ namespace CalamityMod.Projectiles num3 = num955; } } - int num956 = (int)projectile.ai[0]; - if (num956 >= 0 && Main.player[num956].active && !Main.player[num956].dead) + if (Main.player[projectile.owner].active && !Main.player[projectile.owner].dead) { - if (projectile.Distance(Main.player[num956].Center) > num950) + if (projectile.Distance(Main.player[projectile.owner].Center) > num950) { - Vector2 vector118 = projectile.DirectionTo(Main.player[num956].Center); + Vector2 vector118 = projectile.DirectionTo(Main.player[projectile.owner].Center); if (vector118.HasNaNs()) { vector118 = Vector2.UnitY; } projectile.velocity = (projectile.velocity * (num949 - 1f) + vector118 * scaleFactor11) / num949; - return; } } else @@ -122,12 +120,6 @@ namespace CalamityMod.Projectiles { projectile.timeLeft = 30; } - if (projectile.ai[0] != -1f) - { - projectile.ai[0] = -1f; - projectile.netUpdate = true; - return; - } } } diff --git a/Projectiles/FeatherKnifeProjectile.cs b/Projectiles/FeatherKnifeProjectile.cs index a61b6d6a4a..4ba2548a2f 100644 --- a/Projectiles/FeatherKnifeProjectile.cs +++ b/Projectiles/FeatherKnifeProjectile.cs @@ -19,7 +19,6 @@ namespace CalamityMod.Projectiles projectile.width = 20; projectile.height = 20; projectile.friendly = true; - projectile.thrown = true; projectile.penetrate = 2; projectile.aiStyle = 2; projectile.timeLeft = 600; diff --git a/Projectiles/FlameScytheProjectile.cs b/Projectiles/FlameScytheProjectile.cs index 671b84e653..d4e114666d 100644 --- a/Projectiles/FlameScytheProjectile.cs +++ b/Projectiles/FlameScytheProjectile.cs @@ -20,7 +20,6 @@ namespace CalamityMod.Projectiles projectile.width = 30; projectile.height = 30; projectile.friendly = true; - projectile.thrown = true; projectile.penetrate = -1; projectile.aiStyle = 3; projectile.extraUpdates = 1; @@ -66,9 +65,7 @@ namespace CalamityMod.Projectiles target.AddBuff(BuffID.Bleeding, 600); if (projectile.owner == Main.myPlayer) { - int boom = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, 612, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); - Main.projectile[boom].melee = false; - Main.projectile[boom].thrown = true; + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, 612, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); } } } diff --git a/Projectiles/FlashBullet.cs b/Projectiles/FlashBullet.cs index ddf5d80537..c22a418df6 100644 --- a/Projectiles/FlashBullet.cs +++ b/Projectiles/FlashBullet.cs @@ -66,7 +66,7 @@ namespace CalamityMod.Projectiles Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 93); if (projectile.owner == Main.myPlayer) { - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, mod.ProjectileType("Flash"), 1, 0f, projectile.owner, 0f, 0f); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, mod.ProjectileType("Flash"), (int)((double)projectile.damage * 0.25), 0f, projectile.owner, 0f, 0f); } for (int k = 0; k < 5; k++) { diff --git a/Projectiles/FossilShardThrown.cs b/Projectiles/FossilShardThrown.cs new file mode 100644 index 0000000000..a42190ad70 --- /dev/null +++ b/Projectiles/FossilShardThrown.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles +{ + public class FossilShardThrown : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Shard"); + } + + public override void SetDefaults() + { + projectile.width = 10; + projectile.height = 10; + projectile.friendly = true; + projectile.penetrate = 1; + projectile.aiStyle = 1; + projectile.timeLeft = 120; + aiType = 1; + } + + public override void AI() + { + projectile.rotation += projectile.velocity.Y; + projectile.velocity.Y *= 1.05f; + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + target.AddBuff(mod.BuffType("ArmorCrunch"), 60); + } + + public override void Kill(int timeLeft) + { + for (int i = 0; i <= 2; i++) + { + Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 32, projectile.oldVelocity.X * 0.5f, projectile.oldVelocity.Y * 0.5f); + } + } + } +} \ No newline at end of file diff --git a/Projectiles/FossilShardThrown.png b/Projectiles/FossilShardThrown.png new file mode 100644 index 0000000000..75ea1cfd83 Binary files /dev/null and b/Projectiles/FossilShardThrown.png differ diff --git a/Projectiles/FrostsparkBullet.cs b/Projectiles/FrostsparkBullet.cs index 3f57ac23a7..345fc2aca4 100644 --- a/Projectiles/FrostsparkBullet.cs +++ b/Projectiles/FrostsparkBullet.cs @@ -75,16 +75,12 @@ namespace CalamityMod.Projectiles target.AddBuff(BuffID.OnFire, 240); target.AddBuff(BuffID.Frostburn, 240); target.AddBuff(mod.BuffType("GlacialState"), 120); - if (target.buffImmune[mod.BuffType("GlacialState")]) - { - damage += 4; - } } public override void Kill(int timeLeft) { Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 27); - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, mod.ProjectileType("BoltExplosion"), (int)((double)projectile.damage * 0.5f), 0f, projectile.owner, 0f, 0f); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, mod.ProjectileType("BoltExplosion"), (int)((double)projectile.damage * 0.5), 0f, projectile.owner, 0f, 0f); int num212 = Main.rand.Next(10, 20); for (int num213 = 0; num213 < num212; num213++) { diff --git a/Projectiles/Galaxia.png b/Projectiles/Galaxia.png index bcd3ed059d..e5d06e52bb 100644 Binary files a/Projectiles/Galaxia.png and b/Projectiles/Galaxia.png differ diff --git a/Projectiles/Galaxia2.png b/Projectiles/Galaxia2.png index bcd3ed059d..e5d06e52bb 100644 Binary files a/Projectiles/Galaxia2.png and b/Projectiles/Galaxia2.png differ diff --git a/Projectiles/GelDartProjectile.cs b/Projectiles/GelDartProjectile.cs index 3f3e00cca6..72102e3a45 100644 --- a/Projectiles/GelDartProjectile.cs +++ b/Projectiles/GelDartProjectile.cs @@ -19,7 +19,6 @@ namespace CalamityMod.Projectiles projectile.width = 14; projectile.height = 14; projectile.friendly = true; - projectile.thrown = true; projectile.penetrate = 5; projectile.aiStyle = 2; projectile.timeLeft = 600; diff --git a/Projectiles/GhastlyBlast.cs b/Projectiles/GhastlyBlast.cs index a37bc408c0..a95017a8d3 100644 --- a/Projectiles/GhastlyBlast.cs +++ b/Projectiles/GhastlyBlast.cs @@ -179,7 +179,11 @@ namespace CalamityMod.Projectiles { flag59 = false; } - if (flag59) + if (projectile.localAI[0] < 60f) + { + projectile.localAI[0] += 1f; + } + if (flag59 && projectile.localAI[0] >= 60f) { float num1019 = 24f; //14 int num1020 = 8; diff --git a/Projectiles/GhastlySoulLarge.cs b/Projectiles/GhastlySoulLarge.cs index ccb91db6a9..3210069f22 100644 --- a/Projectiles/GhastlySoulLarge.cs +++ b/Projectiles/GhastlySoulLarge.cs @@ -52,12 +52,11 @@ namespace CalamityMod.Projectiles float num954 = 600f; projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) - 1.57f; Lighting.AddLight(projectile.Center, 0.5f, 0.2f, 0.9f); - int num959 = (int)projectile.ai[0]; - if (num959 >= 0 && Main.player[num959].active && !Main.player[num959].dead) + if (Main.player[projectile.owner].active && !Main.player[projectile.owner].dead) { - if (projectile.Distance(Main.player[num959].Center) > num954) + if (projectile.Distance(Main.player[projectile.owner].Center) > num954) { - Vector2 vector102 = projectile.DirectionTo(Main.player[num959].Center); + Vector2 vector102 = projectile.DirectionTo(Main.player[projectile.owner].Center); if (vector102.HasNaNs()) { vector102 = Vector2.UnitY; @@ -106,12 +105,6 @@ namespace CalamityMod.Projectiles { projectile.timeLeft = 30; } - if (projectile.ai[0] != -1f) - { - projectile.ai[0] = -1f; - projectile.netUpdate = true; - return; - } } } diff --git a/Projectiles/GhastlySoulMedium.cs b/Projectiles/GhastlySoulMedium.cs index 5d10b0c9d4..052831f961 100644 --- a/Projectiles/GhastlySoulMedium.cs +++ b/Projectiles/GhastlySoulMedium.cs @@ -52,12 +52,11 @@ namespace CalamityMod.Projectiles float num954 = 600f; projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) - 1.57f; Lighting.AddLight(projectile.Center, 0.5f, 0.2f, 0.9f); - int num959 = (int)projectile.ai[0]; - if (num959 >= 0 && Main.player[num959].active && !Main.player[num959].dead) + if (Main.player[projectile.owner].active && !Main.player[projectile.owner].dead) { - if (projectile.Distance(Main.player[num959].Center) > num954) + if (projectile.Distance(Main.player[projectile.owner].Center) > num954) { - Vector2 vector102 = projectile.DirectionTo(Main.player[num959].Center); + Vector2 vector102 = projectile.DirectionTo(Main.player[projectile.owner].Center); if (vector102.HasNaNs()) { vector102 = Vector2.UnitY; @@ -106,12 +105,6 @@ namespace CalamityMod.Projectiles { projectile.timeLeft = 30; } - if (projectile.ai[0] != -1f) - { - projectile.ai[0] = -1f; - projectile.netUpdate = true; - return; - } } } diff --git a/Projectiles/GhastlySoulSmall.cs b/Projectiles/GhastlySoulSmall.cs index 40f8aafe78..4ee0715325 100644 --- a/Projectiles/GhastlySoulSmall.cs +++ b/Projectiles/GhastlySoulSmall.cs @@ -51,12 +51,11 @@ namespace CalamityMod.Projectiles float num954 = 600f; projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) - 1.57f; Lighting.AddLight(projectile.Center, 0.5f, 0.2f, 0.9f); - int num959 = (int)projectile.ai[0]; - if (num959 >= 0 && Main.player[num959].active && !Main.player[num959].dead) + if (Main.player[projectile.owner].active && !Main.player[projectile.owner].dead) { - if (projectile.Distance(Main.player[num959].Center) > num954) + if (projectile.Distance(Main.player[projectile.owner].Center) > num954) { - Vector2 vector102 = projectile.DirectionTo(Main.player[num959].Center); + Vector2 vector102 = projectile.DirectionTo(Main.player[projectile.owner].Center); if (vector102.HasNaNs()) { vector102 = Vector2.UnitY; @@ -105,12 +104,6 @@ namespace CalamityMod.Projectiles { projectile.timeLeft = 30; } - if (projectile.ai[0] != -1f) - { - projectile.ai[0] = -1f; - projectile.netUpdate = true; - return; - } } } diff --git a/Projectiles/GhastlyVisage.cs b/Projectiles/GhastlyVisage.cs index 603b885050..858a0cb2c4 100644 --- a/Projectiles/GhastlyVisage.cs +++ b/Projectiles/GhastlyVisage.cs @@ -31,7 +31,6 @@ namespace CalamityMod.Projectiles Lighting.AddLight(projectile.Center, ((255 - projectile.alpha) * 0.65f) / 255f, ((255 - projectile.alpha) * 0f) / 255f, ((255 - projectile.alpha) * 0.1f) / 255f); Player player = Main.player[projectile.owner]; float num = 0f; - bool shoot = true; Vector2 vector = player.RotatedRelativePoint(player.MountedCenter, true); if (projectile.spriteDirection == -1) { @@ -77,33 +76,73 @@ namespace CalamityMod.Projectiles { if (player.statMana < manaCost) { - shoot = false; - } + if (player.manaFlower) + { + player.QuickMana(); + if (player.statMana >= (int)((float)manaCost)) + { + player.manaRegenDelay = (int)player.maxRegenDelay; + player.statMana -= manaCost; + } + else + { + projectile.Kill(); + } + } + else + { + projectile.Kill(); + } + } else { - player.statMana -= manaCost; - } + if (player.statMana >= (int)((float)manaCost)) + { + player.statMana -= manaCost; + player.manaRegenDelay = (int)player.maxRegenDelay; + } + } projectile.localAI[1] += 1f; Main.PlaySound(SoundID.Item117, projectile.position); } if (projectile.soundDelay <= 0 && flag16) { - if (player.statMana < manaCost) - { - shoot = false; - } - else - { - player.statMana -= manaCost; - } - projectile.soundDelay = num40 - num41 * num39; + if (player.statMana < manaCost) + { + if (player.manaFlower) + { + player.QuickMana(); + if (player.statMana >= (int)((float)manaCost)) + { + player.manaRegenDelay = (int)player.maxRegenDelay; + player.statMana -= manaCost; + } + else + { + projectile.Kill(); + } + } + else + { + projectile.Kill(); + } + } + else + { + if (player.statMana >= (int)((float)manaCost)) + { + player.statMana -= manaCost; + player.manaRegenDelay = (int)player.maxRegenDelay; + } + } + projectile.soundDelay = num40 - num41 * num39; if (projectile.ai[0] != 1f) { Main.PlaySound(SoundID.Item117, projectile.position); } projectile.localAI[0] = 12f; } - if (flag15 && shoot && Main.myPlayer == projectile.owner) + if (flag15 && Main.myPlayer == projectile.owner) { int num42 = mod.ProjectileType("GhastlyBlast"); float scaleFactor11 = 6f; diff --git a/Projectiles/GhoulishGouger.cs b/Projectiles/GhoulishGouger.cs index b22d3cd5a8..7443140f34 100644 --- a/Projectiles/GhoulishGouger.cs +++ b/Projectiles/GhoulishGouger.cs @@ -19,7 +19,6 @@ namespace CalamityMod.Projectiles projectile.width = 60; projectile.height = 60; projectile.friendly = true; - projectile.thrown = true; projectile.tileCollide = false; projectile.penetrate = -1; projectile.extraUpdates = 4; diff --git a/Projectiles/GodSlayerPhantom.cs b/Projectiles/GodSlayerPhantom.cs index abef749e8a..96dd53c1de 100644 --- a/Projectiles/GodSlayerPhantom.cs +++ b/Projectiles/GodSlayerPhantom.cs @@ -53,12 +53,11 @@ namespace CalamityMod.Projectiles float num954 = 600f; projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) - 1.57f; Lighting.AddLight(projectile.Center, 0.5f, 0.2f, 0.9f); - int num959 = (int)projectile.ai[0]; - if (num959 >= 0 && Main.player[num959].active && !Main.player[num959].dead) + if (Main.player[projectile.owner].active && !Main.player[projectile.owner].dead) { - if (projectile.Distance(Main.player[num959].Center) > num954) + if (projectile.Distance(Main.player[projectile.owner].Center) > num954) { - Vector2 vector102 = projectile.DirectionTo(Main.player[num959].Center); + Vector2 vector102 = projectile.DirectionTo(Main.player[projectile.owner].Center); if (vector102.HasNaNs()) { vector102 = Vector2.UnitY; @@ -107,12 +106,6 @@ namespace CalamityMod.Projectiles { projectile.timeLeft = 30; } - if (projectile.ai[0] != -1f) - { - projectile.ai[0] = -1f; - projectile.netUpdate = true; - return; - } } } diff --git a/Projectiles/GoliathRocket.cs b/Projectiles/GoliathRocket.cs index e6d4283664..fd8a6a6ce5 100644 --- a/Projectiles/GoliathRocket.cs +++ b/Projectiles/GoliathRocket.cs @@ -125,8 +125,6 @@ namespace CalamityMod.Projectiles num518 += projectile.oldVelocity.X / 6f; num519 += projectile.oldVelocity.Y / 6f; int num520 = Projectile.NewProjectile(value20.X, value20.Y, num518, num519, Main.player[projectile.owner].beeType(), Main.player[projectile.owner].beeDamage(projectile.damage), Main.player[projectile.owner].beeKB(0f), Main.myPlayer, 0f, 0f); - Main.projectile[num520].magic = false; - Main.projectile[num520].ranged = true; Main.projectile[num520].penetrate = 2; } } diff --git a/Projectiles/GraniteEnergy.cs b/Projectiles/GraniteEnergy.cs index 811b5be192..4e093ce638 100644 --- a/Projectiles/GraniteEnergy.cs +++ b/Projectiles/GraniteEnergy.cs @@ -30,11 +30,8 @@ namespace CalamityMod.Projectiles projectile.localAI[0] += 1f; if (projectile.localAI[0] > 4f) { - for (int num468 = 0; num468 < 1; num468++) - { - int num469 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 229, 0f, 0f, 100, default(Color), 1f); - Main.dust[num469].velocity *= 0f; - } + int num469 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 229, 0f, 0f, 100, default(Color), 0.6f); + Main.dust[num469].velocity *= 0f; } float num472 = projectile.Center.X; float num473 = projectile.Center.Y; diff --git a/Projectiles/GranitePulse.cs b/Projectiles/GranitePulse.cs index 0585ac9d60..f4455caf38 100644 --- a/Projectiles/GranitePulse.cs +++ b/Projectiles/GranitePulse.cs @@ -77,9 +77,9 @@ namespace CalamityMod.Projectiles projectile.height = 20; projectile.position.X = projectile.position.X - (float)(projectile.width / 2); projectile.position.Y = projectile.position.Y - (float)(projectile.height / 2); - for (int num621 = 0; num621 < 20; num621++) + for (int num621 = 0; num621 < 5; num621++) { - int num622 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 229, 0f, 0f, 100, default(Color), 1f); + int num622 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 229, 0f, 0f, 100, default(Color), 0.5f); Main.dust[num622].velocity *= 3f; if (Main.rand.Next(2) == 0) { @@ -87,12 +87,12 @@ namespace CalamityMod.Projectiles Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f; } } - for (int num623 = 0; num623 < 40; num623++) + for (int num623 = 0; num623 < 10; num623++) { - int num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 206, 0f, 0f, 100, default(Color), 1.5f); + int num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 206, 0f, 0f, 100, default(Color), 1f); Main.dust[num624].noGravity = true; Main.dust[num624].velocity *= 5f; - num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 206, 0f, 0f, 100, default(Color), 1f); + num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 206, 0f, 0f, 100, default(Color), 0.5f); Main.dust[num624].velocity *= 2f; } count += 1f; @@ -107,9 +107,9 @@ namespace CalamityMod.Projectiles projectile.height = 20; projectile.position.X = projectile.position.X - (float)(projectile.width / 2); projectile.position.Y = projectile.position.Y - (float)(projectile.height / 2); - for (int num621 = 0; num621 < 20; num621++) + for (int num621 = 0; num621 < 5; num621++) { - int num622 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 229, 0f, 0f, 100, default(Color), 1f); + int num622 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 229, 0f, 0f, 100, default(Color), 0.5f); Main.dust[num622].velocity *= 3f; if (Main.rand.Next(2) == 0) { @@ -117,12 +117,12 @@ namespace CalamityMod.Projectiles Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f; } } - for (int num623 = 0; num623 < 40; num623++) + for (int num623 = 0; num623 < 10; num623++) { - int num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 206, 0f, 0f, 100, default(Color), 1.5f); + int num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 206, 0f, 0f, 100, default(Color), 1f); Main.dust[num624].noGravity = true; Main.dust[num624].velocity *= 5f; - num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 206, 0f, 0f, 100, default(Color), 1f); + num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 206, 0f, 0f, 100, default(Color), 0.5f); Main.dust[num624].velocity *= 2f; } pulse = 50; diff --git a/Projectiles/HellfireExplosion.cs b/Projectiles/HellfireExplosion.cs index 7a363b0376..8b9864ff1f 100644 --- a/Projectiles/HellfireExplosion.cs +++ b/Projectiles/HellfireExplosion.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Projectiles projectile.ignoreWater = true; projectile.tileCollide = false; projectile.penetrate = -1; - projectile.timeLeft = 300; + projectile.timeLeft = 180; } public override void AI() diff --git a/Projectiles/HellfireExplosionFriendly.cs b/Projectiles/HellfireExplosionFriendly.cs index 0973508919..34a6324303 100644 --- a/Projectiles/HellfireExplosionFriendly.cs +++ b/Projectiles/HellfireExplosionFriendly.cs @@ -25,11 +25,7 @@ namespace CalamityMod.Projectiles projectile.timeLeft = 200; projectile.magic = true; projectile.usesLocalNPCImmunity = true; - projectile.localNPCHitCooldown = 20 - - (NPC.downedGolemBoss ? 5 : 0) - - (NPC.downedMoonlord ? 5 : 0) - - (CalamityWorld.downedDoG ? 4 : 0) - - (CalamityWorld.downedYharon ? 3 : 0); + projectile.localNPCHitCooldown = 15; } public override void AI() diff --git a/Projectiles/HiveBomb.cs b/Projectiles/HiveBomb.cs index 12eb4b94fb..a643f2cfe8 100644 --- a/Projectiles/HiveBomb.cs +++ b/Projectiles/HiveBomb.cs @@ -125,8 +125,6 @@ namespace CalamityMod.Projectiles num518 += projectile.oldVelocity.X / 6f; num519 += projectile.oldVelocity.Y / 6f; int num520 = Projectile.NewProjectile(value20.X, value20.Y, num518, num519, Main.player[projectile.owner].beeType(), Main.player[projectile.owner].beeDamage(projectile.damage / 3), Main.player[projectile.owner].beeKB(0f), Main.myPlayer, 0f, 0f); - Main.projectile[num520].magic = false; - Main.projectile[num520].ranged = true; Main.projectile[num520].penetrate = 2; } } diff --git a/Projectiles/HiveMissile.cs b/Projectiles/HiveMissile.cs index b28e9bc2f9..b8e74da9fb 100644 --- a/Projectiles/HiveMissile.cs +++ b/Projectiles/HiveMissile.cs @@ -126,8 +126,6 @@ namespace CalamityMod.Projectiles num518 += projectile.oldVelocity.X / 6f; num519 += projectile.oldVelocity.Y / 6f; int num520 = Projectile.NewProjectile(value20.X, value20.Y, num518, num519, Main.player[projectile.owner].beeType(), Main.player[projectile.owner].beeDamage(projectile.damage / 2), Main.player[projectile.owner].beeKB(0f), Main.myPlayer, 0f, 0f); - Main.projectile[num520].magic = false; - Main.projectile[num520].ranged = true; Main.projectile[num520].penetrate = 2; } } diff --git a/Projectiles/HolyFireBullet.cs b/Projectiles/HolyFireBullet.cs index 0a3428b7ec..3127eb93ad 100644 --- a/Projectiles/HolyFireBullet.cs +++ b/Projectiles/HolyFireBullet.cs @@ -56,20 +56,13 @@ namespace CalamityMod.Projectiles Main.dust[num98].velocity += projectile.velocity * 0.5f; } } - if (projectile.velocity.Y > 20f) - { - projectile.velocity.Y = 20f; - return; - } } public override void Kill(int timeLeft) { if (projectile.owner == Main.myPlayer) { - int boom = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, 612, (int)((double)projectile.damage * 0.33), projectile.knockBack, projectile.owner, 0f, 0f); - Main.projectile[boom].melee = false; - Main.projectile[boom].ranged = true; + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, 612, (int)((double)projectile.damage * 0.85), projectile.knockBack, projectile.owner, 0f, 0f); } for (int k = 0; k < 10; k++) { diff --git a/Projectiles/HolyLaser.cs b/Projectiles/HolyLaser.cs index 0e5368f18e..ab6472e057 100644 --- a/Projectiles/HolyLaser.cs +++ b/Projectiles/HolyLaser.cs @@ -56,9 +56,7 @@ namespace CalamityMod.Projectiles { if (projectile.owner == Main.myPlayer) { - int boom = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, 612, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); - Main.projectile[boom].melee = false; - Main.projectile[boom].magic = true; + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, 612, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); } } } diff --git a/Projectiles/HyperiusBullet.cs b/Projectiles/HyperiusBullet.cs index c2ea646a7d..6d889dad37 100644 --- a/Projectiles/HyperiusBullet.cs +++ b/Projectiles/HyperiusBullet.cs @@ -63,7 +63,7 @@ namespace CalamityMod.Projectiles public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { - float xPos = projectile.ai[0] > 0 ? projectile.position.X + 800 : projectile.position.X - 800; + float xPos = (Main.rand.Next(2) == 0 ? projectile.position.X + 800 : projectile.position.X - 800); Vector2 vector2 = new Vector2(xPos, projectile.position.Y + Main.rand.Next(-800, 801)); float num80 = xPos; float speedX = (float)target.position.X - vector2.X; @@ -90,7 +90,7 @@ namespace CalamityMod.Projectiles } if (projectile.owner == Main.myPlayer) { - Projectile.NewProjectile(vector2.X, vector2.Y, speedX, speedY, mod.ProjectileType("OMGWTH"), (int)((double)projectile.damage), 1f, projectile.owner); + Projectile.NewProjectile(vector2.X, vector2.Y, speedX, speedY, mod.ProjectileType("OMGWTH"), (int)((double)projectile.damage * 0.8), 1f, projectile.owner); } } } diff --git a/Projectiles/IceStarProjectile.cs b/Projectiles/IceStarProjectile.cs index 6b0d32bf56..044ff93308 100644 --- a/Projectiles/IceStarProjectile.cs +++ b/Projectiles/IceStarProjectile.cs @@ -19,7 +19,6 @@ namespace CalamityMod.Projectiles projectile.width = 14; projectile.height = 14; projectile.friendly = true; - projectile.thrown = true; projectile.penetrate = -1; projectile.aiStyle = 2; projectile.timeLeft = 280; diff --git a/Projectiles/IchorSpear.cs b/Projectiles/IchorSpear.cs index 7487b0e913..95d7ecf98d 100644 --- a/Projectiles/IchorSpear.cs +++ b/Projectiles/IchorSpear.cs @@ -20,7 +20,6 @@ namespace CalamityMod.Projectiles projectile.width = 12; projectile.height = 12; projectile.friendly = true; - projectile.thrown = true; projectile.penetrate = 2; projectile.aiStyle = 113; projectile.timeLeft = 600; diff --git a/Projectiles/InkBomb.cs b/Projectiles/InkBomb.cs index bc212242a7..a84422ba37 100644 --- a/Projectiles/InkBomb.cs +++ b/Projectiles/InkBomb.cs @@ -88,7 +88,7 @@ namespace CalamityMod.Projectiles public override void OnHitPlayer(Player target, int damage, bool crit) { - target.AddBuff(BuffID.Venom, 240); + target.AddBuff(BuffID.Venom, 300); target.AddBuff(BuffID.Darkness, 600, true); projectile.Kill(); } diff --git a/Projectiles/InkPoisonCloud.cs b/Projectiles/InkPoisonCloud.cs index 3cbc1b88b7..7b9c9c04c3 100644 --- a/Projectiles/InkPoisonCloud.cs +++ b/Projectiles/InkPoisonCloud.cs @@ -71,7 +71,7 @@ namespace CalamityMod.Projectiles public override void OnHitPlayer(Player target, int damage, bool crit) { - target.AddBuff(BuffID.Venom, 240); + target.AddBuff(BuffID.Venom, 300); target.AddBuff(BuffID.Darkness, 600, true); } } diff --git a/Projectiles/InkPoisonCloud2.cs b/Projectiles/InkPoisonCloud2.cs index 301586a355..e9e9b15467 100644 --- a/Projectiles/InkPoisonCloud2.cs +++ b/Projectiles/InkPoisonCloud2.cs @@ -71,7 +71,7 @@ namespace CalamityMod.Projectiles public override void OnHitPlayer(Player target, int damage, bool crit) { - target.AddBuff(BuffID.Venom, 240); + target.AddBuff(BuffID.Venom, 300); target.AddBuff(BuffID.Darkness, 600, true); } } diff --git a/Projectiles/InkPoisonCloud3.cs b/Projectiles/InkPoisonCloud3.cs index 6c792a3afa..09b7c6072f 100644 --- a/Projectiles/InkPoisonCloud3.cs +++ b/Projectiles/InkPoisonCloud3.cs @@ -71,7 +71,7 @@ namespace CalamityMod.Projectiles public override void OnHitPlayer(Player target, int damage, bool crit) { - target.AddBuff(BuffID.Venom, 240); + target.AddBuff(BuffID.Venom, 300); target.AddBuff(BuffID.Darkness, 600, true); } } diff --git a/Projectiles/LeafArrow.png b/Projectiles/LeafArrow.png index 5079a4a710..13e97ea9b7 100644 Binary files a/Projectiles/LeafArrow.png and b/Projectiles/LeafArrow.png differ diff --git a/Projectiles/LifeScythe.cs b/Projectiles/LifeScythe.cs index c3d65baba9..7e1af0c59c 100644 --- a/Projectiles/LifeScythe.cs +++ b/Projectiles/LifeScythe.cs @@ -62,8 +62,11 @@ namespace CalamityMod.Projectiles return; } Player player = Main.player[projectile.owner]; - player.statLife += 1; - player.HealEffect(1); + if (Main.rand.Next(2) == 0) + { + player.statLife += 1; + player.HealEffect(1); + } target.AddBuff(BuffID.OnFire, 200); target.AddBuff(BuffID.CursedInferno, 200); } diff --git a/Projectiles/Lionfish.cs b/Projectiles/Lionfish.cs index 8c2b8fe26c..12c5536007 100644 --- a/Projectiles/Lionfish.cs +++ b/Projectiles/Lionfish.cs @@ -20,7 +20,6 @@ namespace CalamityMod.Projectiles projectile.width = 30; projectile.height = 30; projectile.friendly = true; - projectile.thrown = true; projectile.ignoreWater = true; projectile.penetrate = -1; projectile.alpha = 255; diff --git a/Projectiles/Malachite.cs b/Projectiles/Malachite.cs index 03bf33451c..4e65c98c3a 100644 --- a/Projectiles/Malachite.cs +++ b/Projectiles/Malachite.cs @@ -24,7 +24,6 @@ namespace CalamityMod.Projectiles projectile.ignoreWater = true; projectile.penetrate = 3; projectile.alpha = 255; - projectile.thrown = true; projectile.extraUpdates = 3; projectile.aiStyle = 93; aiType = 514; diff --git a/Projectiles/MalachiteBolt.cs b/Projectiles/MalachiteBolt.cs index 39a20c74c5..c00e4f2b3b 100644 --- a/Projectiles/MalachiteBolt.cs +++ b/Projectiles/MalachiteBolt.cs @@ -24,7 +24,6 @@ namespace CalamityMod.Projectiles projectile.ignoreWater = true; projectile.penetrate = 2; projectile.alpha = 255; - projectile.thrown = true; projectile.extraUpdates = 10; projectile.usesLocalNPCImmunity = true; projectile.localNPCHitCooldown = 10; diff --git a/Projectiles/MangroveChakramProjectile.cs b/Projectiles/MangroveChakramProjectile.cs index 6385b254b5..6bbc85d7e6 100644 --- a/Projectiles/MangroveChakramProjectile.cs +++ b/Projectiles/MangroveChakramProjectile.cs @@ -20,7 +20,6 @@ namespace CalamityMod.Projectiles projectile.width = 30; projectile.height = 30; projectile.friendly = true; - projectile.thrown = true; projectile.penetrate = -1; projectile.aiStyle = 3; projectile.timeLeft = 600; diff --git a/Projectiles/MechwormHead.cs b/Projectiles/MechwormHead.cs index 64374e011c..4981c84387 100644 --- a/Projectiles/MechwormHead.cs +++ b/Projectiles/MechwormHead.cs @@ -80,22 +80,18 @@ namespace CalamityMod.Projectiles projectile.Center = center14; projectile.netUpdate = true; } - bool flag65 = true; - if (flag65) - { - for (int num1056 = 0; num1056 < 200; num1056++) - { - NPC nPC13 = Main.npc[num1056]; - if (nPC13.CanBeChasedBy(projectile, false) && player9.Distance(nPC13.Center) < num1054) - { - float num1057 = projectile.Distance(nPC13.Center); - if (num1057 < num1053) - { - num1055 = num1056; - } - } - } - } + for (int num1056 = 0; num1056 < 200; num1056++) + { + NPC nPC13 = Main.npc[num1056]; + if (nPC13.CanBeChasedBy(projectile, false) && player9.Distance(nPC13.Center) < num1054) + { + float num1057 = projectile.Distance(nPC13.Center); + if (num1057 < num1053) + { + num1055 = num1056; + } + } + } if (num1055 != -1) { NPC nPC14 = Main.npc[num1055]; diff --git a/Projectiles/MoltenAmputator.cs b/Projectiles/MoltenAmputator.cs index a29c72ff24..cb675901a2 100644 --- a/Projectiles/MoltenAmputator.cs +++ b/Projectiles/MoltenAmputator.cs @@ -20,7 +20,6 @@ namespace CalamityMod.Projectiles projectile.width = 74; projectile.height = 74; projectile.friendly = true; - projectile.thrown = true; projectile.tileCollide = false; projectile.penetrate = -1; projectile.aiStyle = 3; @@ -50,10 +49,7 @@ namespace CalamityMod.Projectiles } value15.Normalize(); value15 *= (float)Main.rand.Next(70, 101) * 0.1f; - int blob = Projectile.NewProjectile(projectile.oldPosition.X + (float)(projectile.width / 2), projectile.oldPosition.Y + (float)(projectile.height / 2), value15.X, value15.Y, mod.ProjectileType("MoltenBlob"), (int)((double)projectile.damage * 0.5f), 0f, projectile.owner, 0f, 0f); - Main.projectile[blob].hostile = false; - Main.projectile[blob].friendly = true; - Main.projectile[blob].penetrate = 1; + Projectile.NewProjectile(projectile.oldPosition.X + (float)(projectile.width / 2), projectile.oldPosition.Y + (float)(projectile.height / 2), value15.X, value15.Y, mod.ProjectileType("MoltenBlobThrown"), (int)((double)projectile.damage * 0.5), 0f, projectile.owner, 0f, 0f); } } Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 20); diff --git a/Projectiles/MoltenBlobThrown.cs b/Projectiles/MoltenBlobThrown.cs new file mode 100644 index 0000000000..2528efa98c --- /dev/null +++ b/Projectiles/MoltenBlobThrown.cs @@ -0,0 +1,96 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles +{ + public class MoltenBlobThrown : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Blob"); + Main.projFrames[projectile.type] = 2; + } + + public override void SetDefaults() + { + projectile.width = 12; + projectile.height = 12; + projectile.friendly = true; + projectile.penetrate = 1; + projectile.timeLeft = 300; + } + + public override void AI() + { + projectile.velocity.X *= 0.95f; + if (projectile.wet || projectile.lavaWet) + { + projectile.velocity.Y = 0f; + } + else + { + projectile.velocity.Y = projectile.velocity.Y + 0.1f; + if (projectile.velocity.Y > 5f) + { + projectile.velocity.Y = 5f; + } + } + projectile.frameCounter++; + if (projectile.frameCounter > 6) + { + projectile.frame++; + projectile.frameCounter = 0; + } + if (projectile.frame > 1) + { + projectile.frame = 0; + } + } + + public override bool TileCollideStyle(ref int width, ref int height, ref bool fallThrough) + { + fallThrough = false; + return true; + } + + public override bool OnTileCollide(Vector2 oldVelocity) + { + return false; + } + + public override Color? GetAlpha(Color lightColor) + { + return new Color(250, 150, 0, projectile.alpha); + } + + public override void Kill(int timeLeft) + { + Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 20); + projectile.position.X = projectile.position.X + (float)(projectile.width / 2); + projectile.position.Y = projectile.position.Y + (float)(projectile.height / 2); + projectile.width = 10; + projectile.height = 10; + projectile.position.X = projectile.position.X - (float)(projectile.width / 2); + projectile.position.Y = projectile.position.Y - (float)(projectile.height / 2); + for (int num621 = 0; num621 < 3; num621++) + { + int num622 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 244, 0f, 0f, 100, default(Color), 2f); + if (Main.rand.Next(2) == 0) + { + Main.dust[num622].scale = 0.5f; + Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f; + } + } + for (int num623 = 0; num623 < 5; num623++) + { + int num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 244, 0f, 0f, 100, default(Color), 3f); + Main.dust[num624].noGravity = true; + num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 244, 0f, 0f, 100, default(Color), 2f); + } + } + } +} \ No newline at end of file diff --git a/Projectiles/MoltenBlobThrown.png b/Projectiles/MoltenBlobThrown.png new file mode 100644 index 0000000000..811a46069d Binary files /dev/null and b/Projectiles/MoltenBlobThrown.png differ diff --git a/Projectiles/Mycoroot.cs b/Projectiles/Mycoroot.cs index d3dd339152..3bc2fc0e68 100644 --- a/Projectiles/Mycoroot.cs +++ b/Projectiles/Mycoroot.cs @@ -19,7 +19,6 @@ namespace CalamityMod.Projectiles projectile.width = 12; projectile.height = 12; projectile.friendly = true; - projectile.thrown = true; projectile.penetrate = 1; } diff --git a/Projectiles/MythrilKnifeProjectile.cs b/Projectiles/MythrilKnifeProjectile.cs index de32fbd973..a3c09d3f2b 100644 --- a/Projectiles/MythrilKnifeProjectile.cs +++ b/Projectiles/MythrilKnifeProjectile.cs @@ -19,7 +19,6 @@ namespace CalamityMod.Projectiles projectile.width = 12; projectile.height = 12; projectile.friendly = true; - projectile.thrown = true; projectile.penetrate = 1; projectile.aiStyle = 2; projectile.timeLeft = 600; diff --git a/Projectiles/Nanomachine.cs b/Projectiles/Nanomachine.cs index 6b309f482c..d321038197 100644 --- a/Projectiles/Nanomachine.cs +++ b/Projectiles/Nanomachine.cs @@ -44,7 +44,7 @@ namespace CalamityMod.Projectiles public override void AI() { - for (int num136 = 0; num136 < 10; num136++) + for (int num136 = 0; num136 < 3; num136++) { float x2 = projectile.position.X - projectile.velocity.X / 10f * (float)num136; float y2 = projectile.position.Y - projectile.velocity.Y / 10f * (float)num136; diff --git a/Projectiles/NapalmArrow.cs b/Projectiles/NapalmArrow.cs index d255873759..77b9b16417 100644 --- a/Projectiles/NapalmArrow.cs +++ b/Projectiles/NapalmArrow.cs @@ -20,6 +20,7 @@ namespace CalamityMod.Projectiles projectile.height = 10; projectile.friendly = true; projectile.ranged = true; + projectile.arrow = true; projectile.penetrate = 1; projectile.timeLeft = 600; projectile.aiStyle = 1; @@ -97,10 +98,9 @@ namespace CalamityMod.Projectiles Gore expr_13D1F_cp_0 = Main.gore[num626]; expr_13D1F_cp_0.velocity.Y = expr_13D1F_cp_0.velocity.Y - 1f; } - int num251 = Main.rand.Next(2, 4); if (projectile.owner == Main.myPlayer) { - for (int num252 = 0; num252 < num251; num252++) + for (int num252 = 0; num252 < 3; num252++) { Vector2 value15 = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101)); while (value15.X == 0f && value15.Y == 0f) @@ -109,7 +109,7 @@ namespace CalamityMod.Projectiles } value15.Normalize(); value15 *= (float)Main.rand.Next(70, 101) * 0.1f; - Projectile.NewProjectile(projectile.oldPosition.X + (float)(projectile.width / 2), projectile.oldPosition.Y + (float)(projectile.height / 2), value15.X, value15.Y, Main.rand.Next(400, 403), 9, 0f, projectile.owner, 0f, 0f); + Projectile.NewProjectile(projectile.oldPosition.X + (float)(projectile.width / 2), projectile.oldPosition.Y + (float)(projectile.height / 2), value15.X, value15.Y, Main.rand.Next(400, 403), (int)((double)projectile.damage * 0.3), 0f, projectile.owner, 0f, 0f); } } } diff --git a/Projectiles/OPHammer.cs b/Projectiles/OPHammer.cs index 6573f3f231..2dd46fa1d7 100644 --- a/Projectiles/OPHammer.cs +++ b/Projectiles/OPHammer.cs @@ -19,7 +19,6 @@ namespace CalamityMod.Projectiles projectile.width = 38; projectile.height = 38; projectile.friendly = true; - projectile.thrown = true; projectile.tileCollide = false; projectile.penetrate = -1; projectile.extraUpdates = 2; diff --git a/Projectiles/OmegaBlueTentacle.cs b/Projectiles/OmegaBlueTentacle.cs new file mode 100644 index 0000000000..bc1edeab15 --- /dev/null +++ b/Projectiles/OmegaBlueTentacle.cs @@ -0,0 +1,229 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ID; +using Terraria.DataStructures; +using Terraria.Graphics.Shaders; +using Terraria.ModLoader; +using System; + +namespace CalamityMod.Projectiles +{ + public class OmegaBlueTentacle : ModProjectile + { + public bool initSegments = false; + public Vector2[] segment = new Vector2[6]; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Omega Blue Tentacle"); + } + + public override void SetDefaults() + { + projectile.width = 24; + projectile.height = 24; + projectile.timeLeft = 6; + projectile.friendly = true; + projectile.tileCollide = false; + projectile.ignoreWater = true; + projectile.penetrate = -1; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 10; + } + + public override bool PreAI() + { + if (!initSegments) + { + initSegments = true; + for (int i = 0; i < 6; i++) + { + segment[i] = projectile.Center; + //Main.NewText("init segment " + segment[i].X.ToString() + " " + segment[i].Y.ToString()); + } + } + return true; + } + + public override void AI() + { + Player player = Main.player[projectile.owner]; + bool hentai = player.GetModPlayer().omegaBlueHentai; + if (player.active && player.GetModPlayer().omegaBlueSet) + projectile.timeLeft = 3; + + //tentacle head movement (homing) + Vector2 playerVel = player.position - player.oldPosition; + projectile.position += playerVel; + projectile.ai[0]++; + if (projectile.ai[0] >= 0f) + { + Vector2 home = player.Center + new Vector2(50, 0).RotatedBy(MathHelper.ToRadians(60) * projectile.ai[1]); + Vector2 distance = home - projectile.Center; + float range = distance.Length(); + distance.Normalize(); + if (projectile.ai[0] == 0f) + { + if (range > 13f) + { + projectile.ai[0] = -1f; //if in fast mode, stay fast until back in range + if (range > 1300f) + { + projectile.Kill(); + return; + } + } + else + { + if (hentai) + projectile.ai[0] = 120f;//45f + Main.rand.Next(45); + projectile.velocity.Normalize(); + projectile.velocity *= 3f + Main.rand.NextFloat(3f); + projectile.netUpdate = true; + } + } + else + { + distance /= 8f; + } + if (range > 120f) //switch to fast return mode + { + projectile.ai[0] = -1f; + projectile.netUpdate = true; + } + projectile.velocity += distance; + if (range > 30f) + projectile.velocity *= 0.96f; + + if (projectile.ai[0] > 120f) //attack nearby enemy + { + projectile.ai[0] = 10 + Main.rand.Next(10); + float maxDistance = hentai ? 900f : 600f; + int target = -1; + for (int i = 0; i < 200; i++) + { + NPC npc = Main.npc[i]; + if (npc.CanBeChasedBy(projectile)) + { + float npcDistance = projectile.Distance(npc.Center); + if (npcDistance < maxDistance) + { + maxDistance = npcDistance; + target = i; + } + } + } + if (target != -1) + { + projectile.velocity = Main.npc[target].Center - projectile.Center; + projectile.velocity.Normalize(); + projectile.velocity *= 13f; + projectile.velocity += Main.npc[target].velocity / 2f; + projectile.velocity -= playerVel / 2f; + projectile.ai[0] *= -1f; + } + projectile.netUpdate = true; + } + } + + //tentacle segment updates + segment[0] = player.Center; + for (int i = 1; i < 5; i++) + { + MoveSegment(segment[i - 1], ref segment[i], segment[i + 1]); + } + MoveSegment(segment[4], ref segment[5], projectile.Center + projectile.velocity); + + if (hentai) + { + if (projectile.ai[0] != -1f) + projectile.ai[0]++; + projectile.position += projectile.velocity; + //SMOOTH ASS DUST + Vector2 dustPos = projectile.position + projectile.velocity; + Vector2 tickVel = dustPos - projectile.oldPosition; //playerVel + projectile.velocity * 2f; + dustPos += new Vector2(projectile.width / 2, 0).RotatedBy(projectile.rotation); + dustPos.X -= 4; + dustPos.X += projectile.width / 2; + dustPos.Y -= 4; + dustPos.Y += projectile.height / 2; + const float factor = 3f; + int limit = (int)(tickVel.Length() / factor); + if (limit == 0) + { + int d = Dust.NewDust(dustPos, 0, 0, 20, 0, 0, 100, Color.Transparent, 0.9f); + Main.dust[d].noGravity = true; + Main.dust[d].noLight = true; + Main.dust[d].fadeIn = 1f; + Main.dust[d].velocity = Vector2.Zero; + } + else + { + tickVel.Normalize(); + tickVel *= factor; + for (int i = 0; i <= limit; i++) + { + int d = Dust.NewDust(dustPos, 0, 0, 20, 0, 0, 100, Color.Transparent, 0.9f); + Main.dust[d].noGravity = true; + Main.dust[d].noLight = true; + Main.dust[d].fadeIn = 1f; + Main.dust[d].position -= tickVel * i; + Main.dust[d].velocity = Vector2.Zero; + } + } + } + } + + private static void MoveSegment(Vector2 previous, ref Vector2 current, Vector2 next) + { + current = previous + next; + current /= 2; + } + + public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) + { + if (Main.player[projectile.owner].GetModPlayer().omegaBlueHentai) + crit = true; + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + if (projectile.owner == Main.myPlayer && Main.player[Main.myPlayer].lifeSteal > 0f && target.type != NPCID.TargetDummy) + { + int healAmount = 10 * damage / projectile.damage; //should always be around max, less if enemy has defense/DR + if (healAmount > 0) + { + Main.player[Main.myPlayer].lifeSteal -= healAmount; + if (Main.player[Main.myPlayer].GetModPlayer().omegaBlueHentai) //hentai always crits, this makes it have same lifesteal delay + Main.player[Main.myPlayer].lifeSteal += healAmount / 2; + /*Main.player[Main.myPlayer].statLife += healAmount; + if (Main.player[Main.myPlayer].statLife > Main.player[Main.myPlayer].statLifeMax2) + Main.player[Main.myPlayer].statLife = Main.player[Main.myPlayer].statLifeMax2; + Main.player[Main.myPlayer].HealEffect(healAmount, false);*/ + Projectile.NewProjectile(projectile.Center, Vector2.Zero, ProjectileID.SpiritHeal, 0, 0f, projectile.owner, projectile.owner, healAmount); + } + } + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.LinearClamp/*.PointWrap*/, DepthStencilState.Default, RasterizerState.CullNone, null, Main.GameViewMatrix.ZoomMatrix); + + GameShaders.Armor.ApplySecondary(Main.player[projectile.owner].cBody, Main.player[projectile.owner], new DrawData?()); + projectile.rotation = (projectile.Center - segment[5]).ToRotation(); + Texture2D texture2D13 = Main.projectileTexture[projectile.type]; + Texture2D segmentSprite = mod.GetTexture("ExtraTextures/Chains/OmegaBlueTentacleSegment"); + for (int i = 0; i < 6; i++) + { + Main.spriteBatch.Draw(segmentSprite, segment[i] - Main.screenPosition + new Vector2(0f, projectile.gfxOffY), segmentSprite.Bounds, projectile.GetAlpha(lightColor), 0f, segmentSprite.Bounds.Size() / 2f, projectile.scale, SpriteEffects.None, 0f); + } + Main.spriteBatch.Draw(texture2D13, projectile.Center - Main.screenPosition + new Vector2(0f, projectile.gfxOffY), texture2D13.Bounds, projectile.GetAlpha(lightColor), projectile.rotation, texture2D13.Bounds.Size() / 2f, projectile.scale, SpriteEffects.None, 0f); + + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, RasterizerState.CullCounterClockwise, null, Main.Transform); + return false; + } + } +} diff --git a/Projectiles/OmegaBlueTentacle.png b/Projectiles/OmegaBlueTentacle.png new file mode 100644 index 0000000000..bbc30be482 Binary files /dev/null and b/Projectiles/OmegaBlueTentacle.png differ diff --git a/Projectiles/OrichalcumSpikedGemstoneProjectile.cs b/Projectiles/OrichalcumSpikedGemstoneProjectile.cs index 151665b891..ac8bbeff8c 100644 --- a/Projectiles/OrichalcumSpikedGemstoneProjectile.cs +++ b/Projectiles/OrichalcumSpikedGemstoneProjectile.cs @@ -19,7 +19,6 @@ namespace CalamityMod.Projectiles projectile.width = 12; projectile.height = 12; projectile.friendly = true; - projectile.thrown = true; projectile.aiStyle = 2; projectile.penetrate = 6; projectile.timeLeft = 600; diff --git a/Projectiles/PalladiumJavelinProjectile.cs b/Projectiles/PalladiumJavelinProjectile.cs index dc8834e59d..dffa6f99b5 100644 --- a/Projectiles/PalladiumJavelinProjectile.cs +++ b/Projectiles/PalladiumJavelinProjectile.cs @@ -20,7 +20,6 @@ namespace CalamityMod.Projectiles projectile.width = 12; projectile.height = 12; projectile.friendly = true; - projectile.thrown = true; projectile.penetrate = -1; projectile.aiStyle = 113; projectile.timeLeft = 600; diff --git a/Projectiles/Patreon/DarkSpark.cs b/Projectiles/Patreon/DarkSpark.cs new file mode 100644 index 0000000000..e2fa4c9ec6 --- /dev/null +++ b/Projectiles/Patreon/DarkSpark.cs @@ -0,0 +1,217 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using Terraria.Enums; + +namespace CalamityMod.Projectiles.Patreon +{ + public class DarkSpark : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Crystal"); + Main.projFrames[projectile.type] = 4; + } + + public override void SetDefaults() + { + projectile.width = 14; + projectile.height = 22; + projectile.friendly = true; + projectile.penetrate = -1; + projectile.tileCollide = false; + projectile.magic = true; + projectile.ignoreWater = true; + } + + public override void AI() + { + Player player = Main.player[projectile.owner]; + float num = 0f; + if (projectile.spriteDirection == -1) + { + num = 3.14159274f; + } + Vector2 vector = player.RotatedRelativePoint(player.MountedCenter, true); + float num26 = 30f; + if (projectile.ai[0] > 360f) + { + num26 = 15f; + } + if (projectile.ai[0] > 480f) + { + num26 = 5f; + } + projectile.damage = (int)((float)player.inventory[player.selectedItem].damage * player.magicDamage); + projectile.ai[0] += 1f; + projectile.ai[1] += 1f; + if (projectile.localAI[0] == 0f) + { + projectile.localAI[0] = 1f; + projectile.localAI[1] = 255f; + } + if (projectile.localAI[1] > 0f) + { + projectile.localAI[1] -= 1f; + } + bool flag9 = false; + if (projectile.ai[0] % num26 == 0f) + { + flag9 = true; + } + int num27 = 10; + bool flag10 = false; + if (projectile.ai[0] % num26 == 0f) + { + flag10 = true; + } + if (projectile.ai[1] >= 1f) + { + projectile.ai[1] = 0f; + flag10 = true; + if (Main.myPlayer == projectile.owner) + { + float scaleFactor5 = player.inventory[player.selectedItem].shootSpeed * projectile.scale; + Vector2 value12 = vector; + Vector2 value13 = Main.screenPosition + new Vector2((float)Main.mouseX, (float)Main.mouseY) - value12; + if (player.gravDir == -1f) + { + value13.Y = (float)(Main.screenHeight - Main.mouseY) + Main.screenPosition.Y - value12.Y; + } + Vector2 vector11 = Vector2.Normalize(value13); + if (float.IsNaN(vector11.X) || float.IsNaN(vector11.Y)) + { + vector11 = -Vector2.UnitY; + } + vector11 = Vector2.Normalize(Vector2.Lerp(vector11, Vector2.Normalize(projectile.velocity), 0.92f)); + vector11 *= scaleFactor5; + if (vector11.X != projectile.velocity.X || vector11.Y != projectile.velocity.Y) + { + projectile.netUpdate = true; + } + projectile.velocity = vector11; + } + } + projectile.frameCounter++; + int num28 = (projectile.ai[0] < 480f) ? 3 : 1; + if (projectile.frameCounter >= num28) + { + projectile.frameCounter = 0; + if (++projectile.frame >= 4) + { + projectile.frame = 0; + } + } + if (projectile.soundDelay <= 0) + { + projectile.soundDelay = num27; + projectile.soundDelay *= 2; + if (projectile.ai[0] != 1f) + { + Main.PlaySound(SoundID.Item15, projectile.position); + } + } + if (flag10 && Main.myPlayer == projectile.owner) + { + bool flag11 = !flag9 || player.CheckMana(player.inventory[player.selectedItem].mana, true, false); + bool flag12 = player.channel && flag11 && !player.noItems && !player.CCed; + if (flag12) + { + if (projectile.ai[0] == 1f) + { + Vector2 center3 = projectile.Center; + Vector2 vector12 = Vector2.Normalize(projectile.velocity); + if (float.IsNaN(vector12.X) || float.IsNaN(vector12.Y)) + { + vector12 = -Vector2.UnitY; + } + int num29 = projectile.damage; + for (int l = 0; l < 7; l++) + { + Projectile.NewProjectile(center3.X, center3.Y, vector12.X, vector12.Y, mod.ProjectileType("DarkSparkBeam"), num29, projectile.knockBack, projectile.owner, (float)l, (float)projectile.whoAmI); + } + projectile.netUpdate = true; + } + } + else + { + projectile.Kill(); + } + } + projectile.position = player.RotatedRelativePoint(player.MountedCenter, true) - projectile.Size / 2f; + projectile.rotation = projectile.velocity.ToRotation() + num; + projectile.spriteDirection = projectile.direction; + projectile.timeLeft = 2; + player.ChangeDir(projectile.direction); + player.heldProj = projectile.whoAmI; + player.itemTime = 2; + player.itemAnimation = 2; + player.itemRotation = (float)Math.Atan2((double)(projectile.velocity.Y * (float)projectile.direction), (double)(projectile.velocity.X * (float)projectile.direction)); + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + Vector2 mountedCenter = Main.player[projectile.owner].MountedCenter; + Microsoft.Xna.Framework.Color color25 = Lighting.GetColor((int)((double)projectile.position.X + (double)projectile.width * 0.5) / 16, (int)(((double)projectile.position.Y + (double)projectile.height * 0.5) / 16.0)); + if (projectile.hide && !ProjectileID.Sets.DontAttachHideToAlpha[projectile.type]) + { + color25 = Lighting.GetColor((int)mountedCenter.X / 16, (int)(mountedCenter.Y / 16f)); + } + SpriteEffects spriteEffects = SpriteEffects.None; + if (projectile.spriteDirection == -1) + { + spriteEffects = SpriteEffects.FlipHorizontally; + } + Texture2D texture2D14 = Main.projectileTexture[projectile.type]; + int num215 = Main.projectileTexture[projectile.type].Height / Main.projFrames[projectile.type]; + int y7 = num215 * projectile.frame; + Vector2 vector27 = (projectile.position + new Vector2((float)projectile.width, (float)projectile.height) / 2f + Vector2.UnitY * projectile.gfxOffY - Main.screenPosition).Floor(); + float scale5 = 1f; + if (Main.player[projectile.owner].shroomiteStealth && Main.player[projectile.owner].inventory[Main.player[projectile.owner].selectedItem].ranged) + { + float num216 = Main.player[projectile.owner].stealth; + if ((double)num216 < 0.03) + { + num216 = 0.03f; + } + float arg_97B3_0 = (1f + num216 * 10f) / 11f; + color25 *= num216; + scale5 = num216; + } + if (Main.player[projectile.owner].setVortex && Main.player[projectile.owner].inventory[Main.player[projectile.owner].selectedItem].ranged) + { + float num217 = Main.player[projectile.owner].stealth; + if ((double)num217 < 0.03) + { + num217 = 0.03f; + } + float arg_9854_0 = (1f + num217 * 10f) / 11f; + color25 = color25.MultiplyRGBA(new Microsoft.Xna.Framework.Color(Vector4.Lerp(Vector4.One, new Vector4(0.16f, 0.12f, 0f, 0f), 1f - num217))); + scale5 = num217; + } + Main.spriteBatch.Draw(texture2D14, vector27, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, y7, texture2D14.Width, num215)), projectile.GetAlpha(color25), projectile.rotation, new Vector2((float)texture2D14.Width / 2f, (float)num215 / 2f), projectile.scale, spriteEffects, 0f); + float scaleFactor2 = (float)Math.Cos((double)(6.28318548f * (projectile.ai[0] / 120f))) * 2f + 2f; + if (projectile.ai[0] > 480f) + { + scaleFactor2 = 4f; + } + for (float num218 = 0f; num218 < 4f; num218 += 1f) + { + Main.spriteBatch.Draw(texture2D14, vector27 + Vector2.UnitY.RotatedBy((double)(num218 * 6.28318548f / 4f), default(Vector2)) * scaleFactor2, new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, y7, texture2D14.Width, num215)), projectile.GetAlpha(color25).MultiplyRGBA(new Microsoft.Xna.Framework.Color(255, 255, 255, 0)) * 0.03f, projectile.rotation, new Vector2((float)texture2D14.Width / 2f, (float)num215 / 2f), projectile.scale, spriteEffects, 0f); + } + return false; + } + + public override Color? GetAlpha(Color lightColor) + { + if (projectile.ai[0] < 255f) + return new Color((int)(projectile.ai[0]), (int)(projectile.ai[0]), (int)(projectile.ai[0]), (int)(projectile.localAI[1])); + else + return new Color(255, 255, 255, 0); + } + } +} \ No newline at end of file diff --git a/Projectiles/Patreon/DarkSpark.png b/Projectiles/Patreon/DarkSpark.png new file mode 100644 index 0000000000..30854eb730 Binary files /dev/null and b/Projectiles/Patreon/DarkSpark.png differ diff --git a/Projectiles/Patreon/DarkSparkBeam.cs b/Projectiles/Patreon/DarkSparkBeam.cs new file mode 100644 index 0000000000..1cb90ab12a --- /dev/null +++ b/Projectiles/Patreon/DarkSparkBeam.cs @@ -0,0 +1,295 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using Terraria.Enums; +using Terraria.GameContent.Shaders; +using Terraria.Graphics.Effects; + +namespace CalamityMod.Projectiles.Patreon +{ + public class DarkSparkBeam : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Beam"); + } + + public override void SetDefaults() + { + projectile.width = 18; + projectile.height = 18; + projectile.friendly = true; + projectile.magic = true; + projectile.penetrate = -1; + projectile.alpha = 255; + projectile.tileCollide = false; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 10; + } + + public override void AI() + { + Vector2? vector71 = null; + if (projectile.velocity.HasNaNs() || projectile.velocity == Vector2.Zero) + { + projectile.velocity = -Vector2.UnitY; + } + if (projectile.type != mod.ProjectileType("DarkSparkBeam") || !Main.projectile[(int)projectile.ai[1]].active || Main.projectile[(int)projectile.ai[1]].type != mod.ProjectileType("DarkSpark")) + { + projectile.Kill(); + return; + } + float num810 = (float)((int)projectile.ai[0]) - 2.5f; + Vector2 value36 = Vector2.Normalize(Main.projectile[(int)projectile.ai[1]].velocity); + Projectile projectile2 = Main.projectile[(int)projectile.ai[1]]; + float num811 = num810 * 0.5235988f; + Vector2 value37 = Vector2.Zero; + float num812; //0 to 1 + float y; //6 to 20 + float num813; //1.75 to 20 + float scaleFactor6; //-22 to -2 + Color color = new Color(1, 1, 1, 127); + projectile.Opacity = 1f; + if (projectile2.ai[0] < 720f) + { + num812 = 0f + projectile2.ai[0] / 1440f; //0 to 0.5 + y = 6f + projectile2.ai[0] / 720f * 7f; + if (projectile2.ai[0] > 360f) + { + int colorValue = (int)((0.01f + (((projectile2.ai[0] - 360f) / 360f) * 2.55f)) * 100f); + color = new Color(colorValue, colorValue, colorValue, 127); + } + if (projectile2.ai[0] < 480f) + { + num813 = 1.75f/* + 4f * (projectile2.ai[0] / 120f)*/; //20 to 16 + } + else + { + num813 = 3f + 5f * ((projectile2.ai[0] - 480f) / 240f); //7.99 to 3.01 + } + scaleFactor6 = -2f - projectile2.ai[0] / 720f * 5f; + } + else + { + float colorLimit = projectile2.ai[0] - 720f; + if (colorLimit > 255f) + { + colorLimit = 255f; + } + switch ((int)projectile.ai[0]) //R O Y G B I V + { + case 0: + color = new Color(255, 255 - (int)colorLimit, 255 - (int)colorLimit, 127); //red + break; + case 1: + color = new Color(255, 255 - (int)(colorLimit * 0.3529412f), 255 - (int)colorLimit, 127); //orange + break; + case 2: + color = new Color(255, 255, 255 - (int)colorLimit, 127); //yellow + break; + case 3: + color = new Color(255 - (int)colorLimit, 255 - (int)(colorLimit * 0.5f), 255 - (int)colorLimit, 127); //green + break; + case 4: + color = new Color(255 - (int)colorLimit, 255 - (int)colorLimit, 255, 127); //blue + break; + case 5: + color = new Color(255 - (int)(colorLimit * 0.7058824f), 255 - (int)colorLimit, 255 - (int)(colorLimit * 0.4901961), 127); //indigo + break; + case 6: + color = new Color(255 - (int)(colorLimit * 0.0666667f), 255 - (int)(colorLimit * 0.4901961), 255 - (int)(colorLimit * 0.0666667f), 127); //violet + break; + } + num812 = 0.5f; //0f, inverted + num813 = 10.875f; //1.75f, inverted + y = 13f; //6f, inverted + scaleFactor6 = -7f; //-2, inverted + } + float num814 = (projectile2.ai[0] + num810 * num813) / (num813 * 6f) * 6.28318548f; + num811 = Vector2.UnitY.RotatedBy((double)num814, default(Vector2)).Y * 0.5235988f * num812; + value37 = (Vector2.UnitY.RotatedBy((double)num814, default(Vector2)) * new Vector2(4f, y)).RotatedBy((double)projectile2.velocity.ToRotation(), default(Vector2)); + projectile.position = projectile2.Center + value36 * 16f - projectile.Size / 2f + new Vector2(0f, -Main.projectile[(int)projectile.ai[1]].gfxOffY); + projectile.position += projectile2.velocity.ToRotation().ToRotationVector2() * scaleFactor6; + projectile.position += value37; + projectile.velocity = Vector2.Normalize(projectile2.velocity).RotatedBy((double)num811, default(Vector2)); + projectile.scale = 1.5f * (1.5f - num812); + projectile.damage = projectile2.damage; + double damageMult = 1.0 + (double)(projectile2.ai[0] * 0.0025f); //1 to 3.5 + if (damageMult > 3.5) + { + damageMult = 3.5; + } + if (projectile2.ai[0] >= 720f) + { + projectile.damage = (int)((double)projectile.damage * damageMult); + vector71 = new Vector2?(projectile2.Center); + } + if (!Collision.CanHitLine(Main.player[projectile.owner].Center, 0, 0, projectile2.Center, 0, 0)) + { + vector71 = new Vector2?(Main.player[projectile.owner].Center); + } + projectile.friendly = (projectile2.ai[0] > 120f); + if (projectile.velocity.HasNaNs() || projectile.velocity == Vector2.Zero) + { + projectile.velocity = -Vector2.UnitY; + } + float num818 = projectile.velocity.ToRotation(); + projectile.rotation = num818 - 1.57079637f; + projectile.velocity = num818.ToRotationVector2(); + float num819 = 2f; + float num820 = 0f; + Vector2 samplingPoint = projectile.Center; + if (vector71.HasValue) + { + samplingPoint = vector71.Value; + } + float[] array3 = new float[(int)num819]; + Collision.LaserScan(samplingPoint, projectile.velocity, num820 * projectile.scale, 2400f, array3); + float num821 = 0f; + for (int num822 = 0; num822 < array3.Length; num822++) + { + num821 += array3[num822]; + } + num821 /= num819; + float amount = 0.75f; + projectile.localAI[1] = MathHelper.Lerp(projectile.localAI[1], num821, amount); + if (Math.Abs(projectile.localAI[1] - num821) < 100f && projectile.scale > 0.15f) + { + //color.A = 0; + Vector2 vector80 = projectile.Center + projectile.velocity * (projectile.localAI[1] - 14.5f * projectile.scale); + for (int num843 = 0; num843 < 2; num843++) + { + float num844 = projectile.velocity.ToRotation() + ((Main.rand.Next(2) == 1) ? -1f : 1f) * 1.57079637f; + float num845 = (float)Main.rand.NextDouble() * 0.8f + 1f; + Vector2 vector81 = new Vector2((float)Math.Cos((double)num844) * num845, (float)Math.Sin((double)num844) * num845); + int num846 = Dust.NewDust(vector80, 0, 0, 267, vector81.X, vector81.Y, 0, color, 3.3f); //267 + Main.dust[num846].color = color; + Main.dust[num846].scale = 1.2f; + if (projectile.scale > 1f) + { + Main.dust[num846].velocity *= projectile.scale; + Main.dust[num846].scale *= projectile.scale; + } + Main.dust[num846].noGravity = true; + if (projectile.scale != 1.4f) + { + Dust dust9 = Dust.CloneDust(num846); + dust9.color = color; + dust9.scale /= 2f; + dust9.noGravity = true; + } + Main.dust[num846].color = color; + } + if (Main.rand.Next(5) == 0) + { + Vector2 value42 = projectile.velocity.RotatedBy(1.5707963705062866, default(Vector2)) * ((float)Main.rand.NextDouble() - 0.5f) * (float)projectile.width; + int num847 = Dust.NewDust(vector80 + value42 - Vector2.One * 4f, 8, 8, 267, 0f, 0f, 100, color, 5f); + Main.dust[num847].velocity *= 0.5f; + Main.dust[num847].noGravity = true; + Main.dust[num847].velocity.Y = -Math.Abs(Main.dust[num847].velocity.Y); + } + DelegateMethods.v3_1 = color.ToVector3() * 0.3f; + float value43 = 0.1f * (float)Math.Sin((double)(Main.GlobalTime * 20f)); + Vector2 size = new Vector2(projectile.velocity.Length() * projectile.localAI[1], (float)projectile.width * projectile.scale); + float num848 = projectile.velocity.ToRotation(); + if (Main.netMode != 2) + { + ((WaterShaderData)Filters.Scene["WaterDistortion"].GetShader()).QueueRipple(projectile.position + new Vector2(size.X * 0.5f, 0f).RotatedBy((double)num848, default(Vector2)), color, size, RippleShape.Square, num848); + } + Utils.PlotTileLine(projectile.Center, projectile.Center + projectile.velocity * projectile.localAI[1], (float)projectile.width * projectile.scale, new Utils.PerLinePoint(DelegateMethods.CastLight)); + return; + } + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + if (projectile.velocity == Vector2.Zero) + { + return false; + } + Texture2D tex = Main.projectileTexture[projectile.type]; + float num228 = projectile.localAI[1]; + Projectile projectile2 = Main.projectile[(int)projectile.ai[1]]; + Color color = new Color(1, 1, 1, 127); + if (projectile2.ai[0] < 720f) + { + if (projectile2.ai[0] > 360f) + { + int colorValue = (int)((0.01f + (((projectile2.ai[0] - 360f) / 360f) * 2.55f)) * 100f); + color = new Color(colorValue, colorValue, colorValue, 127); + } + } + else + { + float colorLimit = projectile2.ai[0] - 720f; + if (colorLimit > 255f) + { + colorLimit = 255f; + } + switch ((int)projectile.ai[0]) //R O Y G B I V + { + case 0: + color = new Color(255, 255 - (int)colorLimit, 255 - (int)colorLimit, 127); //red + break; + case 1: + color = new Color(255, 255 - (int)(colorLimit * 0.3529412f), 255 - (int)colorLimit, 127); //orange + break; + case 2: + color = new Color(255, 255, 255 - (int)colorLimit, 127); //yellow + break; + case 3: + color = new Color(255 - (int)colorLimit, 255 - (int)(colorLimit * 0.5f), 255 - (int)colorLimit, 127); //green + break; + case 4: + color = new Color(255 - (int)colorLimit, 255 - (int)colorLimit, 255, 127); //blue + break; + case 5: + color = new Color(255 - (int)(colorLimit * 0.7058824f), 255 - (int)colorLimit, 255 - (int)(colorLimit * 0.4901961), 127); //indigo + break; + case 6: + color = new Color(255 - (int)(colorLimit * 0.0666667f), 255 - (int)(colorLimit * 0.4901961), 255 - (int)(colorLimit * 0.0666667f), 127); //violet + break; + } + } + Microsoft.Xna.Framework.Color value25 = color; + //value25.A = 0; + Vector2 value26 = projectile.Center.Floor(); + value26 += projectile.velocity * projectile.scale * 10.5f; + num228 -= projectile.scale * 14.5f * projectile.scale; + Vector2 vector29 = new Vector2(projectile.scale); + DelegateMethods.f_1 = 1f; + DelegateMethods.c_1 = value25 * 0.75f * projectile.Opacity; + Vector2 projPos = projectile.oldPos[0]; + projPos = new Vector2((float)projectile.width, (float)projectile.height) / 2f + Vector2.UnitY * projectile.gfxOffY - Main.screenPosition; + Utils.DrawLaser(Main.spriteBatch, tex, value26 - Main.screenPosition, value26 + projectile.velocity * num228 - Main.screenPosition, vector29, new Utils.LaserLineFraming(DelegateMethods.RainbowLaserDraw)); + DelegateMethods.c_1 = color * 0.75f * projectile.Opacity; + Utils.DrawLaser(Main.spriteBatch, tex, value26 - Main.screenPosition, value26 + projectile.velocity * num228 - Main.screenPosition, vector29 / 2f, new Utils.LaserLineFraming(DelegateMethods.RainbowLaserDraw)); + return false; + } + + public override void CutTiles() + { + DelegateMethods.tilecut_0 = TileCuttingContext.AttackProjectile; + Vector2 unit = projectile.velocity; + Utils.PlotTileLine(projectile.Center, projectile.Center + unit * projectile.localAI[1], (float)projectile.width * projectile.scale, new Utils.PerLinePoint(DelegateMethods.CutTiles)); + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + if (projHitbox.Intersects(targetHitbox)) + { + return true; + } + float num6 = 0f; + if (Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), projectile.Center, projectile.Center + projectile.velocity * projectile.localAI[1], 22f * projectile.scale, ref num6)) + { + return true; + } + return false; + } + } +} \ No newline at end of file diff --git a/Projectiles/Patreon/DarkSparkBeam.png b/Projectiles/Patreon/DarkSparkBeam.png new file mode 100644 index 0000000000..4bcb09bbf2 Binary files /dev/null and b/Projectiles/Patreon/DarkSparkBeam.png differ diff --git a/Projectiles/Patreon/DivineRetribution.cs b/Projectiles/Patreon/DivineRetribution.cs new file mode 100644 index 0000000000..cac084805e --- /dev/null +++ b/Projectiles/Patreon/DivineRetribution.cs @@ -0,0 +1,149 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Patreon +{ + public class DivineRetribution : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Divine Retribution"); + } + + public override void SetDefaults() + { + projectile.width = 30; + projectile.height = 30; + projectile.friendly = true; + projectile.ignoreWater = true; + projectile.tileCollide = false; + projectile.magic = true; + projectile.extraUpdates = 1; + projectile.penetrate = 1; + projectile.scale = 0.9f; + projectile.timeLeft = 420; + ProjectileID.Sets.TrailCacheLength[projectile.type] = 7; + ProjectileID.Sets.TrailingMode[projectile.type] = 0; + } + + public override void AI() + { + float num953 = 25f * projectile.ai[1]; //100 + float scaleFactor12 = 5f * projectile.ai[1]; //5 + float num954 = 500f; + if ((double)Math.Abs(projectile.velocity.X) > 0.2) + { + projectile.spriteDirection = -projectile.direction; + } + if (projectile.velocity.X < 0f) + { + projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X); + } + else + { + projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X); + } + Lighting.AddLight(projectile.Center, 0.7f, 0.3f, 0f); + if (Main.player[projectile.owner].active && !Main.player[projectile.owner].dead) + { + if (projectile.Distance(Main.player[projectile.owner].Center) > num954) + { + Vector2 vector102 = projectile.DirectionTo(Main.player[projectile.owner].Center); + if (vector102.HasNaNs()) + { + vector102 = Vector2.UnitY; + } + projectile.velocity = (projectile.velocity * (num953 - 1f) + vector102 * scaleFactor12) / num953; + return; + } + float num472 = projectile.Center.X; + float num473 = projectile.Center.Y; + float num474 = 600f; + bool flag17 = false; + for (int num475 = 0; num475 < 200; num475++) + { + if (Main.npc[num475].CanBeChasedBy(projectile, false) && Collision.CanHit(projectile.Center, 1, 1, Main.npc[num475].Center, 1, 1)) + { + float num476 = Main.npc[num475].position.X + (float)(Main.npc[num475].width / 2); + float num477 = Main.npc[num475].position.Y + (float)(Main.npc[num475].height / 2); + float num478 = Math.Abs(projectile.position.X + (float)(projectile.width / 2) - num476) + Math.Abs(projectile.position.Y + (float)(projectile.height / 2) - num477); + if (num478 < num474) + { + num474 = num478; + num472 = num476; + num473 = num477; + flag17 = true; + } + } + } + if (flag17) + { + float num483 = 9f; + Vector2 vector35 = new Vector2(projectile.position.X + (float)projectile.width * 0.5f, projectile.position.Y + (float)projectile.height * 0.5f); + float num484 = num472 - vector35.X; + float num485 = num473 - vector35.Y; + float num486 = (float)Math.Sqrt((double)(num484 * num484 + num485 * num485)); + num486 = num483 / num486; + num484 *= num486; + num485 *= num486; + projectile.velocity.X = (projectile.velocity.X * 20f + num484) / 21f; + projectile.velocity.Y = (projectile.velocity.Y * 20f + num485) / 21f; + return; + } + } + else + { + if (projectile.timeLeft > 30) + { + projectile.timeLeft = 30; + } + } + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + Vector2 drawOrigin = new Vector2(Main.projectileTexture[projectile.type].Width * 0.5f, projectile.height * 0.5f); + for (int k = 0; k < projectile.oldPos.Length; k++) + { + Vector2 drawPos = projectile.oldPos[k] - Main.screenPosition + drawOrigin + new Vector2(0f, projectile.gfxOffY); + Color color = projectile.GetAlpha(lightColor) * ((float)(projectile.oldPos.Length - k) / (float)projectile.oldPos.Length); + spriteBatch.Draw(Main.projectileTexture[projectile.type], drawPos, null, color, projectile.rotation, drawOrigin, projectile.scale, SpriteEffects.None, 0f); + } + return true; + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + target.AddBuff(mod.BuffType("CrushDepth"), 600); + target.AddBuff(mod.BuffType("HolyLight"), 600); + } + + public override void Kill(int timeLeft) + { + Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 74, 1f, 0f); + projectile.position = projectile.Center; + projectile.width = (projectile.height = 64); + projectile.position.X = projectile.position.X - (float)(projectile.width / 2); + projectile.position.Y = projectile.position.Y - (float)(projectile.height / 2); + for (int num193 = 0; num193 < 6; num193++) + { + Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 244, 0, 0); + } + for (int num194 = 0; num194 < 10; num194++) + { + int num195 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 244, 0, 0); + Main.dust[num195].noGravity = true; + Main.dust[num195].velocity *= 3f; + num195 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 244, 0, 0); + Main.dust[num195].velocity *= 2f; + Main.dust[num195].noGravity = true; + } + projectile.Damage(); + } + } +} \ No newline at end of file diff --git a/Projectiles/Patreon/DivineRetribution.png b/Projectiles/Patreon/DivineRetribution.png new file mode 100644 index 0000000000..2e733503aa Binary files /dev/null and b/Projectiles/Patreon/DivineRetribution.png differ diff --git a/Projectiles/Patreon/LightBall.cs b/Projectiles/Patreon/LightBall.cs new file mode 100644 index 0000000000..15966f6dce --- /dev/null +++ b/Projectiles/Patreon/LightBall.cs @@ -0,0 +1,66 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Patreon +{ + public class LightBall : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Light Ball"); + } + + public override void SetDefaults() + { + projectile.width = 28; + projectile.height = 28; + projectile.friendly = true; + projectile.alpha = 60; + projectile.penetrate = 1; + projectile.timeLeft = 300; + projectile.magic = true; + } + + public override void AI() + { + Lighting.AddLight(projectile.Center, ((255 - projectile.alpha) * 0.5f) / 255f, ((255 - projectile.alpha) * 0.5f) / 255f, ((255 - projectile.alpha) * 0.5f) / 255f); + projectile.velocity.X *= 0.995f; + projectile.velocity.Y *= 0.995f; + Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 212, projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f); + } + + public override void Kill(int timeLeft) + { + Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 14); + projectile.position.X = projectile.position.X + (float)(projectile.width / 2); + projectile.position.Y = projectile.position.Y + (float)(projectile.height / 2); + projectile.width = 300; + projectile.height = 300; + projectile.position.X = projectile.position.X - (float)(projectile.width / 2); + projectile.position.Y = projectile.position.Y - (float)(projectile.height / 2); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, mod.ProjectileType("LightBallExplosion"), projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); + for (int num621 = 0; num621 < 30; num621++) + { + int num622 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 212, 0f, 0f, 100, default(Color), 1.2f); + Main.dust[num622].velocity *= 3f; + if (Main.rand.Next(2) == 0) + { + Main.dust[num622].scale = 0.5f; + Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f; + } + } + for (int num623 = 0; num623 < 60; num623++) + { + int num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 212, 0f, 0f, 100, default(Color), 1.7f); + Main.dust[num624].noGravity = true; + Main.dust[num624].velocity *= 5f; + num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 212, 0f, 0f, 100, default(Color), 1f); + Main.dust[num624].velocity *= 2f; + } + } + } +} \ No newline at end of file diff --git a/Projectiles/Patreon/LightBall.png b/Projectiles/Patreon/LightBall.png new file mode 100644 index 0000000000..6ecd3ed3f9 Binary files /dev/null and b/Projectiles/Patreon/LightBall.png differ diff --git a/Projectiles/Patreon/LightBallExplosion.cs b/Projectiles/Patreon/LightBallExplosion.cs new file mode 100644 index 0000000000..9eef246e6d --- /dev/null +++ b/Projectiles/Patreon/LightBallExplosion.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Patreon +{ + public class LightBallExplosion : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Explosion"); + } + + public override void SetDefaults() + { + projectile.width = 300; + projectile.height = 300; + projectile.friendly = true; + projectile.ignoreWater = true; + projectile.tileCollide = false; + projectile.penetrate = -1; + projectile.timeLeft = 5; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 3; + } + } +} \ No newline at end of file diff --git a/Projectiles/Patreon/LightBallExplosion.png b/Projectiles/Patreon/LightBallExplosion.png new file mode 100644 index 0000000000..3ccaea528f Binary files /dev/null and b/Projectiles/Patreon/LightBallExplosion.png differ diff --git a/Projectiles/Patreon/LightBead.cs b/Projectiles/Patreon/LightBead.cs new file mode 100644 index 0000000000..76a42c4eb6 --- /dev/null +++ b/Projectiles/Patreon/LightBead.cs @@ -0,0 +1,110 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Patreon +{ + public class LightBead : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Light Bead"); + } + + public override void SetDefaults() + { + projectile.width = 8; + projectile.height = 8; + projectile.friendly = true; + projectile.alpha = 50; + projectile.scale = 1.2f; + projectile.penetrate = 1; + projectile.timeLeft = 600; + projectile.magic = true; + } + + public override void AI() + { + Lighting.AddLight(projectile.Center, ((255 - projectile.alpha) * 0.5f) / 255f, ((255 - projectile.alpha) * 0.5f) / 255f, ((255 - projectile.alpha) * 0.5f) / 255f); + projectile.rotation += projectile.velocity.X * 0.2f; + projectile.ai[1] += 1f; + if (Main.rand.Next(4) == 0) + { + int num300 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 212, 0f, 0f, 0, default(Color), 1f); + Main.dust[num300].noGravity = true; + Main.dust[num300].velocity *= 0.5f; + Main.dust[num300].scale *= 0.9f; + } + if (projectile.ai[1] > 300f) + { + projectile.scale -= 0.05f; + if ((double)projectile.scale <= 0.2) + { + projectile.scale = 0.2f; + projectile.Kill(); + return; + } + } + float centerX = projectile.Center.X; + float centerY = projectile.Center.Y; + float num474 = 500f; + bool homeIn = false; + for (int num475 = 0; num475 < 200; num475++) + { + if (Main.npc[num475].CanBeChasedBy(projectile, false) && Collision.CanHit(projectile.Center, 1, 1, Main.npc[num475].Center, 1, 1)) + { + float num476 = Main.npc[num475].position.X + (float)(Main.npc[num475].width / 2); + float num477 = Main.npc[num475].position.Y + (float)(Main.npc[num475].height / 2); + float num478 = Math.Abs(projectile.position.X + (float)(projectile.width / 2) - num476) + Math.Abs(projectile.position.Y + (float)(projectile.height / 2) - num477); + if (num478 < num474) + { + num474 = num478; + centerX = num476; + centerY = num477; + homeIn = true; + } + } + } + if (homeIn) + { + float num483 = 18f; + Vector2 vector35 = new Vector2(projectile.position.X + (float)projectile.width * 0.5f, projectile.position.Y + (float)projectile.height * 0.5f); + float num484 = centerX - vector35.X; + float num485 = centerY - vector35.Y; + float num486 = (float)Math.Sqrt((double)(num484 * num484 + num485 * num485)); + num486 = num483 / num486; + num484 *= num486; + num485 *= num486; + projectile.velocity.X = (projectile.velocity.X * 10f + num484) / 11f; + projectile.velocity.Y = (projectile.velocity.Y * 10f + num485) / 11f; + return; + } + } + + public override void Kill(int timeLeft) + { + for (int k = 0; k < 5; k++) + { + Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 212, projectile.oldVelocity.X * 0.5f, projectile.oldVelocity.Y * 0.5f); + } + int num251 = Main.rand.Next(2, 3); + if (projectile.owner == Main.myPlayer) + { + for (int num252 = 0; num252 < num251; num252++) + { + Vector2 value15 = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101)); + while (value15.X == 0f && value15.Y == 0f) + { + value15 = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101)); + } + value15.Normalize(); + value15 *= (float)Main.rand.Next(70, 101) * 0.1f; + Projectile.NewProjectile(projectile.oldPosition.X + (float)(projectile.width / 2), projectile.oldPosition.Y + (float)(projectile.height / 2), value15.X, value15.Y, mod.ProjectileType("LightBeadSplit"), (int)((double)projectile.damage * 0.5), 0f, projectile.owner, 0f, 0f); + } + } + } + } +} \ No newline at end of file diff --git a/Projectiles/Patreon/LightBead.png b/Projectiles/Patreon/LightBead.png new file mode 100644 index 0000000000..3ff61e7647 Binary files /dev/null and b/Projectiles/Patreon/LightBead.png differ diff --git a/Projectiles/Patreon/LightBeadSplit.cs b/Projectiles/Patreon/LightBeadSplit.cs new file mode 100644 index 0000000000..1ee869f9b2 --- /dev/null +++ b/Projectiles/Patreon/LightBeadSplit.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Patreon +{ + public class LightBeadSplit : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Light Bead"); + } + + public override void SetDefaults() + { + projectile.width = 8; + projectile.height = 8; + projectile.friendly = true; + projectile.alpha = 50; + projectile.scale = 0.6f; + projectile.penetrate = 1; + projectile.timeLeft = 400; + projectile.magic = true; + } + + public override void AI() + { + Lighting.AddLight(projectile.Center, ((255 - projectile.alpha) * 0.5f) / 255f, ((255 - projectile.alpha) * 0.5f) / 255f, ((255 - projectile.alpha) * 0.5f) / 255f); + projectile.rotation += projectile.velocity.X * 0.2f; + projectile.velocity *= 0.985f; + + } + + public override void Kill(int timeLeft) + { + for (int k = 0; k < 5; k++) + { + Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 212, projectile.oldVelocity.X * 0.5f, projectile.oldVelocity.Y * 0.5f); + } + } + } +} \ No newline at end of file diff --git a/Projectiles/Patreon/LightBeadSplit.png b/Projectiles/Patreon/LightBeadSplit.png new file mode 100644 index 0000000000..3ff61e7647 Binary files /dev/null and b/Projectiles/Patreon/LightBeadSplit.png differ diff --git a/Projectiles/Patreon/MiniGuardianAttack.cs b/Projectiles/Patreon/MiniGuardianAttack.cs new file mode 100644 index 0000000000..dc568de96d --- /dev/null +++ b/Projectiles/Patreon/MiniGuardianAttack.cs @@ -0,0 +1,246 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.Localization; +using Terraria.ID; +using Terraria.DataStructures; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Patreon +{ + public class MiniGuardianAttack : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Offensive Guardian"); + Main.projFrames[projectile.type] = 4; + ProjectileID.Sets.MinionSacrificable[projectile.type] = true; + ProjectileID.Sets.MinionTargettingFeature[projectile.type] = true; + } + + public override void SetDefaults() + { + projectile.netImportant = true; + projectile.tileCollide = false; + projectile.width = 60; + projectile.height = 88; + projectile.minionSlots = 0f; + projectile.minion = true; + projectile.friendly = true; + projectile.penetrate = -1; + projectile.timeLeft = 18000; + projectile.timeLeft *= 5; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 6; + } + + public override void AI() + { + Player player = Main.player[projectile.owner]; + CalamityPlayer modPlayer = player.GetModPlayer(mod); + if (player.dead) + { + modPlayer.gOffense = false; + } + if (modPlayer.gOffense) + { + projectile.timeLeft = 2; + } + if (!modPlayer.pArtifact || (!modPlayer.tarraSummon && !modPlayer.bloodflareSummon && !modPlayer.godSlayerSummon && !modPlayer.silvaSummon && !modPlayer.dsSetBonus)) + { + projectile.active = false; + return; + } + float num535 = projectile.position.X; + float num536 = projectile.position.Y; + float num537 = 3000f; + bool flag19 = false; + NPC ownerMinionAttackTargetNPC2 = projectile.OwnerMinionAttackTargetNPC; + if (ownerMinionAttackTargetNPC2 != null && ownerMinionAttackTargetNPC2.CanBeChasedBy(projectile, false)) + { + float num539 = ownerMinionAttackTargetNPC2.position.X + (float)(ownerMinionAttackTargetNPC2.width / 2); + float num540 = ownerMinionAttackTargetNPC2.position.Y + (float)(ownerMinionAttackTargetNPC2.height / 2); + float num541 = Math.Abs(projectile.position.X + (float)(projectile.width / 2) - num539) + Math.Abs(projectile.position.Y + (float)(projectile.height / 2) - num540); + if (num541 < num537) + { + num537 = num541; + num535 = num539; + num536 = num540; + flag19 = true; + } + } + if (!flag19) + { + int num3; + for (int num542 = 0; num542 < 200; num542 = num3 + 1) + { + if (Main.npc[num542].CanBeChasedBy(projectile, false)) + { + float num543 = Main.npc[num542].position.X + (float)(Main.npc[num542].width / 2); + float num544 = Main.npc[num542].position.Y + (float)(Main.npc[num542].height / 2); + float num545 = Math.Abs(projectile.position.X + (float)(projectile.width / 2) - num543) + Math.Abs(projectile.position.Y + (float)(projectile.height / 2) - num544); + if (num545 < num537) + { + num537 = num545; + num535 = num543; + num536 = num544; + flag19 = true; + } + } + num3 = num542; + } + } + if (!flag19) + { + float num16 = 0.5f; + projectile.tileCollide = false; + int num17 = 100; + Vector2 vector3 = new Vector2(projectile.position.X + (float)projectile.width * 0.5f, projectile.position.Y + (float)projectile.height * 0.5f); + float num18 = Main.player[projectile.owner].position.X + (float)(Main.player[projectile.owner].width / 2) - vector3.X; + float num19 = Main.player[projectile.owner].position.Y + (float)(Main.player[projectile.owner].height / 2) - vector3.Y; + num19 += (float)Main.rand.Next(-10, 21); + num18 += (float)Main.rand.Next(-10, 21); + num18 += (float)(60 * -(float)Main.player[projectile.owner].direction); + num19 -= 60f; + float num20 = (float)Math.Sqrt((double)(num18 * num18 + num19 * num19)); + float num21 = 18f; + + if (num20 < (float)num17 && Main.player[projectile.owner].velocity.Y == 0f && + projectile.position.Y + (float)projectile.height <= Main.player[projectile.owner].position.Y + (float)Main.player[projectile.owner].height && + !Collision.SolidCollision(projectile.position, projectile.width, projectile.height)) + { + projectile.ai[0] = 0f; + if (projectile.velocity.Y < -6f) + { + projectile.velocity.Y = -6f; + } + } + if (num20 > 2000f) + { + projectile.position.X = Main.player[projectile.owner].Center.X - (float)(projectile.width / 2); + projectile.position.Y = Main.player[projectile.owner].Center.Y - (float)(projectile.height / 2); + projectile.netUpdate = true; + } + if (num20 < 50f) + { + if (Math.Abs(projectile.velocity.X) > 2f || Math.Abs(projectile.velocity.Y) > 2f) + { + projectile.velocity *= 0.90f; + } + num16 = 0.01f; + } + else + { + if (num20 < 100f) + { + num16 = 0.1f; + } + if (num20 > 300f) + { + num16 = 1f; + } + num20 = num21 / num20; + num18 *= num20; + num19 *= num20; + } + + if (projectile.velocity.X < num18) + { + projectile.velocity.X = projectile.velocity.X + num16; + if (num16 > 0.05f && projectile.velocity.X < 0f) + { + projectile.velocity.X = projectile.velocity.X + num16; + } + } + if (projectile.velocity.X > num18) + { + projectile.velocity.X = projectile.velocity.X - num16; + if (num16 > 0.05f && projectile.velocity.X > 0f) + { + projectile.velocity.X = projectile.velocity.X - num16; + } + } + if (projectile.velocity.Y < num19) + { + projectile.velocity.Y = projectile.velocity.Y + num16; + if (num16 > 0.05f && projectile.velocity.Y < 0f) + { + projectile.velocity.Y = projectile.velocity.Y + num16 * 2f; + } + } + if (projectile.velocity.Y > num19) + { + projectile.velocity.Y = projectile.velocity.Y - num16; + if (num16 > 0.05f && projectile.velocity.Y > 0f) + { + projectile.velocity.Y = projectile.velocity.Y - num16 * 2f; + } + } + } + else + { + if (projectile.ai[1] == -1f) + { + projectile.ai[1] = 17f; + } + if (projectile.ai[1] > 0f) + { + projectile.ai[1] -= 1f; + } + if (projectile.ai[1] == 0f) + { + float num550 = 24f; //12 + Vector2 vector43 = new Vector2(projectile.position.X + (float)projectile.width * 0.5f, projectile.position.Y + (float)projectile.height * 0.5f); + float num551 = num535 - vector43.X; + float num552 = num536 - vector43.Y; + float num553 = (float)Math.Sqrt((double)(num551 * num551 + num552 * num552)); + if (num553 < 100f) + { + num550 = 28f; //14 + } + if (modPlayer.gDefense) + { + num550 *= 0.95f; + } + num553 = num550 / num553; + num551 *= num553; + num552 *= num553; + projectile.velocity.X = (projectile.velocity.X * 14f + num551) / 15f; + projectile.velocity.Y = (projectile.velocity.Y * 14f + num552) / 15f; + } + else + { + if (Math.Abs(projectile.velocity.X) + Math.Abs(projectile.velocity.Y) < 10f) + { + projectile.velocity *= 1.05f; + } + } + } + if ((double)projectile.velocity.X > 0.25) + { + projectile.direction = -1; + } + else if ((double)projectile.velocity.X < -0.25) + { + projectile.direction = 1; + } + + if ((double)Math.Abs(projectile.velocity.X) > 0.2) + { + projectile.spriteDirection = -projectile.direction; + } + + projectile.frameCounter++; + if (projectile.frameCounter > 5) + { + projectile.frame++; + projectile.frameCounter = 0; + } + if (projectile.frame > 3) + { + projectile.frame = 0; + } + } + } +} \ No newline at end of file diff --git a/Projectiles/Patreon/MiniGuardianAttack.png b/Projectiles/Patreon/MiniGuardianAttack.png new file mode 100644 index 0000000000..2c02be3737 Binary files /dev/null and b/Projectiles/Patreon/MiniGuardianAttack.png differ diff --git a/Projectiles/Patreon/MiniGuardianDefense.cs b/Projectiles/Patreon/MiniGuardianDefense.cs new file mode 100644 index 0000000000..0af945870b --- /dev/null +++ b/Projectiles/Patreon/MiniGuardianDefense.cs @@ -0,0 +1,246 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.Localization; +using Terraria.ID; +using Terraria.DataStructures; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Patreon +{ + public class MiniGuardianDefense : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Defensive Guardian"); + Main.projFrames[projectile.type] = 4; + ProjectileID.Sets.MinionSacrificable[projectile.type] = true; + ProjectileID.Sets.MinionTargettingFeature[projectile.type] = true; + } + + public override void SetDefaults() + { + projectile.netImportant = true; + projectile.tileCollide = false; + projectile.width = 62; + projectile.height = 80; + projectile.minionSlots = 0f; + projectile.minion = true; + projectile.friendly = true; + projectile.penetrate = -1; + projectile.timeLeft = 18000; + projectile.timeLeft *= 5; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 6; + } + + public override void AI() + { + Player player = Main.player[projectile.owner]; + CalamityPlayer modPlayer = player.GetModPlayer(mod); + if (player.dead) + { + modPlayer.gDefense = false; + } + if (modPlayer.gDefense) + { + projectile.timeLeft = 2; + } + if (!modPlayer.pArtifact || player.maxMinions < 8) + { + projectile.active = false; + return; + } + float num535 = projectile.position.X; + float num536 = projectile.position.Y; + float num537 = 3000f; + bool flag19 = false; + NPC ownerMinionAttackTargetNPC2 = projectile.OwnerMinionAttackTargetNPC; + if (ownerMinionAttackTargetNPC2 != null && ownerMinionAttackTargetNPC2.CanBeChasedBy(projectile, false)) + { + float num539 = ownerMinionAttackTargetNPC2.position.X + (float)(ownerMinionAttackTargetNPC2.width / 2); + float num540 = ownerMinionAttackTargetNPC2.position.Y + (float)(ownerMinionAttackTargetNPC2.height / 2); + float num541 = Math.Abs(projectile.position.X + (float)(projectile.width / 2) - num539) + Math.Abs(projectile.position.Y + (float)(projectile.height / 2) - num540); + if (num541 < num537) + { + num537 = num541; + num535 = num539; + num536 = num540; + flag19 = true; + } + } + if (!flag19) + { + int num3; + for (int num542 = 0; num542 < 200; num542 = num3 + 1) + { + if (Main.npc[num542].CanBeChasedBy(projectile, false)) + { + float num543 = Main.npc[num542].position.X + (float)(Main.npc[num542].width / 2); + float num544 = Main.npc[num542].position.Y + (float)(Main.npc[num542].height / 2); + float num545 = Math.Abs(projectile.position.X + (float)(projectile.width / 2) - num543) + Math.Abs(projectile.position.Y + (float)(projectile.height / 2) - num544); + if (num545 < num537) + { + num537 = num545; + num535 = num543; + num536 = num544; + flag19 = true; + } + } + num3 = num542; + } + } + if (!flag19) + { + float num16 = 0.5f; + projectile.tileCollide = false; + int num17 = 100; + Vector2 vector3 = new Vector2(projectile.position.X + (float)projectile.width * 0.5f, projectile.position.Y + (float)projectile.height * 0.5f); + float num18 = Main.player[projectile.owner].position.X + (float)(Main.player[projectile.owner].width / 2) - vector3.X; + float num19 = Main.player[projectile.owner].position.Y + (float)(Main.player[projectile.owner].height / 2) - vector3.Y; + num19 += (float)Main.rand.Next(-10, 21); + num18 += (float)Main.rand.Next(-10, 21); + num18 += (float)(60 * -(float)Main.player[projectile.owner].direction); + num19 -= 60f; + float num20 = (float)Math.Sqrt((double)(num18 * num18 + num19 * num19)); + float num21 = 18f; + + if (num20 < (float)num17 && Main.player[projectile.owner].velocity.Y == 0f && + projectile.position.Y + (float)projectile.height <= Main.player[projectile.owner].position.Y + (float)Main.player[projectile.owner].height && + !Collision.SolidCollision(projectile.position, projectile.width, projectile.height)) + { + projectile.ai[0] = 0f; + if (projectile.velocity.Y < -6f) + { + projectile.velocity.Y = -6f; + } + } + if (num20 > 2000f) + { + projectile.position.X = Main.player[projectile.owner].Center.X - (float)(projectile.width / 2); + projectile.position.Y = Main.player[projectile.owner].Center.Y - (float)(projectile.height / 2); + projectile.netUpdate = true; + } + if (num20 < 50f) + { + if (Math.Abs(projectile.velocity.X) > 2f || Math.Abs(projectile.velocity.Y) > 2f) + { + projectile.velocity *= 0.90f; + } + num16 = 0.01f; + } + else + { + if (num20 < 100f) + { + num16 = 0.1f; + } + if (num20 > 300f) + { + num16 = 1f; + } + num20 = num21 / num20; + num18 *= num20; + num19 *= num20; + } + + if (projectile.velocity.X < num18) + { + projectile.velocity.X = projectile.velocity.X + num16; + if (num16 > 0.05f && projectile.velocity.X < 0f) + { + projectile.velocity.X = projectile.velocity.X + num16; + } + } + if (projectile.velocity.X > num18) + { + projectile.velocity.X = projectile.velocity.X - num16; + if (num16 > 0.05f && projectile.velocity.X > 0f) + { + projectile.velocity.X = projectile.velocity.X - num16; + } + } + if (projectile.velocity.Y < num19) + { + projectile.velocity.Y = projectile.velocity.Y + num16; + if (num16 > 0.05f && projectile.velocity.Y < 0f) + { + projectile.velocity.Y = projectile.velocity.Y + num16 * 2f; + } + } + if (projectile.velocity.Y > num19) + { + projectile.velocity.Y = projectile.velocity.Y - num16; + if (num16 > 0.05f && projectile.velocity.Y > 0f) + { + projectile.velocity.Y = projectile.velocity.Y - num16 * 2f; + } + } + } + else + { + if (projectile.ai[1] == -1f) + { + projectile.ai[1] = 17f; + } + if (projectile.ai[1] > 0f) + { + projectile.ai[1] -= 1f; + } + if (projectile.ai[1] == 0f) + { + float num550 = 24f; //12 + Vector2 vector43 = new Vector2(projectile.position.X + (float)projectile.width * 0.5f, projectile.position.Y + (float)projectile.height * 0.5f); + float num551 = num535 - vector43.X; + float num552 = num536 - vector43.Y; + float num553 = (float)Math.Sqrt((double)(num551 * num551 + num552 * num552)); + if (num553 < 100f) + { + num550 = 28f; //14 + } + if (modPlayer.gOffense) + { + num550 *= 0.95f; + } + num553 = num550 / num553; + num551 *= num553; + num552 *= num553; + projectile.velocity.X = (projectile.velocity.X * 14f + num551) / 15f; + projectile.velocity.Y = (projectile.velocity.Y * 14f + num552) / 15f; + } + else + { + if (Math.Abs(projectile.velocity.X) + Math.Abs(projectile.velocity.Y) < 10f) + { + projectile.velocity *= 1.05f; + } + } + } + if ((double)projectile.velocity.X > 0.25) + { + projectile.direction = -1; + } + else if ((double)projectile.velocity.X < -0.25) + { + projectile.direction = 1; + } + + if ((double)Math.Abs(projectile.velocity.X) > 0.2) + { + projectile.spriteDirection = -projectile.direction; + } + + projectile.frameCounter++; + if (projectile.frameCounter > 5) + { + projectile.frame++; + projectile.frameCounter = 0; + } + if (projectile.frame > 3) + { + projectile.frame = 0; + } + } + } +} \ No newline at end of file diff --git a/Projectiles/Patreon/MiniGuardianDefense.png b/Projectiles/Patreon/MiniGuardianDefense.png new file mode 100644 index 0000000000..990097254b Binary files /dev/null and b/Projectiles/Patreon/MiniGuardianDefense.png differ diff --git a/Projectiles/Patreon/MiniGuardianHealer.cs b/Projectiles/Patreon/MiniGuardianHealer.cs new file mode 100644 index 0000000000..ef4473757e --- /dev/null +++ b/Projectiles/Patreon/MiniGuardianHealer.cs @@ -0,0 +1,164 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.Localization; +using Terraria.ID; +using Terraria.DataStructures; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Patreon +{ + public class MiniGuardianHealer : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Healer Guardian"); + Main.projFrames[projectile.type] = 4; + ProjectileID.Sets.MinionSacrificable[projectile.type] = true; + ProjectileID.Sets.MinionTargettingFeature[projectile.type] = true; + } + + public override void SetDefaults() + { + projectile.netImportant = true; + projectile.tileCollide = false; + projectile.width = 68; + projectile.height = 82; + projectile.friendly = true; + projectile.minionSlots = 0f; + projectile.minion = true; + projectile.penetrate = -1; + projectile.timeLeft = 18000; + projectile.timeLeft *= 5; + } + + public override void AI() + { + Player player = Main.player[projectile.owner]; + CalamityPlayer modPlayer = player.GetModPlayer(mod); + if (player.dead) + { + modPlayer.gHealer = false; + } + if (modPlayer.gHealer) + { + projectile.timeLeft = 2; + } + if (!modPlayer.pArtifact) + { + projectile.active = false; + return; + } + Player projOwner = Main.player[projectile.owner]; + float num16 = 0.5f; + projectile.tileCollide = false; + int num17 = 100; + Vector2 vector3 = new Vector2(projectile.position.X + (float)projectile.width * 0.5f, projectile.position.Y + (float)projectile.height * 0.5f); + float num18 = projOwner.position.X + (float)(projOwner.width / 2) - vector3.X; + float num19 = projOwner.position.Y + (float)(projOwner.height / 2) - vector3.Y; + num19 += (float)Main.rand.Next(-10, 21); + num18 += (float)Main.rand.Next(-10, 21); + num18 += (float)(60 * -(float)projOwner.direction); + num19 -= 60f; + float num20 = (float)Math.Sqrt((double)(num18 * num18 + num19 * num19)); + float num21 = 18f; + + if (num20 < (float)num17 && projOwner.velocity.Y == 0f && + projectile.position.Y + (float)projectile.height <= projOwner.position.Y + (float)projOwner.height && + !Collision.SolidCollision(projectile.position, projectile.width, projectile.height)) + { + projectile.ai[0] = 0f; + if (projectile.velocity.Y < -6f) + { + projectile.velocity.Y = -6f; + } + } + if (num20 > 2000f) + { + projectile.position.X = Main.player[projectile.owner].Center.X - (float)(projectile.width / 2); + projectile.position.Y = Main.player[projectile.owner].Center.Y - (float)(projectile.height / 2); + projectile.netUpdate = true; + } + if (num20 < 50f) + { + if (Math.Abs(projectile.velocity.X) > 2f || Math.Abs(projectile.velocity.Y) > 2f) + { + projectile.velocity *= 0.90f; + } + num16 = 0.01f; + } + else + { + if (num20 < 100f) + { + num16 = 0.1f; + } + if (num20 > 300f) + { + num16 = 1f; + } + num20 = num21 / num20; + num18 *= num20; + num19 *= num20; + } + + if (projectile.velocity.X < num18) + { + projectile.velocity.X = projectile.velocity.X + num16; + if (num16 > 0.05f && projectile.velocity.X < 0f) + { + projectile.velocity.X = projectile.velocity.X + num16; + } + } + if (projectile.velocity.X > num18) + { + projectile.velocity.X = projectile.velocity.X - num16; + if (num16 > 0.05f && projectile.velocity.X > 0f) + { + projectile.velocity.X = projectile.velocity.X - num16; + } + } + if (projectile.velocity.Y < num19) + { + projectile.velocity.Y = projectile.velocity.Y + num16; + if (num16 > 0.05f && projectile.velocity.Y < 0f) + { + projectile.velocity.Y = projectile.velocity.Y + num16 * 2f; + } + } + if (projectile.velocity.Y > num19) + { + projectile.velocity.Y = projectile.velocity.Y - num16; + if (num16 > 0.05f && projectile.velocity.Y > 0f) + { + projectile.velocity.Y = projectile.velocity.Y - num16 * 2f; + } + } + if ((double)projectile.velocity.X > 0.25) + { + projectile.direction = -1; + } + else if ((double)projectile.velocity.X < -0.25) + { + projectile.direction = 1; + } + + if ((double)Math.Abs(projectile.velocity.X) > 0.2) + { + projectile.spriteDirection = -projectile.direction; + } + + projectile.frameCounter++; + if (projectile.frameCounter > 5) + { + projectile.frame++; + projectile.frameCounter = 0; + } + if (projectile.frame > 3) + { + projectile.frame = 0; + } + } + } +} \ No newline at end of file diff --git a/Projectiles/Patreon/MiniGuardianHealer.png b/Projectiles/Patreon/MiniGuardianHealer.png new file mode 100644 index 0000000000..6bf4aa46e6 Binary files /dev/null and b/Projectiles/Patreon/MiniGuardianHealer.png differ diff --git a/Projectiles/Permafrost/FrostyFlare.cs b/Projectiles/Permafrost/FrostyFlare.cs index 1ef0a1a050..04402060d5 100644 --- a/Projectiles/Permafrost/FrostyFlare.cs +++ b/Projectiles/Permafrost/FrostyFlare.cs @@ -15,7 +15,6 @@ namespace CalamityMod.Projectiles.Permafrost projectile.height = 10; projectile.coldDamage = true; projectile.friendly = true; - projectile.thrown = true; projectile.penetrate = -1; projectile.timeLeft = 300; } @@ -51,7 +50,6 @@ namespace CalamityMod.Projectiles.Permafrost vel *= 30f; int p = Projectile.NewProjectile(pos, vel + projectile.velocity / 4f, mod.ProjectileType("FrostShardFriendly"), projectile.damage, projectile.knockBack, projectile.owner); Main.projectile[p].minion = false; - Main.projectile[p].thrown = true; } int index2 = Dust.NewDust(projectile.position, projectile.width, projectile.height, 172); @@ -76,7 +74,6 @@ namespace CalamityMod.Projectiles.Permafrost vel *= 30f; int p = Projectile.NewProjectile(pos, vel + Main.npc[id].velocity, mod.ProjectileType("FrostShardFriendly"), projectile.damage, projectile.knockBack, projectile.owner); Main.projectile[p].minion = false; - Main.projectile[p].thrown = true; } } else diff --git a/Projectiles/Permafrost/IcicleArrow.cs b/Projectiles/Permafrost/IcicleArrow.cs index bd093e979f..ce5c44a878 100644 --- a/Projectiles/Permafrost/IcicleArrow.cs +++ b/Projectiles/Permafrost/IcicleArrow.cs @@ -45,7 +45,6 @@ namespace CalamityMod.Projectiles.Permafrost public override void Kill(int timeLeft) { Main.PlaySound(SoundID.Item27, projectile.position); - //crystal bullet shards for (int index1 = 0; index1 < 5; ++index1) { int index2 = Dust.NewDust(projectile.position, projectile.width, projectile.height, 68, 0f, 0f, 0, new Color(), 1f); diff --git a/Projectiles/Permafrost/IcyBullet.cs b/Projectiles/Permafrost/IcyBullet.cs index f1e8d255ff..bbcc9f072e 100644 --- a/Projectiles/Permafrost/IcyBullet.cs +++ b/Projectiles/Permafrost/IcyBullet.cs @@ -65,7 +65,7 @@ namespace CalamityMod.Projectiles.Permafrost { 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; - Projectile.NewProjectile(projectile.position.X + SpeedX, projectile.position.Y + SpeedY, SpeedX, SpeedY, ProjectileID.CrystalShard, projectile.damage / 3, 0f, projectile.owner); + Projectile.NewProjectile(projectile.position.X + SpeedX, projectile.position.Y + SpeedY, SpeedX, SpeedY, ProjectileID.CrystalShard, projectile.damage / 2, 0f, projectile.owner); } } } diff --git a/Projectiles/Phangasm.cs b/Projectiles/Phangasm.cs index 9dc046a821..2bbde373e9 100644 --- a/Projectiles/Phangasm.cs +++ b/Projectiles/Phangasm.cs @@ -16,8 +16,8 @@ namespace CalamityMod.Projectiles public override void SetDefaults() { - projectile.width = 30; - projectile.height = 74; + projectile.width = 40; + projectile.height = 82; projectile.friendly = true; projectile.penetrate = -1; projectile.tileCollide = false; diff --git a/Projectiles/Phangasm.png b/Projectiles/Phangasm.png index 81a7167455..c18ca4431f 100644 Binary files a/Projectiles/Phangasm.png and b/Projectiles/Phangasm.png differ diff --git a/Projectiles/PhantomGuy.cs b/Projectiles/PhantomGuy.cs index f0ef906e06..08305050b5 100644 --- a/Projectiles/PhantomGuy.cs +++ b/Projectiles/PhantomGuy.cs @@ -51,7 +51,7 @@ namespace CalamityMod.Projectiles float num633 = 700f; float num634 = 1300f; float num635 = 2600f; - float num636 = 150f; + float num636 = 600f; bool flag64 = projectile.type == mod.ProjectileType("PhantomGuy"); Player player = Main.player[projectile.owner]; CalamityPlayer modPlayer = player.GetModPlayer(mod); @@ -124,13 +124,13 @@ namespace CalamityMod.Projectiles vector47.Normalize(); if (num648 > 200f) { - float scaleFactor2 = 14f; //12 + float scaleFactor2 = 18f; //12 vector47 *= scaleFactor2; projectile.velocity = (projectile.velocity * 40f + vector47) / 41f; } else { - float num649 = 4f; + float num649 = 9f; vector47 *= -num649; projectile.velocity = (projectile.velocity * 40f + vector47) / 41f; } diff --git a/Projectiles/PlagueBeeDust.cs b/Projectiles/PlagueBeeDust.cs new file mode 100644 index 0000000000..e37d389c36 --- /dev/null +++ b/Projectiles/PlagueBeeDust.cs @@ -0,0 +1,107 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles +{ + public class PlagueBeeDust : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Dust"); + } + + public override void SetDefaults() + { + projectile.width = 70; + projectile.height = 70; + projectile.friendly = true; + projectile.ignoreWater = true; + projectile.tileCollide = false; + projectile.melee = true; + projectile.penetrate = -1; + projectile.extraUpdates = 3; + projectile.timeLeft = 60; + } + + public override void AI() + { + Lighting.AddLight(projectile.Center, ((255 - projectile.alpha) * 0.05f) / 255f, ((255 - projectile.alpha) * 0.4f) / 255f, ((255 - projectile.alpha) * 0.01f) / 255f); + if (projectile.ai[0] > 7f) + { + float num296 = 1f; + if (projectile.ai[0] == 8f) + { + num296 = 0.25f; + } + else if (projectile.ai[0] == 9f) + { + num296 = 0.5f; + } + else if (projectile.ai[0] == 10f) + { + num296 = 0.75f; + } + projectile.ai[0] += 1f; + if (projectile.ai[0] % 2f == 0f) + { + int spawnX = (int)(projectile.width / 2); + int spawnY = (int)(projectile.width / 2); + int bee = Projectile.NewProjectile(projectile.Center.X + (float)Main.rand.Next(-spawnX, spawnX), projectile.Center.Y + (float)Main.rand.Next(-spawnY, spawnY), + projectile.velocity.X, projectile.velocity.Y, Main.player[projectile.owner].beeType(), + Main.player[projectile.owner].beeDamage(projectile.damage / 3), Main.player[projectile.owner].beeKB(0f), projectile.owner, 0f, 0f); + Main.projectile[bee].penetrate = 1; + } + int num297 = 89; + if (Main.rand.Next(1) == 0) + { + for (int num298 = 0; num298 < 2; num298++) + { + int num299 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, num297, projectile.velocity.X * 0.2f, projectile.velocity.Y * 0.2f, 100, default(Color), 1f); + if ((num297 == 89 && Main.rand.Next(3) == 0)) + { + Main.dust[num299].noGravity = true; + Main.dust[num299].scale *= 2.5f; + Dust expr_DBEF_cp_0 = Main.dust[num299]; + expr_DBEF_cp_0.velocity.X = expr_DBEF_cp_0.velocity.X * 2f; + Dust expr_DC0F_cp_0 = Main.dust[num299]; + expr_DC0F_cp_0.velocity.Y = expr_DC0F_cp_0.velocity.Y * 2f; + } + else + { + Main.dust[num299].scale *= 2f; + } + Dust expr_DC74_cp_0 = Main.dust[num299]; + expr_DC74_cp_0.velocity.X = expr_DC74_cp_0.velocity.X * 1.2f; + Dust expr_DC94_cp_0 = Main.dust[num299]; + expr_DC94_cp_0.velocity.Y = expr_DC94_cp_0.velocity.Y * 1.2f; + Main.dust[num299].scale *= num296; + if (num297 == 75) + { + Main.dust[num299].velocity += projectile.velocity; + if (!Main.dust[num299].noGravity) + { + Main.dust[num299].velocity *= 0.5f; + } + } + } + } + } + else + { + projectile.ai[0] += 1f; + } + projectile.rotation += 0.3f * (float)projectile.direction; + return; + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + target.immune[projectile.owner] = 5; + target.AddBuff(mod.BuffType("Plague"), 180); + } + } +} \ No newline at end of file diff --git a/Projectiles/PlagueBeeDust.png b/Projectiles/PlagueBeeDust.png new file mode 100644 index 0000000000..77e7330592 Binary files /dev/null and b/Projectiles/PlagueBeeDust.png differ diff --git a/Projectiles/PlagueDust.cs b/Projectiles/PlagueDust.cs index b496b2a167..315a3b228f 100644 --- a/Projectiles/PlagueDust.cs +++ b/Projectiles/PlagueDust.cs @@ -16,8 +16,8 @@ namespace CalamityMod.Projectiles public override void SetDefaults() { - projectile.width = 50; - projectile.height = 50; + projectile.width = 70; + projectile.height = 70; projectile.friendly = true; projectile.ignoreWater = true; projectile.tileCollide = false; diff --git a/Projectiles/PlagueSeeker.cs b/Projectiles/PlagueSeeker.cs index 4594bd5cf1..605962b709 100644 --- a/Projectiles/PlagueSeeker.cs +++ b/Projectiles/PlagueSeeker.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Projectiles projectile.friendly = true; projectile.penetrate = 1; projectile.melee = true; - projectile.timeLeft = 150; + projectile.timeLeft = 180; } public override void AI() diff --git a/Projectiles/ProfanedTrident.cs b/Projectiles/ProfanedTrident.cs index 550021e518..390ec01aa2 100644 --- a/Projectiles/ProfanedTrident.cs +++ b/Projectiles/ProfanedTrident.cs @@ -22,7 +22,6 @@ namespace CalamityMod.Projectiles projectile.penetrate = 1; projectile.tileCollide = false; projectile.timeLeft = 300; - projectile.thrown = true; } public override void AI() diff --git a/Projectiles/PufferExplosion.cs b/Projectiles/PufferExplosion.cs new file mode 100644 index 0000000000..efa86e8e8b --- /dev/null +++ b/Projectiles/PufferExplosion.cs @@ -0,0 +1,98 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles +{ + public class PufferExplosion : ModProjectile + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Explosion"); + } + + public override void SetDefaults() + { + projectile.width = 250; + projectile.height = 250; + projectile.friendly = true; + projectile.hostile = true; + projectile.ignoreWater = true; + projectile.tileCollide = false; + projectile.penetrate = -1; + projectile.timeLeft = 210; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 1; + } + + public override void AI() + { + Lighting.AddLight(projectile.Center, ((255 - projectile.alpha) * 0.75f) / 255f, ((255 - projectile.alpha) * 0.5f) / 255f, ((255 - projectile.alpha) * 0.01f) / 255f); + if (projectile.localAI[0] == 0f) + { + Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 20); + projectile.localAI[0] += 1f; + } + bool flag15 = false; + bool flag16 = false; + if (projectile.velocity.X < 0f && projectile.position.X < projectile.ai[0]) + { + flag15 = true; + } + if (projectile.velocity.X > 0f && projectile.position.X > projectile.ai[0]) + { + flag15 = true; + } + if (projectile.velocity.Y < 0f && projectile.position.Y < projectile.ai[1]) + { + flag16 = true; + } + if (projectile.velocity.Y > 0f && projectile.position.Y > projectile.ai[1]) + { + flag16 = true; + } + if (flag15 && flag16) + { + projectile.Kill(); + } + float num461 = 25f; + if (projectile.ai[0] > 180f) + { + num461 -= (projectile.ai[0] - 180f) / 2f; + } + if (num461 <= 0f) + { + num461 = 0f; + projectile.Kill(); + } + num461 *= 0.7f; + projectile.ai[0] += 4f; + int num462 = 0; + while ((float)num462 < num461) + { + float num463 = (float)Main.rand.Next(-30, 35); + float num464 = (float)Main.rand.Next(-30, 35); + float num465 = (float)Main.rand.Next(13, 18); + float num466 = (float)Math.Sqrt((double)(num463 * num463 + num464 * num464)); + num466 = num465 / num466; + num463 *= num466; + num464 *= num466; + int num467 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 235, 0f, 0f, 100, default(Color), 1.5f); + Main.dust[num467].noGravity = true; + Main.dust[num467].position.X = projectile.Center.X; + Main.dust[num467].position.Y = projectile.Center.Y; + Dust expr_149DF_cp_0 = Main.dust[num467]; + expr_149DF_cp_0.position.X = expr_149DF_cp_0.position.X + (float)Main.rand.Next(-10, 11); + Dust expr_14A09_cp_0 = Main.dust[num467]; + expr_14A09_cp_0.position.Y = expr_14A09_cp_0.position.Y + (float)Main.rand.Next(-10, 11); + Main.dust[num467].velocity.X = num463; + Main.dust[num467].velocity.Y = num464; + num462++; + } + return; + } + } +} \ No newline at end of file diff --git a/Projectiles/PufferExplosion.png b/Projectiles/PufferExplosion.png new file mode 100644 index 0000000000..a39b10f8a7 Binary files /dev/null and b/Projectiles/PufferExplosion.png differ diff --git a/Projectiles/Pwnagehammer.cs b/Projectiles/Pwnagehammer.cs index 397a2c3f1d..6b5d77061c 100644 --- a/Projectiles/Pwnagehammer.cs +++ b/Projectiles/Pwnagehammer.cs @@ -20,7 +20,6 @@ namespace CalamityMod.Projectiles projectile.width = 30; projectile.height = 30; projectile.friendly = true; - projectile.thrown = true; projectile.penetrate = -1; projectile.aiStyle = 3; projectile.timeLeft = 120; diff --git a/Projectiles/RotBallProjectile.cs b/Projectiles/RotBallProjectile.cs index cb6312e8de..e4b295f048 100644 --- a/Projectiles/RotBallProjectile.cs +++ b/Projectiles/RotBallProjectile.cs @@ -19,7 +19,6 @@ namespace CalamityMod.Projectiles projectile.width = 12; projectile.height = 12; projectile.friendly = true; - projectile.thrown = true; projectile.penetrate = 3; projectile.aiStyle = 2; projectile.timeLeft = 600; diff --git a/Projectiles/RoyalKnife.cs b/Projectiles/RoyalKnife.cs index 0074a6552f..6cd02c44b5 100644 --- a/Projectiles/RoyalKnife.cs +++ b/Projectiles/RoyalKnife.cs @@ -21,7 +21,6 @@ namespace CalamityMod.Projectiles projectile.friendly = true; projectile.penetrate = 1; projectile.timeLeft = 300; - projectile.thrown = true; } public override void AI() @@ -108,7 +107,7 @@ namespace CalamityMod.Projectiles { return; } - Main.player[Main.myPlayer].lifeSteal -= num; + Main.player[Main.myPlayer].lifeSteal -= num * 0.2f; int num2 = projectile.owner; Projectile.NewProjectile(target.position.X, target.position.Y, 0f, 0f, mod.ProjectileType("RoyalHeal"), 0, 0f, projectile.owner, (float)num2, num); } diff --git a/Projectiles/RoyalKnifeMelee.cs b/Projectiles/RoyalKnifeMelee.cs index a9912acd4b..b64ef3dcfd 100644 --- a/Projectiles/RoyalKnifeMelee.cs +++ b/Projectiles/RoyalKnifeMelee.cs @@ -108,7 +108,7 @@ namespace CalamityMod.Projectiles { return; } - Main.player[Main.myPlayer].lifeSteal -= num; + Main.player[Main.myPlayer].lifeSteal -= num * 2f; int num2 = projectile.owner; Projectile.NewProjectile(target.position.X, target.position.Y, 0f, 0f, mod.ProjectileType("RoyalHeal"), 0, 0f, projectile.owner, (float)num2, num); } diff --git a/Projectiles/SandMark.cs b/Projectiles/SandMark.cs index ac09d1b7f5..54023d0f34 100644 --- a/Projectiles/SandMark.cs +++ b/Projectiles/SandMark.cs @@ -25,6 +25,7 @@ namespace CalamityMod.Projectiles projectile.ignoreWater = true; projectile.alpha = 255; projectile.penetrate = -1; + projectile.usesLocalNPCImmunity = true; projectile.localNPCHitCooldown = 30 - (NPC.downedGolemBoss ? 5 : 0) - (NPC.downedMoonlord ? 5 : 0) - diff --git a/Projectiles/SanguineFlare.cs b/Projectiles/SanguineFlare.cs index f10347c2d5..5e5c70b2be 100644 --- a/Projectiles/SanguineFlare.cs +++ b/Projectiles/SanguineFlare.cs @@ -9,10 +9,12 @@ namespace CalamityMod.Projectiles { public class SanguineFlare : ModProjectile { - public int x; - public double speed = 10; - - public override void SetStaticDefaults() + private int x; + private double speed = 10; + private float startSpeedX = 0f; + private float startSpeedY = 0f; + + public override void SetStaticDefaults() { DisplayName.SetDefault("Flare"); } @@ -31,12 +33,18 @@ namespace CalamityMod.Projectiles public override void AI() { + if (projectile.localAI[0] == 0f) + { + projectile.velocity.X = projectile.velocity.X + (Main.player[projectile.owner].velocity.X * 0.5f); + startSpeedY = projectile.velocity.Y + (Main.player[projectile.owner].velocity.Y * 0.5f); + projectile.velocity.Y = startSpeedY; + } projectile.localAI[0] += 1f; if (projectile.localAI[0] >= 180f) { x++; speed += 0.1; - projectile.velocity.Y = (float)(speed * Math.Sin(x/4)); + projectile.velocity.Y = startSpeedY + (float)(speed * Math.Sin(x/4)); } projectile.rotation += projectile.velocity.Y * 0.02f; projectile.alpha -= 5; diff --git a/Projectiles/ScourgeoftheCosmos.cs b/Projectiles/ScourgeoftheCosmos.cs index 782227f7fc..c92bc39dea 100644 --- a/Projectiles/ScourgeoftheCosmos.cs +++ b/Projectiles/ScourgeoftheCosmos.cs @@ -33,7 +33,6 @@ namespace CalamityMod.Projectiles { if (projectile.ai[1] == 1f) { - projectile.thrown = true; projectile.melee = false; } if (projectile.alpha <= 200) @@ -110,7 +109,7 @@ namespace CalamityMod.Projectiles float num629 = (float)Main.rand.Next(-35, 36) * 0.02f; num628 *= 10f; num629 *= 10f; - if (projectile.thrown) + if (!projectile.melee) { Projectile.NewProjectile(projectile.position.X, projectile.position.Y, num628, num629, mod.ProjectileType("ScourgeoftheCosmosMini"), (int)((double)projectile.damage * 0.7), (float)((int)((double)projectile.knockBack * 0.35)), Main.myPlayer, 0f, 1f); } @@ -162,7 +161,7 @@ namespace CalamityMod.Projectiles float num629 = (float)Main.rand.Next(-35, 36) * 0.02f; num628 *= 10f; num629 *= 10f; - if (projectile.thrown) + if (!projectile.melee) { Projectile.NewProjectile(projectile.position.X, projectile.position.Y, num628, num629, mod.ProjectileType("ScourgeoftheCosmosMini"), (int)((double)projectile.damage * 0.7), (float)((int)((double)projectile.knockBack * 0.35)), Main.myPlayer, 0f, 1f); } diff --git a/Projectiles/ScourgeoftheCosmosMini.cs b/Projectiles/ScourgeoftheCosmosMini.cs index 7e5a1cf6cc..abe9102590 100644 --- a/Projectiles/ScourgeoftheCosmosMini.cs +++ b/Projectiles/ScourgeoftheCosmosMini.cs @@ -33,7 +33,6 @@ namespace CalamityMod.Projectiles { if (projectile.ai[1] == 1f) { - projectile.thrown = true; projectile.melee = false; } if (projectile.alpha > 0) diff --git a/Projectiles/ScourgeoftheDesert.cs b/Projectiles/ScourgeoftheDesert.cs index 6edf50f6a4..2aaaf1c2c5 100644 --- a/Projectiles/ScourgeoftheDesert.cs +++ b/Projectiles/ScourgeoftheDesert.cs @@ -20,7 +20,6 @@ namespace CalamityMod.Projectiles projectile.width = 16; projectile.height = 16; projectile.friendly = true; - projectile.thrown = true; projectile.aiStyle = 113; aiType = 598; projectile.penetrate = 3; diff --git a/Projectiles/SeashellBoomerangProjectile.cs b/Projectiles/SeashellBoomerangProjectile.cs index 7e8df28c0c..32b8e1ac02 100644 --- a/Projectiles/SeashellBoomerangProjectile.cs +++ b/Projectiles/SeashellBoomerangProjectile.cs @@ -18,7 +18,6 @@ namespace CalamityMod.Projectiles projectile.width = 14; projectile.height = 14; projectile.friendly = true; - projectile.thrown = true; projectile.penetrate = -1; projectile.aiStyle = 3; projectile.timeLeft = 600; diff --git a/Projectiles/ShimmersparkProjectile.cs b/Projectiles/ShimmersparkProjectile.cs index d438474dbc..9fadead5ff 100644 --- a/Projectiles/ShimmersparkProjectile.cs +++ b/Projectiles/ShimmersparkProjectile.cs @@ -76,9 +76,7 @@ namespace CalamityMod.Projectiles { if (projectile.owner == Main.myPlayer) { - int star = Projectile.NewProjectile(value10.X, value10.Y, num438, num439, 92, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); - Main.projectile[star].ranged = false; - Main.projectile[star].melee = true; + Projectile.NewProjectile(value10.X, value10.Y, num438, num439, 92, projectile.damage, projectile.knockBack, projectile.owner, 1f, 0f); } } return; diff --git a/Projectiles/ShockblastRound.cs b/Projectiles/ShockblastRound.cs index 3b0823ea7f..22369ca386 100644 --- a/Projectiles/ShockblastRound.cs +++ b/Projectiles/ShockblastRound.cs @@ -101,7 +101,7 @@ namespace CalamityMod.Projectiles { return; } - Main.player[Main.myPlayer].lifeSteal -= num; + Main.player[Main.myPlayer].lifeSteal -= num * 2f; int num2 = projectile.owner; Projectile.NewProjectile(target.position.X, target.position.Y, 0f, 0f, mod.ProjectileType("TransfusionTrail"), 0, 0f, projectile.owner, (float)num2, num); } diff --git a/Projectiles/SirenYoung.cs b/Projectiles/SirenYoung.cs index 0a2755f183..1f24fe2f54 100644 --- a/Projectiles/SirenYoung.cs +++ b/Projectiles/SirenYoung.cs @@ -30,15 +30,18 @@ namespace CalamityMod.Projectiles public override void AI() { - if (projectile.localAI[0] == 0f) - { - Lighting.AddLight(projectile.Center, 2.5f, 2f, 0f); //4.5 - } - else - { - Lighting.AddLight(projectile.Center, 1.65f, 1.32f, 0f); //3 - } Player player = Main.player[projectile.owner]; + if (Collision.DrownCollision(player.position, player.width, player.height, player.gravDir)) + { + if (projectile.localAI[0] == 0f) + { + Lighting.AddLight(projectile.Center, 2.5f, 2f, 0f); //4.5 + } + else + { + Lighting.AddLight(projectile.Center, 1.65f, 1.32f, 0f); //3 + } + } if (!player.active) { projectile.active = false; diff --git a/Projectiles/SkyFlareFriendly.cs b/Projectiles/SkyFlareFriendly.cs index af74a42bdb..711635e9c5 100644 --- a/Projectiles/SkyFlareFriendly.cs +++ b/Projectiles/SkyFlareFriendly.cs @@ -21,6 +21,7 @@ namespace CalamityMod.Projectiles projectile.width = 30; projectile.height = 30; projectile.friendly = true; + projectile.extraUpdates = 1; projectile.penetrate = 1; } @@ -47,11 +48,11 @@ namespace CalamityMod.Projectiles num247 = projectile.velocity.X * 0.5f; num248 = projectile.velocity.Y * 0.5f; } - int num249 = Dust.NewDust(new Vector2(projectile.position.X + 3f + num247, projectile.position.Y + 3f + num248) - projectile.velocity * 0.5f, projectile.width - 8, projectile.height - 8, 6, 0f, 0f, 100, default(Color), 1f); + int num249 = Dust.NewDust(new Vector2(projectile.position.X + 3f + num247, projectile.position.Y + 3f + num248) - projectile.velocity * 0.5f, projectile.width - 8, projectile.height - 8, 6, 0f, 0f, 100, default(Color), 0.6f); Main.dust[num249].scale *= 2f + (float)Main.rand.Next(10) * 0.1f; Main.dust[num249].velocity *= 0.2f; Main.dust[num249].noGravity = true; - num249 = Dust.NewDust(new Vector2(projectile.position.X + 3f + num247, projectile.position.Y + 3f + num248) - projectile.velocity * 0.5f, projectile.width - 8, projectile.height - 8, 31, 0f, 0f, 100, default(Color), 0.5f); + num249 = Dust.NewDust(new Vector2(projectile.position.X + 3f + num247, projectile.position.Y + 3f + num248) - projectile.velocity * 0.5f, projectile.width - 8, projectile.height - 8, 31, 0f, 0f, 100, default(Color), 0.3f); Main.dust[num249].fadeIn = 1f + (float)Main.rand.Next(5) * 0.1f; Main.dust[num249].velocity *= 0.05f; } @@ -62,13 +63,13 @@ namespace CalamityMod.Projectiles } else if (Main.rand.Next(2) == 0) { - int num252 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 31, 0f, 0f, 100, default(Color), 1f); + int num252 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 31, 0f, 0f, 100, default(Color), 0.6f); Main.dust[num252].scale = 0.1f + (float)Main.rand.Next(5) * 0.1f; Main.dust[num252].fadeIn = 1.5f + (float)Main.rand.Next(5) * 0.1f; Main.dust[num252].noGravity = true; Main.dust[num252].position = projectile.Center + new Vector2(0f, (float)(-(float)projectile.height / 2)).RotatedBy((double)projectile.rotation, default(Vector2)) * 1.1f; Main.rand.Next(2); - num252 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 6, 0f, 0f, 100, default(Color), 1f); + num252 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 6, 0f, 0f, 100, default(Color), 0.6f); Main.dust[num252].scale = 1f + (float)Main.rand.Next(5) * 0.1f; Main.dust[num252].noGravity = true; Main.dust[num252].position = projectile.Center + new Vector2(0f, (float)(-(float)projectile.height / 2 - 6)).RotatedBy((double)projectile.rotation, default(Vector2)) * 1.1f; @@ -114,7 +115,7 @@ namespace CalamityMod.Projectiles projectile.height = 200; projectile.position.X = projectile.position.X - (float)(projectile.width / 2); projectile.position.Y = projectile.position.Y - (float)(projectile.height / 2); - for (int num621 = 0; num621 < 40; num621++) + for (int num621 = 0; num621 < 4; num621++) { int num622 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 244, 0f, 0f, 100, default(Color), 2f); Main.dust[num622].velocity *= 3f; @@ -124,7 +125,7 @@ namespace CalamityMod.Projectiles Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f; } } - for (int num623 = 0; num623 < 70; num623++) + for (int num623 = 0; num623 < 12; num623++) { int num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 244, 0f, 0f, 100, default(Color), 3f); Main.dust[num624].noGravity = true; diff --git a/Projectiles/SolarBeam.cs b/Projectiles/SolarBeam.cs index 8d5403d3a1..c54a2d3b13 100644 --- a/Projectiles/SolarBeam.cs +++ b/Projectiles/SolarBeam.cs @@ -45,15 +45,5 @@ namespace CalamityMod.Projectiles return; } } - - public override void Kill(int timeLeft) - { - if (projectile.owner == Main.myPlayer) - { - int boom = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, 612, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); - Main.projectile[boom].melee = false; - Main.projectile[boom].minion = true; - } - } } } \ No newline at end of file diff --git a/Projectiles/SolarBeam2.cs b/Projectiles/SolarBeam2.cs index d3c9b06af0..6713dfc5c5 100644 --- a/Projectiles/SolarBeam2.cs +++ b/Projectiles/SolarBeam2.cs @@ -71,9 +71,7 @@ namespace CalamityMod.Projectiles target.immune[projectile.owner] = 4; if (projectile.owner == Main.myPlayer) { - int boom = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, 612, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); - Main.projectile[boom].melee = false; - Main.projectile[boom].magic = true; + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, 612, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); } } } diff --git a/Projectiles/SolarFlare.cs b/Projectiles/SolarFlare.cs index f8341e44dd..c4af20ea56 100644 --- a/Projectiles/SolarFlare.cs +++ b/Projectiles/SolarFlare.cs @@ -21,6 +21,7 @@ namespace CalamityMod.Projectiles projectile.width = 40; projectile.height = 40; projectile.friendly = true; + projectile.tileCollide = false; projectile.penetrate = 1; projectile.alpha = 150; projectile.melee = true; @@ -29,6 +30,10 @@ namespace CalamityMod.Projectiles public override void AI() { + if (projectile.timeLeft < 60) + { + projectile.tileCollide = true; + } if (projectile.localAI[0] == 0f) { projectile.scale -= 0.02f; @@ -118,7 +123,7 @@ namespace CalamityMod.Projectiles public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { - target.AddBuff(mod.BuffType("HolyLight"), 200); + target.AddBuff(mod.BuffType("HolyLight"), 900); } } } \ No newline at end of file diff --git a/Projectiles/SolarGod.cs b/Projectiles/SolarGod.cs index 310a9bd40d..91bb5aad0a 100644 --- a/Projectiles/SolarGod.cs +++ b/Projectiles/SolarGod.cs @@ -114,7 +114,7 @@ namespace CalamityMod.Projectiles num404 *= num406; num405 *= num406; Projectile.NewProjectile(projectile.Center.X - 4f, projectile.Center.Y, num404, num405, mod.ProjectileType("SolarBeam"), (int)(60f * player.minionDamage), projectile.knockBack, projectile.owner, 0f, 0f); - projectile.ai[0] = 50f; + projectile.ai[0] = 30f; return; } } diff --git a/Projectiles/SpearofPaleolith.cs b/Projectiles/SpearofPaleolith.cs index 884a9a431d..55a51f155a 100644 --- a/Projectiles/SpearofPaleolith.cs +++ b/Projectiles/SpearofPaleolith.cs @@ -22,7 +22,6 @@ namespace CalamityMod.Projectiles projectile.width = 14; projectile.height = 14; projectile.friendly = true; - projectile.thrown = true; projectile.penetrate = 1; projectile.aiStyle = 113; projectile.timeLeft = 600; @@ -45,9 +44,7 @@ namespace CalamityMod.Projectiles { if (projectile.owner == Main.myPlayer) { - int shard = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X * 0f, projectile.velocity.Y * 0f, mod.ProjectileType("FossilShard"), (int)((double)projectile.damage * 0.5f), projectile.knockBack, projectile.owner, 0f, 0f); - Main.projectile[shard].ranged = false; - Main.projectile[shard].thrown = true; + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X * 0f, projectile.velocity.Y * 0f, mod.ProjectileType("FossilShardThrown"), (int)((double)projectile.damage * 0.5), projectile.knockBack, projectile.owner, 0f, 0f); } shardRainTimer = 3; } diff --git a/Projectiles/SporeBomb.png b/Projectiles/SporeBomb.png index f47982519d..2c89e060cf 100644 Binary files a/Projectiles/SporeBomb.png and b/Projectiles/SporeBomb.png differ diff --git a/Projectiles/StormMark.cs b/Projectiles/StormMark.cs index dca92c30a5..3dc921c4cf 100644 --- a/Projectiles/StormMark.cs +++ b/Projectiles/StormMark.cs @@ -26,6 +26,8 @@ namespace CalamityMod.Projectiles projectile.ignoreWater = true; projectile.alpha = 255; projectile.penetrate = -1; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 25; } public override void AI() diff --git a/Projectiles/StreamGouge.cs b/Projectiles/StreamGouge.cs index ae82f37f2b..5e6ec10e89 100644 --- a/Projectiles/StreamGouge.cs +++ b/Projectiles/StreamGouge.cs @@ -56,7 +56,7 @@ namespace CalamityMod.Projectiles if (projectile.localAI[0] == 0f && Main.myPlayer == projectile.owner) { projectile.localAI[0] = 1f; - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X * 1f, projectile.velocity.Y * 1f, mod.ProjectileType("EssenceBeam"), (int)((double)projectile.damage * 2f), projectile.knockBack, projectile.owner, 0f, 0f); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X * 1f, projectile.velocity.Y * 1f, mod.ProjectileType("EssenceBeam"), (int)((double)projectile.damage * 4.0), projectile.knockBack, projectile.owner, 0f, 0f); } } else diff --git a/Projectiles/SulphuricAcidCannon.cs b/Projectiles/SulphuricAcidCannon.cs index 361603124d..837d200ffd 100644 --- a/Projectiles/SulphuricAcidCannon.cs +++ b/Projectiles/SulphuricAcidCannon.cs @@ -105,7 +105,7 @@ namespace CalamityMod.Projectiles { return; } - target.AddBuff(BuffID.Poisoned, 120); + target.AddBuff(BuffID.Venom, 120); projectile.Kill(); } diff --git a/Projectiles/SulphuricAcidMist.cs b/Projectiles/SulphuricAcidMist.cs index a2ae2b3396..ae869834dc 100644 --- a/Projectiles/SulphuricAcidMist.cs +++ b/Projectiles/SulphuricAcidMist.cs @@ -78,7 +78,7 @@ namespace CalamityMod.Projectiles public override void OnHitPlayer(Player target, int damage, bool crit) { - target.AddBuff(BuffID.Poisoned, 120); + target.AddBuff(BuffID.Venom, 120); } } } \ No newline at end of file diff --git a/Projectiles/TarragonThrowingDartProjectile.cs b/Projectiles/TarragonThrowingDartProjectile.cs index d7ebc71565..a2df9c4db4 100644 --- a/Projectiles/TarragonThrowingDartProjectile.cs +++ b/Projectiles/TarragonThrowingDartProjectile.cs @@ -20,7 +20,6 @@ namespace CalamityMod.Projectiles projectile.width = 10; projectile.height = 10; projectile.friendly = true; - projectile.thrown = true; projectile.penetrate = 3; projectile.aiStyle = 113; projectile.timeLeft = 600; diff --git a/Projectiles/TerraArrow.cs b/Projectiles/TerraArrow.cs index 52e61ca7f3..52388387b1 100644 --- a/Projectiles/TerraArrow.cs +++ b/Projectiles/TerraArrow.cs @@ -20,6 +20,7 @@ namespace CalamityMod.Projectiles projectile.height = 10; projectile.friendly = true; projectile.ranged = true; + projectile.arrow = true; projectile.penetrate = 1; projectile.timeLeft = 600; projectile.aiStyle = 1; @@ -54,10 +55,9 @@ namespace CalamityMod.Projectiles Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f; } } - int num251 = Main.rand.Next(1, 3); if (projectile.owner == Main.myPlayer) { - for (int num252 = 0; num252 < num251; num252++) + for (int num252 = 0; num252 < 2; num252++) { Vector2 value15 = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101)); while (value15.X == 0f && value15.Y == 0f) @@ -66,7 +66,7 @@ namespace CalamityMod.Projectiles } value15.Normalize(); value15 *= (float)Main.rand.Next(70, 101) * 0.1f; - Projectile.NewProjectile(projectile.oldPosition.X + (float)(projectile.width / 2), projectile.oldPosition.Y + (float)(projectile.height / 2), value15.X, value15.Y, mod.ProjectileType("TerraArrow2"), (int)((double)projectile.damage * 0.66), 0f, projectile.owner, 0f, 0f); + Projectile.NewProjectile(projectile.oldPosition.X + (float)(projectile.width / 2), projectile.oldPosition.Y + (float)(projectile.height / 2), value15.X, value15.Y, mod.ProjectileType("TerraArrow2"), (int)((double)projectile.damage * 0.5), 0f, projectile.owner, 0f, 0f); } } } diff --git a/Projectiles/TerraArrow.png b/Projectiles/TerraArrow.png index 7f57db8ffc..35ca0057e8 100644 Binary files a/Projectiles/TerraArrow.png and b/Projectiles/TerraArrow.png differ diff --git a/Projectiles/TerraArrow2.cs b/Projectiles/TerraArrow2.cs index 3013410105..abf10db535 100644 --- a/Projectiles/TerraArrow2.cs +++ b/Projectiles/TerraArrow2.cs @@ -20,6 +20,7 @@ namespace CalamityMod.Projectiles projectile.height = 10; projectile.friendly = true; projectile.ranged = true; + projectile.arrow = true; projectile.penetrate = 1; projectile.alpha = 255; projectile.timeLeft = 120; diff --git a/Projectiles/TerraArrow2.png b/Projectiles/TerraArrow2.png index 7f57db8ffc..c7d7c3c20a 100644 Binary files a/Projectiles/TerraArrow2.png and b/Projectiles/TerraArrow2.png differ diff --git a/Projectiles/TerraBullet.cs b/Projectiles/TerraBullet.cs index fe5c0ab5ad..088095199d 100644 --- a/Projectiles/TerraBullet.cs +++ b/Projectiles/TerraBullet.cs @@ -25,17 +25,23 @@ namespace CalamityMod.Projectiles projectile.ranged = true; projectile.penetrate = 1; projectile.timeLeft = 600; + projectile.alpha = 255; projectile.extraUpdates = 1; aiType = ProjectileID.Bullet; } public override void AI() { - Lighting.AddLight(projectile.Center, ((255 - projectile.alpha) * 0f) / 255f, ((255 - projectile.alpha) * 0.25f) / 255f, ((255 - projectile.alpha) * 0f) / 255f); + projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f; + Lighting.AddLight(projectile.Center, ((255 - projectile.alpha) * 0f) / 255f, ((255 - projectile.alpha) * 0.25f) / 255f, ((255 - projectile.alpha) * 0f) / 255f); projectile.localAI[0] += 1f; if (projectile.localAI[0] >= 6f) { - for (int num136 = 0; num136 < 10; num136++) + if (projectile.alpha > 0) + { + projectile.alpha -= 17; + } + for (int num136 = 0; num136 < 3; num136++) { float x2 = projectile.position.X - projectile.velocity.X / 10f * (float)num136; float y2 = projectile.position.Y - projectile.velocity.Y / 10f * (float)num136; @@ -63,10 +69,9 @@ namespace CalamityMod.Projectiles public override void Kill(int timeLeft) { - int num251 = Main.rand.Next(2, 4); if (projectile.owner == Main.myPlayer) { - for (int num252 = 0; num252 < num251; num252++) + for (int num252 = 0; num252 < 2; num252++) { Vector2 value15 = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101)); while (value15.X == 0f && value15.Y == 0f) diff --git a/Projectiles/TerraBullet.png b/Projectiles/TerraBullet.png index 0056fc1e24..1b78972e17 100644 Binary files a/Projectiles/TerraBullet.png and b/Projectiles/TerraBullet.png differ diff --git a/Projectiles/TerraBulletSplit.cs b/Projectiles/TerraBulletSplit.cs index 7f97345e59..f4cd9802da 100644 --- a/Projectiles/TerraBulletSplit.cs +++ b/Projectiles/TerraBulletSplit.cs @@ -44,7 +44,12 @@ namespace CalamityMod.Projectiles public override void AI() { - for (int num136 = 0; num136 < 5; num136++) + projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f; + if (projectile.alpha > 0) + { + projectile.alpha -= 85; + } + for (int num136 = 0; num136 < 2; num136++) { float x2 = projectile.position.X - projectile.velocity.X / 10f * (float)num136; float y2 = projectile.position.Y - projectile.velocity.Y / 10f * (float)num136; diff --git a/Projectiles/TerraBulletSplit.png b/Projectiles/TerraBulletSplit.png index 0056fc1e24..1b78972e17 100644 Binary files a/Projectiles/TerraBulletSplit.png and b/Projectiles/TerraBulletSplit.png differ diff --git a/Projectiles/TerraEdgeBeam.png b/Projectiles/TerraEdgeBeam.png index af966e4ddf..810b0c09d8 100644 Binary files a/Projectiles/TerraEdgeBeam.png and b/Projectiles/TerraEdgeBeam.png differ diff --git a/Projectiles/TerraLanceProjectile.png b/Projectiles/TerraLanceProjectile.png index 86ea6e5004..e828311256 100644 Binary files a/Projectiles/TerraLanceProjectile.png and b/Projectiles/TerraLanceProjectile.png differ diff --git a/Projectiles/TerratomereProjectile.png b/Projectiles/TerratomereProjectile.png index 8c86b00b20..40743f18f7 100644 Binary files a/Projectiles/TerratomereProjectile.png and b/Projectiles/TerratomereProjectile.png differ diff --git a/Projectiles/TerrorBeam.cs b/Projectiles/TerrorBeam.cs index 28f3bdc9a7..b6fd29b7ce 100644 --- a/Projectiles/TerrorBeam.cs +++ b/Projectiles/TerrorBeam.cs @@ -54,6 +54,14 @@ namespace CalamityMod.Projectiles return false; } + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + { + if (projectile.owner == Main.myPlayer) + { + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, mod.ProjectileType("TerrorBoom"), projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); + } + } + public override void AI() { if (projectile.localAI[1] == 0f) diff --git a/Projectiles/TitRail.cs b/Projectiles/TitRail.cs index 1288552a28..b5f25e9d98 100644 --- a/Projectiles/TitRail.cs +++ b/Projectiles/TitRail.cs @@ -36,7 +36,8 @@ namespace CalamityMod.Projectiles vector33 -= projectile.velocity * ((float)num447 * 0.25f); projectile.alpha = 255; int num448 = Dust.NewDust(vector33, 1, 1, 91, 0f, 0f, 0, default(Color), 1f); - Main.dust[num448].position = vector33; + Main.dust[num448].noGravity = true; + Main.dust[num448].position = vector33; Main.dust[num448].scale = (float)Main.rand.Next(70, 110) * 0.013f; Main.dust[num448].velocity *= 0.2f; } diff --git a/Projectiles/TitaniumShurikenProjectile.cs b/Projectiles/TitaniumShurikenProjectile.cs index 7f6dfed80f..79f51b6275 100644 --- a/Projectiles/TitaniumShurikenProjectile.cs +++ b/Projectiles/TitaniumShurikenProjectile.cs @@ -18,9 +18,7 @@ namespace CalamityMod.Projectiles { projectile.width = 14; projectile.height = 14; - projectile.scale = 0.75f; projectile.friendly = true; - projectile.thrown = true; projectile.penetrate = -1; projectile.aiStyle = 2; projectile.timeLeft = 600; diff --git a/Projectiles/ToothBallProjectile.cs b/Projectiles/ToothBallProjectile.cs index 161d476609..5719dffdba 100644 --- a/Projectiles/ToothBallProjectile.cs +++ b/Projectiles/ToothBallProjectile.cs @@ -19,7 +19,6 @@ namespace CalamityMod.Projectiles projectile.width = 12; projectile.height = 12; projectile.friendly = true; - projectile.thrown = true; projectile.penetrate = 3; projectile.aiStyle = 2; projectile.timeLeft = 600; diff --git a/Projectiles/ToxicMinnowCloud.cs b/Projectiles/ToxicMinnowCloud.cs index 05e5c7bebb..00a5b7a07e 100644 --- a/Projectiles/ToxicMinnowCloud.cs +++ b/Projectiles/ToxicMinnowCloud.cs @@ -87,12 +87,12 @@ namespace CalamityMod.Projectiles public override void OnHitPlayer(Player target, int damage, bool crit) { - target.AddBuff(BuffID.Poisoned, 300); + target.AddBuff(BuffID.Poisoned, 600); } public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { - target.AddBuff(BuffID.Poisoned, 300); + target.AddBuff(BuffID.Poisoned, 600); } } } \ No newline at end of file diff --git a/Projectiles/TradewindsProjectile.png b/Projectiles/TradewindsProjectile.png index 61b3ecd36c..59034069fc 100644 Binary files a/Projectiles/TradewindsProjectile.png and b/Projectiles/TradewindsProjectile.png differ diff --git a/Projectiles/TriactisOPHammer.cs b/Projectiles/TriactisOPHammer.cs index 6dae9c007e..99e7404379 100644 --- a/Projectiles/TriactisOPHammer.cs +++ b/Projectiles/TriactisOPHammer.cs @@ -19,7 +19,6 @@ namespace CalamityMod.Projectiles projectile.width = 160; projectile.height = 160; projectile.friendly = true; - projectile.thrown = true; projectile.tileCollide = false; projectile.penetrate = -1; projectile.extraUpdates = 3; diff --git a/Projectiles/TyphonsGreed.cs b/Projectiles/TyphonsGreed.cs index 39e929e8ce..91a0fbfe21 100644 --- a/Projectiles/TyphonsGreed.cs +++ b/Projectiles/TyphonsGreed.cs @@ -106,11 +106,11 @@ namespace CalamityMod.Projectiles projectile.width = (projectile.height = 64); projectile.position.X = projectile.position.X - (float)(projectile.width / 2); projectile.position.Y = projectile.position.Y - (float)(projectile.height / 2); - for (int num193 = 0; num193 < 6; num193++) + for (int num193 = 0; num193 < 2; num193++) { Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 33, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); } - for (int num194 = 0; num194 < 10; num194++) + for (int num194 = 0; num194 < 6; num194++) { int num195 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 186, 0f, 0f, 0, new Color(0, 255, 255), 2.5f); Main.dust[num195].noGravity = true; diff --git a/Projectiles/TyphonsGreedStaff.cs b/Projectiles/TyphonsGreedStaff.cs index 57e90c5985..480e122175 100644 --- a/Projectiles/TyphonsGreedStaff.cs +++ b/Projectiles/TyphonsGreedStaff.cs @@ -140,7 +140,7 @@ namespace CalamityMod.Projectiles player.itemAnimation = 2; player.itemRotation = MathHelper.WrapAngle(projectile.rotation); projectile.localAI[0] += 1f; - if (projectile.localAI[0] >= 24f) + if (projectile.localAI[0] >= 12f) { projectile.localAI[0] = 0f; float xPos = (Main.rand.Next(2) == 0 ? projectile.position.X + 800f : projectile.position.X - 800f); @@ -171,7 +171,7 @@ namespace CalamityMod.Projectiles if (projectile.owner == Main.myPlayer) { float ai1 = (Main.rand.NextFloat() + 0.5f); - Projectile.NewProjectile(vector20.X, vector20.Y, speedX, speedY, mod.ProjectileType("TyphonsGreed"), (int)((double)projectile.damage * 0.7), 2f, projectile.owner, 0.0f, ai1); + Projectile.NewProjectile(vector20.X, vector20.Y, speedX, speedY, mod.ProjectileType("TyphonsGreed"), projectile.damage, 2f, projectile.owner, 0.0f, ai1); } } } diff --git a/Projectiles/TyphoonArrow.png b/Projectiles/TyphoonArrow.png index b7295645a5..aec4bcdf65 100644 Binary files a/Projectiles/TyphoonArrow.png and b/Projectiles/TyphoonArrow.png differ diff --git a/Projectiles/UndinesRetribution.cs b/Projectiles/UndinesRetribution.cs index 55e1a5d41d..300f378ffa 100644 --- a/Projectiles/UndinesRetribution.cs +++ b/Projectiles/UndinesRetribution.cs @@ -59,13 +59,12 @@ namespace CalamityMod.Projectiles projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X); } Lighting.AddLight(projectile.Center, 0f, 0.1f, 0.7f); - int num959 = (int)projectile.ai[0]; - if (num959 >= 0 && Main.player[num959].active && !Main.player[num959].dead) + if (Main.player[projectile.owner].active && !Main.player[projectile.owner].dead) { - if (projectile.Distance(Main.player[num959].Center) > num954) + if (projectile.Distance(Main.player[projectile.owner].Center) > num954) { - Vector2 vector102 = projectile.DirectionTo(Main.player[num959].Center); - if (vector102.HasNaNs()) + Vector2 vector102 = projectile.DirectionTo(Main.player[projectile.owner].Center); + if (vector102.HasNaNs()) { vector102 = Vector2.UnitY; } @@ -113,12 +112,6 @@ namespace CalamityMod.Projectiles { projectile.timeLeft = 30; } - if (projectile.ai[0] != -1f) - { - projectile.ai[0] = -1f; - projectile.netUpdate = true; - return; - } } } @@ -143,11 +136,11 @@ namespace CalamityMod.Projectiles projectile.width = (projectile.height = 64); projectile.position.X = projectile.position.X - (float)(projectile.width / 2); projectile.position.Y = projectile.position.Y - (float)(projectile.height / 2); - for (int num193 = 0; num193 < 6; num193++) + for (int num193 = 0; num193 < 4; num193++) { Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 33, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); } - for (int num194 = 0; num194 < 10; num194++) + for (int num194 = 0; num194 < 6; num194++) { int num195 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 186, 0f, 0f, 0, new Color(0, 255, 255), 2.5f); Main.dust[num195].noGravity = true; diff --git a/Projectiles/UrchinStinger.cs b/Projectiles/UrchinStinger.cs index 368bc22220..48a113be78 100644 --- a/Projectiles/UrchinStinger.cs +++ b/Projectiles/UrchinStinger.cs @@ -19,7 +19,6 @@ namespace CalamityMod.Projectiles projectile.width = 10; projectile.height = 10; projectile.friendly = true; - projectile.thrown = true; projectile.penetrate = 2; projectile.aiStyle = 2; projectile.timeLeft = 600; diff --git a/Projectiles/Valediction.cs b/Projectiles/Valediction.cs index 374bc325a0..fa576db5cd 100644 --- a/Projectiles/Valediction.cs +++ b/Projectiles/Valediction.cs @@ -20,7 +20,6 @@ namespace CalamityMod.Projectiles projectile.width = 70; projectile.height = 70; projectile.friendly = true; - projectile.thrown = true; projectile.tileCollide = false; projectile.penetrate = -1; projectile.extraUpdates = 3; diff --git a/Projectiles/VanquisherArrow.cs b/Projectiles/VanquisherArrow.cs index 57bea7c684..e8f4b68807 100644 --- a/Projectiles/VanquisherArrow.cs +++ b/Projectiles/VanquisherArrow.cs @@ -23,6 +23,7 @@ namespace CalamityMod.Projectiles projectile.friendly = true; projectile.ranged = true; projectile.tileCollide = false; + projectile.arrow = true; projectile.penetrate = 1; projectile.timeLeft = 90; projectile.extraUpdates = 1; @@ -36,7 +37,7 @@ namespace CalamityMod.Projectiles { if (projectile.owner == Main.myPlayer) { - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X * 0.25f, projectile.velocity.Y * 0.25f, mod.ProjectileType("VanquisherArrow2"), projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X * 0.25f, projectile.velocity.Y * 0.25f, mod.ProjectileType("VanquisherArrow2"), (int)((double)projectile.damage * 0.7), projectile.knockBack, projectile.owner, 0f, 0f); } projCount = 18; } diff --git a/Projectiles/VanquisherArrow2.cs b/Projectiles/VanquisherArrow2.cs index 234bef79a1..2f52a38a73 100644 --- a/Projectiles/VanquisherArrow2.cs +++ b/Projectiles/VanquisherArrow2.cs @@ -19,6 +19,7 @@ namespace CalamityMod.Projectiles projectile.width = 10; projectile.height = 10; projectile.friendly = true; + projectile.arrow = true; projectile.timeLeft = 90; projectile.penetrate = 1; projectile.extraUpdates = 1; diff --git a/Projectiles/Viscera.cs b/Projectiles/Viscera.cs index d75ad642d2..04c5ffb7be 100644 --- a/Projectiles/Viscera.cs +++ b/Projectiles/Viscera.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Projectiles public override bool OnTileCollide(Vector2 oldVelocity) { - healAmt *= 1.5f; + healAmt *= 1.4f; projectile.penetrate--; if (projectile.penetrate <= 0) { @@ -60,9 +60,9 @@ namespace CalamityMod.Projectiles } if (target.type == mod.NPCType("DevourerofGodsBody") || target.type == mod.NPCType("DevourerofGodsBodyS")) { - healAmt *= 0.5f; + healAmt *= 0.4f; } - healAmt *= 1.5f; + healAmt *= 1.4f; Player player = Main.player[projectile.owner]; player.statLife += (int)healAmt; player.HealEffect((int)healAmt); diff --git a/Projectiles/WintersFury.cs b/Projectiles/WintersFury.cs index 84c1124966..c13a9b75db 100644 --- a/Projectiles/WintersFury.cs +++ b/Projectiles/WintersFury.cs @@ -20,14 +20,13 @@ namespace CalamityMod.Projectiles projectile.friendly = true; projectile.magic = true; projectile.penetrate = 1; - projectile.aiStyle = 1; projectile.timeLeft = 600; - aiType = 1; } public override void AI() { - projectile.localAI[0] += 1f; + projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f; + projectile.localAI[0] += 1f; if (projectile.localAI[0] > 4f) { for (int num468 = 0; num468 < 3; num468++) diff --git a/Projectiles/WulfrumKnife.cs b/Projectiles/WulfrumKnife.cs index 90862f2bd9..3eaabec33e 100644 --- a/Projectiles/WulfrumKnife.cs +++ b/Projectiles/WulfrumKnife.cs @@ -19,7 +19,6 @@ namespace CalamityMod.Projectiles projectile.width = 10; projectile.height = 10; projectile.friendly = true; - projectile.thrown = true; projectile.penetrate = 2; projectile.aiStyle = 2; projectile.timeLeft = 600; diff --git a/Projectiles/XerocPitchforkProjectile.cs b/Projectiles/XerocPitchforkProjectile.cs index 32db71c8ea..b76c20d846 100644 --- a/Projectiles/XerocPitchforkProjectile.cs +++ b/Projectiles/XerocPitchforkProjectile.cs @@ -20,7 +20,6 @@ namespace CalamityMod.Projectiles projectile.width = 14; projectile.height = 14; projectile.friendly = true; - projectile.thrown = true; projectile.penetrate = -1; projectile.extraUpdates = 1; projectile.aiStyle = 113; diff --git a/Sounds/Custom/DevilMaskBreak.cs b/Sounds/Custom/DevilMaskBreak.cs new file mode 100644 index 0000000000..9f3f229ebb --- /dev/null +++ b/Sounds/Custom/DevilMaskBreak.cs @@ -0,0 +1,18 @@ +using Microsoft.Xna.Framework.Audio; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Sounds.Custom +{ + public class DevilMaskBreak : ModSound + { + public override SoundEffectInstance PlaySound(ref SoundEffectInstance soundInstance, float volume, float pan, SoundType type) + { + soundInstance = sound.CreateInstance(); + soundInstance.Volume = volume * 1f; + soundInstance.Pan = pan; + Main.PlaySoundInstance(soundInstance); + return soundInstance; + } + } +} diff --git a/Sounds/Custom/DevilMaskBreak.mp3 b/Sounds/Custom/DevilMaskBreak.mp3 new file mode 100644 index 0000000000..5875127a17 Binary files /dev/null and b/Sounds/Custom/DevilMaskBreak.mp3 differ diff --git a/Sounds/Custom/FullAdrenaline.cs b/Sounds/Custom/FullAdrenaline.cs new file mode 100644 index 0000000000..28566d730f --- /dev/null +++ b/Sounds/Custom/FullAdrenaline.cs @@ -0,0 +1,18 @@ +using Microsoft.Xna.Framework.Audio; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Sounds.Custom +{ + public class FullAdrenaline : ModSound + { + public override SoundEffectInstance PlaySound(ref SoundEffectInstance soundInstance, float volume, float pan, SoundType type) + { + soundInstance = sound.CreateInstance(); + soundInstance.Volume = volume * 1f; + soundInstance.Pan = pan; + Main.PlaySoundInstance(soundInstance); + return soundInstance; + } + } +} \ No newline at end of file diff --git a/Sounds/Custom/FullAdrenaline.wav b/Sounds/Custom/FullAdrenaline.wav new file mode 100644 index 0000000000..18d825457e Binary files /dev/null and b/Sounds/Custom/FullAdrenaline.wav differ diff --git a/Sounds/Custom/FullRage.cs b/Sounds/Custom/FullRage.cs new file mode 100644 index 0000000000..2efb6baae7 --- /dev/null +++ b/Sounds/Custom/FullRage.cs @@ -0,0 +1,18 @@ +using Microsoft.Xna.Framework.Audio; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Sounds.Custom +{ + public class FullRage : ModSound + { + public override SoundEffectInstance PlaySound(ref SoundEffectInstance soundInstance, float volume, float pan, SoundType type) + { + soundInstance = sound.CreateInstance(); + soundInstance.Volume = volume * 1f; + soundInstance.Pan = pan; + Main.PlaySoundInstance(soundInstance); + return soundInstance; + } + } +} \ No newline at end of file diff --git a/Sounds/Custom/FullRage.wav b/Sounds/Custom/FullRage.wav new file mode 100644 index 0000000000..00f5c5866c Binary files /dev/null and b/Sounds/Custom/FullRage.wav differ diff --git a/Sounds/Music/Astral.mp3 b/Sounds/Music/Astral.mp3 index 19d9916880..58924321fa 100644 Binary files a/Sounds/Music/Astral.mp3 and b/Sounds/Music/Astral.mp3 differ diff --git a/Sounds/NPCHit/AstralEnemyHit.cs b/Sounds/NPCHit/AstralEnemyHit.cs index fe78a16abc..70e18fc53c 100644 --- a/Sounds/NPCHit/AstralEnemyHit.cs +++ b/Sounds/NPCHit/AstralEnemyHit.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Sounds.NPCHit { soundInstance = sound.CreateInstance(); soundInstance.Pan = pan; - soundInstance.Volume = volume * 0.5f; + soundInstance.Volume = volume * 1f; Main.PlaySoundInstance(soundInstance); return soundInstance; } diff --git a/Sounds/NPCHit/AstralEnemyHit2.cs b/Sounds/NPCHit/AstralEnemyHit2.cs index cc8295a99d..4313f1204a 100644 --- a/Sounds/NPCHit/AstralEnemyHit2.cs +++ b/Sounds/NPCHit/AstralEnemyHit2.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Sounds.NPCHit { soundInstance = sound.CreateInstance(); soundInstance.Pan = pan; - soundInstance.Volume = volume * 0.5f; + soundInstance.Volume = volume * 1f; Main.PlaySoundInstance(soundInstance); return soundInstance; } diff --git a/Sounds/NPCHit/AstralEnemyHit3.cs b/Sounds/NPCHit/AstralEnemyHit3.cs index facd2d38a6..3a63992baf 100644 --- a/Sounds/NPCHit/AstralEnemyHit3.cs +++ b/Sounds/NPCHit/AstralEnemyHit3.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Sounds.NPCHit { soundInstance = sound.CreateInstance(); soundInstance.Pan = pan; - soundInstance.Volume = volume * 0.5f; + soundInstance.Volume = volume * 1f; Main.PlaySoundInstance(soundInstance); return soundInstance; } diff --git a/Sounds/NPCHit/AtlasHurt0.cs b/Sounds/NPCHit/AtlasHurt0.cs index 2559ae5656..69547f3c24 100644 --- a/Sounds/NPCHit/AtlasHurt0.cs +++ b/Sounds/NPCHit/AtlasHurt0.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Sounds.NPCHit { soundInstance = sound.CreateInstance(); soundInstance.Pan = pan; - soundInstance.Volume = volume * 0.5f; + soundInstance.Volume = volume * 1f; Main.PlaySoundInstance(soundInstance); return soundInstance; } diff --git a/Sounds/NPCHit/AtlasHurt1.cs b/Sounds/NPCHit/AtlasHurt1.cs index a235f4dc6b..4a4489e838 100644 --- a/Sounds/NPCHit/AtlasHurt1.cs +++ b/Sounds/NPCHit/AtlasHurt1.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Sounds.NPCHit { soundInstance = sound.CreateInstance(); soundInstance.Pan = pan; - soundInstance.Volume = volume * 0.5f; + soundInstance.Volume = volume * 1f; Main.PlaySoundInstance(soundInstance); return soundInstance; } diff --git a/Sounds/NPCHit/AtlasHurt2.cs b/Sounds/NPCHit/AtlasHurt2.cs index 9db54fca7c..3b66637e60 100644 --- a/Sounds/NPCHit/AtlasHurt2.cs +++ b/Sounds/NPCHit/AtlasHurt2.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Sounds.NPCHit { soundInstance = sound.CreateInstance(); soundInstance.Pan = pan; - soundInstance.Volume = volume * 0.5f; + soundInstance.Volume = volume * 1f; Main.PlaySoundInstance(soundInstance); return soundInstance; } diff --git a/Tiles/AbyssLowerMusicbox.cs b/Tiles/AbyssLowerMusicbox.cs new file mode 100644 index 0000000000..651b90c044 --- /dev/null +++ b/Tiles/AbyssLowerMusicbox.cs @@ -0,0 +1,39 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; +using Terraria.ObjectData; +using Terraria.DataStructures; + +namespace CalamityMod.Tiles +{ + public class AbyssLowerMusicbox : ModTile + { + public override void SetDefaults() + { + Main.tileFrameImportant[Type] = true; + Main.tileObsidianKill[Type] = true; + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.Origin = new Point16(0, 1); + TileObjectData.newTile.LavaDeath = false; + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(Type); + disableSmartCursor = true; + ModTranslation name = CreateMapEntryName(); + name.SetDefault("Music Box"); + AddMapEntry(new Color(200, 200, 200), name); + } + + public override void KillMultiTile(int i, int j, int frameX, int frameY) + { + Item.NewItem(i * 16, j * 16, 16, 48, mod.ItemType("AbyssLowerMusicbox")); + } + + public override void MouseOver(int i, int j) + { + Player player = Main.LocalPlayer; + player.noThrow = 2; + player.showItemIcon = true; + player.showItemIcon2 = mod.ItemType("AbyssLowerMusicbox"); + } + } +} \ No newline at end of file diff --git a/Tiles/AbyssLowerMusicbox.png b/Tiles/AbyssLowerMusicbox.png new file mode 100644 index 0000000000..201d3c847c Binary files /dev/null and b/Tiles/AbyssLowerMusicbox.png differ diff --git a/Tiles/Astral/AstralOre.cs b/Tiles/Astral/AstralOre.cs index 0fca9758a9..14635b00c1 100644 --- a/Tiles/Astral/AstralOre.cs +++ b/Tiles/Astral/AstralOre.cs @@ -32,16 +32,12 @@ namespace CalamityMod.Tiles.Astral public override bool CanKillTile(int i, int j, ref bool blockDamaged) { - //ASTRAL_IMPLEMENT: UNDO THIS COMMENT - //return CalamityWorld.downedStarGod; - return true; + return CalamityWorld.downedStarGod; } public override bool CanExplode(int i, int j) { - //ASTRAL_IMPLEMENT: UNDO THIS COMMENT - //return CalamityWorld.downedStarGod; - return true; + return CalamityWorld.downedStarGod; } public override void NumDust(int i, int j, bool fail, ref int num) diff --git a/Tiles/AstrumDeusMusicbox.cs b/Tiles/AstrumDeusMusicbox.cs new file mode 100644 index 0000000000..743299ccd1 --- /dev/null +++ b/Tiles/AstrumDeusMusicbox.cs @@ -0,0 +1,39 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; +using Terraria.ObjectData; +using Terraria.DataStructures; + +namespace CalamityMod.Tiles +{ + public class AstrumDeusMusicbox : ModTile + { + public override void SetDefaults() + { + Main.tileFrameImportant[Type] = true; + Main.tileObsidianKill[Type] = true; + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.Origin = new Point16(0, 1); + TileObjectData.newTile.LavaDeath = false; + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(Type); + disableSmartCursor = true; + ModTranslation name = CreateMapEntryName(); + name.SetDefault("Music Box"); + AddMapEntry(new Color(200, 200, 200), name); + } + + public override void KillMultiTile(int i, int j, int frameX, int frameY) + { + Item.NewItem(i * 16, j * 16, 16, 48, mod.ItemType("AstrumDeusMusicbox")); + } + + public override void MouseOver(int i, int j) + { + Player player = Main.LocalPlayer; + player.noThrow = 2; + player.showItemIcon = true; + player.showItemIcon2 = mod.ItemType("AstrumDeusMusicbox"); + } + } +} \ No newline at end of file diff --git a/Tiles/AstrumDeusMusicbox.png b/Tiles/AstrumDeusMusicbox.png new file mode 100644 index 0000000000..b5dc5b56e0 Binary files /dev/null and b/Tiles/AstrumDeusMusicbox.png differ diff --git a/Tiles/BrimmyMusicbox.cs b/Tiles/BrimmyMusicbox.cs new file mode 100644 index 0000000000..f69ee7916f --- /dev/null +++ b/Tiles/BrimmyMusicbox.cs @@ -0,0 +1,39 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; +using Terraria.ObjectData; +using Terraria.DataStructures; + +namespace CalamityMod.Tiles +{ + public class BrimmyMusicbox : ModTile + { + public override void SetDefaults() + { + Main.tileFrameImportant[Type] = true; + Main.tileObsidianKill[Type] = true; + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.Origin = new Point16(0, 1); + TileObjectData.newTile.LavaDeath = false; + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(Type); + disableSmartCursor = true; + ModTranslation name = CreateMapEntryName(); + name.SetDefault("Music Box"); + AddMapEntry(new Color(200, 200, 200), name); + } + + public override void KillMultiTile(int i, int j, int frameX, int frameY) + { + Item.NewItem(i * 16, j * 16, 16, 48, mod.ItemType("BrimmyMusicbox")); + } + + public override void MouseOver(int i, int j) + { + Player player = Main.LocalPlayer; + player.noThrow = 2; + player.showItemIcon = true; + player.showItemIcon2 = mod.ItemType("BrimmyMusicbox"); + } + } +} \ No newline at end of file diff --git a/Tiles/BrimmyMusicbox.png b/Tiles/BrimmyMusicbox.png new file mode 100644 index 0000000000..ca6ffbe343 Binary files /dev/null and b/Tiles/BrimmyMusicbox.png differ diff --git a/Tiles/CalamityMusicbox.cs b/Tiles/CalamityMusicbox.cs new file mode 100644 index 0000000000..2a084ccd2c --- /dev/null +++ b/Tiles/CalamityMusicbox.cs @@ -0,0 +1,39 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; +using Terraria.ObjectData; +using Terraria.DataStructures; + +namespace CalamityMod.Tiles +{ + public class CalamityMusicbox : ModTile + { + public override void SetDefaults() + { + Main.tileFrameImportant[Type] = true; + Main.tileObsidianKill[Type] = true; + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.Origin = new Point16(0, 1); + TileObjectData.newTile.LavaDeath = false; + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(Type); + disableSmartCursor = true; + ModTranslation name = CreateMapEntryName(); + name.SetDefault("Music Box"); + AddMapEntry(new Color(200, 200, 200), name); + } + + public override void KillMultiTile(int i, int j, int frameX, int frameY) + { + Item.NewItem(i * 16, j * 16, 16, 48, mod.ItemType("CalamityMusicbox")); + } + + public override void MouseOver(int i, int j) + { + Player player = Main.LocalPlayer; + player.noThrow = 2; + player.showItemIcon = true; + player.showItemIcon2 = mod.ItemType("CalamityMusicbox"); + } + } +} \ No newline at end of file diff --git a/Tiles/CalamityMusicbox.png b/Tiles/CalamityMusicbox.png new file mode 100644 index 0000000000..e937e1f2dd Binary files /dev/null and b/Tiles/CalamityMusicbox.png differ diff --git a/Tiles/CragMusicbox.cs b/Tiles/CragMusicbox.cs new file mode 100644 index 0000000000..8b416a9de5 --- /dev/null +++ b/Tiles/CragMusicbox.cs @@ -0,0 +1,39 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; +using Terraria.ObjectData; +using Terraria.DataStructures; + +namespace CalamityMod.Tiles +{ + public class CragMusicbox : ModTile + { + public override void SetDefaults() + { + Main.tileFrameImportant[Type] = true; + Main.tileObsidianKill[Type] = true; + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.Origin = new Point16(0, 1); + TileObjectData.newTile.LavaDeath = false; + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(Type); + disableSmartCursor = true; + ModTranslation name = CreateMapEntryName(); + name.SetDefault("Music Box"); + AddMapEntry(new Color(200, 200, 200), name); + } + + public override void KillMultiTile(int i, int j, int frameX, int frameY) + { + Item.NewItem(i * 16, j * 16, 16, 48, mod.ItemType("CragMusicbox")); + } + + public override void MouseOver(int i, int j) + { + Player player = Main.LocalPlayer; + player.noThrow = 2; + player.showItemIcon = true; + player.showItemIcon2 = mod.ItemType("CragMusicbox"); + } + } +} \ No newline at end of file diff --git a/Tiles/CragMusicbox.png b/Tiles/CragMusicbox.png new file mode 100644 index 0000000000..7856760959 Binary files /dev/null and b/Tiles/CragMusicbox.png differ diff --git a/Tiles/DoGP2Musicbox.cs b/Tiles/DoGP2Musicbox.cs new file mode 100644 index 0000000000..5cd3d95458 --- /dev/null +++ b/Tiles/DoGP2Musicbox.cs @@ -0,0 +1,39 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; +using Terraria.ObjectData; +using Terraria.DataStructures; + +namespace CalamityMod.Tiles +{ + public class DoGP2Musicbox : ModTile + { + public override void SetDefaults() + { + Main.tileFrameImportant[Type] = true; + Main.tileObsidianKill[Type] = true; + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.Origin = new Point16(0, 1); + TileObjectData.newTile.LavaDeath = false; + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.addTile(Type); + disableSmartCursor = true; + ModTranslation name = CreateMapEntryName(); + name.SetDefault("Music Box"); + AddMapEntry(new Color(200, 200, 200), name); + } + + public override void KillMultiTile(int i, int j, int frameX, int frameY) + { + Item.NewItem(i * 16, j * 16, 16, 48, mod.ItemType("DoGP2Musicbox")); + } + + public override void MouseOver(int i, int j) + { + Player player = Main.LocalPlayer; + player.noThrow = 2; + player.showItemIcon = true; + player.showItemIcon2 = mod.ItemType("DoGP2Musicbox"); + } + } +} \ No newline at end of file diff --git a/Tiles/DoGP2Musicbox.png b/Tiles/DoGP2Musicbox.png new file mode 100644 index 0000000000..0440be9972 Binary files /dev/null and b/Tiles/DoGP2Musicbox.png differ diff --git a/Tiles/PlantyMush.cs b/Tiles/PlantyMush.cs index 7dbd2e2853..88a59ebc5d 100644 --- a/Tiles/PlantyMush.cs +++ b/Tiles/PlantyMush.cs @@ -44,11 +44,11 @@ namespace CalamityMod.Tiles int num8 = WorldGen.genRand.Next((int)Main.rockLayer, (int)(Main.rockLayer + (double)Main.maxTilesY * 0.143)); if (Main.tile[i, j + 1] != null) { - if (!Main.tile[i, j + 1].active()) + if (!Main.tile[i, j + 1].active() && Main.tile[i, j + 1].type != (ushort)mod.TileType("ViperVines")) { if (Main.tile[i, j + 1].liquid == 255 && - (Main.tile[i, j + 1].wall == (byte)mod.WallType("MossyGravelWall") || - Main.tile[i, j + 1].wall == (byte)mod.WallType("AbyssGravelWall")) && + (Main.tile[i, j + 1].wall == (ushort)mod.WallType("MossyGravelWall") || + Main.tile[i, j + 1].wall == (ushort)mod.WallType("AbyssGravelWall")) && !Main.tile[i, j + 1].lava()) { bool flag13 = false; diff --git a/Tiles/Tenebris.cs b/Tiles/Tenebris.cs index f54d98987e..644f659599 100644 --- a/Tiles/Tenebris.cs +++ b/Tiles/Tenebris.cs @@ -70,9 +70,7 @@ namespace CalamityMod.Tiles { if (Main.tile[i, j].active()) { - if (Main.tile[i, j].liquid == 255 && - (Main.tile[i, j].type == (ushort)mod.TileType("PlantyMush") || (Main.tile[i, j].type == (ushort)mod.TileType("AbyssGravel") && Main.rand.Next(5) == 0)) && - !Main.tile[i, j].lava()) + if (Main.rand.Next(5) == 0 && !Main.tile[i, j].lava()) { Main.tile[i, j].type = (ushort)mod.TileType("Tenebris"); WorldGen.SquareTileFrame(i, j, true); diff --git a/Tiles/ViperVines.cs b/Tiles/ViperVines.cs index c9d5858272..2fe598ee2a 100644 --- a/Tiles/ViperVines.cs +++ b/Tiles/ViperVines.cs @@ -25,20 +25,25 @@ namespace CalamityMod.Tiles num = fail ? 1 : 3; } + public override void KillTile(int i, int j, ref bool fail, ref bool effectOnly, ref bool noItem) + { + //GIVE VINE ROPE IF SPECIAL VINE BOOK + if (WorldGen.genRand.Next(2) == 0 && Main.player[(int)Player.FindClosest(new Vector2((float)(i * 16), (float)(j * 16)), 16, 16)].cordage) + { + Item.NewItem(new Vector2(i * 16 + 8f, j * 16 + 8f), ItemID.VineRope); + } + } + public override void RandomUpdate(int i, int j) { - int num8 = WorldGen.genRand.Next((int)Main.rockLayer, (int)(Main.rockLayer + (double)Main.maxTilesY * 0.143)); if (Main.tile[i, j + 1] != null) { - if (Main.tile[i, j + 1].active()) + if (!Main.tile[i, j + 1].active() && Main.tile[i, j + 1].type != (ushort)mod.TileType("ViperVines")) { - if (Main.tile[i, j + 1].liquid == 255 && - (Main.tile[i, j + 1].wall == (byte)mod.WallType("MossyGravelWall") || - Main.tile[i, j + 1].wall == (byte)mod.WallType("AbyssGravelWall")) && - !Main.tile[i, j + 1].lava()) + if (Main.tile[i, j + 1].liquid >= 128 && !Main.tile[i, j + 1].lava()) { bool flag13 = false; - for (int num52 = num8; num52 > num8 - 10; num52--) + for (int num52 = j; num52 > j - 10; j--) { if (Main.tile[i, num52].bottomSlope()) { diff --git a/UI/AstralArcanumUI.cs b/UI/AstralArcanumUI.cs index 1f5e08b8e9..f353d54c03 100644 --- a/UI/AstralArcanumUI.cs +++ b/UI/AstralArcanumUI.cs @@ -72,7 +72,7 @@ namespace CalamityMod.UI public static void UpdateAndDraw(SpriteBatch sb) { //Don't do anything if not open - bool forceOpenAndTeleport = CalamityPlayer.bossRushStage == 12 && !NPCs.CalamityGlobalNPC.AnyBossNPCS() && !Main.player[Main.myPlayer].ZoneUnderworldHeight; + bool forceOpenAndTeleport = CalamityWorld.bossRushStage == 12 && !NPCs.CalamityGlobalNPC.AnyBossNPCS() && !Main.player[Main.myPlayer].ZoneUnderworldHeight; if (forceOpenAndTeleport) { Open = true; diff --git a/UI/BossHealthBarManager.cs b/UI/BossHealthBarManager.cs index de29822511..ccfb64d33c 100644 --- a/UI/BossHealthBarManager.cs +++ b/UI/BossHealthBarManager.cs @@ -64,7 +64,16 @@ namespace CalamityMod.UI BossMainHPBar = mod.GetTexture("ExtraTextures/UI/BossHPMainBar"); BossComboHPBar = mod.GetTexture("ExtraTextures/UI/BossHPComboBar"); BossSeperatorBar = mod.GetTexture("ExtraTextures/UI/BossHPSeperatorBar"); - HPBarFont = mod.GetFont("Fonts/HPBarFont"); + + PlatformID id = Environment.OSVersion.Platform; + if (id == PlatformID.Win32NT && !Environment.Is64BitProcess) + { + HPBarFont = mod.GetFont("Fonts/HPBarFont"); + } + else + { + HPBarFont = Main.fontMouseText; + } } OneToMany = new Dictionary(); @@ -555,7 +564,7 @@ namespace CalamityMod.UI } } } - + if (dead && _lastName == "") { _lastName = _npc.FullName; diff --git a/UIHandler.cs b/UIHandler.cs index 4ef26f6f74..f6cce4e919 100644 --- a/UIHandler.cs +++ b/UIHandler.cs @@ -35,7 +35,7 @@ namespace CalamityMod userBar = new UserInterface(); userBar.SetState(uiBar); - Texture2D borderTex2 = mod.GetTexture("ExtraTextures/UI/BarStressBorder"), barTex2 = mod.GetTexture("ExtraTextures/UI/BarAdrenaline"); //replace 'null' with your textures. + Texture2D borderTex2 = mod.GetTexture("ExtraTextures/UI/BarAdrenalineBorder"), barTex2 = mod.GetTexture("ExtraTextures/UI/BarAdrenaline"); //replace 'null' with your textures. uiBar2 = new UIBar2(borderTex2, barTex2, 4); //the 4 is how many pixels inwards to stick the bar, which in this case is 4. userBar2 = new UserInterface(); userBar2.SetState(uiBar2); diff --git a/build.txt b/build.txt index 485ccb1ae0..d493170ac0 100644 --- a/build.txt +++ b/build.txt @@ -1,5 +1,5 @@ author = MountainDrew -version = 1.4.0.001 +version = 1.4.1.001 displayName = Calamity Mod homepage = https://forums.terraria.org/index.php?threads/calamity-mod.44065/ hideCode = true diff --git a/description.txt b/description.txt index 56f432504a..14f55be96f 100644 --- a/description.txt +++ b/description.txt @@ -5,5 +5,5 @@ It currently contains: 4 new modes for extra challenge 3 new biomes 250+ new enemy NPCs -1200+ new items +1250+ new items Cross-content support for GRealm \ No newline at end of file