diff --git a/Buffs/Amidias/AmidiasBlessing.cs b/Buffs/Amidias/AmidiasBlessing.cs index 3229f2bd87..0522bdc277 100644 --- a/Buffs/Amidias/AmidiasBlessing.cs +++ b/Buffs/Amidias/AmidiasBlessing.cs @@ -1,6 +1,5 @@ using Terraria; using Terraria.ModLoader; -using CalamityMod.CalPlayer; namespace CalamityMod.Buffs.Amidias { @@ -9,16 +8,16 @@ namespace CalamityMod.Buffs.Amidias public override void SetDefaults() { DisplayName.SetDefault("Amidias' Blessing"); - Description.SetDefault("You are blessed by Amidias\n" - +"Lets you breathe underwater, even in the Abyss!\n" - +"Just don't get hit..."); + Description.SetDefault("You are blessed by Amidias" + + "\nLets you breathe underwater, even in the Abyss!" + + "\nJust don't get hit..."); Main.debuff[Type] = false; Main.buffNoSave[Type] = false; } public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).amidiasBlessing = true; + player.GetCalamityPlayer().amidiasBlessing = true; player.breath = player.breathMax + 91; } } diff --git a/Buffs/Amidias/HermitCrab.cs b/Buffs/Amidias/HermitCrab.cs index 86e77fefcc..a9b6ccd0b6 100644 --- a/Buffs/Amidias/HermitCrab.cs +++ b/Buffs/Amidias/HermitCrab.cs @@ -1,10 +1,10 @@ -using Terraria; +using CalamityMod.CalPlayer; +using Terraria; using Terraria.ModLoader; -using CalamityMod.CalPlayer; namespace CalamityMod.Buffs.Amidias { - public class HermitCrab : ModBuff + public class HermitCrab : ModBuff { public override void SetDefaults() { @@ -16,11 +16,12 @@ namespace CalamityMod.Buffs.Amidias public override void Update(Player player, ref int buffIndex) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (player.ownedProjectileCounts[mod.ProjectileType("HermitCrab")] > 0) { modPlayer.hCrab = true; } + if (!modPlayer.hCrab) { player.DelBuff(buffIndex); diff --git a/Buffs/Amidias/SnapClamDebuff.cs b/Buffs/Amidias/SnapClamDebuff.cs index e404698917..9f94645cff 100644 --- a/Buffs/Amidias/SnapClamDebuff.cs +++ b/Buffs/Amidias/SnapClamDebuff.cs @@ -1,6 +1,6 @@ -using Terraria; +using CalamityMod.NPCs; +using Terraria; using Terraria.ModLoader; -using CalamityMod.NPCs; namespace CalamityMod.Buffs.Amidias { diff --git a/Buffs/DoTDebuffs/AbyssalFlames.cs b/Buffs/DoTDebuffs/AbyssalFlames.cs index 5843c44863..ab5be6fca2 100644 --- a/Buffs/DoTDebuffs/AbyssalFlames.cs +++ b/Buffs/DoTDebuffs/AbyssalFlames.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Buffs.DoTDebuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).aFlames = true; + player.GetCalamityPlayer().aFlames = true; } public override void Update(NPC npc, ref int buffIndex) diff --git a/Buffs/DoTDebuffs/AstralInfectionDebuff.cs b/Buffs/DoTDebuffs/AstralInfectionDebuff.cs index 9b16b295dc..b503e59e7a 100644 --- a/Buffs/DoTDebuffs/AstralInfectionDebuff.cs +++ b/Buffs/DoTDebuffs/AstralInfectionDebuff.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Buffs.DoTDebuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).astralInfection = true; + player.GetCalamityPlayer().astralInfection = true; } public override void Update(NPC npc, ref int buffIndex) diff --git a/Buffs/DoTDebuffs/BrimstoneFlames.cs b/Buffs/DoTDebuffs/BrimstoneFlames.cs index 6190570c0b..5f93e3f89f 100644 --- a/Buffs/DoTDebuffs/BrimstoneFlames.cs +++ b/Buffs/DoTDebuffs/BrimstoneFlames.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Buffs.DoTDebuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).bFlames = true; + player.GetCalamityPlayer().bFlames = true; } public override void Update(NPC npc, ref int buffIndex) diff --git a/Buffs/DoTDebuffs/BurningBlood.cs b/Buffs/DoTDebuffs/BurningBlood.cs index d1d160ac9d..af4cea580b 100644 --- a/Buffs/DoTDebuffs/BurningBlood.cs +++ b/Buffs/DoTDebuffs/BurningBlood.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Buffs.DoTDebuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).bBlood = true; + player.GetCalamityPlayer().bBlood = true; } public override void Update(NPC npc, ref int buffIndex) diff --git a/Buffs/DoTDebuffs/CrushDepth.cs b/Buffs/DoTDebuffs/CrushDepth.cs index 083454dcdc..4770373236 100644 --- a/Buffs/DoTDebuffs/CrushDepth.cs +++ b/Buffs/DoTDebuffs/CrushDepth.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Buffs.DoTDebuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).cDepth = true; + player.GetCalamityPlayer().cDepth = true; } public override void Update(NPC npc, ref int buffIndex) diff --git a/Buffs/DoTDebuffs/GodSlayerInferno.cs b/Buffs/DoTDebuffs/GodSlayerInferno.cs index 0c82ca566c..73705be872 100644 --- a/Buffs/DoTDebuffs/GodSlayerInferno.cs +++ b/Buffs/DoTDebuffs/GodSlayerInferno.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Buffs.DoTDebuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).gsInferno = true; + player.GetCalamityPlayer().gsInferno = true; } public override void Update(NPC npc, ref int buffIndex) diff --git a/Buffs/DoTDebuffs/HolyInferno.cs b/Buffs/DoTDebuffs/HolyInferno.cs index 7ecad819d5..4ff0c1bd4f 100644 --- a/Buffs/DoTDebuffs/HolyInferno.cs +++ b/Buffs/DoTDebuffs/HolyInferno.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Buffs.DoTDebuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).hInferno = true; + player.GetCalamityPlayer().hInferno = true; } } } diff --git a/Buffs/DoTDebuffs/HolyLight.cs b/Buffs/DoTDebuffs/HolyLight.cs index f2522f3f18..fbdf8173da 100644 --- a/Buffs/DoTDebuffs/HolyLight.cs +++ b/Buffs/DoTDebuffs/HolyLight.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Buffs.DoTDebuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).hFlames = true; + player.GetCalamityPlayer().hFlames = true; } public override void Update(NPC npc, ref int buffIndex) diff --git a/Buffs/DoTDebuffs/LethalLavaBurn.cs b/Buffs/DoTDebuffs/LethalLavaBurn.cs index 46132946fd..46809485b3 100644 --- a/Buffs/DoTDebuffs/LethalLavaBurn.cs +++ b/Buffs/DoTDebuffs/LethalLavaBurn.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Buffs.DoTDebuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).lethalLavaBurn = true; + player.GetCalamityPlayer().lethalLavaBurn = true; } } } diff --git a/Buffs/DoTDebuffs/Plague.cs b/Buffs/DoTDebuffs/Plague.cs index ad77a4547e..bed5e900fa 100644 --- a/Buffs/DoTDebuffs/Plague.cs +++ b/Buffs/DoTDebuffs/Plague.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Buffs.DoTDebuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).pFlames = true; + player.GetCalamityPlayer().pFlames = true; } public override void Update(NPC npc, ref int buffIndex) diff --git a/Buffs/DoTDebuffs/Shadowflame.cs b/Buffs/DoTDebuffs/Shadowflame.cs index 10e481bf4c..42fb1a565d 100644 --- a/Buffs/DoTDebuffs/Shadowflame.cs +++ b/Buffs/DoTDebuffs/Shadowflame.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Buffs.DoTDebuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).shadowflame = true; + player.GetCalamityPlayer().shadowflame = true; } } } diff --git a/Buffs/DoTDebuffs/VulnerabilityHex.cs b/Buffs/DoTDebuffs/VulnerabilityHex.cs index c73708fc10..c2ea60f8f1 100644 --- a/Buffs/DoTDebuffs/VulnerabilityHex.cs +++ b/Buffs/DoTDebuffs/VulnerabilityHex.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Buffs.DoTDebuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).vHex = true; + player.GetCalamityPlayer().vHex = true; } } } diff --git a/Buffs/Fabsol/BloodyMary.cs b/Buffs/Fabsol/BloodyMary.cs index bec7535a2e..ef2a2f837c 100644 --- a/Buffs/Fabsol/BloodyMary.cs +++ b/Buffs/Fabsol/BloodyMary.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Buffs.Fabsol public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).bloodyMary = true; + player.GetCalamityPlayer().bloodyMary = true; } } } diff --git a/Buffs/Fabsol/BlueSpeedCandle.cs b/Buffs/Fabsol/BlueSpeedCandle.cs index 5c052f6bc3..63fb770e09 100644 --- a/Buffs/Fabsol/BlueSpeedCandle.cs +++ b/Buffs/Fabsol/BlueSpeedCandle.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Buffs.Fabsol public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).blueCandle = true; + player.GetCalamityPlayer().blueCandle = true; } } } diff --git a/Buffs/Fabsol/CaribbeanRum.cs b/Buffs/Fabsol/CaribbeanRum.cs index 85df70ec6e..cd95ae3816 100644 --- a/Buffs/Fabsol/CaribbeanRum.cs +++ b/Buffs/Fabsol/CaribbeanRum.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Buffs.Fabsol public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).caribbeanRum = true; + player.GetCalamityPlayer().caribbeanRum = true; } } } diff --git a/Buffs/Fabsol/CinnamonRoll.cs b/Buffs/Fabsol/CinnamonRoll.cs index 9ccf4b7131..ad6bac44c8 100644 --- a/Buffs/Fabsol/CinnamonRoll.cs +++ b/Buffs/Fabsol/CinnamonRoll.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Buffs.Fabsol public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).cinnamonRoll = true; + player.GetCalamityPlayer().cinnamonRoll = true; } } } diff --git a/Buffs/Fabsol/Everclear.cs b/Buffs/Fabsol/Everclear.cs index fb7f74c973..8d9ffe4a03 100644 --- a/Buffs/Fabsol/Everclear.cs +++ b/Buffs/Fabsol/Everclear.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Buffs.Fabsol public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).everclear = true; + player.GetCalamityPlayer().everclear = true; } } } diff --git a/Buffs/Fabsol/EvergreenGin.cs b/Buffs/Fabsol/EvergreenGin.cs index ee3bcc8094..1b00ef9c81 100644 --- a/Buffs/Fabsol/EvergreenGin.cs +++ b/Buffs/Fabsol/EvergreenGin.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Buffs.Fabsol public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).evergreenGin = true; + player.GetCalamityPlayer().evergreenGin = true; } } } diff --git a/Buffs/Fabsol/FabsolVodka.cs b/Buffs/Fabsol/FabsolVodka.cs index 9d6e95d199..5265f67d63 100644 --- a/Buffs/Fabsol/FabsolVodka.cs +++ b/Buffs/Fabsol/FabsolVodka.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Buffs.Fabsol public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).fabsolVodka = true; + player.GetCalamityPlayer().fabsolVodka = true; } } } diff --git a/Buffs/Fabsol/Fireball.cs b/Buffs/Fabsol/Fireball.cs index 588c7c9af2..f1e65b8f7b 100644 --- a/Buffs/Fabsol/Fireball.cs +++ b/Buffs/Fabsol/Fireball.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Buffs.Fabsol public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).fireball = true; + player.GetCalamityPlayer().fireball = true; } } } diff --git a/Buffs/Fabsol/GrapeBeer.cs b/Buffs/Fabsol/GrapeBeer.cs index bf57d4c29c..e77170d3ba 100644 --- a/Buffs/Fabsol/GrapeBeer.cs +++ b/Buffs/Fabsol/GrapeBeer.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Buffs.Fabsol public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).grapeBeer = true; + player.GetCalamityPlayer().grapeBeer = true; } } } diff --git a/Buffs/Fabsol/Margarita.cs b/Buffs/Fabsol/Margarita.cs index 631b01b59a..ba36717fdc 100644 --- a/Buffs/Fabsol/Margarita.cs +++ b/Buffs/Fabsol/Margarita.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Buffs.Fabsol public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).margarita = true; + player.GetCalamityPlayer().margarita = true; } } } diff --git a/Buffs/Fabsol/Moonshine.cs b/Buffs/Fabsol/Moonshine.cs index bc382b46a3..fe4cb44b04 100644 --- a/Buffs/Fabsol/Moonshine.cs +++ b/Buffs/Fabsol/Moonshine.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Buffs.Fabsol public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).moonshine = true; + player.GetCalamityPlayer().moonshine = true; } } } diff --git a/Buffs/Fabsol/MoscowMule.cs b/Buffs/Fabsol/MoscowMule.cs index 4a0225559c..ccc5b1637d 100644 --- a/Buffs/Fabsol/MoscowMule.cs +++ b/Buffs/Fabsol/MoscowMule.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Buffs.Fabsol public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).moscowMule = true; + player.GetCalamityPlayer().moscowMule = true; } } } diff --git a/Buffs/Fabsol/PinkHealthCandle.cs b/Buffs/Fabsol/PinkHealthCandle.cs index 31b294d99c..b858cee671 100644 --- a/Buffs/Fabsol/PinkHealthCandle.cs +++ b/Buffs/Fabsol/PinkHealthCandle.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Buffs.Fabsol public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).pinkCandle = true; + player.GetCalamityPlayer().pinkCandle = true; } } } diff --git a/Buffs/Fabsol/PurpleDefenseCandle.cs b/Buffs/Fabsol/PurpleDefenseCandle.cs index 99331863d2..d9645887b6 100644 --- a/Buffs/Fabsol/PurpleDefenseCandle.cs +++ b/Buffs/Fabsol/PurpleDefenseCandle.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Buffs.Fabsol public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).purpleCandle = true; + player.GetCalamityPlayer().purpleCandle = true; } } } diff --git a/Buffs/Fabsol/RedWine.cs b/Buffs/Fabsol/RedWine.cs index 06930e38a2..ea029c9ba4 100644 --- a/Buffs/Fabsol/RedWine.cs +++ b/Buffs/Fabsol/RedWine.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Buffs.Fabsol public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).redWine = true; + player.GetCalamityPlayer().redWine = true; } } } diff --git a/Buffs/Fabsol/Rum.cs b/Buffs/Fabsol/Rum.cs index c5dd1becab..8efa9a9cf6 100644 --- a/Buffs/Fabsol/Rum.cs +++ b/Buffs/Fabsol/Rum.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Buffs.Fabsol public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).rum = true; + player.GetCalamityPlayer().rum = true; } } } diff --git a/Buffs/Fabsol/Screwdriver.cs b/Buffs/Fabsol/Screwdriver.cs index 2a5c868fc5..dde74e4ec6 100644 --- a/Buffs/Fabsol/Screwdriver.cs +++ b/Buffs/Fabsol/Screwdriver.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Buffs.Fabsol public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).screwdriver = true; + player.GetCalamityPlayer().screwdriver = true; } } } diff --git a/Buffs/Fabsol/StarBeamRye.cs b/Buffs/Fabsol/StarBeamRye.cs index 212a8afb6c..6f0427f1d7 100644 --- a/Buffs/Fabsol/StarBeamRye.cs +++ b/Buffs/Fabsol/StarBeamRye.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Buffs.Fabsol public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).starBeamRye = true; + player.GetCalamityPlayer().starBeamRye = true; } } } diff --git a/Buffs/Fabsol/Tequila.cs b/Buffs/Fabsol/Tequila.cs index 49841d614f..f8d5bce822 100644 --- a/Buffs/Fabsol/Tequila.cs +++ b/Buffs/Fabsol/Tequila.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Buffs.Fabsol public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).tequila = true; + player.GetCalamityPlayer().tequila = true; } } } diff --git a/Buffs/Fabsol/TequilaSunrise.cs b/Buffs/Fabsol/TequilaSunrise.cs index 74c8191228..76bb13d736 100644 --- a/Buffs/Fabsol/TequilaSunrise.cs +++ b/Buffs/Fabsol/TequilaSunrise.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Buffs.Fabsol public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).tequilaSunrise = true; + player.GetCalamityPlayer().tequilaSunrise = true; } } } diff --git a/Buffs/Fabsol/Trippy.cs b/Buffs/Fabsol/Trippy.cs index 7c8212b7ca..f58d98f17c 100644 --- a/Buffs/Fabsol/Trippy.cs +++ b/Buffs/Fabsol/Trippy.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Buffs.Fabsol public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).trippy = true; + player.GetCalamityPlayer().trippy = true; } } } diff --git a/Buffs/Fabsol/Vodka.cs b/Buffs/Fabsol/Vodka.cs index 76c1d4a691..2a84e8704c 100644 --- a/Buffs/Fabsol/Vodka.cs +++ b/Buffs/Fabsol/Vodka.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Buffs.Fabsol public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).vodka = true; + player.GetCalamityPlayer().vodka = true; } } } diff --git a/Buffs/Fabsol/Whiskey.cs b/Buffs/Fabsol/Whiskey.cs index 0b294fd4da..fbcd24a2ed 100644 --- a/Buffs/Fabsol/Whiskey.cs +++ b/Buffs/Fabsol/Whiskey.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Buffs.Fabsol public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).whiskey = true; + player.GetCalamityPlayer().whiskey = true; } } } diff --git a/Buffs/Fabsol/WhiteWine.cs b/Buffs/Fabsol/WhiteWine.cs index 7c537caa4e..2f93e7d19f 100644 --- a/Buffs/Fabsol/WhiteWine.cs +++ b/Buffs/Fabsol/WhiteWine.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Buffs.Fabsol public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).whiteWine = true; + player.GetCalamityPlayer().whiteWine = true; } } } diff --git a/Buffs/Fabsol/YellowDamageCandle.cs b/Buffs/Fabsol/YellowDamageCandle.cs index 8a71688b80..920aec402a 100644 --- a/Buffs/Fabsol/YellowDamageCandle.cs +++ b/Buffs/Fabsol/YellowDamageCandle.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Buffs.Fabsol public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).yellowCandle = true; + player.GetCalamityPlayer().yellowCandle = true; } public override void Update(NPC npc, ref int buffIndex) diff --git a/Buffs/MountBuffs/Fab.cs b/Buffs/MountBuffs/Fab.cs index 0886de6452..0ffba356d7 100644 --- a/Buffs/MountBuffs/Fab.cs +++ b/Buffs/MountBuffs/Fab.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Buffs.MountBuffs { player.mount.SetMount(mod.MountType(), player); player.buffTime[buffIndex] = 10; - player.GetModPlayer(mod).fab = true; + player.GetCalamityPlayer().fab = true; } } } diff --git a/Buffs/MountBuffs/GazeOfCrysthamyrBuff.cs b/Buffs/MountBuffs/GazeOfCrysthamyrBuff.cs index 0a62544007..6a8f9b70ff 100644 --- a/Buffs/MountBuffs/GazeOfCrysthamyrBuff.cs +++ b/Buffs/MountBuffs/GazeOfCrysthamyrBuff.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Buffs.MountBuffs { player.mount.SetMount(mod.MountType(), player); player.buffTime[buffIndex] = 10; - player.GetModPlayer(mod).crysthamyr = true; + player.GetCalamityPlayer().crysthamyr = true; } } } diff --git a/Buffs/PetBuffs/AkatoYharonBuff.cs b/Buffs/PetBuffs/AkatoYharonBuff.cs index dd66a1ab4b..17c29d7c7c 100644 --- a/Buffs/PetBuffs/AkatoYharonBuff.cs +++ b/Buffs/PetBuffs/AkatoYharonBuff.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Buffs.PetBuffs public override void Update(Player player, ref int buffIndex) { player.buffTime[buffIndex] = 18000; - player.GetModPlayer(mod).akato = true; + player.GetCalamityPlayer().akato = true; bool petProjectileNotSpawned = player.ownedProjectileCounts[mod.ProjectileType("Akato")] <= 0; if (petProjectileNotSpawned && player.whoAmI == Main.myPlayer) { diff --git a/Buffs/PetBuffs/BearBuff.cs b/Buffs/PetBuffs/BearBuff.cs index cf0cc03eb0..629512ecd6 100644 --- a/Buffs/PetBuffs/BearBuff.cs +++ b/Buffs/PetBuffs/BearBuff.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Buffs.PetBuffs public override void Update(Player player, ref int buffIndex) { player.buffTime[buffIndex] = 18000; - player.GetModPlayer(mod).bearPet = true; + player.GetCalamityPlayer().bearPet = true; bool petProjectileNotSpawned = player.ownedProjectileCounts[mod.ProjectileType("Bear")] <= 0; if (petProjectileNotSpawned && player.whoAmI == Main.myPlayer) { diff --git a/Buffs/PetBuffs/BloodBound.cs b/Buffs/PetBuffs/BloodBound.cs index 07c840e36a..0b6ad68241 100644 --- a/Buffs/PetBuffs/BloodBound.cs +++ b/Buffs/PetBuffs/BloodBound.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Buffs.PetBuffs public override void Update(Player player, ref int buffIndex) { player.buffTime[buffIndex] = 18000; - player.GetModPlayer(mod).perfmini = true; + player.GetCalamityPlayer().perfmini = true; bool PetProjectileNotSpawned = player.ownedProjectileCounts[mod.ProjectileType("PerforaMini")] <= 0; if (PetProjectileNotSpawned && player.whoAmI == Main.myPlayer) { diff --git a/Buffs/PetBuffs/BrimlingBuff.cs b/Buffs/PetBuffs/BrimlingBuff.cs index a8233530db..f555cbe093 100644 --- a/Buffs/PetBuffs/BrimlingBuff.cs +++ b/Buffs/PetBuffs/BrimlingBuff.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Buffs.PetBuffs public override void Update(Player player, ref int buffIndex) { player.buffTime[buffIndex] = 18000; - player.GetModPlayer(mod).brimling = true; + player.GetCalamityPlayer().brimling = true; bool petProjectileNotSpawned = player.ownedProjectileCounts[mod.ProjectileType("Brimling")] <= 0; if (petProjectileNotSpawned && player.whoAmI == Main.myPlayer) { diff --git a/Buffs/PetBuffs/ChibiiBuff.cs b/Buffs/PetBuffs/ChibiiBuff.cs index 4e2901485e..88403daec0 100644 --- a/Buffs/PetBuffs/ChibiiBuff.cs +++ b/Buffs/PetBuffs/ChibiiBuff.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Buffs.PetBuffs { player.buffTime[buffIndex] = 18000; - player.GetModPlayer(mod).chibii = true; + player.GetCalamityPlayer().chibii = true; bool petProjectileNotSpawned = player.ownedProjectileCounts[mod.ProjectileType("ChibiiDoggo")] <= 0; diff --git a/Buffs/PetBuffs/DannyDevito.cs b/Buffs/PetBuffs/DannyDevito.cs index e10f3a4443..0fa135d63c 100644 --- a/Buffs/PetBuffs/DannyDevito.cs +++ b/Buffs/PetBuffs/DannyDevito.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Buffs.PetBuffs public override void Update(Player player, ref int buffIndex) { player.buffTime[buffIndex] = 18000; - player.GetModPlayer(mod).trashMan = true; + player.GetCalamityPlayer().trashMan = true; bool petProjectileNotSpawned = player.ownedProjectileCounts[mod.ProjectileType("DannyDevito")] <= 0; if (petProjectileNotSpawned && player.whoAmI == Main.myPlayer) { diff --git a/Buffs/PetBuffs/Fox.cs b/Buffs/PetBuffs/Fox.cs index 8391c5a28a..746d78d82f 100644 --- a/Buffs/PetBuffs/Fox.cs +++ b/Buffs/PetBuffs/Fox.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Buffs.PetBuffs public override void Update(Player player, ref int buffIndex) { player.buffTime[buffIndex] = 18000; - player.GetModPlayer(mod).fox = true; + player.GetCalamityPlayer().fox = true; bool petProjectileNotSpawned = player.ownedProjectileCounts[mod.ProjectileType("Fox")] <= 0; if (petProjectileNotSpawned && player.whoAmI == Main.myPlayer) { diff --git a/Buffs/PetBuffs/Kendra.cs b/Buffs/PetBuffs/Kendra.cs index b820a748e1..1fac249453 100644 --- a/Buffs/PetBuffs/Kendra.cs +++ b/Buffs/PetBuffs/Kendra.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Buffs.PetBuffs public override void Update(Player player, ref int buffIndex) { player.buffTime[buffIndex] = 18000; - player.GetModPlayer(mod).kendra = true; + player.GetCalamityPlayer().kendra = true; bool petProjectileNotSpawned = player.ownedProjectileCounts[mod.ProjectileType("Kendra")] <= 0; if (petProjectileNotSpawned && player.whoAmI == Main.myPlayer) { diff --git a/Buffs/PetBuffs/Levi.cs b/Buffs/PetBuffs/Levi.cs index 5c45838910..3b890d1757 100644 --- a/Buffs/PetBuffs/Levi.cs +++ b/Buffs/PetBuffs/Levi.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Buffs.PetBuffs public override void Update(Player player, ref int buffIndex) { player.buffTime[buffIndex] = 18000; - player.GetModPlayer(mod).leviPet = true; + player.GetCalamityPlayer().leviPet = true; bool petProjectileNotSpawned = player.ownedProjectileCounts[mod.ProjectileType("Levi")] <= 0; if (petProjectileNotSpawned && player.whoAmI == Main.myPlayer) { diff --git a/Buffs/PetBuffs/StrangeOrb.cs b/Buffs/PetBuffs/StrangeOrb.cs index ea83e1d7e5..f9ee64c071 100644 --- a/Buffs/PetBuffs/StrangeOrb.cs +++ b/Buffs/PetBuffs/StrangeOrb.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Buffs.PetBuffs public override void Update(Player player, ref int buffIndex) { player.buffTime[buffIndex] = 18000; - player.GetModPlayer(mod).sirenPet = true; + player.GetCalamityPlayer().sirenPet = true; bool petProjectileNotSpawned = player.ownedProjectileCounts[mod.ProjectileType("SirenYoung")] <= 0; if (petProjectileNotSpawned && player.whoAmI == Main.myPlayer) { diff --git a/Buffs/PetBuffs/ThirdSageBuff.cs b/Buffs/PetBuffs/ThirdSageBuff.cs index 8e247dbe05..70eb0e9c07 100644 --- a/Buffs/PetBuffs/ThirdSageBuff.cs +++ b/Buffs/PetBuffs/ThirdSageBuff.cs @@ -22,14 +22,14 @@ namespace CalamityMod.Buffs.PetBuffs public override void Update(Player player, ref int buffIndex) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (modPlayer.thirdSageH && !player.dead) { player.statLife = player.statLifeMax2; modPlayer.thirdSageH = false; } player.buffTime[buffIndex] = 18000; - player.GetModPlayer(mod).thirdSage = true; + player.GetCalamityPlayer().thirdSage = true; bool PetProjectileNotSpawned = player.ownedProjectileCounts[mod.ProjectileType("ThirdSage")] <= 0; if (PetProjectileNotSpawned && player.whoAmI == Main.myPlayer) { diff --git a/Buffs/PotionBuffs/AbyssalWeapon.cs b/Buffs/PotionBuffs/AbyssalWeapon.cs index 538752a6b7..9aa2ca35c3 100644 --- a/Buffs/PotionBuffs/AbyssalWeapon.cs +++ b/Buffs/PotionBuffs/AbyssalWeapon.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Buffs.PotionBuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).aWeapon = true; + player.GetCalamityPlayer().aWeapon = true; } } } diff --git a/Buffs/PotionBuffs/AnechoicCoating.cs b/Buffs/PotionBuffs/AnechoicCoating.cs index c64b4c2835..7a577e87f7 100644 --- a/Buffs/PotionBuffs/AnechoicCoating.cs +++ b/Buffs/PotionBuffs/AnechoicCoating.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Buffs.PotionBuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).anechoicCoating = true; + player.GetCalamityPlayer().anechoicCoating = true; } } } diff --git a/Buffs/PotionBuffs/ArmorCrumbling.cs b/Buffs/PotionBuffs/ArmorCrumbling.cs index 2da5664e76..a05659823f 100644 --- a/Buffs/PotionBuffs/ArmorCrumbling.cs +++ b/Buffs/PotionBuffs/ArmorCrumbling.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Buffs.PotionBuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).armorCrumbling = true; + player.GetCalamityPlayer().armorCrumbling = true; } } } diff --git a/Buffs/PotionBuffs/ArmorShattering.cs b/Buffs/PotionBuffs/ArmorShattering.cs index c08594414d..0c7ba95afa 100644 --- a/Buffs/PotionBuffs/ArmorShattering.cs +++ b/Buffs/PotionBuffs/ArmorShattering.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Buffs.PotionBuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).armorShattering = true; + player.GetCalamityPlayer().armorShattering = true; } } } diff --git a/Buffs/PotionBuffs/AstralInjectionBuff.cs b/Buffs/PotionBuffs/AstralInjectionBuff.cs index e0b6a526bd..2f02af5c0a 100644 --- a/Buffs/PotionBuffs/AstralInjectionBuff.cs +++ b/Buffs/PotionBuffs/AstralInjectionBuff.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Buffs.PotionBuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).astralInjection = true; + player.GetCalamityPlayer().astralInjection = true; } } } diff --git a/Buffs/PotionBuffs/BoundingBuff.cs b/Buffs/PotionBuffs/BoundingBuff.cs index b0fa4f447f..6b86dbd48a 100644 --- a/Buffs/PotionBuffs/BoundingBuff.cs +++ b/Buffs/PotionBuffs/BoundingBuff.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Buffs.PotionBuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).bounding = true; + player.GetCalamityPlayer().bounding = true; } } } diff --git a/Buffs/PotionBuffs/Cadence.cs b/Buffs/PotionBuffs/Cadence.cs index 8786f7f73a..37b5add9b2 100644 --- a/Buffs/PotionBuffs/Cadence.cs +++ b/Buffs/PotionBuffs/Cadence.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Buffs.PotionBuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).cadence = true; + player.GetCalamityPlayer().cadence = true; } } } diff --git a/Buffs/PotionBuffs/CalciumBuff.cs b/Buffs/PotionBuffs/CalciumBuff.cs index 445e8db0e2..7920ec79d4 100644 --- a/Buffs/PotionBuffs/CalciumBuff.cs +++ b/Buffs/PotionBuffs/CalciumBuff.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Buffs.PotionBuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).calcium = true; + player.GetCalamityPlayer().calcium = true; } } } diff --git a/Buffs/PotionBuffs/CeaselessHunger.cs b/Buffs/PotionBuffs/CeaselessHunger.cs index b30c6e764e..8ca4442dce 100644 --- a/Buffs/PotionBuffs/CeaselessHunger.cs +++ b/Buffs/PotionBuffs/CeaselessHunger.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Buffs.PotionBuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).ceaselessHunger = true; + player.GetCalamityPlayer().ceaselessHunger = true; } } } diff --git a/Buffs/PotionBuffs/DraconicSurgeBuff.cs b/Buffs/PotionBuffs/DraconicSurgeBuff.cs index 967a3cbdc1..a839892e88 100644 --- a/Buffs/PotionBuffs/DraconicSurgeBuff.cs +++ b/Buffs/PotionBuffs/DraconicSurgeBuff.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Buffs.PotionBuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).draconicSurge = true; + player.GetCalamityPlayer().draconicSurge = true; } } } diff --git a/Buffs/PotionBuffs/GravityNormalizerBuff.cs b/Buffs/PotionBuffs/GravityNormalizerBuff.cs index 36ec91b91b..e4797d4d3d 100644 --- a/Buffs/PotionBuffs/GravityNormalizerBuff.cs +++ b/Buffs/PotionBuffs/GravityNormalizerBuff.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Buffs.PotionBuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).gravityNormalizer = true; + player.GetCalamityPlayer().gravityNormalizer = true; } } } diff --git a/Buffs/PotionBuffs/HolyWrathBuff.cs b/Buffs/PotionBuffs/HolyWrathBuff.cs index b5efe656a1..234392c3ef 100644 --- a/Buffs/PotionBuffs/HolyWrathBuff.cs +++ b/Buffs/PotionBuffs/HolyWrathBuff.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Buffs.PotionBuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).holyWrath = true; + player.GetCalamityPlayer().holyWrath = true; } } } diff --git a/Buffs/PotionBuffs/Invincible.cs b/Buffs/PotionBuffs/Invincible.cs index bf139f8a04..81bfbea659 100644 --- a/Buffs/PotionBuffs/Invincible.cs +++ b/Buffs/PotionBuffs/Invincible.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Buffs.PotionBuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).invincible = true; + player.GetCalamityPlayer().invincible = true; } } } diff --git a/Buffs/PotionBuffs/Omniscience.cs b/Buffs/PotionBuffs/Omniscience.cs index ef74505c4b..71a53ff88e 100644 --- a/Buffs/PotionBuffs/Omniscience.cs +++ b/Buffs/PotionBuffs/Omniscience.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Buffs.PotionBuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).omniscience = true; + player.GetCalamityPlayer().omniscience = true; } } } diff --git a/Buffs/PotionBuffs/PenumbraBuff.cs b/Buffs/PotionBuffs/PenumbraBuff.cs index 7203a1f935..c379b76c6e 100644 --- a/Buffs/PotionBuffs/PenumbraBuff.cs +++ b/Buffs/PotionBuffs/PenumbraBuff.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Buffs.PotionBuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).penumbra = true; + player.GetCalamityPlayer().penumbra = true; } } } diff --git a/Buffs/PotionBuffs/PhotosynthesisBuff.cs b/Buffs/PotionBuffs/PhotosynthesisBuff.cs index a68dbe990a..24a6b7ee41 100644 --- a/Buffs/PotionBuffs/PhotosynthesisBuff.cs +++ b/Buffs/PotionBuffs/PhotosynthesisBuff.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Buffs.PotionBuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).photosynthesis = true; + player.GetCalamityPlayer().photosynthesis = true; } } } diff --git a/Buffs/PotionBuffs/ProfanedRageBuff.cs b/Buffs/PotionBuffs/ProfanedRageBuff.cs index addbe210ce..cff1772139 100644 --- a/Buffs/PotionBuffs/ProfanedRageBuff.cs +++ b/Buffs/PotionBuffs/ProfanedRageBuff.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Buffs.PotionBuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).profanedRage = true; + player.GetCalamityPlayer().profanedRage = true; } } } diff --git a/Buffs/PotionBuffs/Soaring.cs b/Buffs/PotionBuffs/Soaring.cs index 6c225d47ca..1180a64788 100644 --- a/Buffs/PotionBuffs/Soaring.cs +++ b/Buffs/PotionBuffs/Soaring.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Buffs.PotionBuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).soaring = true; + player.GetCalamityPlayer().soaring = true; } } } diff --git a/Buffs/PotionBuffs/TitanScale.cs b/Buffs/PotionBuffs/TitanScale.cs index a1377ee251..1510457359 100644 --- a/Buffs/PotionBuffs/TitanScale.cs +++ b/Buffs/PotionBuffs/TitanScale.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Buffs.PotionBuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).tScale = true; + player.GetCalamityPlayer().tScale = true; } } } diff --git a/Buffs/PotionBuffs/TriumphBuff.cs b/Buffs/PotionBuffs/TriumphBuff.cs index ce7d135c17..2fbc256012 100644 --- a/Buffs/PotionBuffs/TriumphBuff.cs +++ b/Buffs/PotionBuffs/TriumphBuff.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Buffs.PotionBuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).triumph = true; + player.GetCalamityPlayer().triumph = true; } } } diff --git a/Buffs/PotionBuffs/YharimPower.cs b/Buffs/PotionBuffs/YharimPower.cs index 665a696445..2b06339b62 100644 --- a/Buffs/PotionBuffs/YharimPower.cs +++ b/Buffs/PotionBuffs/YharimPower.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Buffs.PotionBuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).yPower = true; + player.GetCalamityPlayer().yPower = true; } } } diff --git a/Buffs/PotionBuffs/Zen.cs b/Buffs/PotionBuffs/Zen.cs index d268573490..6e5367da88 100644 --- a/Buffs/PotionBuffs/Zen.cs +++ b/Buffs/PotionBuffs/Zen.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Buffs.PotionBuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).zen = true; + player.GetCalamityPlayer().zen = true; } } } diff --git a/Buffs/PotionBuffs/Zerg.cs b/Buffs/PotionBuffs/Zerg.cs index 78770f545c..b445051521 100644 --- a/Buffs/PotionBuffs/Zerg.cs +++ b/Buffs/PotionBuffs/Zerg.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Buffs.PotionBuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).zerg = true; + player.GetCalamityPlayer().zerg = true; } } } diff --git a/Buffs/Shrines/ChiBuff.cs b/Buffs/Shrines/ChiBuff.cs index e14a0dd3b4..19f4ad224a 100644 --- a/Buffs/Shrines/ChiBuff.cs +++ b/Buffs/Shrines/ChiBuff.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Buffs.Shrines public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).trinketOfChiBuff = true; + player.GetCalamityPlayer().trinketOfChiBuff = true; } } } diff --git a/Buffs/Shrines/CorruptionEffigyBuff.cs b/Buffs/Shrines/CorruptionEffigyBuff.cs index 2a1c0a4ac1..046e23907d 100644 --- a/Buffs/Shrines/CorruptionEffigyBuff.cs +++ b/Buffs/Shrines/CorruptionEffigyBuff.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Buffs.Shrines public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).corrEffigy = true; + player.GetCalamityPlayer().corrEffigy = true; } } } diff --git a/Buffs/Shrines/CrimsonEffigyBuff.cs b/Buffs/Shrines/CrimsonEffigyBuff.cs index a4e09cdec9..bdb90fdfda 100644 --- a/Buffs/Shrines/CrimsonEffigyBuff.cs +++ b/Buffs/Shrines/CrimsonEffigyBuff.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Buffs.Shrines public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).crimEffigy = true; + player.GetCalamityPlayer().crimEffigy = true; } } } diff --git a/Buffs/Shrines/GladiatorSwords.cs b/Buffs/Shrines/GladiatorSwords.cs index 232c866e90..9013218fdb 100644 --- a/Buffs/Shrines/GladiatorSwords.cs +++ b/Buffs/Shrines/GladiatorSwords.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Buffs.Shrines public override void Update(Player player, ref int buffIndex) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (player.ownedProjectileCounts[mod.ProjectileType("GladiatorSword")] > 0) { modPlayer.glSword = true; diff --git a/Buffs/Shrines/OnyxExcavatorBuff.cs b/Buffs/Shrines/OnyxExcavatorBuff.cs index a734ddb275..c5e75b3581 100644 --- a/Buffs/Shrines/OnyxExcavatorBuff.cs +++ b/Buffs/Shrines/OnyxExcavatorBuff.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Buffs.Shrines { player.mount.SetMount(mod.MountType(), player); player.buffTime[buffIndex] = 10; - player.GetModPlayer(mod).onyxExcavator = true; + player.GetCalamityPlayer().onyxExcavator = true; } } } diff --git a/Buffs/Shrines/TundraLeashBuff.cs b/Buffs/Shrines/TundraLeashBuff.cs index 62317030c9..7335f5f026 100644 --- a/Buffs/Shrines/TundraLeashBuff.cs +++ b/Buffs/Shrines/TundraLeashBuff.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Buffs.Shrines { player.mount.SetMount(mod.MountType(), player); player.buffTime[buffIndex] = 10; - player.GetModPlayer(mod).angryDog = true; + player.GetCalamityPlayer().angryDog = true; } } } diff --git a/Buffs/StatBuffs/AbyssalDivingSuitPlates.cs b/Buffs/StatBuffs/AbyssalDivingSuitPlates.cs index 71a16daedf..14b70894a0 100644 --- a/Buffs/StatBuffs/AbyssalDivingSuitPlates.cs +++ b/Buffs/StatBuffs/AbyssalDivingSuitPlates.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Buffs.StatBuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).abyssalDivingSuitPlates = true; + player.GetCalamityPlayer().abyssalDivingSuitPlates = true; } } } diff --git a/Buffs/StatBuffs/AdrenalineMode.cs b/Buffs/StatBuffs/AdrenalineMode.cs index 65de7ac74c..7e1723da74 100644 --- a/Buffs/StatBuffs/AdrenalineMode.cs +++ b/Buffs/StatBuffs/AdrenalineMode.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Buffs.StatBuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).adrenalineMode = true; + player.GetCalamityPlayer().adrenalineMode = true; } public override void ModifyBuffTip(ref string tip, ref int rare) diff --git a/Buffs/StatBuffs/Afflicted.cs b/Buffs/StatBuffs/Afflicted.cs index 28a87e270d..22ce65f351 100644 --- a/Buffs/StatBuffs/Afflicted.cs +++ b/Buffs/StatBuffs/Afflicted.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Buffs.StatBuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).afflicted = true; + player.GetCalamityPlayer().afflicted = true; } } } diff --git a/Buffs/StatBuffs/ChaosCandle.cs b/Buffs/StatBuffs/ChaosCandle.cs index cd1a01a47d..e620a0d456 100644 --- a/Buffs/StatBuffs/ChaosCandle.cs +++ b/Buffs/StatBuffs/ChaosCandle.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Buffs.StatBuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).chaosCandle = true; + player.GetCalamityPlayer().chaosCandle = true; } } } diff --git a/Buffs/StatBuffs/CosmicFreeze.cs b/Buffs/StatBuffs/CosmicFreeze.cs index 4c408e8ca1..812efe09d2 100644 --- a/Buffs/StatBuffs/CosmicFreeze.cs +++ b/Buffs/StatBuffs/CosmicFreeze.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Buffs.StatBuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).cFreeze = true; + player.GetCalamityPlayer().cFreeze = true; } } } diff --git a/Buffs/StatBuffs/GodSlayerCooldown.cs b/Buffs/StatBuffs/GodSlayerCooldown.cs index c93edf6bac..990016e016 100644 --- a/Buffs/StatBuffs/GodSlayerCooldown.cs +++ b/Buffs/StatBuffs/GodSlayerCooldown.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Buffs.StatBuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).godSlayerCooldown = true; + player.GetCalamityPlayer().godSlayerCooldown = true; } } } diff --git a/Buffs/StatBuffs/GraxDefense.cs b/Buffs/StatBuffs/GraxDefense.cs index 0ddb0261f0..e0166ea143 100644 --- a/Buffs/StatBuffs/GraxDefense.cs +++ b/Buffs/StatBuffs/GraxDefense.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Buffs.StatBuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).graxDefense = true; + player.GetCalamityPlayer().graxDefense = true; } } } diff --git a/Buffs/StatBuffs/HeartAttack.cs b/Buffs/StatBuffs/HeartAttack.cs index da68504193..c6731aa2e0 100644 --- a/Buffs/StatBuffs/HeartAttack.cs +++ b/Buffs/StatBuffs/HeartAttack.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Buffs.StatBuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).hAttack = true; + player.GetCalamityPlayer().hAttack = true; } } } diff --git a/Buffs/StatBuffs/IceShieldBuff.cs b/Buffs/StatBuffs/IceShieldBuff.cs index 7c08249c06..b420c61d90 100644 --- a/Buffs/StatBuffs/IceShieldBuff.cs +++ b/Buffs/StatBuffs/IceShieldBuff.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Buffs.StatBuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).sirenIce = true; + player.GetCalamityPlayer().sirenIce = true; } } } diff --git a/Buffs/StatBuffs/Molten.cs b/Buffs/StatBuffs/Molten.cs index 75acbec735..7db68bec2a 100644 --- a/Buffs/StatBuffs/Molten.cs +++ b/Buffs/StatBuffs/Molten.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Buffs.StatBuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).molten = true; + player.GetCalamityPlayer().molten = true; } } } diff --git a/Buffs/StatBuffs/Mushy.cs b/Buffs/StatBuffs/Mushy.cs index c0de59c297..7fddae82a0 100644 --- a/Buffs/StatBuffs/Mushy.cs +++ b/Buffs/StatBuffs/Mushy.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Buffs.StatBuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).mushy = true; + player.GetCalamityPlayer().mushy = true; } } } diff --git a/Buffs/StatBuffs/RageMode.cs b/Buffs/StatBuffs/RageMode.cs index b977d137c6..62d0ff9c3d 100644 --- a/Buffs/StatBuffs/RageMode.cs +++ b/Buffs/StatBuffs/RageMode.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Buffs.StatBuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).rageMode = true; + player.GetCalamityPlayer().rageMode = true; } public override void ModifyBuffTip(ref string tip, ref int rare) diff --git a/Buffs/StatBuffs/ReaverRage.cs b/Buffs/StatBuffs/ReaverRage.cs index 15688f2023..28beeb4824 100644 --- a/Buffs/StatBuffs/ReaverRage.cs +++ b/Buffs/StatBuffs/ReaverRage.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Buffs.StatBuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).rRage = true; + player.GetCalamityPlayer().rRage = true; } } } diff --git a/Buffs/StatBuffs/ScarfMeleeBoost.cs b/Buffs/StatBuffs/ScarfMeleeBoost.cs index 9910cff665..60f15c2b55 100644 --- a/Buffs/StatBuffs/ScarfMeleeBoost.cs +++ b/Buffs/StatBuffs/ScarfMeleeBoost.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Buffs.StatBuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).sMeleeBoost = true; + player.GetCalamityPlayer().sMeleeBoost = true; } } } diff --git a/Buffs/StatBuffs/ShellBoost.cs b/Buffs/StatBuffs/ShellBoost.cs index 37902b9794..f1468e32fa 100644 --- a/Buffs/StatBuffs/ShellBoost.cs +++ b/Buffs/StatBuffs/ShellBoost.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Buffs.StatBuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).shellBoost = true; + player.GetCalamityPlayer().shellBoost = true; } } } diff --git a/Buffs/StatBuffs/SirenWaterSpeed.cs b/Buffs/StatBuffs/SirenWaterSpeed.cs index bd640a1617..9066a497cf 100644 --- a/Buffs/StatBuffs/SirenWaterSpeed.cs +++ b/Buffs/StatBuffs/SirenWaterSpeed.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Buffs.StatBuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).sirenWaterBuff = true; + player.GetCalamityPlayer().sirenWaterBuff = true; } } } diff --git a/Buffs/StatBuffs/TarraLifeRegen.cs b/Buffs/StatBuffs/TarraLifeRegen.cs index a72977daf3..2b1424df03 100644 --- a/Buffs/StatBuffs/TarraLifeRegen.cs +++ b/Buffs/StatBuffs/TarraLifeRegen.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Buffs.StatBuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).tRegen = true; + player.GetCalamityPlayer().tRegen = true; } } } diff --git a/Buffs/StatBuffs/TranquilityCandle.cs b/Buffs/StatBuffs/TranquilityCandle.cs index 107f076101..8f32282d16 100644 --- a/Buffs/StatBuffs/TranquilityCandle.cs +++ b/Buffs/StatBuffs/TranquilityCandle.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Buffs.StatBuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).tranquilityCandle = true; + player.GetCalamityPlayer().tranquilityCandle = true; } } } diff --git a/Buffs/StatBuffs/TyrantsFury.cs b/Buffs/StatBuffs/TyrantsFury.cs index 79c6644792..4349bc2e57 100644 --- a/Buffs/StatBuffs/TyrantsFury.cs +++ b/Buffs/StatBuffs/TyrantsFury.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Buffs.StatBuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).tFury = true; + player.GetCalamityPlayer().tFury = true; } } } diff --git a/Buffs/StatBuffs/XerocRage.cs b/Buffs/StatBuffs/XerocRage.cs index e21707b49f..9ab0fc3124 100644 --- a/Buffs/StatBuffs/XerocRage.cs +++ b/Buffs/StatBuffs/XerocRage.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Buffs.StatBuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).xRage = true; + player.GetCalamityPlayer().xRage = true; } } } diff --git a/Buffs/StatBuffs/XerocWrath.cs b/Buffs/StatBuffs/XerocWrath.cs index 460beb2b5c..d73383a7d5 100644 --- a/Buffs/StatBuffs/XerocWrath.cs +++ b/Buffs/StatBuffs/XerocWrath.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Buffs.StatBuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).xWrath = true; + player.GetCalamityPlayer().xWrath = true; } } } diff --git a/Buffs/StatDebuffs/AbyssalDivingSuitPlatesBroken.cs b/Buffs/StatDebuffs/AbyssalDivingSuitPlatesBroken.cs index 42b4315277..02dc9d1848 100644 --- a/Buffs/StatDebuffs/AbyssalDivingSuitPlatesBroken.cs +++ b/Buffs/StatDebuffs/AbyssalDivingSuitPlatesBroken.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Buffs.StatDebuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).abyssalDivingSuitCooldown = true; + player.GetCalamityPlayer().abyssalDivingSuitCooldown = true; } } } diff --git a/Buffs/StatDebuffs/ArmorCrunch.cs b/Buffs/StatDebuffs/ArmorCrunch.cs index 4039af9949..62656ef4c3 100644 --- a/Buffs/StatDebuffs/ArmorCrunch.cs +++ b/Buffs/StatDebuffs/ArmorCrunch.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Buffs.StatDebuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).aCrunch = true; + player.GetCalamityPlayer().aCrunch = true; } } } diff --git a/Buffs/StatDebuffs/BurntOut.cs b/Buffs/StatDebuffs/BurntOut.cs index abf5e5bf8e..ba1120acef 100644 --- a/Buffs/StatDebuffs/BurntOut.cs +++ b/Buffs/StatDebuffs/BurntOut.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Buffs.StatDebuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).bOut = true; + player.GetCalamityPlayer().bOut = true; } } } diff --git a/Buffs/StatDebuffs/Enraged.cs b/Buffs/StatDebuffs/Enraged.cs index c2cff08a57..2e66875fd6 100644 --- a/Buffs/StatDebuffs/Enraged.cs +++ b/Buffs/StatDebuffs/Enraged.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Buffs.StatDebuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).enraged = true; + player.GetCalamityPlayer().enraged = true; } public override void Update(NPC npc, ref int buffIndex) diff --git a/Buffs/StatDebuffs/ExtremeGrav.cs b/Buffs/StatDebuffs/ExtremeGrav.cs index eb81570ab1..0a66f2154d 100644 --- a/Buffs/StatDebuffs/ExtremeGrav.cs +++ b/Buffs/StatDebuffs/ExtremeGrav.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Buffs.StatDebuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).eGrav = true; + player.GetCalamityPlayer().eGrav = true; } } } diff --git a/Buffs/StatDebuffs/ExtremeGravity.cs b/Buffs/StatDebuffs/ExtremeGravity.cs index 0c432107b2..d651b1c1ea 100644 --- a/Buffs/StatDebuffs/ExtremeGravity.cs +++ b/Buffs/StatDebuffs/ExtremeGravity.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Buffs.StatDebuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).eGravity = true; + player.GetCalamityPlayer().eGravity = true; } } } diff --git a/Buffs/StatDebuffs/FishAlert.cs b/Buffs/StatDebuffs/FishAlert.cs index 8198ee1e4a..9bf1b91d5a 100644 --- a/Buffs/StatDebuffs/FishAlert.cs +++ b/Buffs/StatDebuffs/FishAlert.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Buffs.StatDebuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).fishAlert = true; + player.GetCalamityPlayer().fishAlert = true; } } } diff --git a/Buffs/StatDebuffs/GlacialState.cs b/Buffs/StatDebuffs/GlacialState.cs index 5ad2ba46b7..1203765e31 100644 --- a/Buffs/StatDebuffs/GlacialState.cs +++ b/Buffs/StatDebuffs/GlacialState.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Buffs.StatDebuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).gState = true; + player.GetCalamityPlayer().gState = true; } public override void Update(NPC npc, ref int buffIndex) diff --git a/Buffs/StatDebuffs/Horror.cs b/Buffs/StatDebuffs/Horror.cs index adb48d338b..4afbc2f4ab 100644 --- a/Buffs/StatDebuffs/Horror.cs +++ b/Buffs/StatDebuffs/Horror.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Buffs.StatDebuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).horror = true; + player.GetCalamityPlayer().horror = true; } } } diff --git a/Buffs/StatDebuffs/IceShieldBrokenBuff.cs b/Buffs/StatDebuffs/IceShieldBrokenBuff.cs index 3e117ddd8f..74171d9392 100644 --- a/Buffs/StatDebuffs/IceShieldBrokenBuff.cs +++ b/Buffs/StatDebuffs/IceShieldBrokenBuff.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Buffs.StatDebuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).sirenIceCooldown = true; + player.GetCalamityPlayer().sirenIceCooldown = true; } } } diff --git a/Buffs/StatDebuffs/Irradiated.cs b/Buffs/StatDebuffs/Irradiated.cs index c3026640d1..2afa91a9f7 100644 --- a/Buffs/StatDebuffs/Irradiated.cs +++ b/Buffs/StatDebuffs/Irradiated.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Buffs.StatDebuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).irradiated = true; + player.GetCalamityPlayer().irradiated = true; } public override void Update(NPC npc, ref int buffIndex) diff --git a/Buffs/StatDebuffs/MarkedforDeath.cs b/Buffs/StatDebuffs/MarkedforDeath.cs index 2fbf4d2349..2b1785a2d2 100644 --- a/Buffs/StatDebuffs/MarkedforDeath.cs +++ b/Buffs/StatDebuffs/MarkedforDeath.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Buffs.StatDebuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).marked = true; + player.GetCalamityPlayer().marked = true; } } } diff --git a/Buffs/StatDebuffs/ScarfCooldown.cs b/Buffs/StatDebuffs/ScarfCooldown.cs index ef2ca4e9e1..2bb7e8b4f3 100644 --- a/Buffs/StatDebuffs/ScarfCooldown.cs +++ b/Buffs/StatDebuffs/ScarfCooldown.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Buffs.StatDebuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).scarfCooldown = true; + player.GetCalamityPlayer().scarfCooldown = true; } } } diff --git a/Buffs/StatDebuffs/TimeSlow.cs b/Buffs/StatDebuffs/TimeSlow.cs index 1fe0d30761..d4883d66ff 100644 --- a/Buffs/StatDebuffs/TimeSlow.cs +++ b/Buffs/StatDebuffs/TimeSlow.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Buffs.StatDebuffs /*public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).timeSlow = true; + player.GetCalamityPlayer().timeSlow = true; }*/ } } diff --git a/Buffs/StatDebuffs/Warped.cs b/Buffs/StatDebuffs/Warped.cs index 872f58699a..8fe99b4f56 100644 --- a/Buffs/StatDebuffs/Warped.cs +++ b/Buffs/StatDebuffs/Warped.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Buffs.StatDebuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).warped = true; + player.GetCalamityPlayer().warped = true; } } } diff --git a/Buffs/StatDebuffs/WeakPetrification.cs b/Buffs/StatDebuffs/WeakPetrification.cs index 6b468f4ac6..8feb36cd87 100644 --- a/Buffs/StatDebuffs/WeakPetrification.cs +++ b/Buffs/StatDebuffs/WeakPetrification.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Buffs.StatDebuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).weakPetrification = true; + player.GetCalamityPlayer().weakPetrification = true; } } } diff --git a/Buffs/StatDebuffs/WhisperingDeath.cs b/Buffs/StatDebuffs/WhisperingDeath.cs index 7b49885159..e0651255cf 100644 --- a/Buffs/StatDebuffs/WhisperingDeath.cs +++ b/Buffs/StatDebuffs/WhisperingDeath.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Buffs.StatDebuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).wDeath = true; + player.GetCalamityPlayer().wDeath = true; } public override void Update(NPC npc, ref int buffIndex) diff --git a/Buffs/SummonBuffs/AngryChicken.cs b/Buffs/SummonBuffs/AngryChicken.cs index 8ee96d5b39..27c6e9a61f 100644 --- a/Buffs/SummonBuffs/AngryChicken.cs +++ b/Buffs/SummonBuffs/AngryChicken.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Buffs.SummonBuffs public override void Update(Player player, ref int buffIndex) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (player.ownedProjectileCounts[mod.ProjectileType("AngryChicken")] > 0) { modPlayer.aChicken = true; diff --git a/Buffs/SummonBuffs/AquaticStar.cs b/Buffs/SummonBuffs/AquaticStar.cs index 9338950006..d206ef0d5a 100644 --- a/Buffs/SummonBuffs/AquaticStar.cs +++ b/Buffs/SummonBuffs/AquaticStar.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Buffs.SummonBuffs public override void Update(Player player, ref int buffIndex) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (player.ownedProjectileCounts[mod.ProjectileType("AquaticStar")] > 0) { modPlayer.aStar = true; diff --git a/Buffs/SummonBuffs/BloodClot.cs b/Buffs/SummonBuffs/BloodClot.cs index 63436f2d7c..98a0ae9182 100644 --- a/Buffs/SummonBuffs/BloodClot.cs +++ b/Buffs/SummonBuffs/BloodClot.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Buffs.SummonBuffs public override void Update(Player player, ref int buffIndex) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (player.ownedProjectileCounts[mod.ProjectileType("BloodClotMinion")] > 0) { modPlayer.bClot = true; diff --git a/Buffs/SummonBuffs/BrimstoneWaifu.cs b/Buffs/SummonBuffs/BrimstoneWaifu.cs index 36399f400d..75a9f6b171 100644 --- a/Buffs/SummonBuffs/BrimstoneWaifu.cs +++ b/Buffs/SummonBuffs/BrimstoneWaifu.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Buffs.SummonBuffs public override void Update(Player player, ref int buffIndex) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (player.ownedProjectileCounts[mod.ProjectileType("BigBustyRose")] > 0) { modPlayer.bWaifu = true; diff --git a/Buffs/SummonBuffs/BrittleStar.cs b/Buffs/SummonBuffs/BrittleStar.cs index 3343f90f63..c89809e048 100644 --- a/Buffs/SummonBuffs/BrittleStar.cs +++ b/Buffs/SummonBuffs/BrittleStar.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Buffs.SummonBuffs public override void Update(Player player, ref int buffIndex) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (player.ownedProjectileCounts[mod.ProjectileType("BrittleStar")] > 0) { modPlayer.bStar = true; diff --git a/Buffs/SummonBuffs/Calamari.cs b/Buffs/SummonBuffs/Calamari.cs index 8dd62424f2..24f5877a08 100644 --- a/Buffs/SummonBuffs/Calamari.cs +++ b/Buffs/SummonBuffs/Calamari.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Buffs.SummonBuffs public override void Update(Player player, ref int buffIndex) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (player.ownedProjectileCounts[mod.ProjectileType("Calamari")] > 0) { modPlayer.calamari = true; diff --git a/Buffs/SummonBuffs/CalamitasEyes.cs b/Buffs/SummonBuffs/CalamitasEyes.cs index 5d2ded0e83..74c0844487 100644 --- a/Buffs/SummonBuffs/CalamitasEyes.cs +++ b/Buffs/SummonBuffs/CalamitasEyes.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Buffs.SummonBuffs public override void Update(Player player, ref int buffIndex) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (player.ownedProjectileCounts[mod.ProjectileType("Calamitamini")] > 0) { modPlayer.cEyes = true; diff --git a/Buffs/SummonBuffs/ChaosSpirit.cs b/Buffs/SummonBuffs/ChaosSpirit.cs index e01c225e45..33e0f1ffbf 100644 --- a/Buffs/SummonBuffs/ChaosSpirit.cs +++ b/Buffs/SummonBuffs/ChaosSpirit.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Buffs.SummonBuffs public override void Update(Player player, ref int buffIndex) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (player.ownedProjectileCounts[mod.ProjectileType("ChaosSpirit")] > 0) { modPlayer.cSpirit = true; diff --git a/Buffs/SummonBuffs/CloudyWaifu.cs b/Buffs/SummonBuffs/CloudyWaifu.cs index d4482eb652..50254c9604 100644 --- a/Buffs/SummonBuffs/CloudyWaifu.cs +++ b/Buffs/SummonBuffs/CloudyWaifu.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Buffs.SummonBuffs public override void Update(Player player, ref int buffIndex) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (player.ownedProjectileCounts[mod.ProjectileType("CloudyWaifu")] > 0) { modPlayer.cWaifu = true; diff --git a/Buffs/SummonBuffs/Corroslime.cs b/Buffs/SummonBuffs/Corroslime.cs index 898e020c49..603ee9f403 100644 --- a/Buffs/SummonBuffs/Corroslime.cs +++ b/Buffs/SummonBuffs/Corroslime.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Buffs.SummonBuffs public override void Update(Player player, ref int buffIndex) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (player.ownedProjectileCounts[mod.ProjectileType("Corroslime")] > 0) { modPlayer.cSlime = true; diff --git a/Buffs/SummonBuffs/CosmicEnergy.cs b/Buffs/SummonBuffs/CosmicEnergy.cs index 95def241bf..0241aadd13 100644 --- a/Buffs/SummonBuffs/CosmicEnergy.cs +++ b/Buffs/SummonBuffs/CosmicEnergy.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Buffs.SummonBuffs public override void Update(Player player, ref int buffIndex) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (player.ownedProjectileCounts[mod.ProjectileType("CosmicEnergy")] > 0) { modPlayer.cEnergy = true; diff --git a/Buffs/SummonBuffs/Cosmilamp.cs b/Buffs/SummonBuffs/Cosmilamp.cs index 753c0b3d02..51724c064b 100644 --- a/Buffs/SummonBuffs/Cosmilamp.cs +++ b/Buffs/SummonBuffs/Cosmilamp.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Buffs.SummonBuffs public override void Update(Player player, ref int buffIndex) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (player.ownedProjectileCounts[mod.ProjectileType("Cosmilamp")] > 0) { modPlayer.cLamp = true; diff --git a/Buffs/SummonBuffs/Crimslime.cs b/Buffs/SummonBuffs/Crimslime.cs index 482f0ed2f5..282ed7fccd 100644 --- a/Buffs/SummonBuffs/Crimslime.cs +++ b/Buffs/SummonBuffs/Crimslime.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Buffs.SummonBuffs public override void Update(Player player, ref int buffIndex) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (player.ownedProjectileCounts[mod.ProjectileType("Crimslime")] > 0) { modPlayer.cSlime2 = true; diff --git a/Buffs/SummonBuffs/DaedalusCrystal.cs b/Buffs/SummonBuffs/DaedalusCrystal.cs index acce5c01b1..adbbcfed5e 100644 --- a/Buffs/SummonBuffs/DaedalusCrystal.cs +++ b/Buffs/SummonBuffs/DaedalusCrystal.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Buffs.SummonBuffs public override void Update(Player player, ref int buffIndex) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (player.ownedProjectileCounts[mod.ProjectileType("DaedalusCrystal")] > 0) { modPlayer.dCrystal = true; diff --git a/Buffs/SummonBuffs/DankCreeper.cs b/Buffs/SummonBuffs/DankCreeper.cs index f38d4d91ad..60d5333319 100644 --- a/Buffs/SummonBuffs/DankCreeper.cs +++ b/Buffs/SummonBuffs/DankCreeper.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Buffs.SummonBuffs public override void Update(Player player, ref int buffIndex) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (player.ownedProjectileCounts[mod.ProjectileType("DankCreeper")] > 0) { modPlayer.dCreeper = true; diff --git a/Buffs/SummonBuffs/DrewsSandyWaifu.cs b/Buffs/SummonBuffs/DrewsSandyWaifu.cs index 7fa838b12c..20162fda5b 100644 --- a/Buffs/SummonBuffs/DrewsSandyWaifu.cs +++ b/Buffs/SummonBuffs/DrewsSandyWaifu.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Buffs.SummonBuffs public override void Update(Player player, ref int buffIndex) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (player.ownedProjectileCounts[mod.ProjectileType("DrewsSandyWaifu")] > 0) { modPlayer.dWaifu = true; diff --git a/Buffs/SummonBuffs/ElementalAxe.cs b/Buffs/SummonBuffs/ElementalAxe.cs index 6de0157676..3f1c9a6e60 100644 --- a/Buffs/SummonBuffs/ElementalAxe.cs +++ b/Buffs/SummonBuffs/ElementalAxe.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Buffs.SummonBuffs public override void Update(Player player, ref int buffIndex) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (player.ownedProjectileCounts[mod.ProjectileType("ElementalAxe")] > 0) { modPlayer.eAxe = true; diff --git a/Buffs/SummonBuffs/FungalClump.cs b/Buffs/SummonBuffs/FungalClump.cs index e3011ec4f1..c16372bb94 100644 --- a/Buffs/SummonBuffs/FungalClump.cs +++ b/Buffs/SummonBuffs/FungalClump.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Buffs.SummonBuffs public override void Update(Player player, ref int buffIndex) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (player.ownedProjectileCounts[mod.ProjectileType("FungalClump")] > 0) { modPlayer.fClump = true; diff --git a/Buffs/SummonBuffs/GuardianDefense.cs b/Buffs/SummonBuffs/GuardianDefense.cs index 38a6642e58..32deea73d7 100644 --- a/Buffs/SummonBuffs/GuardianDefense.cs +++ b/Buffs/SummonBuffs/GuardianDefense.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Buffs.SummonBuffs public override void Update(Player player, ref int buffIndex) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (player.ownedProjectileCounts[mod.ProjectileType("MiniGuardianDefense")] > 0) { modPlayer.gDefense = true; diff --git a/Buffs/SummonBuffs/GuardianHealer.cs b/Buffs/SummonBuffs/GuardianHealer.cs index ce8b3c562c..783da565fc 100644 --- a/Buffs/SummonBuffs/GuardianHealer.cs +++ b/Buffs/SummonBuffs/GuardianHealer.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Buffs.SummonBuffs public override void Update(Player player, ref int buffIndex) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (player.ownedProjectileCounts[mod.ProjectileType("MiniGuardianHealer")] > 0) { modPlayer.gHealer = true; diff --git a/Buffs/SummonBuffs/GuardianOffense.cs b/Buffs/SummonBuffs/GuardianOffense.cs index 61f9f9e68d..9c4c91070f 100644 --- a/Buffs/SummonBuffs/GuardianOffense.cs +++ b/Buffs/SummonBuffs/GuardianOffense.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Buffs.SummonBuffs public override void Update(Player player, ref int buffIndex) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (player.ownedProjectileCounts[mod.ProjectileType("MiniGuardianAttack")] > 0) { modPlayer.gOffense = true; diff --git a/Buffs/SummonBuffs/Herring.cs b/Buffs/SummonBuffs/Herring.cs index aea21b66b9..1ea30fd9b0 100644 --- a/Buffs/SummonBuffs/Herring.cs +++ b/Buffs/SummonBuffs/Herring.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Buffs.SummonBuffs public override void Update(Player player, ref int buffIndex) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (player.ownedProjectileCounts[mod.ProjectileType("Herring")] > 0) { modPlayer.herring = true; diff --git a/Buffs/SummonBuffs/HotE.cs b/Buffs/SummonBuffs/HotE.cs index 2da4f233f4..bd8bcead63 100644 --- a/Buffs/SummonBuffs/HotE.cs +++ b/Buffs/SummonBuffs/HotE.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Buffs.SummonBuffs public override void Update(Player player, ref int buffIndex) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (!modPlayer.allWaifus) { diff --git a/Buffs/SummonBuffs/IceClasper.cs b/Buffs/SummonBuffs/IceClasper.cs index 47e7a0eba9..88ef96c50f 100644 --- a/Buffs/SummonBuffs/IceClasper.cs +++ b/Buffs/SummonBuffs/IceClasper.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Buffs.SummonBuffs public override void Update(Player player, ref int buffIndex) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (player.ownedProjectileCounts[mod.ProjectileType("IceClasper")] > 0) { modPlayer.iClasper = true; diff --git a/Buffs/SummonBuffs/Mechworm.cs b/Buffs/SummonBuffs/Mechworm.cs index 296f4edb91..1ed46978ad 100644 --- a/Buffs/SummonBuffs/Mechworm.cs +++ b/Buffs/SummonBuffs/Mechworm.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Buffs.SummonBuffs public override void Update(Player player, ref int buffIndex) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (player.ownedProjectileCounts[mod.ProjectileType("MechwormHead")] > 0) { modPlayer.mWorm = true; diff --git a/Buffs/SummonBuffs/Phantom.cs b/Buffs/SummonBuffs/Phantom.cs index 71c1738b8f..1ef1ac6bd1 100644 --- a/Buffs/SummonBuffs/Phantom.cs +++ b/Buffs/SummonBuffs/Phantom.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Buffs.SummonBuffs public override void Update(Player player, ref int buffIndex) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (player.ownedProjectileCounts[mod.ProjectileType("PhantomGuy")] > 0) { modPlayer.pGuy = true; diff --git a/Buffs/SummonBuffs/ReaverOrb.cs b/Buffs/SummonBuffs/ReaverOrb.cs index c20b3637ce..9563153f67 100644 --- a/Buffs/SummonBuffs/ReaverOrb.cs +++ b/Buffs/SummonBuffs/ReaverOrb.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Buffs.SummonBuffs public override void Update(Player player, ref int buffIndex) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (player.ownedProjectileCounts[mod.ProjectileType("ReaverOrb")] > 0) { modPlayer.rOrb = true; diff --git a/Buffs/SummonBuffs/RedDevil.cs b/Buffs/SummonBuffs/RedDevil.cs index 02f39988fe..0742e69bf0 100644 --- a/Buffs/SummonBuffs/RedDevil.cs +++ b/Buffs/SummonBuffs/RedDevil.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Buffs.SummonBuffs public override void Update(Player player, ref int buffIndex) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (player.ownedProjectileCounts[mod.ProjectileType("RedDevil")] > 0) { modPlayer.rDevil = true; diff --git a/Buffs/SummonBuffs/ResurrectionButterflyBuff.cs b/Buffs/SummonBuffs/ResurrectionButterflyBuff.cs index 6a09128f22..32e2918012 100644 --- a/Buffs/SummonBuffs/ResurrectionButterflyBuff.cs +++ b/Buffs/SummonBuffs/ResurrectionButterflyBuff.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Buffs.SummonBuffs public override void Update(Player player, ref int buffIndex) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (player.ownedProjectileCounts[mod.ProjectileType("PinkButterfly")] > 0 || player.ownedProjectileCounts[mod.ProjectileType("PurpleButterfly")] > 0) { modPlayer.resButterfly = true; diff --git a/Buffs/SummonBuffs/Sandnado.cs b/Buffs/SummonBuffs/Sandnado.cs index e94c00219a..6562310ea5 100644 --- a/Buffs/SummonBuffs/Sandnado.cs +++ b/Buffs/SummonBuffs/Sandnado.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Buffs.SummonBuffs public override void Update(Player player, ref int buffIndex) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (player.ownedProjectileCounts[mod.ProjectileType("Sandnado")] > 0) { modPlayer.sandnado = true; diff --git a/Buffs/SummonBuffs/SandyWaifu.cs b/Buffs/SummonBuffs/SandyWaifu.cs index 2b349a6f5f..b81923e3e0 100644 --- a/Buffs/SummonBuffs/SandyWaifu.cs +++ b/Buffs/SummonBuffs/SandyWaifu.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Buffs.SummonBuffs public override void Update(Player player, ref int buffIndex) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (player.ownedProjectileCounts[mod.ProjectileType("SandyWaifu")] > 0) { modPlayer.sWaifu = true; diff --git a/Buffs/SummonBuffs/SilvaCrystal.cs b/Buffs/SummonBuffs/SilvaCrystal.cs index 5141ae2ce9..57af4df67f 100644 --- a/Buffs/SummonBuffs/SilvaCrystal.cs +++ b/Buffs/SummonBuffs/SilvaCrystal.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Buffs.SummonBuffs public override void Update(Player player, ref int buffIndex) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (player.ownedProjectileCounts[mod.ProjectileType("SilvaCrystal")] > 0) { modPlayer.sCrystal = true; diff --git a/Buffs/SummonBuffs/SirenLure.cs b/Buffs/SummonBuffs/SirenLure.cs index b70855dda4..ec26aa10ef 100644 --- a/Buffs/SummonBuffs/SirenLure.cs +++ b/Buffs/SummonBuffs/SirenLure.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Buffs.SummonBuffs public override void Update(Player player, ref int buffIndex) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (player.ownedProjectileCounts[mod.ProjectileType("SirenLure")] > 0) { modPlayer.slWaifu = true; diff --git a/Buffs/SummonBuffs/SlimeGod.cs b/Buffs/SummonBuffs/SlimeGod.cs index 791a580ba8..e5828c8030 100644 --- a/Buffs/SummonBuffs/SlimeGod.cs +++ b/Buffs/SummonBuffs/SlimeGod.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Buffs.SummonBuffs public override void Update(Player player, ref int buffIndex) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (player.ownedProjectileCounts[mod.ProjectileType("SlimeGodAlt")] > 0) { modPlayer.sGod = true; diff --git a/Buffs/SummonBuffs/SolarSpirit.cs b/Buffs/SummonBuffs/SolarSpirit.cs index f82420afbe..e0703f15ce 100644 --- a/Buffs/SummonBuffs/SolarSpirit.cs +++ b/Buffs/SummonBuffs/SolarSpirit.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Buffs.SummonBuffs public override void Update(Player player, ref int buffIndex) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (player.ownedProjectileCounts[mod.ProjectileType("SolarPixie")] > 0) { modPlayer.SP = true; diff --git a/Buffs/SummonBuffs/SolarSpiritGod.cs b/Buffs/SummonBuffs/SolarSpiritGod.cs index 14eb39e720..cc9419371f 100644 --- a/Buffs/SummonBuffs/SolarSpiritGod.cs +++ b/Buffs/SummonBuffs/SolarSpiritGod.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Buffs.SummonBuffs public override void Update(Player player, ref int buffIndex) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (player.ownedProjectileCounts[mod.ProjectileType("SolarGod")] > 0) { modPlayer.SPG = true; diff --git a/Buffs/SummonBuffs/SpiritGeneratorAtkBuff.cs b/Buffs/SummonBuffs/SpiritGeneratorAtkBuff.cs index 17c6d70e3c..6992600d9c 100644 --- a/Buffs/SummonBuffs/SpiritGeneratorAtkBuff.cs +++ b/Buffs/SummonBuffs/SpiritGeneratorAtkBuff.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Buffs.SummonBuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).sPower = true; + player.GetCalamityPlayer().sPower = true; } } } diff --git a/Buffs/SummonBuffs/SpiritGeneratorDefBuff.cs b/Buffs/SummonBuffs/SpiritGeneratorDefBuff.cs index e5c6604b23..ffe891cbe0 100644 --- a/Buffs/SummonBuffs/SpiritGeneratorDefBuff.cs +++ b/Buffs/SummonBuffs/SpiritGeneratorDefBuff.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Buffs.SummonBuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).sDefense = true; + player.GetCalamityPlayer().sDefense = true; } } } diff --git a/Buffs/SummonBuffs/SpiritGeneratorRegenBuff.cs b/Buffs/SummonBuffs/SpiritGeneratorRegenBuff.cs index f10fcc1d79..c25c6d29e0 100644 --- a/Buffs/SummonBuffs/SpiritGeneratorRegenBuff.cs +++ b/Buffs/SummonBuffs/SpiritGeneratorRegenBuff.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Buffs.SummonBuffs public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).sRegen = true; + player.GetCalamityPlayer().sRegen = true; } } } diff --git a/Buffs/SummonBuffs/Urchin.cs b/Buffs/SummonBuffs/Urchin.cs index 2dee434ee1..7b30ea77ce 100644 --- a/Buffs/SummonBuffs/Urchin.cs +++ b/Buffs/SummonBuffs/Urchin.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Buffs.SummonBuffs public override void Update(Player player, ref int buffIndex) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (player.ownedProjectileCounts[mod.ProjectileType("Urchin")] > 0) { modPlayer.vUrchin = true; diff --git a/Buffs/SummonBuffs/Valkyrie.cs b/Buffs/SummonBuffs/Valkyrie.cs index 283de0881e..32c962f23e 100644 --- a/Buffs/SummonBuffs/Valkyrie.cs +++ b/Buffs/SummonBuffs/Valkyrie.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Buffs.SummonBuffs public override void Update(Player player, ref int buffIndex) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (player.ownedProjectileCounts[mod.ProjectileType("Valkyrie")] > 0) { modPlayer.aValkyrie = true; diff --git a/Buffs/SunkenSea/Clamity.cs b/Buffs/SunkenSea/Clamity.cs index fa7955ad47..9b9fdce197 100644 --- a/Buffs/SunkenSea/Clamity.cs +++ b/Buffs/SunkenSea/Clamity.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Buffs.SunkenSea public override void Update(Player player, ref int buffIndex) { - player.GetModPlayer(mod).clamity = true; + player.GetCalamityPlayer().clamity = true; } } } diff --git a/Buffs/SunkenSea/Shellfish.cs b/Buffs/SunkenSea/Shellfish.cs index 0da9027649..d63eb95fa8 100644 --- a/Buffs/SunkenSea/Shellfish.cs +++ b/Buffs/SunkenSea/Shellfish.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Buffs.SunkenSea public override void Update(Player player, ref int buffIndex) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (player.ownedProjectileCounts[mod.ProjectileType("Shellfish")] > 0) { modPlayer.shellfish = true; diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index f9e14dfd4f..11cd5d043f 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -1544,7 +1544,7 @@ namespace CalamityMod.CalPlayer public override bool CustomBiomesMatch(Player other) { - CalamityPlayer modOther = other.GetModPlayer(mod); + CalamityPlayer modOther = other.GetCalamityPlayer(); return ZoneCalamity == modOther.ZoneCalamity || ZoneAstral == modOther.ZoneAstral || ZoneAbyss == modOther.ZoneAbyss || ZoneAbyssLayer1 == modOther.ZoneAbyssLayer1 || ZoneAbyssLayer2 == modOther.ZoneAbyssLayer2 || ZoneAbyssLayer3 == modOther.ZoneAbyssLayer3 || ZoneAbyssLayer4 == modOther.ZoneAbyssLayer4 || @@ -1553,7 +1553,7 @@ namespace CalamityMod.CalPlayer public override void CopyCustomBiomesTo(Player other) { - CalamityPlayer modOther = other.GetModPlayer(mod); + CalamityPlayer modOther = other.GetCalamityPlayer(); modOther.ZoneCalamity = ZoneCalamity; modOther.ZoneAstral = ZoneAstral; modOther.ZoneSulphur = ZoneSulphur; @@ -8721,7 +8721,7 @@ namespace CalamityMod.CalPlayer } Player drawPlayer = drawInfo.drawPlayer; Mod mod = ModLoader.GetMod("CalamityMod"); - CalamityPlayer modPlayer = drawPlayer.GetModPlayer(mod); + CalamityPlayer modPlayer = drawPlayer.GetCalamityPlayer(); if (modPlayer.sirenIce) { Texture2D texture = mod.GetTexture("ExtraTextures/IceShield"); @@ -8869,8 +8869,8 @@ namespace CalamityMod.CalPlayer { Mod mod = ModLoader.GetMod("CalamityMod"); Player drawPlayer = edi.drawPlayer; - if (drawPlayer.mount != null && (drawPlayer.GetModPlayer(mod).fab || drawPlayer.GetModPlayer(mod).crysthamyr || - drawPlayer.GetModPlayer(mod).onyxExcavator)) + if (drawPlayer.mount != null && (drawPlayer.GetCalamityPlayer().fab || drawPlayer.GetCalamityPlayer().crysthamyr || + drawPlayer.GetCalamityPlayer().onyxExcavator)) { drawPlayer.mount.Draw(Main.playerDrawData, 3, drawPlayer, edi.position, edi.mountColor, edi.spriteEffects, edi.shadow); } diff --git a/CalPlayer/CalamityPlayerLifeRegen.cs b/CalPlayer/CalamityPlayerLifeRegen.cs index 62ff2aaf86..edda3672dc 100644 --- a/CalPlayer/CalamityPlayerLifeRegen.cs +++ b/CalPlayer/CalamityPlayerLifeRegen.cs @@ -14,7 +14,7 @@ namespace CalamityMod.CalPlayer public static void CalamityUpdateBadLifeRegen(Player player, Mod mod) { Point point = player.Center.ToTileCoordinates(); - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); //Initial Debuffs @@ -423,7 +423,7 @@ namespace CalamityMod.CalPlayer #region Update Life Regen public static void CalamityUpdateLifeRegen(Player player, Mod mod) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (!player.shinyStone) { diff --git a/CalamityMod.cs b/CalamityMod.cs index 5e54a95006..9b6b21b332 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -1764,7 +1764,7 @@ namespace CalamityMod { layers.Insert(index, new LegacyGameInterfaceLayer("Boss HP Bars", delegate () { - if (Main.LocalPlayer.GetModPlayer(mod).drawBossHPBar) + if (Main.LocalPlayer.GetCalamityPlayer().drawBossHPBar) { BossHealthBarManager.Update(); BossHealthBarManager.Draw(Main.spriteBatch); diff --git a/Items/AbyssItems/AbyssalAmulet.cs b/Items/AbyssItems/AbyssalAmulet.cs index f9259af8d9..84a1448152 100644 --- a/Items/AbyssItems/AbyssalAmulet.cs +++ b/Items/AbyssItems/AbyssalAmulet.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.AbyssItems public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.abyssalAmulet = true; } } diff --git a/Items/AbyssItems/AbyssalDivingGear.cs b/Items/AbyssItems/AbyssalDivingGear.cs index 065a0394d4..db82190724 100644 --- a/Items/AbyssItems/AbyssalDivingGear.cs +++ b/Items/AbyssItems/AbyssalDivingGear.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.AbyssItems public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.depthCharm = true; modPlayer.jellyfishNecklace = true; player.arcticDivingGear = true; diff --git a/Items/AbyssItems/AnechoicPlating.cs b/Items/AbyssItems/AnechoicPlating.cs index afd078a386..0d1d7c5e9d 100644 --- a/Items/AbyssItems/AnechoicPlating.cs +++ b/Items/AbyssItems/AnechoicPlating.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.AbyssItems public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.anechoicPlating = true; } } diff --git a/Items/AbyssItems/DepthCharm.cs b/Items/AbyssItems/DepthCharm.cs index 22e8cb7971..3d1c4c9a0b 100644 --- a/Items/AbyssItems/DepthCharm.cs +++ b/Items/AbyssItems/DepthCharm.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.AbyssItems public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.depthCharm = true; } } diff --git a/Items/AbyssItems/IronBoots.cs b/Items/AbyssItems/IronBoots.cs index 4f4169a075..c66ff107b8 100644 --- a/Items/AbyssItems/IronBoots.cs +++ b/Items/AbyssItems/IronBoots.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.AbyssItems public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.ironBoots = true; } } diff --git a/Items/AbyssItems/LumenousAmulet.cs b/Items/AbyssItems/LumenousAmulet.cs index 8e741e1a40..74760a4b51 100644 --- a/Items/AbyssItems/LumenousAmulet.cs +++ b/Items/AbyssItems/LumenousAmulet.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.AbyssItems public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.abyssalAmulet = true; modPlayer.lumenousAmulet = true; } diff --git a/Items/AbyssItems/ReaperToothNecklace.cs b/Items/AbyssItems/ReaperToothNecklace.cs index d60f526fe4..6b72eb4090 100644 --- a/Items/AbyssItems/ReaperToothNecklace.cs +++ b/Items/AbyssItems/ReaperToothNecklace.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.AbyssItems public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.reaperToothNecklace = true; player.armorPenetration += 100; } diff --git a/Items/Accessories/AlchemicalFlask.cs b/Items/Accessories/AlchemicalFlask.cs index 0229c3a172..befdd2c77a 100644 --- a/Items/Accessories/AlchemicalFlask.cs +++ b/Items/Accessories/AlchemicalFlask.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.alchFlask = true; player.buffImmune[mod.BuffType("Plague")] = true; } diff --git a/Items/Accessories/AmalgamatedBrain.cs b/Items/Accessories/AmalgamatedBrain.cs index 9b79098e64..333047307d 100644 --- a/Items/Accessories/AmalgamatedBrain.cs +++ b/Items/Accessories/AmalgamatedBrain.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.aBrain = true; if (player.immune) { diff --git a/Items/Accessories/AmbrosialAmpoule.cs b/Items/Accessories/AmbrosialAmpoule.cs index ac1fe32504..2dc6d38526 100644 --- a/Items/Accessories/AmbrosialAmpoule.cs +++ b/Items/Accessories/AmbrosialAmpoule.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.beeResist = true; modPlayer.aAmpoule = true; } diff --git a/Items/Accessories/AmidiasSpark.cs b/Items/Accessories/AmidiasSpark.cs index 24fff1f75b..4550afd594 100644 --- a/Items/Accessories/AmidiasSpark.cs +++ b/Items/Accessories/AmidiasSpark.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.aSpark = true; } } diff --git a/Items/Accessories/AngelTreads.cs b/Items/Accessories/AngelTreads.cs index 3419ea34bd..3a91847884 100644 --- a/Items/Accessories/AngelTreads.cs +++ b/Items/Accessories/AngelTreads.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.harpyRing = true; player.accRunSpeed = 8f; player.rocketBoots = 3; diff --git a/Items/Accessories/ArcanumoftheVoid.cs b/Items/Accessories/ArcanumoftheVoid.cs index 177c38d877..433965096c 100644 --- a/Items/Accessories/ArcanumoftheVoid.cs +++ b/Items/Accessories/ArcanumoftheVoid.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.projRef = true; } } diff --git a/Items/Accessories/AsgardianAegis.cs b/Items/Accessories/AsgardianAegis.cs index a8783ee9d5..a6812f2c4d 100644 --- a/Items/Accessories/AsgardianAegis.cs +++ b/Items/Accessories/AsgardianAegis.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (!hideVisual) { modPlayer.dashMod = 4; } modPlayer.elysianAegis = true; player.noKnockback = true; diff --git a/Items/Accessories/AsgardsValor.cs b/Items/Accessories/AsgardsValor.cs index 6f625172a2..0e7823addb 100644 --- a/Items/Accessories/AsgardsValor.cs +++ b/Items/Accessories/AsgardsValor.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (!hideVisual) { modPlayer.dashMod = 2; } player.buffImmune[46] = true; player.buffImmune[44] = true; diff --git a/Items/Accessories/AstralArcanum.cs b/Items/Accessories/AstralArcanum.cs index ddefe374f1..dc64433b4e 100644 --- a/Items/Accessories/AstralArcanum.cs +++ b/Items/Accessories/AstralArcanum.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.astralArcanum = true; modPlayer.aBulwark = true; modPlayer.projRef = true; diff --git a/Items/Accessories/AstralBulwark.cs b/Items/Accessories/AstralBulwark.cs index e7cd8e004f..b81f29580e 100644 --- a/Items/Accessories/AstralBulwark.cs +++ b/Items/Accessories/AstralBulwark.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.aBulwark = true; player.buffImmune[mod.BuffType("AstralInfectionDebuff")] = true; } diff --git a/Items/Accessories/BadgeofBravery.cs b/Items/Accessories/BadgeofBravery.cs index 6c148bf56d..29a595794e 100644 --- a/Items/Accessories/BadgeofBravery.cs +++ b/Items/Accessories/BadgeofBravery.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.badgeOfBravery = true; } diff --git a/Items/Accessories/BloodflareCore.cs b/Items/Accessories/BloodflareCore.cs index 17eb9c295a..91d6d01e02 100644 --- a/Items/Accessories/BloodflareCore.cs +++ b/Items/Accessories/BloodflareCore.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.bloodflareCore = true; } } diff --git a/Items/Accessories/BurdenBreaker.cs b/Items/Accessories/BurdenBreaker.cs index 08830a2d1b..ab7a63beea 100644 --- a/Items/Accessories/BurdenBreaker.cs +++ b/Items/Accessories/BurdenBreaker.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Accessories player.lavaImmune = false; if (Collision.LavaCollision(player.position, player.width, (player.waterWalk ? (player.height - 6) : player.height))) { - player.GetModPlayer(mod).KillPlayer(); + player.GetCalamityPlayer().KillPlayer(); } else if (player.immune) { diff --git a/Items/Accessories/CelestialJewel.cs b/Items/Accessories/CelestialJewel.cs index 0ef4572d76..c8ddb93a10 100644 --- a/Items/Accessories/CelestialJewel.cs +++ b/Items/Accessories/CelestialJewel.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.celestialJewel = true; } diff --git a/Items/Accessories/CheatTestThing.cs b/Items/Accessories/CheatTestThing.cs index e62f8e74c4..7692ada038 100644 --- a/Items/Accessories/CheatTestThing.cs +++ b/Items/Accessories/CheatTestThing.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); bool canUse = (player.name == "Fabsol" || player.name == "Totalbiscuit") && player.townNPCs <= 1; if (canUse) { diff --git a/Items/Accessories/CoreOfTheBloodGod.cs b/Items/Accessories/CoreOfTheBloodGod.cs index e0a4372e32..c4dcf7769e 100644 --- a/Items/Accessories/CoreOfTheBloodGod.cs +++ b/Items/Accessories/CoreOfTheBloodGod.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.coreOfTheBloodGod = true; modPlayer.fleshTotem = true; } diff --git a/Items/Accessories/CounterScarf.cs b/Items/Accessories/CounterScarf.cs index 5e7810531a..c33ddee3c1 100644 --- a/Items/Accessories/CounterScarf.cs +++ b/Items/Accessories/CounterScarf.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.dodgeScarf = true; modPlayer.dashMod = 1; } diff --git a/Items/Accessories/CrownJewel.cs b/Items/Accessories/CrownJewel.cs index 489bd60b3d..45e4e67c9f 100644 --- a/Items/Accessories/CrownJewel.cs +++ b/Items/Accessories/CrownJewel.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.crownJewel = true; } } diff --git a/Items/Accessories/DarkSunRing.cs b/Items/Accessories/DarkSunRing.cs index 7df4786d1b..071925da85 100644 --- a/Items/Accessories/DarkSunRing.cs +++ b/Items/Accessories/DarkSunRing.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.darkSunRing = true; } diff --git a/Items/Accessories/DeificAmulet.cs b/Items/Accessories/DeificAmulet.cs index 49b08d0aec..a7a1756702 100644 --- a/Items/Accessories/DeificAmulet.cs +++ b/Items/Accessories/DeificAmulet.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.dAmulet = true; } diff --git a/Items/Accessories/DimensionalSoulArtifact.cs b/Items/Accessories/DimensionalSoulArtifact.cs index 3a4f108a72..6b1f462fb8 100644 --- a/Items/Accessories/DimensionalSoulArtifact.cs +++ b/Items/Accessories/DimensionalSoulArtifact.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.dArtifact = true; } diff --git a/Items/Accessories/DraedonsHeart.cs b/Items/Accessories/DraedonsHeart.cs index 630640281d..e3154ab09d 100644 --- a/Items/Accessories/DraedonsHeart.cs +++ b/Items/Accessories/DraedonsHeart.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.draedonsHeart = true; player.buffImmune[mod.BuffType("Horror")] = true; modPlayer.draedonsStressGain = true; diff --git a/Items/Accessories/EldritchSoulArtifact.cs b/Items/Accessories/EldritchSoulArtifact.cs index 335011c766..5c653bc7ec 100644 --- a/Items/Accessories/EldritchSoulArtifact.cs +++ b/Items/Accessories/EldritchSoulArtifact.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.eArtifact = true; } diff --git a/Items/Accessories/ElementalGauntlet.cs b/Items/Accessories/ElementalGauntlet.cs index 129b3ba764..865aeb51ae 100644 --- a/Items/Accessories/ElementalGauntlet.cs +++ b/Items/Accessories/ElementalGauntlet.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.eGauntlet = true; } diff --git a/Items/Accessories/ElementalQuiver.cs b/Items/Accessories/ElementalQuiver.cs index c1e6c5e010..38c150ef41 100644 --- a/Items/Accessories/ElementalQuiver.cs +++ b/Items/Accessories/ElementalQuiver.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.eQuiver = true; player.rangedDamage += 0.1f; player.rangedCrit += 5; diff --git a/Items/Accessories/EtherealTalisman.cs b/Items/Accessories/EtherealTalisman.cs index 0a91446646..1a6e203fe3 100644 --- a/Items/Accessories/EtherealTalisman.cs +++ b/Items/Accessories/EtherealTalisman.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.eTalisman = true; player.findTreasure = true; if (!hideVisual) diff --git a/Items/Accessories/EyeoftheStorm.cs b/Items/Accessories/EyeoftheStorm.cs index 1efec04885..0171ae6fd8 100644 --- a/Items/Accessories/EyeoftheStorm.cs +++ b/Items/Accessories/EyeoftheStorm.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Accessories public override bool CanEquipAccessory(Player player, int slot) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (modPlayer.elementalHeart) { return false; @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.cloudWaifu = true; if (player.whoAmI == Main.myPlayer) { diff --git a/Items/Accessories/FrigidBulwark.cs b/Items/Accessories/FrigidBulwark.cs index 264cd412d5..a7e58904de 100644 --- a/Items/Accessories/FrigidBulwark.cs +++ b/Items/Accessories/FrigidBulwark.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.fBulwark = true; } diff --git a/Items/Accessories/FrostBarrier.cs b/Items/Accessories/FrostBarrier.cs index 6f1a5b5994..3e9b9862f5 100644 --- a/Items/Accessories/FrostBarrier.cs +++ b/Items/Accessories/FrostBarrier.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.fBarrier = true; player.buffImmune[46] = true; } diff --git a/Items/Accessories/FrostFlare.cs b/Items/Accessories/FrostFlare.cs index 2cbc99ca1a..58af05518e 100644 --- a/Items/Accessories/FrostFlare.cs +++ b/Items/Accessories/FrostFlare.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.frostFlare = true; } } diff --git a/Items/Accessories/FungalCarapace.cs b/Items/Accessories/FungalCarapace.cs index f9e314c23f..d001ef10c8 100644 --- a/Items/Accessories/FungalCarapace.cs +++ b/Items/Accessories/FungalCarapace.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.fCarapace = true; } } diff --git a/Items/Accessories/GiantShell.cs b/Items/Accessories/GiantShell.cs index bd865ae9a8..67155be556 100644 --- a/Items/Accessories/GiantShell.cs +++ b/Items/Accessories/GiantShell.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { player.moveSpeed -= 0.15f; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.gShell = true; } } diff --git a/Items/Accessories/GodlySoulArtifact.cs b/Items/Accessories/GodlySoulArtifact.cs index ab4c9ede1a..98e0fd5c6e 100644 --- a/Items/Accessories/GodlySoulArtifact.cs +++ b/Items/Accessories/GodlySoulArtifact.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.gArtifact = true; } diff --git a/Items/Accessories/HarpyRing.cs b/Items/Accessories/HarpyRing.cs index 12247d9fa8..181ed56e06 100644 --- a/Items/Accessories/HarpyRing.cs +++ b/Items/Accessories/HarpyRing.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.harpyRing = true; } diff --git a/Items/Accessories/HeartofDarkness.cs b/Items/Accessories/HeartofDarkness.cs index 8c31c58045..8375c55c09 100644 --- a/Items/Accessories/HeartofDarkness.cs +++ b/Items/Accessories/HeartofDarkness.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.heartOfDarkness = true; } } diff --git a/Items/Accessories/HeartoftheElements.cs b/Items/Accessories/HeartoftheElements.cs index f735f65301..6af1ff8cd4 100644 --- a/Items/Accessories/HeartoftheElements.cs +++ b/Items/Accessories/HeartoftheElements.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Accessories public override bool CanEquipAccessory(Player player, int slot) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (modPlayer.brimstoneWaifu || modPlayer.sandWaifu || modPlayer.sandBoobWaifu || modPlayer.cloudWaifu || modPlayer.sirenWaifu) { return false; @@ -47,7 +47,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { Lighting.AddLight((int)player.Center.X / 16, (int)player.Center.Y / 16, ((float)Main.DiscoR / 255f), ((float)Main.DiscoG / 255f), ((float)Main.DiscoB / 255f)); - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.allWaifus = !hideVisual; modPlayer.elementalHeart = true; if (!hideVisual) diff --git a/Items/Accessories/HoneyDew.cs b/Items/Accessories/HoneyDew.cs index c94cee459a..953b2247c6 100644 --- a/Items/Accessories/HoneyDew.cs +++ b/Items/Accessories/HoneyDew.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.beeResist = true; if (player.ZoneJungle) { diff --git a/Items/Accessories/Laudanum.cs b/Items/Accessories/Laudanum.cs index 1e2f037ac7..f11d701a58 100644 --- a/Items/Accessories/Laudanum.cs +++ b/Items/Accessories/Laudanum.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.laudanum = true; player.buffImmune[mod.BuffType("Horror")] = true; } diff --git a/Items/Accessories/MagicLevelMeter.cs b/Items/Accessories/MagicLevelMeter.cs index b5cf43fb65..d6a4fa10c6 100644 --- a/Items/Accessories/MagicLevelMeter.cs +++ b/Items/Accessories/MagicLevelMeter.cs @@ -24,8 +24,8 @@ namespace CalamityMod.Items.Accessories public override void ModifyTooltips(List list) { - int level = Main.player[Main.myPlayer].GetModPlayer(mod).magicLevel; - int exactLevel = Main.player[Main.myPlayer].GetModPlayer(mod).exactMagicLevel; + int level = Main.player[Main.myPlayer].GetCalamityPlayer().magicLevel; + int exactLevel = Main.player[Main.myPlayer].GetCalamityPlayer().exactMagicLevel; int damageGain = 0; int manaUsage = 0; int critGain = 0; @@ -122,7 +122,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.fasterMagicLevel = true; } } diff --git a/Items/Accessories/MeleeLevelMeter.cs b/Items/Accessories/MeleeLevelMeter.cs index 88c02b1efa..70e98e712d 100644 --- a/Items/Accessories/MeleeLevelMeter.cs +++ b/Items/Accessories/MeleeLevelMeter.cs @@ -24,8 +24,8 @@ namespace CalamityMod.Items.Accessories public override void ModifyTooltips(List list) { - int level = Main.player[Main.myPlayer].GetModPlayer(mod).meleeLevel; - int exactLevel = Main.player[Main.myPlayer].GetModPlayer(mod).exactMeleeLevel; + int level = Main.player[Main.myPlayer].GetCalamityPlayer().meleeLevel; + int exactLevel = Main.player[Main.myPlayer].GetCalamityPlayer().exactMeleeLevel; int damageGain = 0; int meleeSpeed = 0; int critGain = 0; @@ -122,7 +122,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.fasterMeleeLevel = true; } } diff --git a/Items/Accessories/Nanotech.cs b/Items/Accessories/Nanotech.cs index 26171d72b9..9b5b3adc03 100644 --- a/Items/Accessories/Nanotech.cs +++ b/Items/Accessories/Nanotech.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.nanotech = true; modPlayer.raiderTalisman = true; player.GetCalamityPlayer().throwingDamage += 0.1f; diff --git a/Items/Accessories/NecklaceofVexation.cs b/Items/Accessories/NecklaceofVexation.cs index 9e15a9eba6..f6d48a1f9f 100644 --- a/Items/Accessories/NecklaceofVexation.cs +++ b/Items/Accessories/NecklaceofVexation.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.vexation = true; } diff --git a/Items/Accessories/PlagueHive.cs b/Items/Accessories/PlagueHive.cs index e4bd22bf3c..90e3a27599 100644 --- a/Items/Accessories/PlagueHive.cs +++ b/Items/Accessories/PlagueHive.cs @@ -44,7 +44,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); player.buffImmune[mod.BuffType("Plague")] = true; player.bee = true; modPlayer.uberBees = true; diff --git a/Items/Accessories/RaidersTalisman.cs b/Items/Accessories/RaidersTalisman.cs index d7ae147b07..14a326b08d 100644 --- a/Items/Accessories/RaidersTalisman.cs +++ b/Items/Accessories/RaidersTalisman.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.raiderTalisman = true; } diff --git a/Items/Accessories/RampartofDeities.cs b/Items/Accessories/RampartofDeities.cs index 8829ff0dc7..b81ce1710a 100644 --- a/Items/Accessories/RampartofDeities.cs +++ b/Items/Accessories/RampartofDeities.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.dAmulet = true; modPlayer.rampartOfDeities = true; } diff --git a/Items/Accessories/RangedLevelMeter.cs b/Items/Accessories/RangedLevelMeter.cs index 8f744a6dcc..9e7f87f9bd 100644 --- a/Items/Accessories/RangedLevelMeter.cs +++ b/Items/Accessories/RangedLevelMeter.cs @@ -24,8 +24,8 @@ namespace CalamityMod.Items.Accessories public override void ModifyTooltips(List list) { - int level = Main.player[Main.myPlayer].GetModPlayer(mod).rangedLevel; - int exactLevel = Main.player[Main.myPlayer].GetModPlayer(mod).exactRangedLevel; + int level = Main.player[Main.myPlayer].GetCalamityPlayer().rangedLevel; + int exactLevel = Main.player[Main.myPlayer].GetCalamityPlayer().exactRangedLevel; int damageGain = 0; int moveSpeed = 0; int critGain = 0; @@ -122,7 +122,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.fasterRangedLevel = true; } } diff --git a/Items/Accessories/RareVariants/DeepDiver.cs b/Items/Accessories/RareVariants/DeepDiver.cs index 3ddf7f64fe..8c421a7ca8 100644 --- a/Items/Accessories/RareVariants/DeepDiver.cs +++ b/Items/Accessories/RareVariants/DeepDiver.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Accessories.RareVariants { if (Collision.DrownCollision(player.position, player.width, player.height, player.gravDir)) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.deepDiver = true; modPlayer.dashMod = 5; } diff --git a/Items/Accessories/RareVariants/FabledTortoiseShell.cs b/Items/Accessories/RareVariants/FabledTortoiseShell.cs index 8efd1df641..f83785ed36 100644 --- a/Items/Accessories/RareVariants/FabledTortoiseShell.cs +++ b/Items/Accessories/RareVariants/FabledTortoiseShell.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Accessories.RareVariants public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.fabledTortoise = true; player.moveSpeed -= 0.5f; player.thorns = 0.25f; diff --git a/Items/Accessories/RareVariants/HideofAstrumDeus.cs b/Items/Accessories/RareVariants/HideofAstrumDeus.cs index 5b43ab7745..efbcc6b8c3 100644 --- a/Items/Accessories/RareVariants/HideofAstrumDeus.cs +++ b/Items/Accessories/RareVariants/HideofAstrumDeus.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Accessories.RareVariants public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.aBulwark = true; player.buffImmune[mod.BuffType("AstralInfectionDebuff")] = true; modPlayer.aBulwarkRare = true; diff --git a/Items/Accessories/RareVariants/Regenator.cs b/Items/Accessories/RareVariants/Regenator.cs index 33f49d5b3c..299ac4e4bf 100644 --- a/Items/Accessories/RareVariants/Regenator.cs +++ b/Items/Accessories/RareVariants/Regenator.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Accessories.RareVariants public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.regenator = true; } } diff --git a/Items/Accessories/RareVariants/SamuraiBadge.cs b/Items/Accessories/RareVariants/SamuraiBadge.cs index e228347508..b9fe6661fe 100644 --- a/Items/Accessories/RareVariants/SamuraiBadge.cs +++ b/Items/Accessories/RareVariants/SamuraiBadge.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Accessories.RareVariants public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.badgeOfBraveryRare = true; } } diff --git a/Items/Accessories/RareVariants/TheBee.cs b/Items/Accessories/RareVariants/TheBee.cs index b6f93bbe16..2c1551f950 100644 --- a/Items/Accessories/RareVariants/TheBee.cs +++ b/Items/Accessories/RareVariants/TheBee.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Accessories.RareVariants { player.starCloak = true; player.bee = true; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.theBee = true; } } diff --git a/Items/Accessories/RareVariants/TheEvolution.cs b/Items/Accessories/RareVariants/TheEvolution.cs index f190935193..abe4ae0906 100644 --- a/Items/Accessories/RareVariants/TheEvolution.cs +++ b/Items/Accessories/RareVariants/TheEvolution.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Accessories.RareVariants public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.projRefRare = true; } } diff --git a/Items/Accessories/RareVariants/TheTransformer.cs b/Items/Accessories/RareVariants/TheTransformer.cs index e2e48b4c1e..ddc81bc3b8 100644 --- a/Items/Accessories/RareVariants/TheTransformer.cs +++ b/Items/Accessories/RareVariants/TheTransformer.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Accessories.RareVariants public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.aSparkRare = true; modPlayer.aSpark = true; } diff --git a/Items/Accessories/RogueLevelMeter.cs b/Items/Accessories/RogueLevelMeter.cs index dd4d29e092..e4fc3d98b2 100644 --- a/Items/Accessories/RogueLevelMeter.cs +++ b/Items/Accessories/RogueLevelMeter.cs @@ -24,8 +24,8 @@ namespace CalamityMod.Items.Accessories public override void ModifyTooltips(List list) { - int level = Main.player[Main.myPlayer].GetModPlayer(mod).rogueLevel; - int exactLevel = Main.player[Main.myPlayer].GetModPlayer(mod).exactRogueLevel; + int level = Main.player[Main.myPlayer].GetCalamityPlayer().rogueLevel; + int exactLevel = Main.player[Main.myPlayer].GetCalamityPlayer().exactRogueLevel; int damageGain = 0; int velocityGain = 0; int critGain = 0; @@ -122,7 +122,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.fasterRogueLevel = true; } } diff --git a/Items/Accessories/SpiritGenerator.cs b/Items/Accessories/SpiritGenerator.cs index 2422c21c89..456ff59b8d 100644 --- a/Items/Accessories/SpiritGenerator.cs +++ b/Items/Accessories/SpiritGenerator.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.sGenerator = true; } diff --git a/Items/Accessories/Sponge.cs b/Items/Accessories/Sponge.cs index 0a5f0d6238..e5b14d0aa0 100644 --- a/Items/Accessories/Sponge.cs +++ b/Items/Accessories/Sponge.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.beeResist = true; modPlayer.aSpark = true; modPlayer.gShell = true; diff --git a/Items/Accessories/StatisBeltOfCurses.cs b/Items/Accessories/StatisBeltOfCurses.cs index bb5a334483..ab83669233 100644 --- a/Items/Accessories/StatisBeltOfCurses.cs +++ b/Items/Accessories/StatisBeltOfCurses.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.statisBeltOfCurses = true; modPlayer.shadowMinions = true; modPlayer.tearMinions = true; diff --git a/Items/Accessories/StatisBlessing.cs b/Items/Accessories/StatisBlessing.cs index e486744960..29a7b807fb 100644 --- a/Items/Accessories/StatisBlessing.cs +++ b/Items/Accessories/StatisBlessing.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.tearMinions = true; player.minionKB += 2.5f; player.minionDamage += 0.1f; diff --git a/Items/Accessories/StatisCurse.cs b/Items/Accessories/StatisCurse.cs index 46403ab7b2..dd84707ef0 100644 --- a/Items/Accessories/StatisCurse.cs +++ b/Items/Accessories/StatisCurse.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.shadowMinions = true; modPlayer.tearMinions = true; player.minionKB += 2.5f; diff --git a/Items/Accessories/StressPills.cs b/Items/Accessories/StressPills.cs index 9577e2a2e0..61c4b1b173 100644 --- a/Items/Accessories/StressPills.cs +++ b/Items/Accessories/StressPills.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.stressPills = true; } } diff --git a/Items/Accessories/SummonLevelMeter.cs b/Items/Accessories/SummonLevelMeter.cs index b9a39e2ea2..adacae5700 100644 --- a/Items/Accessories/SummonLevelMeter.cs +++ b/Items/Accessories/SummonLevelMeter.cs @@ -24,8 +24,8 @@ namespace CalamityMod.Items.Accessories public override void ModifyTooltips(List list) { - int level = Main.player[Main.myPlayer].GetModPlayer(mod).summonLevel; - int exactLevel = Main.player[Main.myPlayer].GetModPlayer(mod).exactSummonLevel; + int level = Main.player[Main.myPlayer].GetCalamityPlayer().summonLevel; + int exactLevel = Main.player[Main.myPlayer].GetCalamityPlayer().exactSummonLevel; int damageGain = 0; int minionKB = 0; int minionSlots = 0; @@ -120,7 +120,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.fasterSummonLevel = true; } } diff --git a/Items/Accessories/TheAbsorber.cs b/Items/Accessories/TheAbsorber.cs index f5e7987468..e8e01bee90 100644 --- a/Items/Accessories/TheAbsorber.cs +++ b/Items/Accessories/TheAbsorber.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.aSpark = true; modPlayer.gShell = true; modPlayer.fCarapace = true; diff --git a/Items/Accessories/TheAmalgam.cs b/Items/Accessories/TheAmalgam.cs index 878a6cb227..b0cf6d2943 100644 --- a/Items/Accessories/TheAmalgam.cs +++ b/Items/Accessories/TheAmalgam.cs @@ -42,7 +42,7 @@ namespace CalamityMod.Items.Accessories public override bool CanEquipAccessory(Player player, int slot) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (modPlayer.fungalClump) { return false; @@ -52,7 +52,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.aBrain = true; modPlayer.fungalClump = true; if (player.whoAmI == Main.myPlayer) diff --git a/Items/Accessories/TheCommunity.cs b/Items/Accessories/TheCommunity.cs index 872599f49a..98c3855ad0 100644 --- a/Items/Accessories/TheCommunity.cs +++ b/Items/Accessories/TheCommunity.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.community = true; } } diff --git a/Items/Accessories/TheFirstShadowflame.cs b/Items/Accessories/TheFirstShadowflame.cs index 40be96e895..7493b0de5a 100644 --- a/Items/Accessories/TheFirstShadowflame.cs +++ b/Items/Accessories/TheFirstShadowflame.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.shadowMinions = true; } } diff --git a/Items/Accessories/VoidofExtinction.cs b/Items/Accessories/VoidofExtinction.cs index e445e7ed2c..14c64034d7 100644 --- a/Items/Accessories/VoidofExtinction.cs +++ b/Items/Accessories/VoidofExtinction.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Accessories public override bool CanEquipAccessory(Player player, int slot) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (modPlayer.calamityRing) { return false; @@ -56,7 +56,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.calamityRing = true; player.lavaRose = true; player.lavaMax += 240; diff --git a/Items/Accessories/WifeinaBottle.cs b/Items/Accessories/WifeinaBottle.cs index 64851ad195..a5bb90b0c7 100644 --- a/Items/Accessories/WifeinaBottle.cs +++ b/Items/Accessories/WifeinaBottle.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Accessories public override bool CanEquipAccessory(Player player, int slot) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (modPlayer.elementalHeart) { return false; @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.sandWaifu = true; if (player.whoAmI == Main.myPlayer) { diff --git a/Items/Accessories/WifeinaBottlewithBoobs.cs b/Items/Accessories/WifeinaBottlewithBoobs.cs index e373abbcbc..d7b74ce96a 100644 --- a/Items/Accessories/WifeinaBottlewithBoobs.cs +++ b/Items/Accessories/WifeinaBottlewithBoobs.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Accessories public override bool CanEquipAccessory(Player player, int slot) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (modPlayer.elementalHeart) { return false; @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.sandBoobWaifu = true; if (player.whoAmI == Main.myPlayer) { diff --git a/Items/Accessories/Wings/CelestialTracers.cs b/Items/Accessories/Wings/CelestialTracers.cs index cafbdcfbd1..d29fee2b37 100644 --- a/Items/Accessories/Wings/CelestialTracers.cs +++ b/Items/Accessories/Wings/CelestialTracers.cs @@ -51,7 +51,7 @@ namespace CalamityMod.Items.Accessories.Wings } Main.dust[num60].shader = GameShaders.Armor.GetSecondaryShader(player.cWings, player); } - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); player.accRunSpeed = 12f; player.rocketBoots = 3; player.moveSpeed += 0.5f; diff --git a/Items/Accessories/Wings/ElysianTracers.cs b/Items/Accessories/Wings/ElysianTracers.cs index 7db692d9b3..805c76ae18 100644 --- a/Items/Accessories/Wings/ElysianTracers.cs +++ b/Items/Accessories/Wings/ElysianTracers.cs @@ -51,7 +51,7 @@ namespace CalamityMod.Items.Accessories.Wings } Main.dust[num60].shader = GameShaders.Armor.GetSecondaryShader(player.cWings, player); } - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); player.accRunSpeed = 10.5f; player.rocketBoots = 3; player.moveSpeed += 0.36f; diff --git a/Items/Accessories/Wings/InfinityBoots.cs b/Items/Accessories/Wings/InfinityBoots.cs index 4a02fbcad0..4cf4d4b6b7 100644 --- a/Items/Accessories/Wings/InfinityBoots.cs +++ b/Items/Accessories/Wings/InfinityBoots.cs @@ -51,7 +51,7 @@ namespace CalamityMod.Items.Accessories.Wings } Main.dust[num60].shader = GameShaders.Armor.GetSecondaryShader(player.cWings, player); } - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); player.accRunSpeed = 9.25f; player.rocketBoots = 3; player.moveSpeed += 0.24f; diff --git a/Items/Accessories/YharimsInsignia.cs b/Items/Accessories/YharimsInsignia.cs index 135462afdf..67b7c2ec17 100644 --- a/Items/Accessories/YharimsInsignia.cs +++ b/Items/Accessories/YharimsInsignia.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.yInsignia = true; } diff --git a/Items/AquaticScourge/AquaticEmblem.cs b/Items/AquaticScourge/AquaticEmblem.cs index f5af70838d..8b508a3c99 100644 --- a/Items/AquaticScourge/AquaticEmblem.cs +++ b/Items/AquaticScourge/AquaticEmblem.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.AquaticScourge public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.aquaticEmblem = true; player.npcTypeNoAggro[65] = true; player.npcTypeNoAggro[220] = true; diff --git a/Items/AquaticScourge/Seafood.cs b/Items/AquaticScourge/Seafood.cs index 9036fbaee7..334b0338aa 100644 --- a/Items/AquaticScourge/Seafood.cs +++ b/Items/AquaticScourge/Seafood.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.AquaticScourge public override bool CanUseItem(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); return modPlayer.ZoneSulphur && !NPC.AnyNPCs(mod.NPCType("AquaticScourgeHead")); } diff --git a/Items/Armor/AerospecHat.cs b/Items/Armor/AerospecHat.cs index 75e62003be..637f4b63b1 100644 --- a/Items/Armor/AerospecHat.cs +++ b/Items/Armor/AerospecHat.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Items.Armor player.setBonus = "5% increased movement speed and magic critical strike chance\n" + "Taking over 25 damage in one hit will cause a spread of homing feathers to fall\n" + "Allows you to fall more quickly and disables fall damage"; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.aeroSet = true; player.noFallDmg = true; player.moveSpeed += 0.05f; diff --git a/Items/Armor/AerospecHeadgear.cs b/Items/Armor/AerospecHeadgear.cs index 9a41514f7b..51dae14db8 100644 --- a/Items/Armor/AerospecHeadgear.cs +++ b/Items/Armor/AerospecHeadgear.cs @@ -48,7 +48,7 @@ namespace CalamityMod.Items.Armor "Rogue stealth builds while not attacking and not moving, up to a max of 100\n" + "Rogue stealth only reduces when you attack, it does not reduce while moving\n" + "The higher your rogue stealth the higher your rogue damage, crit, and movement speed"; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.aeroSet = true; modPlayer.rogueStealthMax = 1f; player.noFallDmg = true; diff --git a/Items/Armor/AerospecHelm.cs b/Items/Armor/AerospecHelm.cs index de7ac14778..e2fdc6537a 100644 --- a/Items/Armor/AerospecHelm.cs +++ b/Items/Armor/AerospecHelm.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Items.Armor player.setBonus = "5% increased movement speed and melee critical strike chance\n" + "Taking over 25 damage in one hit will cause a spread of homing feathers to fall\n" + "Allows you to fall more quickly and disables fall damage"; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.aeroSet = true; player.noFallDmg = true; player.moveSpeed += 0.05f; diff --git a/Items/Armor/AerospecHelmet.cs b/Items/Armor/AerospecHelmet.cs index 1dece34ed8..ce29b56913 100644 --- a/Items/Armor/AerospecHelmet.cs +++ b/Items/Armor/AerospecHelmet.cs @@ -39,7 +39,7 @@ namespace CalamityMod.Items.Armor "Summons a valkyrie to protect you\n" + "Taking over 25 damage in one hit will cause a spread of homing feathers to fall\n" + "Allows you to fall more quickly and disables fall damage"; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.valkyrie = true; modPlayer.aeroSet = true; player.noFallDmg = true; diff --git a/Items/Armor/AerospecHood.cs b/Items/Armor/AerospecHood.cs index 79c1a674ec..a3671fa2f8 100644 --- a/Items/Armor/AerospecHood.cs +++ b/Items/Armor/AerospecHood.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Items.Armor player.setBonus = "5% increased movement speed and ranged critical strike chance\n" + "Taking over 25 damage in one hit will cause a spread of homing feathers to fall\n" + "Allows you to fall more quickly and disables fall damage"; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.aeroSet = true; player.noFallDmg = true; player.moveSpeed += 0.05f; diff --git a/Items/Armor/AstralHelm.cs b/Items/Armor/AstralHelm.cs index 3df9a7b24a..625ce758dd 100644 --- a/Items/Armor/AstralHelm.cs +++ b/Items/Armor/AstralHelm.cs @@ -39,7 +39,7 @@ namespace CalamityMod.Items.Armor "28% increased damage and 21% increased critical strike chance\n" + "Whenever you crit an enemy fallen, hallowed, and astral stars will rain down\n" + "This effect has a 1 second cooldown before it can trigger again"; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.astralStarRain = true; player.moveSpeed += 0.25f; player.allDamage += 0.28f; diff --git a/Items/Armor/AtaxiaHeadgear.cs b/Items/Armor/AtaxiaHeadgear.cs index 6986dfaaed..8c51e2d16b 100644 --- a/Items/Armor/AtaxiaHeadgear.cs +++ b/Items/Armor/AtaxiaHeadgear.cs @@ -46,7 +46,7 @@ namespace CalamityMod.Items.Armor "Inferno effect when below 50% life\n" + "You have a 50% chance to fire a homing chaos flare when using ranged weapons\n" + "You have a 20% chance to emit a blazing explosion when you are hit"; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.ataxiaBlaze = true; modPlayer.ataxiaBolt = true; player.rangedDamage += 0.05f; diff --git a/Items/Armor/AtaxiaHelm.cs b/Items/Armor/AtaxiaHelm.cs index 2f9fe20e1d..1f6734f56c 100644 --- a/Items/Armor/AtaxiaHelm.cs +++ b/Items/Armor/AtaxiaHelm.cs @@ -42,7 +42,7 @@ namespace CalamityMod.Items.Armor "Inferno effect when below 50% life\n" + "Melee attacks and projectiles cause chaos flames to erupt on enemy hits\n" + "You have a 20% chance to emit a blazing explosion when you are hit"; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.ataxiaBlaze = true; modPlayer.ataxiaGeyser = true; player.meleeDamage += 0.05f; @@ -50,7 +50,7 @@ namespace CalamityMod.Items.Armor public override void UpdateEquip(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.ataxiaFire = true; player.meleeSpeed += 0.12f; player.moveSpeed += 0.12f; diff --git a/Items/Armor/AtaxiaHelmet.cs b/Items/Armor/AtaxiaHelmet.cs index 57443e9155..5b6cc794b0 100644 --- a/Items/Armor/AtaxiaHelmet.cs +++ b/Items/Armor/AtaxiaHelmet.cs @@ -41,7 +41,7 @@ namespace CalamityMod.Items.Armor "Inferno effect when below 50% life\n" + "Summons a chaos spirit to protect you\n" + "You have a 20% chance to emit a blazing explosion when you are hit"; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.ataxiaBlaze = true; modPlayer.chaosSpirit = true; if (player.whoAmI == Main.myPlayer) diff --git a/Items/Armor/AtaxiaHood.cs b/Items/Armor/AtaxiaHood.cs index ce9fba6407..e8c4b9febe 100644 --- a/Items/Armor/AtaxiaHood.cs +++ b/Items/Armor/AtaxiaHood.cs @@ -45,7 +45,7 @@ namespace CalamityMod.Items.Armor "Rogue stealth builds while not attacking and not moving, up to a max of 120\n" + "Rogue stealth only reduces when you attack, it does not reduce while moving\n" + "The higher your rogue stealth the higher your rogue damage, crit, and movement speed"; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.ataxiaBlaze = true; modPlayer.ataxiaVolley = true; modPlayer.rogueStealthMax = 1.2f; diff --git a/Items/Armor/AtaxiaMask.cs b/Items/Armor/AtaxiaMask.cs index 0a0be4ace5..bda4abafc4 100644 --- a/Items/Armor/AtaxiaMask.cs +++ b/Items/Armor/AtaxiaMask.cs @@ -40,7 +40,7 @@ namespace CalamityMod.Items.Armor "Inferno effect when below 50% life\n" + "Magic attacks summon damaging and healing flare orbs on hit\n" + "You have a 20% chance to emit a blazing explosion when you are hit"; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.ataxiaBlaze = true; modPlayer.ataxiaMage = true; player.magicDamage += 0.05f; diff --git a/Items/Armor/AuricTeslaBodyArmor.cs b/Items/Armor/AuricTeslaBodyArmor.cs index 984d6c68b5..e6905244fd 100644 --- a/Items/Armor/AuricTeslaBodyArmor.cs +++ b/Items/Armor/AuricTeslaBodyArmor.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Armor public override void UpdateEquip(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.fBarrier = true; modPlayer.godSlayerReflect = true; player.statLifeMax2 += 100; diff --git a/Items/Armor/AuricTeslaHelm.cs b/Items/Armor/AuricTeslaHelm.cs index 6898b63d2b..87aabce0bb 100644 --- a/Items/Armor/AuricTeslaHelm.cs +++ b/Items/Armor/AuricTeslaHelm.cs @@ -39,7 +39,7 @@ namespace CalamityMod.Items.Armor "All projectiles spawn healing auric orbs on enemy hits\n" + "Max run speed and acceleration boosted by 10%\n" + "Your melee damage is multiplied based on how high your HP is; at full HP this effect is at max"; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.tarraSet = true; modPlayer.tarraMelee = true; modPlayer.bloodflareSet = true; @@ -63,7 +63,7 @@ namespace CalamityMod.Items.Armor public override void UpdateEquip(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.auricBoost = true; player.meleeDamage += 0.2f; player.meleeCrit += 20; diff --git a/Items/Armor/AuricTeslaHoodedFacemask.cs b/Items/Armor/AuricTeslaHoodedFacemask.cs index dab6c2ae2c..67e05eddc6 100644 --- a/Items/Armor/AuricTeslaHoodedFacemask.cs +++ b/Items/Armor/AuricTeslaHoodedFacemask.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Items.Armor player.setBonus = "Ranged Tarragon, Bloodflare, God Slayer, and Silva armor effects\n" + "All projectiles spawn healing auric orbs on enemy hits\n" + "Max run speed and acceleration boosted by 10%"; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.tarraSet = true; modPlayer.tarraRanged = true; modPlayer.bloodflareSet = true; @@ -61,7 +61,7 @@ namespace CalamityMod.Items.Armor public override void UpdateEquip(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.auricBoost = true; player.rangedDamage += 0.3f; player.rangedCrit += 30; diff --git a/Items/Armor/AuricTeslaPlumedHelm.cs b/Items/Armor/AuricTeslaPlumedHelm.cs index f57a28efa1..0761c2b293 100644 --- a/Items/Armor/AuricTeslaPlumedHelm.cs +++ b/Items/Armor/AuricTeslaPlumedHelm.cs @@ -43,7 +43,7 @@ namespace CalamityMod.Items.Armor "Rogue stealth builds while not attacking and not moving, up to a max of 160\n" + "Rogue stealth only reduces when you attack, it does not reduce while moving\n" + "The higher your rogue stealth the higher your rogue damage, crit, and movement speed"; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.tarraSet = true; modPlayer.tarraThrowing = true; modPlayer.bloodflareSet = true; @@ -67,7 +67,7 @@ namespace CalamityMod.Items.Armor public override void UpdateEquip(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.auricBoost = true; player.GetCalamityPlayer().throwingDamage += 0.2f; player.GetCalamityPlayer().throwingCrit += 20; diff --git a/Items/Armor/AuricTeslaSpaceHelmet.cs b/Items/Armor/AuricTeslaSpaceHelmet.cs index 8bcd7c0427..2e28e6775e 100644 --- a/Items/Armor/AuricTeslaSpaceHelmet.cs +++ b/Items/Armor/AuricTeslaSpaceHelmet.cs @@ -41,7 +41,7 @@ namespace CalamityMod.Items.Armor "All projectiles spawn healing auric orbs on enemy hits\n" + "Max run speed and acceleration boosted by 10%\n" + "120% increased minion damage"; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.tarraSet = true; modPlayer.tarraSummon = true; modPlayer.bloodflareSet = true; @@ -196,7 +196,7 @@ namespace CalamityMod.Items.Armor public override void UpdateEquip(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.auricBoost = true; player.maxMinions += 7; } diff --git a/Items/Armor/AuricTeslaWireHemmedVisage.cs b/Items/Armor/AuricTeslaWireHemmedVisage.cs index ea7a4786cf..74fd30a46e 100644 --- a/Items/Armor/AuricTeslaWireHemmedVisage.cs +++ b/Items/Armor/AuricTeslaWireHemmedVisage.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Items.Armor player.setBonus = "Magic Tarragon, Bloodflare, God Slayer, and Silva armor effects\n" + "All projectiles spawn healing auric orbs on enemy hits\n" + "Max run speed and acceleration boosted by 10%"; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.tarraSet = true; modPlayer.tarraMage = true; modPlayer.bloodflareSet = true; @@ -61,7 +61,7 @@ namespace CalamityMod.Items.Armor public override void UpdateEquip(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.auricBoost = true; player.manaCost *= 0.8f; player.magicDamage += 0.2f; diff --git a/Items/Armor/BloodflareHelm.cs b/Items/Armor/BloodflareHelm.cs index 176be93ec2..a1f9c9c340 100644 --- a/Items/Armor/BloodflareHelm.cs +++ b/Items/Armor/BloodflareHelm.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.bloodflareSet = true; modPlayer.bloodflareThrowing = true; modPlayer.rogueStealthMax = 1.35f; diff --git a/Items/Armor/BloodflareHelmet.cs b/Items/Armor/BloodflareHelmet.cs index ddb548de61..86361aa0d9 100644 --- a/Items/Armor/BloodflareHelmet.cs +++ b/Items/Armor/BloodflareHelmet.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.bloodflareSet = true; modPlayer.bloodflareSummon = true; player.setBonus = "55% increased minion damage\n" + diff --git a/Items/Armor/BloodflareHornedHelm.cs b/Items/Armor/BloodflareHornedHelm.cs index 78086df198..0eacca3292 100644 --- a/Items/Armor/BloodflareHornedHelm.cs +++ b/Items/Armor/BloodflareHornedHelm.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.bloodflareSet = true; modPlayer.bloodflareRanged = true; player.setBonus = "Greatly increases life regen\n" + diff --git a/Items/Armor/BloodflareHornedMask.cs b/Items/Armor/BloodflareHornedMask.cs index bafe82bd24..46981db00c 100644 --- a/Items/Armor/BloodflareHornedMask.cs +++ b/Items/Armor/BloodflareHornedMask.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.bloodflareSet = true; modPlayer.bloodflareMage = true; player.setBonus = "Greatly increases life regen\n" + diff --git a/Items/Armor/BloodflareMask.cs b/Items/Armor/BloodflareMask.cs index 042562fdeb..eb2c522804 100644 --- a/Items/Armor/BloodflareMask.cs +++ b/Items/Armor/BloodflareMask.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.bloodflareSet = true; modPlayer.bloodflareMelee = true; player.setBonus = "Greatly increases life regen\n" + diff --git a/Items/Armor/DaedalusHat.cs b/Items/Armor/DaedalusHat.cs index d058801c90..c5eddc6091 100644 --- a/Items/Armor/DaedalusHat.cs +++ b/Items/Armor/DaedalusHat.cs @@ -40,7 +40,7 @@ namespace CalamityMod.Items.Armor player.setBonus = "5% increased magic damage\n" + "You have a 10% chance to absorb physical attacks and projectiles when hit\n" + "If you absorb an attack you are healed for 1/2 of that attack's damage"; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.daedalusAbsorb = true; player.magicDamage += 0.05f; } diff --git a/Items/Armor/DaedalusHeadgear.cs b/Items/Armor/DaedalusHeadgear.cs index 2bc320ec00..9cd868c5d1 100644 --- a/Items/Armor/DaedalusHeadgear.cs +++ b/Items/Armor/DaedalusHeadgear.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Items.Armor { player.setBonus = "20% increased minion damage\n" + "A daedalus crystal floats above you to protect you"; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.daedalusCrystal = true; if (player.whoAmI == Main.myPlayer) { diff --git a/Items/Armor/DaedalusHelm.cs b/Items/Armor/DaedalusHelm.cs index 0b3a70ae26..64897edebb 100644 --- a/Items/Armor/DaedalusHelm.cs +++ b/Items/Armor/DaedalusHelm.cs @@ -40,7 +40,7 @@ namespace CalamityMod.Items.Armor player.setBonus = "5% increased melee damage\n" + "You have a 33% chance to reflect projectiles back at enemies\n" + "If you reflect a projectile you are also healed for 1/5 of that projectile's damage"; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.daedalusReflect = true; player.meleeDamage += 0.05f; } diff --git a/Items/Armor/DaedalusHelmet.cs b/Items/Armor/DaedalusHelmet.cs index 2265a0b7d4..a1b7fc399d 100644 --- a/Items/Armor/DaedalusHelmet.cs +++ b/Items/Armor/DaedalusHelmet.cs @@ -39,7 +39,7 @@ namespace CalamityMod.Items.Armor { player.setBonus = "5% increased ranged damage\n" + "Getting hit causes you to emit a blast of crystal shards"; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.daedalusShard = true; player.rangedDamage += 0.05f; } diff --git a/Items/Armor/DaedalusVisor.cs b/Items/Armor/DaedalusVisor.cs index f96bd02adc..2cd97823bd 100644 --- a/Items/Armor/DaedalusVisor.cs +++ b/Items/Armor/DaedalusVisor.cs @@ -49,7 +49,7 @@ namespace CalamityMod.Items.Armor "Rogue stealth builds while not attacking and not moving, up to a max of 110\n" + "Rogue stealth only reduces when you attack, it does not reduce while moving\n" + "The higher your rogue stealth the higher your rogue damage, crit, and movement speed"; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.daedalusSplit = true; modPlayer.rogueStealthMax = 1.1f; player.GetCalamityPlayer().throwingDamage += 0.05f; diff --git a/Items/Armor/DemonshadeBreastplate.cs b/Items/Armor/DemonshadeBreastplate.cs index cdaaf14ea7..2595fe24ef 100644 --- a/Items/Armor/DemonshadeBreastplate.cs +++ b/Items/Armor/DemonshadeBreastplate.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Armor public override void UpdateEquip(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.shadeRegen = true; player.thorns = 100f; player.statLifeMax2 += 200; diff --git a/Items/Armor/DemonshadeGreaves.cs b/Items/Armor/DemonshadeGreaves.cs index 46da54db17..3293d42dea 100644 --- a/Items/Armor/DemonshadeGreaves.cs +++ b/Items/Armor/DemonshadeGreaves.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Armor public override void UpdateEquip(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.shadowSpeed = true; player.moveSpeed += 1f; } diff --git a/Items/Armor/DemonshadeHelm.cs b/Items/Armor/DemonshadeHelm.cs index c42c55d9f5..b5920e292b 100644 --- a/Items/Armor/DemonshadeHelm.cs +++ b/Items/Armor/DemonshadeHelm.cs @@ -41,7 +41,7 @@ namespace CalamityMod.Items.Armor "A friendly red devil follows you around\n" + "Press Y to enrage nearby enemies with a dark magic spell for 10 seconds\n" + "This makes them do 25% more damage but they also take 125% more damage"; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.dsSetBonus = true; if (player.whoAmI == Main.myPlayer && !modPlayer.chibii) { diff --git a/Items/Armor/GodSlayerChestplate.cs b/Items/Armor/GodSlayerChestplate.cs index 5ce1b8708c..0c6cfe5c28 100644 --- a/Items/Armor/GodSlayerChestplate.cs +++ b/Items/Armor/GodSlayerChestplate.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Armor public override void UpdateEquip(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.godSlayerReflect = true; player.thorns += 0.5f; player.statLifeMax2 += 60; diff --git a/Items/Armor/GodSlayerHelm.cs b/Items/Armor/GodSlayerHelm.cs index 1cfb8769c5..2f22fafacd 100644 --- a/Items/Armor/GodSlayerHelm.cs +++ b/Items/Armor/GodSlayerHelm.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.godSlayer = true; modPlayer.godSlayerDamage = true; player.setBonus = "You will survive fatal damage and will be healed 150 HP if an attack would have killed you\n" + diff --git a/Items/Armor/GodSlayerHelmet.cs b/Items/Armor/GodSlayerHelmet.cs index 31d524467e..92f6d696c3 100644 --- a/Items/Armor/GodSlayerHelmet.cs +++ b/Items/Armor/GodSlayerHelmet.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.godSlayer = true; modPlayer.godSlayerRanged = true; player.setBonus = "You will survive fatal damage and will be healed 150 HP if an attack would have killed you\n" + diff --git a/Items/Armor/GodSlayerHornedHelm.cs b/Items/Armor/GodSlayerHornedHelm.cs index b9b082f669..d4f17053c9 100644 --- a/Items/Armor/GodSlayerHornedHelm.cs +++ b/Items/Armor/GodSlayerHornedHelm.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.godSlayer = true; modPlayer.godSlayerSummon = true; if (player.whoAmI == Main.myPlayer) diff --git a/Items/Armor/GodSlayerMask.cs b/Items/Armor/GodSlayerMask.cs index eafd426546..f13355d99e 100644 --- a/Items/Armor/GodSlayerMask.cs +++ b/Items/Armor/GodSlayerMask.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.godSlayer = true; modPlayer.godSlayerThrowing = true; modPlayer.rogueStealthMax = 1.4f; diff --git a/Items/Armor/GodSlayerVisage.cs b/Items/Armor/GodSlayerVisage.cs index 833ed5f6a4..2e0fa69365 100644 --- a/Items/Armor/GodSlayerVisage.cs +++ b/Items/Armor/GodSlayerVisage.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.godSlayer = true; modPlayer.godSlayerMage = true; player.setBonus = "You will survive fatal damage and will be healed 150 HP if an attack would have killed you\n" + diff --git a/Items/Armor/ReaverCap.cs b/Items/Armor/ReaverCap.cs index de3ec7e769..ee387ae294 100644 --- a/Items/Armor/ReaverCap.cs +++ b/Items/Armor/ReaverCap.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.reaverSpore = true; modPlayer.rogueStealthMax = 1.15f; player.setBonus = "5% increased rogue damage\n" + diff --git a/Items/Armor/ReaverHelm.cs b/Items/Armor/ReaverHelm.cs index ff64cf0996..210af09d5b 100644 --- a/Items/Armor/ReaverHelm.cs +++ b/Items/Armor/ReaverHelm.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); player.thorns += 0.33f; modPlayer.reaverBlast = true; player.setBonus = "5% increased melee damage\n" + diff --git a/Items/Armor/ReaverHelmet.cs b/Items/Armor/ReaverHelmet.cs index 8480f5f83d..1ae7ed1b13 100644 --- a/Items/Armor/ReaverHelmet.cs +++ b/Items/Armor/ReaverHelmet.cs @@ -39,7 +39,7 @@ namespace CalamityMod.Items.Armor { player.setBonus = "16% increased minion damage\n" + "Summons a reaver orb that emits spore gas when enemies are near"; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.reaverOrb = true; if (player.whoAmI == Main.myPlayer) { diff --git a/Items/Armor/ReaverMask.cs b/Items/Armor/ReaverMask.cs index 10cbff9e2e..92150e6b24 100644 --- a/Items/Armor/ReaverMask.cs +++ b/Items/Armor/ReaverMask.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.reaverBurst = true; player.setBonus = "5% increased magic damage\n" + "Your magic projectiles emit a burst of spore gas on enemy hits"; diff --git a/Items/Armor/ReaverVisage.cs b/Items/Armor/ReaverVisage.cs index 654e117294..bf0f39658b 100644 --- a/Items/Armor/ReaverVisage.cs +++ b/Items/Armor/ReaverVisage.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.reaverDoubleTap = true; player.setBonus = "5% increased ranged damage\n" + "While using a ranged weapon you have a 10% chance to fire a powerful rocket"; diff --git a/Items/Armor/ShroomiteVisage.cs b/Items/Armor/ShroomiteVisage.cs index 0255ca9276..a4c1fa4b4c 100644 --- a/Items/Armor/ShroomiteVisage.cs +++ b/Items/Armor/ShroomiteVisage.cs @@ -30,14 +30,14 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); player.shroomiteStealth = true; player.setBonus = "Ranged stealth while standing still"; } public override void UpdateEquip(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.flamethrowerBoost = true; } diff --git a/Items/Armor/SilvaHelm.cs b/Items/Armor/SilvaHelm.cs index 7ff7eedf15..1ad7aa811f 100644 --- a/Items/Armor/SilvaHelm.cs +++ b/Items/Armor/SilvaHelm.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.silvaSet = true; modPlayer.silvaMelee = true; player.setBonus = "You are immune to almost all debuffs\n" + diff --git a/Items/Armor/SilvaHelmet.cs b/Items/Armor/SilvaHelmet.cs index 4bee91767c..11cac34370 100644 --- a/Items/Armor/SilvaHelmet.cs +++ b/Items/Armor/SilvaHelmet.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.silvaSet = true; modPlayer.silvaSummon = true; player.setBonus = "75% increased minion damage\n" + diff --git a/Items/Armor/SilvaHornedHelm.cs b/Items/Armor/SilvaHornedHelm.cs index 4671e8151f..890e12b448 100644 --- a/Items/Armor/SilvaHornedHelm.cs +++ b/Items/Armor/SilvaHornedHelm.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.silvaSet = true; modPlayer.silvaRanged = true; player.setBonus = "You are immune to almost all debuffs\n" + diff --git a/Items/Armor/SilvaMask.cs b/Items/Armor/SilvaMask.cs index e8e5748826..a7870b06cf 100644 --- a/Items/Armor/SilvaMask.cs +++ b/Items/Armor/SilvaMask.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.silvaSet = true; modPlayer.silvaThrowing = true; modPlayer.rogueStealthMax = 1.5f; diff --git a/Items/Armor/SilvaMaskedCap.cs b/Items/Armor/SilvaMaskedCap.cs index a3a243ad15..1cc941454e 100644 --- a/Items/Armor/SilvaMaskedCap.cs +++ b/Items/Armor/SilvaMaskedCap.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.silvaSet = true; modPlayer.silvaMage = true; player.setBonus = "You are immune to almost all debuffs\n" + diff --git a/Items/Armor/StatigelCap.cs b/Items/Armor/StatigelCap.cs index e83ce6fcac..9b31f3379a 100644 --- a/Items/Armor/StatigelCap.cs +++ b/Items/Armor/StatigelCap.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Armor { player.setBonus = "When you take over 100 damage in one hit you become immune to damage for an extended period of time\n" + "Grants an extra jump and increased jump height"; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.statigelSet = true; player.doubleJumpSail = true; player.jumpBoost = true; diff --git a/Items/Armor/StatigelHeadgear.cs b/Items/Armor/StatigelHeadgear.cs index dbbdb62116..2b18f9e56b 100644 --- a/Items/Armor/StatigelHeadgear.cs +++ b/Items/Armor/StatigelHeadgear.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Armor { player.setBonus = "When you take over 100 damage in one hit you become immune to damage for an extended period of time\n" + "Grants an extra jump and increased jump height"; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.statigelSet = true; player.doubleJumpSail = true; player.jumpBoost = true; diff --git a/Items/Armor/StatigelHelm.cs b/Items/Armor/StatigelHelm.cs index f7d9ad9b34..d203f701e8 100644 --- a/Items/Armor/StatigelHelm.cs +++ b/Items/Armor/StatigelHelm.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Armor { player.setBonus = "When you take over 100 damage in one hit you become immune to damage for an extended period of time\n" + "Grants an extra jump and increased jump height"; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.statigelSet = true; player.doubleJumpSail = true; player.jumpBoost = true; diff --git a/Items/Armor/StatigelHood.cs b/Items/Armor/StatigelHood.cs index e91fef0f5e..6fe85bd7ce 100644 --- a/Items/Armor/StatigelHood.cs +++ b/Items/Armor/StatigelHood.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Armor "Summons a mini slime god to fight for you, the type depends on what world evil you have\n" + "When you take over 100 damage in one hit you become immune to damage for an extended period of time\n" + "Grants an extra jump and increased jump height"; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.statigelSet = true; modPlayer.slimeGod = true; player.doubleJumpSail = true; diff --git a/Items/Armor/StatigelMask.cs b/Items/Armor/StatigelMask.cs index ecb4680071..7e08d3c31b 100644 --- a/Items/Armor/StatigelMask.cs +++ b/Items/Armor/StatigelMask.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Items.Armor "Rogue stealth builds while not attacking and not moving, up to a max of 105\n" + "Rogue stealth only reduces when you attack, it does not reduce while moving\n" + "The higher your rogue stealth the higher your rogue damage, crit, and movement speed"; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.statigelSet = true; modPlayer.rogueStealthMax = 1.05f; player.doubleJumpSail = true; diff --git a/Items/Armor/TarragonHelm.cs b/Items/Armor/TarragonHelm.cs index f5c8bf5348..dbc535cee4 100644 --- a/Items/Armor/TarragonHelm.cs +++ b/Items/Armor/TarragonHelm.cs @@ -40,7 +40,7 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.tarraSet = true; modPlayer.tarraMelee = true; player.setBonus = "Increased heart pickup range\n" + diff --git a/Items/Armor/TarragonHelmet.cs b/Items/Armor/TarragonHelmet.cs index 994768fdc5..3560eb06c0 100644 --- a/Items/Armor/TarragonHelmet.cs +++ b/Items/Armor/TarragonHelmet.cs @@ -40,7 +40,7 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.tarraSet = true; modPlayer.tarraThrowing = true; modPlayer.rogueStealthMax = 1.3f; diff --git a/Items/Armor/TarragonHornedHelm.cs b/Items/Armor/TarragonHornedHelm.cs index 011e2be5a5..734342ee9f 100644 --- a/Items/Armor/TarragonHornedHelm.cs +++ b/Items/Armor/TarragonHornedHelm.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.tarraSet = true; modPlayer.tarraSummon = true; player.setBonus = "50% increased minion damage\n" + diff --git a/Items/Armor/TarragonMask.cs b/Items/Armor/TarragonMask.cs index 6d926879e8..6fad1f5318 100644 --- a/Items/Armor/TarragonMask.cs +++ b/Items/Armor/TarragonMask.cs @@ -39,7 +39,7 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.tarraSet = true; modPlayer.tarraMage = true; player.setBonus = "Reduces enemy spawn rates\n" + diff --git a/Items/Armor/TarragonVisage.cs b/Items/Armor/TarragonVisage.cs index a8ce5f598d..baad826d3b 100644 --- a/Items/Armor/TarragonVisage.cs +++ b/Items/Armor/TarragonVisage.cs @@ -39,7 +39,7 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.tarraSet = true; modPlayer.tarraRanged = true; player.setBonus = "Reduces enemy spawn rates\n" + diff --git a/Items/Armor/VictideHeadgear.cs b/Items/Armor/VictideHeadgear.cs index d40d46c35f..fad42bfdb2 100644 --- a/Items/Armor/VictideHeadgear.cs +++ b/Items/Armor/VictideHeadgear.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Items.Armor "Rogue stealth builds while not attacking and not moving, up to a max of 100\n" + "Rogue stealth only reduces when you attack, it does not reduce while moving\n" + "The higher your rogue stealth the higher your rogue damage, crit, and movement speed"; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.victideSet = true; modPlayer.rogueStealthMax = 1f; player.ignoreWater = true; diff --git a/Items/Armor/VictideHelm.cs b/Items/Armor/VictideHelm.cs index f58b79bdd7..644cd6461a 100644 --- a/Items/Armor/VictideHelm.cs +++ b/Items/Armor/VictideHelm.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Armor "When using any weapon you have a 10% chance to throw a returning seashell projectile\n" + "This seashell does true damage and does not benefit from any damage class\n" + "Slightly reduces breath loss in the abyss"; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.victideSet = true; player.ignoreWater = true; if (Collision.DrownCollision(player.position, player.width, player.height, player.gravDir)) diff --git a/Items/Armor/VictideHelmet.cs b/Items/Armor/VictideHelmet.cs index 73881d9e1f..422807f722 100644 --- a/Items/Armor/VictideHelmet.cs +++ b/Items/Armor/VictideHelmet.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Armor "When using any weapon you have a 10% chance to throw a returning seashell projectile\n" + "This seashell does true damage and does not benefit from any damage class\n" + "Slightly reduces breath loss in the abyss"; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.victideSet = true; modPlayer.urchin = true; if (player.whoAmI == Main.myPlayer) diff --git a/Items/Armor/VictideMask.cs b/Items/Armor/VictideMask.cs index b970b98845..cb79b40fbe 100644 --- a/Items/Armor/VictideMask.cs +++ b/Items/Armor/VictideMask.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Armor "When using any weapon you have a 10% chance to throw a returning seashell projectile\n" + "This seashell does true damage and does not benefit from any damage class\n" + "Slightly reduces breath loss in the abyss"; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.victideSet = true; player.ignoreWater = true; if (Collision.DrownCollision(player.position, player.width, player.height, player.gravDir)) diff --git a/Items/Armor/VictideVisage.cs b/Items/Armor/VictideVisage.cs index c40046c950..639942f16d 100644 --- a/Items/Armor/VictideVisage.cs +++ b/Items/Armor/VictideVisage.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Armor "When using any weapon you have a 10% chance to throw a returning seashell projectile\n" + "This seashell does true damage and does not benefit from any damage class\n" + "Slightly reduces breath loss in the abyss"; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.victideSet = true; player.ignoreWater = true; if (Collision.DrownCollision(player.position, player.width, player.height, player.gravDir)) diff --git a/Items/Armor/XerocMask.cs b/Items/Armor/XerocMask.cs index 31dabc364b..60e59f1273 100644 --- a/Items/Armor/XerocMask.cs +++ b/Items/Armor/XerocMask.cs @@ -39,7 +39,7 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.xerocSet = true; modPlayer.rogueStealthMax = 1.25f; player.setBonus = "9% increased rogue damage and velocity\n" + diff --git a/Items/BrimstoneWaifu/CharredIdol.cs b/Items/BrimstoneWaifu/CharredIdol.cs index 48ed903af8..fa392ec7df 100644 --- a/Items/BrimstoneWaifu/CharredIdol.cs +++ b/Items/BrimstoneWaifu/CharredIdol.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.BrimstoneWaifu public override bool CanUseItem(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); return modPlayer.ZoneCalamity && !NPC.AnyNPCs(mod.NPCType("BrimstoneElemental")); } diff --git a/Items/BrimstoneWaifu/RoseStone.cs b/Items/BrimstoneWaifu/RoseStone.cs index ad5c901f6a..d0b8d32a50 100644 --- a/Items/BrimstoneWaifu/RoseStone.cs +++ b/Items/BrimstoneWaifu/RoseStone.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.BrimstoneWaifu public override bool CanEquipAccessory(Player player, int slot) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (modPlayer.elementalHeart) { return false; @@ -39,7 +39,7 @@ namespace CalamityMod.Items.BrimstoneWaifu player.lifeRegen += 1; player.statLifeMax2 += 20; player.allDamage += 0.03f; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.brimstoneWaifu = true; if (player.whoAmI == Main.myPlayer) { diff --git a/Items/Calamitas/CalamityRing.cs b/Items/Calamitas/CalamityRing.cs index a163bd1a6a..6801e5b120 100644 --- a/Items/Calamitas/CalamityRing.cs +++ b/Items/Calamitas/CalamityRing.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Calamitas public override bool CanEquipAccessory(Player player, int slot) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (modPlayer.calamityRing) { return false; @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Calamitas public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.calamityRing = true; player.allDamage += 0.15f; player.endurance -= 0.3f; diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index c4fbc88813..63dad0e7d2 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -120,7 +120,7 @@ namespace CalamityMod.Items speedX *= player.GetCalamityPlayer().throwingVelocity; speedY *= player.GetCalamityPlayer().throwingVelocity; } - if (player.GetModPlayer(mod).luxorsGift) + if (player.GetCalamityPlayer().luxorsGift) { // useTime 9 = 0.9 useTime 2 = 0.2 double damageMult = 1.0; @@ -147,36 +147,36 @@ namespace CalamityMod.Items Projectile.NewProjectile(position.X, position.Y, 0f, 0f, mod.ProjectileType("LuxorsGiftSummon"), damage, 0f, player.whoAmI, 0f, 0f); } } - if (player.GetModPlayer(mod).eArtifact && item.ranged && !rogue) + if (player.GetCalamityPlayer().eArtifact && item.ranged && !rogue) { speedX *= 1.25f; speedY *= 1.25f; } - if (player.GetModPlayer(mod).bloodflareMage) //0 - 99 + if (player.GetCalamityPlayer().bloodflareMage) //0 - 99 { if (item.magic && Main.rand.Next(0, 100) >= 95) { if (player.whoAmI == Main.myPlayer) { - Projectile.NewProjectile(position.X, position.Y, speedX, speedY, mod.ProjectileType("GhostlyBolt"), (int)((double)damage * (player.GetModPlayer(mod).auricSet ? 4.2 : 2.6)), 1f, player.whoAmI, 0f, 0f); + Projectile.NewProjectile(position.X, position.Y, speedX, speedY, mod.ProjectileType("GhostlyBolt"), (int)((double)damage * (player.GetCalamityPlayer().auricSet ? 4.2 : 2.6)), 1f, player.whoAmI, 0f, 0f); } } } - if (player.GetModPlayer(mod).bloodflareRanged) //0 - 99 + if (player.GetCalamityPlayer().bloodflareRanged) //0 - 99 { if (item.ranged && !rogue && Main.rand.Next(0, 100) >= 98) { if (player.whoAmI == Main.myPlayer) { - Projectile.NewProjectile(position.X, position.Y, speedX, speedY, mod.ProjectileType("BloodBomb"), (int)((double)damage * (player.GetModPlayer(mod).auricSet ? 2.2 : 1.6)), 2f, player.whoAmI, 0f, 0f); + Projectile.NewProjectile(position.X, position.Y, speedX, speedY, mod.ProjectileType("BloodBomb"), (int)((double)damage * (player.GetCalamityPlayer().auricSet ? 2.2 : 1.6)), 2f, player.whoAmI, 0f, 0f); } } } - if (player.GetModPlayer(mod).tarraMage) + if (player.GetCalamityPlayer().tarraMage) { - if (player.GetModPlayer(mod).tarraCrits >= 5 && player.whoAmI == Main.myPlayer) + if (player.GetCalamityPlayer().tarraCrits >= 5 && player.whoAmI == Main.myPlayer) { - player.GetModPlayer(mod).tarraCrits = 0; + player.GetCalamityPlayer().tarraCrits = 0; int num106 = 9 + Main.rand.Next(3); for (int num107 = 0; num107 < num106; num107++) { @@ -191,7 +191,7 @@ namespace CalamityMod.Items } } } - if (player.GetModPlayer(mod).ataxiaBolt) + if (player.GetCalamityPlayer().ataxiaBolt) { if (item.ranged && !rogue && Main.rand.NextBool(2)) { @@ -201,17 +201,17 @@ namespace CalamityMod.Items } } } - if (player.GetModPlayer(mod).godSlayerRanged) //0 - 99 + if (player.GetCalamityPlayer().godSlayerRanged) //0 - 99 { if (item.ranged && !rogue && Main.rand.Next(0, 100) >= 95) { if (player.whoAmI == Main.myPlayer) { - Projectile.NewProjectile(position.X, position.Y, speedX * 1.25f, speedY * 1.25f, mod.ProjectileType("GodSlayerShrapnelRound"), (int)((double)damage * (player.GetModPlayer(mod).auricSet ? 3.2 : 2.1)), 2f, player.whoAmI, 0f, 0f); + Projectile.NewProjectile(position.X, position.Y, speedX * 1.25f, speedY * 1.25f, mod.ProjectileType("GodSlayerShrapnelRound"), (int)((double)damage * (player.GetCalamityPlayer().auricSet ? 3.2 : 2.1)), 2f, player.whoAmI, 0f, 0f); } } } - if (player.GetModPlayer(mod).ataxiaVolley) + if (player.GetCalamityPlayer().ataxiaVolley) { if (rogue && Main.rand.NextBool(10)) { @@ -233,7 +233,7 @@ namespace CalamityMod.Items } } } - if (player.GetModPlayer(mod).reaverDoubleTap) //0 - 99 + if (player.GetCalamityPlayer().reaverDoubleTap) //0 - 99 { if (item.ranged && !rogue && Main.rand.Next(0, 100) >= 90) { @@ -243,7 +243,7 @@ namespace CalamityMod.Items } } } - if (player.GetModPlayer(mod).victideSet) + if (player.GetCalamityPlayer().victideSet) { if ((item.ranged || item.melee || item.magic || rogue || item.summon) && item.rare < 8 && Main.rand.NextBool(10)) @@ -329,7 +329,7 @@ namespace CalamityMod.Items { if (item.type == ItemID.Heart || item.type == ItemID.CandyApple || item.type == ItemID.CandyCane) { - bool boostedHeart = player.GetModPlayer(mod).photosynthesis; + bool boostedHeart = player.GetCalamityPlayer().photosynthesis; if (NPC.AnyNPCs(mod.NPCType("SupremeCalamitas"))) { player.statLife -= (boostedHeart ? 5 : 10); @@ -354,7 +354,7 @@ namespace CalamityMod.Items #region Use Item Changes public override bool CanUseItem(Item item, Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (item.type == ItemID.MonkStaffT1) { for (int i = 0; i < 1000; ++i) @@ -1609,7 +1609,7 @@ namespace CalamityMod.Items player.pickSpeed -= 0.4f; else if (set == "Gladiator") { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.rogueStealthMax = 1f; player.GetCalamityPlayer().throwingDamage += 0.1f; player.GetCalamityPlayer().throwingVelocity += 0.1f; @@ -1622,7 +1622,7 @@ namespace CalamityMod.Items } else if (set == "Obsidian") { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.rogueStealthMax = 1f; player.GetCalamityPlayer().throwingDamage += 0.05f; player.GetCalamityPlayer().throwingCrit += 5; @@ -1780,7 +1780,7 @@ namespace CalamityMod.Items #region Accessory Changes public override void UpdateAccessory(Item item, Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (item.type == ItemID.JellyfishNecklace || item.type == ItemID.JellyfishDivingGear || item.type == ItemID.ArcticDivingGear) modPlayer.jellyfishNecklace = true; @@ -1825,7 +1825,7 @@ namespace CalamityMod.Items #region WingChanges public override void HorizontalWingSpeeds(Item item, Player player, ref float speed, ref float acceleration) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); float flightSpeedMult = 1f + (modPlayer.soaring ? 0.1f : 0f) + (modPlayer.holyWrath ? 0.05f : 0f) + @@ -1848,7 +1848,7 @@ namespace CalamityMod.Items #region GrabChanges public override void GrabRange(Item item, Player player, ref int grabRange) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); int itemGrabRangeBoost = 0 + (modPlayer.wallOfFleshLore ? 10 : 0) + (modPlayer.planteraLore ? 20 : 0) + diff --git a/Items/Crabulon/FungalClump.cs b/Items/Crabulon/FungalClump.cs index 0613f10bbe..d8472813a2 100644 --- a/Items/Crabulon/FungalClump.cs +++ b/Items/Crabulon/FungalClump.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Crabulon public override bool CanEquipAccessory(Player player, int slot) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (modPlayer.fungalClump) { return false; @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Crabulon public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.fungalClump = true; if (player.whoAmI == Main.myPlayer) { diff --git a/Items/Cryogen/SoulofCryogen.cs b/Items/Cryogen/SoulofCryogen.cs index d0ba74a2dc..3742c19c93 100644 --- a/Items/Cryogen/SoulofCryogen.cs +++ b/Items/Cryogen/SoulofCryogen.cs @@ -56,7 +56,7 @@ namespace CalamityMod.Items.Cryogen public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.cryogenSoul = true; player.pickSpeed -= 0.05f; player.allDamage += 0.05f; diff --git a/Items/HiveMind/RottenBrain.cs b/Items/HiveMind/RottenBrain.cs index 83c3008a2e..3a270cf6d0 100644 --- a/Items/HiveMind/RottenBrain.cs +++ b/Items/HiveMind/RottenBrain.cs @@ -52,7 +52,7 @@ namespace CalamityMod.Items.HiveMind } } } - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.rBrain = true; } } diff --git a/Items/LoreItems/KnowledgeAquaticScourge.cs b/Items/LoreItems/KnowledgeAquaticScourge.cs index c0958c43a3..85906e1e17 100644 --- a/Items/LoreItems/KnowledgeAquaticScourge.cs +++ b/Items/LoreItems/KnowledgeAquaticScourge.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.LoreItems public override void UpdateInventory(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.aquaticScourgeLore = true; } } diff --git a/Items/LoreItems/KnowledgeAstrumAureus.cs b/Items/LoreItems/KnowledgeAstrumAureus.cs index 948a5ce4d9..7d21949886 100644 --- a/Items/LoreItems/KnowledgeAstrumAureus.cs +++ b/Items/LoreItems/KnowledgeAstrumAureus.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.LoreItems public override void UpdateInventory(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.astrumAureusLore = true; } } diff --git a/Items/LoreItems/KnowledgeAstrumDeus.cs b/Items/LoreItems/KnowledgeAstrumDeus.cs index 857bb502ee..d82e9a6976 100644 --- a/Items/LoreItems/KnowledgeAstrumDeus.cs +++ b/Items/LoreItems/KnowledgeAstrumDeus.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.LoreItems public override void UpdateInventory(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.astrumDeusLore = true; } } diff --git a/Items/LoreItems/KnowledgeBrimstoneElemental.cs b/Items/LoreItems/KnowledgeBrimstoneElemental.cs index c222ed60ac..d55faba0c6 100644 --- a/Items/LoreItems/KnowledgeBrimstoneElemental.cs +++ b/Items/LoreItems/KnowledgeBrimstoneElemental.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.LoreItems public override void UpdateInventory(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.brimstoneElementalLore = true; } } diff --git a/Items/LoreItems/KnowledgeCalamitas.cs b/Items/LoreItems/KnowledgeCalamitas.cs index a116586556..c6a56c67e2 100644 --- a/Items/LoreItems/KnowledgeCalamitas.cs +++ b/Items/LoreItems/KnowledgeCalamitas.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.LoreItems public override void UpdateInventory(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.SCalLore = true; } } diff --git a/Items/LoreItems/KnowledgeCalamitasClone.cs b/Items/LoreItems/KnowledgeCalamitasClone.cs index 191cbc2ea1..70cb5322c3 100644 --- a/Items/LoreItems/KnowledgeCalamitasClone.cs +++ b/Items/LoreItems/KnowledgeCalamitasClone.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.LoreItems public override void UpdateInventory(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.calamitasLore = true; } } diff --git a/Items/LoreItems/KnowledgeCryogen.cs b/Items/LoreItems/KnowledgeCryogen.cs index bda7fb1e58..3d257c531b 100644 --- a/Items/LoreItems/KnowledgeCryogen.cs +++ b/Items/LoreItems/KnowledgeCryogen.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.LoreItems public override void UpdateInventory(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.dashMod = 6; player.statDefense -= 10; } diff --git a/Items/LoreItems/KnowledgeDesertScourge.cs b/Items/LoreItems/KnowledgeDesertScourge.cs index 389fd5b114..c2655dcc39 100644 --- a/Items/LoreItems/KnowledgeDesertScourge.cs +++ b/Items/LoreItems/KnowledgeDesertScourge.cs @@ -30,9 +30,9 @@ namespace CalamityMod.Items.LoreItems public override void UpdateInventory(Player player) { - if (player.ZoneDesert || player.GetModPlayer(mod).ZoneSunkenSea) + if (player.ZoneDesert || player.GetCalamityPlayer().ZoneSunkenSea) { - player.GetModPlayer(mod).desertScourgeLore = true; + player.GetCalamityPlayer().desertScourgeLore = true; } } } diff --git a/Items/LoreItems/KnowledgeDestroyer.cs b/Items/LoreItems/KnowledgeDestroyer.cs index a5049ba3a7..19e4ca7a81 100644 --- a/Items/LoreItems/KnowledgeDestroyer.cs +++ b/Items/LoreItems/KnowledgeDestroyer.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.LoreItems public override void UpdateInventory(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.destroyerLore = true; } } diff --git a/Items/LoreItems/KnowledgeDevourerofGods.cs b/Items/LoreItems/KnowledgeDevourerofGods.cs index fa570a4be4..0a5c6f609a 100644 --- a/Items/LoreItems/KnowledgeDevourerofGods.cs +++ b/Items/LoreItems/KnowledgeDevourerofGods.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.LoreItems public override void UpdateInventory(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.DoGLore = true; } } diff --git a/Items/LoreItems/KnowledgeDukeFishron.cs b/Items/LoreItems/KnowledgeDukeFishron.cs index 04cf928c8c..6af46ea5e3 100644 --- a/Items/LoreItems/KnowledgeDukeFishron.cs +++ b/Items/LoreItems/KnowledgeDukeFishron.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.LoreItems { if (Collision.DrownCollision(player.position, player.width, player.height, player.gravDir)) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.dukeFishronLore = true; } } diff --git a/Items/LoreItems/KnowledgeEaterofWorlds.cs b/Items/LoreItems/KnowledgeEaterofWorlds.cs index ce6a1a6a62..7b41dbf629 100644 --- a/Items/LoreItems/KnowledgeEaterofWorlds.cs +++ b/Items/LoreItems/KnowledgeEaterofWorlds.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.LoreItems public override void UpdateInventory(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.eaterOfWorldsLore = true; } } diff --git a/Items/LoreItems/KnowledgeGolem.cs b/Items/LoreItems/KnowledgeGolem.cs index 4f31bbcb67..d8de70cadc 100644 --- a/Items/LoreItems/KnowledgeGolem.cs +++ b/Items/LoreItems/KnowledgeGolem.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.LoreItems public override void UpdateInventory(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.golemLore = true; } } diff --git a/Items/LoreItems/KnowledgeHiveMind.cs b/Items/LoreItems/KnowledgeHiveMind.cs index 969e9bc987..e01703d5b5 100644 --- a/Items/LoreItems/KnowledgeHiveMind.cs +++ b/Items/LoreItems/KnowledgeHiveMind.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.LoreItems { if (player.ZoneCorrupt) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.hiveMindLore = true; } } diff --git a/Items/LoreItems/KnowledgeLeviathanandSiren.cs b/Items/LoreItems/KnowledgeLeviathanandSiren.cs index 70929c6997..c3b64bf937 100644 --- a/Items/LoreItems/KnowledgeLeviathanandSiren.cs +++ b/Items/LoreItems/KnowledgeLeviathanandSiren.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.LoreItems public override void UpdateInventory(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.leviathanAndSirenLore = true; } } diff --git a/Items/LoreItems/KnowledgeLunaticCultist.cs b/Items/LoreItems/KnowledgeLunaticCultist.cs index 0acd7e9c95..3e3912169a 100644 --- a/Items/LoreItems/KnowledgeLunaticCultist.cs +++ b/Items/LoreItems/KnowledgeLunaticCultist.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.LoreItems { if (NPC.LunarApocalypseIsUp) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.lunaticCultistLore = true; } } diff --git a/Items/LoreItems/KnowledgeMoonLord.cs b/Items/LoreItems/KnowledgeMoonLord.cs index 80a13eba31..af3d190608 100644 --- a/Items/LoreItems/KnowledgeMoonLord.cs +++ b/Items/LoreItems/KnowledgeMoonLord.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.LoreItems public override void UpdateInventory(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.moonLordLore = true; } } diff --git a/Items/LoreItems/KnowledgePerforators.cs b/Items/LoreItems/KnowledgePerforators.cs index 7c0034f8e9..0a8599cb9c 100644 --- a/Items/LoreItems/KnowledgePerforators.cs +++ b/Items/LoreItems/KnowledgePerforators.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.LoreItems { if (player.ZoneCrimson) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.perforatorLore = true; } } diff --git a/Items/LoreItems/KnowledgePlaguebringerGoliath.cs b/Items/LoreItems/KnowledgePlaguebringerGoliath.cs index 930b7d8ff1..38a35a42bf 100644 --- a/Items/LoreItems/KnowledgePlaguebringerGoliath.cs +++ b/Items/LoreItems/KnowledgePlaguebringerGoliath.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.LoreItems public override void UpdateInventory(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.plaguebringerGoliathLore = true; } } diff --git a/Items/LoreItems/KnowledgePlantera.cs b/Items/LoreItems/KnowledgePlantera.cs index 9fc4b029ed..8c64d25ff3 100644 --- a/Items/LoreItems/KnowledgePlantera.cs +++ b/Items/LoreItems/KnowledgePlantera.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.LoreItems public override void UpdateInventory(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.planteraLore = true; } } diff --git a/Items/LoreItems/KnowledgePolterghast.cs b/Items/LoreItems/KnowledgePolterghast.cs index 5f4ed1e677..eb2c33cdb3 100644 --- a/Items/LoreItems/KnowledgePolterghast.cs +++ b/Items/LoreItems/KnowledgePolterghast.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.LoreItems public override void UpdateInventory(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.polterghastLore = true; } } diff --git a/Items/LoreItems/KnowledgeProvidence.cs b/Items/LoreItems/KnowledgeProvidence.cs index 4de1281fca..68713ca699 100644 --- a/Items/LoreItems/KnowledgeProvidence.cs +++ b/Items/LoreItems/KnowledgeProvidence.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.LoreItems public override void UpdateInventory(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.providenceLore = true; } } diff --git a/Items/LoreItems/KnowledgeQueenBee.cs b/Items/LoreItems/KnowledgeQueenBee.cs index ee920a7f12..1dcf9584db 100644 --- a/Items/LoreItems/KnowledgeQueenBee.cs +++ b/Items/LoreItems/KnowledgeQueenBee.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.LoreItems public override void UpdateInventory(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.queenBeeLore = true; } } diff --git a/Items/LoreItems/KnowledgeRavager.cs b/Items/LoreItems/KnowledgeRavager.cs index 8249c323ae..8089e3bbf4 100644 --- a/Items/LoreItems/KnowledgeRavager.cs +++ b/Items/LoreItems/KnowledgeRavager.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.LoreItems public override void UpdateInventory(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.ravagerLore = true; } } diff --git a/Items/LoreItems/KnowledgeSkeletron.cs b/Items/LoreItems/KnowledgeSkeletron.cs index d2b03c86bd..f7ec26eec7 100644 --- a/Items/LoreItems/KnowledgeSkeletron.cs +++ b/Items/LoreItems/KnowledgeSkeletron.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.LoreItems { if (player.ZoneDungeon) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.skeletronLore = true; } } diff --git a/Items/LoreItems/KnowledgeSkeletronPrime.cs b/Items/LoreItems/KnowledgeSkeletronPrime.cs index b0cc727538..5447cedaf4 100644 --- a/Items/LoreItems/KnowledgeSkeletronPrime.cs +++ b/Items/LoreItems/KnowledgeSkeletronPrime.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.LoreItems public override void UpdateInventory(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.skeletronPrimeLore = true; } } diff --git a/Items/LoreItems/KnowledgeWallofFlesh.cs b/Items/LoreItems/KnowledgeWallofFlesh.cs index 6c2516ec6c..6097861555 100644 --- a/Items/LoreItems/KnowledgeWallofFlesh.cs +++ b/Items/LoreItems/KnowledgeWallofFlesh.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.LoreItems public override void UpdateInventory(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.wallOfFleshLore = true; } } diff --git a/Items/LoreItems/KnowledgeYharon.cs b/Items/LoreItems/KnowledgeYharon.cs index 88305948cd..0fcc5e959a 100644 --- a/Items/LoreItems/KnowledgeYharon.cs +++ b/Items/LoreItems/KnowledgeYharon.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.LoreItems public override void UpdateInventory(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.yharonLore = true; } } diff --git a/Items/Mounts/Fab.cs b/Items/Mounts/Fab.cs index becba3d090..8f282b2dd3 100644 --- a/Items/Mounts/Fab.cs +++ b/Items/Mounts/Fab.cs @@ -71,7 +71,7 @@ namespace CalamityMod.Items.Mounts public override void UpdateEffects(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (modPlayer.fabsolVodka) { player.allDamage += 0.1f; diff --git a/Items/Mounts/OnyxExcavator.cs b/Items/Mounts/OnyxExcavator.cs index 16fee988ce..d07e228966 100644 --- a/Items/Mounts/OnyxExcavator.cs +++ b/Items/Mounts/OnyxExcavator.cs @@ -143,7 +143,7 @@ namespace CalamityMod.Items.Mounts tile.type != TileID.GreenDungeonBrick && tile.type != TileID.PinkDungeonBrick && tile.type != TileID.DemonAltar && (tile.type != (ushort)mod.TileType("AstralOre") || CalamityWorld.downedStarGod) && ((tile.type != (ushort)mod.TileType("Tenebris") && tile.type != (ushort)mod.TileType("PlantyMush")) || NPC.downedPlantBoss || CalamityWorld.downedCalamitas) && - (!player.GetModPlayer(mod).ZoneSunkenSea || CalamityWorld.downedDesertScourge) && + (!player.GetCalamityPlayer().ZoneSunkenSea || CalamityWorld.downedDesertScourge) && (Main.tileValue[tile.type] < tileValueLimit || tile.type == TileID.Heart || tile.type == TileID.LifeFruit) && !player.noBuilding && tile.type != TileID.ElderCrystalStand) { diff --git a/Items/Patreon/NormalityRelocator.cs b/Items/Patreon/NormalityRelocator.cs index 6ce9f55f6a..b51f2d4c67 100644 --- a/Items/Patreon/NormalityRelocator.cs +++ b/Items/Patreon/NormalityRelocator.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Patreon public override void UpdateInventory(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.normalityRelocator = true; } diff --git a/Items/Patreon/ProfanedSoulArtifact.cs b/Items/Patreon/ProfanedSoulArtifact.cs index 3128a2a5a6..04e5b62fb6 100644 --- a/Items/Patreon/ProfanedSoulArtifact.cs +++ b/Items/Patreon/ProfanedSoulArtifact.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Patreon public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.pArtifact = true; } diff --git a/Items/Perforator/BloodyWormTooth.cs b/Items/Perforator/BloodyWormTooth.cs index e0bb3c3012..d5951e5ef0 100644 --- a/Items/Perforator/BloodyWormTooth.cs +++ b/Items/Perforator/BloodyWormTooth.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Perforator public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.bloodyWormTooth = true; } } diff --git a/Items/PermanentBoosters/BloodOrange.cs b/Items/PermanentBoosters/BloodOrange.cs index 1f58b17e01..689ad680b1 100644 --- a/Items/PermanentBoosters/BloodOrange.cs +++ b/Items/PermanentBoosters/BloodOrange.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.PermanentBoosters public override bool CanUseItem(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (modPlayer.bOrange || player.statLifeMax < 500) { return false; @@ -45,7 +45,7 @@ namespace CalamityMod.Items.PermanentBoosters { player.HealEffect(25); } - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.bOrange = true; } return true; diff --git a/Items/PermanentBoosters/CometShard.cs b/Items/PermanentBoosters/CometShard.cs index a642c202c6..61982b51ed 100644 --- a/Items/PermanentBoosters/CometShard.cs +++ b/Items/PermanentBoosters/CometShard.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.PermanentBoosters public override bool CanUseItem(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (modPlayer.cShard) { return false; @@ -44,7 +44,7 @@ namespace CalamityMod.Items.PermanentBoosters { player.ManaEffect(50); } - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.cShard = true; } return true; diff --git a/Items/PermanentBoosters/Dragonfruit.cs b/Items/PermanentBoosters/Dragonfruit.cs index c2cfb48ba2..0c9c400be7 100644 --- a/Items/PermanentBoosters/Dragonfruit.cs +++ b/Items/PermanentBoosters/Dragonfruit.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.PermanentBoosters public override bool CanUseItem(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (modPlayer.dFruit || player.statLifeMax < 500) { return false; @@ -46,7 +46,7 @@ namespace CalamityMod.Items.PermanentBoosters { player.HealEffect(25); } - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.dFruit = true; } return true; diff --git a/Items/PermanentBoosters/Ectoheart.cs b/Items/PermanentBoosters/Ectoheart.cs index 40e1e598af..06d843d8b3 100644 --- a/Items/PermanentBoosters/Ectoheart.cs +++ b/Items/PermanentBoosters/Ectoheart.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.PermanentBoosters public override bool CanUseItem(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (modPlayer.adrenalineBoostThree) { return false; @@ -44,7 +44,7 @@ namespace CalamityMod.Items.PermanentBoosters if (player.itemAnimation > 0 && player.itemTime == 0) { player.itemTime = item.useTime; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.adrenalineBoostThree = true; } return true; diff --git a/Items/PermanentBoosters/Elderberry.cs b/Items/PermanentBoosters/Elderberry.cs index c79de1e859..210205195b 100644 --- a/Items/PermanentBoosters/Elderberry.cs +++ b/Items/PermanentBoosters/Elderberry.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.PermanentBoosters public override bool CanUseItem(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (modPlayer.eBerry || player.statLifeMax < 500) { return false; @@ -45,7 +45,7 @@ namespace CalamityMod.Items.PermanentBoosters { player.HealEffect(25); } - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.eBerry = true; } return true; diff --git a/Items/PermanentBoosters/ElectrolyteGelPack.cs b/Items/PermanentBoosters/ElectrolyteGelPack.cs index ded5f8bf31..5368044faf 100644 --- a/Items/PermanentBoosters/ElectrolyteGelPack.cs +++ b/Items/PermanentBoosters/ElectrolyteGelPack.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.PermanentBoosters public override bool CanUseItem(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (modPlayer.adrenalineBoostOne) { return false; @@ -41,7 +41,7 @@ namespace CalamityMod.Items.PermanentBoosters if (player.itemAnimation > 0 && player.itemTime == 0) { player.itemTime = item.useTime; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.adrenalineBoostOne = true; } return true; diff --git a/Items/PermanentBoosters/EtherealCore.cs b/Items/PermanentBoosters/EtherealCore.cs index 279a5ce23d..c7a439cf24 100644 --- a/Items/PermanentBoosters/EtherealCore.cs +++ b/Items/PermanentBoosters/EtherealCore.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.PermanentBoosters public override bool CanUseItem(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (modPlayer.eCore) { return false; @@ -44,7 +44,7 @@ namespace CalamityMod.Items.PermanentBoosters { player.ManaEffect(50); } - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.eCore = true; } return true; diff --git a/Items/PermanentBoosters/InfernalBlood.cs b/Items/PermanentBoosters/InfernalBlood.cs index 90d9b4af19..278dd55906 100644 --- a/Items/PermanentBoosters/InfernalBlood.cs +++ b/Items/PermanentBoosters/InfernalBlood.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.PermanentBoosters public override bool CanUseItem(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (modPlayer.rageBoostTwo) { return false; @@ -41,7 +41,7 @@ namespace CalamityMod.Items.PermanentBoosters if (player.itemAnimation > 0 && player.itemTime == 0) { player.itemTime = item.useTime; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.rageBoostTwo = true; } return true; diff --git a/Items/PermanentBoosters/MLGRune2.cs b/Items/PermanentBoosters/MLGRune2.cs index 14bafb2e8f..9edbfc0119 100644 --- a/Items/PermanentBoosters/MLGRune2.cs +++ b/Items/PermanentBoosters/MLGRune2.cs @@ -30,7 +30,7 @@ Consuming it does something that cannot be reversed"); public override bool CanUseItem(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (modPlayer.extraAccessoryML) { return false; @@ -40,7 +40,7 @@ Consuming it does something that cannot be reversed"); public override bool UseItem(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (player.itemAnimation > 0 && !modPlayer.extraAccessoryML && player.itemTime == 0) { player.itemTime = item.useTime; diff --git a/Items/PermanentBoosters/MiracleFruit.cs b/Items/PermanentBoosters/MiracleFruit.cs index eb6c269347..9821fb012f 100644 --- a/Items/PermanentBoosters/MiracleFruit.cs +++ b/Items/PermanentBoosters/MiracleFruit.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.PermanentBoosters public override bool CanUseItem(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (modPlayer.mFruit || player.statLifeMax < 500) { return false; @@ -45,7 +45,7 @@ namespace CalamityMod.Items.PermanentBoosters { player.HealEffect(25); } - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.mFruit = true; } return true; diff --git a/Items/PermanentBoosters/MushroomPlasmaRoot.cs b/Items/PermanentBoosters/MushroomPlasmaRoot.cs index 71c9521ecf..5389ef182b 100644 --- a/Items/PermanentBoosters/MushroomPlasmaRoot.cs +++ b/Items/PermanentBoosters/MushroomPlasmaRoot.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.PermanentBoosters public override bool CanUseItem(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (modPlayer.rageBoostOne) { return false; @@ -41,7 +41,7 @@ namespace CalamityMod.Items.PermanentBoosters if (player.itemAnimation > 0 && player.itemTime == 0) { player.itemTime = item.useTime; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.rageBoostOne = true; } return true; diff --git a/Items/PermanentBoosters/PhantomHeart.cs b/Items/PermanentBoosters/PhantomHeart.cs index 1341cb987f..8e665e926e 100644 --- a/Items/PermanentBoosters/PhantomHeart.cs +++ b/Items/PermanentBoosters/PhantomHeart.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.PermanentBoosters public override bool CanUseItem(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (modPlayer.pHeart) { return false; @@ -45,7 +45,7 @@ namespace CalamityMod.Items.PermanentBoosters { player.ManaEffect(50); } - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.pHeart = true; } return true; diff --git a/Items/PermanentBoosters/RedLightningContainer.cs b/Items/PermanentBoosters/RedLightningContainer.cs index 9fc4faeabb..46aef20f1a 100644 --- a/Items/PermanentBoosters/RedLightningContainer.cs +++ b/Items/PermanentBoosters/RedLightningContainer.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.PermanentBoosters public override bool CanUseItem(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (modPlayer.rageBoostThree) { return false; @@ -44,7 +44,7 @@ namespace CalamityMod.Items.PermanentBoosters if (player.itemAnimation > 0 && player.itemTime == 0) { player.itemTime = item.useTime; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.rageBoostThree = true; } return true; diff --git a/Items/PermanentBoosters/StarlightFuelCell.cs b/Items/PermanentBoosters/StarlightFuelCell.cs index 32bf1ed738..5698819a5d 100644 --- a/Items/PermanentBoosters/StarlightFuelCell.cs +++ b/Items/PermanentBoosters/StarlightFuelCell.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.PermanentBoosters public override bool CanUseItem(Player player) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (modPlayer.adrenalineBoostTwo) { return false; @@ -41,7 +41,7 @@ namespace CalamityMod.Items.PermanentBoosters if (player.itemAnimation > 0 && player.itemTime == 0) { player.itemTime = item.useTime; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.adrenalineBoostTwo = true; } return true; diff --git a/Items/Polterghast/Affliction.cs b/Items/Polterghast/Affliction.cs index 6d666eaa07..74a28d012f 100644 --- a/Items/Polterghast/Affliction.cs +++ b/Items/Polterghast/Affliction.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Polterghast public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.affliction = true; if (player.whoAmI != Main.myPlayer && player.miscCounter % 10 == 0) { diff --git a/Items/Potions/DraconicElixir.cs b/Items/Potions/DraconicElixir.cs index 017686a378..cfc60d5e40 100644 --- a/Items/Potions/DraconicElixir.cs +++ b/Items/Potions/DraconicElixir.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Potions public override bool CanUseItem(Player player) { - return player.GetModPlayer(mod).draconicSurgeCooldown == 0; + return player.GetCalamityPlayer().draconicSurgeCooldown == 0; } public override void AddRecipes() diff --git a/Items/Potions/RevivifyPotion.cs b/Items/Potions/RevivifyPotion.cs index a75a598db2..3b33ccc12b 100644 --- a/Items/Potions/RevivifyPotion.cs +++ b/Items/Potions/RevivifyPotion.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Potions if (player.itemAnimation > 0 && player.itemTime == 0) { player.itemTime = item.useTime; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.revivifyTimer = 900; } return true; diff --git a/Items/Providence/ElysianAegis.cs b/Items/Providence/ElysianAegis.cs index ebd28d5948..87821bf75c 100644 --- a/Items/Providence/ElysianAegis.cs +++ b/Items/Providence/ElysianAegis.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Providence public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (!hideVisual) { modPlayer.dashMod = 3; } modPlayer.elysianAegis = true; player.noKnockback = true; diff --git a/Items/Providence/ElysianWings.cs b/Items/Providence/ElysianWings.cs index 43c4815601..06758ea52a 100644 --- a/Items/Providence/ElysianWings.cs +++ b/Items/Providence/ElysianWings.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Providence public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); player.moveSpeed += 0.4f; player.lavaMax += 240; player.wingTimeMax = 180; diff --git a/Items/Scavenger/BloodPact.cs b/Items/Scavenger/BloodPact.cs index 3b6fca2063..52bcda2ad0 100644 --- a/Items/Scavenger/BloodPact.cs +++ b/Items/Scavenger/BloodPact.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Scavenger public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.bloodPact = true; } } diff --git a/Items/Scavenger/FleshTotem.cs b/Items/Scavenger/FleshTotem.cs index f3f96b86f8..cf6b65b703 100644 --- a/Items/Scavenger/FleshTotem.cs +++ b/Items/Scavenger/FleshTotem.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Scavenger public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.fleshTotem = true; } } diff --git a/Items/ShrineItems/FungalSymbiote.cs b/Items/ShrineItems/FungalSymbiote.cs index b0f57dcd56..2a3ad12df4 100644 --- a/Items/ShrineItems/FungalSymbiote.cs +++ b/Items/ShrineItems/FungalSymbiote.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.ShrineItems public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.fungalSymbiote = true; } } diff --git a/Items/ShrineItems/GladiatorsLocket.cs b/Items/ShrineItems/GladiatorsLocket.cs index 07668dc874..4267ee87c7 100644 --- a/Items/ShrineItems/GladiatorsLocket.cs +++ b/Items/ShrineItems/GladiatorsLocket.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.ShrineItems public override bool CanEquipAccessory(Player player, int slot) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); //there might be an upgrade sometime later? + CalamityPlayer modPlayer = player.GetCalamityPlayer(); //there might be an upgrade sometime later? if (modPlayer.gladiatorSword) { return false; @@ -34,7 +34,7 @@ namespace CalamityMod.Items.ShrineItems public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.gladiatorSword = true; if (player.whoAmI == Main.myPlayer) { diff --git a/Items/ShrineItems/LuxorsGift.cs b/Items/ShrineItems/LuxorsGift.cs index 33318bb4a5..d9f74251a1 100644 --- a/Items/ShrineItems/LuxorsGift.cs +++ b/Items/ShrineItems/LuxorsGift.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.ShrineItems public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.luxorsGift = true; } } diff --git a/Items/ShrineItems/TrinketofChi.cs b/Items/ShrineItems/TrinketofChi.cs index bb1bd1116b..a1bae1345e 100644 --- a/Items/ShrineItems/TrinketofChi.cs +++ b/Items/ShrineItems/TrinketofChi.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.ShrineItems public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.trinketOfChi = true; } } diff --git a/Items/ShrineItems/UnstablePrism.cs b/Items/ShrineItems/UnstablePrism.cs index db030300f7..6f922f23d2 100644 --- a/Items/ShrineItems/UnstablePrism.cs +++ b/Items/ShrineItems/UnstablePrism.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.ShrineItems public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.unstablePrism = true; } } diff --git a/Items/SlimeGod/ManaOverloader.cs b/Items/SlimeGod/ManaOverloader.cs index 7119194bb0..78315a659f 100644 --- a/Items/SlimeGod/ManaOverloader.cs +++ b/Items/SlimeGod/ManaOverloader.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.SlimeGod public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.manaOverloader = true; player.statManaMax2 += 50; } diff --git a/Items/SunkenSea/GiantPearl.cs b/Items/SunkenSea/GiantPearl.cs index 08bc8fdf7f..00737cf460 100644 --- a/Items/SunkenSea/GiantPearl.cs +++ b/Items/SunkenSea/GiantPearl.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.SunkenSea public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.giantPearl = true; Lighting.AddLight((int)(player.position.X + (float)(player.width / 2)) / 16, (int)(player.position.Y + (float)(player.height / 2)) / 16, 0.45f, 0.8f, 0.8f); } diff --git a/Items/TheDevourerofGods/DevourerofGodsBag.cs b/Items/TheDevourerofGods/DevourerofGodsBag.cs index 2d55ce45b3..6103503423 100644 --- a/Items/TheDevourerofGods/DevourerofGodsBag.cs +++ b/Items/TheDevourerofGods/DevourerofGodsBag.cs @@ -62,7 +62,7 @@ namespace CalamityMod.Items.TheDevourerofGods // Equipment DropHelper.DropItem(player, mod.ItemType("NebulousCore")); - bool vodka = player.GetModPlayer(mod).fabsolVodka; + bool vodka = player.GetCalamityPlayer().fabsolVodka; DropHelper.DropItemCondition(player, mod.ItemType("Fabsol"), CalamityWorld.revenge && vodka); // Vanity diff --git a/Items/TheDevourerofGods/NebulousCore.cs b/Items/TheDevourerofGods/NebulousCore.cs index 0a1861734f..78f970293c 100644 --- a/Items/TheDevourerofGods/NebulousCore.cs +++ b/Items/TheDevourerofGods/NebulousCore.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.TheDevourerofGods public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.nCore = true; player.allDamage += 0.12f; int damage = 1500; diff --git a/Items/Weapons/CosmicImmaterializer.cs b/Items/Weapons/CosmicImmaterializer.cs index dec53e188d..b88fb7fa4b 100644 --- a/Items/Weapons/CosmicImmaterializer.cs +++ b/Items/Weapons/CosmicImmaterializer.cs @@ -55,7 +55,7 @@ namespace CalamityMod.Items.Weapons public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); bool hasSummonerSet = modPlayer.tarraSummon || modPlayer.bloodflareSummon || modPlayer.godSlayerSummon || modPlayer.silvaSummon; player.itemTime = item.useTime; Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); diff --git a/Items/Weapons/Leviathan/LureofEnthrallment.cs b/Items/Weapons/Leviathan/LureofEnthrallment.cs index e9fdd5d13e..23491f5f57 100644 --- a/Items/Weapons/Leviathan/LureofEnthrallment.cs +++ b/Items/Weapons/Leviathan/LureofEnthrallment.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Weapons.Leviathan public override bool CanEquipAccessory(Player player, int slot) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (modPlayer.elementalHeart) { return false; @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Weapons.Leviathan public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); modPlayer.sirenWaifu = true; if (player.whoAmI == Main.myPlayer) { diff --git a/NPCs/AbyssNPCs/AquaticScourgeHead.cs b/NPCs/AbyssNPCs/AquaticScourgeHead.cs index ed17999e2f..25c72a073d 100644 --- a/NPCs/AbyssNPCs/AquaticScourgeHead.cs +++ b/NPCs/AbyssNPCs/AquaticScourgeHead.cs @@ -535,7 +535,7 @@ namespace CalamityMod.NPCs.AbyssNPCs { return 0f; } - if (spawnInfo.player.GetModPlayer(mod).ZoneSulphur && spawnInfo.water) + if (spawnInfo.player.GetCalamityPlayer().ZoneSulphur && spawnInfo.water) { if (!NPC.AnyNPCs(mod.NPCType("AquaticScourgeHead"))) return 0.01f; diff --git a/NPCs/AbyssNPCs/AquaticSeekerHead.cs b/NPCs/AbyssNPCs/AquaticSeekerHead.cs index 076204779c..f23d217479 100644 --- a/NPCs/AbyssNPCs/AquaticSeekerHead.cs +++ b/NPCs/AbyssNPCs/AquaticSeekerHead.cs @@ -316,7 +316,7 @@ namespace CalamityMod.NPCs.AbyssNPCs { return 0f; } - if (spawnInfo.player.GetModPlayer(mod).ZoneSulphur && spawnInfo.water) + if (spawnInfo.player.GetCalamityPlayer().ZoneSulphur && spawnInfo.water) { if (!NPC.AnyNPCs(mod.NPCType("AquaticSeekerHead"))) return 0.01f; diff --git a/NPCs/AbyssNPCs/AquaticUrchin.cs b/NPCs/AbyssNPCs/AquaticUrchin.cs index 3f3d77cd6c..85e436ee30 100644 --- a/NPCs/AbyssNPCs/AquaticUrchin.cs +++ b/NPCs/AbyssNPCs/AquaticUrchin.cs @@ -329,7 +329,7 @@ namespace CalamityMod.NPCs.AbyssNPCs { return 0f; } - if (spawnInfo.player.GetModPlayer(mod).ZoneSulphur && spawnInfo.water && NPC.CountNPCS(mod.NPCType("AquaticUrchin")) < 2) + if (spawnInfo.player.GetCalamityPlayer().ZoneSulphur && spawnInfo.water && NPC.CountNPCS(mod.NPCType("AquaticUrchin")) < 2) { return 0.2f; } diff --git a/NPCs/AbyssNPCs/Bloatfish.cs b/NPCs/AbyssNPCs/Bloatfish.cs index 4bc2e02451..6d2550e181 100644 --- a/NPCs/AbyssNPCs/Bloatfish.cs +++ b/NPCs/AbyssNPCs/Bloatfish.cs @@ -177,7 +177,7 @@ namespace CalamityMod.NPCs.AbyssNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.player.GetModPlayer(mod).ZoneAbyssLayer4 && spawnInfo.water && NPC.CountNPCS(mod.NPCType("Bloatfish")) < 3) + if (spawnInfo.player.GetCalamityPlayer().ZoneAbyssLayer4 && spawnInfo.water && NPC.CountNPCS(mod.NPCType("Bloatfish")) < 3) { return SpawnCondition.CaveJellyfish.Chance * 0.3f; } diff --git a/NPCs/AbyssNPCs/BobbitWormHead.cs b/NPCs/AbyssNPCs/BobbitWormHead.cs index 3b29d3d6ad..1a674081b3 100644 --- a/NPCs/AbyssNPCs/BobbitWormHead.cs +++ b/NPCs/AbyssNPCs/BobbitWormHead.cs @@ -62,8 +62,8 @@ namespace CalamityMod.NPCs.AbyssNPCs if (npc.ai[1] >= 60f) { npc.TargetClosest(true); - if (npc.Center.Y + ((Main.player[npc.target].GetModPlayer(mod).anechoicPlating || - Main.player[npc.target].GetModPlayer(mod).anechoicCoating) ? 50f : 100f) > Main.player[npc.target].Center.Y && + if (npc.Center.Y + ((Main.player[npc.target].GetCalamityPlayer().anechoicPlating || + Main.player[npc.target].GetCalamityPlayer().anechoicCoating) ? 50f : 100f) > Main.player[npc.target].Center.Y && Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height)) { npc.ai[1] = 0f; diff --git a/NPCs/AbyssNPCs/BobbitWormSegment.cs b/NPCs/AbyssNPCs/BobbitWormSegment.cs index 0a0ddc566e..8d09d6949c 100644 --- a/NPCs/AbyssNPCs/BobbitWormSegment.cs +++ b/NPCs/AbyssNPCs/BobbitWormSegment.cs @@ -49,7 +49,7 @@ namespace CalamityMod.NPCs.AbyssNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.player.GetModPlayer(mod).ZoneAbyssLayer4 && spawnInfo.water) + if (spawnInfo.player.GetCalamityPlayer().ZoneAbyssLayer4 && spawnInfo.water) { if (!NPC.AnyNPCs(mod.NPCType("BobbitWormSegment"))) return SpawnCondition.CaveJellyfish.Chance * 0.3f; diff --git a/NPCs/AbyssNPCs/BoxJellyfish.cs b/NPCs/AbyssNPCs/BoxJellyfish.cs index bad480450e..1b19ade192 100644 --- a/NPCs/AbyssNPCs/BoxJellyfish.cs +++ b/NPCs/AbyssNPCs/BoxJellyfish.cs @@ -178,11 +178,11 @@ namespace CalamityMod.NPCs.AbyssNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.playerSafe || spawnInfo.player.GetModPlayer(mod).ZoneSulphur) + if (spawnInfo.playerSafe || spawnInfo.player.GetCalamityPlayer().ZoneSulphur) { return 0f; } - if (spawnInfo.player.GetModPlayer(mod).ZoneAbyssLayer1 && spawnInfo.water) + if (spawnInfo.player.GetCalamityPlayer().ZoneAbyssLayer1 && spawnInfo.water) { return SpawnCondition.CaveJellyfish.Chance * 1.2f; } diff --git a/NPCs/AbyssNPCs/Catfish.cs b/NPCs/AbyssNPCs/Catfish.cs index 58d08c6c8e..662cbfc68b 100644 --- a/NPCs/AbyssNPCs/Catfish.cs +++ b/NPCs/AbyssNPCs/Catfish.cs @@ -243,7 +243,7 @@ namespace CalamityMod.NPCs.AbyssNPCs { return 0f; } - if (spawnInfo.player.GetModPlayer(mod).ZoneSulphur && spawnInfo.water) + if (spawnInfo.player.GetCalamityPlayer().ZoneSulphur && spawnInfo.water) { return 0.2f; } diff --git a/NPCs/AbyssNPCs/ChaoticPuffer.cs b/NPCs/AbyssNPCs/ChaoticPuffer.cs index 5133e72cc8..978b5d00b6 100644 --- a/NPCs/AbyssNPCs/ChaoticPuffer.cs +++ b/NPCs/AbyssNPCs/ChaoticPuffer.cs @@ -202,7 +202,7 @@ namespace CalamityMod.NPCs.AbyssNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.player.GetModPlayer(mod).ZoneAbyssLayer4 && spawnInfo.water) + if (spawnInfo.player.GetCalamityPlayer().ZoneAbyssLayer4 && spawnInfo.water) { return SpawnCondition.CaveJellyfish.Chance * 0.6f; } diff --git a/NPCs/AbyssNPCs/ColossalSquid.cs b/NPCs/AbyssNPCs/ColossalSquid.cs index 010a90c3a5..33fc6f64e5 100644 --- a/NPCs/AbyssNPCs/ColossalSquid.cs +++ b/NPCs/AbyssNPCs/ColossalSquid.cs @@ -321,9 +321,9 @@ namespace CalamityMod.NPCs.AbyssNPCs npc.TargetClosest(false); if ((Main.player[npc.target].wet && !Main.player[npc.target].dead && Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height) && - (Main.player[npc.target].Center - npc.Center).Length() < ((Main.player[npc.target].GetModPlayer(mod).anechoicPlating || - Main.player[npc.target].GetModPlayer(mod).anechoicCoating) ? 150f : 300f) * - (Main.player[npc.target].GetModPlayer(mod).fishAlert ? 3f : 1f)) || + (Main.player[npc.target].Center - npc.Center).Length() < ((Main.player[npc.target].GetCalamityPlayer().anechoicPlating || + Main.player[npc.target].GetCalamityPlayer().anechoicCoating) ? 150f : 300f) * + (Main.player[npc.target].GetCalamityPlayer().fishAlert ? 3f : 1f)) || npc.justHit) { hasBeenHit = true; @@ -532,7 +532,7 @@ namespace CalamityMod.NPCs.AbyssNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.player.GetModPlayer(mod).ZoneAbyssLayer3 && spawnInfo.water && !NPC.AnyNPCs(mod.NPCType("ColossalSquid"))) + if (spawnInfo.player.GetCalamityPlayer().ZoneAbyssLayer3 && spawnInfo.water && !NPC.AnyNPCs(mod.NPCType("ColossalSquid"))) { return SpawnCondition.CaveJellyfish.Chance * 0.6f; } diff --git a/NPCs/AbyssNPCs/Cuttlefish.cs b/NPCs/AbyssNPCs/Cuttlefish.cs index 4277356629..cfd843c593 100644 --- a/NPCs/AbyssNPCs/Cuttlefish.cs +++ b/NPCs/AbyssNPCs/Cuttlefish.cs @@ -299,11 +299,11 @@ namespace CalamityMod.NPCs.AbyssNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.player.GetModPlayer(mod).ZoneAbyssLayer1 && spawnInfo.water) + if (spawnInfo.player.GetCalamityPlayer().ZoneAbyssLayer1 && spawnInfo.water) { return SpawnCondition.CaveJellyfish.Chance * 0.3f; } - if (spawnInfo.player.GetModPlayer(mod).ZoneAbyssLayer2 && spawnInfo.water) + if (spawnInfo.player.GetCalamityPlayer().ZoneAbyssLayer2 && spawnInfo.water) { return SpawnCondition.CaveJellyfish.Chance * 0.6f; } diff --git a/NPCs/AbyssNPCs/DevilFish.cs b/NPCs/AbyssNPCs/DevilFish.cs index ab552a88b2..3e9e72baed 100644 --- a/NPCs/AbyssNPCs/DevilFish.cs +++ b/NPCs/AbyssNPCs/DevilFish.cs @@ -294,11 +294,11 @@ namespace CalamityMod.NPCs.AbyssNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.player.GetModPlayer(mod).ZoneAbyssLayer1 && spawnInfo.water) + if (spawnInfo.player.GetCalamityPlayer().ZoneAbyssLayer1 && spawnInfo.water) { return SpawnCondition.CaveJellyfish.Chance * 0.45f; } - if (spawnInfo.player.GetModPlayer(mod).ZoneAbyssLayer2 && spawnInfo.water) + if (spawnInfo.player.GetCalamityPlayer().ZoneAbyssLayer2 && spawnInfo.water) { return SpawnCondition.CaveJellyfish.Chance * 0.6f; } diff --git a/NPCs/AbyssNPCs/EidolonWyrmHead.cs b/NPCs/AbyssNPCs/EidolonWyrmHead.cs index b8f03eea61..2e67f9747e 100644 --- a/NPCs/AbyssNPCs/EidolonWyrmHead.cs +++ b/NPCs/AbyssNPCs/EidolonWyrmHead.cs @@ -220,7 +220,7 @@ namespace CalamityMod.NPCs.AbyssNPCs { npc.alpha = 0; } - if (Vector2.Distance(Main.player[npc.target].Center, npc.Center) > 6400f || !NPC.AnyNPCs(mod.NPCType("EidolonWyrmTail")) || !Main.player[npc.target].GetModPlayer(mod).ZoneAbyss) + if (Vector2.Distance(Main.player[npc.target].Center, npc.Center) > 6400f || !NPC.AnyNPCs(mod.NPCType("EidolonWyrmTail")) || !Main.player[npc.target].GetCalamityPlayer().ZoneAbyss) { npc.active = false; } @@ -464,12 +464,12 @@ namespace CalamityMod.NPCs.AbyssNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.player.GetModPlayer(mod).ZoneAbyssLayer3 && spawnInfo.water && !NPC.AnyNPCs(mod.NPCType("EidolonWyrmHead")) && + if (spawnInfo.player.GetCalamityPlayer().ZoneAbyssLayer3 && spawnInfo.water && !NPC.AnyNPCs(mod.NPCType("EidolonWyrmHead")) && !NPC.AnyNPCs(mod.NPCType("Reaper")) && !NPC.AnyNPCs(mod.NPCType("ColossalSquid"))) { return SpawnCondition.CaveJellyfish.Chance * 0.3f; } - if (spawnInfo.player.GetModPlayer(mod).ZoneAbyssLayer4 && spawnInfo.water && !NPC.AnyNPCs(mod.NPCType("EidolonWyrmHead"))) + if (spawnInfo.player.GetCalamityPlayer().ZoneAbyssLayer4 && spawnInfo.water && !NPC.AnyNPCs(mod.NPCType("EidolonWyrmHead"))) { return SpawnCondition.CaveJellyfish.Chance * 0.6f; } diff --git a/NPCs/AbyssNPCs/EidolonWyrmHeadHuge.cs b/NPCs/AbyssNPCs/EidolonWyrmHeadHuge.cs index 10d80c28b0..deec893330 100644 --- a/NPCs/AbyssNPCs/EidolonWyrmHeadHuge.cs +++ b/NPCs/AbyssNPCs/EidolonWyrmHeadHuge.cs @@ -465,7 +465,7 @@ namespace CalamityMod.NPCs.AbyssNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.player.GetModPlayer(mod).ZoneAbyssLayer4 && spawnInfo.water && !NPC.AnyNPCs(mod.NPCType("EidolonWyrmHeadHuge")) && CalamityWorld.downedPolterghast) + if (spawnInfo.player.GetCalamityPlayer().ZoneAbyssLayer4 && spawnInfo.water && !NPC.AnyNPCs(mod.NPCType("EidolonWyrmHeadHuge")) && CalamityWorld.downedPolterghast) { return SpawnCondition.CaveJellyfish.Chance * 0.012f; } diff --git a/NPCs/AbyssNPCs/Flounder.cs b/NPCs/AbyssNPCs/Flounder.cs index b058edbaaf..621e498c05 100644 --- a/NPCs/AbyssNPCs/Flounder.cs +++ b/NPCs/AbyssNPCs/Flounder.cs @@ -271,7 +271,7 @@ namespace CalamityMod.NPCs.AbyssNPCs { return 0f; } - if (spawnInfo.player.GetModPlayer(mod).ZoneSulphur && spawnInfo.water) + if (spawnInfo.player.GetCalamityPlayer().ZoneSulphur && spawnInfo.water) { return 0.2f; } diff --git a/NPCs/AbyssNPCs/Frogfish.cs b/NPCs/AbyssNPCs/Frogfish.cs index 8d6f476818..2f09283333 100644 --- a/NPCs/AbyssNPCs/Frogfish.cs +++ b/NPCs/AbyssNPCs/Frogfish.cs @@ -239,7 +239,7 @@ namespace CalamityMod.NPCs.AbyssNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.playerSafe || spawnInfo.player.GetModPlayer(mod).ZoneSulphur) + if (spawnInfo.playerSafe || spawnInfo.player.GetCalamityPlayer().ZoneSulphur) { return 0f; } diff --git a/NPCs/AbyssNPCs/GiantSquid.cs b/NPCs/AbyssNPCs/GiantSquid.cs index 7783cdf233..04725e3fa2 100644 --- a/NPCs/AbyssNPCs/GiantSquid.cs +++ b/NPCs/AbyssNPCs/GiantSquid.cs @@ -97,9 +97,9 @@ namespace CalamityMod.NPCs.AbyssNPCs npc.TargetClosest(false); if ((Main.player[npc.target].wet && !Main.player[npc.target].dead && Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height) && - (Main.player[npc.target].Center - npc.Center).Length() < ((Main.player[npc.target].GetModPlayer(mod).anechoicPlating || - Main.player[npc.target].GetModPlayer(mod).anechoicCoating) ? 300f : 500f) * - (Main.player[npc.target].GetModPlayer(mod).fishAlert ? 3f : 1f)) || + (Main.player[npc.target].Center - npc.Center).Length() < ((Main.player[npc.target].GetCalamityPlayer().anechoicPlating || + Main.player[npc.target].GetCalamityPlayer().anechoicCoating) ? 300f : 500f) * + (Main.player[npc.target].GetCalamityPlayer().fishAlert ? 3f : 1f)) || npc.justHit) { hasBeenHit = true; @@ -224,11 +224,11 @@ namespace CalamityMod.NPCs.AbyssNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.player.GetModPlayer(mod).ZoneAbyssLayer2 && spawnInfo.water) + if (spawnInfo.player.GetCalamityPlayer().ZoneAbyssLayer2 && spawnInfo.water) { return SpawnCondition.CaveJellyfish.Chance * 0.6f; } - if (spawnInfo.player.GetModPlayer(mod).ZoneAbyssLayer3 && spawnInfo.water) + if (spawnInfo.player.GetCalamityPlayer().ZoneAbyssLayer3 && spawnInfo.water) { return SpawnCondition.CaveJellyfish.Chance * 1.2f; } diff --git a/NPCs/AbyssNPCs/Gnasher.cs b/NPCs/AbyssNPCs/Gnasher.cs index dd9b3d7f66..560b288b6a 100644 --- a/NPCs/AbyssNPCs/Gnasher.cs +++ b/NPCs/AbyssNPCs/Gnasher.cs @@ -99,7 +99,7 @@ namespace CalamityMod.NPCs.AbyssNPCs { return 0f; } - if (spawnInfo.player.GetModPlayer(mod).ZoneSulphur) + if (spawnInfo.player.GetCalamityPlayer().ZoneSulphur) { return 0.2f; } diff --git a/NPCs/AbyssNPCs/GulperEelHead.cs b/NPCs/AbyssNPCs/GulperEelHead.cs index 04852d3449..e44445ced3 100644 --- a/NPCs/AbyssNPCs/GulperEelHead.cs +++ b/NPCs/AbyssNPCs/GulperEelHead.cs @@ -63,9 +63,9 @@ namespace CalamityMod.NPCs.AbyssNPCs public override void AI() { - if ((Main.player[npc.target].Center - npc.Center).Length() < ((Main.player[npc.target].GetModPlayer(mod).anechoicPlating || - Main.player[npc.target].GetModPlayer(mod).anechoicCoating) ? 100f : 600f) * - (Main.player[npc.target].GetModPlayer(mod).fishAlert ? 3f : 1f) || + if ((Main.player[npc.target].Center - npc.Center).Length() < ((Main.player[npc.target].GetCalamityPlayer().anechoicPlating || + Main.player[npc.target].GetCalamityPlayer().anechoicCoating) ? 100f : 600f) * + (Main.player[npc.target].GetCalamityPlayer().fishAlert ? 3f : 1f) || npc.justHit) { detectsPlayer = true; @@ -364,11 +364,11 @@ namespace CalamityMod.NPCs.AbyssNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.player.GetModPlayer(mod).ZoneAbyssLayer3 && spawnInfo.water && !NPC.AnyNPCs(mod.NPCType("GulperEelHead"))) + if (spawnInfo.player.GetCalamityPlayer().ZoneAbyssLayer3 && spawnInfo.water && !NPC.AnyNPCs(mod.NPCType("GulperEelHead"))) { return SpawnCondition.CaveJellyfish.Chance * 0.3f; } - if (spawnInfo.player.GetModPlayer(mod).ZoneAbyssLayer4 && spawnInfo.water && !NPC.AnyNPCs(mod.NPCType("GulperEelHead"))) + if (spawnInfo.player.GetCalamityPlayer().ZoneAbyssLayer4 && spawnInfo.water && !NPC.AnyNPCs(mod.NPCType("GulperEelHead"))) { return SpawnCondition.CaveJellyfish.Chance * 0.6f; } diff --git a/NPCs/AbyssNPCs/Laserfish.cs b/NPCs/AbyssNPCs/Laserfish.cs index 0fd6355389..972e7e0de5 100644 --- a/NPCs/AbyssNPCs/Laserfish.cs +++ b/NPCs/AbyssNPCs/Laserfish.cs @@ -70,9 +70,9 @@ namespace CalamityMod.NPCs.AbyssNPCs npc.TargetClosest(false); if (Main.player[npc.target].wet && !Main.player[npc.target].dead && Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height) && - (Main.player[npc.target].Center - npc.Center).Length() < ((Main.player[npc.target].GetModPlayer(mod).anechoicPlating || - Main.player[npc.target].GetModPlayer(mod).anechoicCoating) ? 200f : 400f) * - (Main.player[npc.target].GetModPlayer(mod).fishAlert ? 3f : 1f)) + (Main.player[npc.target].Center - npc.Center).Length() < ((Main.player[npc.target].GetCalamityPlayer().anechoicPlating || + Main.player[npc.target].GetCalamityPlayer().anechoicCoating) ? 200f : 400f) * + (Main.player[npc.target].GetCalamityPlayer().fishAlert ? 3f : 1f)) { flag14 = true; } @@ -274,11 +274,11 @@ namespace CalamityMod.NPCs.AbyssNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.player.GetModPlayer(mod).ZoneAbyssLayer2 && spawnInfo.water) + if (spawnInfo.player.GetCalamityPlayer().ZoneAbyssLayer2 && spawnInfo.water) { return SpawnCondition.CaveJellyfish.Chance * 0.6f; } - if (spawnInfo.player.GetModPlayer(mod).ZoneAbyssLayer3 && spawnInfo.water) + if (spawnInfo.player.GetCalamityPlayer().ZoneAbyssLayer3 && spawnInfo.water) { return SpawnCondition.CaveJellyfish.Chance * 1.2f; } diff --git a/NPCs/AbyssNPCs/LuminousCorvina.cs b/NPCs/AbyssNPCs/LuminousCorvina.cs index f1b1e4a050..def03e1c2b 100644 --- a/NPCs/AbyssNPCs/LuminousCorvina.cs +++ b/NPCs/AbyssNPCs/LuminousCorvina.cs @@ -272,7 +272,7 @@ namespace CalamityMod.NPCs.AbyssNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.player.GetModPlayer(mod).ZoneAbyssLayer2 && spawnInfo.water) + if (spawnInfo.player.GetCalamityPlayer().ZoneAbyssLayer2 && spawnInfo.water) { return SpawnCondition.CaveJellyfish.Chance * 0.6f; } diff --git a/NPCs/AbyssNPCs/MantisShrimp.cs b/NPCs/AbyssNPCs/MantisShrimp.cs index 8e46bca620..c95941c7aa 100644 --- a/NPCs/AbyssNPCs/MantisShrimp.cs +++ b/NPCs/AbyssNPCs/MantisShrimp.cs @@ -93,7 +93,7 @@ namespace CalamityMod.NPCs.AbyssNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.playerSafe || spawnInfo.player.GetModPlayer(mod).ZoneSulphur) + if (spawnInfo.playerSafe || spawnInfo.player.GetCalamityPlayer().ZoneSulphur) { return 0f; } diff --git a/NPCs/AbyssNPCs/Mauler.cs b/NPCs/AbyssNPCs/Mauler.cs index 903ec4c40c..8c5681a490 100644 --- a/NPCs/AbyssNPCs/Mauler.cs +++ b/NPCs/AbyssNPCs/Mauler.cs @@ -363,7 +363,7 @@ namespace CalamityMod.NPCs.AbyssNPCs { return 0f; } - if (spawnInfo.player.GetModPlayer(mod).ZoneSulphur && spawnInfo.water && !NPC.AnyNPCs(mod.NPCType("Mauler")) && + if (spawnInfo.player.GetCalamityPlayer().ZoneSulphur && spawnInfo.water && !NPC.AnyNPCs(mod.NPCType("Mauler")) && !NPC.AnyNPCs(mod.NPCType("AquaticScourgeHead"))) { if (!Main.hardMode) diff --git a/NPCs/AbyssNPCs/MirageJelly.cs b/NPCs/AbyssNPCs/MirageJelly.cs index adf91c45dc..e9bb30bcd3 100644 --- a/NPCs/AbyssNPCs/MirageJelly.cs +++ b/NPCs/AbyssNPCs/MirageJelly.cs @@ -171,7 +171,7 @@ namespace CalamityMod.NPCs.AbyssNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.player.GetModPlayer(mod).ZoneAbyssLayer3 && spawnInfo.water) + if (spawnInfo.player.GetCalamityPlayer().ZoneAbyssLayer3 && spawnInfo.water) { return SpawnCondition.CaveJellyfish.Chance * 0.6f; } diff --git a/NPCs/AbyssNPCs/MorayEel.cs b/NPCs/AbyssNPCs/MorayEel.cs index 3c3a015df8..3dd11644b2 100644 --- a/NPCs/AbyssNPCs/MorayEel.cs +++ b/NPCs/AbyssNPCs/MorayEel.cs @@ -69,9 +69,9 @@ namespace CalamityMod.NPCs.AbyssNPCs npc.TargetClosest(false); if (Main.player[npc.target].wet && !Main.player[npc.target].dead && Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height) && - (Main.player[npc.target].Center - npc.Center).Length() < ((Main.player[npc.target].GetModPlayer(mod).anechoicPlating || - Main.player[npc.target].GetModPlayer(mod).anechoicCoating) ? 250f : 300f) * - (Main.player[npc.target].GetModPlayer(mod).fishAlert ? 3f : 1f)) + (Main.player[npc.target].Center - npc.Center).Length() < ((Main.player[npc.target].GetCalamityPlayer().anechoicPlating || + Main.player[npc.target].GetCalamityPlayer().anechoicCoating) ? 250f : 300f) * + (Main.player[npc.target].GetCalamityPlayer().fishAlert ? 3f : 1f)) { flag14 = true; } @@ -251,11 +251,11 @@ namespace CalamityMod.NPCs.AbyssNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.playerSafe || spawnInfo.player.GetModPlayer(mod).ZoneSulphur) + if (spawnInfo.playerSafe || spawnInfo.player.GetCalamityPlayer().ZoneSulphur) { return 0f; } - if (spawnInfo.player.GetModPlayer(mod).ZoneAbyssLayer1 && spawnInfo.water) + if (spawnInfo.player.GetCalamityPlayer().ZoneAbyssLayer1 && spawnInfo.water) { return SpawnCondition.CaveJellyfish.Chance * 1.2f; } diff --git a/NPCs/AbyssNPCs/OarfishHead.cs b/NPCs/AbyssNPCs/OarfishHead.cs index 1e061c0857..9e2c3a6fa0 100644 --- a/NPCs/AbyssNPCs/OarfishHead.cs +++ b/NPCs/AbyssNPCs/OarfishHead.cs @@ -131,9 +131,9 @@ namespace CalamityMod.NPCs.AbyssNPCs { num42 *= 16; float num47 = (float)(num42 - 200); //800 - if ((Main.player[npc.target].Center - npc.Center).Length() > ((Main.player[npc.target].GetModPlayer(mod).anechoicPlating || - Main.player[npc.target].GetModPlayer(mod).anechoicCoating) ? 150f : 250f) * - (Main.player[npc.target].GetModPlayer(mod).fishAlert ? 3f : 1f)) + if ((Main.player[npc.target].Center - npc.Center).Length() > ((Main.player[npc.target].GetCalamityPlayer().anechoicPlating || + Main.player[npc.target].GetCalamityPlayer().anechoicCoating) ? 150f : 250f) * + (Main.player[npc.target].GetCalamityPlayer().fishAlert ? 3f : 1f)) { num192 = num47; if (Math.Abs(npc.Center.X - Main.player[npc.target].Center.X) < 250f) @@ -165,9 +165,9 @@ namespace CalamityMod.NPCs.AbyssNPCs npc.velocity *= num49; } } - if ((Main.player[npc.target].Center - npc.Center).Length() > ((Main.player[npc.target].GetModPlayer(mod).anechoicPlating || - Main.player[npc.target].GetModPlayer(mod).anechoicCoating) ? 150f : 250f) * - (Main.player[npc.target].GetModPlayer(mod).fishAlert ? 3f : 1f)) + if ((Main.player[npc.target].Center - npc.Center).Length() > ((Main.player[npc.target].GetCalamityPlayer().anechoicPlating || + Main.player[npc.target].GetCalamityPlayer().anechoicCoating) ? 150f : 250f) * + (Main.player[npc.target].GetCalamityPlayer().fishAlert ? 3f : 1f)) { for (int num51 = 0; num51 < 200; num51++) { @@ -312,11 +312,11 @@ namespace CalamityMod.NPCs.AbyssNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.player.GetModPlayer(mod).ZoneAbyssLayer2 && spawnInfo.water && !NPC.AnyNPCs(mod.NPCType("OarfishHead"))) + if (spawnInfo.player.GetCalamityPlayer().ZoneAbyssLayer2 && spawnInfo.water && !NPC.AnyNPCs(mod.NPCType("OarfishHead"))) { return SpawnCondition.CaveJellyfish.Chance * 0.3f; } - if (spawnInfo.player.GetModPlayer(mod).ZoneAbyssLayer3 && spawnInfo.water && !NPC.AnyNPCs(mod.NPCType("OarfishHead"))) + if (spawnInfo.player.GetCalamityPlayer().ZoneAbyssLayer3 && spawnInfo.water && !NPC.AnyNPCs(mod.NPCType("OarfishHead"))) { return SpawnCondition.CaveJellyfish.Chance * 0.6f; } diff --git a/NPCs/AbyssNPCs/Reaper.cs b/NPCs/AbyssNPCs/Reaper.cs index baf20690be..82b3192e3c 100644 --- a/NPCs/AbyssNPCs/Reaper.cs +++ b/NPCs/AbyssNPCs/Reaper.cs @@ -149,9 +149,9 @@ namespace CalamityMod.NPCs.AbyssNPCs npc.TargetClosest(false); if ((!Main.player[npc.target].dead && Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height) && - (Main.player[npc.target].Center - npc.Center).Length() < ((Main.player[npc.target].GetModPlayer(mod).anechoicPlating || - Main.player[npc.target].GetModPlayer(mod).anechoicCoating) ? 300f : 500f) * - (Main.player[npc.target].GetModPlayer(mod).fishAlert ? 3f : 1f)) || + (Main.player[npc.target].Center - npc.Center).Length() < ((Main.player[npc.target].GetCalamityPlayer().anechoicPlating || + Main.player[npc.target].GetCalamityPlayer().anechoicCoating) ? 300f : 500f) * + (Main.player[npc.target].GetCalamityPlayer().fishAlert ? 3f : 1f)) || npc.justHit) { hasBeenHit = true; @@ -644,12 +644,12 @@ namespace CalamityMod.NPCs.AbyssNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.player.GetModPlayer(mod).ZoneAbyssLayer3 && spawnInfo.water && !NPC.AnyNPCs(mod.NPCType("Reaper")) && + if (spawnInfo.player.GetCalamityPlayer().ZoneAbyssLayer3 && spawnInfo.water && !NPC.AnyNPCs(mod.NPCType("Reaper")) && !NPC.AnyNPCs(mod.NPCType("ColossalSquid")) && !NPC.AnyNPCs(mod.NPCType("EidolonWyrmHead"))) { return SpawnCondition.CaveJellyfish.Chance * 0.6f; } - if (spawnInfo.player.GetModPlayer(mod).ZoneAbyssLayer4 && spawnInfo.water && !NPC.AnyNPCs(mod.NPCType("Reaper"))) + if (spawnInfo.player.GetCalamityPlayer().ZoneAbyssLayer4 && spawnInfo.water && !NPC.AnyNPCs(mod.NPCType("Reaper"))) { return SpawnCondition.CaveJellyfish.Chance * 1.2f; } diff --git a/NPCs/AbyssNPCs/SeaUrchin.cs b/NPCs/AbyssNPCs/SeaUrchin.cs index 445a26df5d..27501fbc49 100644 --- a/NPCs/AbyssNPCs/SeaUrchin.cs +++ b/NPCs/AbyssNPCs/SeaUrchin.cs @@ -316,7 +316,7 @@ namespace CalamityMod.NPCs.AbyssNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.playerSafe || spawnInfo.player.GetModPlayer(mod).ZoneSulphur) + if (spawnInfo.playerSafe || spawnInfo.player.GetCalamityPlayer().ZoneSulphur) { return 0f; } diff --git a/NPCs/AbyssNPCs/ToxicMinnow.cs b/NPCs/AbyssNPCs/ToxicMinnow.cs index c01bdaf5df..f6bd3fb6af 100644 --- a/NPCs/AbyssNPCs/ToxicMinnow.cs +++ b/NPCs/AbyssNPCs/ToxicMinnow.cs @@ -242,15 +242,15 @@ namespace CalamityMod.NPCs.AbyssNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.player.GetModPlayer(mod).ZoneAbyssLayer1 && spawnInfo.water) + if (spawnInfo.player.GetCalamityPlayer().ZoneAbyssLayer1 && spawnInfo.water) { return SpawnCondition.CaveJellyfish.Chance * 0.6f; } - if (spawnInfo.player.GetModPlayer(mod).ZoneAbyssLayer2 && spawnInfo.water) + if (spawnInfo.player.GetCalamityPlayer().ZoneAbyssLayer2 && spawnInfo.water) { return SpawnCondition.CaveJellyfish.Chance * 0.9f; } - if (spawnInfo.player.GetModPlayer(mod).ZoneAbyssLayer3 && spawnInfo.water) + if (spawnInfo.player.GetCalamityPlayer().ZoneAbyssLayer3 && spawnInfo.water) { return SpawnCondition.CaveJellyfish.Chance * 0.6f; } diff --git a/NPCs/AbyssNPCs/Trasher.cs b/NPCs/AbyssNPCs/Trasher.cs index 319357b53b..bb91df9eae 100644 --- a/NPCs/AbyssNPCs/Trasher.cs +++ b/NPCs/AbyssNPCs/Trasher.cs @@ -337,7 +337,7 @@ namespace CalamityMod.NPCs.AbyssNPCs { return 0f; } - if (spawnInfo.player.GetModPlayer(mod).ZoneSulphur || (spawnInfo.player.GetModPlayer(mod).ZoneSulphur && spawnInfo.water)) + if (spawnInfo.player.GetCalamityPlayer().ZoneSulphur || (spawnInfo.player.GetCalamityPlayer().ZoneSulphur && spawnInfo.water)) { return 0.1f; } diff --git a/NPCs/AbyssNPCs/Viperfish.cs b/NPCs/AbyssNPCs/Viperfish.cs index 3716a6a695..3c27b95f07 100644 --- a/NPCs/AbyssNPCs/Viperfish.cs +++ b/NPCs/AbyssNPCs/Viperfish.cs @@ -70,9 +70,9 @@ namespace CalamityMod.NPCs.AbyssNPCs npc.TargetClosest(false); if (Main.player[npc.target].wet && !Main.player[npc.target].dead && Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height) && - (Main.player[npc.target].Center - npc.Center).Length() < ((Main.player[npc.target].GetModPlayer(mod).anechoicPlating || - Main.player[npc.target].GetModPlayer(mod).anechoicCoating) ? 200f : 600f) * - (Main.player[npc.target].GetModPlayer(mod).fishAlert ? 3f : 1f)) + (Main.player[npc.target].Center - npc.Center).Length() < ((Main.player[npc.target].GetCalamityPlayer().anechoicPlating || + Main.player[npc.target].GetCalamityPlayer().anechoicCoating) ? 200f : 600f) * + (Main.player[npc.target].GetCalamityPlayer().fishAlert ? 3f : 1f)) { flag14 = true; } @@ -262,11 +262,11 @@ namespace CalamityMod.NPCs.AbyssNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.player.GetModPlayer(mod).ZoneAbyssLayer1 && spawnInfo.water) + if (spawnInfo.player.GetCalamityPlayer().ZoneAbyssLayer1 && spawnInfo.water) { return SpawnCondition.CaveJellyfish.Chance * 0.6f; } - if (spawnInfo.player.GetModPlayer(mod).ZoneAbyssLayer2 && spawnInfo.water) + if (spawnInfo.player.GetCalamityPlayer().ZoneAbyssLayer2 && spawnInfo.water) { return SpawnCondition.CaveJellyfish.Chance * 1.2f; } diff --git a/NPCs/AstralBiomeNPCs/AstralProbe.cs b/NPCs/AstralBiomeNPCs/AstralProbe.cs index 380e9c1a60..b0d04d08ea 100644 --- a/NPCs/AstralBiomeNPCs/AstralProbe.cs +++ b/NPCs/AstralBiomeNPCs/AstralProbe.cs @@ -301,7 +301,7 @@ namespace CalamityMod.NPCs.AstralBiomeNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - return (spawnInfo.player.GetModPlayer(mod).ZoneAstral && !spawnInfo.player.ZoneTowerStardust && !spawnInfo.player.ZoneTowerSolar && !spawnInfo.player.ZoneTowerVortex && !spawnInfo.player.ZoneTowerNebula) ? 0.1f : 0f; + return (spawnInfo.player.GetCalamityPlayer().ZoneAstral && !spawnInfo.player.ZoneTowerStardust && !spawnInfo.player.ZoneTowerSolar && !spawnInfo.player.ZoneTowerVortex && !spawnInfo.player.ZoneTowerNebula) ? 0.1f : 0f; } public override void OnHitPlayer(Player player, int damage, bool crit) diff --git a/NPCs/BrimstoneWaifu/BrimstoneElemental.cs b/NPCs/BrimstoneWaifu/BrimstoneElemental.cs index f77155b84f..b0c190d572 100644 --- a/NPCs/BrimstoneWaifu/BrimstoneElemental.cs +++ b/NPCs/BrimstoneWaifu/BrimstoneElemental.cs @@ -98,7 +98,7 @@ namespace CalamityMod.NPCs.BrimstoneWaifu 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); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); bool provy = (CalamityWorld.downedProvidence && !CalamityWorld.bossRushActive); bool expertMode = (Main.expertMode || CalamityWorld.bossRushActive); bool revenge = (CalamityWorld.revenge || CalamityWorld.bossRushActive); diff --git a/NPCs/CalamityBiomeNPCs/CultistAssassin.cs b/NPCs/CalamityBiomeNPCs/CultistAssassin.cs index f2097b0731..daace90026 100644 --- a/NPCs/CalamityBiomeNPCs/CultistAssassin.cs +++ b/NPCs/CalamityBiomeNPCs/CultistAssassin.cs @@ -43,7 +43,7 @@ namespace CalamityMod.NPCs.CalamityBiomeNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - return (spawnInfo.player.GetModPlayer(mod).ZoneCalamity || spawnInfo.player.ZoneDungeon) && Main.hardMode ? 0.04f : 0f; + return (spawnInfo.player.GetCalamityPlayer().ZoneCalamity || spawnInfo.player.ZoneDungeon) && Main.hardMode ? 0.04f : 0f; } public override void HitEffect(int hitDirection, double damage) diff --git a/NPCs/CalamityBiomeNPCs/DespairStone.cs b/NPCs/CalamityBiomeNPCs/DespairStone.cs index 05fae6c286..ff0f3d6ee8 100644 --- a/NPCs/CalamityBiomeNPCs/DespairStone.cs +++ b/NPCs/CalamityBiomeNPCs/DespairStone.cs @@ -338,7 +338,7 @@ namespace CalamityMod.NPCs.CalamityBiomeNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - return spawnInfo.player.GetModPlayer(mod).ZoneCalamity ? 0.25f : 0f; + return spawnInfo.player.GetCalamityPlayer().ZoneCalamity ? 0.25f : 0f; } public override void NPCLoot() diff --git a/NPCs/CalamityBiomeNPCs/Scryllar.cs b/NPCs/CalamityBiomeNPCs/Scryllar.cs index a8c2cb367a..7871d8e614 100644 --- a/NPCs/CalamityBiomeNPCs/Scryllar.cs +++ b/NPCs/CalamityBiomeNPCs/Scryllar.cs @@ -255,7 +255,7 @@ namespace CalamityMod.NPCs.CalamityBiomeNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - return spawnInfo.player.GetModPlayer(mod).ZoneCalamity ? 0.25f : 0f; + return spawnInfo.player.GetCalamityPlayer().ZoneCalamity ? 0.25f : 0f; } public override void NPCLoot() diff --git a/NPCs/CalamityBiomeNPCs/ScryllarRage.cs b/NPCs/CalamityBiomeNPCs/ScryllarRage.cs index f830561e3a..7268f651c6 100644 --- a/NPCs/CalamityBiomeNPCs/ScryllarRage.cs +++ b/NPCs/CalamityBiomeNPCs/ScryllarRage.cs @@ -255,7 +255,7 @@ namespace CalamityMod.NPCs.CalamityBiomeNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - return spawnInfo.player.GetModPlayer(mod).ZoneCalamity ? 0.125f : 0f; + return spawnInfo.player.GetCalamityPlayer().ZoneCalamity ? 0.125f : 0f; } public override void NPCLoot() diff --git a/NPCs/CalamityBiomeNPCs/SoulSlurper.cs b/NPCs/CalamityBiomeNPCs/SoulSlurper.cs index 52c09ada73..466dccd27d 100644 --- a/NPCs/CalamityBiomeNPCs/SoulSlurper.cs +++ b/NPCs/CalamityBiomeNPCs/SoulSlurper.cs @@ -44,7 +44,7 @@ namespace CalamityMod.NPCs.CalamityBiomeNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - return spawnInfo.player.GetModPlayer(mod).ZoneCalamity ? 0.25f : 0f; + return spawnInfo.player.GetCalamityPlayer().ZoneCalamity ? 0.25f : 0f; } public override void AI() diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index f567e8ccd3..335340a5ea 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -488,7 +488,7 @@ namespace CalamityMod.NPCs { if (!Main.LocalPlayer.dead && Main.LocalPlayer.active) { - Main.LocalPlayer.GetModPlayer(mod).adrenaline = 0; + Main.LocalPlayer.GetCalamityPlayer().adrenaline = 0; } } } @@ -1318,7 +1318,7 @@ namespace CalamityMod.NPCs damage /= 2; } - if (target.GetModPlayer(mod).beeResist) + if (target.GetCalamityPlayer().beeResist) { if (CalamityMod.beeEnemyList.Contains(npc.type)) { @@ -1451,7 +1451,7 @@ namespace CalamityMod.NPCs npc.type == NPCID.BigHornetSpikey || npc.type == NPCID.LittleHornetSpikey || npc.type == NPCID.BigHornetLeafy || npc.type == NPCID.LittleHornetLeafy || npc.type == NPCID.BigHornetHoney || npc.type == NPCID.LittleHornetHoney || npc.type == NPCID.BigHornetFatty || npc.type == NPCID.LittleHornetFatty) { - if (Main.player[npc.target].GetModPlayer(mod).queenBeeLore) + if (Main.player[npc.target].GetCalamityPlayer().queenBeeLore) { CalamityGlobalAI.QueenBeeLoreEffect(npc); return false; @@ -2179,7 +2179,7 @@ namespace CalamityMod.NPCs #region On Hit Player public override void OnHitPlayer(NPC npc, Player target, int damage, bool crit) { - if (target.GetModPlayer(mod).snowman) + if (target.GetCalamityPlayer().snowman) { if (npc.type == NPCID.Demon || npc.type == NPCID.VoodooDemon || npc.type == NPCID.RedDevil) { @@ -2497,18 +2497,18 @@ namespace CalamityMod.NPCs #region On Hit By Item public override void OnHitByItem(NPC npc, Player player, Item item, int damage, float knockback, bool crit) { - if (player.GetModPlayer(mod).bloodflareSet) + if (player.GetCalamityPlayer().bloodflareSet) { if (!npc.SpawnedFromStatue && npc.damage > 0 && (npc.life < npc.lifeMax * 0.5) && - player.GetModPlayer(mod).bloodflareHeartTimer <= 0) + player.GetCalamityPlayer().bloodflareHeartTimer <= 0) { - player.GetModPlayer(mod).bloodflareHeartTimer = 180; + player.GetCalamityPlayer().bloodflareHeartTimer = 180; DropHelper.DropItem(npc, ItemID.Heart); } else if (!npc.SpawnedFromStatue && npc.damage > 0 && (npc.life > npc.lifeMax * 0.5) && - player.GetModPlayer(mod).bloodflareManaTimer <= 0) + player.GetCalamityPlayer().bloodflareManaTimer <= 0) { - player.GetModPlayer(mod).bloodflareManaTimer = 180; + player.GetCalamityPlayer().bloodflareManaTimer = 180; DropHelper.DropItem(npc, ItemID.Star); } } @@ -2703,7 +2703,7 @@ namespace CalamityMod.NPCs #region Edit Spawn Rate public override void EditSpawnRate(Player player, ref int spawnRate, ref int maxSpawns) { - if (player.GetModPlayer(mod).ZoneSulphur) + if (player.GetCalamityPlayer().ZoneSulphur) { spawnRate = (int)(spawnRate * 1.1); maxSpawns = (int)(maxSpawns * 0.8f); @@ -2713,28 +2713,28 @@ namespace CalamityMod.NPCs maxSpawns = (int)(maxSpawns * 1.2f); } } - else if (player.GetModPlayer(mod).ZoneAbyss) + else if (player.GetCalamityPlayer().ZoneAbyss) { spawnRate = (int)(spawnRate * 0.7); maxSpawns = (int)(maxSpawns * 1.1f); } - else if (player.GetModPlayer(mod).ZoneCalamity) + else if (player.GetCalamityPlayer().ZoneCalamity) { spawnRate = (int)(spawnRate * 0.9); maxSpawns = (int)(maxSpawns * 1.1f); } - else if (player.GetModPlayer(mod).ZoneAstral) + else if (player.GetCalamityPlayer().ZoneAstral) { spawnRate = (int)(spawnRate * 0.6); maxSpawns = (int)(maxSpawns * 1.2f); } - else if (player.GetModPlayer(mod).ZoneSunkenSea) + else if (player.GetCalamityPlayer().ZoneSunkenSea) { spawnRate = (int)(spawnRate * 0.9); maxSpawns = (int)(maxSpawns * 1.1f); } - if (player.GetModPlayer(mod).clamity) + if (player.GetCalamityPlayer().clamity) { spawnRate = (int)(spawnRate * 0.02); maxSpawns = (int)(maxSpawns * 1.5f); @@ -2754,36 +2754,36 @@ namespace CalamityMod.NPCs spawnRate = (int)(spawnRate * 0.75); } - if (player.GetModPlayer(mod).zerg && player.GetModPlayer(mod).chaosCandle) + if (player.GetCalamityPlayer().zerg && player.GetCalamityPlayer().chaosCandle) { spawnRate = (int)(spawnRate * 0.005); maxSpawns = (int)(maxSpawns * 7.5f); } - else if (player.GetModPlayer(mod).zerg) + else if (player.GetCalamityPlayer().zerg) { spawnRate = (int)(spawnRate * 0.01); maxSpawns = (int)(maxSpawns * 5f); } - else if (player.GetModPlayer(mod).chaosCandle) + else if (player.GetCalamityPlayer().chaosCandle) { spawnRate = (int)(spawnRate * 0.02); maxSpawns = (int)(maxSpawns * 2.5f); } - if (player.GetModPlayer(mod).zen && player.GetModPlayer(mod).tranquilityCandle) + if (player.GetCalamityPlayer().zen && player.GetCalamityPlayer().tranquilityCandle) { - spawnRate = (int)(spawnRate * (player.GetModPlayer(mod).ZoneAbyss ? 1.75 : 75)); - maxSpawns = (int)(maxSpawns * (player.GetModPlayer(mod).ZoneAbyss ? 0.625f : 0.005f)); + spawnRate = (int)(spawnRate * (player.GetCalamityPlayer().ZoneAbyss ? 1.75 : 75)); + maxSpawns = (int)(maxSpawns * (player.GetCalamityPlayer().ZoneAbyss ? 0.625f : 0.005f)); } - else if (CalamityPlayer.areThereAnyDamnBosses || player.GetModPlayer(mod).zen || (Config.DisableExpertEnemySpawnsNearHouse && player.townNPCs > 1f && Main.expertMode)) + else if (CalamityPlayer.areThereAnyDamnBosses || player.GetCalamityPlayer().zen || (Config.DisableExpertEnemySpawnsNearHouse && player.townNPCs > 1f && Main.expertMode)) { - spawnRate = (int)(spawnRate * (player.GetModPlayer(mod).ZoneAbyss ? 1.5 : 50)); - maxSpawns = (int)(maxSpawns * (player.GetModPlayer(mod).ZoneAbyss ? 0.75f : 0.01f)); + spawnRate = (int)(spawnRate * (player.GetCalamityPlayer().ZoneAbyss ? 1.5 : 50)); + maxSpawns = (int)(maxSpawns * (player.GetCalamityPlayer().ZoneAbyss ? 0.75f : 0.01f)); } - else if (player.GetModPlayer(mod).tranquilityCandle) + else if (player.GetCalamityPlayer().tranquilityCandle) { - spawnRate = (int)(spawnRate * (player.GetModPlayer(mod).ZoneAbyss ? 1.25 : 25)); - maxSpawns = (int)(maxSpawns * (player.GetModPlayer(mod).ZoneAbyss ? 0.875f : 0.02f)); + spawnRate = (int)(spawnRate * (player.GetCalamityPlayer().ZoneAbyss ? 1.25 : 25)); + maxSpawns = (int)(maxSpawns * (player.GetCalamityPlayer().ZoneAbyss ? 0.875f : 0.02f)); } } #endregion @@ -2791,7 +2791,7 @@ namespace CalamityMod.NPCs #region Edit Spawn Range public override void EditSpawnRange(Player player, ref int spawnRangeX, ref int spawnRangeY, ref int safeRangeX, ref int safeRangeY) { - if (player.GetModPlayer(mod).ZoneAbyss) + if (player.GetCalamityPlayer().ZoneAbyss) { spawnRangeX = (int)(1920 / 16 * 0.5); //0.7 safeRangeX = (int)(1920 / 16 * 0.32); //0.52 @@ -2802,11 +2802,11 @@ namespace CalamityMod.NPCs #region Edit Spawn Pool public override void EditSpawnPool(IDictionary pool, NPCSpawnInfo spawnInfo) { - if (spawnInfo.player.GetModPlayer(mod).ZoneAbyss || - spawnInfo.player.GetModPlayer(mod).ZoneCalamity || - spawnInfo.player.GetModPlayer(mod).ZoneSulphur || - spawnInfo.player.GetModPlayer(mod).ZoneSunkenSea || - (spawnInfo.player.GetModPlayer(mod).ZoneAstral && !NPC.LunarApocalypseIsUp)) + if (spawnInfo.player.GetCalamityPlayer().ZoneAbyss || + spawnInfo.player.GetCalamityPlayer().ZoneCalamity || + spawnInfo.player.GetCalamityPlayer().ZoneSulphur || + spawnInfo.player.GetCalamityPlayer().ZoneSunkenSea || + (spawnInfo.player.GetCalamityPlayer().ZoneAstral && !NPC.LunarApocalypseIsUp)) { pool[0] = 0f; } @@ -3031,7 +3031,7 @@ namespace CalamityMod.NPCs public override Color? GetAlpha(NPC npc, Color drawColor) { - if (Main.LocalPlayer.GetModPlayer(mod).trippy) + if (Main.LocalPlayer.GetCalamityPlayer().trippy) { return new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB, npc.alpha); } @@ -3054,7 +3054,7 @@ namespace CalamityMod.NPCs } } - if (Main.LocalPlayer.GetModPlayer(mod).trippy) + if (Main.LocalPlayer.GetCalamityPlayer().trippy) { SpriteEffects spriteEffects = SpriteEffects.None; if (npc.spriteDirection == 1) @@ -3580,7 +3580,7 @@ namespace CalamityMod.NPCs SetShopItem(ref shop, ref nextSlot, ItemID.MechanicalWorm, NPC.downedMechBoss1, Item.buyPrice(0, 20)); SetShopItem(ref shop, ref nextSlot, ItemID.MechanicalEye, NPC.downedMechBoss2, Item.buyPrice(0, 20)); SetShopItem(ref shop, ref nextSlot, ItemID.MechanicalSkull, NPC.downedMechBoss3, Item.buyPrice(0, 20)); - SetShopItem(ref shop, ref nextSlot, mod.ItemType("AstralSolution"), Main.LocalPlayer.GetModPlayer(mod).ZoneAstral && Main.hardMode, Item.buyPrice(0, 0, 5)); + SetShopItem(ref shop, ref nextSlot, mod.ItemType("AstralSolution"), Main.LocalPlayer.GetCalamityPlayer().ZoneAstral && Main.hardMode, Item.buyPrice(0, 0, 5)); } if (type == NPCID.Wizard) diff --git a/NPCs/CalamityGlobalNPCLoot.cs b/NPCs/CalamityGlobalNPCLoot.cs index 9124876308..c035f09607 100644 --- a/NPCs/CalamityGlobalNPCLoot.cs +++ b/NPCs/CalamityGlobalNPCLoot.cs @@ -690,7 +690,7 @@ namespace CalamityMod.NPCs { if (!Main.player[Main.myPlayer].dead && Main.player[Main.myPlayer].active) { - Main.player[Main.myPlayer].GetModPlayer(mod).adrenaline = 0; + Main.player[Main.myPlayer].GetCalamityPlayer().adrenaline = 0; } } } @@ -1245,7 +1245,7 @@ namespace CalamityMod.NPCs private void ArmorSetLoot(NPC npc, Mod mod) { // Tarragon armor set bonus: 20% chance to drop hearts from all valid enemies - if (Main.player[(int)Player.FindClosest(npc.position, npc.width, npc.height)].GetModPlayer(mod).tarraSet) + if (Main.player[(int)Player.FindClosest(npc.position, npc.width, npc.height)].GetCalamityPlayer().tarraSet) { if (!npc.SpawnedFromStatue && (npc.damage > 5 || npc.boss) && npc.lifeMax > 100) { @@ -1256,7 +1256,7 @@ namespace CalamityMod.NPCs // Blood Orb drops: Valid enemy during a blood moon on the Surface if (!npc.SpawnedFromStatue && (npc.damage > 5 || npc.boss) && Main.bloodMoon && npc.HasPlayerTarget && npc.position.Y / 16D < Main.worldSurface) { - if (Main.player[Player.FindClosest(npc.position, npc.width, npc.height)].GetModPlayer(mod).bloodflareSet) + if (Main.player[Player.FindClosest(npc.position, npc.width, npc.height)].GetCalamityPlayer().bloodflareSet) { DropHelper.DropItemChance(npc, mod.ItemType("BloodOrb"), 2); // 50% chance of 1 orb with Bloodflare } diff --git a/NPCs/Leviathan/LeviathanStart.cs b/NPCs/Leviathan/LeviathanStart.cs index 53d409e8ba..5fdd707d22 100644 --- a/NPCs/Leviathan/LeviathanStart.cs +++ b/NPCs/Leviathan/LeviathanStart.cs @@ -62,7 +62,7 @@ namespace CalamityMod.NPCs.Leviathan NPC.AnyNPCs(mod.NPCType("LeviathanStart")) || NPC.AnyNPCs(mod.NPCType("Siren")) || NPC.AnyNPCs(mod.NPCType("Leviathan")) || - spawnInfo.player.GetModPlayer(mod).ZoneSulphur) + spawnInfo.player.GetCalamityPlayer().ZoneSulphur) { return 0f; } diff --git a/NPCs/NormalNPCs/AeroSlime.cs b/NPCs/NormalNPCs/AeroSlime.cs index eba95c3a1d..40039784ce 100644 --- a/NPCs/NormalNPCs/AeroSlime.cs +++ b/NPCs/NormalNPCs/AeroSlime.cs @@ -38,8 +38,8 @@ namespace CalamityMod.NPCs.NormalNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.playerSafe || (!CalamityWorld.downedHiveMind && !CalamityWorld.downedPerforator) || spawnInfo.player.GetModPlayer(mod).ZoneAbyss || - spawnInfo.player.GetModPlayer(mod).ZoneSunkenSea) + if (spawnInfo.playerSafe || (!CalamityWorld.downedHiveMind && !CalamityWorld.downedPerforator) || spawnInfo.player.GetCalamityPlayer().ZoneAbyss || + spawnInfo.player.GetCalamityPlayer().ZoneSunkenSea) { return 0f; } diff --git a/NPCs/NormalNPCs/AngryDog.cs b/NPCs/NormalNPCs/AngryDog.cs index a0e236de6c..260c23211b 100644 --- a/NPCs/NormalNPCs/AngryDog.cs +++ b/NPCs/NormalNPCs/AngryDog.cs @@ -627,7 +627,7 @@ namespace CalamityMod.NPCs.NormalNPCs !spawnInfo.player.ZoneTowerVortex && !spawnInfo.player.ZoneTowerNebula && !spawnInfo.player.ZoneDungeon && - !spawnInfo.player.GetModPlayer(mod).ZoneSunkenSea && + !spawnInfo.player.GetCalamityPlayer().ZoneSunkenSea && !spawnInfo.playerInTown && !spawnInfo.player.ZoneOldOneArmy && !Main.snowMoon && !Main.pumpkinMoon ? 0.012f : 0f; } diff --git a/NPCs/NormalNPCs/BlightedEye.cs b/NPCs/NormalNPCs/BlightedEye.cs index 91cb1a19ee..dc43029e59 100644 --- a/NPCs/NormalNPCs/BlightedEye.cs +++ b/NPCs/NormalNPCs/BlightedEye.cs @@ -48,7 +48,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.playerSafe || !Main.hardMode || spawnInfo.player.GetModPlayer(mod).ZoneSulphur) + if (spawnInfo.playerSafe || !Main.hardMode || spawnInfo.player.GetCalamityPlayer().ZoneSulphur) { return 0f; } diff --git a/NPCs/NormalNPCs/BloomSlime.cs b/NPCs/NormalNPCs/BloomSlime.cs index 3743a21767..f967fd7fe0 100644 --- a/NPCs/NormalNPCs/BloomSlime.cs +++ b/NPCs/NormalNPCs/BloomSlime.cs @@ -38,8 +38,8 @@ namespace CalamityMod.NPCs.NormalNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.playerSafe || !CalamityWorld.downedProvidence || spawnInfo.player.GetModPlayer(mod).ZoneAbyss || - spawnInfo.player.GetModPlayer(mod).ZoneSunkenSea) + if (spawnInfo.playerSafe || !CalamityWorld.downedProvidence || spawnInfo.player.GetCalamityPlayer().ZoneAbyss || + spawnInfo.player.GetCalamityPlayer().ZoneSunkenSea) { return 0f; } diff --git a/NPCs/NormalNPCs/CalamityEye.cs b/NPCs/NormalNPCs/CalamityEye.cs index f508d4e14a..14d793a9a2 100644 --- a/NPCs/NormalNPCs/CalamityEye.cs +++ b/NPCs/NormalNPCs/CalamityEye.cs @@ -49,7 +49,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.playerSafe || !NPC.downedPlantBoss || spawnInfo.player.GetModPlayer(mod).ZoneSulphur) + if (spawnInfo.playerSafe || !NPC.downedPlantBoss || spawnInfo.player.GetCalamityPlayer().ZoneSulphur) { return 0f; } diff --git a/NPCs/NormalNPCs/Cnidrion.cs b/NPCs/NormalNPCs/Cnidrion.cs index cd9c9cf42b..5b6ae0426c 100644 --- a/NPCs/NormalNPCs/Cnidrion.cs +++ b/NPCs/NormalNPCs/Cnidrion.cs @@ -36,7 +36,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.playerSafe || spawnInfo.player.GetModPlayer(mod).ZoneSunkenSea) + if (spawnInfo.playerSafe || spawnInfo.player.GetCalamityPlayer().ZoneSunkenSea) { return 0f; } diff --git a/NPCs/NormalNPCs/CosmicElemental.cs b/NPCs/NormalNPCs/CosmicElemental.cs index f9bc766892..55235ea0a5 100644 --- a/NPCs/NormalNPCs/CosmicElemental.cs +++ b/NPCs/NormalNPCs/CosmicElemental.cs @@ -35,7 +35,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.playerSafe || spawnInfo.player.GetModPlayer(mod).ZoneAbyss || spawnInfo.player.GetModPlayer(mod).ZoneSunkenSea) + if (spawnInfo.playerSafe || spawnInfo.player.GetCalamityPlayer().ZoneAbyss || spawnInfo.player.GetCalamityPlayer().ZoneSunkenSea) { return 0f; } diff --git a/NPCs/NormalNPCs/CrawlerAmber.cs b/NPCs/NormalNPCs/CrawlerAmber.cs index c3b96e5147..708110f573 100644 --- a/NPCs/NormalNPCs/CrawlerAmber.cs +++ b/NPCs/NormalNPCs/CrawlerAmber.cs @@ -241,7 +241,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.playerSafe || spawnInfo.player.GetModPlayer(mod).ZoneSunkenSea) + if (spawnInfo.playerSafe || spawnInfo.player.GetCalamityPlayer().ZoneSunkenSea) { return 0f; } diff --git a/NPCs/NormalNPCs/CrawlerAmethyst.cs b/NPCs/NormalNPCs/CrawlerAmethyst.cs index 67068b68f1..cae393d3ca 100644 --- a/NPCs/NormalNPCs/CrawlerAmethyst.cs +++ b/NPCs/NormalNPCs/CrawlerAmethyst.cs @@ -241,7 +241,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.playerSafe || spawnInfo.player.GetModPlayer(mod).ZoneAbyss || spawnInfo.player.GetModPlayer(mod).ZoneSunkenSea) + if (spawnInfo.playerSafe || spawnInfo.player.GetCalamityPlayer().ZoneAbyss || spawnInfo.player.GetCalamityPlayer().ZoneSunkenSea) { return 0f; } diff --git a/NPCs/NormalNPCs/CrawlerCrystal.cs b/NPCs/NormalNPCs/CrawlerCrystal.cs index 3db18a7143..6a875f67a6 100644 --- a/NPCs/NormalNPCs/CrawlerCrystal.cs +++ b/NPCs/NormalNPCs/CrawlerCrystal.cs @@ -241,7 +241,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.playerSafe || spawnInfo.player.GetModPlayer(mod).ZoneAbyss || spawnInfo.player.GetModPlayer(mod).ZoneSunkenSea) + if (spawnInfo.playerSafe || spawnInfo.player.GetCalamityPlayer().ZoneAbyss || spawnInfo.player.GetCalamityPlayer().ZoneSunkenSea) { return 0f; } diff --git a/NPCs/NormalNPCs/CrawlerDiamond.cs b/NPCs/NormalNPCs/CrawlerDiamond.cs index ac4bf8d9a8..0067d8f3ff 100644 --- a/NPCs/NormalNPCs/CrawlerDiamond.cs +++ b/NPCs/NormalNPCs/CrawlerDiamond.cs @@ -241,7 +241,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.playerSafe || spawnInfo.player.GetModPlayer(mod).ZoneAbyss || spawnInfo.player.GetModPlayer(mod).ZoneSunkenSea) + if (spawnInfo.playerSafe || spawnInfo.player.GetCalamityPlayer().ZoneAbyss || spawnInfo.player.GetCalamityPlayer().ZoneSunkenSea) { return 0f; } diff --git a/NPCs/NormalNPCs/CrawlerEmerald.cs b/NPCs/NormalNPCs/CrawlerEmerald.cs index f990b1229b..506a0a6aa0 100644 --- a/NPCs/NormalNPCs/CrawlerEmerald.cs +++ b/NPCs/NormalNPCs/CrawlerEmerald.cs @@ -241,7 +241,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.playerSafe || spawnInfo.player.GetModPlayer(mod).ZoneAbyss || spawnInfo.player.GetModPlayer(mod).ZoneSunkenSea) + if (spawnInfo.playerSafe || spawnInfo.player.GetCalamityPlayer().ZoneAbyss || spawnInfo.player.GetCalamityPlayer().ZoneSunkenSea) { return 0f; } diff --git a/NPCs/NormalNPCs/CrawlerRuby.cs b/NPCs/NormalNPCs/CrawlerRuby.cs index 0bb9101981..606c4f32fd 100644 --- a/NPCs/NormalNPCs/CrawlerRuby.cs +++ b/NPCs/NormalNPCs/CrawlerRuby.cs @@ -241,7 +241,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.playerSafe || spawnInfo.player.GetModPlayer(mod).ZoneAbyss || spawnInfo.player.GetModPlayer(mod).ZoneSunkenSea) + if (spawnInfo.playerSafe || spawnInfo.player.GetCalamityPlayer().ZoneAbyss || spawnInfo.player.GetCalamityPlayer().ZoneSunkenSea) { return 0f; } diff --git a/NPCs/NormalNPCs/CrawlerSapphire.cs b/NPCs/NormalNPCs/CrawlerSapphire.cs index 8945e13f8e..c9333875de 100644 --- a/NPCs/NormalNPCs/CrawlerSapphire.cs +++ b/NPCs/NormalNPCs/CrawlerSapphire.cs @@ -241,7 +241,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.playerSafe || spawnInfo.player.GetModPlayer(mod).ZoneAbyss || spawnInfo.player.GetModPlayer(mod).ZoneSunkenSea) + if (spawnInfo.playerSafe || spawnInfo.player.GetCalamityPlayer().ZoneAbyss || spawnInfo.player.GetCalamityPlayer().ZoneSunkenSea) { return 0f; } diff --git a/NPCs/NormalNPCs/CrawlerTopaz.cs b/NPCs/NormalNPCs/CrawlerTopaz.cs index 4a5d38a4f9..1eed2caab1 100644 --- a/NPCs/NormalNPCs/CrawlerTopaz.cs +++ b/NPCs/NormalNPCs/CrawlerTopaz.cs @@ -241,7 +241,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.playerSafe || spawnInfo.player.GetModPlayer(mod).ZoneAbyss || spawnInfo.player.GetModPlayer(mod).ZoneSunkenSea) + if (spawnInfo.playerSafe || spawnInfo.player.GetCalamityPlayer().ZoneAbyss || spawnInfo.player.GetCalamityPlayer().ZoneSunkenSea) { return 0f; } diff --git a/NPCs/NormalNPCs/CrimulanBlightSlime.cs b/NPCs/NormalNPCs/CrimulanBlightSlime.cs index 7b4746a3eb..d4e54d5863 100644 --- a/NPCs/NormalNPCs/CrimulanBlightSlime.cs +++ b/NPCs/NormalNPCs/CrimulanBlightSlime.cs @@ -38,7 +38,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.playerSafe || spawnInfo.player.GetModPlayer(mod).ZoneAbyss) + if (spawnInfo.playerSafe || spawnInfo.player.GetCalamityPlayer().ZoneAbyss) { return 0f; } diff --git a/NPCs/NormalNPCs/CryoSlime.cs b/NPCs/NormalNPCs/CryoSlime.cs index d922292a26..21a0b3af32 100644 --- a/NPCs/NormalNPCs/CryoSlime.cs +++ b/NPCs/NormalNPCs/CryoSlime.cs @@ -38,8 +38,8 @@ namespace CalamityMod.NPCs.NormalNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.playerSafe || !CalamityWorld.downedCryogen || spawnInfo.player.GetModPlayer(mod).ZoneAbyss || - spawnInfo.player.GetModPlayer(mod).ZoneSunkenSea) + if (spawnInfo.playerSafe || !CalamityWorld.downedCryogen || spawnInfo.player.GetCalamityPlayer().ZoneAbyss || + spawnInfo.player.GetCalamityPlayer().ZoneSunkenSea) { return 0f; } diff --git a/NPCs/NormalNPCs/Cryon.cs b/NPCs/NormalNPCs/Cryon.cs index a77b960ce5..4488e3ad3d 100644 --- a/NPCs/NormalNPCs/Cryon.cs +++ b/NPCs/NormalNPCs/Cryon.cs @@ -344,7 +344,7 @@ namespace CalamityMod.NPCs.NormalNPCs !spawnInfo.player.ZoneTowerVortex && !spawnInfo.player.ZoneTowerNebula && !spawnInfo.player.ZoneDungeon && - !spawnInfo.player.GetModPlayer(mod).ZoneSunkenSea && + !spawnInfo.player.GetCalamityPlayer().ZoneSunkenSea && Main.hardMode && !spawnInfo.playerInTown && !spawnInfo.player.ZoneOldOneArmy && !Main.snowMoon && !Main.pumpkinMoon ? 0.015f : 0f; } diff --git a/NPCs/NormalNPCs/EbonianBlightSlime.cs b/NPCs/NormalNPCs/EbonianBlightSlime.cs index 67d8bbf0c9..c969f4c1ac 100644 --- a/NPCs/NormalNPCs/EbonianBlightSlime.cs +++ b/NPCs/NormalNPCs/EbonianBlightSlime.cs @@ -53,7 +53,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.playerSafe || spawnInfo.player.GetModPlayer(mod).ZoneAbyss) + if (spawnInfo.playerSafe || spawnInfo.player.GetCalamityPlayer().ZoneAbyss) { return 0f; } diff --git a/NPCs/NormalNPCs/Eidolist.cs b/NPCs/NormalNPCs/Eidolist.cs index bb20838cff..fd83ef5369 100644 --- a/NPCs/NormalNPCs/Eidolist.cs +++ b/NPCs/NormalNPCs/Eidolist.cs @@ -290,7 +290,7 @@ namespace CalamityMod.NPCs.NormalNPCs { return 0f; } - if (spawnInfo.player.GetModPlayer(mod).ZoneAbyssLayer3 && spawnInfo.water) + if (spawnInfo.player.GetCalamityPlayer().ZoneAbyssLayer3 && spawnInfo.water) { return 0.05f; } diff --git a/NPCs/NormalNPCs/FearlessGoldfishWarrior.cs b/NPCs/NormalNPCs/FearlessGoldfishWarrior.cs index 5b60cb6293..398e491d3e 100644 --- a/NPCs/NormalNPCs/FearlessGoldfishWarrior.cs +++ b/NPCs/NormalNPCs/FearlessGoldfishWarrior.cs @@ -410,7 +410,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.playerSafe || !Main.raining || spawnInfo.player.GetModPlayer(mod).ZoneSulphur) + if (spawnInfo.playerSafe || !Main.raining || spawnInfo.player.GetCalamityPlayer().ZoneSulphur) { return 0f; } diff --git a/NPCs/NormalNPCs/Horse.cs b/NPCs/NormalNPCs/Horse.cs index 68d335282c..334a2a078e 100644 --- a/NPCs/NormalNPCs/Horse.cs +++ b/NPCs/NormalNPCs/Horse.cs @@ -59,8 +59,8 @@ namespace CalamityMod.NPCs.NormalNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.playerSafe || !Main.hardMode || spawnInfo.player.GetModPlayer(mod).ZoneAbyss || - spawnInfo.player.GetModPlayer(mod).ZoneSunkenSea) + if (spawnInfo.playerSafe || !Main.hardMode || spawnInfo.player.GetCalamityPlayer().ZoneAbyss || + spawnInfo.player.GetCalamityPlayer().ZoneSunkenSea) { return 0f; } diff --git a/NPCs/NormalNPCs/IceClasper.cs b/NPCs/NormalNPCs/IceClasper.cs index 94f299ae6b..0f0bdb1767 100644 --- a/NPCs/NormalNPCs/IceClasper.cs +++ b/NPCs/NormalNPCs/IceClasper.cs @@ -239,7 +239,7 @@ namespace CalamityMod.NPCs.NormalNPCs !spawnInfo.player.ZoneTowerVortex && !spawnInfo.player.ZoneTowerNebula && !spawnInfo.player.ZoneDungeon && - !spawnInfo.player.GetModPlayer(mod).ZoneSunkenSea && + !spawnInfo.player.GetCalamityPlayer().ZoneSunkenSea && Main.hardMode && !spawnInfo.playerInTown && !spawnInfo.player.ZoneOldOneArmy && !Main.snowMoon && !Main.pumpkinMoon ? 0.007f : 0f; } diff --git a/NPCs/NormalNPCs/IrradiatedSlime.cs b/NPCs/NormalNPCs/IrradiatedSlime.cs index c8596d287e..cf5f0ab28b 100644 --- a/NPCs/NormalNPCs/IrradiatedSlime.cs +++ b/NPCs/NormalNPCs/IrradiatedSlime.cs @@ -42,7 +42,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.playerSafe || !spawnInfo.player.GetModPlayer(mod).ZoneSulphur || !Main.raining) + if (spawnInfo.playerSafe || !spawnInfo.player.GetCalamityPlayer().ZoneSulphur || !Main.raining) { return 0f; } diff --git a/NPCs/NormalNPCs/OverloadedSoldier.cs b/NPCs/NormalNPCs/OverloadedSoldier.cs index 45c3deceea..d0ec8f4202 100644 --- a/NPCs/NormalNPCs/OverloadedSoldier.cs +++ b/NPCs/NormalNPCs/OverloadedSoldier.cs @@ -39,8 +39,8 @@ namespace CalamityMod.NPCs.NormalNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.playerSafe || !Main.hardMode || spawnInfo.player.GetModPlayer(mod).ZoneAbyss || - spawnInfo.player.GetModPlayer(mod).ZoneSunkenSea) + if (spawnInfo.playerSafe || !Main.hardMode || spawnInfo.player.GetCalamityPlayer().ZoneAbyss || + spawnInfo.player.GetCalamityPlayer().ZoneSunkenSea) { return 0f; } diff --git a/NPCs/NormalNPCs/PerennialSlime.cs b/NPCs/NormalNPCs/PerennialSlime.cs index 62afec160a..9050d57ea7 100644 --- a/NPCs/NormalNPCs/PerennialSlime.cs +++ b/NPCs/NormalNPCs/PerennialSlime.cs @@ -37,8 +37,8 @@ namespace CalamityMod.NPCs.NormalNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.playerSafe || !NPC.downedPlantBoss || spawnInfo.player.GetModPlayer(mod).ZoneAbyss || - spawnInfo.player.GetModPlayer(mod).ZoneSunkenSea) + if (spawnInfo.playerSafe || !NPC.downedPlantBoss || spawnInfo.player.GetCalamityPlayer().ZoneAbyss || + spawnInfo.player.GetCalamityPlayer().ZoneSunkenSea) { return 0f; } diff --git a/NPCs/NormalNPCs/PhantomDebris.cs b/NPCs/NormalNPCs/PhantomDebris.cs index 934a2cfec0..68292e5cfd 100644 --- a/NPCs/NormalNPCs/PhantomDebris.cs +++ b/NPCs/NormalNPCs/PhantomDebris.cs @@ -86,8 +86,8 @@ namespace CalamityMod.NPCs.NormalNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.playerSafe || !Main.hardMode || spawnInfo.player.GetModPlayer(mod).ZoneAbyss || - spawnInfo.player.GetModPlayer(mod).ZoneSunkenSea) + if (spawnInfo.playerSafe || !Main.hardMode || spawnInfo.player.GetCalamityPlayer().ZoneAbyss || + spawnInfo.player.GetCalamityPlayer().ZoneSunkenSea) { return 0f; } diff --git a/NPCs/NormalNPCs/Piggy.cs b/NPCs/NormalNPCs/Piggy.cs index b5ddc47e99..dca4301c7f 100644 --- a/NPCs/NormalNPCs/Piggy.cs +++ b/NPCs/NormalNPCs/Piggy.cs @@ -36,7 +36,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.player.GetModPlayer(mod).ZoneSulphur || spawnInfo.player.GetModPlayer(mod).ZoneSunkenSea) + if (spawnInfo.player.GetCalamityPlayer().ZoneSulphur || spawnInfo.player.GetCalamityPlayer().ZoneSunkenSea) { return 0f; } diff --git a/NPCs/NormalNPCs/Pitbull.cs b/NPCs/NormalNPCs/Pitbull.cs index 302da3a19b..10d3fe1b8c 100644 --- a/NPCs/NormalNPCs/Pitbull.cs +++ b/NPCs/NormalNPCs/Pitbull.cs @@ -34,7 +34,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.playerSafe || !NPC.downedBoss1 || spawnInfo.player.GetModPlayer(mod).ZoneSulphur) + if (spawnInfo.playerSafe || !NPC.downedBoss1 || spawnInfo.player.GetCalamityPlayer().ZoneSulphur) { return 0f; } diff --git a/NPCs/NormalNPCs/PlagueBee.cs b/NPCs/NormalNPCs/PlagueBee.cs index 6478b4c865..333836f7b2 100644 --- a/NPCs/NormalNPCs/PlagueBee.cs +++ b/NPCs/NormalNPCs/PlagueBee.cs @@ -53,7 +53,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.playerSafe || !NPC.downedGolemBoss || spawnInfo.player.GetModPlayer(mod).ZoneSunkenSea) + if (spawnInfo.playerSafe || !NPC.downedGolemBoss || spawnInfo.player.GetCalamityPlayer().ZoneSunkenSea) { return 0f; } diff --git a/NPCs/NormalNPCs/PlagueBeeLarge.cs b/NPCs/NormalNPCs/PlagueBeeLarge.cs index 4bb5992227..2f7a3c04e2 100644 --- a/NPCs/NormalNPCs/PlagueBeeLarge.cs +++ b/NPCs/NormalNPCs/PlagueBeeLarge.cs @@ -53,7 +53,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.playerSafe || !NPC.downedGolemBoss || spawnInfo.player.GetModPlayer(mod).ZoneSunkenSea) + if (spawnInfo.playerSafe || !NPC.downedGolemBoss || spawnInfo.player.GetCalamityPlayer().ZoneSunkenSea) { return 0f; } diff --git a/NPCs/NormalNPCs/PlaguedDerpling.cs b/NPCs/NormalNPCs/PlaguedDerpling.cs index 72a8dbeab9..f208827e5b 100644 --- a/NPCs/NormalNPCs/PlaguedDerpling.cs +++ b/NPCs/NormalNPCs/PlaguedDerpling.cs @@ -154,7 +154,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.playerSafe || !NPC.downedGolemBoss || spawnInfo.player.GetModPlayer(mod).ZoneSunkenSea) + if (spawnInfo.playerSafe || !NPC.downedGolemBoss || spawnInfo.player.GetCalamityPlayer().ZoneSunkenSea) { return 0f; } diff --git a/NPCs/NormalNPCs/PlaguedFlyingFox.cs b/NPCs/NormalNPCs/PlaguedFlyingFox.cs index 8ef361cb81..a43453dbd0 100644 --- a/NPCs/NormalNPCs/PlaguedFlyingFox.cs +++ b/NPCs/NormalNPCs/PlaguedFlyingFox.cs @@ -46,7 +46,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.playerSafe || !NPC.downedGolemBoss || spawnInfo.player.GetModPlayer(mod).ZoneSunkenSea) + if (spawnInfo.playerSafe || !NPC.downedGolemBoss || spawnInfo.player.GetCalamityPlayer().ZoneSunkenSea) { return 0f; } diff --git a/NPCs/NormalNPCs/PlaguedJungleSlime.cs b/NPCs/NormalNPCs/PlaguedJungleSlime.cs index b5563c7d44..296de2a8b0 100644 --- a/NPCs/NormalNPCs/PlaguedJungleSlime.cs +++ b/NPCs/NormalNPCs/PlaguedJungleSlime.cs @@ -107,7 +107,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.playerSafe || !NPC.downedGolemBoss || spawnInfo.player.GetModPlayer(mod).ZoneSunkenSea) + if (spawnInfo.playerSafe || !NPC.downedGolemBoss || spawnInfo.player.GetCalamityPlayer().ZoneSunkenSea) { return 0f; } diff --git a/NPCs/NormalNPCs/PlaguedTortoise.cs b/NPCs/NormalNPCs/PlaguedTortoise.cs index 7b36ebf537..2f3d9ab6bf 100644 --- a/NPCs/NormalNPCs/PlaguedTortoise.cs +++ b/NPCs/NormalNPCs/PlaguedTortoise.cs @@ -61,7 +61,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.playerSafe || !NPC.downedGolemBoss || spawnInfo.player.GetModPlayer(mod).ZoneSunkenSea) + if (spawnInfo.playerSafe || !NPC.downedGolemBoss || spawnInfo.player.GetCalamityPlayer().ZoneSunkenSea) { return 0f; } diff --git a/NPCs/NormalNPCs/SandTortoise.cs b/NPCs/NormalNPCs/SandTortoise.cs index 98acbb3738..1881a55e30 100644 --- a/NPCs/NormalNPCs/SandTortoise.cs +++ b/NPCs/NormalNPCs/SandTortoise.cs @@ -51,7 +51,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.playerSafe || !Main.hardMode || spawnInfo.player.GetModPlayer(mod).ZoneSunkenSea) + if (spawnInfo.playerSafe || !Main.hardMode || spawnInfo.player.GetCalamityPlayer().ZoneSunkenSea) { return 0f; } diff --git a/NPCs/NormalNPCs/StormlionCharger.cs b/NPCs/NormalNPCs/StormlionCharger.cs index f2b9cbcafa..42e788932f 100644 --- a/NPCs/NormalNPCs/StormlionCharger.cs +++ b/NPCs/NormalNPCs/StormlionCharger.cs @@ -48,7 +48,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.playerSafe || spawnInfo.player.GetModPlayer(mod).ZoneSunkenSea) + if (spawnInfo.playerSafe || spawnInfo.player.GetCalamityPlayer().ZoneSunkenSea) { return 0f; } diff --git a/NPCs/NormalNPCs/SunBat.cs b/NPCs/NormalNPCs/SunBat.cs index 1971be5583..948a0b00bd 100644 --- a/NPCs/NormalNPCs/SunBat.cs +++ b/NPCs/NormalNPCs/SunBat.cs @@ -47,8 +47,8 @@ namespace CalamityMod.NPCs.NormalNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.playerSafe || !Main.hardMode || spawnInfo.player.GetModPlayer(mod).ZoneAbyss || - spawnInfo.player.GetModPlayer(mod).ZoneSunkenSea) + if (spawnInfo.playerSafe || !Main.hardMode || spawnInfo.player.GetCalamityPlayer().ZoneAbyss || + spawnInfo.player.GetCalamityPlayer().ZoneSunkenSea) { return 0f; } diff --git a/NPCs/NormalNPCs/WulfrumDrone.cs b/NPCs/NormalNPCs/WulfrumDrone.cs index 71db588b6a..51b0da7885 100644 --- a/NPCs/NormalNPCs/WulfrumDrone.cs +++ b/NPCs/NormalNPCs/WulfrumDrone.cs @@ -46,7 +46,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.playerSafe || spawnInfo.player.GetModPlayer(mod).ZoneSulphur) + if (spawnInfo.playerSafe || spawnInfo.player.GetCalamityPlayer().ZoneSulphur) { return 0f; } diff --git a/NPCs/NormalNPCs/WulfrumSlime.cs b/NPCs/NormalNPCs/WulfrumSlime.cs index afe985cf2c..e17e93191f 100644 --- a/NPCs/NormalNPCs/WulfrumSlime.cs +++ b/NPCs/NormalNPCs/WulfrumSlime.cs @@ -37,7 +37,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.playerSafe || spawnInfo.player.GetModPlayer(mod).ZoneSulphur) + if (spawnInfo.playerSafe || spawnInfo.player.GetCalamityPlayer().ZoneSulphur) { return 0f; } diff --git a/NPCs/SlimeGod/SlimeGodCore.cs b/NPCs/SlimeGod/SlimeGodCore.cs index c91e141841..88271e370e 100644 --- a/NPCs/SlimeGod/SlimeGodCore.cs +++ b/NPCs/SlimeGod/SlimeGodCore.cs @@ -342,7 +342,7 @@ namespace CalamityMod.NPCs.SlimeGod DropHelper.DropResidentEvilAmmo(npc, CalamityWorld.downedSlimeGod, 3, 1, 0); // Purified Jam is once per player, but drops for all players. - CalamityPlayer mp = Main.player[Player.FindClosest(npc.position, npc.width, npc.height)].GetModPlayer(mod); + CalamityPlayer mp = Main.player[Player.FindClosest(npc.position, npc.width, npc.height)].GetCalamityPlayer(); if (!mp.revJamDrop) { DropHelper.DropItemCondition(npc, mod.ItemType("PurifiedJam"), true, CalamityWorld.revenge && !CalamityWorld.downedSlimeGod, 6, 8); diff --git a/NPCs/SunkenSeaNPCs/BlindedAngler.cs b/NPCs/SunkenSeaNPCs/BlindedAngler.cs index d4637aff21..25f10a5d66 100644 --- a/NPCs/SunkenSeaNPCs/BlindedAngler.cs +++ b/NPCs/SunkenSeaNPCs/BlindedAngler.cs @@ -246,7 +246,7 @@ namespace CalamityMod.NPCs.SunkenSeaNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (Main.hardMode && spawnInfo.player.GetModPlayer(mod).ZoneSunkenSea && spawnInfo.water && !spawnInfo.player.GetModPlayer(mod).clamity) + if (Main.hardMode && spawnInfo.player.GetCalamityPlayer().ZoneSunkenSea && spawnInfo.water && !spawnInfo.player.GetCalamityPlayer().clamity) { return SpawnCondition.CaveJellyfish.Chance * 0.45f; } diff --git a/NPCs/SunkenSeaNPCs/Clam.cs b/NPCs/SunkenSeaNPCs/Clam.cs index 5a2b7e4793..ef006dc1e7 100644 --- a/NPCs/SunkenSeaNPCs/Clam.cs +++ b/NPCs/SunkenSeaNPCs/Clam.cs @@ -58,7 +58,7 @@ namespace CalamityMod.NPCs.SunkenSeaNPCs public override void AI() { npc.TargetClosest(true); - if (Main.player[npc.target].GetModPlayer(mod).clamity) + if (Main.player[npc.target].GetCalamityPlayer().clamity) { hitAmount = 3; hasBeenHit = true; @@ -191,7 +191,7 @@ namespace CalamityMod.NPCs.SunkenSeaNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.player.GetModPlayer(mod).ZoneSunkenSea && spawnInfo.water) + if (spawnInfo.player.GetCalamityPlayer().ZoneSunkenSea && spawnInfo.water) { return SpawnCondition.CaveJellyfish.Chance * 1.2f; } diff --git a/NPCs/SunkenSeaNPCs/EutrophicRay.cs b/NPCs/SunkenSeaNPCs/EutrophicRay.cs index 5ca7a673a5..cecfc8f0b8 100644 --- a/NPCs/SunkenSeaNPCs/EutrophicRay.cs +++ b/NPCs/SunkenSeaNPCs/EutrophicRay.cs @@ -184,7 +184,7 @@ namespace CalamityMod.NPCs.SunkenSeaNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.player.GetModPlayer(mod).ZoneSunkenSea && spawnInfo.water && !spawnInfo.player.GetModPlayer(mod).clamity) + if (spawnInfo.player.GetCalamityPlayer().ZoneSunkenSea && spawnInfo.water && !spawnInfo.player.GetCalamityPlayer().clamity) { return SpawnCondition.CaveJellyfish.Chance * 0.6f; } diff --git a/NPCs/SunkenSeaNPCs/GhostBell.cs b/NPCs/SunkenSeaNPCs/GhostBell.cs index 85bc195c7e..7e4c08e788 100644 --- a/NPCs/SunkenSeaNPCs/GhostBell.cs +++ b/NPCs/SunkenSeaNPCs/GhostBell.cs @@ -115,7 +115,7 @@ namespace CalamityMod.NPCs.SunkenSeaNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.player.GetModPlayer(mod).ZoneSunkenSea && spawnInfo.water && !spawnInfo.player.GetModPlayer(mod).clamity) + if (spawnInfo.player.GetCalamityPlayer().ZoneSunkenSea && spawnInfo.water && !spawnInfo.player.GetCalamityPlayer().clamity) { return SpawnCondition.CaveJellyfish.Chance * 0.9f; } diff --git a/NPCs/SunkenSeaNPCs/GhostBellSmall.cs b/NPCs/SunkenSeaNPCs/GhostBellSmall.cs index 6f6701bb54..15c994bf92 100644 --- a/NPCs/SunkenSeaNPCs/GhostBellSmall.cs +++ b/NPCs/SunkenSeaNPCs/GhostBellSmall.cs @@ -95,7 +95,7 @@ namespace CalamityMod.NPCs.SunkenSeaNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.player.GetModPlayer(mod).ZoneSunkenSea && spawnInfo.water && !spawnInfo.player.GetModPlayer(mod).clamity) + if (spawnInfo.player.GetCalamityPlayer().ZoneSunkenSea && spawnInfo.water && !spawnInfo.player.GetCalamityPlayer().clamity) { return SpawnCondition.CaveJellyfish.Chance * 1.5f; } diff --git a/NPCs/SunkenSeaNPCs/GiantClam.cs b/NPCs/SunkenSeaNPCs/GiantClam.cs index 51dee37cbe..3a8b0ed677 100644 --- a/NPCs/SunkenSeaNPCs/GiantClam.cs +++ b/NPCs/SunkenSeaNPCs/GiantClam.cs @@ -347,7 +347,7 @@ namespace CalamityMod.NPCs.SunkenSeaNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.player.GetModPlayer(mod).ZoneSunkenSea && spawnInfo.water && CalamityWorld.downedDesertScourge && !NPC.AnyNPCs(mod.NPCType("GiantClam"))) + if (spawnInfo.player.GetCalamityPlayer().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 7a91c5d061..f947976e0a 100644 --- a/NPCs/SunkenSeaNPCs/PrismTurtle.cs +++ b/NPCs/SunkenSeaNPCs/PrismTurtle.cs @@ -254,7 +254,7 @@ namespace CalamityMod.NPCs.SunkenSeaNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.player.GetModPlayer(mod).ZoneSunkenSea && spawnInfo.water && !spawnInfo.player.GetModPlayer(mod).clamity) + if (spawnInfo.player.GetCalamityPlayer().ZoneSunkenSea && spawnInfo.water && !spawnInfo.player.GetCalamityPlayer().clamity) { return SpawnCondition.CaveJellyfish.Chance * 0.9f; } diff --git a/NPCs/SunkenSeaNPCs/SeaFloaty.cs b/NPCs/SunkenSeaNPCs/SeaFloaty.cs index b8c6f36391..b2e4e0e18a 100644 --- a/NPCs/SunkenSeaNPCs/SeaFloaty.cs +++ b/NPCs/SunkenSeaNPCs/SeaFloaty.cs @@ -126,7 +126,7 @@ namespace CalamityMod.NPCs.SunkenSeaNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.player.GetModPlayer(mod).ZoneSunkenSea && spawnInfo.water && !spawnInfo.player.GetModPlayer(mod).clamity) + if (spawnInfo.player.GetCalamityPlayer().ZoneSunkenSea && spawnInfo.water && !spawnInfo.player.GetCalamityPlayer().clamity) { return SpawnCondition.CaveJellyfish.Chance * 0.45f; } diff --git a/NPCs/SunkenSeaNPCs/SeaMinnow.cs b/NPCs/SunkenSeaNPCs/SeaMinnow.cs index 62c3f303c1..cc07b197ec 100644 --- a/NPCs/SunkenSeaNPCs/SeaMinnow.cs +++ b/NPCs/SunkenSeaNPCs/SeaMinnow.cs @@ -199,7 +199,7 @@ namespace CalamityMod.NPCs.SunkenSeaNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.player.GetModPlayer(mod).ZoneSunkenSea && spawnInfo.water && !spawnInfo.player.GetModPlayer(mod).clamity) + if (spawnInfo.player.GetCalamityPlayer().ZoneSunkenSea && spawnInfo.water && !spawnInfo.player.GetCalamityPlayer().clamity) { return SpawnCondition.CaveJellyfish.Chance * 0.6f; } diff --git a/NPCs/SunkenSeaNPCs/SeaSerpent1.cs b/NPCs/SunkenSeaNPCs/SeaSerpent1.cs index fe107751c2..65ea0e6f55 100644 --- a/NPCs/SunkenSeaNPCs/SeaSerpent1.cs +++ b/NPCs/SunkenSeaNPCs/SeaSerpent1.cs @@ -315,8 +315,8 @@ namespace CalamityMod.NPCs.SunkenSeaNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (Main.hardMode && spawnInfo.player.GetModPlayer(mod).ZoneSunkenSea && spawnInfo.water && - !NPC.AnyNPCs(mod.NPCType("SeaSerpent1")) && !spawnInfo.player.GetModPlayer(mod).clamity && !spawnInfo.playerSafe) + if (Main.hardMode && spawnInfo.player.GetCalamityPlayer().ZoneSunkenSea && spawnInfo.water && + !NPC.AnyNPCs(mod.NPCType("SeaSerpent1")) && !spawnInfo.player.GetCalamityPlayer().clamity && !spawnInfo.playerSafe) { return SpawnCondition.CaveJellyfish.Chance * 0.3f; } diff --git a/NPCs/SupremeCalamitas/SupremeCalamitas.cs b/NPCs/SupremeCalamitas/SupremeCalamitas.cs index af9eb2d86c..1f777515a8 100644 --- a/NPCs/SupremeCalamitas/SupremeCalamitas.cs +++ b/NPCs/SupremeCalamitas/SupremeCalamitas.cs @@ -217,7 +217,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas if (!startText) { - if (Main.LocalPlayer.GetModPlayer(mod).sCalKillCount == 4) + if (Main.LocalPlayer.GetCalamityPlayer().sCalKillCount == 4) { string key = "Mods.CalamityMod.SupremeBossText12"; //kill SCal 4 times Color messageColor = Color.Orange; @@ -230,7 +230,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas NetMessage.BroadcastChatMessage(NetworkText.FromKey(key), messageColor); } } - else if (Main.LocalPlayer.GetModPlayer(mod).sCalKillCount == 1) + else if (Main.LocalPlayer.GetCalamityPlayer().sCalKillCount == 1) { string key = "Mods.CalamityMod.SupremeBossText11"; //kill SCal once Color messageColor = Color.Orange; @@ -243,9 +243,9 @@ namespace CalamityMod.NPCs.SupremeCalamitas NetMessage.BroadcastChatMessage(NetworkText.FromKey(key), messageColor); } } - if (Main.LocalPlayer.GetModPlayer(mod).sCalDeathCount < 51) + if (Main.LocalPlayer.GetCalamityPlayer().sCalDeathCount < 51) { - if (Main.LocalPlayer.GetModPlayer(mod).sCalDeathCount == 50) + if (Main.LocalPlayer.GetCalamityPlayer().sCalDeathCount == 50) { string key = "Mods.CalamityMod.SupremeBossText15"; //die 50 or more times Color messageColor = Color.Orange; @@ -258,7 +258,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas NetMessage.BroadcastChatMessage(NetworkText.FromKey(key), messageColor); } } - else if (Main.LocalPlayer.GetModPlayer(mod).sCalDeathCount > 19) + else if (Main.LocalPlayer.GetCalamityPlayer().sCalDeathCount > 19) { string key = "Mods.CalamityMod.SupremeBossText14"; //die 20 or more times Color messageColor = Color.Orange; @@ -271,7 +271,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas NetMessage.BroadcastChatMessage(NetworkText.FromKey(key), messageColor); } } - else if (Main.LocalPlayer.GetModPlayer(mod).sCalDeathCount > 4) + else if (Main.LocalPlayer.GetCalamityPlayer().sCalDeathCount > 4) { string key = "Mods.CalamityMod.SupremeBossText13"; //die 5 or more times Color messageColor = Color.Orange; @@ -1999,8 +1999,8 @@ namespace CalamityMod.NPCs.SupremeCalamitas DeathMessage(); // Incrase the player's SCal kill count - if (Main.player[npc.target].GetModPlayer(mod).sCalKillCount < 5) - Main.player[npc.target].GetModPlayer(mod).sCalKillCount++; + if (Main.player[npc.target].GetCalamityPlayer().sCalKillCount < 5) + Main.player[npc.target].GetCalamityPlayer().sCalKillCount++; // Materials int essenceMin = Main.expertMode ? 30 : 20; @@ -2049,9 +2049,9 @@ namespace CalamityMod.NPCs.SupremeCalamitas string key; // If the player has never killed SCal before, comment on how many attempts it took - if (Main.player[npc.target].GetModPlayer(mod).sCalKillCount == 0) + if (Main.player[npc.target].GetCalamityPlayer().sCalKillCount == 0) { - switch (Main.LocalPlayer.GetModPlayer(mod).sCalDeathCount) + switch (Main.LocalPlayer.GetCalamityPlayer().sCalDeathCount) { case 0: key = "Mods.CalamityMod.SupremeBossText16"; diff --git a/Projectiles/Amidias/HermitCrab.cs b/Projectiles/Amidias/HermitCrab.cs index a2427df035..8d8c117bcb 100644 --- a/Projectiles/Amidias/HermitCrab.cs +++ b/Projectiles/Amidias/HermitCrab.cs @@ -65,7 +65,7 @@ namespace CalamityMod.Projectiles.Amidias } bool flag64 = projectile.type == mod.ProjectileType("HermitCrab"); Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); player.AddBuff(mod.BuffType("HermitCrab"), 3600); if (flag64) { diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 6b0059be74..53cec4da43 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -1227,7 +1227,7 @@ namespace CalamityMod.Projectiles #region Drawing public override Color? GetAlpha(Projectile projectile, Color lightColor) { - if (Main.player[Main.myPlayer].GetModPlayer(mod).trippy) + if (Main.player[Main.myPlayer].GetCalamityPlayer().trippy) return new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB, projectile.alpha); if (projectile.type == ProjectileID.PinkLaser) @@ -1243,7 +1243,7 @@ namespace CalamityMod.Projectiles public override bool PreDraw(Projectile projectile, SpriteBatch spriteBatch, Color lightColor) { - if (Main.player[Main.myPlayer].GetModPlayer(mod).trippy) + if (Main.player[Main.myPlayer].GetCalamityPlayer().trippy) { Texture2D texture = Main.projectileTexture[projectile.type]; SpriteEffects spriteEffects = SpriteEffects.None; diff --git a/Projectiles/Patreon/Akato.cs b/Projectiles/Patreon/Akato.cs index b39b701a14..37d5015e01 100644 --- a/Projectiles/Patreon/Akato.cs +++ b/Projectiles/Patreon/Akato.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Projectiles.Patreon projectile.active = false; return; } - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (player.dead) { modPlayer.akato = false; diff --git a/Projectiles/Patreon/MiniGuardianAttack.cs b/Projectiles/Patreon/MiniGuardianAttack.cs index adf65ce68f..30d8ed9755 100644 --- a/Projectiles/Patreon/MiniGuardianAttack.cs +++ b/Projectiles/Patreon/MiniGuardianAttack.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Projectiles.Patreon public override void AI() { Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (player.dead) { modPlayer.gOffense = false; diff --git a/Projectiles/Patreon/MiniGuardianDefense.cs b/Projectiles/Patreon/MiniGuardianDefense.cs index f80b283624..d77ea160ab 100644 --- a/Projectiles/Patreon/MiniGuardianDefense.cs +++ b/Projectiles/Patreon/MiniGuardianDefense.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Projectiles.Patreon public override void AI() { Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (player.dead) { modPlayer.gDefense = false; diff --git a/Projectiles/Patreon/MiniGuardianHealer.cs b/Projectiles/Patreon/MiniGuardianHealer.cs index 41850c0a4a..be97e57ee9 100644 --- a/Projectiles/Patreon/MiniGuardianHealer.cs +++ b/Projectiles/Patreon/MiniGuardianHealer.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Projectiles.Patreon public override void AI() { Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (player.dead) { modPlayer.gHealer = false; diff --git a/Projectiles/Patreon/PerforaMini.cs b/Projectiles/Patreon/PerforaMini.cs index edc2e75913..4aba8bab62 100644 --- a/Projectiles/Patreon/PerforaMini.cs +++ b/Projectiles/Patreon/PerforaMini.cs @@ -45,7 +45,7 @@ namespace CalamityMod.Projectiles.Patreon projectile.Kill(); } - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (player.dead) { modPlayer.perfmini = false; diff --git a/Projectiles/Patreon/PinkButterfly.cs b/Projectiles/Patreon/PinkButterfly.cs index e0c2e3c161..85fbcc34dc 100644 --- a/Projectiles/Patreon/PinkButterfly.cs +++ b/Projectiles/Patreon/PinkButterfly.cs @@ -79,7 +79,7 @@ namespace CalamityMod.Projectiles.Patreon float num636 = 150f; bool flag64 = projectile.type == mod.ProjectileType("PinkButterfly"); Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); player.AddBuff(mod.BuffType("ResurrectionButterflyBuff"), 3600); if (flag64) { diff --git a/Projectiles/Patreon/PurpleButterfly.cs b/Projectiles/Patreon/PurpleButterfly.cs index 330a838f7c..379ff63997 100644 --- a/Projectiles/Patreon/PurpleButterfly.cs +++ b/Projectiles/Patreon/PurpleButterfly.cs @@ -81,7 +81,7 @@ namespace CalamityMod.Projectiles.Patreon float num636 = 150f; bool flag64 = projectile.type == mod.ProjectileType("PurpleButterfly"); Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); player.AddBuff(mod.BuffType("ResurrectionButterflyBuff"), 3600); if (flag64) { diff --git a/Projectiles/Pets/Bear.cs b/Projectiles/Pets/Bear.cs index 59882ea311..eea739153c 100644 --- a/Projectiles/Pets/Bear.cs +++ b/Projectiles/Pets/Bear.cs @@ -50,7 +50,7 @@ namespace CalamityMod.Projectiles.Pets projectile.active = false; return; } - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (player.dead) { modPlayer.bearPet = false; diff --git a/Projectiles/Pets/Brimling.cs b/Projectiles/Pets/Brimling.cs index 2c0a1f7142..46c7232054 100644 --- a/Projectiles/Pets/Brimling.cs +++ b/Projectiles/Pets/Brimling.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Projectiles.Pets projectile.active = false; return; } - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (player.dead) { modPlayer.brimling = false; diff --git a/Projectiles/Pets/ChibiiDoggo.cs b/Projectiles/Pets/ChibiiDoggo.cs index d6bd06847a..03399539aa 100644 --- a/Projectiles/Pets/ChibiiDoggo.cs +++ b/Projectiles/Pets/ChibiiDoggo.cs @@ -132,7 +132,7 @@ namespace CalamityMod.Projectiles.Pets projectile.type = trueType; //asserts real type after running black Cat AI 26 (ensures chibii pet isnt drawn as black cat and other weird stuff) Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (player.dead) { modPlayer.chibii = false; diff --git a/Projectiles/Pets/DannyDevito.cs b/Projectiles/Pets/DannyDevito.cs index 4c786fffde..05d7e3dcc5 100644 --- a/Projectiles/Pets/DannyDevito.cs +++ b/Projectiles/Pets/DannyDevito.cs @@ -47,7 +47,7 @@ namespace CalamityMod.Projectiles.Pets projectile.active = false; return; } - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (player.dead) { modPlayer.trashMan = false; diff --git a/Projectiles/Pets/Fox.cs b/Projectiles/Pets/Fox.cs index 5149139d16..f9190ef007 100644 --- a/Projectiles/Pets/Fox.cs +++ b/Projectiles/Pets/Fox.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Projectiles.Pets projectile.active = false; return; } - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (player.dead) { modPlayer.fox = false; diff --git a/Projectiles/Pets/Kendra.cs b/Projectiles/Pets/Kendra.cs index 10d4ce69aa..f438372de5 100644 --- a/Projectiles/Pets/Kendra.cs +++ b/Projectiles/Pets/Kendra.cs @@ -51,7 +51,7 @@ namespace CalamityMod.Projectiles.Pets projectile.active = false; return; } - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (player.dead) { modPlayer.kendra = false; diff --git a/Projectiles/Pets/Levi.cs b/Projectiles/Pets/Levi.cs index 0b4a4d26c1..c492115e7d 100644 --- a/Projectiles/Pets/Levi.cs +++ b/Projectiles/Pets/Levi.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Projectiles.Pets projectile.active = false; return; } - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (player.dead) { modPlayer.leviPet = false; diff --git a/Projectiles/Pets/SirenYoung.cs b/Projectiles/Pets/SirenYoung.cs index f340fcfb02..596dc6c5cf 100644 --- a/Projectiles/Pets/SirenYoung.cs +++ b/Projectiles/Pets/SirenYoung.cs @@ -39,7 +39,7 @@ namespace CalamityMod.Projectiles.Pets projectile.active = false; return; } - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (player.dead) { modPlayer.sirenPet = false; diff --git a/Projectiles/Pets/ThirdSage.cs b/Projectiles/Pets/ThirdSage.cs index eab40a5d1c..1dab212859 100644 --- a/Projectiles/Pets/ThirdSage.cs +++ b/Projectiles/Pets/ThirdSage.cs @@ -40,7 +40,7 @@ namespace CalamityMod.Projectiles.Pets projectile.active = false; return; } - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (player.dead) { modPlayer.thirdSage = false; diff --git a/Projectiles/Rogue/ScarletDevilProjectile.cs b/Projectiles/Rogue/ScarletDevilProjectile.cs index 4b3f2c8782..7d81336dc3 100644 --- a/Projectiles/Rogue/ScarletDevilProjectile.cs +++ b/Projectiles/Rogue/ScarletDevilProjectile.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Projectiles.Rogue public override void AI() { - CalamityPlayer modPlayer = Main.player[Main.myPlayer].GetModPlayer(mod); + CalamityPlayer modPlayer = Main.player[Main.myPlayer].GetCalamityPlayer(); Lighting.AddLight(projectile.Center, 0.55f, 0.25f, 0f); projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 0.785f; Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 130, projectile.velocity.X * 0.25f, projectile.velocity.Y * 0.25f, 0, new Color(255, 255, 255), 0.85f); diff --git a/Projectiles/Shrines/GladiatorSword.cs b/Projectiles/Shrines/GladiatorSword.cs index de3d48435f..27fc3d8f92 100644 --- a/Projectiles/Shrines/GladiatorSword.cs +++ b/Projectiles/Shrines/GladiatorSword.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Projectiles.Shrines { bool flag64 = projectile.type == mod.ProjectileType("GladiatorSword"); Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (!modPlayer.gladiatorSword) { projectile.active = false; diff --git a/Projectiles/Shrines/GladiatorSword2.cs b/Projectiles/Shrines/GladiatorSword2.cs index acf63e8ead..cb54a8803b 100644 --- a/Projectiles/Shrines/GladiatorSword2.cs +++ b/Projectiles/Shrines/GladiatorSword2.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Projectiles.Shrines { bool flag64 = projectile.type == mod.ProjectileType("GladiatorSword2"); Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (!modPlayer.gladiatorSword) { projectile.active = false; diff --git a/Projectiles/Shrines/LuxorsGiftSummon.cs b/Projectiles/Shrines/LuxorsGiftSummon.cs index 7bf4f224cd..bdc41195d5 100644 --- a/Projectiles/Shrines/LuxorsGiftSummon.cs +++ b/Projectiles/Shrines/LuxorsGiftSummon.cs @@ -88,7 +88,7 @@ namespace CalamityMod.Projectiles.Shrines float num636 = 150f; bool flag64 = projectile.type == mod.ProjectileType("LuxorsGiftSummon"); Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (flag64) { if (!modPlayer.luxorsGift || player.dead) diff --git a/Projectiles/Summon/AngryChicken.cs b/Projectiles/Summon/AngryChicken.cs index 8b4092ed0d..652e147880 100644 --- a/Projectiles/Summon/AngryChicken.cs +++ b/Projectiles/Summon/AngryChicken.cs @@ -71,7 +71,7 @@ namespace CalamityMod.Projectiles.Summon Lighting.AddLight(projectile.Center, 1.2f * num, 0.8f * num, 0f * num); bool flag64 = projectile.type == mod.ProjectileType("AngryChicken"); Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); player.AddBuff(mod.BuffType("AngryChicken"), 3600); if (flag64) { diff --git a/Projectiles/Summon/AquaticStar.cs b/Projectiles/Summon/AquaticStar.cs index 493f39541c..94034123b2 100644 --- a/Projectiles/Summon/AquaticStar.cs +++ b/Projectiles/Summon/AquaticStar.cs @@ -63,7 +63,7 @@ namespace CalamityMod.Projectiles.Summon projectile.rotation += projectile.velocity.X * 0.04f; bool flag64 = projectile.type == mod.ProjectileType("AquaticStar"); Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); player.AddBuff(mod.BuffType("AquaticStar"), 3600); if (flag64) { diff --git a/Projectiles/Summon/BigBustyRose.cs b/Projectiles/Summon/BigBustyRose.cs index 6acbf4518d..8c76860cb6 100644 --- a/Projectiles/Summon/BigBustyRose.cs +++ b/Projectiles/Summon/BigBustyRose.cs @@ -45,7 +45,7 @@ namespace CalamityMod.Projectiles.Summon { bool flag64 = projectile.type == mod.ProjectileType("BigBustyRose"); Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (!modPlayer.brimstoneWaifu && !modPlayer.allWaifus) { projectile.active = false; diff --git a/Projectiles/Summon/BloodClotMinion.cs b/Projectiles/Summon/BloodClotMinion.cs index 0034c088dd..ee66173ab2 100644 --- a/Projectiles/Summon/BloodClotMinion.cs +++ b/Projectiles/Summon/BloodClotMinion.cs @@ -75,7 +75,7 @@ namespace CalamityMod.Projectiles.Summon } bool flag64 = projectile.type == mod.ProjectileType("BloodClotMinion"); Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); player.AddBuff(mod.BuffType("BloodClot"), 3600); if (flag64) { diff --git a/Projectiles/Summon/BrittleStar.cs b/Projectiles/Summon/BrittleStar.cs index 5067578a7e..24f0cf2b25 100644 --- a/Projectiles/Summon/BrittleStar.cs +++ b/Projectiles/Summon/BrittleStar.cs @@ -63,7 +63,7 @@ namespace CalamityMod.Projectiles.Summon projectile.rotation += projectile.velocity.X * 0.04f; bool flag64 = projectile.type == mod.ProjectileType("BrittleStar"); Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); player.AddBuff(mod.BuffType("BrittleStar"), 3600); if (flag64) { diff --git a/Projectiles/Summon/Calamari.cs b/Projectiles/Summon/Calamari.cs index 058dc57784..3d71fa5ba1 100644 --- a/Projectiles/Summon/Calamari.cs +++ b/Projectiles/Summon/Calamari.cs @@ -73,7 +73,7 @@ namespace CalamityMod.Projectiles.Summon } bool flag64 = projectile.type == mod.ProjectileType("Calamari"); Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); player.AddBuff(mod.BuffType("Calamari"), 3600); if (flag64) { diff --git a/Projectiles/Summon/Calamitamini.cs b/Projectiles/Summon/Calamitamini.cs index b4563d5aac..b3303f7ef7 100644 --- a/Projectiles/Summon/Calamitamini.cs +++ b/Projectiles/Summon/Calamitamini.cs @@ -64,7 +64,7 @@ namespace CalamityMod.Projectiles.Summon float num636 = 150f; bool flag64 = projectile.type == mod.ProjectileType("Calamitamini"); Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); player.AddBuff(mod.BuffType("CalamitasEyes"), 3600); if (flag64) { diff --git a/Projectiles/Summon/Cataclymini.cs b/Projectiles/Summon/Cataclymini.cs index 11aed55756..24dc48a465 100644 --- a/Projectiles/Summon/Cataclymini.cs +++ b/Projectiles/Summon/Cataclymini.cs @@ -64,7 +64,7 @@ namespace CalamityMod.Projectiles.Summon float num636 = 150f; bool flag64 = projectile.type == mod.ProjectileType("Cataclymini"); Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (flag64) { if (player.dead) diff --git a/Projectiles/Summon/Catastromini.cs b/Projectiles/Summon/Catastromini.cs index 5e36d7f423..0b454e5572 100644 --- a/Projectiles/Summon/Catastromini.cs +++ b/Projectiles/Summon/Catastromini.cs @@ -64,7 +64,7 @@ namespace CalamityMod.Projectiles.Summon float num636 = 150f; bool flag64 = projectile.type == mod.ProjectileType("Catastromini"); Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (flag64) { if (player.dead) diff --git a/Projectiles/Summon/ChaosSpirit.cs b/Projectiles/Summon/ChaosSpirit.cs index 5a04fd2249..97911f60e8 100644 --- a/Projectiles/Summon/ChaosSpirit.cs +++ b/Projectiles/Summon/ChaosSpirit.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Projectiles.Summon { bool flag64 = projectile.type == mod.ProjectileType("ChaosSpirit"); Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (!modPlayer.chaosSpirit) { projectile.active = false; diff --git a/Projectiles/Summon/CloudyWaifu.cs b/Projectiles/Summon/CloudyWaifu.cs index ee69ec0818..bdfb58dc46 100644 --- a/Projectiles/Summon/CloudyWaifu.cs +++ b/Projectiles/Summon/CloudyWaifu.cs @@ -45,7 +45,7 @@ namespace CalamityMod.Projectiles.Summon { bool flag64 = projectile.type == mod.ProjectileType("CloudyWaifu"); Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (!modPlayer.cloudWaifu && !modPlayer.allWaifus) { projectile.active = false; diff --git a/Projectiles/Summon/Corroslime.cs b/Projectiles/Summon/Corroslime.cs index 0e853f6f0d..87c4303f20 100644 --- a/Projectiles/Summon/Corroslime.cs +++ b/Projectiles/Summon/Corroslime.cs @@ -72,7 +72,7 @@ namespace CalamityMod.Projectiles.Summon } bool flag64 = projectile.type == mod.ProjectileType("Corroslime"); Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); player.AddBuff(mod.BuffType("Corroslime"), 3600); if (flag64) { diff --git a/Projectiles/Summon/CosmicEnergy.cs b/Projectiles/Summon/CosmicEnergy.cs index b3f2f86a18..a86b1f5bab 100644 --- a/Projectiles/Summon/CosmicEnergy.cs +++ b/Projectiles/Summon/CosmicEnergy.cs @@ -53,7 +53,7 @@ namespace CalamityMod.Projectiles.Summon } bool flag64 = projectile.type == mod.ProjectileType("CosmicEnergy"); Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); player.AddBuff(mod.BuffType("CosmicEnergy"), 3600); if (flag64) { diff --git a/Projectiles/Summon/Cosmilamp.cs b/Projectiles/Summon/Cosmilamp.cs index cb4a796466..248bfd5b66 100644 --- a/Projectiles/Summon/Cosmilamp.cs +++ b/Projectiles/Summon/Cosmilamp.cs @@ -69,7 +69,7 @@ namespace CalamityMod.Projectiles.Summon Main.dust[num1262].noGravity = true; bool flag64 = projectile.type == mod.ProjectileType("Cosmilamp"); Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); player.AddBuff(mod.BuffType("Cosmilamp"), 3600); if (flag64) { diff --git a/Projectiles/Summon/Crimslime.cs b/Projectiles/Summon/Crimslime.cs index a109da9cff..a39c5b1fd1 100644 --- a/Projectiles/Summon/Crimslime.cs +++ b/Projectiles/Summon/Crimslime.cs @@ -72,7 +72,7 @@ namespace CalamityMod.Projectiles.Summon } bool flag64 = projectile.type == mod.ProjectileType("Crimslime"); Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); player.AddBuff(mod.BuffType("Crimslime"), 3600); if (flag64) { diff --git a/Projectiles/Summon/DaedalusCrystal.cs b/Projectiles/Summon/DaedalusCrystal.cs index d9156eb460..1fd9923fd3 100644 --- a/Projectiles/Summon/DaedalusCrystal.cs +++ b/Projectiles/Summon/DaedalusCrystal.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Projectiles.Summon { bool flag64 = projectile.type == mod.ProjectileType("DaedalusCrystal"); Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (!modPlayer.daedalusCrystal) { projectile.active = false; diff --git a/Projectiles/Summon/DankCreeper.cs b/Projectiles/Summon/DankCreeper.cs index 3ce489cba6..22396b54e2 100644 --- a/Projectiles/Summon/DankCreeper.cs +++ b/Projectiles/Summon/DankCreeper.cs @@ -64,7 +64,7 @@ namespace CalamityMod.Projectiles.Summon } bool flag64 = projectile.type == mod.ProjectileType("DankCreeper"); Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); player.AddBuff(mod.BuffType("DankCreeper"), 3600); if (flag64) { diff --git a/Projectiles/Summon/DrewsSandyWaifu.cs b/Projectiles/Summon/DrewsSandyWaifu.cs index 71c7942d6a..ff322c9c14 100644 --- a/Projectiles/Summon/DrewsSandyWaifu.cs +++ b/Projectiles/Summon/DrewsSandyWaifu.cs @@ -45,7 +45,7 @@ namespace CalamityMod.Projectiles.Summon { bool flag64 = projectile.type == mod.ProjectileType("DrewsSandyWaifu"); Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (!modPlayer.sandBoobWaifu && !modPlayer.allWaifus) { projectile.active = false; diff --git a/Projectiles/Summon/ElementalAxe.cs b/Projectiles/Summon/ElementalAxe.cs index cb55bb9a8e..2ed9b28c1c 100644 --- a/Projectiles/Summon/ElementalAxe.cs +++ b/Projectiles/Summon/ElementalAxe.cs @@ -50,7 +50,7 @@ namespace CalamityMod.Projectiles.Summon } bool flag64 = (projectile.type == mod.ProjectileType("ElementalAxe")); Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (flag64) { if (player.dead) diff --git a/Projectiles/Summon/FungalClump.cs b/Projectiles/Summon/FungalClump.cs index de2bfc0015..35f11d9975 100644 --- a/Projectiles/Summon/FungalClump.cs +++ b/Projectiles/Summon/FungalClump.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Projectiles.Summon { bool flag64 = projectile.type == mod.ProjectileType("FungalClump"); Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (!modPlayer.fungalClump) { projectile.active = false; diff --git a/Projectiles/Summon/Herring.cs b/Projectiles/Summon/Herring.cs index 78569f099f..7901a37603 100644 --- a/Projectiles/Summon/Herring.cs +++ b/Projectiles/Summon/Herring.cs @@ -81,7 +81,7 @@ namespace CalamityMod.Projectiles.Summon float num636 = 150f; bool flag64 = projectile.type == mod.ProjectileType("Herring"); Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); player.AddBuff(mod.BuffType("Herring"), 3600); if (flag64) { diff --git a/Projectiles/Summon/IceClasper.cs b/Projectiles/Summon/IceClasper.cs index 2b3fc8c264..fdf82b0753 100644 --- a/Projectiles/Summon/IceClasper.cs +++ b/Projectiles/Summon/IceClasper.cs @@ -77,7 +77,7 @@ namespace CalamityMod.Projectiles.Summon float num636 = 150f; bool flag64 = projectile.type == mod.ProjectileType("IceClasper"); Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); player.AddBuff(mod.BuffType("IceClasper"), 3600); if (flag64) { diff --git a/Projectiles/Summon/MechwormBody.cs b/Projectiles/Summon/MechwormBody.cs index 0a86fc2a38..9a9479c6e7 100644 --- a/Projectiles/Summon/MechwormBody.cs +++ b/Projectiles/Summon/MechwormBody.cs @@ -48,7 +48,7 @@ namespace CalamityMod.Projectiles.Summon runCheck = false; playerMinionSlots = player9.maxMinions; } - CalamityPlayer modPlayer = player9.GetModPlayer(mod); + CalamityPlayer modPlayer = player9.GetCalamityPlayer(); if ((int)Main.time % 120 == 0) { projectile.netUpdate = true; diff --git a/Projectiles/Summon/MechwormBody2.cs b/Projectiles/Summon/MechwormBody2.cs index bf1f8303f7..f62f0d51eb 100644 --- a/Projectiles/Summon/MechwormBody2.cs +++ b/Projectiles/Summon/MechwormBody2.cs @@ -48,7 +48,7 @@ namespace CalamityMod.Projectiles.Summon runCheck = false; playerMinionSlots = player9.maxMinions; } - CalamityPlayer modPlayer = player9.GetModPlayer(mod); + CalamityPlayer modPlayer = player9.GetCalamityPlayer(); if ((int)Main.time % 120 == 0) { projectile.netUpdate = true; diff --git a/Projectiles/Summon/MechwormHead.cs b/Projectiles/Summon/MechwormHead.cs index 553ef3ce34..16e6b3537e 100644 --- a/Projectiles/Summon/MechwormHead.cs +++ b/Projectiles/Summon/MechwormHead.cs @@ -62,7 +62,7 @@ namespace CalamityMod.Projectiles.Summon runCheck = false; playerMinionSlots = player9.maxMinions; } - CalamityPlayer modPlayer = player9.GetModPlayer(mod); + CalamityPlayer modPlayer = player9.GetCalamityPlayer(); player9.AddBuff(mod.BuffType("Mechworm"), 3600); if ((int)Main.time % 120 == 0) { diff --git a/Projectiles/Summon/MechwormTail.cs b/Projectiles/Summon/MechwormTail.cs index 6636888ed3..a0bd5fb4f6 100644 --- a/Projectiles/Summon/MechwormTail.cs +++ b/Projectiles/Summon/MechwormTail.cs @@ -48,7 +48,7 @@ namespace CalamityMod.Projectiles.Summon runCheck = false; playerMinionSlots = player9.maxMinions; } - CalamityPlayer modPlayer = player9.GetModPlayer(mod); + CalamityPlayer modPlayer = player9.GetCalamityPlayer(); if ((int)Main.time % 120 == 0) { projectile.netUpdate = true; diff --git a/Projectiles/Summon/PhantomGuy.cs b/Projectiles/Summon/PhantomGuy.cs index 1c894ffc88..65de5ce00a 100644 --- a/Projectiles/Summon/PhantomGuy.cs +++ b/Projectiles/Summon/PhantomGuy.cs @@ -62,7 +62,7 @@ namespace CalamityMod.Projectiles.Summon float num636 = 600f; bool flag64 = projectile.type == mod.ProjectileType("PhantomGuy"); Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); player.AddBuff(mod.BuffType("Phantom"), 3600); if (flag64) { diff --git a/Projectiles/Summon/ReaverOrb.cs b/Projectiles/Summon/ReaverOrb.cs index 4c0aa79dfd..5ea922c60a 100644 --- a/Projectiles/Summon/ReaverOrb.cs +++ b/Projectiles/Summon/ReaverOrb.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Projectiles.Summon { bool flag64 = projectile.type == mod.ProjectileType("ReaverOrb"); Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (!modPlayer.reaverOrb) { projectile.active = false; diff --git a/Projectiles/Summon/RedDevil.cs b/Projectiles/Summon/RedDevil.cs index eff64f3c94..51b62861bb 100644 --- a/Projectiles/Summon/RedDevil.cs +++ b/Projectiles/Summon/RedDevil.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Projectiles.Summon { bool flag64 = projectile.type == mod.ProjectileType("RedDevil"); Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (!modPlayer.redDevil) { projectile.active = false; diff --git a/Projectiles/Summon/Sandnado.cs b/Projectiles/Summon/Sandnado.cs index 8e1e641698..442bfd5610 100644 --- a/Projectiles/Summon/Sandnado.cs +++ b/Projectiles/Summon/Sandnado.cs @@ -63,7 +63,7 @@ namespace CalamityMod.Projectiles.Summon } bool flag64 = projectile.type == mod.ProjectileType("Sandnado"); Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); player.AddBuff(mod.BuffType("Sandnado"), 3600); if (flag64) { diff --git a/Projectiles/Summon/SandyWaifu.cs b/Projectiles/Summon/SandyWaifu.cs index f7b34d3e15..aedd5c5f32 100644 --- a/Projectiles/Summon/SandyWaifu.cs +++ b/Projectiles/Summon/SandyWaifu.cs @@ -45,7 +45,7 @@ namespace CalamityMod.Projectiles.Summon { bool flag64 = projectile.type == mod.ProjectileType("SandyWaifu"); Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (!modPlayer.sandWaifu && !modPlayer.allWaifus) { projectile.active = false; diff --git a/Projectiles/Summon/SilvaCrystal.cs b/Projectiles/Summon/SilvaCrystal.cs index f87b8aa5c4..540e40bfde 100644 --- a/Projectiles/Summon/SilvaCrystal.cs +++ b/Projectiles/Summon/SilvaCrystal.cs @@ -50,7 +50,7 @@ namespace CalamityMod.Projectiles.Summon } bool flag64 = projectile.type == mod.ProjectileType("SilvaCrystal"); Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (!modPlayer.silvaSummon) { projectile.active = false; diff --git a/Projectiles/Summon/SirenLure.cs b/Projectiles/Summon/SirenLure.cs index e660a7af95..4380e07c17 100644 --- a/Projectiles/Summon/SirenLure.cs +++ b/Projectiles/Summon/SirenLure.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Projectiles.Summon { bool flag64 = projectile.type == mod.ProjectileType("SirenLure"); Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (!modPlayer.sirenWaifu && !modPlayer.allWaifus) { projectile.active = false; diff --git a/Projectiles/Summon/SlimeGod.cs b/Projectiles/Summon/SlimeGod.cs index 8ded49ecca..177161f1f3 100644 --- a/Projectiles/Summon/SlimeGod.cs +++ b/Projectiles/Summon/SlimeGod.cs @@ -71,7 +71,7 @@ namespace CalamityMod.Projectiles.Summon } bool flag64 = projectile.type == mod.ProjectileType("SlimeGod"); Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); player.AddBuff(mod.BuffType("SlimeGod"), 3600); if (!modPlayer.slimeGod) { diff --git a/Projectiles/Summon/SlimeGodAlt.cs b/Projectiles/Summon/SlimeGodAlt.cs index eed0bf34d0..df97970631 100644 --- a/Projectiles/Summon/SlimeGodAlt.cs +++ b/Projectiles/Summon/SlimeGodAlt.cs @@ -71,7 +71,7 @@ namespace CalamityMod.Projectiles.Summon } bool flag64 = projectile.type == mod.ProjectileType("SlimeGodAlt"); Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); player.AddBuff(mod.BuffType("SlimeGod"), 3600); if (!modPlayer.slimeGod) { diff --git a/Projectiles/Summon/SolarGod.cs b/Projectiles/Summon/SolarGod.cs index 101d655a52..b3e15781f1 100644 --- a/Projectiles/Summon/SolarGod.cs +++ b/Projectiles/Summon/SolarGod.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Projectiles.Summon Lighting.AddLight(projectile.Center, ((255 - projectile.alpha) * 0.5f) / 255f, ((255 - projectile.alpha) * 0.5f) / 255f, ((255 - projectile.alpha) * 0f) / 255f); bool flag64 = projectile.type == mod.ProjectileType("SolarGod"); Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); player.AddBuff(mod.BuffType("SolarSpiritGod"), 3600); if (flag64) { diff --git a/Projectiles/Summon/SolarPixie.cs b/Projectiles/Summon/SolarPixie.cs index f1c395fe51..435ebdd56e 100644 --- a/Projectiles/Summon/SolarPixie.cs +++ b/Projectiles/Summon/SolarPixie.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Projectiles.Summon Lighting.AddLight(projectile.Center, ((255 - projectile.alpha) * 0.25f) / 255f, ((255 - projectile.alpha) * 0.25f) / 255f, ((255 - projectile.alpha) * 0f) / 255f); bool flag64 = projectile.type == mod.ProjectileType("SolarPixie"); Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); player.AddBuff(mod.BuffType("SolarSpirit"), 3600); if (flag64) { diff --git a/Projectiles/Summon/Urchin.cs b/Projectiles/Summon/Urchin.cs index 93e0c78930..8ac8cf1642 100644 --- a/Projectiles/Summon/Urchin.cs +++ b/Projectiles/Summon/Urchin.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Projectiles.Summon { bool flag64 = projectile.type == mod.ProjectileType("Urchin"); Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (!modPlayer.urchin) { projectile.active = false; diff --git a/Projectiles/Summon/Valkyrie.cs b/Projectiles/Summon/Valkyrie.cs index abb16fab1b..45eb82886d 100644 --- a/Projectiles/Summon/Valkyrie.cs +++ b/Projectiles/Summon/Valkyrie.cs @@ -39,7 +39,7 @@ namespace CalamityMod.Projectiles.Summon { bool flag64 = projectile.type == mod.ProjectileType("Valkyrie"); Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); if (!modPlayer.valkyrie) { projectile.active = false; diff --git a/Projectiles/SunkenSea/Shellfish.cs b/Projectiles/SunkenSea/Shellfish.cs index bd927815c6..47c4ece711 100644 --- a/Projectiles/SunkenSea/Shellfish.cs +++ b/Projectiles/SunkenSea/Shellfish.cs @@ -58,7 +58,7 @@ namespace CalamityMod.Projectiles.SunkenSea } bool flag64 = projectile.type == mod.ProjectileType("Shellfish"); Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.GetModPlayer(mod); + CalamityPlayer modPlayer = player.GetCalamityPlayer(); player.AddBuff(mod.BuffType("Shellfish"), 3600); if (flag64) { diff --git a/Waters/AbyssWater.cs b/Waters/AbyssWater.cs index a2e1d91a66..c88f2a7647 100644 --- a/Waters/AbyssWater.cs +++ b/Waters/AbyssWater.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Waters { public override bool ChooseWaterStyle() { - return Main.LocalPlayer.GetModPlayer(mod).ZoneAbyss; + return Main.LocalPlayer.GetCalamityPlayer().ZoneAbyss; } public override int ChooseWaterfallStyle() diff --git a/Waters/AstralWater.cs b/Waters/AstralWater.cs index 8e6b81cc6c..81355ce230 100644 --- a/Waters/AstralWater.cs +++ b/Waters/AstralWater.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Waters { public override bool ChooseWaterStyle() { - return Main.LocalPlayer.GetModPlayer(mod).ZoneAstral; + return Main.LocalPlayer.GetCalamityPlayer().ZoneAstral; } public override int ChooseWaterfallStyle() diff --git a/Waters/SulphuricWater.cs b/Waters/SulphuricWater.cs index af32cb58d0..7d0a8ae89d 100644 --- a/Waters/SulphuricWater.cs +++ b/Waters/SulphuricWater.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Waters { public override bool ChooseWaterStyle() { - return Main.LocalPlayer.GetModPlayer(mod).ZoneSulphur; + return Main.LocalPlayer.GetCalamityPlayer().ZoneSulphur; } public override int ChooseWaterfallStyle() diff --git a/Waters/SunkenSeaWater.cs b/Waters/SunkenSeaWater.cs index 50f9393100..ea84d429d7 100644 --- a/Waters/SunkenSeaWater.cs +++ b/Waters/SunkenSeaWater.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Waters { public override bool ChooseWaterStyle() { - return Main.LocalPlayer.GetModPlayer(mod).ZoneSunkenSea; + return Main.LocalPlayer.GetCalamityPlayer().ZoneSunkenSea; } public override int ChooseWaterfallStyle() diff --git a/World/CalamityWorld.cs b/World/CalamityWorld.cs index cda9926b7d..d308b1d258 100644 --- a/World/CalamityWorld.cs +++ b/World/CalamityWorld.cs @@ -1023,11 +1023,11 @@ namespace CalamityMod.World !Main.player[closestPlayer].ZoneUnderworldHeight && !Main.player[closestPlayer].ZoneDungeon && !Main.player[closestPlayer].ZoneJungle && - !Main.player[closestPlayer].GetModPlayer(mod).ZoneSunkenSea && + !Main.player[closestPlayer].GetCalamityPlayer().ZoneSunkenSea && !CalamityPlayer.areThereAnyDamnBosses) { if (NPC.downedPlantBoss && - !Main.player[closestPlayer].GetModPlayer(mod).ZoneAbyss && + !Main.player[closestPlayer].GetCalamityPlayer().ZoneAbyss && Main.player[closestPlayer].townNPCs < 3f) { double spawnRate = 100000D; @@ -1040,18 +1040,18 @@ namespace CalamityMod.World if (demonMode) spawnRate *= 0.75D; - if (Main.player[closestPlayer].GetModPlayer(mod).zerg && Main.player[closestPlayer].GetModPlayer(mod).chaosCandle) + if (Main.player[closestPlayer].GetCalamityPlayer().zerg && Main.player[closestPlayer].GetCalamityPlayer().chaosCandle) spawnRate *= 0.005D; - else if (Main.player[closestPlayer].GetModPlayer(mod).zerg) + else if (Main.player[closestPlayer].GetCalamityPlayer().zerg) spawnRate *= 0.01D; - else if (Main.player[closestPlayer].GetModPlayer(mod).chaosCandle) + else if (Main.player[closestPlayer].GetCalamityPlayer().chaosCandle) spawnRate *= 0.02D; - if (Main.player[closestPlayer].GetModPlayer(mod).zen && Main.player[closestPlayer].GetModPlayer(mod).tranquilityCandle) + if (Main.player[closestPlayer].GetCalamityPlayer().zen && Main.player[closestPlayer].GetCalamityPlayer().tranquilityCandle) spawnRate *= 75D; - else if (Main.player[closestPlayer].GetModPlayer(mod).zen) + else if (Main.player[closestPlayer].GetCalamityPlayer().zen) spawnRate *= 50D; - else if (Main.player[closestPlayer].GetModPlayer(mod).tranquilityCandle) + else if (Main.player[closestPlayer].GetCalamityPlayer().tranquilityCandle) spawnRate *= 25D; int chance = (int)spawnRate; @@ -1074,7 +1074,7 @@ namespace CalamityMod.World } } } - if (Main.player[closestPlayer].GetModPlayer(mod).ZoneAbyss) + if (Main.player[closestPlayer].GetCalamityPlayer().ZoneAbyss) { if (Main.player[closestPlayer].chaosState) { @@ -1201,7 +1201,7 @@ namespace CalamityMod.World } if (!NPC.downedFishron && bossType == 0) - if (Main.player[closestPlayer].ZoneBeach && !Main.player[closestPlayer].GetModPlayer(mod).ZoneSulphur) + if (Main.player[closestPlayer].ZoneBeach && !Main.player[closestPlayer].GetCalamityPlayer().ZoneSulphur) { BossText(); bossType = NPCID.DukeFishron; @@ -1225,7 +1225,7 @@ namespace CalamityMod.World } if (!downedAstrageldon && bossType == 0) - if (Main.player[closestPlayer].GetModPlayer(mod).ZoneAstral && + if (Main.player[closestPlayer].GetCalamityPlayer().ZoneAstral && !Main.dayTime && Main.player[closestPlayer].ZoneOverworldHeight) { BossText(); @@ -1359,7 +1359,7 @@ namespace CalamityMod.World } else if (bossType == mod.NPCType("Astrageldon")) { - if (!Main.player[closestPlayer].GetModPlayer(mod).ZoneAstral || + if (!Main.player[closestPlayer].GetCalamityPlayer().ZoneAstral || Main.dayTime || !Main.player[closestPlayer].ZoneOverworldHeight) canSpawn = false; }