diff --git a/Backgrounds/AstralDesertSurfaceBGStyle.cs b/Backgrounds/AstralDesertSurfaceBGStyle.cs index 3dc30eea18..1a29028624 100644 --- a/Backgrounds/AstralDesertSurfaceBGStyle.cs +++ b/Backgrounds/AstralDesertSurfaceBGStyle.cs @@ -2,6 +2,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; + namespace CalamityMod.Backgrounds { public class AstralDesertSurfaceBGStyle : ModSurfaceBgStyle diff --git a/Backgrounds/AstralSnowSurfaceBGStyle.cs b/Backgrounds/AstralSnowSurfaceBGStyle.cs index 690abbee27..a9e19766d7 100644 --- a/Backgrounds/AstralSnowSurfaceBGStyle.cs +++ b/Backgrounds/AstralSnowSurfaceBGStyle.cs @@ -2,6 +2,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; + namespace CalamityMod.Backgrounds { public class AstralSnowSurfaceBGStyle : ModSurfaceBgStyle diff --git a/Backgrounds/AstralSurfaceBGStyle.cs b/Backgrounds/AstralSurfaceBGStyle.cs index 6e771909f0..4c369f64ee 100644 --- a/Backgrounds/AstralSurfaceBGStyle.cs +++ b/Backgrounds/AstralSurfaceBGStyle.cs @@ -1,6 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; + namespace CalamityMod.Backgrounds { public class AstralSurfaceBGStyle : ModSurfaceBgStyle diff --git a/Backgrounds/AstralUndergroungBGStyle.cs b/Backgrounds/AstralUndergroungBGStyle.cs index 947c43a6eb..f996699ff0 100644 --- a/Backgrounds/AstralUndergroungBGStyle.cs +++ b/Backgrounds/AstralUndergroungBGStyle.cs @@ -1,6 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; + namespace CalamityMod.Backgrounds { public class ExampleUgBgStyle : ModUgBgStyle diff --git a/Backgrounds/SulphurSeaSurfaceBGStyle.cs b/Backgrounds/SulphurSeaSurfaceBGStyle.cs index a37d8fba09..87ec69c4dd 100644 --- a/Backgrounds/SulphurSeaSurfaceBGStyle.cs +++ b/Backgrounds/SulphurSeaSurfaceBGStyle.cs @@ -1,6 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; + namespace CalamityMod.Backgrounds { public class SulphurSeaSurfaceBGStyle : ModSurfaceBgStyle diff --git a/Backgrounds/SulphurSeaSurfaceClose.png b/Backgrounds/SulphurSeaSurfaceClose.png index 9aa53e7244..7fcc57576d 100644 Binary files a/Backgrounds/SulphurSeaSurfaceClose.png and b/Backgrounds/SulphurSeaSurfaceClose.png differ diff --git a/Buffs/Amidias/AmidiasBlessing.cs b/Buffs/Amidias/AmidiasBlessing.cs index e873ae160e..3229f2bd87 100644 --- a/Buffs/Amidias/AmidiasBlessing.cs +++ b/Buffs/Amidias/AmidiasBlessing.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Buffs.Amidias { diff --git a/Buffs/Amidias/HermitCrab.cs b/Buffs/Amidias/HermitCrab.cs index 525ad524a9..86e77fefcc 100644 --- a/Buffs/Amidias/HermitCrab.cs +++ b/Buffs/Amidias/HermitCrab.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Buffs.Amidias { diff --git a/Buffs/CalamityGlobalBuff.cs b/Buffs/CalamityGlobalBuff.cs index ae23514e67..aaa836495f 100644 --- a/Buffs/CalamityGlobalBuff.cs +++ b/Buffs/CalamityGlobalBuff.cs @@ -3,6 +3,7 @@ using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items.CalamityCustomThrowingDamage; using CalamityMod.World; +using CalamityMod.CalPlayer; namespace CalamityMod.Buffs { diff --git a/Buffs/AbyssalFlames.cs b/Buffs/DoTDebuffs/AbyssalFlames.cs similarity index 90% rename from Buffs/AbyssalFlames.cs rename to Buffs/DoTDebuffs/AbyssalFlames.cs index 63f487e62d..5843c44863 100644 --- a/Buffs/AbyssalFlames.cs +++ b/Buffs/DoTDebuffs/AbyssalFlames.cs @@ -1,8 +1,9 @@ using Terraria; using Terraria.ModLoader; using CalamityMod.NPCs; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.DoTDebuffs { public class AbyssalFlames : ModBuff { diff --git a/Buffs/AbyssalFlames.png b/Buffs/DoTDebuffs/AbyssalFlames.png similarity index 100% rename from Buffs/AbyssalFlames.png rename to Buffs/DoTDebuffs/AbyssalFlames.png diff --git a/Buffs/AstralInfectionDebuff.cs b/Buffs/DoTDebuffs/AstralInfectionDebuff.cs similarity index 90% rename from Buffs/AstralInfectionDebuff.cs rename to Buffs/DoTDebuffs/AstralInfectionDebuff.cs index c9d5e68ef4..9b16b295dc 100644 --- a/Buffs/AstralInfectionDebuff.cs +++ b/Buffs/DoTDebuffs/AstralInfectionDebuff.cs @@ -1,8 +1,9 @@ using Terraria; using Terraria.ModLoader; using CalamityMod.NPCs; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.DoTDebuffs { public class AstralInfectionDebuff : ModBuff { diff --git a/Buffs/AstralInfectionDebuff.png b/Buffs/DoTDebuffs/AstralInfectionDebuff.png similarity index 100% rename from Buffs/AstralInfectionDebuff.png rename to Buffs/DoTDebuffs/AstralInfectionDebuff.png diff --git a/Buffs/BrimstoneFlames.cs b/Buffs/DoTDebuffs/BrimstoneFlames.cs similarity index 90% rename from Buffs/BrimstoneFlames.cs rename to Buffs/DoTDebuffs/BrimstoneFlames.cs index 5d630d89a5..6190570c0b 100644 --- a/Buffs/BrimstoneFlames.cs +++ b/Buffs/DoTDebuffs/BrimstoneFlames.cs @@ -1,8 +1,9 @@ using Terraria; using Terraria.ModLoader; using CalamityMod.NPCs; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.DoTDebuffs { public class BrimstoneFlames : ModBuff { diff --git a/Buffs/BrimstoneFlames.png b/Buffs/DoTDebuffs/BrimstoneFlames.png similarity index 100% rename from Buffs/BrimstoneFlames.png rename to Buffs/DoTDebuffs/BrimstoneFlames.png diff --git a/Buffs/BurningBlood.cs b/Buffs/DoTDebuffs/BurningBlood.cs similarity index 90% rename from Buffs/BurningBlood.cs rename to Buffs/DoTDebuffs/BurningBlood.cs index 86d2a9a7d1..d1d160ac9d 100644 --- a/Buffs/BurningBlood.cs +++ b/Buffs/DoTDebuffs/BurningBlood.cs @@ -1,8 +1,9 @@ using Terraria; using Terraria.ModLoader; using CalamityMod.NPCs; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.DoTDebuffs { public class BurningBlood : ModBuff { diff --git a/Buffs/BurningBlood.png b/Buffs/DoTDebuffs/BurningBlood.png similarity index 100% rename from Buffs/BurningBlood.png rename to Buffs/DoTDebuffs/BurningBlood.png diff --git a/Buffs/CrushDepth.cs b/Buffs/DoTDebuffs/CrushDepth.cs similarity index 90% rename from Buffs/CrushDepth.cs rename to Buffs/DoTDebuffs/CrushDepth.cs index 1487843a6d..083454dcdc 100644 --- a/Buffs/CrushDepth.cs +++ b/Buffs/DoTDebuffs/CrushDepth.cs @@ -1,8 +1,9 @@ using Terraria; using Terraria.ModLoader; using CalamityMod.NPCs; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.DoTDebuffs { public class CrushDepth : ModBuff { diff --git a/Buffs/CrushDepth.png b/Buffs/DoTDebuffs/CrushDepth.png similarity index 100% rename from Buffs/CrushDepth.png rename to Buffs/DoTDebuffs/CrushDepth.png diff --git a/Buffs/DemonFlames.cs b/Buffs/DoTDebuffs/DemonFlames.cs similarity index 92% rename from Buffs/DemonFlames.cs rename to Buffs/DoTDebuffs/DemonFlames.cs index 7ade64a1c8..2e24cd7169 100644 --- a/Buffs/DemonFlames.cs +++ b/Buffs/DoTDebuffs/DemonFlames.cs @@ -2,7 +2,7 @@ using Terraria.ModLoader; using CalamityMod.NPCs; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.DoTDebuffs { public class DemonFlames : ModBuff { diff --git a/Buffs/DemonFlames.png b/Buffs/DoTDebuffs/DemonFlames.png similarity index 100% rename from Buffs/DemonFlames.png rename to Buffs/DoTDebuffs/DemonFlames.png diff --git a/Buffs/GodSlayerInferno.cs b/Buffs/DoTDebuffs/GodSlayerInferno.cs similarity index 90% rename from Buffs/GodSlayerInferno.cs rename to Buffs/DoTDebuffs/GodSlayerInferno.cs index 041b4425e4..0c82ca566c 100644 --- a/Buffs/GodSlayerInferno.cs +++ b/Buffs/DoTDebuffs/GodSlayerInferno.cs @@ -1,8 +1,9 @@ using Terraria; using Terraria.ModLoader; using CalamityMod.NPCs; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.DoTDebuffs { public class GodSlayerInferno : ModBuff { diff --git a/Buffs/DoTDebuffs/GodSlayerInferno.png b/Buffs/DoTDebuffs/GodSlayerInferno.png new file mode 100644 index 0000000000..70491341db Binary files /dev/null and b/Buffs/DoTDebuffs/GodSlayerInferno.png differ diff --git a/Buffs/HolyInferno.cs b/Buffs/DoTDebuffs/HolyInferno.cs similarity index 89% rename from Buffs/HolyInferno.cs rename to Buffs/DoTDebuffs/HolyInferno.cs index cde53fc37b..7ecad819d5 100644 --- a/Buffs/HolyInferno.cs +++ b/Buffs/DoTDebuffs/HolyInferno.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.DoTDebuffs { public class HolyInferno : ModBuff { diff --git a/Buffs/HolyInferno.png b/Buffs/DoTDebuffs/HolyInferno.png similarity index 100% rename from Buffs/HolyInferno.png rename to Buffs/DoTDebuffs/HolyInferno.png diff --git a/Buffs/HolyLight.cs b/Buffs/DoTDebuffs/HolyLight.cs similarity index 90% rename from Buffs/HolyLight.cs rename to Buffs/DoTDebuffs/HolyLight.cs index 06343d3740..f2522f3f18 100644 --- a/Buffs/HolyLight.cs +++ b/Buffs/DoTDebuffs/HolyLight.cs @@ -1,8 +1,9 @@ using Terraria; using Terraria.ModLoader; using CalamityMod.NPCs; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.DoTDebuffs { public class HolyLight : ModBuff { diff --git a/Buffs/HolyLight.png b/Buffs/DoTDebuffs/HolyLight.png similarity index 100% rename from Buffs/HolyLight.png rename to Buffs/DoTDebuffs/HolyLight.png diff --git a/Buffs/LethalLavaBurn.cs b/Buffs/DoTDebuffs/LethalLavaBurn.cs similarity index 87% rename from Buffs/LethalLavaBurn.cs rename to Buffs/DoTDebuffs/LethalLavaBurn.cs index dee52d60d0..46132946fd 100644 --- a/Buffs/LethalLavaBurn.cs +++ b/Buffs/DoTDebuffs/LethalLavaBurn.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.DoTDebuffs { public class LethalLavaBurn : ModBuff { diff --git a/Buffs/LethalLavaBurn.png b/Buffs/DoTDebuffs/LethalLavaBurn.png similarity index 100% rename from Buffs/LethalLavaBurn.png rename to Buffs/DoTDebuffs/LethalLavaBurn.png diff --git a/Buffs/Nightwither.cs b/Buffs/DoTDebuffs/Nightwither.cs similarity index 92% rename from Buffs/Nightwither.cs rename to Buffs/DoTDebuffs/Nightwither.cs index f3fceef3ae..867977fd58 100644 --- a/Buffs/Nightwither.cs +++ b/Buffs/DoTDebuffs/Nightwither.cs @@ -2,7 +2,7 @@ using Terraria.ModLoader; using CalamityMod.NPCs; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.DoTDebuffs { public class Nightwither : ModBuff { diff --git a/Buffs/Nightwither.png b/Buffs/DoTDebuffs/Nightwither.png similarity index 100% rename from Buffs/Nightwither.png rename to Buffs/DoTDebuffs/Nightwither.png diff --git a/Buffs/Plague.cs b/Buffs/DoTDebuffs/Plague.cs similarity index 90% rename from Buffs/Plague.cs rename to Buffs/DoTDebuffs/Plague.cs index 12608dc40c..ad77a4547e 100644 --- a/Buffs/Plague.cs +++ b/Buffs/DoTDebuffs/Plague.cs @@ -1,8 +1,9 @@ using Terraria; using Terraria.ModLoader; using CalamityMod.NPCs; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.DoTDebuffs { public class Plague : ModBuff { diff --git a/Buffs/Plague.png b/Buffs/DoTDebuffs/Plague.png similarity index 100% rename from Buffs/Plague.png rename to Buffs/DoTDebuffs/Plague.png diff --git a/Buffs/Shadowflame.cs b/Buffs/DoTDebuffs/Shadowflame.cs similarity index 87% rename from Buffs/Shadowflame.cs rename to Buffs/DoTDebuffs/Shadowflame.cs index c5f96a4d50..ca4e266a3f 100644 --- a/Buffs/Shadowflame.cs +++ b/Buffs/DoTDebuffs/Shadowflame.cs @@ -1,8 +1,8 @@ using Terraria; using Terraria.ModLoader; -using CalamityMod.NPCs; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.DoTDebuffs { public class Shadowflame : ModBuff { diff --git a/Buffs/Shadowflame.png b/Buffs/DoTDebuffs/Shadowflame.png similarity index 100% rename from Buffs/Shadowflame.png rename to Buffs/DoTDebuffs/Shadowflame.png diff --git a/Buffs/Shred.cs b/Buffs/DoTDebuffs/Shred.cs similarity index 92% rename from Buffs/Shred.cs rename to Buffs/DoTDebuffs/Shred.cs index acb09a88d9..8a40458271 100644 --- a/Buffs/Shred.cs +++ b/Buffs/DoTDebuffs/Shred.cs @@ -2,7 +2,7 @@ using Terraria.ModLoader; using CalamityMod.NPCs; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.DoTDebuffs { public class Shred : ModBuff { diff --git a/Buffs/Shred.png b/Buffs/DoTDebuffs/Shred.png similarity index 100% rename from Buffs/Shred.png rename to Buffs/DoTDebuffs/Shred.png diff --git a/Buffs/VulnerabilityHex.cs b/Buffs/DoTDebuffs/VulnerabilityHex.cs similarity index 88% rename from Buffs/VulnerabilityHex.cs rename to Buffs/DoTDebuffs/VulnerabilityHex.cs index 68c7cb430b..c73708fc10 100644 --- a/Buffs/VulnerabilityHex.cs +++ b/Buffs/DoTDebuffs/VulnerabilityHex.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.DoTDebuffs { public class VulnerabilityHex : ModBuff { diff --git a/Buffs/VulnerabilityHex.png b/Buffs/DoTDebuffs/VulnerabilityHex.png similarity index 100% rename from Buffs/VulnerabilityHex.png rename to Buffs/DoTDebuffs/VulnerabilityHex.png diff --git a/Buffs/Fabsol/BloodyMary.cs b/Buffs/Fabsol/BloodyMary.cs index 66f381ec4f..bec7535a2e 100644 --- a/Buffs/Fabsol/BloodyMary.cs +++ b/Buffs/Fabsol/BloodyMary.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Buffs.Fabsol { diff --git a/Buffs/Fabsol/BlueSpeedCandle.cs b/Buffs/Fabsol/BlueSpeedCandle.cs index 44c7564dc3..5c052f6bc3 100644 --- a/Buffs/Fabsol/BlueSpeedCandle.cs +++ b/Buffs/Fabsol/BlueSpeedCandle.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Buffs.Fabsol { diff --git a/Buffs/Fabsol/CaribbeanRum.cs b/Buffs/Fabsol/CaribbeanRum.cs index c157614486..85df70ec6e 100644 --- a/Buffs/Fabsol/CaribbeanRum.cs +++ b/Buffs/Fabsol/CaribbeanRum.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Buffs.Fabsol { diff --git a/Buffs/Fabsol/CinnamonRoll.cs b/Buffs/Fabsol/CinnamonRoll.cs index 596f59e2fe..9ccf4b7131 100644 --- a/Buffs/Fabsol/CinnamonRoll.cs +++ b/Buffs/Fabsol/CinnamonRoll.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Buffs.Fabsol { diff --git a/Buffs/Fabsol/Everclear.cs b/Buffs/Fabsol/Everclear.cs index 01f48b4e3e..fb7f74c973 100644 --- a/Buffs/Fabsol/Everclear.cs +++ b/Buffs/Fabsol/Everclear.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Buffs.Fabsol { diff --git a/Buffs/Fabsol/EvergreenGin.cs b/Buffs/Fabsol/EvergreenGin.cs index cd5fbb085e..ee3bcc8094 100644 --- a/Buffs/Fabsol/EvergreenGin.cs +++ b/Buffs/Fabsol/EvergreenGin.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Buffs.Fabsol { diff --git a/Buffs/Fabsol/FabsolVodka.cs b/Buffs/Fabsol/FabsolVodka.cs index d2c63cf931..9d6e95d199 100644 --- a/Buffs/Fabsol/FabsolVodka.cs +++ b/Buffs/Fabsol/FabsolVodka.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Buffs.Fabsol { diff --git a/Buffs/Fabsol/Fireball.cs b/Buffs/Fabsol/Fireball.cs index 94a7bf7448..588c7c9af2 100644 --- a/Buffs/Fabsol/Fireball.cs +++ b/Buffs/Fabsol/Fireball.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Buffs.Fabsol { diff --git a/Buffs/Fabsol/GrapeBeer.cs b/Buffs/Fabsol/GrapeBeer.cs index bc86a38b31..bf57d4c29c 100644 --- a/Buffs/Fabsol/GrapeBeer.cs +++ b/Buffs/Fabsol/GrapeBeer.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Buffs.Fabsol { diff --git a/Buffs/Fabsol/Margarita.cs b/Buffs/Fabsol/Margarita.cs index 7d7fa52c21..631b01b59a 100644 --- a/Buffs/Fabsol/Margarita.cs +++ b/Buffs/Fabsol/Margarita.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Buffs.Fabsol { diff --git a/Buffs/Fabsol/Moonshine.cs b/Buffs/Fabsol/Moonshine.cs index 08bfa61f6d..bc382b46a3 100644 --- a/Buffs/Fabsol/Moonshine.cs +++ b/Buffs/Fabsol/Moonshine.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Buffs.Fabsol { diff --git a/Buffs/Fabsol/MoscowMule.cs b/Buffs/Fabsol/MoscowMule.cs index d83609df9d..4a0225559c 100644 --- a/Buffs/Fabsol/MoscowMule.cs +++ b/Buffs/Fabsol/MoscowMule.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Buffs.Fabsol { diff --git a/Buffs/Fabsol/PinkHealthCandle.cs b/Buffs/Fabsol/PinkHealthCandle.cs index b755c5d2da..31b294d99c 100644 --- a/Buffs/Fabsol/PinkHealthCandle.cs +++ b/Buffs/Fabsol/PinkHealthCandle.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Buffs.Fabsol { diff --git a/Buffs/Fabsol/PurpleDefenseCandle.cs b/Buffs/Fabsol/PurpleDefenseCandle.cs index 47912f51a2..99331863d2 100644 --- a/Buffs/Fabsol/PurpleDefenseCandle.cs +++ b/Buffs/Fabsol/PurpleDefenseCandle.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Buffs.Fabsol { diff --git a/Buffs/Fabsol/RedWine.cs b/Buffs/Fabsol/RedWine.cs index 4a7a31390f..06930e38a2 100644 --- a/Buffs/Fabsol/RedWine.cs +++ b/Buffs/Fabsol/RedWine.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Buffs.Fabsol { diff --git a/Buffs/Fabsol/Rum.cs b/Buffs/Fabsol/Rum.cs index 2c45bf72e1..c5dd1becab 100644 --- a/Buffs/Fabsol/Rum.cs +++ b/Buffs/Fabsol/Rum.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Buffs.Fabsol { diff --git a/Buffs/Fabsol/Screwdriver.cs b/Buffs/Fabsol/Screwdriver.cs index 4f76dbfe42..2a5c868fc5 100644 --- a/Buffs/Fabsol/Screwdriver.cs +++ b/Buffs/Fabsol/Screwdriver.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Buffs.Fabsol { diff --git a/Buffs/Fabsol/StarBeamRye.cs b/Buffs/Fabsol/StarBeamRye.cs index c27aea71df..212a8afb6c 100644 --- a/Buffs/Fabsol/StarBeamRye.cs +++ b/Buffs/Fabsol/StarBeamRye.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Buffs.Fabsol { diff --git a/Buffs/Fabsol/Tequila.cs b/Buffs/Fabsol/Tequila.cs index 6cf9df93ec..49841d614f 100644 --- a/Buffs/Fabsol/Tequila.cs +++ b/Buffs/Fabsol/Tequila.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Buffs.Fabsol { diff --git a/Buffs/Fabsol/TequilaSunrise.cs b/Buffs/Fabsol/TequilaSunrise.cs index 6577e4c050..74c8191228 100644 --- a/Buffs/Fabsol/TequilaSunrise.cs +++ b/Buffs/Fabsol/TequilaSunrise.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Buffs.Fabsol { diff --git a/Buffs/Fabsol/Trippy.cs b/Buffs/Fabsol/Trippy.cs index 9458ecab36..7c8212b7ca 100644 --- a/Buffs/Fabsol/Trippy.cs +++ b/Buffs/Fabsol/Trippy.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Buffs.Fabsol { diff --git a/Buffs/Fabsol/Vodka.cs b/Buffs/Fabsol/Vodka.cs index 6f896cc774..76c1d4a691 100644 --- a/Buffs/Fabsol/Vodka.cs +++ b/Buffs/Fabsol/Vodka.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Buffs.Fabsol { diff --git a/Buffs/Fabsol/Whiskey.cs b/Buffs/Fabsol/Whiskey.cs index 1eefd09161..0b294fd4da 100644 --- a/Buffs/Fabsol/Whiskey.cs +++ b/Buffs/Fabsol/Whiskey.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Buffs.Fabsol { diff --git a/Buffs/Fabsol/WhiteWine.cs b/Buffs/Fabsol/WhiteWine.cs index 63ee06786f..7c537caa4e 100644 --- a/Buffs/Fabsol/WhiteWine.cs +++ b/Buffs/Fabsol/WhiteWine.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Buffs.Fabsol { diff --git a/Buffs/Fabsol/YellowDamageCandle.cs b/Buffs/Fabsol/YellowDamageCandle.cs index bcf400edff..8a71688b80 100644 --- a/Buffs/Fabsol/YellowDamageCandle.cs +++ b/Buffs/Fabsol/YellowDamageCandle.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ModLoader; using CalamityMod.NPCs; +using CalamityMod.CalPlayer; namespace CalamityMod.Buffs.Fabsol { diff --git a/Buffs/GodSlayerCooldown.png b/Buffs/GodSlayerCooldown.png deleted file mode 100644 index 6388658ff8..0000000000 Binary files a/Buffs/GodSlayerCooldown.png and /dev/null differ diff --git a/Buffs/GodSlayerInferno.png b/Buffs/GodSlayerInferno.png deleted file mode 100644 index a976faf75c..0000000000 Binary files a/Buffs/GodSlayerInferno.png and /dev/null differ diff --git a/Buffs/BrimstoneMount.cs b/Buffs/MountBuffs/BrimstoneMount.cs similarity index 89% rename from Buffs/BrimstoneMount.cs rename to Buffs/MountBuffs/BrimstoneMount.cs index 18d6746ba3..c830ad16cb 100644 --- a/Buffs/BrimstoneMount.cs +++ b/Buffs/MountBuffs/BrimstoneMount.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.MountBuffs { class BrimstoneMount : ModBuff { diff --git a/Buffs/BrimstoneMount.png b/Buffs/MountBuffs/BrimstoneMount.png similarity index 100% rename from Buffs/BrimstoneMount.png rename to Buffs/MountBuffs/BrimstoneMount.png diff --git a/Buffs/Fab.cs b/Buffs/MountBuffs/Fab.cs similarity index 90% rename from Buffs/Fab.cs rename to Buffs/MountBuffs/Fab.cs index 97acf38e74..0886de6452 100644 --- a/Buffs/Fab.cs +++ b/Buffs/MountBuffs/Fab.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.MountBuffs { class Fab : ModBuff { diff --git a/Buffs/Fab.png b/Buffs/MountBuffs/Fab.png similarity index 100% rename from Buffs/Fab.png rename to Buffs/MountBuffs/Fab.png diff --git a/Buffs/GazeOfCrysthamyrBuff.cs b/Buffs/MountBuffs/GazeOfCrysthamyrBuff.cs similarity index 90% rename from Buffs/GazeOfCrysthamyrBuff.cs rename to Buffs/MountBuffs/GazeOfCrysthamyrBuff.cs index 5abeedcd53..0a62544007 100644 --- a/Buffs/GazeOfCrysthamyrBuff.cs +++ b/Buffs/MountBuffs/GazeOfCrysthamyrBuff.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.MountBuffs { class GazeOfCrysthamyrBuff : ModBuff { diff --git a/Buffs/GazeOfCrysthamyrBuff.png b/Buffs/MountBuffs/GazeOfCrysthamyrBuff.png similarity index 100% rename from Buffs/GazeOfCrysthamyrBuff.png rename to Buffs/MountBuffs/GazeOfCrysthamyrBuff.png diff --git a/Buffs/SquishyBeanBuff.cs b/Buffs/MountBuffs/SquishyBeanBuff.cs similarity index 89% rename from Buffs/SquishyBeanBuff.cs rename to Buffs/MountBuffs/SquishyBeanBuff.cs index 9ad72f8617..d5b606a7b9 100644 --- a/Buffs/SquishyBeanBuff.cs +++ b/Buffs/MountBuffs/SquishyBeanBuff.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.MountBuffs { class SquishyBeanBuff : ModBuff { diff --git a/Buffs/SquishyBeanBuff.png b/Buffs/MountBuffs/SquishyBeanBuff.png similarity index 100% rename from Buffs/SquishyBeanBuff.png rename to Buffs/MountBuffs/SquishyBeanBuff.png diff --git a/Buffs/Permafrost/Popo.cs b/Buffs/Permafrost/Popo.cs index 766d1bbfa8..4762b25c27 100644 --- a/Buffs/Permafrost/Popo.cs +++ b/Buffs/Permafrost/Popo.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Buffs.Permafrost { diff --git a/Buffs/Permafrost/PopoNoseless.cs b/Buffs/Permafrost/PopoNoseless.cs index bad34b9146..b950a3c82d 100644 --- a/Buffs/Permafrost/PopoNoseless.cs +++ b/Buffs/Permafrost/PopoNoseless.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Buffs.Permafrost { diff --git a/Buffs/AkatoYharonBuff.cs b/Buffs/PetBuffs/AkatoYharonBuff.cs similarity index 93% rename from Buffs/AkatoYharonBuff.cs rename to Buffs/PetBuffs/AkatoYharonBuff.cs index c5a239e3c4..dd66a1ab4b 100644 --- a/Buffs/AkatoYharonBuff.cs +++ b/Buffs/PetBuffs/AkatoYharonBuff.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.PetBuffs { public class AkatoYharonBuff : ModBuff { diff --git a/Buffs/AkatoYharonBuff.png b/Buffs/PetBuffs/AkatoYharonBuff.png similarity index 100% rename from Buffs/AkatoYharonBuff.png rename to Buffs/PetBuffs/AkatoYharonBuff.png diff --git a/Buffs/BearBuff.cs b/Buffs/PetBuffs/BearBuff.cs similarity index 93% rename from Buffs/BearBuff.cs rename to Buffs/PetBuffs/BearBuff.cs index e406a3e1f9..cf0cc03eb0 100644 --- a/Buffs/BearBuff.cs +++ b/Buffs/PetBuffs/BearBuff.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.PetBuffs { public class BearBuff : ModBuff { diff --git a/Buffs/BearBuff.png b/Buffs/PetBuffs/BearBuff.png similarity index 100% rename from Buffs/BearBuff.png rename to Buffs/PetBuffs/BearBuff.png diff --git a/Buffs/BloodBound.cs b/Buffs/PetBuffs/BloodBound.cs similarity index 93% rename from Buffs/BloodBound.cs rename to Buffs/PetBuffs/BloodBound.cs index 16f4d0e64a..07c840e36a 100644 --- a/Buffs/BloodBound.cs +++ b/Buffs/PetBuffs/BloodBound.cs @@ -3,8 +3,9 @@ using Terraria.ID; using Terraria.ModLoader; using CalamityMod; using CalamityMod.NPCs; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.PetBuffs { public class BloodBound : ModBuff { diff --git a/Buffs/BloodBound.png b/Buffs/PetBuffs/BloodBound.png similarity index 100% rename from Buffs/BloodBound.png rename to Buffs/PetBuffs/BloodBound.png diff --git a/Buffs/BrimlingBuff.cs b/Buffs/PetBuffs/BrimlingBuff.cs similarity index 93% rename from Buffs/BrimlingBuff.cs rename to Buffs/PetBuffs/BrimlingBuff.cs index 909e02a742..a8233530db 100644 --- a/Buffs/BrimlingBuff.cs +++ b/Buffs/PetBuffs/BrimlingBuff.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.PetBuffs { public class BrimlingBuff : ModBuff { diff --git a/Buffs/BrimlingBuff.png b/Buffs/PetBuffs/BrimlingBuff.png similarity index 100% rename from Buffs/BrimlingBuff.png rename to Buffs/PetBuffs/BrimlingBuff.png diff --git a/Buffs/ChibiiBuff.cs b/Buffs/PetBuffs/ChibiiBuff.cs similarity index 93% rename from Buffs/ChibiiBuff.cs rename to Buffs/PetBuffs/ChibiiBuff.cs index 17694ab1f1..4e2901485e 100644 --- a/Buffs/ChibiiBuff.cs +++ b/Buffs/PetBuffs/ChibiiBuff.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.PetBuffs { public class ChibiiBuff : ModBuff { diff --git a/Buffs/ChibiiBuff.png b/Buffs/PetBuffs/ChibiiBuff.png similarity index 100% rename from Buffs/ChibiiBuff.png rename to Buffs/PetBuffs/ChibiiBuff.png diff --git a/Buffs/DannyDevito.cs b/Buffs/PetBuffs/DannyDevito.cs similarity index 93% rename from Buffs/DannyDevito.cs rename to Buffs/PetBuffs/DannyDevito.cs index bdb3a3d671..e10f3a4443 100644 --- a/Buffs/DannyDevito.cs +++ b/Buffs/PetBuffs/DannyDevito.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.PetBuffs { public class DannyDevito : ModBuff { diff --git a/Buffs/DannyDevito.png b/Buffs/PetBuffs/DannyDevito.png similarity index 100% rename from Buffs/DannyDevito.png rename to Buffs/PetBuffs/DannyDevito.png diff --git a/Buffs/Fox.cs b/Buffs/PetBuffs/Fox.cs similarity index 93% rename from Buffs/Fox.cs rename to Buffs/PetBuffs/Fox.cs index ed3a422812..8391c5a28a 100644 --- a/Buffs/Fox.cs +++ b/Buffs/PetBuffs/Fox.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.PetBuffs { public class Fox : ModBuff { diff --git a/Buffs/Fox.png b/Buffs/PetBuffs/Fox.png similarity index 100% rename from Buffs/Fox.png rename to Buffs/PetBuffs/Fox.png diff --git a/Buffs/Kendra.cs b/Buffs/PetBuffs/Kendra.cs similarity index 93% rename from Buffs/Kendra.cs rename to Buffs/PetBuffs/Kendra.cs index d3b5cee404..b820a748e1 100644 --- a/Buffs/Kendra.cs +++ b/Buffs/PetBuffs/Kendra.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.PetBuffs { public class Kendra : ModBuff { diff --git a/Buffs/Kendra.png b/Buffs/PetBuffs/Kendra.png similarity index 100% rename from Buffs/Kendra.png rename to Buffs/PetBuffs/Kendra.png diff --git a/Buffs/Levi.cs b/Buffs/PetBuffs/Levi.cs similarity index 93% rename from Buffs/Levi.cs rename to Buffs/PetBuffs/Levi.cs index a9947e40a8..5c45838910 100644 --- a/Buffs/Levi.cs +++ b/Buffs/PetBuffs/Levi.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.PetBuffs { public class Levi : ModBuff { diff --git a/Buffs/Levi.png b/Buffs/PetBuffs/Levi.png similarity index 100% rename from Buffs/Levi.png rename to Buffs/PetBuffs/Levi.png diff --git a/Buffs/StrangeOrb.cs b/Buffs/PetBuffs/StrangeOrb.cs similarity index 93% rename from Buffs/StrangeOrb.cs rename to Buffs/PetBuffs/StrangeOrb.cs index 26035b81f3..ea83e1d7e5 100644 --- a/Buffs/StrangeOrb.cs +++ b/Buffs/PetBuffs/StrangeOrb.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.PetBuffs { public class StrangeOrb : ModBuff { diff --git a/Buffs/StrangeOrb.png b/Buffs/PetBuffs/StrangeOrb.png similarity index 100% rename from Buffs/StrangeOrb.png rename to Buffs/PetBuffs/StrangeOrb.png diff --git a/Buffs/ThirdSageBuff.cs b/Buffs/PetBuffs/ThirdSageBuff.cs similarity index 94% rename from Buffs/ThirdSageBuff.cs rename to Buffs/PetBuffs/ThirdSageBuff.cs index 310a910531..8e247dbe05 100644 --- a/Buffs/ThirdSageBuff.cs +++ b/Buffs/PetBuffs/ThirdSageBuff.cs @@ -6,8 +6,9 @@ using System.Threading.Tasks; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.PetBuffs { public class ThirdSageBuff : ModBuff { diff --git a/Buffs/ThirdSageBuff.png b/Buffs/PetBuffs/ThirdSageBuff.png similarity index 100% rename from Buffs/ThirdSageBuff.png rename to Buffs/PetBuffs/ThirdSageBuff.png diff --git a/Buffs/AbyssalWeapon.cs b/Buffs/PotionBuffs/AbyssalWeapon.cs similarity index 88% rename from Buffs/AbyssalWeapon.cs rename to Buffs/PotionBuffs/AbyssalWeapon.cs index 668075e898..538752a6b7 100644 --- a/Buffs/AbyssalWeapon.cs +++ b/Buffs/PotionBuffs/AbyssalWeapon.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.PotionBuffs { public class AbyssalWeapon : ModBuff { diff --git a/Buffs/AbyssalWeapon.png b/Buffs/PotionBuffs/AbyssalWeapon.png similarity index 100% rename from Buffs/AbyssalWeapon.png rename to Buffs/PotionBuffs/AbyssalWeapon.png diff --git a/Buffs/AnechoicCoating.cs b/Buffs/PotionBuffs/AnechoicCoating.cs similarity index 88% rename from Buffs/AnechoicCoating.cs rename to Buffs/PotionBuffs/AnechoicCoating.cs index dbe28785c3..c64b4c2835 100644 --- a/Buffs/AnechoicCoating.cs +++ b/Buffs/PotionBuffs/AnechoicCoating.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.PotionBuffs { public class AnechoicCoating : ModBuff { diff --git a/Buffs/AnechoicCoating.png b/Buffs/PotionBuffs/AnechoicCoating.png similarity index 100% rename from Buffs/AnechoicCoating.png rename to Buffs/PotionBuffs/AnechoicCoating.png diff --git a/Buffs/ArmorCrumbling.cs b/Buffs/PotionBuffs/ArmorCrumbling.cs similarity index 88% rename from Buffs/ArmorCrumbling.cs rename to Buffs/PotionBuffs/ArmorCrumbling.cs index 6004249ea9..2da5664e76 100644 --- a/Buffs/ArmorCrumbling.cs +++ b/Buffs/PotionBuffs/ArmorCrumbling.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.PotionBuffs { public class ArmorCrumbling : ModBuff { diff --git a/Buffs/ArmorCrumbling.png b/Buffs/PotionBuffs/ArmorCrumbling.png similarity index 100% rename from Buffs/ArmorCrumbling.png rename to Buffs/PotionBuffs/ArmorCrumbling.png diff --git a/Buffs/ArmorShattering.cs b/Buffs/PotionBuffs/ArmorShattering.cs similarity index 88% rename from Buffs/ArmorShattering.cs rename to Buffs/PotionBuffs/ArmorShattering.cs index 7c6896608d..c08594414d 100644 --- a/Buffs/ArmorShattering.cs +++ b/Buffs/PotionBuffs/ArmorShattering.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.PotionBuffs { public class ArmorShattering : ModBuff { diff --git a/Buffs/ArmorShattering.png b/Buffs/PotionBuffs/ArmorShattering.png similarity index 100% rename from Buffs/ArmorShattering.png rename to Buffs/PotionBuffs/ArmorShattering.png diff --git a/Buffs/AstralInjectionBuff.cs b/Buffs/PotionBuffs/AstralInjectionBuff.cs similarity index 88% rename from Buffs/AstralInjectionBuff.cs rename to Buffs/PotionBuffs/AstralInjectionBuff.cs index da71ec0bf9..e0b6a526bd 100644 --- a/Buffs/AstralInjectionBuff.cs +++ b/Buffs/PotionBuffs/AstralInjectionBuff.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.PotionBuffs { public class AstralInjectionBuff : ModBuff { diff --git a/Buffs/AstralInjectionBuff.png b/Buffs/PotionBuffs/AstralInjectionBuff.png similarity index 100% rename from Buffs/AstralInjectionBuff.png rename to Buffs/PotionBuffs/AstralInjectionBuff.png diff --git a/Buffs/BoundingBuff.cs b/Buffs/PotionBuffs/BoundingBuff.cs similarity index 88% rename from Buffs/BoundingBuff.cs rename to Buffs/PotionBuffs/BoundingBuff.cs index c68443e81e..b0fa4f447f 100644 --- a/Buffs/BoundingBuff.cs +++ b/Buffs/PotionBuffs/BoundingBuff.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.PotionBuffs { public class BoundingBuff : ModBuff { diff --git a/Buffs/BoundingBuff.png b/Buffs/PotionBuffs/BoundingBuff.png similarity index 100% rename from Buffs/BoundingBuff.png rename to Buffs/PotionBuffs/BoundingBuff.png diff --git a/Buffs/Cadence.cs b/Buffs/PotionBuffs/Cadence.cs similarity index 87% rename from Buffs/Cadence.cs rename to Buffs/PotionBuffs/Cadence.cs index 50f7fbefcc..8786f7f73a 100644 --- a/Buffs/Cadence.cs +++ b/Buffs/PotionBuffs/Cadence.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.PotionBuffs { public class Cadence : ModBuff { diff --git a/Buffs/Cadence.png b/Buffs/PotionBuffs/Cadence.png similarity index 100% rename from Buffs/Cadence.png rename to Buffs/PotionBuffs/Cadence.png diff --git a/Buffs/CalciumBuff.cs b/Buffs/PotionBuffs/CalciumBuff.cs similarity index 87% rename from Buffs/CalciumBuff.cs rename to Buffs/PotionBuffs/CalciumBuff.cs index cf0ae5005f..445e8db0e2 100644 --- a/Buffs/CalciumBuff.cs +++ b/Buffs/PotionBuffs/CalciumBuff.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.PotionBuffs { public class CalciumBuff : ModBuff { diff --git a/Buffs/CalciumBuff.png b/Buffs/PotionBuffs/CalciumBuff.png similarity index 100% rename from Buffs/CalciumBuff.png rename to Buffs/PotionBuffs/CalciumBuff.png diff --git a/Buffs/CeaselessHunger.cs b/Buffs/PotionBuffs/CeaselessHunger.cs similarity index 88% rename from Buffs/CeaselessHunger.cs rename to Buffs/PotionBuffs/CeaselessHunger.cs index 732c89d7ae..b30c6e764e 100644 --- a/Buffs/CeaselessHunger.cs +++ b/Buffs/PotionBuffs/CeaselessHunger.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.PotionBuffs { public class CeaselessHunger : ModBuff { diff --git a/Buffs/CeaselessHunger.png b/Buffs/PotionBuffs/CeaselessHunger.png similarity index 100% rename from Buffs/CeaselessHunger.png rename to Buffs/PotionBuffs/CeaselessHunger.png diff --git a/Buffs/DraconicSurgeBuff.cs b/Buffs/PotionBuffs/DraconicSurgeBuff.cs similarity index 88% rename from Buffs/DraconicSurgeBuff.cs rename to Buffs/PotionBuffs/DraconicSurgeBuff.cs index adffff7cd4..967a3cbdc1 100644 --- a/Buffs/DraconicSurgeBuff.cs +++ b/Buffs/PotionBuffs/DraconicSurgeBuff.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.PotionBuffs { public class DraconicSurgeBuff : ModBuff { diff --git a/Buffs/DraconicSurgeBuff.png b/Buffs/PotionBuffs/DraconicSurgeBuff.png similarity index 100% rename from Buffs/DraconicSurgeBuff.png rename to Buffs/PotionBuffs/DraconicSurgeBuff.png diff --git a/Buffs/GravityNormalizerBuff.cs b/Buffs/PotionBuffs/GravityNormalizerBuff.cs similarity index 88% rename from Buffs/GravityNormalizerBuff.cs rename to Buffs/PotionBuffs/GravityNormalizerBuff.cs index 475d0ba775..36ec91b91b 100644 --- a/Buffs/GravityNormalizerBuff.cs +++ b/Buffs/PotionBuffs/GravityNormalizerBuff.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.PotionBuffs { public class GravityNormalizerBuff : ModBuff { diff --git a/Buffs/GravityNormalizerBuff.png b/Buffs/PotionBuffs/GravityNormalizerBuff.png similarity index 100% rename from Buffs/GravityNormalizerBuff.png rename to Buffs/PotionBuffs/GravityNormalizerBuff.png diff --git a/Buffs/HolyWrathBuff.cs b/Buffs/PotionBuffs/HolyWrathBuff.cs similarity index 89% rename from Buffs/HolyWrathBuff.cs rename to Buffs/PotionBuffs/HolyWrathBuff.cs index d8b4f02bc9..b5efe656a1 100644 --- a/Buffs/HolyWrathBuff.cs +++ b/Buffs/PotionBuffs/HolyWrathBuff.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.PotionBuffs { public class HolyWrathBuff : ModBuff { diff --git a/Buffs/HolyWrathBuff.png b/Buffs/PotionBuffs/HolyWrathBuff.png similarity index 100% rename from Buffs/HolyWrathBuff.png rename to Buffs/PotionBuffs/HolyWrathBuff.png diff --git a/Buffs/Invincible.cs b/Buffs/PotionBuffs/Invincible.cs similarity index 87% rename from Buffs/Invincible.cs rename to Buffs/PotionBuffs/Invincible.cs index e559a4e1d9..bf139f8a04 100644 --- a/Buffs/Invincible.cs +++ b/Buffs/PotionBuffs/Invincible.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.PotionBuffs { public class Invincible : ModBuff { diff --git a/Buffs/Invincible.png b/Buffs/PotionBuffs/Invincible.png similarity index 100% rename from Buffs/Invincible.png rename to Buffs/PotionBuffs/Invincible.png diff --git a/Buffs/Omniscience.cs b/Buffs/PotionBuffs/Omniscience.cs similarity index 87% rename from Buffs/Omniscience.cs rename to Buffs/PotionBuffs/Omniscience.cs index 03d8eb7b40..ef74505c4b 100644 --- a/Buffs/Omniscience.cs +++ b/Buffs/PotionBuffs/Omniscience.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.PotionBuffs { public class Omniscience : ModBuff { diff --git a/Buffs/Omniscience.png b/Buffs/PotionBuffs/Omniscience.png similarity index 100% rename from Buffs/Omniscience.png rename to Buffs/PotionBuffs/Omniscience.png diff --git a/Buffs/PenumbraBuff.cs b/Buffs/PotionBuffs/PenumbraBuff.cs similarity index 89% rename from Buffs/PenumbraBuff.cs rename to Buffs/PotionBuffs/PenumbraBuff.cs index 5617542acc..7203a1f935 100644 --- a/Buffs/PenumbraBuff.cs +++ b/Buffs/PotionBuffs/PenumbraBuff.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.PotionBuffs { public class PenumbraBuff : ModBuff { diff --git a/Buffs/PenumbraBuff.png b/Buffs/PotionBuffs/PenumbraBuff.png similarity index 100% rename from Buffs/PenumbraBuff.png rename to Buffs/PotionBuffs/PenumbraBuff.png diff --git a/Buffs/PhotosynthesisBuff.cs b/Buffs/PotionBuffs/PhotosynthesisBuff.cs similarity index 88% rename from Buffs/PhotosynthesisBuff.cs rename to Buffs/PotionBuffs/PhotosynthesisBuff.cs index f198223d52..a68dbe990a 100644 --- a/Buffs/PhotosynthesisBuff.cs +++ b/Buffs/PotionBuffs/PhotosynthesisBuff.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.PotionBuffs { public class PhotosynthesisBuff : ModBuff { diff --git a/Buffs/PhotosynthesisBuff.png b/Buffs/PotionBuffs/PhotosynthesisBuff.png similarity index 100% rename from Buffs/PhotosynthesisBuff.png rename to Buffs/PotionBuffs/PhotosynthesisBuff.png diff --git a/Buffs/ProfanedRageBuff.cs b/Buffs/PotionBuffs/ProfanedRageBuff.cs similarity index 89% rename from Buffs/ProfanedRageBuff.cs rename to Buffs/PotionBuffs/ProfanedRageBuff.cs index 97f25b85bd..addbe210ce 100644 --- a/Buffs/ProfanedRageBuff.cs +++ b/Buffs/PotionBuffs/ProfanedRageBuff.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.PotionBuffs { public class ProfanedRageBuff : ModBuff { diff --git a/Buffs/ProfanedRageBuff.png b/Buffs/PotionBuffs/ProfanedRageBuff.png similarity index 100% rename from Buffs/ProfanedRageBuff.png rename to Buffs/PotionBuffs/ProfanedRageBuff.png diff --git a/Buffs/Soaring.cs b/Buffs/PotionBuffs/Soaring.cs similarity index 87% rename from Buffs/Soaring.cs rename to Buffs/PotionBuffs/Soaring.cs index 4890e83c4e..6c225d47ca 100644 --- a/Buffs/Soaring.cs +++ b/Buffs/PotionBuffs/Soaring.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.PotionBuffs { public class Soaring : ModBuff { diff --git a/Buffs/Soaring.png b/Buffs/PotionBuffs/Soaring.png similarity index 100% rename from Buffs/Soaring.png rename to Buffs/PotionBuffs/Soaring.png diff --git a/Buffs/TitanScale.cs b/Buffs/PotionBuffs/TitanScale.cs similarity index 87% rename from Buffs/TitanScale.cs rename to Buffs/PotionBuffs/TitanScale.cs index dbd7e396da..a1377ee251 100644 --- a/Buffs/TitanScale.cs +++ b/Buffs/PotionBuffs/TitanScale.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.PotionBuffs { public class TitanScale : ModBuff { diff --git a/Buffs/TitanScale.png b/Buffs/PotionBuffs/TitanScale.png similarity index 100% rename from Buffs/TitanScale.png rename to Buffs/PotionBuffs/TitanScale.png diff --git a/Buffs/TriumphBuff.cs b/Buffs/PotionBuffs/TriumphBuff.cs similarity index 88% rename from Buffs/TriumphBuff.cs rename to Buffs/PotionBuffs/TriumphBuff.cs index 03884a53c0..ce7d135c17 100644 --- a/Buffs/TriumphBuff.cs +++ b/Buffs/PotionBuffs/TriumphBuff.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.PotionBuffs { public class TriumphBuff : ModBuff { diff --git a/Buffs/TriumphBuff.png b/Buffs/PotionBuffs/TriumphBuff.png similarity index 100% rename from Buffs/TriumphBuff.png rename to Buffs/PotionBuffs/TriumphBuff.png diff --git a/Buffs/YharimPower.cs b/Buffs/PotionBuffs/YharimPower.cs similarity index 88% rename from Buffs/YharimPower.cs rename to Buffs/PotionBuffs/YharimPower.cs index d84a13c374..665a696445 100644 --- a/Buffs/YharimPower.cs +++ b/Buffs/PotionBuffs/YharimPower.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.PotionBuffs { public class YharimPower : ModBuff { diff --git a/Buffs/YharimPower.png b/Buffs/PotionBuffs/YharimPower.png similarity index 100% rename from Buffs/YharimPower.png rename to Buffs/PotionBuffs/YharimPower.png diff --git a/Buffs/Zen.cs b/Buffs/PotionBuffs/Zen.cs similarity index 87% rename from Buffs/Zen.cs rename to Buffs/PotionBuffs/Zen.cs index 18f8a9dd93..d268573490 100644 --- a/Buffs/Zen.cs +++ b/Buffs/PotionBuffs/Zen.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.PotionBuffs { public class Zen : ModBuff { diff --git a/Buffs/Zen.png b/Buffs/PotionBuffs/Zen.png similarity index 100% rename from Buffs/Zen.png rename to Buffs/PotionBuffs/Zen.png diff --git a/Buffs/Zerg.cs b/Buffs/PotionBuffs/Zerg.cs similarity index 87% rename from Buffs/Zerg.cs rename to Buffs/PotionBuffs/Zerg.cs index 6b579b92a3..78770f545c 100644 --- a/Buffs/Zerg.cs +++ b/Buffs/PotionBuffs/Zerg.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.PotionBuffs { public class Zerg : ModBuff { diff --git a/Buffs/Zerg.png b/Buffs/PotionBuffs/Zerg.png similarity index 100% rename from Buffs/Zerg.png rename to Buffs/PotionBuffs/Zerg.png diff --git a/Buffs/Shrines/ChiBuff.cs b/Buffs/Shrines/ChiBuff.cs index 5670ee4520..e14a0dd3b4 100644 --- a/Buffs/Shrines/ChiBuff.cs +++ b/Buffs/Shrines/ChiBuff.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Buffs.Shrines { diff --git a/Buffs/Shrines/CorruptionEffigyBuff.cs b/Buffs/Shrines/CorruptionEffigyBuff.cs index a3945ca657..2a1c0a4ac1 100644 --- a/Buffs/Shrines/CorruptionEffigyBuff.cs +++ b/Buffs/Shrines/CorruptionEffigyBuff.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Buffs.Shrines { diff --git a/Buffs/Shrines/CrimsonEffigyBuff.cs b/Buffs/Shrines/CrimsonEffigyBuff.cs index 2f570bd5d8..a4e09cdec9 100644 --- a/Buffs/Shrines/CrimsonEffigyBuff.cs +++ b/Buffs/Shrines/CrimsonEffigyBuff.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Buffs.Shrines { diff --git a/Buffs/Shrines/GladiatorSwords.cs b/Buffs/Shrines/GladiatorSwords.cs index b670605bc7..232c866e90 100644 --- a/Buffs/Shrines/GladiatorSwords.cs +++ b/Buffs/Shrines/GladiatorSwords.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Buffs.Shrines { diff --git a/Buffs/Shrines/OnyxExcavatorBuff.cs b/Buffs/Shrines/OnyxExcavatorBuff.cs index a2fe84584e..a734ddb275 100644 --- a/Buffs/Shrines/OnyxExcavatorBuff.cs +++ b/Buffs/Shrines/OnyxExcavatorBuff.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Buffs.Shrines { diff --git a/Buffs/Shrines/TundraLeashBuff.cs b/Buffs/Shrines/TundraLeashBuff.cs index 96ffe96c4e..62317030c9 100644 --- a/Buffs/Shrines/TundraLeashBuff.cs +++ b/Buffs/Shrines/TundraLeashBuff.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Buffs.Shrines { diff --git a/Buffs/AbyssalDivingSuitBuff.cs b/Buffs/StatBuffs/AbyssalDivingSuitBuff.cs similarity index 95% rename from Buffs/AbyssalDivingSuitBuff.cs rename to Buffs/StatBuffs/AbyssalDivingSuitBuff.cs index 251a6c1e15..2f08b5c7e3 100644 --- a/Buffs/AbyssalDivingSuitBuff.cs +++ b/Buffs/StatBuffs/AbyssalDivingSuitBuff.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.StatBuffs { public class AbyssalDivingSuitBuff : ModBuff { diff --git a/Buffs/AbyssalDivingSuitBuff.png b/Buffs/StatBuffs/AbyssalDivingSuitBuff.png similarity index 100% rename from Buffs/AbyssalDivingSuitBuff.png rename to Buffs/StatBuffs/AbyssalDivingSuitBuff.png diff --git a/Buffs/AbyssalDivingSuitPlates.cs b/Buffs/StatBuffs/AbyssalDivingSuitPlates.cs similarity index 90% rename from Buffs/AbyssalDivingSuitPlates.cs rename to Buffs/StatBuffs/AbyssalDivingSuitPlates.cs index a1f6dd5709..71a16daedf 100644 --- a/Buffs/AbyssalDivingSuitPlates.cs +++ b/Buffs/StatBuffs/AbyssalDivingSuitPlates.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.StatBuffs { public class AbyssalDivingSuitPlates : ModBuff { diff --git a/Buffs/AbyssalDivingSuitPlates.png b/Buffs/StatBuffs/AbyssalDivingSuitPlates.png similarity index 100% rename from Buffs/AbyssalDivingSuitPlates.png rename to Buffs/StatBuffs/AbyssalDivingSuitPlates.png diff --git a/Buffs/AdrenalineMode.cs b/Buffs/StatBuffs/AdrenalineMode.cs similarity index 92% rename from Buffs/AdrenalineMode.cs rename to Buffs/StatBuffs/AdrenalineMode.cs index dae62ad5dc..65de7ac74c 100644 --- a/Buffs/AdrenalineMode.cs +++ b/Buffs/StatBuffs/AdrenalineMode.cs @@ -1,8 +1,9 @@ using Terraria; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.StatBuffs { public class AdrenalineMode : ModBuff { diff --git a/Buffs/AdrenalineMode.png b/Buffs/StatBuffs/AdrenalineMode.png similarity index 100% rename from Buffs/AdrenalineMode.png rename to Buffs/StatBuffs/AdrenalineMode.png diff --git a/Buffs/Afflicted.cs b/Buffs/StatBuffs/Afflicted.cs similarity index 88% rename from Buffs/Afflicted.cs rename to Buffs/StatBuffs/Afflicted.cs index 82b04dad5f..28a87e270d 100644 --- a/Buffs/Afflicted.cs +++ b/Buffs/StatBuffs/Afflicted.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.StatBuffs { public class Afflicted : ModBuff { diff --git a/Buffs/Afflicted.png b/Buffs/StatBuffs/Afflicted.png similarity index 100% rename from Buffs/Afflicted.png rename to Buffs/StatBuffs/Afflicted.png diff --git a/Buffs/ChaosCandle.cs b/Buffs/StatBuffs/ChaosCandle.cs similarity index 89% rename from Buffs/ChaosCandle.cs rename to Buffs/StatBuffs/ChaosCandle.cs index cc969434b6..cd1a01a47d 100644 --- a/Buffs/ChaosCandle.cs +++ b/Buffs/StatBuffs/ChaosCandle.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.StatBuffs { public class ChaosCandle : ModBuff { diff --git a/Buffs/ChaosCandle.png b/Buffs/StatBuffs/ChaosCandle.png similarity index 100% rename from Buffs/ChaosCandle.png rename to Buffs/StatBuffs/ChaosCandle.png diff --git a/Buffs/CosmicFreeze.cs b/Buffs/StatBuffs/CosmicFreeze.cs similarity index 88% rename from Buffs/CosmicFreeze.cs rename to Buffs/StatBuffs/CosmicFreeze.cs index 50a092bc4d..4c408e8ca1 100644 --- a/Buffs/CosmicFreeze.cs +++ b/Buffs/StatBuffs/CosmicFreeze.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.StatBuffs { public class CosmicFreeze : ModBuff { diff --git a/Buffs/CosmicFreeze.png b/Buffs/StatBuffs/CosmicFreeze.png similarity index 100% rename from Buffs/CosmicFreeze.png rename to Buffs/StatBuffs/CosmicFreeze.png diff --git a/Buffs/GodSlayerCooldown.cs b/Buffs/StatBuffs/GodSlayerCooldown.cs similarity index 89% rename from Buffs/GodSlayerCooldown.cs rename to Buffs/StatBuffs/GodSlayerCooldown.cs index caaa365d53..c93edf6bac 100644 --- a/Buffs/GodSlayerCooldown.cs +++ b/Buffs/StatBuffs/GodSlayerCooldown.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.StatBuffs { public class GodSlayerCooldown : ModBuff { diff --git a/Buffs/StatBuffs/GodSlayerCooldown.png b/Buffs/StatBuffs/GodSlayerCooldown.png new file mode 100644 index 0000000000..41ff999517 Binary files /dev/null and b/Buffs/StatBuffs/GodSlayerCooldown.png differ diff --git a/Buffs/GraxDefense.cs b/Buffs/StatBuffs/GraxDefense.cs similarity index 88% rename from Buffs/GraxDefense.cs rename to Buffs/StatBuffs/GraxDefense.cs index 7c2bcfc636..0ddb0261f0 100644 --- a/Buffs/GraxDefense.cs +++ b/Buffs/StatBuffs/GraxDefense.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.StatBuffs { public class GraxDefense : ModBuff { diff --git a/Buffs/GraxDefense.png b/Buffs/StatBuffs/GraxDefense.png similarity index 100% rename from Buffs/GraxDefense.png rename to Buffs/StatBuffs/GraxDefense.png diff --git a/Buffs/HeartAttack.cs b/Buffs/StatBuffs/HeartAttack.cs similarity index 55% rename from Buffs/HeartAttack.cs rename to Buffs/StatBuffs/HeartAttack.cs index d9b36e2638..da68504193 100644 --- a/Buffs/HeartAttack.cs +++ b/Buffs/StatBuffs/HeartAttack.cs @@ -1,19 +1,19 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.StatBuffs { public class HeartAttack : ModBuff { public override void SetDefaults() { - DisplayName.SetDefault("Heart Attack"); - Description.SetDefault("You survived a heart attack. Boosts max life."); - Main.debuff[Type] = true; + DisplayName.SetDefault("Absolute Rage"); + Description.SetDefault("Your anger has made you more durable. Boosts max life by 5%."); + Main.debuff[Type] = false; Main.pvpBuff[Type] = true; - Main.buffNoSave[Type] = false; + Main.buffNoSave[Type] = true; longerExpertDebuff = false; - canBeCleared = false; } public override void Update(Player player, ref int buffIndex) diff --git a/Buffs/HeartAttack.png b/Buffs/StatBuffs/HeartAttack.png similarity index 100% rename from Buffs/HeartAttack.png rename to Buffs/StatBuffs/HeartAttack.png diff --git a/Buffs/IceShieldBuff.cs b/Buffs/StatBuffs/IceShieldBuff.cs similarity index 89% rename from Buffs/IceShieldBuff.cs rename to Buffs/StatBuffs/IceShieldBuff.cs index a89abfae3d..7c08249c06 100644 --- a/Buffs/IceShieldBuff.cs +++ b/Buffs/StatBuffs/IceShieldBuff.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.StatBuffs { public class IceShieldBuff : ModBuff { diff --git a/Buffs/IceShieldBuff.png b/Buffs/StatBuffs/IceShieldBuff.png similarity index 100% rename from Buffs/IceShieldBuff.png rename to Buffs/StatBuffs/IceShieldBuff.png diff --git a/Buffs/Molten.cs b/Buffs/StatBuffs/Molten.cs similarity index 87% rename from Buffs/Molten.cs rename to Buffs/StatBuffs/Molten.cs index f5a9d7053f..75acbec735 100644 --- a/Buffs/Molten.cs +++ b/Buffs/StatBuffs/Molten.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.StatBuffs { public class Molten : ModBuff { diff --git a/Buffs/Molten.png b/Buffs/StatBuffs/Molten.png similarity index 100% rename from Buffs/Molten.png rename to Buffs/StatBuffs/Molten.png diff --git a/Buffs/Mushy.cs b/Buffs/StatBuffs/Mushy.cs similarity index 88% rename from Buffs/Mushy.cs rename to Buffs/StatBuffs/Mushy.cs index 1d94ed0789..c0de59c297 100644 --- a/Buffs/Mushy.cs +++ b/Buffs/StatBuffs/Mushy.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.StatBuffs { public class Mushy : ModBuff { diff --git a/Buffs/Mushy.png b/Buffs/StatBuffs/Mushy.png similarity index 100% rename from Buffs/Mushy.png rename to Buffs/StatBuffs/Mushy.png diff --git a/Buffs/RageMode.cs b/Buffs/StatBuffs/RageMode.cs similarity index 92% rename from Buffs/RageMode.cs rename to Buffs/StatBuffs/RageMode.cs index ada9acc94a..b977d137c6 100644 --- a/Buffs/RageMode.cs +++ b/Buffs/StatBuffs/RageMode.cs @@ -1,8 +1,9 @@ using Terraria; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.StatBuffs { public class RageMode : ModBuff { diff --git a/Buffs/RageMode.png b/Buffs/StatBuffs/RageMode.png similarity index 100% rename from Buffs/RageMode.png rename to Buffs/StatBuffs/RageMode.png diff --git a/Buffs/ReaverRage.cs b/Buffs/StatBuffs/ReaverRage.cs similarity index 87% rename from Buffs/ReaverRage.cs rename to Buffs/StatBuffs/ReaverRage.cs index 59a0de4582..15688f2023 100644 --- a/Buffs/ReaverRage.cs +++ b/Buffs/StatBuffs/ReaverRage.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.StatBuffs { public class ReaverRage : ModBuff { diff --git a/Buffs/ReaverRage.png b/Buffs/StatBuffs/ReaverRage.png similarity index 100% rename from Buffs/ReaverRage.png rename to Buffs/StatBuffs/ReaverRage.png diff --git a/Buffs/ScarfMeleeBoost.cs b/Buffs/StatBuffs/ScarfMeleeBoost.cs similarity index 89% rename from Buffs/ScarfMeleeBoost.cs rename to Buffs/StatBuffs/ScarfMeleeBoost.cs index b90e1061fd..9910cff665 100644 --- a/Buffs/ScarfMeleeBoost.cs +++ b/Buffs/StatBuffs/ScarfMeleeBoost.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.StatBuffs { public class ScarfMeleeBoost : ModBuff { diff --git a/Buffs/ScarfMeleeBoost.png b/Buffs/StatBuffs/ScarfMeleeBoost.png similarity index 100% rename from Buffs/ScarfMeleeBoost.png rename to Buffs/StatBuffs/ScarfMeleeBoost.png diff --git a/Buffs/ShellBoost.cs b/Buffs/StatBuffs/ShellBoost.cs similarity index 88% rename from Buffs/ShellBoost.cs rename to Buffs/StatBuffs/ShellBoost.cs index ed1e7b5cbc..37902b9794 100644 --- a/Buffs/ShellBoost.cs +++ b/Buffs/StatBuffs/ShellBoost.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.StatBuffs { public class ShellBoost : ModBuff { diff --git a/Buffs/ShellBoost.png b/Buffs/StatBuffs/ShellBoost.png similarity index 100% rename from Buffs/ShellBoost.png rename to Buffs/StatBuffs/ShellBoost.png diff --git a/Buffs/SilvaRevival.cs b/Buffs/StatBuffs/SilvaRevival.cs similarity index 84% rename from Buffs/SilvaRevival.cs rename to Buffs/StatBuffs/SilvaRevival.cs index a7a8792cf5..67d2e7a2e2 100644 --- a/Buffs/SilvaRevival.cs +++ b/Buffs/StatBuffs/SilvaRevival.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.StatBuffs { public class SilvaRevival : ModBuff { diff --git a/Buffs/SilvaRevival.png b/Buffs/StatBuffs/SilvaRevival.png similarity index 100% rename from Buffs/SilvaRevival.png rename to Buffs/StatBuffs/SilvaRevival.png diff --git a/Buffs/SirenBobs.cs b/Buffs/StatBuffs/SirenBobs.cs similarity index 96% rename from Buffs/SirenBobs.cs rename to Buffs/StatBuffs/SirenBobs.cs index 501fea10e0..8aedce8c7a 100644 --- a/Buffs/SirenBobs.cs +++ b/Buffs/StatBuffs/SirenBobs.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.StatBuffs { public class SirenBobs : ModBuff { diff --git a/Buffs/SirenBobs.png b/Buffs/StatBuffs/SirenBobs.png similarity index 100% rename from Buffs/SirenBobs.png rename to Buffs/StatBuffs/SirenBobs.png diff --git a/Buffs/SirenBobsAlt.cs b/Buffs/StatBuffs/SirenBobsAlt.cs similarity index 96% rename from Buffs/SirenBobsAlt.cs rename to Buffs/StatBuffs/SirenBobsAlt.cs index 3f9a4a7203..a870e3ff8c 100644 --- a/Buffs/SirenBobsAlt.cs +++ b/Buffs/StatBuffs/SirenBobsAlt.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.StatBuffs { public class SirenBobsAlt : ModBuff { diff --git a/Buffs/SirenBobsAlt.png b/Buffs/StatBuffs/SirenBobsAlt.png similarity index 100% rename from Buffs/SirenBobsAlt.png rename to Buffs/StatBuffs/SirenBobsAlt.png diff --git a/Buffs/SirenWaterSpeed.cs b/Buffs/StatBuffs/SirenWaterSpeed.cs similarity index 90% rename from Buffs/SirenWaterSpeed.cs rename to Buffs/StatBuffs/SirenWaterSpeed.cs index 8ed643ce4f..bd640a1617 100644 --- a/Buffs/SirenWaterSpeed.cs +++ b/Buffs/StatBuffs/SirenWaterSpeed.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.StatBuffs { public class SirenWaterSpeed : ModBuff { diff --git a/Buffs/SirenWaterSpeed.png b/Buffs/StatBuffs/SirenWaterSpeed.png similarity index 100% rename from Buffs/SirenWaterSpeed.png rename to Buffs/StatBuffs/SirenWaterSpeed.png diff --git a/Buffs/TarraLifeRegen.cs b/Buffs/StatBuffs/TarraLifeRegen.cs similarity index 87% rename from Buffs/TarraLifeRegen.cs rename to Buffs/StatBuffs/TarraLifeRegen.cs index b8b29cf45f..a72977daf3 100644 --- a/Buffs/TarraLifeRegen.cs +++ b/Buffs/StatBuffs/TarraLifeRegen.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.StatBuffs { public class TarraLifeRegen : ModBuff { diff --git a/Buffs/TarraLifeRegen.png b/Buffs/StatBuffs/TarraLifeRegen.png similarity index 100% rename from Buffs/TarraLifeRegen.png rename to Buffs/StatBuffs/TarraLifeRegen.png diff --git a/Buffs/TranquilityCandle.cs b/Buffs/StatBuffs/TranquilityCandle.cs similarity index 89% rename from Buffs/TranquilityCandle.cs rename to Buffs/StatBuffs/TranquilityCandle.cs index 781fe48202..107f076101 100644 --- a/Buffs/TranquilityCandle.cs +++ b/Buffs/StatBuffs/TranquilityCandle.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.StatBuffs { public class TranquilityCandle : ModBuff { diff --git a/Buffs/TranquilityCandle.png b/Buffs/StatBuffs/TranquilityCandle.png similarity index 100% rename from Buffs/TranquilityCandle.png rename to Buffs/StatBuffs/TranquilityCandle.png diff --git a/Buffs/TyrantsFury.cs b/Buffs/StatBuffs/TyrantsFury.cs similarity index 88% rename from Buffs/TyrantsFury.cs rename to Buffs/StatBuffs/TyrantsFury.cs index a7bade0d85..79c6644792 100644 --- a/Buffs/TyrantsFury.cs +++ b/Buffs/StatBuffs/TyrantsFury.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.StatBuffs { public class TyrantsFury : ModBuff { diff --git a/Buffs/TyrantsFury.png b/Buffs/StatBuffs/TyrantsFury.png similarity index 100% rename from Buffs/TyrantsFury.png rename to Buffs/StatBuffs/TyrantsFury.png diff --git a/Buffs/XerocRage.cs b/Buffs/StatBuffs/XerocRage.cs similarity index 87% rename from Buffs/XerocRage.cs rename to Buffs/StatBuffs/XerocRage.cs index a951f4fb48..e21707b49f 100644 --- a/Buffs/XerocRage.cs +++ b/Buffs/StatBuffs/XerocRage.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.StatBuffs { public class XerocRage : ModBuff { diff --git a/Buffs/XerocRage.png b/Buffs/StatBuffs/XerocRage.png similarity index 100% rename from Buffs/XerocRage.png rename to Buffs/StatBuffs/XerocRage.png diff --git a/Buffs/XerocWrath.cs b/Buffs/StatBuffs/XerocWrath.cs similarity index 87% rename from Buffs/XerocWrath.cs rename to Buffs/StatBuffs/XerocWrath.cs index fb9e06b030..460beb2b5c 100644 --- a/Buffs/XerocWrath.cs +++ b/Buffs/StatBuffs/XerocWrath.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.StatBuffs { public class XerocWrath : ModBuff { diff --git a/Buffs/XerocWrath.png b/Buffs/StatBuffs/XerocWrath.png similarity index 100% rename from Buffs/XerocWrath.png rename to Buffs/StatBuffs/XerocWrath.png diff --git a/Buffs/AbyssalDivingSuitPlatesBroken.cs b/Buffs/StatDebuffs/AbyssalDivingSuitPlatesBroken.cs similarity index 89% rename from Buffs/AbyssalDivingSuitPlatesBroken.cs rename to Buffs/StatDebuffs/AbyssalDivingSuitPlatesBroken.cs index b9af95d5df..42b4315277 100644 --- a/Buffs/AbyssalDivingSuitPlatesBroken.cs +++ b/Buffs/StatDebuffs/AbyssalDivingSuitPlatesBroken.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.StatDebuffs { public class AbyssalDivingSuitPlatesBroken : ModBuff { diff --git a/Buffs/AbyssalDivingSuitPlatesBroken.png b/Buffs/StatDebuffs/AbyssalDivingSuitPlatesBroken.png similarity index 100% rename from Buffs/AbyssalDivingSuitPlatesBroken.png rename to Buffs/StatDebuffs/AbyssalDivingSuitPlatesBroken.png diff --git a/Buffs/ArmorCrunch.cs b/Buffs/StatDebuffs/ArmorCrunch.cs similarity index 91% rename from Buffs/ArmorCrunch.cs rename to Buffs/StatDebuffs/ArmorCrunch.cs index df4113c3ab..4039af9949 100644 --- a/Buffs/ArmorCrunch.cs +++ b/Buffs/StatDebuffs/ArmorCrunch.cs @@ -1,8 +1,9 @@ using Terraria; using Terraria.ModLoader; using CalamityMod.NPCs; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.StatDebuffs { public class ArmorCrunch : ModBuff { diff --git a/Buffs/ArmorCrunch.png b/Buffs/StatDebuffs/ArmorCrunch.png similarity index 100% rename from Buffs/ArmorCrunch.png rename to Buffs/StatDebuffs/ArmorCrunch.png diff --git a/Buffs/Backfire.cs b/Buffs/StatDebuffs/Backfire.cs similarity index 92% rename from Buffs/Backfire.cs rename to Buffs/StatDebuffs/Backfire.cs index f81f7d7242..3dab52d0ba 100644 --- a/Buffs/Backfire.cs +++ b/Buffs/StatDebuffs/Backfire.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.StatDebuffs { public class Backfire : ModBuff { diff --git a/Buffs/Backfire.png b/Buffs/StatDebuffs/Backfire.png similarity index 100% rename from Buffs/Backfire.png rename to Buffs/StatDebuffs/Backfire.png diff --git a/Buffs/BurntOut.cs b/Buffs/StatDebuffs/BurntOut.cs similarity index 89% rename from Buffs/BurntOut.cs rename to Buffs/StatDebuffs/BurntOut.cs index b445328580..abf5e5bf8e 100644 --- a/Buffs/BurntOut.cs +++ b/Buffs/StatDebuffs/BurntOut.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.StatDebuffs { public class BurntOut : ModBuff { diff --git a/Buffs/BurntOut.png b/Buffs/StatDebuffs/BurntOut.png similarity index 100% rename from Buffs/BurntOut.png rename to Buffs/StatDebuffs/BurntOut.png diff --git a/Buffs/Enraged.cs b/Buffs/StatDebuffs/Enraged.cs similarity index 91% rename from Buffs/Enraged.cs rename to Buffs/StatDebuffs/Enraged.cs index 43e0930f84..c2cff08a57 100644 --- a/Buffs/Enraged.cs +++ b/Buffs/StatDebuffs/Enraged.cs @@ -1,8 +1,9 @@ using Terraria; using Terraria.ModLoader; using CalamityMod.NPCs; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.StatDebuffs { public class Enraged : ModBuff { diff --git a/Buffs/Enraged.png b/Buffs/StatDebuffs/Enraged.png similarity index 100% rename from Buffs/Enraged.png rename to Buffs/StatDebuffs/Enraged.png diff --git a/Buffs/ExoFreeze.cs b/Buffs/StatDebuffs/ExoFreeze.cs similarity index 92% rename from Buffs/ExoFreeze.cs rename to Buffs/StatDebuffs/ExoFreeze.cs index 5d282291a0..c11629f817 100644 --- a/Buffs/ExoFreeze.cs +++ b/Buffs/StatDebuffs/ExoFreeze.cs @@ -2,7 +2,7 @@ using Terraria.ModLoader; using CalamityMod.NPCs; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.StatDebuffs { public class ExoFreeze : ModBuff { diff --git a/Buffs/ExoFreeze.png b/Buffs/StatDebuffs/ExoFreeze.png similarity index 100% rename from Buffs/ExoFreeze.png rename to Buffs/StatDebuffs/ExoFreeze.png diff --git a/Buffs/ExtremeGrav.cs b/Buffs/StatDebuffs/ExtremeGrav.cs similarity index 89% rename from Buffs/ExtremeGrav.cs rename to Buffs/StatDebuffs/ExtremeGrav.cs index 1658f6e99d..eb81570ab1 100644 --- a/Buffs/ExtremeGrav.cs +++ b/Buffs/StatDebuffs/ExtremeGrav.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.StatDebuffs { public class ExtremeGrav : ModBuff { diff --git a/Buffs/ExtremeGrav.png b/Buffs/StatDebuffs/ExtremeGrav.png similarity index 100% rename from Buffs/ExtremeGrav.png rename to Buffs/StatDebuffs/ExtremeGrav.png diff --git a/Buffs/ExtremeGravity.cs b/Buffs/StatDebuffs/ExtremeGravity.cs similarity index 88% rename from Buffs/ExtremeGravity.cs rename to Buffs/StatDebuffs/ExtremeGravity.cs index 4307c324db..9c156ebe8e 100644 --- a/Buffs/ExtremeGravity.cs +++ b/Buffs/StatDebuffs/ExtremeGravity.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.StatDebuffs { public class ExtremeGravity : ModBuff { diff --git a/Buffs/ExtremeGravity.png b/Buffs/StatDebuffs/ExtremeGravity.png similarity index 100% rename from Buffs/ExtremeGravity.png rename to Buffs/StatDebuffs/ExtremeGravity.png diff --git a/Buffs/FishAlert.cs b/Buffs/StatDebuffs/FishAlert.cs similarity index 88% rename from Buffs/FishAlert.cs rename to Buffs/StatDebuffs/FishAlert.cs index 21a96725c4..8198ee1e4a 100644 --- a/Buffs/FishAlert.cs +++ b/Buffs/StatDebuffs/FishAlert.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.StatDebuffs { public class FishAlert : ModBuff { diff --git a/Buffs/FishAlert.png b/Buffs/StatDebuffs/FishAlert.png similarity index 100% rename from Buffs/FishAlert.png rename to Buffs/StatDebuffs/FishAlert.png diff --git a/Buffs/GlacialState.cs b/Buffs/StatDebuffs/GlacialState.cs similarity index 90% rename from Buffs/GlacialState.cs rename to Buffs/StatDebuffs/GlacialState.cs index e85ae42531..5ad2ba46b7 100644 --- a/Buffs/GlacialState.cs +++ b/Buffs/StatDebuffs/GlacialState.cs @@ -1,8 +1,9 @@ using Terraria; using Terraria.ModLoader; using CalamityMod.NPCs; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.StatDebuffs { public class GlacialState : ModBuff { diff --git a/Buffs/GlacialState.png b/Buffs/StatDebuffs/GlacialState.png similarity index 100% rename from Buffs/GlacialState.png rename to Buffs/StatDebuffs/GlacialState.png diff --git a/Buffs/Horror.cs b/Buffs/StatDebuffs/Horror.cs similarity index 87% rename from Buffs/Horror.cs rename to Buffs/StatDebuffs/Horror.cs index 6f092a5978..adb48d338b 100644 --- a/Buffs/Horror.cs +++ b/Buffs/StatDebuffs/Horror.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.StatDebuffs { public class Horror : ModBuff { diff --git a/Buffs/Horror.png b/Buffs/StatDebuffs/Horror.png similarity index 100% rename from Buffs/Horror.png rename to Buffs/StatDebuffs/Horror.png diff --git a/Buffs/IceShieldBrokenBuff.cs b/Buffs/StatDebuffs/IceShieldBrokenBuff.cs similarity index 88% rename from Buffs/IceShieldBrokenBuff.cs rename to Buffs/StatDebuffs/IceShieldBrokenBuff.cs index 90a38da753..3e117ddd8f 100644 --- a/Buffs/IceShieldBrokenBuff.cs +++ b/Buffs/StatDebuffs/IceShieldBrokenBuff.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.StatDebuffs { public class IceShieldBrokenBuff : ModBuff { diff --git a/Buffs/IceShieldBrokenBuff.png b/Buffs/StatDebuffs/IceShieldBrokenBuff.png similarity index 100% rename from Buffs/IceShieldBrokenBuff.png rename to Buffs/StatDebuffs/IceShieldBrokenBuff.png diff --git a/Buffs/Irradiated.cs b/Buffs/StatDebuffs/Irradiated.cs similarity index 91% rename from Buffs/Irradiated.cs rename to Buffs/StatDebuffs/Irradiated.cs index 0849e4dd56..c3026640d1 100644 --- a/Buffs/Irradiated.cs +++ b/Buffs/StatDebuffs/Irradiated.cs @@ -1,8 +1,9 @@ using Terraria; using Terraria.ModLoader; using CalamityMod.NPCs; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.StatDebuffs { public class Irradiated : ModBuff { diff --git a/Buffs/Irradiated.png b/Buffs/StatDebuffs/Irradiated.png similarity index 100% rename from Buffs/Irradiated.png rename to Buffs/StatDebuffs/Irradiated.png diff --git a/Buffs/MarkedforDeath.cs b/Buffs/StatDebuffs/MarkedforDeath.cs similarity index 90% rename from Buffs/MarkedforDeath.cs rename to Buffs/StatDebuffs/MarkedforDeath.cs index a27e890f87..2fbf4d2349 100644 --- a/Buffs/MarkedforDeath.cs +++ b/Buffs/StatDebuffs/MarkedforDeath.cs @@ -1,8 +1,9 @@ using Terraria; using Terraria.ModLoader; using CalamityMod.NPCs; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.StatDebuffs { public class MarkedforDeath : ModBuff { diff --git a/Buffs/MarkedforDeath.png b/Buffs/StatDebuffs/MarkedforDeath.png similarity index 100% rename from Buffs/MarkedforDeath.png rename to Buffs/StatDebuffs/MarkedforDeath.png diff --git a/Buffs/ScarfCooldown.cs b/Buffs/StatDebuffs/ScarfCooldown.cs similarity index 88% rename from Buffs/ScarfCooldown.cs rename to Buffs/StatDebuffs/ScarfCooldown.cs index fbfb80323a..ef2ca4e9e1 100644 --- a/Buffs/ScarfCooldown.cs +++ b/Buffs/StatDebuffs/ScarfCooldown.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.StatDebuffs { public class ScarfCooldown : ModBuff { diff --git a/Buffs/ScarfCooldown.png b/Buffs/StatDebuffs/ScarfCooldown.png similarity index 100% rename from Buffs/ScarfCooldown.png rename to Buffs/StatDebuffs/ScarfCooldown.png diff --git a/Buffs/SilvaStun.cs b/Buffs/StatDebuffs/SilvaStun.cs similarity index 92% rename from Buffs/SilvaStun.cs rename to Buffs/StatDebuffs/SilvaStun.cs index 19e0722c4f..ef3f970275 100644 --- a/Buffs/SilvaStun.cs +++ b/Buffs/StatDebuffs/SilvaStun.cs @@ -2,7 +2,7 @@ using Terraria.ModLoader; using CalamityMod.NPCs; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.StatDebuffs { public class SilvaStun : ModBuff { diff --git a/Buffs/SilvaStun.png b/Buffs/StatDebuffs/SilvaStun.png similarity index 100% rename from Buffs/SilvaStun.png rename to Buffs/StatDebuffs/SilvaStun.png diff --git a/Buffs/TemporalSadness.cs b/Buffs/StatDebuffs/TemporalSadness.cs similarity index 92% rename from Buffs/TemporalSadness.cs rename to Buffs/StatDebuffs/TemporalSadness.cs index acaa9fc532..26245fb832 100644 --- a/Buffs/TemporalSadness.cs +++ b/Buffs/StatDebuffs/TemporalSadness.cs @@ -2,7 +2,7 @@ using Terraria.ModLoader; using CalamityMod.NPCs; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.StatDebuffs { public class TemporalSadness : ModBuff { diff --git a/Buffs/TemporalSadness.png b/Buffs/StatDebuffs/TemporalSadness.png similarity index 100% rename from Buffs/TemporalSadness.png rename to Buffs/StatDebuffs/TemporalSadness.png diff --git a/Buffs/TimeSlow.cs b/Buffs/StatDebuffs/TimeSlow.cs similarity index 91% rename from Buffs/TimeSlow.cs rename to Buffs/StatDebuffs/TimeSlow.cs index fbcc49e62b..1fe0d30761 100644 --- a/Buffs/TimeSlow.cs +++ b/Buffs/StatDebuffs/TimeSlow.cs @@ -1,8 +1,9 @@ using Terraria; using Terraria.ModLoader; using CalamityMod.NPCs; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.StatDebuffs { public class TimeSlow : ModBuff { diff --git a/Buffs/TimeSlow.png b/Buffs/StatDebuffs/TimeSlow.png similarity index 100% rename from Buffs/TimeSlow.png rename to Buffs/StatDebuffs/TimeSlow.png diff --git a/Buffs/WarCleave.cs b/Buffs/StatDebuffs/WarCleave.cs similarity index 92% rename from Buffs/WarCleave.cs rename to Buffs/StatDebuffs/WarCleave.cs index 415f87e97b..2ee824ef3d 100644 --- a/Buffs/WarCleave.cs +++ b/Buffs/StatDebuffs/WarCleave.cs @@ -2,7 +2,7 @@ using Terraria.ModLoader; using CalamityMod.NPCs; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.StatDebuffs { public class WarCleave : ModBuff { diff --git a/Buffs/WarCleave.png b/Buffs/StatDebuffs/WarCleave.png similarity index 100% rename from Buffs/WarCleave.png rename to Buffs/StatDebuffs/WarCleave.png diff --git a/Buffs/Warped.cs b/Buffs/StatDebuffs/Warped.cs similarity index 88% rename from Buffs/Warped.cs rename to Buffs/StatDebuffs/Warped.cs index 41c889ba7d..872f58699a 100644 --- a/Buffs/Warped.cs +++ b/Buffs/StatDebuffs/Warped.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.StatDebuffs { public class Warped : ModBuff { diff --git a/Buffs/Warped.png b/Buffs/StatDebuffs/Warped.png similarity index 100% rename from Buffs/Warped.png rename to Buffs/StatDebuffs/Warped.png diff --git a/Buffs/WeakPetrification.cs b/Buffs/StatDebuffs/WeakPetrification.cs similarity index 89% rename from Buffs/WeakPetrification.cs rename to Buffs/StatDebuffs/WeakPetrification.cs index f9235d300b..6b468f4ac6 100644 --- a/Buffs/WeakPetrification.cs +++ b/Buffs/StatDebuffs/WeakPetrification.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.StatDebuffs { public class WeakPetrification : ModBuff { diff --git a/Buffs/WeakPetrification.png b/Buffs/StatDebuffs/WeakPetrification.png similarity index 100% rename from Buffs/WeakPetrification.png rename to Buffs/StatDebuffs/WeakPetrification.png diff --git a/Buffs/WhisperingDeath.cs b/Buffs/StatDebuffs/WhisperingDeath.cs similarity index 90% rename from Buffs/WhisperingDeath.cs rename to Buffs/StatDebuffs/WhisperingDeath.cs index 222a031617..7b49885159 100644 --- a/Buffs/WhisperingDeath.cs +++ b/Buffs/StatDebuffs/WhisperingDeath.cs @@ -1,8 +1,9 @@ using Terraria; using Terraria.ModLoader; using CalamityMod.NPCs; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.StatDebuffs { public class WhisperingDeath : ModBuff { diff --git a/Buffs/WhisperingDeath.png b/Buffs/StatDebuffs/WhisperingDeath.png similarity index 100% rename from Buffs/WhisperingDeath.png rename to Buffs/StatDebuffs/WhisperingDeath.png diff --git a/Buffs/AngryChicken.cs b/Buffs/SummonBuffs/AngryChicken.cs similarity index 91% rename from Buffs/AngryChicken.cs rename to Buffs/SummonBuffs/AngryChicken.cs index aeef528bbf..8ee96d5b39 100644 --- a/Buffs/AngryChicken.cs +++ b/Buffs/SummonBuffs/AngryChicken.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.SummonBuffs { public class AngryChicken : ModBuff { diff --git a/Buffs/AngryChicken.png b/Buffs/SummonBuffs/AngryChicken.png similarity index 100% rename from Buffs/AngryChicken.png rename to Buffs/SummonBuffs/AngryChicken.png diff --git a/Buffs/AquaticStar.cs b/Buffs/SummonBuffs/AquaticStar.cs similarity index 91% rename from Buffs/AquaticStar.cs rename to Buffs/SummonBuffs/AquaticStar.cs index e0064f2249..9338950006 100644 --- a/Buffs/AquaticStar.cs +++ b/Buffs/SummonBuffs/AquaticStar.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.SummonBuffs { public class AquaticStar : ModBuff { diff --git a/Buffs/AquaticStar.png b/Buffs/SummonBuffs/AquaticStar.png similarity index 100% rename from Buffs/AquaticStar.png rename to Buffs/SummonBuffs/AquaticStar.png diff --git a/Buffs/BloodClot.cs b/Buffs/SummonBuffs/BloodClot.cs similarity index 91% rename from Buffs/BloodClot.cs rename to Buffs/SummonBuffs/BloodClot.cs index 28fb49f59e..63436f2d7c 100644 --- a/Buffs/BloodClot.cs +++ b/Buffs/SummonBuffs/BloodClot.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.SummonBuffs { public class BloodClot : ModBuff { diff --git a/Buffs/BloodClot.png b/Buffs/SummonBuffs/BloodClot.png similarity index 100% rename from Buffs/BloodClot.png rename to Buffs/SummonBuffs/BloodClot.png diff --git a/Buffs/BrimstoneWaifu.cs b/Buffs/SummonBuffs/BrimstoneWaifu.cs similarity index 91% rename from Buffs/BrimstoneWaifu.cs rename to Buffs/SummonBuffs/BrimstoneWaifu.cs index 56ae928630..36399f400d 100644 --- a/Buffs/BrimstoneWaifu.cs +++ b/Buffs/SummonBuffs/BrimstoneWaifu.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.SummonBuffs { public class BrimstoneWaifu : ModBuff { diff --git a/Buffs/BrimstoneWaifu.png b/Buffs/SummonBuffs/BrimstoneWaifu.png similarity index 100% rename from Buffs/BrimstoneWaifu.png rename to Buffs/SummonBuffs/BrimstoneWaifu.png diff --git a/Buffs/BrittleStar.cs b/Buffs/SummonBuffs/BrittleStar.cs similarity index 91% rename from Buffs/BrittleStar.cs rename to Buffs/SummonBuffs/BrittleStar.cs index e498efc276..3343f90f63 100644 --- a/Buffs/BrittleStar.cs +++ b/Buffs/SummonBuffs/BrittleStar.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.SummonBuffs { public class BrittleStar : ModBuff { diff --git a/Buffs/BrittleStar.png b/Buffs/SummonBuffs/BrittleStar.png similarity index 100% rename from Buffs/BrittleStar.png rename to Buffs/SummonBuffs/BrittleStar.png diff --git a/Buffs/Calamari.cs b/Buffs/SummonBuffs/Calamari.cs similarity index 91% rename from Buffs/Calamari.cs rename to Buffs/SummonBuffs/Calamari.cs index 5a9767e648..8dd62424f2 100644 --- a/Buffs/Calamari.cs +++ b/Buffs/SummonBuffs/Calamari.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.SummonBuffs { public class Calamari : ModBuff { diff --git a/Buffs/Calamari.png b/Buffs/SummonBuffs/Calamari.png similarity index 100% rename from Buffs/Calamari.png rename to Buffs/SummonBuffs/Calamari.png diff --git a/Buffs/CalamitasEyes.cs b/Buffs/SummonBuffs/CalamitasEyes.cs similarity index 91% rename from Buffs/CalamitasEyes.cs rename to Buffs/SummonBuffs/CalamitasEyes.cs index ab7670c741..5d2ded0e83 100644 --- a/Buffs/CalamitasEyes.cs +++ b/Buffs/SummonBuffs/CalamitasEyes.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.SummonBuffs { public class CalamitasEyes : ModBuff { diff --git a/Buffs/CalamitasEyes.png b/Buffs/SummonBuffs/CalamitasEyes.png similarity index 100% rename from Buffs/CalamitasEyes.png rename to Buffs/SummonBuffs/CalamitasEyes.png diff --git a/Buffs/ChaosSpirit.cs b/Buffs/SummonBuffs/ChaosSpirit.cs similarity index 91% rename from Buffs/ChaosSpirit.cs rename to Buffs/SummonBuffs/ChaosSpirit.cs index e4e6ef2035..e01c225e45 100644 --- a/Buffs/ChaosSpirit.cs +++ b/Buffs/SummonBuffs/ChaosSpirit.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.SummonBuffs { public class ChaosSpirit : ModBuff { diff --git a/Buffs/ChaosSpirit.png b/Buffs/SummonBuffs/ChaosSpirit.png similarity index 100% rename from Buffs/ChaosSpirit.png rename to Buffs/SummonBuffs/ChaosSpirit.png diff --git a/Buffs/CloudyWaifu.cs b/Buffs/SummonBuffs/CloudyWaifu.cs similarity index 91% rename from Buffs/CloudyWaifu.cs rename to Buffs/SummonBuffs/CloudyWaifu.cs index a89ef04487..d4482eb652 100644 --- a/Buffs/CloudyWaifu.cs +++ b/Buffs/SummonBuffs/CloudyWaifu.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.SummonBuffs { public class CloudyWaifu : ModBuff { diff --git a/Buffs/CloudyWaifu.png b/Buffs/SummonBuffs/CloudyWaifu.png similarity index 100% rename from Buffs/CloudyWaifu.png rename to Buffs/SummonBuffs/CloudyWaifu.png diff --git a/Buffs/Corroslime.cs b/Buffs/SummonBuffs/Corroslime.cs similarity index 91% rename from Buffs/Corroslime.cs rename to Buffs/SummonBuffs/Corroslime.cs index 36178419b3..898e020c49 100644 --- a/Buffs/Corroslime.cs +++ b/Buffs/SummonBuffs/Corroslime.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.SummonBuffs { public class Corroslime : ModBuff { diff --git a/Buffs/Corroslime.png b/Buffs/SummonBuffs/Corroslime.png similarity index 100% rename from Buffs/Corroslime.png rename to Buffs/SummonBuffs/Corroslime.png diff --git a/Buffs/CosmicEnergy.cs b/Buffs/SummonBuffs/CosmicEnergy.cs similarity index 91% rename from Buffs/CosmicEnergy.cs rename to Buffs/SummonBuffs/CosmicEnergy.cs index da129cd45b..95def241bf 100644 --- a/Buffs/CosmicEnergy.cs +++ b/Buffs/SummonBuffs/CosmicEnergy.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.SummonBuffs { public class CosmicEnergy : ModBuff { diff --git a/Buffs/CosmicEnergy.png b/Buffs/SummonBuffs/CosmicEnergy.png similarity index 100% rename from Buffs/CosmicEnergy.png rename to Buffs/SummonBuffs/CosmicEnergy.png diff --git a/Buffs/Cosmilamp.cs b/Buffs/SummonBuffs/Cosmilamp.cs similarity index 91% rename from Buffs/Cosmilamp.cs rename to Buffs/SummonBuffs/Cosmilamp.cs index c3a4aeaae1..753c0b3d02 100644 --- a/Buffs/Cosmilamp.cs +++ b/Buffs/SummonBuffs/Cosmilamp.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.SummonBuffs { public class Cosmilamp : ModBuff { diff --git a/Buffs/Cosmilamp.png b/Buffs/SummonBuffs/Cosmilamp.png similarity index 100% rename from Buffs/Cosmilamp.png rename to Buffs/SummonBuffs/Cosmilamp.png diff --git a/Buffs/Crimslime.cs b/Buffs/SummonBuffs/Crimslime.cs similarity index 91% rename from Buffs/Crimslime.cs rename to Buffs/SummonBuffs/Crimslime.cs index 36ab9d3550..482f0ed2f5 100644 --- a/Buffs/Crimslime.cs +++ b/Buffs/SummonBuffs/Crimslime.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.SummonBuffs { public class Crimslime : ModBuff { diff --git a/Buffs/Crimslime.png b/Buffs/SummonBuffs/Crimslime.png similarity index 100% rename from Buffs/Crimslime.png rename to Buffs/SummonBuffs/Crimslime.png diff --git a/Buffs/DaedalusCrystal.cs b/Buffs/SummonBuffs/DaedalusCrystal.cs similarity index 91% rename from Buffs/DaedalusCrystal.cs rename to Buffs/SummonBuffs/DaedalusCrystal.cs index 0297b182ef..acce5c01b1 100644 --- a/Buffs/DaedalusCrystal.cs +++ b/Buffs/SummonBuffs/DaedalusCrystal.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.SummonBuffs { public class DaedalusCrystal : ModBuff { diff --git a/Buffs/DaedalusCrystal.png b/Buffs/SummonBuffs/DaedalusCrystal.png similarity index 100% rename from Buffs/DaedalusCrystal.png rename to Buffs/SummonBuffs/DaedalusCrystal.png diff --git a/Buffs/DankCreeper.cs b/Buffs/SummonBuffs/DankCreeper.cs similarity index 91% rename from Buffs/DankCreeper.cs rename to Buffs/SummonBuffs/DankCreeper.cs index 94aa9f7f50..f38d4d91ad 100644 --- a/Buffs/DankCreeper.cs +++ b/Buffs/SummonBuffs/DankCreeper.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.SummonBuffs { public class DankCreeper : ModBuff { diff --git a/Buffs/DankCreeper.png b/Buffs/SummonBuffs/DankCreeper.png similarity index 100% rename from Buffs/DankCreeper.png rename to Buffs/SummonBuffs/DankCreeper.png diff --git a/Buffs/DrewsSandyWaifu.cs b/Buffs/SummonBuffs/DrewsSandyWaifu.cs similarity index 91% rename from Buffs/DrewsSandyWaifu.cs rename to Buffs/SummonBuffs/DrewsSandyWaifu.cs index b661b4df83..7fa838b12c 100644 --- a/Buffs/DrewsSandyWaifu.cs +++ b/Buffs/SummonBuffs/DrewsSandyWaifu.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.SummonBuffs { public class DrewsSandyWaifu : ModBuff { diff --git a/Buffs/DrewsSandyWaifu.png b/Buffs/SummonBuffs/DrewsSandyWaifu.png similarity index 100% rename from Buffs/DrewsSandyWaifu.png rename to Buffs/SummonBuffs/DrewsSandyWaifu.png diff --git a/Buffs/ElementalAxe.cs b/Buffs/SummonBuffs/ElementalAxe.cs similarity index 91% rename from Buffs/ElementalAxe.cs rename to Buffs/SummonBuffs/ElementalAxe.cs index 43739035c7..6de0157676 100644 --- a/Buffs/ElementalAxe.cs +++ b/Buffs/SummonBuffs/ElementalAxe.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.SummonBuffs { public class ElementalAxe : ModBuff { diff --git a/Buffs/ElementalAxe.png b/Buffs/SummonBuffs/ElementalAxe.png similarity index 100% rename from Buffs/ElementalAxe.png rename to Buffs/SummonBuffs/ElementalAxe.png diff --git a/Buffs/FungalClump.cs b/Buffs/SummonBuffs/FungalClump.cs similarity index 91% rename from Buffs/FungalClump.cs rename to Buffs/SummonBuffs/FungalClump.cs index 9a339fcbf0..e3011ec4f1 100644 --- a/Buffs/FungalClump.cs +++ b/Buffs/SummonBuffs/FungalClump.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.SummonBuffs { public class FungalClump : ModBuff { diff --git a/Buffs/FungalClump.png b/Buffs/SummonBuffs/FungalClump.png similarity index 100% rename from Buffs/FungalClump.png rename to Buffs/SummonBuffs/FungalClump.png diff --git a/Buffs/GuardianDefense.cs b/Buffs/SummonBuffs/GuardianDefense.cs similarity index 91% rename from Buffs/GuardianDefense.cs rename to Buffs/SummonBuffs/GuardianDefense.cs index 64ba3c1bbe..38a6642e58 100644 --- a/Buffs/GuardianDefense.cs +++ b/Buffs/SummonBuffs/GuardianDefense.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.SummonBuffs { public class GuardianDefense : ModBuff { diff --git a/Buffs/GuardianDefense.png b/Buffs/SummonBuffs/GuardianDefense.png similarity index 100% rename from Buffs/GuardianDefense.png rename to Buffs/SummonBuffs/GuardianDefense.png diff --git a/Buffs/GuardianHealer.cs b/Buffs/SummonBuffs/GuardianHealer.cs similarity index 91% rename from Buffs/GuardianHealer.cs rename to Buffs/SummonBuffs/GuardianHealer.cs index f2511ada51..ce8b3c562c 100644 --- a/Buffs/GuardianHealer.cs +++ b/Buffs/SummonBuffs/GuardianHealer.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.SummonBuffs { public class GuardianHealer : ModBuff { diff --git a/Buffs/GuardianHealer.png b/Buffs/SummonBuffs/GuardianHealer.png similarity index 100% rename from Buffs/GuardianHealer.png rename to Buffs/SummonBuffs/GuardianHealer.png diff --git a/Buffs/GuardianOffense.cs b/Buffs/SummonBuffs/GuardianOffense.cs similarity index 91% rename from Buffs/GuardianOffense.cs rename to Buffs/SummonBuffs/GuardianOffense.cs index 7f7832d433..61f9f9e68d 100644 --- a/Buffs/GuardianOffense.cs +++ b/Buffs/SummonBuffs/GuardianOffense.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.SummonBuffs { public class GuardianOffense : ModBuff { diff --git a/Buffs/GuardianOffense.png b/Buffs/SummonBuffs/GuardianOffense.png similarity index 100% rename from Buffs/GuardianOffense.png rename to Buffs/SummonBuffs/GuardianOffense.png diff --git a/Buffs/Herring.cs b/Buffs/SummonBuffs/Herring.cs similarity index 91% rename from Buffs/Herring.cs rename to Buffs/SummonBuffs/Herring.cs index a890104793..aea21b66b9 100644 --- a/Buffs/Herring.cs +++ b/Buffs/SummonBuffs/Herring.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.SummonBuffs { public class Herring : ModBuff { diff --git a/Buffs/Herring.png b/Buffs/SummonBuffs/Herring.png similarity index 100% rename from Buffs/Herring.png rename to Buffs/SummonBuffs/Herring.png diff --git a/Buffs/HotE.cs b/Buffs/SummonBuffs/HotE.cs similarity index 89% rename from Buffs/HotE.cs rename to Buffs/SummonBuffs/HotE.cs index 8bef2e0a28..2da4f233f4 100644 --- a/Buffs/HotE.cs +++ b/Buffs/SummonBuffs/HotE.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.SummonBuffs { public class HotE : ModBuff { diff --git a/Buffs/HotE.png b/Buffs/SummonBuffs/HotE.png similarity index 100% rename from Buffs/HotE.png rename to Buffs/SummonBuffs/HotE.png diff --git a/Buffs/IceClasper.cs b/Buffs/SummonBuffs/IceClasper.cs similarity index 91% rename from Buffs/IceClasper.cs rename to Buffs/SummonBuffs/IceClasper.cs index 8cd6816864..47e7a0eba9 100644 --- a/Buffs/IceClasper.cs +++ b/Buffs/SummonBuffs/IceClasper.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.SummonBuffs { public class IceClasper : ModBuff { diff --git a/Buffs/IceClasper.png b/Buffs/SummonBuffs/IceClasper.png similarity index 100% rename from Buffs/IceClasper.png rename to Buffs/SummonBuffs/IceClasper.png diff --git a/Buffs/Mechworm.cs b/Buffs/SummonBuffs/Mechworm.cs similarity index 91% rename from Buffs/Mechworm.cs rename to Buffs/SummonBuffs/Mechworm.cs index 4d25db5b11..296f4edb91 100644 --- a/Buffs/Mechworm.cs +++ b/Buffs/SummonBuffs/Mechworm.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.SummonBuffs { public class Mechworm : ModBuff { diff --git a/Buffs/Mechworm.png b/Buffs/SummonBuffs/Mechworm.png similarity index 100% rename from Buffs/Mechworm.png rename to Buffs/SummonBuffs/Mechworm.png diff --git a/Buffs/Phantom.cs b/Buffs/SummonBuffs/Phantom.cs similarity index 91% rename from Buffs/Phantom.cs rename to Buffs/SummonBuffs/Phantom.cs index 54c32d8f42..71c1738b8f 100644 --- a/Buffs/Phantom.cs +++ b/Buffs/SummonBuffs/Phantom.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.SummonBuffs { public class Phantom : ModBuff { diff --git a/Buffs/Phantom.png b/Buffs/SummonBuffs/Phantom.png similarity index 100% rename from Buffs/Phantom.png rename to Buffs/SummonBuffs/Phantom.png diff --git a/Buffs/ReaverOrb.cs b/Buffs/SummonBuffs/ReaverOrb.cs similarity index 91% rename from Buffs/ReaverOrb.cs rename to Buffs/SummonBuffs/ReaverOrb.cs index fefe473c0f..c20b3637ce 100644 --- a/Buffs/ReaverOrb.cs +++ b/Buffs/SummonBuffs/ReaverOrb.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.SummonBuffs { public class ReaverOrb : ModBuff { diff --git a/Buffs/ReaverOrb.png b/Buffs/SummonBuffs/ReaverOrb.png similarity index 100% rename from Buffs/ReaverOrb.png rename to Buffs/SummonBuffs/ReaverOrb.png diff --git a/Buffs/RedDevil.cs b/Buffs/SummonBuffs/RedDevil.cs similarity index 91% rename from Buffs/RedDevil.cs rename to Buffs/SummonBuffs/RedDevil.cs index 9777193a32..02f39988fe 100644 --- a/Buffs/RedDevil.cs +++ b/Buffs/SummonBuffs/RedDevil.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.SummonBuffs { public class RedDevil : ModBuff { diff --git a/Buffs/RedDevil.png b/Buffs/SummonBuffs/RedDevil.png similarity index 100% rename from Buffs/RedDevil.png rename to Buffs/SummonBuffs/RedDevil.png diff --git a/Buffs/ResurrectionButterflyBuff.cs b/Buffs/SummonBuffs/ResurrectionButterflyBuff.cs similarity index 92% rename from Buffs/ResurrectionButterflyBuff.cs rename to Buffs/SummonBuffs/ResurrectionButterflyBuff.cs index b65c47024b..6a09128f22 100644 --- a/Buffs/ResurrectionButterflyBuff.cs +++ b/Buffs/SummonBuffs/ResurrectionButterflyBuff.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.SummonBuffs { public class ResurrectionButterflyBuff : ModBuff { diff --git a/Buffs/ResurrectionButterflyBuff.png b/Buffs/SummonBuffs/ResurrectionButterflyBuff.png similarity index 100% rename from Buffs/ResurrectionButterflyBuff.png rename to Buffs/SummonBuffs/ResurrectionButterflyBuff.png diff --git a/Buffs/Sandnado.cs b/Buffs/SummonBuffs/Sandnado.cs similarity index 91% rename from Buffs/Sandnado.cs rename to Buffs/SummonBuffs/Sandnado.cs index 027972483e..e94c00219a 100644 --- a/Buffs/Sandnado.cs +++ b/Buffs/SummonBuffs/Sandnado.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.SummonBuffs { public class Sandnado : ModBuff { diff --git a/Buffs/Sandnado.png b/Buffs/SummonBuffs/Sandnado.png similarity index 100% rename from Buffs/Sandnado.png rename to Buffs/SummonBuffs/Sandnado.png diff --git a/Buffs/SandyWaifu.cs b/Buffs/SummonBuffs/SandyWaifu.cs similarity index 91% rename from Buffs/SandyWaifu.cs rename to Buffs/SummonBuffs/SandyWaifu.cs index 676fd83e63..2b349a6f5f 100644 --- a/Buffs/SandyWaifu.cs +++ b/Buffs/SummonBuffs/SandyWaifu.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.SummonBuffs { public class SandyWaifu : ModBuff { diff --git a/Buffs/SandyWaifu.png b/Buffs/SummonBuffs/SandyWaifu.png similarity index 100% rename from Buffs/SandyWaifu.png rename to Buffs/SummonBuffs/SandyWaifu.png diff --git a/Buffs/SilvaCrystal.cs b/Buffs/SummonBuffs/SilvaCrystal.cs similarity index 91% rename from Buffs/SilvaCrystal.cs rename to Buffs/SummonBuffs/SilvaCrystal.cs index b4baae06ea..5141ae2ce9 100644 --- a/Buffs/SilvaCrystal.cs +++ b/Buffs/SummonBuffs/SilvaCrystal.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.SummonBuffs { public class SilvaCrystal : ModBuff { diff --git a/Buffs/SilvaCrystal.png b/Buffs/SummonBuffs/SilvaCrystal.png similarity index 100% rename from Buffs/SilvaCrystal.png rename to Buffs/SummonBuffs/SilvaCrystal.png diff --git a/Buffs/SirenLure.cs b/Buffs/SummonBuffs/SirenLure.cs similarity index 91% rename from Buffs/SirenLure.cs rename to Buffs/SummonBuffs/SirenLure.cs index 199d09f205..b70855dda4 100644 --- a/Buffs/SirenLure.cs +++ b/Buffs/SummonBuffs/SirenLure.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.SummonBuffs { public class SirenLure : ModBuff { diff --git a/Buffs/SirenLure.png b/Buffs/SummonBuffs/SirenLure.png similarity index 100% rename from Buffs/SirenLure.png rename to Buffs/SummonBuffs/SirenLure.png diff --git a/Buffs/SlimeGod.cs b/Buffs/SummonBuffs/SlimeGod.cs similarity index 92% rename from Buffs/SlimeGod.cs rename to Buffs/SummonBuffs/SlimeGod.cs index c461f1feac..791a580ba8 100644 --- a/Buffs/SlimeGod.cs +++ b/Buffs/SummonBuffs/SlimeGod.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.SummonBuffs { public class SlimeGod : ModBuff { diff --git a/Buffs/SlimeGod.png b/Buffs/SummonBuffs/SlimeGod.png similarity index 100% rename from Buffs/SlimeGod.png rename to Buffs/SummonBuffs/SlimeGod.png diff --git a/Buffs/SolarSpirit.cs b/Buffs/SummonBuffs/SolarSpirit.cs similarity index 91% rename from Buffs/SolarSpirit.cs rename to Buffs/SummonBuffs/SolarSpirit.cs index 7230a82444..f82420afbe 100644 --- a/Buffs/SolarSpirit.cs +++ b/Buffs/SummonBuffs/SolarSpirit.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.SummonBuffs { public class SolarSpirit : ModBuff { diff --git a/Buffs/SolarSpirit.png b/Buffs/SummonBuffs/SolarSpirit.png similarity index 100% rename from Buffs/SolarSpirit.png rename to Buffs/SummonBuffs/SolarSpirit.png diff --git a/Buffs/SolarSpiritGod.cs b/Buffs/SummonBuffs/SolarSpiritGod.cs similarity index 91% rename from Buffs/SolarSpiritGod.cs rename to Buffs/SummonBuffs/SolarSpiritGod.cs index 4fa605252f..14eb39e720 100644 --- a/Buffs/SolarSpiritGod.cs +++ b/Buffs/SummonBuffs/SolarSpiritGod.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.SummonBuffs { public class SolarSpiritGod : ModBuff { diff --git a/Buffs/SolarSpiritGod.png b/Buffs/SummonBuffs/SolarSpiritGod.png similarity index 100% rename from Buffs/SolarSpiritGod.png rename to Buffs/SummonBuffs/SolarSpiritGod.png diff --git a/Buffs/SpiritGeneratorAtkBuff.cs b/Buffs/SummonBuffs/SpiritGeneratorAtkBuff.cs similarity index 88% rename from Buffs/SpiritGeneratorAtkBuff.cs rename to Buffs/SummonBuffs/SpiritGeneratorAtkBuff.cs index 0754e26214..17c6d70e3c 100644 --- a/Buffs/SpiritGeneratorAtkBuff.cs +++ b/Buffs/SummonBuffs/SpiritGeneratorAtkBuff.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.SummonBuffs { public class SpiritGeneratorAtkBuff : ModBuff { diff --git a/Buffs/SpiritGeneratorAtkBuff.png b/Buffs/SummonBuffs/SpiritGeneratorAtkBuff.png similarity index 100% rename from Buffs/SpiritGeneratorAtkBuff.png rename to Buffs/SummonBuffs/SpiritGeneratorAtkBuff.png diff --git a/Buffs/SpiritGeneratorDefBuff.cs b/Buffs/SummonBuffs/SpiritGeneratorDefBuff.cs similarity index 88% rename from Buffs/SpiritGeneratorDefBuff.cs rename to Buffs/SummonBuffs/SpiritGeneratorDefBuff.cs index 2536c9a450..e5c6604b23 100644 --- a/Buffs/SpiritGeneratorDefBuff.cs +++ b/Buffs/SummonBuffs/SpiritGeneratorDefBuff.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.SummonBuffs { public class SpiritGeneratorDefBuff : ModBuff { diff --git a/Buffs/SpiritGeneratorDefBuff.png b/Buffs/SummonBuffs/SpiritGeneratorDefBuff.png similarity index 100% rename from Buffs/SpiritGeneratorDefBuff.png rename to Buffs/SummonBuffs/SpiritGeneratorDefBuff.png diff --git a/Buffs/SpiritGeneratorRegenBuff.cs b/Buffs/SummonBuffs/SpiritGeneratorRegenBuff.cs similarity index 87% rename from Buffs/SpiritGeneratorRegenBuff.cs rename to Buffs/SummonBuffs/SpiritGeneratorRegenBuff.cs index 29664d73d4..f10fcc1d79 100644 --- a/Buffs/SpiritGeneratorRegenBuff.cs +++ b/Buffs/SummonBuffs/SpiritGeneratorRegenBuff.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.SummonBuffs { public class SpiritGeneratorRegenBuff : ModBuff { diff --git a/Buffs/SpiritGeneratorRegenBuff.png b/Buffs/SummonBuffs/SpiritGeneratorRegenBuff.png similarity index 100% rename from Buffs/SpiritGeneratorRegenBuff.png rename to Buffs/SummonBuffs/SpiritGeneratorRegenBuff.png diff --git a/Buffs/Urchin.cs b/Buffs/SummonBuffs/Urchin.cs similarity index 91% rename from Buffs/Urchin.cs rename to Buffs/SummonBuffs/Urchin.cs index 358a0dd1b5..2dee434ee1 100644 --- a/Buffs/Urchin.cs +++ b/Buffs/SummonBuffs/Urchin.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.SummonBuffs { public class Urchin : ModBuff { diff --git a/Buffs/Urchin.png b/Buffs/SummonBuffs/Urchin.png similarity index 100% rename from Buffs/Urchin.png rename to Buffs/SummonBuffs/Urchin.png diff --git a/Buffs/Valkyrie.cs b/Buffs/SummonBuffs/Valkyrie.cs similarity index 91% rename from Buffs/Valkyrie.cs rename to Buffs/SummonBuffs/Valkyrie.cs index a237bb96eb..283de0881e 100644 --- a/Buffs/Valkyrie.cs +++ b/Buffs/SummonBuffs/Valkyrie.cs @@ -1,7 +1,8 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; -namespace CalamityMod.Buffs +namespace CalamityMod.Buffs.SummonBuffs { public class Valkyrie : ModBuff { diff --git a/Buffs/Valkyrie.png b/Buffs/SummonBuffs/Valkyrie.png similarity index 100% rename from Buffs/Valkyrie.png rename to Buffs/SummonBuffs/Valkyrie.png diff --git a/Buffs/SunkenSea/Clamity.cs b/Buffs/SunkenSea/Clamity.cs index 1bdbd50c67..fa7955ad47 100644 --- a/Buffs/SunkenSea/Clamity.cs +++ b/Buffs/SunkenSea/Clamity.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Buffs.SunkenSea { diff --git a/Buffs/SunkenSea/Shellfish.cs b/Buffs/SunkenSea/Shellfish.cs index 7a7c08e91b..0da9027649 100644 --- a/Buffs/SunkenSea/Shellfish.cs +++ b/Buffs/SunkenSea/Shellfish.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Buffs.SunkenSea { diff --git a/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs similarity index 99% rename from CalamityPlayer.cs rename to CalPlayer/CalamityPlayer.cs index a4bf685969..119264b0c2 100644 --- a/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -16,17 +16,16 @@ using CalamityMod.Projectiles; using CalamityMod.Items; using CalamityMod.UI; using CalamityMod.World; -using CalamityMod.CalPlayer; using CalamityMod.Items.CalamityCustomThrowingDamage; using Terraria.ModLoader.IO; -namespace CalamityMod +namespace CalamityMod.CalPlayer { public class CalamityPlayer : ModPlayer { #region Variables - //No Category + // No Category public static bool areThereAnyDamnBosses = false; public bool drawBossHPBar = true; public bool shouldDrawSmallText = true; @@ -40,7 +39,7 @@ namespace CalamityMod public int deathCount = 0; public double radiation = 0; - //Timer and Counter + // Timer and Counter public int bossRushImmunityFrameCurseTimer = 0; public int aBulwarkRareMeleeBoostTimer = 0; public int nebulaManaNerfCounter = 0; @@ -56,14 +55,14 @@ namespace CalamityMod public float aquaticBoost = 1f; public float shieldInvinc = 5f; - //Sound + // Sound public bool playRogueStealthSound = false; public bool playFullRageSound = true; public bool playFullAdrenalineSound = true; public bool playAdrenalineBurnoutSound = true; public bool playFullAdrenalineBurnoutSound = true; - //Proficiency + // Proficiency public int meleeLevel = 0; public int rangedLevel = 0; public int magicLevel = 0; @@ -81,7 +80,7 @@ namespace CalamityMod public int exactRogueLevel = 0; public int gainLevelCooldown = 120; - //Rogue Stealth + // Rogue Stealth public float rogueStealth = 0f; public float rogueStealthMax = 0f; public float stealthGenStandstill = 1f; @@ -91,13 +90,13 @@ namespace CalamityMod public bool stealthStrikeHalfCost = false; public bool stealthStrikeAlwaysCrits = false; - //Mount + // Mount public bool onyxExcavator = false; public bool angryDog = false; public bool fab = false; public bool crysthamyr = false; - //Pet + // Pet public bool thirdSage = false; public bool thirdSageH = true; // Third sage healing public bool perfmini = false; @@ -112,7 +111,7 @@ namespace CalamityMod public bool trashMan = false; public int trashManChest = -1; - //Rage + // Rage public const int stressMax = 10000; public int stress; public int stressCD; @@ -120,7 +119,7 @@ namespace CalamityMod public bool rageMode = false; public int gainRageCooldown = 60; - //Adrenaline + // Adrenaline public const int adrenalineMax = 10000; public int adrenalineMaxTimer = 300; public int adrenalineDmgDown = 600; @@ -129,7 +128,7 @@ namespace CalamityMod public int adrenalineCD; public bool adrenalineMode = false; - //Permanent Buff + // Permanent Buff public bool extraAccessoryML = false; public bool eCore = false; public bool pHeart = false; @@ -146,7 +145,7 @@ namespace CalamityMod public bool adrenalineBoostTwo = false; public bool adrenalineBoostThree = false; - //Lore + // Lore public bool desertScourgeLore = false; public bool eaterOfWorldsLore = false; public bool hiveMindLore = false; @@ -175,7 +174,7 @@ namespace CalamityMod public bool yharonLore = false; public bool SCalLore = false; - //Accessory + // Accessory public bool fasterMeleeLevel = false; public bool fasterRangedLevel = false; public bool fasterMagicLevel = false; @@ -284,8 +283,14 @@ namespace CalamityMod public bool normalityRelocator = false; public bool fabledTortoise = false; public bool manaOverloader = false; + public bool sandWaifu = false; + public bool sandBoobWaifu = false; + public bool cloudWaifu = false; + public bool brimstoneWaifu = false; + public bool sirenWaifu = false; + public bool fungalClump = false; - //Armor Set + // Armor Set public bool victideSet = false; public bool aeroSet = false; public bool statigelSet = false; @@ -361,9 +366,16 @@ namespace CalamityMod public bool omegaBlueSet = false; public bool omegaBlueHentai = false; public int omegaBlueCooldown = 0; + public bool urchin = false; + public bool valkyrie = false; + public bool slimeGod = false; public bool molluskSet = false; + public bool daedalusCrystal = false; + public bool reaverOrb = false; + public bool chaosSpirit = false; + public bool redDevil = false; - //Debuff + // Debuff public bool shadowflame = false; public bool wDeath = false; public bool lethalLavaBurn = false; @@ -391,7 +403,7 @@ namespace CalamityMod public bool bOut = false; public bool clamity = false; - //Buff + // Buff public bool trinketOfChiBuff = false; public int chiBuffTimer = 0; public bool corrEffigy = false; @@ -465,7 +477,7 @@ namespace CalamityMod public bool trippy = false; public bool amidiasBlessing = false; - //Minion + // Minion public bool resButterfly = false; public bool glSword = false; public bool mWorm = false; @@ -485,10 +497,16 @@ namespace CalamityMod public bool aChicken = false; public bool cLamp = false; public bool pGuy = false; + public bool sandnado = false; public bool gDefense = false; public bool gOffense = false; public bool gHealer = false; public bool cEnergy = false; + public int healCounter = 300; + public bool shellfish = false; + public bool hCrab = false; + public bool allWaifus = false; + public bool sCrystal = false; public bool sWaifu = false; public bool dWaifu = false; public bool cWaifu = false; @@ -497,32 +515,13 @@ namespace CalamityMod public bool fClump = false; public bool rDevil = false; public bool aValkyrie = false; - public bool sCrystal = false; public bool sGod = false; - public bool sandnado = false; public bool vUrchin = false; public bool cSpirit = false; public bool rOrb = false; public bool dCrystal = false; - public bool sandWaifu = false; - public bool sandBoobWaifu = false; - public bool cloudWaifu = false; - public bool brimstoneWaifu = false; - public bool sirenWaifu = false; - public bool allWaifus = false; - public bool fungalClump = false; - public bool redDevil = false; - public bool valkyrie = false; - public bool slimeGod = false; - public bool urchin = false; - public bool chaosSpirit = false; - public bool reaverOrb = false; - public bool daedalusCrystal = false; - public int healCounter = 300; - public bool shellfish = false; - public bool hCrab = false; - //Biome + // Biome public bool ZoneCalamity = false; public bool ZoneAstral = false; public bool ZoneSunkenSea = false; @@ -534,7 +533,7 @@ namespace CalamityMod public bool ZoneAbyssLayer4 = false; public int abyssBreathCD; - //Transformation + // Transformation public bool abyssalDivingSuitPrevious; public bool abyssalDivingSuit; public bool abyssalDivingSuitHide; @@ -1998,11 +1997,12 @@ namespace CalamityMod public static void JungleTeleport(Player player, bool syncData = false) { - int jungleSide = CalamityWorld.abyssSide ? ((Main.maxTilesX / 2) + (Main.maxTilesX / 4)) : (Main.maxTilesX / 5); - int teleportStartX = jungleSide; - int teleportRangeX = 200; - int teleportStartY = (int)Main.worldSurface; + int teleportStartX = CalamityWorld.abyssSide ? (int)((double)Main.maxTilesX * 0.65) : (int)((double)Main.maxTilesX * 0.2); + int teleportRangeX = (int)((double)Main.maxTilesX * 0.15); + + int teleportStartY = (int)Main.worldSurface - 75; int teleportRangeY = 50; + bool flag = false; int num = 0; int num2 = 0; @@ -2081,6 +2081,7 @@ namespace CalamityMod { return; } + ModTeleport(player, vector, syncData, false); } @@ -2249,7 +2250,7 @@ namespace CalamityMod } if (abyssalDivingSuit) { - player.AddBuff(mod.BuffType(), 60, true); + player.AddBuff(mod.BuffType(), 60, true); if (player.whoAmI == Main.myPlayer) { if (abyssalDivingSuitCooldown) @@ -2273,11 +2274,11 @@ namespace CalamityMod } if (sirenBoobs) { - player.AddBuff(mod.BuffType(), 60, true); + player.AddBuff(mod.BuffType(), 60, true); } else if (sirenBoobsAlt) { - player.AddBuff(mod.BuffType(), 60, true); + player.AddBuff(mod.BuffType(), 60, true); } if ((sirenBoobs || sirenBoobsAlt) && NPC.downedBoss3) { @@ -4222,7 +4223,7 @@ namespace CalamityMod } if (rampartOfDeities) { - player.armorPenetration += 10; // +10from deific amulet stacks with this + player.armorPenetration += 10; player.noKnockback = true; if (player.statLife > (int)((double)player.statLifeMax2 * 0.25)) { @@ -4635,7 +4636,6 @@ namespace CalamityMod { #region SpeedBoosts float runAccMult = 1f + - ((hAttack && !Main.dayTime) ? 0.05f : 0f) + ((stressPills || laudanum || draedonsHeart) ? 0.05f : 0f) + ((abyssalDivingSuit && Collision.DrownCollision(player.position, player.width, player.height, player.gravDir)) ? 0.05f : 0f) + (sirenWaterBuff ? 0.15f : 0f) + @@ -4650,7 +4650,6 @@ namespace CalamityMod (rogueStealthMax > 0f ? (rogueStealth >= rogueStealthMax ? rogueStealth * 0.05f : rogueStealth * 0.025f) : 0f); float runSpeedMult = 1f + - ((hAttack && !Main.dayTime) ? 0.05f : 0f) + ((stressPills || laudanum || draedonsHeart) ? 0.05f : 0f) + ((abyssalDivingSuit && Collision.DrownCollision(player.position, player.width, player.height, player.gravDir)) ? 0.05f : 0f) + (sirenWaterBuff ? 0.15f : 0f) + @@ -9152,6 +9151,17 @@ namespace CalamityMod fullBright = true; } } + else if (eGravity) + { + if (Main.rand.Next(12) == 0 && drawInfo.shadow == 0f) + { + int dust = Dust.NewDust(drawInfo.position - new Vector2(2f, 2f), player.width + 4, player.height + 4, 244, player.velocity.X * 0.4f, player.velocity.Y * 0.4f, 100, default(Color), 3f); + Main.dust[dust].noGravity = true; + Main.dust[dust].velocity *= 1.8f; + Main.dust[dust].velocity.Y -= 0.5f; + Main.playerDrawDust.Add(dust); + } + } if (pFlames) { if (Main.rand.Next(4) == 0 && drawInfo.shadow == 0f) diff --git a/CalPlayer/CalamityPlayerLifeRegen.cs b/CalPlayer/CalamityPlayerLifeRegen.cs index d21a95988e..020c3fad0c 100644 --- a/CalPlayer/CalamityPlayerLifeRegen.cs +++ b/CalPlayer/CalamityPlayerLifeRegen.cs @@ -4,6 +4,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.Utilities; namespace CalamityMod.CalPlayer { diff --git a/CalamityMod.cs b/CalamityMod.cs index 32c1d26e74..8d5c58f589 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -20,12 +20,16 @@ using CalamityMod.NPCs.SupremeCalamitas; using CalamityMod.UI; using CalamityMod.Skies; using CalamityMod.World; +using CalamityMod.CalPlayer; +using CalamityMod.Localization; +using CalamityMod.Utilities; +using CalamityMod.MiscModSupport; namespace CalamityMod { public class CalamityMod : Mod { - //Hotkeys + // Hotkeys public static ModHotKey NormalityRelocatorHotKey; public static ModHotKey AegisHotKey; public static ModHotKey TarraHotKey; @@ -36,12 +40,12 @@ namespace CalamityMod public static ModHotKey BossBarToggleHotKey; public static ModHotKey BossBarToggleSmallTextHotKey; - //Boss Spawners + // Boss Spawners public static int ghostKillCount = 0; public static int sharkKillCount = 0; public static int astralKillCount = 0; - //Textures & Shaders + // Textures & Shaders public static Texture2D heartOriginal2; public static Texture2D heartOriginal; public static Texture2D rainOriginal; @@ -52,7 +56,7 @@ namespace CalamityMod public static Texture2D AstralSky; public static Effect CustomShader; - //Lists + // Lists public static IList donatorList; public static List rangedProjectileExceptionList; public static List projectileMinionList; @@ -165,7 +169,7 @@ namespace CalamityMod Filters.Scene["CalamityMod:CalamitasRun3"] = new Filter(new CalScreenShaderData("FilterMiniTower").UseColor(1.1f, 0.3f, 0.3f).UseOpacity(0.6f), EffectPriority.VeryHigh); SkyManager.Instance["CalamityMod:CalamitasRun3"] = new CalSky(); - Filters.Scene["CalamityMod:PlaguebringerGoliath"] = new Filter(new PbGScreenShaderData("FilterMiniTower").UseColor(0.2f, 0.6f, 0.2f).UseOpacity(0.65f), EffectPriority.VeryHigh); + Filters.Scene["CalamityMod:PlaguebringerGoliath"] = new Filter(new PbGScreenShaderData("FilterMiniTower").UseColor(0.2f, 0.6f, 0.2f).UseOpacity(0.35f), EffectPriority.VeryHigh); SkyManager.Instance["CalamityMod:PlaguebringerGoliath"] = new PbGSky(); Filters.Scene["CalamityMod:Yharon"] = new Filter(new YScreenShaderData("FilterMiniTower").UseColor(1f, 0.4f, 0f).UseOpacity(0.75f), EffectPriority.VeryHigh); diff --git a/Gores/DoGBody.png b/Gores/DoGBody.png index 064f582d22..3bd4321383 100644 Binary files a/Gores/DoGBody.png and b/Gores/DoGBody.png differ diff --git a/Gores/DoGBody2.png b/Gores/DoGBody2.png index 5c8002687d..ce1193d555 100644 Binary files a/Gores/DoGBody2.png and b/Gores/DoGBody2.png differ diff --git a/Gores/DoGBody3.png b/Gores/DoGBody3.png index a1cdb98387..2e2616f6a3 100644 Binary files a/Gores/DoGBody3.png and b/Gores/DoGBody3.png differ diff --git a/Gores/DoGHead.png b/Gores/DoGHead.png index aa6e29d01c..f33c23b97e 100644 Binary files a/Gores/DoGHead.png and b/Gores/DoGHead.png differ diff --git a/Gores/DoGS.png b/Gores/DoGS.png index 7932872743..abd66fddc4 100644 Binary files a/Gores/DoGS.png and b/Gores/DoGS.png differ diff --git a/Gores/DoGS2.png b/Gores/DoGS2.png index d5ab52b6eb..1107d0f012 100644 Binary files a/Gores/DoGS2.png and b/Gores/DoGS2.png differ diff --git a/Gores/DoGS3.png b/Gores/DoGS3.png index ec174780d1..3ddacd4be9 100644 Binary files a/Gores/DoGS3.png and b/Gores/DoGS3.png differ diff --git a/Gores/DoGS4.png b/Gores/DoGS4.png index 57441bc6f8..e572b186f5 100644 Binary files a/Gores/DoGS4.png and b/Gores/DoGS4.png differ diff --git a/Gores/DoGS5.png b/Gores/DoGS5.png index a3c20935ec..a3ff879144 100644 Binary files a/Gores/DoGS5.png and b/Gores/DoGS5.png differ diff --git a/Gores/DoGS6.png b/Gores/DoGS6.png index f338c5d8e6..08caebce08 100644 Binary files a/Gores/DoGS6.png and b/Gores/DoGS6.png differ diff --git a/Gores/DoGTail.png b/Gores/DoGTail.png index 360c8bcb88..65f911efda 100644 Binary files a/Gores/DoGTail.png and b/Gores/DoGTail.png differ diff --git a/Gores/DoT.png b/Gores/DoT.png index f2b6399478..2522740775 100644 Binary files a/Gores/DoT.png and b/Gores/DoT.png differ diff --git a/Gores/DoT2.png b/Gores/DoT2.png index 26bb1f3093..7d83341fd1 100644 Binary files a/Gores/DoT2.png and b/Gores/DoT2.png differ diff --git a/Gores/DoT3.png b/Gores/DoT3.png index 5fad409925..872927462a 100644 Binary files a/Gores/DoT3.png and b/Gores/DoT3.png differ diff --git a/Gores/DoT4.png b/Gores/DoT4.png index c39ad60691..8865c715ba 100644 Binary files a/Gores/DoT4.png and b/Gores/DoT4.png differ diff --git a/Gores/DoT5.png b/Gores/DoT5.png index afb32a106d..19ccf524a2 100644 Binary files a/Gores/DoT5.png and b/Gores/DoT5.png differ diff --git a/Items/AbyssItems/AbyssalAmulet.cs b/Items/AbyssItems/AbyssalAmulet.cs index ef418489e0..f9259af8d9 100644 --- a/Items/AbyssItems/AbyssalAmulet.cs +++ b/Items/AbyssItems/AbyssalAmulet.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.AbyssItems { diff --git a/Items/AbyssItems/AbyssalDivingGear.cs b/Items/AbyssItems/AbyssalDivingGear.cs index 97ca96fe22..065a0394d4 100644 --- a/Items/AbyssItems/AbyssalDivingGear.cs +++ b/Items/AbyssItems/AbyssalDivingGear.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.AbyssItems { diff --git a/Items/AbyssItems/AnechoicPlating.cs b/Items/AbyssItems/AnechoicPlating.cs index 0427280321..afd078a386 100644 --- a/Items/AbyssItems/AnechoicPlating.cs +++ b/Items/AbyssItems/AnechoicPlating.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.AbyssItems { diff --git a/Items/AbyssItems/DepthCharm.cs b/Items/AbyssItems/DepthCharm.cs index c0ceeaaad2..22e8cb7971 100644 --- a/Items/AbyssItems/DepthCharm.cs +++ b/Items/AbyssItems/DepthCharm.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.AbyssItems { diff --git a/Items/AbyssItems/IronBoots.cs b/Items/AbyssItems/IronBoots.cs index 351f20793b..4f4169a075 100644 --- a/Items/AbyssItems/IronBoots.cs +++ b/Items/AbyssItems/IronBoots.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.AbyssItems { diff --git a/Items/AbyssItems/LumenousAmulet.cs b/Items/AbyssItems/LumenousAmulet.cs index 8e1463d2b4..8e741e1a40 100644 --- a/Items/AbyssItems/LumenousAmulet.cs +++ b/Items/AbyssItems/LumenousAmulet.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.AbyssItems { diff --git a/Items/AbyssItems/ReaperToothNecklace.cs b/Items/AbyssItems/ReaperToothNecklace.cs index d5cbb6d789..d60f526fe4 100644 --- a/Items/AbyssItems/ReaperToothNecklace.cs +++ b/Items/AbyssItems/ReaperToothNecklace.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.AbyssItems { diff --git a/Items/Accessories/AlchemicalFlask.cs b/Items/Accessories/AlchemicalFlask.cs index 76b79d6945..0229c3a172 100644 --- a/Items/Accessories/AlchemicalFlask.cs +++ b/Items/Accessories/AlchemicalFlask.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories { diff --git a/Items/Accessories/AmalgamatedBrain.cs b/Items/Accessories/AmalgamatedBrain.cs index 4aab9bff6c..b7ee953d74 100644 --- a/Items/Accessories/AmalgamatedBrain.cs +++ b/Items/Accessories/AmalgamatedBrain.cs @@ -3,6 +3,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories { diff --git a/Items/Accessories/AmbrosialAmpoule.cs b/Items/Accessories/AmbrosialAmpoule.cs index 4a613d33cf..ac1fe32504 100644 --- a/Items/Accessories/AmbrosialAmpoule.cs +++ b/Items/Accessories/AmbrosialAmpoule.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories { diff --git a/Items/Accessories/AmidiasSpark.cs b/Items/Accessories/AmidiasSpark.cs index 762a92f214..24fff1f75b 100644 --- a/Items/Accessories/AmidiasSpark.cs +++ b/Items/Accessories/AmidiasSpark.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories { diff --git a/Items/Accessories/AngelTreads.cs b/Items/Accessories/AngelTreads.cs index 6badbebce2..3419ea34bd 100644 --- a/Items/Accessories/AngelTreads.cs +++ b/Items/Accessories/AngelTreads.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories { diff --git a/Items/Accessories/ArcanumoftheVoid.cs b/Items/Accessories/ArcanumoftheVoid.cs index c4f194e376..177c38d877 100644 --- a/Items/Accessories/ArcanumoftheVoid.cs +++ b/Items/Accessories/ArcanumoftheVoid.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories { diff --git a/Items/Accessories/AsgardianAegis.cs b/Items/Accessories/AsgardianAegis.cs index a5d834679c..a8783ee9d5 100644 --- a/Items/Accessories/AsgardianAegis.cs +++ b/Items/Accessories/AsgardianAegis.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories { diff --git a/Items/Accessories/AsgardsValor.cs b/Items/Accessories/AsgardsValor.cs index 6a52c5f601..6f625172a2 100644 --- a/Items/Accessories/AsgardsValor.cs +++ b/Items/Accessories/AsgardsValor.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories { @@ -14,8 +15,8 @@ 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" + "+20 max life\n" + - "Grants a holy dash which can be used to ram enemies\n" + - "Toggle visibility of this accessory to enable/disable the dash"); + "Grants a holy dash which can be used to ram enemies\n" + + "Toggle visibility of this accessory to enable/disable the dash"); } public override void SetDefaults() diff --git a/Items/Accessories/AstralArcanum.cs b/Items/Accessories/AstralArcanum.cs index 113e49faf5..ddefe374f1 100644 --- a/Items/Accessories/AstralArcanum.cs +++ b/Items/Accessories/AstralArcanum.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories { diff --git a/Items/Accessories/AstralBulwark.cs b/Items/Accessories/AstralBulwark.cs index 0434765222..e7cd8e004f 100644 --- a/Items/Accessories/AstralBulwark.cs +++ b/Items/Accessories/AstralBulwark.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories { diff --git a/Items/Accessories/BadgeofBravery.cs b/Items/Accessories/BadgeofBravery.cs index fe1ae47b72..84e9114cbf 100644 --- a/Items/Accessories/BadgeofBravery.cs +++ b/Items/Accessories/BadgeofBravery.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories { diff --git a/Items/Accessories/BloodflareCore.cs b/Items/Accessories/BloodflareCore.cs index d4d57b2e1a..17eb9c295a 100644 --- a/Items/Accessories/BloodflareCore.cs +++ b/Items/Accessories/BloodflareCore.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories { diff --git a/Items/Accessories/BurdenBreaker.cs b/Items/Accessories/BurdenBreaker.cs index b59093d392..08830a2d1b 100644 --- a/Items/Accessories/BurdenBreaker.cs +++ b/Items/Accessories/BurdenBreaker.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories { diff --git a/Items/Accessories/CelestialJewel.cs b/Items/Accessories/CelestialJewel.cs index e81155acbc..0ef4572d76 100644 --- a/Items/Accessories/CelestialJewel.cs +++ b/Items/Accessories/CelestialJewel.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories { diff --git a/Items/Accessories/CheatTestThing.cs b/Items/Accessories/CheatTestThing.cs index 4014b7ba2c..e62f8e74c4 100644 --- a/Items/Accessories/CheatTestThing.cs +++ b/Items/Accessories/CheatTestThing.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.DataStructures; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories { diff --git a/Items/Accessories/CoreOfTheBloodGod.cs b/Items/Accessories/CoreOfTheBloodGod.cs index fd5f315e31..e0a4372e32 100644 --- a/Items/Accessories/CoreOfTheBloodGod.cs +++ b/Items/Accessories/CoreOfTheBloodGod.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories { diff --git a/Items/Accessories/CounterScarf.cs b/Items/Accessories/CounterScarf.cs index be89e639be..5e7810531a 100644 --- a/Items/Accessories/CounterScarf.cs +++ b/Items/Accessories/CounterScarf.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories { diff --git a/Items/Accessories/CrownJewel.cs b/Items/Accessories/CrownJewel.cs index 38efa87bf2..489bd60b3d 100644 --- a/Items/Accessories/CrownJewel.cs +++ b/Items/Accessories/CrownJewel.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories { diff --git a/Items/Accessories/DarkSunRing.cs b/Items/Accessories/DarkSunRing.cs index e9f6680774..7df4786d1b 100644 --- a/Items/Accessories/DarkSunRing.cs +++ b/Items/Accessories/DarkSunRing.cs @@ -2,6 +2,7 @@ using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories { diff --git a/Items/Accessories/DeificAmulet.cs b/Items/Accessories/DeificAmulet.cs index 45d18ea9c6..49b08d0aec 100644 --- a/Items/Accessories/DeificAmulet.cs +++ b/Items/Accessories/DeificAmulet.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories { diff --git a/Items/Accessories/DimensionalSoulArtifact.cs b/Items/Accessories/DimensionalSoulArtifact.cs index 7077c84c16..3a4f108a72 100644 --- a/Items/Accessories/DimensionalSoulArtifact.cs +++ b/Items/Accessories/DimensionalSoulArtifact.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories { diff --git a/Items/Accessories/DraedonsHeart.cs b/Items/Accessories/DraedonsHeart.cs index 5a52eade3d..630640281d 100644 --- a/Items/Accessories/DraedonsHeart.cs +++ b/Items/Accessories/DraedonsHeart.cs @@ -2,6 +2,7 @@ using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories { @@ -10,7 +11,7 @@ namespace CalamityMod.Items.Accessories public override void SetStaticDefaults() { DisplayName.SetDefault("Draedon's Heart"); - Tooltip.SetDefault("Gives 10% increased damage while you have the heart attack debuff\n" + + Tooltip.SetDefault("Gives 10% increased damage while you have the absolute rage buff\n" + "Increases your chance of getting the heart attack debuff\n" + "Boosts your damage by 10% and max movement speed and acceleration by 5%\n" + "Rage mode does more damage\n" + diff --git a/Items/Accessories/EldritchSoulArtifact.cs b/Items/Accessories/EldritchSoulArtifact.cs index 17e8083a7d..335011c766 100644 --- a/Items/Accessories/EldritchSoulArtifact.cs +++ b/Items/Accessories/EldritchSoulArtifact.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories { diff --git a/Items/Accessories/ElementalGauntlet.cs b/Items/Accessories/ElementalGauntlet.cs index 2b93c4cd2f..129b3ba764 100644 --- a/Items/Accessories/ElementalGauntlet.cs +++ b/Items/Accessories/ElementalGauntlet.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories { diff --git a/Items/Accessories/ElementalQuiver.cs b/Items/Accessories/ElementalQuiver.cs index 217b34af40..c1e6c5e010 100644 --- a/Items/Accessories/ElementalQuiver.cs +++ b/Items/Accessories/ElementalQuiver.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories { diff --git a/Items/Accessories/EtherealTalisman.cs b/Items/Accessories/EtherealTalisman.cs index 0d8026bce8..0a91446646 100644 --- a/Items/Accessories/EtherealTalisman.cs +++ b/Items/Accessories/EtherealTalisman.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories { diff --git a/Items/Accessories/EyeoftheStorm.cs b/Items/Accessories/EyeoftheStorm.cs index 31c977c40f..1efec04885 100644 --- a/Items/Accessories/EyeoftheStorm.cs +++ b/Items/Accessories/EyeoftheStorm.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories { diff --git a/Items/Accessories/FrigidBulwark.cs b/Items/Accessories/FrigidBulwark.cs index 13ddfd8c32..264cd412d5 100644 --- a/Items/Accessories/FrigidBulwark.cs +++ b/Items/Accessories/FrigidBulwark.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories { diff --git a/Items/Accessories/FrostBarrier.cs b/Items/Accessories/FrostBarrier.cs index a9e2a32da7..6f1a5b5994 100644 --- a/Items/Accessories/FrostBarrier.cs +++ b/Items/Accessories/FrostBarrier.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories { diff --git a/Items/Accessories/FrostFlare.cs b/Items/Accessories/FrostFlare.cs index 5c06e0e2d6..2cbc99ca1a 100644 --- a/Items/Accessories/FrostFlare.cs +++ b/Items/Accessories/FrostFlare.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.DataStructures; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories { diff --git a/Items/Accessories/FungalCarapace.cs b/Items/Accessories/FungalCarapace.cs index 3f86dd5656..f9e314c23f 100644 --- a/Items/Accessories/FungalCarapace.cs +++ b/Items/Accessories/FungalCarapace.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories { diff --git a/Items/Accessories/GiantShell.cs b/Items/Accessories/GiantShell.cs index 1c711b629f..bd865ae9a8 100644 --- a/Items/Accessories/GiantShell.cs +++ b/Items/Accessories/GiantShell.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories { diff --git a/Items/Accessories/GiantTortoiseShell.cs b/Items/Accessories/GiantTortoiseShell.cs index c5e345f3bc..94ddbe4712 100644 --- a/Items/Accessories/GiantTortoiseShell.cs +++ b/Items/Accessories/GiantTortoiseShell.cs @@ -24,7 +24,6 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); player.moveSpeed -= 0.1f; player.thorns = 0.25f; } diff --git a/Items/Accessories/GodlySoulArtifact.cs b/Items/Accessories/GodlySoulArtifact.cs index d74b2eb2bd..ab4c9ede1a 100644 --- a/Items/Accessories/GodlySoulArtifact.cs +++ b/Items/Accessories/GodlySoulArtifact.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories { diff --git a/Items/Accessories/HarpyRing.cs b/Items/Accessories/HarpyRing.cs index 6e86fd7058..12247d9fa8 100644 --- a/Items/Accessories/HarpyRing.cs +++ b/Items/Accessories/HarpyRing.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories { diff --git a/Items/Accessories/HeartofDarkness.cs b/Items/Accessories/HeartofDarkness.cs index c6aa1491ca..8c31c58045 100644 --- a/Items/Accessories/HeartofDarkness.cs +++ b/Items/Accessories/HeartofDarkness.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.DataStructures; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories { @@ -9,7 +10,7 @@ namespace CalamityMod.Items.Accessories public override void SetStaticDefaults() { DisplayName.SetDefault("Heart of Darkness"); - Tooltip.SetDefault("Gives 10% increased damage while you have the heart attack debuff\n" + + Tooltip.SetDefault("Gives 10% increased damage while you have the absolute rage buff\n" + "Increases your chance of getting the heart attack debuff\n" + "Rage mode does more damage\n" + "You gain rage over time\n" + diff --git a/Items/Accessories/HeartoftheElements.cs b/Items/Accessories/HeartoftheElements.cs index 35c2e18723..a52decf7d0 100644 --- a/Items/Accessories/HeartoftheElements.cs +++ b/Items/Accessories/HeartoftheElements.cs @@ -3,6 +3,7 @@ using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories { diff --git a/Items/Accessories/HoneyDew.cs b/Items/Accessories/HoneyDew.cs index fe0003823e..c94cee459a 100644 --- a/Items/Accessories/HoneyDew.cs +++ b/Items/Accessories/HoneyDew.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories { diff --git a/Items/Accessories/Laudanum.cs b/Items/Accessories/Laudanum.cs index 5ce85d38c0..1e2f037ac7 100644 --- a/Items/Accessories/Laudanum.cs +++ b/Items/Accessories/Laudanum.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories { diff --git a/Items/Accessories/MagicLevelMeter.cs b/Items/Accessories/MagicLevelMeter.cs index 37460d5e6f..b5cf43fb65 100644 --- a/Items/Accessories/MagicLevelMeter.cs +++ b/Items/Accessories/MagicLevelMeter.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories { diff --git a/Items/Accessories/MeleeLevelMeter.cs b/Items/Accessories/MeleeLevelMeter.cs index 60cb05e3c2..88c02b1efa 100644 --- a/Items/Accessories/MeleeLevelMeter.cs +++ b/Items/Accessories/MeleeLevelMeter.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories { diff --git a/Items/Accessories/Nanotech.cs b/Items/Accessories/Nanotech.cs index 853ff58ca5..c0c7d6b90d 100644 --- a/Items/Accessories/Nanotech.cs +++ b/Items/Accessories/Nanotech.cs @@ -2,6 +2,7 @@ using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items.CalamityCustomThrowingDamage; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories { diff --git a/Items/Accessories/NecklaceofVexation.cs b/Items/Accessories/NecklaceofVexation.cs index b513f6cfb7..9e15a9eba6 100644 --- a/Items/Accessories/NecklaceofVexation.cs +++ b/Items/Accessories/NecklaceofVexation.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories { diff --git a/Items/Accessories/PlagueHive.cs b/Items/Accessories/PlagueHive.cs index 509923d91c..4a956d877a 100644 --- a/Items/Accessories/PlagueHive.cs +++ b/Items/Accessories/PlagueHive.cs @@ -2,6 +2,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories { diff --git a/Items/Accessories/PsychoticAmulet.cs b/Items/Accessories/PsychoticAmulet.cs index db59f5c492..196a034dc2 100644 --- a/Items/Accessories/PsychoticAmulet.cs +++ b/Items/Accessories/PsychoticAmulet.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ModLoader; using CalamityMod.Items.CalamityCustomThrowingDamage; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories { diff --git a/Items/Accessories/RaidersTalisman.cs b/Items/Accessories/RaidersTalisman.cs index 42878946e9..d7ae147b07 100644 --- a/Items/Accessories/RaidersTalisman.cs +++ b/Items/Accessories/RaidersTalisman.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories { diff --git a/Items/Accessories/RampartofDeities.cs b/Items/Accessories/RampartofDeities.cs index 3008caa45b..8829ff0dc7 100644 --- a/Items/Accessories/RampartofDeities.cs +++ b/Items/Accessories/RampartofDeities.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories { diff --git a/Items/Accessories/RangedLevelMeter.cs b/Items/Accessories/RangedLevelMeter.cs index 2c5fa5d422..8f744a6dcc 100644 --- a/Items/Accessories/RangedLevelMeter.cs +++ b/Items/Accessories/RangedLevelMeter.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories { diff --git a/Items/Accessories/RareVariants/DeepDiver.cs b/Items/Accessories/RareVariants/DeepDiver.cs index e609efc8a0..3ddf7f64fe 100644 --- a/Items/Accessories/RareVariants/DeepDiver.cs +++ b/Items/Accessories/RareVariants/DeepDiver.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories.RareVariants { diff --git a/Items/Accessories/RareVariants/FabledTortoiseShell.cs b/Items/Accessories/RareVariants/FabledTortoiseShell.cs index c880fb7969..8efd1df641 100644 --- a/Items/Accessories/RareVariants/FabledTortoiseShell.cs +++ b/Items/Accessories/RareVariants/FabledTortoiseShell.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories.RareVariants { diff --git a/Items/Accessories/RareVariants/HideofAstrumDeus.cs b/Items/Accessories/RareVariants/HideofAstrumDeus.cs index 4f5465dd1f..5b43ab7745 100644 --- a/Items/Accessories/RareVariants/HideofAstrumDeus.cs +++ b/Items/Accessories/RareVariants/HideofAstrumDeus.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories.RareVariants { diff --git a/Items/Accessories/RareVariants/Regenator.cs b/Items/Accessories/RareVariants/Regenator.cs index 9c7887fbbc..33f49d5b3c 100644 --- a/Items/Accessories/RareVariants/Regenator.cs +++ b/Items/Accessories/RareVariants/Regenator.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories.RareVariants { diff --git a/Items/Accessories/RareVariants/SamuraiBadge.cs b/Items/Accessories/RareVariants/SamuraiBadge.cs index 1f01c1044b..e228347508 100644 --- a/Items/Accessories/RareVariants/SamuraiBadge.cs +++ b/Items/Accessories/RareVariants/SamuraiBadge.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories.RareVariants { diff --git a/Items/Accessories/RareVariants/TheBee.cs b/Items/Accessories/RareVariants/TheBee.cs index 89600513c8..b6f93bbe16 100644 --- a/Items/Accessories/RareVariants/TheBee.cs +++ b/Items/Accessories/RareVariants/TheBee.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories.RareVariants { diff --git a/Items/Accessories/RareVariants/TheEvolution.cs b/Items/Accessories/RareVariants/TheEvolution.cs index 4d954ec8a1..f190935193 100644 --- a/Items/Accessories/RareVariants/TheEvolution.cs +++ b/Items/Accessories/RareVariants/TheEvolution.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories.RareVariants { diff --git a/Items/Accessories/RareVariants/TheTransformer.cs b/Items/Accessories/RareVariants/TheTransformer.cs index 3a28957cdc..e2e48b4c1e 100644 --- a/Items/Accessories/RareVariants/TheTransformer.cs +++ b/Items/Accessories/RareVariants/TheTransformer.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories.RareVariants { diff --git a/Items/Accessories/RogueLevelMeter.cs b/Items/Accessories/RogueLevelMeter.cs index baaed7885c..dd4d29e092 100644 --- a/Items/Accessories/RogueLevelMeter.cs +++ b/Items/Accessories/RogueLevelMeter.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories { diff --git a/Items/Accessories/SpiritGenerator.cs b/Items/Accessories/SpiritGenerator.cs index 192e2f749e..2422c21c89 100644 --- a/Items/Accessories/SpiritGenerator.cs +++ b/Items/Accessories/SpiritGenerator.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories { diff --git a/Items/Accessories/Sponge.cs b/Items/Accessories/Sponge.cs index 9d686c9735..0a5f0d6238 100644 --- a/Items/Accessories/Sponge.cs +++ b/Items/Accessories/Sponge.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories { diff --git a/Items/Accessories/StatisBeltOfCurses.cs b/Items/Accessories/StatisBeltOfCurses.cs index 0e181d4f8d..e6671cdd6a 100644 --- a/Items/Accessories/StatisBeltOfCurses.cs +++ b/Items/Accessories/StatisBeltOfCurses.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ModLoader; using CalamityMod.Items.CalamityCustomThrowingDamage; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories { diff --git a/Items/Accessories/StatisBlessing.cs b/Items/Accessories/StatisBlessing.cs index 24a9721dca..e486744960 100644 --- a/Items/Accessories/StatisBlessing.cs +++ b/Items/Accessories/StatisBlessing.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories { diff --git a/Items/Accessories/StatisCurse.cs b/Items/Accessories/StatisCurse.cs index 4bb929f8fb..46403ab7b2 100644 --- a/Items/Accessories/StatisCurse.cs +++ b/Items/Accessories/StatisCurse.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories { diff --git a/Items/Accessories/StressPills.cs b/Items/Accessories/StressPills.cs index 68f55effd2..9577e2a2e0 100644 --- a/Items/Accessories/StressPills.cs +++ b/Items/Accessories/StressPills.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories { diff --git a/Items/Accessories/SummonLevelMeter.cs b/Items/Accessories/SummonLevelMeter.cs index d261a99081..b9a39e2ea2 100644 --- a/Items/Accessories/SummonLevelMeter.cs +++ b/Items/Accessories/SummonLevelMeter.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories { diff --git a/Items/Accessories/TheAbsorber.cs b/Items/Accessories/TheAbsorber.cs index a029142bfa..f5e7987468 100644 --- a/Items/Accessories/TheAbsorber.cs +++ b/Items/Accessories/TheAbsorber.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories { diff --git a/Items/Accessories/TheAmalgam.cs b/Items/Accessories/TheAmalgam.cs index 9306469f9f..5b5d82844f 100644 --- a/Items/Accessories/TheAmalgam.cs +++ b/Items/Accessories/TheAmalgam.cs @@ -4,6 +4,7 @@ using Terraria; using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories { diff --git a/Items/Accessories/TheCommunity.cs b/Items/Accessories/TheCommunity.cs index 21d38bbf83..872599f49a 100644 --- a/Items/Accessories/TheCommunity.cs +++ b/Items/Accessories/TheCommunity.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.DataStructures; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories { diff --git a/Items/Accessories/TheFirstShadowflame.cs b/Items/Accessories/TheFirstShadowflame.cs index bea6bc1ca7..40be96e895 100644 --- a/Items/Accessories/TheFirstShadowflame.cs +++ b/Items/Accessories/TheFirstShadowflame.cs @@ -1,5 +1,7 @@ using Terraria; +using Terraria.DataStructures; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories { @@ -11,7 +13,8 @@ namespace CalamityMod.Items.Accessories Tooltip.SetDefault("It is said that in the past, Prometheus descended from the heavens to grant man fire.\n" + "If that were true, then it is surely the demons of hell that would have risen from below to do the same.\n" + "Minions inflict shadowflame on enemy hits."); - } + Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(6, 6)); + } public override void SetDefaults() { diff --git a/Items/Accessories/TheFirstShadowflame.png b/Items/Accessories/TheFirstShadowflame.png index e01bdba740..c56be57372 100644 Binary files a/Items/Accessories/TheFirstShadowflame.png and b/Items/Accessories/TheFirstShadowflame.png differ diff --git a/Items/Accessories/VoidofExtinction.cs b/Items/Accessories/VoidofExtinction.cs index 61160483d0..5600f99c26 100644 --- a/Items/Accessories/VoidofExtinction.cs +++ b/Items/Accessories/VoidofExtinction.cs @@ -3,6 +3,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories { diff --git a/Items/Accessories/WifeinaBottle.cs b/Items/Accessories/WifeinaBottle.cs index 573343b1f0..64851ad195 100644 --- a/Items/Accessories/WifeinaBottle.cs +++ b/Items/Accessories/WifeinaBottle.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories { diff --git a/Items/Accessories/WifeinaBottlewithBoobs.cs b/Items/Accessories/WifeinaBottlewithBoobs.cs index bd00df99b1..e373abbcbc 100644 --- a/Items/Accessories/WifeinaBottlewithBoobs.cs +++ b/Items/Accessories/WifeinaBottlewithBoobs.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories { diff --git a/Items/Accessories/Wings/CelestialTracers.cs b/Items/Accessories/Wings/CelestialTracers.cs index e596d78ea3..39dcf1902a 100644 --- a/Items/Accessories/Wings/CelestialTracers.cs +++ b/Items/Accessories/Wings/CelestialTracers.cs @@ -2,6 +2,7 @@ using Terraria; using Terraria.Graphics.Shaders; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories.Wings { diff --git a/Items/Accessories/Wings/ElysianTracers.cs b/Items/Accessories/Wings/ElysianTracers.cs index 81a356487c..ad7ecdb62e 100644 --- a/Items/Accessories/Wings/ElysianTracers.cs +++ b/Items/Accessories/Wings/ElysianTracers.cs @@ -3,6 +3,7 @@ using Terraria; using Terraria.Graphics.Shaders; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories.Wings { diff --git a/Items/Accessories/Wings/InfinityBoots.cs b/Items/Accessories/Wings/InfinityBoots.cs index 54c885a538..748f383c54 100644 --- a/Items/Accessories/Wings/InfinityBoots.cs +++ b/Items/Accessories/Wings/InfinityBoots.cs @@ -3,6 +3,7 @@ using Terraria; using Terraria.Graphics.Shaders; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories.Wings { diff --git a/Items/Accessories/YharimsInsignia.cs b/Items/Accessories/YharimsInsignia.cs index 690813e1b3..135462afdf 100644 --- a/Items/Accessories/YharimsInsignia.cs +++ b/Items/Accessories/YharimsInsignia.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Accessories { diff --git a/Items/Accessories/YharimsInsignia.png b/Items/Accessories/YharimsInsignia.png index 3eefb92c96..2064208263 100644 Binary files a/Items/Accessories/YharimsInsignia.png and b/Items/Accessories/YharimsInsignia.png differ diff --git a/Items/Amidias/Waywasher.cs b/Items/Amidias/Waywasher.cs index ad45748a60..a306c7737d 100644 --- a/Items/Amidias/Waywasher.cs +++ b/Items/Amidias/Waywasher.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Items.Amidias public override void SetDefaults() { - item.damage = 10; + item.damage = 20; item.magic = true; item.mana = 4; item.width = 30; diff --git a/Items/AquaticScourge/AquaticEmblem.cs b/Items/AquaticScourge/AquaticEmblem.cs index f078de377f..f5af70838d 100644 --- a/Items/AquaticScourge/AquaticEmblem.cs +++ b/Items/AquaticScourge/AquaticEmblem.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.AquaticScourge { diff --git a/Items/AquaticScourge/AquaticScourgeBag.cs b/Items/AquaticScourge/AquaticScourgeBag.cs index 073ea20d4c..59c5b86d3f 100644 --- a/Items/AquaticScourge/AquaticScourgeBag.cs +++ b/Items/AquaticScourge/AquaticScourgeBag.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ModLoader; using Terraria.ID; +using CalamityMod.Utilities; namespace CalamityMod.Items.AquaticScourge { diff --git a/Items/AquaticScourge/Seafood.cs b/Items/AquaticScourge/Seafood.cs index 8501592e73..9036fbaee7 100644 --- a/Items/AquaticScourge/Seafood.cs +++ b/Items/AquaticScourge/Seafood.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.AquaticScourge { diff --git a/Items/Armor/AbyssalDivingSuit.cs b/Items/Armor/AbyssalDivingSuit.cs index fb10f7348c..9078c0fd1b 100644 --- a/Items/Armor/AbyssalDivingSuit.cs +++ b/Items/Armor/AbyssalDivingSuit.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/AerospecHat.cs b/Items/Armor/AerospecHat.cs index 364e6a4405..75e62003be 100644 --- a/Items/Armor/AerospecHat.cs +++ b/Items/Armor/AerospecHat.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/AerospecHeadgear.cs b/Items/Armor/AerospecHeadgear.cs index a2d662c761..5c2c082a3a 100644 --- a/Items/Armor/AerospecHeadgear.cs +++ b/Items/Armor/AerospecHeadgear.cs @@ -2,6 +2,7 @@ using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items.CalamityCustomThrowingDamage; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/AerospecHelm.cs b/Items/Armor/AerospecHelm.cs index 173875afdb..de7ac14778 100644 --- a/Items/Armor/AerospecHelm.cs +++ b/Items/Armor/AerospecHelm.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/AerospecHelmet.cs b/Items/Armor/AerospecHelmet.cs index c62fba9fa9..1dece34ed8 100644 --- a/Items/Armor/AerospecHelmet.cs +++ b/Items/Armor/AerospecHelmet.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/AerospecHood.cs b/Items/Armor/AerospecHood.cs index c747f173ff..79c1a674ec 100644 --- a/Items/Armor/AerospecHood.cs +++ b/Items/Armor/AerospecHood.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/AstralHelm.cs b/Items/Armor/AstralHelm.cs index 09f5fa721a..3df9a7b24a 100644 --- a/Items/Armor/AstralHelm.cs +++ b/Items/Armor/AstralHelm.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/AtaxiaArmor.cs b/Items/Armor/AtaxiaArmor.cs index 5a3e172ab9..35b01cc19e 100644 --- a/Items/Armor/AtaxiaArmor.cs +++ b/Items/Armor/AtaxiaArmor.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/AtaxiaHeadgear.cs b/Items/Armor/AtaxiaHeadgear.cs index 97d32bfb40..6986dfaaed 100644 --- a/Items/Armor/AtaxiaHeadgear.cs +++ b/Items/Armor/AtaxiaHeadgear.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/AtaxiaHelm.cs b/Items/Armor/AtaxiaHelm.cs index 6e9dfd02cd..2f9fe20e1d 100644 --- a/Items/Armor/AtaxiaHelm.cs +++ b/Items/Armor/AtaxiaHelm.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/AtaxiaHelmet.cs b/Items/Armor/AtaxiaHelmet.cs index 98c3c03d74..57443e9155 100644 --- a/Items/Armor/AtaxiaHelmet.cs +++ b/Items/Armor/AtaxiaHelmet.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/AtaxiaHood.cs b/Items/Armor/AtaxiaHood.cs index e8926a6ce6..3002fdac09 100644 --- a/Items/Armor/AtaxiaHood.cs +++ b/Items/Armor/AtaxiaHood.cs @@ -2,6 +2,7 @@ using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items.CalamityCustomThrowingDamage; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/AtaxiaMask.cs b/Items/Armor/AtaxiaMask.cs index 5ad671a8ac..0a0be4ace5 100644 --- a/Items/Armor/AtaxiaMask.cs +++ b/Items/Armor/AtaxiaMask.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/AuricTeslaBodyArmor.cs b/Items/Armor/AuricTeslaBodyArmor.cs index 5d23769700..984d6c68b5 100644 --- a/Items/Armor/AuricTeslaBodyArmor.cs +++ b/Items/Armor/AuricTeslaBodyArmor.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/AuricTeslaCuisses.cs b/Items/Armor/AuricTeslaCuisses.cs index 5c5d77fb65..4ed63c4f3f 100644 --- a/Items/Armor/AuricTeslaCuisses.cs +++ b/Items/Armor/AuricTeslaCuisses.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/AuricTeslaHelm.cs b/Items/Armor/AuricTeslaHelm.cs index 7c50022956..6898b63d2b 100644 --- a/Items/Armor/AuricTeslaHelm.cs +++ b/Items/Armor/AuricTeslaHelm.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/AuricTeslaHoodedFacemask.cs b/Items/Armor/AuricTeslaHoodedFacemask.cs index 844cf13de6..dab6c2ae2c 100644 --- a/Items/Armor/AuricTeslaHoodedFacemask.cs +++ b/Items/Armor/AuricTeslaHoodedFacemask.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/AuricTeslaPlumedHelm.cs b/Items/Armor/AuricTeslaPlumedHelm.cs index d2e7b58039..843706424e 100644 --- a/Items/Armor/AuricTeslaPlumedHelm.cs +++ b/Items/Armor/AuricTeslaPlumedHelm.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ModLoader; using CalamityMod.Items.CalamityCustomThrowingDamage; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/AuricTeslaSpaceHelmet.cs b/Items/Armor/AuricTeslaSpaceHelmet.cs index 14ddacaf92..95d6873666 100644 --- a/Items/Armor/AuricTeslaSpaceHelmet.cs +++ b/Items/Armor/AuricTeslaSpaceHelmet.cs @@ -2,6 +2,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/AuricTeslaWireHemmedVisage.cs b/Items/Armor/AuricTeslaWireHemmedVisage.cs index db351141f2..ea7a4786cf 100644 --- a/Items/Armor/AuricTeslaWireHemmedVisage.cs +++ b/Items/Armor/AuricTeslaWireHemmedVisage.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/BloodflareBodyArmor.cs b/Items/Armor/BloodflareBodyArmor.cs index 3cf50454f6..e837ffa24d 100644 --- a/Items/Armor/BloodflareBodyArmor.cs +++ b/Items/Armor/BloodflareBodyArmor.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/BloodflareCuisses.cs b/Items/Armor/BloodflareCuisses.cs index 274b1fded6..741caab7d4 100644 --- a/Items/Armor/BloodflareCuisses.cs +++ b/Items/Armor/BloodflareCuisses.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/BloodflareHelm.cs b/Items/Armor/BloodflareHelm.cs index 4705efc17f..cf4b106af7 100644 --- a/Items/Armor/BloodflareHelm.cs +++ b/Items/Armor/BloodflareHelm.cs @@ -2,6 +2,7 @@ using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items.CalamityCustomThrowingDamage; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/BloodflareHelmet.cs b/Items/Armor/BloodflareHelmet.cs index 271af96897..ddb548de61 100644 --- a/Items/Armor/BloodflareHelmet.cs +++ b/Items/Armor/BloodflareHelmet.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/BloodflareHornedHelm.cs b/Items/Armor/BloodflareHornedHelm.cs index b2bc4e1ea6..78086df198 100644 --- a/Items/Armor/BloodflareHornedHelm.cs +++ b/Items/Armor/BloodflareHornedHelm.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/BloodflareHornedMask.cs b/Items/Armor/BloodflareHornedMask.cs index 30089ff7cb..bafe82bd24 100644 --- a/Items/Armor/BloodflareHornedMask.cs +++ b/Items/Armor/BloodflareHornedMask.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/BloodflareMask.cs b/Items/Armor/BloodflareMask.cs index 601bccc1fc..042562fdeb 100644 --- a/Items/Armor/BloodflareMask.cs +++ b/Items/Armor/BloodflareMask.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/DaedalusBreastplate.cs b/Items/Armor/DaedalusBreastplate.cs index fb516e5fab..8c7e26187e 100644 --- a/Items/Armor/DaedalusBreastplate.cs +++ b/Items/Armor/DaedalusBreastplate.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/DaedalusHat.cs b/Items/Armor/DaedalusHat.cs index a673899b82..d058801c90 100644 --- a/Items/Armor/DaedalusHat.cs +++ b/Items/Armor/DaedalusHat.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/DaedalusHeadgear.cs b/Items/Armor/DaedalusHeadgear.cs index cfcdffb998..2bc320ec00 100644 --- a/Items/Armor/DaedalusHeadgear.cs +++ b/Items/Armor/DaedalusHeadgear.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/DaedalusHelm.cs b/Items/Armor/DaedalusHelm.cs index c583d8f3c5..0b3a70ae26 100644 --- a/Items/Armor/DaedalusHelm.cs +++ b/Items/Armor/DaedalusHelm.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/DaedalusHelmet.cs b/Items/Armor/DaedalusHelmet.cs index 1acab4eca7..2265a0b7d4 100644 --- a/Items/Armor/DaedalusHelmet.cs +++ b/Items/Armor/DaedalusHelmet.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/DaedalusVisor.cs b/Items/Armor/DaedalusVisor.cs index 28744b58db..559703de7b 100644 --- a/Items/Armor/DaedalusVisor.cs +++ b/Items/Armor/DaedalusVisor.cs @@ -2,6 +2,7 @@ using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items.CalamityCustomThrowingDamage; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/DemonshadeBreastplate.cs b/Items/Armor/DemonshadeBreastplate.cs index 20ba5b785e..cdaaf14ea7 100644 --- a/Items/Armor/DemonshadeBreastplate.cs +++ b/Items/Armor/DemonshadeBreastplate.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/DemonshadeGreaves.cs b/Items/Armor/DemonshadeGreaves.cs index ade65dd0da..46da54db17 100644 --- a/Items/Armor/DemonshadeGreaves.cs +++ b/Items/Armor/DemonshadeGreaves.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/DemonshadeHelm.cs b/Items/Armor/DemonshadeHelm.cs index aa3c07f7b2..c42c55d9f5 100644 --- a/Items/Armor/DemonshadeHelm.cs +++ b/Items/Armor/DemonshadeHelm.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/GodSlayerChestplate.cs b/Items/Armor/GodSlayerChestplate.cs index 1701f60e57..5ce1b8708c 100644 --- a/Items/Armor/GodSlayerChestplate.cs +++ b/Items/Armor/GodSlayerChestplate.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/GodSlayerChestplate.png b/Items/Armor/GodSlayerChestplate.png index d619660b8d..dcd5c62076 100644 Binary files a/Items/Armor/GodSlayerChestplate.png and b/Items/Armor/GodSlayerChestplate.png differ diff --git a/Items/Armor/GodSlayerChestplate_Arms.png b/Items/Armor/GodSlayerChestplate_Arms.png index e23b3c2f64..2837fa66c5 100644 Binary files a/Items/Armor/GodSlayerChestplate_Arms.png and b/Items/Armor/GodSlayerChestplate_Arms.png differ diff --git a/Items/Armor/GodSlayerChestplate_ArmsGlow.png b/Items/Armor/GodSlayerChestplate_ArmsGlow.png new file mode 100644 index 0000000000..016686abd2 Binary files /dev/null and b/Items/Armor/GodSlayerChestplate_ArmsGlow.png differ diff --git a/Items/Armor/GodSlayerChestplate_Body.png b/Items/Armor/GodSlayerChestplate_Body.png index 1c6fa41d7f..473b94f661 100644 Binary files a/Items/Armor/GodSlayerChestplate_Body.png and b/Items/Armor/GodSlayerChestplate_Body.png differ diff --git a/Items/Armor/GodSlayerChestplate_BodyGlow.png b/Items/Armor/GodSlayerChestplate_BodyGlow.png new file mode 100644 index 0000000000..7d158c55ea Binary files /dev/null and b/Items/Armor/GodSlayerChestplate_BodyGlow.png differ diff --git a/Items/Armor/GodSlayerChestplate_FemaleBody.png b/Items/Armor/GodSlayerChestplate_FemaleBody.png index 6760d1eedf..473b94f661 100644 Binary files a/Items/Armor/GodSlayerChestplate_FemaleBody.png and b/Items/Armor/GodSlayerChestplate_FemaleBody.png differ diff --git a/Items/Armor/GodSlayerChestplate_FemaleBodyGlow.png b/Items/Armor/GodSlayerChestplate_FemaleBodyGlow.png new file mode 100644 index 0000000000..7d158c55ea Binary files /dev/null and b/Items/Armor/GodSlayerChestplate_FemaleBodyGlow.png differ diff --git a/Items/Armor/GodSlayerHelm.cs b/Items/Armor/GodSlayerHelm.cs index 6640c36b0b..1cfb8769c5 100644 --- a/Items/Armor/GodSlayerHelm.cs +++ b/Items/Armor/GodSlayerHelm.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/GodSlayerHelm.png b/Items/Armor/GodSlayerHelm.png index b5e5efe216..fbddc410c4 100644 Binary files a/Items/Armor/GodSlayerHelm.png and b/Items/Armor/GodSlayerHelm.png differ diff --git a/Items/Armor/GodSlayerHelm_Head.png b/Items/Armor/GodSlayerHelm_Head.png index ef1a029506..2b2de9c8d4 100644 Binary files a/Items/Armor/GodSlayerHelm_Head.png and b/Items/Armor/GodSlayerHelm_Head.png differ diff --git a/Items/Armor/GodSlayerHelm_HeadGlow.png b/Items/Armor/GodSlayerHelm_HeadGlow.png new file mode 100644 index 0000000000..affdd78d98 Binary files /dev/null and b/Items/Armor/GodSlayerHelm_HeadGlow.png differ diff --git a/Items/Armor/GodSlayerHelmet.cs b/Items/Armor/GodSlayerHelmet.cs index 074df45b64..31d524467e 100644 --- a/Items/Armor/GodSlayerHelmet.cs +++ b/Items/Armor/GodSlayerHelmet.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/GodSlayerHelmet.png b/Items/Armor/GodSlayerHelmet.png index e42a92cbfd..fb9e5c3051 100644 Binary files a/Items/Armor/GodSlayerHelmet.png and b/Items/Armor/GodSlayerHelmet.png differ diff --git a/Items/Armor/GodSlayerHelmet_Head.png b/Items/Armor/GodSlayerHelmet_Head.png index 55b53914b5..dfa011a032 100644 Binary files a/Items/Armor/GodSlayerHelmet_Head.png and b/Items/Armor/GodSlayerHelmet_Head.png differ diff --git a/Items/Armor/GodSlayerHelmet_HeadGlow.png b/Items/Armor/GodSlayerHelmet_HeadGlow.png new file mode 100644 index 0000000000..09ac573e1b Binary files /dev/null and b/Items/Armor/GodSlayerHelmet_HeadGlow.png differ diff --git a/Items/Armor/GodSlayerHornedHelm.cs b/Items/Armor/GodSlayerHornedHelm.cs index 12b36b1bff..bca4600f9f 100644 --- a/Items/Armor/GodSlayerHornedHelm.cs +++ b/Items/Armor/GodSlayerHornedHelm.cs @@ -2,6 +2,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/GodSlayerHornedHelm.png b/Items/Armor/GodSlayerHornedHelm.png index 8f98dc42a1..6e6fb176ed 100644 Binary files a/Items/Armor/GodSlayerHornedHelm.png and b/Items/Armor/GodSlayerHornedHelm.png differ diff --git a/Items/Armor/GodSlayerHornedHelm_Head.png b/Items/Armor/GodSlayerHornedHelm_Head.png index bb6e60caf0..9a2f6fe9c2 100644 Binary files a/Items/Armor/GodSlayerHornedHelm_Head.png and b/Items/Armor/GodSlayerHornedHelm_Head.png differ diff --git a/Items/Armor/GodSlayerHornedHelm_HeadGlow.png b/Items/Armor/GodSlayerHornedHelm_HeadGlow.png new file mode 100644 index 0000000000..d438393811 Binary files /dev/null and b/Items/Armor/GodSlayerHornedHelm_HeadGlow.png differ diff --git a/Items/Armor/GodSlayerLeggings.cs b/Items/Armor/GodSlayerLeggings.cs index ca4258b2ba..b9203a8c72 100644 --- a/Items/Armor/GodSlayerLeggings.cs +++ b/Items/Armor/GodSlayerLeggings.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/GodSlayerLeggings.png b/Items/Armor/GodSlayerLeggings.png index db62fff671..de6e34656b 100644 Binary files a/Items/Armor/GodSlayerLeggings.png and b/Items/Armor/GodSlayerLeggings.png differ diff --git a/Items/Armor/GodSlayerLeggings_Legs.png b/Items/Armor/GodSlayerLeggings_Legs.png index f9bb8eed2a..90a3d226a9 100644 Binary files a/Items/Armor/GodSlayerLeggings_Legs.png and b/Items/Armor/GodSlayerLeggings_Legs.png differ diff --git a/Items/Armor/GodSlayerLeggings_LegsGlow.png b/Items/Armor/GodSlayerLeggings_LegsGlow.png new file mode 100644 index 0000000000..2e037c58ea Binary files /dev/null and b/Items/Armor/GodSlayerLeggings_LegsGlow.png differ diff --git a/Items/Armor/GodSlayerMask.cs b/Items/Armor/GodSlayerMask.cs index b5029c121a..3ae63eeebc 100644 --- a/Items/Armor/GodSlayerMask.cs +++ b/Items/Armor/GodSlayerMask.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ModLoader; using CalamityMod.Items.CalamityCustomThrowingDamage; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/GodSlayerMask.png b/Items/Armor/GodSlayerMask.png index da5a1986d1..5fb5feb4e5 100644 Binary files a/Items/Armor/GodSlayerMask.png and b/Items/Armor/GodSlayerMask.png differ diff --git a/Items/Armor/GodSlayerMask_Head.png b/Items/Armor/GodSlayerMask_Head.png index c720a99ea9..9767ee6595 100644 Binary files a/Items/Armor/GodSlayerMask_Head.png and b/Items/Armor/GodSlayerMask_Head.png differ diff --git a/Items/Armor/GodSlayerMask_HeadGlow.png b/Items/Armor/GodSlayerMask_HeadGlow.png new file mode 100644 index 0000000000..fb853d27e6 Binary files /dev/null and b/Items/Armor/GodSlayerMask_HeadGlow.png differ diff --git a/Items/Armor/GodSlayerVisage.cs b/Items/Armor/GodSlayerVisage.cs index 3b32b4c287..833ed5f6a4 100644 --- a/Items/Armor/GodSlayerVisage.cs +++ b/Items/Armor/GodSlayerVisage.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/GodSlayerVisage.png b/Items/Armor/GodSlayerVisage.png index 941e7d35f8..0ced212d55 100644 Binary files a/Items/Armor/GodSlayerVisage.png and b/Items/Armor/GodSlayerVisage.png differ diff --git a/Items/Armor/GodSlayerVisage_Head.png b/Items/Armor/GodSlayerVisage_Head.png index 5debb668c8..fc078c2b9f 100644 Binary files a/Items/Armor/GodSlayerVisage_Head.png and b/Items/Armor/GodSlayerVisage_Head.png differ diff --git a/Items/Armor/GodSlayerVisage_HeadGlow.png b/Items/Armor/GodSlayerVisage_HeadGlow.png new file mode 100644 index 0000000000..9eaa34a449 Binary files /dev/null and b/Items/Armor/GodSlayerVisage_HeadGlow.png differ diff --git a/Items/Armor/MolluskShelleggings.cs b/Items/Armor/MolluskShelleggings.cs index cd39a3cb58..9f5bd982a5 100644 --- a/Items/Armor/MolluskShelleggings.cs +++ b/Items/Armor/MolluskShelleggings.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/MolluskShellmet.cs b/Items/Armor/MolluskShellmet.cs index 55d4398c48..04be0b63d1 100644 --- a/Items/Armor/MolluskShellmet.cs +++ b/Items/Armor/MolluskShellmet.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/MolluskShellplate.cs b/Items/Armor/MolluskShellplate.cs index 13931147f6..7cafcd3d6c 100644 --- a/Items/Armor/MolluskShellplate.cs +++ b/Items/Armor/MolluskShellplate.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/OmegaBlueChestplate.cs b/Items/Armor/OmegaBlueChestplate.cs index 85a82a3356..47d84d779d 100644 --- a/Items/Armor/OmegaBlueChestplate.cs +++ b/Items/Armor/OmegaBlueChestplate.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/OmegaBlueHelmet.cs b/Items/Armor/OmegaBlueHelmet.cs index 9055c66151..f10fd8d2c7 100644 --- a/Items/Armor/OmegaBlueHelmet.cs +++ b/Items/Armor/OmegaBlueHelmet.cs @@ -2,6 +2,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/OmegaBlueLeggings.cs b/Items/Armor/OmegaBlueLeggings.cs index fac1aab006..b5dc037c5a 100644 --- a/Items/Armor/OmegaBlueLeggings.cs +++ b/Items/Armor/OmegaBlueLeggings.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/ReaverCap.cs b/Items/Armor/ReaverCap.cs index ec2f4809d3..e67f1a53be 100644 --- a/Items/Armor/ReaverCap.cs +++ b/Items/Armor/ReaverCap.cs @@ -2,6 +2,7 @@ using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items.CalamityCustomThrowingDamage; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/ReaverHelm.cs b/Items/Armor/ReaverHelm.cs index 073f9a910f..ff64cf0996 100644 --- a/Items/Armor/ReaverHelm.cs +++ b/Items/Armor/ReaverHelm.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/ReaverHelmet.cs b/Items/Armor/ReaverHelmet.cs index 166ee34361..8480f5f83d 100644 --- a/Items/Armor/ReaverHelmet.cs +++ b/Items/Armor/ReaverHelmet.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/ReaverMask.cs b/Items/Armor/ReaverMask.cs index 35a37254d2..10cbff9e2e 100644 --- a/Items/Armor/ReaverMask.cs +++ b/Items/Armor/ReaverMask.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/ReaverScaleMail.cs b/Items/Armor/ReaverScaleMail.cs index 92ec22c878..ba76570558 100644 --- a/Items/Armor/ReaverScaleMail.cs +++ b/Items/Armor/ReaverScaleMail.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/ReaverVisage.cs b/Items/Armor/ReaverVisage.cs index c53116e8a8..654e117294 100644 --- a/Items/Armor/ReaverVisage.cs +++ b/Items/Armor/ReaverVisage.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/ShroomiteVisage.cs b/Items/Armor/ShroomiteVisage.cs index 2f963eb211..0255ca9276 100644 --- a/Items/Armor/ShroomiteVisage.cs +++ b/Items/Armor/ShroomiteVisage.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/SilvaArmor.cs b/Items/Armor/SilvaArmor.cs index b53c2e2a95..9cd9f56fd7 100644 --- a/Items/Armor/SilvaArmor.cs +++ b/Items/Armor/SilvaArmor.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/SilvaHelm.cs b/Items/Armor/SilvaHelm.cs index e51413ddcd..7ff7eedf15 100644 --- a/Items/Armor/SilvaHelm.cs +++ b/Items/Armor/SilvaHelm.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/SilvaHelmet.cs b/Items/Armor/SilvaHelmet.cs index bbeb94465d..4bee91767c 100644 --- a/Items/Armor/SilvaHelmet.cs +++ b/Items/Armor/SilvaHelmet.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/SilvaHornedHelm.cs b/Items/Armor/SilvaHornedHelm.cs index 21b2ed0bc6..4671e8151f 100644 --- a/Items/Armor/SilvaHornedHelm.cs +++ b/Items/Armor/SilvaHornedHelm.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/SilvaLeggings.cs b/Items/Armor/SilvaLeggings.cs index 8a232279ac..569ae54d2b 100644 --- a/Items/Armor/SilvaLeggings.cs +++ b/Items/Armor/SilvaLeggings.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/SilvaMask.cs b/Items/Armor/SilvaMask.cs index e3d67d4377..8784decbfc 100644 --- a/Items/Armor/SilvaMask.cs +++ b/Items/Armor/SilvaMask.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ModLoader; using CalamityMod.Items.CalamityCustomThrowingDamage; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/SilvaMaskedCap.cs b/Items/Armor/SilvaMaskedCap.cs index d94690e562..a3a243ad15 100644 --- a/Items/Armor/SilvaMaskedCap.cs +++ b/Items/Armor/SilvaMaskedCap.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/SirensHeart.cs b/Items/Armor/SirensHeart.cs index 4ee9b40faa..47ece8a84e 100644 --- a/Items/Armor/SirensHeart.cs +++ b/Items/Armor/SirensHeart.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/SirensHeartAlt.cs b/Items/Armor/SirensHeartAlt.cs index b31d2d60a5..e8e6ea883f 100644 --- a/Items/Armor/SirensHeartAlt.cs +++ b/Items/Armor/SirensHeartAlt.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/StatigelCap.cs b/Items/Armor/StatigelCap.cs index 8f214eacea..e83ce6fcac 100644 --- a/Items/Armor/StatigelCap.cs +++ b/Items/Armor/StatigelCap.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/StatigelHeadgear.cs b/Items/Armor/StatigelHeadgear.cs index 480b89c43f..dbbdb62116 100644 --- a/Items/Armor/StatigelHeadgear.cs +++ b/Items/Armor/StatigelHeadgear.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/StatigelHelm.cs b/Items/Armor/StatigelHelm.cs index 6e8c5c72d4..f7d9ad9b34 100644 --- a/Items/Armor/StatigelHelm.cs +++ b/Items/Armor/StatigelHelm.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/StatigelHood.cs b/Items/Armor/StatigelHood.cs index 678e93308a..e91fef0f5e 100644 --- a/Items/Armor/StatigelHood.cs +++ b/Items/Armor/StatigelHood.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/StatigelMask.cs b/Items/Armor/StatigelMask.cs index f9f27e1351..12fd9955c0 100644 --- a/Items/Armor/StatigelMask.cs +++ b/Items/Armor/StatigelMask.cs @@ -2,6 +2,7 @@ using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items.CalamityCustomThrowingDamage; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/TarragonBreastplate.cs b/Items/Armor/TarragonBreastplate.cs index 6a1602f693..3a03577846 100644 --- a/Items/Armor/TarragonBreastplate.cs +++ b/Items/Armor/TarragonBreastplate.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/TarragonHelm.cs b/Items/Armor/TarragonHelm.cs index 498e5fb46a..f5c8bf5348 100644 --- a/Items/Armor/TarragonHelm.cs +++ b/Items/Armor/TarragonHelm.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/TarragonHelmet.cs b/Items/Armor/TarragonHelmet.cs index cdb80941de..060bb50192 100644 --- a/Items/Armor/TarragonHelmet.cs +++ b/Items/Armor/TarragonHelmet.cs @@ -2,6 +2,7 @@ using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items.CalamityCustomThrowingDamage; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/TarragonHornedHelm.cs b/Items/Armor/TarragonHornedHelm.cs index 18a7a2b4b8..011e2be5a5 100644 --- a/Items/Armor/TarragonHornedHelm.cs +++ b/Items/Armor/TarragonHornedHelm.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/TarragonLeggings.cs b/Items/Armor/TarragonLeggings.cs index 8be150fbe6..95abcacf1e 100644 --- a/Items/Armor/TarragonLeggings.cs +++ b/Items/Armor/TarragonLeggings.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/TarragonMask.cs b/Items/Armor/TarragonMask.cs index c017d1849d..6d926879e8 100644 --- a/Items/Armor/TarragonMask.cs +++ b/Items/Armor/TarragonMask.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/TarragonVisage.cs b/Items/Armor/TarragonVisage.cs index 5aa215f505..a8ce5f598d 100644 --- a/Items/Armor/TarragonVisage.cs +++ b/Items/Armor/TarragonVisage.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/VictideHeadgear.cs b/Items/Armor/VictideHeadgear.cs index c75b26cb03..9b92a3295e 100644 --- a/Items/Armor/VictideHeadgear.cs +++ b/Items/Armor/VictideHeadgear.cs @@ -2,6 +2,7 @@ using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items.CalamityCustomThrowingDamage; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/VictideHelm.cs b/Items/Armor/VictideHelm.cs index ef78842933..f58b79bdd7 100644 --- a/Items/Armor/VictideHelm.cs +++ b/Items/Armor/VictideHelm.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/VictideHelmet.cs b/Items/Armor/VictideHelmet.cs index 4916218f75..73881d9e1f 100644 --- a/Items/Armor/VictideHelmet.cs +++ b/Items/Armor/VictideHelmet.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/VictideMask.cs b/Items/Armor/VictideMask.cs index 143031e216..b970b98845 100644 --- a/Items/Armor/VictideMask.cs +++ b/Items/Armor/VictideMask.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/VictideVisage.cs b/Items/Armor/VictideVisage.cs index 1ae0de8e9b..c40046c950 100644 --- a/Items/Armor/VictideVisage.cs +++ b/Items/Armor/VictideVisage.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Armor/XerocMask.cs b/Items/Armor/XerocMask.cs index d354887f64..60cfe8b919 100644 --- a/Items/Armor/XerocMask.cs +++ b/Items/Armor/XerocMask.cs @@ -2,6 +2,7 @@ using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Items.CalamityCustomThrowingDamage; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Armor { diff --git a/Items/Astrageldon/AstrageldonBag.cs b/Items/Astrageldon/AstrageldonBag.cs index c3fd659658..93e43fc0be 100644 --- a/Items/Astrageldon/AstrageldonBag.cs +++ b/Items/Astrageldon/AstrageldonBag.cs @@ -2,6 +2,7 @@ using Terraria; using Terraria.ModLoader; using Terraria.ID; using CalamityMod.World; +using CalamityMod.Utilities; namespace CalamityMod.Items.Astrageldon { diff --git a/Items/AstrumDeus/AstrumDeusBag.cs b/Items/AstrumDeus/AstrumDeusBag.cs index cf964e3728..9e03ce3939 100644 --- a/Items/AstrumDeus/AstrumDeusBag.cs +++ b/Items/AstrumDeus/AstrumDeusBag.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.Utilities; namespace CalamityMod.Items.AstrumDeus { diff --git a/Items/BrimstoneWaifu/Abaddon.png b/Items/BrimstoneWaifu/Abaddon.png index ca24f6874e..8df422bc95 100644 Binary files a/Items/BrimstoneWaifu/Abaddon.png and b/Items/BrimstoneWaifu/Abaddon.png differ diff --git a/Items/BrimstoneWaifu/BrimstoneWaifuBag.cs b/Items/BrimstoneWaifu/BrimstoneWaifuBag.cs index 4ee97df3da..740d676363 100644 --- a/Items/BrimstoneWaifu/BrimstoneWaifuBag.cs +++ b/Items/BrimstoneWaifu/BrimstoneWaifuBag.cs @@ -2,6 +2,7 @@ using Terraria; using Terraria.ModLoader; using Terraria.ID; using CalamityMod.World; +using CalamityMod.Utilities; namespace CalamityMod.Items.BrimstoneWaifu { diff --git a/Items/BrimstoneWaifu/CharredIdol.cs b/Items/BrimstoneWaifu/CharredIdol.cs index ef5c3dfc1b..48ed903af8 100644 --- a/Items/BrimstoneWaifu/CharredIdol.cs +++ b/Items/BrimstoneWaifu/CharredIdol.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.BrimstoneWaifu { diff --git a/Items/BrimstoneWaifu/RoseStone.cs b/Items/BrimstoneWaifu/RoseStone.cs index 01f106938d..ad5c901f6a 100644 --- a/Items/BrimstoneWaifu/RoseStone.cs +++ b/Items/BrimstoneWaifu/RoseStone.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.BrimstoneWaifu { diff --git a/Items/BrimstoneWaifu/RoseStone.png b/Items/BrimstoneWaifu/RoseStone.png index e9c3023762..6f5a65aaaa 100644 Binary files a/Items/BrimstoneWaifu/RoseStone.png and b/Items/BrimstoneWaifu/RoseStone.png differ diff --git a/Items/Bumblefuck/BumblebirbBag.cs b/Items/Bumblefuck/BumblebirbBag.cs index a93a1eaf6e..be0bc8658b 100644 --- a/Items/Bumblefuck/BumblebirbBag.cs +++ b/Items/Bumblefuck/BumblebirbBag.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.Utilities; namespace CalamityMod.Items.Bumblefuck { diff --git a/Items/Calamitas/CalamitasBag.cs b/Items/Calamitas/CalamitasBag.cs index 7f966e69b8..28ef970149 100644 --- a/Items/Calamitas/CalamitasBag.cs +++ b/Items/Calamitas/CalamitasBag.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.Utilities; namespace CalamityMod.Items.Calamitas { diff --git a/Items/Calamitas/CalamityRing.cs b/Items/Calamitas/CalamityRing.cs index b5b6995a95..843e8e6160 100644 --- a/Items/Calamitas/CalamityRing.cs +++ b/Items/Calamitas/CalamityRing.cs @@ -2,6 +2,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Calamitas { diff --git a/Items/CalamityCustomThrowingDamage/AdamantiteThrowingAxe.png b/Items/CalamityCustomThrowingDamage/AdamantiteThrowingAxe.png index e11702e145..73b826eb7e 100644 Binary files a/Items/CalamityCustomThrowingDamage/AdamantiteThrowingAxe.png and b/Items/CalamityCustomThrowingDamage/AdamantiteThrowingAxe.png differ diff --git a/Items/CalamityCustomThrowingDamage/CalamityDamageItem.cs b/Items/CalamityCustomThrowingDamage/CalamityDamageItem.cs index 05adb7b5b3..64604c4215 100644 --- a/Items/CalamityCustomThrowingDamage/CalamityDamageItem.cs +++ b/Items/CalamityCustomThrowingDamage/CalamityDamageItem.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Linq; using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.CalamityCustomThrowingDamage { diff --git a/Items/CalamityCustomThrowingDamage/CobaltKunai.png b/Items/CalamityCustomThrowingDamage/CobaltKunai.png index 60efb60324..01aeb2d044 100644 Binary files a/Items/CalamityCustomThrowingDamage/CobaltKunai.png and b/Items/CalamityCustomThrowingDamage/CobaltKunai.png differ diff --git a/Items/CalamityCustomThrowingDamage/HeavenfallenStardisk.png b/Items/CalamityCustomThrowingDamage/HeavenfallenStardisk.png index beedd16af7..b97b3655fd 100644 Binary files a/Items/CalamityCustomThrowingDamage/HeavenfallenStardisk.png and b/Items/CalamityCustomThrowingDamage/HeavenfallenStardisk.png differ diff --git a/Items/CalamityCustomThrowingDamage/MythrilKnife.png b/Items/CalamityCustomThrowingDamage/MythrilKnife.png index 8ff7d5aede..628e080fa1 100644 Binary files a/Items/CalamityCustomThrowingDamage/MythrilKnife.png and b/Items/CalamityCustomThrowingDamage/MythrilKnife.png differ diff --git a/Items/CalamityCustomThrowingDamage/OrichalcumSpikedGemstone.png b/Items/CalamityCustomThrowingDamage/OrichalcumSpikedGemstone.png index 7f94126948..3868486806 100644 Binary files a/Items/CalamityCustomThrowingDamage/OrichalcumSpikedGemstone.png and b/Items/CalamityCustomThrowingDamage/OrichalcumSpikedGemstone.png differ diff --git a/Items/CalamityCustomThrowingDamage/PalladiumJavelin.png b/Items/CalamityCustomThrowingDamage/PalladiumJavelin.png index 6d94f8c580..1eded3636f 100644 Binary files a/Items/CalamityCustomThrowingDamage/PalladiumJavelin.png and b/Items/CalamityCustomThrowingDamage/PalladiumJavelin.png differ diff --git a/Items/CalamityCustomThrowingDamage/TitaniumShuriken.png b/Items/CalamityCustomThrowingDamage/TitaniumShuriken.png index e3f185f3c3..91b3bddea8 100644 Binary files a/Items/CalamityCustomThrowingDamage/TitaniumShuriken.png and b/Items/CalamityCustomThrowingDamage/TitaniumShuriken.png differ diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index a45451668b..1c4c7aadee 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -9,6 +9,8 @@ using Terraria.ModLoader; using Terraria.ModLoader.IO; using CalamityMod.Items.CalamityCustomThrowingDamage; using CalamityMod.World; +using CalamityMod.CalPlayer; +using CalamityMod.Utilities; namespace CalamityMod.Items { @@ -1430,7 +1432,7 @@ namespace CalamityMod.Items { if (line2.mod == "Terraria" && line2.Name == "PrefixAccCritChance") { - line2.text = "+2% critical strike chance"; + line2.text = "+3% critical strike chance"; } } } @@ -1808,22 +1810,14 @@ namespace CalamityMod.Items if (item.prefix == 65) player.endurance += 0.01f; - // Precise only gives 1% crit - if (item.prefix == 67) + // Precise only gives 1% crit and Lucky only gives 3% crit + if (item.prefix == 67 || item.prefix == 68) { - player.meleeCrit -= 1; + player.meleeCrit -= 1; player.rangedCrit -= 1; player.magicCrit -= 1; - CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 1; - } - - // Lucky only gives 2% crit - if (item.prefix == 68) - { - player.meleeCrit -= 2; - player.rangedCrit -= 2; - player.magicCrit -= 2; - CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += 2; + player.thrownCrit -= 1; + CalamityCustomThrowingDamagePlayer.ModPlayer(player).throwingCrit += (item.prefix == 68 ? 3 : 1); } } #endregion diff --git a/Items/Crabulon/CrabulonBag.cs b/Items/Crabulon/CrabulonBag.cs index e226e489f6..2dc64b9925 100644 --- a/Items/Crabulon/CrabulonBag.cs +++ b/Items/Crabulon/CrabulonBag.cs @@ -2,6 +2,7 @@ using Terraria; using Terraria.ModLoader; using Terraria.ID; using CalamityMod.World; +using CalamityMod.Utilities; namespace CalamityMod.Items.Crabulon { diff --git a/Items/Crabulon/FungalClump.cs b/Items/Crabulon/FungalClump.cs index f4709f078a..0613f10bbe 100644 --- a/Items/Crabulon/FungalClump.cs +++ b/Items/Crabulon/FungalClump.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Crabulon { diff --git a/Items/Cryogen/CryogenBag.cs b/Items/Cryogen/CryogenBag.cs index b5067c5ba7..2e0ad73e17 100644 --- a/Items/Cryogen/CryogenBag.cs +++ b/Items/Cryogen/CryogenBag.cs @@ -2,6 +2,7 @@ using Terraria; using Terraria.ModLoader; using Terraria.ID; using CalamityMod.World; +using CalamityMod.Utilities; namespace CalamityMod.Items.Cryogen { diff --git a/Items/Cryogen/SoulofCryogen.cs b/Items/Cryogen/SoulofCryogen.cs index 9db53ecfc5..d0ba74a2dc 100644 --- a/Items/Cryogen/SoulofCryogen.cs +++ b/Items/Cryogen/SoulofCryogen.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.DataStructures; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Cryogen { diff --git a/Items/DesertScourge/AeroStone.cs b/Items/DesertScourge/AeroStone.cs index d3981d2bb6..ee1e77df24 100644 --- a/Items/DesertScourge/AeroStone.cs +++ b/Items/DesertScourge/AeroStone.cs @@ -26,7 +26,6 @@ namespace CalamityMod.Items.DesertScourge public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityCustomThrowingDamagePlayer modPlayer = CalamityCustomThrowingDamagePlayer.ModPlayer(player); Lighting.AddLight((int)player.Center.X / 16, (int)player.Center.Y / 16, 0f, 0.425f, 0.425f); player.moveSpeed += 0.1f; player.jumpSpeedBoost += (player.autoJump ? 0.25f : 1.0f); diff --git a/Items/DesertScourge/DesertScourgeBag.cs b/Items/DesertScourge/DesertScourgeBag.cs index a7361baf25..2fe7dd1080 100644 --- a/Items/DesertScourge/DesertScourgeBag.cs +++ b/Items/DesertScourge/DesertScourgeBag.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ModLoader; using Terraria.ID; +using CalamityMod.Utilities; namespace CalamityMod.Items.DesertScourge { diff --git a/Items/DifficultyItems/DefiledRune.png b/Items/DifficultyItems/DefiledRune.png index 57f505d468..b4128633bd 100644 Binary files a/Items/DifficultyItems/DefiledRune.png and b/Items/DifficultyItems/DefiledRune.png differ diff --git a/Items/DifficultyItems/IronHeart.cs b/Items/DifficultyItems/IronHeart.cs index 1b46e50e50..5b7827d4b2 100644 --- a/Items/DifficultyItems/IronHeart.cs +++ b/Items/DifficultyItems/IronHeart.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.DifficultyItems public override bool CanUseItem(Player player) { - if (CalamityWorld.downedBossAny) + if (CalamityWorld.downedBossAny) { return false; } diff --git a/Items/DifficultyItems/MLGRune.cs b/Items/DifficultyItems/MLGRune.cs index 9ac4952341..158d0dd329 100644 --- a/Items/DifficultyItems/MLGRune.cs +++ b/Items/DifficultyItems/MLGRune.cs @@ -30,6 +30,7 @@ namespace CalamityMod.Items.DifficultyItems public override bool UseItem(Player player) { CalamityWorld.demonMode = true; + CalamityMod.UpdateServerBoolean(); return true; } } diff --git a/Items/HiveMind/HiveMindBag.cs b/Items/HiveMind/HiveMindBag.cs index d7efcc5037..ca65bb3f2b 100644 --- a/Items/HiveMind/HiveMindBag.cs +++ b/Items/HiveMind/HiveMindBag.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ModLoader; using Terraria.ID; +using CalamityMod.Utilities; namespace CalamityMod.Items.HiveMind { diff --git a/Items/HiveMind/RottenBrain.cs b/Items/HiveMind/RottenBrain.cs index 70924abc4f..518af3684c 100644 --- a/Items/HiveMind/RottenBrain.cs +++ b/Items/HiveMind/RottenBrain.cs @@ -2,6 +2,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.HiveMind { diff --git a/Items/Leviathan/LeviathanBag.cs b/Items/Leviathan/LeviathanBag.cs index fe8655f63c..271db07c08 100644 --- a/Items/Leviathan/LeviathanBag.cs +++ b/Items/Leviathan/LeviathanBag.cs @@ -2,6 +2,7 @@ using Terraria; using Terraria.ModLoader; using Terraria.ID; using CalamityMod.World; +using CalamityMod.Utilities; namespace CalamityMod.Items.Leviathan { diff --git a/Items/LoreItems/Knowledge27.cs b/Items/LoreItems/KnowledgeAquaticScourge.cs similarity index 92% rename from Items/LoreItems/Knowledge27.cs rename to Items/LoreItems/KnowledgeAquaticScourge.cs index 6eaf981c9b..c0958c43a3 100644 --- a/Items/LoreItems/Knowledge27.cs +++ b/Items/LoreItems/KnowledgeAquaticScourge.cs @@ -1,9 +1,10 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.LoreItems { - public class Knowledge27 : ModItem + public class KnowledgeAquaticScourge : ModItem { public override void SetStaticDefaults() { diff --git a/Items/LoreItems/Knowledge10.png b/Items/LoreItems/KnowledgeAquaticScourge.png similarity index 100% rename from Items/LoreItems/Knowledge10.png rename to Items/LoreItems/KnowledgeAquaticScourge.png diff --git a/Items/LoreItems/Knowledge36.cs b/Items/LoreItems/KnowledgeAstralInfection.cs similarity index 84% rename from Items/LoreItems/Knowledge36.cs rename to Items/LoreItems/KnowledgeAstralInfection.cs index 5532b887d7..ac4879d58d 100644 --- a/Items/LoreItems/Knowledge36.cs +++ b/Items/LoreItems/KnowledgeAstralInfection.cs @@ -3,11 +3,11 @@ using Terraria.ModLoader; namespace CalamityMod.Items.LoreItems { - public class Knowledge36 : ModItem + public class KnowledgeAstralInfection : ModItem { public override void SetStaticDefaults() { - DisplayName.SetDefault("Astral Biome"); + DisplayName.SetDefault("Astral Infection"); Tooltip.SetDefault("This twisted dreamscape, surrounded by unnatural pillars under a dark and hazy sky.\n" + "Natural law has been upturned. What will you make of it?"); } diff --git a/Items/LoreItems/Knowledge.png b/Items/LoreItems/KnowledgeAstralInfection.png similarity index 100% rename from Items/LoreItems/Knowledge.png rename to Items/LoreItems/KnowledgeAstralInfection.png diff --git a/Items/LoreItems/Knowledge30.cs b/Items/LoreItems/KnowledgeAstrumAureus.cs similarity index 91% rename from Items/LoreItems/Knowledge30.cs rename to Items/LoreItems/KnowledgeAstrumAureus.cs index 67dd417956..948a5ce4d9 100644 --- a/Items/LoreItems/Knowledge30.cs +++ b/Items/LoreItems/KnowledgeAstrumAureus.cs @@ -1,9 +1,10 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.LoreItems { - public class Knowledge30 : ModItem + public class KnowledgeAstrumAureus : ModItem { public override void SetStaticDefaults() { diff --git a/Items/LoreItems/Knowledge13.png b/Items/LoreItems/KnowledgeAstrumAureus.png similarity index 100% rename from Items/LoreItems/Knowledge13.png rename to Items/LoreItems/KnowledgeAstrumAureus.png diff --git a/Items/LoreItems/Knowledge29.cs b/Items/LoreItems/KnowledgeAstrumDeus.cs similarity index 92% rename from Items/LoreItems/Knowledge29.cs rename to Items/LoreItems/KnowledgeAstrumDeus.cs index 72118a8f14..857bb502ee 100644 --- a/Items/LoreItems/Knowledge29.cs +++ b/Items/LoreItems/KnowledgeAstrumDeus.cs @@ -1,9 +1,10 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.LoreItems { - public class Knowledge29 : ModItem + public class KnowledgeAstrumDeus : ModItem { public override void SetStaticDefaults() { diff --git a/Items/LoreItems/Knowledge12.png b/Items/LoreItems/KnowledgeAstrumDeus.png similarity index 100% rename from Items/LoreItems/Knowledge12.png rename to Items/LoreItems/KnowledgeAstrumDeus.png diff --git a/Items/LoreItems/Knowledge34.cs b/Items/LoreItems/KnowledgeBloodMoon.cs similarity index 92% rename from Items/LoreItems/Knowledge34.cs rename to Items/LoreItems/KnowledgeBloodMoon.cs index 21fafb18ef..fccb48555d 100644 --- a/Items/LoreItems/Knowledge34.cs +++ b/Items/LoreItems/KnowledgeBloodMoon.cs @@ -3,7 +3,7 @@ using Terraria.ModLoader; namespace CalamityMod.Items.LoreItems { - public class Knowledge34 : ModItem + public class KnowledgeBloodMoon : ModItem { public override void SetStaticDefaults() { diff --git a/Items/LoreItems/Knowledge17.png b/Items/LoreItems/KnowledgeBloodMoon.png similarity index 100% rename from Items/LoreItems/Knowledge17.png rename to Items/LoreItems/KnowledgeBloodMoon.png diff --git a/Items/LoreItems/Knowledge11.cs b/Items/LoreItems/KnowledgeBrainofCthulhu.cs similarity index 98% rename from Items/LoreItems/Knowledge11.cs rename to Items/LoreItems/KnowledgeBrainofCthulhu.cs index 700ce5abf2..329f6eb07b 100644 --- a/Items/LoreItems/Knowledge11.cs +++ b/Items/LoreItems/KnowledgeBrainofCthulhu.cs @@ -6,7 +6,7 @@ using Terraria.ModLoader; namespace CalamityMod.Items.LoreItems { - public class Knowledge11 : ModItem + public class KnowledgeBrainofCthulhu : ModItem { public override void SetStaticDefaults() { diff --git a/Items/LoreItems/Knowledge11.png b/Items/LoreItems/KnowledgeBrainofCthulhu.png similarity index 100% rename from Items/LoreItems/Knowledge11.png rename to Items/LoreItems/KnowledgeBrainofCthulhu.png diff --git a/Items/LoreItems/Knowledge6.cs b/Items/LoreItems/KnowledgeBrimstoneCrag.cs similarity index 91% rename from Items/LoreItems/Knowledge6.cs rename to Items/LoreItems/KnowledgeBrimstoneCrag.cs index 04ab380b62..eff6f87b0b 100644 --- a/Items/LoreItems/Knowledge6.cs +++ b/Items/LoreItems/KnowledgeBrimstoneCrag.cs @@ -3,7 +3,7 @@ using Terraria.ModLoader; namespace CalamityMod.Items.LoreItems { - public class Knowledge6 : ModItem + public class KnowledgeBrimstoneCrag : ModItem { public override void SetStaticDefaults() { diff --git a/Items/LoreItems/Knowledge14.png b/Items/LoreItems/KnowledgeBrimstoneCrag.png similarity index 100% rename from Items/LoreItems/Knowledge14.png rename to Items/LoreItems/KnowledgeBrimstoneCrag.png diff --git a/Items/LoreItems/Knowledge26.cs b/Items/LoreItems/KnowledgeBrimstoneElemental.cs similarity index 91% rename from Items/LoreItems/Knowledge26.cs rename to Items/LoreItems/KnowledgeBrimstoneElemental.cs index 0fba2dd46f..c222ed60ac 100644 --- a/Items/LoreItems/Knowledge26.cs +++ b/Items/LoreItems/KnowledgeBrimstoneElemental.cs @@ -1,9 +1,10 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.LoreItems { - public class Knowledge26 : ModItem + public class KnowledgeBrimstoneElemental : ModItem { public override void SetStaticDefaults() { diff --git a/Items/LoreItems/Knowledge21.png b/Items/LoreItems/KnowledgeBrimstoneElemental.png similarity index 100% rename from Items/LoreItems/Knowledge21.png rename to Items/LoreItems/KnowledgeBrimstoneElemental.png diff --git a/Items/LoreItems/Knowledge43.cs b/Items/LoreItems/KnowledgeBumblebirb.cs similarity index 94% rename from Items/LoreItems/Knowledge43.cs rename to Items/LoreItems/KnowledgeBumblebirb.cs index ca7270856d..4430ecd6cd 100644 --- a/Items/LoreItems/Knowledge43.cs +++ b/Items/LoreItems/KnowledgeBumblebirb.cs @@ -3,7 +3,7 @@ using Terraria.ModLoader; namespace CalamityMod.Items.LoreItems { - public class Knowledge43 : ModItem + public class KnowledgeBumblebirb : ModItem { public override void SetStaticDefaults() { diff --git a/Items/LoreItems/Knowledge15.png b/Items/LoreItems/KnowledgeBumblebirb.png similarity index 100% rename from Items/LoreItems/Knowledge15.png rename to Items/LoreItems/KnowledgeBumblebirb.png diff --git a/Items/LoreItems/Knowledge45.cs b/Items/LoreItems/KnowledgeCalamitas.cs similarity index 92% rename from Items/LoreItems/Knowledge45.cs rename to Items/LoreItems/KnowledgeCalamitas.cs index edfbfe9740..a116586556 100644 --- a/Items/LoreItems/Knowledge45.cs +++ b/Items/LoreItems/KnowledgeCalamitas.cs @@ -1,9 +1,10 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.LoreItems { - public class Knowledge45 : ModItem + public class KnowledgeCalamitas : ModItem { public override void SetStaticDefaults() { diff --git a/Items/LoreItems/Knowledge25.png b/Items/LoreItems/KnowledgeCalamitas.png similarity index 100% rename from Items/LoreItems/Knowledge25.png rename to Items/LoreItems/KnowledgeCalamitas.png diff --git a/Items/LoreItems/Knowledge24.cs b/Items/LoreItems/KnowledgeCalamitasClone.cs similarity index 86% rename from Items/LoreItems/Knowledge24.cs rename to Items/LoreItems/KnowledgeCalamitasClone.cs index 693ce275b4..191cbc2ea1 100644 --- a/Items/LoreItems/Knowledge24.cs +++ b/Items/LoreItems/KnowledgeCalamitasClone.cs @@ -1,13 +1,14 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.LoreItems { - public class Knowledge24 : ModItem + public class KnowledgeCalamitasClone : ModItem { public override void SetStaticDefaults() { - DisplayName.SetDefault("Calamitas Doppelganger"); + DisplayName.SetDefault("Calamitas Clone"); Tooltip.SetDefault("You are indeed stronger than I thought.\n" + "Though the bloody inferno still lingers, observing your progress.\n" + "Place in your inventory to gain a boost to your minion slots but at the cost of reduced max health."); diff --git a/Items/LoreItems/Knowledge16.png b/Items/LoreItems/KnowledgeCalamitasClone.png similarity index 100% rename from Items/LoreItems/Knowledge16.png rename to Items/LoreItems/KnowledgeCalamitasClone.png diff --git a/Items/LoreItems/Knowledge9.cs b/Items/LoreItems/KnowledgeCorruption.cs similarity index 93% rename from Items/LoreItems/Knowledge9.cs rename to Items/LoreItems/KnowledgeCorruption.cs index 1932dc425f..7a06893ea1 100644 --- a/Items/LoreItems/Knowledge9.cs +++ b/Items/LoreItems/KnowledgeCorruption.cs @@ -3,7 +3,7 @@ using Terraria.ModLoader; namespace CalamityMod.Items.LoreItems { - public class Knowledge9 : ModItem + public class KnowledgeCorruption : ModItem { public override void SetStaticDefaults() { diff --git a/Items/LoreItems/Knowledge26.png b/Items/LoreItems/KnowledgeCorruption.png similarity index 100% rename from Items/LoreItems/Knowledge26.png rename to Items/LoreItems/KnowledgeCorruption.png diff --git a/Items/LoreItems/Knowledge5.cs b/Items/LoreItems/KnowledgeCrabulon.cs similarity index 95% rename from Items/LoreItems/Knowledge5.cs rename to Items/LoreItems/KnowledgeCrabulon.cs index 3378e9a45b..0f44d46a80 100644 --- a/Items/LoreItems/Knowledge5.cs +++ b/Items/LoreItems/KnowledgeCrabulon.cs @@ -3,7 +3,7 @@ using Terraria.ModLoader; namespace CalamityMod.Items.LoreItems { - public class Knowledge5 : ModItem + public class KnowledgeCrabulon : ModItem { public override void SetStaticDefaults() { diff --git a/Items/LoreItems/Knowledge30.png b/Items/LoreItems/KnowledgeCrabulon.png similarity index 100% rename from Items/LoreItems/Knowledge30.png rename to Items/LoreItems/KnowledgeCrabulon.png diff --git a/Items/LoreItems/Knowledge8.cs b/Items/LoreItems/KnowledgeCrimson.cs similarity index 93% rename from Items/LoreItems/Knowledge8.cs rename to Items/LoreItems/KnowledgeCrimson.cs index e2f4194e3c..d7af4cdc97 100644 --- a/Items/LoreItems/Knowledge8.cs +++ b/Items/LoreItems/KnowledgeCrimson.cs @@ -3,7 +3,7 @@ using Terraria.ModLoader; namespace CalamityMod.Items.LoreItems { - public class Knowledge8 : ModItem + public class KnowledgeCrimson : ModItem { public override void SetStaticDefaults() { diff --git a/Items/LoreItems/Knowledge20.png b/Items/LoreItems/KnowledgeCrimson.png similarity index 100% rename from Items/LoreItems/Knowledge20.png rename to Items/LoreItems/KnowledgeCrimson.png diff --git a/Items/LoreItems/Knowledge19.cs b/Items/LoreItems/KnowledgeCryogen.cs similarity index 91% rename from Items/LoreItems/Knowledge19.cs rename to Items/LoreItems/KnowledgeCryogen.cs index 143085c9f2..bda7fb1e58 100644 --- a/Items/LoreItems/Knowledge19.cs +++ b/Items/LoreItems/KnowledgeCryogen.cs @@ -1,9 +1,10 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.LoreItems { - public class Knowledge19 : ModItem + public class KnowledgeCryogen : ModItem { public override void SetStaticDefaults() { diff --git a/Items/LoreItems/Knowledge19.png b/Items/LoreItems/KnowledgeCryogen.png similarity index 100% rename from Items/LoreItems/Knowledge19.png rename to Items/LoreItems/KnowledgeCryogen.png diff --git a/Items/LoreItems/Knowledge.cs b/Items/LoreItems/KnowledgeDesertScourge.cs similarity index 92% rename from Items/LoreItems/Knowledge.cs rename to Items/LoreItems/KnowledgeDesertScourge.cs index 0e125fd30f..389fd5b114 100644 --- a/Items/LoreItems/Knowledge.cs +++ b/Items/LoreItems/KnowledgeDesertScourge.cs @@ -1,9 +1,10 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.LoreItems { - public class Knowledge : ModItem + public class KnowledgeDesertScourge : ModItem { public override void SetStaticDefaults() { diff --git a/Items/LoreItems/Knowledge34.png b/Items/LoreItems/KnowledgeDesertScourge.png similarity index 100% rename from Items/LoreItems/Knowledge34.png rename to Items/LoreItems/KnowledgeDesertScourge.png diff --git a/Items/LoreItems/Knowledge21.cs b/Items/LoreItems/KnowledgeDestroyer.cs similarity index 92% rename from Items/LoreItems/Knowledge21.cs rename to Items/LoreItems/KnowledgeDestroyer.cs index ad344ddae6..a5049ba3a7 100644 --- a/Items/LoreItems/Knowledge21.cs +++ b/Items/LoreItems/KnowledgeDestroyer.cs @@ -1,9 +1,10 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.LoreItems { - public class Knowledge21 : ModItem + public class KnowledgeDestroyer : ModItem { public override void SetStaticDefaults() { diff --git a/Items/LoreItems/Knowledge36.png b/Items/LoreItems/KnowledgeDestroyer.png similarity index 100% rename from Items/LoreItems/Knowledge36.png rename to Items/LoreItems/KnowledgeDestroyer.png diff --git a/Items/LoreItems/Knowledge42.cs b/Items/LoreItems/KnowledgeDevourerofGods.cs similarity index 92% rename from Items/LoreItems/Knowledge42.cs rename to Items/LoreItems/KnowledgeDevourerofGods.cs index b269c0f0a1..fa570a4be4 100644 --- a/Items/LoreItems/Knowledge42.cs +++ b/Items/LoreItems/KnowledgeDevourerofGods.cs @@ -1,9 +1,10 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.LoreItems { - public class Knowledge42 : ModItem + public class KnowledgeDevourerofGods : ModItem { public override void SetStaticDefaults() { diff --git a/Items/LoreItems/Knowledge18.png b/Items/LoreItems/KnowledgeDevourerofGods.png similarity index 100% rename from Items/LoreItems/Knowledge18.png rename to Items/LoreItems/KnowledgeDevourerofGods.png diff --git a/Items/LoreItems/Knowledge2.cs b/Items/LoreItems/KnowledgeDukeFishron.cs similarity index 93% rename from Items/LoreItems/Knowledge2.cs rename to Items/LoreItems/KnowledgeDukeFishron.cs index e3cc8e03bc..04cf928c8c 100644 --- a/Items/LoreItems/Knowledge2.cs +++ b/Items/LoreItems/KnowledgeDukeFishron.cs @@ -1,9 +1,10 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.LoreItems { - public class Knowledge2 : ModItem + public class KnowledgeDukeFishron : ModItem { public override void SetStaticDefaults() { diff --git a/Items/LoreItems/Knowledge2.png b/Items/LoreItems/KnowledgeDukeFishron.png similarity index 100% rename from Items/LoreItems/Knowledge2.png rename to Items/LoreItems/KnowledgeDukeFishron.png diff --git a/Items/LoreItems/Knowledge12.cs b/Items/LoreItems/KnowledgeEaterofWorlds.cs similarity index 91% rename from Items/LoreItems/Knowledge12.cs rename to Items/LoreItems/KnowledgeEaterofWorlds.cs index e1b0f4690e..ce6a1a6a62 100644 --- a/Items/LoreItems/Knowledge12.cs +++ b/Items/LoreItems/KnowledgeEaterofWorlds.cs @@ -1,9 +1,10 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.LoreItems { - public class Knowledge12 : ModItem + public class KnowledgeEaterofWorlds : ModItem { public override void SetStaticDefaults() { diff --git a/Items/LoreItems/Knowledge24.png b/Items/LoreItems/KnowledgeEaterofWorlds.png similarity index 100% rename from Items/LoreItems/Knowledge24.png rename to Items/LoreItems/KnowledgeEaterofWorlds.png diff --git a/Items/LoreItems/Knowledge3.cs b/Items/LoreItems/KnowledgeEyeofCthulhu.cs similarity index 93% rename from Items/LoreItems/Knowledge3.cs rename to Items/LoreItems/KnowledgeEyeofCthulhu.cs index 4440e68f85..208484fbb7 100644 --- a/Items/LoreItems/Knowledge3.cs +++ b/Items/LoreItems/KnowledgeEyeofCthulhu.cs @@ -3,7 +3,7 @@ using Terraria.ModLoader; namespace CalamityMod.Items.LoreItems { - public class Knowledge3 : ModItem + public class KnowledgeEyeofCthulhu : ModItem { public override void SetStaticDefaults() { diff --git a/Items/LoreItems/Knowledge23.png b/Items/LoreItems/KnowledgeEyeofCthulhu.png similarity index 100% rename from Items/LoreItems/Knowledge23.png rename to Items/LoreItems/KnowledgeEyeofCthulhu.png diff --git a/Items/LoreItems/Knowledge31.cs b/Items/LoreItems/KnowledgeGolem.cs similarity index 92% rename from Items/LoreItems/Knowledge31.cs rename to Items/LoreItems/KnowledgeGolem.cs index 846ea5f119..4f31bbcb67 100644 --- a/Items/LoreItems/Knowledge31.cs +++ b/Items/LoreItems/KnowledgeGolem.cs @@ -1,9 +1,10 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.LoreItems { - public class Knowledge31 : ModItem + public class KnowledgeGolem : ModItem { public override void SetStaticDefaults() { diff --git a/Items/LoreItems/Knowledge22.png b/Items/LoreItems/KnowledgeGolem.png similarity index 100% rename from Items/LoreItems/Knowledge22.png rename to Items/LoreItems/KnowledgeGolem.png diff --git a/Items/LoreItems/Knowledge14.cs b/Items/LoreItems/KnowledgeHiveMind.cs similarity index 92% rename from Items/LoreItems/Knowledge14.cs rename to Items/LoreItems/KnowledgeHiveMind.cs index 597e1d76aa..969e9bc987 100644 --- a/Items/LoreItems/Knowledge14.cs +++ b/Items/LoreItems/KnowledgeHiveMind.cs @@ -1,9 +1,10 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.LoreItems { - public class Knowledge14 : ModItem + public class KnowledgeHiveMind : ModItem { public override void SetStaticDefaults() { diff --git a/Items/LoreItems/Knowledge27.png b/Items/LoreItems/KnowledgeHiveMind.png similarity index 100% rename from Items/LoreItems/Knowledge27.png rename to Items/LoreItems/KnowledgeHiveMind.png diff --git a/Items/LoreItems/Knowledge28.cs b/Items/LoreItems/KnowledgeLeviathanandSiren.cs similarity index 92% rename from Items/LoreItems/Knowledge28.cs rename to Items/LoreItems/KnowledgeLeviathanandSiren.cs index 743ce6cbdb..70929c6997 100644 --- a/Items/LoreItems/Knowledge28.cs +++ b/Items/LoreItems/KnowledgeLeviathanandSiren.cs @@ -1,9 +1,10 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.LoreItems { - public class Knowledge28 : ModItem + public class KnowledgeLeviathanandSiren : ModItem { public override void SetStaticDefaults() { diff --git a/Items/LoreItems/Knowledge28.png b/Items/LoreItems/KnowledgeLeviathanandSiren.png similarity index 100% rename from Items/LoreItems/Knowledge28.png rename to Items/LoreItems/KnowledgeLeviathanandSiren.png diff --git a/Items/LoreItems/Knowledge4.cs b/Items/LoreItems/KnowledgeLunaticCultist.cs similarity index 92% rename from Items/LoreItems/Knowledge4.cs rename to Items/LoreItems/KnowledgeLunaticCultist.cs index a2e31dfd9a..0acd7e9c95 100644 --- a/Items/LoreItems/Knowledge4.cs +++ b/Items/LoreItems/KnowledgeLunaticCultist.cs @@ -1,9 +1,10 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.LoreItems { - public class Knowledge4 : ModItem + public class KnowledgeLunaticCultist : ModItem { public override void SetStaticDefaults() { diff --git a/Items/LoreItems/Knowledge29.png b/Items/LoreItems/KnowledgeLunaticCultist.png similarity index 100% rename from Items/LoreItems/Knowledge29.png rename to Items/LoreItems/KnowledgeLunaticCultist.png diff --git a/Items/LoreItems/Knowledge20.cs b/Items/LoreItems/KnowledgeMechs.cs similarity index 93% rename from Items/LoreItems/Knowledge20.cs rename to Items/LoreItems/KnowledgeMechs.cs index 02be8afc4f..ea62b88c89 100644 --- a/Items/LoreItems/Knowledge20.cs +++ b/Items/LoreItems/KnowledgeMechs.cs @@ -3,7 +3,7 @@ using Terraria.ModLoader; namespace CalamityMod.Items.LoreItems { - public class Knowledge20 : ModItem + public class KnowledgeMechs : ModItem { public override void SetStaticDefaults() { diff --git a/Items/LoreItems/Knowledge33.png b/Items/LoreItems/KnowledgeMechs.png similarity index 100% rename from Items/LoreItems/Knowledge33.png rename to Items/LoreItems/KnowledgeMechs.png diff --git a/Items/LoreItems/Knowledge37.cs b/Items/LoreItems/KnowledgeMoonLord.cs similarity index 92% rename from Items/LoreItems/Knowledge37.cs rename to Items/LoreItems/KnowledgeMoonLord.cs index 2aef02b2eb..80a13eba31 100644 --- a/Items/LoreItems/Knowledge37.cs +++ b/Items/LoreItems/KnowledgeMoonLord.cs @@ -1,9 +1,10 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.LoreItems { - public class Knowledge37 : ModItem + public class KnowledgeMoonLord : ModItem { public override void SetStaticDefaults() { diff --git a/Items/LoreItems/Knowledge31.png b/Items/LoreItems/KnowledgeMoonLord.png similarity index 100% rename from Items/LoreItems/Knowledge31.png rename to Items/LoreItems/KnowledgeMoonLord.png diff --git a/Items/LoreItems/Knowledge10.cs b/Items/LoreItems/KnowledgeOcean.cs similarity index 92% rename from Items/LoreItems/Knowledge10.cs rename to Items/LoreItems/KnowledgeOcean.cs index c6495b96b1..cba7cf6970 100644 --- a/Items/LoreItems/Knowledge10.cs +++ b/Items/LoreItems/KnowledgeOcean.cs @@ -3,7 +3,7 @@ using Terraria.ModLoader; namespace CalamityMod.Items.LoreItems { - public class Knowledge10 : ModItem + public class KnowledgeOcean : ModItem { public override void SetStaticDefaults() { diff --git a/Items/LoreItems/Knowledge37.png b/Items/LoreItems/KnowledgeOcean.png similarity index 100% rename from Items/LoreItems/Knowledge37.png rename to Items/LoreItems/KnowledgeOcean.png diff --git a/Items/LoreItems/Knowledge13.cs b/Items/LoreItems/KnowledgePerforators.cs similarity index 92% rename from Items/LoreItems/Knowledge13.cs rename to Items/LoreItems/KnowledgePerforators.cs index 45d4e8f8b9..7c0034f8e9 100644 --- a/Items/LoreItems/Knowledge13.cs +++ b/Items/LoreItems/KnowledgePerforators.cs @@ -1,9 +1,10 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.LoreItems { - public class Knowledge13 : ModItem + public class KnowledgePerforators : ModItem { public override void SetStaticDefaults() { diff --git a/Items/LoreItems/Knowledge40.png b/Items/LoreItems/KnowledgePerforators.png similarity index 100% rename from Items/LoreItems/Knowledge40.png rename to Items/LoreItems/KnowledgePerforators.png diff --git a/Items/LoreItems/Knowledge32.cs b/Items/LoreItems/KnowledgePlaguebringerGoliath.cs similarity index 92% rename from Items/LoreItems/Knowledge32.cs rename to Items/LoreItems/KnowledgePlaguebringerGoliath.cs index 86e927aff0..930b7d8ff1 100644 --- a/Items/LoreItems/Knowledge32.cs +++ b/Items/LoreItems/KnowledgePlaguebringerGoliath.cs @@ -1,9 +1,10 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.LoreItems { - public class Knowledge32 : ModItem + public class KnowledgePlaguebringerGoliath : ModItem { public override void SetStaticDefaults() { diff --git a/Items/LoreItems/Knowledge3.png b/Items/LoreItems/KnowledgePlaguebringerGoliath.png similarity index 100% rename from Items/LoreItems/Knowledge3.png rename to Items/LoreItems/KnowledgePlaguebringerGoliath.png diff --git a/Items/LoreItems/Knowledge25.cs b/Items/LoreItems/KnowledgePlantera.cs similarity index 92% rename from Items/LoreItems/Knowledge25.cs rename to Items/LoreItems/KnowledgePlantera.cs index 16165b9b25..9fc4b029ed 100644 --- a/Items/LoreItems/Knowledge25.cs +++ b/Items/LoreItems/KnowledgePlantera.cs @@ -1,9 +1,10 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.LoreItems { - public class Knowledge25 : ModItem + public class KnowledgePlantera : ModItem { public override void SetStaticDefaults() { diff --git a/Items/LoreItems/Knowledge41.png b/Items/LoreItems/KnowledgePlantera.png similarity index 100% rename from Items/LoreItems/Knowledge41.png rename to Items/LoreItems/KnowledgePlantera.png diff --git a/Items/LoreItems/Knowledge41.cs b/Items/LoreItems/KnowledgePolterghast.cs similarity index 92% rename from Items/LoreItems/Knowledge41.cs rename to Items/LoreItems/KnowledgePolterghast.cs index d8974bd4c9..5f4ed1e677 100644 --- a/Items/LoreItems/Knowledge41.cs +++ b/Items/LoreItems/KnowledgePolterghast.cs @@ -1,9 +1,10 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.LoreItems { - public class Knowledge41 : ModItem + public class KnowledgePolterghast : ModItem { public override void SetStaticDefaults() { diff --git a/Items/LoreItems/Knowledge45.png b/Items/LoreItems/KnowledgePolterghast.png similarity index 100% rename from Items/LoreItems/Knowledge45.png rename to Items/LoreItems/KnowledgePolterghast.png diff --git a/Items/LoreItems/Knowledge38.cs b/Items/LoreItems/KnowledgeProfanedGuardians.cs similarity index 93% rename from Items/LoreItems/Knowledge38.cs rename to Items/LoreItems/KnowledgeProfanedGuardians.cs index e68502e6d6..f273ea535f 100644 --- a/Items/LoreItems/Knowledge38.cs +++ b/Items/LoreItems/KnowledgeProfanedGuardians.cs @@ -3,7 +3,7 @@ using Terraria.ModLoader; namespace CalamityMod.Items.LoreItems { - public class Knowledge38 : ModItem + public class KnowledgeProfanedGuardians : ModItem { public override void SetStaticDefaults() { diff --git a/Items/LoreItems/Knowledge32.png b/Items/LoreItems/KnowledgeProfanedGuardians.png similarity index 100% rename from Items/LoreItems/Knowledge32.png rename to Items/LoreItems/KnowledgeProfanedGuardians.png diff --git a/Items/LoreItems/Knowledge39.cs b/Items/LoreItems/KnowledgeProvidence.cs similarity index 92% rename from Items/LoreItems/Knowledge39.cs rename to Items/LoreItems/KnowledgeProvidence.cs index b60d1573c8..4de1281fca 100644 --- a/Items/LoreItems/Knowledge39.cs +++ b/Items/LoreItems/KnowledgeProvidence.cs @@ -1,9 +1,10 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.LoreItems { - public class Knowledge39 : ModItem + public class KnowledgeProvidence : ModItem { public override void SetStaticDefaults() { diff --git a/Items/LoreItems/Knowledge35.png b/Items/LoreItems/KnowledgeProvidence.png similarity index 100% rename from Items/LoreItems/Knowledge35.png rename to Items/LoreItems/KnowledgeProvidence.png diff --git a/Items/LoreItems/Knowledge16.cs b/Items/LoreItems/KnowledgeQueenBee.cs similarity index 91% rename from Items/LoreItems/Knowledge16.cs rename to Items/LoreItems/KnowledgeQueenBee.cs index 5f5c5947b9..ee920a7f12 100644 --- a/Items/LoreItems/Knowledge16.cs +++ b/Items/LoreItems/KnowledgeQueenBee.cs @@ -1,9 +1,10 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.LoreItems { - public class Knowledge16 : ModItem + public class KnowledgeQueenBee : ModItem { public override void SetStaticDefaults() { diff --git a/Items/LoreItems/Knowledge39.png b/Items/LoreItems/KnowledgeQueenBee.png similarity index 100% rename from Items/LoreItems/Knowledge39.png rename to Items/LoreItems/KnowledgeQueenBee.png diff --git a/Items/LoreItems/Knowledge33.cs b/Items/LoreItems/KnowledgeRavager.cs similarity index 92% rename from Items/LoreItems/Knowledge33.cs rename to Items/LoreItems/KnowledgeRavager.cs index 89a5ae4c5b..8249c323ae 100644 --- a/Items/LoreItems/Knowledge33.cs +++ b/Items/LoreItems/KnowledgeRavager.cs @@ -1,9 +1,10 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.LoreItems { - public class Knowledge33 : ModItem + public class KnowledgeRavager : ModItem { public override void SetStaticDefaults() { diff --git a/Items/LoreItems/Knowledge4.png b/Items/LoreItems/KnowledgeRavager.png similarity index 100% rename from Items/LoreItems/Knowledge4.png rename to Items/LoreItems/KnowledgeRavager.png diff --git a/Items/LoreItems/Knowledge40.cs b/Items/LoreItems/KnowledgeSentinels.cs similarity index 94% rename from Items/LoreItems/Knowledge40.cs rename to Items/LoreItems/KnowledgeSentinels.cs index 5bea9ea160..5983eedf98 100644 --- a/Items/LoreItems/Knowledge40.cs +++ b/Items/LoreItems/KnowledgeSentinels.cs @@ -3,7 +3,7 @@ using Terraria.ModLoader; namespace CalamityMod.Items.LoreItems { - public class Knowledge40 : ModItem + public class KnowledgeSentinels : ModItem { public override void SetStaticDefaults() { diff --git a/Items/LoreItems/Knowledge5.png b/Items/LoreItems/KnowledgeSentinels.png similarity index 100% rename from Items/LoreItems/Knowledge5.png rename to Items/LoreItems/KnowledgeSentinels.png diff --git a/Items/LoreItems/Knowledge17.cs b/Items/LoreItems/KnowledgeSkeletron.cs similarity index 92% rename from Items/LoreItems/Knowledge17.cs rename to Items/LoreItems/KnowledgeSkeletron.cs index e84435d786..d2b03c86bd 100644 --- a/Items/LoreItems/Knowledge17.cs +++ b/Items/LoreItems/KnowledgeSkeletron.cs @@ -1,9 +1,10 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.LoreItems { - public class Knowledge17 : ModItem + public class KnowledgeSkeletron : ModItem { public override void SetStaticDefaults() { diff --git a/Items/LoreItems/Knowledge9.png b/Items/LoreItems/KnowledgeSkeletron.png similarity index 100% rename from Items/LoreItems/Knowledge9.png rename to Items/LoreItems/KnowledgeSkeletron.png diff --git a/Items/LoreItems/Knowledge23.cs b/Items/LoreItems/KnowledgeSkeletronPrime.cs similarity index 91% rename from Items/LoreItems/Knowledge23.cs rename to Items/LoreItems/KnowledgeSkeletronPrime.cs index 0d0e579921..b0cc727538 100644 --- a/Items/LoreItems/Knowledge23.cs +++ b/Items/LoreItems/KnowledgeSkeletronPrime.cs @@ -1,9 +1,10 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.LoreItems { - public class Knowledge23 : ModItem + public class KnowledgeSkeletronPrime : ModItem { public override void SetStaticDefaults() { diff --git a/Items/LoreItems/Knowledge38.png b/Items/LoreItems/KnowledgeSkeletronPrime.png similarity index 100% rename from Items/LoreItems/Knowledge38.png rename to Items/LoreItems/KnowledgeSkeletronPrime.png diff --git a/Items/LoreItems/Knowledge15.cs b/Items/LoreItems/KnowledgeSlimeGod.cs similarity index 96% rename from Items/LoreItems/Knowledge15.cs rename to Items/LoreItems/KnowledgeSlimeGod.cs index 0abbff1d26..e1b51a5ee9 100644 --- a/Items/LoreItems/Knowledge15.cs +++ b/Items/LoreItems/KnowledgeSlimeGod.cs @@ -4,7 +4,7 @@ using Terraria.ModLoader; namespace CalamityMod.Items.LoreItems { - public class Knowledge15 : ModItem + public class KnowledgeSlimeGod : ModItem { public override void SetStaticDefaults() { diff --git a/Items/LoreItems/Knowledge43.png b/Items/LoreItems/KnowledgeSlimeGod.png similarity index 100% rename from Items/LoreItems/Knowledge43.png rename to Items/LoreItems/KnowledgeSlimeGod.png diff --git a/Items/LoreItems/Knowledge35.cs b/Items/LoreItems/KnowledgeSulphurSea.cs similarity index 92% rename from Items/LoreItems/Knowledge35.cs rename to Items/LoreItems/KnowledgeSulphurSea.cs index d3ffacc0a0..987c9e3b7e 100644 --- a/Items/LoreItems/Knowledge35.cs +++ b/Items/LoreItems/KnowledgeSulphurSea.cs @@ -3,7 +3,7 @@ using Terraria.ModLoader; namespace CalamityMod.Items.LoreItems { - public class Knowledge35 : ModItem + public class KnowledgeSulphurSea : ModItem { public override void SetStaticDefaults() { diff --git a/Items/LoreItems/Knowledge44.png b/Items/LoreItems/KnowledgeSulphurSea.png similarity index 100% rename from Items/LoreItems/Knowledge44.png rename to Items/LoreItems/KnowledgeSulphurSea.png diff --git a/Items/LoreItems/Knowledge22.cs b/Items/LoreItems/KnowledgeTwins.cs similarity index 95% rename from Items/LoreItems/Knowledge22.cs rename to Items/LoreItems/KnowledgeTwins.cs index 2ef0c1e49f..ee888bcdb7 100644 --- a/Items/LoreItems/Knowledge22.cs +++ b/Items/LoreItems/KnowledgeTwins.cs @@ -3,7 +3,7 @@ using Terraria.ModLoader; namespace CalamityMod.Items.LoreItems { - public class Knowledge22 : ModItem + public class KnowledgeTwins : ModItem { public override void SetStaticDefaults() { diff --git a/Items/LoreItems/Knowledge42.png b/Items/LoreItems/KnowledgeTwins.png similarity index 100% rename from Items/LoreItems/Knowledge42.png rename to Items/LoreItems/KnowledgeTwins.png diff --git a/Items/LoreItems/Knowledge7.cs b/Items/LoreItems/KnowledgeUnderworld.cs similarity index 92% rename from Items/LoreItems/Knowledge7.cs rename to Items/LoreItems/KnowledgeUnderworld.cs index 50f16799b7..ae85a7efa2 100644 --- a/Items/LoreItems/Knowledge7.cs +++ b/Items/LoreItems/KnowledgeUnderworld.cs @@ -3,7 +3,7 @@ using Terraria.ModLoader; namespace CalamityMod.Items.LoreItems { - public class Knowledge7 : ModItem + public class KnowledgeUnderworld : ModItem { public override void SetStaticDefaults() { diff --git a/Items/LoreItems/Knowledge7.png b/Items/LoreItems/KnowledgeUnderworld.png similarity index 100% rename from Items/LoreItems/Knowledge7.png rename to Items/LoreItems/KnowledgeUnderworld.png diff --git a/Items/LoreItems/Knowledge18.cs b/Items/LoreItems/KnowledgeWallofFlesh.cs similarity index 91% rename from Items/LoreItems/Knowledge18.cs rename to Items/LoreItems/KnowledgeWallofFlesh.cs index f03ddbd203..6c2516ec6c 100644 --- a/Items/LoreItems/Knowledge18.cs +++ b/Items/LoreItems/KnowledgeWallofFlesh.cs @@ -1,9 +1,10 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.LoreItems { - public class Knowledge18 : ModItem + public class KnowledgeWallofFlesh : ModItem { public override void SetStaticDefaults() { diff --git a/Items/LoreItems/Knowledge6.png b/Items/LoreItems/KnowledgeWallofFlesh.png similarity index 100% rename from Items/LoreItems/Knowledge6.png rename to Items/LoreItems/KnowledgeWallofFlesh.png diff --git a/Items/LoreItems/Knowledge44.cs b/Items/LoreItems/KnowledgeYharon.cs similarity index 93% rename from Items/LoreItems/Knowledge44.cs rename to Items/LoreItems/KnowledgeYharon.cs index c1fe7e361b..88305948cd 100644 --- a/Items/LoreItems/Knowledge44.cs +++ b/Items/LoreItems/KnowledgeYharon.cs @@ -1,9 +1,10 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.LoreItems { - public class Knowledge44 : ModItem + public class KnowledgeYharon : ModItem { public override void SetStaticDefaults() { diff --git a/Items/LoreItems/Knowledge8.png b/Items/LoreItems/KnowledgeYharon.png similarity index 100% rename from Items/LoreItems/Knowledge8.png rename to Items/LoreItems/KnowledgeYharon.png diff --git a/Items/Mounts/Crysthamyr.cs b/Items/Mounts/Crysthamyr.cs index 1df113bc25..a381bd197a 100644 --- a/Items/Mounts/Crysthamyr.cs +++ b/Items/Mounts/Crysthamyr.cs @@ -62,7 +62,7 @@ namespace CalamityMod.Items.Mounts mountData.idleFrameStart = mountData.standingFrameStart; mountData.idleFrameLoop = true; mountData.swimFrameCount = mountData.inAirFrameCount; - mountData.swimFrameDelay = mountData.inAirFrameDelay; + mountData.swimFrameDelay = mountData.runningFrameDelay; mountData.swimFrameStart = mountData.inAirFrameStart; if (Main.netMode != 2) { diff --git a/Items/Mounts/Fab.cs b/Items/Mounts/Fab.cs index 3ce18c98c4..0e3256733b 100644 --- a/Items/Mounts/Fab.cs +++ b/Items/Mounts/Fab.cs @@ -3,6 +3,7 @@ using Terraria.ModLoader; using Terraria.ID; using Microsoft.Xna.Framework; using System; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Mounts { diff --git a/Items/Mounts/OnyxExcavator.cs b/Items/Mounts/OnyxExcavator.cs index 4750695137..65578baa42 100644 --- a/Items/Mounts/OnyxExcavator.cs +++ b/Items/Mounts/OnyxExcavator.cs @@ -6,6 +6,7 @@ using Terraria.GameContent.Achievements; using Microsoft.Xna.Framework; using System; using CalamityMod.World; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Mounts { diff --git a/Items/Patreon/MadAlchemistsCocktailGlove.cs b/Items/Patreon/MadAlchemistsCocktailGlove.cs index 54f7f89f54..ab8bd4e704 100644 --- a/Items/Patreon/MadAlchemistsCocktailGlove.cs +++ b/Items/Patreon/MadAlchemistsCocktailGlove.cs @@ -7,7 +7,7 @@ namespace CalamityMod.Items.Patreon public class MadAlchemistsCocktailGlove : ModItem { private int FlaskType = 0; - private int BaseDamage = 300; + private int BaseDamage = 200; public override void SetStaticDefaults() { diff --git a/Items/Patreon/NormalityRelocator.cs b/Items/Patreon/NormalityRelocator.cs index fcb299a4fb..6ce9f55f6a 100644 --- a/Items/Patreon/NormalityRelocator.cs +++ b/Items/Patreon/NormalityRelocator.cs @@ -2,6 +2,7 @@ using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Patreon { diff --git a/Items/Patreon/ProfanedSoulArtifact.cs b/Items/Patreon/ProfanedSoulArtifact.cs index c8705812dc..3128a2a5a6 100644 --- a/Items/Patreon/ProfanedSoulArtifact.cs +++ b/Items/Patreon/ProfanedSoulArtifact.cs @@ -2,6 +2,7 @@ using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Patreon { diff --git a/Items/Patreon/ResurrectionButterfly.cs b/Items/Patreon/ResurrectionButterfly.cs index af67b6c47b..ed3bfc0336 100644 --- a/Items/Patreon/ResurrectionButterfly.cs +++ b/Items/Patreon/ResurrectionButterfly.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Patreon public override void SetDefaults() { - item.damage = 60; + item.damage = 40; item.mana = 10; item.width = 46; item.height = 46; diff --git a/Items/Perforator/BloodyWormTooth.cs b/Items/Perforator/BloodyWormTooth.cs index a34d038ab9..e0bb3c3012 100644 --- a/Items/Perforator/BloodyWormTooth.cs +++ b/Items/Perforator/BloodyWormTooth.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Perforator { diff --git a/Items/Perforator/PerforatorBag.cs b/Items/Perforator/PerforatorBag.cs index de201b0d0e..9deccbe29f 100644 --- a/Items/Perforator/PerforatorBag.cs +++ b/Items/Perforator/PerforatorBag.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ModLoader; using Terraria.ID; +using CalamityMod.Utilities; namespace CalamityMod.Items.Perforator { diff --git a/Items/Permafrost/PermafrostsConcoction.cs b/Items/Permafrost/PermafrostsConcoction.cs index e4433d7115..751fd4f713 100644 --- a/Items/Permafrost/PermafrostsConcoction.cs +++ b/Items/Permafrost/PermafrostsConcoction.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Permafrost { diff --git a/Items/Permafrost/Popo.cs b/Items/Permafrost/Popo.cs index 21e916dc3e..6d013c95f0 100644 --- a/Items/Permafrost/Popo.cs +++ b/Items/Permafrost/Popo.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Permafrost { diff --git a/Items/PermanentBoosters/BloodOrange.cs b/Items/PermanentBoosters/BloodOrange.cs index 4a5b7e48a6..1f58b17e01 100644 --- a/Items/PermanentBoosters/BloodOrange.cs +++ b/Items/PermanentBoosters/BloodOrange.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.PermanentBoosters { diff --git a/Items/PermanentBoosters/CometShard.cs b/Items/PermanentBoosters/CometShard.cs index 2a55771342..a642c202c6 100644 --- a/Items/PermanentBoosters/CometShard.cs +++ b/Items/PermanentBoosters/CometShard.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.PermanentBoosters { diff --git a/Items/PermanentBoosters/Dragonfruit.cs b/Items/PermanentBoosters/Dragonfruit.cs index bc13c5ec9e..c2cfb48ba2 100644 --- a/Items/PermanentBoosters/Dragonfruit.cs +++ b/Items/PermanentBoosters/Dragonfruit.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.PermanentBoosters { diff --git a/Items/PermanentBoosters/Ectoheart.cs b/Items/PermanentBoosters/Ectoheart.cs index d0c2f0f848..40e1e598af 100644 --- a/Items/PermanentBoosters/Ectoheart.cs +++ b/Items/PermanentBoosters/Ectoheart.cs @@ -2,6 +2,7 @@ using Terraria.ID; using Terraria.DataStructures; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.PermanentBoosters { diff --git a/Items/PermanentBoosters/Elderberry.cs b/Items/PermanentBoosters/Elderberry.cs index 6d844da33b..c79de1e859 100644 --- a/Items/PermanentBoosters/Elderberry.cs +++ b/Items/PermanentBoosters/Elderberry.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.PermanentBoosters { diff --git a/Items/PermanentBoosters/ElectrolyteGelPack.cs b/Items/PermanentBoosters/ElectrolyteGelPack.cs index 2f91cee04d..ded5f8bf31 100644 --- a/Items/PermanentBoosters/ElectrolyteGelPack.cs +++ b/Items/PermanentBoosters/ElectrolyteGelPack.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.PermanentBoosters { diff --git a/Items/PermanentBoosters/EtherealCore.cs b/Items/PermanentBoosters/EtherealCore.cs index f0703afdf7..279a5ce23d 100644 --- a/Items/PermanentBoosters/EtherealCore.cs +++ b/Items/PermanentBoosters/EtherealCore.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.PermanentBoosters { diff --git a/Items/PermanentBoosters/InfernalBlood.cs b/Items/PermanentBoosters/InfernalBlood.cs index 7e6d7169f2..90d9b4af19 100644 --- a/Items/PermanentBoosters/InfernalBlood.cs +++ b/Items/PermanentBoosters/InfernalBlood.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.PermanentBoosters { diff --git a/Items/PermanentBoosters/MLGRune2.cs b/Items/PermanentBoosters/MLGRune2.cs index 744e399aac..14bafb2e8f 100644 --- a/Items/PermanentBoosters/MLGRune2.cs +++ b/Items/PermanentBoosters/MLGRune2.cs @@ -2,6 +2,7 @@ using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.PermanentBoosters { diff --git a/Items/PermanentBoosters/MiracleFruit.cs b/Items/PermanentBoosters/MiracleFruit.cs index 2a68aca68c..eb6c269347 100644 --- a/Items/PermanentBoosters/MiracleFruit.cs +++ b/Items/PermanentBoosters/MiracleFruit.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.PermanentBoosters { diff --git a/Items/PermanentBoosters/MushroomPlasmaRoot.cs b/Items/PermanentBoosters/MushroomPlasmaRoot.cs index 3998e70f49..71c9521ecf 100644 --- a/Items/PermanentBoosters/MushroomPlasmaRoot.cs +++ b/Items/PermanentBoosters/MushroomPlasmaRoot.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.PermanentBoosters { diff --git a/Items/PermanentBoosters/PhantomHeart.cs b/Items/PermanentBoosters/PhantomHeart.cs index 5e1bf0b838..1341cb987f 100644 --- a/Items/PermanentBoosters/PhantomHeart.cs +++ b/Items/PermanentBoosters/PhantomHeart.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.PermanentBoosters { diff --git a/Items/PermanentBoosters/RedLightningContainer.cs b/Items/PermanentBoosters/RedLightningContainer.cs index 3cb013d6bb..9fc4faeabb 100644 --- a/Items/PermanentBoosters/RedLightningContainer.cs +++ b/Items/PermanentBoosters/RedLightningContainer.cs @@ -2,6 +2,7 @@ using Terraria.ID; using Terraria.DataStructures; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.PermanentBoosters { diff --git a/Items/PermanentBoosters/StarlightFuelCell.cs b/Items/PermanentBoosters/StarlightFuelCell.cs index 77bd4d2b56..32bf1ed738 100644 --- a/Items/PermanentBoosters/StarlightFuelCell.cs +++ b/Items/PermanentBoosters/StarlightFuelCell.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.PermanentBoosters { diff --git a/Items/Placeables/ChaosCandle.cs b/Items/Placeables/ChaosCandle.cs index 3696991099..2fd8f7f60f 100644 --- a/Items/Placeables/ChaosCandle.cs +++ b/Items/Placeables/ChaosCandle.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Placeables { diff --git a/Items/Placeables/DevourerofGodsTrophy.png b/Items/Placeables/DevourerofGodsTrophy.png index c35b800751..86d9d47f43 100644 Binary files a/Items/Placeables/DevourerofGodsTrophy.png and b/Items/Placeables/DevourerofGodsTrophy.png differ diff --git a/Items/Placeables/FurnitureStatigel/StatigelBlock.cs b/Items/Placeables/FurnitureStatigel/StatigelBlock.cs index a69b83d937..852086f90c 100644 --- a/Items/Placeables/FurnitureStatigel/StatigelBlock.cs +++ b/Items/Placeables/FurnitureStatigel/StatigelBlock.cs @@ -41,6 +41,7 @@ namespace CalamityMod.Items.Placeables.FurnitureStatigel recipe.AddIngredient(null, "StatigelWall", 4); recipe.SetResult(this); recipe.AddTile(TileID.WorkBenches); + recipe.AddRecipe(); } } } diff --git a/Items/Placeables/TranquilityCandle.cs b/Items/Placeables/TranquilityCandle.cs index 68ae870dd1..5779ba3486 100644 --- a/Items/Placeables/TranquilityCandle.cs +++ b/Items/Placeables/TranquilityCandle.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Placeables { diff --git a/Items/PlaguebringerGoliath/PlaguebringerGoliathBag.cs b/Items/PlaguebringerGoliath/PlaguebringerGoliathBag.cs index d1278d3734..55fa42f485 100644 --- a/Items/PlaguebringerGoliath/PlaguebringerGoliathBag.cs +++ b/Items/PlaguebringerGoliath/PlaguebringerGoliathBag.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.Utilities; namespace CalamityMod.Items.PlaguebringerGoliath { diff --git a/Items/Polterghast/Affliction.cs b/Items/Polterghast/Affliction.cs index 407eef7f82..6c344d222b 100644 --- a/Items/Polterghast/Affliction.cs +++ b/Items/Polterghast/Affliction.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Polterghast { diff --git a/Items/Polterghast/PolterghastBag.cs b/Items/Polterghast/PolterghastBag.cs index d6a7bd4c66..e7cc85da65 100644 --- a/Items/Polterghast/PolterghastBag.cs +++ b/Items/Polterghast/PolterghastBag.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.Utilities; namespace CalamityMod.Items.Polterghast { diff --git a/Items/Potions/DraconicElixir.cs b/Items/Potions/DraconicElixir.cs index 09ade8321c..017686a378 100644 --- a/Items/Potions/DraconicElixir.cs +++ b/Items/Potions/DraconicElixir.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Potions { diff --git a/Items/Potions/RevivifyPotion.cs b/Items/Potions/RevivifyPotion.cs index 113744cacd..a75a598db2 100644 --- a/Items/Potions/RevivifyPotion.cs +++ b/Items/Potions/RevivifyPotion.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Potions { diff --git a/Items/Providence/ElysianAegis.cs b/Items/Providence/ElysianAegis.cs index bfd3f2dd39..ebd28d5948 100644 --- a/Items/Providence/ElysianAegis.cs +++ b/Items/Providence/ElysianAegis.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Providence { diff --git a/Items/Providence/ElysianWings.cs b/Items/Providence/ElysianWings.cs index b87bda570f..43c4815601 100644 --- a/Items/Providence/ElysianWings.cs +++ b/Items/Providence/ElysianWings.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Providence { diff --git a/Items/Providence/ProvidenceBag.cs b/Items/Providence/ProvidenceBag.cs index 1ab666cd3f..ac8bf80b77 100644 --- a/Items/Providence/ProvidenceBag.cs +++ b/Items/Providence/ProvidenceBag.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.Utilities; namespace CalamityMod.Items.Providence { diff --git a/Items/Scavenger/BloodPact.cs b/Items/Scavenger/BloodPact.cs index 2f6e51e816..3b6fca2063 100644 --- a/Items/Scavenger/BloodPact.cs +++ b/Items/Scavenger/BloodPact.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Scavenger { diff --git a/Items/Scavenger/FleshTotem.cs b/Items/Scavenger/FleshTotem.cs index a04f156735..f3f96b86f8 100644 --- a/Items/Scavenger/FleshTotem.cs +++ b/Items/Scavenger/FleshTotem.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Scavenger { diff --git a/Items/Scavenger/RavagerBag.cs b/Items/Scavenger/RavagerBag.cs index 57e37d06ac..9cdbf0d897 100644 --- a/Items/Scavenger/RavagerBag.cs +++ b/Items/Scavenger/RavagerBag.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.Utilities; namespace CalamityMod.Items.Scavenger { @@ -55,9 +56,9 @@ namespace CalamityMod.Items.Scavenger mod.ItemType("Hematemesis"), mod.ItemType("SpikecragStaff"), mod.ItemType("CraniumSmasher")); - DropHelper.DropItemFromSetChance(player, 0.05f, mod.ItemType("CorpusAvertorMelee"), mod.ItemType("CorpusAvertor")); + DropHelper.DropItemFromSetChance(player, 0.05f, mod.ItemType("CorpusAvertorMelee"), mod.ItemType("CorpusAvertor")); - // Equipment + // Equipment DropHelper.DropItemChance(player, mod.ItemType("BloodPact"), 0.5f); DropHelper.DropItemChance(player, mod.ItemType("FleshTotem"), 0.5f); DropHelper.DropItemCondition(player, mod.ItemType("BloodflareCore"), CalamityWorld.downedProvidence); diff --git a/Items/ShrineItems/FungalSymbiote.cs b/Items/ShrineItems/FungalSymbiote.cs index ac48f02500..b0f57dcd56 100644 --- a/Items/ShrineItems/FungalSymbiote.cs +++ b/Items/ShrineItems/FungalSymbiote.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.ShrineItems { diff --git a/Items/ShrineItems/GladiatorsLocket.cs b/Items/ShrineItems/GladiatorsLocket.cs index 096514f9fc..07668dc874 100644 --- a/Items/ShrineItems/GladiatorsLocket.cs +++ b/Items/ShrineItems/GladiatorsLocket.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.ShrineItems { diff --git a/Items/ShrineItems/LuxorsGift.cs b/Items/ShrineItems/LuxorsGift.cs index c5757829fb..33318bb4a5 100644 --- a/Items/ShrineItems/LuxorsGift.cs +++ b/Items/ShrineItems/LuxorsGift.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.ShrineItems { diff --git a/Items/ShrineItems/TrinketofChi.cs b/Items/ShrineItems/TrinketofChi.cs index a640e8a010..bb1bd1116b 100644 --- a/Items/ShrineItems/TrinketofChi.cs +++ b/Items/ShrineItems/TrinketofChi.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.ShrineItems { diff --git a/Items/ShrineItems/UnstablePrism.cs b/Items/ShrineItems/UnstablePrism.cs index e1cfe10d65..db030300f7 100644 --- a/Items/ShrineItems/UnstablePrism.cs +++ b/Items/ShrineItems/UnstablePrism.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.ShrineItems { diff --git a/Items/SlimeGod/ManaOverloader.cs b/Items/SlimeGod/ManaOverloader.cs index 897fb7cfa3..7119194bb0 100644 --- a/Items/SlimeGod/ManaOverloader.cs +++ b/Items/SlimeGod/ManaOverloader.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.SlimeGod { diff --git a/Items/SlimeGod/SlimeGodBag.cs b/Items/SlimeGod/SlimeGodBag.cs index 8da4fbc89f..07380c845e 100644 --- a/Items/SlimeGod/SlimeGodBag.cs +++ b/Items/SlimeGod/SlimeGodBag.cs @@ -2,6 +2,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.Utilities; namespace CalamityMod.Items.SlimeGod { diff --git a/Items/StarterBag.cs b/Items/StarterBag.cs index 02d7d816a8..937b63cea3 100644 --- a/Items/StarterBag.cs +++ b/Items/StarterBag.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ModLoader; using Terraria.ID; +using CalamityMod.Utilities; namespace CalamityMod.Items { @@ -57,7 +58,6 @@ namespace CalamityMod.Items DropHelper.DropItem(player, ItemID.SlimeCrown); // Music box (if music mod installed) - Mod musicMod = ModLoader.GetMod("CalamityModMusic"); if (musicMod != null) DropHelper.DropItem(player, musicMod.ItemType("CalamityMusicbox")); diff --git a/Items/SunkenSea/AmidiasPendant.cs b/Items/SunkenSea/AmidiasPendant.cs index e57490354e..7981225baa 100644 --- a/Items/SunkenSea/AmidiasPendant.cs +++ b/Items/SunkenSea/AmidiasPendant.cs @@ -27,7 +27,6 @@ namespace CalamityMod.Items.SunkenSea public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); if (ShardCountdown == 0) { ShardCountdown = 120; diff --git a/Items/SunkenSea/GiantPearl.cs b/Items/SunkenSea/GiantPearl.cs index 623ac2e658..08bc8fdf7f 100644 --- a/Items/SunkenSea/GiantPearl.cs +++ b/Items/SunkenSea/GiantPearl.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.SunkenSea { diff --git a/Items/TheDevourerofGods/CosmicWorm.png b/Items/TheDevourerofGods/CosmicWorm.png index ffb7cba9df..036fe9346b 100644 Binary files a/Items/TheDevourerofGods/CosmicWorm.png and b/Items/TheDevourerofGods/CosmicWorm.png differ diff --git a/Items/TheDevourerofGods/CosmiliteBar.png b/Items/TheDevourerofGods/CosmiliteBar.png index 3ed1a627f1..e010cb878a 100644 Binary files a/Items/TheDevourerofGods/CosmiliteBar.png and b/Items/TheDevourerofGods/CosmiliteBar.png differ diff --git a/Items/TheDevourerofGods/DevourerofGodsBag.cs b/Items/TheDevourerofGods/DevourerofGodsBag.cs index dc5e6db123..2d55ce45b3 100644 --- a/Items/TheDevourerofGods/DevourerofGodsBag.cs +++ b/Items/TheDevourerofGods/DevourerofGodsBag.cs @@ -3,6 +3,8 @@ using Terraria.ModLoader; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using CalamityMod.World; +using CalamityMod.CalPlayer; +using CalamityMod.Utilities; namespace CalamityMod.Items.TheDevourerofGods { diff --git a/Items/TheDevourerofGods/NebulousCore.cs b/Items/TheDevourerofGods/NebulousCore.cs index 2e55f71e70..bb327d643b 100644 --- a/Items/TheDevourerofGods/NebulousCore.cs +++ b/Items/TheDevourerofGods/NebulousCore.cs @@ -1,6 +1,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.TheDevourerofGods { diff --git a/Items/Weapons/AbyssBlade.cs b/Items/Weapons/AbyssBlade.cs index f5964cdf63..5d4bb4a191 100644 --- a/Items/Weapons/AbyssBlade.cs +++ b/Items/Weapons/AbyssBlade.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Items.Weapons DisplayName.SetDefault("Abyss Blade"); Tooltip.SetDefault("Hitting enemies will cause the crush depth debuff\n" + "The lower the enemies' defense the more damage they take from this debuff\n" + - "Fires short-range water orbs"); + "Fires short-range tridents"); } public override void SetDefaults() diff --git a/Items/Weapons/AegisBlade.cs b/Items/Weapons/AegisBlade.cs index 4fadc728e1..03c762a193 100644 --- a/Items/Weapons/AegisBlade.cs +++ b/Items/Weapons/AegisBlade.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Items.Weapons DisplayName.SetDefault("Aegis Blade"); Tooltip.SetDefault("Legendary Drop\n" + "Striking an enemy with the blade causes an earthen eruption\n" + - "Right click to fire an aegis bolt that costs 4 mana\n" + + "Right click to fire an aegis bolt\n" + "Revengeance drop"); } @@ -46,18 +46,14 @@ namespace CalamityMod.Items.Weapons if (player.altFunctionUse == 2) { item.noMelee = true; - item.mana = 4; item.useTime = 20; item.useAnimation = 20; - item.UseSound = SoundID.Item73; } else { item.noMelee = false; - item.mana = 0; item.useTime = 15; item.useAnimation = 15; - item.UseSound = SoundID.Item1; } return base.CanUseItem(player); } @@ -67,13 +63,12 @@ namespace CalamityMod.Items.Weapons if (player.altFunctionUse == 2) { Projectile.NewProjectile(position.X, position.Y, speedX, speedY, mod.ProjectileType("AegisBeam"), damage, knockBack, player.whoAmI, 0.0f, 0.0f); - return false; } else { Projectile.NewProjectile(position.X, position.Y, speedX, speedY, mod.ProjectileType("NobodyKnows"), damage, knockBack, player.whoAmI, 0.0f, 0.0f); - return false; } + return false; } public override void MeleeEffects(Player player, Rectangle hitbox) diff --git a/Items/Weapons/AethersWhisper.cs b/Items/Weapons/AethersWhisper.cs index 54cd5bb551..8d785c604b 100644 --- a/Items/Weapons/AethersWhisper.cs +++ b/Items/Weapons/AethersWhisper.cs @@ -11,6 +11,7 @@ namespace CalamityMod.Items.Weapons { DisplayName.SetDefault("Aether's Whisper"); Tooltip.SetDefault("Inflicts several long-lasting debuffs and splits on tile hits\n" + + "Projectiles gain damage as they travel\n" + "Right click to change from magic to ranged damage"); } diff --git a/Items/Weapons/AnarchyBlade.cs b/Items/Weapons/AnarchyBlade.cs index 0451dcae4e..c64f9c8bff 100644 --- a/Items/Weapons/AnarchyBlade.cs +++ b/Items/Weapons/AnarchyBlade.cs @@ -3,6 +3,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.NPCs; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Weapons { diff --git a/Items/Weapons/AquaticDissolution.cs b/Items/Weapons/AquaticDissolution.cs index 4bcdc0680f..71232995a0 100644 --- a/Items/Weapons/AquaticDissolution.cs +++ b/Items/Weapons/AquaticDissolution.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Items.Weapons { for (int x = 0; x < 3; x++) { - Projectile.NewProjectile(player.position.X + (float)Main.rand.Next(-100, 100), player.position.Y - 600f, 0f, 8f, type, damage, knockBack, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(player.position.X + (float)Main.rand.Next(-30, 31), player.position.Y - 600f, 0f, 8f, type, damage, knockBack, Main.myPlayer, 0f, 0f); } return false; } diff --git a/Items/Weapons/Astral/AstralPike.cs b/Items/Weapons/Astral/AstralPike.cs index 3d78ba7da3..bd618ab9c1 100644 --- a/Items/Weapons/Astral/AstralPike.cs +++ b/Items/Weapons/Astral/AstralPike.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Astral item.value = Item.buyPrice(0, 95, 0, 0); item.rare = 9; item.shoot = mod.ProjectileType("AstralPike"); - item.shootSpeed = 9f; + item.shootSpeed = 13f; } public override void AddRecipes() diff --git a/Items/Weapons/BrimstoneWaifu/Brimlance.png b/Items/Weapons/BrimstoneWaifu/Brimlance.png index 91247a2662..5fce6aa379 100644 Binary files a/Items/Weapons/BrimstoneWaifu/Brimlance.png and b/Items/Weapons/BrimstoneWaifu/Brimlance.png differ diff --git a/Items/Weapons/BurntSienna.cs b/Items/Weapons/BurntSienna.cs index 6a18dac375..b2e9b5ee99 100644 --- a/Items/Weapons/BurntSienna.cs +++ b/Items/Weapons/BurntSienna.cs @@ -34,28 +34,13 @@ namespace CalamityMod.Items.Weapons public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit) { - float spread = 180f * 0.0174f; - double startAngle = Math.Atan2(item.shootSpeed, item.shootSpeed) - spread / 2; - double deltaAngle = spread / 8f; - double offsetAngle; - int i; if (target.life <= 0) { - for (i = 0; i < 1; i++) - { - float randomSpeedX = (float)Main.rand.Next(3); - float randomSpeedY = (float)Main.rand.Next(3, 5); - offsetAngle = (startAngle + deltaAngle * (i + i * i) / 2f) + 32f * i; - int projectile1 = Projectile.NewProjectile(target.Center.X, target.Center.Y, (float)(Math.Sin(offsetAngle) * 5f), (float)(Math.Cos(offsetAngle) * 5f), mod.ProjectileType("BurntSienna"), 0, 0f, Main.myPlayer); - int projectile2 = Projectile.NewProjectile(target.Center.X, target.Center.Y, (float)(-Math.Sin(offsetAngle) * 5f), (float)(-Math.Cos(offsetAngle) * 5f), mod.ProjectileType("BurntSienna"), 0, 0f, Main.myPlayer); - int projectile3 = Projectile.NewProjectile(target.Center.X, target.Center.Y, (float)(-Math.Sin(offsetAngle) * 5f), (float)(-Math.Cos(offsetAngle) * 5f), mod.ProjectileType("BurntSienna"), 0, 0f, Main.myPlayer); - Main.projectile[projectile1].velocity.X = -randomSpeedX; - Main.projectile[projectile1].velocity.Y = -randomSpeedY; - Main.projectile[projectile2].velocity.X = randomSpeedX; - Main.projectile[projectile2].velocity.Y = -randomSpeedY; - Main.projectile[projectile3].velocity.X = 0f; - Main.projectile[projectile3].velocity.Y = -randomSpeedY; - } + float randomSpeedX = (float)Main.rand.Next(3); + float randomSpeedY = (float)Main.rand.Next(3, 5); + Projectile.NewProjectile(target.Center.X, target.Center.Y, -randomSpeedX, -randomSpeedY, mod.ProjectileType("BurntSienna"), 0, 0f, player.whoAmI); + Projectile.NewProjectile(target.Center.X, target.Center.Y, randomSpeedX, -randomSpeedY, mod.ProjectileType("BurntSienna"), 0, 0f, player.whoAmI); + Projectile.NewProjectile(target.Center.X, target.Center.Y, 0f, -randomSpeedY, mod.ProjectileType("BurntSienna"), 0, 0f, player.whoAmI); } } diff --git a/Items/Weapons/CosmicImmaterializer.cs b/Items/Weapons/CosmicImmaterializer.cs index 2f08732b52..dec53e188d 100644 --- a/Items/Weapons/CosmicImmaterializer.cs +++ b/Items/Weapons/CosmicImmaterializer.cs @@ -3,6 +3,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Weapons { diff --git a/Items/Weapons/CrystalBlade.png b/Items/Weapons/CrystalBlade.png index d44d500e30..3cc5bccac4 100644 Binary files a/Items/Weapons/CrystalBlade.png and b/Items/Weapons/CrystalBlade.png differ diff --git a/Items/Weapons/ElementalEruption.cs b/Items/Weapons/ElementalEruption.cs index dbb6f7090a..f19203affa 100644 --- a/Items/Weapons/ElementalEruption.cs +++ b/Items/Weapons/ElementalEruption.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { - item.damage = 28; + item.damage = 35; item.ranged = true; item.width = 64; item.height = 34; @@ -37,11 +37,11 @@ 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 num6 = Main.rand.Next(3, 6); + int num6 = Main.rand.Next(3, 5); for (int index = 0; index < num6; ++index) { - float SpeedX = speedX + (float) Main.rand.Next(-25, 26) * 0.05f; - float SpeedY = speedY + (float) Main.rand.Next(-25, 26) * 0.05f; + float SpeedX = speedX + (float) Main.rand.Next(-20, 21) * 0.05f; + float SpeedY = speedY + (float) Main.rand.Next(-20, 21) * 0.05f; Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, damage, knockBack, player.whoAmI, 0f, 0f); } return false; diff --git a/Items/Weapons/FiniteUse/Bazooka.cs b/Items/Weapons/FiniteUse/Bazooka.cs index 00b3169462..4ebe44f49a 100644 --- a/Items/Weapons/FiniteUse/Bazooka.cs +++ b/Items/Weapons/FiniteUse/Bazooka.cs @@ -2,6 +2,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Weapons.FiniteUse { diff --git a/Items/Weapons/FiniteUse/ElephantKiller.cs b/Items/Weapons/FiniteUse/ElephantKiller.cs index 2f83712b6b..15edd3e7ea 100644 --- a/Items/Weapons/FiniteUse/ElephantKiller.cs +++ b/Items/Weapons/FiniteUse/ElephantKiller.cs @@ -2,6 +2,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Weapons.FiniteUse { diff --git a/Items/Weapons/FiniteUse/Hydra.cs b/Items/Weapons/FiniteUse/Hydra.cs index 0faa5ab214..8a22ef27d9 100644 --- a/Items/Weapons/FiniteUse/Hydra.cs +++ b/Items/Weapons/FiniteUse/Hydra.cs @@ -2,6 +2,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Weapons.FiniteUse { diff --git a/Items/Weapons/FiniteUse/LightningHawk.cs b/Items/Weapons/FiniteUse/LightningHawk.cs index 8cd6084f72..59cf9997e0 100644 --- a/Items/Weapons/FiniteUse/LightningHawk.cs +++ b/Items/Weapons/FiniteUse/LightningHawk.cs @@ -2,6 +2,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Weapons.FiniteUse { diff --git a/Items/Weapons/FiniteUse/Magnum.cs b/Items/Weapons/FiniteUse/Magnum.cs index 144337865a..339a1302b5 100644 --- a/Items/Weapons/FiniteUse/Magnum.cs +++ b/Items/Weapons/FiniteUse/Magnum.cs @@ -2,6 +2,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Weapons.FiniteUse { diff --git a/Items/Weapons/FlameburstShortsword.cs b/Items/Weapons/FlameburstShortsword.cs index 56a82b60d6..5ea9715d9a 100644 --- a/Items/Weapons/FlameburstShortsword.cs +++ b/Items/Weapons/FlameburstShortsword.cs @@ -52,7 +52,7 @@ namespace CalamityMod.Items.Weapons { if (target.life <= (target.lifeMax * 0.5f)) { - Projectile.NewProjectile(target.Center.X, target.Center.Y, 0f, 0f, 612, (int)((float)item.damage * player.meleeDamage), knockback, Main.myPlayer); + Projectile.NewProjectile(target.Center.X, target.Center.Y, 0f, 0f, 612, (int)((float)item.damage * player.meleeDamage), knockback, player.whoAmI, 0f, 0.85f + Main.rand.NextFloat() * 1.15f); } } } diff --git a/Items/Weapons/GrandGuardian.cs b/Items/Weapons/GrandGuardian.cs index 5a0104c605..2a9812164e 100644 --- a/Items/Weapons/GrandGuardian.cs +++ b/Items/Weapons/GrandGuardian.cs @@ -46,22 +46,22 @@ namespace CalamityMod.Items.Weapons player.statLife += 4; player.HealEffect(4); } - Projectile.NewProjectile(target.Center.X, target.Center.Y, 0f, 0f, mod.ProjectileType("RainbowBoom"), (int)((float)item.damage * player.meleeDamage * 0.5f), 0f, Main.myPlayer); + Projectile.NewProjectile(target.Center.X, target.Center.Y, 0f, 0f, mod.ProjectileType("RainbowBoom"), (int)((float)item.damage * player.meleeDamage * 0.5f), 0f, player.whoAmI); if (target.life <= (target.lifeMax * 0.5f)) { float randomSpeedX = (float)Main.rand.Next(9); float randomSpeedY = (float)Main.rand.Next(6, 15); - Projectile.NewProjectile(player.Center.X, player.Center.Y, -randomSpeedX, -randomSpeedY, mod.ProjectileType("RainBolt"), (int)((float)item.damage * player.meleeDamage * 0.75f), knockback, Main.myPlayer); - Projectile.NewProjectile(player.Center.X, player.Center.Y, randomSpeedX, -randomSpeedY, mod.ProjectileType("RainBolt"), (int)((float)item.damage * player.meleeDamage * 0.75f), knockback, Main.myPlayer); - Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -randomSpeedY, mod.ProjectileType("RainBolt"), (int)((float)item.damage * player.meleeDamage * 0.75f), knockback, Main.myPlayer); + Projectile.NewProjectile(player.Center.X, player.Center.Y, -randomSpeedX, -randomSpeedY, mod.ProjectileType("RainBolt"), (int)((float)item.damage * player.meleeDamage * 0.75f), knockback, player.whoAmI); + Projectile.NewProjectile(player.Center.X, player.Center.Y, randomSpeedX, -randomSpeedY, mod.ProjectileType("RainBolt"), (int)((float)item.damage * player.meleeDamage * 0.75f), knockback, player.whoAmI); + Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -randomSpeedY, mod.ProjectileType("RainBolt"), (int)((float)item.damage * player.meleeDamage * 0.75f), knockback, player.whoAmI); } if (target.life <= 0) { float randomSpeedX = (float)Main.rand.Next(9); float randomSpeedY = (float)Main.rand.Next(6, 15); - Projectile.NewProjectile(target.Center.X, target.Center.Y, -randomSpeedX, -randomSpeedY, mod.ProjectileType("RainHeal"), 0, 0f, Main.myPlayer); - Projectile.NewProjectile(target.Center.X, target.Center.Y, randomSpeedX, -randomSpeedY, mod.ProjectileType("RainHeal"), 0, 0f, Main.myPlayer); - Projectile.NewProjectile(target.Center.X, target.Center.Y, 0f, -randomSpeedY, mod.ProjectileType("RainHeal"), 0, 0f, Main.myPlayer); + Projectile.NewProjectile(target.Center.X, target.Center.Y, -randomSpeedX, -randomSpeedY, mod.ProjectileType("RainHeal"), 0, 0f, player.whoAmI); + Projectile.NewProjectile(target.Center.X, target.Center.Y, randomSpeedX, -randomSpeedY, mod.ProjectileType("RainHeal"), 0, 0f, player.whoAmI); + Projectile.NewProjectile(target.Center.X, target.Center.Y, 0f, -randomSpeedY, mod.ProjectileType("RainHeal"), 0, 0f, player.whoAmI); } } diff --git a/Items/Weapons/InfernaCutter.cs b/Items/Weapons/InfernaCutter.cs index f5f654fc86..3b40abe08e 100644 --- a/Items/Weapons/InfernaCutter.cs +++ b/Items/Weapons/InfernaCutter.cs @@ -121,7 +121,7 @@ namespace CalamityMod.Items.Weapons { if (crit) { - Projectile.NewProjectile(target.Center.X, target.Center.Y, 0f, 0f, 612, (int)((float)item.damage * player.meleeDamage), knockback, Main.myPlayer); + Projectile.NewProjectile(target.Center.X, target.Center.Y, 0f, 0f, 612, (int)((float)item.damage * player.meleeDamage), knockback, player.whoAmI, 0f, 0.85f + Main.rand.NextFloat() * 1.15f); } target.AddBuff(BuffID.OnFire, 300); target.AddBuff(mod.BuffType("BrimstoneFlames"), 300); diff --git a/Items/Weapons/Lazhar.cs b/Items/Weapons/Lazhar.cs index b8ae0425a8..711af63fb5 100644 --- a/Items/Weapons/Lazhar.cs +++ b/Items/Weapons/Lazhar.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Weapons { float SpeedX = speedX + (float) Main.rand.Next(-15, 16) * 0.05f; float SpeedY = speedY + (float) Main.rand.Next(-15, 16) * 0.05f; - Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, damage, knockBack, player.whoAmI, 0.0f, 0.0f); + Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, damage, knockBack, player.whoAmI, 0f, 0f); return false; } diff --git a/Items/Weapons/Leviathan/LureofEnthrallment.cs b/Items/Weapons/Leviathan/LureofEnthrallment.cs index cfb5aaa90b..e9fdd5d13e 100644 --- a/Items/Weapons/Leviathan/LureofEnthrallment.cs +++ b/Items/Weapons/Leviathan/LureofEnthrallment.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Items.Weapons.Leviathan { diff --git a/Items/Weapons/Leviathan/SirensSong.cs b/Items/Weapons/Leviathan/SirensSong.cs index 66783579fd..638a93bcaf 100644 --- a/Items/Weapons/Leviathan/SirensSong.cs +++ b/Items/Weapons/Leviathan/SirensSong.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.Weapons.Leviathan public override void SetDefaults() { - item.damage = 77; + item.damage = 92; item.magic = true; item.mana = 7; item.width = 56; diff --git a/Items/Weapons/Lucrecia.cs b/Items/Weapons/Lucrecia.cs index c93ed77e66..e39cbeba86 100644 --- a/Items/Weapons/Lucrecia.cs +++ b/Items/Weapons/Lucrecia.cs @@ -47,7 +47,7 @@ namespace CalamityMod.Items.Weapons player.lifeRegenTime = 0; if (Main.myPlayer == player.whoAmI) { - player.HealEffect(-3, true); + player.HealEffect(-5, true); } if (player.statLife <= 0) { diff --git a/Items/Weapons/MantisClaws.cs b/Items/Weapons/MantisClaws.cs index 4d84595516..1f1e59a2a8 100644 --- a/Items/Weapons/MantisClaws.cs +++ b/Items/Weapons/MantisClaws.cs @@ -40,7 +40,7 @@ namespace CalamityMod.Items.Weapons public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit) { - Projectile.NewProjectile(target.Center.X, target.Center.Y, 0f, 0f, 612, 0, knockback, Main.myPlayer); + Projectile.NewProjectile(target.Center.X, target.Center.Y, 0f, 0f, 612, 0, knockback, player.whoAmI, 0f, 0.85f + Main.rand.NextFloat() * 1.15f); } } } diff --git a/Items/Weapons/NeptunesBounty.cs b/Items/Weapons/NeptunesBounty.cs index e3d4864ad3..e5fbf7163a 100644 --- a/Items/Weapons/NeptunesBounty.cs +++ b/Items/Weapons/NeptunesBounty.cs @@ -11,7 +11,8 @@ namespace CalamityMod.Items.Weapons { DisplayName.SetDefault("Neptune's Bounty"); Tooltip.SetDefault("Hitting enemies will cause the crush depth debuff\n" + - "The lower the enemies' defense the more damage they take from this debuff"); + "The lower the enemies' defense the more damage they take from this debuff\n" + + "Fires a trident that rains additional tridents as it travels"); } public override void SetDefaults() diff --git a/Items/Weapons/PhoenixBlade.cs b/Items/Weapons/PhoenixBlade.cs index 0291f804db..2f0806d41a 100644 --- a/Items/Weapons/PhoenixBlade.cs +++ b/Items/Weapons/PhoenixBlade.cs @@ -36,24 +36,11 @@ namespace CalamityMod.Items.Weapons { if (target.life <= 0) { - Projectile.NewProjectile(target.Center.X, target.Center.Y, 0f, 0f, 612, damage, knockback, Main.myPlayer); - float spread = 180f * 0.0174f; - double startAngle = Math.Atan2(item.shootSpeed, item.shootSpeed) - spread / 2; - double deltaAngle = spread / 8f; - double offsetAngle; - int i; - for (i = 0; i < 1; i++ ) - { - float randomSpeedX = (float)Main.rand.Next(5); - float randomSpeedY = (float)Main.rand.Next(3, 7); - offsetAngle = (startAngle + deltaAngle * ( i + i * i ) / 2f ) + 32f * i; - int projectile1 = Projectile.NewProjectile(target.Center.X, target.Center.Y, (float)( Math.Sin(offsetAngle) * 5f ), (float)( Math.Cos(offsetAngle) * 5f ), mod.ProjectileType("PhoenixHeal"), item.damage, knockback, Main.myPlayer); - int projectile2 = Projectile.NewProjectile(target.Center.X, target.Center.Y, (float)( -Math.Sin(offsetAngle) * 5f ), (float)( -Math.Cos(offsetAngle) * 5f ), mod.ProjectileType("PhoenixHeal"), item.damage, knockback, Main.myPlayer); - Main.projectile[projectile1].velocity.X = -randomSpeedX; - Main.projectile[projectile1].velocity.Y = -randomSpeedY; - Main.projectile[projectile2].velocity.X = randomSpeedX; - Main.projectile[projectile2].velocity.Y = -randomSpeedY; - } + Projectile.NewProjectile(target.Center.X, target.Center.Y, 0f, 0f, 612, damage, knockback, player.whoAmI, 0f, 0.85f + Main.rand.NextFloat() * 1.15f); + float randomSpeedX = (float)Main.rand.Next(5); + float randomSpeedY = (float)Main.rand.Next(3, 7); + Projectile.NewProjectile(target.Center.X, target.Center.Y, -randomSpeedX, -randomSpeedY, mod.ProjectileType("PhoenixHeal"), item.damage, knockback, player.whoAmI); + Projectile.NewProjectile(target.Center.X, target.Center.Y, randomSpeedX, -randomSpeedY, mod.ProjectileType("PhoenixHeal"), item.damage, knockback, player.whoAmI); } } diff --git a/Items/Weapons/PlanetaryAnnihilation.cs b/Items/Weapons/PlanetaryAnnihilation.cs index 1c6e51306c..70c553c96c 100644 --- a/Items/Weapons/PlanetaryAnnihilation.cs +++ b/Items/Weapons/PlanetaryAnnihilation.cs @@ -30,8 +30,8 @@ namespace CalamityMod.Items.Weapons item.rare = 10; item.UseSound = SoundID.Item75; item.autoReuse = true; - item.shoot = mod.ProjectileType("TerraBall"); - item.shootSpeed = 16f; + item.shoot = mod.ProjectileType("TerraBallBow"); + item.shootSpeed = 12f; item.useAmmo = 40; item.GetGlobalItem(mod).postMoonLordRarity = 12; } @@ -43,7 +43,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) { - float num72 = Main.rand.Next(19, 35); + 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; @@ -82,34 +82,24 @@ namespace CalamityMod.Items.Weapons num80 = num72 / num80; num78 *= num80; num79 *= num80; - float speedX4 = num78 + (float)Main.rand.Next(-240, 241) * 0.02f; - float speedY5 = num79 + (float)Main.rand.Next(-240, 241) * 0.02f; if (type == ProjectileID.WoodenArrowFriendly) { - Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, (speedY5 * 1.3f), mod.ProjectileType("TerraBallR"), damage, knockBack, player.whoAmI, 0f, (float)Main.rand.Next(2)); - Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, (speedY5 * 1.2f), mod.ProjectileType("TerraBallO"), damage, knockBack, player.whoAmI, 0f, (float)Main.rand.Next(3)); - Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, (speedY5 * 1.1f), mod.ProjectileType("TerraBallY"), damage, knockBack, player.whoAmI, 0f, (float)Main.rand.Next(4)); - Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, (speedY5 * 1f), mod.ProjectileType("TerraBallG"), damage, knockBack, player.whoAmI, 0f, (float)Main.rand.Next(5)); - Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, (speedY5 * 0.9f), mod.ProjectileType("TerraBallB"), damage, knockBack, player.whoAmI, 0f, (float)Main.rand.Next(6)); - Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, (speedY5 * 0.8f), mod.ProjectileType("TerraBallI"), damage, knockBack, player.whoAmI, 0f, (float)Main.rand.Next(7)); - Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, (speedY5 * 0.7f), mod.ProjectileType("TerraBallV"), damage, knockBack, player.whoAmI, 0f, (float)Main.rand.Next(8)); + for (int i = 0; i < 7; i++) + { + float speedX4 = num78 + (float)Main.rand.Next(-120, 121) * 0.02f; + float speedY5 = num79 + (float)Main.rand.Next(-120, 121) * 0.02f; + Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, speedY5, mod.ProjectileType("TerraBallBow"), damage, knockBack, player.whoAmI, 0f, (float)i); + } } else { - int num121 = Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, (speedY5 * 1.3f), type, damage, knockBack, player.whoAmI, 0f, 0f); - Main.projectile[num121].noDropItem = true; - int num122 = Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, (speedY5 * 1.2f), type, damage, knockBack, player.whoAmI, 0f, 0f); - Main.projectile[num122].noDropItem = true; - int num123 = Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, (speedY5 * 1.1f), type, damage, knockBack, player.whoAmI, 0f, 0f); - Main.projectile[num123].noDropItem = true; - int num124 = Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, (speedY5 * 1f), type, damage, knockBack, player.whoAmI, 0f, 0f); - Main.projectile[num124].noDropItem = true; - int num125 = Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, (speedY5 * 0.9f), type, damage, knockBack, player.whoAmI, 0f, 0f); - Main.projectile[num125].noDropItem = true; - int num126 = Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, (speedY5 * 0.8f), type, damage, knockBack, player.whoAmI, 0f, 0f); - Main.projectile[num126].noDropItem = true; - int num127 = Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, (speedY5 * 0.7f), type, damage, knockBack, player.whoAmI, 0f, 0f); - Main.projectile[num127].noDropItem = true; + for (int i = 0; i < 7; i++) + { + float speedX4 = num78 + (float)Main.rand.Next(-120, 121) * 0.02f; + float speedY5 = num79 + (float)Main.rand.Next(-120, 121) * 0.02f; + int num121 = Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, speedY5, type, damage, knockBack, player.whoAmI, 0f, 0f); + Main.projectile[num121].noDropItem = true; + } } return false; } diff --git a/Items/Weapons/Ravager/UltimusCleaver.cs b/Items/Weapons/Ravager/UltimusCleaver.cs index a20d6e9fa0..fc76f35bdf 100644 --- a/Items/Weapons/Ravager/UltimusCleaver.cs +++ b/Items/Weapons/Ravager/UltimusCleaver.cs @@ -1,5 +1,6 @@ using Microsoft.Xna.Framework; using Terraria; +using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Items.Weapons.Ravager @@ -10,7 +11,7 @@ namespace CalamityMod.Items.Weapons.Ravager public override void SetStaticDefaults() { DisplayName.SetDefault("Ultimus Cleaver"); - Tooltip.SetDefault("Launches damaging sparks when the player walks on the ground with this weapon out"); + Tooltip.SetDefault("Launches damaging homing sparks"); } public override void SetDefaults() @@ -18,45 +19,86 @@ namespace CalamityMod.Items.Weapons.Ravager item.damage = 300; item.melee = true; item.rare = 8; - item.width = 82; - item.height = 102; + item.width = 102; + item.height = 82; item.useTime = 20; item.useAnimation = 20; - item.useStyle = 5; - item.knockBack = 5f; + item.useStyle = 1; + item.knockBack = 8f; item.value = Item.buyPrice(0, 80, 0, 0); item.autoReuse = true; - item.shoot = mod.ProjectileType("UltimusCleaverDust"); - item.shootSpeed = 10f; + item.UseSound = SoundID.Item1; } - public override Vector2? HoldoutOffset() + public override void MeleeEffects(Player player, Rectangle hitbox) { - return new Vector2(-10, -10); - } - - 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 (Collision.SolidCollision(position, player.width, player.height) && player.velocity.X != 0) + if (player.whoAmI == Main.myPlayer) { - for (int i = 0; i < 5; i++) + if ((player.itemAnimation == (int)((double)player.itemAnimationMax * 0.1) || + player.itemAnimation == (int)((double)player.itemAnimationMax * 0.3) || + player.itemAnimation == (int)((double)player.itemAnimationMax * 0.5) || + player.itemAnimation == (int)((double)player.itemAnimationMax * 0.7) || + player.itemAnimation == (int)((double)player.itemAnimationMax * 0.9))) { - float posX; - float velocityX; - if (player.direction == 1) + float num339 = 0f; + float num340 = 0f; + float num341 = 0f; + float num342 = 0f; + if (player.itemAnimation == (int)((double)player.itemAnimationMax * 0.9)) { - posX = (float)Main.rand.Next(10, 60); - velocityX = (float)Main.rand.Next(2, 10); + num339 = -7f; } - else + if (player.itemAnimation == (int)((double)player.itemAnimationMax * 0.7)) { - posX = (float)Main.rand.Next(-60, -10); - velocityX = (float)Main.rand.Next(-10, -2); + num339 = -6f; + num340 = 2f; } - Projectile.NewProjectile((player.Center.X + posX), (player.Center.Y + 20), velocityX, (float)Main.rand.Next(-7, -3), mod.ProjectileType("UltimusCleaverDust"), (int)((float)item.damage * 0.4f * player.meleeDamage), 0f, Main.myPlayer); + if (player.itemAnimation == (int)((double)player.itemAnimationMax * 0.5)) + { + num339 = -4f; + num340 = 4f; + } + if (player.itemAnimation == (int)((double)player.itemAnimationMax * 0.3)) + { + num339 = -2f; + num340 = 6f; + } + if (player.itemAnimation == (int)((double)player.itemAnimationMax * 0.1)) + { + num340 = 7f; + } + if (player.itemAnimation == (int)((double)player.itemAnimationMax * 0.7)) + { + num342 = 26f; + } + if (player.itemAnimation == (int)((double)player.itemAnimationMax * 0.3)) + { + num342 -= 4f; + num341 -= 20f; + } + if (player.itemAnimation == (int)((double)player.itemAnimationMax * 0.1)) + { + num341 += 6f; + } + if (player.direction == -1) + { + if (player.itemAnimation == (int)((double)player.itemAnimationMax * 0.9)) + { + num342 -= 8f; + } + if (player.itemAnimation == (int)((double)player.itemAnimationMax * 0.7)) + { + num342 -= 6f; + } + } + num339 *= 1.5f; + num340 *= 1.5f; + num342 *= (float)player.direction; + num341 *= player.gravDir; + Projectile.NewProjectile((float)(hitbox.X + hitbox.Width / 2) + num342, (float)(hitbox.Y + hitbox.Height / 2) + num341, + (float)player.direction * num340, num339 * player.gravDir, mod.ProjectileType("UltimusCleaverDust"), (int)((float)item.damage * 0.1f * player.meleeDamage), 0f, player.whoAmI, 0f, 0f); } } - return false; } } } diff --git a/Items/Weapons/SkyGlaze.cs b/Items/Weapons/SkyGlaze.cs index 6bc2d35ce1..b3681e7d94 100644 --- a/Items/Weapons/SkyGlaze.cs +++ b/Items/Weapons/SkyGlaze.cs @@ -59,7 +59,7 @@ namespace CalamityMod.Items.Weapons } num78 *= num80; num79 *= num80; - int num107 = 5; + int num107 = 3; 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); diff --git a/Items/Weapons/SlimeGod/GunkShot.cs b/Items/Weapons/SlimeGod/GunkShot.cs index 478b51de8a..313f9c2e2f 100644 --- a/Items/Weapons/SlimeGod/GunkShot.cs +++ b/Items/Weapons/SlimeGod/GunkShot.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Weapons.SlimeGod item.UseSound = SoundID.Item36; item.autoReuse = true; item.shoot = 10; - item.shootSpeed = 3.5f; + item.shootSpeed = 5f; item.useAmmo = 97; } diff --git a/Items/Weapons/Terracotta.cs b/Items/Weapons/Terracotta.cs index 1f72436e5b..004552b08b 100644 --- a/Items/Weapons/Terracotta.cs +++ b/Items/Weapons/Terracotta.cs @@ -35,30 +35,15 @@ namespace CalamityMod.Items.Weapons public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit) { - float spread = 180f * 0.0174f; - double startAngle = Math.Atan2(item.shootSpeed, item.shootSpeed) - spread / 2; - double deltaAngle = spread / 8f; - double offsetAngle; - int i; if (target.life <= 0) { - for (i = 0; i < 1; i++) - { - float randomSpeedX = (float)Main.rand.Next(3); - float randomSpeedY = (float)Main.rand.Next(3, 5); - offsetAngle = (startAngle + deltaAngle * (i + i * i) / 2f) + 32f * i; - int projectile1 = Projectile.NewProjectile(target.Center.X, target.Center.Y, (float)(Math.Sin(offsetAngle) * 5f), (float)(Math.Cos(offsetAngle) * 5f), mod.ProjectileType("Terracotta"), 0, 0f, Main.myPlayer); - int projectile2 = Projectile.NewProjectile(target.Center.X, target.Center.Y, (float)(-Math.Sin(offsetAngle) * 5f), (float)(-Math.Cos(offsetAngle) * 5f), mod.ProjectileType("Terracotta"), 0, 0f, Main.myPlayer); - int projectile3 = Projectile.NewProjectile(target.Center.X, target.Center.Y, (float)(-Math.Sin(offsetAngle) * 5f), (float)(-Math.Cos(offsetAngle) * 5f), mod.ProjectileType("Terracotta"), 0, 0f, Main.myPlayer); - Main.projectile[projectile1].velocity.X = -randomSpeedX; - Main.projectile[projectile1].velocity.Y = -randomSpeedY; - Main.projectile[projectile2].velocity.X = randomSpeedX; - Main.projectile[projectile2].velocity.Y = -randomSpeedY; - Main.projectile[projectile3].velocity.X = 0f; - Main.projectile[projectile3].velocity.Y = -randomSpeedY; - } + float randomSpeedX = (float)Main.rand.Next(3); + float randomSpeedY = (float)Main.rand.Next(3, 5); + Projectile.NewProjectile(target.Center.X, target.Center.Y, -randomSpeedX, -randomSpeedY, mod.ProjectileType("Terracotta"), 0, 0f, player.whoAmI); + Projectile.NewProjectile(target.Center.X, target.Center.Y, randomSpeedX, -randomSpeedY, mod.ProjectileType("Terracotta"), 0, 0f, player.whoAmI); + Projectile.NewProjectile(target.Center.X, target.Center.Y, 0f, -randomSpeedY, mod.ProjectileType("Terracotta"), 0, 0f, player.whoAmI); } - Projectile.NewProjectile(target.Center.X, target.Center.Y, 0f, 0f, mod.ProjectileType("TerracottaExplosion"), (int)((float)item.damage * player.meleeDamage), knockback, Main.myPlayer); + Projectile.NewProjectile(target.Center.X, target.Center.Y, 0f, 0f, mod.ProjectileType("TerracottaExplosion"), (int)((float)item.damage * player.meleeDamage), knockback, player.whoAmI); } public override void MeleeEffects(Player player, Rectangle hitbox) diff --git a/Items/Weapons/TomeofFates.cs b/Items/Weapons/TomeofFates.cs index 50e16b4b8b..1be6f9bdf9 100644 --- a/Items/Weapons/TomeofFates.cs +++ b/Items/Weapons/TomeofFates.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons public override void SetDefaults() { - item.damage = 92; + item.damage = 120; item.magic = true; item.mana = 8; item.width = 28; diff --git a/Items/Weapons/Yharon/DragonsBreath.cs b/Items/Weapons/Yharon/DragonsBreath.cs index cdab8721fb..104b58169e 100644 --- a/Items/Weapons/Yharon/DragonsBreath.cs +++ b/Items/Weapons/Yharon/DragonsBreath.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Yharon public override void SetDefaults() { - item.damage = 220; + item.damage = 320; item.ranged = true; item.width = 64; item.height = 28; diff --git a/Items/Yharon/YharonBag.cs b/Items/Yharon/YharonBag.cs index f9c597822a..e3a5808232 100644 --- a/Items/Yharon/YharonBag.cs +++ b/Items/Yharon/YharonBag.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.Utilities; namespace CalamityMod.Items.Yharon { @@ -41,7 +42,7 @@ namespace CalamityMod.Items.Yharon DropHelper.DropItemChance(player, mod.ItemType("DragonsBreath"), 3); DropHelper.DropItemChance(player, mod.ItemType("ChickenCannon"), 3); DropHelper.DropItemChance(player, mod.ItemType("PhoenixFlameBarrage"), 3); - DropHelper.DropItemChance(player, mod.ItemType("AngryChickenStaff"), 3); + DropHelper.DropItemChance(player, mod.ItemType("AngryChickenStaff"), 3); // Yharon Kindle Staff DropHelper.DropItemChance(player, mod.ItemType("ProfanedTrident"), 3); // Infernal Spear // Equipment diff --git a/CalamityLocalization.cs b/Localization/CalamityLocalization.cs similarity index 99% rename from CalamityLocalization.cs rename to Localization/CalamityLocalization.cs index 8a3bfd9933..86adc88772 100644 --- a/CalamityLocalization.cs +++ b/Localization/CalamityLocalization.cs @@ -1,6 +1,6 @@ using Terraria.ModLoader; -namespace CalamityMod +namespace CalamityMod.Localization { public class CalamityLocalization { diff --git a/MiscModSupport/ModSupport.cs b/MiscModSupport/ModSupport.cs new file mode 100644 index 0000000000..585b99a659 --- /dev/null +++ b/MiscModSupport/ModSupport.cs @@ -0,0 +1,545 @@ +using System; + +using Terraria; +using Terraria.ModLoader; + +using CalamityMod.World; +using CalamityMod.CalPlayer; + +namespace CalamityMod.MiscModSupport +{ + public class ModSupport + { + #region Boss / Event Downed + /// + /// Returns whether the Calamity boss or event corresponding to the given string has been defeated. + /// + /// The boss or event name to check. Many aliases are accepted. + /// Whether the boss or event has been defeated. + public static bool GetBossDowned(string boss) + { + switch (boss.ToLower()) + { + default: return false; + + case "desertscourge": + case "desert scourge": return CalamityWorld.downedDesertScourge; + + case "crabulon": return CalamityWorld.downedCrabulon; + + case "hivemind": + case "hive mind": + case "thehivemind": + case "the hive mind": return CalamityWorld.downedHiveMind; + + case "perforator": + case "perforators": + case "theperforators": + case "the perforators": + case "perforatorhive": + case "perforator hive": + case "theperforatorhive": + case "the perforator hive": return CalamityWorld.downedPerforator; + + case "slimegod": + case "slime god": + case "theslimegod": + case "the slime god": return CalamityWorld.downedSlimeGod; + + case "cryogen": return CalamityWorld.downedCryogen; + + case "brimstoneelemental": + case "brimstone elemental": return CalamityWorld.downedBrimstoneElemental; + + case "calamitas": + case "clone": + case "calamitasclone": + case "calamitas clone": + case "clonelamitas": + case "calamitasdoppelganger": + case "calamitas doppelganger": return CalamityWorld.downedCalamitas; + + case "siren": + case "thesiren": + case "the siren": + case "leviathan": + case "theleviathan": + case "the leviathan": + case "sirenleviathan": + case "siren leviathan": + case "sirenandleviathan": + case "siren and leviathan": + case "the siren and the leviathan": return CalamityWorld.downedLeviathan; + + case "aureus": + case "astrumaureus": + case "astrum aureus": return CalamityWorld.downedAstrageldon; + + case "pbg": + case "plaguebringer": + case "plaguebringergoliath": + case "plaguebringer goliath": + case "theplaguebringergoliath": + case "the plaguebringer goliath": return CalamityWorld.downedPlaguebringer; + + case "ravager": return CalamityWorld.downedScavenger; + + case "astrumdeus": + case "astrum deus": return CalamityWorld.downedStarGod; + + case "guardians": + case "donuts": + case "profanedguardians": + case "profaned guardians": + case "theprofanedguardians": + case "the profaned guardians": return CalamityWorld.downedGuardians; + + case "bumblebirb": + case "bumblefuck": return CalamityWorld.downedBumble; + + case "providence": + case "providencetheprofanedgoddess": + case "providence the profaned goddess": + case "providence, the profaned goddess": return CalamityWorld.downedProvidence; + + case "polterghast": + case "necroghast": + case "necroplasm": return CalamityWorld.downedPolterghast; + + case "sentinel1": // backwards compatibility + case "void": + case "ceaselessvoid": + case "ceaseless void": return CalamityWorld.downedSentinel1; + + case "sentinel2": // backwards compatibility + case "stormweaver": + case "storm weaver": return CalamityWorld.downedSentinel2; + + case "sentinel3": // backwards compatibility + case "cosmicwraith": + case "cosmic wraith": + case "signus": + case "signusenvoyofthedevourer": + case "signus envoy of the devourer": + case "signus, envoy of the devourer": return CalamityWorld.downedSentinel3; + + case "sentinelany": // backwards compatibility + case "anysentinel": + case "any sentinel": + case "onesentinel": + case "one sentinel": + case "sentinel": return (CalamityWorld.downedSentinel1 || CalamityWorld.downedSentinel2 || CalamityWorld.downedSentinel3); + + case "sentinelall": // backwards compatibility + case "sentinels": + case "allsentinel": + case "allsentinels": + case "all sentinels": return (CalamityWorld.downedSentinel1 && CalamityWorld.downedSentinel2 && CalamityWorld.downedSentinel3); + + case "dog": + case "devourerofgods": + case "devourer of gods": + case "thedevourerofgods": + case "the devourer of gods": return CalamityWorld.downedDoG; + + case "yharon": + case "jungledragonyharon": + case "jungle dragon yharon": + case "jungle dragon, yharon": return CalamityWorld.downedYharon; + + case "scal": + case "supremecalamitas": + case "supreme calamitas": return CalamityWorld.downedSCal; + } + } + #endregion + + #region Player in Zone / Area + /// + /// Returns whether the specified player is in the Calamity biome or area corresponding to the given string. + /// + /// The player whose locale is being questioned. + /// The zone or area name to check. Many aliases are accepted. + /// Whether the player is currently in the zone. + public static bool GetInZone(Player p, string zone) + { + Mod calamity = ModLoader.GetMod("CalamityMod"); + CalamityPlayer mp = p.GetModPlayer(calamity); + switch (zone.ToLower()) + { + default: return false; + + case "calamity": // backwards compatibility + case "calamitybiome": + case "calamity biome": + case "crag": + case "crags": + + case "profanedcrag": // remove these four when the actual profaned biome is added + case "profaned crag": + case "profanedcrags": + case "profaned crags": + + case "brimstone": + case "brimstonecrag": + case "brimstone crag": + case "brimstonecrags": + case "brimstone crags": return mp.ZoneCalamity; + + case "astral": + case "astralbiome": + case "astral biome": + case "astralinfection": + case "astral infection": return mp.ZoneAstral; + + case "sunkensea": + case "sunken sea": + case "thesunkensea": + case "the sunken sea": return mp.ZoneSunkenSea; + + case "sulfur": + case "sulphur": + case "sulfursea": + case "sulfur sea": + case "sulphursea": + case "sulphur sea": + case "sulfuroussea": + case "sulfurous sea": + case "sulphuroussea": + case "sulphurous sea": return mp.ZoneSulphur; + + case "abyss": + case "theabyss": + case "the abyss": + case "anyabyss": + case "any abyss": + case "abyssany": + case "any abyss layer": return mp.ZoneAbyss; + + case "abyss1": + case "abyss 1": + case "abyss_1": + case "layer1": + case "layer 1": + case "layer_1": + case "abysslayer1": + case "abyss layer 1": return mp.ZoneAbyssLayer1; + + case "abyss2": + case "abyss 2": + case "abyss_2": + case "layer2": + case "layer 2": + case "layer_2": + case "abysslayer2": + case "abyss layer 2": return mp.ZoneAbyssLayer2; + + case "abyss3": + case "abyss 3": + case "abyss_3": + case "layer3": + case "layer 3": + case "layer_3": + case "abysslayer3": + case "abyss layer 3": return mp.ZoneAbyssLayer3; + + case "abyss4": + case "abyss 4": + case "abyss_4": + case "layer4": + case "layer 4": + case "layer_4": + case "abysslayer4": + case "abyss layer 4": return mp.ZoneAbyssLayer4; + } + } + #endregion + + #region Difficulty Modes + /// + /// Returns whether the Calamity difficulty modifier corresponding to the given string is currently active. + /// + /// The difficulty modifier to check for. + /// Whether the difficulty is currently active. + public static bool GetDifficultyActive(string difficulty) + { + switch (difficulty.ToLower()) + { + default: return false; + + case "revengeance": + case "rev": + case "revengeancemode": + case "revengeance mode": return CalamityWorld.revenge; + + case "death": + case "deathmode": + case "death mode": return CalamityWorld.death; + + case "defiled": + case "defiledrune": + case "defiled rune": + case "defiledmode": + case "defiled mode": return CalamityWorld.defiled; + + case "armageddon": + case "arma": + case "instakill": + case "instagib": + case "armageddonmode": + case "armageddon mode": return CalamityWorld.armageddon; + + case "ironheart": + case "iron heart": + case "steelsoul": + case "steel soul": + case "permadeath": return CalamityWorld.ironHeart; + } + } + #endregion + + #region Player Armor Set Bonuses + /// + /// Returns whether the specified player has the set bonus corresponding to the given string. + /// + /// The player whose set bonuses are being questioned. + /// The set bonus to check for. + /// Whether the player currently has the set bonus. + public static bool GetSetBonus(Player p, string setBonus) + { + Mod calamity = ModLoader.GetMod("CalamityMod"); + CalamityPlayer mp = p.GetModPlayer(calamity); + + setBonus = setBonus.ToLower(); + + // Victide + if (setBonus == "victide" || setBonus.StartsWith("victide_") || setBonus.StartsWith("victide ")) + return mp.victideSet; + + // Aerospec + if (setBonus == "aerospec" || setBonus.StartsWith("aerospec_") || setBonus.StartsWith("aerospec ")) + return mp.aeroSet; + + // Statigel + if (setBonus == "statigel" || setBonus.StartsWith("statigel_") || setBonus.StartsWith("statigel ")) + return mp.statigelSet; + + // Mollusk + if (setBonus == "mollusk") + return mp.molluskSet; + + // Daedalus + switch (setBonus) + { + default: break; + case "daedalus": return mp.daedalusReflect || mp.daedalusShard || mp.daedalusAbsorb || mp.daedalusCrystal || mp.daedalusSplit; + case "daedalus_melee": + case "daedalus melee": return mp.daedalusReflect; + case "daedalus_ranged": + case "daedalus ranged": return mp.daedalusShard; + case "daedalus_magic": + case "daedalus magic": return mp.daedalusAbsorb; + case "daedalus_summon": + case "daedalus summon": return mp.daedalusCrystal; + case "daedalus_rogue": + case "daedalus rogue": return mp.daedalusSplit; + } + + // Reaver + switch (setBonus) + { + default: break; + case "reaver": return mp.reaverBlast || mp.reaverDoubleTap || mp.reaverBurst || mp.reaverOrb || mp.reaverSpore; + case "reaver_melee": + case "reaver melee": return mp.reaverBlast; + case "reaver_ranged": + case "reaver ranged": return mp.reaverDoubleTap; + case "reaver_magic": + case "reaver magic": return mp.reaverBurst; + case "reaver_summon": + case "reaver summon": return mp.reaverOrb; + case "reaver_rogue": + case "reaver rogue": return mp.reaverSpore; + } + + // Ataxia + switch (setBonus) + { + default: break; + case "ataxia": return mp.ataxiaBlaze; + case "ataxia_melee": + case "ataxia melee": return mp.ataxiaGeyser; + case "ataxia_ranged": + case "ataxia ranged": return mp.ataxiaBolt; + case "ataxia_magic": + case "ataxia magic": return mp.ataxiaMage; + case "ataxia_summon": + case "ataxia summon": return mp.chaosSpirit; + case "ataxia_rogue": + case "ataxia rogue": return mp.ataxiaVolley; + } + + // Astral + if (setBonus == "astral") + return mp.astralStarRain; + + // Xeroc + if (setBonus == "xeroc") + return mp.xerocSet; + + // Tarragon + switch (setBonus) + { + default: break; + case "tarragon": return mp.tarraSet; + case "tarragon_melee": + case "tarragon melee": return mp.tarraMelee; + case "tarragon_ranged": + case "tarragon ranged": return mp.tarraRanged; + case "tarragon_magic": + case "tarragon magic": return mp.tarraMage; + case "tarragon_summon": + case "tarragon summon": return mp.tarraSummon; + case "tarragon_rogue": + case "tarragon rogue": return mp.tarraThrowing; + } + + // Bloodflare + switch (setBonus) + { + default: break; + case "bloodflare": return mp.bloodflareSet; + case "bloodflare_melee": + case "bloodflare melee": return mp.bloodflareMelee; + case "bloodflare_ranged": + case "bloodflare ranged": return mp.bloodflareRanged; + case "bloodflare_magic": + case "bloodflare magic": return mp.bloodflareMage; + case "bloodflare_summon": + case "bloodflare summon": return mp.bloodflareSummon; + case "bloodflare_rogue": + case "bloodflare rogue": return mp.bloodflareThrowing; + } + + // Omega Blue + if (setBonus == "omegablue" || setBonus == "omega blue") + return mp.omegaBlueSet; + + // God Slayer + switch (setBonus) + { + default: break; + case "godslayer": + case "god slayer": return mp.godSlayer; + case "godslayer_melee": + case "godslayer melee": + case "god slayer melee": return mp.godSlayerDamage; // melee helm's unique damage reducing property + case "godslayer_ranged": + case "godslayer ranged": + case "god slayer ranged": return mp.godSlayerRanged; + case "godslayer_magic": + case "godslayer magic": + case "god slayer magic": return mp.godSlayerMage; + case "godslayer_summon": + case "godslayer summon": + case "god slayer summon": return mp.godSlayerSummon; + case "godslayer_rogue": + case "godslayer rogue": + case "god slayer rogue": return mp.godSlayerThrowing; + } + + // Silva + switch (setBonus) + { + default: break; + case "silva": return mp.silvaSet; + case "silva_melee": + case "silva melee": return mp.silvaMelee; + case "silva_ranged": + case "silva ranged": return mp.silvaRanged; + case "silva_magic": + case "silva magic": return mp.silvaMage; + case "silva_summon": + case "silva summon": return mp.silvaSummon; + case "silva_rogue": + case "silva rogue": return mp.silvaThrowing; + } + + // Auric Tesla + if (setBonus == "auric" || setBonus == "aurictesla" || setBonus == "auric tesla") + return mp.auricSet; + + // Demonshade + if (setBonus == "demonshade") + return mp.dsSetBonus; + + return false; + } + #endregion + + #region Call + public static object Call(params object[] args) + { + if (args is null || args.Length <= 0) return new ArgumentNullException("ERROR: No function name specified. First argument must be a function name."); + if (!(args[0] is string)) return new ArgumentException("ERROR: First argument must be a string function name."); + + string methodName = args[0].ToString(); + Player p = null; + switch (methodName) + { + case "Downed": + case "GetDowned": + case "BossDowned": + case "GetBossDowned": + if (args.Length < 2) return new ArgumentNullException("ERROR: Must specify a boss or event name as a string."); + if (!(args[1] is string)) return new ArgumentException("ERROR: The argument to \"Downed\" must be a string."); + return GetBossDowned(args[1].ToString()); + + case "Zone": + case "GetZone": + case "InZone": + case "GetInZone": + if (args.Length < 2) return new ArgumentNullException("ERROR: Must specify both a Player object (or int index of a Player) and a zone name as a string."); + if (args.Length < 3) return new ArgumentNullException("ERROR: Must specify a zone name as a string."); + if (!(args[2] is string)) return new ArgumentException("ERROR: The second argument to \"InZone\" must be a string."); + if (!(args[1] is int) || !(args[1] is Player)) return new ArgumentException("ERROR: The first argument to \"InZone\" must be a Player or an int."); + + // If the argument is an int, get the corresponding player + if (args[1] is int) + p = Main.player[(int)args[1]]; + else if (args[1] is Player) + p = (Player)args[1]; + return GetInZone(p, args[2].ToString()); + + case "Difficulty": + case "GetDifficulty": + case "DifficultyActive": + case "GetDifficultyActive": + if (args.Length < 2) return new ArgumentNullException("ERROR: Must specify a difficulty modifier name as a string."); + if (!(args[1] is string)) return new ArgumentException("ERROR: The argument to \"Difficulty\" must be a string."); + return GetDifficultyActive(args[1].ToString()); + + case "SetBonus": + case "SetBonusActive": + case "HasSetBonus": + case "GetSetBonus": + case "GetSetBonusActive": + if (args.Length < 2) return new ArgumentNullException("ERROR: Must specify both a Player object (or int index of a Player) and a set bonus name as a string."); + if (args.Length < 3) return new ArgumentNullException("ERROR: Must specify a set bonus name as a string."); + if (!(args[2] is string)) return new ArgumentException("ERROR: The second argument to \"SetBonus\" must be a string."); + if (!(args[1] is int) || !(args[1] is Player)) return new ArgumentException("ERROR: The first argument to \"SetBonus\" must be a Player or an int."); + + // If the argument is an int, get the corresponding player + if (args[1] is int) + p = Main.player[(int)args[1]]; + else if (args[1] is Player) + p = (Player)args[1]; + return GetSetBonus(p, args[2].ToString()); + + default: + return new ArgumentException("ERROR: Invalid method name."); + } + } + #endregion + } +} diff --git a/WeakReferenceSupport.cs b/MiscModSupport/WeakReferenceSupport.cs similarity index 99% rename from WeakReferenceSupport.cs rename to MiscModSupport/WeakReferenceSupport.cs index a6344cce75..5a3a919629 100644 --- a/WeakReferenceSupport.cs +++ b/MiscModSupport/WeakReferenceSupport.cs @@ -3,7 +3,7 @@ using Terraria.ModLoader; using CalamityMod.World; -namespace CalamityMod +namespace CalamityMod.MiscModSupport { internal class WeakReferenceSupport { diff --git a/ModSupport.cs b/ModSupport.cs deleted file mode 100644 index 572ac37b7a..0000000000 --- a/ModSupport.cs +++ /dev/null @@ -1,544 +0,0 @@ -using System; - -using Terraria; -using Terraria.ModLoader; - -using CalamityMod.World; - -namespace CalamityMod -{ - public class ModSupport - { - #region Boss / Event Downed - /// - /// Returns whether the Calamity boss or event corresponding to the given string has been defeated. - /// - /// The boss or event name to check. Many aliases are accepted. - /// Whether the boss or event has been defeated. - public static bool GetBossDowned(string boss) - { - switch (boss.ToLower()) - { - default: return false; - - case "desertscourge": - case "desert scourge": return CalamityWorld.downedDesertScourge; - - case "crabulon": return CalamityWorld.downedCrabulon; - - case "hivemind": - case "hive mind": - case "thehivemind": - case "the hive mind": return CalamityWorld.downedHiveMind; - - case "perforator": - case "perforators": - case "theperforators": - case "the perforators": - case "perforatorhive": - case "perforator hive": - case "theperforatorhive": - case "the perforator hive": return CalamityWorld.downedPerforator; - - case "slimegod": - case "slime god": - case "theslimegod": - case "the slime god": return CalamityWorld.downedSlimeGod; - - case "cryogen": return CalamityWorld.downedCryogen; - - case "brimstoneelemental": - case "brimstone elemental": return CalamityWorld.downedBrimstoneElemental; - - case "calamitas": - case "clone": - case "calamitasclone": - case "calamitas clone": - case "clonelamitas": - case "calamitasdoppelganger": - case "calamitas doppelganger": return CalamityWorld.downedCalamitas; - - case "siren": - case "thesiren": - case "the siren": - case "leviathan": - case "theleviathan": - case "the leviathan": - case "sirenleviathan": - case "siren leviathan": - case "sirenandleviathan": - case "siren and leviathan": - case "the siren and the leviathan": return CalamityWorld.downedLeviathan; - - case "aureus": - case "astrumaureus": - case "astrum aureus": return CalamityWorld.downedAstrageldon; - - case "pbg": - case "plaguebringer": - case "plaguebringergoliath": - case "plaguebringer goliath": - case "theplaguebringergoliath": - case "the plaguebringer goliath": return CalamityWorld.downedPlaguebringer; - - case "ravager": return CalamityWorld.downedScavenger; - - case "astrumdeus": - case "astrum deus": return CalamityWorld.downedStarGod; - - case "guardians": - case "donuts": - case "profanedguardians": - case "profaned guardians": - case "theprofanedguardians": - case "the profaned guardians": return CalamityWorld.downedGuardians; - - case "bumblebirb": - case "bumblefuck": return CalamityWorld.downedBumble; - - case "providence": - case "providencetheprofanedgoddess": - case "providence the profaned goddess": - case "providence, the profaned goddess": return CalamityWorld.downedProvidence; - - case "polterghast": - case "necroghast": - case "necroplasm": return CalamityWorld.downedPolterghast; - - case "sentinel1": // backwards compatibility - case "void": - case "ceaselessvoid": - case "ceaseless void": return CalamityWorld.downedSentinel1; - - case "sentinel2": // backwards compatibility - case "stormweaver": - case "storm weaver": return CalamityWorld.downedSentinel2; - - case "sentinel3": // backwards compatibility - case "cosmicwraith": - case "cosmic wraith": - case "signus": - case "signusenvoyofthedevourer": - case "signus envoy of the devourer": - case "signus, envoy of the devourer": return CalamityWorld.downedSentinel3; - - case "sentinelany": // backwards compatibility - case "anysentinel": - case "any sentinel": - case "onesentinel": - case "one sentinel": - case "sentinel": return (CalamityWorld.downedSentinel1 || CalamityWorld.downedSentinel2 || CalamityWorld.downedSentinel3); - - case "sentinelall": // backwards compatibility - case "sentinels": - case "allsentinel": - case "allsentinels": - case "all sentinels": return (CalamityWorld.downedSentinel1 && CalamityWorld.downedSentinel2 && CalamityWorld.downedSentinel3); - - case "dog": - case "devourerofgods": - case "devourer of gods": - case "thedevourerofgods": - case "the devourer of gods": return CalamityWorld.downedDoG; - - case "yharon": - case "jungledragonyharon": - case "jungle dragon yharon": - case "jungle dragon, yharon": return CalamityWorld.downedYharon; - - case "scal": - case "supremecalamitas": - case "supreme calamitas": return CalamityWorld.downedSCal; - } - } - #endregion - - #region Player in Zone / Area - /// - /// Returns whether the specified player is in the Calamity biome or area corresponding to the given string. - /// - /// The player whose locale is being questioned. - /// The zone or area name to check. Many aliases are accepted. - /// Whether the player is currently in the zone. - public static bool GetInZone(Player p, string zone) - { - Mod calamity = ModLoader.GetMod("CalamityMod"); - CalamityPlayer mp = p.GetModPlayer(calamity); - switch (zone.ToLower()) - { - default: return false; - - case "calamity": // backwards compatibility - case "calamitybiome": - case "calamity biome": - case "crag": - case "crags": - - case "profanedcrag": // remove these four when the actual profaned biome is added - case "profaned crag": - case "profanedcrags": - case "profaned crags": - - case "brimstone": - case "brimstonecrag": - case "brimstone crag": - case "brimstonecrags": - case "brimstone crags": return mp.ZoneCalamity; - - case "astral": - case "astralbiome": - case "astral biome": - case "astralinfection": - case "astral infection": return mp.ZoneAstral; - - case "sunkensea": - case "sunken sea": - case "thesunkensea": - case "the sunken sea": return mp.ZoneSunkenSea; - - case "sulfur": - case "sulphur": - case "sulfursea": - case "sulfur sea": - case "sulphursea": - case "sulphur sea": - case "sulfuroussea": - case "sulfurous sea": - case "sulphuroussea": - case "sulphurous sea": return mp.ZoneSulphur; - - case "abyss": - case "theabyss": - case "the abyss": - case "anyabyss": - case "any abyss": - case "abyssany": - case "any abyss layer": return mp.ZoneAbyss; - - case "abyss1": - case "abyss 1": - case "abyss_1": - case "layer1": - case "layer 1": - case "layer_1": - case "abysslayer1": - case "abyss layer 1": return mp.ZoneAbyssLayer1; - - case "abyss2": - case "abyss 2": - case "abyss_2": - case "layer2": - case "layer 2": - case "layer_2": - case "abysslayer2": - case "abyss layer 2": return mp.ZoneAbyssLayer2; - - case "abyss3": - case "abyss 3": - case "abyss_3": - case "layer3": - case "layer 3": - case "layer_3": - case "abysslayer3": - case "abyss layer 3": return mp.ZoneAbyssLayer3; - - case "abyss4": - case "abyss 4": - case "abyss_4": - case "layer4": - case "layer 4": - case "layer_4": - case "abysslayer4": - case "abyss layer 4": return mp.ZoneAbyssLayer4; - } - } - #endregion - - #region Difficulty Modes - /// - /// Returns whether the Calamity difficulty modifier corresponding to the given string is currently active. - /// - /// The difficulty modifier to check for. - /// Whether the difficulty is currently active. - public static bool GetDifficultyActive(string difficulty) - { - switch (difficulty.ToLower()) - { - default: return false; - - case "revengeance": - case "rev": - case "revengeancemode": - case "revengeance mode": return CalamityWorld.revenge; - - case "death": - case "deathmode": - case "death mode": return CalamityWorld.death; - - case "defiled": - case "defiledrune": - case "defiled rune": - case "defiledmode": - case "defiled mode": return CalamityWorld.defiled; - - case "armageddon": - case "arma": - case "instakill": - case "instagib": - case "armageddonmode": - case "armageddon mode": return CalamityWorld.armageddon; - - case "ironheart": - case "iron heart": - case "steelsoul": - case "steel soul": - case "permadeath": return CalamityWorld.ironHeart; - } - } - #endregion - - #region Player Armor Set Bonuses - /// - /// Returns whether the specified player has the set bonus corresponding to the given string. - /// - /// The player whose set bonuses are being questioned. - /// The set bonus to check for. - /// Whether the player currently has the set bonus. - public static bool GetSetBonus(Player p, string setBonus) - { - Mod calamity = ModLoader.GetMod("CalamityMod"); - CalamityPlayer mp = p.GetModPlayer(calamity); - - setBonus = setBonus.ToLower(); - - // Victide - if (setBonus == "victide" || setBonus.StartsWith("victide_") || setBonus.StartsWith("victide ")) - return mp.victideSet; - - // Aerospec - if (setBonus == "aerospec" || setBonus.StartsWith("aerospec_") || setBonus.StartsWith("aerospec ")) - return mp.aeroSet; - - // Statigel - if (setBonus == "statigel" || setBonus.StartsWith("statigel_") || setBonus.StartsWith("statigel ")) - return mp.statigelSet; - - // Mollusk - if (setBonus == "mollusk") - return mp.molluskSet; - - // Daedalus - switch(setBonus) - { - default: break; - case "daedalus": return mp.daedalusReflect || mp.daedalusShard || mp.daedalusAbsorb || mp.daedalusCrystal || mp.daedalusSplit; - case "daedalus_melee": - case "daedalus melee": return mp.daedalusReflect; - case "daedalus_ranged": - case "daedalus ranged": return mp.daedalusShard; - case "daedalus_magic": - case "daedalus magic": return mp.daedalusAbsorb; - case "daedalus_summon": - case "daedalus summon": return mp.daedalusCrystal; - case "daedalus_rogue": - case "daedalus rogue": return mp.daedalusSplit; - } - - // Reaver - switch(setBonus) - { - default: break; - case "reaver": return mp.reaverBlast || mp.reaverDoubleTap || mp.reaverBurst || mp.reaverOrb || mp.reaverSpore; - case "reaver_melee": - case "reaver melee": return mp.reaverBlast; - case "reaver_ranged": - case "reaver ranged": return mp.reaverDoubleTap; - case "reaver_magic": - case "reaver magic": return mp.reaverBurst; - case "reaver_summon": - case "reaver summon": return mp.reaverOrb; - case "reaver_rogue": - case "reaver rogue": return mp.reaverSpore; - } - - // Ataxia - switch (setBonus) - { - default: break; - case "ataxia": return mp.ataxiaBlaze; - case "ataxia_melee": - case "ataxia melee": return mp.ataxiaGeyser; - case "ataxia_ranged": - case "ataxia ranged": return mp.ataxiaBolt; - case "ataxia_magic": - case "ataxia magic": return mp.ataxiaMage; - case "ataxia_summon": - case "ataxia summon": return mp.chaosSpirit; - case "ataxia_rogue": - case "ataxia rogue": return mp.ataxiaVolley; - } - - // Astral - if (setBonus == "astral") - return mp.astralStarRain; - - // Xeroc - if (setBonus == "xeroc") - return mp.xerocSet; - - // Tarragon - switch(setBonus) - { - default: break; - case "tarragon": return mp.tarraSet; - case "tarragon_melee": - case "tarragon melee": return mp.tarraMelee; - case "tarragon_ranged": - case "tarragon ranged": return mp.tarraRanged; - case "tarragon_magic": - case "tarragon magic": return mp.tarraMage; - case "tarragon_summon": - case "tarragon summon": return mp.tarraSummon; - case "tarragon_rogue": - case "tarragon rogue": return mp.tarraThrowing; - } - - // Bloodflare - switch (setBonus) - { - default: break; - case "bloodflare": return mp.bloodflareSet; - case "bloodflare_melee": - case "bloodflare melee": return mp.bloodflareMelee; - case "bloodflare_ranged": - case "bloodflare ranged": return mp.bloodflareRanged; - case "bloodflare_magic": - case "bloodflare magic": return mp.bloodflareMage; - case "bloodflare_summon": - case "bloodflare summon": return mp.bloodflareSummon; - case "bloodflare_rogue": - case "bloodflare rogue": return mp.bloodflareThrowing; - } - - // Omega Blue - if (setBonus == "omegablue" || setBonus == "omega blue") - return mp.omegaBlueSet; - - // God Slayer - switch (setBonus) - { - default: break; - case "godslayer": - case "god slayer": return mp.godSlayer; - case "godslayer_melee": - case "godslayer melee": - case "god slayer melee": return mp.godSlayerDamage; // melee helm's unique damage reducing property - case "godslayer_ranged": - case "godslayer ranged": - case "god slayer ranged": return mp.godSlayerRanged; - case "godslayer_magic": - case "godslayer magic": - case "god slayer magic": return mp.godSlayerMage; - case "godslayer_summon": - case "godslayer summon": - case "god slayer summon": return mp.godSlayerSummon; - case "godslayer_rogue": - case "godslayer rogue": - case "god slayer rogue": return mp.godSlayerThrowing; - } - - // Silva - switch (setBonus) - { - default: break; - case "silva": return mp.silvaSet; - case "silva_melee": - case "silva melee": return mp.silvaMelee; - case "silva_ranged": - case "silva ranged": return mp.silvaRanged; - case "silva_magic": - case "silva magic": return mp.silvaMage; - case "silva_summon": - case "silva summon": return mp.silvaSummon; - case "silva_rogue": - case "silva rogue": return mp.silvaThrowing; - } - - // Auric Tesla - if (setBonus == "auric" || setBonus == "aurictesla" || setBonus == "auric tesla") - return mp.auricSet; - - // Demonshade - if (setBonus == "demonshade") - return mp.dsSetBonus; - - return false; - } - #endregion - - #region Call - public static object Call(params object[] args) - { - if (args is null || args.Length <= 0) return new ArgumentNullException("ERROR: No function name specified. First argument must be a function name."); - if (!(args[0] is string)) return new ArgumentException("ERROR: First argument must be a string function name."); - - string methodName = args[0].ToString(); - Player p = null; - switch (methodName) - { - case "Downed": - case "GetDowned": - case "BossDowned": - case "GetBossDowned": - if (args.Length < 2) return new ArgumentNullException("ERROR: Must specify a boss or event name as a string."); - if (!(args[1] is string)) return new ArgumentException("ERROR: The argument to \"Downed\" must be a string."); - return GetBossDowned(args[1].ToString()); - - case "Zone": - case "GetZone": - case "InZone": - case "GetInZone": - if (args.Length < 2) return new ArgumentNullException("ERROR: Must specify both a Player object (or int index of a Player) and a zone name as a string."); - if (args.Length < 3) return new ArgumentNullException("ERROR: Must specify a zone name as a string."); - if (!(args[2] is string)) return new ArgumentException("ERROR: The second argument to \"InZone\" must be a string."); - if (!(args[1] is int) || !(args[1] is Player)) return new ArgumentException("ERROR: The first argument to \"InZone\" must be a Player or an int."); - - // If the argument is an int, get the corresponding player - if (args[1] is int) - p = Main.player[(int)args[1]]; - else if (args[1] is Player) - p = (Player)args[1]; - return GetInZone(p, args[2].ToString()); - - case "Difficulty": - case "GetDifficulty": - case "DifficultyActive": - case "GetDifficultyActive": - if (args.Length < 2) return new ArgumentNullException("ERROR: Must specify a difficulty modifier name as a string."); - if (!(args[1] is string)) return new ArgumentException("ERROR: The argument to \"Difficulty\" must be a string."); - return GetDifficultyActive(args[1].ToString()); - - case "SetBonus": - case "SetBonusActive": - case "HasSetBonus": - case "GetSetBonus": - case "GetSetBonusActive": - if (args.Length < 2) return new ArgumentNullException("ERROR: Must specify both a Player object (or int index of a Player) and a set bonus name as a string."); - if (args.Length < 3) return new ArgumentNullException("ERROR: Must specify a set bonus name as a string."); - if (!(args[2] is string)) return new ArgumentException("ERROR: The second argument to \"SetBonus\" must be a string."); - if (!(args[1] is int) || !(args[1] is Player)) return new ArgumentException("ERROR: The first argument to \"SetBonus\" must be a Player or an int."); - - // If the argument is an int, get the corresponding player - if (args[1] is int) - p = Main.player[(int)args[1]]; - else if (args[1] is Player) - p = (Player)args[1]; - return GetSetBonus(p, args[2].ToString()); - - default: - return new ArgumentException("ERROR: Invalid method name."); - } - } - #endregion - } -} diff --git a/NPCs/AbyssNPCs/AquaticParasite.cs b/NPCs/AbyssNPCs/AquaticParasite.cs index 0b2253025d..7dc27b1c41 100644 --- a/NPCs/AbyssNPCs/AquaticParasite.cs +++ b/NPCs/AbyssNPCs/AquaticParasite.cs @@ -4,6 +4,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.AbyssNPCs { @@ -46,15 +47,6 @@ namespace CalamityMod.NPCs.AbyssNPCs { flag15 = true; } - else - { - npc.dontTakeDamage = false; - } - float num262 = 1f; - if (flag15) - { - num262 += 0.5f; - } if (npc.direction == 0) { npc.TargetClosest(true); @@ -103,24 +95,19 @@ namespace CalamityMod.NPCs.AbyssNPCs } } bool flag16 = false; - if (!npc.friendly) + if (!Main.player[npc.target].dead) { - npc.TargetClosest(false); - if (!Main.player[npc.target].dead) - { - flag16 = true; - } + flag16 = true; } if (flag16) { - npc.localAI[2] = 1f; npc.rotation = (float)Math.Atan2((double)npc.velocity.Y, (double)npc.velocity.X) + 1.57f; npc.velocity *= 0.975f; - float num263 = 3.2f; + float num263 = 2f; if (npc.velocity.X > -num263 && npc.velocity.X < num263 && npc.velocity.Y > -num263 && npc.velocity.Y < num263) { npc.TargetClosest(true); - float num264 = 15f; + float num264 = 12f; Vector2 vector31 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); float num265 = Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2) - vector31.X; float num266 = Main.player[npc.target].position.Y + (float)(Main.player[npc.target].height / 2) - vector31.Y; @@ -130,12 +117,10 @@ namespace CalamityMod.NPCs.AbyssNPCs num266 *= num267; npc.velocity.X = num265; npc.velocity.Y = num266; - return; } } else { - npc.localAI[2] = 0f; npc.velocity.X = npc.velocity.X + (float)npc.direction * 0.02f; npc.rotation = npc.velocity.X * 0.4f; if (npc.velocity.X < -1f || npc.velocity.X > 1f) @@ -190,7 +175,6 @@ namespace CalamityMod.NPCs.AbyssNPCs if ((double)npc.velocity.Y > 1.2 || (double)npc.velocity.Y < -1.2) { npc.velocity.Y = npc.velocity.Y * 0.99f; - return; } } } diff --git a/NPCs/AbyssNPCs/AquaticScourgeHead.cs b/NPCs/AbyssNPCs/AquaticScourgeHead.cs index 7c6bd8ab0f..083d7683d8 100644 --- a/NPCs/AbyssNPCs/AquaticScourgeHead.cs +++ b/NPCs/AbyssNPCs/AquaticScourgeHead.cs @@ -5,6 +5,8 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.CalPlayer; +using CalamityMod.Utilities; namespace CalamityMod.NPCs.AbyssNPCs { @@ -29,8 +31,8 @@ namespace CalamityMod.NPCs.AbyssNPCs { npc.npcSlots = 16f; npc.damage = 100; - npc.width = 100; //36 - npc.height = 90; //20 + npc.width = 100; + npc.height = 90; npc.defense = 20; npc.aiStyle = -1; aiType = -1; @@ -546,8 +548,8 @@ namespace CalamityMod.NPCs.AbyssNPCs DropHelper.DropItem(npc, ItemID.GreaterHealingPotion, 8, 14); // there is no Aquatic Scourge trophy yet - DropHelper.DropItemCondition(npc, mod.ItemType("Knowledge27"), true, !CalamityWorld.downedAquaticScourge); - DropHelper.DropItemCondition(npc, mod.ItemType("Knowledge35"), true, !CalamityWorld.downedAquaticScourge); + DropHelper.DropItemCondition(npc, mod.ItemType("KnowledgeAquaticScourge"), true, !CalamityWorld.downedAquaticScourge); + DropHelper.DropItemCondition(npc, mod.ItemType("KnowledgeSulphurSea"), true, !CalamityWorld.downedAquaticScourge); DropHelper.DropResidentEvilAmmo(npc, CalamityWorld.downedAquaticScourge, 4, 2, 1); // All other drops are contained in the bag, so they only drop directly on Normal diff --git a/NPCs/AbyssNPCs/AquaticSeekerBody.cs b/NPCs/AbyssNPCs/AquaticSeekerBody.cs index 10d36631da..81641080c7 100644 --- a/NPCs/AbyssNPCs/AquaticSeekerBody.cs +++ b/NPCs/AbyssNPCs/AquaticSeekerBody.cs @@ -8,9 +8,6 @@ namespace CalamityMod.NPCs.AbyssNPCs { public class AquaticSeekerBody : ModNPC { - public float speed = 6f; //10 - public float turnSpeed = 0.1f; //0.15 - public override void SetStaticDefaults() { DisplayName.SetDefault("Aquatic Seeker"); @@ -97,32 +94,10 @@ namespace CalamityMod.NPCs.AbyssNPCs npc.alpha = 0; } } - 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; - int num183 = (int)((npc.position.Y + (float)npc.height) / 16f) + 2; - if (num180 < 0) - { - num180 = 0; - } - if (num181 > Main.maxTilesX) - { - num181 = Main.maxTilesX; - } - if (num182 < 0) - { - num182 = 0; - } - if (num183 > Main.maxTilesY) - { - num183 = Main.maxTilesY; - } if (Main.player[npc.target].dead) { npc.TargetClosest(false); } - float num188 = speed; - float num189 = turnSpeed; Vector2 vector18 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); float num191 = Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2); float num192 = Main.player[npc.target].position.Y + (float)(Main.player[npc.target].height / 2); @@ -133,138 +108,35 @@ namespace CalamityMod.NPCs.AbyssNPCs num191 -= vector18.X; num192 -= vector18.Y; float num193 = (float)System.Math.Sqrt((double)(num191 * num191 + num192 * num192)); - if (npc.ai[1] > 0f && npc.ai[1] < (float)Main.npc.Length) - { - try - { - vector18 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); - num191 = Main.npc[(int)npc.ai[1]].position.X + (float)(Main.npc[(int)npc.ai[1]].width / 2) - vector18.X; - num192 = Main.npc[(int)npc.ai[1]].position.Y + (float)(Main.npc[(int)npc.ai[1]].height / 2) - vector18.Y; - } - catch - { - } - npc.rotation = (float)System.Math.Atan2((double)num192, (double)num191) + 1.57f; - num193 = (float)System.Math.Sqrt((double)(num191 * num191 + num192 * num192)); - int num194 = npc.width; - num193 = (num193 - (float)num194) / num193; - num191 *= num193; - num192 *= num193; - npc.velocity = Vector2.Zero; - npc.position.X = npc.position.X + num191; - npc.position.Y = npc.position.Y + num192; - if (num191 < 0f) - { - npc.spriteDirection = 1; - } - else if (num191 > 0f) - { - npc.spriteDirection = -1; - } - } - else - { - num193 = (float)System.Math.Sqrt((double)(num191 * num191 + num192 * num192)); - float num196 = System.Math.Abs(num191); - float num197 = System.Math.Abs(num192); - float num198 = num188 / num193; - num191 *= num198; - num192 *= num198; - if ((npc.velocity.X > 0f && num191 > 0f) || (npc.velocity.X < 0f && num191 < 0f) || (npc.velocity.Y > 0f && num192 > 0f) || (npc.velocity.Y < 0f && num192 < 0f)) - { - if (npc.velocity.X < num191) - { - npc.velocity.X = npc.velocity.X + num189; - } - else - { - if (npc.velocity.X > num191) - { - npc.velocity.X = npc.velocity.X - num189; - } - } - if (npc.velocity.Y < num192) - { - npc.velocity.Y = npc.velocity.Y + num189; - } - else - { - if (npc.velocity.Y > num192) - { - npc.velocity.Y = npc.velocity.Y - num189; - } - } - if ((double)System.Math.Abs(num192) < (double)num188 * 0.2 && ((npc.velocity.X > 0f && num191 < 0f) || (npc.velocity.X < 0f && num191 > 0f))) - { - if (npc.velocity.Y > 0f) - { - npc.velocity.Y = npc.velocity.Y + num189 * 2f; - } - else - { - npc.velocity.Y = npc.velocity.Y - num189 * 2f; - } - } - if ((double)System.Math.Abs(num191) < (double)num188 * 0.2 && ((npc.velocity.Y > 0f && num192 < 0f) || (npc.velocity.Y < 0f && num192 > 0f))) - { - if (npc.velocity.X > 0f) - { - npc.velocity.X = npc.velocity.X + num189 * 2f; //changed from 2 - } - else - { - npc.velocity.X = npc.velocity.X - num189 * 2f; //changed from 2 - } - } - } - else - { - if (num196 > num197) - { - if (npc.velocity.X < num191) - { - npc.velocity.X = npc.velocity.X + num189 * 1.1f; //changed from 1.1 - } - else if (npc.velocity.X > num191) - { - npc.velocity.X = npc.velocity.X - num189 * 1.1f; //changed from 1.1 - } - if ((double)(System.Math.Abs(npc.velocity.X) + System.Math.Abs(npc.velocity.Y)) < (double)num188 * 0.5) - { - if (npc.velocity.Y > 0f) - { - npc.velocity.Y = npc.velocity.Y + num189; - } - else - { - npc.velocity.Y = npc.velocity.Y - num189; - } - } - } - else - { - if (npc.velocity.Y < num192) - { - npc.velocity.Y = npc.velocity.Y + num189 * 1.1f; - } - else if (npc.velocity.Y > num192) - { - npc.velocity.Y = npc.velocity.Y - num189 * 1.1f; - } - if ((double)(System.Math.Abs(npc.velocity.X) + System.Math.Abs(npc.velocity.Y)) < (double)num188 * 0.5) - { - if (npc.velocity.X > 0f) - { - npc.velocity.X = npc.velocity.X + num189; - } - else - { - npc.velocity.X = npc.velocity.X - num189; - } - } - } - } - } + if (npc.ai[1] > 0f && npc.ai[1] < (float)Main.npc.Length) + { + try + { + vector18 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); + num191 = Main.npc[(int)npc.ai[1]].position.X + (float)(Main.npc[(int)npc.ai[1]].width / 2) - vector18.X; + num192 = Main.npc[(int)npc.ai[1]].position.Y + (float)(Main.npc[(int)npc.ai[1]].height / 2) - vector18.Y; + } + catch + { + } + npc.rotation = (float)System.Math.Atan2((double)num192, (double)num191) + 1.57f; + num193 = (float)System.Math.Sqrt((double)(num191 * num191 + num192 * num192)); + int num194 = npc.width; + num193 = (num193 - (float)num194) / num193; + num191 *= num193; + num192 *= num193; + npc.velocity = Vector2.Zero; + npc.position.X = npc.position.X + num191; + npc.position.Y = npc.position.Y + num192; + if (num191 < 0f) + { + npc.spriteDirection = 1; + } + else if (num191 > 0f) + { + npc.spriteDirection = -1; + } + } } public override bool CheckActive() diff --git a/NPCs/AbyssNPCs/AquaticSeekerHead.cs b/NPCs/AbyssNPCs/AquaticSeekerHead.cs index c24231b176..303ec7fd2d 100644 --- a/NPCs/AbyssNPCs/AquaticSeekerHead.cs +++ b/NPCs/AbyssNPCs/AquaticSeekerHead.cs @@ -4,16 +4,16 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.AbyssNPCs { public class AquaticSeekerHead : ModNPC { - public bool flies = true; public const int minLength = 3; public const int maxLength = 4; - public float speed = 6f; //10 - public float turnSpeed = 0.1f; //0.15 + public float speed = 3f; //10 + public float turnSpeed = 0.05f; //0.15 bool TailSpawned = false; public override void SetStaticDefaults() @@ -87,26 +87,6 @@ namespace CalamityMod.NPCs.AbyssNPCs TailSpawned = true; } } - 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; - int num183 = (int)((npc.position.Y + (float)npc.height) / 16f) + 2; - if (num180 < 0) - { - num180 = 0; - } - if (num181 > Main.maxTilesX) - { - num181 = Main.maxTilesX; - } - if (num182 < 0) - { - num182 = 0; - } - if (num183 > Main.maxTilesY) - { - num183 = Main.maxTilesY; - } if (npc.velocity.X < 0f) { npc.spriteDirection = 1; @@ -115,8 +95,6 @@ namespace CalamityMod.NPCs.AbyssNPCs { npc.spriteDirection = -1; } - npc.localAI[1] = 0f; - bool canFly = flies; if (Main.player[npc.target].dead) { npc.TargetClosest(false); @@ -230,134 +208,101 @@ namespace CalamityMod.NPCs.AbyssNPCs num191 -= vector18.X; num192 -= vector18.Y; float num193 = (float)System.Math.Sqrt((double)(num191 * num191 + num192 * num192)); - if (npc.ai[1] > 0f && npc.ai[1] < (float)Main.npc.Length) + float num196 = System.Math.Abs(num191); + float num197 = System.Math.Abs(num192); + float num198 = num188 / num193; + num191 *= num198; + num192 *= num198; + if ((npc.velocity.X > 0f && num191 > 0f) || (npc.velocity.X < 0f && num191 < 0f) || (npc.velocity.Y > 0f && num192 > 0f) || (npc.velocity.Y < 0f && num192 < 0f)) { - try + if (npc.velocity.X < num191) { - vector18 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); - num191 = Main.npc[(int)npc.ai[1]].position.X + (float)(Main.npc[(int)npc.ai[1]].width / 2) - vector18.X; - num192 = Main.npc[(int)npc.ai[1]].position.Y + (float)(Main.npc[(int)npc.ai[1]].height / 2) - vector18.Y; + npc.velocity.X = npc.velocity.X + num189; } - catch + else { + if (npc.velocity.X > num191) + { + npc.velocity.X = npc.velocity.X - num189; + } } - npc.rotation = (float)System.Math.Atan2((double)num192, (double)num191) + 1.57f; - num193 = (float)System.Math.Sqrt((double)(num191 * num191 + num192 * num192)); - int num194 = npc.width; - num193 = (num193 - (float)num194) / num193; - num191 *= num193; - num192 *= num193; - npc.velocity = Vector2.Zero; - npc.position.X = npc.position.X + num191; - npc.position.Y = npc.position.Y + num192; - if (num191 < 0f) + if (npc.velocity.Y < num192) { - npc.spriteDirection = 1; + npc.velocity.Y = npc.velocity.Y + num189; } - else if (num191 > 0f) + else { - npc.spriteDirection = -1; + if (npc.velocity.Y > num192) + { + npc.velocity.Y = npc.velocity.Y - num189; + } + } + if ((double)System.Math.Abs(num192) < (double)num188 * 0.2 && ((npc.velocity.X > 0f && num191 < 0f) || (npc.velocity.X < 0f && num191 > 0f))) + { + if (npc.velocity.Y > 0f) + { + npc.velocity.Y = npc.velocity.Y + num189 * 2f; + } + else + { + npc.velocity.Y = npc.velocity.Y - num189 * 2f; + } + } + if ((double)System.Math.Abs(num191) < (double)num188 * 0.2 && ((npc.velocity.Y > 0f && num192 < 0f) || (npc.velocity.Y < 0f && num192 > 0f))) + { + if (npc.velocity.X > 0f) + { + npc.velocity.X = npc.velocity.X + num189 * 2f; //changed from 2 + } + else + { + npc.velocity.X = npc.velocity.X - num189 * 2f; //changed from 2 + } } } else { - num193 = (float)System.Math.Sqrt((double)(num191 * num191 + num192 * num192)); - float num196 = System.Math.Abs(num191); - float num197 = System.Math.Abs(num192); - float num198 = num188 / num193; - num191 *= num198; - num192 *= num198; - if ((npc.velocity.X > 0f && num191 > 0f) || (npc.velocity.X < 0f && num191 < 0f) || (npc.velocity.Y > 0f && num192 > 0f) || (npc.velocity.Y < 0f && num192 < 0f)) + if (num196 > num197) { if (npc.velocity.X < num191) { - npc.velocity.X = npc.velocity.X + num189; + npc.velocity.X = npc.velocity.X + num189 * 1.1f; //changed from 1.1 } - else + else if (npc.velocity.X > num191) { - if (npc.velocity.X > num191) - { - npc.velocity.X = npc.velocity.X - num189; - } + npc.velocity.X = npc.velocity.X - num189 * 1.1f; //changed from 1.1 } - if (npc.velocity.Y < num192) - { - npc.velocity.Y = npc.velocity.Y + num189; - } - else - { - if (npc.velocity.Y > num192) - { - npc.velocity.Y = npc.velocity.Y - num189; - } - } - if ((double)System.Math.Abs(num192) < (double)num188 * 0.2 && ((npc.velocity.X > 0f && num191 < 0f) || (npc.velocity.X < 0f && num191 > 0f))) + if ((double)(System.Math.Abs(npc.velocity.X) + System.Math.Abs(npc.velocity.Y)) < (double)num188 * 0.5) { if (npc.velocity.Y > 0f) { - npc.velocity.Y = npc.velocity.Y + num189 * 2f; + npc.velocity.Y = npc.velocity.Y + num189; } else { - npc.velocity.Y = npc.velocity.Y - num189 * 2f; - } - } - if ((double)System.Math.Abs(num191) < (double)num188 * 0.2 && ((npc.velocity.Y > 0f && num192 < 0f) || (npc.velocity.Y < 0f && num192 > 0f))) - { - if (npc.velocity.X > 0f) - { - npc.velocity.X = npc.velocity.X + num189 * 2f; //changed from 2 - } - else - { - npc.velocity.X = npc.velocity.X - num189 * 2f; //changed from 2 + npc.velocity.Y = npc.velocity.Y - num189; } } } else { - if (num196 > num197) + if (npc.velocity.Y < num192) { - if (npc.velocity.X < num191) - { - npc.velocity.X = npc.velocity.X + num189 * 1.1f; //changed from 1.1 - } - else if (npc.velocity.X > num191) - { - npc.velocity.X = npc.velocity.X - num189 * 1.1f; //changed from 1.1 - } - if ((double)(System.Math.Abs(npc.velocity.X) + System.Math.Abs(npc.velocity.Y)) < (double)num188 * 0.5) - { - if (npc.velocity.Y > 0f) - { - npc.velocity.Y = npc.velocity.Y + num189; - } - else - { - npc.velocity.Y = npc.velocity.Y - num189; - } - } + npc.velocity.Y = npc.velocity.Y + num189 * 1.1f; } - else + else if (npc.velocity.Y > num192) { - if (npc.velocity.Y < num192) + npc.velocity.Y = npc.velocity.Y - num189 * 1.1f; + } + if ((double)(System.Math.Abs(npc.velocity.X) + System.Math.Abs(npc.velocity.Y)) < (double)num188 * 0.5) + { + if (npc.velocity.X > 0f) { - npc.velocity.Y = npc.velocity.Y + num189 * 1.1f; + npc.velocity.X = npc.velocity.X + num189; } - else if (npc.velocity.Y > num192) + else { - npc.velocity.Y = npc.velocity.Y - num189 * 1.1f; - } - if ((double)(System.Math.Abs(npc.velocity.X) + System.Math.Abs(npc.velocity.Y)) < (double)num188 * 0.5) - { - if (npc.velocity.X > 0f) - { - npc.velocity.X = npc.velocity.X + num189; - } - else - { - npc.velocity.X = npc.velocity.X - num189; - } + npc.velocity.X = npc.velocity.X - num189; } } } diff --git a/NPCs/AbyssNPCs/AquaticSeekerTail.cs b/NPCs/AbyssNPCs/AquaticSeekerTail.cs index dc36c248d6..67d932d937 100644 --- a/NPCs/AbyssNPCs/AquaticSeekerTail.cs +++ b/NPCs/AbyssNPCs/AquaticSeekerTail.cs @@ -8,9 +8,6 @@ namespace CalamityMod.NPCs.AbyssNPCs { public class AquaticSeekerTail : ModNPC { - public float speed = 6f; //10 - public float turnSpeed = 0.1f; //0.15 - public override void SetStaticDefaults() { DisplayName.SetDefault("Aquatic Seeker"); @@ -97,32 +94,10 @@ namespace CalamityMod.NPCs.AbyssNPCs npc.alpha = 0; } } - 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; - int num183 = (int)((npc.position.Y + (float)npc.height) / 16f) + 2; - if (num180 < 0) - { - num180 = 0; - } - if (num181 > Main.maxTilesX) - { - num181 = Main.maxTilesX; - } - if (num182 < 0) - { - num182 = 0; - } - if (num183 > Main.maxTilesY) - { - num183 = Main.maxTilesY; - } if (Main.player[npc.target].dead) { npc.TargetClosest(false); } - float num188 = speed; - float num189 = turnSpeed; Vector2 vector18 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); float num191 = Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2); float num192 = Main.player[npc.target].position.Y + (float)(Main.player[npc.target].height / 2); @@ -133,138 +108,35 @@ namespace CalamityMod.NPCs.AbyssNPCs num191 -= vector18.X; num192 -= vector18.Y; float num193 = (float)System.Math.Sqrt((double)(num191 * num191 + num192 * num192)); - if (npc.ai[1] > 0f && npc.ai[1] < (float)Main.npc.Length) - { - try - { - vector18 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); - num191 = Main.npc[(int)npc.ai[1]].position.X + (float)(Main.npc[(int)npc.ai[1]].width / 2) - vector18.X; - num192 = Main.npc[(int)npc.ai[1]].position.Y + (float)(Main.npc[(int)npc.ai[1]].height / 2) - vector18.Y; - } - catch - { - } - npc.rotation = (float)System.Math.Atan2((double)num192, (double)num191) + 1.57f; - num193 = (float)System.Math.Sqrt((double)(num191 * num191 + num192 * num192)); - int num194 = npc.width; - num193 = (num193 - (float)num194) / num193; - num191 *= num193; - num192 *= num193; - npc.velocity = Vector2.Zero; - npc.position.X = npc.position.X + num191; - npc.position.Y = npc.position.Y + num192; - if (num191 < 0f) - { - npc.spriteDirection = 1; - } - else if (num191 > 0f) - { - npc.spriteDirection = -1; - } - } - else - { - num193 = (float)System.Math.Sqrt((double)(num191 * num191 + num192 * num192)); - float num196 = System.Math.Abs(num191); - float num197 = System.Math.Abs(num192); - float num198 = num188 / num193; - num191 *= num198; - num192 *= num198; - if ((npc.velocity.X > 0f && num191 > 0f) || (npc.velocity.X < 0f && num191 < 0f) || (npc.velocity.Y > 0f && num192 > 0f) || (npc.velocity.Y < 0f && num192 < 0f)) - { - if (npc.velocity.X < num191) - { - npc.velocity.X = npc.velocity.X + num189; - } - else - { - if (npc.velocity.X > num191) - { - npc.velocity.X = npc.velocity.X - num189; - } - } - if (npc.velocity.Y < num192) - { - npc.velocity.Y = npc.velocity.Y + num189; - } - else - { - if (npc.velocity.Y > num192) - { - npc.velocity.Y = npc.velocity.Y - num189; - } - } - if ((double)System.Math.Abs(num192) < (double)num188 * 0.2 && ((npc.velocity.X > 0f && num191 < 0f) || (npc.velocity.X < 0f && num191 > 0f))) - { - if (npc.velocity.Y > 0f) - { - npc.velocity.Y = npc.velocity.Y + num189 * 2f; - } - else - { - npc.velocity.Y = npc.velocity.Y - num189 * 2f; - } - } - if ((double)System.Math.Abs(num191) < (double)num188 * 0.2 && ((npc.velocity.Y > 0f && num192 < 0f) || (npc.velocity.Y < 0f && num192 > 0f))) - { - if (npc.velocity.X > 0f) - { - npc.velocity.X = npc.velocity.X + num189 * 2f; //changed from 2 - } - else - { - npc.velocity.X = npc.velocity.X - num189 * 2f; //changed from 2 - } - } - } - else - { - if (num196 > num197) - { - if (npc.velocity.X < num191) - { - npc.velocity.X = npc.velocity.X + num189 * 1.1f; //changed from 1.1 - } - else if (npc.velocity.X > num191) - { - npc.velocity.X = npc.velocity.X - num189 * 1.1f; //changed from 1.1 - } - if ((double)(System.Math.Abs(npc.velocity.X) + System.Math.Abs(npc.velocity.Y)) < (double)num188 * 0.5) - { - if (npc.velocity.Y > 0f) - { - npc.velocity.Y = npc.velocity.Y + num189; - } - else - { - npc.velocity.Y = npc.velocity.Y - num189; - } - } - } - else - { - if (npc.velocity.Y < num192) - { - npc.velocity.Y = npc.velocity.Y + num189 * 1.1f; - } - else if (npc.velocity.Y > num192) - { - npc.velocity.Y = npc.velocity.Y - num189 * 1.1f; - } - if ((double)(System.Math.Abs(npc.velocity.X) + System.Math.Abs(npc.velocity.Y)) < (double)num188 * 0.5) - { - if (npc.velocity.X > 0f) - { - npc.velocity.X = npc.velocity.X + num189; - } - else - { - npc.velocity.X = npc.velocity.X - num189; - } - } - } - } - } + if (npc.ai[1] > 0f && npc.ai[1] < (float)Main.npc.Length) + { + try + { + vector18 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); + num191 = Main.npc[(int)npc.ai[1]].position.X + (float)(Main.npc[(int)npc.ai[1]].width / 2) - vector18.X; + num192 = Main.npc[(int)npc.ai[1]].position.Y + (float)(Main.npc[(int)npc.ai[1]].height / 2) - vector18.Y; + } + catch + { + } + npc.rotation = (float)System.Math.Atan2((double)num192, (double)num191) + 1.57f; + num193 = (float)System.Math.Sqrt((double)(num191 * num191 + num192 * num192)); + int num194 = npc.width; + num193 = (num193 - (float)num194) / num193; + num191 *= num193; + num192 *= num193; + npc.velocity = Vector2.Zero; + npc.position.X = npc.position.X + num191; + npc.position.Y = npc.position.Y + num192; + if (num191 < 0f) + { + npc.spriteDirection = 1; + } + else if (num191 > 0f) + { + npc.spriteDirection = -1; + } + } } public override bool CheckActive() diff --git a/NPCs/AbyssNPCs/AquaticUrchin.cs b/NPCs/AbyssNPCs/AquaticUrchin.cs index e30abcbd6d..fe000afad0 100644 --- a/NPCs/AbyssNPCs/AquaticUrchin.cs +++ b/NPCs/AbyssNPCs/AquaticUrchin.cs @@ -4,6 +4,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.AbyssNPCs { @@ -44,7 +45,6 @@ namespace CalamityMod.NPCs.AbyssNPCs { int num = 30; int num2 = 10; - bool flag = false; bool flag2 = false; bool flag3 = false; if (npc.velocity.Y == 0f && ((npc.velocity.X > 0f && npc.direction < 0) || (npc.velocity.X < 0f && npc.direction > 0))) @@ -111,7 +111,7 @@ namespace CalamityMod.NPCs.AbyssNPCs } 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 - (npc.wet ? 24f : 8f); + npc.velocity.Y = npc.velocity.Y - (npc.wet ? 12f : 4f); for (int k = 0; k < 5; k++) { Dust.NewDust(npc.position, npc.width, npc.height, 33, 0f, -1f, 0, default(Color), 1f); @@ -146,16 +146,14 @@ namespace CalamityMod.NPCs.AbyssNPCs npc.direction = 1; } } - float num7 = 6f; - float num8 = 0.07f; - if (!flag && (npc.velocity.Y == 0f || npc.wet || (npc.velocity.X <= 0f && npc.direction < 0) || (npc.velocity.X >= 0f && npc.direction > 0))) + float num7 = (npc.wet ? 7f : 3f); + float num8 = (npc.wet ? 0.12f : 0.05f); + if (npc.velocity.Y == 0f || npc.wet || (npc.velocity.X <= 0f && npc.direction < 0) || (npc.velocity.X >= 0f && npc.direction > 0)) { if (Math.Sign(npc.velocity.X) != npc.direction) { npc.velocity.X = npc.velocity.X * 0.92f; } - num7 = 9f; - num8 = 0.4f; if (npc.velocity.X < -num7 || npc.velocity.X > num7) { if (npc.velocity.Y == 0f) @@ -290,28 +288,28 @@ namespace CalamityMod.NPCs.AbyssNPCs { if (Main.tile[num15, num16 - 3].nactive() && Main.tileSolid[(int)Main.tile[num15, num16 - 3].type]) { - npc.velocity.Y = (npc.wet ? -34f : -12.5f); + npc.velocity.Y = (npc.wet ? -16f : -7.5f); npc.netUpdate = true; } else { - npc.velocity.Y = (npc.wet ? -30f : -11.5f); + npc.velocity.Y = (npc.wet ? -14f : -6.5f); npc.netUpdate = true; } } else if (Main.tile[num15, num16 - 1].nactive() && !Main.tile[num15, num16 - 1].topSlope() && Main.tileSolid[(int)Main.tile[num15, num16 - 1].type]) { - npc.velocity.Y = (npc.wet ? -28f : -11f); + npc.velocity.Y = (npc.wet ? -13f : -6f); npc.netUpdate = true; } else if (npc.position.Y + (float)npc.height - (float)(num16 * 16) > 20f && Main.tile[num15, num16].nactive() && !Main.tile[num15, num16].topSlope() && Main.tileSolid[(int)Main.tile[num15, num16].type]) { - npc.velocity.Y = (npc.wet ? -24f : -9f); + npc.velocity.Y = (npc.wet ? -12f : -5f); npc.netUpdate = true; } else if ((npc.directionY < 0 || Math.Abs(npc.velocity.X) > num18) && (!Main.tile[num15, num16 + 1].nactive() || !Main.tileSolid[(int)Main.tile[num15, num16 + 1].type]) && (!Main.tile[num15, num16 + 2].nactive() || !Main.tileSolid[(int)Main.tile[num15, num16 + 2].type]) && (!Main.tile[num15 + npc.direction, num16 + 3].nactive() || !Main.tileSolid[(int)Main.tile[num15 + npc.direction, num16 + 3].type])) { - npc.velocity.Y = (npc.wet ? -32f : -12f); + npc.velocity.Y = (npc.wet ? -15f : -7f); npc.netUpdate = true; } } diff --git a/NPCs/AbyssNPCs/Bloatfish.cs b/NPCs/AbyssNPCs/Bloatfish.cs index bf93e3634b..ea5b73e993 100644 --- a/NPCs/AbyssNPCs/Bloatfish.cs +++ b/NPCs/AbyssNPCs/Bloatfish.cs @@ -4,6 +4,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.AbyssNPCs { diff --git a/NPCs/AbyssNPCs/BobbitWormHead.cs b/NPCs/AbyssNPCs/BobbitWormHead.cs index 9415cbc20a..25bff2dbef 100644 --- a/NPCs/AbyssNPCs/BobbitWormHead.cs +++ b/NPCs/AbyssNPCs/BobbitWormHead.cs @@ -5,6 +5,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.AbyssNPCs { diff --git a/NPCs/AbyssNPCs/BobbitWormSegment.cs b/NPCs/AbyssNPCs/BobbitWormSegment.cs index f1a14e8b08..8cacb94899 100644 --- a/NPCs/AbyssNPCs/BobbitWormSegment.cs +++ b/NPCs/AbyssNPCs/BobbitWormSegment.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.AbyssNPCs { diff --git a/NPCs/AbyssNPCs/BoxJellyfish.cs b/NPCs/AbyssNPCs/BoxJellyfish.cs index d0f3f9ef9b..801b465ea9 100644 --- a/NPCs/AbyssNPCs/BoxJellyfish.cs +++ b/NPCs/AbyssNPCs/BoxJellyfish.cs @@ -3,6 +3,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.AbyssNPCs { diff --git a/NPCs/AbyssNPCs/Catfish.cs b/NPCs/AbyssNPCs/Catfish.cs index 21ad44619e..327e68a9af 100644 --- a/NPCs/AbyssNPCs/Catfish.cs +++ b/NPCs/AbyssNPCs/Catfish.cs @@ -4,6 +4,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.AbyssNPCs { diff --git a/NPCs/AbyssNPCs/ChaoticPuffer.cs b/NPCs/AbyssNPCs/ChaoticPuffer.cs index 3b07ea5c03..229a3e8f15 100644 --- a/NPCs/AbyssNPCs/ChaoticPuffer.cs +++ b/NPCs/AbyssNPCs/ChaoticPuffer.cs @@ -4,6 +4,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.AbyssNPCs { diff --git a/NPCs/AbyssNPCs/ColossalSquid.cs b/NPCs/AbyssNPCs/ColossalSquid.cs index de40facedb..ad483022a6 100644 --- a/NPCs/AbyssNPCs/ColossalSquid.cs +++ b/NPCs/AbyssNPCs/ColossalSquid.cs @@ -6,6 +6,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.AbyssNPCs { diff --git a/NPCs/AbyssNPCs/Cuttlefish.cs b/NPCs/AbyssNPCs/Cuttlefish.cs index bcb60b78ab..1ed1e9005e 100644 --- a/NPCs/AbyssNPCs/Cuttlefish.cs +++ b/NPCs/AbyssNPCs/Cuttlefish.cs @@ -5,6 +5,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.AbyssNPCs { diff --git a/NPCs/AbyssNPCs/DevilFish.cs b/NPCs/AbyssNPCs/DevilFish.cs index 7ac9633a16..60bb396539 100644 --- a/NPCs/AbyssNPCs/DevilFish.cs +++ b/NPCs/AbyssNPCs/DevilFish.cs @@ -6,6 +6,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.AbyssNPCs { diff --git a/NPCs/AbyssNPCs/EidolonWyrmHead.cs b/NPCs/AbyssNPCs/EidolonWyrmHead.cs index d12ac038f2..2388e1b2a3 100644 --- a/NPCs/AbyssNPCs/EidolonWyrmHead.cs +++ b/NPCs/AbyssNPCs/EidolonWyrmHead.cs @@ -6,6 +6,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.AbyssNPCs { diff --git a/NPCs/AbyssNPCs/EidolonWyrmHeadHuge.cs b/NPCs/AbyssNPCs/EidolonWyrmHeadHuge.cs index 941d004363..87538b1255 100644 --- a/NPCs/AbyssNPCs/EidolonWyrmHeadHuge.cs +++ b/NPCs/AbyssNPCs/EidolonWyrmHeadHuge.cs @@ -6,6 +6,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.AbyssNPCs { diff --git a/NPCs/AbyssNPCs/Flounder.cs b/NPCs/AbyssNPCs/Flounder.cs index a5b4f1c15d..790c2ab8ac 100644 --- a/NPCs/AbyssNPCs/Flounder.cs +++ b/NPCs/AbyssNPCs/Flounder.cs @@ -3,6 +3,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.AbyssNPCs { diff --git a/NPCs/AbyssNPCs/Frogfish.cs b/NPCs/AbyssNPCs/Frogfish.cs index a8eb9366ee..0be0944855 100644 --- a/NPCs/AbyssNPCs/Frogfish.cs +++ b/NPCs/AbyssNPCs/Frogfish.cs @@ -3,6 +3,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.AbyssNPCs { diff --git a/NPCs/AbyssNPCs/GiantSquid.cs b/NPCs/AbyssNPCs/GiantSquid.cs index 39e088da0d..2a025f3c7d 100644 --- a/NPCs/AbyssNPCs/GiantSquid.cs +++ b/NPCs/AbyssNPCs/GiantSquid.cs @@ -6,6 +6,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.AbyssNPCs { diff --git a/NPCs/AbyssNPCs/Gnasher.cs b/NPCs/AbyssNPCs/Gnasher.cs index 19bd7d05ca..d9491420f3 100644 --- a/NPCs/AbyssNPCs/Gnasher.cs +++ b/NPCs/AbyssNPCs/Gnasher.cs @@ -2,6 +2,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.AbyssNPCs { diff --git a/NPCs/AbyssNPCs/GulperEelHead.cs b/NPCs/AbyssNPCs/GulperEelHead.cs index 216fc16eb8..c9044f196c 100644 --- a/NPCs/AbyssNPCs/GulperEelHead.cs +++ b/NPCs/AbyssNPCs/GulperEelHead.cs @@ -6,6 +6,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.AbyssNPCs { diff --git a/NPCs/AbyssNPCs/Laserfish.cs b/NPCs/AbyssNPCs/Laserfish.cs index 30f6cef77b..bf90f57f3c 100644 --- a/NPCs/AbyssNPCs/Laserfish.cs +++ b/NPCs/AbyssNPCs/Laserfish.cs @@ -6,6 +6,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.AbyssNPCs { diff --git a/NPCs/AbyssNPCs/LuminousCorvina.cs b/NPCs/AbyssNPCs/LuminousCorvina.cs index 979d985076..9bf3244189 100644 --- a/NPCs/AbyssNPCs/LuminousCorvina.cs +++ b/NPCs/AbyssNPCs/LuminousCorvina.cs @@ -6,6 +6,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.AbyssNPCs { diff --git a/NPCs/AbyssNPCs/MantisShrimp.cs b/NPCs/AbyssNPCs/MantisShrimp.cs index 210eb28f92..ff4aa791f5 100644 --- a/NPCs/AbyssNPCs/MantisShrimp.cs +++ b/NPCs/AbyssNPCs/MantisShrimp.cs @@ -2,6 +2,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.AbyssNPCs { diff --git a/NPCs/AbyssNPCs/Mauler.cs b/NPCs/AbyssNPCs/Mauler.cs index 271f6fe42c..45063b9c4e 100644 --- a/NPCs/AbyssNPCs/Mauler.cs +++ b/NPCs/AbyssNPCs/Mauler.cs @@ -5,6 +5,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.AbyssNPCs { diff --git a/NPCs/AbyssNPCs/MirageJelly.cs b/NPCs/AbyssNPCs/MirageJelly.cs index b40888f95f..742f6d93b1 100644 --- a/NPCs/AbyssNPCs/MirageJelly.cs +++ b/NPCs/AbyssNPCs/MirageJelly.cs @@ -5,6 +5,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.AbyssNPCs { diff --git a/NPCs/AbyssNPCs/MorayEel.cs b/NPCs/AbyssNPCs/MorayEel.cs index f55018b6cb..836087e610 100644 --- a/NPCs/AbyssNPCs/MorayEel.cs +++ b/NPCs/AbyssNPCs/MorayEel.cs @@ -5,6 +5,7 @@ using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.AbyssNPCs { diff --git a/NPCs/AbyssNPCs/OarfishHead.cs b/NPCs/AbyssNPCs/OarfishHead.cs index 26ca48fce3..07f9dc66f7 100644 --- a/NPCs/AbyssNPCs/OarfishHead.cs +++ b/NPCs/AbyssNPCs/OarfishHead.cs @@ -4,6 +4,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.AbyssNPCs { diff --git a/NPCs/AbyssNPCs/Reaper.cs b/NPCs/AbyssNPCs/Reaper.cs index 88fd4d8df8..915b65b5f6 100644 --- a/NPCs/AbyssNPCs/Reaper.cs +++ b/NPCs/AbyssNPCs/Reaper.cs @@ -5,6 +5,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.AbyssNPCs { diff --git a/NPCs/AbyssNPCs/SeaUrchin.cs b/NPCs/AbyssNPCs/SeaUrchin.cs index c82b48f9d2..f65c31f536 100644 --- a/NPCs/AbyssNPCs/SeaUrchin.cs +++ b/NPCs/AbyssNPCs/SeaUrchin.cs @@ -3,6 +3,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.AbyssNPCs { @@ -35,7 +36,6 @@ namespace CalamityMod.NPCs.AbyssNPCs { int num = 30; int num2 = 10; - bool flag = false; bool flag2 = false; bool flag3 = false; if (npc.velocity.Y == 0f && ((npc.velocity.X > 0f && npc.direction < 0) || (npc.velocity.X < 0f && npc.direction > 0))) @@ -102,7 +102,7 @@ namespace CalamityMod.NPCs.AbyssNPCs } 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 - (npc.wet ? 12f : 4f); + npc.velocity.Y = npc.velocity.Y - (npc.wet ? 9f : 3f); for (int k = 0; k < 5; k++) { Dust.NewDust(npc.position, npc.width, npc.height, 33, 0f, -1f, 0, default(Color), 1f); @@ -137,16 +137,14 @@ namespace CalamityMod.NPCs.AbyssNPCs npc.direction = 1; } } - float num7 = 6f; - float num8 = 0.07f; - if (!flag && (npc.velocity.Y == 0f || npc.wet || (npc.velocity.X <= 0f && npc.direction < 0) || (npc.velocity.X >= 0f && npc.direction > 0))) + float num7 = (npc.wet ? 5.5f : 2.2f); + float num8 = (npc.wet ? 0.09f : 0.04f); + if (npc.velocity.Y == 0f || npc.wet || (npc.velocity.X <= 0f && npc.direction < 0) || (npc.velocity.X >= 0f && npc.direction > 0)) { if (Math.Sign(npc.velocity.X) != npc.direction) { npc.velocity.X = npc.velocity.X * 0.92f; } - num7 = 5f; - num8 = 0.2f; if (npc.velocity.X < -num7 || npc.velocity.X > num7) { if (npc.velocity.Y == 0f) @@ -281,28 +279,28 @@ namespace CalamityMod.NPCs.AbyssNPCs { if (Main.tile[num15, num16 - 3].nactive() && Main.tileSolid[(int)Main.tile[num15, num16 - 3].type]) { - npc.velocity.Y = (npc.wet ? -17f : -8.5f); + npc.velocity.Y = (npc.wet ? -14f : -6.5f); npc.netUpdate = true; } else { - npc.velocity.Y = (npc.wet ? -15f : -7.5f); + npc.velocity.Y = (npc.wet ? -12f : -6f); npc.netUpdate = true; } } else if (Main.tile[num15, num16 - 1].nactive() && !Main.tile[num15, num16 - 1].topSlope() && Main.tileSolid[(int)Main.tile[num15, num16 - 1].type]) { - npc.velocity.Y = (npc.wet ? -14f : -7f); + npc.velocity.Y = (npc.wet ? -11f : -5f); npc.netUpdate = true; } else if (npc.position.Y + (float)npc.height - (float)(num16 * 16) > 20f && Main.tile[num15, num16].nactive() && !Main.tile[num15, num16].topSlope() && Main.tileSolid[(int)Main.tile[num15, num16].type]) { - npc.velocity.Y = (npc.wet ? -12f : -6f); + npc.velocity.Y = (npc.wet ? -10f : -4f); npc.netUpdate = true; } else if ((npc.directionY < 0 || Math.Abs(npc.velocity.X) > num18) && (!Main.tile[num15, num16 + 1].nactive() || !Main.tileSolid[(int)Main.tile[num15, num16 + 1].type]) && (!Main.tile[num15, num16 + 2].nactive() || !Main.tileSolid[(int)Main.tile[num15, num16 + 2].type]) && (!Main.tile[num15 + npc.direction, num16 + 3].nactive() || !Main.tileSolid[(int)Main.tile[num15 + npc.direction, num16 + 3].type])) { - npc.velocity.Y = (npc.wet ? -16f : -8f); + npc.velocity.Y = (npc.wet ? -13f : -6f); npc.netUpdate = true; } } diff --git a/NPCs/AbyssNPCs/ToxicMinnow.cs b/NPCs/AbyssNPCs/ToxicMinnow.cs index 235c69e2e5..140a96c385 100644 --- a/NPCs/AbyssNPCs/ToxicMinnow.cs +++ b/NPCs/AbyssNPCs/ToxicMinnow.cs @@ -6,6 +6,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.AbyssNPCs { diff --git a/NPCs/AbyssNPCs/Trasher.cs b/NPCs/AbyssNPCs/Trasher.cs index eb0d75b958..09b69aff1d 100644 --- a/NPCs/AbyssNPCs/Trasher.cs +++ b/NPCs/AbyssNPCs/Trasher.cs @@ -4,6 +4,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.AbyssNPCs { diff --git a/NPCs/AbyssNPCs/Viperfish.cs b/NPCs/AbyssNPCs/Viperfish.cs index 02c1fbb702..9e0dfea384 100644 --- a/NPCs/AbyssNPCs/Viperfish.cs +++ b/NPCs/AbyssNPCs/Viperfish.cs @@ -6,6 +6,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.AbyssNPCs { diff --git a/NPCs/Astrageldon/Astrageldon.cs b/NPCs/Astrageldon/Astrageldon.cs index dad7b54f8f..be38e7e0b7 100644 --- a/NPCs/Astrageldon/Astrageldon.cs +++ b/NPCs/Astrageldon/Astrageldon.cs @@ -1,4 +1,5 @@ using System.IO; +using System.Threading; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -6,7 +7,7 @@ using Terraria.ID; using Terraria.Localization; using Terraria.ModLoader; using CalamityMod.World; -using System.Threading; +using CalamityMod.Utilities; namespace CalamityMod.NPCs.Astrageldon { @@ -283,7 +284,7 @@ namespace CalamityMod.NPCs.Astrageldon if (npc.ai[0] != 1) //draw only if not recharging { - Vector2 center = new Vector2(npc.Center.X, npc.Center.Y - 30f); //30 + Vector2 center = new Vector2(npc.Center.X, npc.Center.Y - 46f); Vector2 vector = center - Main.screenPosition; vector -= new Vector2((float)GlowMaskTexture.Width, (float)(GlowMaskTexture.Height / Main.npcFrameCount[npc.type])) * 1f / 2f; vector += vector11 * 1f + new Vector2(0f, 0f + 4f + offsetY); @@ -305,7 +306,7 @@ namespace CalamityMod.NPCs.Astrageldon DropHelper.DropBags(npc); DropHelper.DropItemChance(npc, mod.ItemType("AstrageldonTrophy"), 10); - DropHelper.DropItemCondition(npc, mod.ItemType("Knowledge30"), true, !CalamityWorld.downedAstrageldon); + DropHelper.DropItemCondition(npc, mod.ItemType("KnowledgeAstrumAureus"), true, !CalamityWorld.downedAstrageldon); DropHelper.DropResidentEvilAmmo(npc, CalamityWorld.downedAstrageldon, 4, 2, 1); // All other drops are contained in the bag, so they only drop directly on Normal @@ -337,11 +338,11 @@ namespace CalamityMod.NPCs.Astrageldon DropHelper.DropItemSpray(npc, ItemID.FragmentStardust, minFragments, maxFragments); } - // Drop an Astral Meteor if applicable - ThreadPool.QueueUserWorkItem(WorldGenerationMethods.AstralMeteorThreadWrapper); + // Drop an Astral Meteor if applicable + ThreadPool.QueueUserWorkItem(WorldGenerationMethods.AstralMeteorThreadWrapper); - // If Astrum Aureus has not yet been killed, notify players of new Astral enemy drops - if (!CalamityWorld.downedAstrageldon) + // If Astrum Aureus has not yet been killed, notify players of new Astral enemy drops + if (!CalamityWorld.downedAstrageldon) { string key = "Mods.CalamityMod.AureusBossText"; string key2 = "Mods.CalamityMod.AureusBossText2"; diff --git a/NPCs/Astrageldon/AstrageldonSlime.cs b/NPCs/Astrageldon/AstrageldonSlime.cs index 6eeb37f6ae..2636474cdc 100644 --- a/NPCs/Astrageldon/AstrageldonSlime.cs +++ b/NPCs/Astrageldon/AstrageldonSlime.cs @@ -210,6 +210,11 @@ namespace CalamityMod.NPCs.Astrageldon return false; } + public override Color? GetAlpha(Color drawColor) + { + return new Color(200, 200, 200, npc.alpha); + } + public override void FindFrame(int frameHeight) { npc.frameCounter += 0.15f; diff --git a/NPCs/AstralBiomeNPCs/Aries.cs b/NPCs/AstralBiomeNPCs/Aries.cs index 29cc1c0f8f..8bfa18e2b2 100644 --- a/NPCs/AstralBiomeNPCs/Aries.cs +++ b/NPCs/AstralBiomeNPCs/Aries.cs @@ -5,6 +5,7 @@ using Terraria; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.AstralBiomeNPCs { diff --git a/NPCs/AstralBiomeNPCs/AstralProbe.cs b/NPCs/AstralBiomeNPCs/AstralProbe.cs index 5201b37a71..2d1688b992 100644 --- a/NPCs/AstralBiomeNPCs/AstralProbe.cs +++ b/NPCs/AstralBiomeNPCs/AstralProbe.cs @@ -4,6 +4,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.AstralBiomeNPCs { diff --git a/NPCs/AstralBiomeNPCs/AstralSlime.cs b/NPCs/AstralBiomeNPCs/AstralSlime.cs index 652e31015c..fd71e753d0 100644 --- a/NPCs/AstralBiomeNPCs/AstralSlime.cs +++ b/NPCs/AstralBiomeNPCs/AstralSlime.cs @@ -6,6 +6,8 @@ using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.CalPlayer; +using CalamityMod.Utilities; namespace CalamityMod.NPCs.AstralBiomeNPCs { diff --git a/NPCs/AstralBiomeNPCs/AstralachneaGround.cs b/NPCs/AstralBiomeNPCs/AstralachneaGround.cs index 37b4ed42ea..ef49fed6cd 100644 --- a/NPCs/AstralBiomeNPCs/AstralachneaGround.cs +++ b/NPCs/AstralBiomeNPCs/AstralachneaGround.cs @@ -5,6 +5,7 @@ using Terraria.ModLoader; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using CalamityMod.World; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.AstralBiomeNPCs { diff --git a/NPCs/AstralBiomeNPCs/AstralachneaWall.cs b/NPCs/AstralBiomeNPCs/AstralachneaWall.cs index e62a83dc86..49a0154e60 100644 --- a/NPCs/AstralBiomeNPCs/AstralachneaWall.cs +++ b/NPCs/AstralBiomeNPCs/AstralachneaWall.cs @@ -5,6 +5,7 @@ using Terraria.ModLoader; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using CalamityMod.World; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.AstralBiomeNPCs { diff --git a/NPCs/AstralBiomeNPCs/Atlas.cs b/NPCs/AstralBiomeNPCs/Atlas.cs index 42d83a4948..399382b116 100644 --- a/NPCs/AstralBiomeNPCs/Atlas.cs +++ b/NPCs/AstralBiomeNPCs/Atlas.cs @@ -6,6 +6,7 @@ using Terraria.ModLoader; using Terraria.DataStructures; using System.IO; using CalamityMod.World; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.AstralBiomeNPCs { diff --git a/NPCs/AstralBiomeNPCs/BigSightseer.cs b/NPCs/AstralBiomeNPCs/BigSightseer.cs index 9da93a61e2..69d6605ac2 100644 --- a/NPCs/AstralBiomeNPCs/BigSightseer.cs +++ b/NPCs/AstralBiomeNPCs/BigSightseer.cs @@ -8,6 +8,7 @@ using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.AstralBiomeNPCs { diff --git a/NPCs/AstralBiomeNPCs/FusionFeeder.cs b/NPCs/AstralBiomeNPCs/FusionFeeder.cs index e31e703ab7..c53d496ab0 100644 --- a/NPCs/AstralBiomeNPCs/FusionFeeder.cs +++ b/NPCs/AstralBiomeNPCs/FusionFeeder.cs @@ -8,6 +8,7 @@ using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.AstralBiomeNPCs { diff --git a/NPCs/AstralBiomeNPCs/Hadarian.cs b/NPCs/AstralBiomeNPCs/Hadarian.cs index 3a70d19f6e..9c8ce0b81d 100644 --- a/NPCs/AstralBiomeNPCs/Hadarian.cs +++ b/NPCs/AstralBiomeNPCs/Hadarian.cs @@ -8,6 +8,7 @@ using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.AstralBiomeNPCs { diff --git a/NPCs/AstralBiomeNPCs/Hive.cs b/NPCs/AstralBiomeNPCs/Hive.cs index 402c094ef2..45d3ce1564 100644 --- a/NPCs/AstralBiomeNPCs/Hive.cs +++ b/NPCs/AstralBiomeNPCs/Hive.cs @@ -7,6 +7,7 @@ using Terraria; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.AstralBiomeNPCs { diff --git a/NPCs/AstralBiomeNPCs/Mantis.cs b/NPCs/AstralBiomeNPCs/Mantis.cs index 2461216291..726e548a31 100644 --- a/NPCs/AstralBiomeNPCs/Mantis.cs +++ b/NPCs/AstralBiomeNPCs/Mantis.cs @@ -6,6 +6,7 @@ using Terraria; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.AstralBiomeNPCs { diff --git a/NPCs/AstralBiomeNPCs/Nova.cs b/NPCs/AstralBiomeNPCs/Nova.cs index f006df4e52..9c5aeab409 100644 --- a/NPCs/AstralBiomeNPCs/Nova.cs +++ b/NPCs/AstralBiomeNPCs/Nova.cs @@ -9,6 +9,7 @@ using Terraria.ModLoader; using Terraria.DataStructures; using CalamityMod.World; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.AstralBiomeNPCs { diff --git a/NPCs/AstralBiomeNPCs/SmallSightseer.cs b/NPCs/AstralBiomeNPCs/SmallSightseer.cs index 90e68095f2..61551c7b68 100644 --- a/NPCs/AstralBiomeNPCs/SmallSightseer.cs +++ b/NPCs/AstralBiomeNPCs/SmallSightseer.cs @@ -7,6 +7,7 @@ using Terraria; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.AstralBiomeNPCs { diff --git a/NPCs/AstralBiomeNPCs/StellarCulex.cs b/NPCs/AstralBiomeNPCs/StellarCulex.cs index 6ac4d1c82c..5ae7f7f94a 100644 --- a/NPCs/AstralBiomeNPCs/StellarCulex.cs +++ b/NPCs/AstralBiomeNPCs/StellarCulex.cs @@ -8,6 +8,7 @@ using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.AstralBiomeNPCs { diff --git a/NPCs/AstrumDeus/AstrumDeusHeadSpectral.cs b/NPCs/AstrumDeus/AstrumDeusHeadSpectral.cs index 6d5c7ae7f5..84914c24f4 100644 --- a/NPCs/AstrumDeus/AstrumDeusHeadSpectral.cs +++ b/NPCs/AstrumDeus/AstrumDeusHeadSpectral.cs @@ -6,6 +6,7 @@ using Terraria.ID; using Terraria.Localization; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.Utilities; namespace CalamityMod.NPCs.AstrumDeus { @@ -531,8 +532,8 @@ namespace CalamityMod.NPCs.AstrumDeus DropHelper.DropItem(npc, ItemID.GreaterHealingPotion, 8, 14); DropHelper.DropItemChance(npc, mod.ItemType("AstrumDeusTrophy"), 10); - DropHelper.DropItemCondition(npc, mod.ItemType("Knowledge29"), !CalamityWorld.downedStarGod); - DropHelper.DropItemCondition(npc, mod.ItemType("Knowledge36"), !CalamityWorld.downedStarGod); + DropHelper.DropItemCondition(npc, mod.ItemType("KnowledgeAstrumDeus"), !CalamityWorld.downedStarGod); + DropHelper.DropItemCondition(npc, mod.ItemType("KnowledgeAstralInfection"), !CalamityWorld.downedStarGod); DropHelper.DropResidentEvilAmmo(npc, CalamityWorld.downedStarGod, 4, 2, 1); // Drop a large spray of all 4 lunar fragments @@ -553,10 +554,7 @@ namespace CalamityMod.NPCs.AstrumDeus DropHelper.DropItemChance(npc, mod.ItemType("Quasar"), DropHelper.RareVariantDropRateInt); // Equipment - float f = Main.rand.NextFloat(); - bool replaceWithRare = f <= DropHelper.RareVariantDropRateFloat; // 1/40 chance of getting Hide of Astrum Deus - DropHelper.DropItemCondition(npc, mod.ItemType("AstralBulwark"), !replaceWithRare); - DropHelper.DropItemCondition(npc, mod.ItemType("HideofAstrumDeus"), replaceWithRare); + DropHelper.DropItemChance(npc, mod.ItemType("HideofAstrumDeus"), DropHelper.RareVariantDropRateInt); // Vanity DropHelper.DropItemChance(npc, mod.ItemType("AstrumDeusMask"), 7); diff --git a/NPCs/BrimstoneWaifu/BrimstoneElemental.cs b/NPCs/BrimstoneWaifu/BrimstoneElemental.cs index 2f430d45e2..78c103a06d 100644 --- a/NPCs/BrimstoneWaifu/BrimstoneElemental.cs +++ b/NPCs/BrimstoneWaifu/BrimstoneElemental.cs @@ -6,6 +6,8 @@ using Terraria.ID; using Terraria.Localization; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.CalPlayer; +using CalamityMod.Utilities; namespace CalamityMod.NPCs.BrimstoneWaifu { @@ -94,9 +96,9 @@ namespace CalamityMod.NPCs.BrimstoneWaifu public override void AI() { CalamityGlobalNPC.brimstoneElemental = npc.whoAmI; + Lighting.AddLight((int)((npc.position.X + (float)(npc.width / 2)) / 16f), (int)((npc.position.Y + (float)(npc.height / 2)) / 16f), 2f, 0f, 0f); Player player = Main.player[npc.target]; CalamityPlayer modPlayer = player.GetModPlayer(mod); - bool brimTeleport = (double)npc.life <= (double)npc.lifeMax * 0.2; bool provy = (CalamityWorld.downedProvidence && !CalamityWorld.bossRushActive); bool expertMode = (Main.expertMode || CalamityWorld.bossRushActive); bool revenge = (CalamityWorld.revenge || CalamityWorld.bossRushActive); @@ -168,7 +170,7 @@ namespace CalamityMod.NPCs.BrimstoneWaifu { npc.localAI[1] += 1f; } - if (npc.localAI[1] >= (float)(200 + Main.rand.Next(100))) + if (npc.localAI[1] >= 240f) { npc.localAI[1] = 0f; npc.TargetClosest(true); @@ -180,8 +182,20 @@ namespace CalamityMod.NPCs.BrimstoneWaifu timer++; playerPosX = (int)player.Center.X / 16; playerPosY = (int)player.Center.Y / 16; - playerPosX += Main.rand.Next(-50, 51); - playerPosY += Main.rand.Next(-50, 51); + + int min = 12; + int max = 15; + + if (Main.rand.Next(2) == 0) + playerPosX += Main.rand.Next(min, max); + else + playerPosX -= Main.rand.Next(min, max); + + if (Main.rand.Next(2) == 0) + playerPosY += Main.rand.Next(min, max); + else + playerPosY -= Main.rand.Next(min, max); + if (!WorldGen.SolidTile(playerPosX, playerPosY) && Collision.CanHit(new Vector2((float)(playerPosX * 16), (float)(playerPosY * 16)), 1, 1, player.position, player.width, player.height)) { break; @@ -200,16 +214,18 @@ namespace CalamityMod.NPCs.BrimstoneWaifu } else if (npc.ai[0] == 1f) { + npc.velocity *= 0.9f; npc.dontTakeDamage = true; npc.defense = provy ? 120 : 20; npc.chaseable = false; - npc.alpha += (brimTeleport ? 5 : 4); + npc.alpha += 25; if (npc.alpha >= 255) { if (Main.netMode != 1 && NPC.CountNPCS(mod.NPCType("Brimling")) < 2 && revenge) { NPC.NewNPC((int)npc.Center.X, (int)npc.Center.Y, mod.NPCType("Brimling"), 0, 0f, 0f, 0f, 0f, 255); } + Main.PlaySound(SoundID.Item8, npc.Center); npc.alpha = 255; npc.position.X = npc.ai[1] * 16f - (float)(npc.width / 2); npc.position.Y = npc.ai[2] * 16f - (float)(npc.height / 2); @@ -219,7 +235,7 @@ namespace CalamityMod.NPCs.BrimstoneWaifu } else if (npc.ai[0] == 2f) { - npc.alpha -= (brimTeleport ? 5 : 4); + npc.alpha -= 25; if (npc.alpha <= 0) { npc.dontTakeDamage = false; @@ -248,7 +264,7 @@ namespace CalamityMod.NPCs.BrimstoneWaifu npc.chaseable = true; npc.rotation = npc.velocity.X * 0.04f; npc.spriteDirection = ((npc.direction > 0) ? 1 : -1); - 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 shootFromVectorX = new Vector2(npc.position.X + (float)(npc.width / 2), npc.position.Y + (float)(npc.height / 2)); npc.ai[1] += 1f; bool shootProjectile = false; if (npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) @@ -283,7 +299,7 @@ namespace CalamityMod.NPCs.BrimstoneWaifu { shootProjectile = true; } - if (shootProjectile && npc.position.Y + (float)npc.height < player.position.Y && Collision.CanHit(shootFromVectorX, 1, 1, player.position, player.width, player.height)) + if (shootProjectile && Collision.CanHit(shootFromVectorX, 1, 1, player.position, player.width, player.height)) { if (Main.netMode != 1) { @@ -308,8 +324,8 @@ namespace CalamityMod.NPCs.BrimstoneWaifu { projectileSpeed += 2f; } - float relativeSpeedX = player.position.X + (float)player.width * 0.5f - shootFromVectorX.X + (float)Main.rand.Next(-80, 81); - float relativeSpeedY = player.position.Y + (float)player.height * 0.5f - shootFromVectorX.Y + (float)Main.rand.Next(-40, 41); + float relativeSpeedX = player.position.X + (float)player.width * 0.5f - shootFromVectorX.X; + float relativeSpeedY = player.position.Y + (float)player.height * 0.5f - shootFromVectorX.Y; float totalRelativeSpeed = (float)Math.Sqrt((double)(relativeSpeedX * relativeSpeedX + relativeSpeedY * relativeSpeedY)); totalRelativeSpeed = projectileSpeed / totalRelativeSpeed; relativeSpeedX *= totalRelativeSpeed; @@ -327,21 +343,21 @@ namespace CalamityMod.NPCs.BrimstoneWaifu npc.velocity.Y = npc.velocity.Y * 0.98f; } npc.velocity.Y = npc.velocity.Y - 0.1f; - if (npc.velocity.Y > 2f) + if (npc.velocity.Y > 3f) { - npc.velocity.Y = 2f; + npc.velocity.Y = 3f; } } - else if (npc.position.Y < player.position.Y - 400f) //500 + else if (npc.position.Y < player.position.Y - 350f) //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) + if (npc.velocity.Y < -3f) { - npc.velocity.Y = -2f; + npc.velocity.Y = -3f; } } if (npc.position.X + (float)(npc.width / 2) > player.position.X + (float)(player.width / 2) + 150f) //100 @@ -458,11 +474,6 @@ namespace CalamityMod.NPCs.BrimstoneWaifu } } - public override bool CanHitPlayer(Player target, ref int cooldownSlot) - { - return npc.alpha == 0; - } - public override void OnHitPlayer(Player player, int damage, bool crit) { if (CalamityWorld.revenge) @@ -570,8 +581,8 @@ namespace CalamityMod.NPCs.BrimstoneWaifu } DropHelper.DropResidentEvilAmmo(npc, CalamityWorld.downedBrimstoneElemental, 4, 2, 1); - DropHelper.DropItemCondition(npc, mod.ItemType("Knowledge6"), true, !CalamityWorld.downedBrimstoneElemental); - DropHelper.DropItemCondition(npc, mod.ItemType("Knowledge26"), true, !CalamityWorld.downedBrimstoneElemental); + DropHelper.DropItemCondition(npc, mod.ItemType("KnowledgeBrimstoneCrag"), true, !CalamityWorld.downedBrimstoneElemental); + DropHelper.DropItemCondition(npc, mod.ItemType("KnowledgeBrimstoneElemental"), true, !CalamityWorld.downedBrimstoneElemental); // if prime hasn't been killed and this is the first time killing brimmy, do the message string key = "Mods.CalamityMod.SteelSkullBossText"; diff --git a/NPCs/Bumblefuck/Bumblefuck.cs b/NPCs/Bumblefuck/Bumblefuck.cs index 541e5faa36..b04faa7593 100644 --- a/NPCs/Bumblefuck/Bumblefuck.cs +++ b/NPCs/Bumblefuck/Bumblefuck.cs @@ -4,6 +4,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.Utilities; namespace CalamityMod.NPCs.Bumblefuck { @@ -68,97 +69,103 @@ namespace CalamityMod.NPCs.Bumblefuck public override void AI() { + // Variables Player player = Main.player[npc.target]; bool revenge = CalamityWorld.revenge; Vector2 vector = npc.Center; - int num1305 = revenge ? 6 : 4; + + // Percent life remaining + float lifeRatio = (float)npc.life / (float)npc.lifeMax; + + // Phases + bool phase2 = lifeRatio < 0.5f; + bool phase3 = lifeRatio < 0.1f; + + // Max spawn amount + int num1305 = revenge ? 4 : 3; if (CalamityWorld.death) - { - num1305 = 8; - } + num1305 = 5; + if (phase2) + num1305 = 2; + + // Don't collide with tiles, disable gravity npc.noTileCollide = false; npc.noGravity = true; + + // Reset damage npc.damage = npc.defDamage; + + // Despawn if (Vector2.Distance(player.Center, vector) > 5600f) { if (npc.timeLeft > 10) - { npc.timeLeft = 10; - } } + + // Fly to target if target is too far away and not in idle or switch phase Vector2 vector205 = player.Center - npc.Center; - if (npc.ai[0] > 1f && vector205.Length() > 5200f) - { + if (npc.ai[0] > 1f && vector205.Length() > 3600f) npc.ai[0] = 1f; - } + + // Phase switch if (npc.ai[0] == 0f) { + // Target npc.TargetClosest(true); + if (npc.Center.X < player.Center.X - 2f) - { npc.direction = 1; - } if (npc.Center.X > player.Center.X + 2f) - { npc.direction = -1; - } + + // Direction and rotation npc.spriteDirection = npc.direction; npc.rotation = (npc.rotation * 9f + npc.velocity.X * 0.05f) / 10f; + + // Slow down if colliding with tiles if (npc.collideX) { npc.velocity.X = npc.velocity.X * (-npc.oldVelocity.X * 0.5f); - if (npc.velocity.X > 26f) //4 - { - npc.velocity.X = 26f; //4 - } - if (npc.velocity.X < -26f) //4 - { - npc.velocity.X = -26f; //4 - } + if (npc.velocity.X > 4f) + npc.velocity.X = 4f; + if (npc.velocity.X < -4f) + npc.velocity.X = -4f; } if (npc.collideY) { npc.velocity.Y = npc.velocity.Y * (-npc.oldVelocity.Y * 0.5f); - if (npc.velocity.Y > 26f) //4 - { - npc.velocity.Y = 26f; //4 - } - if (npc.velocity.Y < -26f) //4 - { - npc.velocity.Y = -26f; //4 - } + if (npc.velocity.Y > 4f) + npc.velocity.Y = 4f; + if (npc.velocity.Y < -4f) + npc.velocity.Y = -4f; } + + // Fly to target if target is too far away, otherwise get close to target and then slow down Vector2 value51 = player.Center - npc.Center; value51.Y -= 200f; - if (value51.Length() > 800f) //800 Charge to get closer and spawn birbs + if (value51.Length() > 2800f) { npc.ai[0] = 1f; npc.ai[1] = 0f; npc.ai[2] = 0f; npc.ai[3] = 0f; } - else if (value51.Length() > 80f) + else if (value51.Length() > 240f) { - float scaleFactor15 = 12f; //6 + float scaleFactor15 = 12f; float num1306 = 30f; value51.Normalize(); value51 *= scaleFactor15; npc.velocity = (npc.velocity * (num1306 - 1f) + value51) / num1306; } - else if (npc.velocity.Length() > 18f) //8 - { + else if (npc.velocity.Length() > 2f) npc.velocity *= 0.95f; - } - else if (npc.velocity.Length() < 9f) //4 - { + else if (npc.velocity.Length() < 1f) npc.velocity *= 1.05f; - } + + // Phase switch npc.ai[1] += 1f; - if (npc.justHit) - { - npc.ai[1] += (float)Main.rand.Next(10, 30); - } - if (npc.ai[1] >= 180f && Main.netMode != 1) + if (npc.ai[1] >= 30f && Main.netMode != 1) { npc.ai[1] = 0f; npc.ai[2] = 0f; @@ -167,67 +174,75 @@ namespace CalamityMod.NPCs.Bumblefuck while (npc.ai[0] == 0f) { int damage = Main.expertMode ? 45 : 60; //180 120 - int num1307 = Main.rand.Next(3); + + int num1307 = (phase2 ? Main.rand.Next(2) + 1 : Main.rand.Next(3)); + if (phase3) + num1307 = 1; + if (num1307 == 0 && Collision.CanHit(npc.Center, 1, 1, player.Center, 1, 1)) - { npc.ai[0] = 2f; - } else if (num1307 == 1) { npc.ai[0] = 3f; + if (phase2) + { + Main.PlaySound(2, (int)npc.position.X, (int)npc.position.Y, 102); + Projectile.NewProjectile(npc.Center.X, npc.Center.Y, (float)Main.rand.Next(-2, 3), -4f, mod.ProjectileType("RedLightningFeather"), damage, 0f, Main.myPlayer, 0f, 0f); + } } else if (NPC.CountNPCS(mod.NPCType("Bumblefuck2")) < num1305) { - npc.ai[0] = 4f; //summon more birbs + npc.ai[0] = 4f; Main.PlaySound(2, (int)npc.position.X, (int)npc.position.Y, 102); - for (int num186 = 0; num186 < 6; num186++) + int featherAmt = phase2 ? 3 : 6; + for (int num186 = 0; num186 < featherAmt; num186++) { - Projectile.NewProjectile(npc.Center.X, npc.Center.Y, (float)Main.rand.Next(-10, 10), (float)Main.rand.Next(-5, -2), mod.ProjectileType("RedLightningFeather"), damage, 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(npc.Center.X, npc.Center.Y, (float)Main.rand.Next(-4, 5), -3f, mod.ProjectileType("RedLightningFeather"), damage, 0f, Main.myPlayer, 0f, 0f); } } } - return; } } else { - if (npc.ai[0] == 1f) //move closer and spawn birbs + // Fly to target + if (npc.ai[0] == 1f) { npc.collideX = false; npc.collideY = false; npc.noTileCollide = true; + if (npc.target < 0 || !player.active || player.dead) - { npc.TargetClosest(true); - } + if (npc.velocity.X < 0f) - { npc.direction = -1; - } else if (npc.velocity.X > 0f) - { npc.direction = 1; - } + npc.spriteDirection = npc.direction; npc.rotation = (npc.rotation * 9f + npc.velocity.X * 0.04f) / 10f; + Vector2 value52 = player.Center - npc.Center; - if (value52.Length() < 500f && !Collision.SolidCollision(npc.position, npc.width, npc.height)) //500 + if (value52.Length() < 800f && !Collision.SolidCollision(npc.position, npc.width, npc.height)) { npc.ai[0] = 0f; npc.ai[1] = 0f; npc.ai[2] = 0f; npc.ai[3] = 0f; } - float scaleFactor16 = 13f + value52.Length() / 100f; //7 + + float scaleFactor16 = 14f + value52.Length() / 100f; //7 float num1308 = 25f; value52.Normalize(); value52 *= scaleFactor16; npc.velocity = (npc.velocity * (num1308 - 1f) + value52) / num1308; return; } + + // Fly towards target quickly if (npc.ai[0] == 2f) { - npc.damage = (int)((double)npc.defDamage * 0.9); if (npc.target < 0 || !player.active || player.dead) { npc.TargetClosest(true); @@ -236,149 +251,149 @@ namespace CalamityMod.NPCs.Bumblefuck npc.ai[2] = 0f; npc.ai[3] = 0f; } + if (player.Center.X - 10f < npc.Center.X) - { npc.direction = -1; - } else if (player.Center.X + 10f > npc.Center.X) - { npc.direction = 1; - } + npc.spriteDirection = npc.direction; npc.rotation = (npc.rotation * 4f + npc.velocity.X * 0.05f) / 5f; + if (npc.collideX) { npc.velocity.X = npc.velocity.X * (-npc.oldVelocity.X * 0.5f); - if (npc.velocity.X > 27f) //4 - { - npc.velocity.X = 27f; //4 - } - if (npc.velocity.X < -27f) //4 - { - npc.velocity.X = -27f; //4 - } + if (npc.velocity.X > 4f) + npc.velocity.X = 4f; + if (npc.velocity.X < -4f) + npc.velocity.X = -4f; } if (npc.collideY) { npc.velocity.Y = npc.velocity.Y * (-npc.oldVelocity.Y * 0.5f); - if (npc.velocity.Y > 27f) //4 - { - npc.velocity.Y = 27f; //4 - } - if (npc.velocity.Y < -27f) //4 - { - npc.velocity.Y = -27f; //4 - } + if (npc.velocity.Y > 4f) + npc.velocity.Y = 4f; + if (npc.velocity.Y < -4f) + npc.velocity.Y = -4f; } + Vector2 value53 = player.Center - npc.Center; value53.Y -= 20f; npc.ai[2] += 0.0222222228f; if (Main.expertMode) - { npc.ai[2] += 0.0166666675f; - } - float scaleFactor17 = 12f + npc.ai[2] + value53.Length() / 120f; //4 + + float scaleFactor17 = 8f + npc.ai[2] + value53.Length() / 120f; //4 float num1309 = 20f; value53.Normalize(); value53 *= scaleFactor17; npc.velocity = (npc.velocity * (num1309 - 1f) + value53) / num1309; + npc.ai[1] += 1f; - if (npc.ai[1] > 180f || !Collision.CanHit(npc.Center, 1, 1, player.Center, 1, 1)) + if (npc.ai[1] >= 120f || !Collision.CanHit(npc.Center, 1, 1, player.Center, 1, 1)) { npc.ai[0] = 0f; npc.ai[1] = 0f; npc.ai[2] = 0f; npc.ai[3] = 0f; - return; } } else { + // Variable for charging + float chargeDistance = 600f; + if (phase2) + chargeDistance -= 50f; + if (phase3) + chargeDistance -= 50f; + + // Line up charge if (npc.ai[0] == 3f) { npc.noTileCollide = true; + if (npc.velocity.X < 0f) - { npc.direction = -1; - } else - { npc.direction = 1; - } + npc.spriteDirection = npc.direction; npc.rotation = (npc.rotation * 4f + npc.velocity.X * 0.035f) / 5f; + Vector2 value54 = player.Center - npc.Center; value54.Y -= 12f; if (npc.Center.X > player.Center.X) - { - value54.X += 400f; - } + value54.X += chargeDistance; else - { - value54.X -= 400f; - } - if (Math.Abs(npc.Center.X - player.Center.X) > 350f && Math.Abs(npc.Center.Y - player.Center.Y) < 20f) + value54.X -= chargeDistance; + + if (Math.Abs(npc.Center.X - player.Center.X) > chargeDistance - 50f && Math.Abs(npc.Center.Y - player.Center.Y) < (phase3 ? 100f : 20f)) { npc.ai[0] = 3.1f; npc.ai[1] = 0f; } + npc.ai[1] += 0.0333333351f; - float scaleFactor18 = 18f + npc.ai[1]; //8 + float scaleFactor18 = 18f + npc.ai[1]; float num1310 = 4f; value54.Normalize(); value54 *= scaleFactor18; npc.velocity = (npc.velocity * (num1310 - 1f) + value54) / num1310; return; } + + // Prepare to charge if (npc.ai[0] == 3.1f) { npc.noTileCollide = true; + npc.rotation = (npc.rotation * 4f + npc.velocity.X * 0.035f) / 5f; + Vector2 vector206 = player.Center - npc.Center; vector206.Y -= 12f; - float scaleFactor19 = 26f; //16 + float scaleFactor19 = 32f; //16 float num1311 = 8f; vector206.Normalize(); vector206 *= scaleFactor19; npc.velocity = (npc.velocity * (num1311 - 1f) + vector206) / num1311; + if (npc.velocity.X < 0f) - { npc.direction = -1; - } else - { npc.direction = 1; - } + npc.spriteDirection = npc.direction; + npc.ai[1] += 1f; if (npc.ai[1] > 10f) { npc.velocity = vector206; + if (npc.velocity.X < 0f) - { npc.direction = -1; - } else - { npc.direction = 1; - } + npc.ai[0] = 3.2f; npc.ai[1] = 0f; npc.ai[1] = (float)npc.direction; - return; } } else { + // Charge if (npc.ai[0] == 3.2f) { npc.damage = (int)((double)npc.defDamage * 1.5); + npc.collideX = false; npc.collideY = false; npc.noTileCollide = true; + npc.ai[2] += 0.0333333351f; - npc.velocity.X = (18f + npc.ai[2]) * npc.ai[1]; //16 - if ((npc.ai[1] > 0f && npc.Center.X > player.Center.X + 400f) || (npc.ai[1] < 0f && npc.Center.X < player.Center.X - 400f)) + npc.velocity.X = (32f + npc.ai[2]) * npc.ai[1]; + + if ((npc.ai[1] > 0f && npc.Center.X > player.Center.X + (chargeDistance - 140f)) || (npc.ai[1] < 0f && npc.Center.X < player.Center.X - (chargeDistance - 140f))) { if (!Collision.SolidCollision(npc.position, npc.width, npc.height)) { @@ -387,7 +402,7 @@ namespace CalamityMod.NPCs.Bumblefuck npc.ai[2] = 0f; npc.ai[3] = 0f; } - else if (Math.Abs(npc.Center.X - player.Center.X) > 800f) //800 + else if (Math.Abs(npc.Center.X - player.Center.X) > chargeDistance + 200f) { npc.ai[0] = 1f; npc.ai[1] = 0f; @@ -395,32 +410,40 @@ namespace CalamityMod.NPCs.Bumblefuck npc.ai[3] = 0f; } } + npc.rotation = (npc.rotation * 4f + npc.velocity.X * 0.035f) / 5f; return; } + + // Find tile coordinates for birb spawn if (npc.ai[0] == 4f) { npc.ai[0] = 0f; + npc.TargetClosest(true); + if (Main.netMode != 1) { npc.ai[1] = -1f; npc.ai[2] = -1f; + for (int num1312 = 0; num1312 < 1000; num1312++) { int num1313 = (int)player.Center.X / 16; int num1314 = (int)player.Center.Y / 16; + int num1315 = 30 + num1312 / 50; int num1316 = 20 + num1312 / 75; + num1313 += Main.rand.Next(-num1315, num1315 + 1); num1314 += Main.rand.Next(-num1316, num1316 + 1); + if (!WorldGen.SolidTile(num1313, num1314)) { while (!WorldGen.SolidTile(num1313, num1314) && (double)num1314 < Main.worldSurface) - { num1314++; - } - if ((new Vector2((float)(num1313 * 16 + 8), (float)(num1314 * 16 + 8)) - player.Center).Length() < 5600f) //600 + + if ((new Vector2((float)(num1313 * 16 + 8), (float)(num1314 * 16 + 8)) - player.Center).Length() < 3600f) { npc.ai[0] = 4.1f; npc.ai[1] = (float)num1313; @@ -430,90 +453,95 @@ namespace CalamityMod.NPCs.Bumblefuck } } } + npc.netUpdate = true; return; } + + // Move to birb spawn location if (npc.ai[0] == 4.1f) { if (npc.velocity.X < -2f) - { npc.direction = -1; - } else if (npc.velocity.X > 2f) - { npc.direction = 1; - } + npc.spriteDirection = npc.direction; npc.rotation = (npc.rotation * 9f + npc.velocity.X * 0.05f) / 10f; + npc.noTileCollide = true; + int num1317 = (int)npc.ai[1]; int num1318 = (int)npc.ai[2]; + float x2 = (float)(num1317 * 16 + 8); float y2 = (float)(num1318 * 16 - 20); + Vector2 vector207 = new Vector2(x2, y2); vector207 -= npc.Center; - float num1319 = 6f + vector207.Length() / 150f; - if (num1319 > 10f) - { - num1319 = 10f; - } - float num1320 = 10f; //10 - if (vector207.Length() < 100f) //10 - { + float num1319 = 12f + vector207.Length() / 150f; + if (num1319 > 20f) + num1319 = 20f; + + float num1320 = 10f; + if (vector207.Length() < 10f) npc.ai[0] = 4.2f; - } + vector207.Normalize(); vector207 *= num1319; npc.velocity = (npc.velocity * (num1320 - 1f) + vector207) / num1320; return; } + + // Spawn birbs if (npc.ai[0] == 4.2f) { npc.rotation = (npc.rotation * 9f + npc.velocity.X * 0.05f) / 10f; + npc.noTileCollide = true; + int num1321 = (int)npc.ai[1]; int num1322 = (int)npc.ai[2]; + float x3 = (float)(num1321 * 16 + 8); float y3 = (float)(num1322 * 16 - 20); + Vector2 vector208 = new Vector2(x3, y3); vector208 -= npc.Center; - float num1323 = 40f; //4 + + float num1323 = 4f; //4 float num1324 = 2f; //2 - if (Main.netMode != 1 && vector208.Length() < 40f) //4 + + if (Main.netMode != 1 && vector208.Length() < 4f) { int num1325 = 10; if (Main.expertMode) - { num1325 = (int)((double)num1325 * 0.75); - } + npc.ai[3] += 1f; if (npc.ai[3] == (float)num1325) - { NPC.NewNPC(num1321 * 16 + 8, num1322 * 16, mod.NPCType("Bumblefuck2"), npc.whoAmI, 0f, 0f, 0f, 0f, 255); - } else if (npc.ai[3] == (float)(num1325 * 2)) { npc.ai[0] = 0f; npc.ai[1] = 0f; npc.ai[2] = 0f; npc.ai[3] = 0f; + if (NPC.CountNPCS(mod.NPCType("Bumblefuck2")) < num1305 && Main.rand.Next(5) != 0) - { npc.ai[0] = 4f; - } else if (Collision.SolidCollision(npc.position, npc.width, npc.height)) - { npc.ai[0] = 1f; - } } } + if (vector208.Length() > num1323) { vector208.Normalize(); vector208 *= num1323; } + npc.velocity = (npc.velocity * (num1324 - 1f) + vector208) / num1324; - return; } } } @@ -567,7 +595,7 @@ namespace CalamityMod.NPCs.Bumblefuck DropHelper.DropBags(npc); DropHelper.DropItemChance(npc, mod.ItemType("BumblebirbTrophy"), 10); - DropHelper.DropItemCondition(npc, mod.ItemType("Knowledge43"), true, !CalamityWorld.downedBumble); + DropHelper.DropItemCondition(npc, mod.ItemType("KnowledgeBumblebirb"), true, !CalamityWorld.downedBumble); DropHelper.DropResidentEvilAmmo(npc, CalamityWorld.downedBumble, 5, 2, 1); // All other drops are contained in the bag, so they only drop directly on Normal diff --git a/NPCs/Bumblefuck/Bumblefuck2.cs b/NPCs/Bumblefuck/Bumblefuck2.cs index db47d3432d..2c48afed58 100644 --- a/NPCs/Bumblefuck/Bumblefuck2.cs +++ b/NPCs/Bumblefuck/Bumblefuck2.cs @@ -24,7 +24,7 @@ namespace CalamityMod.NPCs.Bumblefuck npc.height = 80; //216 npc.scale = 0.66f; npc.defense = 25; - npc.lifeMax = 30000; + npc.lifeMax = 25000; if (CalamityWorld.bossRushActive) { npc.lifeMax = 60000; @@ -92,7 +92,7 @@ namespace CalamityMod.NPCs.Bumblefuck else { Vector2 vector241 = Main.player[npc.target].Center - npc.Center; - if (npc.ai[0] > 1f && vector241.Length() > 1000f) + if (npc.ai[0] > 1f && vector241.Length() > 3600f) { npc.ai[0] = 1f; } @@ -112,29 +112,29 @@ namespace CalamityMod.NPCs.Bumblefuck if (npc.collideX) { npc.velocity.X = npc.velocity.X * (-npc.oldVelocity.X * 0.5f); - if (npc.velocity.X > 21f) + if (npc.velocity.X > 4f) { - npc.velocity.X = 21f; + npc.velocity.X = 4f; } - if (npc.velocity.X < -21f) + if (npc.velocity.X < -4f) { - npc.velocity.X = -21f; + npc.velocity.X = -4f; } } if (npc.collideY) { npc.velocity.Y = npc.velocity.Y * (-npc.oldVelocity.Y * 0.5f); - if (npc.velocity.Y > 21f) + if (npc.velocity.Y > 4f) { - npc.velocity.Y = 21f; + npc.velocity.Y = 4f; } - if (npc.velocity.Y < -21f) + if (npc.velocity.Y < -4f) { - npc.velocity.Y = -21f; + npc.velocity.Y = -4f; } } Vector2 value44 = Main.player[npc.target].Center - npc.Center; - if (value44.Length() > 1600f) + if (value44.Length() > 2800f) { npc.ai[0] = 1f; npc.ai[1] = 0f; @@ -143,17 +143,17 @@ namespace CalamityMod.NPCs.Bumblefuck } else if (value44.Length() > 400f) { - float scaleFactor20 = 5.5f + value44.Length() / 100f + npc.ai[1] / 15f; + float scaleFactor20 = 9f + value44.Length() / 100f + npc.ai[1] / 15f; float num1377 = 30f; value44.Normalize(); value44 *= scaleFactor20; - npc.velocity = (npc.velocity * (num1377 - 1f) + value44) / 29.9f; //39 + npc.velocity = (npc.velocity * (num1377 - 1f) + value44) / num1377; } - else if (npc.velocity.Length() > 20f) + else if (npc.velocity.Length() > 2f) { npc.velocity *= 0.95f; } - else if (npc.velocity.Length() < 10f) + else if (npc.velocity.Length() < 1f) { npc.velocity *= 1.05f; } @@ -172,7 +172,6 @@ namespace CalamityMod.NPCs.Bumblefuck npc.collideX = false; npc.collideY = false; npc.noTileCollide = true; - npc.knockBackResist = 0f; if (npc.target < 0 || !Main.player[npc.target].active || Main.player[npc.target].dead) { npc.TargetClosest(true); @@ -188,7 +187,7 @@ namespace CalamityMod.NPCs.Bumblefuck npc.spriteDirection = npc.direction; npc.rotation = (npc.rotation * 9f + npc.velocity.X * 0.04f) / 10f; Vector2 value45 = Main.player[npc.target].Center - npc.Center; - if (value45.Length() < 1200f && !Collision.SolidCollision(npc.position, npc.width, npc.height)) + if (value45.Length() < 800f && !Collision.SolidCollision(npc.position, npc.width, npc.height)) { npc.ai[0] = 0f; npc.ai[1] = 0f; @@ -196,11 +195,11 @@ namespace CalamityMod.NPCs.Bumblefuck npc.ai[3] = 0f; } npc.ai[2] += 0.0166666675f; - float scaleFactor21 = 5.5f + npc.ai[2] + value45.Length() / 150f; - float num1378 = 26f; + float scaleFactor21 = 12f + npc.ai[2] + value45.Length() / 150f; + float num1378 = 25f; value45.Normalize(); value45 *= scaleFactor21; - npc.velocity = (npc.velocity * (num1378 - 1f) + value45) / 25.9f; //34.5 + npc.velocity = (npc.velocity * (num1378 - 1f) + value45) / num1378; return; } if (npc.ai[0] == 2f) @@ -215,15 +214,14 @@ namespace CalamityMod.NPCs.Bumblefuck } npc.spriteDirection = npc.direction; npc.rotation = (npc.rotation * 7f + npc.velocity.X * 0.05f) / 8f; - npc.knockBackResist = 0f; npc.noTileCollide = true; Vector2 vector242 = Main.player[npc.target].Center - npc.Center; vector242.Y -= 8f; - float scaleFactor22 = 21f; //9 + float scaleFactor22 = 18f; float num1379 = 8f; vector242.Normalize(); vector242 *= scaleFactor22; - npc.velocity = (npc.velocity * (num1379 - 1f) + vector242) / 8f; //7.9 + npc.velocity = (npc.velocity * (num1379 - 1f) + vector242) / num1379; if (npc.velocity.X < 0f) { npc.direction = -1; @@ -252,7 +250,8 @@ namespace CalamityMod.NPCs.Bumblefuck } else if (npc.ai[0] == 2.1f) { - if (npc.velocity.X < 0f) + npc.damage = (int)((double)npc.defDamage * 1.5); + if (npc.velocity.X < 0f) { npc.direction = -1; } @@ -262,10 +261,9 @@ namespace CalamityMod.NPCs.Bumblefuck } npc.spriteDirection = npc.direction; npc.velocity *= 1.01f; - npc.knockBackResist = 0f; npc.noTileCollide = true; npc.ai[1] += 1f; - int num1380 = 30; //45 + int num1380 = 30; if (npc.ai[1] > (float)num1380) { if (!Collision.SolidCollision(npc.position, npc.width, npc.height)) diff --git a/NPCs/Calamitas/Calamitas.cs b/NPCs/Calamitas/Calamitas.cs index 51245a7917..df07d1779e 100644 --- a/NPCs/Calamitas/Calamitas.cs +++ b/NPCs/Calamitas/Calamitas.cs @@ -258,8 +258,8 @@ namespace CalamityMod.NPCs.Calamitas num827 = num828 / num827; num825 *= num827; num826 *= num827; - vector82.X += num825 * 15f; - vector82.Y += num826 * 15f; + vector82.X += num825 * 12f; + vector82.Y += num826 * 12f; Projectile.NewProjectile(vector82.X, vector82.Y, num825, num826, num830, num829 + (provy ? 30 : 0), 0f, Main.myPlayer, 0f, 0f); } } @@ -345,8 +345,8 @@ namespace CalamityMod.NPCs.Calamitas num836 = num837 / num836; num834 *= num836; num835 *= num836; - vector83.X += num834 * 15f; - vector83.Y += num835 * 15f; + vector83.X += num834 * 12f; + vector83.Y += num835 * 12f; Projectile.NewProjectile(vector83.X, vector83.Y, num834, num835, num839, num838 + (provy ? 30 : 0), 0f, Main.myPlayer, 0f, 0f); } } diff --git a/NPCs/Calamitas/CalamitasRun3.cs b/NPCs/Calamitas/CalamitasRun3.cs index 728c9aaab7..c0068f2516 100644 --- a/NPCs/Calamitas/CalamitasRun3.cs +++ b/NPCs/Calamitas/CalamitasRun3.cs @@ -7,6 +7,7 @@ using Terraria.Localization; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.Utilities; namespace CalamityMod.NPCs.Calamitas { @@ -370,8 +371,8 @@ namespace CalamityMod.NPCs.Calamitas num827 = num828 / num827; num825 *= num827; num826 *= num827; - vector82.X += num825 * 15f; - vector82.Y += num826 * 15f; + vector82.X += num825 * 12f; + vector82.Y += num826 * 12f; Projectile.NewProjectile(vector82.X, vector82.Y, num825, num826, num830, num829 + (provy ? 30 : 0), 0f, Main.myPlayer, 0f, 0f); } } @@ -468,8 +469,8 @@ namespace CalamityMod.NPCs.Calamitas num836 = num837 / num836; num834 *= num836; num835 *= num836; - vector83.X += num834 * 15f; - vector83.Y += num835 * 15f; + vector83.X += num834 * 12f; + vector83.Y += num835 * 12f; Projectile.NewProjectile(vector83.X, vector83.Y, num834, num835, num839, num838 + (provy ? 30 : 0), 0f, Main.myPlayer, 0f, 0f); } } @@ -579,7 +580,7 @@ namespace CalamityMod.NPCs.Calamitas } DropHelper.DropItem(npc, ItemID.BrokenHeroSword, true); - DropHelper.DropItemCondition(npc, mod.ItemType("Knowledge24"), !CalamityWorld.downedCalamitas); + DropHelper.DropItemCondition(npc, mod.ItemType("KnowledgeCalamitasClone"), !CalamityWorld.downedCalamitas); DropHelper.DropResidentEvilAmmo(npc, CalamityWorld.downedCalamitas, 4, 2, 1); // Abyss awakens after killing Calamitas OR Plantera diff --git a/NPCs/CalamityAI.cs b/NPCs/CalamityAI.cs index d103e1de88..308ee3f6d6 100644 --- a/NPCs/CalamityAI.cs +++ b/NPCs/CalamityAI.cs @@ -12,10 +12,17 @@ namespace CalamityMod.NPCs #region Astrum Aureus public static void AstrumAureusAI(NPC npc, Mod mod) { + // Percent life remaining + float lifeRatio = (float)npc.life / (float)npc.lifeMax; + + // Phases + bool phase2 = lifeRatio < 0.75f; + bool phase3 = lifeRatio < 0.5f; + // Variables bool expertMode = (Main.expertMode || CalamityWorld.bossRushActive); bool revenge = (CalamityWorld.revenge || CalamityWorld.bossRushActive); - int shootBuff = (int)(2f * (1f - (float)npc.life / (float)npc.lifeMax)); + int shootBuff = (int)(2f * (1f - lifeRatio)); float shootTimer = 1f + ((float)shootBuff); bool dayTime = Main.dayTime; Player player = Main.player[npc.target]; @@ -142,7 +149,7 @@ namespace CalamityMod.NPCs // Stay vulnerable for a maximum of 1.5 or 2.5 seconds npc.ai[1] += 1f; - if (npc.ai[1] >= ((npc.life < npc.lifeMax / 4 || npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) ? 90f : 150f)) + if (npc.ai[1] >= ((phase3 || npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) ? 90f : 150f)) { // Increase defense npc.defense = 70; @@ -162,11 +169,7 @@ namespace CalamityMod.NPCs else if (npc.ai[0] == 2f) { // Set walking speed - float num823 = 4.5f; - if ((double)npc.life < (double)npc.lifeMax * 0.5) - num823 = 5.5f; - if ((double)npc.life < (double)npc.lifeMax * 0.1 || CalamityWorld.bossRushActive) - num823 = 7f; + float num823 = 5f + (3f * (1f - lifeRatio)); // Set walking direction if (Math.Abs(npc.Center.X - player.Center.X) < 200f) @@ -257,7 +260,10 @@ namespace CalamityMod.NPCs { // Set jump velocity, reset and set AI to next phase (Stomp) npc.TargetClosest(true); - npc.velocity.X = (float)(4 * npc.direction); + + float velocityX = 6f + (6f * (1f - lifeRatio)); + + npc.velocity.X = velocityX * (float)npc.direction; npc.velocity.Y = -14.5f; npc.ai[0] = 4f; npc.ai[1] = 0f; @@ -275,9 +281,9 @@ namespace CalamityMod.NPCs // Stomp and jump again, if stomped twice then reset and set AI to next phase (Teleport or Idle) npc.ai[2] += 1f; - if (npc.ai[2] >= 2f) + if (npc.ai[2] >= 3f) { - npc.ai[0] = ((npc.life < npc.lifeMax / 2 || revenge) ? 5f : 1f); + npc.ai[0] = ((phase2 || revenge) ? 5f : 1f); npc.ai[2] = 0f; } else @@ -297,10 +303,22 @@ namespace CalamityMod.NPCs { // Set velocities while falling, this happens before the stomp npc.TargetClosest(true); + + // Fall through + if (npc.target >= 0 && revenge && ((player.position.Y > npc.position.Y + (float)npc.height && npc.velocity.Y > 0f) || (player.position.Y < npc.position.Y + (float)npc.height && npc.velocity.Y < 0f))) + npc.noTileCollide = true; + else + npc.noTileCollide = false; + 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.6f; + + if (player.position.Y > npc.position.Y + (float)npc.height) + { + float fallSpeed = 0.8f + (0.8f * (1f - lifeRatio)); + npc.velocity.Y = npc.velocity.Y + fallSpeed; + } } else { @@ -309,16 +327,7 @@ namespace CalamityMod.NPCs else if (npc.direction > 0) npc.velocity.X = npc.velocity.X + 0.2f; - float num626 = 8f; - if (revenge) - num626 += 1f; - if (CalamityWorld.death || CalamityWorld.bossRushActive) - num626 += 2f; - if (npc.life < npc.lifeMax / 2 || CalamityWorld.bossRushActive) - num626 += 1f; - if (npc.life < npc.lifeMax / 10 || CalamityWorld.bossRushActive) - num626 += 1f; - + float num626 = 9f + (6f * (1f - lifeRatio)); if (npc.velocity.X < -num626) npc.velocity.X = -num626; if (npc.velocity.X > num626) @@ -442,6 +451,7 @@ namespace CalamityMod.NPCs // Reset alpha and set AI to next phase (Idle) npc.alpha = 0; npc.ai[0] = 1f; + npc.ai[2] = 0f; npc.netUpdate = true; } diff --git a/NPCs/CalamityBiomeNPCs/CultistAssassin.cs b/NPCs/CalamityBiomeNPCs/CultistAssassin.cs index 509a09f749..2544a4d9bb 100644 --- a/NPCs/CalamityBiomeNPCs/CultistAssassin.cs +++ b/NPCs/CalamityBiomeNPCs/CultistAssassin.cs @@ -3,6 +3,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.CalamityBiomeNPCs { diff --git a/NPCs/CalamityBiomeNPCs/DespairStone.cs b/NPCs/CalamityBiomeNPCs/DespairStone.cs index 947cb8df7b..f43b5c013f 100644 --- a/NPCs/CalamityBiomeNPCs/DespairStone.cs +++ b/NPCs/CalamityBiomeNPCs/DespairStone.cs @@ -4,6 +4,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.CalamityBiomeNPCs { diff --git a/NPCs/CalamityBiomeNPCs/Scryllar.cs b/NPCs/CalamityBiomeNPCs/Scryllar.cs index eca989a387..5e210457cb 100644 --- a/NPCs/CalamityBiomeNPCs/Scryllar.cs +++ b/NPCs/CalamityBiomeNPCs/Scryllar.cs @@ -3,6 +3,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.CalamityBiomeNPCs { diff --git a/NPCs/CalamityBiomeNPCs/ScryllarRage.cs b/NPCs/CalamityBiomeNPCs/ScryllarRage.cs index caffb83706..789546c522 100644 --- a/NPCs/CalamityBiomeNPCs/ScryllarRage.cs +++ b/NPCs/CalamityBiomeNPCs/ScryllarRage.cs @@ -3,6 +3,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.CalamityBiomeNPCs { diff --git a/NPCs/CalamityBiomeNPCs/SoulSlurper.cs b/NPCs/CalamityBiomeNPCs/SoulSlurper.cs index c55f43c183..fbfe906448 100644 --- a/NPCs/CalamityBiomeNPCs/SoulSlurper.cs +++ b/NPCs/CalamityBiomeNPCs/SoulSlurper.cs @@ -4,6 +4,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.CalamityBiomeNPCs { diff --git a/NPCs/CalamityGlobalAI.cs b/NPCs/CalamityGlobalAI.cs index 41ed2ec818..32387946c5 100644 --- a/NPCs/CalamityGlobalAI.cs +++ b/NPCs/CalamityGlobalAI.cs @@ -2496,9 +2496,9 @@ namespace CalamityMod.NPCs float lifeRatio = (float)npc.life / (float)npc.lifeMax; bool phase2 = lifeRatio < 0.85f; - bool phase3 = lifeRatio < 0.7f; - bool phase4 = lifeRatio < 0.55f; - bool phase5 = lifeRatio < 0.4f; + bool phase3 = lifeRatio < 0.75f; + bool phase4 = lifeRatio < 0.65f; + bool phase5 = lifeRatio < 0.5f; if (npc.target < 0 || npc.target == 255 || Main.player[npc.target].dead || !Main.player[npc.target].active) npc.TargetClosest(true); @@ -3578,7 +3578,7 @@ namespace CalamityMod.NPCs calamityGlobalNPC.newAI[1] += 1f; // Set velocity for when a new head spawns - npc.velocity = Vector2.Normalize(Main.player[npc.target].Center - npc.Center) * num37; + npc.velocity = Vector2.Normalize(Main.player[npc.target].Center - npc.Center) * (num37 * 0.4f); } if (!flag2) @@ -3760,6 +3760,634 @@ namespace CalamityMod.NPCs } #endregion + #region Buffed Brain of Cthulhu AI + public static bool BuffedBrainofCthulhuAI(NPC npc, bool enraged, Mod mod) + { + // whoAmI variable + NPC.crimsonBoss = npc.whoAmI; + + // Spawn Creepers + if (Main.netMode != 1 && npc.localAI[0] == 0f) + { + npc.localAI[0] = 1f; + for (int num789 = 0; num789 < 20; num789++) + { + float num790 = npc.Center.X; + float num791 = npc.Center.Y; + num790 += (float)Main.rand.Next(-npc.width, npc.width); + num791 += (float)Main.rand.Next(-npc.height, npc.height); + + int num792 = NPC.NewNPC((int)num790, (int)num791, NPCID.Creeper, 0, 0f, 0f, 0f, 0f, 255); + Main.npc[num792].velocity = new Vector2((float)Main.rand.Next(-30, 31) * 0.1f, (float)Main.rand.Next(-30, 31) * 0.1f); + Main.npc[num792].netUpdate = true; + } + } + + // Despawn + if (Main.netMode != 1) + { + npc.TargetClosest(true); + + if (Vector2.Distance(Main.player[npc.target].Center, npc.Center) > 6000f) + { + npc.active = false; + npc.life = 0; + + if (Main.netMode == 2) + NetMessage.SendData(23, -1, -1, null, npc.whoAmI, 0f, 0f, 0f, 0, 0, 0); + } + } + + // Phase 2 + if (npc.ai[0] < 0f) + { + // Spawn gore + if (npc.localAI[2] == 0f) + { + Main.PlaySound(3, (int)npc.position.X, (int)npc.position.Y, 1, 1f, 0f); + + npc.localAI[2] = 1f; + + Gore.NewGore(npc.position, new Vector2((float)Main.rand.Next(-30, 31) * 0.2f, (float)Main.rand.Next(-30, 31) * 0.2f), 392, 1f); + Gore.NewGore(npc.position, new Vector2((float)Main.rand.Next(-30, 31) * 0.2f, (float)Main.rand.Next(-30, 31) * 0.2f), 393, 1f); + Gore.NewGore(npc.position, new Vector2((float)Main.rand.Next(-30, 31) * 0.2f, (float)Main.rand.Next(-30, 31) * 0.2f), 394, 1f); + Gore.NewGore(npc.position, new Vector2((float)Main.rand.Next(-30, 31) * 0.2f, (float)Main.rand.Next(-30, 31) * 0.2f), 395, 1f); + + for (int num794 = 0; num794 < 20; num794++) + Dust.NewDust(npc.position, npc.width, npc.height, 5, (float)Main.rand.Next(-30, 31) * 0.2f, (float)Main.rand.Next(-30, 31) * 0.2f, 0, default(Color), 1f); + + Main.PlaySound(15, (int)npc.position.X, (int)npc.position.Y, 0, 1f, 0f); + } + + // Percent life remaining + float lifeRatio = (float)npc.life / (float)npc.lifeMax; + + // Phases based on HP + bool phase2 = lifeRatio < 0.85f; + bool phase3 = lifeRatio < 0.7f; + bool phase4 = lifeRatio < 0.5f; + bool phase5 = lifeRatio < 0.3f; + bool spinning = npc.ai[0] == -4f; + + // Gain defense while spinning + npc.defense = npc.defDefense + (spinning ? 7 : 0); + + // Take damage + npc.dontTakeDamage = false; + + // Deal no damage while spinning + npc.damage = (spinning ? 0 : npc.defDamage); + + // Move towards target + npc.TargetClosest(true); + + // Target distance X + float playerLocation = npc.Center.X - Main.player[npc.target].Center.X; + + // Charge + if (!spinning) + { + // Not charging + if (npc.ai[0] != -6f) + { + // Rubber band movement + Vector2 vector98 = new Vector2(npc.Center.X, npc.Center.Y); + float num795 = Main.player[npc.target].Center.X - vector98.X; + float num796 = Main.player[npc.target].Center.Y - vector98.Y; + float num797 = (float)Math.Sqrt((double)(num795 * num795 + num796 * num796)); + float num798 = 8f + (2f * (1f - lifeRatio)); + + if (phase2 && !phase3) + num798 *= 0.9f; + + num797 = num798 / num797; + num795 *= num797; + num796 *= num797; + npc.velocity.X = (npc.velocity.X * 50f + num795) / 51f; + npc.velocity.Y = (npc.velocity.Y * 50f + num796) / 51f; + } + + // Charge, -6 + else + { + npc.ai[1] += 1f; + + // Teleport + if (npc.ai[1] >= 115f) + { + npc.knockBackResist = 0.45f - (0.45f * (1f - lifeRatio)); + + npc.ai[0] = -7f; + npc.ai[1] = 0f; + npc.localAI[1] = 120f; + npc.netUpdate = true; + } + + // Charge sound and velocity + else if (npc.ai[1] == 10f) + { + // Sound + Main.PlaySound(36, (int)npc.position.X, (int)npc.position.Y, -1, 1f, 0f); + + // Velocity + npc.velocity = Vector2.Normalize(Main.player[npc.target].Center - npc.Center) * 14f; + } + } + + // Rubber band movement, -5 + if (npc.ai[0] == -5f) + { + // Spin or teleport + npc.ai[2] += 1f; + if (npc.ai[2] >= 180f) + { + bool spin = (phase4 ? Main.rand.Next(4) > 0 : Main.rand.NextBool()); + if (phase5) + spin = true; + + // Velocity and knockback + if (spin) + { + npc.knockBackResist = 0f; + npc.velocity = Vector2.Normalize(Main.player[npc.target].Center - npc.Center) * 24f; + } + else + npc.knockBackResist = 0.45f - (0.45f * (1f - lifeRatio)); + + npc.ai[0] = (!spin ? -7f : -4f); + npc.ai[1] = (!spin ? 0f : (playerLocation < 0 ? 1f : -1f)); + npc.ai[2] = 0f; + npc.ai[3] = (!spin ? 0f : (float)Main.rand.Next(61)); + npc.localAI[1] = (!spin ? 120f : 0f); + npc.netUpdate = true; + } + } + } + + // Circle around, -4 + if (spinning) + { + // Charge sound + if (npc.ai[2] == 0f) + Main.PlaySound(15, (int)npc.position.X, (int)npc.position.Y, 0, 1f, 0f); + + // Velocity + int var = 120; + float velocity = 6.28318548f / ((float)var * 0.75f); + npc.velocity = npc.velocity.RotatedBy((double)(-(double)velocity * npc.ai[1]), default(Vector2)); + + npc.ai[2] += 1f; + + float timer = 60f + npc.ai[3]; + + if (npc.ai[2] >= timer - 5f) + { + if (Vector2.Distance(Main.player[npc.target].Center, npc.Center) < 400f) // 25 tile distance + { + npc.ai[2] -= 1f; + npc.velocity = Vector2.Normalize(Main.player[npc.target].Center - npc.Center) * -6f; + } + } + + // Charge at target and spit blood, -6 is straight line movement, -5 is rubber band movement + if (npc.ai[2] >= timer) + { + // Complete stop + npc.velocity *= 0f; + + // Blood spurt + if (phase5) + { + // Blood dust + for (int num621 = 0; num621 < 6; num621++) + { + int num622 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 5, 0f, 0f, 100, default(Color), 1f); + Main.dust[num622].velocity *= 3f; + if (Main.rand.Next(2) == 0) + { + Main.dust[num622].scale = 0.25f; + Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f; + } + } + for (int num623 = 0; num623 < 12; num623++) + { + int num624 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 5, 0f, 0f, 100, default(Color), 1.5f); + 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, 5, 0f, 0f, 100, default(Color), 1f); + Main.dust[num624].velocity *= 2f; + } + + // Projectile speed and spread + float num179 = 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; + float num182 = Main.player[npc.target].position.Y + (float)Main.player[npc.target].height * 0.5f - value9.Y - num181; + float num183 = (float)Math.Sqrt((double)(num180 * num180 + num182 * num182)); + num183 = num179 / num183; + num180 *= num183; + num182 *= num183; + value9.X += num180; + value9.Y += num182; + + // Fire 10 projectiles in an arc + for (int num186 = 0; num186 < 5; num186++) + { + num180 = Main.player[npc.target].position.X + (float)Main.player[npc.target].width * 0.5f - value9.X; + num182 = Main.player[npc.target].position.Y + (float)Main.player[npc.target].height * 0.5f - value9.Y; + num183 = (float)Math.Sqrt((double)(num180 * num180 + num182 * num182)); + num183 = num179 / num183; + num180 += (float)Main.rand.Next(-120, 121); + num180 *= num183; + Projectile.NewProjectile(value9.X, value9.Y, num180, -5f, mod.ProjectileType("BloodGeyser"), 10, 0f, Main.myPlayer, 0f, 0f); + } + } + + bool charge = (phase4 ? Main.rand.Next(4) > 0 : Main.rand.NextBool()); + if (phase5) + charge = true; + + // Adjust knockback + if (charge) + npc.knockBackResist = 0f; + else + npc.knockBackResist = 0.45f - (0.45f * (1f - lifeRatio)); + + npc.ai[0] = (charge ? -6f : -5f); + npc.ai[1] = 0f; + npc.ai[2] = 0f; + npc.ai[3] = 0f; + npc.netUpdate = true; + } + } + + // Pick teleport location + else if (npc.ai[0] == -1f || npc.ai[0] == -7f) + { + // Adjust knockback + if (npc.ai[0] == -1f) + npc.knockBackResist = 0.45f - (0.45f * (1f - lifeRatio)); + + if (Main.netMode != 1) + { + // Go to phase 3 + if (phase3 && npc.ai[0] == -1f) + { + npc.ai[0] = -5f; + npc.ai[1] = 0f; + npc.ai[2] = 0f; + npc.ai[3] = 0f; + npc.localAI[1] = 0f; + npc.alpha = 0; + npc.netUpdate = true; + } + + npc.localAI[1] += 1f; + + int random = 5 - (int)(5f * (1f - lifeRatio)); + if (npc.justHit) + npc.localAI[1] -= (float)Main.rand.Next(random); + + float num799 = ((phase2 && !phase3) ? 90f : 120f); + if (npc.localAI[1] >= num799) + { + npc.localAI[1] = 0f; + npc.TargetClosest(true); + int num800 = 0; + int num801; + int num802; + while (true) + { + num800++; + num801 = (int)Main.player[npc.target].Center.X / 16; + num802 = (int)Main.player[npc.target].Center.Y / 16; + + int min = 9; + int max = ((phase2 && !phase3) ? 11 : 15); + + if (phase3) + { + min = 17; + max = 20; + } + + if (Main.rand.Next(2) == 0) + num801 += Main.rand.Next(min, max); + else + num801 -= Main.rand.Next(min, max); + + if (Main.rand.Next(2) == 0) + num802 += Main.rand.Next(min, max); + else + num802 -= Main.rand.Next(min, max); + + if (!WorldGen.SolidTile(num801, num802)) + break; + + if (num800 > 100) + goto Block_2784; + } + npc.ai[3] = 0f; + npc.ai[0] = (npc.ai[0] == -7f ? -8f : -2f); + npc.ai[1] = (float)num801; + npc.ai[2] = (float)num802; + npc.netUpdate = true; + npc.netSpam = 0; + Block_2784:; + } + } + } + + // Teleport and turn invisible + else if (npc.ai[0] == -2f || npc.ai[0] == -8f) + { + npc.velocity *= 0.9f; + + if (Main.netMode != 0) + npc.ai[3] += 15f; + else + npc.ai[3] += 25f; + + if (npc.ai[3] >= 255f) + { + npc.ai[3] = 255f; + npc.position.X = npc.ai[1] * 16f - (float)(npc.width / 2); + npc.position.Y = npc.ai[2] * 16f - (float)(npc.height / 2); + Main.PlaySound(SoundID.Item8, npc.Center); + npc.ai[0] = (npc.ai[0] == -8f ? -9f : -3f); + npc.netUpdate = true; + npc.netSpam = 0; + } + + npc.alpha = (int)npc.ai[3]; + } + + // Become visible + else if (npc.ai[0] == -3f || npc.ai[0] == -9f) + { + if (Main.netMode != 0) + npc.ai[3] -= 15f; + else + npc.ai[3] -= 25f; + + if (npc.ai[3] <= 0f) + { + bool spin = (phase4 ? (Main.rand.NextBool() && npc.ai[0] == -9f) : false); + if (phase5 && npc.ai[0] == -9f) + spin = true; + + if (spin) + { + // Adjust knockback + npc.knockBackResist = 0f; + + npc.velocity = Vector2.Normalize(Main.player[npc.target].Center - npc.Center) * 24f; + + npc.ai[0] = -4f; + npc.ai[1] = (playerLocation < 0 ? 1f : -1f); + npc.ai[2] = 0f; + npc.ai[3] = (float)Main.rand.Next(61); + } + else + { + npc.ai[3] = 0f; + npc.ai[2] = 0f; + npc.ai[1] = 0f; + npc.ai[0] = (npc.ai[0] == -9f ? -5f : -1f); + } + npc.netUpdate = true; + npc.netSpam = 0; + } + + npc.alpha = (int)npc.ai[3]; + } + } + + // Phase 1 + else + { + // Creeper count + int creeperCount = NPC.CountNPCS(NPCID.Creeper); + int creeperScale = 21 - creeperCount; // 1 to 20 + bool phase2 = creeperCount <= 0; + + // Move towards target + npc.TargetClosest(true); + Vector2 vector99 = new Vector2(npc.Center.X, npc.Center.Y); + float num803 = Main.player[npc.target].Center.X - vector99.X; + float num804 = Main.player[npc.target].Center.Y - vector99.Y; + float num805 = (float)Math.Sqrt((double)(num803 * num803 + num804 * num804)); + float num806 = 1f + ((float)creeperScale * 0.05f); + if (num805 < num806) + { + npc.velocity.X = num803; + npc.velocity.Y = num804; + } + else + { + num805 = num806 / num805; + npc.velocity.X = num803 * num805; + npc.velocity.Y = num804 * num805; + } + + // Pick a teleport location + if (npc.ai[0] == 0f) + { + if (Main.netMode != 1) + { + // Go to phase 2 + if (phase2) + { + npc.ai[0] = -1f; + npc.localAI[1] = 0f; + npc.alpha = 0; + npc.netUpdate = true; + } + + // Teleport location + npc.localAI[1] += 1f + ((float)creeperScale * 0.05f); + if (npc.localAI[1] >= 300f) + { + npc.localAI[1] = 0f; + npc.TargetClosest(true); + int num809 = 0; + int num810; + int num811; + while (true) + { + num809++; + num810 = (int)Main.player[npc.target].Center.X / 16; + num811 = (int)Main.player[npc.target].Center.Y / 16; + + int min = 18; + int max = 26; + + if (Main.rand.Next(2) == 0) + num810 += Main.rand.Next(min, max); + else + num810 -= Main.rand.Next(min, max); + + if (Main.rand.Next(2) == 0) + num811 += Main.rand.Next(min, max); + else + num811 -= Main.rand.Next(min, max); + + if (!WorldGen.SolidTile(num810, num811) && Collision.CanHit(new Vector2((float)(num810 * 16), (float)(num811 * 16)), 1, 1, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height)) + { + break; + } + if (num809 > 100) + { + goto Block_2801; + } + } + npc.ai[0] = 1f; + npc.ai[1] = (float)num810; + npc.ai[2] = (float)num811; + npc.netUpdate = true; + Block_2801:; + } + } + } + + // Turn invisible and teleport + else if (npc.ai[0] == 1f) + { + npc.alpha += 5; + if (npc.alpha >= 255) + { + Main.PlaySound(SoundID.Item8, npc.Center); + npc.alpha = 255; + npc.position.X = npc.ai[1] * 16f - (float)(npc.width / 2); + npc.position.Y = npc.ai[2] * 16f - (float)(npc.height / 2); + npc.ai[0] = 2f; + } + } + + // Become visible + else if (npc.ai[0] == 2f) + { + npc.alpha -= 5; + if (npc.alpha <= 0) + { + npc.alpha = 0; + npc.ai[0] = 0f; + } + } + } + + // Despawn + if (Main.player[npc.target].dead || (!Main.player[npc.target].ZoneCrimson && !Main.player[npc.target].ZoneCorrupt)) + { + if (npc.localAI[3] < 120f) + npc.localAI[3] += 1f; + + if (npc.localAI[3] > 60f) + npc.velocity.Y = npc.velocity.Y + (npc.localAI[3] - 60f) * 0.25f; + + npc.ai[0] = 2f; + npc.alpha = 10; + return false; + } + if (npc.localAI[3] > 0f) + npc.localAI[3] -= 1f; + + if (ModLoader.GetMod("FargowiltasSouls") != null) + ModLoader.GetMod("FargowiltasSouls").Call("FargoSoulsAI", npc.whoAmI); + + return false; + } + + public static bool BuffedCreeperAI(NPC npc, bool enraged, Mod mod) + { + // Despawn if Brain is gone + if (NPC.crimsonBoss < 0) + { + npc.active = false; + npc.netUpdate = true; + return false; + } + + // Creeper count, 0 to 20 + int creeperCount = NPC.CountNPCS(NPCID.Creeper); + bool phase2 = creeperCount <= 10; + + // Adjust knockback + if (phase2) + npc.knockBackResist = 0f; + + // Stay near Brain + if (npc.ai[0] == 0f) + { + Vector2 vector100 = new Vector2(npc.Center.X, npc.Center.Y); + float num812 = Main.npc[NPC.crimsonBoss].Center.X - vector100.X; + float num813 = Main.npc[NPC.crimsonBoss].Center.Y - vector100.Y; + float num814 = (float)Math.Sqrt((double)(num812 * num812 + num813 * num813)); + float velocity = CalamityWorld.death ? 10f : 9f; + + // Max distance from Brain + if (num814 > 90f) + { + num814 = velocity / num814; + num812 *= num814; + num813 *= num814; + npc.velocity.X = (npc.velocity.X * 15f + num812) / 16f; + npc.velocity.Y = (npc.velocity.Y * 15f + num813) / 16f; + return false; + } + + // Increase speed + if (Math.Abs(npc.velocity.X) + Math.Abs(npc.velocity.Y) < velocity) + { + npc.velocity.Y = npc.velocity.Y * 1.05f; + npc.velocity.X = npc.velocity.X * 1.05f; + } + + // Charge at target + int creeperScale = 21 - creeperCount; // 1 to 20 + npc.ai[1] += 0.5f + ((float)creeperScale * 0.25f); + if (Main.netMode != 1 && npc.ai[1] >= 240f) + { + npc.ai[1] = 0f; + npc.TargetClosest(true); + vector100 = new Vector2(npc.Center.X, npc.Center.Y); + num812 = Main.player[npc.target].Center.X - vector100.X; + num813 = Main.player[npc.target].Center.Y - vector100.Y; + num814 = (float)Math.Sqrt((double)(num812 * num812 + num813 * num813)); + num814 = velocity / num814; + npc.velocity.X = num812 * num814; + npc.velocity.Y = num813 * num814; + npc.ai[0] = 1f; + npc.netUpdate = true; + } + } + + // Charge + else + { + Vector2 value2 = Main.player[npc.target].Center - npc.Center; + value2.Normalize(); + value2 *= 9f; + npc.velocity = (npc.velocity * 99f + value2) / 100f; + + Vector2 vector101 = new Vector2(npc.Center.X, npc.Center.Y); + float num815 = Main.npc[NPC.crimsonBoss].Center.X - vector101.X; + float num816 = Main.npc[NPC.crimsonBoss].Center.Y - vector101.Y; + float num817 = (float)Math.Sqrt((double)(num815 * num815 + num816 * num816)); + + // Return to Brain + if (num817 > 700f || (npc.justHit && !phase2)) + npc.ai[0] = 0f; + } + + if (ModLoader.GetMod("FargowiltasSouls") != null) + ModLoader.GetMod("FargowiltasSouls").Call("FargoSoulsAI", npc.whoAmI); + + return false; + } + #endregion + #region Buffed Queen Bee AI public static bool BuffedQueenBeeAI(NPC npc, Mod mod) { @@ -4338,7 +4966,8 @@ namespace CalamityMod.NPCs Main.npc[num155].netUpdate = true; } - if (phase2 && calamityGlobalNPC.newAI[0] == 0f) + // Respawn hands + if (phase2 && calamityGlobalNPC.newAI[0] == 0f && Vector2.Distance(Main.player[npc.target].Center, npc.Center) > 160f) { npc.TargetClosest(true); calamityGlobalNPC.newAI[0] = 1f; @@ -4359,11 +4988,14 @@ namespace CalamityMod.NPCs } } + // Distance from target + float distance = Vector2.Distance(Main.player[npc.target].Center, npc.Center); + // Despawn - if (Main.player[npc.target].dead || Math.Abs(npc.position.X - Main.player[npc.target].position.X) > 2000f || Math.Abs(npc.position.Y - Main.player[npc.target].position.Y) > 2000f) + if (Main.player[npc.target].dead || distance > 2000f) { npc.TargetClosest(true); - if (Main.player[npc.target].dead || Math.Abs(npc.position.X - Main.player[npc.target].position.X) > 2000f || Math.Abs(npc.position.Y - Main.player[npc.target].position.Y) > 2000f) + if (Main.player[npc.target].dead || distance > 2000f) npc.ai[1] = 3f; } @@ -4400,10 +5032,9 @@ namespace CalamityMod.NPCs // Fire magic bolt after teleport if (Main.netMode != 1) { - Vector2 vector = Main.player[npc.target].Center - npc.Center; - float num151 = 1.5f + (vector.Length() * 0.003f); - if (num151 > 3f) - num151 = 3f; + float num151 = 2f + (distance * 0.005f); + if (num151 > 5f) + num151 = 5f; int num152 = 17; int num153 = ProjectileID.Shadowflames; @@ -4424,7 +5055,7 @@ namespace CalamityMod.NPCs // Teleport dust for (int m = 0; m < 60; m++) { - int num39 = Dust.NewDust(npc.position, npc.width, npc.height, 235, 0f, 0f, 200, default(Color), 2f); + int num39 = Dust.NewDust(npc.position, npc.width, npc.height, 27, 0f, 0f, 200, default(Color), 3f); Main.dust[num39].noGravity = true; Main.dust[num39].velocity.X = Main.dust[num39].velocity.X * 2f; } @@ -4432,7 +5063,7 @@ namespace CalamityMod.NPCs // Teleport after certain number of hits if (npc.justHit) - npc.ai[3] += (CalamityWorld.death ? 1.5f : 1f) + ((phase2 && handsDead) ? 1f : 0f); + npc.ai[3] += ((CalamityWorld.death ? 1.5f : 1f) + ((phase2 && handsDead) ? 1f : 0f)) - (handsDead ? 0f : 0.5f); // Dust to show teleport int ai3 = (int)npc.ai[3]; // 0 to 30, and -60 @@ -4447,7 +5078,7 @@ namespace CalamityMod.NPCs } if (emitDust) { - int dust = Dust.NewDust(npc.position, npc.width, npc.height, 235, 0f, 0f, 200, default(Color), 1f); + int dust = Dust.NewDust(npc.position, npc.width, npc.height, 27, 0f, 0f, 200, default(Color), 1.5f); Main.dust[dust].noGravity = true; Main.dust[dust].velocity.X = Main.dust[dust].velocity.X * 2f; } @@ -4490,7 +5121,7 @@ namespace CalamityMod.NPCs // Teleport dust for (int m = 0; m < 60; m++) { - int num39 = Dust.NewDust(npc.position, npc.width, npc.height, 235, 0f, 0f, 200, default(Color), 2f); + int num39 = Dust.NewDust(npc.position, npc.width, npc.height, 27, 0f, 0f, 200, default(Color), 3f); Main.dust[num39].noGravity = true; Main.dust[num39].velocity.X = Main.dust[num39].velocity.X * 2f; } @@ -4707,6 +5338,9 @@ namespace CalamityMod.NPCs } } + if (ModLoader.GetMod("FargowiltasSouls") != null) + ModLoader.GetMod("FargowiltasSouls").Call("FargoSoulsAI", npc.whoAmI); + return false; } @@ -4921,6 +5555,9 @@ namespace CalamityMod.NPCs else if (npc.ai[2] == 5f && ((npc.velocity.X > 0f && npc.position.X + (float)(npc.width / 2) > Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2)) || (npc.velocity.X < 0f && npc.position.X + (float)(npc.width / 2) < Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2)))) npc.ai[2] = 0f; + if (ModLoader.GetMod("FargowiltasSouls") != null) + ModLoader.GetMod("FargowiltasSouls").Call("FargoSoulsAI", npc.whoAmI); + return false; } #endregion @@ -9021,6 +9658,7 @@ namespace CalamityMod.NPCs bool surface = (double)Main.player[npc.target].position.Y < Main.worldSurface * 16.0; int tentacleCount = NPC.CountNPCS(NPCID.PlanterasTentacle); bool tentaclesDead = tentacleCount == 0; + bool speedUp = Vector2.Distance(Main.player[npc.target].Center, npc.Center) > (phase3 ? 480f : 640f); // 30 or 40 tile distance // Despawn if (Main.player[npc.target].dead) @@ -9032,8 +9670,7 @@ namespace CalamityMod.NPCs // Despawn if too far from target if (Main.netMode != 1) { - int num728 = 6000; - if (Math.Abs(npc.Center.X - Main.player[npc.target].Center.X) + Math.Abs(npc.Center.Y - Main.player[npc.target].Center.Y) > (float)num728) + if (Vector2.Distance(Main.player[npc.target].Center, npc.Center) > 6000f) { npc.active = false; npc.life = 0; @@ -9076,32 +9713,50 @@ namespace CalamityMod.NPCs num731 /= (float)num732; // Velocity and acceleration - float velocity = 4f; - float acceleration = 0.04f; - if (phase2) - { - velocity = 7f; - acceleration = 0.07f; - } + float velocity = 6f; + float acceleration = 0.06f; if (phase3) - velocity = 9f; - - // Charge in closer if all tentacles are dead - bool speedUp = Vector2.Distance(Main.player[npc.target].Center, npc.Center) > 480f; // 30 tile distance - if (tentaclesDead && phase3) { - if (speedUp) + velocity = 10f; + acceleration = 0.1f; + if (tentaclesDead) { - velocity = 14f; - acceleration = 0.14f; + velocity = 12f; + acceleration = 0.12f; } - else + } + else if (phase2) + { + velocity = 8f; + acceleration = 0.08f; + } + + // Move faster if inside active tiles + int radius = 2; // 2 tile radius + int diameter = radius * 2; + int npcCenterX = (int)(npc.Center.X / 16f); + int npcCenterY = (int)(npc.Center.Y / 16f); + Rectangle area = new Rectangle(npcCenterX - radius, npcCenterY - radius, diameter, diameter); + bool insideTiles = false; + for (int x = area.Left; x < area.Right; x++) + { + for (int y = area.Top; y < area.Bottom; y++) { - velocity = 4f; - acceleration = 0.04f; + if (Main.tile[x, y] != null) + { + if (Main.tile[x, y].active() && Main.tileSolid[Main.tile[x, y].type] && !Main.tileSolidTop[Main.tile[x, y].type] && !TileID.Sets.Platforms[Main.tile[x, y].type]) + insideTiles = true; + } } } + // Slow down if close to target and not inside tiles + if (!speedUp && !insideTiles) + { + velocity = 4f; + acceleration = 0.04f; + } + // Enrage if target is on the surface if (surface || Main.player[npc.target].position.Y > (float)((Main.maxTilesY - 200) * 16)) { @@ -9117,11 +9772,9 @@ namespace CalamityMod.NPCs } // Detect active tiles around Plantera - int radius = 20; // 20 tile radius - int diameter = radius * 2; - int npcCenterX = (int)(npc.Center.X / 16f); - int npcCenterY = (int)(npc.Center.Y / 16f); - Rectangle area = new Rectangle(npcCenterX - radius, npcCenterY - radius, diameter, diameter); + radius = 20; // 20 tile radius + diameter = radius * 2; + area = new Rectangle(npcCenterX - radius, npcCenterY - radius, diameter, diameter); int nearbyActiveTiles = 0; // 0 to 1600 for (int x = area.Left; x < area.Right; x++) { @@ -9219,8 +9872,8 @@ namespace CalamityMod.NPCs npc.velocity.Y = npc.velocity.Y - acceleration * 2f; } - // Slow down considerably if near player in phase 3 - if (tentaclesDead && phase3 && !speedUp) + // Slow down considerably if near player + if (!speedUp && nearbyActiveTiles > 400 && !insideTiles) { if (npc.velocity.Length() > velocity) npc.velocity *= 0.97f; @@ -9311,7 +9964,7 @@ namespace CalamityMod.NPCs vector93.X += num743 * 3f; vector93.Y += num744 * 3f; int num748 = Projectile.NewProjectile(vector93.X, vector93.Y, num743, num744, projectileType, damage, 0f, Main.myPlayer, 0f, 0f); - if (projectileType != ProjectileID.ThornBall) + if (projectileType == ProjectileID.SeedPlantera) Main.projectile[num748].timeLeft = 300; } } @@ -9389,12 +10042,20 @@ namespace CalamityMod.NPCs if (tentacleCount < 8) { int tentacleScale = 8 - tentacleCount; // 1 to 8 - npc.localAI[3] += 1f + (float)(tentacleScale - 1); + + if (nearbyActiveTiles > 800) + npc.localAI[3] += 0.5f + ((float)(tentacleScale - 1) * 0.5f); + else + npc.localAI[3] += (nearbyActiveTiles > 400 ? 1f : 5f) + (float)(tentacleScale - 1); if (npc.localAI[3] >= (CalamityWorld.death ? 330f : 360f)) { Vector2 vector93 = new Vector2(npc.Center.X, npc.Center.Y); - float num742 = 10f - ((float)tentacleScale / 2f); // 9.5f to 6f, slower projectiles are harder to avoid + + float num742 = 10f - ((float)tentacleScale * 0.5f); // 9.5f to 6f, slower projectiles are harder to avoid + if (nearbyActiveTiles <= 400) + num742 = 10f; + float num743 = Main.player[npc.target].position.X + (float)Main.player[npc.target].width * 0.5f - vector93.X; float num744 = Main.player[npc.target].position.Y + (float)Main.player[npc.target].height * 0.5f - vector93.Y; float num745 = (float)Math.Sqrt((double)(num743 * num743 + num744 * num744)); @@ -9404,15 +10065,18 @@ namespace CalamityMod.NPCs vector93.X += num743 * 3f; vector93.Y += num744 * 3f; - int damage = 27; + int damage = 24; int numProj = 2; + int spread = 2 + tentacleScale; // 3 to 10, wider spread is harder to avoid + if (nearbyActiveTiles <= 400) + spread = (Main.rand.Next(2) == 0 ? 3 : 6) + (tentacleScale / 2); + float rotation = MathHelper.ToRadians(spread); for (int i = 0; i < numProj + 1; i++) { Vector2 perturbedSpeed = new Vector2(num743, num744).RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (numProj - 1))); - int proj = Projectile.NewProjectile(vector93.X, vector93.Y, perturbedSpeed.X, perturbedSpeed.Y, ProjectileID.PoisonSeedPlantera, damage, 0f, Main.myPlayer, 0f, 0f); - Main.projectile[proj].timeLeft = 300; + Projectile.NewProjectile(vector93.X, vector93.Y, perturbedSpeed.X, perturbedSpeed.Y, ProjectileID.PoisonSeedPlantera, damage, 0f, Main.myPlayer, 0f, 0f); } npc.localAI[3] = 0f; } @@ -9438,9 +10102,14 @@ namespace CalamityMod.NPCs vector93.X += num743 * 3f; vector93.Y += num744 * 3f; - int damage = 25; + int damage = 26; int numProj = 4; - float rotation = MathHelper.ToRadians(30); + + int spread = 30; + if (nearbyActiveTiles <= 400) + spread = (Main.rand.Next(2) == 0 ? 30 : 45); + + float rotation = MathHelper.ToRadians(spread); float baseSpeed = (float)Math.Sqrt(num743 * num743 + num744 * num744); double startAngle = Math.Atan2(num743, num744) - rotation / 2; double deltaAngle = rotation / (float)numProj; @@ -9769,12 +10438,1052 @@ namespace CalamityMod.NPCs } #endregion + #region Buffed Duke Fishron AI + public static bool BuffedDukeFishronAI(NPC npc, bool enraged, Mod mod) + { + CalamityGlobalNPC calamityGlobalNPC = npc.GetGlobalNPC(mod); + + // Variables + float num = 0.6f * Main.damageMultiplier; + bool phase2 = (double)npc.life <= (double)npc.lifeMax * 0.66; + bool phase3 = (double)npc.life <= (double)npc.lifeMax * ((CalamityWorld.death || CalamityWorld.bossRushActive) ? 0.33 : 0.2); + bool phase2AI = npc.ai[0] > 4f; + bool phase3AI = npc.ai[0] > 9f; + bool charging = npc.ai[3] < 10f; + + // Adjust stats + if (phase3AI) + { + npc.damage = (int)((float)npc.defDamage * 1.1f * num); + npc.defense = (int)((float)npc.defDefense * 0.75f); + } + else if (phase2AI) + { + npc.damage = (int)((float)npc.defDamage * 1.2f * num); + npc.defense = npc.defDefense; + } + else + { + npc.damage = npc.defDamage; + npc.defense = (int)((float)npc.defDefense * 1.2f); + } + + int num2 = 30; + float num3 = 0.55f; + float scaleFactor = 8.5f; + if (phase3AI) + { + num3 = 0.7f; + scaleFactor = 12f; + } + else if (phase2AI & charging) + { + num3 = 0.6f; + scaleFactor = 10f; + } + + int chargeTime = 28; + float chargeVelocity = 17f; + if (phase3AI) + { + chargeTime = 25; + chargeVelocity = 27f; + } + else if (charging & phase2AI) + { + chargeTime = 27; + chargeVelocity = 21f; + } + + // Variables + int num6 = 80; + int num7 = 4; + float num8 = 0.3f; + float scaleFactor2 = 5f; + int num9 = 90; + int num10 = 180; + int num11 = 180; + int num12 = 30; + int num13 = 120; + int num14 = 4; + float scaleFactor3 = 6f; + float scaleFactor4 = 20f; + float num15 = 6.28318548f / (float)(num13 / 2); + int num16 = 75; + Vector2 vector = npc.Center; + Player player = Main.player[npc.target]; + + // Get target + if (npc.target < 0 || npc.target == 255 || player.dead || !player.active) + { + npc.TargetClosest(true); + player = Main.player[npc.target]; + npc.netUpdate = true; + } + + // Despawn + if (player.dead || Vector2.Distance(player.Center, vector) > 5600f) + { + npc.velocity.Y = npc.velocity.Y - 0.4f; + + if (npc.timeLeft > 10) + npc.timeLeft = 10; + + if (npc.ai[0] > 4f) + npc.ai[0] = 5f; + else + npc.ai[0] = 0f; + + npc.ai[2] = 0f; + } + + // Enrage variable + bool enrage = player.position.Y < 800f || (double)player.position.Y > Main.worldSurface * 16.0 || (player.position.X > 6400f && player.position.X < (float)(Main.maxTilesX * 16 - 6400)); + + // If the player isn't in the ocean biome or Fishron is transitioning between phases, become immune + if (!phase3AI) + npc.dontTakeDamage = npc.ai[0] == -1f || npc.ai[0] == 4f || npc.ai[0] == 9f || enrage; + + // Enrage + if (enrage) + { + num2 = 20; + npc.damage = npc.defDamage * 2; + npc.defense = npc.defDefense * 2; + npc.ai[3] = 0f; + chargeVelocity += 8f; + } + + // Spawn cthulhunadoes in phase 3 + if (phase3AI) + { + calamityGlobalNPC.newAI[0] += 1f; + if (calamityGlobalNPC.newAI[0] >= 600f) + { + calamityGlobalNPC.newAI[0] = 0f; + + if (Main.netMode != 1) + Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0f, 0f, ProjectileID.SharknadoBolt, 0, 0f, Main.myPlayer, 1f, (float)(npc.target + 1)); + + npc.netUpdate = true; + } + } + + // Set variables for spawn effects + if (npc.localAI[0] == 0f) + { + npc.localAI[0] = 1f; + npc.alpha = 255; + npc.rotation = 0f; + if (Main.netMode != 1) + { + npc.ai[0] = -1f; + npc.netUpdate = true; + } + } + + // Rotation + float num17 = (float)Math.Atan2((double)(player.Center.Y - vector.Y), (double)(player.Center.X - vector.X)); + if (npc.spriteDirection == 1) + num17 += 3.14159274f; + if (num17 < 0f) + num17 += 6.28318548f; + if (num17 > 6.28318548f) + num17 -= 6.28318548f; + if (npc.ai[0] == -1f) + num17 = 0f; + if (npc.ai[0] == 3f) + num17 = 0f; + if (npc.ai[0] == 4f) + num17 = 0f; + if (npc.ai[0] == 8f) + num17 = 0f; + + float num18 = 0.04f; + if (npc.ai[0] == 1f || npc.ai[0] == 6f) + num18 = 0f; + if (npc.ai[0] == 7f) + num18 = 0f; + if (npc.ai[0] == 3f) + num18 = 0.01f; + if (npc.ai[0] == 4f) + num18 = 0.01f; + if (npc.ai[0] == 8f) + num18 = 0.01f; + + if (npc.rotation < num17) + { + if ((double)(num17 - npc.rotation) > 3.1415926535897931) + npc.rotation -= num18; + else + npc.rotation += num18; + } + if (npc.rotation > num17) + { + if ((double)(npc.rotation - num17) > 3.1415926535897931) + npc.rotation += num18; + else + npc.rotation -= num18; + } + + if (npc.rotation > num17 - num18 && npc.rotation < num17 + num18) + npc.rotation = num17; + if (npc.rotation < 0f) + npc.rotation += 6.28318548f; + if (npc.rotation > 6.28318548f) + npc.rotation -= 6.28318548f; + if (npc.rotation > num17 - num18 && npc.rotation < num17 + num18) + npc.rotation = num17; + + // Alpha adjustments + if (npc.ai[0] != -1f && npc.ai[0] < 9f) + { + if (Collision.SolidCollision(npc.position, npc.width, npc.height)) + npc.alpha += 15; + else + npc.alpha -= 15; + + if (npc.alpha < 0) + npc.alpha = 0; + if (npc.alpha > 150) + npc.alpha = 150; + } + + // Spawn effects + if (npc.ai[0] == -1f) + { + // Velocity + npc.velocity *= 0.98f; + + // Direction + int num19 = Math.Sign(player.Center.X - vector.X); + if (num19 != 0) + { + npc.direction = num19; + npc.spriteDirection = -npc.direction; + } + + // Alpha + if (npc.ai[2] > 20f) + { + npc.velocity.Y = -2f; + + npc.alpha -= 5; + if (Collision.SolidCollision(npc.position, npc.width, npc.height)) + npc.alpha += 15; + if (npc.alpha < 0) + npc.alpha = 0; + if (npc.alpha > 150) + npc.alpha = 150; + } + + // Spawn dust and play sound + if (npc.ai[2] == (float)(num9 - 30)) + { + int num20 = 36; + for (int i = 0; i < num20; i++) + { + Vector2 expr_80F = (Vector2.Normalize(npc.velocity) * new Vector2((float)npc.width / 2f, (float)npc.height) * 0.75f * 0.5f).RotatedBy((double)((float)(i - (num20 / 2 - 1)) * 6.28318548f / (float)num20), default(Vector2)) + npc.Center; + Vector2 vector2 = expr_80F - npc.Center; + int num21 = Dust.NewDust(expr_80F + vector2, 0, 0, 172, vector2.X * 2f, vector2.Y * 2f, 100, default(Color), 1.4f); + Main.dust[num21].noGravity = true; + Main.dust[num21].noLight = true; + Main.dust[num21].velocity = Vector2.Normalize(vector2) * 3f; + } + + Main.PlaySound(29, (int)vector.X, (int)vector.Y, 20, 1f, 0f); + } + + npc.ai[2] += 1f; + if (npc.ai[2] >= (float)num16) + { + npc.ai[0] = 0f; + npc.ai[1] = 0f; + npc.ai[2] = 0f; + npc.netUpdate = true; + } + } + + // Phase 1 + else if (npc.ai[0] == 0f && !player.dead) + { + // Velocity + if (npc.ai[1] == 0f) + npc.ai[1] = (float)(300 * Math.Sign((vector - player.Center).X)); + + Vector2 vector3 = Vector2.Normalize(player.Center + new Vector2(npc.ai[1], -200f) - vector - npc.velocity) * scaleFactor; + if (npc.velocity.X < vector3.X) + { + npc.velocity.X = npc.velocity.X + num3; + if (npc.velocity.X < 0f && vector3.X > 0f) + npc.velocity.X = npc.velocity.X + num3; + } + else if (npc.velocity.X > vector3.X) + { + npc.velocity.X = npc.velocity.X - num3; + if (npc.velocity.X > 0f && vector3.X < 0f) + npc.velocity.X = npc.velocity.X - num3; + } + if (npc.velocity.Y < vector3.Y) + { + npc.velocity.Y = npc.velocity.Y + num3; + if (npc.velocity.Y < 0f && vector3.Y > 0f) + npc.velocity.Y = npc.velocity.Y + num3; + } + else if (npc.velocity.Y > vector3.Y) + { + npc.velocity.Y = npc.velocity.Y - num3; + if (npc.velocity.Y > 0f && vector3.Y < 0f) + npc.velocity.Y = npc.velocity.Y - num3; + } + + // Rotation and direction + int num22 = Math.Sign(player.Center.X - vector.X); + if (num22 != 0) + { + if (npc.ai[2] == 0f && num22 != npc.direction) + npc.rotation += 3.14159274f; + + npc.direction = num22; + + if (npc.spriteDirection != -npc.direction) + npc.rotation += 3.14159274f; + + npc.spriteDirection = -npc.direction; + } + + // Phase switch + npc.ai[2] += 1f; + if (npc.ai[2] >= (float)num2) + { + int num23 = 0; + switch ((int)npc.ai[3]) + { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + num23 = 1; + break; + case 10: + npc.ai[3] = 1f; + num23 = 2; + break; + case 11: + npc.ai[3] = 0f; + num23 = 3; + break; + } + + if (phase2) + num23 = 4; + + // Set velocity for charge + if (num23 == 1) + { + npc.ai[0] = 1f; + npc.ai[1] = 0f; + npc.ai[2] = 0f; + + // Velocity + npc.velocity = Vector2.Normalize(player.Center - vector) * chargeVelocity; + npc.rotation = (float)Math.Atan2((double)npc.velocity.Y, (double)npc.velocity.X); + + // Direction + if (num22 != 0) + { + npc.direction = num22; + + if (npc.spriteDirection == 1) + npc.rotation += 3.14159274f; + + npc.spriteDirection = -npc.direction; + } + } + + // Bubbles + else if (num23 == 2) + { + npc.ai[0] = 2f; + npc.ai[1] = 0f; + npc.ai[2] = 0f; + } + + // Spawn sharknadoes + else if (num23 == 3) + { + npc.ai[0] = 3f; + npc.ai[1] = 0f; + npc.ai[2] = 0f; + } + + // Go to phase 2 + else if (num23 == 4) + { + npc.ai[0] = 4f; + npc.ai[1] = 0f; + npc.ai[2] = 0f; + } + + npc.netUpdate = true; + } + } + + // Charge + else if (npc.ai[0] == 1f) + { + // Accelerate + npc.velocity *= 1.01f; + + // Spawn dust + int num24 = 7; + for (int j = 0; j < num24; j++) + { + Vector2 arg_E1C_0 = (Vector2.Normalize(npc.velocity) * new Vector2((float)(npc.width + 50) / 2f, (float)npc.height) * 0.75f).RotatedBy((double)(j - (num24 / 2 - 1)) * 3.1415926535897931 / (double)((float)num24), default(Vector2)) + vector; + Vector2 vector4 = ((float)(Main.rand.NextDouble() * 3.1415927410125732) - 1.57079637f).ToRotationVector2() * (float)Main.rand.Next(3, 8); + int num25 = Dust.NewDust(arg_E1C_0 + vector4, 0, 0, 172, vector4.X * 2f, vector4.Y * 2f, 100, default(Color), 1.4f); + Main.dust[num25].noGravity = true; + Main.dust[num25].noLight = true; + Main.dust[num25].velocity /= 4f; + Main.dust[num25].velocity -= npc.velocity; + } + + npc.ai[2] += 1f; + if (npc.ai[2] >= (float)chargeTime) + { + npc.ai[0] = 0f; + npc.ai[1] = 0f; + npc.ai[2] = 0f; + npc.ai[3] += 2f; + npc.netUpdate = true; + } + } + + // Bubble belch + else if (npc.ai[0] == 2f) + { + // Velocity + if (npc.ai[1] == 0f) + npc.ai[1] = (float)(300 * Math.Sign((vector - player.Center).X)); + + Vector2 vector5 = Vector2.Normalize(player.Center + new Vector2(npc.ai[1], -200f) - vector - npc.velocity) * scaleFactor2; + if (npc.velocity.X < vector5.X) + { + npc.velocity.X = npc.velocity.X + num8; + if (npc.velocity.X < 0f && vector5.X > 0f) + npc.velocity.X = npc.velocity.X + num8; + } + else if (npc.velocity.X > vector5.X) + { + npc.velocity.X = npc.velocity.X - num8; + if (npc.velocity.X > 0f && vector5.X < 0f) + npc.velocity.X = npc.velocity.X - num8; + } + if (npc.velocity.Y < vector5.Y) + { + npc.velocity.Y = npc.velocity.Y + num8; + if (npc.velocity.Y < 0f && vector5.Y > 0f) + npc.velocity.Y = npc.velocity.Y + num8; + } + else if (npc.velocity.Y > vector5.Y) + { + npc.velocity.Y = npc.velocity.Y - num8; + if (npc.velocity.Y > 0f && vector5.Y < 0f) + npc.velocity.Y = npc.velocity.Y - num8; + } + + // Play sounds and spawn bubbles + if (npc.ai[2] == 0f) + Main.PlaySound(29, (int)vector.X, (int)vector.Y, 20, 1f, 0f); + + if (npc.ai[2] % (float)num7 == 0f) + { + Main.PlaySound(4, (int)npc.Center.X, (int)npc.Center.Y, 19, 1f, 0f); + + if (Main.netMode != 1) + { + Vector2 vector6 = Vector2.Normalize(player.Center - vector) * (float)(npc.width + 20) / 2f + vector; + NPC.NewNPC((int)vector6.X, (int)vector6.Y + 45, NPCID.DetonatingBubble, 0, 0f, 0f, 0f, 0f, 255); + } + } + + // Direction + int num26 = Math.Sign(player.Center.X - vector.X); + if (num26 != 0) + { + npc.direction = num26; + if (npc.spriteDirection != -npc.direction) + npc.rotation += 3.14159274f; + npc.spriteDirection = -npc.direction; + } + + npc.ai[2] += 1f; + if (npc.ai[2] >= (float)num6) + { + npc.ai[0] = 0f; + npc.ai[1] = 0f; + npc.ai[2] = 0f; + npc.netUpdate = true; + } + } + + // Sharknado spawn + else if (npc.ai[0] == 3f) + { + // Velocity + npc.velocity *= 0.98f; + npc.velocity.Y = MathHelper.Lerp(npc.velocity.Y, 0f, 0.02f); + + // Play sound and spawn sharknadoes + if (npc.ai[2] == (float)(num9 - 30)) + Main.PlaySound(29, (int)vector.X, (int)vector.Y, 9, 1f, 0f); + + if (Main.netMode != 1 && npc.ai[2] == (float)(num9 - 30)) + { + Vector2 vector7 = npc.rotation.ToRotationVector2() * (Vector2.UnitX * (float)npc.direction) * (float)(npc.width + 20) / 2f + vector; + bool normal = Main.rand.NextBool(); + float velocityY = normal ? 8f : -4f; + float ai1 = normal ? 0f : -1f; + + Projectile.NewProjectile(vector7.X, vector7.Y, (float)(npc.direction * 3), velocityY, ProjectileID.SharknadoBolt, 0, 0f, Main.myPlayer, 0f, ai1); + Projectile.NewProjectile(vector7.X, vector7.Y, (float)(-(float)npc.direction * 3), velocityY, ProjectileID.SharknadoBolt, 0, 0f, Main.myPlayer, 0f, ai1); + + velocityY = normal ? -4f : 8f; + ai1 = normal ? -1f : 0f; + Projectile.NewProjectile(vector7.X, vector7.Y, 0f, velocityY, ProjectileID.SharknadoBolt, 0, 0f, Main.myPlayer, 0f, ai1); + } + + npc.ai[2] += 1f; + if (npc.ai[2] >= (float)num9) + { + npc.ai[0] = 0f; + npc.ai[1] = 0f; + npc.ai[2] = 0f; + npc.netUpdate = true; + } + } + + // Transition to phase 2 + else if (npc.ai[0] == 4f) + { + // Velocity + npc.velocity *= 0.98f; + npc.velocity.Y = MathHelper.Lerp(npc.velocity.Y, 0f, 0.02f); + + // Sound + if (npc.ai[2] == (float)(num10 - 60)) + Main.PlaySound(29, (int)vector.X, (int)vector.Y, 20, 1f, 0f); + + npc.ai[2] += 1f; + if (npc.ai[2] >= (float)num10) + { + npc.ai[0] = 5f; + npc.ai[1] = 0f; + npc.ai[2] = 0f; + npc.ai[3] = 0f; + npc.netUpdate = true; + } + } + + // Phase 2 + else if (npc.ai[0] == 5f && !player.dead) + { + // Velocity + if (npc.ai[1] == 0f) + npc.ai[1] = (float)(300 * Math.Sign((vector - player.Center).X)); + + Vector2 vector8 = Vector2.Normalize(player.Center + new Vector2(npc.ai[1], -200f) - vector - npc.velocity) * scaleFactor; + if (npc.velocity.X < vector8.X) + { + npc.velocity.X = npc.velocity.X + num3; + if (npc.velocity.X < 0f && vector8.X > 0f) + npc.velocity.X = npc.velocity.X + num3; + } + else if (npc.velocity.X > vector8.X) + { + npc.velocity.X = npc.velocity.X - num3; + if (npc.velocity.X > 0f && vector8.X < 0f) + npc.velocity.X = npc.velocity.X - num3; + } + if (npc.velocity.Y < vector8.Y) + { + npc.velocity.Y = npc.velocity.Y + num3; + if (npc.velocity.Y < 0f && vector8.Y > 0f) + npc.velocity.Y = npc.velocity.Y + num3; + } + else if (npc.velocity.Y > vector8.Y) + { + npc.velocity.Y = npc.velocity.Y - num3; + if (npc.velocity.Y > 0f && vector8.Y < 0f) + npc.velocity.Y = npc.velocity.Y - num3; + } + + // Direction and rotation + int num27 = Math.Sign(player.Center.X - vector.X); + if (num27 != 0) + { + if (npc.ai[2] == 0f && num27 != npc.direction) + npc.rotation += 3.14159274f; + + npc.direction = num27; + + if (npc.spriteDirection != -npc.direction) + npc.rotation += 3.14159274f; + + npc.spriteDirection = -npc.direction; + } + + // Phase switch + npc.ai[2] += 1f; + if (npc.ai[2] >= (float)num2) + { + int num28 = 0; + switch ((int)npc.ai[3]) + { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + num28 = 1; + break; + case 6: + npc.ai[3] = 1f; + num28 = 2; + break; + case 7: + npc.ai[3] = 0f; + num28 = 3; + break; + } + + if (phase3) + num28 = 4; + + // Set velocity for charge + if (num28 == 1) + { + npc.ai[0] = 6f; + npc.ai[1] = 0f; + npc.ai[2] = 0f; + + // Velocity and rotation + npc.velocity = Vector2.Normalize(player.Center - vector) * chargeVelocity; + npc.rotation = (float)Math.Atan2((double)npc.velocity.Y, (double)npc.velocity.X); + + // Direction + if (num27 != 0) + { + npc.direction = num27; + + if (npc.spriteDirection == 1) + npc.rotation += 3.14159274f; + + npc.spriteDirection = -npc.direction; + } + } + + // Set velocity for spin + else if (num28 == 2) + { + // Velocity and rotation + npc.velocity = Vector2.Normalize(player.Center - vector) * scaleFactor4; + npc.rotation = (float)Math.Atan2((double)npc.velocity.Y, (double)npc.velocity.X); + + // Direction + if (num27 != 0) + { + npc.direction = num27; + + if (npc.spriteDirection == 1) + npc.rotation += 3.14159274f; + + npc.spriteDirection = -npc.direction; + } + + npc.ai[0] = 7f; + npc.ai[1] = 0f; + npc.ai[2] = 0f; + } + + // Spawn cthulhunado + else if (num28 == 3) + { + npc.ai[0] = 8f; + npc.ai[1] = 0f; + npc.ai[2] = 0f; + } + + // Go to next phase + else if (num28 == 4) + { + npc.ai[0] = 9f; + npc.ai[1] = 0f; + npc.ai[2] = 0f; + } + + npc.netUpdate = true; + } + } + + // Charge + else if (npc.ai[0] == 6f) + { + // Accelerate + npc.velocity *= 1.01f; + + // Spawn dust + int num29 = 7; + for (int k = 0; k < num29; k++) + { + Vector2 arg_1A97_0 = (Vector2.Normalize(npc.velocity) * new Vector2((float)(npc.width + 50) / 2f, (float)npc.height) * 0.75f).RotatedBy((double)(k - (num29 / 2 - 1)) * 3.1415926535897931 / (double)((float)num29), default(Vector2)) + vector; + Vector2 vector9 = ((float)(Main.rand.NextDouble() * 3.1415927410125732) - 1.57079637f).ToRotationVector2() * (float)Main.rand.Next(3, 8); + int num30 = Dust.NewDust(arg_1A97_0 + vector9, 0, 0, 172, vector9.X * 2f, vector9.Y * 2f, 100, default(Color), 1.4f); + Main.dust[num30].noGravity = true; + Main.dust[num30].noLight = true; + Main.dust[num30].velocity /= 4f; + Main.dust[num30].velocity -= npc.velocity; + } + + npc.ai[2] += 1f; + if (npc.ai[2] >= (float)chargeTime) + { + npc.ai[0] = 5f; + npc.ai[1] = 0f; + npc.ai[2] = 0f; + npc.ai[3] += 2f; + npc.netUpdate = true; + } + } + + // Bubble spin + else if (npc.ai[0] == 7f) + { + // Play sounds and spawn bubbles + if (npc.ai[2] == 0f) + Main.PlaySound(29, (int)vector.X, (int)vector.Y, 20, 1f, 0f); + + if (npc.ai[2] % (float)num14 == 0f) + { + Main.PlaySound(4, (int)npc.Center.X, (int)npc.Center.Y, 19, 1f, 0f); + + if (Main.netMode != 1) + { + Vector2 vector10 = Vector2.Normalize(npc.velocity) * (float)(npc.width + 20) / 2f + vector; + int num31 = NPC.NewNPC((int)vector10.X, (int)vector10.Y + 45, NPCID.DetonatingBubble, 0, 0f, 0f, 0f, 0f, 255); + Main.npc[num31].target = npc.target; + Main.npc[num31].velocity = Vector2.Normalize(npc.velocity).RotatedBy((double)(1.57079637f * (float)npc.direction), default(Vector2)) * scaleFactor3; + Main.npc[num31].netUpdate = true; + Main.npc[num31].ai[3] = (float)Main.rand.Next(80, 121) / 100f; + + if (npc.ai[2] % (float)(num14 * 5) == 0f) + { + int npc2 = NPC.NewNPC((int)vector10.X, (int)vector10.Y + 45, NPCID.Sharkron2, 0, 0f, 0f, 0f, 0f, 255); + Main.npc[npc2].ai[1] = 89f; + } + } + } + + // Velocity and rotation + npc.velocity = npc.velocity.RotatedBy((double)(-(double)num15 * (float)npc.direction), default(Vector2)); + npc.rotation -= num15 * (float)npc.direction; + + npc.ai[2] += 1f; + if (npc.ai[2] >= (float)num13) + { + npc.ai[0] = 5f; + npc.ai[1] = 0f; + npc.ai[2] = 0f; + npc.netUpdate = true; + } + } + + // Spawn cthulhunado + else if (npc.ai[0] == 8f) + { + // Velocity + npc.velocity *= 0.98f; + npc.velocity.Y = MathHelper.Lerp(npc.velocity.Y, 0f, 0.02f); + + // Play sound and spawn cthulhunado + if (npc.ai[2] == (float)(num9 - 30)) + Main.PlaySound(29, (int)vector.X, (int)vector.Y, 20, 1f, 0f); + + if (Main.netMode != 1 && npc.ai[2] == (float)(num9 - 30)) + Projectile.NewProjectile(vector.X, vector.Y, 0f, 0f, ProjectileID.SharknadoBolt, 0, 0f, Main.myPlayer, 1f, (float)(npc.target + 1)); + + npc.ai[2] += 1f; + if (npc.ai[2] >= (float)num9) + { + npc.ai[0] = 5f; + npc.ai[1] = 0f; + npc.ai[2] = 0f; + npc.netUpdate = true; + } + } + + // Transition to phase 3 + else if (npc.ai[0] == 9f) + { + // Alpha adjustments + if (npc.ai[2] < (float)(num11 - 90)) + { + if (Collision.SolidCollision(npc.position, npc.width, npc.height)) + npc.alpha += 15; + else + npc.alpha -= 15; + + if (npc.alpha < 0) + npc.alpha = 0; + if (npc.alpha > 150) + npc.alpha = 150; + } + else if (npc.alpha < 255) + { + npc.alpha += 4; + if (npc.alpha > 255) + npc.alpha = 255; + } + + // Velocity + npc.velocity *= 0.98f; + npc.velocity.Y = MathHelper.Lerp(npc.velocity.Y, 0f, 0.02f); + + // Play sound + if (npc.ai[2] == (float)(num11 - 60)) + Main.PlaySound(29, (int)vector.X, (int)vector.Y, 20, 1f, 0f); + + npc.ai[2] += 1f; + if (npc.ai[2] >= (float)num11) + { + npc.ai[0] = 10f; + npc.ai[1] = 0f; + npc.ai[2] = 0f; + npc.ai[3] = 0f; + npc.netUpdate = true; + } + } + + // Phase 3 + else if (npc.ai[0] == 10f && !player.dead) + { + npc.dontTakeDamage = false; + npc.chaseable = false; + + // Alpha + if (npc.alpha < 255) + { + npc.alpha += 25; + if (npc.alpha > 255) + npc.alpha = 255; + } + + // Teleport location + if (npc.ai[1] == 0f) + npc.ai[1] = (float)(360 * Math.Sign((vector - player.Center).X)); + + Vector2 desiredVelocity = Vector2.Normalize(player.Center + new Vector2(npc.ai[1], -200f) - vector - npc.velocity) * scaleFactor; + npc.SimpleFlyMovement(desiredVelocity, num3); + + // Rotation and direction + int num32 = Math.Sign(player.Center.X - vector.X); + if (num32 != 0) + { + if (npc.ai[2] == 0f && num32 != npc.direction) + { + npc.rotation += 3.14159274f; + for (int l = 0; l < npc.oldPos.Length; l++) + npc.oldPos[l] = Vector2.Zero; + } + + npc.direction = num32; + + if (npc.spriteDirection != -npc.direction) + npc.rotation += 3.14159274f; + + npc.spriteDirection = -npc.direction; + } + + // Phase switch + npc.ai[2] += 1f; + if (npc.ai[2] >= (float)num2) + { + int num33 = 0; + switch ((int)npc.ai[3]) + { + case 0: + case 2: + case 3: + case 5: + case 6: + case 7: + num33 = 1; + break; + case 1: + case 4: + case 8: + num33 = 2; + break; + } + + // Set velocity for charge + if (num33 == 1) + { + npc.ai[0] = 11f; + npc.ai[1] = 0f; + npc.ai[2] = 0f; + + // Velocity and rotation + npc.velocity = Vector2.Normalize(player.Center - vector) * chargeVelocity; + npc.rotation = (float)Math.Atan2((double)npc.velocity.Y, (double)npc.velocity.X); + + // Direction + if (num32 != 0) + { + npc.direction = num32; + + if (npc.spriteDirection == 1) + npc.rotation += 3.14159274f; + + npc.spriteDirection = -npc.direction; + } + } + + // Pause + else if (num33 == 2) + { + npc.ai[0] = 12f; + npc.ai[1] = 0f; + npc.ai[2] = 0f; + } + + npc.netUpdate = true; + } + } + + // Charge + else if (npc.ai[0] == 11f) + { + npc.dontTakeDamage = false; + npc.chaseable = true; + + // Accelerate + npc.velocity *= 1.01f; + + // Alpha + npc.alpha -= 25; + if (npc.alpha < 0) + npc.alpha = 0; + + // Spawn dust + int num34 = 7; + for (int m = 0; m < num34; m++) + { + Vector2 arg_2444_0 = (Vector2.Normalize(npc.velocity) * new Vector2((float)(npc.width + 50) / 2f, (float)npc.height) * 0.75f).RotatedBy((double)(m - (num34 / 2 - 1)) * 3.1415926535897931 / (double)((float)num34), default(Vector2)) + vector; + Vector2 vector11 = ((float)(Main.rand.NextDouble() * 3.1415927410125732) - 1.57079637f).ToRotationVector2() * (float)Main.rand.Next(3, 8); + int num35 = Dust.NewDust(arg_2444_0 + vector11, 0, 0, 172, vector11.X * 2f, vector11.Y * 2f, 100, default(Color), 1.4f); + Main.dust[num35].noGravity = true; + Main.dust[num35].noLight = true; + Main.dust[num35].velocity /= 4f; + Main.dust[num35].velocity -= npc.velocity; + } + + npc.ai[2] += 1f; + if (npc.ai[2] >= (float)chargeTime) + { + npc.ai[0] = 10f; + npc.ai[1] = 0f; + npc.ai[2] = 0f; + npc.ai[3] += 1f; + npc.netUpdate = true; + } + } + + // Pause before teleport + else if (npc.ai[0] == 12f) + { + npc.dontTakeDamage = true; + npc.chaseable = false; + + // Alpha + if (npc.alpha < 255) + { + npc.alpha += 17; + if (npc.alpha > 255) + npc.alpha = 255; + } + + // Velocity + npc.velocity *= 0.98f; + npc.velocity.Y = MathHelper.Lerp(npc.velocity.Y, 0f, 0.02f); + + // Play sound + if (npc.ai[2] == (float)(num12 / 2)) + Main.PlaySound(29, (int)vector.X, (int)vector.Y, 20, 1f, 0f); + + if (Main.netMode != 1 && npc.ai[2] == (float)(num12 / 2)) + { + // Teleport location + if (npc.ai[1] == 0f) + npc.ai[1] = (float)(300 * Math.Sign((vector - player.Center).X)); + + // Rotation and direction + Vector2 center = player.Center + new Vector2(-npc.ai[1], -200f); + vector = (npc.Center = center); + int num36 = Math.Sign(player.Center.X - vector.X); + if (num36 != 0) + { + if (npc.ai[2] == 0f && num36 != npc.direction) + { + npc.rotation += 3.14159274f; + for (int n = 0; n < npc.oldPos.Length; n++) + npc.oldPos[n] = Vector2.Zero; + } + + npc.direction = num36; + + if (npc.spriteDirection != -npc.direction) + npc.rotation += 3.14159274f; + + npc.spriteDirection = -npc.direction; + } + } + + npc.ai[2] += 1f; + if (npc.ai[2] >= (float)num12) + { + npc.ai[0] = 10f; + npc.ai[1] = 0f; + npc.ai[2] = 0f; + + npc.ai[3] += 1f; + if (npc.ai[3] >= 9f) + npc.ai[3] = 0f; + + npc.netUpdate = true; + } + } + + if (ModLoader.GetMod("FargowiltasSouls") != null) + ModLoader.GetMod("FargowiltasSouls").Call("FargoSoulsAI", npc.whoAmI); + + return false; + } + #endregion + #region Buffed Mothron AI public static bool BuffedMothronAI(NPC npc) { npc.noTileCollide = false; npc.noGravity = true; - npc.knockBackResist = 0.2f * Main.expertKnockBack; + npc.knockBackResist = 0f; npc.damage = npc.defDamage; if (!Main.eclipse) @@ -9783,13 +11492,13 @@ namespace CalamityMod.NPCs { npc.TargetClosest(true); Vector2 vector235 = Main.player[npc.target].Center - npc.Center; - if (Main.player[npc.target].dead || vector235.Length() > 3000f) + if (Main.player[npc.target].dead || vector235.Length() > 4000f) npc.ai[0] = -1f; } else { Vector2 vector236 = Main.player[npc.target].Center - npc.Center; - if (npc.ai[0] > 1f && vector236.Length() > 1000f) + if (npc.ai[0] > 1f && vector236.Length() > 3000f) npc.ai[0] = 1f; } @@ -9818,33 +11527,33 @@ namespace CalamityMod.NPCs { npc.velocity.X = npc.velocity.X * (-npc.oldVelocity.X * 0.5f); - if (npc.velocity.X > 30f) - npc.velocity.X = 30f; - if (npc.velocity.X < -30f) - npc.velocity.X = -30f; + if (npc.velocity.X > 4f) + npc.velocity.X = 4f; + if (npc.velocity.X < -4f) + npc.velocity.X = -4f; } if (npc.collideY) { npc.velocity.Y = npc.velocity.Y * (-npc.oldVelocity.Y * 0.5f); - if (npc.velocity.Y > 30f) - npc.velocity.Y = 30f; - if (npc.velocity.Y < -30f) - npc.velocity.Y = -30f; + if (npc.velocity.Y > 4f) + npc.velocity.Y = 4f; + if (npc.velocity.Y < -4f) + npc.velocity.Y = -4f; } Vector2 value38 = Main.player[npc.target].Center - npc.Center; value38.Y -= 200f; - if (value38.Length() > 2000f) + if (value38.Length() > 3000f) { npc.ai[0] = 1f; npc.ai[1] = 0f; npc.ai[2] = 0f; npc.ai[3] = 0f; } - else if (value38.Length() > 80f) + else if (value38.Length() > 240f) { - float scaleFactor15 = 13f; + float scaleFactor15 = 15f; float num1354 = 30f; value38.Normalize(); value38 *= scaleFactor15; @@ -9856,10 +11565,8 @@ namespace CalamityMod.NPCs npc.velocity *= 1.05f; npc.ai[1] += 1f; - if (npc.justHit) - npc.ai[1] += (float)Main.rand.Next(10, 30); - if (npc.ai[1] >= 180f && Main.netMode != 1) + if (npc.ai[1] >= 20f && Main.netMode != 1) { npc.ai[1] = 0f; npc.ai[2] = 0f; @@ -9873,7 +11580,7 @@ namespace CalamityMod.NPCs npc.ai[0] = 2f; else if (num1355 == 1) npc.ai[0] = 3f; - else if (num1355 == 2 && NPC.CountNPCS(478) + NPC.CountNPCS(479) < 3) + else if (num1355 == 2 && NPC.CountNPCS(478) + NPC.CountNPCS(479) < 2) npc.ai[0] = 4f; } } @@ -9885,7 +11592,6 @@ namespace CalamityMod.NPCs npc.collideX = false; npc.collideY = false; npc.noTileCollide = true; - npc.knockBackResist = 0f; if (npc.target < 0 || !Main.player[npc.target].active || Main.player[npc.target].dead) npc.TargetClosest(true); @@ -9899,7 +11605,7 @@ namespace CalamityMod.NPCs npc.rotation = (npc.rotation * 9f + npc.velocity.X * 0.02f) / 10f; Vector2 value39 = Main.player[npc.target].Center - npc.Center; - if (value39.Length() < 300f && !Collision.SolidCollision(npc.position, npc.width, npc.height)) + if (value39.Length() < 800f && !Collision.SolidCollision(npc.position, npc.width, npc.height)) { npc.ai[0] = 0f; npc.ai[1] = 0f; @@ -9907,7 +11613,7 @@ namespace CalamityMod.NPCs npc.ai[3] = 0f; } - float scaleFactor16 = 14f + value39.Length() / 100f; + float scaleFactor16 = 18f + value39.Length() / 100f; float num1356 = 25f; value39.Normalize(); value39 *= scaleFactor16; @@ -9917,9 +11623,6 @@ namespace CalamityMod.NPCs if (npc.ai[0] == 2f) { - npc.damage = (int)((double)npc.defDamage * 0.75); - npc.knockBackResist = 0f; - if (npc.target < 0 || !Main.player[npc.target].active || Main.player[npc.target].dead) { npc.TargetClosest(true); @@ -9941,19 +11644,19 @@ namespace CalamityMod.NPCs { npc.velocity.X = npc.velocity.X * (-npc.oldVelocity.X * 0.5f); - if (npc.velocity.X > 30f) - npc.velocity.X = 30f; - if (npc.velocity.X < -30f) - npc.velocity.X = -30f; + if (npc.velocity.X > 4f) + npc.velocity.X = 4f; + if (npc.velocity.X < -4f) + npc.velocity.X = -4f; } if (npc.collideY) { npc.velocity.Y = npc.velocity.Y * (-npc.oldVelocity.Y * 0.5f); - if (npc.velocity.Y > 30f) - npc.velocity.Y = 30f; - if (npc.velocity.Y < -30f) - npc.velocity.Y = -30f; + if (npc.velocity.Y > 4f) + npc.velocity.Y = 4f; + if (npc.velocity.Y < -4f) + npc.velocity.Y = -4f; } Vector2 value40 = Main.player[npc.target].Center - npc.Center; @@ -9963,14 +11666,14 @@ namespace CalamityMod.NPCs if (Main.expertMode) npc.ai[2] += 0.0166666675f; - float scaleFactor17 = 13f + npc.ai[2] + value40.Length() / 120f; + float scaleFactor17 = 12f + npc.ai[2] + value40.Length() / 120f; float num1357 = 20f; value40.Normalize(); value40 *= scaleFactor17; npc.velocity = (npc.velocity * (num1357 - 1f) + value40) / num1357; npc.ai[1] += 1f; - if (npc.ai[1] > 240f || !Collision.CanHit(npc.Center, 1, 1, Main.player[npc.target].Center, 1, 1)) + if (npc.ai[1] >= 120f || !Collision.CanHit(npc.Center, 1, 1, Main.player[npc.target].Center, 1, 1)) { npc.ai[0] = 0f; npc.ai[1] = 0f; @@ -9982,7 +11685,6 @@ namespace CalamityMod.NPCs { if (npc.ai[0] == 3f) { - npc.knockBackResist = 0f; npc.noTileCollide = true; if (npc.velocity.X < 0f) @@ -9996,18 +11698,18 @@ namespace CalamityMod.NPCs Vector2 value41 = Main.player[npc.target].Center - npc.Center; value41.Y -= 12f; if (npc.Center.X > Main.player[npc.target].Center.X) - value41.X += 400f; + value41.X += 600f; else - value41.X -= 400f; + value41.X -= 600f; - if (Math.Abs(npc.Center.X - Main.player[npc.target].Center.X) > 350f && Math.Abs(npc.Center.Y - Main.player[npc.target].Center.Y) < 20f) + if (Math.Abs(npc.Center.X - Main.player[npc.target].Center.X) > 550f && Math.Abs(npc.Center.Y - Main.player[npc.target].Center.Y) < 20f) { npc.ai[0] = 3.1f; npc.ai[1] = 0f; } npc.ai[1] += 0.0333333351f; - float scaleFactor18 = 20f + npc.ai[1]; + float scaleFactor18 = 24f + npc.ai[1]; float num1358 = 4f; value41.Normalize(); value41 *= scaleFactor18; @@ -10017,13 +11719,12 @@ namespace CalamityMod.NPCs if (npc.ai[0] == 3.1f) { - npc.knockBackResist = 0f; npc.noTileCollide = true; npc.rotation = (npc.rotation * 4f + npc.velocity.X * 0.0175f) / 5f; Vector2 vector237 = Main.player[npc.target].Center - npc.Center; vector237.Y -= 12f; - float scaleFactor19 = 30f; + float scaleFactor19 = 32f; float num1359 = 8f; vector237.Normalize(); vector237 *= scaleFactor19; @@ -10058,12 +11759,11 @@ namespace CalamityMod.NPCs npc.damage = (int)((double)npc.defDamage * 1.5); npc.collideX = false; npc.collideY = false; - npc.knockBackResist = 0f; npc.noTileCollide = true; npc.ai[2] += 0.0333333351f; - npc.velocity.X = (20f + npc.ai[2]) * npc.ai[1]; + npc.velocity.X = (32f + npc.ai[2]) * npc.ai[1]; - if ((npc.ai[1] > 0f && npc.Center.X > Main.player[npc.target].Center.X + 260f) || (npc.ai[1] < 0f && npc.Center.X < Main.player[npc.target].Center.X - 260f)) + if ((npc.ai[1] > 0f && npc.Center.X > Main.player[npc.target].Center.X + 460f) || (npc.ai[1] < 0f && npc.Center.X < Main.player[npc.target].Center.X - 460f)) { if (!Collision.SolidCollision(npc.position, npc.width, npc.height)) { @@ -10072,7 +11772,7 @@ namespace CalamityMod.NPCs npc.ai[2] = 0f; npc.ai[3] = 0f; } - else if (Math.Abs(npc.Center.X - Main.player[npc.target].Center.X) > 1600f) + else if (Math.Abs(npc.Center.X - Main.player[npc.target].Center.X) > 800f) { npc.ai[0] = 1f; npc.ai[1] = 0f; @@ -10110,7 +11810,7 @@ namespace CalamityMod.NPCs while (!WorldGen.SolidTile(num1361, num1362) && (double)num1362 < Main.worldSurface) num1362++; - if ((new Vector2((float)(num1361 * 16 + 8), (float)(num1362 * 16 + 8)) - Main.player[npc.target].Center).Length() < 2100f) + if ((new Vector2((float)(num1361 * 16 + 8), (float)(num1362 * 16 + 8)) - Main.player[npc.target].Center).Length() < 3600f) { npc.ai[0] = 4.1f; npc.ai[1] = (float)num1361; @@ -10142,10 +11842,10 @@ namespace CalamityMod.NPCs float y2 = (float)(num1366 * 16 - 20); Vector2 vector238 = new Vector2(x2, y2); vector238 -= npc.Center; - float num1367 = 6f + vector238.Length() / 150f; + float num1367 = 12f + vector238.Length() / 150f; - if (num1367 > 10f) - num1367 = 10f; + if (num1367 > 20f) + num1367 = 20f; if (vector238.Length() < 10f) npc.ai[0] = 4.2f; @@ -10160,7 +11860,6 @@ namespace CalamityMod.NPCs if (npc.ai[0] == 4.2f) { npc.rotation = (npc.rotation * 9f + npc.velocity.X * 0.025f) / 10f; - npc.knockBackResist = 0f; npc.noTileCollide = true; int num1369 = (int)npc.ai[1]; @@ -10174,7 +11873,7 @@ namespace CalamityMod.NPCs if (Main.netMode != 1 && vector239.Length() < 4f) { - int num1373 = 70; + int num1373 = 20; if (Main.expertMode) num1373 = (int)((double)num1373 * 0.75); @@ -10359,6 +12058,10 @@ namespace CalamityMod.NPCs npc.timeLeft = 500; } npc.rotation = npc.velocity.X * -0.02f; + + if (ModLoader.GetMod("FargowiltasSouls") != null) + ModLoader.GetMod("FargowiltasSouls").Call("FargoSoulsAI", npc.whoAmI); + return false; } @@ -10533,6 +12236,10 @@ namespace CalamityMod.NPCs if ((npc.velocity.X > 0f && npc.position.X + (float)(npc.width / 2) > Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2)) || (npc.velocity.X < 0f && npc.position.X + (float)(npc.width / 2) < Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2)) || num886 > 800f) npc.ai[2] = 0f; } + + if (ModLoader.GetMod("FargowiltasSouls") != null) + ModLoader.GetMod("FargowiltasSouls").Call("FargoSoulsAI", npc.whoAmI); + return false; } #endregion @@ -10806,6 +12513,10 @@ namespace CalamityMod.NPCs npc.ai[2] = 0f; npc.ai[3] = 0f; } + + if (ModLoader.GetMod("FargowiltasSouls") != null) + ModLoader.GetMod("FargowiltasSouls").Call("FargoSoulsAI", npc.whoAmI); + return false; } #endregion @@ -11002,84 +12713,6 @@ namespace CalamityMod.NPCs } #endregion - #region Revengeance Duke Fishron AI - public static void RevengeanceDukeFishronAI(NPC npc, Mod mod) - { - CalamityGlobalNPC calamityGlobalNPC = npc.GetGlobalNPC(mod); - - // Get the damage multiplier Fishron uses in vanilla - float num = 0.6f * Main.damageMultiplier; - - // Check for phases - if (npc.ai[0] > 9f) - { - // Increase damage and defense - npc.damage = (int)((float)npc.defDamage * 1.1f * num); - npc.defense = 38; - - // Fire cthulhunadoes - calamityGlobalNPC.newAI[0] += 1f; - if (calamityGlobalNPC.newAI[0] >= 600f) - { - calamityGlobalNPC.newAI[0] = 0f; - - if (Main.netMode != 1) - Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0f, 0f, 385, 0, 0f, Main.myPlayer, 1f, (float)(npc.target + 1)); - - npc.netUpdate = true; - } - } - else if (npc.ai[0] > 4f) - { - // Increase damage and defense - npc.damage = (int)((float)npc.defDamage * 1.2f * num); - npc.defense = (int)((float)npc.defDefense * 1.1f); - } - else - { - // Normalize damage and defense - npc.damage = npc.defDamage; - npc.defense = npc.defDefense; - } - - // If the player isn't in the ocean biome or Fishron is transitioning between phases, become immune - 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)))) - { - npc.dontTakeDamage = true; - } - else if (npc.ai[0] <= 8f) - npc.dontTakeDamage = false; - - // Increase velocity while charging - if (npc.ai[0] == 1f || npc.ai[0] == 6f || npc.ai[0] == 11f) - npc.velocity *= 1.01f; - - if (npc.ai[0] == 0f && !Main.player[npc.target].dead) - { - // Transition to phase 2 earlier - if ((double)npc.life <= (double)npc.lifeMax * 0.75) - { - npc.ai[0] = 4f; - npc.ai[1] = 0f; - npc.ai[2] = 0f; - npc.netUpdate = true; - } - } - else if (npc.ai[0] == 5f && !Main.player[npc.target].dead) - { - // Transition to phase 3 earlier - if ((double)npc.life <= (double)npc.lifeMax * ((CalamityWorld.death || CalamityWorld.bossRushActive) ? 0.3 : 0.2)) - { - npc.ai[0] = 9f; - npc.ai[1] = 0f; - npc.ai[2] = 0f; - npc.netUpdate = true; - } - } - } - #endregion - #region Revengeance Golem AI public static void RevengeanceGolemHeadFreeAI(NPC npc) { @@ -11214,32 +12847,6 @@ namespace CalamityMod.NPCs } #endregion - #region Revengeance Brain of Cthulhu AI - public static void RevengeanceBrainofCthulhuAI(NPC npc) - { - if (npc.ai[0] < 0f) - { - // Increase knockback resistance and speed in phase 2 - npc.knockBackResist = (CalamityWorld.death ? 0.04f : 0.06f) * Main.expertKnockBack; - - npc.velocity.X *= (CalamityWorld.death ? 1.009f : 1.006f); - npc.velocity.Y *= (CalamityWorld.death ? 1.009f : 1.006f); - } - } - - public static void RevengeanceCreeperAI(NPC npc) - { - if (npc.ai[0] != 0f) - { - // Increase charging speed - Vector2 value = Main.player[npc.target].Center - npc.Center; - value.Normalize(); - value *= 9f; - npc.velocity = (npc.velocity * 99f + value) / 97.5f; //100 - } - } - #endregion - #region Revengeance Basic NPC AI public static void RevengeanceLihzahrdAI(NPC npc) { diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 3c1f7dd80b..4509a163c3 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -8,6 +8,8 @@ using Terraria.ModLoader; using Terraria.ID; using CalamityMod.Projectiles; using CalamityMod.World; +using CalamityMod.CalPlayer; +using CalamityMod.Utilities; namespace CalamityMod.NPCs { @@ -28,6 +30,9 @@ namespace CalamityMod.NPCs private float protection = 0f; private float defProtection = 0f; + // Iron Heart + private int ironHeartDamage = 0; + // NewAI private const int maxAIMod = 4; public float[] newAI = new float[maxAIMod]; @@ -314,10 +319,10 @@ namespace CalamityMod.NPCs amount++; } } - npc.lifeRegen -= amount * 25; + npc.lifeRegen -= amount * 35; - if (damage < amount * 5) - damage = amount * 5; + if (damage < amount * 7) + damage = amount * 7; } if (irradiated) { @@ -541,6 +546,9 @@ namespace CalamityMod.NPCs OtherStatChanges(npc); + if (CalamityWorld.ironHeart) + IronHeartChanges(npc); + if (protection > 0f) defProtection = protection; } @@ -843,7 +851,7 @@ namespace CalamityMod.NPCs } else if (npc.type == NPCID.Sharkron || npc.type == NPCID.Sharkron2) { - npc.lifeMax = (int)((double)npc.lifeMax * 30.0); + npc.lifeMax = (int)((double)npc.lifeMax * 5.0); } else if (npc.type == NPCID.Golem) { @@ -1133,7 +1141,6 @@ namespace CalamityMod.NPCs case NPCID.MoonLordCore: case NPCID.MoonLordFreeEye: case NPCID.CultistBoss: - case NPCID.Mothron: case NPCID.Crab: case NPCID.SeaSnail: protection = 0.05f; @@ -1209,6 +1216,7 @@ namespace CalamityMod.NPCs case NPCID.Crawdad2: case NPCID.GiantShelly: case NPCID.GiantShelly2: + case NPCID.Mothron: protection = 0.2f; break; case NPCID.PrimeSaw: @@ -1256,7 +1264,12 @@ namespace CalamityMod.NPCs #region Other Stat Changes private void OtherStatChanges(NPC npc) { - if (npc.type == NPCID.CultistBoss) + // Fix Sharkron hitboxes + if (npc.type == NPCID.Sharkron || npc.type == NPCID.Sharkron2) + npc.width = (npc.height = 36); + + // Buff Cultist + else if (npc.type == NPCID.CultistBoss) { if (CalamityWorld.death) npc.lifeMax = (int)((double)npc.lifeMax * 2.25); @@ -1336,6 +1349,15 @@ namespace CalamityMod.NPCs } #endregion + // TODO: Change Iron Heart damage in here for Iron Heart mode + #region Iron Heart Changes + private void IronHeartChanges(NPC npc) + { + // Iron Heart damage variable will scale with npc.damage + ironHeartDamage = 0; + } + #endregion + #region Scale Expert Multiplayer Stats public override void ScaleExpertStats(NPC npc, int numPlayers, float bossLifeScale) { @@ -1539,10 +1561,6 @@ namespace CalamityMod.NPCs cooldownSlot = 1; else if (Main.eclipse && CalamityWorld.buffedEclipse && !npc.boss && !npc.friendly && !npc.dontTakeDamage) cooldownSlot = 1; - - if (npc.type == NPCID.BrainofCthulhu) - return npc.ai[0] < 0f; - return true; } #endregion @@ -1664,24 +1682,7 @@ namespace CalamityMod.NPCs } if (CalamityWorld.bossRushActive && !npc.friendly && !npc.townNPC) - { BossRushForceDespawnOtherNPCs(npc, mod); - switch (npc.type) - { - case NPCID.KingSlime: - return CalamityGlobalAI.BossRushKingSlimeAI(npc, enraged); - case NPCID.BrainofCthulhu: - return CalamityGlobalAI.BossRushBrainofCthulhuAI(npc, enraged, mod); - case NPCID.EaterofWorldsHead: - return CalamityGlobalAI.BossRushEaterofWorldsAI(npc, enraged, mod); - case NPCID.QueenBee: - return CalamityGlobalAI.BossRushQueenBeeAI(npc, enraged); - case NPCID.DukeFishron: - return CalamityGlobalAI.BossRushDukeFishronAI(npc, enraged, mod); - default: - break; - } - } if (CalamityWorld.revenge || CalamityWorld.bossRushActive) { @@ -1698,6 +1699,11 @@ namespace CalamityMod.NPCs case NPCID.EaterofWorldsTail: return CalamityGlobalAI.BuffedEaterofWorldsAI(npc, mod); + case NPCID.BrainofCthulhu: + return CalamityGlobalAI.BuffedBrainofCthulhuAI(npc, enraged, mod); + case NPCID.Creeper: + return CalamityGlobalAI.BuffedCreeperAI(npc, enraged, mod); + case NPCID.QueenBee: return CalamityGlobalAI.BuffedQueenBeeAI(npc, mod); @@ -1739,6 +1745,9 @@ namespace CalamityMod.NPCs case NPCID.PlanterasTentacle: return CalamityGlobalAI.BuffedPlanterasTentacleAI(npc, mod); + case NPCID.DukeFishron: + return CalamityGlobalAI.BuffedDukeFishronAI(npc, enraged, mod); + case NPCID.Pumpking: if (CalamityWorld.downedDoG) return CalamityGlobalAI.BuffedPumpkingAI(npc); @@ -2224,9 +2233,6 @@ namespace CalamityMod.NPCs case NPCID.CultistBoss: CalamityGlobalAI.RevengeanceCultistAI(npc, configBossRushBoost, mod, enraged); break; - case NPCID.DukeFishron: - CalamityGlobalAI.RevengeanceDukeFishronAI(npc, mod); - break; case NPCID.GolemHeadFree: if (!CalamityWorld.bossRushActive) CalamityGlobalAI.RevengeanceGolemHeadFreeAI(npc); @@ -2238,12 +2244,6 @@ namespace CalamityMod.NPCs case NPCID.DungeonGuardian: CalamityGlobalAI.RevengeanceDungeonGuardianAI(npc, configBossRushBoost, enraged); break; - case NPCID.BrainofCthulhu: - CalamityGlobalAI.RevengeanceBrainofCthulhuAI(npc); - break; - case NPCID.Creeper: - CalamityGlobalAI.RevengeanceCreeperAI(npc); - break; case NPCID.Lihzahrd: CalamityGlobalAI.RevengeanceLihzahrdAI(npc); break; @@ -2704,12 +2704,13 @@ namespace CalamityMod.NPCs { if (npc.type == NPCID.TheDestroyerBody) { - if ((projectile.penetrate == -1 && !projectile.minion) || projectile.type == mod.ProjectileType("KelvinCatalyst") || projectile.type == mod.ProjectileType("KelvinCatalystStar")) - damage = (int)((double)damage * 0.2); - else if (projectile.penetrate > 1) - damage /= projectile.penetrate; + if (((projectile.penetrate == -1 || projectile.penetrate > 1) && !projectile.minion) || projectile.type == mod.ProjectileType("KelvinCatalystStar")) + damage = (int)((double)damage * 0.5); + + if ((projectile.type == ProjectileID.HallowStar && projectile.ranged) || projectile.type == mod.ProjectileType("FossilShardThrown") || projectile.type == mod.ProjectileType("FrostShardFriendly")) + damage = (int)((double)damage * 0.75); } - else if (npc.type == NPCID.EaterofWorldsHead || npc.type == NPCID.EaterofWorldsBody || npc.type == NPCID.EaterofWorldsTail) + else if (npc.type == NPCID.EaterofWorldsHead || npc.type == NPCID.EaterofWorldsBody || npc.type == NPCID.EaterofWorldsTail || npc.type == NPCID.Creeper) { if ((projectile.penetrate == -1 || projectile.penetrate > 1) && !projectile.minion) damage = (int)((double)damage * 0.6); @@ -3372,7 +3373,7 @@ namespace CalamityMod.NPCs case NPCID.Guide: if (Main.rand.Next(20) == 0 && Main.hardMode) chat = "Could you be so kind as to, ah...check hell for me...? I left someone I kind of care about down there."; - if (Main.rand.Next(20) == 0 && CalamityWorld.spawnAstralMeteor) + if (Main.rand.Next(20) == 0 && Main.hardMode) chat = "I have this sudden shiver up my spine, like a meteor just fell and thousands of innocent creatures turned into monsters from the stars."; if (Main.rand.Next(20) == 0 && NPC.downedMoonlord) chat = "The dungeon seems even more restless than usual, watch out for the powerful abominations stirring up in there."; @@ -3394,13 +3395,13 @@ namespace CalamityMod.NPCs int permadong = NPC.FindFirstNPC(mod.NPCType("DILF")); if (Main.rand.Next(10) == 0 && permadong != -1) chat = "I'd let " + Main.npc[permadong].GivenName + " coldheart MY icicle."; - if (Main.rand.Next(10) == 0 && CalamityWorld.spawnAstralMeteor) + if (Main.rand.Next(10) == 0 && Main.hardMode) chat = "Space just got way too close for comfort."; break; case NPCID.Dryad: if (Main.rand.Next(5) == 0 && CalamityWorld.buffedEclipse && Main.eclipse) chat = "There's a dark solar energy emanating from the moths that appear during this time. Ah, the moths as you progress further get more powerful...hmm...what power was Yharon holding back?"; - if (Main.rand.Next(10) == 0 && CalamityWorld.spawnAstralMeteor) + if (Main.rand.Next(10) == 0 && Main.hardMode) chat = "That starborne illness sits upon this land like a blister. Do even more vile forces of corruption exist in worlds beyond?"; break; case NPCID.Stylist: @@ -3410,7 +3411,7 @@ namespace CalamityMod.NPCs chat = "Sometimes I catch " + Main.npc[fapsol2].GivenName + " sneaking up from behind me."; if (Main.rand.Next(15) == 0 && fapsol2 != -1) chat = Main.npc[fapsol2].GivenName + " is always trying to brighten my mood...even if, deep down, I know she's sad."; - if (Main.rand.Next(15) == 0 && CalamityWorld.spawnAstralMeteor) + if (Main.rand.Next(15) == 0 && Main.hardMode) chat = "Please don't catch space lice. Or " + worldEvil + " lice. Or just lice in general."; break; case NPCID.GoblinTinkerer: @@ -3758,6 +3759,12 @@ namespace CalamityMod.NPCs nextSlot++; } } + if (type == NPCID.Painter) + { + shop.item[nextSlot].SetDefaults(ItemID.PainterPaintballGun); + shop.item[nextSlot].shopCustomPrice = Item.buyPrice(0, 15, 0, 0); + nextSlot++; + } if (type == NPCID.Steampunker) { if (NPC.downedMechBoss1) @@ -3778,7 +3785,7 @@ namespace CalamityMod.NPCs shop.item[nextSlot].shopCustomPrice = Item.buyPrice(0, 20, 0, 0); nextSlot++; } - if (Main.player[Main.myPlayer].GetModPlayer(mod).ZoneAstral && CalamityWorld.spawnAstralMeteor) + if (Main.player[Main.myPlayer].GetModPlayer(mod).ZoneAstral && Main.hardMode) { shop.item[nextSlot].SetDefaults(mod.ItemType("AstralSolution")); shop.item[nextSlot].shopCustomPrice = Item.buyPrice(0, 0, 5, 0); @@ -3805,6 +3812,9 @@ namespace CalamityMod.NPCs shop.item[nextSlot].shopCustomPrice = Item.buyPrice(0, 25, 0, 0); nextSlot++; } + shop.item[nextSlot].SetDefaults(ItemID.MagicMissile); + shop.item[nextSlot].shopCustomPrice = Item.buyPrice(0, 5, 0, 0); + nextSlot++; if (NPC.downedGolemBoss) { shop.item[nextSlot].SetDefaults(ItemID.SpectreStaff); diff --git a/NPCs/CalamityGlobalNPCLoot.cs b/NPCs/CalamityGlobalNPCLoot.cs index 198235056f..264a86af8c 100644 --- a/NPCs/CalamityGlobalNPCLoot.cs +++ b/NPCs/CalamityGlobalNPCLoot.cs @@ -4,6 +4,8 @@ using Terraria.Localization; using Terraria.ModLoader; using Terraria.ID; using CalamityMod.World; +using CalamityMod.CalPlayer; +using CalamityMod.Utilities; namespace CalamityMod.NPCs { @@ -39,7 +41,7 @@ namespace CalamityMod.NPCs // Mechanical Bosses' combined lore item bool mechLore = !NPC.downedMechBossAny && (lastTwinStanding || npc.type == NPCID.TheDestroyer || npc.type == NPCID.SkeletronPrime); - DropHelper.DropItemCondition(npc, mod.ItemType("Knowledge20"), true, mechLore); + DropHelper.DropItemCondition(npc, mod.ItemType("KnowledgeMechs"), true, mechLore); // King Slime if (npc.type == NPCID.KingSlime) @@ -56,24 +58,24 @@ namespace CalamityMod.NPCs // Eye of Cthulhu else if (npc.type == NPCID.EyeofCthulhu) { - DropHelper.DropItemCondition(npc, mod.ItemType("Knowledge3"), true, !NPC.downedBoss1); + DropHelper.DropItemCondition(npc, mod.ItemType("KnowledgeEyeofCthulhu"), true, !NPC.downedBoss1); DropHelper.DropResidentEvilAmmo(npc, NPC.downedBoss1, 2, 0, 0); } // Eater of Worlds + Brain of Cthulhu (ignore non-boss segments of EoW) else if ((npc.boss && (npc.type == NPCID.EaterofWorldsHead || npc.type == NPCID.EaterofWorldsBody || npc.type == NPCID.EaterofWorldsTail)) || npc.type == NPCID.BrainofCthulhu) { - DropHelper.DropItemCondition(npc, mod.ItemType("Knowledge9"), true, !WorldGen.crimson && !NPC.downedBoss2); - DropHelper.DropItemCondition(npc, mod.ItemType("Knowledge12"), true, !WorldGen.crimson && !NPC.downedBoss2); - DropHelper.DropItemCondition(npc, mod.ItemType("Knowledge8"), true, WorldGen.crimson && !NPC.downedBoss2); - DropHelper.DropItemCondition(npc, mod.ItemType("Knowledge11"), true, WorldGen.crimson && !NPC.downedBoss2); + DropHelper.DropItemCondition(npc, mod.ItemType("KnowledgeCorruption"), true, !WorldGen.crimson && !NPC.downedBoss2); + DropHelper.DropItemCondition(npc, mod.ItemType("KnowledgeEaterofWorlds"), true, !WorldGen.crimson && !NPC.downedBoss2); + DropHelper.DropItemCondition(npc, mod.ItemType("KnowledgeCrimson"), true, WorldGen.crimson && !NPC.downedBoss2); + DropHelper.DropItemCondition(npc, mod.ItemType("KnowledgeBrainofCthulhu"), true, WorldGen.crimson && !NPC.downedBoss2); DropHelper.DropResidentEvilAmmo(npc, NPC.downedBoss2, 2, 0, 0); } // Queen Bee else if (npc.type == NPCID.QueenBee) { - DropHelper.DropItemCondition(npc, mod.ItemType("Knowledge16"), true, !NPC.downedQueenBee); + DropHelper.DropItemCondition(npc, mod.ItemType("KnowledgeQueenBee"), true, !NPC.downedQueenBee); DropHelper.DropResidentEvilAmmo(npc, NPC.downedQueenBee, 2, 0, 0); } @@ -81,7 +83,7 @@ namespace CalamityMod.NPCs else if (npc.type == NPCID.SkeletronHead) { DropHelper.DropItemCondition(npc, mod.ItemType("ClothiersWrath"), !expert, DropHelper.RareVariantDropRateInt, 1, 1); - DropHelper.DropItemCondition(npc, mod.ItemType("Knowledge17"), true, !NPC.downedBoss3); + DropHelper.DropItemCondition(npc, mod.ItemType("KnowledgeSkeletron"), true, !NPC.downedBoss3); DropHelper.DropResidentEvilAmmo(npc, NPC.downedBoss3, 3, 1, 0); } @@ -91,43 +93,43 @@ namespace CalamityMod.NPCs DropHelper.DropItemCondition(npc, mod.ItemType("MLGRune"), !expert); // Demon Trophy DropHelper.DropItemCondition(npc, mod.ItemType("Meowthrower"), !expert, 5, 1, 1); DropHelper.DropItemCondition(npc, mod.ItemType("RogueEmblem"), !expert, 8, 1, 1); - DropHelper.DropItemChance(npc, mod.ItemType("IbarakiBox"), !Main.hardMode, Main.hardMode ? 0.1f : 1f); // 100% chance on first kill, 10% chance afterwards - DropHelper.DropItemFromSetCondition(npc, !expert, 5, ItemID.CorruptionKey, ItemID.CrimsonKey); + DropHelper.DropItemChance(npc, mod.ItemType("IbarakiBox"), !Main.hardMode, Main.hardMode ? 0.1f : 1f); // 100% chance on first kill, 10% chance afterwards + DropHelper.DropItemFromSetCondition(npc, !expert, 5, ItemID.CorruptionKey, ItemID.CrimsonKey); - DropHelper.DropItemCondition(npc, mod.ItemType("Knowledge7"), true, !Main.hardMode); - DropHelper.DropItemCondition(npc, mod.ItemType("Knowledge18"), true, !Main.hardMode); + DropHelper.DropItemCondition(npc, mod.ItemType("KnowledgeUnderworld"), true, !Main.hardMode); + DropHelper.DropItemCondition(npc, mod.ItemType("KnowledgeWallofFlesh"), true, !Main.hardMode); DropHelper.DropResidentEvilAmmo(npc, Main.hardMode, 3, 1, 0); - // First kill text (this is not a loot function) - if (!Main.hardMode) - { - string key2 = "Mods.CalamityMod.UglyBossText"; - Color messageColor2 = Color.Aquamarine; - if (Main.netMode == 0) - Main.NewText(Language.GetTextValue(key2), messageColor2); - else if (Main.netMode == 2) - NetMessage.BroadcastChatMessage(NetworkText.FromKey(key2), messageColor2); - } + // First kill text (this is not a loot function) + if (!Main.hardMode) + { + string key2 = "Mods.CalamityMod.UglyBossText"; + Color messageColor2 = Color.Aquamarine; + if (Main.netMode == 0) + Main.NewText(Language.GetTextValue(key2), messageColor2); + else if (Main.netMode == 2) + NetMessage.BroadcastChatMessage(NetworkText.FromKey(key2), messageColor2); + } } // Retinazer OR Spazmatism (whichever is killed last) else if (lastTwinStanding) { - DropHelper.DropItemCondition(npc, mod.ItemType("Knowledge22"), true, !NPC.downedMechBoss2); + DropHelper.DropItemCondition(npc, mod.ItemType("KnowledgeTwins"), true, !NPC.downedMechBoss2); DropHelper.DropResidentEvilAmmo(npc, NPC.downedMechBoss2, 4, 2, 1); } // The Destroyer else if (npc.type == NPCID.TheDestroyer) { - DropHelper.DropItemCondition(npc, mod.ItemType("Knowledge21"), true, !NPC.downedMechBoss1); + DropHelper.DropItemCondition(npc, mod.ItemType("KnowledgeDestroyer"), true, !NPC.downedMechBoss1); DropHelper.DropResidentEvilAmmo(npc, NPC.downedMechBoss1, 4, 2, 1); } // Skeletron Prime else if (npc.type == NPCID.SkeletronPrime) { - DropHelper.DropItemCondition(npc, mod.ItemType("Knowledge23"), true, !NPC.downedMechBoss3); + DropHelper.DropItemCondition(npc, mod.ItemType("KnowledgeSkeletronPrime"), true, !NPC.downedMechBoss3); DropHelper.DropItemCondition(npc, mod.ItemType("GoldBurdenBreaker"), true, (npc.ai[1] == 2f && rev)); DropHelper.DropResidentEvilAmmo(npc, NPC.downedMechBoss3, 4, 2, 1); @@ -147,7 +149,7 @@ namespace CalamityMod.NPCs else if (npc.type == NPCID.Plantera) { DropHelper.DropItemCondition(npc, ItemID.JungleKey, !expert, 5, 1, 1); - DropHelper.DropItemCondition(npc, mod.ItemType("Knowledge25"), true, !NPC.downedPlantBoss); + DropHelper.DropItemCondition(npc, mod.ItemType("KnowledgePlantera"), true, !NPC.downedPlantBoss); DropHelper.DropResidentEvilAmmo(npc, NPC.downedPlantBoss, 4, 2, 1); // Spawn Perennial Ore if Plantera has never been killed @@ -184,7 +186,7 @@ namespace CalamityMod.NPCs else if (npc.type == NPCID.Golem) { DropHelper.DropItemCondition(npc, ItemID.Picksaw, true, !NPC.downedGolemBoss); - DropHelper.DropItemCondition(npc, mod.ItemType("Knowledge31"), true, !NPC.downedGolemBoss); + DropHelper.DropItemCondition(npc, mod.ItemType("KnowledgeGolem"), true, !NPC.downedGolemBoss); DropHelper.DropResidentEvilAmmo(npc, NPC.downedGolemBoss, 4, 2, 1); // If Golem has never been killed, send messages about PBG and Ravager @@ -221,18 +223,18 @@ namespace CalamityMod.NPCs // Duke Fishron else if (npc.type == NPCID.DukeFishron) { - DropHelper.DropItemCondition(npc, mod.ItemType("Knowledge2"), true, !NPC.downedFishron); + DropHelper.DropItemCondition(npc, mod.ItemType("KnowledgeDukeFishron"), true, !NPC.downedFishron); DropHelper.DropResidentEvilAmmo(npc, NPC.downedPlantBoss, 4, 2, 1); } // Lunatic Cultist else if (npc.type == NPCID.CultistBoss) { - DropHelper.DropItemCondition(npc, mod.ItemType("Knowledge4"), true, !NPC.downedAncientCultist); + DropHelper.DropItemCondition(npc, mod.ItemType("KnowledgeLunaticCultist"), true, !NPC.downedAncientCultist); DropHelper.DropResidentEvilAmmo(npc, NPC.downedAncientCultist, 4, 2, 1); // Blood Moon lore item - DropHelper.DropItemCondition(npc, mod.ItemType("Knowledge34"), true, Main.bloodMoon); + DropHelper.DropItemCondition(npc, mod.ItemType("KnowledgeBloodMoon"), true, Main.bloodMoon); // Deus text (this is not a loot function) if (!NPC.downedAncientCultist) @@ -253,7 +255,7 @@ namespace CalamityMod.NPCs DropHelper.DropItemCondition(npc, mod.ItemType("MLGRune2"), true, !expert); DropHelper.DropItemCondition(npc, mod.ItemType("GrandDad"), !expert, DropHelper.RareVariantDropRateInt, 1, 1); DropHelper.DropItemCondition(npc, mod.ItemType("Infinity"), !expert, DropHelper.RareVariantDropRateInt, 1, 1); - DropHelper.DropItemCondition(npc, mod.ItemType("Knowledge37"), true, !NPC.downedMoonlord); + DropHelper.DropItemCondition(npc, mod.ItemType("KnowledgeMoonLord"), true, !NPC.downedMoonlord); DropHelper.DropResidentEvilAmmo(npc, NPC.downedMoonlord, 5, 2, 1); string key = "Mods.CalamityMod.MoonBossText"; @@ -1289,8 +1291,8 @@ namespace CalamityMod.NPCs DropHelper.DropItem(npc, mod.ItemType("EssenceofEleum"), 1, 2); break; case NPCID.Plantera: - DropHelper.DropItemCondition(npc, mod.ItemType("LivingShard"), !expert, 6, 9); - break; + DropHelper.DropItemCondition(npc, mod.ItemType("LivingShard"), !expert, 6, 9); + break; case NPCID.NebulaBrain: case NPCID.NebulaSoldier: case NPCID.NebulaHeadcrab: diff --git a/NPCs/CeaselessVoid/CeaselessVoid.cs b/NPCs/CeaselessVoid/CeaselessVoid.cs index 32fc7e5ff5..046e87800a 100644 --- a/NPCs/CeaselessVoid/CeaselessVoid.cs +++ b/NPCs/CeaselessVoid/CeaselessVoid.cs @@ -6,6 +6,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.Utilities; namespace CalamityMod.NPCs.CeaselessVoid { @@ -344,7 +345,7 @@ namespace CalamityMod.NPCs.CeaselessVoid // Other bool lastSentinelKilled = !CalamityWorld.downedSentinel1 && CalamityWorld.downedSentinel2 && CalamityWorld.downedSentinel3; - DropHelper.DropItemCondition(npc, mod.ItemType("Knowledge40"), true, lastSentinelKilled); + DropHelper.DropItemCondition(npc, mod.ItemType("KnowledgeSentinels"), true, lastSentinelKilled); DropHelper.DropResidentEvilAmmo(npc, CalamityWorld.downedSentinel1, 5, 2, 1); } diff --git a/NPCs/CosmicWraith/CosmicWraith.cs b/NPCs/CosmicWraith/CosmicWraith.cs index 48a907709b..9cb9937924 100644 --- a/NPCs/CosmicWraith/CosmicWraith.cs +++ b/NPCs/CosmicWraith/CosmicWraith.cs @@ -6,6 +6,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.Utilities; namespace CalamityMod.NPCs.CosmicWraith { @@ -255,7 +256,7 @@ namespace CalamityMod.NPCs.CosmicWraith if (Main.netMode != 1) { npc.localAI[1] += 1f; - if (npc.localAI[1] >= 150f) + if (npc.localAI[1] >= 120f) { npc.localAI[1] = 0f; npc.TargetClosest(true); @@ -267,8 +268,20 @@ namespace CalamityMod.NPCs.CosmicWraith num1249++; num1250 = (int)player.Center.X / 16; num1251 = (int)player.Center.Y / 16; - num1250 += Main.rand.Next(-15, 16); - num1251 += Main.rand.Next(-15, 16); + + int min = 12; + int max = 15; + + if (Main.rand.Next(2) == 0) + num1250 += Main.rand.Next(min, max); + else + num1250 -= Main.rand.Next(min, max); + + if (Main.rand.Next(2) == 0) + num1251 += Main.rand.Next(min, max); + else + num1251 -= Main.rand.Next(min, max); + if (!WorldGen.SolidTile(num1250, num1251) && Collision.CanHit(new Vector2((float)(num1250 * 16), (float)(num1251 * 16)), 1, 1, player.position, player.width, player.height)) { break; @@ -288,28 +301,15 @@ namespace CalamityMod.NPCs.CosmicWraith } else if (npc.ai[0] == 1f) { + npc.velocity *= 0.9f; npc.dontTakeDamage = true; npc.chaseable = false; - npc.alpha += (cosmicTeleport ? 5 : 4); + npc.alpha += 25; if (npc.alpha >= 255) { + Main.PlaySound(SoundID.Item8, npc.Center); npc.alpha = 255; npc.position.X = npc.ai[1] * 16f - (float)(npc.width / 2); - float distanceX = player.position.X - npc.position.X; - if (player.velocity.X >= 0f) - { - if (npc.position.X < player.position.X) - npc.position.X += distanceX * 2f; - } - else - { - if (npc.position.X > player.position.X) - npc.position.X += distanceX * 2f; - } - if (Vector2.Distance(player.Center, vectorCenter) > 4800f) - { - npc.position.X = player.position.X; - } npc.position.Y = npc.ai[2] * 16f - (float)(npc.height / 2); npc.ai[0] = 2f; npc.netUpdate = true; @@ -317,7 +317,7 @@ namespace CalamityMod.NPCs.CosmicWraith } else if (npc.ai[0] == 2f) { - npc.alpha -= (cosmicTeleport ? 5 : 4); + npc.alpha -= 25; if (npc.alpha <= lifeToAlpha) { Main.PlaySound(2, (int)npc.position.X, (int)npc.position.Y, 122); @@ -370,7 +370,7 @@ namespace CalamityMod.NPCs.CosmicWraith npc.chaseable = true; npc.ai[3] += 1f; npc.alpha = lifeToAlpha; - if (npc.ai[3] >= 2f) + if (npc.ai[3] >= 3f) { npc.ai[0] = 3f; npc.ai[1] = 0f; @@ -390,7 +390,7 @@ namespace CalamityMod.NPCs.CosmicWraith npc.chaseable = true; npc.rotation = npc.velocity.X * 0.04f; npc.spriteDirection = ((npc.direction > 0) ? 1 : -1); - 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 vector121 = new Vector2(npc.position.X + (float)(npc.width / 2), npc.position.Y + (float)(npc.height / 2)); npc.ai[1] += 1f; bool flag104 = false; if (npc.life < npc.lifeMax / 4 || CalamityWorld.death || CalamityWorld.bossRushActive) @@ -411,7 +411,7 @@ namespace CalamityMod.NPCs.CosmicWraith { flag104 = true; } - if (flag104 && npc.position.Y + (float)npc.height < player.position.Y) + if (flag104) { if (Main.netMode != 1) { @@ -436,8 +436,8 @@ namespace CalamityMod.NPCs.CosmicWraith { num1070 += 1f; } - float num1071 = player.position.X + (float)player.width * 0.5f - vector121.X + (float)Main.rand.Next(-80, 81); - float num1072 = player.position.Y + (float)player.height * 0.5f - vector121.Y + (float)Main.rand.Next(-40, 41); + float num1071 = player.position.X + (float)player.width * 0.5f - vector121.X; + float num1072 = player.position.Y + (float)player.height * 0.5f - vector121.Y; float num1073 = (float)Math.Sqrt((double)(num1071 * num1071 + num1072 * num1072)); num1073 = num1070 / num1073; num1071 *= num1073; @@ -447,16 +447,16 @@ namespace CalamityMod.NPCs.CosmicWraith Projectile.NewProjectile(vector121.X, vector121.Y, num1071, num1072, num1075, num1074, 0f, Main.myPlayer, 0f, (float)(npc.target + 1)); } } - if (npc.position.Y > player.position.Y - 150f) //200 + if (npc.position.Y > player.position.Y - 200f) //200 { if (npc.velocity.Y > 0f) { npc.velocity.Y = npc.velocity.Y * 0.975f; } npc.velocity.Y = npc.velocity.Y - 0.1f; - if (npc.velocity.Y > 3f) + if (npc.velocity.Y > 4f) { - npc.velocity.Y = 3f; + npc.velocity.Y = 4f; } } else if (npc.position.Y < player.position.Y - 400f) //500 @@ -466,9 +466,9 @@ namespace CalamityMod.NPCs.CosmicWraith npc.velocity.Y = npc.velocity.Y * 0.975f; } npc.velocity.Y = npc.velocity.Y + 0.1f; - if (npc.velocity.Y < -3f) + if (npc.velocity.Y < -4f) { - npc.velocity.Y = -3f; + npc.velocity.Y = -4f; } } if (npc.position.X + (float)(npc.width / 2) > player.position.X + (float)(player.width / 2) + 500f) //100 @@ -672,7 +672,7 @@ namespace CalamityMod.NPCs.CosmicWraith public override bool CanHitPlayer(Player target, ref int cooldownSlot) { cooldownSlot = 1; - return npc.alpha == lifeToAlpha; + return true; } public override void FindFrame(int frameHeight) @@ -782,7 +782,7 @@ namespace CalamityMod.NPCs.CosmicWraith // Other bool lastSentinelKilled = CalamityWorld.downedSentinel1 && CalamityWorld.downedSentinel2 && !CalamityWorld.downedSentinel3; - DropHelper.DropItemCondition(npc, mod.ItemType("Knowledge40"), true, lastSentinelKilled); + DropHelper.DropItemCondition(npc, mod.ItemType("KnowledgeSentinels"), true, lastSentinelKilled); DropHelper.DropResidentEvilAmmo(npc, CalamityWorld.downedSentinel3, 5, 2, 1); } diff --git a/NPCs/Crabulon/CrabulonIdle.cs b/NPCs/Crabulon/CrabulonIdle.cs index 7f57e37774..846ffab5f7 100644 --- a/NPCs/Crabulon/CrabulonIdle.cs +++ b/NPCs/Crabulon/CrabulonIdle.cs @@ -6,6 +6,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.Utilities; namespace CalamityMod.NPCs.Crabulon { @@ -240,15 +241,13 @@ namespace CalamityMod.NPCs.Crabulon } else { - npc.direction = -Main.player[npc.target].direction; + float playerLocation = npc.Center.X - player.Center.X; + npc.direction = (playerLocation < 0 ? 1 : -1); + if (npc.direction > 0) - { npc.velocity.X = (npc.velocity.X * 20f + num823) / 21f; - } if (npc.direction < 0) - { npc.velocity.X = (npc.velocity.X * 20f - num823) / 21f; - } } int num854 = 80; int num855 = 20; @@ -497,7 +496,7 @@ namespace CalamityMod.NPCs.Crabulon DropHelper.DropBags(npc); DropHelper.DropItemChance(npc, mod.ItemType("CrabulonTrophy"), 10); - DropHelper.DropItemCondition(npc, mod.ItemType("Knowledge5"), true, !CalamityWorld.downedCrabulon); + DropHelper.DropItemCondition(npc, mod.ItemType("KnowledgeCrabulon"), true, !CalamityWorld.downedCrabulon); DropHelper.DropResidentEvilAmmo(npc, CalamityWorld.downedCrabulon, 2, 0, 0); // All other drops are contained in the bag, so they only drop directly on Normal diff --git a/NPCs/Cryogen/Cryogen.cs b/NPCs/Cryogen/Cryogen.cs index 9c0716d57c..ac033d209d 100644 --- a/NPCs/Cryogen/Cryogen.cs +++ b/NPCs/Cryogen/Cryogen.cs @@ -7,6 +7,7 @@ using Terraria.Localization; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.Utilities; namespace CalamityMod.NPCs.Cryogen { @@ -599,7 +600,7 @@ namespace CalamityMod.NPCs.Cryogen if (Main.netMode != 1) { npc.localAI[2] += 1f; - if (npc.localAI[2] >= (float)(120 + Main.rand.Next(200))) + if (npc.localAI[2] >= 180f) { npc.localAI[2] = 0f; npc.TargetClosest(true); @@ -611,8 +612,20 @@ namespace CalamityMod.NPCs.Cryogen num1249++; num1250 = (int)player.Center.X / 16; num1251 = (int)player.Center.Y / 16; - num1250 += Main.rand.Next(-50, 51); - num1251 += Main.rand.Next(-50, 51); + + int min = 14; + int max = 18; + + if (Main.rand.Next(2) == 0) + num1250 += Main.rand.Next(min, max); + else + num1250 -= Main.rand.Next(min, max); + + if (Main.rand.Next(2) == 0) + num1251 += Main.rand.Next(min, max); + else + num1251 -= Main.rand.Next(min, max); + if (!WorldGen.SolidTile(num1250, num1251) && Collision.CanHit(new Vector2((float)(num1250 * 16), (float)(num1251 * 16)), 1, 1, player.position, player.width, player.height)) { break; @@ -632,11 +645,13 @@ namespace CalamityMod.NPCs.Cryogen } else if (npc.ai[1] == 1f) { + npc.velocity *= 0.9f; npc.dontTakeDamage = true; npc.chaseable = false; - npc.alpha += 4; + npc.alpha += 25; if (npc.alpha >= 255) { + Main.PlaySound(SoundID.Item8, npc.Center); npc.alpha = 255; npc.position.X = (float)teleportLocationX * 16f - (float)(npc.width / 2); npc.position.Y = (float)iceShard * 16f - (float)(npc.height / 2); @@ -646,7 +661,7 @@ namespace CalamityMod.NPCs.Cryogen } else if (npc.ai[1] == 2f) { - npc.alpha -= 4; + npc.alpha -= 25; if (npc.alpha <= 0) { npc.dontTakeDamage = false; @@ -850,11 +865,6 @@ namespace CalamityMod.NPCs.Cryogen npc.damage = (int)(npc.damage * 0.8f); } - public override bool CanHitPlayer(Player target, ref int cooldownSlot) - { - return npc.alpha == 0; - } - public override void HitEffect(int hitDirection, double damage) { for (int k = 0; k < 3; k++) @@ -949,7 +959,7 @@ namespace CalamityMod.NPCs.Cryogen DropHelper.DropBags(npc); DropHelper.DropItemChance(npc, mod.ItemType("CryogenTrophy"), 10); - DropHelper.DropItemCondition(npc, mod.ItemType("Knowledge19"), true, !CalamityWorld.downedCryogen); + DropHelper.DropItemCondition(npc, mod.ItemType("KnowledgeCryogen"), true, !CalamityWorld.downedCryogen); DropHelper.DropResidentEvilAmmo(npc, CalamityWorld.downedCryogen, 4, 2, 1); if (!Main.expertMode) diff --git a/NPCs/DesertScourge/DesertScourgeHead.cs b/NPCs/DesertScourge/DesertScourgeHead.cs index e48d98a98d..96509a943d 100644 --- a/NPCs/DesertScourge/DesertScourgeHead.cs +++ b/NPCs/DesertScourge/DesertScourgeHead.cs @@ -5,6 +5,7 @@ using Terraria.ID; using Terraria.Localization; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.Utilities; namespace CalamityMod.NPCs.DesertScourge { @@ -448,7 +449,7 @@ namespace CalamityMod.NPCs.DesertScourge DropHelper.DropItem(npc, ItemID.LesserHealingPotion, 8, 14); DropHelper.DropItemChance(npc, mod.ItemType("DesertScourgeTrophy"), 10); - DropHelper.DropItemCondition(npc, mod.ItemType("Knowledge"), true, !CalamityWorld.downedDesertScourge); + DropHelper.DropItemCondition(npc, mod.ItemType("KnowledgeDesertScourge"), true, !CalamityWorld.downedDesertScourge); DropHelper.DropResidentEvilAmmo(npc, CalamityWorld.downedDesertScourge, 2, 0, 0); // All other drops are contained in the bag, so they only drop directly on Normal diff --git a/NPCs/HiveMind/HiveMindP2.cs b/NPCs/HiveMind/HiveMindP2.cs index 5b3fb57d61..dd32b7e72a 100644 --- a/NPCs/HiveMind/HiveMindP2.cs +++ b/NPCs/HiveMind/HiveMindP2.cs @@ -6,6 +6,7 @@ using Terraria.ID; using Terraria.Localization; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.Utilities; /* states: * 0 = slow drift @@ -667,7 +668,7 @@ namespace CalamityMod.NPCs.HiveMind DropHelper.DropBags(npc); DropHelper.DropItemChance(npc, mod.ItemType("HiveMindTrophy"), 10); - DropHelper.DropItemCondition(npc, mod.ItemType("Knowledge14"), true, !CalamityWorld.downedHiveMind); + DropHelper.DropItemCondition(npc, mod.ItemType("KnowledgeHiveMind"), true, !CalamityWorld.downedHiveMind); DropHelper.DropResidentEvilAmmo(npc, CalamityWorld.downedHiveMind, 2, 0, 0); // All other drops are contained in the bag, so they only drop directly on Normal diff --git a/NPCs/Leviathan/Leviathan.cs b/NPCs/Leviathan/Leviathan.cs index 3da05a0eb3..c79bd34ab2 100644 --- a/NPCs/Leviathan/Leviathan.cs +++ b/NPCs/Leviathan/Leviathan.cs @@ -6,6 +6,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.Utilities; namespace CalamityMod.NPCs.Leviathan { @@ -120,7 +121,7 @@ namespace CalamityMod.NPCs.Leviathan bool flag6 = player.position.Y < 800f || (double)player.position.Y > Main.worldSurface * 16.0 || (player.position.X > 6400f && player.position.X < (float)(Main.maxTilesX * 16 - 6400)); if (flag6 || !sirenAlive || CalamityWorld.death) { - npc.defense = 80; + npc.defense = 60; } else { @@ -591,8 +592,8 @@ namespace CalamityMod.NPCs.Leviathan DropHelper.DropBags(npc); DropHelper.DropItemChance(npc, mod.ItemType("LeviathanTrophy"), 10); - DropHelper.DropItemCondition(npc, mod.ItemType("Knowledge10"), true, !CalamityWorld.downedLeviathan); - DropHelper.DropItemCondition(npc, mod.ItemType("Knowledge28"), true, !CalamityWorld.downedLeviathan); + DropHelper.DropItemCondition(npc, mod.ItemType("KnowledgeOcean"), true, !CalamityWorld.downedLeviathan); + DropHelper.DropItemCondition(npc, mod.ItemType("KnowledgeLeviathanandSiren"), true, !CalamityWorld.downedLeviathan); DropHelper.DropResidentEvilAmmo(npc, CalamityWorld.downedLeviathan, 4, 2, 1); // All other drops are contained in the bag, so they only drop directly on Normal diff --git a/NPCs/Leviathan/LeviathanStart.cs b/NPCs/Leviathan/LeviathanStart.cs index bc6b5a0e7d..35b13a41d1 100644 --- a/NPCs/Leviathan/LeviathanStart.cs +++ b/NPCs/Leviathan/LeviathanStart.cs @@ -3,6 +3,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.Leviathan { diff --git a/NPCs/Leviathan/Siren.cs b/NPCs/Leviathan/Siren.cs index 68d89a6fc9..47bc716c47 100644 --- a/NPCs/Leviathan/Siren.cs +++ b/NPCs/Leviathan/Siren.cs @@ -14,10 +14,8 @@ namespace CalamityMod.NPCs.Leviathan { private bool spawnedLevi = false; private bool secondClone = false; - private int phaseSwitch = 0; - private int chargeSwitch = 0; + private bool forceChargeFrames = false; private int frameUsed = 0; - private double anotherFloat = 0.0; public override void SetStaticDefaults() { @@ -82,9 +80,8 @@ namespace CalamityMod.NPCs.Leviathan { writer.Write(spawnedLevi); writer.Write(secondClone); - writer.Write(phaseSwitch); - writer.Write(chargeSwitch); - writer.Write(anotherFloat); + writer.Write(forceChargeFrames); + writer.Write(npc.localAI[0]); writer.Write(frameUsed); writer.Write(npc.dontTakeDamage); } @@ -93,178 +90,184 @@ namespace CalamityMod.NPCs.Leviathan { spawnedLevi = reader.ReadBoolean(); secondClone = reader.ReadBoolean(); - phaseSwitch = reader.ReadInt32(); - chargeSwitch = reader.ReadInt32(); - anotherFloat = reader.ReadDouble(); + forceChargeFrames = reader.ReadBoolean(); + npc.localAI[0] = reader.ReadSingle(); frameUsed = reader.ReadInt32(); npc.dontTakeDamage = reader.ReadBoolean(); } public override void AI() { + // whoAmI variable CalamityGlobalNPC.siren = npc.whoAmI; + + // Light Lighting.AddLight((int)((npc.position.X + (float)(npc.width / 2)) / 16f), (int)((npc.position.Y + (float)(npc.height / 2)) / 16f), 0f, 0.5f, 0.3f); + + // Variables Player player = Main.player[npc.target]; bool revenge = (CalamityWorld.revenge || CalamityWorld.bossRushActive); bool expertMode = (Main.expertMode || CalamityWorld.bossRushActive); bool playerWet = player.wet; - float num998 = 8f; - float scaleFactor3 = 300f; - float num999 = 800f; - float num1001 = 5f; - float scaleFactor4 = 0.8f; - int num1002 = 0; - float scaleFactor5 = 10f; - float num1003 = 30f; - float num1004 = 150f; - float num1006 = 0.333333343f; - float num1007 = 8f; Vector2 vector = npc.Center; - Vector2 spawnAt = npc.Center + new Vector2(0f, (float)npc.height / 2f); + Vector2 spawnAt = vector + new Vector2(0f, (float)npc.height / 2f); 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)); - bool halfLife = (double)npc.life <= (double)npc.lifeMax * 0.5; + + // Percent life remaining + float lifeRatio = (float)npc.life / (float)npc.lifeMax; + + // Phases + bool phase2 = lifeRatio < 0.66f; + bool phase3 = lifeRatio < 0.33f; + + // Check for Leviathan bool leviAlive = false; if (CalamityGlobalNPC.leviathan != -1) - { leviAlive = Main.npc[CalamityGlobalNPC.leviathan].active; - } - float num1000 = leviAlive ? 14f : 16f; - float num1005 = leviAlive ? 14f : 16f; - float chargeSpeedDivisor = leviAlive ? 13.85f : 15.85f; - num1006 *= num1005; - if ((halfLife || CalamityWorld.death || CalamityWorld.bossRushActive) && Main.netMode != 1) + + // Spawn Leviathan and Clones, change music + if (Main.netMode != 1) { - if (!spawnedLevi) + if (phase2 || CalamityWorld.death || CalamityWorld.bossRushActive) { - if (revenge) + if (!spawnedLevi) + { + if (revenge) + NPC.NewNPC((int)spawnAt.X, (int)spawnAt.Y - 200, mod.NPCType("SirenClone")); + + Mod calamityModMusic = ModLoader.GetMod("CalamityModMusic"); + if (calamityModMusic != null) + music = calamityModMusic.GetSoundSlot(SoundType.Music, "Sounds/Music/LeviathanAndSiren"); + else + music = MusicID.Boss3; + + NPC.SpawnOnPlayer(player.whoAmI, mod.NPCType("Leviathan")); + spawnedLevi = true; + } + } + + // Spawn Clone + if (phase3 && revenge) + { + if (!secondClone) { NPC.NewNPC((int)spawnAt.X, (int)spawnAt.Y - 200, mod.NPCType("SirenClone")); + secondClone = true; } - Mod calamityModMusic = ModLoader.GetMod("CalamityModMusic"); - if (calamityModMusic != null) - music = calamityModMusic.GetSoundSlot(SoundType.Music, "Sounds/Music/LeviathanAndSiren"); - else - music = MusicID.Boss3; - NPC.SpawnOnPlayer(player.whoAmI, mod.NPCType("Leviathan")); - spawnedLevi = true; } } - double defenseMult = halfLife ? 2.0 : 1.5; - if ((!leviAlive && halfLife) || CalamityWorld.death) - { + + // Defense adjustments + double defenseMult = phase2 ? 2.0 : 1.5; + if ((!leviAlive && phase2) || CalamityWorld.death) npc.defense = (int)(25.0 * defenseMult); - } else - { npc.defense = 25; - } - if ((double)npc.life <= (double)npc.lifeMax * 0.25 && Main.netMode != 1) - { - if (!secondClone) - { - if (revenge) - { - NPC.NewNPC((int)spawnAt.X, (int)spawnAt.Y - 200, mod.NPCType("SirenClone")); - } - secondClone = true; - } - } + + // Ice Shield if (npc.ai[3] == 0f && npc.localAI[1] == 0f && Main.netMode != 1) { - int num6 = NPC.NewNPC((int)npc.Center.X, (int)npc.Center.Y, mod.NPCType("SirenIce"), npc.whoAmI, 0f, 0f, 0f, 0f, 255); + int num6 = NPC.NewNPC((int)vector.X, (int)vector.Y, mod.NPCType("SirenIce"), npc.whoAmI, 0f, 0f, 0f, 0f, 255); npc.ai[3] = (float)(num6 + 1); npc.localAI[1] = -1f; npc.netUpdate = true; Main.npc[num6].ai[0] = (float)npc.whoAmI; Main.npc[num6].netUpdate = true; } + int num7 = (int)npc.ai[3] - 1; if (num7 != -1 && Main.npc[num7].active && Main.npc[num7].type == mod.NPCType("SirenIce")) - { npc.dontTakeDamage = true; - } else { npc.dontTakeDamage = isNotOcean && !CalamityWorld.bossRushActive; npc.ai[3] = 0f; + if (npc.localAI[1] == -1f) - { npc.localAI[1] = revenge ? 600f : 1200f; - } if (npc.localAI[1] > 0f) - { npc.localAI[1] -= 1f; - } } + + // Alpha if (isNotOcean) { npc.alpha += 3; if (npc.alpha >= 150) - { npc.alpha = 150; - } } else { npc.alpha -= 5; if (npc.alpha <= 0) - { npc.alpha = 0; - } } + + // Play sound if (Main.rand.Next(300) == 0) - { Main.PlaySound(29, (int)npc.position.X, (int)npc.position.Y, 35); - } + + // Count number of players nearby int num1038 = 0; for (int num1039 = 0; num1039 < 255; num1039++) { - if (Main.player[num1039].active && !Main.player[num1039].dead && (npc.Center - Main.player[num1039].Center).Length() < 1000f) - { + if (Main.player[num1039].active && !Main.player[num1039].dead && (vector - Main.player[num1039].Center).Length() < 1000f) num1038++; - } } + + // Time left if (npc.timeLeft < 3000) - { npc.timeLeft = 3000; - } + + // Rotation when charging + if (npc.ai[0] > 2f) + ChargeRotation(player, vector); + + // Target if (npc.target < 0 || npc.target == 255 || player.dead || !player.active) - { npc.TargetClosest(true); - } + + // Phase switch else if (npc.ai[0] == -1f) { - int random = ((double)npc.life <= (double)npc.lifeMax * 0.5) ? 3 : 2; + int random = phase2 ? 3 : 2; int num871 = Main.rand.Next(random); + if (num871 == 0) - { - num871 = 0; - } + num871 = phase3 ? 3 : 0; else if (num871 == 1) - { num871 = 2; + else + num871 = 3; + + npc.ai[0] = (float)num871; + + if (npc.ai[0] != 3f) + { + forceChargeFrames = false; + float playerLocation = vector.X - player.Center.X; + npc.direction = (playerLocation < 0 ? 1 : -1); + npc.spriteDirection = npc.direction; } else - { - num871 = 3; - } - npc.ai[0] = (float)num871; + ChargeRotation(player, vector); + npc.ai[1] = 0f; npc.ai[2] = 0f; - return; } + + // Get in position for bubble spawn else if (npc.ai[0] == 0f) { npc.TargetClosest(true); npc.rotation = npc.velocity.X * 0.02f; npc.spriteDirection = npc.direction; - float num1053 = 9f; - float num1054 = 0.15f; - float num10542 = 0.05f; + Vector2 vector118 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); float num1055 = player.position.X + (float)(player.width / 2) - vector118.X; float num1056 = player.position.Y + (float)(player.height / 2) - 200f - vector118.Y; float num1057 = (float)Math.Sqrt((double)(num1055 * num1055 + num1056 * num1056)); + if (num1057 < 600f) { npc.ai[0] = 1f; @@ -272,59 +275,60 @@ namespace CalamityMod.NPCs.Leviathan npc.netUpdate = true; return; } - num1057 = num1053 / num1057; - if (npc.velocity.X < num1055) + + if (npc.position.Y > player.position.Y - 350f) { - npc.velocity.X = npc.velocity.X + num1054; - if (npc.velocity.X < 0f && num1055 > 0f) - { - npc.velocity.X = npc.velocity.X + num1054; - } + 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 > 4f) + npc.velocity.Y = 4f; } - else if (npc.velocity.X > num1055) + else if (npc.position.Y < player.position.Y - 450f) { - npc.velocity.X = npc.velocity.X - num1054; - if (npc.velocity.X > 0f && num1055 < 0f) - { - npc.velocity.X = npc.velocity.X - num1054; - } + 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 < -4f) + npc.velocity.Y = -4f; } - if (npc.velocity.Y < num1056) + if (npc.position.X + (float)(npc.width / 2) > player.position.X + (float)(player.width / 2) + 100f) { - npc.velocity.Y = npc.velocity.Y + num10542; - if (npc.velocity.Y < 0f && num1056 > 0f) - { - npc.velocity.Y = npc.velocity.Y + num10542; - } + 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; } - else if (npc.velocity.Y > num1056) + if (npc.position.X + (float)(npc.width / 2) < player.position.X + (float)(player.width / 2) - 100f) { - npc.velocity.Y = npc.velocity.Y - num10542; - if (npc.velocity.Y > 0f && num1056 < 0f) - { - npc.velocity.Y = npc.velocity.Y - num10542; - } + 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; } } + + // Bubble spawn else if (npc.ai[0] == 1f) { npc.rotation = npc.velocity.X * 0.02f; npc.TargetClosest(true); + Vector2 vector119 = 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 vector120 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); float num1058 = player.position.X + (float)(player.width / 2) - vector120.X; float num1059 = player.position.Y + (float)(player.height / 2) - vector120.Y; float num1060 = (float)Math.Sqrt((double)(num1058 * num1058 + num1059 * num1059)); + npc.ai[1] += 1f; npc.ai[1] += (float)(num1038 / 2); - if ((double)npc.life < (double)npc.lifeMax * 0.5 || CalamityWorld.bossRushActive) - { + if (phase2 || CalamityWorld.bossRushActive) npc.ai[1] += 0.25f; - } - if ((double)npc.life < (double)npc.lifeMax * 0.1 || CalamityWorld.bossRushActive) - { + if (phase3 || CalamityWorld.bossRushActive) npc.ai[1] += 0.25f; - } + bool flag103 = false; if (npc.ai[1] > 20f) { @@ -332,6 +336,7 @@ namespace CalamityMod.NPCs.Leviathan npc.ai[2] += 1f; flag103 = true; } + if (Collision.CanHit(vector119, 1, 1, player.position, player.width, player.height) && flag103) { Main.PlaySound(2, (int)npc.position.X, (int)npc.position.Y, 85); @@ -346,54 +351,47 @@ namespace CalamityMod.NPCs.Leviathan Main.npc[num1062].damage = leviAlive ? 100 : 140; } } - if (num1060 > 600f || !Collision.CanHit(new Vector2(vector119.X, vector119.Y - 30f), 1, 1, player.position, player.width, player.height)) + + if (num1060 > 600f) { - float num1063 = 14f; - float num1064 = 0.15f; - float num10642 = 0.05f; - vector120 = vector119; - num1058 = player.position.X + (float)(player.width / 2) - vector120.X; - num1059 = player.position.Y + (float)(player.height / 2) - vector120.Y; - num1060 = (float)Math.Sqrt((double)(num1058 * num1058 + num1059 * num1059)); - num1060 = num1063 / num1060; - if (npc.velocity.X < num1058) + if (npc.position.Y > player.position.Y - 350f) { - npc.velocity.X = npc.velocity.X + num1064; - if (npc.velocity.X < 0f && num1058 > 0f) - { - npc.velocity.X = npc.velocity.X + num1064; - } + 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 > 4f) + npc.velocity.Y = 4f; } - else if (npc.velocity.X > num1058) + else if (npc.position.Y < player.position.Y - 450f) { - npc.velocity.X = npc.velocity.X - num1064; - if (npc.velocity.X > 0f && num1058 < 0f) - { - npc.velocity.X = npc.velocity.X - num1064; - } + 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 < -4f) + npc.velocity.Y = -4f; } - if (npc.velocity.Y < num1059) + if (npc.position.X + (float)(npc.width / 2) > player.position.X + (float)(player.width / 2) + 100f) { - npc.velocity.Y = npc.velocity.Y + num10642; - if (npc.velocity.Y < 0f && num1059 > 0f) - { - npc.velocity.Y = npc.velocity.Y + num10642; - } + 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; } - else if (npc.velocity.Y > num1059) + if (npc.position.X + (float)(npc.width / 2) < player.position.X + (float)(player.width / 2) - 100f) { - npc.velocity.Y = npc.velocity.Y - num10642; - if (npc.velocity.Y > 0f && num1059 < 0f) - { - npc.velocity.Y = npc.velocity.Y - num10642; - } + 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; } } else - { npc.velocity *= 0.9f; - } + npc.spriteDirection = npc.direction; + if (npc.ai[2] > 4f) { npc.ai[0] = -1f; @@ -402,70 +400,60 @@ namespace CalamityMod.NPCs.Leviathan npc.netUpdate = true; } } + + // Float around and fire projectiles else if (npc.ai[0] == 2f) { npc.rotation = npc.velocity.X * 0.02f; - 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.4f); + Vector2 vector121 = new Vector2(npc.position.X + (float)(npc.width / 2), npc.position.Y + (float)(npc.height / 2)); + npc.ai[1] += 1f; bool flag104 = false; if (npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) { if (npc.ai[1] % 10f == 9f) - { flag104 = true; - } } else { - if (((double)npc.life < (double)npc.lifeMax * 0.1 || CalamityWorld.death) && !leviAlive) + if ((phase3 || CalamityWorld.death) && !leviAlive) { if (npc.ai[1] % 20f == 19f) - { flag104 = true; - } } - else if (halfLife) + else if (phase2) { if (npc.ai[1] % 25f == 24f) - { flag104 = true; - } } else if (npc.ai[1] % 30f == 29f) - { flag104 = true; - } } - 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 (flag104 && (npc.position.Y + (float)npc.height < player.position.Y || (!leviAlive && phase2)) && Collision.CanHit(vector121, 1, 1, player.position, player.width, player.height)) { if (Main.netMode != 1) { float num1070 = revenge ? 13f : 11f; if (npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) - { num1070 = 24f; - } - else if (isNotOcean || (!leviAlive && halfLife) || CalamityWorld.death || CalamityWorld.bossRushActive) - { + else if (isNotOcean || (!leviAlive && phase2) || CalamityWorld.death || CalamityWorld.bossRushActive) num1070 = revenge ? 19f : 18f; - } else if (!playerWet) - { num1070 = revenge ? 16f : 15f; - } else { - if ((double)npc.life < (double)npc.lifeMax * 0.1) - { + if (phase3) num1070 += 2f; - } } - float num1071 = player.position.X + (float)player.width * 0.5f - vector121.X + (float)Main.rand.Next(-80, 81); - float num1072 = player.position.Y + (float)player.height * 0.5f - vector121.Y + (float)Main.rand.Next(-40, 41); + + float num1071 = player.position.X + (float)player.width * 0.5f - vector121.X; + float num1072 = player.position.Y + (float)player.height * 0.5f - vector121.Y; float num1073 = (float)Math.Sqrt((double)(num1071 * num1071 + num1072 * num1072)); num1073 = num1070 / num1073; num1071 *= num1073; num1072 *= num1073; + int num1074 = expertMode ? 26 : 32; int num1075 = mod.ProjectileType("WaterSpear"); switch (Main.rand.Next(6)) @@ -478,209 +466,126 @@ namespace CalamityMod.NPCs.Leviathan case 5: num1075 = mod.ProjectileType("WaterSpear"); break; } if (isNotOcean) - { num1074 *= 2; - } + Projectile.NewProjectile(vector121.X, vector121.Y, num1071, num1072, num1075, num1074, 0f, Main.myPlayer, 0f, 0f); } } - if (npc.position.Y > player.position.Y - 200f) //200 + + if (npc.position.Y > player.position.Y - 300f) { if (npc.velocity.Y > 0f) - { - npc.velocity.Y = npc.velocity.Y * 0.985f; - } + 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.velocity.Y > 4f) + npc.velocity.Y = 4f; } - else if (npc.position.Y < player.position.Y - 500f) //500 + else if (npc.position.Y < player.position.Y - 500f) { if (npc.velocity.Y < 0f) - { - npc.velocity.Y = npc.velocity.Y * 0.985f; - } + 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.velocity.Y < -4f) + npc.velocity.Y = -4f; } 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; + + float playerLocation = vector.X - player.Center.X; npc.direction = (playerLocation < 0 ? 1 : -1); npc.spriteDirection = npc.direction; - if (npc.ai[1] > 300f) + + if (npc.ai[1] >= 300f) { npc.ai[0] = -1f; npc.ai[1] = 0f; npc.netUpdate = true; } } + + // Set up charge else if (npc.ai[0] == 3f) { - npc.TargetClosest(false); - npc.rotation = npc.velocity.ToRotation(); - if (Math.Sign(npc.velocity.X) != 0) + ChargeLocation(player, vector, leviAlive, expertMode); + + npc.ai[1] += 1f; + + if (npc.ai[1] >= (expertMode ? 40f : 60f)) { - npc.spriteDirection = -Math.Sign(npc.velocity.X); - } - if (npc.rotation < -1.57079637f) - { - npc.rotation += 3.14159274f; - } - if (npc.rotation > 1.57079637f) - { - npc.rotation -= 3.14159274f; - } - npc.spriteDirection = Math.Sign(npc.velocity.X); - phaseSwitch += 1; - if (CalamityWorld.death || CalamityWorld.bossRushActive) - { - phaseSwitch += 1; - } - if (chargeSwitch == 0) //line up the charge - { - float scaleFactor6 = num998; - Vector2 center4 = npc.Center; - Vector2 center5 = player.Center; - Vector2 vector126 = center5 - center4; - Vector2 vector127 = vector126 - Vector2.UnitY * scaleFactor3; - float num1013 = vector126.Length(); - vector126 = Vector2.Normalize(vector126) * scaleFactor6; - vector127 = Vector2.Normalize(vector127) * scaleFactor6; - bool flag64 = Collision.CanHit(npc.Center, 1, 1, player.Center, 1, 1); - if (anotherFloat >= 120.0) - { - flag64 = true; - } - float num1014 = 8f; - flag64 = (flag64 && vector126.ToRotation() > 3.14159274f / num1014 && vector126.ToRotation() < 3.14159274f - 3.14159274f / num1014); - if (num1013 > num999 || !flag64) - { - npc.velocity.X = (npc.velocity.X * (num1000 - 1f) + vector127.X) / chargeSpeedDivisor; - npc.velocity.Y = (npc.velocity.Y * (num1000 - 1f) + vector127.Y) / chargeSpeedDivisor; - if (!flag64) - { - anotherFloat += 1.0; - if (anotherFloat == 120.0) - { - npc.netUpdate = true; - } - } - else - { - anotherFloat = 0.0; - } - } - else - { - chargeSwitch = 1; - npc.ai[2] = vector126.X; - anotherFloat = (double)vector126.Y; - npc.netUpdate = true; - } - } - else if (chargeSwitch == 1) //pause before charging - { - npc.velocity *= scaleFactor4; - npc.ai[1] += 1f; - if (npc.ai[1] >= num1001) - { - chargeSwitch = 2; - npc.ai[1] = 0f; - npc.netUpdate = true; - Vector2 velocity = new Vector2(npc.ai[2], (float)anotherFloat) + new Vector2((float)Main.rand.Next(-num1002, num1002 + 1), (float)Main.rand.Next(-num1002, num1002 + 1)) * 0.04f; - velocity.Normalize(); - velocity *= scaleFactor5; - npc.velocity = velocity; - } - } - else if (chargeSwitch == 2) //charging - { - float num1016 = num1003; - npc.ai[1] += 1f; - bool flag65 = Vector2.Distance(npc.Center, player.Center) > num1004 && npc.Center.Y > player.Center.Y; - if ((npc.ai[1] >= num1016 && flag65) || npc.velocity.Length() < num1007) - { - chargeSwitch = 0; - npc.ai[1] = 0f; - npc.ai[2] = 0f; - anotherFloat = 0.0; - npc.velocity /= 2f; - npc.netUpdate = true; - npc.ai[1] = 45f; - chargeSwitch = 3; - } - else - { - Vector2 center6 = npc.Center; - Vector2 center7 = player.Center; - Vector2 vec2 = center7 - center6; - vec2.Normalize(); - if (vec2.HasNaNs()) - { - vec2 = new Vector2((float)npc.direction, 0f); - } - npc.velocity = (npc.velocity * (num1005 - 1f) + vec2 * (npc.velocity.Length() + num1006)) / num1005; - } - } - else if (chargeSwitch == 3) //slow down after charging and reset - { - npc.ai[1] -= 1f; - if (npc.ai[1] <= 0f) - { - chargeSwitch = 0; - npc.ai[1] = 0f; - npc.netUpdate = true; - } - npc.velocity *= 0.98f; - } - if (phaseSwitch > 300) - { - npc.ai[0] = -1f; + forceChargeFrames = true; + npc.ai[0] = (npc.ai[2] >= (leviAlive ? 2f : 3f) ? -1f : 4f); npc.ai[1] = 0f; - npc.ai[2] = 0f; - anotherFloat = 0.0; - chargeSwitch = 0; - phaseSwitch = 0; + npc.localAI[0] = 0f; + + // Velocity and rotation + float chargeVelocity = leviAlive ? 16f : 21f; + npc.velocity = Vector2.Normalize(player.Center - vector) * chargeVelocity; + npc.rotation = (float)Math.Atan2((double)npc.velocity.Y, (double)npc.velocity.X); + + // Direction + int num22 = Math.Sign(player.Center.X - vector.X); + if (num22 != 0) + { + npc.direction = num22; + + if (npc.spriteDirection == 1) + npc.rotation += 3.14159274f; + + npc.spriteDirection = -npc.direction; + } + } + } + + // Charge + else if (npc.ai[0] == 4f) + { + // Spawn dust + int num24 = 7; + for (int j = 0; j < num24; j++) + { + Vector2 arg_E1C_0 = (Vector2.Normalize(npc.velocity) * new Vector2((float)(npc.width + 50) / 2f, (float)npc.height) * 0.75f).RotatedBy((double)(j - (num24 / 2 - 1)) * 3.1415926535897931 / (double)((float)num24), default(Vector2)) + vector; + Vector2 vector4 = ((float)(Main.rand.NextDouble() * 3.1415927410125732) - 1.57079637f).ToRotationVector2() * (float)Main.rand.Next(3, 8); + int num25 = Dust.NewDust(arg_E1C_0 + vector4, 0, 0, 172, vector4.X * 2f, vector4.Y * 2f, 100, default(Color), 1.4f); + Main.dust[num25].noGravity = true; + Main.dust[num25].noLight = true; + Main.dust[num25].velocity /= 4f; + Main.dust[num25].velocity -= npc.velocity; + } + + npc.ai[1] += 1f; + if (npc.ai[1] >= 30f) + { + npc.ai[0] = 3f; + npc.ai[1] = 0f; + npc.ai[2] += 1f; npc.netUpdate = true; } } + + // Despawn if (player.dead || Vector2.Distance(player.Center, vector) > 5600f) { if (npc.localAI[3] < 120f) - { npc.localAI[3] += 1f; - } + if (npc.localAI[3] > 60f) { npc.velocity.Y = npc.velocity.Y + (npc.localAI[3] - 60f) * 0.25f; + if ((double)npc.position.Y > Main.rockLayer * 16.0) { for (int x = 0; x < 200; x++) @@ -691,6 +596,7 @@ namespace CalamityMod.NPCs.Leviathan Main.npc[x].netUpdate = true; } } + npc.active = false; npc.netUpdate = true; } @@ -698,17 +604,106 @@ namespace CalamityMod.NPCs.Leviathan return; } if (npc.localAI[3] > 0f) - { npc.localAI[3] -= 1f; + } + + // Rotation when charging + private void ChargeRotation(Player player, Vector2 vector) + { + float num17 = (float)Math.Atan2((double)(player.Center.Y - vector.Y), (double)(player.Center.X - vector.X)); + if (npc.spriteDirection == 1) + num17 += 3.14159274f; + if (num17 < 0f) + num17 += 6.28318548f; + if (num17 > 6.28318548f) + num17 -= 6.28318548f; + + float num18 = 0.04f; + if (npc.ai[0] == 4f) + num18 = 0f; + + if (npc.rotation < num17) + { + if ((double)(num17 - npc.rotation) > 3.1415926535897931) + npc.rotation -= num18; + else + npc.rotation += num18; + } + if (npc.rotation > num17) + { + if ((double)(npc.rotation - num17) > 3.1415926535897931) + npc.rotation += num18; + else + npc.rotation -= num18; + } + + if (npc.rotation > num17 - num18 && npc.rotation < num17 + num18) + npc.rotation = num17; + if (npc.rotation < 0f) + npc.rotation += 6.28318548f; + if (npc.rotation > 6.28318548f) + npc.rotation -= 6.28318548f; + if (npc.rotation > num17 - num18 && npc.rotation < num17 + num18) + npc.rotation = num17; + } + + // Move to charge location + private void ChargeLocation(Player player, Vector2 vector, bool leviAlive, bool expertMode) + { + float distance = leviAlive ? 400f : 350f; + + // Velocity + if (npc.localAI[0] == 0f) + npc.localAI[0] = (float)((int)distance * Math.Sign((vector - player.Center).X)); + + Vector2 vector3 = Vector2.Normalize(player.Center + new Vector2(npc.localAI[0], -distance) - vector - npc.velocity) * 9f; + float acceleration = expertMode ? 0.75f : 0.5f; + if (npc.velocity.X < vector3.X) + { + npc.velocity.X = npc.velocity.X + acceleration; + if (npc.velocity.X < 0f && vector3.X > 0f) + npc.velocity.X = npc.velocity.X + acceleration; + } + else if (npc.velocity.X > vector3.X) + { + npc.velocity.X = npc.velocity.X - acceleration; + if (npc.velocity.X > 0f && vector3.X < 0f) + npc.velocity.X = npc.velocity.X - acceleration; + } + if (npc.velocity.Y < vector3.Y) + { + npc.velocity.Y = npc.velocity.Y + acceleration; + if (npc.velocity.Y < 0f && vector3.Y > 0f) + npc.velocity.Y = npc.velocity.Y + acceleration; + } + else if (npc.velocity.Y > vector3.Y) + { + npc.velocity.Y = npc.velocity.Y - acceleration; + if (npc.velocity.Y > 0f && vector3.Y < 0f) + npc.velocity.Y = npc.velocity.Y - acceleration; + } + + // Rotation + int num22 = Math.Sign(player.Center.X - vector.X); + if (num22 != 0) + { + if (npc.ai[1] == 0f && num22 != npc.direction) + npc.rotation += 3.14159274f; + + npc.direction = num22; + + if (npc.spriteDirection != -npc.direction) + npc.rotation += 3.14159274f; + + npc.spriteDirection = -npc.direction; } } 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) { Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/SirenGores/Siren"), 1f); @@ -716,14 +711,13 @@ namespace CalamityMod.NPCs.Leviathan Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/SirenGores/Siren3"), 1f); Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/SirenGores/Siren4"), 1f); Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/SirenGores/Siren5"), 1f); + for (int k = 0; k < 50; k++) - { Dust.NewDust(npc.position, npc.width, npc.height, 5, hitDirection, -1f, 0, default(Color), 1f); - } } } - public override bool PreDraw(SpriteBatch spriteBatch, Color drawColor) //2 total states (ice shield or no ice shield) + public override bool PreDraw(SpriteBatch spriteBatch, Color drawColor) // 2 total states (ice shield or no ice shield) { Mod mod = ModLoader.GetMod("CalamityMod"); Texture2D texture = Main.npcTexture[npc.type]; @@ -757,21 +751,20 @@ namespace CalamityMod.NPCs.Leviathan break; } } + SpriteEffects spriteEffects = SpriteEffects.None; if (npc.spriteDirection == 1) - { spriteEffects = SpriteEffects.FlipHorizontally; - } - if (npc.ai[0] == 3f) + + if (npc.ai[0] > 2f || forceChargeFrames) { int width = 106; Vector2 vector = new Vector2((float)(width / 2), (float)(texture.Height / Main.npcFrameCount[npc.type] / 2)); Microsoft.Xna.Framework.Rectangle frame = new Rectangle(0, 0, width, texture.Height / Main.npcFrameCount[npc.type]); - frame.Y = 146 * (int)(npc.frameCounter / 12.0); //1 to 6 - if (frame.Y >= 146 * 6) - { + frame.Y = 146 * (int)(npc.frameCounter / 12.0); // 1 to 6 + if (frame.Y >= 146 * 6 || npc.ai[0] == 4f) frame.Y = 0; - } + Main.spriteBatch.Draw(texture, new Vector2(npc.position.X - Main.screenPosition.X + (float)(npc.width / 2) - (float)width * npc.scale / 2f + vector.X * npc.scale, npc.position.Y - Main.screenPosition.Y + (float)npc.height - (float)texture.Height * npc.scale / (float)Main.npcFrameCount[npc.type] + 4f + vector.Y * npc.scale + 0f + npc.gfxOffY), @@ -784,6 +777,7 @@ namespace CalamityMod.NPCs.Leviathan 0f); return false; } + Microsoft.Xna.Framework.Rectangle frame2 = npc.frame; Vector2 vector11 = new Vector2((float)(Main.npcTexture[npc.type].Width / 2), (float)(Main.npcTexture[npc.type].Height / Main.npcFrameCount[npc.type] / 2)); Main.spriteBatch.Draw(texture, @@ -799,40 +793,32 @@ namespace CalamityMod.NPCs.Leviathan return false; } - public override void FindFrame(int frameHeight) //6 total frames, 3 total texture types + public override void FindFrame(int frameHeight) // 6 total frames, 3 total texture types { - if (npc.ai[0] == 2f) - { - frameUsed = 0; - } - else if (npc.ai[0] <= 1f) - { - frameUsed = 1; - } - else - { + if (forceChargeFrames) frameUsed = 2; - } + else if (npc.ai[0] == 2f) + frameUsed = 0; + else if (npc.ai[0] <= 1f) + frameUsed = 1; + else + frameUsed = 2; + npc.frameCounter += 1.0; - if (npc.ai[0] == 4f) + if (npc.ai[0] == 3f || forceChargeFrames) { if (npc.frameCounter > 72.0) - { npc.frameCounter = 0.0; - } } - else + else if (npc.ai[0] != 4f) { int frameY = 146; if (npc.frameCounter > 72.0) - { npc.frameCounter = 0.0; - } + npc.frame.Y = frameY * (int)(npc.frameCounter / 12.0); if (npc.frame.Y >= frameHeight * 6) - { npc.frame.Y = 0; - } } } diff --git a/NPCs/Leviathan/SirenAltStabbing.png b/NPCs/Leviathan/SirenAltStabbing.png index 4057d163d9..cf57a094f5 100644 Binary files a/NPCs/Leviathan/SirenAltStabbing.png and b/NPCs/Leviathan/SirenAltStabbing.png differ diff --git a/NPCs/Leviathan/SirenStabbing.png b/NPCs/Leviathan/SirenStabbing.png index 5fbf48baf5..8d69d7de7b 100644 Binary files a/NPCs/Leviathan/SirenStabbing.png and b/NPCs/Leviathan/SirenStabbing.png differ diff --git a/NPCs/NormalNPCs/AeroSlime.cs b/NPCs/NormalNPCs/AeroSlime.cs index 775eb3090b..6c0bbd1990 100644 --- a/NPCs/NormalNPCs/AeroSlime.cs +++ b/NPCs/NormalNPCs/AeroSlime.cs @@ -3,6 +3,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.NormalNPCs { diff --git a/NPCs/NormalNPCs/AngryDog.cs b/NPCs/NormalNPCs/AngryDog.cs index f64ab69f29..8467883e86 100644 --- a/NPCs/NormalNPCs/AngryDog.cs +++ b/NPCs/NormalNPCs/AngryDog.cs @@ -5,6 +5,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.NormalNPCs { diff --git a/NPCs/NormalNPCs/BlightedEye.cs b/NPCs/NormalNPCs/BlightedEye.cs index e9aa1a488e..8a47861f46 100644 --- a/NPCs/NormalNPCs/BlightedEye.cs +++ b/NPCs/NormalNPCs/BlightedEye.cs @@ -2,6 +2,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.NormalNPCs { diff --git a/NPCs/NormalNPCs/BloomSlime.cs b/NPCs/NormalNPCs/BloomSlime.cs index 29b364a2d2..478bf2bde4 100644 --- a/NPCs/NormalNPCs/BloomSlime.cs +++ b/NPCs/NormalNPCs/BloomSlime.cs @@ -3,6 +3,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.NormalNPCs { diff --git a/NPCs/NormalNPCs/CalamityEye.cs b/NPCs/NormalNPCs/CalamityEye.cs index 990e30febc..a20f31409a 100644 --- a/NPCs/NormalNPCs/CalamityEye.cs +++ b/NPCs/NormalNPCs/CalamityEye.cs @@ -2,6 +2,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.NormalNPCs { diff --git a/NPCs/NormalNPCs/CharredSlime.png b/NPCs/NormalNPCs/CharredSlime.png index 8a527d014c..eecfbd348a 100644 Binary files a/NPCs/NormalNPCs/CharredSlime.png and b/NPCs/NormalNPCs/CharredSlime.png differ diff --git a/NPCs/NormalNPCs/Cnidrion.cs b/NPCs/NormalNPCs/Cnidrion.cs index 13d67022da..9c1a25227e 100644 --- a/NPCs/NormalNPCs/Cnidrion.cs +++ b/NPCs/NormalNPCs/Cnidrion.cs @@ -3,6 +3,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.NormalNPCs { @@ -60,6 +61,7 @@ namespace CalamityMod.NPCs.NormalNPCs float num823 = 1f; npc.TargetClosest(true); bool flag51 = false; + int offsetX = 80; if ((double)npc.life < (double)npc.lifeMax * 0.33) { num823 = 2f; @@ -82,7 +84,7 @@ namespace CalamityMod.NPCs.NormalNPCs if (npc.ai[1] >= 300f && Main.netMode != 1) { npc.ai[1] = 0f; - if ((double)npc.life < (double)npc.lifeMax * 0.1) + if ((double)npc.life < (double)npc.lifeMax * 0.25) { npc.ai[0] = (float)Main.rand.Next(3, 5); } @@ -97,10 +99,10 @@ namespace CalamityMod.NPCs.NormalNPCs { flag51 = true; npc.ai[1] += 1f; - if (npc.ai[1] % 15f == 0f) + if (npc.ai[1] % 30f == 0f) { Vector2 vector18 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + 20f); - vector18.X += (float)(10 * npc.direction); + vector18.X += (float)(offsetX * npc.direction); float num829 = Main.player[npc.target].position.X + (float)Main.player[npc.target].width * 0.5f - vector18.X; float num830 = Main.player[npc.target].position.Y - vector18.Y; float num831 = (float)Math.Sqrt((double)(num829 * num829 + num830 * num830)); @@ -108,9 +110,9 @@ namespace CalamityMod.NPCs.NormalNPCs num831 = num832 / num831; num829 *= num831; num830 *= num831; - num829 *= 1f + (float)Main.rand.Next(-50, 51) * 0.01f; - num830 *= 1f + (float)Main.rand.Next(-50, 51) * 0.01f; - int num833 = Projectile.NewProjectile(vector18.X, vector18.Y, num829, num830, mod.ProjectileType("HorsWaterBlast"), (expertMode ? 6 : 9), 0f, Main.myPlayer, 0f, 0f); + num829 *= 1f + (float)Main.rand.Next(-10, 11) * 0.01f; + num830 *= 1f + (float)Main.rand.Next(-10, 11) * 0.01f; + Projectile.NewProjectile(vector18.X, vector18.Y, num829, num830, mod.ProjectileType("HorsWaterBlast"), (expertMode ? 8 : 11), 0f, Main.myPlayer, 0f, 0f); } if (npc.ai[1] >= 120f) { @@ -122,10 +124,10 @@ namespace CalamityMod.NPCs.NormalNPCs { flag51 = true; npc.ai[1] += 1f; - if (npc.ai[1] > 60f && npc.ai[1] < 240f && npc.ai[1] % 8f == 0f) + if (npc.ai[1] > 60f && npc.ai[1] < 240f && npc.ai[1] % 16f == 0f) { Vector2 vector18 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + 20f); - vector18.X += (float)(10 * npc.direction); + vector18.X += (float)(offsetX * npc.direction); float num829 = Main.player[npc.target].position.X + (float)Main.player[npc.target].width * 0.5f - vector18.X; float num830 = Main.player[npc.target].position.Y - vector18.Y; float num831 = (float)Math.Sqrt((double)(num829 * num829 + num830 * num830)); @@ -133,9 +135,9 @@ namespace CalamityMod.NPCs.NormalNPCs num831 = num832 / num831; num829 *= num831; num830 *= num831; - num829 *= 1f + (float)Main.rand.Next(-30, 31) * 0.01f; - num830 *= 1f + (float)Main.rand.Next(-30, 31) * 0.01f; - int num833 = Projectile.NewProjectile(vector18.X, vector18.Y, num829, num830, mod.ProjectileType("HorsWaterBlast"), (expertMode ? 7 : 10), 0f, Main.myPlayer, 0f, 0f); + num829 *= 1f + (float)Main.rand.Next(-15, 16) * 0.01f; + num830 *= 1f + (float)Main.rand.Next(-15, 16) * 0.01f; + Projectile.NewProjectile(vector18.X, vector18.Y, num829, num830, mod.ProjectileType("HorsWaterBlast"), (expertMode ? 9 : 12), 0f, Main.myPlayer, 0f, 0f); } if (npc.ai[1] >= 300f) { @@ -150,7 +152,7 @@ namespace CalamityMod.NPCs.NormalNPCs if (npc.ai[1] % 30f == 0f) { Vector2 vector18 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + 20f); - vector18.X += (float)(10 * npc.direction); + vector18.X += (float)(offsetX * npc.direction); float num844 = Main.player[npc.target].position.X + (float)Main.player[npc.target].width * 0.5f - vector18.X; float num845 = Main.player[npc.target].position.Y - vector18.Y; float num846 = (float)Math.Sqrt((double)(num844 * num844 + num845 * num845)); @@ -158,9 +160,9 @@ namespace CalamityMod.NPCs.NormalNPCs num846 = num847 / num846; num844 *= num846; num845 *= num846; - num844 *= 1f + (float)Main.rand.Next(-20, 21) * 0.001f; - num845 *= 1f + (float)Main.rand.Next(-20, 21) * 0.001f; - int num848 = Projectile.NewProjectile(vector18.X, vector18.Y, num844, num845, mod.ProjectileType("HorsWaterBlast"), (expertMode ? 9 : 12), 0f, Main.myPlayer, 0f, 0f); + num844 *= 1f + (float)Main.rand.Next(-10, 11) * 0.001f; + num845 *= 1f + (float)Main.rand.Next(-10, 11) * 0.001f; + int num848 = Projectile.NewProjectile(vector18.X, vector18.Y, num844, num845, mod.ProjectileType("HorsWaterBlast"), (expertMode ? 11 : 14), 0f, Main.myPlayer, 0f, 0f); } if (npc.ai[1] >= 120f) { @@ -172,10 +174,10 @@ namespace CalamityMod.NPCs.NormalNPCs { num823 = 4f; npc.ai[1] += 1f; - if (npc.ai[1] % 10f == 0f) + if (npc.ai[1] % 20f == 0f) { Vector2 vector18 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + 20f); - vector18.X += (float)(10 * npc.direction); + vector18.X += (float)(offsetX * npc.direction); float num829 = Main.player[npc.target].position.X + (float)Main.player[npc.target].width * 0.5f - vector18.X; float num830 = Main.player[npc.target].position.Y - vector18.Y; float num831 = (float)Math.Sqrt((double)(num829 * num829 + num830 * num830)); @@ -183,9 +185,9 @@ namespace CalamityMod.NPCs.NormalNPCs num831 = num832 / num831; num829 *= num831; num830 *= num831; - num829 *= 1f + (float)Main.rand.Next(-10, 11) * 0.01f; - num830 *= 1f + (float)Main.rand.Next(-10, 11) * 0.01f; - int num833 = Projectile.NewProjectile(vector18.X, vector18.Y, num829, num830, mod.ProjectileType("HorsWaterBlast"), (expertMode ? 11 : 15), 0f, Main.myPlayer, 0f, 0f); + num829 *= 1f + (float)Main.rand.Next(-5, 6) * 0.01f; + num830 *= 1f + (float)Main.rand.Next(-5, 6) * 0.01f; + int num833 = Projectile.NewProjectile(vector18.X, vector18.Y, num829, num830, mod.ProjectileType("HorsWaterBlast"), (expertMode ? 13 : 17), 0f, Main.myPlayer, 0f, 0f); } if (npc.ai[1] >= 240f) { @@ -265,31 +267,6 @@ namespace CalamityMod.NPCs.NormalNPCs if (npc.velocity.Y > 10f) { npc.velocity.Y = 10f; - return; - } - float num116 = (float)Main.rand.Next(30, 900); - num116 *= (float)npc.life / (float)npc.lifeMax; - num116 += 30f; - if (Main.netMode != 1 && npc.ai[2] >= num116 && npc.velocity.Y == 0f && !player.dead && ((npc.direction > 0 && npc.Center.X < player.Center.X) || (npc.direction < 0 && npc.Center.X > player.Center.X)) && Collision.CanHit(npc.position, npc.width, npc.height, player.position, player.width, player.height)) - { - float num117 = 13f; - Vector2 vector18 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + 20f); - vector18.X += (float)(10 * npc.direction); - float num118 = player.position.X + (float)player.width * 0.5f - vector18.X; - float num119 = player.position.Y + (float)player.height * 0.5f - vector18.Y; - num118 += (float)Main.rand.Next(-40, 41); - num119 += (float)Main.rand.Next(-40, 41); - float num120 = (float)Math.Sqrt((double)(num118 * num118 + num119 * num119)); - npc.netUpdate = true; - num120 = num117 / num120; - num118 *= num120; - num119 *= num120; - int num121 = expertMode ? 8 : 12; - int num122 = mod.ProjectileType("HorsWaterBlast"); - vector18.X += num118 * 3f; - vector18.Y += num119 * 3f; - Projectile.NewProjectile(vector18.X, vector18.Y, num118, num119, num122, num121, 0f, Main.myPlayer, 0f, 0f); - npc.ai[2] = 0f; } } diff --git a/NPCs/NormalNPCs/CosmicElemental.cs b/NPCs/NormalNPCs/CosmicElemental.cs index d462195c97..7c2dd7ef8b 100644 --- a/NPCs/NormalNPCs/CosmicElemental.cs +++ b/NPCs/NormalNPCs/CosmicElemental.cs @@ -3,6 +3,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.NormalNPCs { diff --git a/NPCs/NormalNPCs/CrawlerAmber.cs b/NPCs/NormalNPCs/CrawlerAmber.cs index 7ebc12a757..a393232737 100644 --- a/NPCs/NormalNPCs/CrawlerAmber.cs +++ b/NPCs/NormalNPCs/CrawlerAmber.cs @@ -4,6 +4,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.NormalNPCs { diff --git a/NPCs/NormalNPCs/CrawlerAmethyst.cs b/NPCs/NormalNPCs/CrawlerAmethyst.cs index b36e610c93..22eef65da1 100644 --- a/NPCs/NormalNPCs/CrawlerAmethyst.cs +++ b/NPCs/NormalNPCs/CrawlerAmethyst.cs @@ -4,6 +4,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.NormalNPCs { diff --git a/NPCs/NormalNPCs/CrawlerCrystal.cs b/NPCs/NormalNPCs/CrawlerCrystal.cs index cf857fca1f..4d680d4998 100644 --- a/NPCs/NormalNPCs/CrawlerCrystal.cs +++ b/NPCs/NormalNPCs/CrawlerCrystal.cs @@ -4,6 +4,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.NormalNPCs { diff --git a/NPCs/NormalNPCs/CrawlerDiamond.cs b/NPCs/NormalNPCs/CrawlerDiamond.cs index 40950d44b3..dfb447a666 100644 --- a/NPCs/NormalNPCs/CrawlerDiamond.cs +++ b/NPCs/NormalNPCs/CrawlerDiamond.cs @@ -4,6 +4,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.NormalNPCs { diff --git a/NPCs/NormalNPCs/CrawlerEmerald.cs b/NPCs/NormalNPCs/CrawlerEmerald.cs index 2a44dddfe5..6815afaf2e 100644 --- a/NPCs/NormalNPCs/CrawlerEmerald.cs +++ b/NPCs/NormalNPCs/CrawlerEmerald.cs @@ -4,6 +4,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.NormalNPCs { diff --git a/NPCs/NormalNPCs/CrawlerRuby.cs b/NPCs/NormalNPCs/CrawlerRuby.cs index f723c9510f..2310d93573 100644 --- a/NPCs/NormalNPCs/CrawlerRuby.cs +++ b/NPCs/NormalNPCs/CrawlerRuby.cs @@ -4,6 +4,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.NormalNPCs { diff --git a/NPCs/NormalNPCs/CrawlerSapphire.cs b/NPCs/NormalNPCs/CrawlerSapphire.cs index 3b7745448d..b92b905156 100644 --- a/NPCs/NormalNPCs/CrawlerSapphire.cs +++ b/NPCs/NormalNPCs/CrawlerSapphire.cs @@ -4,6 +4,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.NormalNPCs { diff --git a/NPCs/NormalNPCs/CrawlerTopaz.cs b/NPCs/NormalNPCs/CrawlerTopaz.cs index 11fb0de9d0..ce81fa6cd7 100644 --- a/NPCs/NormalNPCs/CrawlerTopaz.cs +++ b/NPCs/NormalNPCs/CrawlerTopaz.cs @@ -4,6 +4,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.NormalNPCs { diff --git a/NPCs/NormalNPCs/CrimulanBlightSlime.cs b/NPCs/NormalNPCs/CrimulanBlightSlime.cs index 27205b3054..65086b9ead 100644 --- a/NPCs/NormalNPCs/CrimulanBlightSlime.cs +++ b/NPCs/NormalNPCs/CrimulanBlightSlime.cs @@ -2,6 +2,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.NormalNPCs { diff --git a/NPCs/NormalNPCs/CryoSlime.cs b/NPCs/NormalNPCs/CryoSlime.cs index 8c49761068..8e7c4f672e 100644 --- a/NPCs/NormalNPCs/CryoSlime.cs +++ b/NPCs/NormalNPCs/CryoSlime.cs @@ -3,6 +3,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.NormalNPCs { diff --git a/NPCs/NormalNPCs/Cryon.cs b/NPCs/NormalNPCs/Cryon.cs index 3c7a3c3c15..d164a757d9 100644 --- a/NPCs/NormalNPCs/Cryon.cs +++ b/NPCs/NormalNPCs/Cryon.cs @@ -3,6 +3,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.NormalNPCs { diff --git a/NPCs/NormalNPCs/EbonianBlightSlime.cs b/NPCs/NormalNPCs/EbonianBlightSlime.cs index a7a66819dd..6e63636ed1 100644 --- a/NPCs/NormalNPCs/EbonianBlightSlime.cs +++ b/NPCs/NormalNPCs/EbonianBlightSlime.cs @@ -2,6 +2,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.NormalNPCs { diff --git a/NPCs/NormalNPCs/Eidolist.cs b/NPCs/NormalNPCs/Eidolist.cs index 2b90fa9603..e4c3fb341e 100644 --- a/NPCs/NormalNPCs/Eidolist.cs +++ b/NPCs/NormalNPCs/Eidolist.cs @@ -5,6 +5,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.NormalNPCs { diff --git a/NPCs/NormalNPCs/FearlessGoldfishWarrior.cs b/NPCs/NormalNPCs/FearlessGoldfishWarrior.cs index 22ce8e19de..5709b1a4cb 100644 --- a/NPCs/NormalNPCs/FearlessGoldfishWarrior.cs +++ b/NPCs/NormalNPCs/FearlessGoldfishWarrior.cs @@ -4,6 +4,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.NormalNPCs { @@ -409,7 +410,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.playerSafe || !Main.raining) + if (spawnInfo.playerSafe || !Main.raining || spawnInfo.player.GetModPlayer(mod).ZoneSulphur) { return 0f; } diff --git a/NPCs/NormalNPCs/Horse.cs b/NPCs/NormalNPCs/Horse.cs index cc700e67e4..0257da81ce 100644 --- a/NPCs/NormalNPCs/Horse.cs +++ b/NPCs/NormalNPCs/Horse.cs @@ -4,6 +4,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.NormalNPCs { diff --git a/NPCs/NormalNPCs/IceClasper.cs b/NPCs/NormalNPCs/IceClasper.cs index 01e45d149b..db156472b9 100644 --- a/NPCs/NormalNPCs/IceClasper.cs +++ b/NPCs/NormalNPCs/IceClasper.cs @@ -4,6 +4,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.NormalNPCs { diff --git a/NPCs/NormalNPCs/IrradiatedSlime.cs b/NPCs/NormalNPCs/IrradiatedSlime.cs index 6daa0ef440..e3a142d237 100644 --- a/NPCs/NormalNPCs/IrradiatedSlime.cs +++ b/NPCs/NormalNPCs/IrradiatedSlime.cs @@ -2,6 +2,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.NormalNPCs { diff --git a/NPCs/NormalNPCs/OverloadedSoldier.cs b/NPCs/NormalNPCs/OverloadedSoldier.cs index d3e6c95a4e..6c2c6ac42d 100644 --- a/NPCs/NormalNPCs/OverloadedSoldier.cs +++ b/NPCs/NormalNPCs/OverloadedSoldier.cs @@ -3,6 +3,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.NormalNPCs { diff --git a/NPCs/NormalNPCs/PerennialSlime.cs b/NPCs/NormalNPCs/PerennialSlime.cs index 657e0ba445..e19785eddc 100644 --- a/NPCs/NormalNPCs/PerennialSlime.cs +++ b/NPCs/NormalNPCs/PerennialSlime.cs @@ -2,6 +2,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.NormalNPCs { diff --git a/NPCs/NormalNPCs/PhantomDebris.cs b/NPCs/NormalNPCs/PhantomDebris.cs index 34c7bdaad5..1c91683911 100644 --- a/NPCs/NormalNPCs/PhantomDebris.cs +++ b/NPCs/NormalNPCs/PhantomDebris.cs @@ -3,6 +3,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.NormalNPCs { diff --git a/NPCs/NormalNPCs/Piggy.cs b/NPCs/NormalNPCs/Piggy.cs index b446ac95e3..7ac4bebcf7 100644 --- a/NPCs/NormalNPCs/Piggy.cs +++ b/NPCs/NormalNPCs/Piggy.cs @@ -3,6 +3,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.NormalNPCs { diff --git a/NPCs/NormalNPCs/Pitbull.cs b/NPCs/NormalNPCs/Pitbull.cs index 76bc20cbb4..5528069cdd 100644 --- a/NPCs/NormalNPCs/Pitbull.cs +++ b/NPCs/NormalNPCs/Pitbull.cs @@ -2,6 +2,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.NormalNPCs { diff --git a/NPCs/NormalNPCs/PlagueBee.cs b/NPCs/NormalNPCs/PlagueBee.cs index 599cad9681..e15e200e43 100644 --- a/NPCs/NormalNPCs/PlagueBee.cs +++ b/NPCs/NormalNPCs/PlagueBee.cs @@ -2,6 +2,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.NormalNPCs { diff --git a/NPCs/NormalNPCs/PlagueBeeLarge.cs b/NPCs/NormalNPCs/PlagueBeeLarge.cs index cbb9bfe4ac..5f619a6531 100644 --- a/NPCs/NormalNPCs/PlagueBeeLarge.cs +++ b/NPCs/NormalNPCs/PlagueBeeLarge.cs @@ -2,6 +2,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.NormalNPCs { diff --git a/NPCs/NormalNPCs/PlaguedDerpling.cs b/NPCs/NormalNPCs/PlaguedDerpling.cs index 2885e8c6e1..c638b0a007 100644 --- a/NPCs/NormalNPCs/PlaguedDerpling.cs +++ b/NPCs/NormalNPCs/PlaguedDerpling.cs @@ -3,6 +3,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.NormalNPCs { diff --git a/NPCs/NormalNPCs/PlaguedFlyingFox.cs b/NPCs/NormalNPCs/PlaguedFlyingFox.cs index aaf4f5fe96..7ed6e5336b 100644 --- a/NPCs/NormalNPCs/PlaguedFlyingFox.cs +++ b/NPCs/NormalNPCs/PlaguedFlyingFox.cs @@ -2,6 +2,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.NormalNPCs { diff --git a/NPCs/NormalNPCs/PlaguedJungleSlime.cs b/NPCs/NormalNPCs/PlaguedJungleSlime.cs index e54d6f051a..37e33ff616 100644 --- a/NPCs/NormalNPCs/PlaguedJungleSlime.cs +++ b/NPCs/NormalNPCs/PlaguedJungleSlime.cs @@ -3,6 +3,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.NormalNPCs { diff --git a/NPCs/NormalNPCs/PlaguedTortoise.cs b/NPCs/NormalNPCs/PlaguedTortoise.cs index 958b4479ae..f35a9e7c24 100644 --- a/NPCs/NormalNPCs/PlaguedTortoise.cs +++ b/NPCs/NormalNPCs/PlaguedTortoise.cs @@ -2,6 +2,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.NormalNPCs { diff --git a/NPCs/NormalNPCs/SandTortoise.cs b/NPCs/NormalNPCs/SandTortoise.cs index 1352009234..031afaa084 100644 --- a/NPCs/NormalNPCs/SandTortoise.cs +++ b/NPCs/NormalNPCs/SandTortoise.cs @@ -2,6 +2,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.NormalNPCs { diff --git a/NPCs/NormalNPCs/StormlionCharger.cs b/NPCs/NormalNPCs/StormlionCharger.cs index 65211d2fb6..517c09e08b 100644 --- a/NPCs/NormalNPCs/StormlionCharger.cs +++ b/NPCs/NormalNPCs/StormlionCharger.cs @@ -2,6 +2,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.NormalNPCs { diff --git a/NPCs/NormalNPCs/SunBat.cs b/NPCs/NormalNPCs/SunBat.cs index b146e621b8..17756362c1 100644 --- a/NPCs/NormalNPCs/SunBat.cs +++ b/NPCs/NormalNPCs/SunBat.cs @@ -2,6 +2,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.NormalNPCs { diff --git a/NPCs/NormalNPCs/ThiccWaifu.cs b/NPCs/NormalNPCs/ThiccWaifu.cs index af2926c24d..22b87aa094 100644 --- a/NPCs/NormalNPCs/ThiccWaifu.cs +++ b/NPCs/NormalNPCs/ThiccWaifu.cs @@ -21,8 +21,8 @@ namespace CalamityMod.NPCs.NormalNPCs { npc.npcSlots = 3f; npc.damage = 38; - npc.width = 50; //324 - npc.height = 100; //216 + npc.width = 80; //324 + npc.height = 140; //216 npc.defense = 40; npc.lifeMax = 6000; if (CalamityWorld.downedProvidence) @@ -47,336 +47,197 @@ namespace CalamityMod.NPCs.NormalNPCs 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.375f, 0.5f, 0.625f); - bool flag111 = false; - bool flag112 = false; - bool flag113 = true; - bool flag114 = false; - int num1454 = 4; - int num1455 = 3; - int num1456 = 0; - float num1457 = 0.2f; + + float num1457 = 0.1f; float num1458 = 2f; - float num1459 = -0.2f; float num1460 = -4f; - bool flag115 = true; - float num1461 = 2f; + float num1461 = 4f; float num1462 = 0.1f; - float num1463 = 1f; - float num1464 = 0.04f; bool flag116 = false; float scaleFactor26 = 0.96f; bool flag117 = true; - if (npc.type == mod.NPCType("ThiccWaifu")) + + npc.rotation = npc.velocity.X * 0.04f; + npc.spriteDirection = ((npc.direction > 0) ? 1 : -1); + + float num1465 = (float)npc.life / (float)npc.lifeMax; + num1461 += (1f - num1465) * 6f; + num1462 += (1f - num1465) * 0.02f; + + if (num1465 < 0.5f) + npc.knockBackResist = 0f; + + npc.localAI[2] = 0f; + + if (npc.ai[0] < 0f) + npc.ai[0] = MathHelper.Min(npc.ai[0] + 1f, 0f); + + if (npc.ai[0] > 0f) { - flag115 = false; - npc.rotation = npc.velocity.X * 0.04f; - npc.spriteDirection = ((npc.direction > 0) ? 1 : -1); - num1456 = 3; - num1459 = -0.1f; - num1457 = 0.1f; - float num1465 = (float)npc.life / (float)npc.lifeMax; - num1461 += (1f - num1465) * 2f; - num1462 += (1f - num1465) * 0.02f; - if (num1465 < 0.5f) + flag117 = false; + flag116 = true; + npc.ai[0] += 1f; + if (npc.ai[0] >= 135f) { - npc.knockBackResist = 0f; - } - npc.localAI[2] = 0f; - if (npc.ai[0] < 0f) - { - npc.ai[0] = MathHelper.Min(npc.ai[0] + 1f, 0f); - } - if (npc.ai[0] > 0f) - { - flag117 = false; - flag116 = true; - npc.ai[0] += 1f; - if (npc.ai[0] >= 135f) - { - npc.ai[0] = -300f; - npc.netUpdate = true; - } - Vector2 vector = npc.Center; - vector = Vector2.UnitX * (float)npc.direction * 200f; - Vector2 vector223 = npc.Center + Vector2.UnitX * (float)npc.direction * 50f - Vector2.UnitY * 6f; - if (npc.ai[0] == 54f && Main.netMode != 1) - { - List list4 = new List(); - Vector2 vec5 = Main.player[npc.target].Center + new Vector2(Main.player[npc.target].velocity.X * 30f, 0f); - Point point14 = vec5.ToTileCoordinates(); - int num1468 = 0; - while (num1468 < 1000 && list4.Count < 3) - { - bool flag118 = false; - int num1469 = Main.rand.Next(point14.X - 30, point14.X + 30 + 1); - foreach (Point current in list4) - { - if (Math.Abs(current.X - num1469) < 10) - { - flag118 = true; - break; - } - } - if (!flag118) - { - int startY = point14.Y - 20; - int num1470; - int num1471; - Collision.ExpandVertically(num1469, startY, out num1470, out num1471, 1, 51); - if (StrayMethods.CanSpawnSandstormHostile(new Vector2((float)num1469, (float)(num1471 - 15)) * 16f, 15, 15)) - { - list4.Add(new Point(num1469, num1471 - 15)); - } - } - num1468++; - } - foreach (Point current2 in list4) - { - Projectile.NewProjectile((float)(current2.X * 16), (float)(current2.Y * 16), 0f, 0f, mod.ProjectileType("StormMarkHostile"), 0, 0f, Main.myPlayer, 0f, 0f); - } - } - new Vector2(0.9f, 2f); - if (npc.ai[0] < 114f && npc.ai[0] > 0f) - { - List list5 = new List(); - for (int num1472 = 0; num1472 < 1000; num1472++) - { - Projectile projectile9 = Main.projectile[num1472]; - if (projectile9.active && projectile9.type == mod.ProjectileType("StormMarkHostile")) - { - list5.Add(projectile9.Center); - } - } - } - } - if (npc.ai[0] == 0f) - { - npc.ai[0] = 1f; + npc.ai[0] = -300f; npc.netUpdate = true; - flag116 = true; + } + Vector2 vector = npc.Center; + vector = Vector2.UnitX * (float)npc.direction * 200f; + Vector2 vector223 = npc.Center + Vector2.UnitX * (float)npc.direction * 50f - Vector2.UnitY * 6f; + if (npc.ai[0] == 54f && Main.netMode != 1) + { + List list4 = new List(); + Vector2 vec5 = Main.player[npc.target].Center + new Vector2(Main.player[npc.target].velocity.X * 30f, 0f); + Point point14 = vec5.ToTileCoordinates(); + int num1468 = 0; + while (num1468 < 1000 && list4.Count < 3) + { + bool flag118 = false; + int num1469 = Main.rand.Next(point14.X - 30, point14.X + 30 + 1); + foreach (Point current in list4) + { + if (Math.Abs(current.X - num1469) < 10) + { + flag118 = true; + break; + } + } + if (!flag118) + { + int startY = point14.Y - 20; + int num1470; + int num1471; + Collision.ExpandVertically(num1469, startY, out num1470, out num1471, 1, 51); + list4.Add(new Point(num1469, num1471 - 15)); + } + num1468++; + } + foreach (Point current2 in list4) + { + Projectile.NewProjectile((float)(current2.X * 16), (float)(current2.Y * 16), 0f, 0f, mod.ProjectileType("StormMarkHostile"), 0, 0f, Main.myPlayer, 0f, 0f); + } + } + new Vector2(0.9f, 2f); + if (npc.ai[0] < 114f && npc.ai[0] > 0f) + { + List list5 = new List(); + for (int num1472 = 0; num1472 < 1000; num1472++) + { + Projectile projectile9 = Main.projectile[num1472]; + if (projectile9.active && projectile9.type == mod.ProjectileType("StormMarkHostile")) + { + list5.Add(projectile9.Center); + } + } } } - if (npc.justHit) + + if (npc.ai[0] == 0f) { - npc.localAI[2] = 0f; + npc.ai[0] = 1f; + npc.netUpdate = true; + flag116 = true; } - if (!flag112) + + if (npc.justHit) + npc.localAI[2] = 0f; + + if (npc.localAI[2] >= 0f) { - if (npc.localAI[2] >= 0f) + float num1477 = 16f; + bool flag119 = false; + bool flag120 = false; + if (npc.position.X > npc.localAI[0] - num1477 && npc.position.X < npc.localAI[0] + num1477) { - float num1477 = 16f; - bool flag119 = false; - bool flag120 = false; - if (npc.position.X > npc.localAI[0] - num1477 && npc.position.X < npc.localAI[0] + num1477) + flag119 = true; + } + else if ((npc.velocity.X < 0f && npc.direction > 0) || (npc.velocity.X > 0f && npc.direction < 0)) + { + flag119 = true; + num1477 += 24f; + } + if (npc.position.Y > npc.localAI[1] - num1477 && npc.position.Y < npc.localAI[1] + num1477) + { + flag120 = true; + } + if (flag119 && flag120) + { + npc.localAI[2] += 1f; + if (npc.localAI[2] >= 60f) { - flag119 = true; - } - else if ((npc.velocity.X < 0f && npc.direction > 0) || (npc.velocity.X > 0f && npc.direction < 0)) - { - flag119 = true; - num1477 += 24f; - } - if (npc.position.Y > npc.localAI[1] - num1477 && npc.position.Y < npc.localAI[1] + num1477) - { - flag120 = true; - } - if (flag119 && flag120) - { - npc.localAI[2] += 1f; - if (npc.localAI[2] >= 30f && num1477 == 16f) - { - flag111 = true; - } - if (npc.localAI[2] >= 60f) - { - npc.localAI[2] = -180f; - npc.direction *= -1; - npc.velocity.X = npc.velocity.X * -1f; - npc.collideX = false; - } - } - else - { - npc.localAI[0] = npc.position.X; - npc.localAI[1] = npc.position.Y; - npc.localAI[2] = 0f; - } - if (flag117) - { - npc.TargetClosest(true); + npc.localAI[2] = -180f; + npc.direction *= -1; + npc.velocity.X = npc.velocity.X * -1f; + npc.collideX = false; } } else { - npc.localAI[2] += 1f; - npc.direction = ((Main.player[npc.target].Center.X > npc.Center.X) ? 1 : -1); + npc.localAI[0] = npc.position.X; + npc.localAI[1] = npc.position.Y; + npc.localAI[2] = 0f; + } + if (flag117) + { + npc.TargetClosest(true); } } - int num1478 = (int)((npc.position.X + (float)(npc.width / 2)) / 16f) + npc.direction * 2; - int num1479 = (int)((npc.position.Y + (float)npc.height) / 16f); - int num1480 = (int)npc.Bottom.Y / 16; - int num1481 = (int)npc.Bottom.X / 16; + else + { + npc.localAI[2] += 1f; + npc.direction = ((Main.player[npc.target].Center.X > npc.Center.X) ? 1 : -1); + } + + // Slow down when spawning tornadoes if (flag116) { npc.velocity *= scaleFactor26; return; } - for (int num1482 = num1479; num1482 < num1479 + num1454; num1482++) + + // Float up or down towards target + if (npc.position.Y > Main.player[npc.target].position.Y - 50f) { - if (Main.tile[num1478, num1482] == null) - { - Main.tile[num1478, num1482] = new Tile(); - } - if ((Main.tile[num1478, num1482].nactive() && Main.tileSolid[(int)Main.tile[num1478, num1482].type]) || Main.tile[num1478, num1482].liquid > 0) - { - if (num1482 <= num1479 + 1) - { - flag114 = true; - } - flag113 = false; - break; - } - } - for (int num1483 = num1480; num1483 < num1480 + num1456; num1483++) - { - if (Main.tile[num1481, num1483] == null) - { - Main.tile[num1481, num1483] = new Tile(); - } - if ((Main.tile[num1481, num1483].nactive() && Main.tileSolid[(int)Main.tile[num1481, num1483].type]) || Main.tile[num1481, num1483].liquid > 0) - { - flag114 = true; - flag113 = false; - break; - } - } - if (flag115) - { - for (int num1484 = num1479 - num1455; num1484 < num1479; num1484++) - { - if (Main.tile[num1478, num1484] == null) - { - Main.tile[num1478, num1484] = new Tile(); - } - if ((Main.tile[num1478, num1484].nactive() && Main.tileSolid[(int)Main.tile[num1478, num1484].type]) || Main.tile[num1478, num1484].liquid > 0) - { - flag114 = false; - flag111 = true; - break; - } - } - } - if (flag111) - { - flag114 = false; - flag113 = true; - } - if (flag113) - { - npc.velocity.Y = npc.velocity.Y + num1457; + if (npc.velocity.Y > 0f) + npc.velocity.Y = npc.velocity.Y * 0.99f; + + npc.velocity.Y = npc.velocity.Y - num1457; + if (npc.velocity.Y > num1458) - { npc.velocity.Y = num1458; - } } - else + else if (npc.position.Y < Main.player[npc.target].position.Y - 100f) { - if ((npc.directionY < 0 && npc.velocity.Y > 0f) || flag114) - { - npc.velocity.Y = npc.velocity.Y + num1459; - } + if (npc.velocity.Y < 0f) + npc.velocity.Y = npc.velocity.Y * 0.99f; + + npc.velocity.Y = npc.velocity.Y + num1457; + if (npc.velocity.Y < num1460) - { npc.velocity.Y = num1460; - } } - if (npc.collideX) - { - npc.velocity.X = npc.oldVelocity.X * -0.4f; - if (npc.direction == -1 && npc.velocity.X > 0f && npc.velocity.X < 1f) - { - npc.velocity.X = 1f; - } - if (npc.direction == 1 && npc.velocity.X < 0f && npc.velocity.X > -1f) - { - npc.velocity.X = -1f; - } - } - if (npc.collideY) - { - npc.velocity.Y = npc.oldVelocity.Y * -0.25f; - if (npc.velocity.Y > 0f && npc.velocity.Y < 1f) - { - npc.velocity.Y = 1f; - } - if (npc.velocity.Y < 0f && npc.velocity.Y > -1f) - { - npc.velocity.Y = -1f; - } - } - if (npc.direction == -1 && npc.velocity.X > -num1461) + + // Float back and forth near target + if (npc.position.X + (float)(npc.width / 2) > Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2) + 50f) { + if (npc.velocity.X > 0f) + npc.velocity.X = npc.velocity.X * 0.99f; + npc.velocity.X = npc.velocity.X - num1462; + if (npc.velocity.X > num1461) - { - npc.velocity.X = npc.velocity.X - num1462; - } - else if (npc.velocity.X > 0f) - { - npc.velocity.X = npc.velocity.X + num1462 / 2f; - } - if (npc.velocity.X < -num1461) - { - npc.velocity.X = -num1461; - } - } - else if (npc.direction == 1 && npc.velocity.X < num1461) - { - npc.velocity.X = npc.velocity.X + num1462; - if (npc.velocity.X < -num1461) - { - npc.velocity.X = npc.velocity.X + num1462; - } - else if (npc.velocity.X < 0f) - { - npc.velocity.X = npc.velocity.X - num1462 / 2f; - } - if (npc.velocity.X > num1461) - { npc.velocity.X = num1461; - } } - if (npc.directionY == -1 && npc.velocity.Y > -num1463) + if (npc.position.X + (float)(npc.width / 2) < Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2) - 50f) { - npc.velocity.Y = npc.velocity.Y - num1464; - if (npc.velocity.Y > num1463) - { - npc.velocity.Y = npc.velocity.Y - num1464 * 1.25f; - } - else if (npc.velocity.Y > 0f) - { - npc.velocity.Y = npc.velocity.Y + num1464 * 0.75f; - } - if (npc.velocity.Y < -num1463) - { - npc.velocity.Y = -num1461; - } - } - else if (npc.directionY == 1 && npc.velocity.Y < num1463) - { - npc.velocity.Y = npc.velocity.Y + num1464; - if (npc.velocity.Y < -num1463) - { - npc.velocity.Y = npc.velocity.Y + num1464 * 1.25f; - } - else if (npc.velocity.Y < 0f) - { - npc.velocity.Y = npc.velocity.Y - num1464 * 0.75f; - } - if (npc.velocity.Y > num1463) - { - npc.velocity.Y = num1463; - } + if (npc.velocity.X < 0f) + npc.velocity.X = npc.velocity.X * 0.99f; + + npc.velocity.X = npc.velocity.X + num1462; + + if (npc.velocity.X < -num1461) + npc.velocity.X = -num1461; } } diff --git a/NPCs/NormalNPCs/WulfrumDrone.cs b/NPCs/NormalNPCs/WulfrumDrone.cs index 8a02b7b60c..9ee889aba1 100644 --- a/NPCs/NormalNPCs/WulfrumDrone.cs +++ b/NPCs/NormalNPCs/WulfrumDrone.cs @@ -2,6 +2,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.NormalNPCs { diff --git a/NPCs/NormalNPCs/WulfrumSlime.cs b/NPCs/NormalNPCs/WulfrumSlime.cs index 1fe405107c..bfa3fb4219 100644 --- a/NPCs/NormalNPCs/WulfrumSlime.cs +++ b/NPCs/NormalNPCs/WulfrumSlime.cs @@ -2,6 +2,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.NormalNPCs { diff --git a/NPCs/Perforator/PerforatorHive.cs b/NPCs/Perforator/PerforatorHive.cs index 79ce2b3695..b23b1ad2d7 100644 --- a/NPCs/Perforator/PerforatorHive.cs +++ b/NPCs/Perforator/PerforatorHive.cs @@ -6,6 +6,7 @@ using Terraria.ID; using Terraria.Localization; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.Utilities; namespace CalamityMod.NPCs.Perforator { @@ -152,7 +153,6 @@ namespace CalamityMod.NPCs.Perforator num624 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 5, 0f, 0f, 100, default(Color), 1f); Main.dust[num624].velocity *= 2f; } - npc.TargetClosest(true); float num179 = 8f; Vector2 value9 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); float num180 = player.position.X + (float)player.width * 0.5f - value9.X; @@ -188,9 +188,9 @@ namespace CalamityMod.NPCs.Perforator npc.velocity.Y = npc.velocity.Y * 0.98f; } npc.velocity.Y = npc.velocity.Y - 0.1f; - if (npc.velocity.Y > 2f) + if (npc.velocity.Y > 3f) { - npc.velocity.Y = 2f; + npc.velocity.Y = 3f; } } else if (npc.position.Y < player.position.Y - 400f) //500 @@ -200,9 +200,9 @@ namespace CalamityMod.NPCs.Perforator npc.velocity.Y = npc.velocity.Y * 0.98f; } npc.velocity.Y = npc.velocity.Y + 0.1f; - if (npc.velocity.Y < -2f) + if (npc.velocity.Y < -3f) { - npc.velocity.Y = -2f; + npc.velocity.Y = -3f; } } if (npc.position.X + (float)(npc.width / 2) > player.position.X + (float)(player.width / 2) + 80f) @@ -288,7 +288,7 @@ namespace CalamityMod.NPCs.Perforator DropHelper.DropBags(npc); DropHelper.DropItemChance(npc, mod.ItemType("PerforatorTrophy"), 10); - DropHelper.DropItemCondition(npc, mod.ItemType("Knowledge13"), true, !CalamityWorld.downedPerforator); + DropHelper.DropItemCondition(npc, mod.ItemType("KnowledgePerforators"), true, !CalamityWorld.downedPerforator); DropHelper.DropResidentEvilAmmo(npc, CalamityWorld.downedPerforator, 2, 0, 0); // All other drops are contained in the bag, so they only drop directly on Normal diff --git a/NPCs/PlaguebringerGoliath/PlagueHomingMissile.cs b/NPCs/PlaguebringerGoliath/PlagueHomingMissile.cs index 4a1203ed88..0d608b57e6 100644 --- a/NPCs/PlaguebringerGoliath/PlagueHomingMissile.cs +++ b/NPCs/PlaguebringerGoliath/PlagueHomingMissile.cs @@ -28,6 +28,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath npc.DeathSound = SoundID.NPCDeath14; npc.noGravity = true; npc.canGhostHeal = false; + npc.noTileCollide = true; npc.buffImmune[189] = true; npc.buffImmune[153] = true; npc.buffImmune[70] = true; diff --git a/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs b/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs index 4f999dbef8..3121c66331 100644 --- a/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs +++ b/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs @@ -7,6 +7,7 @@ using Terraria.Localization; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.Utilities; namespace CalamityMod.NPCs.PlaguebringerGoliath { @@ -16,7 +17,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath private const float MissileAngleSpread = 90; private const int MissileProjectiles = 5; private int MissileCountdown = 0; - private int despawnTimer = 600; + private int despawnTimer = 480; private int chargeDistance = 0; private bool charging = false; private bool halfLife = false; @@ -106,75 +107,79 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath public override void AI() { + // Mode variables bool revenge = (CalamityWorld.revenge || CalamityWorld.bossRushActive); bool expertMode = (Main.expertMode || CalamityWorld.bossRushActive); + + // Light Lighting.AddLight((int)((npc.position.X + (float)(npc.width / 2)) / 16f), (int)((npc.position.Y + (float)(npc.height / 2)) / 16f), 0.15f, 0.35f, 0.05f); + + // Show message if (!halfLife && ((double)npc.life <= (double)npc.lifeMax * 0.5 || CalamityWorld.death || CalamityWorld.bossRushActive)) { string key = "Mods.CalamityMod.PlagueBossText"; Color messageColor = Color.Lime; if (Main.netMode == 0) - { Main.NewText(Language.GetTextValue(key), messageColor); - } else if (Main.netMode == 2) - { NetMessage.BroadcastChatMessage(NetworkText.FromKey(key), messageColor); - } + halfLife = true; } + + // Missile countdown if (halfLife && MissileCountdown == 0) - { MissileCountdown = 600; - } if (MissileCountdown > 1) - { MissileCountdown--; - } + + // Count nearby players int num1038 = 0; for (int num1039 = 0; num1039 < 255; num1039++) { if (Main.player[num1039].active && !Main.player[num1039].dead && (npc.Center - Main.player[num1039].Center).Length() < 1000f) - { num1038++; - } } + + // Defense gain if (expertMode) { int num1040 = (int)(50f * (1f - (float)npc.life / (float)npc.lifeMax)); npc.defense = npc.defDefense + num1040; } + + // Target if (npc.target < 0 || npc.target == 255 || Main.player[npc.target].dead || !Main.player[npc.target].active) - { npc.TargetClosest(true); - } + + // Distance from target Vector2 distFromPlayer = Main.player[npc.target].Center - npc.Center; + + // Enrage bool aboveGroundEnrage = ((double)Main.player[npc.target].position.Y < Main.worldSurface * 16.0 || Main.player[npc.target].position.Y > (float)((Main.maxTilesY - 200) * 16)) && !CalamityWorld.bossRushActive; + bool jungleEnrage = false; if (!Main.player[npc.target].ZoneJungle && !CalamityWorld.bossRushActive) - { jungleEnrage = true; - } + + // Despawn if (jungleEnrage || Vector2.Distance(Main.player[npc.target].Center, npc.Center) > 5600f) { if (despawnTimer > 0) - { despawnTimer--; - } } else - { - despawnTimer = 600; - } + despawnTimer = 480; + canDespawn = (despawnTimer <= 0); if (canDespawn) { if (npc.timeLeft > 10) - { npc.timeLeft = 10; - } } + + // Phase switch if (npc.ai[0] == -1f) { if (Main.netMode != 1) @@ -185,18 +190,13 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath { num596 = Main.rand.Next(3); if (MissileCountdown == 1) - { num596 = 4; - } else if (num596 == 1) - { num596 = 2; - } else if (num596 == 2) - { num596 = 3; - } } + while ((float)num596 == num595); if (num596 == 0 && ((double)npc.life <= (double)npc.lifeMax * 0.8 || CalamityWorld.death) && distFromPlayer.Length() < 1800f) { @@ -207,15 +207,18 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath case 2: chargeDistance = -400; break; } } + npc.ai[0] = (float)num596; npc.ai[1] = 0f; npc.ai[2] = 0f; npc.ai[3] = 0f; } } + + // Charge phase else if (npc.ai[0] == 0f) { - int num1043 = 2; //2 + int num1043 = 2; if ((npc.ai[1] > (float)(2 * num1043) && npc.ai[1] % 2f == 0f) || distFromPlayer.Length() > 1800f) { npc.ai[0] = -1f; @@ -224,11 +227,15 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath npc.netUpdate = true; return; } + + // Charge if (npc.ai[1] % 2f == 0f) { npc.TargetClosest(true); + float playerLocation = npc.Center.X - Main.player[npc.target].Center.X; - if (Math.Abs(npc.position.Y + (float)(npc.height / 2) - (Main.player[npc.target].position.Y + (float)(Main.player[npc.target].height / 2) - (float)chargeDistance)) < 20f) + + if (Math.Abs(npc.position.Y + (float)(npc.height / 2) - (Main.player[npc.target].position.Y + (float)(Main.player[npc.target].height / 2) - (float)chargeDistance)) < 40f) { switch (Main.rand.Next(3)) { @@ -236,172 +243,144 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath case 1: chargeDistance = 400; break; case 2: chargeDistance = -400; break; } + charging = true; + npc.ai[1] += 1f; npc.ai[2] = 0f; - float num1044 = revenge ? 24f : 22f; //16 + + float num1044 = revenge ? 24f : 22f; if (aboveGroundEnrage) - { num1044 += 6f; - } if ((double)npc.life < (double)npc.lifeMax * 0.75) - { - num1044 += 2f; //2 not a prob - } - if ((double)npc.life < (double)npc.lifeMax * 0.5) - { - num1044 += 2f; //2 not a prob - } - if ((double)npc.life < (double)npc.lifeMax * 0.25) - { - num1044 += 2f; //2 not a prob - } - if ((double)npc.life < (double)npc.lifeMax * 0.1 || CalamityWorld.bossRushActive) - { - num1044 += 2f; //2 not a prob - } - if (npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) - { num1044 += 2f; - } + if ((double)npc.life < (double)npc.lifeMax * 0.5) + num1044 += 2f; + if ((double)npc.life < (double)npc.lifeMax * 0.25) + num1044 += 2f; + if ((double)npc.life < (double)npc.lifeMax * 0.1 || CalamityWorld.bossRushActive) + num1044 += 2f; + if (npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) + num1044 += 2f; + Vector2 vector117 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); float num1045 = Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2) - vector117.X; float num1046 = Main.player[npc.target].position.Y + (float)(Main.player[npc.target].height / 2) - vector117.Y; float num1047 = (float)Math.Sqrt((double)(num1045 * num1045 + num1046 * num1046)); + num1047 = num1044 / num1047; npc.velocity.X = num1045 * num1047; npc.velocity.Y = num1046 * num1047; + npc.direction = (playerLocation < 0 ? 1 : -1); npc.spriteDirection = npc.direction; + Main.PlaySound(15, (int)npc.position.X, (int)npc.position.Y, 0); return; } + charging = false; - float num1048 = revenge ? 10f : 9f; //12 not a prob - float num1049 = revenge ? 0.15f : 0.13f; //0.15 not a prob + + float num1048 = revenge ? 16f : 14f; + float num1049 = revenge ? 0.2f : 0.18f; if ((double)npc.life < (double)npc.lifeMax * 0.75) { - num1048 += 1f; //1 not a prob - num1049 += 0.05f; //0.05 not a prob + num1048 += 1f; + num1049 += 0.05f; } if ((double)npc.life < (double)npc.lifeMax * 0.5) { - num1048 += 1f; //1 not a prob - num1049 += 0.05f; //0.05 not a prob + num1048 += 1f; + num1049 += 0.05f; } if ((double)npc.life < (double)npc.lifeMax * 0.25) { - num1048 += 2f; //2 not a prob - num1049 += 0.05f; //0.05 not a prob + num1048 += 2f; + num1049 += 0.05f; } if ((double)npc.life < (double)npc.lifeMax * 0.1 || CalamityWorld.bossRushActive) { - num1048 += 2f; //2 not a prob - num1049 += 0.1f; //0.1 not a prob + num1048 += 2f; + num1049 += 0.1f; } if (npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) { num1048 += 2f; num1049 += 0.1f; } + if (npc.position.Y + (float)(npc.height / 2) < (Main.player[npc.target].position.Y + (float)(Main.player[npc.target].height / 2) - (float)chargeDistance)) - { npc.velocity.Y = npc.velocity.Y + num1049; - } else - { npc.velocity.Y = npc.velocity.Y - num1049; - } - if (npc.velocity.Y < -12f) - { + + if (npc.velocity.Y < -num1048) npc.velocity.Y = -num1048; - } - if (npc.velocity.Y > 12f) - { + if (npc.velocity.Y > num1048) npc.velocity.Y = num1048; - } + if (Math.Abs(npc.position.X + (float)(npc.width / 2) - (Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2))) > 600f) - { npc.velocity.X = npc.velocity.X + 0.15f * (float)npc.direction; - } else if (Math.Abs(npc.position.X + (float)(npc.width / 2) - (Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2))) < 300f) - { npc.velocity.X = npc.velocity.X - 0.15f * (float)npc.direction; - } else - { npc.velocity.X = npc.velocity.X * 0.8f; - } - if (npc.velocity.X < -16f) - { - npc.velocity.X = -16f; - } - if (npc.velocity.X > 16f) - { - npc.velocity.X = 16f; - } + + if (npc.velocity.X < -20f) + npc.velocity.X = -20f; + if (npc.velocity.X > 20f) + npc.velocity.X = 20f; + npc.direction = (playerLocation < 0 ? 1 : -1); npc.spriteDirection = npc.direction; } + + // Slow down after charge else { if (npc.velocity.X < 0f) - { npc.direction = -1; - } else - { npc.direction = 1; - } + npc.spriteDirection = npc.direction; - int num1050 = 600; //600 not a prob + + int num1050 = 600; if (npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) - { num1050 = 250; - } else if (aboveGroundEnrage) - { num1050 = 350; - } else if (CalamityWorld.death || CalamityWorld.bossRushActive) - { num1050 = 400; - } else if ((double)npc.life < (double)npc.lifeMax * 0.1) - { - num1050 = revenge ? 425 : 450; //300 not a prob - } + num1050 = revenge ? 425 : 450; else if ((double)npc.life < (double)npc.lifeMax * 0.25) - { - num1050 = revenge ? 450 : 475; //450 not a prob - } + num1050 = revenge ? 450 : 475; else if ((double)npc.life < (double)npc.lifeMax * 0.5) - { - num1050 = 500; //500 not a prob - } + num1050 = 500; else if ((double)npc.life < (double)npc.lifeMax * 0.75) - { - num1050 = 550; //550 not a prob - } + num1050 = 550; + int num1051 = 1; if (npc.position.X + (float)(npc.width / 2) < Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2)) - { num1051 = -1; - } if (npc.direction == num1051 && Math.Abs(npc.position.X + (float)(npc.width / 2) - (Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2))) > (float)num1050) - { npc.ai[2] = 1f; - } + if (npc.ai[2] != 1f) { charging = true; return; } + npc.TargetClosest(true); + npc.spriteDirection = npc.direction; + charging = false; + npc.velocity *= 0.9f; - float num1052 = revenge ? 0.13f : 0.115f; //0.1 + float num1052 = revenge ? 0.12f : 0.1f; //0.1 if (npc.life < npc.lifeMax / 2) { npc.velocity *= 0.9f; @@ -417,6 +396,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath npc.velocity *= 0.9f; num1052 += 0.05f; //0.05 } + if (Math.Abs(npc.velocity.X) + Math.Abs(npc.velocity.Y) < num1052) { npc.ai[2] = 0f; @@ -424,79 +404,52 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath } } } + + // Move closer if too far away else if (npc.ai[0] == 2f) { npc.TargetClosest(true); + float playerLocation = npc.Center.X - Main.player[npc.target].Center.X; npc.direction = (playerLocation < 0 ? 1 : -1); npc.spriteDirection = npc.direction; - float num1053 = 12f; - float num1054 = 0.2f; - float num10542 = 0.1f; + Vector2 vector118 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); float num1055 = Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2) - vector118.X; float num1056 = Main.player[npc.target].position.Y + (float)(Main.player[npc.target].height / 2) - 200f - vector118.Y; float num1057 = (float)Math.Sqrt((double)(num1055 * num1055 + num1056 * num1056)); - if (num1057 < 800f) + if (num1057 < 600f) { npc.ai[0] = (((double)npc.life <= (double)npc.lifeMax * 0.66 || CalamityWorld.death) ? 5f : 1f); npc.ai[1] = 0f; npc.netUpdate = true; return; } - num1057 = num1053 / num1057; - if (npc.velocity.X < num1055) - { - npc.velocity.X = npc.velocity.X + num1054; - if (npc.velocity.X < 0f && num1055 > 0f) - { - npc.velocity.X = npc.velocity.X + num1054; - } - } - else if (npc.velocity.X > num1055) - { - npc.velocity.X = npc.velocity.X - num1054; - if (npc.velocity.X > 0f && num1055 < 0f) - { - npc.velocity.X = npc.velocity.X - num1054; - } - } - if (npc.velocity.Y < num1056) - { - npc.velocity.Y = npc.velocity.Y + num10542; - if (npc.velocity.Y < 0f && num1056 > 0f) - { - npc.velocity.Y = npc.velocity.Y + num10542; - } - } - else if (npc.velocity.Y > num1056) - { - npc.velocity.Y = npc.velocity.Y - num10542; - if (npc.velocity.Y > 0f && num1056 < 0f) - { - npc.velocity.Y = npc.velocity.Y - num10542; - } - } + + // Move closer + Movement(100f, 350f, 450f); } + + // Spawn bees else if (npc.ai[0] == 1f) { charging = false; + npc.TargetClosest(true); - Vector2 vector119 = 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 vector119 = new Vector2(npc.position.X + (float)(npc.width / 2) + (float)(80 * npc.direction), npc.position.Y + (float)npc.height * 1.2f); Vector2 vector120 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); float num1058 = Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2) - vector120.X; float num1059 = Main.player[npc.target].position.Y + (float)(Main.player[npc.target].height / 2) - vector120.Y; float num1060 = (float)Math.Sqrt((double)(num1058 * num1058 + num1059 * num1059)); + npc.ai[1] += 1f; npc.ai[1] += (float)(num1038 / 2); if ((double)npc.life < (double)npc.lifeMax * 0.75 || CalamityWorld.bossRushActive) - { npc.ai[1] += 0.25f; - } if ((double)npc.life < (double)npc.lifeMax * 0.5 || CalamityWorld.bossRushActive) - { npc.ai[1] += 0.25f; - } + bool flag103 = false; if (npc.ai[1] > 40f) { @@ -504,32 +457,28 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath npc.ai[2] += 1f; flag103 = true; } - if (Collision.CanHit(vector119, 1, 1, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height) && flag103) + + if (flag103) { Main.PlaySound(3, (int)npc.position.X, (int)npc.position.Y, 8); + if (Main.netMode != 1) { int randomAmt = expertMode ? 2 : 4; - int num1061; if (Main.rand.Next(randomAmt) == 0) - { - num1061 = mod.NPCType("PlagueBeeLargeG"); - } + randomAmt = mod.NPCType("PlagueBeeLargeG"); else - { - num1061 = mod.NPCType("PlagueBeeG"); - } + randomAmt = mod.NPCType("PlagueBeeG"); + if (expertMode && NPC.CountNPCS(mod.NPCType("PlagueMine")) < (aboveGroundEnrage ? 4 : 2)) - { NPC.NewNPC((int)vector119.X, (int)vector119.Y, mod.NPCType("PlagueMine"), 0, 0f, 0f, 0f, 0f, 255); - } + if (revenge && NPC.CountNPCS(mod.NPCType("PlaguebringerShade")) < (aboveGroundEnrage ? 2 : 1)) - { NPC.NewNPC((int)vector119.X, (int)vector119.Y, mod.NPCType("PlaguebringerShade"), 0, 0f, 0f, 0f, 0f, 255); - } + if (NPC.CountNPCS(mod.NPCType("PlagueBeeLargeG")) < 2) { - int num1062 = NPC.NewNPC((int)vector119.X, (int)vector119.Y, num1061, 0, 0f, 0f, 0f, 0f, 255); + int num1062 = NPC.NewNPC((int)vector119.X, (int)vector119.Y, randomAmt, 0, 0f, 0f, 0f, 0f, 255); Main.npc[num1062].velocity.X = (float)Main.rand.Next(-200, 201) * 0.02f; Main.npc[num1062].velocity.Y = (float)Main.rand.Next(-200, 201) * 0.02f; Main.npc[num1062].localAI[0] = 60f; @@ -537,109 +486,74 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath } } } - if (num1060 > 800f || !Collision.CanHit(new Vector2(vector119.X, vector119.Y - 30f), 1, 1, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height)) - { - float num1063 = 14f; //changed from 14 not a prob - float num1064 = 0.2f; //changed from 0.1 not a prob - float num10642 = 0.07f; - vector120 = vector119; - num1058 = Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2) - vector120.X; - num1059 = Main.player[npc.target].position.Y + (float)(Main.player[npc.target].height / 2) - vector120.Y; - num1060 = (float)Math.Sqrt((double)(num1058 * num1058 + num1059 * num1059)); - num1060 = num1063 / num1060; - if (npc.velocity.X < num1058) - { - npc.velocity.X = npc.velocity.X + num1064; - if (npc.velocity.X < 0f && num1058 > 0f) - { - npc.velocity.X = npc.velocity.X + num1064; - } - } - else if (npc.velocity.X > num1058) - { - npc.velocity.X = npc.velocity.X - num1064; - if (npc.velocity.X > 0f && num1058 < 0f) - { - npc.velocity.X = npc.velocity.X - num1064; - } - } - if (npc.velocity.Y < num1059) - { - npc.velocity.Y = npc.velocity.Y + num10642; - if (npc.velocity.Y < 0f && num1059 > 0f) - { - npc.velocity.Y = npc.velocity.Y + num10642; - } - } - else if (npc.velocity.Y > num1059) - { - npc.velocity.Y = npc.velocity.Y - num10642; - if (npc.velocity.Y > 0f && num1059 < 0f) - { - npc.velocity.Y = npc.velocity.Y - num10642; - } - } - } + + // Move closer if too far away + if (num1060 > 600f) + Movement(100f, 350f, 450f); else - { npc.velocity *= 0.9f; - } + float playerLocation = npc.Center.X - Main.player[npc.target].Center.X; npc.direction = (playerLocation < 0 ? 1 : -1); npc.spriteDirection = npc.direction; - if (npc.ai[2] > 3f) + + if (npc.ai[2] > 2f) { npc.ai[0] = -1f; npc.ai[1] = 1f; npc.netUpdate = true; } } + + // Missile spawn else if (npc.ai[0] == 5f) { charging = false; + npc.TargetClosest(true); - Vector2 vector119 = 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 vector119 = new Vector2(npc.position.X + (float)(npc.width / 2) + (float)(80 * npc.direction), npc.position.Y + (float)npc.height * 1.2f); Vector2 vector120 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); float num1058 = Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2) - vector120.X; float num1059 = Main.player[npc.target].position.Y + (float)(Main.player[npc.target].height / 2) - vector120.Y; float num1060 = (float)Math.Sqrt((double)(num1058 * num1058 + num1059 * num1059)); + npc.ai[1] += 1f; npc.ai[1] += (float)(num1038 / 2); bool flag103 = false; if ((double)npc.life < (double)npc.lifeMax * 0.25 || CalamityWorld.bossRushActive) - { - npc.ai[1] += 0.25f; //0.25 not a prob - } + npc.ai[1] += 0.25f; if ((double)npc.life < (double)npc.lifeMax * 0.1 || CalamityWorld.bossRushActive) - { - npc.ai[1] += 0.25f; //0.25 not a prob - } - if (npc.ai[1] > 40f) //changed from 40 not a prob + npc.ai[1] += 0.25f; + + if (npc.ai[1] > 40f) { npc.ai[1] = 0f; npc.ai[2] += 1f; flag103 = true; } - if (Collision.CanHit(vector119, 1, 1, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height) && flag103) + + if (flag103) { Main.PlaySound(2, (int)npc.position.X, (int)npc.position.Y, 88); + if (Main.netMode != 1) { if (expertMode && NPC.CountNPCS(mod.NPCType("PlagueMine")) < (aboveGroundEnrage ? 6 : 4)) - { NPC.NewNPC((int)vector119.X, (int)vector119.Y, mod.NPCType("PlagueMine"), 0, 0f, 0f, 0f, 0f, 255); - } + if (revenge && NPC.CountNPCS(mod.NPCType("PlaguebringerShade")) < 1 && aboveGroundEnrage) - { NPC.NewNPC((int)vector119.X, (int)vector119.Y, mod.NPCType("PlaguebringerShade"), 0, 0f, 0f, 0f, 0f, 255); - } + float projectileSpeed = revenge ? 6f : 5f; float num1071 = Main.player[npc.target].position.X + (float)Main.player[npc.target].width * 0.5f - vector119.X + (float)Main.rand.Next(-80, 81); float num1072 = Main.player[npc.target].position.Y + (float)Main.player[npc.target].height * 0.5f - vector119.Y + (float)Main.rand.Next(-40, 41); float num1073 = (float)Math.Sqrt((double)(num1071 * num1071 + num1072 * num1072)); + num1073 = projectileSpeed / num1073; num1071 *= num1073; num1072 *= num1073; + if (NPC.CountNPCS(mod.NPCType("PlagueHomingMissile")) < (aboveGroundEnrage ? 8 : 5)) { int num1062 = NPC.NewNPC((int)vector119.X, (int)vector119.Y, mod.NPCType("PlagueHomingMissile"), 0, 0f, 0f, 0f, 0f, 255); @@ -649,109 +563,67 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath } } } - if (num1060 > 800f || !Collision.CanHit(new Vector2(vector119.X, vector119.Y - 30f), 1, 1, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height)) - { - float num1063 = 14f; //changed from 14 not a prob - float num1064 = 0.2f; //changed from 0.1 not a prob - float num10642 = 0.07f; - vector120 = vector119; - num1058 = Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2) - vector120.X; - num1059 = Main.player[npc.target].position.Y + (float)(Main.player[npc.target].height / 2) - vector120.Y; - num1060 = (float)Math.Sqrt((double)(num1058 * num1058 + num1059 * num1059)); - num1060 = num1063 / num1060; - if (npc.velocity.X < num1058) - { - npc.velocity.X = npc.velocity.X + num1064; - if (npc.velocity.X < 0f && num1058 > 0f) - { - npc.velocity.X = npc.velocity.X + num1064; - } - } - else if (npc.velocity.X > num1058) - { - npc.velocity.X = npc.velocity.X - num1064; - if (npc.velocity.X > 0f && num1058 < 0f) - { - npc.velocity.X = npc.velocity.X - num1064; - } - } - if (npc.velocity.Y < num1059) - { - npc.velocity.Y = npc.velocity.Y + num10642; - if (npc.velocity.Y < 0f && num1059 > 0f) - { - npc.velocity.Y = npc.velocity.Y + num10642; - } - } - else if (npc.velocity.Y > num1059) - { - npc.velocity.Y = npc.velocity.Y - num10642; - if (npc.velocity.Y > 0f && num1059 < 0f) - { - npc.velocity.Y = npc.velocity.Y - num10642; - } - } - } + + // Move closer if too far away + if (num1060 > 600f) + Movement(100f, 350f, 450f); else - { npc.velocity *= 0.9f; - } + float playerLocation = npc.Center.X - Main.player[npc.target].Center.X; npc.direction = (playerLocation < 0 ? 1 : -1); npc.spriteDirection = npc.direction; - if (npc.ai[2] > 3f) + + if (npc.ai[2] > 2f) { npc.ai[0] = -1f; npc.ai[1] = 1f; npc.netUpdate = true; } } + + // Stinger phase else if (npc.ai[0] == 3f) { - 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 vector121 = new Vector2(npc.position.X + (float)(npc.width / 2) + (float)(80 * npc.direction), npc.position.Y + (float)npc.height * 1.2f); + npc.ai[1] += 1f; bool flag104 = false; if (npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) { if (npc.ai[1] % 10f == 9f) - { flag104 = true; - } } else if ((double)npc.life < (double)npc.lifeMax * 0.1 || CalamityWorld.death || CalamityWorld.bossRushActive || aboveGroundEnrage) { if (npc.ai[1] % 20f == 19f) - { flag104 = true; - } } else if ((double)npc.life < (double)npc.lifeMax * 0.5) { if (npc.ai[1] % 25f == 24f) - { flag104 = true; - } } else if (npc.ai[1] % 30f == 29f) - { flag104 = true; - } - if (flag104 && npc.position.Y + (float)npc.height < Main.player[npc.target].position.Y && Collision.CanHit(vector121, 1, 1, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height)) + + if (flag104 && npc.position.Y + (float)npc.height < Main.player[npc.target].position.Y) { Main.PlaySound(2, (int)npc.position.X, (int)npc.position.Y, 42); + if (Main.netMode != 1) { float projectileSpeed = revenge ? 6.5f : 6f; if (jungleEnrage || npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) - { projectileSpeed += 10f; - } - float num1071 = Main.player[npc.target].position.X + (float)Main.player[npc.target].width * 0.5f - vector121.X + (float)Main.rand.Next(-80, 81); - float num1072 = Main.player[npc.target].position.Y + (float)Main.player[npc.target].height * 0.5f - vector121.Y + (float)Main.rand.Next(-40, 41); + + float num1071 = Main.player[npc.target].position.X + (float)Main.player[npc.target].width * 0.5f - vector121.X; + float num1072 = Main.player[npc.target].position.Y + (float)Main.player[npc.target].height * 0.5f - vector121.Y; float num1073 = (float)Math.Sqrt((double)(num1071 * num1071 + num1072 * num1072)); num1073 = projectileSpeed / num1073; num1071 *= num1073; num1072 *= num1073; + int num1074 = 40; //projectile damage int num1075 = (Main.rand.Next(2) == 0 ? mod.ProjectileType("PlagueStingerGoliath") : mod.ProjectileType("PlagueStingerGoliathV2")); if (expertMode) @@ -759,6 +631,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath 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) { num1074 += 8; //144 to 168 @@ -773,60 +646,16 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath num1075 = mod.ProjectileType("HiveBombGoliath"); } } - Projectile.NewProjectile(vector121.X, vector121.Y, num1071, num1072, num1075, num1074, 0f, Main.myPlayer, -1f, 0f); - } - } - if (npc.position.Y > Main.player[npc.target].position.Y - 200f) //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 < Main.player[npc.target].position.Y - 500f) //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) > 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; + Projectile.NewProjectile(vector121.X, vector121.Y, num1071, num1072, num1075, num1074, 0f, Main.myPlayer, 0f, Main.player[npc.target].position.Y); } } + + Movement(100f, 400f, 500f); + 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; @@ -834,9 +663,11 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath npc.netUpdate = true; } } + + // Missile charge else if (npc.ai[0] == 4f) { - int num1043 = 2; //2 + int num1043 = 2; if (npc.ai[1] > (float)(2 * num1043) && npc.ai[1] % 2f == 0f) { MissileCountdown = 0; @@ -846,25 +677,32 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath npc.netUpdate = true; return; } + + // Charge if (npc.ai[1] % 2f == 0f) { npc.TargetClosest(true); + float playerLocation = npc.Center.X - Main.player[npc.target].Center.X; - if (Math.Abs(npc.position.Y + (float)(npc.height / 2) - (Main.player[npc.target].position.Y + (float)(Main.player[npc.target].height / 2) - 500f)) < 20f) + + if (Math.Abs(npc.position.Y + (float)(npc.height / 2) - (Main.player[npc.target].position.Y + (float)(Main.player[npc.target].height / 2) - 500f)) < 40f) { if (MissileCountdown == 1) { Main.PlaySound(2, (int)npc.position.X, (int)npc.position.Y, 116); + if (Main.netMode != 1) { int speed = revenge ? 6 : 5; - float spawnX = Main.rand.Next(1000) - 500 + npc.Center.X; + float spawnX = npc.Center.X; float spawnY = npc.Center.Y; + int damage = expertMode ? 42 : 57; + Vector2 baseSpawn = new Vector2(spawnX, spawnY); Vector2 baseVelocity = Main.player[npc.target].Center - baseSpawn; baseVelocity.Normalize(); baseVelocity = baseVelocity * speed; - int damage = expertMode ? 42 : 57; + for (int i = 0; i < MissileProjectiles; i++) { Vector2 spawn = baseSpawn; @@ -876,94 +714,90 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath } } } + charging = true; + npc.ai[1] += 1f; npc.ai[2] = 0f; + float num1044 = revenge ? 28f : 26f; //16 Vector2 vector117 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); float num1045 = Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2) - vector117.X; float num1046 = (Main.player[npc.target].position.Y - 500f) + (float)(Main.player[npc.target].height / 2) - vector117.Y; float num1047 = (float)Math.Sqrt((double)(num1045 * num1045 + num1046 * num1046)); + num1047 = num1044 / num1047; npc.velocity.X = num1045 * num1047; npc.velocity.Y = num1046 * num1047; + npc.direction = (playerLocation < 0 ? 1 : -1); npc.spriteDirection = npc.direction; return; } + charging = false; - float num1048 = 12f; //12 not a prob - float num1049 = 0.15f; //0.15 not a prob + + float num1048 = revenge ? 16f : 14f; + float num1049 = revenge ? 0.2f : 0.18f; + if (npc.position.Y + (float)(npc.height / 2) < (Main.player[npc.target].position.Y + (float)(Main.player[npc.target].height / 2) - 500f)) - { npc.velocity.Y = npc.velocity.Y + num1049; - } else - { npc.velocity.Y = npc.velocity.Y - num1049; - } - if (npc.velocity.Y < -12f) - { + + if (npc.velocity.Y < -num1048) npc.velocity.Y = -num1048; - } - if (npc.velocity.Y > 12f) - { + if (npc.velocity.Y > num1048) npc.velocity.Y = num1048; - } + if (Math.Abs(npc.position.X + (float)(npc.width / 2) - (Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2))) > 600f) - { npc.velocity.X = npc.velocity.X + 0.15f * (float)npc.direction; - } else if (Math.Abs(npc.position.X + (float)(npc.width / 2) - (Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2))) < 300f) - { npc.velocity.X = npc.velocity.X - 0.15f * (float)npc.direction; - } else - { npc.velocity.X = npc.velocity.X * 0.8f; - } - if (npc.velocity.X < -16f) - { - npc.velocity.X = -16f; - } - if (npc.velocity.X > 16f) - { - npc.velocity.X = 16f; - } + + if (npc.velocity.X < -20f) + npc.velocity.X = -20f; + if (npc.velocity.X > 20f) + npc.velocity.X = 20f; + npc.direction = (playerLocation < 0 ? 1 : -1); npc.spriteDirection = npc.direction; } + + // Slow down after charge else { if (npc.velocity.X < 0f) - { npc.direction = -1; - } else - { npc.direction = 1; - } + npc.spriteDirection = npc.direction; - int num1050 = 600; //600 not a prob + + int num1050 = 600; int num1051 = 1; + if (npc.position.X + (float)(npc.width / 2) < Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2)) - { num1051 = -1; - } if (npc.direction == num1051 && Math.Abs(npc.position.X + (float)(npc.width / 2) - (Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2))) > (float)num1050) - { npc.ai[2] = 1f; - } + if (npc.ai[2] != 1f) { charging = true; return; } + npc.TargetClosest(true); + npc.spriteDirection = npc.direction; + charging = false; + npc.velocity *= 0.9f; - float num1052 = revenge ? 0.13f : 0.115f; //0.1 + float num1052 = revenge ? 0.12f : 0.1f; //0.1 if (npc.life < npc.lifeMax / 2) { npc.velocity *= 0.9f; @@ -979,6 +813,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath npc.velocity *= 0.9f; num1052 += 0.05f; //0.05 } + if (Math.Abs(npc.velocity.X) + Math.Abs(npc.velocity.Y) < num1052) { npc.ai[2] = 0f; @@ -988,6 +823,42 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath } } + private void Movement(float xPos, float yPos, float yPos2) + { + if (npc.position.Y > Main.player[npc.target].position.Y - yPos) + { + 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 > 4f) + npc.velocity.Y = 4f; + } + else if (npc.position.Y < Main.player[npc.target].position.Y - yPos2) + { + 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 < -4f) + npc.velocity.Y = -4f; + } + if (npc.position.X + (float)(npc.width / 2) > Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2) + xPos) + { + 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) - xPos) + { + 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; + } + } + public override bool CheckActive() { return canDespawn; @@ -1122,7 +993,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath DropHelper.DropBags(npc); DropHelper.DropItemChance(npc, mod.ItemType("PlaguebringerGoliathTrophy"), 10); - DropHelper.DropItemCondition(npc, mod.ItemType("Knowledge32"), true, !CalamityWorld.downedPlaguebringer); + DropHelper.DropItemCondition(npc, mod.ItemType("KnowledgePlaguebringerGoliath"), true, !CalamityWorld.downedPlaguebringer); DropHelper.DropResidentEvilAmmo(npc, CalamityWorld.downedPlaguebringer, 4, 2, 1); // All other drops are contained in the bag, so they only drop directly on Normal diff --git a/NPCs/PlaguebringerShade/PlaguebringerShade.cs b/NPCs/PlaguebringerShade/PlaguebringerShade.cs index fe681a8f4e..d2d783429d 100644 --- a/NPCs/PlaguebringerShade/PlaguebringerShade.cs +++ b/NPCs/PlaguebringerShade/PlaguebringerShade.cs @@ -330,7 +330,7 @@ namespace CalamityMod.NPCs.PlaguebringerShade { npc.localAI[0] = 0f; npc.TargetClosest(true); - Vector2 vector119 = 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 vector119 = new Vector2(npc.position.X + (float)(npc.width / 2) + (float)(40 * npc.direction), npc.position.Y + (float)npc.height * 0.8f); Vector2 vector120 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); float num1058 = Main.player[npc.target].position.X + (float)(Main.player[npc.target].width / 2) - vector120.X; float num1059 = Main.player[npc.target].position.Y + (float)(Main.player[npc.target].height / 2) - vector120.Y; @@ -432,7 +432,7 @@ namespace CalamityMod.NPCs.PlaguebringerShade num1066 = 0.09f; num1065 = 8f; } - 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 vector121 = new Vector2(npc.position.X + (float)(npc.width / 2) + (float)(40 * 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) - 300f - vector122.Y; @@ -453,8 +453,8 @@ namespace CalamityMod.NPCs.PlaguebringerShade { num1070 += 2f; } - float num1071 = Main.player[npc.target].position.X + (float)Main.player[npc.target].width * 0.5f - vector121.X + (float)Main.rand.Next(-80, 81); - float num1072 = Main.player[npc.target].position.Y + (float)Main.player[npc.target].height * 0.5f - vector121.Y + (float)Main.rand.Next(-40, 41); + float num1071 = Main.player[npc.target].position.X + (float)Main.player[npc.target].width * 0.5f - vector121.X; + float num1072 = Main.player[npc.target].position.Y + (float)Main.player[npc.target].height * 0.5f - vector121.Y; float num1073 = (float)Math.Sqrt((double)(num1071 * num1071 + num1072 * num1072)); num1073 = num1070 / num1073; num1071 *= num1073; @@ -466,8 +466,7 @@ namespace CalamityMod.NPCs.PlaguebringerShade num1074 = 25; num1075 = mod.ProjectileType("HiveBombGoliath"); } - int num1076 = Projectile.NewProjectile(vector121.X, vector121.Y, num1071, num1072, num1075, num1074, 0f, Main.myPlayer, 0f, 0f); - Main.projectile[num1076].timeLeft = 300; + 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, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height)) diff --git a/NPCs/Polterghast/Polterghast.cs b/NPCs/Polterghast/Polterghast.cs index 0ba856ed5c..ff38690a5c 100644 --- a/NPCs/Polterghast/Polterghast.cs +++ b/NPCs/Polterghast/Polterghast.cs @@ -6,6 +6,7 @@ using Terraria.Localization; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.Utilities; namespace CalamityMod.NPCs.Polterghast { @@ -638,7 +639,7 @@ namespace CalamityMod.NPCs.Polterghast DropHelper.DropBags(npc); DropHelper.DropItemChance(npc, mod.ItemType("PolterghastTrophy"), 10); - DropHelper.DropItemCondition(npc, mod.ItemType("Knowledge41"), true, !CalamityWorld.downedPolterghast); + DropHelper.DropItemCondition(npc, mod.ItemType("KnowledgePolterghast"), true, !CalamityWorld.downedPolterghast); DropHelper.DropResidentEvilAmmo(npc, CalamityWorld.downedPolterghast, 6, 3, 2); // All other drops are contained in the bag, so they only drop directly on Normal diff --git a/NPCs/ProfanedGuardianBoss/ProfanedGuardianBoss.cs b/NPCs/ProfanedGuardianBoss/ProfanedGuardianBoss.cs index 73c72ad17c..976fbbad7f 100644 --- a/NPCs/ProfanedGuardianBoss/ProfanedGuardianBoss.cs +++ b/NPCs/ProfanedGuardianBoss/ProfanedGuardianBoss.cs @@ -6,6 +6,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.Utilities; namespace CalamityMod.NPCs.ProfanedGuardianBoss { @@ -429,7 +430,7 @@ namespace CalamityMod.NPCs.ProfanedGuardianBoss { // Profaned Guardians have no actual drops and no treasure bag DropHelper.DropItem(npc, mod.ItemType("ProfanedCore")); - DropHelper.DropItemCondition(npc, mod.ItemType("Knowledge38"), true, !CalamityWorld.downedGuardians); + DropHelper.DropItemCondition(npc, mod.ItemType("KnowledgeProfanedGuardians"), true, !CalamityWorld.downedGuardians); DropHelper.DropResidentEvilAmmo(npc, CalamityWorld.downedGuardians, 5, 2, 1); // Mark the Profaned Guardians as dead diff --git a/NPCs/Providence/Providence.cs b/NPCs/Providence/Providence.cs index ffa3c87582..903ba34247 100644 --- a/NPCs/Providence/Providence.cs +++ b/NPCs/Providence/Providence.cs @@ -7,6 +7,7 @@ using Terraria.Localization; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.Utilities; namespace CalamityMod.NPCs.Providence { @@ -113,27 +114,50 @@ namespace CalamityMod.NPCs.Providence public override void AI() { - npc.rotation = npc.velocity.X * 0.004f; + CalamityGlobalNPC calamityGlobalNPC = npc.GetGlobalNPC(mod); + + // whoAmI variable for Guardians and other things CalamityGlobalNPC.holyBoss = npc.whoAmI; + // Rotation + npc.rotation = npc.velocity.X * 0.004f; + + // Target variable and boss center Player player = Main.player[npc.target]; Vector2 vector = npc.Center; + + // Difficulty bools bool revenge = (CalamityWorld.revenge || CalamityWorld.bossRushActive); bool expertMode = (Main.expertMode || CalamityWorld.bossRushActive); + + // Target's current biome bool isHoly = player.ZoneHoly; bool isHell = player.ZoneUnderworldHeight; + + // Fire projectiles at normal rate or not bool normalAttackRate = true; - bool ignoreGuardianAmt = (double)npc.life < (double)npc.lifeMax * 0.15; - bool phase2 = (double)npc.life < (double)npc.lifeMax * 0.75; - bool phase3 = (double)npc.life < (double)npc.lifeMax * 0.5; + + // Percent life remaining + float lifeRatio = (float)npc.life / (float)npc.lifeMax; + + // Phases + bool ignoreGuardianAmt = lifeRatio < 0.15f; + bool phase2 = lifeRatio < 0.75f; + + // Projectile fire rate multiplier double attackRateMult = 1.0; + // Distance X needed from target in order to fire holy or molten blasts + float distanceNeededToShoot = revenge ? 360f : 420f; + + // Inflict Holy Inferno if target is too far away if (Vector2.Distance(player.Center, vector) > 2800f) { if (!player.dead && player.active) player.AddBuff(mod.BuffType("HolyInferno"), 2); } + // Count the remaining Guardians, healer especially because it allows the boss to heal int guardianAmt = 0; bool healerAlive = false; if (CalamityGlobalNPC.holyBossAttacker != -1) @@ -155,6 +179,7 @@ namespace CalamityMod.NPCs.Providence } } + // Change projectile fire rate depending on Guardian amount if (guardianAmt > 0) { normalAttackRate = ignoreGuardianAmt; @@ -177,19 +202,23 @@ namespace CalamityMod.NPCs.Providence } } + // Whether the boss can be homed in on or healed off of npc.chaseable = normalAttackRate && npc.ai[0] != 2f && npc.ai[0] != 5f && npc.ai[0] != 7f; npc.canGhostHeal = npc.chaseable; + // Prevent lag by stopping rain CalamityMod.StopRain(); + // Set target biome type if (biomeType == 0) { if (isHoly) biomeType = 1; - else + else if (isHell) biomeType = 2; } + // Become immune over time if target isn't in hell or hallow if (!isHoly && !isHell && !CalamityWorld.bossRushActive) { if (immuneTimer > 0) @@ -198,8 +227,10 @@ namespace CalamityMod.NPCs.Providence else immuneTimer = 300; + // Take damage or not npc.dontTakeDamage = (immuneTimer <= 0); + // Heal if (healerAlive) { float heal = revenge ? 90f : 120f; @@ -240,6 +271,7 @@ namespace CalamityMod.NPCs.Providence } } + // Despawn if ((!Main.dayTime && npc.ai[0] != 2f && npc.ai[0] != 5f && npc.ai[0] != 7f) || player.dead) { if (npc.timeLeft > 10) @@ -255,9 +287,9 @@ namespace CalamityMod.NPCs.Providence else if (npc.timeLeft < 3600) npc.timeLeft = 3600; + // Guardian spawn if (bossLife == 0f && npc.life > 0) bossLife = (float)npc.lifeMax; - if (npc.life > 0) { if (Main.netMode != 1) @@ -275,61 +307,76 @@ namespace CalamityMod.NPCs.Providence } } + // Movement if (npc.ai[0] != 2f && npc.ai[0] != 5f) { + // Firing holy ray or not bool firingLaser = npc.ai[0] == 7f; + // Change X direction of movement if (flightPath == 0) { npc.TargetClosest(true); if (vector.X < player.Center.X) + { flightPath = 1; + calamityGlobalNPC.newAI[0] = 0f; + } else + { flightPath = -1; + calamityGlobalNPC.newAI[0] = 0f; + } } + // Get a target npc.TargetClosest(true); - float num851 = 800f; - float num852 = Math.Abs(vector.X - player.Center.X); + // Increase speed over time if flying in same direction for too long + if (revenge) + calamityGlobalNPC.newAI[0] += 1f; + + // Distance needed from target to change direction + float num851 = 800f; + + // Increase distance from target when firing molten blasts or holy bombs + bool stayAwayFromTarget = npc.ai[0] == 3f || npc.ai[0] == 4f; + if (stayAwayFromTarget) + num851 += (revenge ? 200f : 100f); + + // Change X movement path if far enough away from target + float num852 = Math.Abs(vector.X - player.Center.X); if (vector.X < player.Center.X && flightPath < 0 && num852 > num851) flightPath = 0; if (vector.X > player.Center.X && flightPath > 0 && num852 > num851) flightPath = 0; - float num853 = expertMode ? 1.1f : 1.05f; - float num854 = expertMode ? 16f : 15f; - if ((double)npc.life < (double)npc.lifeMax * 0.75) + // Velocity and acceleration + bool increaseSpeed = calamityGlobalNPC.newAI[0] > 180f; + float acceleration = (expertMode ? 1.1f : 1.05f) + (0.2f * (1f - lifeRatio)); + float velocity = (expertMode ? 16f : 15f) + (4f * (1f - lifeRatio)); + if (CalamityWorld.bossRushActive) { - num853 = expertMode ? 1.15f : 1.1f; - num854 = expertMode ? 17f : 16f; - } - if ((double)npc.life < (double)npc.lifeMax * 0.5) - { - num853 = expertMode ? 1.2f : 1.15f; - num854 = expertMode ? 18f : 17f; - } - if ((double)npc.life < (double)npc.lifeMax * 0.25) - { - num853 = expertMode ? 1.25f : 1.2f; - num854 = expertMode ? 19f : 18f; - } - if ((double)npc.life < (double)npc.lifeMax * 0.1 || CalamityWorld.bossRushActive) - { - num853 = expertMode ? 1.3f : 1.25f; - num854 = expertMode ? 20f : 19f; + acceleration = 1.3f; + velocity = 20f; } if (firingLaser) { - num854 *= normalAttackRate ? 0.5f : 0.25f; - num853 *= normalAttackRate ? 0.5f : 0.25f; + acceleration *= normalAttackRate ? 0.4f : 0.2f; + velocity *= normalAttackRate ? 0.4f : 0.2f; + } + else if (increaseSpeed) + { + velocity += (calamityGlobalNPC.newAI[0] - 180f) * 0.04f; + if (velocity > 30f) + velocity = 30f; } - npc.velocity.X = npc.velocity.X + (float)flightPath * num853; - if (npc.velocity.X > num854) - npc.velocity.X = num854; - if (npc.velocity.X < -num854) - npc.velocity.X = -num854; + npc.velocity.X = npc.velocity.X + (float)flightPath * acceleration; + if (npc.velocity.X > velocity) + npc.velocity.X = velocity; + if (npc.velocity.X < -velocity) + npc.velocity.X = -velocity; float num855 = player.position.Y - (npc.position.Y + (float)npc.height); if (num855 < (firingLaser ? 150f : 200f)) // 150 @@ -337,13 +384,14 @@ namespace CalamityMod.NPCs.Providence if (num855 > (firingLaser ? 200f : 250f)) // 200 npc.velocity.Y = npc.velocity.Y + 0.2f; - float speedVariance = normalAttackRate ? 3f : 1.5f; + float speedVariance = normalAttackRate ? 2f : 1f; if (npc.velocity.Y > (firingLaser ? speedVariance : 6f)) npc.velocity.Y = firingLaser ? speedVariance : 6f; if (npc.velocity.Y < (firingLaser ? -speedVariance : -6f)) npc.velocity.Y = firingLaser ? -speedVariance : -6f; } + // Phase switch if (npc.ai[0] == -1f) { npc.noGravity = true; @@ -355,6 +403,11 @@ namespace CalamityMod.NPCs.Providence int phase = 0; // 0 = blasts 1 = holy fire 2 = shell heal 3 = molten blobs 4 = holy bombs 5 = shell spears 6 = crystal 7 = laser + // Holy ray in hallow, Crystal in hell + bool useLaser = (phase2 && biomeType == 1) || CalamityWorld.bossRushActive; + bool useCrystal = (phase2 && biomeType == 2) || CalamityWorld.bossRushActive; + + // Unique pattern for Death Mode and Boss Rush if (CalamityWorld.death || CalamityWorld.bossRushActive) { switch (phaseChange) @@ -362,14 +415,14 @@ namespace CalamityMod.NPCs.Providence case 0: phase = 4; break; // 1575 or 1500 case 1: phase = 5; break; // 1875 or 1800 case 2: phase = 0; break; // 2175 or 2100 - case 3: phase = phase2 ? 6 : 1; break; + case 3: phase = useCrystal ? 6 : 1; break; case 4: phase = 2; break; // 600 case 5: phase = 4; break; // 900 case 6: phase = 1; break; // 1200 case 7: phase = 5; break; // 1500 case 8: - phase = phase3 ? 7 : 3; // 1875 or 1800 - if (phase3) + phase = useLaser ? 7 : 3; // 1875 or 1800 + if (useLaser) { npc.TargetClosest(false); Vector2 v3 = player.Center - vector - new Vector2(0f, -22f); @@ -386,11 +439,11 @@ namespace CalamityMod.NPCs.Providence } break; case 9: phase = 3; break; // 2175 or 2100 - case 10: phase = phase2 ? 6 : 2; break; + case 10: phase = useCrystal ? 6 : 2; break; case 11: phase = 4; break; // 300 case 12: - phase = phase3 ? 7 : 4; // 675 or 600 - if (phase3) + phase = useLaser ? 7 : 4; // 675 or 600 + if (useLaser) { npc.TargetClosest(false); Vector2 v3 = player.Center - vector - new Vector2(0f, -22f); @@ -417,8 +470,8 @@ namespace CalamityMod.NPCs.Providence { case 0: phase = 0; break; // 3375 or 3300 case 1: - phase = phase3 ? 7 : 1; // 3750 or 3600 - if (phase3) + phase = useLaser ? 7 : 1; // 3750 or 3600 + if (useLaser) { npc.TargetClosest(false); Vector2 v3 = player.Center - vector - new Vector2(0f, -22f); @@ -437,15 +490,15 @@ namespace CalamityMod.NPCs.Providence case 2: phase = 3; break; // 4050 or 3900 case 3: phase = 4; break; // 4350 or 4200 case 4: phase = 5; break; // 4650 or 4500 - case 5: phase = phase2 ? 6 : 4; break; + case 5: phase = useCrystal ? 6 : 4; break; case 6: phase = 3; break; // 300 case 7: phase = 1; break; // 600 case 8: phase = 0; break; // 900 case 9: phase = 2; break; // 1500 case 10: phase = 4; break; // 1800 case 11: - phase = phase3 ? 7 : 0; //2175 or 2100 - if (phase3) + phase = useLaser ? 7 : 0; //2175 or 2100 + if (useLaser) { npc.TargetClosest(false); Vector2 v3 = player.Center - vector - new Vector2(0f, -22f); @@ -468,29 +521,35 @@ namespace CalamityMod.NPCs.Providence } } + // Pick a target npc.TargetClosest(true); + + // If too far from target, set phase to 0 if (Math.Abs(vector.X - player.Center.X) > 5600f) phase = 0; + // Reset arrays npc.ai[0] = (float)phase; npc.ai[1] = 0f; npc.ai[2] = 0f; npc.ai[3] = 0f; } + + // Holy blasts else if (npc.ai[0] == 0f) { npc.noGravity = true; npc.noTileCollide = true; float num852 = Math.Abs(vector.X - player.Center.X); - if ((num852 < 500f || npc.ai[3] < 0f) && npc.position.Y < player.position.Y) + if (num852 > distanceNeededToShoot && npc.position.Y < player.position.Y) { npc.ai[3] += 1f; - int num856 = expertMode ? 26 : 27; - if ((double)npc.life < (double)npc.lifeMax * 0.5) - num856 = expertMode ? 24 : 25; - if ((double)npc.life < (double)npc.lifeMax * 0.1 || npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) - num856 = expertMode ? 22 : 23; + + int num856 = (expertMode ? 24 : 26) - (int)(4f * (1f - lifeRatio)); + if (npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) + num856 = 19; + num856 = (int)((double)num856 * attackRateMult); if (npc.ai[3] >= (float)num856) @@ -503,11 +562,10 @@ namespace CalamityMod.NPCs.Providence float num858 = player.Center.Y - vector.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 || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) - num860 = expertMode ? 12.75f : 11f; + float num860 = (expertMode ? 10.25f : 9f) + (2.5f * (1f - lifeRatio)); + if (npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) + num860 = 12.75f; + if (revenge) num860 *= 1.15f; @@ -529,6 +587,8 @@ namespace CalamityMod.NPCs.Providence npc.ai[0] = -1f; } } + + // Holy fire else if (npc.ai[0] == 1f) { npc.noGravity = true; @@ -538,20 +598,22 @@ namespace CalamityMod.NPCs.Providence { npc.ai[3] += 1f; - int num864 = expertMode ? 36 : 39; - if ((double)npc.life < (double)npc.lifeMax * 0.5) - num864 = expertMode ? 33 : 36; - if ((double)npc.life < (double)npc.lifeMax * 0.1 || CalamityWorld.bossRushActive) - num864 = expertMode ? 29 : 32; + int num864 = (expertMode ? 36 : 39) - (int)(8f * (1f - lifeRatio)); + if (CalamityWorld.bossRushActive) + num864 = 29; + num864 = (int)((double)num864 * attackRateMult); if (npc.ai[3] >= (float)num864) { npc.ai[3] = 0f; + Vector2 vector113 = new Vector2(vector.X, npc.position.Y + (float)npc.height - 14f); + float num865 = npc.velocity.Y; if (num865 < 0f) num865 = 0f; + num865 += expertMode ? 4f : 3f; int fireDamage = expertMode ? 40 : 59; @@ -566,10 +628,13 @@ namespace CalamityMod.NPCs.Providence npc.ai[0] = -1f; } } + + // Cocoon flames else if (npc.ai[0] == 2f) { npc.noGravity = true; npc.noTileCollide = true; + npc.TargetClosest(true); Vector2 vector114 = new Vector2(vector.X, vector.Y + 20f); @@ -577,6 +642,7 @@ namespace CalamityMod.NPCs.Providence 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; @@ -587,17 +653,16 @@ namespace CalamityMod.NPCs.Providence npc.ai[3] += 1f; - int num870 = expertMode ? 3 : 4; + int num870 = (expertMode ? 3 : 4) - (int)(4f * (1f - lifeRatio)); num870 = (int)((double)num870 * attackRateMult); - 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 (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) @@ -607,6 +672,7 @@ namespace CalamityMod.NPCs.Providence } } + // Air is burning text npc.ai[1] += 1f; if (npc.ai[1] >= 450f && !text) { @@ -620,12 +686,15 @@ namespace CalamityMod.NPCs.Providence NetMessage.BroadcastChatMessage(NetworkText.FromKey(key), messageColor); } + // Inflict Icarus Folly 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) + bool inLiquid = (player2.wet || player2.honeyWet) && !player2.lavaWet; + + if (!player2.dead && player2.active && Vector2.Distance(player2.Center, vector) < 2800f && !inLiquid) { Main.PlaySound(SoundID.Item20, player2.position); player2.AddBuff(mod.BuffType("ExtremeGravity"), 3000, true); @@ -659,21 +728,22 @@ namespace CalamityMod.NPCs.Providence npc.ai[0] = -1f; } } + + // Molten blasts else if (npc.ai[0] == 3f) { npc.noGravity = true; npc.noTileCollide = true; float num852 = Math.Abs(vector.X - player.Center.X); - if ((num852 < 500f || npc.ai[3] < 0f) && npc.position.Y < player.position.Y) + if (num852 > distanceNeededToShoot && npc.position.Y < player.position.Y) { npc.ai[3] += 1f; - int num856 = expertMode ? 16 : 18; - if ((double)npc.life < (double)npc.lifeMax * 0.5) - num856 = expertMode ? 15 : 16; - if ((double)npc.life < (double)npc.lifeMax * 0.1 || CalamityWorld.bossRushActive) - num856 = expertMode ? 14 : 15; + int num856 = (expertMode ? 16 : 18) - (int)(3f * (1f - lifeRatio)); + if (CalamityWorld.bossRushActive) + num856 = 14; + num856 = (int)((double)num856 * attackRateMult); if (npc.ai[3] >= (float)num856) @@ -686,11 +756,10 @@ namespace CalamityMod.NPCs.Providence float num858 = player.Center.Y - vector.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 || CalamityWorld.bossRushActive) - num860 = expertMode ? 12.75f : 11f; + float num860 = (expertMode ? 10.25f : 9f) + (2.5f * (1f - lifeRatio)); + if (CalamityWorld.bossRushActive) + num860 = 12.75f; + if (revenge) num860 *= 1.15f; @@ -712,6 +781,8 @@ namespace CalamityMod.NPCs.Providence npc.ai[0] = -1f; } } + + // Holy bombs else if (npc.ai[0] == 4f) { npc.noGravity = true; @@ -721,21 +792,22 @@ namespace CalamityMod.NPCs.Providence { npc.ai[3] += 1f; - int num864 = expertMode ? 73 : 77; - if ((double)npc.life < (double)npc.lifeMax * 0.5) - num864 = expertMode ? 67 : 73; - if ((double)npc.life < (double)npc.lifeMax * 0.1 || npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) - num864 = expertMode ? 59 : 67; + int num864 = (expertMode ? 73 : 77) - (int)(15f * (1f - lifeRatio)); + if (npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) + num864 = 59; + num864 = (int)((double)num864 * attackRateMult); if (npc.ai[3] >= (float)num864) { npc.ai[3] = 0f; + Vector2 vector113 = new Vector2(vector.X, npc.position.Y + (float)npc.height - 14f); float num865 = npc.velocity.Y; if (num865 < 0f) num865 = 0f; + num865 += expertMode ? 4f : 3f; int fireDamage = expertMode ? 44 : 60; //260 100 @@ -750,25 +822,29 @@ namespace CalamityMod.NPCs.Providence npc.ai[0] = -1f; } } + + // Cocoon spears else if (npc.ai[0] == 5f) { npc.noGravity = true; npc.noTileCollide = true; + npc.TargetClosest(true); + npc.velocity *= 0.95f; if (Main.netMode != 1) { - npc.ai[2] += ((npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) ? 2f : 1f); - if ((double)npc.life < (double)npc.lifeMax * 0.5 || CalamityWorld.bossRushActive) - npc.ai[2] += 1f; - if ((double)npc.life < (double)npc.lifeMax * 0.1 || CalamityWorld.bossRushActive) + npc.ai[2] += ((npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) ? 2f : 1f) + (2f * (1f - lifeRatio)); + + if (CalamityWorld.bossRushActive) npc.ai[2] += 1f; double count = 24D * attackRateMult; if (npc.ai[2] >= (float)count) { npc.ai[2] = 0f; + Vector2 vector93 = new Vector2(vector.X, vector.Y); float num742 = expertMode ? 12f : 10f; float num743 = player.position.X + (float)player.width * 0.5f - vector93.X; @@ -795,11 +871,15 @@ namespace CalamityMod.NPCs.Providence npc.ai[0] = -1f; } } + + // Crystal else if (npc.ai[0] == 6f) { npc.noGravity = true; npc.noTileCollide = true; + npc.TargetClosest(true); + npc.velocity *= 0.95f; if (Main.netMode != 1) @@ -813,27 +893,31 @@ namespace CalamityMod.NPCs.Providence } } } + + // Holy ray else if (npc.ai[0] == 7f) { npc.noGravity = true; npc.noTileCollide = true; Vector2 value19 = new Vector2(27f, 59f); + + float rotation = 450f + (float)(guardianAmt * 18); + npc.ai[2] += 1f; - if (npc.ai[2] < 180f) + if (npc.ai[2] < 120f) { - npc.localAI[1] -= 0.05f; + npc.localAI[1] -= 0.07f; if (npc.localAI[1] < 0f) npc.localAI[1] = 0f; - if (npc.ai[2] >= 60f) + if (npc.ai[2] >= 40f) { int num1220 = 0; - if (npc.ai[2] >= 120f) + if (npc.ai[2] >= 80f) num1220 = 1; - int num; - for (int num1221 = 0; num1221 < 1 + num1220; num1221 = num + 1) + for (int num1221 = 0; num1221 < 1 + num1220; num1221++) { int num1222 = 244; float num1223 = 1.2f; @@ -845,13 +929,12 @@ namespace CalamityMod.NPCs.Providence Main.dust[num1224].velocity = Vector2.Normalize(vector - vector199) * 3.5f * (10f - (float)num1220 * 2f) / 10f; Main.dust[num1224].noGravity = true; Main.dust[num1224].scale = num1223; - num = num1221; } } } - else if (npc.ai[2] < 360f) + else if (npc.ai[2] < (revenge ? 220f : 300f)) { - if (npc.ai[2] == 180f) + if (npc.ai[2] == 120f) { if (Main.player[Main.myPlayer].active && !Main.player[Main.myPlayer].dead && Vector2.Distance(Main.player[Main.myPlayer].Center, vector) < 2800f) Main.PlaySound(29, (int)Main.player[Main.myPlayer].position.X, (int)Main.player[Main.myPlayer].position.Y, 104, 1f, 0f); @@ -859,15 +942,21 @@ namespace CalamityMod.NPCs.Providence if (Main.netMode != 1) { npc.TargetClosest(false); + Vector2 vector200 = player.Center - vector; vector200.Normalize(); + float num1225 = -1f; if (vector200.X < 0f) num1225 = 1f; vector200 = vector200.RotatedBy((double)(-(double)num1225 * 6.28318548f / 6f), default(Vector2)); - Projectile.NewProjectile(vector.X, vector.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 + Projectile.NewProjectile(vector.X, vector.Y - 32f, vector200.X, vector200.Y, mod.ProjectileType("ProvidenceHolyRay"), 100, 0f, Main.myPlayer, num1225 * 6.28318548f / rotation, (float)npc.whoAmI); + + if (revenge) + Projectile.NewProjectile(vector.X, vector.Y - 32f, -vector200.X, -vector200.Y, mod.ProjectileType("ProvidenceHolyRay"), 100, 0f, Main.myPlayer, -num1225 * 6.28318548f / rotation, (float)npc.whoAmI); + + npc.ai[3] = (vector200.ToRotation() + 9.424778f) * num1225; npc.netUpdate = true; } } @@ -881,12 +970,13 @@ namespace CalamityMod.NPCs.Providence if (num1227 < 0f) num1227 *= -1f; num1227 += -9.424778f; - num1227 += num1226 * 6.28318548f / 540f; + num1227 += num1226 * 6.28318548f / rotation; + npc.localAI[0] = num1227; } else { - npc.localAI[1] -= 0.07f; // 0.15f + npc.localAI[1] -= 0.07f; if (npc.localAI[1] < 0f) npc.localAI[1] = 0f; } @@ -894,7 +984,7 @@ namespace CalamityMod.NPCs.Providence if (Main.netMode != 1) { npc.ai[1] += 1f; - if (npc.ai[1] >= 375f) + if (npc.ai[1] >= (revenge ? 235f : 315f)) npc.ai[0] = -1f; } } @@ -909,7 +999,7 @@ namespace CalamityMod.NPCs.Providence { DropHelper.DropBags(npc); DropHelper.DropItemChance(npc, mod.ItemType("ProvidenceTrophy"), 10); - DropHelper.DropItemCondition(npc, mod.ItemType("Knowledge39"), true, !CalamityWorld.downedProvidence); + DropHelper.DropItemCondition(npc, mod.ItemType("KnowledgeProvidence"), true, !CalamityWorld.downedProvidence); DropHelper.DropResidentEvilAmmo(npc, CalamityWorld.downedProvidence, 5, 2, 1); DropHelper.DropItemCondition(npc, mod.ItemType("ElysianWings"), biomeType != 2); diff --git a/NPCs/Scavenger/ScavengerBody.cs b/NPCs/Scavenger/ScavengerBody.cs index 742cc9aa92..e4ebf0a3db 100644 --- a/NPCs/Scavenger/ScavengerBody.cs +++ b/NPCs/Scavenger/ScavengerBody.cs @@ -6,6 +6,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.Utilities; namespace CalamityMod.NPCs.Scavenger { @@ -97,9 +98,15 @@ namespace CalamityMod.NPCs.Scavenger { bool provy = (CalamityWorld.downedProvidence && !CalamityWorld.bossRushActive); bool expertMode = (Main.expertMode || CalamityWorld.bossRushActive); + + // Percent life remaining + float lifeRatio = (float)npc.life / (float)npc.lifeMax; + Lighting.AddLight((int)(npc.position.X - 100f) / 16, (int)(npc.position.Y - 20f) / 16, 0f, 0.51f, 2f); Lighting.AddLight((int)(npc.position.X + 100f) / 16, (int)(npc.position.Y - 20f) / 16, 0f, 0.51f, 2f); + CalamityGlobalNPC.scavenger = npc.whoAmI; + if (npc.localAI[0] == 0f && Main.netMode != 1) { npc.localAI[0] = 1f; @@ -109,79 +116,69 @@ namespace CalamityMod.NPCs.Scavenger NPC.NewNPC((int)npc.Center.X + 120, (int)npc.Center.Y + 50, mod.NPCType("ScavengerClawRight"), 0, 0f, 0f, 0f, 0f, 255); NPC.NewNPC((int)npc.Center.X + 1, (int)npc.Center.Y - 20, mod.NPCType("ScavengerHead"), 0, 0f, 0f, 0f, 0f, 255); } + if (npc.target >= 0 && Main.player[npc.target].dead) { npc.TargetClosest(true); if (Main.player[npc.target].dead) - { npc.noTileCollide = true; - } } + if (npc.alpha > 0) { npc.alpha -= 10; if (npc.alpha < 0) - { npc.alpha = 0; - } + npc.ai[1] = 0f; } + bool leftLegActive = false; bool rightLegActive = false; bool headActive = false; bool rightClawActive = false; bool leftClawActive = false; + for (int num619 = 0; num619 < 200; num619++) { if (Main.npc[num619].active && Main.npc[num619].type == mod.NPCType("ScavengerHead")) - { headActive = true; - } if (Main.npc[num619].active && Main.npc[num619].type == mod.NPCType("ScavengerClawRight")) - { rightClawActive = true; - } if (Main.npc[num619].active && Main.npc[num619].type == mod.NPCType("ScavengerClawLeft")) - { leftClawActive = true; - } if (Main.npc[num619].active && Main.npc[num619].type == mod.NPCType("ScavengerLegRight")) - { rightLegActive = true; - } if (Main.npc[num619].active && Main.npc[num619].type == mod.NPCType("ScavengerLegLeft")) - { leftLegActive = true; - } } + bool enrage = false; if (Main.player[npc.target].position.Y + (float)(Main.player[npc.target].height / 2) > npc.position.Y + (float)(npc.height / 2) + 10f) - { enrage = true; - } + if (headActive || rightClawActive || leftClawActive || rightLegActive || leftLegActive) - { npc.dontTakeDamage = true; - } else { npc.dontTakeDamage = false; if (Main.netMode != 2) { if (!Main.player[Main.myPlayer].dead && Main.player[Main.myPlayer].active) - { Main.player[Main.myPlayer].AddBuff(mod.BuffType("WeakPetrification"), 2); - } } } + if (!headActive) { int rightDust = Dust.NewDust(new Vector2(npc.Center.X, npc.Center.Y - 30f), 8, 8, 5, 0f, 0f, 100, default(Color), 2.5f); Main.dust[rightDust].alpha += Main.rand.Next(100); Main.dust[rightDust].velocity *= 0.2f; + Dust rightDustExpr = Main.dust[rightDust]; rightDustExpr.velocity.Y = rightDustExpr.velocity.Y - (3f + (float)Main.rand.Next(10) * 0.1f); Main.dust[rightDust].fadeIn = 0.5f + (float)Main.rand.Next(10) * 0.1f; + if (Main.rand.Next(10) == 0) { rightDust = Dust.NewDust(new Vector2(npc.Center.X, npc.Center.Y - 30f), 8, 8, 6, 0f, 0f, 0, default(Color), 1.5f); @@ -193,6 +190,7 @@ namespace CalamityMod.NPCs.Scavenger rightDustExpr2.velocity.Y = rightDustExpr2.velocity.Y - 4f; } } + if (Main.netMode != 1) { npc.localAI[1] += (enrage ? 6f : 1f); @@ -219,14 +217,17 @@ namespace CalamityMod.NPCs.Scavenger } } } + if (!rightClawActive) { int rightDust = Dust.NewDust(new Vector2(npc.Center.X + 80f, npc.Center.Y + 45f), 8, 8, 5, 0f, 0f, 100, default(Color), 3f); Main.dust[rightDust].alpha += Main.rand.Next(100); Main.dust[rightDust].velocity *= 0.2f; + Dust rightDustExpr = Main.dust[rightDust]; rightDustExpr.velocity.X = rightDustExpr.velocity.X + (3f + (float)Main.rand.Next(10) * 0.1f); Main.dust[rightDust].fadeIn = 0.5f + (float)Main.rand.Next(10) * 0.1f; + if (Main.rand.Next(10) == 0) { rightDust = Dust.NewDust(new Vector2(npc.Center.X + 80f, npc.Center.Y + 45f), 8, 8, 6, 0f, 0f, 0, default(Color), 2f); @@ -238,6 +239,7 @@ namespace CalamityMod.NPCs.Scavenger rightDustExpr2.velocity.X = rightDustExpr2.velocity.X + 4f; } } + if (Main.netMode != 1) { npc.localAI[2] += (enrage ? 2f : 1f); @@ -251,14 +253,17 @@ namespace CalamityMod.NPCs.Scavenger } } } + if (!leftClawActive) { int leftDust = Dust.NewDust(new Vector2(npc.Center.X - 80f, npc.Center.Y + 45f), 8, 8, 5, 0f, 0f, 100, default(Color), 3f); Main.dust[leftDust].alpha += Main.rand.Next(100); Main.dust[leftDust].velocity *= 0.2f; + Dust leftDustExpr = Main.dust[leftDust]; leftDustExpr.velocity.X = leftDustExpr.velocity.X - (3f + (float)Main.rand.Next(10) * 0.1f); Main.dust[leftDust].fadeIn = 0.5f + (float)Main.rand.Next(10) * 0.1f; + if (Main.rand.Next(10) == 0) { leftDust = Dust.NewDust(new Vector2(npc.Center.X - 80f, npc.Center.Y + 45f), 8, 8, 6, 0f, 0f, 0, default(Color), 2f); @@ -270,6 +275,7 @@ namespace CalamityMod.NPCs.Scavenger leftDustExpr2.velocity.X = leftDustExpr2.velocity.X - 4f; } } + if (Main.netMode != 1) { npc.localAI[3] += (enrage ? 2f : 1f); @@ -283,14 +289,17 @@ namespace CalamityMod.NPCs.Scavenger } } } + if (!rightLegActive) { int rightDust = Dust.NewDust(new Vector2(npc.Center.X + 60f, npc.Center.Y + 60f), 8, 8, 5, 0f, 0f, 100, default(Color), 2f); Main.dust[rightDust].alpha += Main.rand.Next(100); Main.dust[rightDust].velocity *= 0.2f; + Dust rightDustExpr = Main.dust[rightDust]; rightDustExpr.velocity.Y = rightDustExpr.velocity.Y + (0.5f + (float)Main.rand.Next(10) * 0.1f); Main.dust[rightDust].fadeIn = 0.5f + (float)Main.rand.Next(10) * 0.1f; + if (Main.rand.Next(10) == 0) { rightDust = Dust.NewDust(new Vector2(npc.Center.X + 60f, npc.Center.Y + 60f), 8, 8, 6, 0f, 0f, 0, default(Color), 1.5f); @@ -302,6 +311,7 @@ namespace CalamityMod.NPCs.Scavenger rightDustExpr2.velocity.Y = rightDustExpr2.velocity.Y + 1f; } } + if (Main.netMode != 1) { npc.ai[2] += 1f; @@ -315,14 +325,17 @@ namespace CalamityMod.NPCs.Scavenger } } } + if (!leftLegActive) { int leftDust = Dust.NewDust(new Vector2(npc.Center.X - 60f, npc.Center.Y + 60f), 8, 8, 5, 0f, 0f, 100, default(Color), 2f); Main.dust[leftDust].alpha += Main.rand.Next(100); Main.dust[leftDust].velocity *= 0.2f; + Dust leftDustExpr = Main.dust[leftDust]; leftDustExpr.velocity.Y = leftDustExpr.velocity.Y + (0.5f + (float)Main.rand.Next(10) * 0.1f); Main.dust[leftDust].fadeIn = 0.5f + (float)Main.rand.Next(10) * 0.1f; + if (Main.rand.Next(10) == 0) { leftDust = Dust.NewDust(new Vector2(npc.Center.X - 60f, npc.Center.Y + 60f), 8, 8, 6, 0f, 0f, 0, default(Color), 1.5f); @@ -334,6 +347,7 @@ namespace CalamityMod.NPCs.Scavenger leftDustExpr2.velocity.Y = leftDustExpr2.velocity.Y + 1f; } } + if (Main.netMode != 1) { npc.ai[3] += 1f; @@ -347,37 +361,34 @@ namespace CalamityMod.NPCs.Scavenger } } } + if (npc.ai[0] == 0f) { npc.noTileCollide = false; + if (npc.velocity.Y == 0f) { npc.velocity.X = npc.velocity.X * 0.8f; + npc.ai[1] += 1f; if (npc.ai[1] > 0f) { if ((!rightClawActive && !leftClawActive) || npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) - { npc.ai[1] += 1f; - } if (!headActive || npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) - { npc.ai[1] += 1f; - } if ((!rightLegActive && !leftLegActive) || npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) - { npc.ai[1] += 1f; - } } + if (npc.ai[1] >= 300f) - { npc.ai[1] = -20f; - } else if (npc.ai[1] == -1f) { npc.TargetClosest(true); - int speedXMult = ((enrage || npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) ? 8 : 4); - npc.velocity.X = (float)(speedXMult * npc.direction); + + float speedX = ((enrage || npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) ? 8f : 4f) + (4f * (1f - lifeRatio)); + npc.velocity.X = speedX * (float)npc.direction; npc.velocity.Y = -15.2f; npc.ai[0] = 1f; npc.ai[1] = 0f; @@ -389,7 +400,9 @@ namespace CalamityMod.NPCs.Scavenger if (npc.velocity.Y == 0f) { Main.PlaySound(SoundID.Item14, npc.position); + npc.ai[0] = 0f; + if (Main.netMode != 1) { if (NPC.CountNPCS(mod.NPCType("RockPillar")) < 2) @@ -397,12 +410,14 @@ namespace CalamityMod.NPCs.Scavenger NPC.NewNPC((int)npc.Center.X - 360, (int)npc.Center.Y - 10, mod.NPCType("RockPillar"), 0, 0f, 0f, 0f, 0f, 255); NPC.NewNPC((int)npc.Center.X + 360, (int)npc.Center.Y - 10, mod.NPCType("RockPillar"), 0, 0f, 0f, 0f, 0f, 255); } + if (NPC.CountNPCS(mod.NPCType("FlamePillar")) < 2) { NPC.NewNPC((int)Main.player[npc.target].Center.X - 180, (int)Main.player[npc.target].Center.Y - 10, mod.NPCType("FlamePillar"), 0, 0f, 0f, 0f, 0f, 255); NPC.NewNPC((int)Main.player[npc.target].Center.X + 180, (int)Main.player[npc.target].Center.Y - 10, mod.NPCType("FlamePillar"), 0, 0f, 0f, 0f, 0f, 255); } } + for (int stompDustArea = (int)npc.position.X - 30; stompDustArea < (int)npc.position.X + npc.width + 60; stompDustArea += 30) { for (int stompDustAmount = 0; stompDustAmount < 6; stompDustAmount++) @@ -410,6 +425,7 @@ namespace CalamityMod.NPCs.Scavenger int stompDust = Dust.NewDust(new Vector2(npc.position.X - 30f, npc.position.Y + (float)npc.height), npc.width + 30, 4, 31, 0f, 0f, 100, default(Color), 1.5f); Main.dust[stompDust].velocity *= 0.2f; } + int stompGore = Gore.NewGore(new Vector2((float)(stompDustArea - 30), npc.position.Y + (float)npc.height - 12f), default(Vector2), Main.rand.Next(61, 64), 1f); Main.gore[stompGore].velocity *= 0.4f; } @@ -417,61 +433,56 @@ namespace CalamityMod.NPCs.Scavenger else { npc.TargetClosest(true); + + // Fall through + if (npc.target >= 0 && CalamityWorld.revenge && + ((Main.player[npc.target].position.Y > npc.position.Y + (float)npc.height && npc.velocity.Y > 0f) || (Main.player[npc.target].position.Y < npc.position.Y + (float)npc.height && npc.velocity.Y < 0f))) + npc.noTileCollide = true; + else if (!Main.player[npc.target].dead) + npc.noTileCollide = false; + if (npc.position.X < Main.player[npc.target].position.X && npc.position.X + (float)npc.width > Main.player[npc.target].position.X + (float)Main.player[npc.target].width) { npc.velocity.X = npc.velocity.X * 0.9f; - npc.velocity.Y = npc.velocity.Y + 0.2f; + + if (Main.player[npc.target].position.Y > npc.position.Y + (float)npc.height) + { + float fallSpeed = 0.6f + (0.6f * (1f - lifeRatio)); + npc.velocity.Y = npc.velocity.Y + fallSpeed; + } } else { if (npc.direction < 0) - { npc.velocity.X = npc.velocity.X - 0.2f; - } else if (npc.direction > 0) - { npc.velocity.X = npc.velocity.X + 0.2f; - } - float velocityX = 3f; + + float velocityX = 3f + (4f * (1f - lifeRatio)); if (npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) - { velocityX += 3f; - } if (!rightClawActive) - { velocityX += 1f; - } if (!leftClawActive) - { velocityX += 1f; - } if (!headActive) - { velocityX += 1f; - } if (!rightLegActive) - { velocityX += 1f; - } if (!leftLegActive) - { velocityX += 1f; - } + if (npc.velocity.X < -velocityX) - { npc.velocity.X = -velocityX; - } if (npc.velocity.X > velocityX) - { npc.velocity.X = velocityX; - } } } } + if (npc.target <= 0 || npc.target == 255 || Main.player[npc.target].dead) - { npc.TargetClosest(true); - } + int distanceFromTarget = 3000; if (Math.Abs(npc.Center.X - Main.player[npc.target].Center.X) + Math.Abs(npc.Center.Y - Main.player[npc.target].Center.Y) > (float)distanceFromTarget) { @@ -568,7 +579,7 @@ namespace CalamityMod.NPCs.Scavenger DropHelper.DropBags(npc); DropHelper.DropItemChance(npc, mod.ItemType("RavagerTrophy"), 10); - DropHelper.DropItemCondition(npc, mod.ItemType("Knowledge33"), true, !CalamityWorld.downedScavenger); + DropHelper.DropItemCondition(npc, mod.ItemType("KnowledgeRavager"), true, !CalamityWorld.downedScavenger); DropHelper.DropResidentEvilAmmo(npc, CalamityWorld.downedScavenger, 4, 2, 1); // All other drops are contained in the bag, so they only drop directly on Normal diff --git a/NPCs/SlimeGod/SlimeGodCore.cs b/NPCs/SlimeGod/SlimeGodCore.cs index 5f96a79964..7706bacfb2 100644 --- a/NPCs/SlimeGod/SlimeGodCore.cs +++ b/NPCs/SlimeGod/SlimeGodCore.cs @@ -5,6 +5,8 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.CalPlayer; +using CalamityMod.Utilities; namespace CalamityMod.NPCs.SlimeGod { @@ -336,7 +338,7 @@ namespace CalamityMod.NPCs.SlimeGod DropHelper.DropBags(npc); DropHelper.DropItemChance(npc, mod.ItemType("SlimeGodTrophy"), 10); - DropHelper.DropItemCondition(npc, mod.ItemType("Knowledge15"), true, !CalamityWorld.downedSlimeGod); + DropHelper.DropItemCondition(npc, mod.ItemType("KnowledgeSlimeGod"), true, !CalamityWorld.downedSlimeGod); DropHelper.DropResidentEvilAmmo(npc, CalamityWorld.downedSlimeGod, 3, 1, 0); // Purified Jam is once per player, but drops for all players. diff --git a/NPCs/StormWeaver/StormWeaverHeadNaked.cs b/NPCs/StormWeaver/StormWeaverHeadNaked.cs index f451ca0df6..efc094a12d 100644 --- a/NPCs/StormWeaver/StormWeaverHeadNaked.cs +++ b/NPCs/StormWeaver/StormWeaverHeadNaked.cs @@ -5,6 +5,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.Utilities; namespace CalamityMod.NPCs.StormWeaver { @@ -633,7 +634,7 @@ namespace CalamityMod.NPCs.StormWeaver // Other bool lastSentinelKilled = CalamityWorld.downedSentinel1 && !CalamityWorld.downedSentinel2 && CalamityWorld.downedSentinel3; - DropHelper.DropItemCondition(npc, mod.ItemType("Knowledge40"), true, lastSentinelKilled); + DropHelper.DropItemCondition(npc, mod.ItemType("KnowledgeSentinels"), true, lastSentinelKilled); DropHelper.DropResidentEvilAmmo(npc, CalamityWorld.downedSentinel2, 5, 2, 1); } diff --git a/NPCs/SunkenSeaNPCs/BlindedAngler.cs b/NPCs/SunkenSeaNPCs/BlindedAngler.cs index f496f61956..06976528ff 100644 --- a/NPCs/SunkenSeaNPCs/BlindedAngler.cs +++ b/NPCs/SunkenSeaNPCs/BlindedAngler.cs @@ -5,6 +5,7 @@ using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.SunkenSeaNPCs { diff --git a/NPCs/SunkenSeaNPCs/Clam.cs b/NPCs/SunkenSeaNPCs/Clam.cs index ee5dab1315..ab91943cc2 100644 --- a/NPCs/SunkenSeaNPCs/Clam.cs +++ b/NPCs/SunkenSeaNPCs/Clam.cs @@ -3,6 +3,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.SunkenSeaNPCs { diff --git a/NPCs/SunkenSeaNPCs/EutrophicRay.cs b/NPCs/SunkenSeaNPCs/EutrophicRay.cs index ad719bea91..a94004b2c4 100644 --- a/NPCs/SunkenSeaNPCs/EutrophicRay.cs +++ b/NPCs/SunkenSeaNPCs/EutrophicRay.cs @@ -4,6 +4,7 @@ using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.SunkenSeaNPCs { diff --git a/NPCs/SunkenSeaNPCs/GhostBell.cs b/NPCs/SunkenSeaNPCs/GhostBell.cs index 05eab775db..e1a4405e1e 100644 --- a/NPCs/SunkenSeaNPCs/GhostBell.cs +++ b/NPCs/SunkenSeaNPCs/GhostBell.cs @@ -4,6 +4,7 @@ using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.SunkenSeaNPCs { diff --git a/NPCs/SunkenSeaNPCs/GhostBellSmall.cs b/NPCs/SunkenSeaNPCs/GhostBellSmall.cs index 5817edfc6c..323173f9c3 100644 --- a/NPCs/SunkenSeaNPCs/GhostBellSmall.cs +++ b/NPCs/SunkenSeaNPCs/GhostBellSmall.cs @@ -4,6 +4,7 @@ using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.SunkenSeaNPCs { diff --git a/NPCs/SunkenSeaNPCs/GiantClam.cs b/NPCs/SunkenSeaNPCs/GiantClam.cs index ba69b07983..6ccb72bce7 100644 --- a/NPCs/SunkenSeaNPCs/GiantClam.cs +++ b/NPCs/SunkenSeaNPCs/GiantClam.cs @@ -6,6 +6,8 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.CalPlayer; +using CalamityMod.Utilities; namespace CalamityMod.NPCs.SunkenSeaNPCs { @@ -345,7 +347,7 @@ namespace CalamityMod.NPCs.SunkenSeaNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.player.GetModPlayer(mod).ZoneSunkenSea && spawnInfo.water && !NPC.AnyNPCs(mod.NPCType("GiantClam"))) + if (spawnInfo.player.GetModPlayer(mod).ZoneSunkenSea && spawnInfo.water && CalamityWorld.downedDesertScourge && !NPC.AnyNPCs(mod.NPCType("GiantClam"))) { return SpawnCondition.CaveJellyfish.Chance * 0.12f; } diff --git a/NPCs/SunkenSeaNPCs/PrismTurtle.cs b/NPCs/SunkenSeaNPCs/PrismTurtle.cs index e1e50a30fd..f8ae74ad07 100644 --- a/NPCs/SunkenSeaNPCs/PrismTurtle.cs +++ b/NPCs/SunkenSeaNPCs/PrismTurtle.cs @@ -6,6 +6,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.SunkenSeaNPCs { diff --git a/NPCs/SunkenSeaNPCs/SeaFloaty.cs b/NPCs/SunkenSeaNPCs/SeaFloaty.cs index 9830703b09..5e5746866f 100644 --- a/NPCs/SunkenSeaNPCs/SeaFloaty.cs +++ b/NPCs/SunkenSeaNPCs/SeaFloaty.cs @@ -3,6 +3,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.SunkenSeaNPCs { diff --git a/NPCs/SunkenSeaNPCs/SeaMinnow.cs b/NPCs/SunkenSeaNPCs/SeaMinnow.cs index 583a7fa469..588c44b030 100644 --- a/NPCs/SunkenSeaNPCs/SeaMinnow.cs +++ b/NPCs/SunkenSeaNPCs/SeaMinnow.cs @@ -3,6 +3,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.SunkenSeaNPCs { diff --git a/NPCs/SunkenSeaNPCs/SeaSerpent1.cs b/NPCs/SunkenSeaNPCs/SeaSerpent1.cs index a82b206026..c27f96b06f 100644 --- a/NPCs/SunkenSeaNPCs/SeaSerpent1.cs +++ b/NPCs/SunkenSeaNPCs/SeaSerpent1.cs @@ -3,6 +3,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.SunkenSeaNPCs { diff --git a/NPCs/SupremeCalamitas/SupremeCalamitas.cs b/NPCs/SupremeCalamitas/SupremeCalamitas.cs index 47bf6c2208..a1c59bfcf4 100644 --- a/NPCs/SupremeCalamitas/SupremeCalamitas.cs +++ b/NPCs/SupremeCalamitas/SupremeCalamitas.cs @@ -7,6 +7,8 @@ using Terraria.Localization; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.CalPlayer; +using CalamityMod.Utilities; namespace CalamityMod.NPCs.SupremeCalamitas { @@ -2032,7 +2034,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas DropHelper.DropItemCondition(npc, mod.ItemType("Levi"), CalamityWorld.death); // Other - DropHelper.DropItemCondition(npc, mod.ItemType("Knowledge45"), true, !CalamityWorld.downedSCal); + DropHelper.DropItemCondition(npc, mod.ItemType("KnowledgeCalamitas"), true, !CalamityWorld.downedSCal); DropHelper.DropResidentEvilAmmo(npc, CalamityWorld.downedSCal, 6, 3, 2); // Mark Supreme Calamitas as dead diff --git a/NPCs/TheDevourerofGods/DevourerofGodsBody.cs b/NPCs/TheDevourerofGods/DevourerofGodsBody.cs index 9f91e0d2da..936ec37664 100644 --- a/NPCs/TheDevourerofGods/DevourerofGodsBody.cs +++ b/NPCs/TheDevourerofGods/DevourerofGodsBody.cs @@ -19,12 +19,12 @@ namespace CalamityMod.NPCs.TheDevourerofGods public override void SetDefaults() { - npc.damage = 180; //70 + npc.damage = 180; npc.npcSlots = 5f; - npc.width = 34; //38 - npc.height = 34; //30 + npc.width = 56; + npc.height = 56; npc.defense = 0; - npc.lifeMax = CalamityWorld.revenge ? 500000 : 450000; //1000000 960000 + npc.lifeMax = CalamityWorld.revenge ? 500000 : 450000; if (CalamityWorld.death) { npc.lifeMax = 850000; @@ -34,11 +34,6 @@ namespace CalamityMod.NPCs.TheDevourerofGods npc.aiStyle = -1; aiType = -1; npc.knockBackResist = 0f; - npc.scale = 1.4f; - if (Main.expertMode) - { - npc.scale = 1.5f; - } npc.alpha = 255; npc.behindTiles = true; npc.noGravity = true; diff --git a/NPCs/TheDevourerofGods/DevourerofGodsBody.png b/NPCs/TheDevourerofGods/DevourerofGodsBody.png index 1152fd0f8d..f47d0a32c3 100644 Binary files a/NPCs/TheDevourerofGods/DevourerofGodsBody.png and b/NPCs/TheDevourerofGods/DevourerofGodsBody.png differ diff --git a/NPCs/TheDevourerofGods/DevourerofGodsBody2.png b/NPCs/TheDevourerofGods/DevourerofGodsBody2.png index 7d8067ae34..63c6a4c27c 100644 Binary files a/NPCs/TheDevourerofGods/DevourerofGodsBody2.png and b/NPCs/TheDevourerofGods/DevourerofGodsBody2.png differ diff --git a/NPCs/TheDevourerofGods/DevourerofGodsBody2Glow.png b/NPCs/TheDevourerofGods/DevourerofGodsBody2Glow.png new file mode 100644 index 0000000000..d5599ff746 Binary files /dev/null and b/NPCs/TheDevourerofGods/DevourerofGodsBody2Glow.png differ diff --git a/NPCs/TheDevourerofGods/DevourerofGodsBodyGlow.png b/NPCs/TheDevourerofGods/DevourerofGodsBodyGlow.png new file mode 100644 index 0000000000..08836e14db Binary files /dev/null and b/NPCs/TheDevourerofGods/DevourerofGodsBodyGlow.png differ diff --git a/NPCs/TheDevourerofGods/DevourerofGodsBodyS.cs b/NPCs/TheDevourerofGods/DevourerofGodsBodyS.cs index 5593173a58..eeb1c35535 100644 --- a/NPCs/TheDevourerofGods/DevourerofGodsBodyS.cs +++ b/NPCs/TheDevourerofGods/DevourerofGodsBodyS.cs @@ -20,12 +20,12 @@ namespace CalamityMod.NPCs.TheDevourerofGods public override void SetDefaults() { - npc.damage = 220; //70 + npc.damage = 220; npc.npcSlots = 5f; - npc.width = 54; //34 - npc.height = 54; //34 + npc.width = 70; + npc.height = 70; npc.defense = 0; - npc.lifeMax = CalamityWorld.revenge ? 1875000 : 1650000; //720000 672000 + npc.lifeMax = CalamityWorld.revenge ? 1875000 : 1650000; if (CalamityWorld.death) { npc.lifeMax = 3060000; @@ -36,9 +36,9 @@ namespace CalamityMod.NPCs.TheDevourerofGods } double HPBoost = (double)Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)((double)npc.lifeMax * HPBoost); - npc.aiStyle = -1; //new - aiType = -1; //new - animationType = 10; //new + npc.aiStyle = -1; + aiType = -1; + animationType = 10; npc.knockBackResist = 0f; npc.alpha = 255; npc.behindTiles = true; diff --git a/NPCs/TheDevourerofGods/DevourerofGodsBodyS.png b/NPCs/TheDevourerofGods/DevourerofGodsBodyS.png index 8e9797d2c2..c3f5089376 100644 Binary files a/NPCs/TheDevourerofGods/DevourerofGodsBodyS.png and b/NPCs/TheDevourerofGods/DevourerofGodsBodyS.png differ diff --git a/NPCs/TheDevourerofGods/DevourerofGodsBodySGlow.png b/NPCs/TheDevourerofGods/DevourerofGodsBodySGlow.png new file mode 100644 index 0000000000..75823dc0b7 Binary files /dev/null and b/NPCs/TheDevourerofGods/DevourerofGodsBodySGlow.png differ diff --git a/NPCs/TheDevourerofGods/DevourerofGodsHead.cs b/NPCs/TheDevourerofGods/DevourerofGodsHead.cs index b6ff68ae20..efe736cc89 100644 --- a/NPCs/TheDevourerofGods/DevourerofGodsHead.cs +++ b/NPCs/TheDevourerofGods/DevourerofGodsHead.cs @@ -28,12 +28,12 @@ namespace CalamityMod.NPCs.TheDevourerofGods public override void SetDefaults() { - npc.damage = 250; //150 + npc.damage = 250; npc.npcSlots = 5f; - npc.width = 64; //324 - npc.height = 76; //216 + npc.width = 104; + npc.height = 104; npc.defense = 0; - npc.lifeMax = CalamityWorld.revenge ? 500000 : 450000; //1000000 960000 + npc.lifeMax = CalamityWorld.revenge ? 500000 : 450000; if (CalamityWorld.death) { npc.lifeMax = 850000; @@ -44,11 +44,6 @@ namespace CalamityMod.NPCs.TheDevourerofGods npc.aiStyle = -1; aiType = -1; npc.knockBackResist = 0f; - npc.scale = 1.4f; - if (Main.expertMode) - { - npc.scale = 1.5f; - } npc.boss = true; npc.value = Item.buyPrice(0, 75, 0, 0); npc.alpha = 255; diff --git a/NPCs/TheDevourerofGods/DevourerofGodsHead.png b/NPCs/TheDevourerofGods/DevourerofGodsHead.png index cd1fda59fc..e41c65844d 100644 Binary files a/NPCs/TheDevourerofGods/DevourerofGodsHead.png and b/NPCs/TheDevourerofGods/DevourerofGodsHead.png differ diff --git a/NPCs/TheDevourerofGods/DevourerofGodsHead2.png b/NPCs/TheDevourerofGods/DevourerofGodsHead2.png index a11d630fb1..5a2e86f44a 100644 Binary files a/NPCs/TheDevourerofGods/DevourerofGodsHead2.png and b/NPCs/TheDevourerofGods/DevourerofGodsHead2.png differ diff --git a/NPCs/TheDevourerofGods/DevourerofGodsHead2Glow.png b/NPCs/TheDevourerofGods/DevourerofGodsHead2Glow.png new file mode 100644 index 0000000000..fbd4e6e3dd Binary files /dev/null and b/NPCs/TheDevourerofGods/DevourerofGodsHead2Glow.png differ diff --git a/NPCs/TheDevourerofGods/DevourerofGodsHeadGlow.png b/NPCs/TheDevourerofGods/DevourerofGodsHeadGlow.png new file mode 100644 index 0000000000..12ee73f43d Binary files /dev/null and b/NPCs/TheDevourerofGods/DevourerofGodsHeadGlow.png differ diff --git a/NPCs/TheDevourerofGods/DevourerofGodsHeadS.cs b/NPCs/TheDevourerofGods/DevourerofGodsHeadS.cs index f0653bf38f..0c8d96b0f4 100644 --- a/NPCs/TheDevourerofGods/DevourerofGodsHeadS.cs +++ b/NPCs/TheDevourerofGods/DevourerofGodsHeadS.cs @@ -7,6 +7,7 @@ using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.Utilities; namespace CalamityMod.NPCs.TheDevourerofGods { @@ -33,12 +34,12 @@ namespace CalamityMod.NPCs.TheDevourerofGods public override void SetDefaults() { - npc.damage = 300; //150 + npc.damage = 300; npc.npcSlots = 5f; - npc.width = 100; //130 - npc.height = 144; //150 + npc.width = 176; + npc.height = 176; npc.defense = 0; - npc.lifeMax = CalamityWorld.revenge ? 1875000 : 1650000; //720000 672000 + npc.lifeMax = CalamityWorld.revenge ? 1875000 : 1650000; if (CalamityWorld.death) { npc.lifeMax = 3060000; @@ -859,7 +860,7 @@ namespace CalamityMod.NPCs.TheDevourerofGods DropHelper.DropItem(npc, mod.ItemType("SupremeHealingPotion"), 8, 14); DropHelper.DropItemChance(npc, mod.ItemType("DevourerofGodsTrophy"), 10); - DropHelper.DropItemCondition(npc, mod.ItemType("Knowledge42"), true, !CalamityWorld.downedDoG); + DropHelper.DropItemCondition(npc, mod.ItemType("KnowledgeDevourerofGods"), true, !CalamityWorld.downedDoG); DropHelper.DropResidentEvilAmmo(npc, CalamityWorld.downedDoG, 6, 3, 2); // All other drops are contained in the bag, so they only drop directly on Normal diff --git a/NPCs/TheDevourerofGods/DevourerofGodsHeadS.png b/NPCs/TheDevourerofGods/DevourerofGodsHeadS.png index d10502a77c..a6bcf803fc 100644 Binary files a/NPCs/TheDevourerofGods/DevourerofGodsHeadS.png and b/NPCs/TheDevourerofGods/DevourerofGodsHeadS.png differ diff --git a/NPCs/TheDevourerofGods/DevourerofGodsHeadSGlow.png b/NPCs/TheDevourerofGods/DevourerofGodsHeadSGlow.png new file mode 100644 index 0000000000..ff3df49340 Binary files /dev/null and b/NPCs/TheDevourerofGods/DevourerofGodsHeadSGlow.png differ diff --git a/NPCs/TheDevourerofGods/DevourerofGodsHead_Head_Boss.png b/NPCs/TheDevourerofGods/DevourerofGodsHead_Head_Boss.png index 9aac401b13..bc409c212e 100644 Binary files a/NPCs/TheDevourerofGods/DevourerofGodsHead_Head_Boss.png and b/NPCs/TheDevourerofGods/DevourerofGodsHead_Head_Boss.png differ diff --git a/NPCs/TheDevourerofGods/DevourerofGodsTail.cs b/NPCs/TheDevourerofGods/DevourerofGodsTail.cs index c60b7eb0f3..1329741259 100644 --- a/NPCs/TheDevourerofGods/DevourerofGodsTail.cs +++ b/NPCs/TheDevourerofGods/DevourerofGodsTail.cs @@ -19,10 +19,10 @@ namespace CalamityMod.NPCs.TheDevourerofGods { npc.damage = 150; npc.npcSlots = 5f; - npc.width = 32; //42 - npc.height = 50; //42 + npc.width = 66; + npc.height = 66; npc.defense = 0; - npc.lifeMax = CalamityWorld.revenge ? 500000 : 450000; //1000000 960000 + npc.lifeMax = CalamityWorld.revenge ? 500000 : 450000; if (CalamityWorld.death) { npc.lifeMax = 850000; @@ -32,11 +32,6 @@ namespace CalamityMod.NPCs.TheDevourerofGods npc.aiStyle = -1; aiType = -1; npc.knockBackResist = 0f; - npc.scale = 1.4f; - if (Main.expertMode) - { - npc.scale = 1.5f; - } npc.alpha = 255; npc.behindTiles = true; npc.noGravity = true; diff --git a/NPCs/TheDevourerofGods/DevourerofGodsTail.png b/NPCs/TheDevourerofGods/DevourerofGodsTail.png index 1046a2d157..9eaeb031dd 100644 Binary files a/NPCs/TheDevourerofGods/DevourerofGodsTail.png and b/NPCs/TheDevourerofGods/DevourerofGodsTail.png differ diff --git a/NPCs/TheDevourerofGods/DevourerofGodsTail2.png b/NPCs/TheDevourerofGods/DevourerofGodsTail2.png index f04084a4ca..e570d41a53 100644 Binary files a/NPCs/TheDevourerofGods/DevourerofGodsTail2.png and b/NPCs/TheDevourerofGods/DevourerofGodsTail2.png differ diff --git a/NPCs/TheDevourerofGods/DevourerofGodsTail2Glow.png b/NPCs/TheDevourerofGods/DevourerofGodsTail2Glow.png new file mode 100644 index 0000000000..250a284fe7 Binary files /dev/null and b/NPCs/TheDevourerofGods/DevourerofGodsTail2Glow.png differ diff --git a/NPCs/TheDevourerofGods/DevourerofGodsTailGlow.png b/NPCs/TheDevourerofGods/DevourerofGodsTailGlow.png new file mode 100644 index 0000000000..532b4b04f2 Binary files /dev/null and b/NPCs/TheDevourerofGods/DevourerofGodsTailGlow.png differ diff --git a/NPCs/TheDevourerofGods/DevourerofGodsTailS.cs b/NPCs/TheDevourerofGods/DevourerofGodsTailS.cs index 611174822e..25a88b0d2a 100644 --- a/NPCs/TheDevourerofGods/DevourerofGodsTailS.cs +++ b/NPCs/TheDevourerofGods/DevourerofGodsTailS.cs @@ -12,7 +12,6 @@ namespace CalamityMod.NPCs.TheDevourerofGods [AutoloadBossHead] public class DevourerofGodsTailS : ModNPC { - private int beamPortal = 0; private int invinceTime = 720; private bool setAlpha = false; @@ -25,10 +24,10 @@ namespace CalamityMod.NPCs.TheDevourerofGods { npc.damage = 180; npc.npcSlots = 5f; - npc.width = 80; //90 - npc.height = 98; //90 + npc.width = 100; + npc.height = 124; npc.defense = 0; - npc.lifeMax = CalamityWorld.revenge ? 1875000 : 1650000; //720000 672000 + npc.lifeMax = CalamityWorld.revenge ? 1875000 : 1650000; if (CalamityWorld.death) { npc.lifeMax = 3060000; @@ -40,9 +39,9 @@ namespace CalamityMod.NPCs.TheDevourerofGods double HPBoost = (double)Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)((double)npc.lifeMax * HPBoost); npc.takenDamageMultiplier = 1.25f; - npc.aiStyle = -1; //new - aiType = -1; //new - animationType = 10; //new + npc.aiStyle = -1; + aiType = -1; + animationType = 10; npc.knockBackResist = 0f; npc.alpha = 255; npc.behindTiles = true; @@ -68,7 +67,6 @@ namespace CalamityMod.NPCs.TheDevourerofGods public override void SendExtraAI(BinaryWriter writer) { writer.Write(invinceTime); - writer.Write(beamPortal); writer.Write(setAlpha); writer.Write(npc.dontTakeDamage); } @@ -76,7 +74,6 @@ namespace CalamityMod.NPCs.TheDevourerofGods public override void ReceiveExtraAI(BinaryReader reader) { invinceTime = reader.ReadInt32(); - beamPortal = reader.ReadInt32(); setAlpha = reader.ReadBoolean(); npc.dontTakeDamage = reader.ReadBoolean(); } @@ -138,40 +135,6 @@ namespace CalamityMod.NPCs.TheDevourerofGods { npc.active = false; } - if (Main.netMode != 1) - { - beamPortal += 1; - if (beamPortal >= 1080) - { - beamPortal = 0; - npc.TargetClosest(true); - float projectileSpeed = 5f; - if (CalamityWorld.death) - { - projectileSpeed = 7f; - } - else if (CalamityWorld.revenge) - { - projectileSpeed = 6.5f; - } - else if (Main.expertMode) - { - projectileSpeed = 6f; - } - Vector2 shootFromVector = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)(npc.height / 2)); - float playerPositionX = Main.player[npc.target].position.X + (float)Main.player[npc.target].width * 0.5f - shootFromVector.X + (float)Main.rand.Next(-20, 21); - float playerPositionY = Main.player[npc.target].position.Y + (float)Main.player[npc.target].height * 0.5f - shootFromVector.Y + (float)Main.rand.Next(-20, 21); - float playerPosition = (float)Math.Sqrt((double)(playerPositionX * playerPositionX + playerPositionY * playerPositionY)); - playerPosition = projectileSpeed / playerPosition; - playerPositionX *= playerPosition; - playerPositionY *= playerPosition; - int projectileType = mod.ProjectileType("DoGBeamPortal"); - shootFromVector.X += playerPositionX * 3f; - shootFromVector.Y += playerPositionY * 3f; - Projectile.NewProjectile(shootFromVector.X, shootFromVector.Y, playerPositionX, playerPositionY, projectileType, 0, 0f, Main.myPlayer, 0f, 0f); - npc.netUpdate = true; - } - } 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]].alpha < 128 && !setAlpha) { diff --git a/NPCs/TheDevourerofGods/DevourerofGodsTailS.png b/NPCs/TheDevourerofGods/DevourerofGodsTailS.png index c1255c9323..ae3656b8c7 100644 Binary files a/NPCs/TheDevourerofGods/DevourerofGodsTailS.png and b/NPCs/TheDevourerofGods/DevourerofGodsTailS.png differ diff --git a/NPCs/TheDevourerofGods/DevourerofGodsTailSGlow.png b/NPCs/TheDevourerofGods/DevourerofGodsTailSGlow.png new file mode 100644 index 0000000000..9732004497 Binary files /dev/null and b/NPCs/TheDevourerofGods/DevourerofGodsTailSGlow.png differ diff --git a/NPCs/TheDevourerofGods/DevourerofGodsTail_Head_Boss.png b/NPCs/TheDevourerofGods/DevourerofGodsTail_Head_Boss.png index 7b5fc8ae71..dc8a17a0be 100644 Binary files a/NPCs/TheDevourerofGods/DevourerofGodsTail_Head_Boss.png and b/NPCs/TheDevourerofGods/DevourerofGodsTail_Head_Boss.png differ diff --git a/NPCs/TownNPCs/DILF.cs b/NPCs/TownNPCs/DILF.cs index a3c07f1d2d..4a056707aa 100644 --- a/NPCs/TownNPCs/DILF.cs +++ b/NPCs/TownNPCs/DILF.cs @@ -5,6 +5,7 @@ using Terraria.Localization; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.TownNPCs { @@ -109,7 +110,7 @@ namespace CalamityMod.NPCs.TownNPCs if (Main.player[Main.myPlayer].GetModPlayer().cryogenSoul) dialogue.Add(Main.player[Main.myPlayer].name + "...just between us, I think I forgot my soul in the ice castle. If you see it, please do let me know."); - if (CalamityWorld.spawnAstralMeteor) + if (Main.hardMode) dialogue.Add("It wouldn't be the first time something unknown and powerful dropped from the heavens...I would tread carefully if I were you..."); return dialogue[Main.rand.Next(dialogue.Count)]; diff --git a/NPCs/TownNPCs/FAP.cs b/NPCs/TownNPCs/FAP.cs index 91b1d0422f..cd3631ba54 100644 --- a/NPCs/TownNPCs/FAP.cs +++ b/NPCs/TownNPCs/FAP.cs @@ -6,6 +6,7 @@ using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.TownNPCs { diff --git a/NPCs/TownNPCs/SEAHOE.cs b/NPCs/TownNPCs/SEAHOE.cs index fd7f43d031..de3ba00e69 100644 --- a/NPCs/TownNPCs/SEAHOE.cs +++ b/NPCs/TownNPCs/SEAHOE.cs @@ -4,6 +4,7 @@ using Terraria.Localization; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.CalPlayer; namespace CalamityMod.NPCs.TownNPCs { diff --git a/NPCs/Yharon/Yharon.cs b/NPCs/Yharon/Yharon.cs index 61664e7a53..dbec00ee1b 100644 --- a/NPCs/Yharon/Yharon.cs +++ b/NPCs/Yharon/Yharon.cs @@ -9,6 +9,7 @@ using Terraria.ID; using Terraria.Localization; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.Utilities; /*Possibly add in a final phase for AI 2 that is similar to Sif's final phase in Dark Souls*/ @@ -783,7 +784,7 @@ namespace CalamityMod.NPCs.Yharon } if (Main.netMode != 1 && npc.ai[2] == (float)(num1457 - 30)) { - Projectile.NewProjectile(vectorCenter.X, vectorCenter.Y, 0f, 0f, mod.ProjectileType("Flare"), 0, 0f, Main.myPlayer, 1f, (float)(npc.target + 1)); //changed + Projectile.NewProjectile(vectorCenter.X, vectorCenter.Y, (float)(npc.direction * 2), 8f, mod.ProjectileType("Flare"), 0, 0f, Main.myPlayer, 1f, (float)(npc.target + 1)); //changed Projectile.NewProjectile(vectorCenter.X, vectorCenter.Y, (float)(-(float)npc.direction * 2), 8f, mod.ProjectileType("Flare"), 0, 0f, Main.myPlayer, 0f, 0f); //changed } npc.ai[2] += 1f; @@ -2830,7 +2831,7 @@ namespace CalamityMod.NPCs.Yharon // Other DropHelper.DropItem(npc, mod.ItemType("BossRush")); - DropHelper.DropItemCondition(npc, mod.ItemType("Knowledge44"), true, !CalamityWorld.downedYharon); + DropHelper.DropItemCondition(npc, mod.ItemType("KnowledgeYharon"), true, !CalamityWorld.downedYharon); DropHelper.DropResidentEvilAmmo(npc, CalamityWorld.downedYharon, 6, 3, 2); // If Yharon has not been killed yet, notify players of Auric Ore diff --git a/Projectiles/Amidias/HermitCrab.cs b/Projectiles/Amidias/HermitCrab.cs index 067d244526..122f2c3ac2 100644 --- a/Projectiles/Amidias/HermitCrab.cs +++ b/Projectiles/Amidias/HermitCrab.cs @@ -2,6 +2,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Amidias { diff --git a/Projectiles/Astral/HeavenfallenStardisk.png b/Projectiles/Astral/HeavenfallenStardisk.png index beedd16af7..b97b3655fd 100644 Binary files a/Projectiles/Astral/HeavenfallenStardisk.png and b/Projectiles/Astral/HeavenfallenStardisk.png differ diff --git a/Projectiles/Astral/Quasar.cs b/Projectiles/Astral/Quasar.cs index 2f1bb49d8b..49756d9861 100644 --- a/Projectiles/Astral/Quasar.cs +++ b/Projectiles/Astral/Quasar.cs @@ -4,6 +4,7 @@ using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Astral { diff --git a/Projectiles/Astral/Quasar2.cs b/Projectiles/Astral/Quasar2.cs index df26c0af6a..5b842be32d 100644 --- a/Projectiles/Astral/Quasar2.cs +++ b/Projectiles/Astral/Quasar2.cs @@ -4,6 +4,7 @@ using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Astral { diff --git a/Projectiles/Astral/RadiantStar2.cs b/Projectiles/Astral/RadiantStar2.cs index d01654b8a3..2924a1ca6f 100644 --- a/Projectiles/Astral/RadiantStar2.cs +++ b/Projectiles/Astral/RadiantStar2.cs @@ -4,6 +4,7 @@ using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Astral { diff --git a/Projectiles/Boss/AbyssMine.cs b/Projectiles/Boss/AbyssMine.cs index 559a1fd175..3177498128 100644 --- a/Projectiles/Boss/AbyssMine.cs +++ b/Projectiles/Boss/AbyssMine.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Projectiles.Boss projectile.height = 26; projectile.hostile = true; projectile.alpha = 60; - projectile.penetrate = 1; + projectile.penetrate = -1; projectile.tileCollide = false; projectile.timeLeft = Main.expertMode ? 3000 : 2400; } @@ -43,8 +43,7 @@ namespace CalamityMod.Projectiles.Boss 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 = 150; - projectile.height = 150; + projectile.width = (projectile.height = 96); 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 < 30; num621++) @@ -64,7 +63,8 @@ namespace CalamityMod.Projectiles.Boss num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 173, 0f, 0f, 100, default(Color), 1f); Main.dust[num624].velocity *= 2f; } - } + projectile.Damage(); + } public override void OnHitPlayer(Player target, int damage, bool crit) { diff --git a/Projectiles/Boss/AbyssMine2.cs b/Projectiles/Boss/AbyssMine2.cs index 93aa4ce794..564fa09ee2 100644 --- a/Projectiles/Boss/AbyssMine2.cs +++ b/Projectiles/Boss/AbyssMine2.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Projectiles.Boss projectile.height = 26; projectile.hostile = true; projectile.alpha = 60; - projectile.penetrate = 1; + projectile.penetrate = -1; projectile.tileCollide = false; projectile.timeLeft = Main.expertMode ? 3000 : 2400; } @@ -44,8 +44,7 @@ namespace CalamityMod.Projectiles.Boss 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 = 150; - projectile.height = 150; + projectile.width = (projectile.height = 96); 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 < 30; num621++) @@ -67,7 +66,8 @@ namespace CalamityMod.Projectiles.Boss num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 127, 0f, 0f, 100, default(Color), 1f); Main.dust[num624].velocity *= 2f; } - } + projectile.Damage(); + } public override void OnHitPlayer(Player target, int damage, bool crit) { diff --git a/Projectiles/Boss/AstralFlame.cs b/Projectiles/Boss/AstralFlame.cs index 63eb9f6b73..e1bed52911 100644 --- a/Projectiles/Boss/AstralFlame.cs +++ b/Projectiles/Boss/AstralFlame.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Projectiles.Boss projectile.hostile = true; projectile.ignoreWater = true; projectile.tileCollide = false; - projectile.alpha = 255; + projectile.alpha = 100; projectile.penetrate = 1; projectile.timeLeft = 485; } @@ -65,10 +65,6 @@ namespace CalamityMod.Projectiles.Boss 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) - { - projectile.alpha -= 5; - } } if (projectile.ai[0] >= 120f) { @@ -98,13 +94,6 @@ namespace CalamityMod.Projectiles.Boss public override Color? GetAlpha(Color lightColor) { - if (projectile.timeLeft > 400) - { - projectile.localAI[1] += 1f; - byte b2 = (byte)(((int)projectile.localAI[1]) * 3); - byte a2 = (byte)((float)projectile.alpha * ((float)b2 / 255f)); - return new Color((int)b2, (int)b2, (int)b2, (int)a2); - } return new Color(255, 255, 255, projectile.alpha); } @@ -117,7 +106,7 @@ namespace CalamityMod.Projectiles.Boss { Main.PlaySound(29, (int)projectile.position.X, (int)projectile.position.Y, 103, 1f, 0f); projectile.position = projectile.Center; - projectile.width = (projectile.height = 188); + projectile.width = (projectile.height = 96); 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 < 2; num193++) diff --git a/Projectiles/Boss/AstralLaser.cs b/Projectiles/Boss/AstralLaser.cs index 500ec55fd8..2f47db8e5f 100644 --- a/Projectiles/Boss/AstralLaser.cs +++ b/Projectiles/Boss/AstralLaser.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Projectiles.Boss projectile.ignoreWater = true; projectile.tileCollide = false; projectile.alpha = 255; - projectile.penetrate = 1; + projectile.penetrate = -1; projectile.timeLeft = 180; } diff --git a/Projectiles/Boss/AstralShot2.cs b/Projectiles/Boss/AstralShot2.cs index 09bca8208d..884e413219 100644 --- a/Projectiles/Boss/AstralShot2.cs +++ b/Projectiles/Boss/AstralShot2.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Projectiles.Boss projectile.hostile = true; projectile.ignoreWater = true; projectile.alpha = 255; - projectile.penetrate = 1; + projectile.penetrate = -1; projectile.timeLeft = 600; } diff --git a/Projectiles/Boss/BloodGeyser.cs b/Projectiles/Boss/BloodGeyser.cs index c290bdb159..f2d4dce9a4 100644 --- a/Projectiles/Boss/BloodGeyser.cs +++ b/Projectiles/Boss/BloodGeyser.cs @@ -18,10 +18,7 @@ namespace CalamityMod.Projectiles.Boss projectile.width = 12; projectile.height = 12; projectile.hostile = true; - if (CalamityWorld.death) - { - projectile.tileCollide = false; - } + projectile.tileCollide = false; projectile.timeLeft = 300; projectile.penetrate = 1; projectile.aiStyle = 1; @@ -30,7 +27,11 @@ namespace CalamityMod.Projectiles.Boss public override void AI() { + if (projectile.timeLeft < 180) + projectile.tileCollide = true; + projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f; + int num469 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 5, 0f, 0f, 100, default(Color), 0.5f); Main.dust[num469].noGravity = true; Main.dust[num469].velocity *= 0f; diff --git a/Projectiles/Boss/BrimstoneBarrage.cs b/Projectiles/Boss/BrimstoneBarrage.cs index 192c5172f2..78886bd0b9 100644 --- a/Projectiles/Boss/BrimstoneBarrage.cs +++ b/Projectiles/Boss/BrimstoneBarrage.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Projectiles.Boss projectile.hostile = true; projectile.ignoreWater = true; projectile.tileCollide = false; - projectile.penetrate = 1; + projectile.penetrate = -1; projectile.timeLeft = 600; cooldownSlot = 1; } diff --git a/Projectiles/Boss/BrimstoneHellblast.cs b/Projectiles/Boss/BrimstoneHellblast.cs index 15362831ac..8d7c7bf48c 100644 --- a/Projectiles/Boss/BrimstoneHellblast.cs +++ b/Projectiles/Boss/BrimstoneHellblast.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Projectiles.Boss projectile.hostile = true; projectile.ignoreWater = true; projectile.tileCollide = false; - projectile.penetrate = 1; + projectile.penetrate = -1; projectile.timeLeft = 255; projectile.alpha = 0; cooldownSlot = 1; diff --git a/Projectiles/Boss/BrimstoneHellblast2.cs b/Projectiles/Boss/BrimstoneHellblast2.cs index 23550fb957..1383e3588d 100644 --- a/Projectiles/Boss/BrimstoneHellblast2.cs +++ b/Projectiles/Boss/BrimstoneHellblast2.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Projectiles.Boss projectile.ignoreWater = true; projectile.tileCollide = false; projectile.extraUpdates = 1; - projectile.penetrate = 1; + projectile.penetrate = -1; projectile.timeLeft = 1500; projectile.alpha = 0; cooldownSlot = 1; diff --git a/Projectiles/Boss/BrimstoneLaser.cs b/Projectiles/Boss/BrimstoneLaser.cs index 037fe75cbc..b8041495a2 100644 --- a/Projectiles/Boss/BrimstoneLaser.cs +++ b/Projectiles/Boss/BrimstoneLaser.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Projectiles.Boss projectile.hostile = true; projectile.scale = 2f; projectile.ignoreWater = true; - projectile.penetrate = 1; + projectile.penetrate = -1; projectile.alpha = 120; aiType = 100; } diff --git a/Projectiles/Boss/BrimstoneMonster.cs b/Projectiles/Boss/BrimstoneMonster.cs index b4f38d84fc..137fb5f85c 100644 --- a/Projectiles/Boss/BrimstoneMonster.cs +++ b/Projectiles/Boss/BrimstoneMonster.cs @@ -4,6 +4,7 @@ using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Boss { diff --git a/Projectiles/Boss/BrimstoneShot.cs b/Projectiles/Boss/BrimstoneShot.cs deleted file mode 100644 index 313b7f5434..0000000000 --- a/Projectiles/Boss/BrimstoneShot.cs +++ /dev/null @@ -1,57 +0,0 @@ -using System; -using Microsoft.Xna.Framework; -using Terraria; -using Terraria.ModLoader; - -namespace CalamityMod.Projectiles.Boss -{ - public class BrimstoneShot : ModProjectile - { - public int splitTimer = 60; - - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Brimstone Laser"); - } - - public override void SetDefaults() - { - projectile.width = 5; - projectile.height = 5; - projectile.hostile = true; - projectile.scale = 2f; - projectile.ignoreWater = true; - projectile.penetrate = 1; - projectile.alpha = 60; - cooldownSlot = 1; - } - - public override void AI() - { - splitTimer--; - if (splitTimer <= 0) - { - int numProj = 3; - float rotation = MathHelper.ToRadians(20); - if (projectile.owner == Main.myPlayer) - { - for (int i = 0; i < numProj + 1; i++) - { - Vector2 perturbedSpeed = new Vector2(projectile.velocity.X, projectile.velocity.Y).RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (numProj - 1))); - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, perturbedSpeed.X, perturbedSpeed.Y, mod.ProjectileType("BrimstoneLaserSplit"), (int)((double)projectile.damage), projectile.knockBack, projectile.owner, 0f, 0f); - } - } - projectile.Kill(); - } - Lighting.AddLight(projectile.Center, ((255 - projectile.alpha) * 0.5f) / 255f, ((255 - projectile.alpha) * 0.05f) / 255f, ((255 - projectile.alpha) * 0.05f) / 255f); - projectile.velocity.X *= 1.05f; - projectile.velocity.Y *= 1.05f; - projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f; - } - - public override void OnHitPlayer(Player target, int damage, bool crit) - { - target.AddBuff(mod.BuffType("BrimstoneFlames"), 150); - } - } -} diff --git a/Projectiles/Boss/BrimstoneShot.png b/Projectiles/Boss/BrimstoneShot.png deleted file mode 100644 index fc59a4cd75..0000000000 Binary files a/Projectiles/Boss/BrimstoneShot.png and /dev/null differ diff --git a/Projectiles/Boss/BrimstoneWave.cs b/Projectiles/Boss/BrimstoneWave.cs index d4204ff179..d5dab7d5fa 100644 --- a/Projectiles/Boss/BrimstoneWave.cs +++ b/Projectiles/Boss/BrimstoneWave.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Projectiles.Boss projectile.hostile = true; projectile.ignoreWater = true; projectile.tileCollide = false; - projectile.penetrate = 1; + projectile.penetrate = -1; projectile.timeLeft = 600; cooldownSlot = 1; } diff --git a/Projectiles/Boss/CosmicFlameBurst.cs b/Projectiles/Boss/CosmicFlameBurst.cs index 318f9bc733..5061591d2c 100644 --- a/Projectiles/Boss/CosmicFlameBurst.cs +++ b/Projectiles/Boss/CosmicFlameBurst.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Projectiles.Boss public override void AI() { - Lighting.AddLight(projectile.Center, ((255 - projectile.alpha) * 0.45f) / 255f, ((255 - projectile.alpha) * 0f) / 255f, ((255 - projectile.alpha) * 0.55f) / 255f); + Lighting.AddLight(projectile.Center, 0.3f, 0f, 0.4f); if (projectile.localAI[0] == 0f) { Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 73); @@ -47,8 +47,7 @@ namespace CalamityMod.Projectiles.Boss 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.width = (projectile.height = 48); 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 < 5; num621++) @@ -69,6 +68,7 @@ namespace CalamityMod.Projectiles.Boss 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; } + projectile.Damage(); } } } diff --git a/Projectiles/Boss/DarkEnergyBall.cs b/Projectiles/Boss/DarkEnergyBall.cs index a5c25ee3f4..d2e705f110 100644 --- a/Projectiles/Boss/DarkEnergyBall.cs +++ b/Projectiles/Boss/DarkEnergyBall.cs @@ -24,6 +24,7 @@ namespace CalamityMod.Projectiles.Boss projectile.hostile = true; projectile.tileCollide = false; projectile.timeLeft = 600; + projectile.penetrate = -1; cooldownSlot = 1; } diff --git a/Projectiles/Boss/DeusMine.cs b/Projectiles/Boss/DeusMine.cs index 04737abf1e..ccfb3bc42c 100644 --- a/Projectiles/Boss/DeusMine.cs +++ b/Projectiles/Boss/DeusMine.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Projectiles.Boss projectile.width = 26; projectile.height = 26; projectile.hostile = true; - projectile.alpha = 255; + projectile.alpha = 100; projectile.penetrate = -1; projectile.tileCollide = false; projectile.timeLeft = 1200; @@ -39,29 +39,6 @@ namespace CalamityMod.Projectiles.Boss { projectile.velocity.X *= 0.985f; projectile.velocity.Y *= 0.985f; - float num395 = (float)Main.mouseTextColor / 200f - 0.35f; - num395 *= 0.2f; - projectile.scale = num395 + 0.95f; - if (projectile.localAI[0] == 0f) - { - projectile.scale -= 0.02f; - projectile.alpha += 30; - if (projectile.alpha >= 250) - { - projectile.alpha = 255; - projectile.localAI[0] = 1f; - } - } - else if (projectile.localAI[0] == 1f) - { - projectile.scale += 0.02f; - projectile.alpha -= 30; - if (projectile.alpha <= 0) - { - projectile.alpha = 0; - projectile.localAI[0] = 0f; - } - } if (projectile.ai[1] == 0f) { projectile.ai[1] = 1f; @@ -101,8 +78,7 @@ namespace CalamityMod.Projectiles.Boss 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 = 150; - projectile.height = 150; + projectile.width = (projectile.height = 96); 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 < 30; num621++) @@ -119,10 +95,10 @@ namespace CalamityMod.Projectiles.Boss { 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, mod.DustType("AstralOrange"), 0f, 0f, 100, default(Color), 1f); - Main.dust[num624].velocity *= 2f; + Main.dust[num624].velocity *= 1.5f; + Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, mod.DustType("AstralOrange"), 0f, 0f, 100, default(Color), 1f); } + projectile.Damage(); } public override void OnHitPlayer(Player target, int damage, bool crit) diff --git a/Projectiles/Boss/DoGBeam.cs b/Projectiles/Boss/DoGBeam.cs index 8eaae51e0e..e817046b6f 100644 --- a/Projectiles/Boss/DoGBeam.cs +++ b/Projectiles/Boss/DoGBeam.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Projectiles.Boss { projectile.frame = 0; } - Lighting.AddLight(projectile.Center, ((255 - projectile.alpha) * 0f) / 255f, ((255 - projectile.alpha) * 0.35f) / 255f, ((255 - projectile.alpha) * 0.45f) / 255f); + Lighting.AddLight(projectile.Center, 0f, 0.2f, 0.3f); projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f; int num103 = (int)Player.FindClosest(projectile.Center, 1, 1); projectile.ai[1] += 1f; diff --git a/Projectiles/Boss/DoGBeamPortal.cs b/Projectiles/Boss/DoGBeamPortal.cs index 1dbe1e1db0..e1ebe2e231 100644 --- a/Projectiles/Boss/DoGBeamPortal.cs +++ b/Projectiles/Boss/DoGBeamPortal.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Projectiles.Boss projectile.ignoreWater = true; projectile.tileCollide = false; projectile.timeLeft = 600; - projectile.penetrate = 1; + projectile.penetrate = -1; cooldownSlot = 1; } @@ -41,7 +41,7 @@ namespace CalamityMod.Projectiles.Boss public override void AI() { - Lighting.AddLight(projectile.Center, ((255 - projectile.alpha) * 0f) / 255f, ((255 - projectile.alpha) * 0.95f) / 255f, ((255 - projectile.alpha) * 1.15f) / 255f); + Lighting.AddLight(projectile.Center, 0f, 0.95f, 1.15f); projectile.frameCounter++; if (projectile.frameCounter > 4) { diff --git a/Projectiles/Boss/DoGDeath.cs b/Projectiles/Boss/DoGDeath.cs index e5a1c11d6a..1dd7a48163 100644 --- a/Projectiles/Boss/DoGDeath.cs +++ b/Projectiles/Boss/DoGDeath.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Projectiles.Boss projectile.ignoreWater = true; projectile.tileCollide = false; projectile.alpha = 255; - projectile.penetrate = 1; + projectile.penetrate = -1; projectile.extraUpdates = 1; projectile.timeLeft = 300; cooldownSlot = 1; diff --git a/Projectiles/Boss/DoGNebulaShot.cs b/Projectiles/Boss/DoGNebulaShot.cs index 2a08d0e067..53b8c65eb7 100644 --- a/Projectiles/Boss/DoGNebulaShot.cs +++ b/Projectiles/Boss/DoGNebulaShot.cs @@ -38,7 +38,6 @@ namespace CalamityMod.Projectiles.Boss public override void AI() { - Lighting.AddLight(projectile.Center, ((255 - projectile.alpha) * 0.5f) / 255f, ((255 - projectile.alpha) * 0f) / 255f, ((255 - projectile.alpha) * 0.2f) / 255f); if (projectile.ai[0] == 0f) { projectile.ai[0] = 1f; diff --git a/Projectiles/Boss/EssenceDust.cs b/Projectiles/Boss/EssenceDust.cs index 1efab2092d..f851d74ec7 100644 --- a/Projectiles/Boss/EssenceDust.cs +++ b/Projectiles/Boss/EssenceDust.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Projectiles.Boss { projectile.velocity.X *= 0.985f; projectile.velocity.Y *= 0.975f; - Lighting.AddLight(projectile.Center, ((255 - projectile.alpha) * 0.85f) / 255f, ((255 - projectile.alpha) * 0f) / 255f, ((255 - projectile.alpha) * 1f) / 255f); + Lighting.AddLight(projectile.Center, 0.45f, 0f, 0.55f); for (int num468 = 0; num468 < 5; num468++) { int num469 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 173, 0f, 0f, 100, default(Color), 0.5f); @@ -40,8 +40,7 @@ namespace CalamityMod.Projectiles.Boss 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 = 100; - projectile.height = 100; + projectile.width = (projectile.height = 96); 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++) @@ -62,6 +61,7 @@ namespace CalamityMod.Projectiles.Boss num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 173, 0f, 0f, 100, default(Color), 1f); Main.dust[num624].velocity *= 2f; } + projectile.Damage(); } } } diff --git a/Projectiles/Boss/FlareBomb.cs b/Projectiles/Boss/FlareBomb.cs index 0a567e849a..55fced1af9 100644 --- a/Projectiles/Boss/FlareBomb.cs +++ b/Projectiles/Boss/FlareBomb.cs @@ -40,7 +40,7 @@ namespace CalamityMod.Projectiles.Boss { projectile.frame = 0; } - Lighting.AddLight(projectile.Center, ((255 - projectile.alpha) * 1.5f) / 255f, ((255 - projectile.alpha) * 0.75f) / 255f, ((255 - projectile.alpha) * 0f) / 255f); + Lighting.AddLight(projectile.Center, 0.5f, 0.25f, 0f); float num953 = revenge ? 110f : 100f; //100 float scaleFactor12 = revenge ? 27f : 25f; //5 float num954 = 40f; @@ -66,7 +66,6 @@ namespace CalamityMod.Projectiles.Boss { projectile.frame = 0; } - Lighting.AddLight(projectile.Center, 1f, 0.7f, 0f); int num959 = (int)projectile.ai[0]; if (num959 >= 0 && Main.player[num959].active && !Main.player[num959].dead) { @@ -109,10 +108,10 @@ namespace CalamityMod.Projectiles.Boss 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 = 50; - projectile.height = 50; + projectile.width = (projectile.height = 48); projectile.position.X = projectile.position.X - (float)(projectile.width / 2); projectile.position.Y = projectile.position.Y - (float)(projectile.height / 2); + projectile.Damage(); for (int num621 = 0; num621 < 10; num621++) { int num622 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 244, 0f, 0f, 100, default(Color), 2f); diff --git a/Projectiles/Boss/FlareDust.cs b/Projectiles/Boss/FlareDust.cs index 59ce7fb37c..9bb6c7457b 100644 --- a/Projectiles/Boss/FlareDust.cs +++ b/Projectiles/Boss/FlareDust.cs @@ -40,7 +40,7 @@ namespace CalamityMod.Projectiles.Boss } projectile.velocity.X *= 0.975f; projectile.velocity.Y *= 0.975f; - Lighting.AddLight(projectile.Center, ((255 - projectile.alpha) * 0.5f) / 255f, ((255 - projectile.alpha) * 0.5f) / 255f, ((255 - projectile.alpha) * 0f) / 255f); + Lighting.AddLight(projectile.Center, 0.5f, 0.25f, 0f); } public override Color? GetAlpha(Color lightColor) diff --git a/Projectiles/Boss/FlareDust2.cs b/Projectiles/Boss/FlareDust2.cs index b458296735..bfd05eb575 100644 --- a/Projectiles/Boss/FlareDust2.cs +++ b/Projectiles/Boss/FlareDust2.cs @@ -53,7 +53,7 @@ namespace CalamityMod.Projectiles.Boss projectile.velocity *= 1.05f; } } - Lighting.AddLight(projectile.Center, 0.5f, 0.5f, 0f); + Lighting.AddLight(projectile.Center, 0.5f, 0.25f, 0f); } public override Color? GetAlpha(Color lightColor) @@ -75,10 +75,10 @@ namespace CalamityMod.Projectiles.Boss 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 = 400; - projectile.height = 400; + projectile.width = (projectile.height = 144); projectile.position.X = projectile.position.X - (float)(projectile.width / 2); projectile.position.Y = projectile.position.Y - (float)(projectile.height / 2); + projectile.Damage(); for (int num621 = 0; num621 < 5; num621++) { int num622 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 244, 0f, 0f, 100, default(Color), 1f); diff --git a/Projectiles/Boss/FrostMist.cs b/Projectiles/Boss/FrostMist.cs index a3d56401c9..3f7a6196b3 100644 --- a/Projectiles/Boss/FrostMist.cs +++ b/Projectiles/Boss/FrostMist.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Projectiles.Boss projectile.height = 20; projectile.hostile = true; projectile.ignoreWater = true; - projectile.penetrate = 1; + projectile.penetrate = -1; projectile.timeLeft = 300; projectile.alpha = 255; } diff --git a/Projectiles/Boss/GigaFlare.cs b/Projectiles/Boss/GigaFlare.cs deleted file mode 100644 index e4943a2861..0000000000 --- a/Projectiles/Boss/GigaFlare.cs +++ /dev/null @@ -1,123 +0,0 @@ -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using Terraria; -using Terraria.ModLoader; - -namespace CalamityMod.Projectiles.Boss -{ - public class GigaFlare : ModProjectile - { - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Fireball"); - Main.projFrames[projectile.type] = 4; - } - - public override void SetDefaults() - { - projectile.width = 30; - projectile.height = 30; - projectile.hostile = true; - projectile.penetrate = 1; - projectile.tileCollide = false; - projectile.timeLeft = 300; - cooldownSlot = 1; - } - - public override void AI() - { - projectile.velocity.X *= 0.985f; - projectile.velocity.Y *= 0.985f; - projectile.frameCounter++; - if (projectile.frameCounter > 4) - { - projectile.frame++; - projectile.frameCounter = 0; - } - if (projectile.frame > 3) - { - projectile.frame = 0; - } - Lighting.AddLight(projectile.Center, 1f, 0.7f, 0f); - } - - public override Color? GetAlpha(Color lightColor) - { - return new Color(255, Main.DiscoG, 53, projectile.alpha); - } - - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) - { - Texture2D texture2D13 = Main.projectileTexture[projectile.type]; - int num214 = Main.projectileTexture[projectile.type].Height / Main.projFrames[projectile.type]; - int y6 = num214 * projectile.frame; - Main.spriteBatch.Draw(texture2D13, projectile.Center - Main.screenPosition + new Vector2(0f, projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Microsoft.Xna.Framework.Rectangle(0, y6, texture2D13.Width, num214)), projectile.GetAlpha(lightColor), projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)num214 / 2f), projectile.scale, SpriteEffects.None, 0f); - return false; - } - - 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 = 100; - projectile.height = 100; - 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 < 5; 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; - 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; - Main.dust[num624].velocity *= 5f; - num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 244, 0f, 0f, 100, default(Color), 2f); - Main.dust[num624].velocity *= 2f; - } - for (int num625 = 0; num625 < 3; num625++) - { - float scaleFactor10 = 0.33f; - if (num625 == 1) - { - scaleFactor10 = 0.66f; - } - if (num625 == 2) - { - scaleFactor10 = 1f; - } - int num626 = Gore.NewGore(new Vector2(projectile.position.X + (float)(projectile.width / 2) - 24f, projectile.position.Y + (float)(projectile.height / 2) - 24f), default(Vector2), Main.rand.Next(61, 64), 1f); - Main.gore[num626].velocity *= scaleFactor10; - Gore expr_13AB6_cp_0 = Main.gore[num626]; - expr_13AB6_cp_0.velocity.X = expr_13AB6_cp_0.velocity.X + 1f; - Gore expr_13AD6_cp_0 = Main.gore[num626]; - expr_13AD6_cp_0.velocity.Y = expr_13AD6_cp_0.velocity.Y + 1f; - num626 = Gore.NewGore(new Vector2(projectile.position.X + (float)(projectile.width / 2) - 24f, projectile.position.Y + (float)(projectile.height / 2) - 24f), default(Vector2), Main.rand.Next(61, 64), 1f); - Main.gore[num626].velocity *= scaleFactor10; - Gore expr_13B79_cp_0 = Main.gore[num626]; - expr_13B79_cp_0.velocity.X = expr_13B79_cp_0.velocity.X - 1f; - Gore expr_13B99_cp_0 = Main.gore[num626]; - expr_13B99_cp_0.velocity.Y = expr_13B99_cp_0.velocity.Y + 1f; - num626 = Gore.NewGore(new Vector2(projectile.position.X + (float)(projectile.width / 2) - 24f, projectile.position.Y + (float)(projectile.height / 2) - 24f), default(Vector2), Main.rand.Next(61, 64), 1f); - Main.gore[num626].velocity *= scaleFactor10; - Gore expr_13C3C_cp_0 = Main.gore[num626]; - expr_13C3C_cp_0.velocity.X = expr_13C3C_cp_0.velocity.X + 1f; - Gore expr_13C5C_cp_0 = Main.gore[num626]; - expr_13C5C_cp_0.velocity.Y = expr_13C5C_cp_0.velocity.Y - 1f; - num626 = Gore.NewGore(new Vector2(projectile.position.X + (float)(projectile.width / 2) - 24f, projectile.position.Y + (float)(projectile.height / 2) - 24f), default(Vector2), Main.rand.Next(61, 64), 1f); - Main.gore[num626].velocity *= scaleFactor10; - Gore expr_13CFF_cp_0 = Main.gore[num626]; - expr_13CFF_cp_0.velocity.X = expr_13CFF_cp_0.velocity.X - 1f; - Gore expr_13D1F_cp_0 = Main.gore[num626]; - expr_13D1F_cp_0.velocity.Y = expr_13D1F_cp_0.velocity.Y - 1f; - } - } - } -} diff --git a/Projectiles/Boss/GigaFlare.png b/Projectiles/Boss/GigaFlare.png deleted file mode 100644 index 01e2bd24ca..0000000000 Binary files a/Projectiles/Boss/GigaFlare.png and /dev/null differ diff --git a/Projectiles/Boss/GreatSandBlast.cs b/Projectiles/Boss/GreatSandBlast.cs index 519ed8045a..8296cf65de 100644 --- a/Projectiles/Boss/GreatSandBlast.cs +++ b/Projectiles/Boss/GreatSandBlast.cs @@ -61,7 +61,7 @@ namespace CalamityMod.Projectiles.Boss { Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 14); projectile.position = projectile.Center; - projectile.width = (projectile.height = 20); + projectile.width = (projectile.height = 32); projectile.position.X = projectile.position.X - (float)(projectile.width / 2); projectile.position.Y = projectile.position.Y - (float)(projectile.height / 2); int num226 = 36; diff --git a/Projectiles/Boss/HiveBombGoliath.cs b/Projectiles/Boss/HiveBombGoliath.cs index 51a1306f7b..03761760ee 100644 --- a/Projectiles/Boss/HiveBombGoliath.cs +++ b/Projectiles/Boss/HiveBombGoliath.cs @@ -30,10 +30,10 @@ namespace CalamityMod.Projectiles.Boss { projectile.velocity.X *= 1.01f; projectile.velocity.Y *= 1.01f; + if (projectile.position.Y > projectile.ai[1]) - { projectile.tileCollide = true; - } + projectile.frameCounter++; if (projectile.frameCounter > 4) { @@ -97,10 +97,10 @@ namespace CalamityMod.Projectiles.Boss 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 = 100; - projectile.height = 100; + 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); + projectile.Damage(); for (int num621 = 0; num621 < 8; num621++) { int num622 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 89, 0f, 0f, 100, default(Color), 2f); diff --git a/Projectiles/Boss/HolyBurnOrb.cs b/Projectiles/Boss/HolyBurnOrb.cs index 32565c100e..e974de0fdf 100644 --- a/Projectiles/Boss/HolyBurnOrb.cs +++ b/Projectiles/Boss/HolyBurnOrb.cs @@ -52,7 +52,7 @@ namespace CalamityMod.Projectiles.Boss int num492 = expertMode ? -150 : -100; if (CalamityWorld.death) { - num492 = -300; + num492 = -200; } Main.player[num487].HealEffect(num492, false); Main.player[num487].statLife += num492; diff --git a/Projectiles/Boss/HolyFire.cs b/Projectiles/Boss/HolyFire.cs index d6e13bc490..ab9030f1bb 100644 --- a/Projectiles/Boss/HolyFire.cs +++ b/Projectiles/Boss/HolyFire.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Projectiles.Boss projectile.hostile = true; projectile.ignoreWater = true; projectile.alpha = 255; - projectile.penetrate = 1; + projectile.penetrate = -1; projectile.aiStyle = 1; projectile.tileCollide = false; cooldownSlot = 1; diff --git a/Projectiles/Boss/HolyFire2.cs b/Projectiles/Boss/HolyFire2.cs index 864719e6b2..a594506e3e 100644 --- a/Projectiles/Boss/HolyFire2.cs +++ b/Projectiles/Boss/HolyFire2.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Projectiles.Boss projectile.height = 26; projectile.hostile = true; projectile.ignoreWater = true; - projectile.penetrate = 1; + projectile.penetrate = -1; projectile.tileCollide = false; projectile.timeLeft = 600; cooldownSlot = 1; diff --git a/Projectiles/Boss/HolyFlare.cs b/Projectiles/Boss/HolyFlare.cs index 00fe02db8b..3958179491 100644 --- a/Projectiles/Boss/HolyFlare.cs +++ b/Projectiles/Boss/HolyFlare.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Projectiles.Boss projectile.height = 26; projectile.hostile = true; projectile.ignoreWater = true; - projectile.penetrate = 1; + projectile.penetrate = -1; projectile.tileCollide = false; projectile.extraUpdates = 1; projectile.timeLeft = 600; diff --git a/Projectiles/Boss/HolyShot.cs b/Projectiles/Boss/HolyShot.cs index 4da05493eb..d7ec22f23f 100644 --- a/Projectiles/Boss/HolyShot.cs +++ b/Projectiles/Boss/HolyShot.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Projectiles.Boss projectile.ignoreWater = true; projectile.tileCollide = false; projectile.penetrate = -1; - projectile.alpha = 255; + projectile.alpha = 100; projectile.timeLeft = 900; cooldownSlot = 1; } @@ -59,16 +59,16 @@ namespace CalamityMod.Projectiles.Boss { projectile.localAI[1] += 5f; byte b2 = (byte)(((int)projectile.localAI[1]) * 3); - byte a2 = (byte)(100f * ((float)b2 / 255f)); + byte a2 = (byte)((float)projectile.alpha * ((float)b2 / 255f)); return new Color((int)b2, (int)b2, (int)b2, (int)a2); } if (projectile.timeLeft < 85) { byte b2 = (byte)(projectile.timeLeft * 3); - byte a2 = (byte)(100f * ((float)b2 / 255f)); + byte a2 = (byte)((float)projectile.alpha * ((float)b2 / 255f)); return new Color((int)b2, (int)b2, (int)b2, (int)a2); } - return new Color(255, 255, 255, 100); + return new Color(255, 255, 255, projectile.alpha); } public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) diff --git a/Projectiles/Boss/HolySpear.cs b/Projectiles/Boss/HolySpear.cs index 39e9b7c385..647903610c 100644 --- a/Projectiles/Boss/HolySpear.cs +++ b/Projectiles/Boss/HolySpear.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Projectiles.Boss projectile.ignoreWater = true; projectile.tileCollide = false; projectile.penetrate = -1; - projectile.alpha = 255; + projectile.alpha = 100; projectile.timeLeft = 900; cooldownSlot = 1; } @@ -80,16 +80,16 @@ namespace CalamityMod.Projectiles.Boss { projectile.localAI[1] += 5f; byte b2 = (byte)(((int)projectile.localAI[1]) * 3); - byte a2 = (byte)(100f * ((float)b2 / 255f)); + byte a2 = (byte)((float)projectile.alpha * ((float)b2 / 255f)); return new Color((int)b2, (int)b2, (int)b2, (int)a2); } if (projectile.timeLeft < 85) { byte b2 = (byte)(projectile.timeLeft * 3); - byte a2 = (byte)(100f * ((float)b2 / 255f)); + byte a2 = (byte)((float)projectile.alpha * ((float)b2 / 255f)); return new Color((int)b2, (int)b2, (int)b2, (int)a2); } - return new Color(255, 255, 255, 100); + return new Color(255, 255, 255, projectile.alpha); } public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) diff --git a/Projectiles/Boss/IchorShot.cs b/Projectiles/Boss/IchorShot.cs index 38ef9051c0..dcf761be79 100644 --- a/Projectiles/Boss/IchorShot.cs +++ b/Projectiles/Boss/IchorShot.cs @@ -19,12 +19,16 @@ namespace CalamityMod.Projectiles.Boss projectile.width = 6; projectile.height = 6; projectile.hostile = true; + projectile.tileCollide = false; projectile.timeLeft = 420; projectile.penetrate = 1; } public override void AI() { + if (projectile.timeLeft < 300) + projectile.tileCollide = true; + projectile.frameCounter++; if (projectile.frameCounter > 4) { @@ -35,10 +39,13 @@ namespace CalamityMod.Projectiles.Boss { projectile.frame = 0; } + projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f; + int num469 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 170, 0f, 0f, 100, default(Color), 0.5f); Main.dust[num469].noGravity = true; Main.dust[num469].velocity *= 0f; + projectile.velocity.Y = projectile.velocity.Y + 0.06f; projectile.velocity.X *= 0.995f; } diff --git a/Projectiles/Boss/InfernadoRevenge.cs b/Projectiles/Boss/InfernadoRevenge.cs index 906a8eb106..5c5a1c73f0 100644 --- a/Projectiles/Boss/InfernadoRevenge.cs +++ b/Projectiles/Boss/InfernadoRevenge.cs @@ -5,6 +5,7 @@ using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.DataStructures; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Boss { diff --git a/Projectiles/Boss/LeviathanBomb.cs b/Projectiles/Boss/LeviathanBomb.cs index 6f04fcf0d3..cde9e86380 100644 --- a/Projectiles/Boss/LeviathanBomb.cs +++ b/Projectiles/Boss/LeviathanBomb.cs @@ -68,6 +68,7 @@ namespace CalamityMod.Projectiles.Boss public override void Kill(int timeLeft) { Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 14); + projectile.Damage(); for (int num621 = 0; num621 < 20; num621++) { int num622 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 244, 0f, 0f, 100, default(Color), 2f); diff --git a/Projectiles/Boss/PhantomBlast.cs b/Projectiles/Boss/PhantomBlast.cs index f54e9d5349..09099deb45 100644 --- a/Projectiles/Boss/PhantomBlast.cs +++ b/Projectiles/Boss/PhantomBlast.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Projectiles.Boss projectile.height = 18; projectile.hostile = true; projectile.alpha = 255; - projectile.penetrate = 1; + projectile.penetrate = -1; projectile.tileCollide = false; cooldownSlot = 1; } diff --git a/Projectiles/Boss/PhantomBlast2.cs b/Projectiles/Boss/PhantomBlast2.cs index 288ae60528..87c74cef9b 100644 --- a/Projectiles/Boss/PhantomBlast2.cs +++ b/Projectiles/Boss/PhantomBlast2.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Projectiles.Boss projectile.height = 18; projectile.hostile = true; projectile.alpha = 255; - projectile.penetrate = 1; + projectile.penetrate = -1; projectile.tileCollide = false; cooldownSlot = 1; } diff --git a/Projectiles/Boss/PlagueStingerGoliath.cs b/Projectiles/Boss/PlagueStingerGoliath.cs index 1c060d1b20..bd40854d8e 100644 --- a/Projectiles/Boss/PlagueStingerGoliath.cs +++ b/Projectiles/Boss/PlagueStingerGoliath.cs @@ -1,4 +1,5 @@ -using Microsoft.Xna.Framework; +using System; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ModLoader; @@ -16,17 +17,35 @@ namespace CalamityMod.Projectiles.Boss { projectile.width = 10; projectile.height = 10; - projectile.aiStyle = 1; projectile.hostile = true; projectile.penetrate = -1; - projectile.tileCollide = true; + projectile.tileCollide = false; projectile.timeLeft = 300; - aiType = 270; } public override void AI() { - projectile.velocity.X *= 1.01f; + if (projectile.position.Y > projectile.ai[1]) + projectile.tileCollide = true; + + projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f; + + int num123 = (int)Player.FindClosest(projectile.Center, 1, 1); + projectile.ai[0] += 1f; + if (projectile.ai[0] < 110f && projectile.ai[0] > 30f) + { + float scaleFactor2 = projectile.velocity.Length(); + Vector2 vector17 = Main.player[num123].Center - projectile.Center; + vector17.Normalize(); + vector17 *= scaleFactor2; + projectile.velocity = (projectile.velocity * 24f + vector17) / 25f; + projectile.velocity.Normalize(); + projectile.velocity *= scaleFactor2; + } + if (projectile.velocity.Length() < 18f) + { + projectile.velocity *= 1.02f; + } } public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) diff --git a/Projectiles/Boss/PlagueStingerGoliath.png b/Projectiles/Boss/PlagueStingerGoliath.png index 64ff0163a6..1d5914c74b 100644 Binary files a/Projectiles/Boss/PlagueStingerGoliath.png and b/Projectiles/Boss/PlagueStingerGoliath.png differ diff --git a/Projectiles/Boss/PlagueStingerGoliathGlow.png b/Projectiles/Boss/PlagueStingerGoliathGlow.png index a4b66710ce..df70e47dec 100644 Binary files a/Projectiles/Boss/PlagueStingerGoliathGlow.png and b/Projectiles/Boss/PlagueStingerGoliathGlow.png differ diff --git a/Projectiles/Boss/PlagueStingerGoliathV2.cs b/Projectiles/Boss/PlagueStingerGoliathV2.cs index a85710da37..9012aa0f1c 100644 --- a/Projectiles/Boss/PlagueStingerGoliathV2.cs +++ b/Projectiles/Boss/PlagueStingerGoliathV2.cs @@ -17,17 +17,18 @@ namespace CalamityMod.Projectiles.Boss { projectile.width = 10; projectile.height = 10; - projectile.aiStyle = 0; - aiType = 55; projectile.hostile = true; projectile.penetrate = -1; projectile.extraUpdates = 2; - projectile.tileCollide = true; - projectile.timeLeft = 1200; + projectile.tileCollide = false; + projectile.timeLeft = 300; } public override void AI() { + if (projectile.position.Y > projectile.ai[1]) + projectile.tileCollide = true; + projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f; } diff --git a/Projectiles/Boss/ProfanedSpear.cs b/Projectiles/Boss/ProfanedSpear.cs index 037312487e..71def3dac3 100644 --- a/Projectiles/Boss/ProfanedSpear.cs +++ b/Projectiles/Boss/ProfanedSpear.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Projectiles.Boss projectile.height = 38; projectile.hostile = true; projectile.tileCollide = false; - projectile.penetrate = 1; + projectile.penetrate = -1; projectile.alpha = 255; projectile.timeLeft = 300; cooldownSlot = 1; diff --git a/Projectiles/Boss/ProvidenceCrystal.cs b/Projectiles/Boss/ProvidenceCrystal.cs index ecf0db2513..fca5d2bce6 100644 --- a/Projectiles/Boss/ProvidenceCrystal.cs +++ b/Projectiles/Boss/ProvidenceCrystal.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Projectiles.Boss { public class ProvidenceCrystal : ModProjectile { - private float speedX = -15f; + private float speedX = -21f; private float speedY = -3f; public override void SetStaticDefaults() @@ -93,16 +93,14 @@ namespace CalamityMod.Projectiles.Boss projectile.netUpdate = true; if (projectile.owner == Main.myPlayer) { - int num31; - for (int num1083 = 0; num1083 < 10; num1083 = num31 + 1) + for (int num1083 = 0; num1083 < 14; num1083++) { float x4 = Main.rgbToHsl(new Color(255, 200, Main.DiscoB)).X; Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, speedX, speedY, mod.ProjectileType("ProvidenceCrystalShard"), projectile.damage, projectile.knockBack, projectile.owner, x4, (float)projectile.whoAmI); - num31 = num1083; - speedX += 3f; + speedX += 3f; // -21, -18, -15, -12, -9, -6, -3, 0, 3, 6, 9, 12, 15, 18, 21 } } - speedX = -15f; + speedX = -21f; } } diff --git a/Projectiles/Boss/ProvidenceCrystalShard.cs b/Projectiles/Boss/ProvidenceCrystalShard.cs index 2564337936..ecc138575b 100644 --- a/Projectiles/Boss/ProvidenceCrystalShard.cs +++ b/Projectiles/Boss/ProvidenceCrystalShard.cs @@ -3,6 +3,7 @@ using System.IO; using Microsoft.Xna.Framework; using Terraria; using Terraria.ModLoader; +using CalamityMod.World; namespace CalamityMod.Projectiles.Boss { @@ -39,7 +40,7 @@ namespace CalamityMod.Projectiles.Boss public override void AI() { - if (projectile.timeLeft < 480) + if (projectile.timeLeft < 300) { projectile.tileCollide = true; } @@ -64,9 +65,10 @@ namespace CalamityMod.Projectiles.Boss else { projectile.velocity.Y *= 1.06f; - if (projectile.velocity.Y > 3f) + float fallSpeed = CalamityWorld.revenge ? 3.5f : 3f; + if (projectile.velocity.Y > fallSpeed) { - projectile.velocity.Y = 3f; + projectile.velocity.Y = fallSpeed; } } if (projectile.velocity.Y > -0.5f && projectile.localAI[1] == 0f) diff --git a/Projectiles/Boss/ProvidenceHolyRay.cs b/Projectiles/Boss/ProvidenceHolyRay.cs index 3687f848be..e46aa75917 100644 --- a/Projectiles/Boss/ProvidenceHolyRay.cs +++ b/Projectiles/Boss/ProvidenceHolyRay.cs @@ -5,6 +5,7 @@ using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ModLoader; using Terraria.Enums; +using CalamityMod.World; namespace CalamityMod.Projectiles.Boss { @@ -42,47 +43,56 @@ namespace CalamityMod.Projectiles.Boss public override void AI() { Vector2? vector78 = null; + if (projectile.velocity.HasNaNs() || projectile.velocity == Vector2.Zero) { projectile.velocity = -Vector2.UnitY; } + if (Main.npc[(int)projectile.ai[1]].active && Main.npc[(int)projectile.ai[1]].type == mod.NPCType("Providence")) { Vector2 value21 = new Vector2(27f, 59f); - Vector2 fireFrom = new Vector2(Main.npc[(int)projectile.ai[1]].Center.X, Main.npc[(int)projectile.ai[1]].Center.Y - 16f); + Vector2 fireFrom = new Vector2(Main.npc[(int)projectile.ai[1]].Center.X, Main.npc[(int)projectile.ai[1]].Center.Y - 32f); Vector2 value22 = Utils.Vector2FromElipse(Main.npc[(int)projectile.ai[1]].localAI[0].ToRotationVector2(), value21 * Main.npc[(int)projectile.ai[1]].localAI[1]); projectile.position = fireFrom + value22 - new Vector2((float)projectile.width, (float)projectile.height) / 2f; } + if (projectile.velocity.HasNaNs() || projectile.velocity == Vector2.Zero) { projectile.velocity = -Vector2.UnitY; } + float num801 = 1f; projectile.localAI[0] += 1f; - if (projectile.localAI[0] >= 180f) + if (projectile.localAI[0] >= ((CalamityWorld.revenge || CalamityWorld.bossRushActive) ? 100f : 180f)) { projectile.Kill(); return; } - projectile.scale = (float)Math.Sin((double)(projectile.localAI[0] * 3.14159274f / 180f)) * 10f * num801; + + projectile.scale = (float)Math.Sin((double)(projectile.localAI[0] * 3.14159274f / ((CalamityWorld.revenge || CalamityWorld.bossRushActive) ? 100f : 180f))) * 10f * num801; if (projectile.scale > num801) { projectile.scale = num801; } + float num804 = projectile.velocity.ToRotation(); num804 += projectile.ai[0]; projectile.rotation = num804 - 1.57079637f; projectile.velocity = num804.ToRotationVector2(); + float num805 = 3f; //3f float num806 = (float)projectile.width; + Vector2 samplingPoint = projectile.Center; if (vector78.HasValue) { samplingPoint = vector78.Value; } + float[] array3 = new float[(int)num805]; Collision.LaserScan(samplingPoint, projectile.velocity, num806 * projectile.scale, 2400f, array3); - float num807 = 0f; //0f + float num807 = 0f; int num3; for (int num808 = 0; num808 < array3.Length; num808 = num3 + 1) { @@ -90,6 +100,13 @@ namespace CalamityMod.Projectiles.Boss num3 = num808; } num807 /= num805; + + // Fire laser through walls at max length if target cannot be seen + if (!Collision.CanHitLine(Main.npc[(int)projectile.ai[1]].Center, 1, 1, Main.player[Main.npc[(int)projectile.ai[1]].target].Center, 1, 1)) + { + num807 = 2400f; + } + float amount = 0.5f; //0.5f projectile.localAI[1] = MathHelper.Lerp(projectile.localAI[1], num807, amount); //length of laser, linear interpolation Vector2 vector79 = projectile.Center + projectile.velocity * (projectile.localAI[1] - 14f); @@ -103,6 +120,7 @@ namespace CalamityMod.Projectiles.Boss Main.dust[num812].scale = 1.7f; num3 = num809; } + if (Main.rand.Next(5) == 0) { Vector2 value29 = projectile.velocity.RotatedBy(1.5707963705062866, default(Vector2)) * ((float)Main.rand.NextDouble() - 0.5f) * (float)projectile.width; @@ -111,6 +129,7 @@ namespace CalamityMod.Projectiles.Boss dust.velocity *= 0.5f; Main.dust[num813].velocity.Y = -Math.Abs(Main.dust[num813].velocity.Y); } + DelegateMethods.v3_1 = new Vector3(0.3f, 0.65f, 0.7f); Utils.PlotTileLine(projectile.Center, projectile.Center + projectile.velocity * projectile.localAI[1], (float)projectile.width * projectile.scale, new Utils.PerLinePoint(DelegateMethods.CastLight)); } diff --git a/Projectiles/Boss/RedLightningFeather.cs b/Projectiles/Boss/RedLightningFeather.cs index 950688f80a..89ca444082 100644 --- a/Projectiles/Boss/RedLightningFeather.cs +++ b/Projectiles/Boss/RedLightningFeather.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Projectiles.Boss projectile.hostile = true; projectile.ignoreWater = true; projectile.tileCollide = false; - projectile.penetrate = 1; + projectile.penetrate = -1; projectile.timeLeft = 1200; cooldownSlot = 1; } @@ -41,6 +41,7 @@ namespace CalamityMod.Projectiles.Boss { projectile.frame = 0; } + if (projectile.velocity.X < 0f) { projectile.spriteDirection = -1; @@ -51,14 +52,15 @@ namespace CalamityMod.Projectiles.Boss projectile.spriteDirection = 1; projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X); } + Lighting.AddLight(projectile.Center, 0.7f, 0f, 0f); + projectile.ai[0] += 1f; - if (projectile.ai[0] >= 150f) + if (projectile.ai[0] >= 120f) { - projectile.extraUpdates = 1; int num103 = (int)Player.FindClosest(projectile.Center, 1, 1); projectile.ai[1] += 1f; - if (projectile.ai[1] < 180f) + if (projectile.ai[1] < 120f) { float scaleFactor2 = projectile.velocity.Length(); Vector2 vector11 = Main.player[num103].Center - projectile.Center; @@ -68,10 +70,14 @@ namespace CalamityMod.Projectiles.Boss projectile.velocity.Normalize(); projectile.velocity *= scaleFactor2; } - else if (Math.Abs(projectile.velocity.X) + Math.Abs(projectile.velocity.Y) < 18f) + else { - projectile.velocity.X *= 1.01f; - projectile.velocity.Y *= 1.01f; + projectile.tileCollide = true; + if (Math.Abs(projectile.velocity.X) + Math.Abs(projectile.velocity.Y) < 18f) + { + projectile.velocity.X *= 1.01f; + projectile.velocity.Y *= 1.01f; + } } } } diff --git a/Projectiles/Boss/SandPoisonCloud.cs b/Projectiles/Boss/SandPoisonCloud.cs index 7327507817..544c4b6614 100644 --- a/Projectiles/Boss/SandPoisonCloud.cs +++ b/Projectiles/Boss/SandPoisonCloud.cs @@ -22,11 +22,13 @@ namespace CalamityMod.Projectiles.Boss projectile.penetrate = -1; projectile.tileCollide = false; projectile.ignoreWater = true; - projectile.timeLeft = 3600; + projectile.timeLeft = CalamityWorld.death ? 2100 : 1500; } public override void AI() { + Lighting.AddLight(projectile.Center, 0.5f, 0.3f, 0f); + projectile.frameCounter++; if (projectile.frameCounter > 9) { @@ -37,9 +39,10 @@ namespace CalamityMod.Projectiles.Boss { projectile.frame = 0; } + projectile.velocity *= 0.99f; - projectile.ai[0] += 1f; - if (projectile.ai[0] >= (CalamityWorld.death ? 2100f : 1500f)) + + if (projectile.timeLeft < 180) { if (projectile.alpha < 255) { @@ -47,19 +50,16 @@ namespace CalamityMod.Projectiles.Boss if (projectile.alpha > 255) { projectile.alpha = 255; + projectile.Kill(); } } - else if (projectile.owner == Main.myPlayer) - { - projectile.Kill(); - } } - else if (projectile.alpha > 80) + else if (projectile.alpha > 30) { projectile.alpha -= 30; - if (projectile.alpha < 80) + if (projectile.alpha < 30) { - projectile.alpha = 80; + projectile.alpha = 30; } } } diff --git a/Projectiles/Boss/ScavengerLaser.cs b/Projectiles/Boss/ScavengerLaser.cs index d823590a90..25a9a6bdec 100644 --- a/Projectiles/Boss/ScavengerLaser.cs +++ b/Projectiles/Boss/ScavengerLaser.cs @@ -182,7 +182,7 @@ namespace CalamityMod.Projectiles.Boss { Main.PlaySound(29, (int)projectile.position.X, (int)projectile.position.Y, 103, 1f, 0f); projectile.position = projectile.Center; - projectile.width = (projectile.height = 72); + 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 < 2; num193++) diff --git a/Projectiles/Boss/ScavengerNuke.cs b/Projectiles/Boss/ScavengerNuke.cs index 10f82ff239..6cba43636c 100644 --- a/Projectiles/Boss/ScavengerNuke.cs +++ b/Projectiles/Boss/ScavengerNuke.cs @@ -78,7 +78,6 @@ namespace CalamityMod.Projectiles.Boss vector102 = Vector2.UnitY; } projectile.velocity = (projectile.velocity * (num953 - 1f) + vector102 * scaleFactor12) / num953; - return; } } else @@ -91,7 +90,6 @@ namespace CalamityMod.Projectiles.Boss { projectile.ai[0] = -1f; projectile.netUpdate = true; - return; } } } @@ -107,10 +105,10 @@ namespace CalamityMod.Projectiles.Boss 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 = 100; - projectile.height = 100; + projectile.width = (projectile.height = 160); projectile.position.X = projectile.position.X - (float)(projectile.width / 2); projectile.position.Y = projectile.position.Y - (float)(projectile.height / 2); + projectile.Damage(); for (int num621 = 0; num621 < 30; num621++) { int num622 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 244, 0f, 0f, 100, default(Color), 2f); diff --git a/Projectiles/Boss/ShaderainHostile.cs b/Projectiles/Boss/ShaderainHostile.cs index 4854a1ffcb..d1d5d09236 100644 --- a/Projectiles/Boss/ShaderainHostile.cs +++ b/Projectiles/Boss/ShaderainHostile.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Projectiles.Boss projectile.height = 40; projectile.hostile = true; projectile.extraUpdates = 1; - projectile.penetrate = 1; + projectile.penetrate = -1; projectile.ignoreWater = true; projectile.timeLeft = 300; } diff --git a/Projectiles/Boss/SignusScythe.cs b/Projectiles/Boss/SignusScythe.cs index e8f4c99f19..93c85e587d 100644 --- a/Projectiles/Boss/SignusScythe.cs +++ b/Projectiles/Boss/SignusScythe.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Projectiles.Boss projectile.tileCollide = false; projectile.ignoreWater = true; projectile.timeLeft = 600; - projectile.alpha = 255; + projectile.alpha = 100; projectile.penetrate = -1; cooldownSlot = 1; } @@ -97,14 +97,6 @@ namespace CalamityMod.Projectiles.Boss } } } - if (projectile.alpha > 0) - { - projectile.alpha -= 25; - if (projectile.alpha < 0) - { - projectile.alpha = 0; - } - } } public override Color? GetAlpha(Color lightColor) diff --git a/Projectiles/Boss/SirenSong.cs b/Projectiles/Boss/SirenSong.cs index 4b7a4c715f..462b7f1bdb 100644 --- a/Projectiles/Boss/SirenSong.cs +++ b/Projectiles/Boss/SirenSong.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Projectiles.Boss projectile.width = 26; projectile.height = 58; projectile.hostile = true; - projectile.penetrate = 1; + projectile.penetrate = -1; projectile.timeLeft = 1800; } diff --git a/Projectiles/Boss/WaterSpear.cs b/Projectiles/Boss/WaterSpear.cs index 969ac20644..8223b2a85f 100644 --- a/Projectiles/Boss/WaterSpear.cs +++ b/Projectiles/Boss/WaterSpear.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Projectiles.Boss projectile.height = 14; projectile.hostile = true; projectile.ignoreWater = true; - projectile.penetrate = 1; + projectile.penetrate = -1; projectile.timeLeft = 300; projectile.alpha = 255; } diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index b8f639091d..5a7a45fa37 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -5,6 +5,8 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.CalPlayer; +using CalamityMod.Utilities; namespace CalamityMod.Projectiles { @@ -18,11 +20,11 @@ namespace CalamityMod.Projectiles } } - //Class Types + // Class Types public bool rogue = false; public bool trueMelee = false; - //Force Class Types + // Force Class Types public bool forceMelee = false; public bool forceRanged = false; public bool forceMagic = false; @@ -30,13 +32,16 @@ namespace CalamityMod.Projectiles public bool forceMinion = false; public bool forceHostile = false; - //Damage Adjusters + // Damage Adjusters private bool setDamageValues = true; public float spawnedPlayerMinionDamageValue = 1f; public int spawnedPlayerMinionProjectileDamageValue = 0; public int defDamage = 0; - //Counters and Timers + // Iron Heart + public int ironHeartDamage = 0; + + // Counters and Timers private int counter = 0; private int counter2 = 0; @@ -119,8 +124,8 @@ namespace CalamityMod.Projectiles projectile.tileCollide = false; - if (projectile.timeLeft > 180) - projectile.timeLeft = 180; + if (projectile.timeLeft > 300) + projectile.timeLeft = 300; projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f; @@ -128,6 +133,138 @@ namespace CalamityMod.Projectiles projectile.velocity.Y = 16f; return false; } + else if (projectile.type == ProjectileID.SharknadoBolt) + { + // Phase 1 sharknado + if (projectile.ai[1] < 0f) + { + float num623 = 0.209439516f; + float num624 = -2f; + float num625 = (float)(Math.Cos((double)(num623 * projectile.ai[0])) - 0.5) * num624; + + projectile.velocity.Y = projectile.velocity.Y - num625; + + projectile.ai[0] += 1f; + + num625 = (float)(Math.Cos((double)(num623 * projectile.ai[0])) - 0.5) * num624; + + projectile.velocity.Y = projectile.velocity.Y + num625; + + projectile.localAI[0] += 1f; + if (projectile.localAI[0] > 10f) + { + projectile.alpha -= 5; + if (projectile.alpha < 100) + projectile.alpha = 100; + + projectile.rotation += projectile.velocity.X * 0.1f; + projectile.frame = (int)(projectile.localAI[0] / 3f) % 3; + } + return false; + } + } + + // Large cthulhunadoes + else if (projectile.type == ProjectileID.Cthulunado) + { + int num606 = 16; + int num607 = 16; + float num608 = 2f; + int num609 = 150; + int num610 = 42; + + if (projectile.velocity.X != 0f) + projectile.direction = (projectile.spriteDirection = -Math.Sign(projectile.velocity.X)); + + int num3 = projectile.frameCounter; + projectile.frameCounter = num3 + 1; + if (projectile.frameCounter > 2) + { + num3 = projectile.frame; + projectile.frame = num3 + 1; + projectile.frameCounter = 0; + } + if (projectile.frame >= 6) + projectile.frame = 0; + + if (projectile.localAI[0] == 0f && Main.myPlayer == projectile.owner) + { + projectile.localAI[0] = 1f; + projectile.position.X = projectile.position.X + (float)(projectile.width / 2); + projectile.position.Y = projectile.position.Y + (float)(projectile.height / 2); + projectile.scale = ((float)(num606 + num607) - projectile.ai[1]) * num608 / (float)(num607 + num606); + projectile.width = (int)((float)num609 * projectile.scale); + projectile.height = (int)((float)num610 * projectile.scale); + projectile.position.X = projectile.position.X - (float)(projectile.width / 2); + projectile.position.Y = projectile.position.Y - (float)(projectile.height / 2); + projectile.netUpdate = true; + } + + if (projectile.ai[1] != -1f) + { + projectile.scale = ((float)(num606 + num607) - projectile.ai[1]) * num608 / (float)(num607 + num606); + projectile.width = (int)((float)num609 * projectile.scale); + projectile.height = (int)((float)num610 * projectile.scale); + } + + if (!Collision.SolidCollision(projectile.position, projectile.width, projectile.height)) + { + projectile.alpha -= 30; + if (projectile.alpha < 60) + projectile.alpha = 60; + + if (projectile.alpha < 100) + projectile.alpha = 100; + } + else + { + projectile.alpha += 30; + if (projectile.alpha > 150) + projectile.alpha = 150; + } + + if (projectile.ai[0] > 0f) + projectile.ai[0] -= 1f; + + if (projectile.ai[0] == 1f && projectile.ai[1] > 0f && projectile.owner == Main.myPlayer) + { + projectile.netUpdate = true; + + Vector2 center = projectile.Center; + center.Y -= (float)num610 * projectile.scale / 2f; + + float num611 = ((float)(num606 + num607) - projectile.ai[1] + 1f) * num608 / (float)(num607 + num606); + center.Y -= (float)num610 * num611 / 2f; + center.Y += 2f; + + Projectile.NewProjectile(center.X, center.Y, projectile.velocity.X, projectile.velocity.Y, projectile.type, projectile.damage, projectile.knockBack, projectile.owner, 10f, projectile.ai[1] - 1f); + + if ((int)projectile.ai[1] % 3 == 0 && projectile.ai[1] != 0f) + { + int num614 = NPC.NewNPC((int)center.X, (int)center.Y, NPCID.Sharkron2, 0, 0f, 0f, 0f, 0f, 255); + Main.npc[num614].velocity = projectile.velocity; + Main.npc[num614].scale = 1.5f; + Main.npc[num614].netUpdate = true; + Main.npc[num614].ai[2] = (float)projectile.width; + Main.npc[num614].ai[3] = -1.5f; + } + } + + if (projectile.ai[0] <= 0f) + { + float num615 = 0.104719758f; + float num616 = ((float)projectile.width / 5f) * 2.5f; + float num617 = (float)(Math.Cos((double)(num615 * -(double)projectile.ai[0])) - 0.5) * num616; + + projectile.position.X = projectile.position.X - num617 * (float)(-(float)projectile.direction); + + projectile.ai[0] -= 1f; + + num617 = (float)(Math.Cos((double)(num615 * -(double)projectile.ai[0])) - 0.5) * num616; + projectile.position.X = projectile.position.X + num617 * (float)(-(float)projectile.direction); + } + return false; + } } return true; } @@ -160,6 +297,12 @@ namespace CalamityMod.Projectiles projectile.damage = defDamage + 120; } + // Iron Heart damage variable will scale with projectile.damage + if (CalamityWorld.ironHeart) + { + ironHeartDamage = 0; + } + if (projectile.modProjectile != null && projectile.modProjectile.mod.Name.Equals("CalamityMod")) goto SKIP_CALAMITY; @@ -273,23 +416,16 @@ namespace CalamityMod.Projectiles { float spread = 180f * 0.0174f; double startAngle = Math.Atan2(projectile.velocity.X, projectile.velocity.Y) - spread / 2; - double deltaAngle = spread / 8f; - double offsetAngle; - int i; - for (i = 0; i < 1; i++) + if (projectile.owner == Main.myPlayer) { - offsetAngle = (startAngle + deltaAngle * (i + i * i) / 2f) + 32f * i; - if (projectile.owner == Main.myPlayer) - { - int projectile1 = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 8f), (float)(Math.Cos(offsetAngle) * 8f), projectile.type, (int)((double)projectile.damage * 0.5), projectile.knockBack, projectile.owner, 0f, 0f); - int projectile2 = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 8f), (float)(-Math.Cos(offsetAngle) * 8f), projectile.type, (int)((double)projectile.damage * 0.5), projectile.knockBack, projectile.owner, 0f, 0f); - Main.projectile[projectile1].ranged = false; - Main.projectile[projectile2].ranged = false; - Main.projectile[projectile1].timeLeft = 60; - Main.projectile[projectile2].timeLeft = 60; - Main.projectile[projectile1].noDropItem = true; - Main.projectile[projectile2].noDropItem = true; - } + int projectile1 = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, (float)(Math.Sin(startAngle) * 8f), (float)(Math.Cos(startAngle) * 8f), projectile.type, (int)((double)projectile.damage * 0.5), projectile.knockBack, projectile.owner, 0f, 0f); + int projectile2 = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, (float)(-Math.Sin(startAngle) * 8f), (float)(-Math.Cos(startAngle) * 8f), projectile.type, (int)((double)projectile.damage * 0.5), projectile.knockBack, projectile.owner, 0f, 0f); + Main.projectile[projectile1].ranged = false; + Main.projectile[projectile2].ranged = false; + Main.projectile[projectile1].timeLeft = 60; + Main.projectile[projectile2].timeLeft = 60; + Main.projectile[projectile1].noDropItem = true; + Main.projectile[projectile2].noDropItem = true; } } } @@ -594,10 +730,10 @@ namespace CalamityMod.Projectiles } value15.Normalize(); value15 *= (float)Main.rand.Next(70, 101) * 0.1f; - int newDamage = (int)((double)projectile.damage * 0.25); - if (newDamage > 40) + int newDamage = (int)((double)projectile.damage * 0.15); + if (newDamage > 20) { - newDamage = 40; + newDamage = 20; } int proj = Projectile.NewProjectile(projectile.oldPosition.X + (float)(projectile.width / 2), projectile.oldPosition.Y + (float)(projectile.height / 2), value15.X, value15.Y, 569 + Main.rand.Next(3), newDamage, 0f, projectile.owner, 0f, 0f); Main.projectile[proj].usesLocalNPCImmunity = true; diff --git a/Projectiles/Magic/AetherBeam.cs b/Projectiles/Magic/AetherBeam.cs index 20a7197284..257ddb1f00 100644 --- a/Projectiles/Magic/AetherBeam.cs +++ b/Projectiles/Magic/AetherBeam.cs @@ -41,7 +41,7 @@ namespace CalamityMod.Projectiles.Magic projectile.tileCollide = false; projectile.ai[1] = 0f; } - projectile.damage += 5; + projectile.damage += projectile.GetGlobalProjectile(mod).defDamage / 200; if (projectile.alpha > 0) { projectile.alpha -= 25; diff --git a/Projectiles/Magic/BloodBlast.cs b/Projectiles/Magic/BloodBlast.cs index 123c90fdcc..16cbcea54b 100644 --- a/Projectiles/Magic/BloodBlast.cs +++ b/Projectiles/Magic/BloodBlast.cs @@ -27,8 +27,8 @@ namespace CalamityMod.Projectiles.Magic public override void AI() { - Lighting.AddLight(projectile.Center, ((255 - projectile.alpha) * 0.5f) / 255f, ((255 - projectile.alpha) * 0f) / 255f, ((255 - projectile.alpha) * 0f) / 255f); - for (int num92 = 0; num92 < 3; num92++) + Lighting.AddLight(projectile.Center, 0.5f, 0f, 0f); + for (int num92 = 0; num92 < 2; num92++) { float num93 = projectile.velocity.X / 3f * (float)num92; float num94 = projectile.velocity.Y / 3f * (float)num92; diff --git a/Projectiles/Magic/BlueBubble.cs b/Projectiles/Magic/BlueBubble.cs index 0e6acba0c3..195f6a8d67 100644 --- a/Projectiles/Magic/BlueBubble.cs +++ b/Projectiles/Magic/BlueBubble.cs @@ -1,4 +1,5 @@ -using Microsoft.Xna.Framework; +using System; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ModLoader; @@ -56,7 +57,40 @@ namespace CalamityMod.Projectiles.Magic { projectile.timeLeft = 120; } - } + float num472 = projectile.Center.X; + float num473 = projectile.Center.Y; + float num474 = 150f; + 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 = 8f; + 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; + } + } public override void Kill(int timeLeft) { diff --git a/Projectiles/Magic/HolyLaser.cs b/Projectiles/Magic/HolyLaser.cs index 146ed75b0c..0da6b4e7ee 100644 --- a/Projectiles/Magic/HolyLaser.cs +++ b/Projectiles/Magic/HolyLaser.cs @@ -52,7 +52,7 @@ namespace CalamityMod.Projectiles.Magic { if (projectile.owner == Main.myPlayer) { - int proj = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, 612, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); + int proj = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, 612, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0.85f + Main.rand.NextFloat() * 1.15f); Main.projectile[proj].GetGlobalProjectile(mod).forceMagic = true; } } diff --git a/Projectiles/Magic/SolarBeam2.cs b/Projectiles/Magic/SolarBeam2.cs index 4d03eaba7e..ed75fdd9c6 100644 --- a/Projectiles/Magic/SolarBeam2.cs +++ b/Projectiles/Magic/SolarBeam2.cs @@ -67,7 +67,7 @@ namespace CalamityMod.Projectiles.Magic target.immune[projectile.owner] = 4; if (projectile.owner == Main.myPlayer) { - int proj = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, 612, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); + int proj = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, 612, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0.85f + Main.rand.NextFloat() * 1.15f); Main.projectile[proj].GetGlobalProjectile(mod).forceMagic = true; } } diff --git a/Projectiles/Magic/UberBubble.cs b/Projectiles/Magic/UberBubble.cs index 0e4d4589a1..c0c5e21f4c 100644 --- a/Projectiles/Magic/UberBubble.cs +++ b/Projectiles/Magic/UberBubble.cs @@ -67,7 +67,7 @@ namespace CalamityMod.Projectiles.Magic { for (int numBubbles = 0; numBubbles <= (Main.rand.Next(3, 7)); numBubbles++) { - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X * (Main.rand.NextFloat() * 3f), projectile.velocity.Y * (Main.rand.NextFloat() * 3f), mod.ProjectileType("BlueBubble"), projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X * (Main.rand.NextFloat() * 2f), projectile.velocity.Y * (Main.rand.NextFloat() * 2f), mod.ProjectileType("BlueBubble"), projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); } } } diff --git a/Projectiles/Melee/AegisBeam.cs b/Projectiles/Melee/AegisBeam.cs index d52fa4dc6a..fef4f9c107 100644 --- a/Projectiles/Melee/AegisBeam.cs +++ b/Projectiles/Melee/AegisBeam.cs @@ -1,5 +1,7 @@ -using Microsoft.Xna.Framework; +using System; +using Microsoft.Xna.Framework; using Terraria; +using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Projectiles.Melee @@ -18,28 +20,62 @@ namespace CalamityMod.Projectiles.Melee projectile.friendly = true; projectile.penetrate = 1; projectile.timeLeft = 120; + projectile.alpha = 255; projectile.melee = true; } public override void AI() { - Lighting.AddLight(projectile.Center, ((255 - projectile.alpha) * 0.1f) / 255f, ((255 - projectile.alpha) * 0.1f) / 255f, ((255 - projectile.alpha) * 0f) / 255f); + Lighting.AddLight(projectile.Center, 0.25f, 0.25f, 0f); + projectile.rotation += 1f; + projectile.alpha -= 25; + if (projectile.alpha < 0) + { + projectile.alpha = 0; + } if (projectile.localAI[0] == 0f) { Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 73); projectile.localAI[0] += 1f; } - for (int num457 = 0; num457 < 5; num457++) - { - int num458 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 246, 0f, 0f, 100, new Color(255, Main.DiscoG, 53), 1.2f); - Main.dust[num458].noGravity = true; - Main.dust[num458].velocity *= 0.5f; - Main.dust[num458].velocity += projectile.velocity * 0.1f; - } + int num458 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 246, 0f, 0f, 100, new Color(255, Main.DiscoG, 53), 0.8f); + Main.dust[num458].noGravity = true; + Main.dust[num458].velocity *= 0.5f; + Main.dust[num458].velocity += projectile.velocity * 0.1f; } public override void Kill(int timeLeft) { + Main.PlaySound(SoundID.Item20, projectile.position); + 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 dust = 0; dust <= 30; dust++) + { + float num463 = (float)Main.rand.Next(-10, 11); + float num464 = (float)Main.rand.Next(-10, 11); + float num465 = (float)Main.rand.Next(3, 9); + 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, 246, 0f, 0f, 100, new Color(255, Main.DiscoG, 53), 1.2f); + 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; + } + projectile.maxPenetrate = -1; + projectile.penetrate = -1; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 10; + projectile.Damage(); int num251 = Main.rand.Next(2, 4); if (projectile.owner == Main.myPlayer) { diff --git a/Projectiles/Melee/AegisBeam.png b/Projectiles/Melee/AegisBeam.png index 6ea4de3903..d7ada24a8a 100644 Binary files a/Projectiles/Melee/AegisBeam.png and b/Projectiles/Melee/AegisBeam.png differ diff --git a/Projectiles/Melee/AegisFlame.cs b/Projectiles/Melee/AegisFlame.cs index 659d3a9832..6044caf11b 100644 --- a/Projectiles/Melee/AegisFlame.cs +++ b/Projectiles/Melee/AegisFlame.cs @@ -51,11 +51,6 @@ namespace CalamityMod.Projectiles.Melee projectile.velocity.Y = projectile.velocity.Y + 0.2f; } projectile.rotation += projectile.velocity.X * 0.1f; - if (projectile.ai[1] == 0f) - { - projectile.ai[1] = 1f; - Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 13); - } int num199 = Dust.NewDust(projectile.position, projectile.width, projectile.height, 246, 0f, 0f, 100, new Color(255, Main.DiscoG, 53), 1f); Dust expr_8976_cp_0 = Main.dust[num199]; expr_8976_cp_0.position.X = expr_8976_cp_0.position.X - 2f; diff --git a/Projectiles/Melee/CrystalDust.cs b/Projectiles/Melee/CrystalDust.cs index c7980095bc..0829662b9e 100644 --- a/Projectiles/Melee/CrystalDust.cs +++ b/Projectiles/Melee/CrystalDust.cs @@ -85,7 +85,7 @@ namespace CalamityMod.Projectiles.Melee double num828 = Math.Sqrt((double)(num826 * num826 + num827 * num827)); if (num828 < (double)num814) { - if (Main.tile[num824, num825] != null && Main.tile[num824, num825].active() && Main.tile[num824, num825].type != (ushort)mod.TileType("AbyssGravel")) + if (Main.tile[num824, num825] != null && Main.tile[num824, num825].active()) { WorldGen.KillTile(num824, num825, false, false, false); if (!Main.tile[num824, num825].active() && Main.netMode != 0) diff --git a/Projectiles/Melee/Cyclone.cs b/Projectiles/Melee/Cyclone.cs index f301155f15..fd437a1a7a 100644 --- a/Projectiles/Melee/Cyclone.cs +++ b/Projectiles/Melee/Cyclone.cs @@ -4,6 +4,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Melee { diff --git a/Projectiles/Melee/DNA.cs b/Projectiles/Melee/DNA.cs index 8014ecca15..e3510f34f8 100644 --- a/Projectiles/Melee/DNA.cs +++ b/Projectiles/Melee/DNA.cs @@ -2,6 +2,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Melee { diff --git a/Projectiles/Melee/DNA2.cs b/Projectiles/Melee/DNA2.cs index 1a2064718f..9e975c1c49 100644 --- a/Projectiles/Melee/DNA2.cs +++ b/Projectiles/Melee/DNA2.cs @@ -2,6 +2,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Melee { diff --git a/Projectiles/Melee/DepthOrb.cs b/Projectiles/Melee/DepthOrb.cs index 715b686925..cc457b4066 100644 --- a/Projectiles/Melee/DepthOrb.cs +++ b/Projectiles/Melee/DepthOrb.cs @@ -1,6 +1,8 @@ using System; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Terraria; +using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Projectiles.Melee @@ -9,37 +11,47 @@ namespace CalamityMod.Projectiles.Melee { public override void SetStaticDefaults() { - DisplayName.SetDefault("Orb"); + DisplayName.SetDefault("Beam"); } public override void SetDefaults() { - projectile.width = 12; - projectile.height = 12; - projectile.friendly = true; - projectile.ignoreWater = true; - projectile.timeLeft = 30; - projectile.penetrate = 1; - projectile.melee = true; - } + projectile.width = 20; + projectile.height = 20; + projectile.aiStyle = 27; + projectile.friendly = true; + projectile.melee = true; + projectile.ignoreWater = true; + projectile.penetrate = 1; + projectile.timeLeft = 30; + } - public override void AI() - { - Lighting.AddLight(projectile.Center, 0f, 0f, 0.65f); - for (int num457 = 0; num457 < 5; num457++) - { - int num458 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 33, 0f, 0f, 100, default(Color), 1.2f); - Main.dust[num458].noGravity = true; - Main.dust[num458].velocity *= 0.5f; - Main.dust[num458].velocity += projectile.velocity * 0.1f; - } - } + public override void AI() + { + Lighting.AddLight(projectile.Center, 0f, 0f, 0.5f); + int num458 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 33, 0f, 0f, 100, default(Color), 0.6f); + Main.dust[num458].noGravity = true; + Main.dust[num458].velocity *= 0.5f; + Main.dust[num458].velocity += projectile.velocity * 0.1f; + } - public override void Kill(int timeLeft) + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + Texture2D tex = Main.projectileTexture[projectile.type]; + spriteBatch.Draw(tex, projectile.Center - Main.screenPosition, null, projectile.GetAlpha(lightColor), projectile.rotation, tex.Size() / 2f, projectile.scale, SpriteEffects.None, 0f); + return false; + } + + public override Color? GetAlpha(Color lightColor) + { + return new Color(50, 50, 255, projectile.alpha); + } + + public override void Kill(int timeLeft) { - Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 21); + Main.PlaySound(SoundID.Item10, projectile.position); projectile.position = projectile.Center; - projectile.width = (projectile.height = 60); + 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 dust = 0; dust < 30; dust++) @@ -62,6 +74,10 @@ namespace CalamityMod.Projectiles.Melee Main.dust[num467].velocity.X = num463; Main.dust[num467].velocity.Y = num464; } + projectile.maxPenetrate = -1; + projectile.penetrate = -1; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 10; projectile.Damage(); } diff --git a/Projectiles/Melee/DepthOrb.png b/Projectiles/Melee/DepthOrb.png index 04c5646fde..f56704ee79 100644 Binary files a/Projectiles/Melee/DepthOrb.png and b/Projectiles/Melee/DepthOrb.png differ diff --git a/Projectiles/Melee/DepthOrb2.cs b/Projectiles/Melee/DepthOrb2.cs index 2987f9be30..c39df1eaef 100644 --- a/Projectiles/Melee/DepthOrb2.cs +++ b/Projectiles/Melee/DepthOrb2.cs @@ -1,6 +1,8 @@ using System; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Terraria; +using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Projectiles.Melee @@ -9,43 +11,97 @@ namespace CalamityMod.Projectiles.Melee { public override void SetStaticDefaults() { - DisplayName.SetDefault("Orb"); + DisplayName.SetDefault("Beam"); } public override void SetDefaults() { - projectile.width = 6; - projectile.height = 6; - projectile.friendly = true; - projectile.ignoreWater = true; - projectile.timeLeft = 60; - projectile.penetrate = 1; - projectile.melee = true; + projectile.width = 20; + projectile.height = 20; + projectile.aiStyle = 27; + projectile.friendly = true; + projectile.melee = true; + projectile.penetrate = 1; + projectile.timeLeft = 120; + projectile.ignoreWater = true; + projectile.extraUpdates = 1; } public override void AI() { Lighting.AddLight(projectile.Center, 0f, 0f, 0.5f); - int num458 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 33, 0f, 0f, 100, default(Color), 0.8f); + int num458 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 33, 0f, 0f, 100, default(Color), 0.4f); Main.dust[num458].noGravity = true; Main.dust[num458].velocity *= 0.5f; Main.dust[num458].velocity += projectile.velocity * 0.1f; - } + float num472 = projectile.Center.X; + float num473 = projectile.Center.Y; + float num474 = 400f; + 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 = 12f; + 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; + } + } - public override void Kill(int timeLeft) + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + if (projectile.timeLeft > 115) + return false; + + Texture2D tex = Main.projectileTexture[projectile.type]; + spriteBatch.Draw(tex, projectile.Center - Main.screenPosition, null, projectile.GetAlpha(lightColor), projectile.rotation, tex.Size() / 2f, projectile.scale, SpriteEffects.None, 0f); + return false; + } + + public override Color? GetAlpha(Color lightColor) + { + return new Color(50, 50, 255, projectile.alpha); + } + + public override void Kill(int timeLeft) { - Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 21); - for (int dust = 0; dust <= 5; dust++) - { - float num463 = (float)Main.rand.Next(-10, 11); + Main.PlaySound(SoundID.Item10, projectile.position); + 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 dust = 0; dust <= 30; dust++) + { + float num463 = (float)Main.rand.Next(-10, 11); float num464 = (float)Main.rand.Next(-10, 11); float num465 = (float)Main.rand.Next(3, 9); 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, 33, 0f, 0f, 100, default(Color), 1.2f); - Main.dust[num467].noGravity = true; + int num467 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 33, 0f, 0f, 100, default(Color), 1.2f); + 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]; @@ -54,8 +110,13 @@ namespace CalamityMod.Projectiles.Melee 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; - } - } + } + projectile.maxPenetrate = -1; + projectile.penetrate = -1; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 1; + projectile.Damage(); + } public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { diff --git a/Projectiles/Melee/DepthOrb2.png b/Projectiles/Melee/DepthOrb2.png index a3192f9461..f56704ee79 100644 Binary files a/Projectiles/Melee/DepthOrb2.png and b/Projectiles/Melee/DepthOrb2.png differ diff --git a/Projectiles/Melee/ElementBallShiv.cs b/Projectiles/Melee/ElementBallShiv.cs index 93afc78ccf..63701e1733 100644 --- a/Projectiles/Melee/ElementBallShiv.cs +++ b/Projectiles/Melee/ElementBallShiv.cs @@ -9,32 +9,26 @@ namespace CalamityMod.Projectiles.Melee { public override void SetStaticDefaults() { - DisplayName.SetDefault("Ball"); + DisplayName.SetDefault("Shiv"); } public override void SetDefaults() { - projectile.width = 8; - projectile.height = 8; + projectile.width = 10; + projectile.height = 10; projectile.friendly = true; projectile.melee = true; projectile.penetrate = 1; projectile.tileCollide = false; projectile.timeLeft = 120; - } + projectile.aiStyle = 27; + } public override void AI() { - projectile.localAI[0] += 1f; - if (projectile.localAI[0] > 4f) - { - for (int num468 = 0; num468 < 3; num468++) - { - int num250 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 66, (float)(projectile.direction * 2), 0f, 150, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 1.3f); - Main.dust[num250].noGravity = true; - Main.dust[num250].velocity *= 0f; - } - } + int num250 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 66, (float)(projectile.direction * 2), 0f, 150, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 1.3f); + Main.dust[num250].noGravity = true; + Main.dust[num250].velocity *= 0f; float num472 = projectile.Center.X; float num473 = projectile.Center.Y; float num474 = 600f; @@ -72,7 +66,7 @@ namespace CalamityMod.Projectiles.Melee public override void Kill(int timeLeft) { - for (int k = 0; k < 7; k++) + for (int k = 0; k < 4; k++) { int num = Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 66, (float)(projectile.direction * 2), 0f, 150, new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), 1f); Main.dust[num].noGravity = true; @@ -92,7 +86,7 @@ namespace CalamityMod.Projectiles.Melee float random = (float)Main.rand.Next(1, 150); if (projectile.owner == Main.myPlayer) { - for (int i = 0; i <= 3; i++) + for (int i = 0; i < 4; i++) { speedX *= dir * random; speedY *= dir * random; diff --git a/Projectiles/Melee/ElementBallShiv.png b/Projectiles/Melee/ElementBallShiv.png index 0056fc1e24..01a8a875ef 100644 Binary files a/Projectiles/Melee/ElementBallShiv.png and b/Projectiles/Melee/ElementBallShiv.png differ diff --git a/Projectiles/Melee/Exobeam.cs b/Projectiles/Melee/Exobeam.cs index 5068dcf1ef..e5e1b11ad1 100644 --- a/Projectiles/Melee/Exobeam.cs +++ b/Projectiles/Melee/Exobeam.cs @@ -24,6 +24,7 @@ namespace CalamityMod.Projectiles.Melee projectile.height = 16; projectile.friendly = true; projectile.melee = true; + projectile.ignoreWater = true; projectile.penetrate = 1; projectile.extraUpdates = 1; projectile.alpha = 255; diff --git a/Projectiles/Melee/FlameScytheProjectileMelee.cs b/Projectiles/Melee/FlameScytheProjectileMelee.cs index 5ffedfedaf..57c9a97375 100644 --- a/Projectiles/Melee/FlameScytheProjectileMelee.cs +++ b/Projectiles/Melee/FlameScytheProjectileMelee.cs @@ -49,7 +49,7 @@ namespace CalamityMod.Projectiles.Melee target.AddBuff(BuffID.OnFire, 300); if (projectile.owner == Main.myPlayer) { - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, 612, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, 612, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0.85f + Main.rand.NextFloat() * 1.15f); } } } diff --git a/Projectiles/Melee/Galaxia.cs b/Projectiles/Melee/Galaxia.cs index 3d27af0d0f..cda6059b38 100644 --- a/Projectiles/Melee/Galaxia.cs +++ b/Projectiles/Melee/Galaxia.cs @@ -244,7 +244,7 @@ namespace CalamityMod.Projectiles.Melee else if (solar) { player.AddBuff(BuffID.Titan, 600); - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X, projectile.velocity.Y, 612, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X, projectile.velocity.Y, 612, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0.85f + Main.rand.NextFloat() * 1.15f); } else if (vortex) { diff --git a/Projectiles/Melee/Galaxia2.cs b/Projectiles/Melee/Galaxia2.cs index 9ff1e20eae..1795cd0d87 100644 --- a/Projectiles/Melee/Galaxia2.cs +++ b/Projectiles/Melee/Galaxia2.cs @@ -243,7 +243,7 @@ namespace CalamityMod.Projectiles.Melee else if (solar) { player.AddBuff(BuffID.Titan, 600); - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X, projectile.velocity.Y, 612, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X, projectile.velocity.Y, 612, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0.85f + Main.rand.NextFloat() * 1.15f); } else if (vortex) { diff --git a/Projectiles/Melee/MangroveChakramProjectileMelee.cs b/Projectiles/Melee/MangroveChakramProjectileMelee.cs index 947b561aa3..9bb0ccdfb2 100644 --- a/Projectiles/Melee/MangroveChakramProjectileMelee.cs +++ b/Projectiles/Melee/MangroveChakramProjectileMelee.cs @@ -43,7 +43,7 @@ namespace CalamityMod.Projectiles.Melee public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { - target.immune[projectile.owner] = 9; + target.immune[projectile.owner] = 7; target.AddBuff(BuffID.CursedInferno, 240); } } diff --git a/Projectiles/Melee/Mourningstar.cs b/Projectiles/Melee/Mourningstar.cs index f54a2bd851..f6dd234725 100644 --- a/Projectiles/Melee/Mourningstar.cs +++ b/Projectiles/Melee/Mourningstar.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Projectiles.Melee projectile.melee = true; projectile.ignoreWater = true; projectile.usesLocalNPCImmunity = true; - projectile.localNPCHitCooldown = 4; + projectile.localNPCHitCooldown = 3; projectile.GetGlobalProjectile(mod).trueMelee = true; } diff --git a/Projectiles/Melee/NeptuneOrb.cs b/Projectiles/Melee/NeptuneOrb.cs index 3bf91da796..906b581e6a 100644 --- a/Projectiles/Melee/NeptuneOrb.cs +++ b/Projectiles/Melee/NeptuneOrb.cs @@ -1,6 +1,8 @@ using System; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Terraria; +using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Projectiles.Melee @@ -11,21 +13,19 @@ namespace CalamityMod.Projectiles.Melee public override void SetStaticDefaults() { - DisplayName.SetDefault("Orb"); + DisplayName.SetDefault("Beam"); } public override void SetDefaults() { - projectile.width = 12; - projectile.height = 12; - projectile.friendly = true; + projectile.width = 20; + projectile.height = 20; + projectile.aiStyle = 27; + projectile.friendly = true; + projectile.melee = true; + projectile.penetrate = 1; + projectile.timeLeft = 300; projectile.ignoreWater = true; - projectile.timeLeft = 300; - projectile.penetrate = -1; - projectile.melee = true; - projectile.usesLocalNPCImmunity = true; - projectile.localNPCHitCooldown = 1; - projectile.extraUpdates = 1; } public override void AI() @@ -40,16 +40,32 @@ namespace CalamityMod.Projectiles.Melee } addSprayTimer = 20; } - int num458 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 33, 0f, 0f, 100, default(Color), 2f); + int num458 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 33, 0f, 0f, 100, default(Color), 0.4f); Main.dust[num458].noGravity = true; Main.dust[num458].velocity *= 0.5f; Main.dust[num458].velocity += projectile.velocity * 0.1f; - } + } - public override void Kill(int timeLeft) + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + Texture2D tex = Main.projectileTexture[projectile.type]; + spriteBatch.Draw(tex, projectile.Center - Main.screenPosition, null, projectile.GetAlpha(lightColor), projectile.rotation, tex.Size() / 2f, projectile.scale, SpriteEffects.None, 0f); + return false; + } + + public override Color? GetAlpha(Color lightColor) + { + return new Color(50, 50, 255, projectile.alpha); + } + + public override void Kill(int timeLeft) { - Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 21); - for (int dust = 0; dust <= 30; dust++) + Main.PlaySound(SoundID.Item10, projectile.position); + 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 dust = 0; dust <= 30; dust++) { float num463 = (float)Main.rand.Next(-10, 11); float num464 = (float)Main.rand.Next(-10, 11); @@ -69,7 +85,12 @@ namespace CalamityMod.Projectiles.Melee Main.dust[num467].velocity.X = num463; Main.dust[num467].velocity.Y = num464; } - } + projectile.maxPenetrate = -1; + projectile.penetrate = -1; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 1; + projectile.Damage(); + } public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { diff --git a/Projectiles/Melee/NeptuneOrb.png b/Projectiles/Melee/NeptuneOrb.png index 04c5646fde..f56704ee79 100644 Binary files a/Projectiles/Melee/NeptuneOrb.png and b/Projectiles/Melee/NeptuneOrb.png differ diff --git a/Projectiles/Melee/OPHammerMelee.cs b/Projectiles/Melee/OPHammerMelee.cs index c9e41220ad..87fdef2c08 100644 --- a/Projectiles/Melee/OPHammerMelee.cs +++ b/Projectiles/Melee/OPHammerMelee.cs @@ -116,7 +116,7 @@ namespace CalamityMod.Projectiles.Melee target.AddBuff(mod.BuffType("BrimstoneFlames"), 300); if (projectile.owner == Main.myPlayer) { - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, 612, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, 612, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0.85f + Main.rand.NextFloat() * 1.15f); } } diff --git a/Projectiles/Melee/OceanBeam.cs b/Projectiles/Melee/OceanBeam.cs index f69d7d2c28..16b0837f6a 100644 --- a/Projectiles/Melee/OceanBeam.cs +++ b/Projectiles/Melee/OceanBeam.cs @@ -23,6 +23,7 @@ namespace CalamityMod.Projectiles.Melee projectile.penetrate = 3; projectile.timeLeft /= 2; projectile.melee = true; + projectile.tileCollide = false; } public override void AI() @@ -55,18 +56,10 @@ namespace CalamityMod.Projectiles.Melee Dust expr_4815_cp_0 = Main.dust[num102]; expr_4815_cp_0.position.Y = expr_4815_cp_0.position.Y - num100; } - if (projectile.ai[1] >= 20f) - { - projectile.velocity.Y = projectile.velocity.Y + 0.2f; - } - else - { - projectile.rotation += 0.3f * (float)projectile.direction; - } - if (projectile.velocity.Y > 16f) - { - projectile.velocity.Y = 16f; - } + + projectile.ai[1] += 1f; + if (projectile.ai[1] >= 60f) + projectile.tileCollide = true; } public override bool OnTileCollide(Vector2 oldVelocity) diff --git a/Projectiles/Melee/Spears/Brimlance.png b/Projectiles/Melee/Spears/Brimlance.png index b0bc402a1d..c39c606217 100644 Binary files a/Projectiles/Melee/Spears/Brimlance.png and b/Projectiles/Melee/Spears/Brimlance.png differ diff --git a/Projectiles/Melee/Spears/ExsanguinationLanceProjectile.cs b/Projectiles/Melee/Spears/ExsanguinationLanceProjectile.cs index 9d4d7ee26c..2a58d6e27a 100644 --- a/Projectiles/Melee/Spears/ExsanguinationLanceProjectile.cs +++ b/Projectiles/Melee/Spears/ExsanguinationLanceProjectile.cs @@ -76,7 +76,7 @@ namespace CalamityMod.Projectiles.Melee.Spears target.AddBuff(BuffID.OnFire, 300); if (projectile.owner == Main.myPlayer) { - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, 612, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, 612, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0.85f + Main.rand.NextFloat() * 1.15f); } if (crit) { diff --git a/Projectiles/Melee/Tornado.cs b/Projectiles/Melee/Tornado.cs index 353b9240b7..edcd13c447 100644 --- a/Projectiles/Melee/Tornado.cs +++ b/Projectiles/Melee/Tornado.cs @@ -4,6 +4,7 @@ using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Melee { diff --git a/Projectiles/Melee/UltimusCleaverDust.cs b/Projectiles/Melee/UltimusCleaverDust.cs index 97b1e45230..95ad5e60e5 100644 --- a/Projectiles/Melee/UltimusCleaverDust.cs +++ b/Projectiles/Melee/UltimusCleaverDust.cs @@ -1,4 +1,5 @@ -using Microsoft.Xna.Framework; +using System; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ModLoader; @@ -54,11 +55,6 @@ namespace CalamityMod.Projectiles.Melee projectile.velocity.Y = projectile.velocity.Y + 0.2f; } projectile.rotation += projectile.velocity.X * 0.1f; - if (projectile.ai[1] == 0f) - { - projectile.ai[1] = 1f; - Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 13); - } int num199 = Dust.NewDust(projectile.position, projectile.width, projectile.height, 246, 0f, 0f, 100, new Color(255, Main.DiscoG, 53), 1f); Dust expr_8976_cp_0 = Main.dust[num199]; expr_8976_cp_0.position.X = expr_8976_cp_0.position.X - 2f; @@ -88,6 +84,39 @@ namespace CalamityMod.Projectiles.Melee { projectile.velocity.Y = 16f; } - } + float num472 = projectile.Center.X; + float num473 = projectile.Center.Y; + float num474 = 150f; + 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 = 12f; + 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; + } + } } } diff --git a/Projectiles/Melee/Yoyos/ChaotrixProjectile.cs b/Projectiles/Melee/Yoyos/ChaotrixProjectile.cs index 4afac906da..9eaf4483e3 100644 --- a/Projectiles/Melee/Yoyos/ChaotrixProjectile.cs +++ b/Projectiles/Melee/Yoyos/ChaotrixProjectile.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Projectiles.Melee.Yoyos target.AddBuff(BuffID.OnFire, 300); if (projectile.owner == Main.myPlayer) { - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, 612, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, 612, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0.85f + Main.rand.NextFloat() * 1.15f); } } diff --git a/Projectiles/Melee/Yoyos/QuagmireProjectile.cs b/Projectiles/Melee/Yoyos/QuagmireProjectile.cs index c1bbf7f818..4322c5ef87 100644 --- a/Projectiles/Melee/Yoyos/QuagmireProjectile.cs +++ b/Projectiles/Melee/Yoyos/QuagmireProjectile.cs @@ -35,21 +35,21 @@ namespace CalamityMod.Projectiles.Melee.Yoyos int proj = 0; if (Main.rand.Next(10) == 0) { - proj = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X * 0.35f, projectile.velocity.Y * 0.35f, 569, (int)((double)projectile.damage * 0.65), projectile.knockBack, projectile.owner, 0f, 0f); + proj = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X * 0.35f, projectile.velocity.Y * 0.35f, 569, (int)((double)projectile.damage * 0.5), projectile.knockBack, projectile.owner, 0f, 0f); Main.projectile[proj].GetGlobalProjectile(mod).forceMelee = true; Main.projectile[proj].usesLocalNPCImmunity = true; Main.projectile[proj].localNPCHitCooldown = 30; } if (Main.rand.Next(30) == 0) { - proj = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X * 0.25f, projectile.velocity.Y * 0.25f, 570, (int)((double)projectile.damage * 0.75), projectile.knockBack, projectile.owner, 0f, 0f); + proj = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X * 0.25f, projectile.velocity.Y * 0.25f, 570, (int)((double)projectile.damage * 0.6), projectile.knockBack, projectile.owner, 0f, 0f); Main.projectile[proj].GetGlobalProjectile(mod).forceMelee = true; Main.projectile[proj].usesLocalNPCImmunity = true; Main.projectile[proj].localNPCHitCooldown = 30; } if (Main.rand.Next(50) == 0) { - proj = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X * 0.15f, projectile.velocity.Y * 0.15f, 571, (int)((double)projectile.damage * 0.85), projectile.knockBack, projectile.owner, 0f, 0f); + proj = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X * 0.15f, projectile.velocity.Y * 0.15f, 571, (int)((double)projectile.damage * 0.7), projectile.knockBack, projectile.owner, 0f, 0f); Main.projectile[proj].GetGlobalProjectile(mod).forceMelee = true; Main.projectile[proj].usesLocalNPCImmunity = true; Main.projectile[proj].localNPCHitCooldown = 30; diff --git a/Projectiles/Patreon/Akato.cs b/Projectiles/Patreon/Akato.cs index 91771c30ab..b39b701a14 100644 --- a/Projectiles/Patreon/Akato.cs +++ b/Projectiles/Patreon/Akato.cs @@ -2,6 +2,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Patreon { diff --git a/Projectiles/Patreon/KelvinCatalyst.cs b/Projectiles/Patreon/KelvinCatalyst.cs index e28e8cb7c2..d74bf7b048 100644 --- a/Projectiles/Patreon/KelvinCatalyst.cs +++ b/Projectiles/Patreon/KelvinCatalyst.cs @@ -10,8 +10,6 @@ namespace CalamityMod.Projectiles.Patreon { public class KelvinCatalyst : ModProjectile { - private int destroyerHits = 0; - public override void SetStaticDefaults() { DisplayName.SetDefault("Kelvin Catalyst"); @@ -58,7 +56,7 @@ namespace CalamityMod.Projectiles.Patreon if (projectile.ai[0] == 0f) { projectile.localAI[0] += 1f; - if (projectile.localAI[0] >= 75f || destroyerHits > 2) + if (projectile.localAI[0] >= 75f) { projectile.ai[0] = 1f; projectile.localAI[0] = 0f; @@ -143,12 +141,6 @@ namespace CalamityMod.Projectiles.Patreon public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { - if (target.type == NPCID.TheDestroyer || target.type == NPCID.TheDestroyerBody || target.type == NPCID.TheDestroyerTail) - destroyerHits++; - - if (destroyerHits > 4) - projectile.Kill(); - target.AddBuff(BuffID.Frostburn, 240); if (projectile.owner == Main.myPlayer) { diff --git a/Projectiles/Patreon/MiniGuardianAttack.cs b/Projectiles/Patreon/MiniGuardianAttack.cs index c209715d3e..adf65ce68f 100644 --- a/Projectiles/Patreon/MiniGuardianAttack.cs +++ b/Projectiles/Patreon/MiniGuardianAttack.cs @@ -3,6 +3,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Patreon { diff --git a/Projectiles/Patreon/MiniGuardianDefense.cs b/Projectiles/Patreon/MiniGuardianDefense.cs index b315e5d136..f80b283624 100644 --- a/Projectiles/Patreon/MiniGuardianDefense.cs +++ b/Projectiles/Patreon/MiniGuardianDefense.cs @@ -3,6 +3,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Patreon { diff --git a/Projectiles/Patreon/MiniGuardianHealer.cs b/Projectiles/Patreon/MiniGuardianHealer.cs index ccb96f4650..41850c0a4a 100644 --- a/Projectiles/Patreon/MiniGuardianHealer.cs +++ b/Projectiles/Patreon/MiniGuardianHealer.cs @@ -3,6 +3,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Patreon { diff --git a/Projectiles/Patreon/PerforaMini.cs b/Projectiles/Patreon/PerforaMini.cs index 942c58361d..a4d346eb8a 100644 --- a/Projectiles/Patreon/PerforaMini.cs +++ b/Projectiles/Patreon/PerforaMini.cs @@ -3,6 +3,7 @@ using Terraria.ID; using Terraria.ModLoader; using Microsoft.Xna.Framework; using System; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Patreon { diff --git a/Projectiles/Patreon/PinkButterfly.cs b/Projectiles/Patreon/PinkButterfly.cs index 11ea2f846d..4adbe558e3 100644 --- a/Projectiles/Patreon/PinkButterfly.cs +++ b/Projectiles/Patreon/PinkButterfly.cs @@ -4,6 +4,7 @@ using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Patreon { diff --git a/Projectiles/Patreon/PurpleButterfly.cs b/Projectiles/Patreon/PurpleButterfly.cs index 7b05854f99..977b75fa4c 100644 --- a/Projectiles/Patreon/PurpleButterfly.cs +++ b/Projectiles/Patreon/PurpleButterfly.cs @@ -4,6 +4,7 @@ using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Patreon { @@ -279,6 +280,12 @@ namespace CalamityMod.Projectiles.Patreon return false; } + public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) + { + if (target.type == NPCID.DukeFishron) + damage = (int)((double)damage * 2.5); + } + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { target.immune[projectile.owner] = 6; diff --git a/Projectiles/Patreon/SakuraBullet.cs b/Projectiles/Patreon/SakuraBullet.cs index cb297ee742..cba0d017e3 100644 --- a/Projectiles/Patreon/SakuraBullet.cs +++ b/Projectiles/Patreon/SakuraBullet.cs @@ -73,6 +73,12 @@ namespace CalamityMod.Projectiles.Patreon Main.dust[num458].velocity += projectile.velocity * 0.1f; } + public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) + { + if (target.type == NPCID.DukeFishron) + damage = (int)((double)damage * 2.5); + } + public override void Kill(int timeLeft) { Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 25); diff --git a/Projectiles/Pets/Bear.cs b/Projectiles/Pets/Bear.cs index a908895e5f..59882ea311 100644 --- a/Projectiles/Pets/Bear.cs +++ b/Projectiles/Pets/Bear.cs @@ -2,6 +2,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Pets { diff --git a/Projectiles/Pets/Brimling.cs b/Projectiles/Pets/Brimling.cs index 74f711bf02..b02e0b47a2 100644 --- a/Projectiles/Pets/Brimling.cs +++ b/Projectiles/Pets/Brimling.cs @@ -2,6 +2,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Pets { diff --git a/Projectiles/Pets/ChibiiDoggo.cs b/Projectiles/Pets/ChibiiDoggo.cs index 7ca8d87768..f6ede5e269 100644 --- a/Projectiles/Pets/ChibiiDoggo.cs +++ b/Projectiles/Pets/ChibiiDoggo.cs @@ -5,6 +5,7 @@ using Terraria.ID; using Terraria.DataStructures; using Terraria.ModLoader; using Terraria.Localization; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Pets { diff --git a/Projectiles/Pets/ChibiiDoggoFly.cs b/Projectiles/Pets/ChibiiDoggoFly.cs index 7b359fdfc7..04c9dab231 100644 --- a/Projectiles/Pets/ChibiiDoggoFly.cs +++ b/Projectiles/Pets/ChibiiDoggoFly.cs @@ -3,6 +3,7 @@ using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Pets { diff --git a/Projectiles/Pets/DannyDevito.cs b/Projectiles/Pets/DannyDevito.cs index 0a2c286ee0..dda14b7b17 100644 --- a/Projectiles/Pets/DannyDevito.cs +++ b/Projectiles/Pets/DannyDevito.cs @@ -2,6 +2,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Pets { diff --git a/Projectiles/Pets/Fox.cs b/Projectiles/Pets/Fox.cs index 02392ac6c7..5149139d16 100644 --- a/Projectiles/Pets/Fox.cs +++ b/Projectiles/Pets/Fox.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Pets { diff --git a/Projectiles/Pets/Kendra.cs b/Projectiles/Pets/Kendra.cs index e7d850bedc..afa4a45b6a 100644 --- a/Projectiles/Pets/Kendra.cs +++ b/Projectiles/Pets/Kendra.cs @@ -3,6 +3,7 @@ using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Pets { diff --git a/Projectiles/Pets/Levi.cs b/Projectiles/Pets/Levi.cs index 787b399c2e..0b4a4d26c1 100644 --- a/Projectiles/Pets/Levi.cs +++ b/Projectiles/Pets/Levi.cs @@ -2,6 +2,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Pets { diff --git a/Projectiles/Pets/SirenYoung.cs b/Projectiles/Pets/SirenYoung.cs index e1b1528c27..f340fcfb02 100644 --- a/Projectiles/Pets/SirenYoung.cs +++ b/Projectiles/Pets/SirenYoung.cs @@ -4,6 +4,7 @@ using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Pets { diff --git a/Projectiles/Pets/ThirdSage.cs b/Projectiles/Pets/ThirdSage.cs index 4e54a4ed03..eab40a5d1c 100644 --- a/Projectiles/Pets/ThirdSage.cs +++ b/Projectiles/Pets/ThirdSage.cs @@ -7,6 +7,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod; +using CalamityMod.CalPlayer; using Microsoft.Xna.Framework; namespace CalamityMod.Projectiles.Pets diff --git a/Projectiles/Ranged/DragonBurst.cs b/Projectiles/Ranged/DragonBurst.cs index b5d3bcbdd2..8ee67c0eda 100644 --- a/Projectiles/Ranged/DragonBurst.cs +++ b/Projectiles/Ranged/DragonBurst.cs @@ -57,7 +57,7 @@ namespace CalamityMod.Projectiles.Ranged { if (projectile.owner == Main.myPlayer) { - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, 612, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); + Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, 612, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0.85f + Main.rand.NextFloat() * 1.15f); } } diff --git a/Projectiles/Ranged/ExplodingStake.cs b/Projectiles/Ranged/ExplodingStake.cs index d4c3b29b28..1cda58472b 100644 --- a/Projectiles/Ranged/ExplodingStake.cs +++ b/Projectiles/Ranged/ExplodingStake.cs @@ -62,7 +62,7 @@ namespace CalamityMod.Projectiles.Ranged target.immune[projectile.owner] = 5; 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); + int boom = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, 612, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0.85f + Main.rand.NextFloat() * 1.15f); Main.projectile[boom].GetGlobalProjectile(mod).forceRanged = true; } } @@ -70,7 +70,7 @@ namespace CalamityMod.Projectiles.Ranged public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) { if (target.type == NPCID.Vampire || target.type == NPCID.VampireBat) - damage = target.lifeMax * 3; + damage += target.lifeMax * 3; } } } diff --git a/Projectiles/Ranged/ExplosiveShellBullet.cs b/Projectiles/Ranged/ExplosiveShellBullet.cs index 708a4c71bc..ec53354e69 100644 --- a/Projectiles/Ranged/ExplosiveShellBullet.cs +++ b/Projectiles/Ranged/ExplosiveShellBullet.cs @@ -1,6 +1,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Ranged { diff --git a/Projectiles/Ranged/FlamingStake.cs b/Projectiles/Ranged/FlamingStake.cs index 453d49d1e8..582a2a0c96 100644 --- a/Projectiles/Ranged/FlamingStake.cs +++ b/Projectiles/Ranged/FlamingStake.cs @@ -58,7 +58,7 @@ namespace CalamityMod.Projectiles.Ranged public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) { if (target.type == NPCID.Vampire || target.type == NPCID.VampireBat) - damage = target.lifeMax * 3; + damage += target.lifeMax * 3; } } } diff --git a/Projectiles/Ranged/HolyFireBullet.cs b/Projectiles/Ranged/HolyFireBullet.cs index d01949c712..c0e37e8bd6 100644 --- a/Projectiles/Ranged/HolyFireBullet.cs +++ b/Projectiles/Ranged/HolyFireBullet.cs @@ -60,7 +60,7 @@ namespace CalamityMod.Projectiles.Ranged { if (projectile.owner == Main.myPlayer) { - int proj = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, 612, (int)((double)projectile.damage * 0.85), projectile.knockBack, projectile.owner, 0f, 0f); + int proj = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, 612, (int)((double)projectile.damage * 0.85), projectile.knockBack, projectile.owner, 0f, 0.85f + Main.rand.NextFloat() * 1.15f); Main.projectile[proj].GetGlobalProjectile(mod).forceRanged = true; } for (int k = 0; k < 10; k++) diff --git a/Projectiles/Ranged/NebulaShot.cs b/Projectiles/Ranged/NebulaShot.cs index f228417f35..9eb1c7a2cc 100644 --- a/Projectiles/Ranged/NebulaShot.cs +++ b/Projectiles/Ranged/NebulaShot.cs @@ -34,13 +34,14 @@ namespace CalamityMod.Projectiles.Ranged projectile.ai[1] = 1f; Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 12); } - // Force damage type based on AI variable (this is outdated code and the weapons themselves should set the force variables) - if (projectile.ai[0] == 1f) - projectile.GetGlobalProjectile(mod).forceMelee = true; - else if (projectile.ai[0] == 2f) - projectile.GetGlobalProjectile(mod).forceRogue = true; - if (projectile.alpha > 0) + // Force damage type based on AI variable (this is outdated code and the weapons themselves should set the force variables) + if (projectile.ai[0] == 1f) + projectile.GetGlobalProjectile(mod).forceMelee = true; + else if (projectile.ai[0] == 2f) + projectile.GetGlobalProjectile(mod).forceRogue = true; + + if (projectile.alpha > 0) { projectile.alpha -= 15; } diff --git a/Projectiles/Ranged/TerraBallB.cs b/Projectiles/Ranged/TerraBallB.cs deleted file mode 100644 index af48f51612..0000000000 --- a/Projectiles/Ranged/TerraBallB.cs +++ /dev/null @@ -1,87 +0,0 @@ -using System; -using Microsoft.Xna.Framework; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Projectiles.Ranged -{ - public class TerraBallB : ModProjectile - { - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Ball"); - } - - public override void SetDefaults() - { - projectile.width = 8; - projectile.height = 8; - projectile.friendly = true; - projectile.ranged = true; - projectile.penetrate = 1; - projectile.tileCollide = true; - projectile.timeLeft = 600; - } - - public override void AI() - { - projectile.localAI[0] += 1f; - if (projectile.localAI[0] > 4f) - { - for (int num468 = 0; num468 < 3; num468++) - { - int num469 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 15, 0f, 0f, 100, default(Color), 1f); - Main.dust[num469].noGravity = true; - Main.dust[num469].velocity *= 0f; - } - } - float num472 = projectile.Center.X; - float num473 = projectile.Center.Y; - float num474 = 400f; - 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 = Main.rand.Next(19, 35); - 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; - } - } - - public override void Kill(int timeLeft) - { - for (int k = 0; k < 5; k++) - { - Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 15, projectile.oldVelocity.X * 0.5f, projectile.oldVelocity.Y * 0.5f); - } - } - - public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) - { - target.AddBuff(BuffID.Frostburn, 120); - } - } -} diff --git a/Projectiles/Ranged/TerraBallBow.cs b/Projectiles/Ranged/TerraBallBow.cs new file mode 100644 index 0000000000..a070b7b56a --- /dev/null +++ b/Projectiles/Ranged/TerraBallBow.cs @@ -0,0 +1,145 @@ +using System; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Ranged +{ + public class TerraBallBow : ModProjectile + { + private int dustType = 0; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Ball"); + } + + public override void SetDefaults() + { + projectile.width = 8; + projectile.height = 8; + projectile.friendly = true; + projectile.ranged = true; + projectile.penetrate = 1; + projectile.extraUpdates = 1; + projectile.tileCollide = true; + projectile.timeLeft = 600; + } + + public override void AI() + { + switch ((int)projectile.ai[1]) + { + case 0: + dustType = 15; + break; + case 1: + dustType = 74; + break; + case 2: + dustType = 73; + break; + case 3: + dustType = 162; + break; + case 4: + dustType = 90; + break; + case 5: + dustType = 173; + break; + case 6: + dustType = 57; + break; + } + int num469 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, dustType, 0f, 0f, 100, default(Color), 2.2f); + Main.dust[num469].noGravity = true; + Main.dust[num469].velocity *= 0f; + + float num472 = projectile.Center.X; + float num473 = projectile.Center.Y; + float num474 = 400f; + 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 = 18f; + 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; + } + } + + public override void Kill(int timeLeft) + { + int height = 40; + float num50 = 2.1f; + float num51 = 1.1f; + float num52 = 2.5f; + Vector2 value3 = (projectile.rotation - 1.57079637f).ToRotationVector2(); + Vector2 value4 = value3 * projectile.velocity.Length() * (float)projectile.MaxUpdates; + Main.PlaySound(SoundID.Item14, projectile.position); + projectile.position = projectile.Center; + projectile.width = (projectile.height = height); + projectile.Center = projectile.position; + projectile.maxPenetrate = -1; + projectile.penetrate = -1; + projectile.usesLocalNPCImmunity = true; + projectile.localNPCHitCooldown = 10; + projectile.Damage(); + int num3; + for (int num53 = 0; num53 < 20; num53 = num3 + 1) + { + int num54 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, dustType, 0f, 0f, 200, default(Color), num50); + Main.dust[num54].position = projectile.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)projectile.width / 2f; + Main.dust[num54].noGravity = true; + Dust dust = Main.dust[num54]; + dust.velocity *= 3f; + dust = Main.dust[num54]; + dust.velocity += value4 * Main.rand.NextFloat(); + num54 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, dustType, 0f, 0f, 100, default(Color), num51); + Main.dust[num54].position = projectile.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)projectile.width / 2f; + dust = Main.dust[num54]; + dust.velocity *= 2f; + Main.dust[num54].noGravity = true; + Main.dust[num54].fadeIn = 1f; + dust = Main.dust[num54]; + dust.velocity += value4 * Main.rand.NextFloat(); + num3 = num53; + } + for (int num55 = 0; num55 < 10; num55 = num3 + 1) + { + int num56 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, dustType, 0f, 0f, 0, default(Color), num52); + Main.dust[num56].position = projectile.Center + Vector2.UnitX.RotatedByRandom(3.1415927410125732).RotatedBy((double)projectile.velocity.ToRotation(), default(Vector2)) * (float)projectile.width / 3f; + Main.dust[num56].noGravity = true; + Dust dust = Main.dust[num56]; + dust.velocity *= 0.5f; + dust = Main.dust[num56]; + dust.velocity += value4 * (0.6f + 0.6f * Main.rand.NextFloat()); + num3 = num55; + } + } + } +} diff --git a/Projectiles/Ranged/TerraBallB.png b/Projectiles/Ranged/TerraBallBow.png similarity index 100% rename from Projectiles/Ranged/TerraBallB.png rename to Projectiles/Ranged/TerraBallBow.png diff --git a/Projectiles/Ranged/TerraBallG.cs b/Projectiles/Ranged/TerraBallG.cs deleted file mode 100644 index 7736287d5a..0000000000 --- a/Projectiles/Ranged/TerraBallG.cs +++ /dev/null @@ -1,87 +0,0 @@ -using System; -using Microsoft.Xna.Framework; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Projectiles.Ranged -{ - public class TerraBallG : ModProjectile - { - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Ball"); - } - - public override void SetDefaults() - { - projectile.width = 8; - projectile.height = 8; - projectile.friendly = true; - projectile.ranged = true; - projectile.penetrate = 1; - projectile.tileCollide = true; - projectile.timeLeft = 600; - } - - public override void AI() - { - projectile.localAI[0] += 1f; - if (projectile.localAI[0] > 4f) - { - for (int num468 = 0; num468 < 3; num468++) - { - int num469 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 74, 0f, 0f, 100, default(Color), 1f); - Main.dust[num469].noGravity = true; - Main.dust[num469].velocity *= 0f; - } - } - float num472 = projectile.Center.X; - float num473 = projectile.Center.Y; - float num474 = 400f; - 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 = Main.rand.Next(19, 35); - 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; - } - } - - public override void Kill(int timeLeft) - { - for (int k = 0; k < 5; k++) - { - Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 74, projectile.oldVelocity.X * 0.5f, projectile.oldVelocity.Y * 0.5f); - } - } - - public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) - { - target.AddBuff(BuffID.CursedInferno, 120); - } - } -} diff --git a/Projectiles/Ranged/TerraBallG.png b/Projectiles/Ranged/TerraBallG.png deleted file mode 100644 index 0056fc1e24..0000000000 Binary files a/Projectiles/Ranged/TerraBallG.png and /dev/null differ diff --git a/Projectiles/Ranged/TerraBallI.cs b/Projectiles/Ranged/TerraBallI.cs deleted file mode 100644 index 015ef2bfa2..0000000000 --- a/Projectiles/Ranged/TerraBallI.cs +++ /dev/null @@ -1,88 +0,0 @@ -using System; -using Microsoft.Xna.Framework; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Projectiles.Ranged -{ - public class TerraBallI : ModProjectile - { - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Ball"); - } - - public override void SetDefaults() - { - projectile.width = 8; - projectile.height = 8; - projectile.friendly = true; - projectile.ranged = true; - projectile.penetrate = 1; - projectile.tileCollide = true; - projectile.timeLeft = 600; - } - - public override void AI() - { - projectile.localAI[0] += 1f; - if (projectile.localAI[0] > 4f) - { - for (int num468 = 0; num468 < 3; num468++) - { - int num469 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 73, 0f, 0f, 100, default(Color), 1f); - Main.dust[num469].noGravity = true; - Main.dust[num469].velocity *= 0f; - } - } - float num472 = projectile.Center.X; - float num473 = projectile.Center.Y; - float num474 = 400f; - 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 = Main.rand.Next(19, 35); - 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; - } - } - - public override void Kill(int timeLeft) - { - for (int k = 0; k < 5; k++) - { - Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 73, projectile.oldVelocity.X * 0.5f, projectile.oldVelocity.Y * 0.5f); - } - } - - public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) - { - target.AddBuff(BuffID.OnFire, 90); - target.AddBuff(BuffID.Frostburn, 60); - } - } -} diff --git a/Projectiles/Ranged/TerraBallI.png b/Projectiles/Ranged/TerraBallI.png deleted file mode 100644 index 0056fc1e24..0000000000 Binary files a/Projectiles/Ranged/TerraBallI.png and /dev/null differ diff --git a/Projectiles/Ranged/TerraBallO.cs b/Projectiles/Ranged/TerraBallO.cs deleted file mode 100644 index ad88fbb3fb..0000000000 --- a/Projectiles/Ranged/TerraBallO.cs +++ /dev/null @@ -1,88 +0,0 @@ -using System; -using Microsoft.Xna.Framework; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Projectiles.Ranged -{ - public class TerraBallO : ModProjectile - { - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Ball"); - } - - public override void SetDefaults() - { - projectile.width = 8; - projectile.height = 8; - projectile.friendly = true; - projectile.ranged = true; - projectile.penetrate = 1; - projectile.tileCollide = true; - projectile.timeLeft = 600; - } - - public override void AI() - { - projectile.localAI[0] += 1f; - if (projectile.localAI[0] > 4f) - { - for (int num468 = 0; num468 < 3; num468++) - { - int num469 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 162, 0f, 0f, 100, default(Color), 1f); - Main.dust[num469].noGravity = true; - Main.dust[num469].velocity *= 0f; - } - } - float num472 = projectile.Center.X; - float num473 = projectile.Center.Y; - float num474 = 400f; - 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 = Main.rand.Next(19, 35); - 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; - } - } - - public override void Kill(int timeLeft) - { - for (int k = 0; k < 5; k++) - { - Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 162, projectile.oldVelocity.X * 0.5f, projectile.oldVelocity.Y * 0.5f); - } - } - - public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) - { - target.AddBuff(BuffID.OnFire, 90); - target.AddBuff(BuffID.Ichor, 60); - } - } -} diff --git a/Projectiles/Ranged/TerraBallO.png b/Projectiles/Ranged/TerraBallO.png deleted file mode 100644 index 0056fc1e24..0000000000 Binary files a/Projectiles/Ranged/TerraBallO.png and /dev/null differ diff --git a/Projectiles/Ranged/TerraBallR.cs b/Projectiles/Ranged/TerraBallR.cs deleted file mode 100644 index c9ad811c2c..0000000000 --- a/Projectiles/Ranged/TerraBallR.cs +++ /dev/null @@ -1,87 +0,0 @@ -using System; -using Microsoft.Xna.Framework; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Projectiles.Ranged -{ - public class TerraBallR : ModProjectile - { - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Ball"); - } - - public override void SetDefaults() - { - projectile.width = 8; - projectile.height = 8; - projectile.friendly = true; - projectile.ranged = true; - projectile.penetrate = 1; - projectile.tileCollide = true; - projectile.timeLeft = 600; - } - - public override void AI() - { - projectile.localAI[0] += 1f; - if (projectile.localAI[0] > 4f) - { - for (int num468 = 0; num468 < 3; num468++) - { - int num469 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 90, 0f, 0f, 100, default(Color), 1f); - Main.dust[num469].noGravity = true; - Main.dust[num469].velocity *= 0f; - } - } - float num472 = projectile.Center.X; - float num473 = projectile.Center.Y; - float num474 = 400f; - 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 = Main.rand.Next(19, 35); - 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; - } - } - - public override void Kill(int timeLeft) - { - for (int k = 0; k < 5; k++) - { - Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 90, projectile.oldVelocity.X * 0.5f, projectile.oldVelocity.Y * 0.5f); - } - } - - public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) - { - target.AddBuff(BuffID.OnFire, 120); - } - } -} diff --git a/Projectiles/Ranged/TerraBallR.png b/Projectiles/Ranged/TerraBallR.png deleted file mode 100644 index 0056fc1e24..0000000000 Binary files a/Projectiles/Ranged/TerraBallR.png and /dev/null differ diff --git a/Projectiles/Ranged/TerraBallV.cs b/Projectiles/Ranged/TerraBallV.cs deleted file mode 100644 index bbee34a00b..0000000000 --- a/Projectiles/Ranged/TerraBallV.cs +++ /dev/null @@ -1,88 +0,0 @@ -using System; -using Microsoft.Xna.Framework; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Projectiles.Ranged -{ - public class TerraBallV : ModProjectile - { - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Ball"); - } - - public override void SetDefaults() - { - projectile.width = 8; - projectile.height = 8; - projectile.friendly = true; - projectile.ranged = true; - projectile.penetrate = 1; - projectile.tileCollide = true; - projectile.timeLeft = 600; - } - - public override void AI() - { - projectile.localAI[0] += 1f; - if (projectile.localAI[0] > 4f) - { - for (int num468 = 0; num468 < 3; num468++) - { - int num469 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 173, 0f, 0f, 100, default(Color), 1f); - Main.dust[num469].noGravity = true; - Main.dust[num469].velocity *= 0f; - } - } - float num472 = projectile.Center.X; - float num473 = projectile.Center.Y; - float num474 = 400f; - 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 = Main.rand.Next(19, 35); - 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; - } - } - - public override void Kill(int timeLeft) - { - for (int k = 0; k < 5; k++) - { - Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 173, projectile.oldVelocity.X * 0.5f, projectile.oldVelocity.Y * 0.5f); - } - } - - public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) - { - target.AddBuff(BuffID.Frostburn, 90); - target.AddBuff(BuffID.OnFire, 60); - } - } -} diff --git a/Projectiles/Ranged/TerraBallV.png b/Projectiles/Ranged/TerraBallV.png deleted file mode 100644 index 0056fc1e24..0000000000 Binary files a/Projectiles/Ranged/TerraBallV.png and /dev/null differ diff --git a/Projectiles/Ranged/TerraBallY.cs b/Projectiles/Ranged/TerraBallY.cs deleted file mode 100644 index 69ffa0c5e5..0000000000 --- a/Projectiles/Ranged/TerraBallY.cs +++ /dev/null @@ -1,87 +0,0 @@ -using System; -using Microsoft.Xna.Framework; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Projectiles.Ranged -{ - public class TerraBallY : ModProjectile - { - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Ball"); - } - - public override void SetDefaults() - { - projectile.width = 8; - projectile.height = 8; - projectile.friendly = true; - projectile.ranged = true; - projectile.penetrate = 1; - projectile.tileCollide = true; - projectile.timeLeft = 600; - } - - public override void AI() - { - projectile.localAI[0] += 1f; - if (projectile.localAI[0] > 4f) - { - for (int num468 = 0; num468 < 3; num468++) - { - int num469 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 57, 0f, 0f, 100, default(Color), 1f); - Main.dust[num469].noGravity = true; - Main.dust[num469].velocity *= 0f; - } - } - float num472 = projectile.Center.X; - float num473 = projectile.Center.Y; - float num474 = 400f; - 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 = Main.rand.Next(19, 35); - 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; - } - } - - public override void Kill(int timeLeft) - { - for (int k = 0; k < 5; k++) - { - Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 57, projectile.oldVelocity.X * 0.5f, projectile.oldVelocity.Y * 0.5f); - } - } - - public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) - { - target.AddBuff(BuffID.Ichor, 120); - } - } -} diff --git a/Projectiles/Ranged/TerraBallY.png b/Projectiles/Ranged/TerraBallY.png deleted file mode 100644 index 0056fc1e24..0000000000 Binary files a/Projectiles/Ranged/TerraBallY.png and /dev/null differ diff --git a/Projectiles/Ranged/TerraFireGreen2.cs b/Projectiles/Ranged/TerraFireGreen2.cs index f695ce228f..42ce84eb92 100644 --- a/Projectiles/Ranged/TerraFireGreen2.cs +++ b/Projectiles/Ranged/TerraFireGreen2.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Projectiles.Ranged projectile.friendly = true; projectile.ignoreWater = true; projectile.ranged = true; - projectile.penetrate = -1; + projectile.penetrate = 3; projectile.extraUpdates = 3; projectile.timeLeft = 90; projectile.usesLocalNPCImmunity = true; diff --git a/Projectiles/Rogue/AdamantiteThrowingAxeProjectile.cs b/Projectiles/Rogue/AdamantiteThrowingAxeProjectile.cs index c6e235f0a1..31e07c6461 100644 --- a/Projectiles/Rogue/AdamantiteThrowingAxeProjectile.cs +++ b/Projectiles/Rogue/AdamantiteThrowingAxeProjectile.cs @@ -1,4 +1,6 @@ -using Terraria; +using Microsoft.Xna.Framework.Graphics; +using Microsoft.Xna.Framework; +using Terraria; using Terraria.ModLoader; namespace CalamityMod.Projectiles.Rogue @@ -22,7 +24,14 @@ namespace CalamityMod.Projectiles.Rogue projectile.GetGlobalProjectile(mod).rogue = true; } - public override void Kill(int timeLeft) + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + Texture2D tex = Main.projectileTexture[projectile.type]; + spriteBatch.Draw(tex, projectile.Center - Main.screenPosition, null, projectile.GetAlpha(lightColor), projectile.rotation, tex.Size() / 2f, projectile.scale, SpriteEffects.None, 0f); + return false; + } + + public override void Kill(int timeLeft) { if (Main.rand.Next(2) == 0) { diff --git a/Projectiles/Rogue/AdamantiteThrowingAxeProjectile.png b/Projectiles/Rogue/AdamantiteThrowingAxeProjectile.png index e11702e145..73b826eb7e 100644 Binary files a/Projectiles/Rogue/AdamantiteThrowingAxeProjectile.png and b/Projectiles/Rogue/AdamantiteThrowingAxeProjectile.png differ diff --git a/Projectiles/Rogue/CobaltKunaiProjectile.cs b/Projectiles/Rogue/CobaltKunaiProjectile.cs index d4cbbb1390..057fcd8962 100644 --- a/Projectiles/Rogue/CobaltKunaiProjectile.cs +++ b/Projectiles/Rogue/CobaltKunaiProjectile.cs @@ -1,4 +1,5 @@ using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ModLoader; @@ -13,8 +14,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetDefaults() { - projectile.width = 10; - projectile.height = 10; + projectile.width = 12; + projectile.height = 12; projectile.friendly = true; projectile.penetrate = 3; projectile.aiStyle = 2; @@ -45,7 +46,14 @@ namespace CalamityMod.Projectiles.Rogue return false; } - public override void Kill(int timeLeft) + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + Texture2D tex = Main.projectileTexture[projectile.type]; + spriteBatch.Draw(tex, projectile.Center - Main.screenPosition, null, projectile.GetAlpha(lightColor), projectile.rotation, tex.Size() / 2f, projectile.scale, SpriteEffects.None, 0f); + return false; + } + + public override void Kill(int timeLeft) { if (Main.rand.Next(2) == 0) { diff --git a/Projectiles/Rogue/CobaltKunaiProjectile.png b/Projectiles/Rogue/CobaltKunaiProjectile.png index 60efb60324..01aeb2d044 100644 Binary files a/Projectiles/Rogue/CobaltKunaiProjectile.png and b/Projectiles/Rogue/CobaltKunaiProjectile.png differ diff --git a/Projectiles/Rogue/CrystalPiercerProjectile.cs b/Projectiles/Rogue/CrystalPiercerProjectile.cs index 0124d3605c..762ff63a2a 100644 --- a/Projectiles/Rogue/CrystalPiercerProjectile.cs +++ b/Projectiles/Rogue/CrystalPiercerProjectile.cs @@ -18,8 +18,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetDefaults() { - projectile.width = 10; - projectile.height = 10; + projectile.width = 12; + projectile.height = 12; projectile.friendly = true; projectile.penetrate = -1; projectile.aiStyle = 113; diff --git a/Projectiles/Rogue/CursedDagger.cs b/Projectiles/Rogue/CursedDagger.cs index 4191c24f3c..910f96ce2b 100644 --- a/Projectiles/Rogue/CursedDagger.cs +++ b/Projectiles/Rogue/CursedDagger.cs @@ -1,4 +1,5 @@ using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -14,8 +15,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetDefaults() { - projectile.width = 14; - projectile.height = 14; + projectile.width = 12; + projectile.height = 12; projectile.friendly = true; projectile.penetrate = 3; projectile.aiStyle = 2; @@ -46,7 +47,14 @@ namespace CalamityMod.Projectiles.Rogue return false; } - public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + Texture2D tex = Main.projectileTexture[projectile.type]; + spriteBatch.Draw(tex, projectile.Center - Main.screenPosition, null, projectile.GetAlpha(lightColor), projectile.rotation, tex.Size() / 2f, projectile.scale, SpriteEffects.None, 0f); + return false; + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { target.AddBuff(BuffID.CursedInferno, 120); } diff --git a/Projectiles/Rogue/FeatherKnifeProjectile.cs b/Projectiles/Rogue/FeatherKnifeProjectile.cs index 4462b5dea2..b76b7ab832 100644 --- a/Projectiles/Rogue/FeatherKnifeProjectile.cs +++ b/Projectiles/Rogue/FeatherKnifeProjectile.cs @@ -14,8 +14,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetDefaults() { - projectile.width = 20; - projectile.height = 20; + projectile.width = 12; + projectile.height = 12; projectile.friendly = true; projectile.penetrate = 2; projectile.aiStyle = 2; diff --git a/Projectiles/Rogue/FlameScytheProjectile.cs b/Projectiles/Rogue/FlameScytheProjectile.cs index 1338a2121a..bfa9c152d9 100644 --- a/Projectiles/Rogue/FlameScytheProjectile.cs +++ b/Projectiles/Rogue/FlameScytheProjectile.cs @@ -49,7 +49,7 @@ namespace CalamityMod.Projectiles.Rogue target.AddBuff(BuffID.OnFire, 300); if (projectile.owner == Main.myPlayer) { - int proj = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, 612, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); + int proj = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, 612, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0.85f + Main.rand.NextFloat() * 1.15f); Main.projectile[proj].GetGlobalProjectile(mod).forceRogue = true; } } diff --git a/Projectiles/Rogue/GelDartProjectile.cs b/Projectiles/Rogue/GelDartProjectile.cs index bbcf41554b..cebd6f859a 100644 --- a/Projectiles/Rogue/GelDartProjectile.cs +++ b/Projectiles/Rogue/GelDartProjectile.cs @@ -1,4 +1,5 @@ using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -14,8 +15,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetDefaults() { - projectile.width = 14; - projectile.height = 14; + projectile.width = 12; + projectile.height = 12; projectile.friendly = true; projectile.penetrate = 5; projectile.aiStyle = 2; @@ -46,7 +47,14 @@ namespace CalamityMod.Projectiles.Rogue return false; } - public override void Kill(int timeLeft) + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + Texture2D tex = Main.projectileTexture[projectile.type]; + spriteBatch.Draw(tex, projectile.Center - Main.screenPosition, null, projectile.GetAlpha(lightColor), projectile.rotation, tex.Size() / 2f, projectile.scale, SpriteEffects.None, 0f); + return false; + } + + public override void Kill(int timeLeft) { if (Main.rand.Next(2) == 0) { diff --git a/Projectiles/Rogue/IchorSpear.cs b/Projectiles/Rogue/IchorSpear.cs index 191576fec1..bc43a4002b 100644 --- a/Projectiles/Rogue/IchorSpear.cs +++ b/Projectiles/Rogue/IchorSpear.cs @@ -16,8 +16,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetDefaults() { - projectile.width = 18; - projectile.height = 18; + projectile.width = 12; + projectile.height = 12; projectile.friendly = true; projectile.penetrate = 2; projectile.aiStyle = 113; diff --git a/Projectiles/Rogue/IchorSpear2.cs b/Projectiles/Rogue/IchorSpear2.cs index 6d3115cb35..6f06e0818a 100644 --- a/Projectiles/Rogue/IchorSpear2.cs +++ b/Projectiles/Rogue/IchorSpear2.cs @@ -18,8 +18,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetDefaults() { - projectile.width = 18; - projectile.height = 18; + projectile.width = 12; + projectile.height = 12; projectile.friendly = true; projectile.penetrate = 2; projectile.aiStyle = 113; diff --git a/Projectiles/Rogue/Malachite.cs b/Projectiles/Rogue/Malachite.cs index 4befa136ac..5735acbefa 100644 --- a/Projectiles/Rogue/Malachite.cs +++ b/Projectiles/Rogue/Malachite.cs @@ -17,8 +17,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetDefaults() { - projectile.width = 26; - projectile.height = 26; + projectile.width = 12; + projectile.height = 12; projectile.alpha = 255; projectile.friendly = true; projectile.ignoreWater = true; diff --git a/Projectiles/Rogue/MalachiteBolt.cs b/Projectiles/Rogue/MalachiteBolt.cs index 01a93b60a7..3e161ab616 100644 --- a/Projectiles/Rogue/MalachiteBolt.cs +++ b/Projectiles/Rogue/MalachiteBolt.cs @@ -18,8 +18,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetDefaults() { - projectile.width = 26; - projectile.height = 26; + projectile.width = 12; + projectile.height = 12; projectile.alpha = 255; projectile.friendly = true; projectile.ignoreWater = true; diff --git a/Projectiles/Rogue/MangroveChakramProjectile.cs b/Projectiles/Rogue/MangroveChakramProjectile.cs index 3a13450097..db45fc0419 100644 --- a/Projectiles/Rogue/MangroveChakramProjectile.cs +++ b/Projectiles/Rogue/MangroveChakramProjectile.cs @@ -43,7 +43,7 @@ namespace CalamityMod.Projectiles.Rogue public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { - target.immune[projectile.owner] = 9; + target.immune[projectile.owner] = 7; target.AddBuff(BuffID.CursedInferno, 240); } } diff --git a/Projectiles/Rogue/Mycoroot.cs b/Projectiles/Rogue/Mycoroot.cs index bf58de6709..bcd18006e2 100644 --- a/Projectiles/Rogue/Mycoroot.cs +++ b/Projectiles/Rogue/Mycoroot.cs @@ -15,8 +15,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetDefaults() { - projectile.width = 16; - projectile.height = 16; + projectile.width = 12; + projectile.height = 12; projectile.friendly = true; projectile.penetrate = 1; projectile.GetGlobalProjectile(mod).rogue = true; diff --git a/Projectiles/Rogue/MythrilKnifeProjectile.cs b/Projectiles/Rogue/MythrilKnifeProjectile.cs index 37e051912a..551cd54290 100644 --- a/Projectiles/Rogue/MythrilKnifeProjectile.cs +++ b/Projectiles/Rogue/MythrilKnifeProjectile.cs @@ -1,4 +1,5 @@ using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -46,7 +47,14 @@ namespace CalamityMod.Projectiles.Rogue return false; } - public override void Kill(int timeLeft) + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + Texture2D tex = Main.projectileTexture[projectile.type]; + spriteBatch.Draw(tex, projectile.Center - Main.screenPosition, null, projectile.GetAlpha(lightColor), projectile.rotation, tex.Size() / 2f, projectile.scale, SpriteEffects.None, 0f); + return false; + } + + public override void Kill(int timeLeft) { if (Main.rand.Next(2) == 0) { diff --git a/Projectiles/Rogue/MythrilKnifeProjectile.png b/Projectiles/Rogue/MythrilKnifeProjectile.png index 8ff7d5aede..628e080fa1 100644 Binary files a/Projectiles/Rogue/MythrilKnifeProjectile.png and b/Projectiles/Rogue/MythrilKnifeProjectile.png differ diff --git a/Projectiles/Rogue/OPHammer.cs b/Projectiles/Rogue/OPHammer.cs index d26075dc1d..069d2b7270 100644 --- a/Projectiles/Rogue/OPHammer.cs +++ b/Projectiles/Rogue/OPHammer.cs @@ -116,7 +116,7 @@ namespace CalamityMod.Projectiles.Rogue target.AddBuff(mod.BuffType("BrimstoneFlames"), 300); if (projectile.owner == Main.myPlayer) { - int proj = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, 612, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); + int proj = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, 612, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0.85f + Main.rand.NextFloat() * 1.15f); Main.projectile[proj].GetGlobalProjectile(mod).forceRogue = true; } } diff --git a/Projectiles/Rogue/OrichalcumSpikedGemstoneProjectile.png b/Projectiles/Rogue/OrichalcumSpikedGemstoneProjectile.png index 7f94126948..3868486806 100644 Binary files a/Projectiles/Rogue/OrichalcumSpikedGemstoneProjectile.png and b/Projectiles/Rogue/OrichalcumSpikedGemstoneProjectile.png differ diff --git a/Projectiles/Rogue/PalladiumJavelinProjectile.png b/Projectiles/Rogue/PalladiumJavelinProjectile.png index 3e47a84329..1eded3636f 100644 Binary files a/Projectiles/Rogue/PalladiumJavelinProjectile.png and b/Projectiles/Rogue/PalladiumJavelinProjectile.png differ diff --git a/Projectiles/Rogue/ScarletDevilProjectile.cs b/Projectiles/Rogue/ScarletDevilProjectile.cs index 84b3dd9d6f..4b3f2c8782 100644 --- a/Projectiles/Rogue/ScarletDevilProjectile.cs +++ b/Projectiles/Rogue/ScarletDevilProjectile.cs @@ -4,6 +4,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using Microsoft.Xna.Framework.Graphics; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Rogue { diff --git a/Projectiles/Rogue/SpearofPaleolith.cs b/Projectiles/Rogue/SpearofPaleolith.cs index 2fa8667335..7e34540d45 100644 --- a/Projectiles/Rogue/SpearofPaleolith.cs +++ b/Projectiles/Rogue/SpearofPaleolith.cs @@ -20,8 +20,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetDefaults() { - projectile.width = 14; - projectile.height = 14; + projectile.width = 12; + projectile.height = 12; projectile.friendly = true; projectile.penetrate = 1; projectile.aiStyle = 113; diff --git a/Projectiles/Rogue/TarragonThrowingDartProjectile.cs b/Projectiles/Rogue/TarragonThrowingDartProjectile.cs index cf4e571166..dab1321a01 100644 --- a/Projectiles/Rogue/TarragonThrowingDartProjectile.cs +++ b/Projectiles/Rogue/TarragonThrowingDartProjectile.cs @@ -15,8 +15,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetDefaults() { - projectile.width = 10; - projectile.height = 10; + projectile.width = 12; + projectile.height = 12; projectile.friendly = true; projectile.penetrate = 3; projectile.aiStyle = 113; diff --git a/Projectiles/Rogue/TitaniumShurikenProjectile.cs b/Projectiles/Rogue/TitaniumShurikenProjectile.cs index 68f27fcffc..07e784c559 100644 --- a/Projectiles/Rogue/TitaniumShurikenProjectile.cs +++ b/Projectiles/Rogue/TitaniumShurikenProjectile.cs @@ -14,8 +14,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetDefaults() { - projectile.width = 14; - projectile.height = 14; + projectile.width = 12; + projectile.height = 12; projectile.friendly = true; projectile.penetrate = -1; projectile.aiStyle = 2; diff --git a/Projectiles/Rogue/TitaniumShurikenProjectile.png b/Projectiles/Rogue/TitaniumShurikenProjectile.png index e3f185f3c3..91b3bddea8 100644 Binary files a/Projectiles/Rogue/TitaniumShurikenProjectile.png and b/Projectiles/Rogue/TitaniumShurikenProjectile.png differ diff --git a/Projectiles/Rogue/UrchinStinger.cs b/Projectiles/Rogue/UrchinStinger.cs index 712dbfc8d3..0a8cc2ce5d 100644 --- a/Projectiles/Rogue/UrchinStinger.cs +++ b/Projectiles/Rogue/UrchinStinger.cs @@ -1,4 +1,6 @@ -using Terraria; +using Microsoft.Xna.Framework.Graphics; +using Microsoft.Xna.Framework; +using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -28,7 +30,14 @@ namespace CalamityMod.Projectiles.Rogue target.AddBuff(BuffID.Venom, 360); } - public override void Kill(int timeLeft) + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + Texture2D tex = Main.projectileTexture[projectile.type]; + spriteBatch.Draw(tex, projectile.Center - Main.screenPosition, null, projectile.GetAlpha(lightColor), projectile.rotation, tex.Size() / 2f, projectile.scale, SpriteEffects.None, 0f); + return false; + } + + public override void Kill(int timeLeft) { if (Main.rand.Next(2) == 0) { diff --git a/Projectiles/Rogue/WulfrumKnife.cs b/Projectiles/Rogue/WulfrumKnife.cs index 357034aab2..839b107bbc 100644 --- a/Projectiles/Rogue/WulfrumKnife.cs +++ b/Projectiles/Rogue/WulfrumKnife.cs @@ -14,8 +14,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetDefaults() { - projectile.width = 10; - projectile.height = 10; + projectile.width = 12; + projectile.height = 12; projectile.friendly = true; projectile.penetrate = 2; projectile.aiStyle = 2; diff --git a/Projectiles/Rogue/XerocPitchforkProjectile.cs b/Projectiles/Rogue/XerocPitchforkProjectile.cs index acd5228078..19f8dba6fa 100644 --- a/Projectiles/Rogue/XerocPitchforkProjectile.cs +++ b/Projectiles/Rogue/XerocPitchforkProjectile.cs @@ -18,8 +18,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetDefaults() { - projectile.width = 20; - projectile.height = 20; + projectile.width = 12; + projectile.height = 12; projectile.friendly = true; projectile.penetrate = -1; projectile.extraUpdates = 1; diff --git a/Projectiles/Shrines/GladiatorSword.cs b/Projectiles/Shrines/GladiatorSword.cs index 33abab4d25..de3d48435f 100644 --- a/Projectiles/Shrines/GladiatorSword.cs +++ b/Projectiles/Shrines/GladiatorSword.cs @@ -2,6 +2,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Shrines { diff --git a/Projectiles/Shrines/GladiatorSword2.cs b/Projectiles/Shrines/GladiatorSword2.cs index 308757014f..acf63e8ead 100644 --- a/Projectiles/Shrines/GladiatorSword2.cs +++ b/Projectiles/Shrines/GladiatorSword2.cs @@ -2,6 +2,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Shrines { diff --git a/Projectiles/Shrines/LuxorsGiftSummon.cs b/Projectiles/Shrines/LuxorsGiftSummon.cs index 5c6b9a51fb..319554d822 100644 --- a/Projectiles/Shrines/LuxorsGiftSummon.cs +++ b/Projectiles/Shrines/LuxorsGiftSummon.cs @@ -4,6 +4,7 @@ using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Shrines { diff --git a/Projectiles/Summon/AngryChicken.cs b/Projectiles/Summon/AngryChicken.cs index ebc6d07c4c..e8a3f03417 100644 --- a/Projectiles/Summon/AngryChicken.cs +++ b/Projectiles/Summon/AngryChicken.cs @@ -4,6 +4,7 @@ using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Summon { diff --git a/Projectiles/Summon/AquaticStar.cs b/Projectiles/Summon/AquaticStar.cs index c74d53f422..fb0623a659 100644 --- a/Projectiles/Summon/AquaticStar.cs +++ b/Projectiles/Summon/AquaticStar.cs @@ -2,6 +2,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Summon { diff --git a/Projectiles/Summon/BigBustyRose.cs b/Projectiles/Summon/BigBustyRose.cs index aea19ad9be..bc7bc9c137 100644 --- a/Projectiles/Summon/BigBustyRose.cs +++ b/Projectiles/Summon/BigBustyRose.cs @@ -4,6 +4,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Summon { diff --git a/Projectiles/Summon/BloodClotMinion.cs b/Projectiles/Summon/BloodClotMinion.cs index e5767064bc..58ca8ca6ad 100644 --- a/Projectiles/Summon/BloodClotMinion.cs +++ b/Projectiles/Summon/BloodClotMinion.cs @@ -3,6 +3,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Summon { diff --git a/Projectiles/Summon/BrittleStar.cs b/Projectiles/Summon/BrittleStar.cs index 4295483c46..47d1d6e726 100644 --- a/Projectiles/Summon/BrittleStar.cs +++ b/Projectiles/Summon/BrittleStar.cs @@ -2,6 +2,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Summon { diff --git a/Projectiles/Summon/Calamari.cs b/Projectiles/Summon/Calamari.cs index 256293529d..99cf7da786 100644 --- a/Projectiles/Summon/Calamari.cs +++ b/Projectiles/Summon/Calamari.cs @@ -4,6 +4,7 @@ using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Summon { diff --git a/Projectiles/Summon/Calamitamini.cs b/Projectiles/Summon/Calamitamini.cs index 53ad8b3af0..6784c76274 100644 --- a/Projectiles/Summon/Calamitamini.cs +++ b/Projectiles/Summon/Calamitamini.cs @@ -4,6 +4,7 @@ using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Summon { diff --git a/Projectiles/Summon/Cataclymini.cs b/Projectiles/Summon/Cataclymini.cs index 8ed177171f..09e92bd17c 100644 --- a/Projectiles/Summon/Cataclymini.cs +++ b/Projectiles/Summon/Cataclymini.cs @@ -4,6 +4,7 @@ using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Summon { diff --git a/Projectiles/Summon/Catastromini.cs b/Projectiles/Summon/Catastromini.cs index fac7eaf3d4..9ade9f2806 100644 --- a/Projectiles/Summon/Catastromini.cs +++ b/Projectiles/Summon/Catastromini.cs @@ -4,6 +4,7 @@ using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Summon { diff --git a/Projectiles/Summon/ChaosSpirit.cs b/Projectiles/Summon/ChaosSpirit.cs index d066815998..11103c753c 100644 --- a/Projectiles/Summon/ChaosSpirit.cs +++ b/Projectiles/Summon/ChaosSpirit.cs @@ -3,6 +3,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Summon { diff --git a/Projectiles/Summon/CloudyWaifu.cs b/Projectiles/Summon/CloudyWaifu.cs index 729672a24b..1bdae45ff2 100644 --- a/Projectiles/Summon/CloudyWaifu.cs +++ b/Projectiles/Summon/CloudyWaifu.cs @@ -4,6 +4,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Summon { diff --git a/Projectiles/Summon/Corroslime.cs b/Projectiles/Summon/Corroslime.cs index 9fa0481379..42324d9b6e 100644 --- a/Projectiles/Summon/Corroslime.cs +++ b/Projectiles/Summon/Corroslime.cs @@ -3,6 +3,7 @@ using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Summon { diff --git a/Projectiles/Summon/CosmicEnergy.cs b/Projectiles/Summon/CosmicEnergy.cs index 08657d92ec..b3f2f86a18 100644 --- a/Projectiles/Summon/CosmicEnergy.cs +++ b/Projectiles/Summon/CosmicEnergy.cs @@ -3,6 +3,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Summon { diff --git a/Projectiles/Summon/Cosmilamp.cs b/Projectiles/Summon/Cosmilamp.cs index 7e0adefff3..13b0afcbab 100644 --- a/Projectiles/Summon/Cosmilamp.cs +++ b/Projectiles/Summon/Cosmilamp.cs @@ -3,6 +3,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Summon { diff --git a/Projectiles/Summon/Crimslime.cs b/Projectiles/Summon/Crimslime.cs index 11bedd5c9d..8be9a6d8fa 100644 --- a/Projectiles/Summon/Crimslime.cs +++ b/Projectiles/Summon/Crimslime.cs @@ -3,6 +3,7 @@ using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Summon { diff --git a/Projectiles/Summon/DaedalusCrystal.cs b/Projectiles/Summon/DaedalusCrystal.cs index 4a2126c3f8..451151c1e1 100644 --- a/Projectiles/Summon/DaedalusCrystal.cs +++ b/Projectiles/Summon/DaedalusCrystal.cs @@ -3,6 +3,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Summon { diff --git a/Projectiles/Summon/DankCreeper.cs b/Projectiles/Summon/DankCreeper.cs index 7d9c30e84b..3ceb0ce452 100644 --- a/Projectiles/Summon/DankCreeper.cs +++ b/Projectiles/Summon/DankCreeper.cs @@ -4,6 +4,7 @@ using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Summon { diff --git a/Projectiles/Summon/DrewsSandyWaifu.cs b/Projectiles/Summon/DrewsSandyWaifu.cs index 5de17281ff..0668f2f62c 100644 --- a/Projectiles/Summon/DrewsSandyWaifu.cs +++ b/Projectiles/Summon/DrewsSandyWaifu.cs @@ -4,6 +4,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Summon { diff --git a/Projectiles/Summon/ElementalAxe.cs b/Projectiles/Summon/ElementalAxe.cs index a830664580..cb55bb9a8e 100644 --- a/Projectiles/Summon/ElementalAxe.cs +++ b/Projectiles/Summon/ElementalAxe.cs @@ -4,6 +4,7 @@ using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Summon { diff --git a/Projectiles/Summon/FungalClump.cs b/Projectiles/Summon/FungalClump.cs index 9f38cf4336..e45199c3b6 100644 --- a/Projectiles/Summon/FungalClump.cs +++ b/Projectiles/Summon/FungalClump.cs @@ -2,6 +2,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Summon { diff --git a/Projectiles/Summon/Herring.cs b/Projectiles/Summon/Herring.cs index ed5829331f..9ca904571f 100644 --- a/Projectiles/Summon/Herring.cs +++ b/Projectiles/Summon/Herring.cs @@ -4,6 +4,7 @@ using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Summon { diff --git a/Projectiles/Summon/IceClasper.cs b/Projectiles/Summon/IceClasper.cs index e461bc1477..55fd6803b6 100644 --- a/Projectiles/Summon/IceClasper.cs +++ b/Projectiles/Summon/IceClasper.cs @@ -4,6 +4,7 @@ using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Summon { diff --git a/Projectiles/Summon/MechwormBody.cs b/Projectiles/Summon/MechwormBody.cs index 60a1b34aeb..744ed2bd86 100644 --- a/Projectiles/Summon/MechwormBody.cs +++ b/Projectiles/Summon/MechwormBody.cs @@ -3,6 +3,7 @@ using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Summon { diff --git a/Projectiles/Summon/MechwormBody2.cs b/Projectiles/Summon/MechwormBody2.cs index 0d62129b6a..d147c4d423 100644 --- a/Projectiles/Summon/MechwormBody2.cs +++ b/Projectiles/Summon/MechwormBody2.cs @@ -3,6 +3,7 @@ using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Summon { diff --git a/Projectiles/Summon/MechwormHead.cs b/Projectiles/Summon/MechwormHead.cs index ec93770bc4..74864588e0 100644 --- a/Projectiles/Summon/MechwormHead.cs +++ b/Projectiles/Summon/MechwormHead.cs @@ -4,6 +4,7 @@ using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Summon { diff --git a/Projectiles/Summon/MechwormTail.cs b/Projectiles/Summon/MechwormTail.cs index 13d700e10b..64cac47916 100644 --- a/Projectiles/Summon/MechwormTail.cs +++ b/Projectiles/Summon/MechwormTail.cs @@ -3,6 +3,7 @@ using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Summon { diff --git a/Projectiles/Summon/PhantomGuy.cs b/Projectiles/Summon/PhantomGuy.cs index 2efe7be858..62b2427e83 100644 --- a/Projectiles/Summon/PhantomGuy.cs +++ b/Projectiles/Summon/PhantomGuy.cs @@ -3,6 +3,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Summon { diff --git a/Projectiles/Summon/ReaverOrb.cs b/Projectiles/Summon/ReaverOrb.cs index 02d0aac920..c77f20680b 100644 --- a/Projectiles/Summon/ReaverOrb.cs +++ b/Projectiles/Summon/ReaverOrb.cs @@ -3,6 +3,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Summon { diff --git a/Projectiles/Summon/RedDevil.cs b/Projectiles/Summon/RedDevil.cs index 05c8a3e43a..dbe654d626 100644 --- a/Projectiles/Summon/RedDevil.cs +++ b/Projectiles/Summon/RedDevil.cs @@ -4,6 +4,7 @@ using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Summon { diff --git a/Projectiles/Summon/Sandnado.cs b/Projectiles/Summon/Sandnado.cs index 043cf04aa4..cd55382236 100644 --- a/Projectiles/Summon/Sandnado.cs +++ b/Projectiles/Summon/Sandnado.cs @@ -4,6 +4,7 @@ using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Summon { @@ -157,10 +158,10 @@ namespace CalamityMod.Projectiles.Summon } } } - int num16 = 500; + int num16 = 750; if (flag) { - num16 = 1000; + num16 = 2000; } if (Vector2.Distance(player.Center, projectile.Center) > (float)num16) { @@ -174,7 +175,7 @@ namespace CalamityMod.Projectiles.Summon vector4.Normalize(); if (num17 > 400f) { - float scaleFactor = 2f; + float scaleFactor = 6f; vector4 *= scaleFactor; projectile.velocity = (projectile.velocity * 20f + vector4) / 21f; } @@ -184,7 +185,7 @@ namespace CalamityMod.Projectiles.Summon } if (num17 > 200f) { - float scaleFactor2 = 6f; + float scaleFactor2 = 12f; vector4 *= scaleFactor2; projectile.velocity.X = (projectile.velocity.X * 40f + vector4.X) / 41f; projectile.velocity.Y = (projectile.velocity.Y * 40f + vector4.Y) / 41f; @@ -200,13 +201,13 @@ namespace CalamityMod.Projectiles.Summon { projectile.ai[0] = 1f; } - float num21 = 9f; + float num21 = 12f; Vector2 center2 = projectile.Center; Vector2 vector6 = (player.Center - center2 + new Vector2(0f, -60f)) + new Vector2(0f, 40f); float num23 = vector6.Length(); - if (num23 > 200f && num21 < 9f) + if (num23 > 200f && num21 < 12f) { - num21 = 9f; + num21 = 12f; } if (num23 < 100f && projectile.ai[0] == 1f && !Collision.SolidCollision(projectile.position, projectile.width, projectile.height)) { diff --git a/Projectiles/Summon/SandyWaifu.cs b/Projectiles/Summon/SandyWaifu.cs index a421db0dee..87adbabc03 100644 --- a/Projectiles/Summon/SandyWaifu.cs +++ b/Projectiles/Summon/SandyWaifu.cs @@ -4,6 +4,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Summon { diff --git a/Projectiles/Summon/SilvaCrystal.cs b/Projectiles/Summon/SilvaCrystal.cs index 2507a2f20c..340d53f1b8 100644 --- a/Projectiles/Summon/SilvaCrystal.cs +++ b/Projectiles/Summon/SilvaCrystal.cs @@ -4,6 +4,7 @@ using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Summon { diff --git a/Projectiles/Summon/SirenLure.cs b/Projectiles/Summon/SirenLure.cs index aa94bfd224..64291240d0 100644 --- a/Projectiles/Summon/SirenLure.cs +++ b/Projectiles/Summon/SirenLure.cs @@ -3,6 +3,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Summon { diff --git a/Projectiles/Summon/SlimeGod.cs b/Projectiles/Summon/SlimeGod.cs index fab18dffc2..90275fa760 100644 --- a/Projectiles/Summon/SlimeGod.cs +++ b/Projectiles/Summon/SlimeGod.cs @@ -2,6 +2,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Summon { diff --git a/Projectiles/Summon/SlimeGodAlt.cs b/Projectiles/Summon/SlimeGodAlt.cs index ec7a6d8acb..485e0dbef3 100644 --- a/Projectiles/Summon/SlimeGodAlt.cs +++ b/Projectiles/Summon/SlimeGodAlt.cs @@ -2,6 +2,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Summon { diff --git a/Projectiles/Summon/SolarGod.cs b/Projectiles/Summon/SolarGod.cs index e69c20a316..309edaedc7 100644 --- a/Projectiles/Summon/SolarGod.cs +++ b/Projectiles/Summon/SolarGod.cs @@ -3,6 +3,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Summon { diff --git a/Projectiles/Summon/SolarPixie.cs b/Projectiles/Summon/SolarPixie.cs index a8dde9547e..953cfbce1b 100644 --- a/Projectiles/Summon/SolarPixie.cs +++ b/Projectiles/Summon/SolarPixie.cs @@ -3,6 +3,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Summon { diff --git a/Projectiles/Summon/Urchin.cs b/Projectiles/Summon/Urchin.cs index ae77db47a6..e69fc30247 100644 --- a/Projectiles/Summon/Urchin.cs +++ b/Projectiles/Summon/Urchin.cs @@ -3,6 +3,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Summon { diff --git a/Projectiles/Summon/Valkyrie.cs b/Projectiles/Summon/Valkyrie.cs index 31f97dc216..8ab1eb3477 100644 --- a/Projectiles/Summon/Valkyrie.cs +++ b/Projectiles/Summon/Valkyrie.cs @@ -4,6 +4,7 @@ using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Summon { diff --git a/Projectiles/SunkenSea/ClamCrusherFlail.cs b/Projectiles/SunkenSea/ClamCrusherFlail.cs index c5f4178927..43aa23f436 100644 --- a/Projectiles/SunkenSea/ClamCrusherFlail.cs +++ b/Projectiles/SunkenSea/ClamCrusherFlail.cs @@ -3,6 +3,7 @@ using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.SunkenSea { diff --git a/Projectiles/SunkenSea/EutrophicScimitarProj.cs b/Projectiles/SunkenSea/EutrophicScimitarProj.cs index f6bd3e3c81..5e39620284 100644 --- a/Projectiles/SunkenSea/EutrophicScimitarProj.cs +++ b/Projectiles/SunkenSea/EutrophicScimitarProj.cs @@ -2,6 +2,7 @@ using System; using Microsoft.Xna.Framework; using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.SunkenSea { diff --git a/Projectiles/SunkenSea/Shellfish.cs b/Projectiles/SunkenSea/Shellfish.cs index a1cac6789a..4608c17efd 100644 --- a/Projectiles/SunkenSea/Shellfish.cs +++ b/Projectiles/SunkenSea/Shellfish.cs @@ -2,6 +2,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.SunkenSea { diff --git a/Projectiles/Typeless/GalaxySmasherHammer.cs b/Projectiles/Typeless/GalaxySmasherHammer.cs index a5440b5755..a8b7aec88c 100644 --- a/Projectiles/Typeless/GalaxySmasherHammer.cs +++ b/Projectiles/Typeless/GalaxySmasherHammer.cs @@ -182,14 +182,14 @@ namespace CalamityMod.Projectiles.Typeless float laserSpeed = Main.rand.NextFloat(15f, 18f); Vector2 velocity = startDir * (-laserSpeed); - // NebulaShot projectile adjusts its own damage type based on ai[0] - if (projectile.owner == Main.myPlayer) + // NebulaShot projectile adjusts its own damage type based on ai[0] + if (projectile.owner == Main.myPlayer) { float damageType = projectile.melee ? 1f : 2f; int proj = Projectile.NewProjectile(startPoint, velocity, laserID, laserDamage, laserKB, projectile.owner, damageType, 0f); Main.projectile[proj].tileCollide = false; Main.projectile[proj].timeLeft = 30; - } + } } } } diff --git a/Projectiles/Typeless/GrenadeRound.cs b/Projectiles/Typeless/GrenadeRound.cs index 63f1e79ee3..1f1f51c340 100644 --- a/Projectiles/Typeless/GrenadeRound.cs +++ b/Projectiles/Typeless/GrenadeRound.cs @@ -3,6 +3,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Typeless { diff --git a/Projectiles/Typeless/MagnumRound.cs b/Projectiles/Typeless/MagnumRound.cs index 79a2a1ea3e..ab1304e08a 100644 --- a/Projectiles/Typeless/MagnumRound.cs +++ b/Projectiles/Typeless/MagnumRound.cs @@ -1,6 +1,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Typeless { diff --git a/Projectiles/Typeless/NanoblackMain.cs b/Projectiles/Typeless/NanoblackMain.cs index 425dc80465..e8c2d4f85d 100644 --- a/Projectiles/Typeless/NanoblackMain.cs +++ b/Projectiles/Typeless/NanoblackMain.cs @@ -128,7 +128,6 @@ namespace CalamityMod.Projectiles.Typeless // Rotate the scythe as it flies. float spin = (projectile.direction <= 0) ? -1f : 1f; projectile.rotation += spin * RotationIncrement; - return; } public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) @@ -155,13 +154,13 @@ namespace CalamityMod.Projectiles.Typeless Vector2 pos = projectile.Center + directOffset + velocityOffset; if (projectile.owner == Main.myPlayer) { - int proj = Projectile.NewProjectile(pos, Vector2.Zero, bladeID, bladeDamage, bladeKB, projectile.owner, 0f, spin); - CalamityGlobalProjectile cgp = Main.projectile[proj].GetGlobalProjectile(mod); - if (projectile.melee) - cgp.forceMelee = true; - else - cgp.forceRogue = true; - } + int proj = Projectile.NewProjectile(pos, Vector2.Zero, bladeID, bladeDamage, bladeKB, projectile.owner, 0f, spin); + CalamityGlobalProjectile cgp = Main.projectile[proj].GetGlobalProjectile(mod); + if (projectile.melee) + cgp.forceMelee = true; + else + cgp.forceRogue = true; + } } } } diff --git a/Projectiles/Typeless/OmegaBlueTentacle.cs b/Projectiles/Typeless/OmegaBlueTentacle.cs index ddb445ace1..ca7777005f 100644 --- a/Projectiles/Typeless/OmegaBlueTentacle.cs +++ b/Projectiles/Typeless/OmegaBlueTentacle.cs @@ -5,6 +5,7 @@ using Terraria.ID; using Terraria.DataStructures; using Terraria.Graphics.Shaders; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Projectiles.Typeless { diff --git a/Projectiles/Typeless/StellarContemptHammer.cs b/Projectiles/Typeless/StellarContemptHammer.cs index 6631748d99..885634b4d5 100644 --- a/Projectiles/Typeless/StellarContemptHammer.cs +++ b/Projectiles/Typeless/StellarContemptHammer.cs @@ -112,7 +112,6 @@ namespace CalamityMod.Projectiles.Typeless // Rotate the hammer as it flies. projectile.rotation += RotationIncrement; - return; } public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) @@ -181,13 +180,13 @@ namespace CalamityMod.Projectiles.Typeless float AI1 = (float)Main.rand.Next(3); if (projectile.owner == Main.myPlayer) { - int proj = Projectile.NewProjectile(startPoint, velocity, ProjectileID.LunarFlare, flareDamage, flareKB, Main.myPlayer, 0f, AI1); - CalamityGlobalProjectile cgp = Main.projectile[proj].GetGlobalProjectile(mod); - if (projectile.melee) - cgp.forceMelee = true; - else - cgp.forceRogue = true; - } + int proj = Projectile.NewProjectile(startPoint, velocity, ProjectileID.LunarFlare, flareDamage, flareKB, Main.myPlayer, 0f, AI1); + CalamityGlobalProjectile cgp = Main.projectile[proj].GetGlobalProjectile(mod); + if (projectile.melee) + cgp.forceMelee = true; + else + cgp.forceRogue = true; + } } } } diff --git a/Sounds/Custom/AdrenalineBurnout1.ogg b/Sounds/Custom/AdrenalineBurnout1.ogg new file mode 100644 index 0000000000..0a7032abb8 Binary files /dev/null and b/Sounds/Custom/AdrenalineBurnout1.ogg differ diff --git a/Sounds/Custom/AdrenalineBurnout1.wav b/Sounds/Custom/AdrenalineBurnout1.wav deleted file mode 100644 index cee133c615..0000000000 Binary files a/Sounds/Custom/AdrenalineBurnout1.wav and /dev/null differ diff --git a/Sounds/Custom/AdrenalineBurnout2.ogg b/Sounds/Custom/AdrenalineBurnout2.ogg new file mode 100644 index 0000000000..a75cfc7e25 Binary files /dev/null and b/Sounds/Custom/AdrenalineBurnout2.ogg differ diff --git a/Sounds/Custom/AdrenalineBurnout2.wav b/Sounds/Custom/AdrenalineBurnout2.wav deleted file mode 100644 index 0aa80f483c..0000000000 Binary files a/Sounds/Custom/AdrenalineBurnout2.wav and /dev/null differ diff --git a/Sounds/Custom/AngryDogGrowl.ogg b/Sounds/Custom/AngryDogGrowl.ogg new file mode 100644 index 0000000000..2f742ea60c Binary files /dev/null and b/Sounds/Custom/AngryDogGrowl.ogg differ diff --git a/Sounds/Custom/AngryDogGrowl.wav b/Sounds/Custom/AngryDogGrowl.wav deleted file mode 100644 index 5153be8b37..0000000000 Binary files a/Sounds/Custom/AngryDogGrowl.wav and /dev/null differ diff --git a/Sounds/Custom/AtlasIdle0.ogg b/Sounds/Custom/AtlasIdle0.ogg new file mode 100644 index 0000000000..4d0f41e64a Binary files /dev/null and b/Sounds/Custom/AtlasIdle0.ogg differ diff --git a/Sounds/Custom/AtlasIdle0.wav b/Sounds/Custom/AtlasIdle0.wav deleted file mode 100644 index 90924a6d22..0000000000 Binary files a/Sounds/Custom/AtlasIdle0.wav and /dev/null differ diff --git a/Sounds/Custom/AtlasIdle1.ogg b/Sounds/Custom/AtlasIdle1.ogg new file mode 100644 index 0000000000..2e5760f78a Binary files /dev/null and b/Sounds/Custom/AtlasIdle1.ogg differ diff --git a/Sounds/Custom/AtlasIdle1.wav b/Sounds/Custom/AtlasIdle1.wav deleted file mode 100644 index 3219b970a6..0000000000 Binary files a/Sounds/Custom/AtlasIdle1.wav and /dev/null differ diff --git a/Sounds/Custom/AtlasSad0.ogg b/Sounds/Custom/AtlasSad0.ogg new file mode 100644 index 0000000000..e267af8100 Binary files /dev/null and b/Sounds/Custom/AtlasSad0.ogg differ diff --git a/Sounds/Custom/AtlasSad0.wav b/Sounds/Custom/AtlasSad0.wav deleted file mode 100644 index 7db61cf6f2..0000000000 Binary files a/Sounds/Custom/AtlasSad0.wav and /dev/null differ diff --git a/Sounds/Custom/AtlasSad1.ogg b/Sounds/Custom/AtlasSad1.ogg new file mode 100644 index 0000000000..26f1a1c53b Binary files /dev/null and b/Sounds/Custom/AtlasSad1.ogg differ diff --git a/Sounds/Custom/AtlasSad1.wav b/Sounds/Custom/AtlasSad1.wav deleted file mode 100644 index c8421f8e81..0000000000 Binary files a/Sounds/Custom/AtlasSad1.wav and /dev/null differ diff --git a/Sounds/Custom/AtlasSwing.ogg b/Sounds/Custom/AtlasSwing.ogg new file mode 100644 index 0000000000..972b6aa311 Binary files /dev/null and b/Sounds/Custom/AtlasSwing.ogg differ diff --git a/Sounds/Custom/AtlasSwing.wav b/Sounds/Custom/AtlasSwing.wav deleted file mode 100644 index e0bcde311d..0000000000 Binary files a/Sounds/Custom/AtlasSwing.wav and /dev/null differ diff --git a/Sounds/Custom/BazookaRocket.ogg b/Sounds/Custom/BazookaRocket.ogg new file mode 100644 index 0000000000..a2c5f35447 Binary files /dev/null and b/Sounds/Custom/BazookaRocket.ogg differ diff --git a/Sounds/Custom/BazookaRocket.wav b/Sounds/Custom/BazookaRocket.wav deleted file mode 100644 index 0f739323fc..0000000000 Binary files a/Sounds/Custom/BazookaRocket.wav and /dev/null differ diff --git a/Sounds/Custom/CorvinaScream.ogg b/Sounds/Custom/CorvinaScream.ogg new file mode 100644 index 0000000000..f6fc1df4ee Binary files /dev/null and b/Sounds/Custom/CorvinaScream.ogg differ diff --git a/Sounds/Custom/CorvinaScream.wav b/Sounds/Custom/CorvinaScream.wav deleted file mode 100644 index 5a97f98f7b..0000000000 Binary files a/Sounds/Custom/CorvinaScream.wav and /dev/null differ diff --git a/Sounds/Custom/DevilMaskBreak.mp3 b/Sounds/Custom/DevilMaskBreak.mp3 deleted file mode 100644 index 5875127a17..0000000000 Binary files a/Sounds/Custom/DevilMaskBreak.mp3 and /dev/null differ diff --git a/Sounds/Custom/DevilMaskBreak.ogg b/Sounds/Custom/DevilMaskBreak.ogg new file mode 100644 index 0000000000..40159f8859 Binary files /dev/null and b/Sounds/Custom/DevilMaskBreak.ogg differ diff --git a/Sounds/Custom/EidolonWyrmRoarClose.ogg b/Sounds/Custom/EidolonWyrmRoarClose.ogg new file mode 100644 index 0000000000..4f908dd375 Binary files /dev/null and b/Sounds/Custom/EidolonWyrmRoarClose.ogg differ diff --git a/Sounds/Custom/EidolonWyrmRoarClose.wav b/Sounds/Custom/EidolonWyrmRoarClose.wav deleted file mode 100644 index 28962f3ae0..0000000000 Binary files a/Sounds/Custom/EidolonWyrmRoarClose.wav and /dev/null differ diff --git a/Sounds/Custom/FullAdrenaline.ogg b/Sounds/Custom/FullAdrenaline.ogg new file mode 100644 index 0000000000..abd6f19ed9 Binary files /dev/null and b/Sounds/Custom/FullAdrenaline.ogg differ diff --git a/Sounds/Custom/FullAdrenaline.wav b/Sounds/Custom/FullAdrenaline.wav deleted file mode 100644 index 18d825457e..0000000000 Binary files a/Sounds/Custom/FullAdrenaline.wav and /dev/null differ diff --git a/Sounds/Custom/FullRage.ogg b/Sounds/Custom/FullRage.ogg new file mode 100644 index 0000000000..3c158af8ce Binary files /dev/null and b/Sounds/Custom/FullRage.ogg differ diff --git a/Sounds/Custom/FullRage.wav b/Sounds/Custom/FullRage.wav deleted file mode 100644 index 00f5c5866c..0000000000 Binary files a/Sounds/Custom/FullRage.wav and /dev/null differ diff --git a/Sounds/Custom/GreatSandSharkRoar.ogg b/Sounds/Custom/GreatSandSharkRoar.ogg new file mode 100644 index 0000000000..f70f27d982 Binary files /dev/null and b/Sounds/Custom/GreatSandSharkRoar.ogg differ diff --git a/Sounds/Custom/GreatSandSharkRoar.wav b/Sounds/Custom/GreatSandSharkRoar.wav deleted file mode 100644 index 75b6801ccc..0000000000 Binary files a/Sounds/Custom/GreatSandSharkRoar.wav and /dev/null differ diff --git a/Sounds/Custom/IronHeartBigHurt.cs b/Sounds/Custom/IronHeartBigHurt.cs new file mode 100644 index 0000000000..975c74ed24 --- /dev/null +++ b/Sounds/Custom/IronHeartBigHurt.cs @@ -0,0 +1,18 @@ +using Microsoft.Xna.Framework.Audio; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Sounds.Custom +{ + public class IronHeartBigHurt : 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/IronHeartBigHurt.ogg b/Sounds/Custom/IronHeartBigHurt.ogg new file mode 100644 index 0000000000..c49eb2531e Binary files /dev/null and b/Sounds/Custom/IronHeartBigHurt.ogg differ diff --git a/Sounds/Custom/IronHeartHurt.cs b/Sounds/Custom/IronHeartHurt.cs new file mode 100644 index 0000000000..855242a5c8 --- /dev/null +++ b/Sounds/Custom/IronHeartHurt.cs @@ -0,0 +1,18 @@ +using Microsoft.Xna.Framework.Audio; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Sounds.Custom +{ + public class IronHeartHurt : 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/IronHeartHurt.ogg b/Sounds/Custom/IronHeartHurt.ogg new file mode 100644 index 0000000000..113478d360 Binary files /dev/null and b/Sounds/Custom/IronHeartHurt.ogg differ diff --git a/Sounds/Custom/LegStomp.ogg b/Sounds/Custom/LegStomp.ogg new file mode 100644 index 0000000000..63bbe5c2b6 Binary files /dev/null and b/Sounds/Custom/LegStomp.ogg differ diff --git a/Sounds/Custom/LegStomp.wav b/Sounds/Custom/LegStomp.wav deleted file mode 100644 index aa9b6aa01b..0000000000 Binary files a/Sounds/Custom/LegStomp.wav and /dev/null differ diff --git a/Sounds/Custom/MaulerRoar.ogg b/Sounds/Custom/MaulerRoar.ogg new file mode 100644 index 0000000000..7a5a23fcc5 Binary files /dev/null and b/Sounds/Custom/MaulerRoar.ogg differ diff --git a/Sounds/Custom/MaulerRoar.wav b/Sounds/Custom/MaulerRoar.wav deleted file mode 100644 index ffe1cb55f1..0000000000 Binary files a/Sounds/Custom/MaulerRoar.wav and /dev/null differ diff --git a/Sounds/Custom/ReaperEnragedRoar.ogg b/Sounds/Custom/ReaperEnragedRoar.ogg new file mode 100644 index 0000000000..eec3668795 Binary files /dev/null and b/Sounds/Custom/ReaperEnragedRoar.ogg differ diff --git a/Sounds/Custom/ReaperEnragedRoar.wav b/Sounds/Custom/ReaperEnragedRoar.wav deleted file mode 100644 index dda464857e..0000000000 Binary files a/Sounds/Custom/ReaperEnragedRoar.wav and /dev/null differ diff --git a/Sounds/Custom/ReaperSearchRoar.ogg b/Sounds/Custom/ReaperSearchRoar.ogg new file mode 100644 index 0000000000..96a4a9e576 Binary files /dev/null and b/Sounds/Custom/ReaperSearchRoar.ogg differ diff --git a/Sounds/Custom/ReaperSearchRoar.wav b/Sounds/Custom/ReaperSearchRoar.wav deleted file mode 100644 index 60e3a9e5a0..0000000000 Binary files a/Sounds/Custom/ReaperSearchRoar.wav and /dev/null differ diff --git a/Sounds/Custom/RogueStealth.ogg b/Sounds/Custom/RogueStealth.ogg new file mode 100644 index 0000000000..a637ddf5d7 Binary files /dev/null and b/Sounds/Custom/RogueStealth.ogg differ diff --git a/Sounds/Custom/RogueStealth.wav b/Sounds/Custom/RogueStealth.wav deleted file mode 100644 index 320b47b806..0000000000 Binary files a/Sounds/Custom/RogueStealth.wav and /dev/null differ diff --git a/Sounds/Custom/SilvaActivation.ogg b/Sounds/Custom/SilvaActivation.ogg new file mode 100644 index 0000000000..c841e26b5b Binary files /dev/null and b/Sounds/Custom/SilvaActivation.ogg differ diff --git a/Sounds/Custom/SilvaActivation.wav b/Sounds/Custom/SilvaActivation.wav deleted file mode 100644 index 63e3439ae6..0000000000 Binary files a/Sounds/Custom/SilvaActivation.wav and /dev/null differ diff --git a/Sounds/Custom/SilvaDispel.ogg b/Sounds/Custom/SilvaDispel.ogg new file mode 100644 index 0000000000..412f51f760 Binary files /dev/null and b/Sounds/Custom/SilvaDispel.ogg differ diff --git a/Sounds/Custom/SilvaDispel.wav b/Sounds/Custom/SilvaDispel.wav deleted file mode 100644 index 9b1e092225..0000000000 Binary files a/Sounds/Custom/SilvaDispel.wav and /dev/null differ diff --git a/Sounds/Custom/WyrmScream.ogg b/Sounds/Custom/WyrmScream.ogg new file mode 100644 index 0000000000..4fcc447641 Binary files /dev/null and b/Sounds/Custom/WyrmScream.ogg differ diff --git a/Sounds/Custom/WyrmScream.wav b/Sounds/Custom/WyrmScream.wav deleted file mode 100644 index ecfbf23871..0000000000 Binary files a/Sounds/Custom/WyrmScream.wav and /dev/null differ diff --git a/Sounds/Custom/YharonRoar.ogg b/Sounds/Custom/YharonRoar.ogg new file mode 100644 index 0000000000..c9d3b2d74f Binary files /dev/null and b/Sounds/Custom/YharonRoar.ogg differ diff --git a/Sounds/Custom/YharonRoar.wav b/Sounds/Custom/YharonRoar.wav deleted file mode 100644 index 6766e957f3..0000000000 Binary files a/Sounds/Custom/YharonRoar.wav and /dev/null differ diff --git a/Sounds/Custom/YharonRoarShort.ogg b/Sounds/Custom/YharonRoarShort.ogg new file mode 100644 index 0000000000..28584ed2bc Binary files /dev/null and b/Sounds/Custom/YharonRoarShort.ogg differ diff --git a/Sounds/Custom/YharonRoarShort.wav b/Sounds/Custom/YharonRoarShort.wav deleted file mode 100644 index 05be005cf7..0000000000 Binary files a/Sounds/Custom/YharonRoarShort.wav and /dev/null differ diff --git a/Sounds/Item/BazookaFull.ogg b/Sounds/Item/BazookaFull.ogg new file mode 100644 index 0000000000..21c37c6416 Binary files /dev/null and b/Sounds/Item/BazookaFull.ogg differ diff --git a/Sounds/Item/BazookaFull.wav b/Sounds/Item/BazookaFull.wav deleted file mode 100644 index eb7daa81d4..0000000000 Binary files a/Sounds/Item/BazookaFull.wav and /dev/null differ diff --git a/Sounds/Item/ClamImpact.ogg b/Sounds/Item/ClamImpact.ogg new file mode 100644 index 0000000000..3874c12f53 Binary files /dev/null and b/Sounds/Item/ClamImpact.ogg differ diff --git a/Sounds/Item/ClamImpact.wav b/Sounds/Item/ClamImpact.wav deleted file mode 100644 index 9d7500434b..0000000000 Binary files a/Sounds/Item/ClamImpact.wav and /dev/null differ diff --git a/Sounds/Item/ELRFire.ogg b/Sounds/Item/ELRFire.ogg new file mode 100644 index 0000000000..73390096a7 Binary files /dev/null and b/Sounds/Item/ELRFire.ogg differ diff --git a/Sounds/Item/ELRFire.wav b/Sounds/Item/ELRFire.wav deleted file mode 100644 index f817adf139..0000000000 Binary files a/Sounds/Item/ELRFire.wav and /dev/null differ diff --git a/Sounds/Item/FlareSound.ogg b/Sounds/Item/FlareSound.ogg new file mode 100644 index 0000000000..7f4a3989f9 Binary files /dev/null and b/Sounds/Item/FlareSound.ogg differ diff --git a/Sounds/Item/FlareSound.wav b/Sounds/Item/FlareSound.wav deleted file mode 100644 index 3906d8d728..0000000000 Binary files a/Sounds/Item/FlareSound.wav and /dev/null differ diff --git a/Sounds/Item/GatlingLaserFireEnd.ogg b/Sounds/Item/GatlingLaserFireEnd.ogg new file mode 100644 index 0000000000..b1f2180832 Binary files /dev/null and b/Sounds/Item/GatlingLaserFireEnd.ogg differ diff --git a/Sounds/Item/GatlingLaserFireEnd.wav b/Sounds/Item/GatlingLaserFireEnd.wav deleted file mode 100644 index 7cacebf151..0000000000 Binary files a/Sounds/Item/GatlingLaserFireEnd.wav and /dev/null differ diff --git a/Sounds/Item/GatlingLaserFireLoop.ogg b/Sounds/Item/GatlingLaserFireLoop.ogg new file mode 100644 index 0000000000..85123255a8 Binary files /dev/null and b/Sounds/Item/GatlingLaserFireLoop.ogg differ diff --git a/Sounds/Item/GatlingLaserFireLoop.wav b/Sounds/Item/GatlingLaserFireLoop.wav deleted file mode 100644 index d981cc5fc0..0000000000 Binary files a/Sounds/Item/GatlingLaserFireLoop.wav and /dev/null differ diff --git a/Sounds/Item/GatlingLaserFireStart.ogg b/Sounds/Item/GatlingLaserFireStart.ogg new file mode 100644 index 0000000000..b965fb567f Binary files /dev/null and b/Sounds/Item/GatlingLaserFireStart.ogg differ diff --git a/Sounds/Item/GatlingLaserFireStart.wav b/Sounds/Item/GatlingLaserFireStart.wav deleted file mode 100644 index 360e4cae79..0000000000 Binary files a/Sounds/Item/GatlingLaserFireStart.wav and /dev/null differ diff --git a/Sounds/Item/GaussWeaponFire.ogg b/Sounds/Item/GaussWeaponFire.ogg new file mode 100644 index 0000000000..e15236ce8e Binary files /dev/null and b/Sounds/Item/GaussWeaponFire.ogg differ diff --git a/Sounds/Item/GaussWeaponFire.wav b/Sounds/Item/GaussWeaponFire.wav deleted file mode 100644 index 24ef90348a..0000000000 Binary files a/Sounds/Item/GaussWeaponFire.wav and /dev/null differ diff --git a/Sounds/Item/Hydra.ogg b/Sounds/Item/Hydra.ogg new file mode 100644 index 0000000000..89f008de07 Binary files /dev/null and b/Sounds/Item/Hydra.ogg differ diff --git a/Sounds/Item/Hydra.wav b/Sounds/Item/Hydra.wav deleted file mode 100644 index a174866b6d..0000000000 Binary files a/Sounds/Item/Hydra.wav and /dev/null differ diff --git a/Sounds/Item/IronHeartDeath.ogg b/Sounds/Item/IronHeartDeath.ogg new file mode 100644 index 0000000000..ea63c441d2 Binary files /dev/null and b/Sounds/Item/IronHeartDeath.ogg differ diff --git a/Sounds/Item/IronHeartDeath.wav b/Sounds/Item/IronHeartDeath.wav deleted file mode 100644 index 74fe61cfda..0000000000 Binary files a/Sounds/Item/IronHeartDeath.wav and /dev/null differ diff --git a/Sounds/Item/KendraBark.ogg b/Sounds/Item/KendraBark.ogg new file mode 100644 index 0000000000..4ce81bad68 Binary files /dev/null and b/Sounds/Item/KendraBark.ogg differ diff --git a/Sounds/Item/KendraBark.wav b/Sounds/Item/KendraBark.wav deleted file mode 100644 index 18e700e582..0000000000 Binary files a/Sounds/Item/KendraBark.wav and /dev/null differ diff --git a/Sounds/Item/LargeMechGaussRifle.ogg b/Sounds/Item/LargeMechGaussRifle.ogg new file mode 100644 index 0000000000..fd91b44c4e Binary files /dev/null and b/Sounds/Item/LargeMechGaussRifle.ogg differ diff --git a/Sounds/Item/LargeMechGaussRifle.wav b/Sounds/Item/LargeMechGaussRifle.wav deleted file mode 100644 index 62647d20eb..0000000000 Binary files a/Sounds/Item/LargeMechGaussRifle.wav and /dev/null differ diff --git a/Sounds/Item/LargeWeaponFire.ogg b/Sounds/Item/LargeWeaponFire.ogg new file mode 100644 index 0000000000..7e317d66a8 Binary files /dev/null and b/Sounds/Item/LargeWeaponFire.ogg differ diff --git a/Sounds/Item/LargeWeaponFire.wav b/Sounds/Item/LargeWeaponFire.wav deleted file mode 100644 index 20269d4baf..0000000000 Binary files a/Sounds/Item/LargeWeaponFire.wav and /dev/null differ diff --git a/Sounds/Item/LaserCannon.ogg b/Sounds/Item/LaserCannon.ogg new file mode 100644 index 0000000000..d3b1601759 Binary files /dev/null and b/Sounds/Item/LaserCannon.ogg differ diff --git a/Sounds/Item/LaserCannon.wav b/Sounds/Item/LaserCannon.wav deleted file mode 100644 index 6127c92f78..0000000000 Binary files a/Sounds/Item/LaserCannon.wav and /dev/null differ diff --git a/Sounds/Item/LaserRifleFire.ogg b/Sounds/Item/LaserRifleFire.ogg new file mode 100644 index 0000000000..91f7b18d56 Binary files /dev/null and b/Sounds/Item/LaserRifleFire.ogg differ diff --git a/Sounds/Item/LaserRifleFire.wav b/Sounds/Item/LaserRifleFire.wav deleted file mode 100644 index 8d3528e045..0000000000 Binary files a/Sounds/Item/LaserRifleFire.wav and /dev/null differ diff --git a/Sounds/Item/Magnum.ogg b/Sounds/Item/Magnum.ogg new file mode 100644 index 0000000000..b5173f333e Binary files /dev/null and b/Sounds/Item/Magnum.ogg differ diff --git a/Sounds/Item/Magnum.wav b/Sounds/Item/Magnum.wav deleted file mode 100644 index d25c65b4f9..0000000000 Binary files a/Sounds/Item/Magnum.wav and /dev/null differ diff --git a/Sounds/Item/MechGaussRifle.ogg b/Sounds/Item/MechGaussRifle.ogg new file mode 100644 index 0000000000..cf4b8f3bb6 Binary files /dev/null and b/Sounds/Item/MechGaussRifle.ogg differ diff --git a/Sounds/Item/MechGaussRifle.wav b/Sounds/Item/MechGaussRifle.wav deleted file mode 100644 index 606987089e..0000000000 Binary files a/Sounds/Item/MechGaussRifle.wav and /dev/null differ diff --git a/Sounds/Item/OpalStrike.ogg b/Sounds/Item/OpalStrike.ogg new file mode 100644 index 0000000000..8a96f1dac2 Binary files /dev/null and b/Sounds/Item/OpalStrike.ogg differ diff --git a/Sounds/Item/OpalStrike.wav b/Sounds/Item/OpalStrike.wav deleted file mode 100644 index 6ec1dd7a90..0000000000 Binary files a/Sounds/Item/OpalStrike.wav and /dev/null differ diff --git a/Sounds/Item/PlasmaBlast.ogg b/Sounds/Item/PlasmaBlast.ogg new file mode 100644 index 0000000000..d6b055447c Binary files /dev/null and b/Sounds/Item/PlasmaBlast.ogg differ diff --git a/Sounds/Item/PlasmaBlast.wav b/Sounds/Item/PlasmaBlast.wav deleted file mode 100644 index 081a364cb1..0000000000 Binary files a/Sounds/Item/PlasmaBlast.wav and /dev/null differ diff --git a/Sounds/Item/PlasmaBolt.ogg b/Sounds/Item/PlasmaBolt.ogg new file mode 100644 index 0000000000..ec9d7b50bb Binary files /dev/null and b/Sounds/Item/PlasmaBolt.ogg differ diff --git a/Sounds/Item/PlasmaBolt.wav b/Sounds/Item/PlasmaBolt.wav deleted file mode 100644 index d63b4f6a20..0000000000 Binary files a/Sounds/Item/PlasmaBolt.wav and /dev/null differ diff --git a/Sounds/Item/PlasmaCasterFire.ogg b/Sounds/Item/PlasmaCasterFire.ogg new file mode 100644 index 0000000000..6e8c767686 Binary files /dev/null and b/Sounds/Item/PlasmaCasterFire.ogg differ diff --git a/Sounds/Item/PlasmaCasterFire.wav b/Sounds/Item/PlasmaCasterFire.wav deleted file mode 100644 index 9bfa7ada5e..0000000000 Binary files a/Sounds/Item/PlasmaCasterFire.wav and /dev/null differ diff --git a/Sounds/Item/PulseRifleFire.ogg b/Sounds/Item/PulseRifleFire.ogg new file mode 100644 index 0000000000..855a605b46 Binary files /dev/null and b/Sounds/Item/PulseRifleFire.ogg differ diff --git a/Sounds/Item/PulseRifleFire.wav b/Sounds/Item/PulseRifleFire.wav deleted file mode 100644 index af67b0e1cb..0000000000 Binary files a/Sounds/Item/PulseRifleFire.wav and /dev/null differ diff --git a/Sounds/Item/TankCannon.ogg b/Sounds/Item/TankCannon.ogg new file mode 100644 index 0000000000..c5ba09be5c Binary files /dev/null and b/Sounds/Item/TankCannon.ogg differ diff --git a/Sounds/Item/TankCannon.wav b/Sounds/Item/TankCannon.wav deleted file mode 100644 index 4d6ea145c1..0000000000 Binary files a/Sounds/Item/TankCannon.wav and /dev/null differ diff --git a/Sounds/Item/TeslaCannonFire.ogg b/Sounds/Item/TeslaCannonFire.ogg new file mode 100644 index 0000000000..8c86e03413 Binary files /dev/null and b/Sounds/Item/TeslaCannonFire.ogg differ diff --git a/Sounds/Item/TeslaCannonFire.wav b/Sounds/Item/TeslaCannonFire.wav deleted file mode 100644 index bc2daf2048..0000000000 Binary files a/Sounds/Item/TeslaCannonFire.wav and /dev/null differ diff --git a/Sounds/NPCDeath/AstralEnemyDeath.wav b/Sounds/NPCDeath/AstralEnemyDeath.wav deleted file mode 100644 index d1d9b5981a..0000000000 Binary files a/Sounds/NPCDeath/AstralEnemyDeath.wav and /dev/null differ diff --git a/Sounds/NPCDeath/AtlasDeath.wav b/Sounds/NPCDeath/AtlasDeath.wav deleted file mode 100644 index ef0d1fbb67..0000000000 Binary files a/Sounds/NPCDeath/AtlasDeath.wav and /dev/null differ diff --git a/Sounds/NPCDeath/Sunskater.wav b/Sounds/NPCDeath/Sunskater.wav deleted file mode 100644 index cad3914464..0000000000 Binary files a/Sounds/NPCDeath/Sunskater.wav and /dev/null differ diff --git a/Sounds/NPCHit/AngryDogHit.ogg b/Sounds/NPCHit/AngryDogHit.ogg new file mode 100644 index 0000000000..a69c1f4336 Binary files /dev/null and b/Sounds/NPCHit/AngryDogHit.ogg differ diff --git a/Sounds/NPCHit/AngryDogHit.wav b/Sounds/NPCHit/AngryDogHit.wav deleted file mode 100644 index 81aa3094e0..0000000000 Binary files a/Sounds/NPCHit/AngryDogHit.wav and /dev/null differ diff --git a/Sounds/NPCHit/AstralEnemyHit.ogg b/Sounds/NPCHit/AstralEnemyHit.ogg new file mode 100644 index 0000000000..6bdb14e638 Binary files /dev/null and b/Sounds/NPCHit/AstralEnemyHit.ogg differ diff --git a/Sounds/NPCHit/AstralEnemyHit.wav b/Sounds/NPCHit/AstralEnemyHit.wav deleted file mode 100644 index 267f46784c..0000000000 Binary files a/Sounds/NPCHit/AstralEnemyHit.wav and /dev/null differ diff --git a/Sounds/NPCHit/AstralEnemyHit2.ogg b/Sounds/NPCHit/AstralEnemyHit2.ogg new file mode 100644 index 0000000000..0d37aad7ce Binary files /dev/null and b/Sounds/NPCHit/AstralEnemyHit2.ogg differ diff --git a/Sounds/NPCHit/AstralEnemyHit2.wav b/Sounds/NPCHit/AstralEnemyHit2.wav deleted file mode 100644 index 2918e88011..0000000000 Binary files a/Sounds/NPCHit/AstralEnemyHit2.wav and /dev/null differ diff --git a/Sounds/NPCHit/AstralEnemyHit3.ogg b/Sounds/NPCHit/AstralEnemyHit3.ogg new file mode 100644 index 0000000000..7ca9bf07a2 Binary files /dev/null and b/Sounds/NPCHit/AstralEnemyHit3.ogg differ diff --git a/Sounds/NPCHit/AstralEnemyHit3.wav b/Sounds/NPCHit/AstralEnemyHit3.wav deleted file mode 100644 index 46a2c10e63..0000000000 Binary files a/Sounds/NPCHit/AstralEnemyHit3.wav and /dev/null differ diff --git a/Sounds/NPCHit/AstrumAureusHit.ogg b/Sounds/NPCHit/AstrumAureusHit.ogg new file mode 100644 index 0000000000..4239538235 Binary files /dev/null and b/Sounds/NPCHit/AstrumAureusHit.ogg differ diff --git a/Sounds/NPCHit/AstrumAureusHit.wav b/Sounds/NPCHit/AstrumAureusHit.wav deleted file mode 100644 index 32258e0783..0000000000 Binary files a/Sounds/NPCHit/AstrumAureusHit.wav and /dev/null differ diff --git a/Sounds/NPCHit/AtlasHurt0.ogg b/Sounds/NPCHit/AtlasHurt0.ogg new file mode 100644 index 0000000000..521d3e831e Binary files /dev/null and b/Sounds/NPCHit/AtlasHurt0.ogg differ diff --git a/Sounds/NPCHit/AtlasHurt0.wav b/Sounds/NPCHit/AtlasHurt0.wav deleted file mode 100644 index ce50f71fff..0000000000 Binary files a/Sounds/NPCHit/AtlasHurt0.wav and /dev/null differ diff --git a/Sounds/NPCHit/AtlasHurt1.ogg b/Sounds/NPCHit/AtlasHurt1.ogg new file mode 100644 index 0000000000..d8d2a26a78 Binary files /dev/null and b/Sounds/NPCHit/AtlasHurt1.ogg differ diff --git a/Sounds/NPCHit/AtlasHurt1.wav b/Sounds/NPCHit/AtlasHurt1.wav deleted file mode 100644 index 49e72c1ae0..0000000000 Binary files a/Sounds/NPCHit/AtlasHurt1.wav and /dev/null differ diff --git a/Sounds/NPCHit/AtlasHurt2.ogg b/Sounds/NPCHit/AtlasHurt2.ogg new file mode 100644 index 0000000000..7a186b5905 Binary files /dev/null and b/Sounds/NPCHit/AtlasHurt2.ogg differ diff --git a/Sounds/NPCHit/AtlasHurt2.wav b/Sounds/NPCHit/AtlasHurt2.wav deleted file mode 100644 index f0a166083f..0000000000 Binary files a/Sounds/NPCHit/AtlasHurt2.wav and /dev/null differ diff --git a/Sounds/NPCDeath/AstralEnemyDeath.cs b/Sounds/NPCKilled/AstralEnemyDeath.cs similarity index 93% rename from Sounds/NPCDeath/AstralEnemyDeath.cs rename to Sounds/NPCKilled/AstralEnemyDeath.cs index 829eb99c48..87ed76a1f3 100644 --- a/Sounds/NPCDeath/AstralEnemyDeath.cs +++ b/Sounds/NPCKilled/AstralEnemyDeath.cs @@ -2,7 +2,7 @@ using Terraria; using Terraria.ModLoader; -namespace CalamityMod.Sounds.NPCDeath +namespace CalamityMod.Sounds.NPCKilled { public class AstralEnemyDeath : ModSound { diff --git a/Sounds/NPCKilled/AstralEnemyDeath.ogg b/Sounds/NPCKilled/AstralEnemyDeath.ogg new file mode 100644 index 0000000000..4bc59a02c4 Binary files /dev/null and b/Sounds/NPCKilled/AstralEnemyDeath.ogg differ diff --git a/Sounds/NPCDeath/AtlasDeath.cs b/Sounds/NPCKilled/AtlasDeath.cs similarity index 92% rename from Sounds/NPCDeath/AtlasDeath.cs rename to Sounds/NPCKilled/AtlasDeath.cs index cd7a18c067..b2854be375 100644 --- a/Sounds/NPCDeath/AtlasDeath.cs +++ b/Sounds/NPCKilled/AtlasDeath.cs @@ -2,7 +2,7 @@ using Terraria; using Terraria.ModLoader; -namespace CalamityMod.Sounds.NPCDeath +namespace CalamityMod.Sounds.NPCKilled { public class AtlasDeath : ModSound { diff --git a/Sounds/NPCKilled/AtlasDeath.ogg b/Sounds/NPCKilled/AtlasDeath.ogg new file mode 100644 index 0000000000..4d10fc83c1 Binary files /dev/null and b/Sounds/NPCKilled/AtlasDeath.ogg differ diff --git a/Sounds/NPCDeath/Sunskater.cs b/Sounds/NPCKilled/Sunskater.cs similarity index 82% rename from Sounds/NPCDeath/Sunskater.cs rename to Sounds/NPCKilled/Sunskater.cs index 9501ced38c..2ac1735529 100644 --- a/Sounds/NPCDeath/Sunskater.cs +++ b/Sounds/NPCKilled/Sunskater.cs @@ -2,14 +2,14 @@ using Microsoft.Xna.Framework.Audio; using Terraria; using Terraria.ModLoader; -namespace CalamityMod.Sounds.NPCDeath +namespace CalamityMod.Sounds.NPCKilled { public class Sunskater : ModSound { public override SoundEffectInstance PlaySound(ref SoundEffectInstance soundInstance, float volume, float pan, SoundType type) { soundInstance = sound.CreateInstance(); - soundInstance.Volume = volume * 2f; //1f + soundInstance.Volume = volume * 0.9f; soundInstance.Pan = pan; Main.PlaySoundInstance(soundInstance); return soundInstance; diff --git a/Sounds/NPCKilled/Sunskater.ogg b/Sounds/NPCKilled/Sunskater.ogg new file mode 100644 index 0000000000..0312c2739e Binary files /dev/null and b/Sounds/NPCKilled/Sunskater.ogg differ diff --git a/Tiles/Astral/AstralDirt.cs b/Tiles/Astral/AstralDirt.cs index 8d6d6b28cd..cdeca85a8f 100644 --- a/Tiles/Astral/AstralDirt.cs +++ b/Tiles/Astral/AstralDirt.cs @@ -2,6 +2,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.Utilities; namespace CalamityMod.Tiles.Astral { diff --git a/Tiles/Astral/AstralOre.cs b/Tiles/Astral/AstralOre.cs index 68111fb03a..05bc3e10bf 100644 --- a/Tiles/Astral/AstralOre.cs +++ b/Tiles/Astral/AstralOre.cs @@ -4,6 +4,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.Utilities; namespace CalamityMod.Tiles.Astral { diff --git a/Tiles/Astral/AstralStone.cs b/Tiles/Astral/AstralStone.cs index 336ac993f2..9e32933848 100644 --- a/Tiles/Astral/AstralStone.cs +++ b/Tiles/Astral/AstralStone.cs @@ -2,6 +2,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.Utilities; namespace CalamityMod.Tiles.Astral { diff --git a/Tiles/AstralDesert/AstralSand.cs b/Tiles/AstralDesert/AstralSand.cs index d997ed6589..7e3befaff4 100644 --- a/Tiles/AstralDesert/AstralSand.cs +++ b/Tiles/AstralDesert/AstralSand.cs @@ -3,6 +3,7 @@ using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.Utilities; namespace CalamityMod.Tiles.AstralDesert { diff --git a/Tiles/AstralDesert/AstralSandstone.cs b/Tiles/AstralDesert/AstralSandstone.cs index 1b5ac09ad9..7d59e29d7b 100644 --- a/Tiles/AstralDesert/AstralSandstone.cs +++ b/Tiles/AstralDesert/AstralSandstone.cs @@ -2,6 +2,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.Utilities; namespace CalamityMod.Tiles.AstralDesert { diff --git a/Tiles/AstralDesert/HardenedAstralSand.cs b/Tiles/AstralDesert/HardenedAstralSand.cs index 53e34b933f..9b5145000f 100644 --- a/Tiles/AstralDesert/HardenedAstralSand.cs +++ b/Tiles/AstralDesert/HardenedAstralSand.cs @@ -2,6 +2,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.Utilities; namespace CalamityMod.Tiles.AstralDesert { diff --git a/Tiles/BossTrophy.png b/Tiles/BossTrophy.png index 5d6ce0f30c..3cd5ec6c5d 100644 Binary files a/Tiles/BossTrophy.png and b/Tiles/BossTrophy.png differ diff --git a/Tiles/CalamityGlobalTile.cs b/Tiles/CalamityGlobalTile.cs index cf761b474d..78479aa753 100644 --- a/Tiles/CalamityGlobalTile.cs +++ b/Tiles/CalamityGlobalTile.cs @@ -4,6 +4,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.Utilities; namespace CalamityMod.Tiles { diff --git a/Tiles/SunkenSea/Navystone.cs b/Tiles/SunkenSea/Navystone.cs index 9bb8553e7b..05daf989de 100644 --- a/Tiles/SunkenSea/Navystone.cs +++ b/Tiles/SunkenSea/Navystone.cs @@ -40,7 +40,7 @@ namespace CalamityMod.Tiles.SunkenSea public override void RandomUpdate(int i, int j) { - if (Main.rand.Next(100) == 0) + if (Main.rand.Next(150) == 0) { int random = WorldGen.genRand.Next(4); if (random == 0) diff --git a/Tiles/SunkenSea/SeaPrism.cs b/Tiles/SunkenSea/SeaPrism.cs index 02b586b600..626e954c67 100644 --- a/Tiles/SunkenSea/SeaPrism.cs +++ b/Tiles/SunkenSea/SeaPrism.cs @@ -41,7 +41,7 @@ namespace CalamityMod.Tiles.SunkenSea public override void RandomUpdate(int i, int j) { - if (Main.rand.Next(25) == 0) + if (Main.rand.Next(50) == 0) { int random = WorldGen.genRand.Next(4); if (random == 0) diff --git a/UI/AstralArcanumUI.cs b/UI/AstralArcanumUI.cs index add688f13b..ee0c113494 100644 --- a/UI/AstralArcanumUI.cs +++ b/UI/AstralArcanumUI.cs @@ -6,6 +6,7 @@ using Terraria; using Terraria.ModLoader; using CalamityMod.World; +using CalamityMod.CalPlayer; namespace CalamityMod.UI { diff --git a/UI/UIBar.cs b/UI/UIBar.cs index 11fda4072c..5f84cbc384 100644 --- a/UI/UIBar.cs +++ b/UI/UIBar.cs @@ -7,6 +7,8 @@ using Terraria.GameContent.UI.Elements; using Terraria.UI; using Terraria.ModLoader; +using CalamityMod.CalPlayer; + namespace CalamityMod.UI { public class UIBar : UIState diff --git a/UI/UIBar2.cs b/UI/UIBar2.cs index 3ecf5264f8..789e80bcd0 100644 --- a/UI/UIBar2.cs +++ b/UI/UIBar2.cs @@ -7,6 +7,8 @@ using Terraria.GameContent.UI.Elements; using Terraria.UI; using Terraria.ModLoader; +using CalamityMod.CalPlayer; + namespace CalamityMod.UI { public class UIBar2 : UIState diff --git a/UIHandler.cs b/UI/UIHandler.cs similarity index 97% rename from UIHandler.cs rename to UI/UIHandler.cs index 2d963bb62a..82e88cde0a 100644 --- a/UIHandler.cs +++ b/UI/UIHandler.cs @@ -5,9 +5,7 @@ using Terraria; using Terraria.UI; using Terraria.ModLoader; -using CalamityMod.UI; - -namespace CalamityMod +namespace CalamityMod.UI { public class UIHandler { diff --git a/CalamityCollision.cs b/Utilities/CalamityCollision.cs similarity index 98% rename from CalamityCollision.cs rename to Utilities/CalamityCollision.cs index 4a9fed7ce1..e5b9f6eb38 100644 --- a/CalamityCollision.cs +++ b/Utilities/CalamityCollision.cs @@ -2,7 +2,7 @@ using Microsoft.Xna.Framework; using Terraria; -namespace CalamityMod +namespace CalamityMod.Utilities { public class CalamityCollision { diff --git a/CalamityRecipes.cs b/Utilities/CalamityRecipes.cs similarity index 99% rename from CalamityRecipes.cs rename to Utilities/CalamityRecipes.cs index 7779798a4b..e2104e6739 100644 --- a/CalamityRecipes.cs +++ b/Utilities/CalamityRecipes.cs @@ -4,7 +4,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace CalamityMod +namespace CalamityMod.Utilities { internal class CalamityRecipes { diff --git a/CustomTileFraming.cs b/Utilities/CustomTileFraming.cs similarity index 99% rename from CustomTileFraming.cs rename to Utilities/CustomTileFraming.cs index 19e204c97e..e09235247e 100644 --- a/CustomTileFraming.cs +++ b/Utilities/CustomTileFraming.cs @@ -7,7 +7,7 @@ using Terraria.ModLoader; using CalamityMod.Tiles; -namespace CalamityMod +namespace CalamityMod.Utilities { public static class CustomTileFraming { diff --git a/DropHelper.cs b/Utilities/DropHelper.cs similarity index 99% rename from DropHelper.cs rename to Utilities/DropHelper.cs index 6c9833ddab..b51c1ba187 100644 --- a/DropHelper.cs +++ b/Utilities/DropHelper.cs @@ -3,7 +3,7 @@ using Microsoft.Xna.Framework; using Terraria; using CalamityMod.World; -namespace CalamityMod +namespace CalamityMod.Utilities { public class DropHelper { diff --git a/Enums.cs b/Utilities/Enums.cs similarity index 75% rename from Enums.cs rename to Utilities/Enums.cs index ebea6267a6..920a66ffeb 100644 --- a/Enums.cs +++ b/Utilities/Enums.cs @@ -1,4 +1,4 @@ -namespace CalamityMod +namespace CalamityMod.Utilities { public enum ConvertType { diff --git a/Waters/AbyssWater.cs b/Waters/AbyssWater.cs index 9b4ee5bc98..a2e1d91a66 100644 --- a/Waters/AbyssWater.cs +++ b/Waters/AbyssWater.cs @@ -1,6 +1,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Waters { diff --git a/Waters/AstralWater.cs b/Waters/AstralWater.cs index 16a16de244..8e6b81cc6c 100644 --- a/Waters/AstralWater.cs +++ b/Waters/AstralWater.cs @@ -1,6 +1,8 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; + namespace CalamityMod.Waters { public class AstralWater : ModWaterStyle @@ -9,18 +11,22 @@ namespace CalamityMod.Waters { return Main.LocalPlayer.GetModPlayer(mod).ZoneAstral; } + public override int ChooseWaterfallStyle() { return mod.GetWaterfallStyleSlot("AstralWaterflow"); } + public override int GetSplashDust() { return 52; //corruption water? } + public override int GetDropletGore() { return mod.GetGoreSlot("Gores/AstralWaterDroplet"); } + public override Color BiomeHairColor() { return Color.MediumPurple; diff --git a/Waters/AstralWaterflow.cs b/Waters/AstralWaterflow.cs index b865a8c36b..783f53769c 100644 --- a/Waters/AstralWaterflow.cs +++ b/Waters/AstralWaterflow.cs @@ -3,5 +3,6 @@ namespace CalamityMod.Waters { public class AstralWaterflow : ModWaterfallStyle { + } } diff --git a/Waters/SulphuricWater.cs b/Waters/SulphuricWater.cs index d31917d5cf..af32cb58d0 100644 --- a/Waters/SulphuricWater.cs +++ b/Waters/SulphuricWater.cs @@ -1,6 +1,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Waters { @@ -18,17 +19,17 @@ namespace CalamityMod.Waters public override int GetSplashDust() { - return 102; + return 101; } public override int GetDropletGore() { - return 711; + return 708; } - public override Color BiomeHairColor() + public override Color BiomeHairColor() { - return Color.Yellow; + return Color.Turquoise; } } } diff --git a/Waters/SulphuricWater.png b/Waters/SulphuricWater.png index 4538f2067a..84a9e6e7a2 100644 Binary files a/Waters/SulphuricWater.png and b/Waters/SulphuricWater.png differ diff --git a/Waters/SulphuricWater_Block.png b/Waters/SulphuricWater_Block.png index 77af969291..b02541e8ed 100644 Binary files a/Waters/SulphuricWater_Block.png and b/Waters/SulphuricWater_Block.png differ diff --git a/Waters/SulphuricWaterflow.png b/Waters/SulphuricWaterflow.png index 23f74979f6..eec550a78c 100644 Binary files a/Waters/SulphuricWaterflow.png and b/Waters/SulphuricWaterflow.png differ diff --git a/Waters/SunkenSeaWater.cs b/Waters/SunkenSeaWater.cs index 6e48f381fa..50f9393100 100644 --- a/Waters/SunkenSeaWater.cs +++ b/Waters/SunkenSeaWater.cs @@ -1,6 +1,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.ModLoader; +using CalamityMod.CalPlayer; namespace CalamityMod.Waters { diff --git a/World/CalamityWorld.cs b/World/CalamityWorld.cs index a520cd01f5..616cf89fe7 100644 --- a/World/CalamityWorld.cs +++ b/World/CalamityWorld.cs @@ -11,14 +11,13 @@ using Terraria.Localization; using Terraria.GameContent.Events; using Terraria.ModLoader.IO; using CalamityMod.NPCs; +using CalamityMod.CalPlayer; namespace CalamityMod.World { public class CalamityWorld : ModWorld { #region Vars - //private const int ExpandWorldBy = 200; - public static int DoGSecondStageCountdown = 0; private const int saveVersion = 0; @@ -63,9 +62,6 @@ namespace CalamityMod.World //Astral public static int astralTiles = 0; - public static bool spawnAstralMeteor = false; // Now unused - public static bool spawnAstralMeteor2 = false; // Now unused - public static bool spawnAstralMeteor3 = false; // Now unused //Sunken Sea public static int sunkenSeaTiles = 0; @@ -172,9 +168,6 @@ namespace CalamityMod.World revenge = false; downedStarGod = false; downedAstrageldon = false; - spawnAstralMeteor = false; - spawnAstralMeteor2 = false; - spawnAstralMeteor3 = false; downedPolterghast = false; downedLORDE = false; downedBuffedMothron = false; @@ -219,9 +212,6 @@ namespace CalamityMod.World if (revenge) downed.Add("revenge"); if (downedStarGod) downed.Add("starGod"); if (downedAstrageldon) downed.Add("astrageldon"); - if (spawnAstralMeteor) downed.Add("astralMeteor"); - if (spawnAstralMeteor2) downed.Add("astralMeteor2"); - if (spawnAstralMeteor3) downed.Add("astralMeteor3"); if (spawnedHardBoss) downed.Add("hardBoss"); if (downedPolterghast) downed.Add("polterghast"); if (downedLORDE) downed.Add("lorde"); @@ -280,9 +270,6 @@ namespace CalamityMod.World revenge = downed.Contains("revenge"); downedStarGod = downed.Contains("starGod"); downedAstrageldon = downed.Contains("astrageldon"); - spawnAstralMeteor = downed.Contains("astralMeteor"); - spawnAstralMeteor2 = downed.Contains("astralMeteor2"); - spawnAstralMeteor3 = downed.Contains("astralMeteor3"); spawnedHardBoss = downed.Contains("hardBoss"); downedPolterghast = downed.Contains("polterghast"); downedLORDE = downed.Contains("lorde"); @@ -349,7 +336,7 @@ namespace CalamityMod.World onionMode = flags4[6]; revenge = flags4[7]; - // Explicitly discard the now-unused astral meteor booleans + // These 3 bits are currently unused, they used to be astral meteor drops BitsByte flags5 = reader.ReadByte(); downedStarGod = flags5[0]; _ = flags5[1]; @@ -426,12 +413,12 @@ namespace CalamityMod.World flags4[6] = onionMode; flags4[7] = revenge; - // Don't write meaningful values for the now-unused astral meteor booleans + // These 3 bits are currently unused, they used to be astral meteor drops BitsByte flags5 = new BitsByte(); flags5[0] = downedStarGod; - flags5[1] = false; - flags5[2] = false; - flags5[3] = false; + flags5[1] = false; + flags5[2] = false; + flags5[3] = false; flags5[4] = spawnedHardBoss; flags5[5] = downedPolterghast; flags5[6] = death; @@ -507,7 +494,7 @@ namespace CalamityMod.World onionMode = flags4[6]; revenge = flags4[7]; - // Explicitly discard the now-unused astral meteor booleans + // These 3 bits are currently unused, they used to be astral meteor drops BitsByte flags5 = reader.ReadByte(); downedStarGod = flags5[0]; _ = flags5[1]; @@ -682,22 +669,22 @@ namespace CalamityMod.World tasks.Add(new PassLegacy("Planetoid Test", WorldGenerationMethods.Planetoids)); } - // An Astral Meteor always falls at the beginning of Hardmode. - public override void ModifyHardmodeTasks(List tasks) - { - // Yes, this internal identifier is misspelled in vanilla. - int announceIndex = tasks.FindIndex(match => match.Name == "Hardmode Announcment"); + // An Astral Meteor always falls at the beginning of Hardmode. + public override void ModifyHardmodeTasks(List tasks) + { + // Yes, this internal identifier is misspelled in vanilla. + int announceIndex = tasks.FindIndex(match => match.Name == "Hardmode Announcment"); - // Insert the Astral biome generation right before the final hardmode announcement. - tasks.Insert(announceIndex, new PassLegacy("AstralMeteor", delegate (GenerationProgress progress) - { - WorldGenerationMethods.PlaceAstralMeteor(); - })); - } - #endregion + // Insert the Astral biome generation right before the final hardmode announcement. + tasks.Insert(announceIndex, new PassLegacy("AstralMeteor", delegate (GenerationProgress progress) + { + WorldGenerationMethods.PlaceAstralMeteor(); + })); + } + #endregion - #region PostUpdate - public override void PostUpdate() + #region PostUpdate + public override void PostUpdate() { SunkenSeaLocation = new Rectangle(WorldGen.UndergroundDesertLocation.Left, WorldGen.UndergroundDesertLocation.Bottom, WorldGen.UndergroundDesertLocation.Width, WorldGen.UndergroundDesertLocation.Height / 2); diff --git a/World/WorldGenerationMethods.cs b/World/WorldGenerationMethods.cs index 1617e78d9a..4b32a3ffb0 100644 --- a/World/WorldGenerationMethods.cs +++ b/World/WorldGenerationMethods.cs @@ -7,6 +7,7 @@ using Terraria.Localization; using Terraria.ModLoader; using Terraria.World.Generation; using CalamityMod.World.Planets; +using CalamityMod.Utilities; namespace CalamityMod.World { @@ -326,21 +327,21 @@ namespace CalamityMod.World return true; } - public static void AstralMeteorThreadWrapper(object context) - { - PlaceAstralMeteor(); - } + public static void AstralMeteorThreadWrapper(object context) + { + PlaceAstralMeteor(); + } public static void PlaceAstralMeteor() { Mod mod = ModLoader.GetMod("CalamityMod"); Mod ancientsAwakened = ModLoader.GetMod("AAMod"); - // This flag is also used to determine whether players are nearby. + // This flag is also used to determine whether players are nearby. bool meteorDropped = true; - // Clients in multiplayer don't drop meteors. - if (Main.netMode == 1) + // Clients in multiplayer don't drop meteors. + if (Main.netMode == 1) return; for (int i = 0; i < 255; i++) { @@ -351,8 +352,8 @@ namespace CalamityMod.World } } - // Check whether there is already too much ore. - if (!CanAstralMeteorSpawn()) + // Check whether there is already too much ore. + if (!CanAstralMeteorSpawn()) return; float solidTileRequirement = 600f; @@ -382,13 +383,13 @@ namespace CalamityMod.World { suitableTiles++; - // Avoid floating islands: Clouds and Sunplate both harshly punish attempted meteor spawns + // Avoid floating islands: Clouds and Sunplate both harshly punish attempted meteor spawns if (Main.tile[l, m].type == TileID.Cloud || Main.tile[l, m].type == TileID.Sunplate) { suitableTiles -= 100; } - // Prevent the Astral biome from overriding or interfering with an AA biome + // Prevent the Astral biome from overriding or interfering with an AA biome else if (ancientsAwakened != null) { if (Main.tile[l, m].type == ancientsAwakened.TileType("InfernoGrass") || Main.tile[l, m].type == ancientsAwakened.TileType("Torchstone") || @@ -403,7 +404,7 @@ namespace CalamityMod.World } } - // Liquid aversion makes meteors less likely to fall in lakes + // Liquid aversion makes meteors less likely to fall in lakes else if (Main.tile[l, m].liquid > 0) { suitableTiles--; @@ -418,17 +419,17 @@ namespace CalamityMod.World } meteorDropped = GenerateAstralMeteor(x, y); - // If the meteor actually dropped, post the message stating as such. - if (meteorDropped) + // If the meteor actually dropped, post the message stating as such. + if (meteorDropped) { - string key = "Mods.CalamityMod.AstralText"; - Color messageColor = Color.Gold; + string key = "Mods.CalamityMod.AstralText"; + Color messageColor = Color.Gold; - 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 == 0) + Main.NewText(Language.GetTextValue(key), messageColor); + else if (Main.netMode == 2) + NetMessage.BroadcastChatMessage(NetworkText.FromKey(key), messageColor); + break; } break; }