From 8a493d474f3de681d93513fe455e06ee2d03e23a Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Wed, 9 Oct 2019 23:17:17 -0400 Subject: [PATCH] enormous sweeping changes for 0.11.5 --- Buffs/Amidias/AmidiasBlessing.cs | 2 +- Buffs/Amidias/HermitCrab.cs | 2 +- Buffs/Amidias/SnapClamDebuff.cs | 2 +- Buffs/CalamityGlobalBuff.cs | 6 +- Buffs/DoTDebuffs/AbyssalFlames.cs | 4 +- Buffs/DoTDebuffs/AstralInfectionDebuff.cs | 4 +- Buffs/DoTDebuffs/BrimstoneFlames.cs | 4 +- Buffs/DoTDebuffs/BurningBlood.cs | 4 +- Buffs/DoTDebuffs/CrushDepth.cs | 4 +- Buffs/DoTDebuffs/DemonFlames.cs | 2 +- Buffs/DoTDebuffs/GodSlayerInferno.cs | 4 +- Buffs/DoTDebuffs/HolyInferno.cs | 2 +- Buffs/DoTDebuffs/HolyLight.cs | 4 +- Buffs/DoTDebuffs/LethalLavaBurn.cs | 2 +- Buffs/DoTDebuffs/Nightwither.cs | 2 +- Buffs/DoTDebuffs/Plague.cs | 4 +- Buffs/DoTDebuffs/Shadowflame.cs | 2 +- Buffs/DoTDebuffs/Shred.cs | 2 +- Buffs/DoTDebuffs/VulnerabilityHex.cs | 2 +- Buffs/Fabsol/BloodyMary.cs | 2 +- Buffs/Fabsol/BlueSpeedCandle.cs | 2 +- Buffs/Fabsol/CaribbeanRum.cs | 2 +- Buffs/Fabsol/CinnamonRoll.cs | 2 +- Buffs/Fabsol/Everclear.cs | 2 +- Buffs/Fabsol/EvergreenGin.cs | 2 +- Buffs/Fabsol/FabsolVodka.cs | 2 +- Buffs/Fabsol/Fireball.cs | 2 +- Buffs/Fabsol/GrapeBeer.cs | 2 +- Buffs/Fabsol/Margarita.cs | 2 +- Buffs/Fabsol/Moonshine.cs | 2 +- Buffs/Fabsol/MoscowMule.cs | 2 +- Buffs/Fabsol/PinkHealthCandle.cs | 2 +- Buffs/Fabsol/PurpleDefenseCandle.cs | 2 +- Buffs/Fabsol/RedWine.cs | 2 +- Buffs/Fabsol/Rum.cs | 2 +- Buffs/Fabsol/Screwdriver.cs | 2 +- Buffs/Fabsol/StarBeamRye.cs | 2 +- Buffs/Fabsol/Tequila.cs | 2 +- Buffs/Fabsol/TequilaSunrise.cs | 2 +- Buffs/Fabsol/Trippy.cs | 2 +- Buffs/Fabsol/Vodka.cs | 2 +- Buffs/Fabsol/Whiskey.cs | 2 +- Buffs/Fabsol/WhiteWine.cs | 2 +- Buffs/Fabsol/YellowDamageCandle.cs | 4 +- Buffs/MountBuffs/BrimstoneMount.cs | 6 +- Buffs/MountBuffs/Fab.cs | 5 +- Buffs/MountBuffs/GazeOfCrysthamyrBuff.cs | 8 +- Buffs/MountBuffs/SquishyBeanBuff.cs | 6 +- Buffs/PetBuffs/AkatoYharonBuff.cs | 2 +- Buffs/PetBuffs/BearBuff.cs | 2 +- Buffs/PetBuffs/BloodBound.cs | 2 +- Buffs/PetBuffs/BrimlingBuff.cs | 2 +- Buffs/PetBuffs/ChibiiBuff.cs | 2 +- Buffs/PetBuffs/DannyDevito.cs | 2 +- Buffs/PetBuffs/Fox.cs | 2 +- Buffs/PetBuffs/Kendra.cs | 2 +- Buffs/PetBuffs/Levi.cs | 2 +- Buffs/PetBuffs/StrangeOrb.cs | 2 +- Buffs/PetBuffs/ThirdSageBuff.cs | 2 +- Buffs/PotionBuffs/AbyssalWeapon.cs | 2 +- Buffs/PotionBuffs/AnechoicCoating.cs | 2 +- Buffs/PotionBuffs/ArmorCrumbling.cs | 2 +- Buffs/PotionBuffs/ArmorShattering.cs | 2 +- Buffs/PotionBuffs/AstralInjectionBuff.cs | 2 +- Buffs/PotionBuffs/BoundingBuff.cs | 2 +- Buffs/PotionBuffs/Cadence.cs | 2 +- Buffs/PotionBuffs/CalciumBuff.cs | 2 +- Buffs/PotionBuffs/CeaselessHunger.cs | 2 +- Buffs/PotionBuffs/DraconicSurgeBuff.cs | 2 +- Buffs/PotionBuffs/GravityNormalizerBuff.cs | 2 +- Buffs/PotionBuffs/HolyWrathBuff.cs | 2 +- Buffs/PotionBuffs/Invincible.cs | 2 +- Buffs/PotionBuffs/Omniscience.cs | 2 +- Buffs/PotionBuffs/PenumbraBuff.cs | 2 +- Buffs/PotionBuffs/PhotosynthesisBuff.cs | 2 +- Buffs/PotionBuffs/ProfanedRageBuff.cs | 2 +- Buffs/PotionBuffs/Soaring.cs | 2 +- Buffs/PotionBuffs/TitanScale.cs | 2 +- Buffs/PotionBuffs/TriumphBuff.cs | 2 +- Buffs/PotionBuffs/YharimPower.cs | 2 +- Buffs/PotionBuffs/Zen.cs | 2 +- Buffs/PotionBuffs/Zerg.cs | 2 +- Buffs/Shrines/ChiBuff.cs | 2 +- Buffs/Shrines/CorruptionEffigyBuff.cs | 2 +- Buffs/Shrines/CrimsonEffigyBuff.cs | 2 +- Buffs/Shrines/GladiatorSwords.cs | 2 +- Buffs/Shrines/OnyxExcavatorBuff.cs | 8 +- Buffs/Shrines/TundraLeashBuff.cs | 8 +- Buffs/StatBuffs/AbyssalDivingSuitPlates.cs | 2 +- Buffs/StatBuffs/AdrenalineMode.cs | 2 +- Buffs/StatBuffs/Afflicted.cs | 2 +- Buffs/StatBuffs/ChaosCandle.cs | 2 +- Buffs/StatBuffs/CosmicFreeze.cs | 2 +- Buffs/StatBuffs/GodSlayerCooldown.cs | 2 +- Buffs/StatBuffs/GraxDefense.cs | 2 +- Buffs/StatBuffs/HeartAttack.cs | 2 +- Buffs/StatBuffs/IceShieldBuff.cs | 2 +- Buffs/StatBuffs/Molten.cs | 2 +- Buffs/StatBuffs/Mushy.cs | 2 +- Buffs/StatBuffs/RageMode.cs | 2 +- Buffs/StatBuffs/ReaverRage.cs | 2 +- Buffs/StatBuffs/ScarfMeleeBoost.cs | 2 +- Buffs/StatBuffs/ShellBoost.cs | 2 +- Buffs/StatBuffs/SirenWaterSpeed.cs | 2 +- Buffs/StatBuffs/TarraLifeRegen.cs | 2 +- Buffs/StatBuffs/TranquilityCandle.cs | 2 +- Buffs/StatBuffs/TyrantsFury.cs | 2 +- Buffs/StatBuffs/XerocRage.cs | 2 +- Buffs/StatBuffs/XerocWrath.cs | 2 +- .../AbyssalDivingSuitPlatesBroken.cs | 2 +- Buffs/StatDebuffs/ArmorCrunch.cs | 4 +- Buffs/StatDebuffs/BurntOut.cs | 2 +- Buffs/StatDebuffs/Enraged.cs | 4 +- Buffs/StatDebuffs/ExoFreeze.cs | 2 +- Buffs/StatDebuffs/ExtremeGrav.cs | 2 +- Buffs/StatDebuffs/ExtremeGravity.cs | 2 +- Buffs/StatDebuffs/FishAlert.cs | 2 +- Buffs/StatDebuffs/GlacialState.cs | 4 +- Buffs/StatDebuffs/Horror.cs | 2 +- Buffs/StatDebuffs/IceShieldBrokenBuff.cs | 2 +- Buffs/StatDebuffs/Irradiated.cs | 4 +- Buffs/StatDebuffs/MarkedforDeath.cs | 4 +- Buffs/StatDebuffs/ScarfCooldown.cs | 2 +- Buffs/StatDebuffs/SilvaStun.cs | 2 +- Buffs/StatDebuffs/TemporalSadness.cs | 2 +- Buffs/StatDebuffs/TimeSlow.cs | 2 +- Buffs/StatDebuffs/WarCleave.cs | 2 +- Buffs/StatDebuffs/Warped.cs | 2 +- Buffs/StatDebuffs/WeakPetrification.cs | 2 +- Buffs/StatDebuffs/WhisperingDeath.cs | 4 +- Buffs/SummonBuffs/AngryChicken.cs | 2 +- Buffs/SummonBuffs/AquaticStar.cs | 2 +- Buffs/SummonBuffs/BloodClot.cs | 2 +- Buffs/SummonBuffs/BrimstoneWaifu.cs | 2 +- Buffs/SummonBuffs/BrittleStar.cs | 2 +- Buffs/SummonBuffs/Calamari.cs | 2 +- Buffs/SummonBuffs/CalamitasEyes.cs | 2 +- Buffs/SummonBuffs/ChaosSpirit.cs | 2 +- Buffs/SummonBuffs/CloudyWaifu.cs | 2 +- Buffs/SummonBuffs/Corroslime.cs | 2 +- Buffs/SummonBuffs/CosmicEnergy.cs | 2 +- Buffs/SummonBuffs/Cosmilamp.cs | 2 +- Buffs/SummonBuffs/Crimslime.cs | 2 +- Buffs/SummonBuffs/DaedalusCrystal.cs | 2 +- Buffs/SummonBuffs/DankCreeper.cs | 2 +- Buffs/SummonBuffs/DrewsSandyWaifu.cs | 2 +- Buffs/SummonBuffs/ElementalAxe.cs | 2 +- Buffs/SummonBuffs/FungalClump.cs | 2 +- Buffs/SummonBuffs/GuardianDefense.cs | 2 +- Buffs/SummonBuffs/GuardianHealer.cs | 2 +- Buffs/SummonBuffs/GuardianOffense.cs | 2 +- Buffs/SummonBuffs/Herring.cs | 2 +- Buffs/SummonBuffs/HotE.cs | 2 +- Buffs/SummonBuffs/IceClasper.cs | 2 +- Buffs/SummonBuffs/Mechworm.cs | 2 +- Buffs/SummonBuffs/Phantom.cs | 2 +- Buffs/SummonBuffs/ReaverOrb.cs | 2 +- Buffs/SummonBuffs/RedDevil.cs | 2 +- .../SummonBuffs/ResurrectionButterflyBuff.cs | 2 +- Buffs/SummonBuffs/Sandnado.cs | 2 +- Buffs/SummonBuffs/SandyWaifu.cs | 2 +- Buffs/SummonBuffs/SilvaCrystal.cs | 2 +- Buffs/SummonBuffs/SirenLure.cs | 2 +- Buffs/SummonBuffs/SlimeGod.cs | 2 +- Buffs/SummonBuffs/SolarSpirit.cs | 2 +- Buffs/SummonBuffs/SolarSpiritGod.cs | 2 +- Buffs/SummonBuffs/SpiritGeneratorAtkBuff.cs | 2 +- Buffs/SummonBuffs/SpiritGeneratorDefBuff.cs | 2 +- Buffs/SummonBuffs/SpiritGeneratorRegenBuff.cs | 2 +- Buffs/SummonBuffs/Urchin.cs | 2 +- Buffs/SummonBuffs/Valkyrie.cs | 2 +- Buffs/SunkenSea/Clamity.cs | 2 +- Buffs/SunkenSea/PearlAura.cs | 2 +- Buffs/SunkenSea/Shellfish.cs | 2 +- Buffs/SunkenSea/ShellfishEating.cs | 2 +- CalPlayer/CalamityPlayer.cs | 186 +++++++++--------- CalPlayer/CalamityPlayerLifeRegen.cs | 4 +- CalamityMod.cs | 2 +- Items/AbyssItems/AbyssalAmulet.cs | 2 +- Items/AbyssItems/AbyssalDivingGear.cs | 2 +- Items/AbyssItems/AnechoicPlating.cs | 2 +- Items/AbyssItems/DepthCharm.cs | 2 +- Items/AbyssItems/IronBoots.cs | 2 +- Items/AbyssItems/LumenousAmulet.cs | 2 +- Items/AbyssItems/ReaperToothNecklace.cs | 2 +- Items/Accessories/AlchemicalFlask.cs | 2 +- Items/Accessories/AmalgamatedBrain.cs | 2 +- Items/Accessories/AmbrosialAmpoule.cs | 2 +- Items/Accessories/AmidiasSpark.cs | 2 +- Items/Accessories/AngelTreads.cs | 2 +- Items/Accessories/ArcanumoftheVoid.cs | 4 +- Items/Accessories/AsgardianAegis.cs | 4 +- Items/Accessories/AsgardsValor.cs | 2 +- Items/Accessories/AstralArcanum.cs | 4 +- Items/Accessories/AstralBulwark.cs | 2 +- Items/Accessories/BadgeofBravery.cs | 4 +- Items/Accessories/BloodflareCore.cs | 2 +- Items/Accessories/BurdenBreaker.cs | 2 +- Items/Accessories/CelestialJewel.cs | 2 +- Items/Accessories/CheatTestThing.cs | 2 +- Items/Accessories/CoinofDeceit.cs | 4 +- Items/Accessories/CoreOfTheBloodGod.cs | 2 +- Items/Accessories/CounterScarf.cs | 2 +- Items/Accessories/CrownJewel.cs | 2 +- Items/Accessories/DarkSunRing.cs | 4 +- Items/Accessories/DeificAmulet.cs | 2 +- Items/Accessories/DimensionalSoulArtifact.cs | 4 +- Items/Accessories/DraedonsHeart.cs | 4 +- Items/Accessories/EclipseMirror.cs | 2 +- Items/Accessories/EldritchSoulArtifact.cs | 4 +- Items/Accessories/ElementalGauntlet.cs | 4 +- Items/Accessories/ElementalQuiver.cs | 4 +- Items/Accessories/EtherealTalisman.cs | 4 +- Items/Accessories/EyeoftheStorm.cs | 4 +- Items/Accessories/FrigidBulwark.cs | 2 +- Items/Accessories/FrostBarrier.cs | 2 +- Items/Accessories/FrostFlare.cs | 2 +- Items/Accessories/FungalCarapace.cs | 2 +- Items/Accessories/GiantShell.cs | 2 +- Items/Accessories/GodlySoulArtifact.cs | 4 +- Items/Accessories/GoldBurdenBreaker.cs | 2 +- Items/Accessories/HarpyRing.cs | 2 +- Items/Accessories/HeartofDarkness.cs | 2 +- Items/Accessories/HeartoftheElements.cs | 6 +- Items/Accessories/HoneyDew.cs | 2 +- Items/Accessories/Laudanum.cs | 2 +- Items/Accessories/MagicLevelMeter.cs | 6 +- Items/Accessories/MeleeLevelMeter.cs | 6 +- Items/Accessories/MoonstoneCrown.cs | 2 +- Items/Accessories/Nanotech.cs | 10 +- Items/Accessories/NecklaceofVexation.cs | 2 +- Items/Accessories/OldDie.cs | 2 +- Items/Accessories/PlagueHive.cs | 2 +- Items/Accessories/PsychoticAmulet.cs | 2 +- Items/Accessories/RaidersTalisman.cs | 2 +- Items/Accessories/RampartofDeities.cs | 4 +- Items/Accessories/RangedLevelMeter.cs | 6 +- Items/Accessories/RareVariants/DeepDiver.cs | 4 +- .../RareVariants/FabledTortoiseShell.cs | 4 +- .../RareVariants/HideofAstrumDeus.cs | 4 +- Items/Accessories/RareVariants/Regenator.cs | 4 +- .../Accessories/RareVariants/SamuraiBadge.cs | 4 +- Items/Accessories/RareVariants/TheBee.cs | 4 +- .../Accessories/RareVariants/TheEvolution.cs | 4 +- .../RareVariants/TheTransformer.cs | 4 +- Items/Accessories/RogueEmblem.cs | 2 +- Items/Accessories/RogueLevelMeter.cs | 6 +- Items/Accessories/SpiritGenerator.cs | 2 +- Items/Accessories/Sponge.cs | 4 +- Items/Accessories/StatisBeltOfCurses.cs | 10 +- Items/Accessories/StatisBlessing.cs | 2 +- Items/Accessories/StatisCurse.cs | 2 +- Items/Accessories/StatisNinjaBelt.cs | 2 +- Items/Accessories/StressPills.cs | 2 +- Items/Accessories/SummonLevelMeter.cs | 6 +- Items/Accessories/TheAbsorber.cs | 2 +- Items/Accessories/TheAmalgam.cs | 4 +- Items/Accessories/TheCommunity.cs | 4 +- Items/Accessories/TheFirstShadowflame.cs | 2 +- Items/Accessories/VoidofExtinction.cs | 4 +- Items/Accessories/WifeinaBottle.cs | 4 +- Items/Accessories/WifeinaBottlewithBoobs.cs | 4 +- Items/Accessories/Wings/AureateWings.cs | 2 +- Items/Accessories/Wings/CelestialTracers.cs | 4 +- Items/Accessories/Wings/DiscordianWings.cs | 2 +- Items/Accessories/Wings/DrewsWings.cs | 2 +- Items/Accessories/Wings/ElysianTracers.cs | 4 +- Items/Accessories/Wings/HadarianWings.cs | 2 +- Items/Accessories/Wings/InfinityBoots.cs | 4 +- Items/Accessories/Wings/StarlightWings.cs | 2 +- Items/Accessories/Wings/TarragonWings.cs | 2 +- Items/Accessories/Wings/XerocWings.cs | 6 +- Items/Accessories/YharimsInsignia.cs | 4 +- Items/AquaticScourge/AquaticEmblem.cs | 2 +- Items/AquaticScourge/Seafood.cs | 2 +- Items/Armor/AerospecBreastplate.cs | 2 +- Items/Armor/AerospecHat.cs | 2 +- Items/Armor/AerospecHeadgear.cs | 8 +- Items/Armor/AerospecHelm.cs | 2 +- Items/Armor/AerospecHelmet.cs | 2 +- Items/Armor/AerospecHood.cs | 2 +- Items/Armor/AstralHelm.cs | 4 +- Items/Armor/AtaxiaHeadgear.cs | 2 +- Items/Armor/AtaxiaHelm.cs | 4 +- Items/Armor/AtaxiaHelmet.cs | 2 +- Items/Armor/AtaxiaHood.cs | 12 +- Items/Armor/AtaxiaMask.cs | 2 +- Items/Armor/AtaxiaSubligar.cs | 2 +- Items/Armor/AuricTeslaBodyArmor.cs | 4 +- Items/Armor/AuricTeslaCuisses.cs | 2 +- Items/Armor/AuricTeslaHelm.cs | 6 +- Items/Armor/AuricTeslaHoodedFacemask.cs | 6 +- Items/Armor/AuricTeslaPlumedHelm.cs | 10 +- Items/Armor/AuricTeslaSpaceHelmet.cs | 6 +- Items/Armor/AuricTeslaWireHemmedVisage.cs | 6 +- Items/Armor/BloodflareBodyArmor.cs | 2 +- Items/Armor/BloodflareCuisses.cs | 2 +- Items/Armor/BloodflareHelm.cs | 8 +- Items/Armor/BloodflareHelmet.cs | 4 +- Items/Armor/BloodflareHornedHelm.cs | 4 +- Items/Armor/BloodflareHornedMask.cs | 4 +- Items/Armor/BloodflareMask.cs | 4 +- Items/Armor/DaedalusHat.cs | 2 +- Items/Armor/DaedalusHeadgear.cs | 2 +- Items/Armor/DaedalusHelm.cs | 2 +- Items/Armor/DaedalusHelmet.cs | 2 +- Items/Armor/DaedalusLeggings.cs | 2 +- Items/Armor/DaedalusVisor.cs | 12 +- Items/Armor/DemonshadeBreastplate.cs | 4 +- Items/Armor/DemonshadeGreaves.cs | 4 +- Items/Armor/DemonshadeHelm.cs | 4 +- Items/Armor/GodSlayerChestplate.cs | 4 +- Items/Armor/GodSlayerHelm.cs | 4 +- Items/Armor/GodSlayerHelmet.cs | 4 +- Items/Armor/GodSlayerHornedHelm.cs | 4 +- Items/Armor/GodSlayerLeggings.cs | 2 +- Items/Armor/GodSlayerMask.cs | 8 +- Items/Armor/GodSlayerVisage.cs | 4 +- Items/Armor/MolluskShellmet.cs | 2 +- Items/Armor/OmegaBlueChestplate.cs | 2 +- Items/Armor/OmegaBlueHelmet.cs | 4 +- Items/Armor/OmegaBlueLeggings.cs | 2 +- Items/Armor/ReaverCap.cs | 12 +- Items/Armor/ReaverCuisses.cs | 2 +- Items/Armor/ReaverHelm.cs | 2 +- Items/Armor/ReaverHelmet.cs | 2 +- Items/Armor/ReaverMask.cs | 2 +- Items/Armor/ReaverVisage.cs | 2 +- Items/Armor/ShroomiteVisage.cs | 4 +- Items/Armor/SilvaArmor.cs | 2 +- Items/Armor/SilvaHelm.cs | 4 +- Items/Armor/SilvaHelmet.cs | 4 +- Items/Armor/SilvaHornedHelm.cs | 4 +- Items/Armor/SilvaLeggings.cs | 2 +- Items/Armor/SilvaMask.cs | 8 +- Items/Armor/SilvaMaskedCap.cs | 4 +- Items/Armor/StatigelArmor.cs | 2 +- Items/Armor/StatigelCap.cs | 2 +- Items/Armor/StatigelHeadgear.cs | 2 +- Items/Armor/StatigelHelm.cs | 2 +- Items/Armor/StatigelHood.cs | 2 +- Items/Armor/StatigelMask.cs | 10 +- Items/Armor/TarragonBreastplate.cs | 2 +- Items/Armor/TarragonHelm.cs | 4 +- Items/Armor/TarragonHelmet.cs | 8 +- Items/Armor/TarragonHornedHelm.cs | 4 +- Items/Armor/TarragonLeggings.cs | 2 +- Items/Armor/TarragonMask.cs | 4 +- Items/Armor/TarragonVisage.cs | 4 +- Items/Armor/VictideBreastplate.cs | 2 +- Items/Armor/VictideHeadgear.cs | 6 +- Items/Armor/VictideHelm.cs | 2 +- Items/Armor/VictideHelmet.cs | 2 +- Items/Armor/VictideMask.cs | 2 +- Items/Armor/VictideVisage.cs | 2 +- Items/Armor/WulfrumArmor.cs | 2 +- Items/Armor/WulfrumMask.cs | 4 +- Items/Armor/XerocCuisses.cs | 4 +- Items/Armor/XerocMask.cs | 12 +- Items/Armor/XerocPlateMail.cs | 4 +- Items/BrimstoneWaifu/CharredIdol.cs | 2 +- Items/BrimstoneWaifu/RoseStone.cs | 4 +- Items/Bumblefuck/EffulgentFeather.cs | 2 +- Items/Calamitas/CalamityRing.cs | 4 +- .../AccretionDisk.cs | 4 +- .../AdamantiteThrowingAxe.cs | 2 +- .../BallisticPoisonBomb.cs | 2 +- .../BlastBarrel.cs | 6 +- .../BloodsoakedCrasher.cs | 8 +- .../BouncingEyeball.cs | 6 +- .../BrackishFlask.cs | 2 +- .../CalamityCustomThrowingDamage/Brimblade.cs | 2 +- .../CalamityDamageItem.cs | 8 +- .../CelestialReaper.cs | 6 +- .../CalamityCustomThrowingDamage/Celestus.cs | 4 +- .../CalamityCustomThrowingDamage/Cinquedea.cs | 6 +- .../CobaltKunai.cs | 2 +- .../ConsecratedWater.cs | 6 +- .../CosmicKunai.cs | 4 +- .../CraniumSmasher.cs | 2 +- .../CrushsawCrasher.cs | 2 +- .../CrystalPiercer.cs | 2 +- .../Crystalline.cs | 2 +- .../CursedDagger.cs | 2 +- .../DuststormInABottle.cs | 2 +- .../EclipsesFall.cs | 8 +- .../EmpyreanKnivesThrown.cs | 4 +- .../Eradicator.cs | 4 +- .../ExecutionersBlade.cs | 4 +- .../FeatherKnife.cs | 2 +- .../FlameScythe.cs | 2 +- .../FrostyFlare.cs | 2 +- .../GalaxySmasherRogue.cs | 6 +- Items/CalamityCustomThrowingDamage/GelDart.cs | 2 +- .../GhoulishGouger.cs | 4 +- Items/CalamityCustomThrowingDamage/Glaive.cs | 8 +- .../HeavenfallenStardisk.cs | 2 +- Items/CalamityCustomThrowingDamage/IceStar.cs | 2 +- .../Icebreaker.cs | 2 +- .../IchorSpear.cs | 2 +- .../IronFrancisca.cs | 4 +- Items/CalamityCustomThrowingDamage/Kylie.cs | 6 +- .../LeadTomahawk.cs | 4 +- .../CalamityCustomThrowingDamage/Lionfish.cs | 2 +- .../CalamityCustomThrowingDamage/Malachite.cs | 4 +- .../MangroveChakram.cs | 2 +- .../MeteorFist.cs | 2 +- .../MoltenAmputator.cs | 4 +- .../MonkeyDarts.cs | 11 +- .../CalamityCustomThrowingDamage/Mycoroot.cs | 2 +- .../MythrilKnife.cs | 2 +- .../NanoblackReaperRogue.cs | 6 +- .../OrichalcumSpikedGemstone.cs | 2 +- .../PalladiumJavelin.cs | 2 +- .../Patreon/CorpusAvertor.cs | 6 +- .../Patreon/DeepSeaDumbbell.cs | 6 +- .../Patreon/KelvinCatalyst.cs | 4 +- .../Patreon/Plaguenade.cs | 4 +- .../Patreon/TimeBolt.cs | 4 +- .../Prismalline.cs | 2 +- .../ProfanedTrident.cs | 4 +- .../Pwnagehammer.cs | 2 +- .../RadiantStar.cs | 2 +- .../RareVariants/DuneHopper.cs | 4 +- .../RareVariants/Quasar.cs | 4 +- .../RareVariants/SpearofDestiny.cs | 4 +- .../RareVariants/TheReaper.cs | 4 +- Items/CalamityCustomThrowingDamage/RotBall.cs | 2 +- .../RoyalKnives.cs | 4 +- .../SandDollar.cs | 2 +- .../ScarletDevil.cs | 4 +- .../ScourgeoftheCosmosThrown.cs | 4 +- .../ScourgeoftheDesert.cs | 2 +- .../ScourgeoftheSeas.cs | 6 +- .../SeafoamBomb.cs | 2 +- .../SeashellBoomerang.cs | 2 +- .../ShatteredSun.cs | 4 +- .../CalamityCustomThrowingDamage/SnapClam.cs | 2 +- .../SpearofPaleolith.cs | 2 +- .../StellarContemptRogue.cs | 6 +- .../StellarKnife.cs | 2 +- .../StormfrontRazor.cs | 6 +- .../TarragonThrowingDart.cs | 4 +- .../ThrowingBrick.cs | 6 +- .../TitaniumShuriken.cs | 2 +- .../CalamityCustomThrowingDamage/ToothBall.cs | 2 +- ...TriactisTruePaladinianMageHammerofMight.cs | 4 +- .../TruePaladinsHammer.cs | 2 +- .../UrchinStinger.cs | 2 +- .../UtensilPoker.cs | 8 +- .../Valediction.cs | 4 +- .../WulfrumKnife.cs | 2 +- .../XerocPitchfork.cs | 2 +- Items/CalamityGlobalItem.cs | 96 ++++----- Items/Crabulon/FungalClump.cs | 4 +- Items/Cryogen/SoulofCryogen.cs | 2 +- Items/DevourerMunsters/ArmoredShell.cs | 2 +- Items/DevourerMunsters/DarkPlasma.cs | 2 +- Items/DevourerMunsters/RuneofCos.cs | 2 +- Items/DevourerMunsters/TwistingNether.cs | 2 +- Items/Fishing/AstralCrate.cs | 6 +- Items/Fishing/UrsaSergeant.cs | 2 +- Items/HiveMind/RottenBrain.cs | 2 +- Items/LoreItems/KnowledgeAquaticScourge.cs | 2 +- Items/LoreItems/KnowledgeAstrumAureus.cs | 2 +- Items/LoreItems/KnowledgeAstrumDeus.cs | 2 +- .../LoreItems/KnowledgeBrimstoneElemental.cs | 2 +- Items/LoreItems/KnowledgeBumblebirb.cs | 2 +- Items/LoreItems/KnowledgeCalamitas.cs | 4 +- Items/LoreItems/KnowledgeCalamitasClone.cs | 2 +- Items/LoreItems/KnowledgeCryogen.cs | 2 +- Items/LoreItems/KnowledgeDesertScourge.cs | 4 +- Items/LoreItems/KnowledgeDestroyer.cs | 2 +- Items/LoreItems/KnowledgeDevourerofGods.cs | 4 +- Items/LoreItems/KnowledgeDukeFishron.cs | 2 +- Items/LoreItems/KnowledgeEaterofWorlds.cs | 2 +- Items/LoreItems/KnowledgeGolem.cs | 2 +- Items/LoreItems/KnowledgeHiveMind.cs | 2 +- Items/LoreItems/KnowledgeLeviathanandSiren.cs | 2 +- Items/LoreItems/KnowledgeLunaticCultist.cs | 2 +- Items/LoreItems/KnowledgeMoonLord.cs | 2 +- Items/LoreItems/KnowledgePerforators.cs | 2 +- .../KnowledgePlaguebringerGoliath.cs | 2 +- Items/LoreItems/KnowledgePlantera.cs | 2 +- Items/LoreItems/KnowledgePolterghast.cs | 4 +- Items/LoreItems/KnowledgeProfanedGuardians.cs | 2 +- Items/LoreItems/KnowledgeProvidence.cs | 4 +- Items/LoreItems/KnowledgeQueenBee.cs | 2 +- Items/LoreItems/KnowledgeRavager.cs | 2 +- Items/LoreItems/KnowledgeSentinels.cs | 2 +- Items/LoreItems/KnowledgeSkeletron.cs | 2 +- Items/LoreItems/KnowledgeSkeletronPrime.cs | 2 +- Items/LoreItems/KnowledgeWallofFlesh.cs | 2 +- Items/LoreItems/KnowledgeYharon.cs | 4 +- Items/Materials/Bloodstone.cs | 2 +- Items/Materials/BloodstoneCore.cs | 2 +- Items/Materials/CalamitousEssence.cs | 2 +- Items/Materials/DarksunFragment.cs | 2 +- Items/Materials/EndothermicEnergy.cs | 2 +- Items/Materials/HellcasterFragment.cs | 2 +- Items/Materials/NightmareFuel.cs | 2 +- Items/Materials/Phantoplasm.cs | 2 +- Items/Materials/ShadowspecBar.cs | 2 +- Items/Materials/UeliaceBar.cs | 2 +- Items/Mounts/Fab.cs | 2 +- Items/Mounts/OnyxExcavator.cs | 2 +- Items/Patreon/AngelicShotgun.cs | 2 +- Items/Patreon/ApronOfAffection.cs | 2 +- Items/Patreon/Ataraxia.cs | 2 +- Items/Patreon/BloodyVein.cs | 2 +- Items/Patreon/CorpusAvertorMelee.cs | 2 +- Items/Patreon/DarkSpark.cs | 2 +- Items/Patreon/DevilsSunrise.cs | 2 +- Items/Patreon/DivineRetribution.cs | 2 +- Items/Patreon/DodusHandcannon.cs | 2 +- Items/Patreon/DragonPow.cs | 2 +- Items/Patreon/FaceMelter.cs | 2 +- Items/Patreon/ForgottenDragonEgg.cs | 2 +- Items/Patreon/GazeOfCrysthamyr.cs | 2 +- Items/Patreon/HandheldTank.cs | 2 +- Items/Patreon/Karasawa.cs | 2 +- Items/Patreon/Keelhaul.cs | 2 +- Items/Patreon/KelvinCatalystMelee.cs | 2 +- Items/Patreon/LightGodsBrilliance.cs | 2 +- Items/Patreon/MadAlchemistsCocktailGlove.cs | 2 +- Items/Patreon/Nadir.cs | 2 +- Items/Patreon/NormalityRelocator.cs | 4 +- Items/Patreon/Oracle.cs | 2 +- Items/Patreon/ProfanedSoulArtifact.cs | 4 +- Items/Patreon/ResurrectionButterfly.cs | 2 +- Items/Patreon/Roxcalibur.cs | 2 +- Items/Patreon/TheLastMourning.cs | 2 +- Items/Patreon/ThePack.cs | 2 +- Items/Patreon/YateveoBloom.cs | 2 +- Items/Perforator/BloodyWormTooth.cs | 2 +- Items/PermanentBoosters/BloodOrange.cs | 4 +- Items/PermanentBoosters/CometShard.cs | 4 +- Items/PermanentBoosters/Dragonfruit.cs | 6 +- Items/PermanentBoosters/Ectoheart.cs | 6 +- Items/PermanentBoosters/Elderberry.cs | 4 +- Items/PermanentBoosters/ElectrolyteGelPack.cs | 4 +- Items/PermanentBoosters/EtherealCore.cs | 4 +- Items/PermanentBoosters/InfernalBlood.cs | 4 +- Items/PermanentBoosters/MLGRune2.cs | 4 +- Items/PermanentBoosters/MiracleFruit.cs | 4 +- Items/PermanentBoosters/MushroomPlasmaRoot.cs | 4 +- Items/PermanentBoosters/PhantomHeart.cs | 6 +- .../RedLightningContainer.cs | 6 +- Items/PermanentBoosters/StarlightFuelCell.cs | 4 +- Items/Pets/CosmicPlushie.cs | 2 +- Items/Placeables/AuricOre.cs | 2 +- Items/Placeables/DraedonsForge.cs | 2 +- Items/PlaguebringerGoliath/BloomStone.cs | 2 +- Items/Polterghast/Affliction.cs | 2 +- Items/Polterghast/NecroplasmicBeacon.cs | 2 +- Items/Polterghast/RuinousSoul.cs | 2 +- Items/Potions/DraconicElixir.cs | 2 +- Items/Potions/OmegaHealingPotion.cs | 2 +- Items/Potions/RevivifyPotion.cs | 2 +- Items/Potions/SupremeHealingPotion.cs | 2 +- Items/Potions/SupremeManaPotion.cs | 2 +- Items/ProfanedGuardian/ProfanedShard.cs | 2 +- Items/Providence/DivineGeode.cs | 2 +- Items/Providence/ElysianAegis.cs | 4 +- Items/Providence/ElysianWings.cs | 4 +- Items/Providence/ProfanedCore.cs | 2 +- Items/Providence/ProfanedCoreUnlimited.cs | 2 +- Items/Providence/UnholyEssence.cs | 2 +- Items/Scavenger/BloodPact.cs | 2 +- Items/Scavenger/FleshTotem.cs | 2 +- Items/ShrineItems/FungalSymbiote.cs | 2 +- Items/ShrineItems/GladiatorsLocket.cs | 4 +- Items/ShrineItems/LuxorsGift.cs | 2 +- Items/ShrineItems/TrinketofChi.cs | 2 +- Items/ShrineItems/UnstablePrism.cs | 2 +- Items/SlimeGod/ManaOverloader.cs | 2 +- Items/SunkenSea/GiantPearl.cs | 2 +- Items/SupremeCalamitas/EyeofExtinction.cs | 2 +- Items/TheDevourerofGods/CosmicWorm.cs | 2 +- Items/TheDevourerofGods/CosmiliteBar.cs | 2 +- Items/TheDevourerofGods/DevourerofGodsBag.cs | 2 +- Items/TheDevourerofGods/NebulousCore.cs | 2 +- Items/Tools/BlossomPickaxe.cs | 2 +- Items/Tools/CrystylCrusher.cs | 2 +- Items/Tools/GallantPickaxe.cs | 2 +- Items/Weapons/AMR.cs | 2 +- Items/Weapons/AbyssWeapons/CalamarisLament.cs | 2 +- Items/Weapons/AbyssWeapons/EidolicWail.cs | 2 +- Items/Weapons/AbyssWeapons/SoulEdge.cs | 2 +- .../AbyssWeapons/SulphuricAcidCannon.cs | 2 +- Items/Weapons/AccretionDiskMelee.cs | 2 +- Items/Weapons/AegisBlade.cs | 2 +- Items/Weapons/AethersWhisper.cs | 2 +- Items/Weapons/Alluvion.cs | 4 +- Items/Weapons/AlphaRay.cs | 2 +- Items/Weapons/Animus.cs | 2 +- Items/Weapons/ApoctosisArray.cs | 2 +- Items/Weapons/Apotheosis.cs | 2 +- Items/Weapons/AquaticDissolution.cs | 2 +- Items/Weapons/ArkoftheAncients.cs | 2 +- Items/Weapons/ArkoftheCosmos.cs | 2 +- Items/Weapons/ArkoftheElements.cs | 2 +- Items/Weapons/ArterialAssault.cs | 2 +- Items/Weapons/AsteroidStaff.cs | 2 +- Items/Weapons/AuguroftheElements.cs | 2 +- Items/Weapons/Azathoth.cs | 2 +- Items/Weapons/BladedgeGreatbow.cs | 2 +- Items/Weapons/BloodfireArrow.cs | 2 +- Items/Weapons/BlossomFlux.cs | 2 +- Items/Weapons/BlushieStaff.cs | 2 +- Items/Weapons/BrinyBaron.cs | 2 +- Items/Weapons/Bumblebirb/GildedProboscis.cs | 2 +- Items/Weapons/Bumblebirb/GoldenEagle.cs | 2 +- Items/Weapons/Bumblebirb/RougeSlash.cs | 2 +- Items/Weapons/ClaretCannon.cs | 2 +- Items/Weapons/CleansingBlaze.cs | 2 +- Items/Weapons/Climax.cs | 2 +- Items/Weapons/ClockworkBow.cs | 2 +- Items/Weapons/CometQuasher.cs | 2 +- Items/Weapons/Contagion.cs | 2 +- Items/Weapons/CosmicDischarge.cs | 2 +- Items/Weapons/CosmicImmaterializer.cs | 4 +- Items/Weapons/Cosmilamp.cs | 2 +- Items/Weapons/Crabulon/HyphaeRod.cs | 2 +- Items/Weapons/Cryogen/GlacialCrusher.cs | 2 +- Items/Weapons/Devastation.cs | 2 +- Items/Weapons/DevilsDevastation.cs | 2 +- .../Weapons/DevourerofGods/DeathhailStaff.cs | 2 +- Items/Weapons/DevourerofGods/Deathwind.cs | 2 +- .../Weapons/DevourerofGods/EradicatorMelee.cs | 2 +- Items/Weapons/DevourerofGods/Excelsus.cs | 2 +- .../DevourerofGods/StaffoftheMechworm.cs | 2 +- .../Weapons/DevourerofGods/TheObliterator.cs | 2 +- Items/Weapons/DraconicDestruction.cs | 2 +- Items/Weapons/DraedonsExoblade.cs | 2 +- Items/Weapons/Drataliornus.cs | 2 +- Items/Weapons/Earth.cs | 2 +- Items/Weapons/Effervescence.cs | 2 +- Items/Weapons/ElementalAxe.cs | 2 +- Items/Weapons/ElementalBlaster.cs | 2 +- Items/Weapons/ElementalEruption.cs | 2 +- Items/Weapons/ElementalExcalibur.cs | 2 +- Items/Weapons/ElementalRay.cs | 2 +- Items/Weapons/ElementalShortsword.cs | 2 +- Items/Weapons/ElysianArrow.cs | 2 +- Items/Weapons/EmpyreanKnives.cs | 2 +- Items/Weapons/EnergyStaff.cs | 2 +- Items/Weapons/EssenceFlayer.cs | 2 +- Items/Weapons/Fabstaff.cs | 2 +- Items/Weapons/FiniteUse/Bazooka.cs | 10 +- Items/Weapons/FiniteUse/ElephantKiller.cs | 12 +- Items/Weapons/FiniteUse/Hydra.cs | 10 +- Items/Weapons/FiniteUse/LightningHawk.cs | 10 +- Items/Weapons/FiniteUse/Magnum.cs | 10 +- Items/Weapons/FirestormCannon.cs | 4 +- Items/Weapons/FlameburstShortsword.cs | 2 +- Items/Weapons/Floodtide.cs | 2 +- Items/Weapons/FourSeasonsGalaxia.cs | 2 +- Items/Weapons/GalacticaBlade.cs | 2 +- Items/Weapons/GalaxySmasherMelee.cs | 4 +- Items/Weapons/GammaFusillade.cs | 2 +- Items/Weapons/Genisis.cs | 2 +- Items/Weapons/Grax.cs | 2 +- Items/Weapons/GreatswordofBlah.cs | 2 +- Items/Weapons/GreatswordofJudgement.cs | 2 +- Items/Weapons/HalleysInferno.cs | 2 +- Items/Weapons/HeavenlyGale.cs | 2 +- Items/Weapons/HeliumFlash.cs | 2 +- Items/Weapons/InfernaCutter.cs | 2 +- Items/Weapons/Interfacer.cs | 2 +- Items/Weapons/Judgement.cs | 2 +- Items/Weapons/Lacerator.cs | 2 +- Items/Weapons/Leviathan/LureofEnthrallment.cs | 4 +- Items/Weapons/LifefruitScythe.cs | 2 +- Items/Weapons/LunicEye.cs | 2 +- Items/Weapons/MagneticMeltdown.cs | 2 +- Items/Weapons/MantisClaws.cs | 2 +- Items/Weapons/MarkedMagnum.cs | 2 +- Items/Weapons/Megafleet.cs | 2 +- Items/Weapons/Minigun.cs | 2 +- Items/Weapons/MirrorBlade.cs | 2 +- Items/Weapons/Mistlestorm.cs | 2 +- Items/Weapons/MolecularManipulator.cs | 2 +- Items/Weapons/Monsoon.cs | 2 +- Items/Weapons/Mourningstar.cs | 2 +- Items/Weapons/Murasama.cs | 2 +- Items/Weapons/NanoblackReaperMelee.cs | 4 +- Items/Weapons/NeptunesBounty.cs | 2 +- Items/Weapons/NettlelineGreatbow.cs | 2 +- Items/Weapons/NuclearFury.cs | 2 +- Items/Weapons/OmegaBiomeBlade.cs | 2 +- Items/Weapons/OnyxChainBlaster.cs | 2 +- Items/Weapons/Onyxia.cs | 2 +- Items/Weapons/Phangasm.cs | 2 +- Items/Weapons/PhantasmalFury.cs | 2 +- Items/Weapons/PhoenixBlade.cs | 2 +- Items/Weapons/Photoviscerator.cs | 2 +- Items/Weapons/PlagueKeeper.cs | 4 +- Items/Weapons/PlanetaryAnnihilation.cs | 2 +- Items/Weapons/PlasmaRifle.cs | 2 +- Items/Weapons/Polterghast/BansheeHook.cs | 2 +- Items/Weapons/Polterghast/DaemonsFlame.cs | 2 +- .../Weapons/Polterghast/EtherealSubjugator.cs | 2 +- Items/Weapons/Polterghast/FatesReveal.cs | 2 +- Items/Weapons/Polterghast/GhastlyVisage.cs | 2 +- Items/Weapons/Polterghast/TerrorBlade.cs | 2 +- Items/Weapons/PrimordialAncient.cs | 2 +- .../Weapons/Providence/BlissfulBombardier.cs | 2 +- Items/Weapons/Providence/HolyCollider.cs | 2 +- Items/Weapons/Providence/PurgeGuzzler.cs | 2 +- Items/Weapons/Providence/SolarFlare.cs | 2 +- Items/Weapons/Providence/TelluricGlare.cs | 2 +- Items/Weapons/RareVariants/Arbalest.cs | 2 +- Items/Weapons/RareVariants/Carnage.cs | 2 +- Items/Weapons/RareVariants/ClothiersWrath.cs | 4 +- Items/Weapons/RareVariants/Cryophobia.cs | 2 +- Items/Weapons/RareVariants/EvilSmasher.cs | 2 +- Items/Weapons/RareVariants/EyeofMagnus.cs | 2 +- Items/Weapons/RareVariants/GrandDad.cs | 2 +- Items/Weapons/RareVariants/Hellborn.cs | 2 +- Items/Weapons/RareVariants/Infinity.cs | 2 +- Items/Weapons/RareVariants/LeadWizard.cs | 2 +- Items/Weapons/RareVariants/Norfleet.cs | 2 +- Items/Weapons/RareVariants/PearlGod.cs | 2 +- Items/Weapons/RareVariants/Skullmasher.cs | 2 +- Items/Weapons/RareVariants/Swordsplosion.cs | 2 +- Items/Weapons/RareVariants/ThornBlossom.cs | 2 +- Items/Weapons/RareVariants/Thunderstorm.cs | 2 +- .../RareVariants/TrueConferenceCall.cs | 2 +- Items/Weapons/RareVariants/VoidVortex.cs | 2 +- Items/Weapons/RedSun.cs | 2 +- Items/Weapons/RoyalKnivesMelee.cs | 2 +- Items/Weapons/SDFMG.cs | 2 +- Items/Weapons/SHPC.cs | 2 +- Items/Weapons/SanguineFlare.cs | 2 +- Items/Weapons/ScourgeoftheCosmos.cs | 2 +- Items/Weapons/Seadragon.cs | 2 +- Items/Weapons/ShadowboltStaff.cs | 2 +- Items/Weapons/Shredder.cs | 2 +- Items/Weapons/SlimeGod/Goobow.cs | 2 +- Items/Weapons/SolsticeClaymore.cs | 2 +- Items/Weapons/SomaPrime.cs | 2 +- Items/Weapons/SoulPiercer.cs | 2 +- Items/Weapons/SpatialLance.cs | 2 +- Items/Weapons/SpectralstormCannon.cs | 4 +- Items/Weapons/SpectreRifle.cs | 2 +- Items/Weapons/SporeKnife.cs | 2 +- Items/Weapons/Spyker.cs | 2 +- Items/Weapons/StarCannonEX.cs | 2 +- Items/Weapons/Starfleet.cs | 2 +- Items/Weapons/StarfleetMK2.cs | 2 +- Items/Weapons/StellarContemptMelee.cs | 4 +- Items/Weapons/StellarStriker.cs | 4 +- Items/Weapons/StormDragoon.cs | 2 +- Items/Weapons/StreamGouge.cs | 2 +- Items/Weapons/SubsumingVortex.cs | 2 +- Items/Weapons/Svantechnical.cs | 2 +- Items/Weapons/T1000.cs | 2 +- Items/Weapons/TheEnforcer.cs | 2 +- Items/Weapons/TheMutilator.cs | 2 +- Items/Weapons/TheStorm.cs | 2 +- Items/Weapons/TheSwarmer.cs | 4 +- Items/Weapons/TheWand.cs | 2 +- ...tisTruePaladinianMageHammerofMightMelee.cs | 2 +- Items/Weapons/Trinity.cs | 2 +- Items/Weapons/TrueArkoftheAncients.cs | 2 +- Items/Weapons/TrueTyrantYharimsUltisword.cs | 2 +- Items/Weapons/UltraLiquidator.cs | 2 +- Items/Weapons/VanquisherArrow.cs | 2 +- Items/Weapons/VenusianTrident.cs | 2 +- Items/Weapons/Verdant.cs | 2 +- Items/Weapons/Vesuvius.cs | 2 +- Items/Weapons/Viscera.cs | 2 +- Items/Weapons/VividClarity.cs | 2 +- Items/Weapons/YharimsCrystal.cs | 2 +- Items/Weapons/Yharon/AngryChickenStaff.cs | 2 +- Items/Weapons/Yharon/ChickenCannon.cs | 2 +- Items/Weapons/Yharon/DragonRage.cs | 2 +- Items/Weapons/Yharon/DragonsBreath.cs | 2 +- Items/Weapons/Yharon/PhoenixFlameBarrage.cs | 2 +- Items/Weapons/Yharon/TheBurningSky.cs | 2 +- Items/Yharon/ChickenEgg.cs | 2 +- NPCs/AbyssNPCs/AquaticScourgeBody.cs | 2 +- NPCs/AbyssNPCs/AquaticScourgeBodyAlt.cs | 2 +- NPCs/AbyssNPCs/AquaticScourgeHead.cs | 6 +- NPCs/AbyssNPCs/AquaticScourgeTail.cs | 2 +- NPCs/AbyssNPCs/AquaticSeekerHead.cs | 2 +- NPCs/AbyssNPCs/AquaticUrchin.cs | 2 +- NPCs/AbyssNPCs/Bloatfish.cs | 2 +- NPCs/AbyssNPCs/BobbitWormHead.cs | 4 +- NPCs/AbyssNPCs/BobbitWormSegment.cs | 2 +- NPCs/AbyssNPCs/BoxJellyfish.cs | 4 +- NPCs/AbyssNPCs/Catfish.cs | 2 +- NPCs/AbyssNPCs/ChaoticPuffer.cs | 2 +- NPCs/AbyssNPCs/ColossalSquid.cs | 6 +- NPCs/AbyssNPCs/Cuttlefish.cs | 4 +- NPCs/AbyssNPCs/DevilFish.cs | 4 +- NPCs/AbyssNPCs/EidolonWyrmHead.cs | 8 +- NPCs/AbyssNPCs/EidolonWyrmHeadHuge.cs | 2 +- NPCs/AbyssNPCs/Flounder.cs | 2 +- NPCs/AbyssNPCs/Frogfish.cs | 2 +- NPCs/AbyssNPCs/GiantSquid.cs | 6 +- NPCs/AbyssNPCs/Gnasher.cs | 4 +- NPCs/AbyssNPCs/GulperEelHead.cs | 6 +- NPCs/AbyssNPCs/Laserfish.cs | 6 +- NPCs/AbyssNPCs/LuminousCorvina.cs | 2 +- NPCs/AbyssNPCs/MantisShrimp.cs | 4 +- NPCs/AbyssNPCs/Mauler.cs | 4 +- NPCs/AbyssNPCs/MirageJelly.cs | 2 +- NPCs/AbyssNPCs/MorayEel.cs | 6 +- NPCs/AbyssNPCs/OarfishHead.cs | 8 +- NPCs/AbyssNPCs/Reaper.cs | 6 +- NPCs/AbyssNPCs/SeaUrchin.cs | 2 +- NPCs/AbyssNPCs/ToxicMinnow.cs | 6 +- NPCs/AbyssNPCs/Trasher.cs | 2 +- NPCs/AbyssNPCs/Viperfish.cs | 6 +- NPCs/Astrageldon/Astrageldon.cs | 2 +- NPCs/AstralBiomeNPCs/Aries.cs | 2 +- NPCs/AstralBiomeNPCs/AstralProbe.cs | 4 +- NPCs/AstralBiomeNPCs/AstralachneaGround.cs | 2 +- NPCs/AstralBiomeNPCs/AstralachneaWall.cs | 2 +- NPCs/AstralBiomeNPCs/Atlas.cs | 2 +- NPCs/AstralBiomeNPCs/BigSightseer.cs | 2 +- NPCs/AstralBiomeNPCs/FusionFeeder.cs | 2 +- NPCs/AstralBiomeNPCs/Hadarian.cs | 2 +- NPCs/AstralBiomeNPCs/Hive.cs | 2 +- NPCs/AstralBiomeNPCs/Mantis.cs | 2 +- NPCs/AstralBiomeNPCs/Nova.cs | 2 +- NPCs/AstralBiomeNPCs/SmallSightseer.cs | 2 +- NPCs/AstralBiomeNPCs/StellarCulex.cs | 2 +- NPCs/AstrumDeus/AstrumDeusBody.cs | 2 +- NPCs/AstrumDeus/AstrumDeusHead.cs | 6 +- NPCs/AstrumDeus/AstrumDeusProbe3.cs | 2 +- NPCs/AstrumDeus/AstrumDeusTail.cs | 2 +- NPCs/BrimstoneWaifu/Brimling.cs | 4 +- NPCs/BrimstoneWaifu/BrimstoneElemental.cs | 6 +- NPCs/Calamitas/Calamitas.cs | 2 +- NPCs/Calamitas/CalamitasRun.cs | 6 +- NPCs/Calamitas/CalamitasRun2.cs | 6 +- NPCs/Calamitas/CalamitasRun3.cs | 6 +- NPCs/Calamitas/SoulSeeker.cs | 2 +- NPCs/CalamityAI.cs | 6 +- NPCs/CalamityBiomeNPCs/CultistAssassin.cs | 2 +- NPCs/CalamityBiomeNPCs/DespairStone.cs | 4 +- NPCs/CalamityBiomeNPCs/Scryllar.cs | 2 +- NPCs/CalamityBiomeNPCs/ScryllarRage.cs | 2 +- NPCs/CalamityBiomeNPCs/SoulSlurper.cs | 4 +- NPCs/CalamityGlobalAI.cs | 40 ++-- NPCs/CalamityGlobalNPC.cs | 96 ++++----- NPCs/CalamityGlobalNPCLoot.cs | 6 +- NPCs/CeaselessVoid/CeaselessVoid.cs | 2 +- NPCs/CosmicWraith/CosmicWraith.cs | 4 +- NPCs/Crabulon/CrabulonIdle.cs | 4 +- NPCs/Cryogen/Cryogen.cs | 2 +- NPCs/Cryogen/CryogenIce.cs | 2 +- NPCs/DesertScourge/DesertScourgeBody.cs | 4 +- NPCs/DesertScourge/DesertScourgeHead.cs | 4 +- NPCs/DesertScourge/DesertScourgeTail.cs | 2 +- NPCs/GreatSandShark/GreatSandShark.cs | 2 +- NPCs/HiveMind/HiveMind.cs | 2 +- NPCs/Leviathan/Leviathan.cs | 8 +- NPCs/Leviathan/LeviathanStart.cs | 2 +- NPCs/Leviathan/Siren.cs | 6 +- NPCs/Leviathan/SirenIce.cs | 2 +- NPCs/NormalNPCs/AeroSlime.cs | 4 +- NPCs/NormalNPCs/AngryDog.cs | 2 +- NPCs/NormalNPCs/ArmoredDiggerBody.cs | 2 +- NPCs/NormalNPCs/ArmoredDiggerHead.cs | 2 +- NPCs/NormalNPCs/ArmoredDiggerTail.cs | 2 +- NPCs/NormalNPCs/BlightedEye.cs | 2 +- NPCs/NormalNPCs/BloomSlime.cs | 4 +- NPCs/NormalNPCs/CalamityEye.cs | 2 +- NPCs/NormalNPCs/Cnidrion.cs | 4 +- NPCs/NormalNPCs/CosmicElemental.cs | 2 +- NPCs/NormalNPCs/CrawlerAmber.cs | 2 +- NPCs/NormalNPCs/CrawlerAmethyst.cs | 2 +- NPCs/NormalNPCs/CrawlerCrystal.cs | 2 +- NPCs/NormalNPCs/CrawlerDiamond.cs | 2 +- NPCs/NormalNPCs/CrawlerEmerald.cs | 2 +- NPCs/NormalNPCs/CrawlerRuby.cs | 2 +- NPCs/NormalNPCs/CrawlerSapphire.cs | 2 +- NPCs/NormalNPCs/CrawlerTopaz.cs | 2 +- NPCs/NormalNPCs/CrimulanBlightSlime.cs | 2 +- NPCs/NormalNPCs/CryoSlime.cs | 4 +- NPCs/NormalNPCs/Cryon.cs | 4 +- NPCs/NormalNPCs/EbonianBlightSlime.cs | 2 +- NPCs/NormalNPCs/Eidolist.cs | 2 +- NPCs/NormalNPCs/FearlessGoldfishWarrior.cs | 2 +- NPCs/NormalNPCs/Horse.cs | 6 +- NPCs/NormalNPCs/IceClasper.cs | 2 +- NPCs/NormalNPCs/IrradiatedSlime.cs | 2 +- NPCs/NormalNPCs/KingSlimeJewel.cs | 2 +- NPCs/NormalNPCs/OverloadedSoldier.cs | 6 +- NPCs/NormalNPCs/PerennialSlime.cs | 4 +- NPCs/NormalNPCs/PhantomDebris.cs | 6 +- NPCs/NormalNPCs/Piggy.cs | 2 +- NPCs/NormalNPCs/Pitbull.cs | 2 +- NPCs/NormalNPCs/PlagueBee.cs | 2 +- NPCs/NormalNPCs/PlagueBeeLarge.cs | 2 +- NPCs/NormalNPCs/PlaguedDerpling.cs | 2 +- NPCs/NormalNPCs/PlaguedFlyingFox.cs | 2 +- NPCs/NormalNPCs/PlaguedJungleSlime.cs | 4 +- NPCs/NormalNPCs/PlaguedTortoise.cs | 2 +- NPCs/NormalNPCs/ProfanedEnergyBody.cs | 2 +- NPCs/NormalNPCs/SandTortoise.cs | 4 +- NPCs/NormalNPCs/ScornEater.cs | 2 +- NPCs/NormalNPCs/ShockstormShuttle.cs | 2 +- NPCs/NormalNPCs/StormlionCharger.cs | 2 +- NPCs/NormalNPCs/SunBat.cs | 4 +- NPCs/NormalNPCs/ThiccWaifu.cs | 2 +- NPCs/NormalNPCs/WulfrumDrone.cs | 2 +- NPCs/NormalNPCs/WulfrumSlime.cs | 2 +- .../PlaguebringerGoliath.cs | 12 +- NPCs/PlaguebringerShade/PlaguebringerShade.cs | 2 +- NPCs/Polterghast/Polterghast.cs | 24 +-- .../ProfanedGuardianBoss.cs | 2 +- .../ProfanedGuardianBoss2.cs | 2 +- .../ProfanedGuardianBoss3.cs | 2 +- NPCs/Providence/ProvSpawnDefense.cs | 2 +- NPCs/Providence/ProvSpawnHealer.cs | 2 +- NPCs/Providence/ProvSpawnOffense.cs | 2 +- NPCs/Providence/Providence.cs | 14 +- NPCs/Scavenger/ScavengerBody.cs | 12 +- NPCs/Scavenger/ScavengerClawLeft.cs | 2 +- NPCs/Scavenger/ScavengerClawRight.cs | 2 +- NPCs/Scavenger/ScavengerHead.cs | 2 +- NPCs/Scavenger/ScavengerLegLeft.cs | 2 +- NPCs/Scavenger/ScavengerLegRight.cs | 2 +- NPCs/SlimeGod/SlimeGodCore.cs | 6 +- NPCs/StormWeaver/StasisProbe.cs | 2 +- NPCs/StormWeaver/StormWeaverHead.cs | 2 +- NPCs/StormWeaver/StormWeaverHeadNaked.cs | 2 +- NPCs/SunkenSeaNPCs/BlindedAngler.cs | 4 +- NPCs/SunkenSeaNPCs/Clam.cs | 6 +- NPCs/SunkenSeaNPCs/EutrophicRay.cs | 4 +- NPCs/SunkenSeaNPCs/GhostBell.cs | 2 +- NPCs/SunkenSeaNPCs/GhostBellSmall.cs | 2 +- NPCs/SunkenSeaNPCs/GiantClam.cs | 4 +- NPCs/SunkenSeaNPCs/PrismTurtle.cs | 4 +- NPCs/SunkenSeaNPCs/SeaFloaty.cs | 2 +- NPCs/SunkenSeaNPCs/SeaMinnow.cs | 2 +- NPCs/SunkenSeaNPCs/SeaSerpent1.cs | 4 +- NPCs/SupremeCalamitas/SoulSeekerSupreme.cs | 2 +- NPCs/SupremeCalamitas/SupremeCalamitas.cs | 34 ++-- NPCs/SupremeCalamitas/SupremeCataclysm.cs | 2 +- NPCs/SupremeCalamitas/SupremeCatastrophe.cs | 2 +- NPCs/TheDevourerofGods/DevourerofGodsBody.cs | 2 +- NPCs/TheDevourerofGods/DevourerofGodsBody2.cs | 2 +- NPCs/TheDevourerofGods/DevourerofGodsBodyS.cs | 2 +- NPCs/TheDevourerofGods/DevourerofGodsHeadS.cs | 2 +- NPCs/Yharon/Yharon.cs | 12 +- Projectiles/Amidias/HermitCrab.cs | 12 +- Projectiles/Amidias/SandDollarProj.cs | 2 +- Projectiles/Amidias/SnapClamProj.cs | 2 +- Projectiles/Amidias/UrchinBall.cs | 2 +- Projectiles/Astral/HeavenfallenEnergy.cs | 2 +- Projectiles/Astral/HeavenfallenStardisk.cs | 2 +- Projectiles/Astral/Hive.cs | 10 +- Projectiles/Astral/Quasar.cs | 2 +- Projectiles/Astral/Quasar2.cs | 2 +- Projectiles/Astral/RadiantExplosion.cs | 2 +- Projectiles/Astral/RadiantStar.cs | 2 +- Projectiles/Astral/RadiantStar2.cs | 2 +- Projectiles/Astral/StellarKnife.cs | 2 +- Projectiles/CalamityGlobalProjectile.cs | 94 ++++----- Projectiles/Healing/FungalHeal.cs | 2 +- Projectiles/Magic/AetherBeam.cs | 2 +- Projectiles/Magic/HolyLaser.cs | 2 +- Projectiles/Magic/SolarBeam2.cs | 2 +- Projectiles/Melee/CosmicDischarge.cs | 2 +- Projectiles/Melee/Cyclone.cs | 2 +- .../Melee/EradicatorMeleeProjectile.cs | 2 +- .../Melee/FlameScytheProjectileMelee.cs | 2 +- Projectiles/Melee/Galaxia.cs | 24 +-- Projectiles/Melee/Galaxia2.cs | 24 +-- Projectiles/Melee/IceBombFriendly.cs | 4 +- Projectiles/Melee/Icebreaker.cs | 2 +- Projectiles/Melee/LaserFountain.cs | 2 +- Projectiles/Melee/Mourningstar.cs | 2 +- Projectiles/Melee/Murasama.cs | 2 +- Projectiles/Melee/Nebulash.cs | 2 +- Projectiles/Melee/OPHammerMelee.cs | 2 +- Projectiles/Melee/ScourgeoftheCosmos.cs | 2 +- Projectiles/Melee/ScourgeoftheCosmosMini.cs | 2 +- Projectiles/Melee/Spears/AstralPike.cs | 4 +- Projectiles/Melee/Spears/Brimlance.cs | 2 +- Projectiles/Melee/Spears/DiseasedPike.cs | 2 +- Projectiles/Melee/Spears/EarthenPike.cs | 2 +- .../Spears/ExsanguinationLanceProjectile.cs | 4 +- .../Melee/Spears/FulgurationHalberd.cs | 2 +- Projectiles/Melee/Spears/GildedProboscis.cs | 2 +- .../Melee/Spears/HeartRapierProjectile.cs | 2 +- .../Melee/Spears/MarniteSpearProjectile.cs | 2 +- Projectiles/Melee/Spears/SausageMaker.cs | 2 +- Projectiles/Melee/Tumbleweed.cs | 2 +- Projectiles/Melee/Yoyos/ChaotrixProjectile.cs | 2 +- .../Melee/Yoyos/CnidarianProjectile.cs | 2 +- Projectiles/Melee/Yoyos/QuagmireProjectile.cs | 6 +- .../Melee/Yoyos/ShimmersparkProjectile.cs | 2 +- Projectiles/Melee/Yoyos/SolarFlareYoyo.cs | 2 +- .../Melee/Yoyos/TheGodsGambitProjectile.cs | 2 +- Projectiles/Melee/Yoyos/TheObliterator.cs | 2 +- Projectiles/Melee/Yoyos/VerdantProjectile.cs | 2 +- Projectiles/Patreon/Akato.cs | 2 +- Projectiles/Patreon/CorpusAvertor.cs | 2 +- Projectiles/Patreon/CorpusAvertorClone.cs | 2 +- Projectiles/Patreon/DeepSeaDumbbell1.cs | 2 +- Projectiles/Patreon/DeepSeaDumbbell2.cs | 2 +- Projectiles/Patreon/DeepSeaDumbbell3.cs | 2 +- Projectiles/Patreon/DeepSeaDumbbellWeight.cs | 2 +- Projectiles/Patreon/DevilsSunrise.cs | 4 +- Projectiles/Patreon/DevilsSunriseCyclone.cs | 4 +- Projectiles/Patreon/KelvinCatalyst.cs | 2 +- Projectiles/Patreon/MiniGuardianAttack.cs | 2 +- Projectiles/Patreon/MiniGuardianDefense.cs | 2 +- Projectiles/Patreon/MiniGuardianHealer.cs | 2 +- Projectiles/Patreon/PerforaMini.cs | 2 +- Projectiles/Patreon/PinkButterfly.cs | 12 +- Projectiles/Patreon/PlagueBee.cs | 2 +- Projectiles/Patreon/Plaguenade.cs | 2 +- Projectiles/Patreon/PurpleButterfly.cs | 12 +- Projectiles/Patreon/TimeBolt.cs | 2 +- Projectiles/Patreon/YateveoBloom.cs | 2 +- Projectiles/Patreon/YateveoBloomSpear.cs | 2 +- Projectiles/Permafrost/FrostShardFriendly.cs | 2 +- Projectiles/Permafrost/FrostyFlare.cs | 2 +- Projectiles/Permafrost/IceSentry.cs | 10 +- Projectiles/Pets/Bear.cs | 2 +- Projectiles/Pets/Brimling.cs | 2 +- Projectiles/Pets/ChibiiDoggo.cs | 2 +- Projectiles/Pets/ChibiiDoggoFly.cs | 2 +- Projectiles/Pets/DannyDevito.cs | 2 +- Projectiles/Pets/Fox.cs | 2 +- Projectiles/Pets/Kendra.cs | 2 +- Projectiles/Pets/Levi.cs | 2 +- Projectiles/Pets/SirenYoung.cs | 2 +- Projectiles/Pets/ThirdSage.cs | 2 +- Projectiles/Ranged/BeeRPG.cs | 2 +- Projectiles/Ranged/DragonBurst.cs | 2 +- Projectiles/Ranged/DrataliornusFlame.cs | 2 +- Projectiles/Ranged/ExplodingStake.cs | 2 +- Projectiles/Ranged/GoliathRocket.cs | 2 +- Projectiles/Ranged/HiveBomb.cs | 2 +- Projectiles/Ranged/HiveMissile.cs | 2 +- Projectiles/Ranged/HolyFireBullet.cs | 2 +- Projectiles/Ranged/NebulaShot.cs | 4 +- Projectiles/Ranged/PlagueArrow.cs | 2 +- Projectiles/Ranged/StarfleetMK2.cs | 2 +- Projectiles/Rogue/AccretionDisk.cs | 2 +- Projectiles/Rogue/AccretionDisk2.cs | 2 +- .../Rogue/AdamantiteThrowingAxeProjectile.cs | 2 +- Projectiles/Rogue/BallisticPoisonBomb.cs | 2 +- Projectiles/Rogue/BallisticPoisonBombSpike.cs | 2 +- Projectiles/Rogue/BarrelShrapnel.cs | 2 +- Projectiles/Rogue/BlastBarrelProjectile.cs | 8 +- Projectiles/Rogue/BloodsoakedCrashax.cs | 4 +- .../Rogue/BouncingEyeballProjectile.cs | 2 +- .../BouncingEyeballProjectileStealthStrike.cs | 2 +- Projectiles/Rogue/BrackishFlask.cs | 2 +- Projectiles/Rogue/BrackishWater.cs | 2 +- Projectiles/Rogue/BrackishWaterBlast.cs | 2 +- Projectiles/Rogue/Brick.cs | 4 +- Projectiles/Rogue/BrickFragment.cs | 2 +- Projectiles/Rogue/Brimblade.cs | 2 +- Projectiles/Rogue/Brimblade2.cs | 2 +- Projectiles/Rogue/ButcherKnife.cs | 2 +- Projectiles/Rogue/CarvingFork.cs | 2 +- Projectiles/Rogue/Celestus.cs | 2 +- Projectiles/Rogue/Celestus2.cs | 2 +- Projectiles/Rogue/CinquedeaProj.cs | 2 +- Projectiles/Rogue/CobaltKunaiProjectile.cs | 2 +- Projectiles/Rogue/CosmicKunai.cs | 2 +- Projectiles/Rogue/CraniumSmasher.cs | 2 +- Projectiles/Rogue/CraniumSmasherExplosive.cs | 2 +- Projectiles/Rogue/Crushax.cs | 2 +- Projectiles/Rogue/CrystalPiercerProjectile.cs | 2 +- Projectiles/Rogue/Crystalline.cs | 2 +- Projectiles/Rogue/Crystalline2.cs | 2 +- Projectiles/Rogue/CursedDagger.cs | 2 +- Projectiles/Rogue/DuststormCloud.cs | 2 +- Projectiles/Rogue/DuststormInABottle.cs | 2 +- Projectiles/Rogue/EclipsesFallMain.cs | 2 +- Projectiles/Rogue/EclipsesSmol.cs | 2 +- Projectiles/Rogue/EclipsesStealth.cs | 2 +- Projectiles/Rogue/EmpyreanKnives.cs | 2 +- Projectiles/Rogue/EradicatorProjectile.cs | 4 +- Projectiles/Rogue/ExecutionersBlade.cs | 2 +- Projectiles/Rogue/FeatherKnifeProjectile.cs | 2 +- Projectiles/Rogue/FlameScytheProjectile.cs | 4 +- Projectiles/Rogue/Fork.cs | 2 +- Projectiles/Rogue/FossilShardThrown.cs | 2 +- Projectiles/Rogue/GelDartProjectile.cs | 2 +- Projectiles/Rogue/GhoulishGouger.cs | 2 +- Projectiles/Rogue/GlaiveProj.cs | 2 +- Projectiles/Rogue/IceStarProjectile.cs | 2 +- Projectiles/Rogue/IchorSpear.cs | 2 +- Projectiles/Rogue/IchorSpear2.cs | 2 +- Projectiles/Rogue/Knife.cs | 2 +- Projectiles/Rogue/Lionfish.cs | 2 +- Projectiles/Rogue/Malachite.cs | 2 +- Projectiles/Rogue/MalachiteBolt.cs | 2 +- .../Rogue/MangroveChakramProjectile.cs | 2 +- Projectiles/Rogue/MeteorFist.cs | 2 +- Projectiles/Rogue/MoltenAmputator.cs | 2 +- Projectiles/Rogue/MoltenBlobThrown.cs | 2 +- Projectiles/Rogue/MonkeyDart.cs | 4 +- Projectiles/Rogue/Mycoroot.cs | 2 +- Projectiles/Rogue/MythrilKnifeProjectile.cs | 2 +- Projectiles/Rogue/OPHammer.cs | 4 +- .../OrichalcumSpikedGemstoneProjectile.cs | 2 +- .../Rogue/PalladiumJavelinProjectile.cs | 2 +- Projectiles/Rogue/ProfanedTrident.cs | 2 +- Projectiles/Rogue/Pwnagehammer.cs | 2 +- Projectiles/Rogue/RotBallProjectile.cs | 2 +- Projectiles/Rogue/RoyalKnife.cs | 2 +- Projectiles/Rogue/ScarletBlast.cs | 2 +- Projectiles/Rogue/ScarletDevilBullet.cs | 2 +- Projectiles/Rogue/ScarletDevilProjectile.cs | 8 +- Projectiles/Rogue/ScourgeVenomCloud.cs | 2 +- Projectiles/Rogue/ScourgeoftheDesert.cs | 2 +- Projectiles/Rogue/ScourgeoftheDesert2.cs | 2 +- .../Rogue/ScourgeoftheSeasProjectile.cs | 2 +- Projectiles/Rogue/ScourgeoftheSeasStealth.cs | 2 +- .../Rogue/SeashellBoomerangProjectile.cs | 2 +- Projectiles/Rogue/ShatteredExplosion.cs | 2 +- Projectiles/Rogue/ShatteredSun.cs | 2 +- Projectiles/Rogue/ShatteredSun2.cs | 2 +- Projectiles/Rogue/ShatteredSun3.cs | 2 +- Projectiles/Rogue/SpearofPaleolith.cs | 2 +- Projectiles/Rogue/Stormfrontproj.cs | 2 +- Projectiles/Rogue/Stormfrontspark.cs | 2 +- .../Rogue/TarragonThrowingDartProjectile.cs | 2 +- .../Rogue/TitaniumShurikenProjectile.cs | 2 +- Projectiles/Rogue/ToothBallProjectile.cs | 2 +- Projectiles/Rogue/TriactisOPHammer.cs | 2 +- Projectiles/Rogue/UrchinStinger.cs | 2 +- Projectiles/Rogue/Valediction.cs | 2 +- Projectiles/Rogue/Valediction2.cs | 2 +- Projectiles/Rogue/WulfrumKnife.cs | 2 +- Projectiles/Rogue/XerocPitchforkProjectile.cs | 2 +- Projectiles/Shrines/GladiatorSword.cs | 2 +- Projectiles/Shrines/GladiatorSword2.cs | 2 +- Projectiles/Shrines/LuxorsGiftRogue.cs | 2 +- Projectiles/Shrines/LuxorsGiftSummon.cs | 12 +- Projectiles/Summon/AngryChicken.cs | 12 +- Projectiles/Summon/AquaticStar.cs | 12 +- Projectiles/Summon/BigBustyRose.cs | 14 +- Projectiles/Summon/BlackHawkSummon.cs | 10 +- Projectiles/Summon/BloodClotMinion.cs | 12 +- Projectiles/Summon/BrittleStar.cs | 12 +- Projectiles/Summon/Calamari.cs | 12 +- Projectiles/Summon/Calamitamini.cs | 12 +- Projectiles/Summon/Cataclymini.cs | 12 +- Projectiles/Summon/Catastromini.cs | 12 +- Projectiles/Summon/ChaosSpirit.cs | 12 +- Projectiles/Summon/CloudyWaifu.cs | 12 +- Projectiles/Summon/Corroslime.cs | 12 +- Projectiles/Summon/CosmicEnergy.cs | 12 +- Projectiles/Summon/Cosmilamp.cs | 12 +- Projectiles/Summon/Crimslime.cs | 12 +- Projectiles/Summon/DaedalusCrystal.cs | 12 +- Projectiles/Summon/DankCreeper.cs | 12 +- Projectiles/Summon/DreadmineTurret.cs | 10 +- Projectiles/Summon/DrewsSandyWaifu.cs | 12 +- Projectiles/Summon/ElementalAxe.cs | 12 +- Projectiles/Summon/FungalClump.cs | 12 +- Projectiles/Summon/GhostlyMine.cs | 10 +- Projectiles/Summon/Herring.cs | 12 +- Projectiles/Summon/IceClasper.cs | 12 +- Projectiles/Summon/MechwormBody.cs | 2 +- Projectiles/Summon/MechwormBody2.cs | 2 +- Projectiles/Summon/MechwormHead.cs | 2 +- Projectiles/Summon/MechwormTail.cs | 2 +- Projectiles/Summon/PhantomGuy.cs | 12 +- Projectiles/Summon/ProfanedEnergy.cs | 10 +- Projectiles/Summon/ReaverOrb.cs | 12 +- Projectiles/Summon/RedDevil.cs | 2 +- Projectiles/Summon/Sandnado.cs | 12 +- Projectiles/Summon/SandyWaifu.cs | 12 +- Projectiles/Summon/SilvaCrystal.cs | 12 +- Projectiles/Summon/SirenLure.cs | 12 +- Projectiles/Summon/SlimeGod.cs | 12 +- Projectiles/Summon/SlimeGodAlt.cs | 12 +- Projectiles/Summon/SolarGod.cs | 12 +- Projectiles/Summon/SolarPixie.cs | 12 +- Projectiles/Summon/Spikecrag.cs | 10 +- Projectiles/Summon/Urchin.cs | 12 +- Projectiles/Summon/Valkyrie.cs | 12 +- Projectiles/SunkenSea/ClamCrusherFlail.cs | 2 +- Projectiles/SunkenSea/Prismalline.cs | 2 +- Projectiles/SunkenSea/Prismalline2.cs | 2 +- Projectiles/SunkenSea/Prismalline3.cs | 2 +- Projectiles/SunkenSea/SeafoamBomb.cs | 2 +- Projectiles/SunkenSea/SeafoamBubble.cs | 2 +- Projectiles/SunkenSea/Shellfish.cs | 12 +- Projectiles/Typeless/AstralStar.cs | 2 +- Projectiles/Typeless/NanoblackMain.cs | 2 +- Projectiles/Typeless/StellarContemptHammer.cs | 2 +- Tiles/FurniturePlaguedPlate/PlagueInfuser.cs | 2 +- Tiles/FurnitureStatigel/StaticRefiner.cs | 2 +- Utilities/CalamityUtils.cs | 53 +++-- Waters/AbyssWater.cs | 2 +- Waters/AstralWater.cs | 2 +- Waters/SulphuricWater.cs | 2 +- Waters/SunkenSeaWater.cs | 2 +- World/CalamityWorld.cs | 24 +-- 1206 files changed, 2198 insertions(+), 2199 deletions(-) diff --git a/Buffs/Amidias/AmidiasBlessing.cs b/Buffs/Amidias/AmidiasBlessing.cs index 0522bdc277..8e559d721a 100644 --- a/Buffs/Amidias/AmidiasBlessing.cs +++ b/Buffs/Amidias/AmidiasBlessing.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Buffs.Amidias public override void Update(Player player, ref int buffIndex) { - player.GetCalamityPlayer().amidiasBlessing = true; + player.Calamity().amidiasBlessing = true; player.breath = player.breathMax + 91; } } diff --git a/Buffs/Amidias/HermitCrab.cs b/Buffs/Amidias/HermitCrab.cs index a9b6ccd0b6..9d36e37aa3 100644 --- a/Buffs/Amidias/HermitCrab.cs +++ b/Buffs/Amidias/HermitCrab.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Buffs.Amidias public override void Update(Player player, ref int buffIndex) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (player.ownedProjectileCounts[mod.ProjectileType("HermitCrab")] > 0) { modPlayer.hCrab = true; diff --git a/Buffs/Amidias/SnapClamDebuff.cs b/Buffs/Amidias/SnapClamDebuff.cs index 9f94645cff..817d931bae 100644 --- a/Buffs/Amidias/SnapClamDebuff.cs +++ b/Buffs/Amidias/SnapClamDebuff.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Buffs.Amidias public override void Update(NPC npc, ref int buffIndex) { - npc.GetGlobalNPC(mod).clamDebuff = true; + npc.Calamity().clamDebuff = true; } } } diff --git a/Buffs/CalamityGlobalBuff.cs b/Buffs/CalamityGlobalBuff.cs index 12378258a7..253e917458 100644 --- a/Buffs/CalamityGlobalBuff.cs +++ b/Buffs/CalamityGlobalBuff.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Buffs { if (type == BuffID.Shine) { - player.GetCalamityPlayer().shine = true; + player.Calamity().shine = true; } else if (type == BuffID.IceBarrier) { @@ -23,11 +23,11 @@ namespace CalamityMod.Buffs } else if (type == BuffID.Rage) { - player.GetCalamityPlayer().throwingCrit += 10; + player.Calamity().throwingCrit += 10; } else if (type == BuffID.WellFed) { - player.GetCalamityPlayer().throwingCrit += 2; + player.Calamity().throwingCrit += 2; } else if (type >= BuffID.NebulaUpDmg1 && type <= BuffID.NebulaUpDmg3) { diff --git a/Buffs/DoTDebuffs/AbyssalFlames.cs b/Buffs/DoTDebuffs/AbyssalFlames.cs index 894a08bca7..593b96a958 100644 --- a/Buffs/DoTDebuffs/AbyssalFlames.cs +++ b/Buffs/DoTDebuffs/AbyssalFlames.cs @@ -21,12 +21,12 @@ namespace CalamityMod.Buffs.DoTDebuffs public override void Update(Player player, ref int buffIndex) { - player.GetCalamityPlayer().aFlames = true; + player.Calamity().aFlames = true; } public override void Update(NPC npc, ref int buffIndex) { - npc.GetGlobalNPC(mod).aFlames = true; + npc.Calamity().aFlames = true; } } } diff --git a/Buffs/DoTDebuffs/AstralInfectionDebuff.cs b/Buffs/DoTDebuffs/AstralInfectionDebuff.cs index 4c373e65bb..c946b63eb6 100644 --- a/Buffs/DoTDebuffs/AstralInfectionDebuff.cs +++ b/Buffs/DoTDebuffs/AstralInfectionDebuff.cs @@ -20,12 +20,12 @@ namespace CalamityMod.Buffs.DoTDebuffs public override void Update(Player player, ref int buffIndex) { - player.GetCalamityPlayer().astralInfection = true; + player.Calamity().astralInfection = true; } public override void Update(NPC npc, ref int buffIndex) { - npc.GetGlobalNPC(mod).astralInfection = true; + npc.Calamity().astralInfection = true; } } } diff --git a/Buffs/DoTDebuffs/BrimstoneFlames.cs b/Buffs/DoTDebuffs/BrimstoneFlames.cs index 5f93e3f89f..c9fbfdc180 100644 --- a/Buffs/DoTDebuffs/BrimstoneFlames.cs +++ b/Buffs/DoTDebuffs/BrimstoneFlames.cs @@ -19,12 +19,12 @@ namespace CalamityMod.Buffs.DoTDebuffs public override void Update(Player player, ref int buffIndex) { - player.GetCalamityPlayer().bFlames = true; + player.Calamity().bFlames = true; } public override void Update(NPC npc, ref int buffIndex) { - npc.GetGlobalNPC(mod).bFlames = true; + npc.Calamity().bFlames = true; } } } diff --git a/Buffs/DoTDebuffs/BurningBlood.cs b/Buffs/DoTDebuffs/BurningBlood.cs index af4cea580b..ce9d82aa0e 100644 --- a/Buffs/DoTDebuffs/BurningBlood.cs +++ b/Buffs/DoTDebuffs/BurningBlood.cs @@ -19,12 +19,12 @@ namespace CalamityMod.Buffs.DoTDebuffs public override void Update(Player player, ref int buffIndex) { - player.GetCalamityPlayer().bBlood = true; + player.Calamity().bBlood = true; } public override void Update(NPC npc, ref int buffIndex) { - npc.GetGlobalNPC(mod).bBlood = true; + npc.Calamity().bBlood = true; } } } diff --git a/Buffs/DoTDebuffs/CrushDepth.cs b/Buffs/DoTDebuffs/CrushDepth.cs index 4770373236..8a6c13f73b 100644 --- a/Buffs/DoTDebuffs/CrushDepth.cs +++ b/Buffs/DoTDebuffs/CrushDepth.cs @@ -19,12 +19,12 @@ namespace CalamityMod.Buffs.DoTDebuffs public override void Update(Player player, ref int buffIndex) { - player.GetCalamityPlayer().cDepth = true; + player.Calamity().cDepth = true; } public override void Update(NPC npc, ref int buffIndex) { - npc.GetGlobalNPC(mod).cDepth = true; + npc.Calamity().cDepth = true; } } } diff --git a/Buffs/DoTDebuffs/DemonFlames.cs b/Buffs/DoTDebuffs/DemonFlames.cs index 2e24cd7169..9f7248fc26 100644 --- a/Buffs/DoTDebuffs/DemonFlames.cs +++ b/Buffs/DoTDebuffs/DemonFlames.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Buffs.DoTDebuffs public override void Update(NPC npc, ref int buffIndex) { - npc.GetGlobalNPC(mod).dFlames = true; + npc.Calamity().dFlames = true; } } } diff --git a/Buffs/DoTDebuffs/GodSlayerInferno.cs b/Buffs/DoTDebuffs/GodSlayerInferno.cs index 3d7e001811..6c0d344e0f 100644 --- a/Buffs/DoTDebuffs/GodSlayerInferno.cs +++ b/Buffs/DoTDebuffs/GodSlayerInferno.cs @@ -20,12 +20,12 @@ namespace CalamityMod.Buffs.DoTDebuffs public override void Update(Player player, ref int buffIndex) { - player.GetCalamityPlayer().gsInferno = true; + player.Calamity().gsInferno = true; } public override void Update(NPC npc, ref int buffIndex) { - npc.GetGlobalNPC(mod).gsInferno = true; + npc.Calamity().gsInferno = true; } } } diff --git a/Buffs/DoTDebuffs/HolyInferno.cs b/Buffs/DoTDebuffs/HolyInferno.cs index 4ff0c1bd4f..2e8788f880 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.GetCalamityPlayer().hInferno = true; + player.Calamity().hInferno = true; } } } diff --git a/Buffs/DoTDebuffs/HolyLight.cs b/Buffs/DoTDebuffs/HolyLight.cs index fbdf8173da..1b7c0d73e0 100644 --- a/Buffs/DoTDebuffs/HolyLight.cs +++ b/Buffs/DoTDebuffs/HolyLight.cs @@ -19,12 +19,12 @@ namespace CalamityMod.Buffs.DoTDebuffs public override void Update(Player player, ref int buffIndex) { - player.GetCalamityPlayer().hFlames = true; + player.Calamity().hFlames = true; } public override void Update(NPC npc, ref int buffIndex) { - npc.GetGlobalNPC(mod).hFlames = true; + npc.Calamity().hFlames = true; } } } diff --git a/Buffs/DoTDebuffs/LethalLavaBurn.cs b/Buffs/DoTDebuffs/LethalLavaBurn.cs index 46809485b3..da7b0e3470 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.GetCalamityPlayer().lethalLavaBurn = true; + player.Calamity().lethalLavaBurn = true; } } } diff --git a/Buffs/DoTDebuffs/Nightwither.cs b/Buffs/DoTDebuffs/Nightwither.cs index 867977fd58..2ed20afb44 100644 --- a/Buffs/DoTDebuffs/Nightwither.cs +++ b/Buffs/DoTDebuffs/Nightwither.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Buffs.DoTDebuffs public override void Update(NPC npc, ref int buffIndex) { - npc.GetGlobalNPC(mod).nightwither = true; + npc.Calamity().nightwither = true; } } } diff --git a/Buffs/DoTDebuffs/Plague.cs b/Buffs/DoTDebuffs/Plague.cs index 6b442c4b5f..e7429527c9 100644 --- a/Buffs/DoTDebuffs/Plague.cs +++ b/Buffs/DoTDebuffs/Plague.cs @@ -20,12 +20,12 @@ namespace CalamityMod.Buffs.DoTDebuffs public override void Update(Player player, ref int buffIndex) { - player.GetCalamityPlayer().pFlames = true; + player.Calamity().pFlames = true; } public override void Update(NPC npc, ref int buffIndex) { - npc.GetGlobalNPC(mod).pFlames = true; + npc.Calamity().pFlames = true; } } } diff --git a/Buffs/DoTDebuffs/Shadowflame.cs b/Buffs/DoTDebuffs/Shadowflame.cs index 42fb1a565d..7b4d64b87a 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.GetCalamityPlayer().shadowflame = true; + player.Calamity().shadowflame = true; } } } diff --git a/Buffs/DoTDebuffs/Shred.cs b/Buffs/DoTDebuffs/Shred.cs index 8a40458271..bdcafebe14 100644 --- a/Buffs/DoTDebuffs/Shred.cs +++ b/Buffs/DoTDebuffs/Shred.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Buffs.DoTDebuffs public override void Update(NPC npc, ref int buffIndex) { - npc.GetGlobalNPC(mod).pShred = true; + npc.Calamity().pShred = true; } } } diff --git a/Buffs/DoTDebuffs/VulnerabilityHex.cs b/Buffs/DoTDebuffs/VulnerabilityHex.cs index c2ea60f8f1..0e8521f7a1 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.GetCalamityPlayer().vHex = true; + player.Calamity().vHex = true; } } } diff --git a/Buffs/Fabsol/BloodyMary.cs b/Buffs/Fabsol/BloodyMary.cs index ef2a2f837c..6362864e80 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.GetCalamityPlayer().bloodyMary = true; + player.Calamity().bloodyMary = true; } } } diff --git a/Buffs/Fabsol/BlueSpeedCandle.cs b/Buffs/Fabsol/BlueSpeedCandle.cs index 63fb770e09..e983edebbc 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.GetCalamityPlayer().blueCandle = true; + player.Calamity().blueCandle = true; } } } diff --git a/Buffs/Fabsol/CaribbeanRum.cs b/Buffs/Fabsol/CaribbeanRum.cs index cd95ae3816..9a5d55ec57 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.GetCalamityPlayer().caribbeanRum = true; + player.Calamity().caribbeanRum = true; } } } diff --git a/Buffs/Fabsol/CinnamonRoll.cs b/Buffs/Fabsol/CinnamonRoll.cs index ad6bac44c8..6fb706b8d6 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.GetCalamityPlayer().cinnamonRoll = true; + player.Calamity().cinnamonRoll = true; } } } diff --git a/Buffs/Fabsol/Everclear.cs b/Buffs/Fabsol/Everclear.cs index 8d9ffe4a03..bdb6d5f7ee 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.GetCalamityPlayer().everclear = true; + player.Calamity().everclear = true; } } } diff --git a/Buffs/Fabsol/EvergreenGin.cs b/Buffs/Fabsol/EvergreenGin.cs index 1b00ef9c81..9f6972916f 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.GetCalamityPlayer().evergreenGin = true; + player.Calamity().evergreenGin = true; } } } diff --git a/Buffs/Fabsol/FabsolVodka.cs b/Buffs/Fabsol/FabsolVodka.cs index 5265f67d63..9c655eb322 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.GetCalamityPlayer().fabsolVodka = true; + player.Calamity().fabsolVodka = true; } } } diff --git a/Buffs/Fabsol/Fireball.cs b/Buffs/Fabsol/Fireball.cs index f1e65b8f7b..c2742b0963 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.GetCalamityPlayer().fireball = true; + player.Calamity().fireball = true; } } } diff --git a/Buffs/Fabsol/GrapeBeer.cs b/Buffs/Fabsol/GrapeBeer.cs index e77170d3ba..44fff50885 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.GetCalamityPlayer().grapeBeer = true; + player.Calamity().grapeBeer = true; } } } diff --git a/Buffs/Fabsol/Margarita.cs b/Buffs/Fabsol/Margarita.cs index ba36717fdc..be4da633b4 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.GetCalamityPlayer().margarita = true; + player.Calamity().margarita = true; } } } diff --git a/Buffs/Fabsol/Moonshine.cs b/Buffs/Fabsol/Moonshine.cs index fe4cb44b04..eab65b9311 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.GetCalamityPlayer().moonshine = true; + player.Calamity().moonshine = true; } } } diff --git a/Buffs/Fabsol/MoscowMule.cs b/Buffs/Fabsol/MoscowMule.cs index ccc5b1637d..8409e83942 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.GetCalamityPlayer().moscowMule = true; + player.Calamity().moscowMule = true; } } } diff --git a/Buffs/Fabsol/PinkHealthCandle.cs b/Buffs/Fabsol/PinkHealthCandle.cs index b858cee671..bbc6e7e89e 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.GetCalamityPlayer().pinkCandle = true; + player.Calamity().pinkCandle = true; } } } diff --git a/Buffs/Fabsol/PurpleDefenseCandle.cs b/Buffs/Fabsol/PurpleDefenseCandle.cs index d9645887b6..9d6ac5e555 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.GetCalamityPlayer().purpleCandle = true; + player.Calamity().purpleCandle = true; } } } diff --git a/Buffs/Fabsol/RedWine.cs b/Buffs/Fabsol/RedWine.cs index ea029c9ba4..b2bb26229d 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.GetCalamityPlayer().redWine = true; + player.Calamity().redWine = true; } } } diff --git a/Buffs/Fabsol/Rum.cs b/Buffs/Fabsol/Rum.cs index 8efa9a9cf6..bce074815b 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.GetCalamityPlayer().rum = true; + player.Calamity().rum = true; } } } diff --git a/Buffs/Fabsol/Screwdriver.cs b/Buffs/Fabsol/Screwdriver.cs index dde74e4ec6..0303f2a9b8 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.GetCalamityPlayer().screwdriver = true; + player.Calamity().screwdriver = true; } } } diff --git a/Buffs/Fabsol/StarBeamRye.cs b/Buffs/Fabsol/StarBeamRye.cs index 6f0427f1d7..03dfca941f 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.GetCalamityPlayer().starBeamRye = true; + player.Calamity().starBeamRye = true; } } } diff --git a/Buffs/Fabsol/Tequila.cs b/Buffs/Fabsol/Tequila.cs index f8d5bce822..aadf7891fe 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.GetCalamityPlayer().tequila = true; + player.Calamity().tequila = true; } } } diff --git a/Buffs/Fabsol/TequilaSunrise.cs b/Buffs/Fabsol/TequilaSunrise.cs index 76bb13d736..0397304cea 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.GetCalamityPlayer().tequilaSunrise = true; + player.Calamity().tequilaSunrise = true; } } } diff --git a/Buffs/Fabsol/Trippy.cs b/Buffs/Fabsol/Trippy.cs index f58d98f17c..d6ecae3090 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.GetCalamityPlayer().trippy = true; + player.Calamity().trippy = true; } } } diff --git a/Buffs/Fabsol/Vodka.cs b/Buffs/Fabsol/Vodka.cs index 2a84e8704c..cca197c7af 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.GetCalamityPlayer().vodka = true; + player.Calamity().vodka = true; } } } diff --git a/Buffs/Fabsol/Whiskey.cs b/Buffs/Fabsol/Whiskey.cs index fbcd24a2ed..88621b2906 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.GetCalamityPlayer().whiskey = true; + player.Calamity().whiskey = true; } } } diff --git a/Buffs/Fabsol/WhiteWine.cs b/Buffs/Fabsol/WhiteWine.cs index 2f93e7d19f..210b7e5c51 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.GetCalamityPlayer().whiteWine = true; + player.Calamity().whiteWine = true; } } } diff --git a/Buffs/Fabsol/YellowDamageCandle.cs b/Buffs/Fabsol/YellowDamageCandle.cs index 920aec402a..8ba4d9b4e2 100644 --- a/Buffs/Fabsol/YellowDamageCandle.cs +++ b/Buffs/Fabsol/YellowDamageCandle.cs @@ -21,12 +21,12 @@ namespace CalamityMod.Buffs.Fabsol public override void Update(Player player, ref int buffIndex) { - player.GetCalamityPlayer().yellowCandle = true; + player.Calamity().yellowCandle = true; } public override void Update(NPC npc, ref int buffIndex) { - npc.GetGlobalNPC(mod).yellowCandle = true; + npc.Calamity().yellowCandle = true; } } } diff --git a/Buffs/MountBuffs/BrimstoneMount.cs b/Buffs/MountBuffs/BrimstoneMount.cs index c830ad16cb..4c55eb89e5 100644 --- a/Buffs/MountBuffs/BrimstoneMount.cs +++ b/Buffs/MountBuffs/BrimstoneMount.cs @@ -1,6 +1,6 @@ -using Terraria; +using CalamityMod.Items.Mounts; +using Terraria; using Terraria.ModLoader; -using CalamityMod.CalPlayer; namespace CalamityMod.Buffs.MountBuffs { @@ -16,7 +16,7 @@ namespace CalamityMod.Buffs.MountBuffs public override void Update(Player player, ref int buffIndex) { - player.mount.SetMount(mod.MountType(), player); + player.mount.SetMount(ModContent.MountType(), player); player.buffTime[buffIndex] = 10; } } diff --git a/Buffs/MountBuffs/Fab.cs b/Buffs/MountBuffs/Fab.cs index 0ffba356d7..0568ecd12f 100644 --- a/Buffs/MountBuffs/Fab.cs +++ b/Buffs/MountBuffs/Fab.cs @@ -1,6 +1,5 @@ using Terraria; using Terraria.ModLoader; -using CalamityMod.CalPlayer; namespace CalamityMod.Buffs.MountBuffs { @@ -16,9 +15,9 @@ namespace CalamityMod.Buffs.MountBuffs public override void Update(Player player, ref int buffIndex) { - player.mount.SetMount(mod.MountType(), player); + player.mount.SetMount(ModContent.MountType(), player); player.buffTime[buffIndex] = 10; - player.GetCalamityPlayer().fab = true; + player.Calamity().fab = true; } } } diff --git a/Buffs/MountBuffs/GazeOfCrysthamyrBuff.cs b/Buffs/MountBuffs/GazeOfCrysthamyrBuff.cs index 6a8f9b70ff..dd0caed250 100644 --- a/Buffs/MountBuffs/GazeOfCrysthamyrBuff.cs +++ b/Buffs/MountBuffs/GazeOfCrysthamyrBuff.cs @@ -1,6 +1,6 @@ -using Terraria; +using CalamityMod.Items.Mounts; +using Terraria; using Terraria.ModLoader; -using CalamityMod.CalPlayer; namespace CalamityMod.Buffs.MountBuffs { @@ -16,9 +16,9 @@ namespace CalamityMod.Buffs.MountBuffs public override void Update(Player player, ref int buffIndex) { - player.mount.SetMount(mod.MountType(), player); + player.mount.SetMount(ModContent.MountType(), player); player.buffTime[buffIndex] = 10; - player.GetCalamityPlayer().crysthamyr = true; + player.Calamity().crysthamyr = true; } } } diff --git a/Buffs/MountBuffs/SquishyBeanBuff.cs b/Buffs/MountBuffs/SquishyBeanBuff.cs index d5b606a7b9..1ff9bb7b33 100644 --- a/Buffs/MountBuffs/SquishyBeanBuff.cs +++ b/Buffs/MountBuffs/SquishyBeanBuff.cs @@ -1,6 +1,6 @@ -using Terraria; +using CalamityMod.Items.Mounts; +using Terraria; using Terraria.ModLoader; -using CalamityMod.CalPlayer; namespace CalamityMod.Buffs.MountBuffs { @@ -16,7 +16,7 @@ namespace CalamityMod.Buffs.MountBuffs public override void Update(Player player, ref int buffIndex) { - player.mount.SetMount(mod.MountType(), player); + player.mount.SetMount(ModContent.MountType(), player); player.buffTime[buffIndex] = 10; } } diff --git a/Buffs/PetBuffs/AkatoYharonBuff.cs b/Buffs/PetBuffs/AkatoYharonBuff.cs index 17c29d7c7c..8dbd1e8867 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.GetCalamityPlayer().akato = true; + player.Calamity().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 629512ecd6..bb40be2620 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.GetCalamityPlayer().bearPet = true; + player.Calamity().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 0b6ad68241..862053dd30 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.GetCalamityPlayer().perfmini = true; + player.Calamity().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 f555cbe093..9c18ff452f 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.GetCalamityPlayer().brimling = true; + player.Calamity().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 88403daec0..c9b9e12bf9 100644 --- a/Buffs/PetBuffs/ChibiiBuff.cs +++ b/Buffs/PetBuffs/ChibiiBuff.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Buffs.PetBuffs { player.buffTime[buffIndex] = 18000; - player.GetCalamityPlayer().chibii = true; + player.Calamity().chibii = true; bool petProjectileNotSpawned = player.ownedProjectileCounts[mod.ProjectileType("ChibiiDoggo")] <= 0; diff --git a/Buffs/PetBuffs/DannyDevito.cs b/Buffs/PetBuffs/DannyDevito.cs index 0fa135d63c..17eeafcd59 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.GetCalamityPlayer().trashMan = true; + player.Calamity().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 746d78d82f..cf88184259 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.GetCalamityPlayer().fox = true; + player.Calamity().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 1fac249453..ed75b0f748 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.GetCalamityPlayer().kendra = true; + player.Calamity().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 3b890d1757..96d12239b9 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.GetCalamityPlayer().leviPet = true; + player.Calamity().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 f9ee64c071..42104b0c83 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.GetCalamityPlayer().sirenPet = true; + player.Calamity().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 4e30eaa3a5..cda2908ca2 100644 --- a/Buffs/PetBuffs/ThirdSageBuff.cs +++ b/Buffs/PetBuffs/ThirdSageBuff.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Buffs.PetBuffs public override void Update(Player player, ref int buffIndex) { player.buffTime[buffIndex] = 18000; - player.GetCalamityPlayer().thirdSage = true; + player.Calamity().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 9aa2ca35c3..6a38578294 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.GetCalamityPlayer().aWeapon = true; + player.Calamity().aWeapon = true; } } } diff --git a/Buffs/PotionBuffs/AnechoicCoating.cs b/Buffs/PotionBuffs/AnechoicCoating.cs index 7a577e87f7..436dbe289a 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.GetCalamityPlayer().anechoicCoating = true; + player.Calamity().anechoicCoating = true; } } } diff --git a/Buffs/PotionBuffs/ArmorCrumbling.cs b/Buffs/PotionBuffs/ArmorCrumbling.cs index a05659823f..c1f42b6581 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.GetCalamityPlayer().armorCrumbling = true; + player.Calamity().armorCrumbling = true; } } } diff --git a/Buffs/PotionBuffs/ArmorShattering.cs b/Buffs/PotionBuffs/ArmorShattering.cs index 0c7ba95afa..f43869ad1f 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.GetCalamityPlayer().armorShattering = true; + player.Calamity().armorShattering = true; } } } diff --git a/Buffs/PotionBuffs/AstralInjectionBuff.cs b/Buffs/PotionBuffs/AstralInjectionBuff.cs index 2f02af5c0a..2c1f34a6e2 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.GetCalamityPlayer().astralInjection = true; + player.Calamity().astralInjection = true; } } } diff --git a/Buffs/PotionBuffs/BoundingBuff.cs b/Buffs/PotionBuffs/BoundingBuff.cs index 6b86dbd48a..2fe718a8a6 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.GetCalamityPlayer().bounding = true; + player.Calamity().bounding = true; } } } diff --git a/Buffs/PotionBuffs/Cadence.cs b/Buffs/PotionBuffs/Cadence.cs index 37b5add9b2..7868a948ec 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.GetCalamityPlayer().cadence = true; + player.Calamity().cadence = true; } } } diff --git a/Buffs/PotionBuffs/CalciumBuff.cs b/Buffs/PotionBuffs/CalciumBuff.cs index 7920ec79d4..6d3f999e96 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.GetCalamityPlayer().calcium = true; + player.Calamity().calcium = true; } } } diff --git a/Buffs/PotionBuffs/CeaselessHunger.cs b/Buffs/PotionBuffs/CeaselessHunger.cs index 8ca4442dce..c37af3faf9 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.GetCalamityPlayer().ceaselessHunger = true; + player.Calamity().ceaselessHunger = true; } } } diff --git a/Buffs/PotionBuffs/DraconicSurgeBuff.cs b/Buffs/PotionBuffs/DraconicSurgeBuff.cs index a839892e88..a6560e460e 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.GetCalamityPlayer().draconicSurge = true; + player.Calamity().draconicSurge = true; } } } diff --git a/Buffs/PotionBuffs/GravityNormalizerBuff.cs b/Buffs/PotionBuffs/GravityNormalizerBuff.cs index e4797d4d3d..a10576f7c5 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.GetCalamityPlayer().gravityNormalizer = true; + player.Calamity().gravityNormalizer = true; } } } diff --git a/Buffs/PotionBuffs/HolyWrathBuff.cs b/Buffs/PotionBuffs/HolyWrathBuff.cs index 234392c3ef..234c0ee07c 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.GetCalamityPlayer().holyWrath = true; + player.Calamity().holyWrath = true; } } } diff --git a/Buffs/PotionBuffs/Invincible.cs b/Buffs/PotionBuffs/Invincible.cs index 81bfbea659..0a082c4f6a 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.GetCalamityPlayer().invincible = true; + player.Calamity().invincible = true; } } } diff --git a/Buffs/PotionBuffs/Omniscience.cs b/Buffs/PotionBuffs/Omniscience.cs index 71a53ff88e..a11cf66921 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.GetCalamityPlayer().omniscience = true; + player.Calamity().omniscience = true; } } } diff --git a/Buffs/PotionBuffs/PenumbraBuff.cs b/Buffs/PotionBuffs/PenumbraBuff.cs index c379b76c6e..4fdc3b6b50 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.GetCalamityPlayer().penumbra = true; + player.Calamity().penumbra = true; } } } diff --git a/Buffs/PotionBuffs/PhotosynthesisBuff.cs b/Buffs/PotionBuffs/PhotosynthesisBuff.cs index 24a6b7ee41..39c5954a0d 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.GetCalamityPlayer().photosynthesis = true; + player.Calamity().photosynthesis = true; } } } diff --git a/Buffs/PotionBuffs/ProfanedRageBuff.cs b/Buffs/PotionBuffs/ProfanedRageBuff.cs index cff1772139..6264f48266 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.GetCalamityPlayer().profanedRage = true; + player.Calamity().profanedRage = true; } } } diff --git a/Buffs/PotionBuffs/Soaring.cs b/Buffs/PotionBuffs/Soaring.cs index 1180a64788..5f80de1655 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.GetCalamityPlayer().soaring = true; + player.Calamity().soaring = true; } } } diff --git a/Buffs/PotionBuffs/TitanScale.cs b/Buffs/PotionBuffs/TitanScale.cs index 1510457359..374dd3711b 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.GetCalamityPlayer().tScale = true; + player.Calamity().tScale = true; } } } diff --git a/Buffs/PotionBuffs/TriumphBuff.cs b/Buffs/PotionBuffs/TriumphBuff.cs index 2fbc256012..ec596244f1 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.GetCalamityPlayer().triumph = true; + player.Calamity().triumph = true; } } } diff --git a/Buffs/PotionBuffs/YharimPower.cs b/Buffs/PotionBuffs/YharimPower.cs index 2b06339b62..4031d44a8a 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.GetCalamityPlayer().yPower = true; + player.Calamity().yPower = true; } } } diff --git a/Buffs/PotionBuffs/Zen.cs b/Buffs/PotionBuffs/Zen.cs index 6e5367da88..e82d14cdb3 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.GetCalamityPlayer().zen = true; + player.Calamity().zen = true; } } } diff --git a/Buffs/PotionBuffs/Zerg.cs b/Buffs/PotionBuffs/Zerg.cs index b445051521..673e467142 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.GetCalamityPlayer().zerg = true; + player.Calamity().zerg = true; } } } diff --git a/Buffs/Shrines/ChiBuff.cs b/Buffs/Shrines/ChiBuff.cs index 19f4ad224a..0b53e7c9b0 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.GetCalamityPlayer().trinketOfChiBuff = true; + player.Calamity().trinketOfChiBuff = true; } } } diff --git a/Buffs/Shrines/CorruptionEffigyBuff.cs b/Buffs/Shrines/CorruptionEffigyBuff.cs index 046e23907d..f82a2ef9f2 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.GetCalamityPlayer().corrEffigy = true; + player.Calamity().corrEffigy = true; } } } diff --git a/Buffs/Shrines/CrimsonEffigyBuff.cs b/Buffs/Shrines/CrimsonEffigyBuff.cs index bdb90fdfda..8f806f287a 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.GetCalamityPlayer().crimEffigy = true; + player.Calamity().crimEffigy = true; } } } diff --git a/Buffs/Shrines/GladiatorSwords.cs b/Buffs/Shrines/GladiatorSwords.cs index 9013218fdb..e412098e6e 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (player.ownedProjectileCounts[mod.ProjectileType("GladiatorSword")] > 0) { modPlayer.glSword = true; diff --git a/Buffs/Shrines/OnyxExcavatorBuff.cs b/Buffs/Shrines/OnyxExcavatorBuff.cs index c5e75b3581..92d840f53b 100644 --- a/Buffs/Shrines/OnyxExcavatorBuff.cs +++ b/Buffs/Shrines/OnyxExcavatorBuff.cs @@ -1,6 +1,6 @@ -using Terraria; +using CalamityMod.Items.Mounts; +using Terraria; using Terraria.ModLoader; -using CalamityMod.CalPlayer; namespace CalamityMod.Buffs.Shrines { @@ -16,9 +16,9 @@ namespace CalamityMod.Buffs.Shrines public override void Update(Player player, ref int buffIndex) { - player.mount.SetMount(mod.MountType(), player); + player.mount.SetMount(ModContent.MountType(), player); player.buffTime[buffIndex] = 10; - player.GetCalamityPlayer().onyxExcavator = true; + player.Calamity().onyxExcavator = true; } } } diff --git a/Buffs/Shrines/TundraLeashBuff.cs b/Buffs/Shrines/TundraLeashBuff.cs index 7335f5f026..2420eda673 100644 --- a/Buffs/Shrines/TundraLeashBuff.cs +++ b/Buffs/Shrines/TundraLeashBuff.cs @@ -1,6 +1,6 @@ -using Terraria; +using CalamityMod.Items.Mounts; +using Terraria; using Terraria.ModLoader; -using CalamityMod.CalPlayer; namespace CalamityMod.Buffs.Shrines { @@ -16,9 +16,9 @@ namespace CalamityMod.Buffs.Shrines public override void Update(Player player, ref int buffIndex) { - player.mount.SetMount(mod.MountType(), player); + player.mount.SetMount(ModContent.MountType(), player); player.buffTime[buffIndex] = 10; - player.GetCalamityPlayer().angryDog = true; + player.Calamity().angryDog = true; } } } diff --git a/Buffs/StatBuffs/AbyssalDivingSuitPlates.cs b/Buffs/StatBuffs/AbyssalDivingSuitPlates.cs index 14b70894a0..9ec35174bc 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.GetCalamityPlayer().abyssalDivingSuitPlates = true; + player.Calamity().abyssalDivingSuitPlates = true; } } } diff --git a/Buffs/StatBuffs/AdrenalineMode.cs b/Buffs/StatBuffs/AdrenalineMode.cs index 7e1723da74..3e5d8d4593 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.GetCalamityPlayer().adrenalineMode = true; + player.Calamity().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 22ce65f351..4a6ea38c30 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.GetCalamityPlayer().afflicted = true; + player.Calamity().afflicted = true; } } } diff --git a/Buffs/StatBuffs/ChaosCandle.cs b/Buffs/StatBuffs/ChaosCandle.cs index e620a0d456..80bf7b6b5d 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.GetCalamityPlayer().chaosCandle = true; + player.Calamity().chaosCandle = true; } } } diff --git a/Buffs/StatBuffs/CosmicFreeze.cs b/Buffs/StatBuffs/CosmicFreeze.cs index 812efe09d2..e1a9ab5ff2 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.GetCalamityPlayer().cFreeze = true; + player.Calamity().cFreeze = true; } } } diff --git a/Buffs/StatBuffs/GodSlayerCooldown.cs b/Buffs/StatBuffs/GodSlayerCooldown.cs index 990016e016..518bd2ae20 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.GetCalamityPlayer().godSlayerCooldown = true; + player.Calamity().godSlayerCooldown = true; } } } diff --git a/Buffs/StatBuffs/GraxDefense.cs b/Buffs/StatBuffs/GraxDefense.cs index e0166ea143..6c45122957 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.GetCalamityPlayer().graxDefense = true; + player.Calamity().graxDefense = true; } } } diff --git a/Buffs/StatBuffs/HeartAttack.cs b/Buffs/StatBuffs/HeartAttack.cs index c6731aa2e0..b5b47217fc 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.GetCalamityPlayer().hAttack = true; + player.Calamity().hAttack = true; } } } diff --git a/Buffs/StatBuffs/IceShieldBuff.cs b/Buffs/StatBuffs/IceShieldBuff.cs index b420c61d90..211c321e52 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.GetCalamityPlayer().sirenIce = true; + player.Calamity().sirenIce = true; } } } diff --git a/Buffs/StatBuffs/Molten.cs b/Buffs/StatBuffs/Molten.cs index 7db68bec2a..7d43519dbd 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.GetCalamityPlayer().molten = true; + player.Calamity().molten = true; } } } diff --git a/Buffs/StatBuffs/Mushy.cs b/Buffs/StatBuffs/Mushy.cs index 7fddae82a0..0abce57ab5 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.GetCalamityPlayer().mushy = true; + player.Calamity().mushy = true; } } } diff --git a/Buffs/StatBuffs/RageMode.cs b/Buffs/StatBuffs/RageMode.cs index 62d0ff9c3d..31846541cd 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.GetCalamityPlayer().rageMode = true; + player.Calamity().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 28beeb4824..5d8952a766 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.GetCalamityPlayer().rRage = true; + player.Calamity().rRage = true; } } } diff --git a/Buffs/StatBuffs/ScarfMeleeBoost.cs b/Buffs/StatBuffs/ScarfMeleeBoost.cs index 60f15c2b55..ba9981ec1a 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.GetCalamityPlayer().sMeleeBoost = true; + player.Calamity().sMeleeBoost = true; } } } diff --git a/Buffs/StatBuffs/ShellBoost.cs b/Buffs/StatBuffs/ShellBoost.cs index f1468e32fa..de8f4c196e 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.GetCalamityPlayer().shellBoost = true; + player.Calamity().shellBoost = true; } } } diff --git a/Buffs/StatBuffs/SirenWaterSpeed.cs b/Buffs/StatBuffs/SirenWaterSpeed.cs index 9066a497cf..d558f3c884 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.GetCalamityPlayer().sirenWaterBuff = true; + player.Calamity().sirenWaterBuff = true; } } } diff --git a/Buffs/StatBuffs/TarraLifeRegen.cs b/Buffs/StatBuffs/TarraLifeRegen.cs index 2b1424df03..5448e6d1f9 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.GetCalamityPlayer().tRegen = true; + player.Calamity().tRegen = true; } } } diff --git a/Buffs/StatBuffs/TranquilityCandle.cs b/Buffs/StatBuffs/TranquilityCandle.cs index 8f32282d16..22cd1014c4 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.GetCalamityPlayer().tranquilityCandle = true; + player.Calamity().tranquilityCandle = true; } } } diff --git a/Buffs/StatBuffs/TyrantsFury.cs b/Buffs/StatBuffs/TyrantsFury.cs index 4349bc2e57..98be55d9e7 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.GetCalamityPlayer().tFury = true; + player.Calamity().tFury = true; } } } diff --git a/Buffs/StatBuffs/XerocRage.cs b/Buffs/StatBuffs/XerocRage.cs index 9ab0fc3124..feec7a258a 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.GetCalamityPlayer().xRage = true; + player.Calamity().xRage = true; } } } diff --git a/Buffs/StatBuffs/XerocWrath.cs b/Buffs/StatBuffs/XerocWrath.cs index d73383a7d5..cc0cc8b00e 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.GetCalamityPlayer().xWrath = true; + player.Calamity().xWrath = true; } } } diff --git a/Buffs/StatDebuffs/AbyssalDivingSuitPlatesBroken.cs b/Buffs/StatDebuffs/AbyssalDivingSuitPlatesBroken.cs index 02dc9d1848..de39675b32 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.GetCalamityPlayer().abyssalDivingSuitCooldown = true; + player.Calamity().abyssalDivingSuitCooldown = true; } } } diff --git a/Buffs/StatDebuffs/ArmorCrunch.cs b/Buffs/StatDebuffs/ArmorCrunch.cs index 62656ef4c3..b0289f89f3 100644 --- a/Buffs/StatDebuffs/ArmorCrunch.cs +++ b/Buffs/StatDebuffs/ArmorCrunch.cs @@ -20,12 +20,12 @@ namespace CalamityMod.Buffs.StatDebuffs public override void Update(NPC npc, ref int buffIndex) { - npc.GetGlobalNPC(mod).aCrunch = true; + npc.Calamity().aCrunch = true; } public override void Update(Player player, ref int buffIndex) { - player.GetCalamityPlayer().aCrunch = true; + player.Calamity().aCrunch = true; } } } diff --git a/Buffs/StatDebuffs/BurntOut.cs b/Buffs/StatDebuffs/BurntOut.cs index ba1120acef..03f1feebcf 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.GetCalamityPlayer().bOut = true; + player.Calamity().bOut = true; } } } diff --git a/Buffs/StatDebuffs/Enraged.cs b/Buffs/StatDebuffs/Enraged.cs index 2e66875fd6..6bc0573b34 100644 --- a/Buffs/StatDebuffs/Enraged.cs +++ b/Buffs/StatDebuffs/Enraged.cs @@ -20,12 +20,12 @@ namespace CalamityMod.Buffs.StatDebuffs public override void Update(Player player, ref int buffIndex) { - player.GetCalamityPlayer().enraged = true; + player.Calamity().enraged = true; } public override void Update(NPC npc, ref int buffIndex) { - npc.GetGlobalNPC(mod).enraged = true; + npc.Calamity().enraged = true; } } } diff --git a/Buffs/StatDebuffs/ExoFreeze.cs b/Buffs/StatDebuffs/ExoFreeze.cs index c11629f817..cb15bbc19d 100644 --- a/Buffs/StatDebuffs/ExoFreeze.cs +++ b/Buffs/StatDebuffs/ExoFreeze.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Buffs.StatDebuffs public override void Update(NPC npc, ref int buffIndex) { - npc.GetGlobalNPC(mod).eFreeze = true; + npc.Calamity().eFreeze = true; } } } diff --git a/Buffs/StatDebuffs/ExtremeGrav.cs b/Buffs/StatDebuffs/ExtremeGrav.cs index f883e4e6c9..ffec873fd3 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.GetCalamityPlayer().eGrav = true; + player.Calamity().eGrav = true; } } } diff --git a/Buffs/StatDebuffs/ExtremeGravity.cs b/Buffs/StatDebuffs/ExtremeGravity.cs index d651b1c1ea..13e4b4a9f4 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.GetCalamityPlayer().eGravity = true; + player.Calamity().eGravity = true; } } } diff --git a/Buffs/StatDebuffs/FishAlert.cs b/Buffs/StatDebuffs/FishAlert.cs index 9bf1b91d5a..2fda86562e 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.GetCalamityPlayer().fishAlert = true; + player.Calamity().fishAlert = true; } } } diff --git a/Buffs/StatDebuffs/GlacialState.cs b/Buffs/StatDebuffs/GlacialState.cs index 1203765e31..6d815095fe 100644 --- a/Buffs/StatDebuffs/GlacialState.cs +++ b/Buffs/StatDebuffs/GlacialState.cs @@ -19,12 +19,12 @@ namespace CalamityMod.Buffs.StatDebuffs public override void Update(Player player, ref int buffIndex) { - player.GetCalamityPlayer().gState = true; + player.Calamity().gState = true; } public override void Update(NPC npc, ref int buffIndex) { - npc.GetGlobalNPC(mod).gState = true; + npc.Calamity().gState = true; } } } diff --git a/Buffs/StatDebuffs/Horror.cs b/Buffs/StatDebuffs/Horror.cs index 4afbc2f4ab..f2da405693 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.GetCalamityPlayer().horror = true; + player.Calamity().horror = true; } } } diff --git a/Buffs/StatDebuffs/IceShieldBrokenBuff.cs b/Buffs/StatDebuffs/IceShieldBrokenBuff.cs index 74171d9392..76ecbf194b 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.GetCalamityPlayer().sirenIceCooldown = true; + player.Calamity().sirenIceCooldown = true; } } } diff --git a/Buffs/StatDebuffs/Irradiated.cs b/Buffs/StatDebuffs/Irradiated.cs index 2afa91a9f7..e3ba7cac19 100644 --- a/Buffs/StatDebuffs/Irradiated.cs +++ b/Buffs/StatDebuffs/Irradiated.cs @@ -21,12 +21,12 @@ namespace CalamityMod.Buffs.StatDebuffs public override void Update(Player player, ref int buffIndex) { - player.GetCalamityPlayer().irradiated = true; + player.Calamity().irradiated = true; } public override void Update(NPC npc, ref int buffIndex) { - npc.GetGlobalNPC(mod).irradiated = true; + npc.Calamity().irradiated = true; } } } diff --git a/Buffs/StatDebuffs/MarkedforDeath.cs b/Buffs/StatDebuffs/MarkedforDeath.cs index 2b1785a2d2..61079d7b30 100644 --- a/Buffs/StatDebuffs/MarkedforDeath.cs +++ b/Buffs/StatDebuffs/MarkedforDeath.cs @@ -19,12 +19,12 @@ namespace CalamityMod.Buffs.StatDebuffs public override void Update(NPC npc, ref int buffIndex) { - npc.GetGlobalNPC(mod).marked = true; + npc.Calamity().marked = true; } public override void Update(Player player, ref int buffIndex) { - player.GetCalamityPlayer().marked = true; + player.Calamity().marked = true; } } } diff --git a/Buffs/StatDebuffs/ScarfCooldown.cs b/Buffs/StatDebuffs/ScarfCooldown.cs index 2bb7e8b4f3..1c16d4a6b2 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.GetCalamityPlayer().scarfCooldown = true; + player.Calamity().scarfCooldown = true; } } } diff --git a/Buffs/StatDebuffs/SilvaStun.cs b/Buffs/StatDebuffs/SilvaStun.cs index ef3f970275..203e75f8bb 100644 --- a/Buffs/StatDebuffs/SilvaStun.cs +++ b/Buffs/StatDebuffs/SilvaStun.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Buffs.StatDebuffs public override void Update(NPC npc, ref int buffIndex) { - npc.GetGlobalNPC(mod).silvaStun = true; + npc.Calamity().silvaStun = true; } } } diff --git a/Buffs/StatDebuffs/TemporalSadness.cs b/Buffs/StatDebuffs/TemporalSadness.cs index 26245fb832..2bba3cd86a 100644 --- a/Buffs/StatDebuffs/TemporalSadness.cs +++ b/Buffs/StatDebuffs/TemporalSadness.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Buffs.StatDebuffs public override void Update(NPC npc, ref int buffIndex) { - npc.GetGlobalNPC(mod).tSad = true; + npc.Calamity().tSad = true; } } } diff --git a/Buffs/StatDebuffs/TimeSlow.cs b/Buffs/StatDebuffs/TimeSlow.cs index d4883d66ff..4b0ffd4162 100644 --- a/Buffs/StatDebuffs/TimeSlow.cs +++ b/Buffs/StatDebuffs/TimeSlow.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Buffs.StatDebuffs public override void Update(NPC npc, ref int buffIndex) { - npc.GetGlobalNPC(mod).timeSlow = true; + npc.Calamity().timeSlow = true; } /*public override void Update(Player player, ref int buffIndex) diff --git a/Buffs/StatDebuffs/WarCleave.cs b/Buffs/StatDebuffs/WarCleave.cs index 366bee9b82..294d22a71e 100644 --- a/Buffs/StatDebuffs/WarCleave.cs +++ b/Buffs/StatDebuffs/WarCleave.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Buffs.StatDebuffs public override void Update(NPC npc, ref int buffIndex) { - npc.GetGlobalNPC(mod).wCleave = true; + npc.Calamity().wCleave = true; } } } diff --git a/Buffs/StatDebuffs/Warped.cs b/Buffs/StatDebuffs/Warped.cs index 8fe99b4f56..a19b8ba2c0 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.GetCalamityPlayer().warped = true; + player.Calamity().warped = true; } } } diff --git a/Buffs/StatDebuffs/WeakPetrification.cs b/Buffs/StatDebuffs/WeakPetrification.cs index 8feb36cd87..9b4030d389 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.GetCalamityPlayer().weakPetrification = true; + player.Calamity().weakPetrification = true; } } } diff --git a/Buffs/StatDebuffs/WhisperingDeath.cs b/Buffs/StatDebuffs/WhisperingDeath.cs index 14c71f5c52..2901538c13 100644 --- a/Buffs/StatDebuffs/WhisperingDeath.cs +++ b/Buffs/StatDebuffs/WhisperingDeath.cs @@ -20,12 +20,12 @@ namespace CalamityMod.Buffs.StatDebuffs public override void Update(Player player, ref int buffIndex) { - player.GetCalamityPlayer().wDeath = true; + player.Calamity().wDeath = true; } public override void Update(NPC npc, ref int buffIndex) { - npc.GetGlobalNPC(mod).wDeath = true; + npc.Calamity().wDeath = true; } } } diff --git a/Buffs/SummonBuffs/AngryChicken.cs b/Buffs/SummonBuffs/AngryChicken.cs index 27c6e9a61f..0b10369a34 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (player.ownedProjectileCounts[mod.ProjectileType("AngryChicken")] > 0) { modPlayer.aChicken = true; diff --git a/Buffs/SummonBuffs/AquaticStar.cs b/Buffs/SummonBuffs/AquaticStar.cs index d206ef0d5a..a2a3b98d84 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (player.ownedProjectileCounts[mod.ProjectileType("AquaticStar")] > 0) { modPlayer.aStar = true; diff --git a/Buffs/SummonBuffs/BloodClot.cs b/Buffs/SummonBuffs/BloodClot.cs index 98a0ae9182..e4ae2f4f06 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (player.ownedProjectileCounts[mod.ProjectileType("BloodClotMinion")] > 0) { modPlayer.bClot = true; diff --git a/Buffs/SummonBuffs/BrimstoneWaifu.cs b/Buffs/SummonBuffs/BrimstoneWaifu.cs index 75a9f6b171..a2dd1d4c14 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (player.ownedProjectileCounts[mod.ProjectileType("BigBustyRose")] > 0) { modPlayer.bWaifu = true; diff --git a/Buffs/SummonBuffs/BrittleStar.cs b/Buffs/SummonBuffs/BrittleStar.cs index c89809e048..b05e03494e 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (player.ownedProjectileCounts[mod.ProjectileType("BrittleStar")] > 0) { modPlayer.bStar = true; diff --git a/Buffs/SummonBuffs/Calamari.cs b/Buffs/SummonBuffs/Calamari.cs index 24f5877a08..f17890e545 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (player.ownedProjectileCounts[mod.ProjectileType("Calamari")] > 0) { modPlayer.calamari = true; diff --git a/Buffs/SummonBuffs/CalamitasEyes.cs b/Buffs/SummonBuffs/CalamitasEyes.cs index 74c0844487..bcc5ff4e4e 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (player.ownedProjectileCounts[mod.ProjectileType("Calamitamini")] > 0) { modPlayer.cEyes = true; diff --git a/Buffs/SummonBuffs/ChaosSpirit.cs b/Buffs/SummonBuffs/ChaosSpirit.cs index 33e0f1ffbf..9b41fa9fb7 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (player.ownedProjectileCounts[mod.ProjectileType("ChaosSpirit")] > 0) { modPlayer.cSpirit = true; diff --git a/Buffs/SummonBuffs/CloudyWaifu.cs b/Buffs/SummonBuffs/CloudyWaifu.cs index 50254c9604..0e2162fbe0 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (player.ownedProjectileCounts[mod.ProjectileType("CloudyWaifu")] > 0) { modPlayer.cWaifu = true; diff --git a/Buffs/SummonBuffs/Corroslime.cs b/Buffs/SummonBuffs/Corroslime.cs index 603ee9f403..640fb2a3e9 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (player.ownedProjectileCounts[mod.ProjectileType("Corroslime")] > 0) { modPlayer.cSlime = true; diff --git a/Buffs/SummonBuffs/CosmicEnergy.cs b/Buffs/SummonBuffs/CosmicEnergy.cs index 0241aadd13..185a78d4d9 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (player.ownedProjectileCounts[mod.ProjectileType("CosmicEnergy")] > 0) { modPlayer.cEnergy = true; diff --git a/Buffs/SummonBuffs/Cosmilamp.cs b/Buffs/SummonBuffs/Cosmilamp.cs index 51724c064b..7f78147a01 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (player.ownedProjectileCounts[mod.ProjectileType("Cosmilamp")] > 0) { modPlayer.cLamp = true; diff --git a/Buffs/SummonBuffs/Crimslime.cs b/Buffs/SummonBuffs/Crimslime.cs index 282ed7fccd..d0349e398c 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (player.ownedProjectileCounts[mod.ProjectileType("Crimslime")] > 0) { modPlayer.cSlime2 = true; diff --git a/Buffs/SummonBuffs/DaedalusCrystal.cs b/Buffs/SummonBuffs/DaedalusCrystal.cs index adbbcfed5e..aa9c30fa0d 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (player.ownedProjectileCounts[mod.ProjectileType("DaedalusCrystal")] > 0) { modPlayer.dCrystal = true; diff --git a/Buffs/SummonBuffs/DankCreeper.cs b/Buffs/SummonBuffs/DankCreeper.cs index 60d5333319..a3d8ca36e7 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (player.ownedProjectileCounts[mod.ProjectileType("DankCreeper")] > 0) { modPlayer.dCreeper = true; diff --git a/Buffs/SummonBuffs/DrewsSandyWaifu.cs b/Buffs/SummonBuffs/DrewsSandyWaifu.cs index 20162fda5b..ff9e1337fb 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (player.ownedProjectileCounts[mod.ProjectileType("DrewsSandyWaifu")] > 0) { modPlayer.dWaifu = true; diff --git a/Buffs/SummonBuffs/ElementalAxe.cs b/Buffs/SummonBuffs/ElementalAxe.cs index 3f1c9a6e60..b4a23a5c8e 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (player.ownedProjectileCounts[mod.ProjectileType("ElementalAxe")] > 0) { modPlayer.eAxe = true; diff --git a/Buffs/SummonBuffs/FungalClump.cs b/Buffs/SummonBuffs/FungalClump.cs index c16372bb94..8d85b17a2b 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (player.ownedProjectileCounts[mod.ProjectileType("FungalClump")] > 0) { modPlayer.fClump = true; diff --git a/Buffs/SummonBuffs/GuardianDefense.cs b/Buffs/SummonBuffs/GuardianDefense.cs index 32deea73d7..096d4ea539 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (player.ownedProjectileCounts[mod.ProjectileType("MiniGuardianDefense")] > 0) { modPlayer.gDefense = true; diff --git a/Buffs/SummonBuffs/GuardianHealer.cs b/Buffs/SummonBuffs/GuardianHealer.cs index 783da565fc..deca6b9dd6 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (player.ownedProjectileCounts[mod.ProjectileType("MiniGuardianHealer")] > 0) { modPlayer.gHealer = true; diff --git a/Buffs/SummonBuffs/GuardianOffense.cs b/Buffs/SummonBuffs/GuardianOffense.cs index 9c4c91070f..651ac6ab56 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (player.ownedProjectileCounts[mod.ProjectileType("MiniGuardianAttack")] > 0) { modPlayer.gOffense = true; diff --git a/Buffs/SummonBuffs/Herring.cs b/Buffs/SummonBuffs/Herring.cs index 1ea30fd9b0..14a8c0999f 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (player.ownedProjectileCounts[mod.ProjectileType("Herring")] > 0) { modPlayer.herring = true; diff --git a/Buffs/SummonBuffs/HotE.cs b/Buffs/SummonBuffs/HotE.cs index bd8bcead63..1b52dcb67a 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (!modPlayer.allWaifus) { diff --git a/Buffs/SummonBuffs/IceClasper.cs b/Buffs/SummonBuffs/IceClasper.cs index 88ef96c50f..ce79148c44 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (player.ownedProjectileCounts[mod.ProjectileType("IceClasper")] > 0) { modPlayer.iClasper = true; diff --git a/Buffs/SummonBuffs/Mechworm.cs b/Buffs/SummonBuffs/Mechworm.cs index 1ed46978ad..d0ec90328d 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (player.ownedProjectileCounts[mod.ProjectileType("MechwormHead")] > 0) { modPlayer.mWorm = true; diff --git a/Buffs/SummonBuffs/Phantom.cs b/Buffs/SummonBuffs/Phantom.cs index 1ef1ac6bd1..14db043b47 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (player.ownedProjectileCounts[mod.ProjectileType("PhantomGuy")] > 0) { modPlayer.pGuy = true; diff --git a/Buffs/SummonBuffs/ReaverOrb.cs b/Buffs/SummonBuffs/ReaverOrb.cs index 9563153f67..14f257f9ac 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (player.ownedProjectileCounts[mod.ProjectileType("ReaverOrb")] > 0) { modPlayer.rOrb = true; diff --git a/Buffs/SummonBuffs/RedDevil.cs b/Buffs/SummonBuffs/RedDevil.cs index 0742e69bf0..e8b9754973 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (player.ownedProjectileCounts[mod.ProjectileType("RedDevil")] > 0) { modPlayer.rDevil = true; diff --git a/Buffs/SummonBuffs/ResurrectionButterflyBuff.cs b/Buffs/SummonBuffs/ResurrectionButterflyBuff.cs index 32e2918012..c0374ae659 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); 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 6562310ea5..64093a35e8 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (player.ownedProjectileCounts[mod.ProjectileType("Sandnado")] > 0) { modPlayer.sandnado = true; diff --git a/Buffs/SummonBuffs/SandyWaifu.cs b/Buffs/SummonBuffs/SandyWaifu.cs index b81923e3e0..1ad87a5ae4 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (player.ownedProjectileCounts[mod.ProjectileType("SandyWaifu")] > 0) { modPlayer.sWaifu = true; diff --git a/Buffs/SummonBuffs/SilvaCrystal.cs b/Buffs/SummonBuffs/SilvaCrystal.cs index 57af4df67f..c1c8ed44af 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (player.ownedProjectileCounts[mod.ProjectileType("SilvaCrystal")] > 0) { modPlayer.sCrystal = true; diff --git a/Buffs/SummonBuffs/SirenLure.cs b/Buffs/SummonBuffs/SirenLure.cs index ec26aa10ef..44ed75f8d2 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (player.ownedProjectileCounts[mod.ProjectileType("SirenLure")] > 0) { modPlayer.slWaifu = true; diff --git a/Buffs/SummonBuffs/SlimeGod.cs b/Buffs/SummonBuffs/SlimeGod.cs index e5828c8030..a9a9002012 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (player.ownedProjectileCounts[mod.ProjectileType("SlimeGodAlt")] > 0) { modPlayer.sGod = true; diff --git a/Buffs/SummonBuffs/SolarSpirit.cs b/Buffs/SummonBuffs/SolarSpirit.cs index e0703f15ce..a6e77ad69d 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (player.ownedProjectileCounts[mod.ProjectileType("SolarPixie")] > 0) { modPlayer.SP = true; diff --git a/Buffs/SummonBuffs/SolarSpiritGod.cs b/Buffs/SummonBuffs/SolarSpiritGod.cs index cc9419371f..484f15813a 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (player.ownedProjectileCounts[mod.ProjectileType("SolarGod")] > 0) { modPlayer.SPG = true; diff --git a/Buffs/SummonBuffs/SpiritGeneratorAtkBuff.cs b/Buffs/SummonBuffs/SpiritGeneratorAtkBuff.cs index 6992600d9c..375bdd5e76 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.GetCalamityPlayer().sPower = true; + player.Calamity().sPower = true; } } } diff --git a/Buffs/SummonBuffs/SpiritGeneratorDefBuff.cs b/Buffs/SummonBuffs/SpiritGeneratorDefBuff.cs index ffe891cbe0..c997806868 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.GetCalamityPlayer().sDefense = true; + player.Calamity().sDefense = true; } } } diff --git a/Buffs/SummonBuffs/SpiritGeneratorRegenBuff.cs b/Buffs/SummonBuffs/SpiritGeneratorRegenBuff.cs index c25c6d29e0..fe51919e10 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.GetCalamityPlayer().sRegen = true; + player.Calamity().sRegen = true; } } } diff --git a/Buffs/SummonBuffs/Urchin.cs b/Buffs/SummonBuffs/Urchin.cs index 7b30ea77ce..d945733ecc 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (player.ownedProjectileCounts[mod.ProjectileType("Urchin")] > 0) { modPlayer.vUrchin = true; diff --git a/Buffs/SummonBuffs/Valkyrie.cs b/Buffs/SummonBuffs/Valkyrie.cs index 32c962f23e..9206903790 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (player.ownedProjectileCounts[mod.ProjectileType("Valkyrie")] > 0) { modPlayer.aValkyrie = true; diff --git a/Buffs/SunkenSea/Clamity.cs b/Buffs/SunkenSea/Clamity.cs index 9b9fdce197..49d30ab2ed 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.GetCalamityPlayer().clamity = true; + player.Calamity().clamity = true; } } } diff --git a/Buffs/SunkenSea/PearlAura.cs b/Buffs/SunkenSea/PearlAura.cs index 9f137147d2..d06b948a35 100644 --- a/Buffs/SunkenSea/PearlAura.cs +++ b/Buffs/SunkenSea/PearlAura.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Buffs.SunkenSea public override void Update(NPC npc, ref int buffIndex) { - npc.GetGlobalNPC(mod).pearlAura = true; + npc.Calamity().pearlAura = true; } } } diff --git a/Buffs/SunkenSea/Shellfish.cs b/Buffs/SunkenSea/Shellfish.cs index d63eb95fa8..2d80366f7e 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (player.ownedProjectileCounts[mod.ProjectileType("Shellfish")] > 0) { modPlayer.shellfish = true; diff --git a/Buffs/SunkenSea/ShellfishEating.cs b/Buffs/SunkenSea/ShellfishEating.cs index 8f895bf729..438be73529 100644 --- a/Buffs/SunkenSea/ShellfishEating.cs +++ b/Buffs/SunkenSea/ShellfishEating.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Buffs.SunkenSea public override void Update(NPC npc, ref int buffIndex) { - npc.GetGlobalNPC(mod).shellfishVore = true; + npc.Calamity().shellfishVore = true; } } } diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 16f439252f..53892332ca 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -1,4 +1,6 @@ using CalamityMod.Items; +using CalamityMod.Items.Armor; +using CalamityMod.Items.Permafrost; using CalamityMod.NPCs; using CalamityMod.Projectiles; using CalamityMod.UI; @@ -1550,7 +1552,7 @@ namespace CalamityMod.CalPlayer public override bool CustomBiomesMatch(Player other) { - CalamityPlayer modOther = other.GetCalamityPlayer(); + CalamityPlayer modOther = other.Calamity(); return ZoneCalamity == modOther.ZoneCalamity || ZoneAstral == modOther.ZoneAstral || ZoneAbyss == modOther.ZoneAbyss || ZoneAbyssLayer1 == modOther.ZoneAbyssLayer1 || ZoneAbyssLayer2 == modOther.ZoneAbyssLayer2 || ZoneAbyssLayer3 == modOther.ZoneAbyssLayer3 || ZoneAbyssLayer4 == modOther.ZoneAbyssLayer4 || @@ -1559,7 +1561,7 @@ namespace CalamityMod.CalPlayer public override void CopyCustomBiomesTo(Player other) { - CalamityPlayer modOther = other.GetCalamityPlayer(); + CalamityPlayer modOther = other.Calamity(); modOther.ZoneCalamity = ZoneCalamity; modOther.ZoneAstral = ZoneAstral; modOther.ZoneSulphur = ZoneSulphur; @@ -2154,22 +2156,22 @@ namespace CalamityMod.CalPlayer for (int n = 13; n < 18 + player.extraAccessorySlots; n++) { Item item = player.armor[n]; - if (item.type == mod.ItemType()) + if (item.type == ModContent.ItemType()) { snowmanHide = false; snowmanForce = true; } - else if (item.type == mod.ItemType()) + else if (item.type == ModContent.ItemType()) { abyssalDivingSuitHide = false; abyssalDivingSuitForce = true; } - else if (item.type == mod.ItemType()) + else if (item.type == ModContent.ItemType()) { sirenBoobsHide = false; sirenBoobsForce = true; } - else if (item.type == mod.ItemType()) + else if (item.type == ModContent.ItemType()) { sirenBoobsAltHide = false; sirenBoobsAltForce = true; @@ -2268,12 +2270,12 @@ namespace CalamityMod.CalPlayer { if (player.whoAmI == Main.myPlayer && !snowmanNoseless) { - player.AddBuff(mod.BuffType(), 60, true); + player.AddBuff(ModContent.BuffType(), 60, true); } } if (abyssalDivingSuit) { - player.AddBuff(mod.BuffType(), 60, true); + player.AddBuff(ModContent.BuffType(), 60, true); if (player.whoAmI == Main.myPlayer) { if (abyssalDivingSuitCooldown) @@ -2297,11 +2299,11 @@ namespace CalamityMod.CalPlayer } if (sirenBoobs) { - player.AddBuff(mod.BuffType(), 60, true); + player.AddBuff(ModContent.BuffType(), 60, true); } else if (sirenBoobsAlt) { - player.AddBuff(mod.BuffType(), 60, true); + player.AddBuff(ModContent.BuffType(), 60, true); } if ((sirenBoobs || sirenBoobsAlt) && NPC.downedBoss3) { @@ -2974,7 +2976,7 @@ namespace CalamityMod.CalPlayer if (!tentaclesPresent[i]) { float modifier = player.meleeDamage + player.magicDamage + player.rangedDamage + - player.GetCalamityPlayer().throwingDamage + player.minionDamage; + player.Calamity().throwingDamage + player.minionDamage; modifier /= 5f; int damage = (int)(666 * modifier); Vector2 vel = new Vector2(Main.rand.Next(-13, 14), Main.rand.Next(-13, 14)) * 0.25f; @@ -3130,7 +3132,7 @@ namespace CalamityMod.CalPlayer bool shouldAffect = CalamityMod.debuffList.Contains(hasBuff); if (shouldAffect) { - player.GetCalamityPlayer().throwingDamage += 0.1f; + player.Calamity().throwingDamage += 0.1f; } } } @@ -3189,7 +3191,7 @@ namespace CalamityMod.CalPlayer } if (raiderTalisman) { - player.GetCalamityPlayer().throwingDamage += ((float)raiderStack / 250f) * 0.25f; + player.Calamity().throwingDamage += ((float)raiderStack / 250f) * 0.25f; } if (silvaCountdown <= 0 && hasSilvaEffect && silvaSummon) { @@ -3687,8 +3689,8 @@ namespace CalamityMod.CalPlayer if (player.mount.Active) modStealth = 1f; } - player.GetCalamityPlayer().throwingDamage += (1f - modStealth) * 0.2f; - player.GetCalamityPlayer().throwingCrit += (int)((1f - modStealth) * 10f); + player.Calamity().throwingDamage += (1f - modStealth) * 0.2f; + player.Calamity().throwingCrit += (int)((1f - modStealth) * 10f); player.aggro -= (int)((1f - modStealth) * 750f); if (modStealthTimer > 0) modStealthTimer--; @@ -3810,15 +3812,15 @@ namespace CalamityMod.CalPlayer } if (armorCrumbling) { - player.GetCalamityPlayer().throwingCrit += 5; + player.Calamity().throwingCrit += 5; player.meleeCrit += 5; } if (armorShattering) { if (player.FindBuffIndex(mod.BuffType("ArmorCrumbling")) > -1) { player.ClearBuff(mod.BuffType("ArmorCrumbling")); } - player.GetCalamityPlayer().throwingDamage += 0.08f; + player.Calamity().throwingDamage += 0.08f; player.meleeDamage += 0.08f; - player.GetCalamityPlayer().throwingCrit += 8; + player.Calamity().throwingCrit += 8; player.meleeCrit += 8; } if (holyWrath) @@ -4344,12 +4346,12 @@ namespace CalamityMod.CalPlayer { if (player.statLife > (int)((double)player.statLifeMax2 * 0.8)) { - player.GetCalamityPlayer().throwingCrit += 5; + player.Calamity().throwingCrit += 5; player.statDefense += 30; } else { - player.GetCalamityPlayer().throwingDamage += 0.1f; + player.Calamity().throwingDamage += 0.1f; } } if (bloodflareSummon) @@ -4427,9 +4429,9 @@ namespace CalamityMod.CalPlayer { if (player.statLife >= player.statLifeMax2) { - player.GetCalamityPlayer().throwingCrit += 10; - player.GetCalamityPlayer().throwingDamage += 0.1f; - player.GetCalamityPlayer().throwingVelocity += 0.1f; + player.Calamity().throwingCrit += 10; + player.Calamity().throwingDamage += 0.1f; + player.Calamity().throwingVelocity += 0.1f; } } if (tarraSummon) @@ -4581,7 +4583,7 @@ namespace CalamityMod.CalPlayer if (eArtifact) { player.manaCost *= 0.85f; - player.GetCalamityPlayer().throwingDamage += 0.15f; + player.Calamity().throwingDamage += 0.15f; player.maxMinions += 2; } if (gArtifact) @@ -5017,13 +5019,13 @@ namespace CalamityMod.CalPlayer { if (silvaRanged) { - if (item.ranged && !item.GetGlobalItem(mod).rogue && item.useTime > 3) + if (item.ranged && !item.Calamity().rogue && item.useTime > 3) return (auricSet ? 1.2f : 1.1f); } if (silvaThrowing) { if (player.statLife > (int)((double)player.statLifeMax2 * 0.5) && - item.GetGlobalItem(mod).rogue && item.useTime > 3) + item.Calamity().rogue && item.useTime > 3) return 1.1f; } return 1f; @@ -5058,7 +5060,7 @@ namespace CalamityMod.CalPlayer if (theBee && player.statLife >= player.statLifeMax2) { - if (item.melee || item.ranged || item.magic || item.GetGlobalItem(mod).rogue) + if (item.melee || item.ranged || item.magic || item.Calamity().rogue) { double useTimeBeeMultiplier = (double)(item.useTime * item.useAnimation) / 3600.0; //28 * 28 = 784 is average so that equals 784 / 3600 = 0.217777 = 21.7% boost if (item.type == mod.ItemType("ScarletDevil")) @@ -5366,7 +5368,7 @@ namespace CalamityMod.CalPlayer } if (armorCrumbling || armorShattering) { - if (item.melee || item.GetGlobalItem(mod).rogue) + if (item.melee || item.Calamity().rogue) { if (Main.rand.NextBool(4)) { @@ -5530,7 +5532,7 @@ namespace CalamityMod.CalPlayer } if (armorCrumbling || armorShattering) { - if (proj.melee || proj.GetGlobalProjectile(mod).rogue) + if (proj.melee || proj.Calamity().rogue) { if (Main.rand.NextBool(4)) { @@ -5562,7 +5564,7 @@ namespace CalamityMod.CalPlayer { target.AddBuff(mod.BuffType("HolyLight"), 420, false); } - if (proj.GetGlobalProjectile(mod).rogue) + if (proj.Calamity().rogue) { if (player.meleeEnchant > 0) { @@ -5844,7 +5846,7 @@ namespace CalamityMod.CalPlayer } if (armorCrumbling || armorShattering) { - if (proj.melee || proj.GetGlobalProjectile(mod).rogue) + if (proj.melee || proj.Calamity().rogue) { if (Main.rand.NextBool(4)) { @@ -5876,7 +5878,7 @@ namespace CalamityMod.CalPlayer { target.AddBuff(mod.BuffType("HolyLight"), 420, false); } - if (proj.GetGlobalProjectile(mod).rogue) + if (proj.Calamity().rogue) { if (player.meleeEnchant > 0) { @@ -5962,7 +5964,7 @@ namespace CalamityMod.CalPlayer if (oldDie) { float diceMult = Main.rand.NextFloat(0.8824f, 1.1565f); - if (item.GetGlobalItem(mod).rogue || wearingRogueArmor) + if (item.Calamity().rogue || wearingRogueArmor) { float roll2 = Main.rand.NextFloat(0.8824f, 1.1565f); diceMult = roll2 > diceMult ? roll2 : diceMult; @@ -6098,13 +6100,13 @@ namespace CalamityMod.CalPlayer public override void ModifyHitNPCWithProj(Projectile proj, NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) { - bool isTrueMelee = proj.GetGlobalProjectile(mod).trueMelee; + bool isTrueMelee = proj.Calamity().trueMelee; bool isSummon = proj.minion || proj.sentry || CalamityMod.projectileMinionList.Contains(proj.type); - bool hasClassType = proj.melee || proj.ranged || proj.magic || isSummon || proj.GetGlobalProjectile(mod).rogue; + bool hasClassType = proj.melee || proj.ranged || proj.magic || isSummon || proj.Calamity().rogue; - if (proj.GetGlobalProjectile(mod).rogue) + if (proj.Calamity().rogue) { - crit = (Main.rand.Next(1, 101) < player.GetCalamityPlayer().throwingCrit); + crit = (Main.rand.Next(1, 101) < player.Calamity().throwingCrit); } #region MultiplierBoosts @@ -6117,7 +6119,7 @@ namespace CalamityMod.CalPlayer !player.inventory[player.selectedItem].melee && !player.inventory[player.selectedItem].ranged && !player.inventory[player.selectedItem].magic && - !player.inventory[player.selectedItem].GetGlobalItem(mod).rogue) || + !player.inventory[player.selectedItem].Calamity().rogue) || player.inventory[player.selectedItem].hammer > 0 || player.inventory[player.selectedItem].pick > 0 || player.inventory[player.selectedItem].axe > 0) @@ -6150,7 +6152,7 @@ namespace CalamityMod.CalPlayer } if (auricSet) { - if (silvaThrowing && proj.GetGlobalProjectile(mod).rogue && + if (silvaThrowing && proj.Calamity().rogue && crit && player.statLife > (int)((double)player.statLifeMax2 * 0.5)) { damageMult += 0.25; @@ -6174,7 +6176,7 @@ namespace CalamityMod.CalPlayer { damageMult += 0.4; } - if (silvaCountdown <= 0 && hasSilvaEffect && silvaThrowing && proj.GetGlobalProjectile(mod).rogue) + if (silvaCountdown <= 0 && hasSilvaEffect && silvaThrowing && proj.Calamity().rogue) { damageMult += 0.1; } @@ -6231,7 +6233,7 @@ namespace CalamityMod.CalPlayer if (oldDie) { float diceMult = Main.rand.NextFloat(0.8824f, 1.1565f); - if (proj.GetGlobalProjectile(mod).rogue || wearingRogueArmor) + if (proj.Calamity().rogue || wearingRogueArmor) { float roll2 = Main.rand.NextFloat(0.8824f, 1.1565f); diceMult = roll2 > diceMult ? roll2 : diceMult; @@ -6266,7 +6268,7 @@ namespace CalamityMod.CalPlayer (player.inventory[player.selectedItem].melee || player.inventory[player.selectedItem].ranged || player.inventory[player.selectedItem].magic || - player.inventory[player.selectedItem].GetGlobalItem(mod).rogue) && + player.inventory[player.selectedItem].Calamity().rogue) && player.inventory[player.selectedItem].hammer == 0 && player.inventory[player.selectedItem].pick == 0 && player.inventory[player.selectedItem].axe == 0) @@ -6303,14 +6305,14 @@ namespace CalamityMod.CalPlayer tarraCrits++; } if (tarraThrowing && tarraThrowingCritTimer <= 0 && tarraThrowingCrits < 25 && crit && - proj.GetGlobalProjectile(mod).rogue) + proj.Calamity().rogue) { tarraThrowingCrits++; } if ((target.damage > 5 || target.boss) && player.whoAmI == Main.myPlayer && !target.SpawnedFromStatue) { - if (theBeeDamage > 0 && (proj.melee || proj.ranged || proj.magic || proj.GetGlobalProjectile(mod).rogue)) + if (theBeeDamage > 0 && (proj.melee || proj.ranged || proj.magic || proj.Calamity().rogue)) { Main.PlaySound(2, (int)proj.position.X, (int)proj.position.Y, 110); } @@ -6379,7 +6381,7 @@ namespace CalamityMod.CalPlayer Main.projectile[FUCKYOU].netUpdate = true; } } - if (bloodflareThrowing && proj.GetGlobalProjectile(mod).rogue && crit && Main.rand.NextBool(2)) + if (bloodflareThrowing && proj.Calamity().rogue && crit && Main.rand.NextBool(2)) { if (target.canGhostHeal) { @@ -6514,7 +6516,7 @@ namespace CalamityMod.CalPlayer LevelPacket(false, 3); } } - else if (proj.GetGlobalProjectile(mod).rogue && rogueLevel <= 12500) + else if (proj.Calamity().rogue && rogueLevel <= 12500) { if (!Main.hardMode && rogueLevel >= 1500) { @@ -6535,7 +6537,7 @@ namespace CalamityMod.CalPlayer } } } - if (raiderTalisman && raiderStack < 250 && proj.GetGlobalProjectile(mod).rogue && crit) + if (raiderTalisman && raiderStack < 250 && proj.Calamity().rogue && crit) { raiderStack++; } @@ -8783,7 +8785,7 @@ namespace CalamityMod.CalPlayer } Player drawPlayer = drawInfo.drawPlayer; Mod mod = ModLoader.GetMod("CalamityMod"); - CalamityPlayer modPlayer = drawPlayer.GetCalamityPlayer(); + CalamityPlayer modPlayer = drawPlayer.Calamity(); if (modPlayer.sirenIce) { Texture2D texture = mod.GetTexture("ExtraTextures/IceShield"); @@ -8965,8 +8967,8 @@ namespace CalamityMod.CalPlayer { Mod mod = ModLoader.GetMod("CalamityMod"); Player drawPlayer = edi.drawPlayer; - if (drawPlayer.mount != null && (drawPlayer.GetCalamityPlayer().fab || drawPlayer.GetCalamityPlayer().crysthamyr || - drawPlayer.GetCalamityPlayer().onyxExcavator)) + if (drawPlayer.mount != null && (drawPlayer.Calamity().fab || drawPlayer.Calamity().crysthamyr || + drawPlayer.Calamity().onyxExcavator)) { drawPlayer.mount.Draw(Main.playerDrawData, 3, drawPlayer, edi.position, edi.mountColor, edi.spriteEffects, edi.shadow); } @@ -9400,7 +9402,7 @@ namespace CalamityMod.CalPlayer player.rangedCrit += boost; player.magicCrit += boost; player.thrownCrit += boost; - player.GetCalamityPlayer().throwingCrit += boost; + player.Calamity().throwingCrit += boost; } #endregion @@ -9459,7 +9461,7 @@ namespace CalamityMod.CalPlayer private void ProvideStealthStatBonuses() { - CalamityPlayer roguePlayer = player.GetCalamityPlayer(); + CalamityPlayer roguePlayer = player.Calamity(); // At full stealth, you get 100% of the max possible bonus. Partial stealth only gives you 75% of the partial bonus you have. if (rogueStealth >= rogueStealthMax) @@ -10543,85 +10545,85 @@ namespace CalamityMod.CalPlayer #region RogueLevelBoosts if (rogueLevel >= 12500) { - player.GetCalamityPlayer().throwingDamage += 0.12f; - player.GetCalamityPlayer().throwingVelocity += 0.12f; - player.GetCalamityPlayer().throwingCrit += 6; + player.Calamity().throwingDamage += 0.12f; + player.Calamity().throwingVelocity += 0.12f; + player.Calamity().throwingCrit += 6; } else if (rogueLevel >= 10500) { - player.GetCalamityPlayer().throwingDamage += 0.1f; - player.GetCalamityPlayer().throwingVelocity += 0.1f; - player.GetCalamityPlayer().throwingCrit += 5; + player.Calamity().throwingDamage += 0.1f; + player.Calamity().throwingVelocity += 0.1f; + player.Calamity().throwingCrit += 5; } else if (rogueLevel >= 9100) { - player.GetCalamityPlayer().throwingDamage += 0.09f; - player.GetCalamityPlayer().throwingVelocity += 0.09f; - player.GetCalamityPlayer().throwingCrit += 5; + player.Calamity().throwingDamage += 0.09f; + player.Calamity().throwingVelocity += 0.09f; + player.Calamity().throwingCrit += 5; } else if (rogueLevel >= 7800) { - player.GetCalamityPlayer().throwingDamage += 0.08f; - player.GetCalamityPlayer().throwingVelocity += 0.08f; - player.GetCalamityPlayer().throwingCrit += 4; + player.Calamity().throwingDamage += 0.08f; + player.Calamity().throwingVelocity += 0.08f; + player.Calamity().throwingCrit += 4; } else if (rogueLevel >= 6600) { - player.GetCalamityPlayer().throwingDamage += 0.07f; - player.GetCalamityPlayer().throwingVelocity += 0.07f; - player.GetCalamityPlayer().throwingCrit += 4; + player.Calamity().throwingDamage += 0.07f; + player.Calamity().throwingVelocity += 0.07f; + player.Calamity().throwingCrit += 4; } else if (rogueLevel >= 5500) { - player.GetCalamityPlayer().throwingDamage += 0.06f; - player.GetCalamityPlayer().throwingVelocity += 0.06f; - player.GetCalamityPlayer().throwingCrit += 3; + player.Calamity().throwingDamage += 0.06f; + player.Calamity().throwingVelocity += 0.06f; + player.Calamity().throwingCrit += 3; } else if (rogueLevel >= 4500) { - player.GetCalamityPlayer().throwingDamage += 0.05f; - player.GetCalamityPlayer().throwingVelocity += 0.05f; - player.GetCalamityPlayer().throwingCrit += 3; + player.Calamity().throwingDamage += 0.05f; + player.Calamity().throwingVelocity += 0.05f; + player.Calamity().throwingCrit += 3; } else if (rogueLevel >= 3600) { - player.GetCalamityPlayer().throwingDamage += 0.05f; - player.GetCalamityPlayer().throwingVelocity += 0.05f; - player.GetCalamityPlayer().throwingCrit += 2; + player.Calamity().throwingDamage += 0.05f; + player.Calamity().throwingVelocity += 0.05f; + player.Calamity().throwingCrit += 2; } else if (rogueLevel >= 2800) { - player.GetCalamityPlayer().throwingDamage += 0.04f; - player.GetCalamityPlayer().throwingVelocity += 0.04f; - player.GetCalamityPlayer().throwingCrit += 2; + player.Calamity().throwingDamage += 0.04f; + player.Calamity().throwingVelocity += 0.04f; + player.Calamity().throwingCrit += 2; } else if (rogueLevel >= 2100) { - player.GetCalamityPlayer().throwingDamage += 0.04f; - player.GetCalamityPlayer().throwingVelocity += 0.03f; - player.GetCalamityPlayer().throwingCrit += 1; + player.Calamity().throwingDamage += 0.04f; + player.Calamity().throwingVelocity += 0.03f; + player.Calamity().throwingCrit += 1; } else if (rogueLevel >= 1500) { - player.GetCalamityPlayer().throwingDamage += 0.03f; - player.GetCalamityPlayer().throwingVelocity += 0.02f; - player.GetCalamityPlayer().throwingCrit += 1; + player.Calamity().throwingDamage += 0.03f; + player.Calamity().throwingVelocity += 0.02f; + player.Calamity().throwingCrit += 1; } else if (rogueLevel >= 1000) { - player.GetCalamityPlayer().throwingDamage += 0.03f; - player.GetCalamityPlayer().throwingVelocity += 0.01f; - player.GetCalamityPlayer().throwingCrit += 1; + player.Calamity().throwingDamage += 0.03f; + player.Calamity().throwingVelocity += 0.01f; + player.Calamity().throwingCrit += 1; } else if (rogueLevel >= 600) { - player.GetCalamityPlayer().throwingDamage += 0.02f; - player.GetCalamityPlayer().throwingVelocity += 0.01f; + player.Calamity().throwingDamage += 0.02f; + player.Calamity().throwingVelocity += 0.01f; } else if (rogueLevel >= 300) - player.GetCalamityPlayer().throwingDamage += 0.02f; + player.Calamity().throwingDamage += 0.02f; else if (rogueLevel >= 100) - player.GetCalamityPlayer().throwingDamage += 0.01f; + player.Calamity().throwingDamage += 0.01f; #endregion } diff --git a/CalPlayer/CalamityPlayerLifeRegen.cs b/CalPlayer/CalamityPlayerLifeRegen.cs index ffcd4e0e2c..e9e015bebd 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); //Initial Debuffs @@ -402,7 +402,7 @@ namespace CalamityMod.CalPlayer #region Update Life Regen public static void CalamityUpdateLifeRegen(Player player, Mod mod) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (!player.shinyStone) { diff --git a/CalamityMod.cs b/CalamityMod.cs index e444b2b22f..8029067ec4 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -2328,7 +2328,7 @@ namespace CalamityMod { layers.Insert(index, new LegacyGameInterfaceLayer("Boss HP Bars", delegate () { - if (Main.LocalPlayer.GetCalamityPlayer().drawBossHPBar) + if (Main.LocalPlayer.Calamity().drawBossHPBar) { BossHealthBarManager.Update(); BossHealthBarManager.Draw(Main.spriteBatch); diff --git a/Items/AbyssItems/AbyssalAmulet.cs b/Items/AbyssItems/AbyssalAmulet.cs index 84a1448152..a2bdb18eab 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.abyssalAmulet = true; } } diff --git a/Items/AbyssItems/AbyssalDivingGear.cs b/Items/AbyssItems/AbyssalDivingGear.cs index db82190724..fe8b00c3d4 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.depthCharm = true; modPlayer.jellyfishNecklace = true; player.arcticDivingGear = true; diff --git a/Items/AbyssItems/AnechoicPlating.cs b/Items/AbyssItems/AnechoicPlating.cs index 0d1d7c5e9d..052f35c78e 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.anechoicPlating = true; } } diff --git a/Items/AbyssItems/DepthCharm.cs b/Items/AbyssItems/DepthCharm.cs index 3d1c4c9a0b..5c020205b5 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.depthCharm = true; } } diff --git a/Items/AbyssItems/IronBoots.cs b/Items/AbyssItems/IronBoots.cs index c66ff107b8..d94c67fd4b 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.ironBoots = true; } } diff --git a/Items/AbyssItems/LumenousAmulet.cs b/Items/AbyssItems/LumenousAmulet.cs index 74760a4b51..291930cc07 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.abyssalAmulet = true; modPlayer.lumenousAmulet = true; } diff --git a/Items/AbyssItems/ReaperToothNecklace.cs b/Items/AbyssItems/ReaperToothNecklace.cs index 6b72eb4090..d6fb39becf 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.reaperToothNecklace = true; player.armorPenetration += 100; } diff --git a/Items/Accessories/AlchemicalFlask.cs b/Items/Accessories/AlchemicalFlask.cs index befdd2c77a..e3cb0bd45c 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.alchFlask = true; player.buffImmune[mod.BuffType("Plague")] = true; } diff --git a/Items/Accessories/AmalgamatedBrain.cs b/Items/Accessories/AmalgamatedBrain.cs index 333047307d..9be864bcde 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.aBrain = true; if (player.immune) { diff --git a/Items/Accessories/AmbrosialAmpoule.cs b/Items/Accessories/AmbrosialAmpoule.cs index 2dc6d38526..914d2bea3b 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.beeResist = true; modPlayer.aAmpoule = true; } diff --git a/Items/Accessories/AmidiasSpark.cs b/Items/Accessories/AmidiasSpark.cs index 4550afd594..96a20bcbae 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.aSpark = true; } } diff --git a/Items/Accessories/AngelTreads.cs b/Items/Accessories/AngelTreads.cs index 3a91847884..fcf0bd16e3 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.harpyRing = true; player.accRunSpeed = 8f; player.rocketBoots = 3; diff --git a/Items/Accessories/ArcanumoftheVoid.cs b/Items/Accessories/ArcanumoftheVoid.cs index 433965096c..8ab7053ace 100644 --- a/Items/Accessories/ArcanumoftheVoid.cs +++ b/Items/Accessories/ArcanumoftheVoid.cs @@ -19,12 +19,12 @@ namespace CalamityMod.Items.Accessories item.height = 26; item.value = Item.buyPrice(0, 60, 0, 0); item.accessory = true; - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().postMoonLordRarity = 13; } public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.projRef = true; } } diff --git a/Items/Accessories/AsgardianAegis.cs b/Items/Accessories/AsgardianAegis.cs index a6812f2c4d..0deeb09e1a 100644 --- a/Items/Accessories/AsgardianAegis.cs +++ b/Items/Accessories/AsgardianAegis.cs @@ -28,12 +28,12 @@ namespace CalamityMod.Items.Accessories item.value = Item.buyPrice(0, 90, 0, 0); //30 gold reforge item.defense = 10; item.accessory = true; - item.GetGlobalItem(mod).postMoonLordRarity = 14; + item.Calamity().postMoonLordRarity = 14; } public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (!hideVisual) { modPlayer.dashMod = 4; } modPlayer.elysianAegis = true; player.noKnockback = true; diff --git a/Items/Accessories/AsgardsValor.cs b/Items/Accessories/AsgardsValor.cs index 0e7823addb..251d410f56 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); 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 dc64433b4e..5cf1fa8fd7 100644 --- a/Items/Accessories/AstralArcanum.cs +++ b/Items/Accessories/AstralArcanum.cs @@ -25,12 +25,12 @@ namespace CalamityMod.Items.Accessories item.height = 26; item.value = Item.buyPrice(0, 90, 0, 0); item.accessory = true; - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().postMoonLordRarity = 13; } public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.astralArcanum = true; modPlayer.aBulwark = true; modPlayer.projRef = true; diff --git a/Items/Accessories/AstralBulwark.cs b/Items/Accessories/AstralBulwark.cs index b81f29580e..ffea86ee61 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.aBulwark = true; player.buffImmune[mod.BuffType("AstralInfectionDebuff")] = true; } diff --git a/Items/Accessories/BadgeofBravery.cs b/Items/Accessories/BadgeofBravery.cs index 29a595794e..d24011da22 100644 --- a/Items/Accessories/BadgeofBravery.cs +++ b/Items/Accessories/BadgeofBravery.cs @@ -19,12 +19,12 @@ namespace CalamityMod.Items.Accessories item.height = 30; item.value = Item.buyPrice(0, 21, 0, 0); item.accessory = true; - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.badgeOfBravery = true; } diff --git a/Items/Accessories/BloodflareCore.cs b/Items/Accessories/BloodflareCore.cs index 91d6d01e02..529cdd5b00 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.bloodflareCore = true; } } diff --git a/Items/Accessories/BurdenBreaker.cs b/Items/Accessories/BurdenBreaker.cs index ab7a63beea..2e7dcd2f02 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.GetCalamityPlayer().KillPlayer(); + player.Calamity().KillPlayer(); } else if (player.immune) { diff --git a/Items/Accessories/CelestialJewel.cs b/Items/Accessories/CelestialJewel.cs index c8ddb93a10..387a62477f 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.celestialJewel = true; } diff --git a/Items/Accessories/CheatTestThing.cs b/Items/Accessories/CheatTestThing.cs index 7692ada038..c01980e63f 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); bool canUse = (player.name == "Fabsol" || player.name == "Totalbiscuit") && player.townNPCs <= 1; if (canUse) { diff --git a/Items/Accessories/CoinofDeceit.cs b/Items/Accessories/CoinofDeceit.cs index fc37a9a979..346f76bbe9 100644 --- a/Items/Accessories/CoinofDeceit.cs +++ b/Items/Accessories/CoinofDeceit.cs @@ -25,8 +25,8 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); - player.GetCalamityPlayer().throwingCrit += 6; + CalamityPlayer modPlayer = player.Calamity(); + player.Calamity().throwingCrit += 6; } public override void AddRecipes() diff --git a/Items/Accessories/CoreOfTheBloodGod.cs b/Items/Accessories/CoreOfTheBloodGod.cs index c4dcf7769e..4025a88932 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.coreOfTheBloodGod = true; modPlayer.fleshTotem = true; } diff --git a/Items/Accessories/CounterScarf.cs b/Items/Accessories/CounterScarf.cs index c33ddee3c1..9b21797b1e 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.dodgeScarf = true; modPlayer.dashMod = 1; } diff --git a/Items/Accessories/CrownJewel.cs b/Items/Accessories/CrownJewel.cs index 45e4e67c9f..75e02694ad 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.crownJewel = true; } } diff --git a/Items/Accessories/DarkSunRing.cs b/Items/Accessories/DarkSunRing.cs index 071925da85..237af15ed1 100644 --- a/Items/Accessories/DarkSunRing.cs +++ b/Items/Accessories/DarkSunRing.cs @@ -27,12 +27,12 @@ namespace CalamityMod.Items.Accessories item.defense = 10; item.lifeRegen = 1; item.accessory = true; - item.GetGlobalItem(mod).postMoonLordRarity = 15; + item.Calamity().postMoonLordRarity = 15; } public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.darkSunRing = true; } diff --git a/Items/Accessories/DeificAmulet.cs b/Items/Accessories/DeificAmulet.cs index 02fe367f2b..23b3f42782 100644 --- a/Items/Accessories/DeificAmulet.cs +++ b/Items/Accessories/DeificAmulet.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.dAmulet = true; modPlayer.jellyfishNecklace = true; } diff --git a/Items/Accessories/DimensionalSoulArtifact.cs b/Items/Accessories/DimensionalSoulArtifact.cs index 6b1f462fb8..64577385dc 100644 --- a/Items/Accessories/DimensionalSoulArtifact.cs +++ b/Items/Accessories/DimensionalSoulArtifact.cs @@ -22,12 +22,12 @@ namespace CalamityMod.Items.Accessories item.value = Item.buyPrice(1, 50, 0, 0); item.accessory = true; item.rare = 10; - item.GetGlobalItem(mod).postMoonLordRarity = 16; + item.Calamity().postMoonLordRarity = 16; } public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.dArtifact = true; } diff --git a/Items/Accessories/DraedonsHeart.cs b/Items/Accessories/DraedonsHeart.cs index 2ef9570d72..17f27d37e1 100644 --- a/Items/Accessories/DraedonsHeart.cs +++ b/Items/Accessories/DraedonsHeart.cs @@ -27,12 +27,12 @@ namespace CalamityMod.Items.Accessories item.height = 26; item.value = Item.buyPrice(0, 60, 0, 0); item.accessory = true; - item.GetGlobalItem(mod).postMoonLordRarity = 15; + item.Calamity().postMoonLordRarity = 15; } public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.draedonsHeart = true; player.buffImmune[mod.BuffType("Horror")] = true; modPlayer.draedonsStressGain = true; diff --git a/Items/Accessories/EclipseMirror.cs b/Items/Accessories/EclipseMirror.cs index 207c7a6f6c..ff4606fb6e 100644 --- a/Items/Accessories/EclipseMirror.cs +++ b/Items/Accessories/EclipseMirror.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Accessories item.width = 20; item.height = 20; item.value = Item.buyPrice(0, 22, 0, 0); - item.GetGlobalItem(mod).postMoonLordRarity = 15; + item.Calamity().postMoonLordRarity = 15; item.accessory = true; } diff --git a/Items/Accessories/EldritchSoulArtifact.cs b/Items/Accessories/EldritchSoulArtifact.cs index 5c653bc7ec..3d02f4a28b 100644 --- a/Items/Accessories/EldritchSoulArtifact.cs +++ b/Items/Accessories/EldritchSoulArtifact.cs @@ -21,12 +21,12 @@ namespace CalamityMod.Items.Accessories item.value = Item.buyPrice(1, 50, 0, 0); item.accessory = true; item.rare = 10; - item.GetGlobalItem(mod).postMoonLordRarity = 16; + item.Calamity().postMoonLordRarity = 16; } public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.eArtifact = true; } diff --git a/Items/Accessories/ElementalGauntlet.cs b/Items/Accessories/ElementalGauntlet.cs index 865aeb51ae..640aaeb5e4 100644 --- a/Items/Accessories/ElementalGauntlet.cs +++ b/Items/Accessories/ElementalGauntlet.cs @@ -24,12 +24,12 @@ namespace CalamityMod.Items.Accessories item.height = 38; item.value = Item.buyPrice(0, 90, 0, 0); item.accessory = true; - item.GetGlobalItem(mod).postMoonLordRarity = 20; + item.Calamity().postMoonLordRarity = 20; } public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.eGauntlet = true; } diff --git a/Items/Accessories/ElementalQuiver.cs b/Items/Accessories/ElementalQuiver.cs index 38c150ef41..0fe34b3d41 100644 --- a/Items/Accessories/ElementalQuiver.cs +++ b/Items/Accessories/ElementalQuiver.cs @@ -22,12 +22,12 @@ namespace CalamityMod.Items.Accessories item.height = 32; item.value = Item.buyPrice(0, 90, 0, 0); item.accessory = true; - item.GetGlobalItem(mod).postMoonLordRarity = 20; + item.Calamity().postMoonLordRarity = 20; } public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.eQuiver = true; player.rangedDamage += 0.1f; player.rangedCrit += 5; diff --git a/Items/Accessories/EtherealTalisman.cs b/Items/Accessories/EtherealTalisman.cs index 1a6e203fe3..db24091f4e 100644 --- a/Items/Accessories/EtherealTalisman.cs +++ b/Items/Accessories/EtherealTalisman.cs @@ -23,12 +23,12 @@ namespace CalamityMod.Items.Accessories item.height = 32; item.value = Item.buyPrice(0, 90, 0, 0); item.accessory = true; - item.GetGlobalItem(mod).postMoonLordRarity = 20; + item.Calamity().postMoonLordRarity = 20; } public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.eTalisman = true; player.findTreasure = true; if (!hideVisual) diff --git a/Items/Accessories/EyeoftheStorm.cs b/Items/Accessories/EyeoftheStorm.cs index 0171ae6fd8..1200f24b0c 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (modPlayer.elementalHeart) { return false; @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.cloudWaifu = true; if (player.whoAmI == Main.myPlayer) { diff --git a/Items/Accessories/FrigidBulwark.cs b/Items/Accessories/FrigidBulwark.cs index a7e58904de..300575980a 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.fBulwark = true; } diff --git a/Items/Accessories/FrostBarrier.cs b/Items/Accessories/FrostBarrier.cs index 3e9b9862f5..a28388bb9b 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.fBarrier = true; player.buffImmune[46] = true; } diff --git a/Items/Accessories/FrostFlare.cs b/Items/Accessories/FrostFlare.cs index 58af05518e..b1e798b5da 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.frostFlare = true; } } diff --git a/Items/Accessories/FungalCarapace.cs b/Items/Accessories/FungalCarapace.cs index d001ef10c8..6f3aa9d11a 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.fCarapace = true; } } diff --git a/Items/Accessories/GiantShell.cs b/Items/Accessories/GiantShell.cs index 67155be556..4a8efa8966 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.gShell = true; } } diff --git a/Items/Accessories/GodlySoulArtifact.cs b/Items/Accessories/GodlySoulArtifact.cs index 98e0fd5c6e..3a4c6afa25 100644 --- a/Items/Accessories/GodlySoulArtifact.cs +++ b/Items/Accessories/GodlySoulArtifact.cs @@ -21,12 +21,12 @@ namespace CalamityMod.Items.Accessories item.value = Item.buyPrice(1, 50, 0, 0); item.accessory = true; item.rare = 10; - item.GetGlobalItem(mod).postMoonLordRarity = 16; + item.Calamity().postMoonLordRarity = 16; } public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.gArtifact = true; } diff --git a/Items/Accessories/GoldBurdenBreaker.cs b/Items/Accessories/GoldBurdenBreaker.cs index d99671faa0..9b01647074 100644 --- a/Items/Accessories/GoldBurdenBreaker.cs +++ b/Items/Accessories/GoldBurdenBreaker.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Accessories item.value = Item.buyPrice(0, 21, 0, 0); item.rare = 10; item.accessory = true; - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } public override void UpdateAccessory(Player player, bool hideVisual) diff --git a/Items/Accessories/HarpyRing.cs b/Items/Accessories/HarpyRing.cs index 181ed56e06..0580dffe7e 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.harpyRing = true; } diff --git a/Items/Accessories/HeartofDarkness.cs b/Items/Accessories/HeartofDarkness.cs index ad89f38b9f..04bdecd78d 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.heartOfDarkness = true; } } diff --git a/Items/Accessories/HeartoftheElements.cs b/Items/Accessories/HeartoftheElements.cs index 6af1ff8cd4..f9d8040ab1 100644 --- a/Items/Accessories/HeartoftheElements.cs +++ b/Items/Accessories/HeartoftheElements.cs @@ -31,12 +31,12 @@ namespace CalamityMod.Items.Accessories item.value = Item.buyPrice(0, 60, 0, 0); item.defense = 9; item.accessory = true; - item.GetGlobalItem(mod).postMoonLordRarity = 20; + item.Calamity().postMoonLordRarity = 20; } public override bool CanEquipAccessory(Player player, int slot) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.allWaifus = !hideVisual; modPlayer.elementalHeart = true; if (!hideVisual) diff --git a/Items/Accessories/HoneyDew.cs b/Items/Accessories/HoneyDew.cs index 953b2247c6..633f5ae0df 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.beeResist = true; if (player.ZoneJungle) { diff --git a/Items/Accessories/Laudanum.cs b/Items/Accessories/Laudanum.cs index f11d701a58..41d682ca71 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.laudanum = true; player.buffImmune[mod.BuffType("Horror")] = true; } diff --git a/Items/Accessories/MagicLevelMeter.cs b/Items/Accessories/MagicLevelMeter.cs index d6a4fa10c6..937f186978 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].GetCalamityPlayer().magicLevel; - int exactLevel = Main.player[Main.myPlayer].GetCalamityPlayer().exactMagicLevel; + int level = Main.player[Main.myPlayer].Calamity().magicLevel; + int exactLevel = Main.player[Main.myPlayer].Calamity().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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.fasterMagicLevel = true; } } diff --git a/Items/Accessories/MeleeLevelMeter.cs b/Items/Accessories/MeleeLevelMeter.cs index 70e98e712d..aa3dc8c7ba 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].GetCalamityPlayer().meleeLevel; - int exactLevel = Main.player[Main.myPlayer].GetCalamityPlayer().exactMeleeLevel; + int level = Main.player[Main.myPlayer].Calamity().meleeLevel; + int exactLevel = Main.player[Main.myPlayer].Calamity().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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.fasterMeleeLevel = true; } } diff --git a/Items/Accessories/MoonstoneCrown.cs b/Items/Accessories/MoonstoneCrown.cs index 225f6fa7f6..957cea9e12 100644 --- a/Items/Accessories/MoonstoneCrown.cs +++ b/Items/Accessories/MoonstoneCrown.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Accessories item.width = 20; item.height = 20; item.value = Item.buyPrice(0, 18, 0, 0); - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; item.accessory = true; } diff --git a/Items/Accessories/Nanotech.cs b/Items/Accessories/Nanotech.cs index 9b5b3adc03..8ef1017227 100644 --- a/Items/Accessories/Nanotech.cs +++ b/Items/Accessories/Nanotech.cs @@ -25,17 +25,17 @@ namespace CalamityMod.Items.Accessories item.height = 32; item.value = Item.buyPrice(0, 90, 0, 0); item.accessory = true; - item.GetGlobalItem(mod).postMoonLordRarity = 20; + item.Calamity().postMoonLordRarity = 20; } public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.nanotech = true; modPlayer.raiderTalisman = true; - player.GetCalamityPlayer().throwingDamage += 0.1f; - player.GetCalamityPlayer().throwingCrit += 5; - player.GetCalamityPlayer().throwingVelocity += 0.15f; + player.Calamity().throwingDamage += 0.1f; + player.Calamity().throwingCrit += 5; + player.Calamity().throwingVelocity += 0.15f; } public override void AddRecipes() diff --git a/Items/Accessories/NecklaceofVexation.cs b/Items/Accessories/NecklaceofVexation.cs index f787de8ec3..7fe2d6eac8 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.vexation = true; } diff --git a/Items/Accessories/OldDie.cs b/Items/Accessories/OldDie.cs index 4305c1df0b..fb96d9336c 100644 --- a/Items/Accessories/OldDie.cs +++ b/Items/Accessories/OldDie.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.oldDie = true; } } diff --git a/Items/Accessories/PlagueHive.cs b/Items/Accessories/PlagueHive.cs index 90e3a27599..f227581132 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); player.buffImmune[mod.BuffType("Plague")] = true; player.bee = true; modPlayer.uberBees = true; diff --git a/Items/Accessories/PsychoticAmulet.cs b/Items/Accessories/PsychoticAmulet.cs index 4343ff9ac2..9c0288c4e6 100644 --- a/Items/Accessories/PsychoticAmulet.cs +++ b/Items/Accessories/PsychoticAmulet.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.pAmulet = true; player.shroomiteStealth = true; modPlayer.throwingDamage += 0.05f; diff --git a/Items/Accessories/RaidersTalisman.cs b/Items/Accessories/RaidersTalisman.cs index 14a326b08d..2f2f08e61f 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.raiderTalisman = true; } diff --git a/Items/Accessories/RampartofDeities.cs b/Items/Accessories/RampartofDeities.cs index 803a56216e..beb43c7b38 100644 --- a/Items/Accessories/RampartofDeities.cs +++ b/Items/Accessories/RampartofDeities.cs @@ -27,12 +27,12 @@ namespace CalamityMod.Items.Accessories item.value = Item.buyPrice(0, 90, 0, 0); item.defense = 12; item.accessory = true; - item.GetGlobalItem(mod).postMoonLordRarity = 14; + item.Calamity().postMoonLordRarity = 14; } public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.dAmulet = true; modPlayer.rampartOfDeities = true; modPlayer.jellyfishNecklace = true; diff --git a/Items/Accessories/RangedLevelMeter.cs b/Items/Accessories/RangedLevelMeter.cs index 9e7f87f9bd..1ad46d86c2 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].GetCalamityPlayer().rangedLevel; - int exactLevel = Main.player[Main.myPlayer].GetCalamityPlayer().exactRangedLevel; + int level = Main.player[Main.myPlayer].Calamity().rangedLevel; + int exactLevel = Main.player[Main.myPlayer].Calamity().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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.fasterRangedLevel = true; } } diff --git a/Items/Accessories/RareVariants/DeepDiver.cs b/Items/Accessories/RareVariants/DeepDiver.cs index 8c421a7ca8..0574dc1816 100644 --- a/Items/Accessories/RareVariants/DeepDiver.cs +++ b/Items/Accessories/RareVariants/DeepDiver.cs @@ -21,14 +21,14 @@ namespace CalamityMod.Items.Accessories.RareVariants item.rare = 2; item.defense = 2; item.accessory = true; - item.GetGlobalItem(mod).postMoonLordRarity = 22; + item.Calamity().postMoonLordRarity = 22; } public override void UpdateAccessory(Player player, bool hideVisual) { if (Collision.DrownCollision(player.position, player.width, player.height, player.gravDir)) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.deepDiver = true; modPlayer.dashMod = 5; } diff --git a/Items/Accessories/RareVariants/FabledTortoiseShell.cs b/Items/Accessories/RareVariants/FabledTortoiseShell.cs index f83785ed36..1a14b9068d 100644 --- a/Items/Accessories/RareVariants/FabledTortoiseShell.cs +++ b/Items/Accessories/RareVariants/FabledTortoiseShell.cs @@ -22,12 +22,12 @@ namespace CalamityMod.Items.Accessories.RareVariants item.value = Item.buyPrice(0, 9, 0, 0); item.rare = 5; item.accessory = true; - item.GetGlobalItem(mod).postMoonLordRarity = 22; + item.Calamity().postMoonLordRarity = 22; } public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); 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 efbcc6b8c3..d5dfa85d2c 100644 --- a/Items/Accessories/RareVariants/HideofAstrumDeus.cs +++ b/Items/Accessories/RareVariants/HideofAstrumDeus.cs @@ -22,12 +22,12 @@ namespace CalamityMod.Items.Accessories.RareVariants item.height = 26; item.value = Item.buyPrice(0, 30, 0, 0); item.accessory = true; - item.GetGlobalItem(mod).postMoonLordRarity = 22; + item.Calamity().postMoonLordRarity = 22; } public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); 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 299ac4e4bf..da74034304 100644 --- a/Items/Accessories/RareVariants/Regenator.cs +++ b/Items/Accessories/RareVariants/Regenator.cs @@ -20,12 +20,12 @@ namespace CalamityMod.Items.Accessories.RareVariants item.rare = 5; item.defense = 6; item.accessory = true; - item.GetGlobalItem(mod).postMoonLordRarity = 22; + item.Calamity().postMoonLordRarity = 22; } public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.regenator = true; } } diff --git a/Items/Accessories/RareVariants/SamuraiBadge.cs b/Items/Accessories/RareVariants/SamuraiBadge.cs index b9fe6661fe..c0124666a3 100644 --- a/Items/Accessories/RareVariants/SamuraiBadge.cs +++ b/Items/Accessories/RareVariants/SamuraiBadge.cs @@ -19,12 +19,12 @@ namespace CalamityMod.Items.Accessories.RareVariants item.height = 30; item.value = Item.buyPrice(0, 21, 0, 0); item.accessory = true; - item.GetGlobalItem(mod).postMoonLordRarity = 22; + item.Calamity().postMoonLordRarity = 22; } public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.badgeOfBraveryRare = true; } } diff --git a/Items/Accessories/RareVariants/TheBee.cs b/Items/Accessories/RareVariants/TheBee.cs index 2c1551f950..8f391ae44e 100644 --- a/Items/Accessories/RareVariants/TheBee.cs +++ b/Items/Accessories/RareVariants/TheBee.cs @@ -22,14 +22,14 @@ namespace CalamityMod.Items.Accessories.RareVariants item.value = Item.buyPrice(0, 9, 0, 0); item.rare = 4; item.accessory = true; - item.GetGlobalItem(mod).postMoonLordRarity = 22; + item.Calamity().postMoonLordRarity = 22; } public override void UpdateAccessory(Player player, bool hideVisual) { player.starCloak = true; player.bee = true; - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.theBee = true; } } diff --git a/Items/Accessories/RareVariants/TheEvolution.cs b/Items/Accessories/RareVariants/TheEvolution.cs index abe4ae0906..a48119373f 100644 --- a/Items/Accessories/RareVariants/TheEvolution.cs +++ b/Items/Accessories/RareVariants/TheEvolution.cs @@ -20,12 +20,12 @@ namespace CalamityMod.Items.Accessories.RareVariants item.height = 26; item.value = Item.buyPrice(0, 60, 0, 0); item.accessory = true; - item.GetGlobalItem(mod).postMoonLordRarity = 22; + item.Calamity().postMoonLordRarity = 22; } public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.projRefRare = true; } } diff --git a/Items/Accessories/RareVariants/TheTransformer.cs b/Items/Accessories/RareVariants/TheTransformer.cs index ddc81bc3b8..d942f08258 100644 --- a/Items/Accessories/RareVariants/TheTransformer.cs +++ b/Items/Accessories/RareVariants/TheTransformer.cs @@ -22,12 +22,12 @@ namespace CalamityMod.Items.Accessories.RareVariants item.value = Item.buyPrice(0, 3, 0, 0); item.rare = 1; item.accessory = true; - item.GetGlobalItem(mod).postMoonLordRarity = 22; + item.Calamity().postMoonLordRarity = 22; } public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.aSparkRare = true; modPlayer.aSpark = true; } diff --git a/Items/Accessories/RogueEmblem.cs b/Items/Accessories/RogueEmblem.cs index 9ebc2c98ff..7dd74b044c 100644 --- a/Items/Accessories/RogueEmblem.cs +++ b/Items/Accessories/RogueEmblem.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.throwingDamage += 0.15f; } } diff --git a/Items/Accessories/RogueLevelMeter.cs b/Items/Accessories/RogueLevelMeter.cs index e4fc3d98b2..66c276a657 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].GetCalamityPlayer().rogueLevel; - int exactLevel = Main.player[Main.myPlayer].GetCalamityPlayer().exactRogueLevel; + int level = Main.player[Main.myPlayer].Calamity().rogueLevel; + int exactLevel = Main.player[Main.myPlayer].Calamity().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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.fasterRogueLevel = true; } } diff --git a/Items/Accessories/SpiritGenerator.cs b/Items/Accessories/SpiritGenerator.cs index 456ff59b8d..40413953b6 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.sGenerator = true; } diff --git a/Items/Accessories/Sponge.cs b/Items/Accessories/Sponge.cs index e5b14d0aa0..80ca2f8382 100644 --- a/Items/Accessories/Sponge.cs +++ b/Items/Accessories/Sponge.cs @@ -31,12 +31,12 @@ namespace CalamityMod.Items.Accessories item.height = 20; item.value = Item.buyPrice(0, 90, 0, 0); item.accessory = true; - item.GetGlobalItem(mod).postMoonLordRarity = 14; + item.Calamity().postMoonLordRarity = 14; } public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.beeResist = true; modPlayer.aSpark = true; modPlayer.gShell = true; diff --git a/Items/Accessories/StatisBeltOfCurses.cs b/Items/Accessories/StatisBeltOfCurses.cs index ab83669233..dc5ba0419a 100644 --- a/Items/Accessories/StatisBeltOfCurses.cs +++ b/Items/Accessories/StatisBeltOfCurses.cs @@ -27,12 +27,12 @@ namespace CalamityMod.Items.Accessories item.height = 32; item.value = Item.buyPrice(0, 90, 0, 0); item.accessory = true; - item.GetGlobalItem(mod).postMoonLordRarity = 14; + item.Calamity().postMoonLordRarity = 14; } public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.statisBeltOfCurses = true; modPlayer.shadowMinions = true; modPlayer.tearMinions = true; @@ -45,9 +45,9 @@ namespace CalamityMod.Items.Accessories player.blackBelt = true; player.dash = 1; player.spikedBoots = 2; - player.GetCalamityPlayer().throwingDamage += 0.1f; - player.GetCalamityPlayer().throwingCrit += 5; - player.GetCalamityPlayer().throwingVelocity += 0.1f; + player.Calamity().throwingDamage += 0.1f; + player.Calamity().throwingCrit += 5; + player.Calamity().throwingVelocity += 0.1f; } public override void AddRecipes() diff --git a/Items/Accessories/StatisBlessing.cs b/Items/Accessories/StatisBlessing.cs index 29a7b807fb..7e8c12adf0 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.tearMinions = true; player.minionKB += 2.5f; player.minionDamage += 0.1f; diff --git a/Items/Accessories/StatisCurse.cs b/Items/Accessories/StatisCurse.cs index dd84707ef0..c6c4a6830c 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.shadowMinions = true; modPlayer.tearMinions = true; player.minionKB += 2.5f; diff --git a/Items/Accessories/StatisNinjaBelt.cs b/Items/Accessories/StatisNinjaBelt.cs index f3fcc3d64d..4aab837151 100644 --- a/Items/Accessories/StatisNinjaBelt.cs +++ b/Items/Accessories/StatisNinjaBelt.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); player.autoJump = true; player.jumpSpeedBoost += 0.4f; player.extraFall += 35; diff --git a/Items/Accessories/StressPills.cs b/Items/Accessories/StressPills.cs index 61c4b1b173..2e98034e33 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.stressPills = true; } } diff --git a/Items/Accessories/SummonLevelMeter.cs b/Items/Accessories/SummonLevelMeter.cs index adacae5700..3294e8510d 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].GetCalamityPlayer().summonLevel; - int exactLevel = Main.player[Main.myPlayer].GetCalamityPlayer().exactSummonLevel; + int level = Main.player[Main.myPlayer].Calamity().summonLevel; + int exactLevel = Main.player[Main.myPlayer].Calamity().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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.fasterSummonLevel = true; } } diff --git a/Items/Accessories/TheAbsorber.cs b/Items/Accessories/TheAbsorber.cs index e8e01bee90..46efc1bbef 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.aSpark = true; modPlayer.gShell = true; modPlayer.fCarapace = true; diff --git a/Items/Accessories/TheAmalgam.cs b/Items/Accessories/TheAmalgam.cs index b0cf6d2943..d5b95f3688 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (modPlayer.fungalClump) { return false; @@ -52,7 +52,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.aBrain = true; modPlayer.fungalClump = true; if (player.whoAmI == Main.myPlayer) diff --git a/Items/Accessories/TheCommunity.cs b/Items/Accessories/TheCommunity.cs index 98c3855ad0..ebe8bc9627 100644 --- a/Items/Accessories/TheCommunity.cs +++ b/Items/Accessories/TheCommunity.cs @@ -27,12 +27,12 @@ namespace CalamityMod.Items.Accessories item.height = 20; item.value = Item.buyPrice(0, 60, 0, 0); item.accessory = true; - item.GetGlobalItem(mod).postMoonLordRarity = 20; + item.Calamity().postMoonLordRarity = 20; } public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.community = true; } } diff --git a/Items/Accessories/TheFirstShadowflame.cs b/Items/Accessories/TheFirstShadowflame.cs index 7493b0de5a..8a650aaf4f 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.shadowMinions = true; } } diff --git a/Items/Accessories/VoidofExtinction.cs b/Items/Accessories/VoidofExtinction.cs index 14c64034d7..63065c90e6 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (modPlayer.calamityRing) { return false; @@ -56,7 +56,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.calamityRing = true; player.lavaRose = true; player.lavaMax += 240; diff --git a/Items/Accessories/WifeinaBottle.cs b/Items/Accessories/WifeinaBottle.cs index a5bb90b0c7..257d361b6e 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (modPlayer.elementalHeart) { return false; @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.sandWaifu = true; if (player.whoAmI == Main.myPlayer) { diff --git a/Items/Accessories/WifeinaBottlewithBoobs.cs b/Items/Accessories/WifeinaBottlewithBoobs.cs index d7b74ce96a..0ccb55f109 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (modPlayer.elementalHeart) { return false; @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.sandBoobWaifu = true; if (player.whoAmI == Main.myPlayer) { diff --git a/Items/Accessories/Wings/AureateWings.cs b/Items/Accessories/Wings/AureateWings.cs index de90dcdd77..07a54930fb 100644 --- a/Items/Accessories/Wings/AureateWings.cs +++ b/Items/Accessories/Wings/AureateWings.cs @@ -92,7 +92,7 @@ namespace CalamityMod.Items.Accessories.Wings public override void VerticalWingSpeeds(Player player, ref float ascentWhenFalling, ref float ascentWhenRising, ref float maxCanAscendMultiplier, ref float maxAscentMultiplier, ref float constantAscend) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (modPlayer.reaverDoubleTap || modPlayer.reaverBurst || modPlayer.reaverOrb || modPlayer.reaverBlast || modPlayer.reaverSpore) { diff --git a/Items/Accessories/Wings/CelestialTracers.cs b/Items/Accessories/Wings/CelestialTracers.cs index 2b3298cd95..f467d31e74 100644 --- a/Items/Accessories/Wings/CelestialTracers.cs +++ b/Items/Accessories/Wings/CelestialTracers.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Accessories.Wings item.height = 32; item.value = Item.buyPrice(1, 20, 0, 0); item.accessory = true; - item.GetGlobalItem(mod).postMoonLordRarity = 15; + item.Calamity().postMoonLordRarity = 15; } public override void UpdateAccessory(Player player, bool hideVisual) @@ -51,7 +51,7 @@ namespace CalamityMod.Items.Accessories.Wings } Main.dust[num60].shader = GameShaders.Armor.GetSecondaryShader(player.cWings, player); } - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); player.accRunSpeed = 12f; player.rocketBoots = 3; player.moveSpeed += 0.5f; diff --git a/Items/Accessories/Wings/DiscordianWings.cs b/Items/Accessories/Wings/DiscordianWings.cs index a158290da6..9359168856 100644 --- a/Items/Accessories/Wings/DiscordianWings.cs +++ b/Items/Accessories/Wings/DiscordianWings.cs @@ -54,7 +54,7 @@ namespace CalamityMod.Items.Accessories.Wings public override void VerticalWingSpeeds(Player player, ref float ascentWhenFalling, ref float ascentWhenRising, ref float maxCanAscendMultiplier, ref float maxAscentMultiplier, ref float constantAscend) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (modPlayer.ataxiaBlaze) { diff --git a/Items/Accessories/Wings/DrewsWings.cs b/Items/Accessories/Wings/DrewsWings.cs index be952ecc4e..00c5b47d65 100644 --- a/Items/Accessories/Wings/DrewsWings.cs +++ b/Items/Accessories/Wings/DrewsWings.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Accessories.Wings item.width = 22; item.height = 20; item.value = Item.buyPrice(1, 0, 0, 0); - item.GetGlobalItem(mod).postMoonLordRarity = 14; + item.Calamity().postMoonLordRarity = 14; item.accessory = true; } diff --git a/Items/Accessories/Wings/ElysianTracers.cs b/Items/Accessories/Wings/ElysianTracers.cs index a95ff90a2e..de21876b65 100644 --- a/Items/Accessories/Wings/ElysianTracers.cs +++ b/Items/Accessories/Wings/ElysianTracers.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Accessories.Wings item.height = 32; item.value = Item.buyPrice(0, 90, 0, 0); item.accessory = true; - item.GetGlobalItem(mod).postMoonLordRarity = 14; + item.Calamity().postMoonLordRarity = 14; } public override void UpdateAccessory(Player player, bool hideVisual) @@ -51,7 +51,7 @@ namespace CalamityMod.Items.Accessories.Wings } Main.dust[num60].shader = GameShaders.Armor.GetSecondaryShader(player.cWings, player); } - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); player.accRunSpeed = 10.5f; player.rocketBoots = 3; player.moveSpeed += 0.36f; diff --git a/Items/Accessories/Wings/HadarianWings.cs b/Items/Accessories/Wings/HadarianWings.cs index 2eefc9829c..4e18e0eb61 100644 --- a/Items/Accessories/Wings/HadarianWings.cs +++ b/Items/Accessories/Wings/HadarianWings.cs @@ -67,7 +67,7 @@ namespace CalamityMod.Items.Accessories.Wings public override void VerticalWingSpeeds(Player player, ref float ascentWhenFalling, ref float ascentWhenRising, ref float maxCanAscendMultiplier, ref float maxAscentMultiplier, ref float constantAscend) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (modPlayer.astralStarRain) { diff --git a/Items/Accessories/Wings/InfinityBoots.cs b/Items/Accessories/Wings/InfinityBoots.cs index 032bfa5088..aecd29e19f 100644 --- a/Items/Accessories/Wings/InfinityBoots.cs +++ b/Items/Accessories/Wings/InfinityBoots.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Accessories.Wings item.height = 32; item.value = Item.buyPrice(0, 60, 0, 0); item.accessory = true; - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } public override void UpdateAccessory(Player player, bool hideVisual) @@ -51,7 +51,7 @@ namespace CalamityMod.Items.Accessories.Wings } Main.dust[num60].shader = GameShaders.Armor.GetSecondaryShader(player.cWings, player); } - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); player.accRunSpeed = 9.25f; player.rocketBoots = 3; player.moveSpeed += 0.24f; diff --git a/Items/Accessories/Wings/StarlightWings.cs b/Items/Accessories/Wings/StarlightWings.cs index a3b7372ad0..d66bf2a040 100644 --- a/Items/Accessories/Wings/StarlightWings.cs +++ b/Items/Accessories/Wings/StarlightWings.cs @@ -54,7 +54,7 @@ namespace CalamityMod.Items.Accessories.Wings public override void VerticalWingSpeeds(Player player, ref float ascentWhenFalling, ref float ascentWhenRising, ref float maxCanAscendMultiplier, ref float maxAscentMultiplier, ref float constantAscend) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (modPlayer.daedalusReflect || modPlayer.daedalusCrystal || modPlayer.daedalusAbsorb || modPlayer.daedalusShard || modPlayer.daedalusSplit) { diff --git a/Items/Accessories/Wings/TarragonWings.cs b/Items/Accessories/Wings/TarragonWings.cs index cb0ed6fa19..d80aa172cb 100644 --- a/Items/Accessories/Wings/TarragonWings.cs +++ b/Items/Accessories/Wings/TarragonWings.cs @@ -65,7 +65,7 @@ namespace CalamityMod.Items.Accessories.Wings public override void VerticalWingSpeeds(Player player, ref float ascentWhenFalling, ref float ascentWhenRising, ref float maxCanAscendMultiplier, ref float maxAscentMultiplier, ref float constantAscend) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (modPlayer.tarraSet) { diff --git a/Items/Accessories/Wings/XerocWings.cs b/Items/Accessories/Wings/XerocWings.cs index 6fab33895c..ad3beb1c86 100644 --- a/Items/Accessories/Wings/XerocWings.cs +++ b/Items/Accessories/Wings/XerocWings.cs @@ -54,12 +54,12 @@ namespace CalamityMod.Items.Accessories.Wings public override void VerticalWingSpeeds(Player player, ref float ascentWhenFalling, ref float ascentWhenRising, ref float maxCanAscendMultiplier, ref float maxAscentMultiplier, ref float constantAscend) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (modPlayer.xerocSet) { - player.GetCalamityPlayer().throwingDamage += 0.05f; - player.GetCalamityPlayer().throwingCrit += 5; + player.Calamity().throwingDamage += 0.05f; + player.Calamity().throwingCrit += 5; } ascentWhenFalling = 0.75f; diff --git a/Items/Accessories/YharimsInsignia.cs b/Items/Accessories/YharimsInsignia.cs index 67b7c2ec17..83d7d7c31d 100644 --- a/Items/Accessories/YharimsInsignia.cs +++ b/Items/Accessories/YharimsInsignia.cs @@ -25,12 +25,12 @@ namespace CalamityMod.Items.Accessories item.height = 38; item.value = Item.buyPrice(0, 30, 0, 0); item.accessory = true; - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.yInsignia = true; } diff --git a/Items/AquaticScourge/AquaticEmblem.cs b/Items/AquaticScourge/AquaticEmblem.cs index 8b508a3c99..0281f2cfc3 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.aquaticEmblem = true; player.npcTypeNoAggro[65] = true; player.npcTypeNoAggro[220] = true; diff --git a/Items/AquaticScourge/Seafood.cs b/Items/AquaticScourge/Seafood.cs index 334b0338aa..86246f8b78 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); return modPlayer.ZoneSulphur && !NPC.AnyNPCs(mod.NPCType("AquaticScourgeHead")); } diff --git a/Items/Armor/AerospecBreastplate.cs b/Items/Armor/AerospecBreastplate.cs index e40b57d748..cd6a94e29a 100644 --- a/Items/Armor/AerospecBreastplate.cs +++ b/Items/Armor/AerospecBreastplate.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Armor player.meleeCrit += 3; player.rangedCrit += 3; player.magicCrit += 3; - player.GetCalamityPlayer().throwingCrit += 3; + player.Calamity().throwingCrit += 3; } public override void AddRecipes() diff --git a/Items/Armor/AerospecHat.cs b/Items/Armor/AerospecHat.cs index 637f4b63b1..0da2786c8c 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.aeroSet = true; player.noFallDmg = true; player.moveSpeed += 0.05f; diff --git a/Items/Armor/AerospecHeadgear.cs b/Items/Armor/AerospecHeadgear.cs index 6fae64a91e..1ba9ff38bb 100644 --- a/Items/Armor/AerospecHeadgear.cs +++ b/Items/Armor/AerospecHeadgear.cs @@ -48,18 +48,18 @@ 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.aeroSet = true; modPlayer.rogueStealthMax = 1f; player.noFallDmg = true; player.moveSpeed += 0.05f; - player.GetCalamityPlayer().throwingCrit += 5; - player.GetCalamityPlayer().wearingRogueArmor = true; + player.Calamity().throwingCrit += 5; + player.Calamity().wearingRogueArmor = true; } public override void UpdateEquip(Player player) { - player.GetCalamityPlayer().throwingDamage += 0.08f; + player.Calamity().throwingDamage += 0.08f; player.moveSpeed += 0.05f; } diff --git a/Items/Armor/AerospecHelm.cs b/Items/Armor/AerospecHelm.cs index e2fdc6537a..70f8e0020a 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.aeroSet = true; player.noFallDmg = true; player.moveSpeed += 0.05f; diff --git a/Items/Armor/AerospecHelmet.cs b/Items/Armor/AerospecHelmet.cs index ce29b56913..f35f99b85c 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.valkyrie = true; modPlayer.aeroSet = true; player.noFallDmg = true; diff --git a/Items/Armor/AerospecHood.cs b/Items/Armor/AerospecHood.cs index a3671fa2f8..796bb9f2c3 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.aeroSet = true; player.noFallDmg = true; player.moveSpeed += 0.05f; diff --git a/Items/Armor/AstralHelm.cs b/Items/Armor/AstralHelm.cs index e483578d91..61c1341e36 100644 --- a/Items/Armor/AstralHelm.cs +++ b/Items/Armor/AstralHelm.cs @@ -39,12 +39,12 @@ 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.astralStarRain = true; player.moveSpeed += 0.25f; player.allDamage += 0.28f; modPlayer.AllCritBoost(21); - player.GetCalamityPlayer().wearingRogueArmor = true; + player.Calamity().wearingRogueArmor = true; } public override void UpdateEquip(Player player) diff --git a/Items/Armor/AtaxiaHeadgear.cs b/Items/Armor/AtaxiaHeadgear.cs index 8c51e2d16b..b0c1e14442 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.ataxiaBlaze = true; modPlayer.ataxiaBolt = true; player.rangedDamage += 0.05f; diff --git a/Items/Armor/AtaxiaHelm.cs b/Items/Armor/AtaxiaHelm.cs index 1f6734f56c..bb83aa71e5 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.ataxiaFire = true; player.meleeSpeed += 0.12f; player.moveSpeed += 0.12f; diff --git a/Items/Armor/AtaxiaHelmet.cs b/Items/Armor/AtaxiaHelmet.cs index 5b6cc794b0..0d6026b5d8 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.ataxiaBlaze = true; modPlayer.chaosSpirit = true; if (player.whoAmI == Main.myPlayer) diff --git a/Items/Armor/AtaxiaHood.cs b/Items/Armor/AtaxiaHood.cs index f1b983fc25..25fd1bbcf9 100644 --- a/Items/Armor/AtaxiaHood.cs +++ b/Items/Armor/AtaxiaHood.cs @@ -45,19 +45,19 @@ 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.ataxiaBlaze = true; modPlayer.ataxiaVolley = true; modPlayer.rogueStealthMax = 1.2f; - player.GetCalamityPlayer().throwingDamage += 0.05f; - player.GetCalamityPlayer().wearingRogueArmor = true; + player.Calamity().throwingDamage += 0.05f; + player.Calamity().wearingRogueArmor = true; } public override void UpdateEquip(Player player) { - player.GetCalamityPlayer().throwingAmmoCost50 = true; - player.GetCalamityPlayer().throwingDamage += 0.12f; - player.GetCalamityPlayer().throwingCrit += 10; + player.Calamity().throwingAmmoCost50 = true; + player.Calamity().throwingDamage += 0.12f; + player.Calamity().throwingCrit += 10; player.moveSpeed += 0.15f; player.lavaMax += 240; player.buffImmune[BuffID.OnFire] = true; diff --git a/Items/Armor/AtaxiaMask.cs b/Items/Armor/AtaxiaMask.cs index bda4abafc4..ab937a9a94 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.ataxiaBlaze = true; modPlayer.ataxiaMage = true; player.magicDamage += 0.05f; diff --git a/Items/Armor/AtaxiaSubligar.cs b/Items/Armor/AtaxiaSubligar.cs index 9388968fe4..13bf660ea4 100644 --- a/Items/Armor/AtaxiaSubligar.cs +++ b/Items/Armor/AtaxiaSubligar.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Armor player.meleeCrit += 3; player.magicCrit += 3; player.rangedCrit += 3; - player.GetCalamityPlayer().throwingCrit += 3; + player.Calamity().throwingCrit += 3; player.moveSpeed += 0.15f; } diff --git a/Items/Armor/AuricTeslaBodyArmor.cs b/Items/Armor/AuricTeslaBodyArmor.cs index e6905244fd..85b462681f 100644 --- a/Items/Armor/AuricTeslaBodyArmor.cs +++ b/Items/Armor/AuricTeslaBodyArmor.cs @@ -23,12 +23,12 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(1, 44, 0, 0); item.defense = 48; - item.GetGlobalItem(mod).postMoonLordRarity = 20; + item.Calamity().postMoonLordRarity = 20; } public override void UpdateEquip(Player player) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.fBarrier = true; modPlayer.godSlayerReflect = true; player.statLifeMax2 += 100; diff --git a/Items/Armor/AuricTeslaCuisses.cs b/Items/Armor/AuricTeslaCuisses.cs index 4ed63c4f3f..6c26cf6bf7 100644 --- a/Items/Armor/AuricTeslaCuisses.cs +++ b/Items/Armor/AuricTeslaCuisses.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(1, 8, 0, 0); item.defense = 44; - item.GetGlobalItem(mod).postMoonLordRarity = 20; + item.Calamity().postMoonLordRarity = 20; } public override void UpdateEquip(Player player) diff --git a/Items/Armor/AuricTeslaHelm.cs b/Items/Armor/AuricTeslaHelm.cs index 87aabce0bb..797325a617 100644 --- a/Items/Armor/AuricTeslaHelm.cs +++ b/Items/Armor/AuricTeslaHelm.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(1, 80, 0, 0); item.defense = 54; //132 - item.GetGlobalItem(mod).postMoonLordRarity = 20; + item.Calamity().postMoonLordRarity = 20; } public override bool IsArmorSet(Item head, Item body, Item legs) @@ -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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.auricBoost = true; player.meleeDamage += 0.2f; player.meleeCrit += 20; diff --git a/Items/Armor/AuricTeslaHoodedFacemask.cs b/Items/Armor/AuricTeslaHoodedFacemask.cs index 67e05eddc6..0de269f60e 100644 --- a/Items/Armor/AuricTeslaHoodedFacemask.cs +++ b/Items/Armor/AuricTeslaHoodedFacemask.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(1, 80, 0, 0); item.defense = 40; //132 - item.GetGlobalItem(mod).postMoonLordRarity = 20; + item.Calamity().postMoonLordRarity = 20; } public override bool IsArmorSet(Item head, Item body, Item legs) @@ -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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.auricBoost = true; player.rangedDamage += 0.3f; player.rangedCrit += 30; diff --git a/Items/Armor/AuricTeslaPlumedHelm.cs b/Items/Armor/AuricTeslaPlumedHelm.cs index 8d1e8f56e5..edc8a87ab7 100644 --- a/Items/Armor/AuricTeslaPlumedHelm.cs +++ b/Items/Armor/AuricTeslaPlumedHelm.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(1, 80, 0, 0); item.defense = 34; //132 - item.GetGlobalItem(mod).postMoonLordRarity = 20; + item.Calamity().postMoonLordRarity = 20; } public override bool IsArmorSet(Item head, Item body, Item legs) @@ -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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.tarraSet = true; modPlayer.tarraThrowing = true; modPlayer.bloodflareSet = true; @@ -68,10 +68,10 @@ namespace CalamityMod.Items.Armor public override void UpdateEquip(Player player) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.auricBoost = true; - player.GetCalamityPlayer().throwingDamage += 0.2f; - player.GetCalamityPlayer().throwingCrit += 20; + player.Calamity().throwingDamage += 0.2f; + player.Calamity().throwingCrit += 20; player.moveSpeed += 0.25f; } diff --git a/Items/Armor/AuricTeslaSpaceHelmet.cs b/Items/Armor/AuricTeslaSpaceHelmet.cs index 9a8201e2b7..5f34cad403 100644 --- a/Items/Armor/AuricTeslaSpaceHelmet.cs +++ b/Items/Armor/AuricTeslaSpaceHelmet.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(1, 80, 0, 0); item.defense = 12; //132 - item.GetGlobalItem(mod).postMoonLordRarity = 20; + item.Calamity().postMoonLordRarity = 20; } public override bool IsArmorSet(Item head, Item body, Item legs) @@ -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" + "+1 max minion and 120% increased minion damage"; - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.tarraSet = true; modPlayer.tarraSummon = true; modPlayer.bloodflareSet = true; @@ -197,7 +197,7 @@ namespace CalamityMod.Items.Armor public override void UpdateEquip(Player player) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.auricBoost = true; player.maxMinions += 7; } diff --git a/Items/Armor/AuricTeslaWireHemmedVisage.cs b/Items/Armor/AuricTeslaWireHemmedVisage.cs index 74fd30a46e..9f856f6075 100644 --- a/Items/Armor/AuricTeslaWireHemmedVisage.cs +++ b/Items/Armor/AuricTeslaWireHemmedVisage.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(1, 80, 0, 0); item.defense = 24; //132 - item.GetGlobalItem(mod).postMoonLordRarity = 20; + item.Calamity().postMoonLordRarity = 20; } public override bool IsArmorSet(Item head, Item body, Item legs) @@ -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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.auricBoost = true; player.manaCost *= 0.8f; player.magicDamage += 0.2f; diff --git a/Items/Armor/BloodflareBodyArmor.cs b/Items/Armor/BloodflareBodyArmor.cs index e837ffa24d..19928906bd 100644 --- a/Items/Armor/BloodflareBodyArmor.cs +++ b/Items/Armor/BloodflareBodyArmor.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(0, 48, 0, 0); item.defense = 35; - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().postMoonLordRarity = 13; } public override void UpdateEquip(Player player) diff --git a/Items/Armor/BloodflareCuisses.cs b/Items/Armor/BloodflareCuisses.cs index 741caab7d4..f5cb67c375 100644 --- a/Items/Armor/BloodflareCuisses.cs +++ b/Items/Armor/BloodflareCuisses.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(0, 36, 0, 0); item.defense = 29; - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().postMoonLordRarity = 13; } public override void UpdateEquip(Player player) diff --git a/Items/Armor/BloodflareHelm.cs b/Items/Armor/BloodflareHelm.cs index bc5c364835..df79a66b96 100644 --- a/Items/Armor/BloodflareHelm.cs +++ b/Items/Armor/BloodflareHelm.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(0, 60, 0, 0); item.defense = 28; //85 - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().postMoonLordRarity = 13; } public override bool IsArmorSet(Item head, Item body, Item legs) @@ -37,7 +37,7 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.bloodflareSet = true; modPlayer.bloodflareThrowing = true; modPlayer.rogueStealthMax = 1.35f; @@ -59,8 +59,8 @@ namespace CalamityMod.Items.Armor { player.lavaMax += 240; player.ignoreWater = true; - player.GetCalamityPlayer().throwingDamage += 0.1f; - player.GetCalamityPlayer().throwingCrit += 10; + player.Calamity().throwingDamage += 0.1f; + player.Calamity().throwingCrit += 10; player.moveSpeed += 0.15f; } diff --git a/Items/Armor/BloodflareHelmet.cs b/Items/Armor/BloodflareHelmet.cs index 86361aa0d9..cc6abc858b 100644 --- a/Items/Armor/BloodflareHelmet.cs +++ b/Items/Armor/BloodflareHelmet.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(0, 60, 0, 0); item.defense = 16; //85 - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().postMoonLordRarity = 13; } public override bool IsArmorSet(Item head, Item body, Item legs) @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); 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 0eacca3292..710e3f2275 100644 --- a/Items/Armor/BloodflareHornedHelm.cs +++ b/Items/Armor/BloodflareHornedHelm.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(0, 60, 0, 0); item.defense = 34; //85 - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().postMoonLordRarity = 13; } public override bool IsArmorSet(Item head, Item body, Item legs) @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); 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 46981db00c..e12c43b049 100644 --- a/Items/Armor/BloodflareHornedMask.cs +++ b/Items/Armor/BloodflareHornedMask.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(0, 60, 0, 0); item.defense = 22; //85 - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().postMoonLordRarity = 13; } public override bool IsArmorSet(Item head, Item body, Item legs) @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); 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 eb2c522804..9ed8487f16 100644 --- a/Items/Armor/BloodflareMask.cs +++ b/Items/Armor/BloodflareMask.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(0, 60, 0, 0); item.defense = 49; //85 - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().postMoonLordRarity = 13; } public override bool IsArmorSet(Item head, Item body, Item legs) @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); 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 c5eddc6091..5594925252 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.daedalusAbsorb = true; player.magicDamage += 0.05f; } diff --git a/Items/Armor/DaedalusHeadgear.cs b/Items/Armor/DaedalusHeadgear.cs index 9cd868c5d1..57c23ffb02 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.daedalusCrystal = true; if (player.whoAmI == Main.myPlayer) { diff --git a/Items/Armor/DaedalusHelm.cs b/Items/Armor/DaedalusHelm.cs index 64897edebb..99c0d22603 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.daedalusReflect = true; player.meleeDamage += 0.05f; } diff --git a/Items/Armor/DaedalusHelmet.cs b/Items/Armor/DaedalusHelmet.cs index a1b7fc399d..846dec62db 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.daedalusShard = true; player.rangedDamage += 0.05f; } diff --git a/Items/Armor/DaedalusLeggings.cs b/Items/Armor/DaedalusLeggings.cs index 3dd466cc90..560d9e0af8 100644 --- a/Items/Armor/DaedalusLeggings.cs +++ b/Items/Armor/DaedalusLeggings.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Armor player.meleeCrit += 3; player.magicCrit += 3; player.rangedCrit += 3; - player.GetCalamityPlayer().throwingCrit += 3; + player.Calamity().throwingCrit += 3; player.moveSpeed += 0.1f; } diff --git a/Items/Armor/DaedalusVisor.cs b/Items/Armor/DaedalusVisor.cs index b03f70efec..6e259cb65a 100644 --- a/Items/Armor/DaedalusVisor.cs +++ b/Items/Armor/DaedalusVisor.cs @@ -49,18 +49,18 @@ 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.daedalusSplit = true; modPlayer.rogueStealthMax = 1.1f; - player.GetCalamityPlayer().throwingDamage += 0.05f; - player.GetCalamityPlayer().wearingRogueArmor = true; + player.Calamity().throwingDamage += 0.05f; + player.Calamity().wearingRogueArmor = true; } public override void UpdateEquip(Player player) { - player.GetCalamityPlayer().throwingVelocity += 0.15f; - player.GetCalamityPlayer().throwingDamage += 0.13f; - player.GetCalamityPlayer().throwingCrit += 7; + player.Calamity().throwingVelocity += 0.15f; + player.Calamity().throwingDamage += 0.13f; + player.Calamity().throwingCrit += 7; player.moveSpeed += 0.17f; } diff --git a/Items/Armor/DemonshadeBreastplate.cs b/Items/Armor/DemonshadeBreastplate.cs index 2595fe24ef..256075a177 100644 --- a/Items/Armor/DemonshadeBreastplate.cs +++ b/Items/Armor/DemonshadeBreastplate.cs @@ -22,12 +22,12 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(4, 0, 0, 0); item.defense = 50; - item.GetGlobalItem(mod).postMoonLordRarity = 16; + item.Calamity().postMoonLordRarity = 16; } public override void UpdateEquip(Player player) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.shadeRegen = true; player.thorns = 100f; player.statLifeMax2 += 200; diff --git a/Items/Armor/DemonshadeGreaves.cs b/Items/Armor/DemonshadeGreaves.cs index 3293d42dea..60c4461e27 100644 --- a/Items/Armor/DemonshadeGreaves.cs +++ b/Items/Armor/DemonshadeGreaves.cs @@ -19,12 +19,12 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(3, 0, 0, 0); item.defense = 50; //15 - item.GetGlobalItem(mod).postMoonLordRarity = 16; + item.Calamity().postMoonLordRarity = 16; } public override void UpdateEquip(Player player) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.shadowSpeed = true; player.moveSpeed += 1f; } diff --git a/Items/Armor/DemonshadeHelm.cs b/Items/Armor/DemonshadeHelm.cs index 02ca3048c9..112d6e87ca 100644 --- a/Items/Armor/DemonshadeHelm.cs +++ b/Items/Armor/DemonshadeHelm.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(5, 0, 0, 0); item.defense = 50; //15 - item.GetGlobalItem(mod).postMoonLordRarity = 16; + item.Calamity().postMoonLordRarity = 16; } public override bool IsArmorSet(Item head, Item body, Item legs) @@ -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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.dsSetBonus = true; modPlayer.wearingRogueArmor = true; if (player.whoAmI == Main.myPlayer && !modPlayer.chibii) diff --git a/Items/Armor/GodSlayerChestplate.cs b/Items/Armor/GodSlayerChestplate.cs index 0c6cfe5c28..c3bd6a5da9 100644 --- a/Items/Armor/GodSlayerChestplate.cs +++ b/Items/Armor/GodSlayerChestplate.cs @@ -23,12 +23,12 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(0, 60, 0, 0); item.defense = 41; - item.GetGlobalItem(mod).postMoonLordRarity = 14; + item.Calamity().postMoonLordRarity = 14; } public override void UpdateEquip(Player player) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.godSlayerReflect = true; player.thorns += 0.5f; player.statLifeMax2 += 60; diff --git a/Items/Armor/GodSlayerHelm.cs b/Items/Armor/GodSlayerHelm.cs index 2f22fafacd..96297475a1 100644 --- a/Items/Armor/GodSlayerHelm.cs +++ b/Items/Armor/GodSlayerHelm.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(0, 75, 0, 0); item.defense = 48; //96 - item.GetGlobalItem(mod).postMoonLordRarity = 14; + item.Calamity().postMoonLordRarity = 14; } public override bool IsArmorSet(Item head, Item body, Item legs) @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); 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 92f6d696c3..044b0f62ae 100644 --- a/Items/Armor/GodSlayerHelmet.cs +++ b/Items/Armor/GodSlayerHelmet.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(0, 75, 0, 0); item.defense = 35; //96 - item.GetGlobalItem(mod).postMoonLordRarity = 14; + item.Calamity().postMoonLordRarity = 14; } public override bool IsArmorSet(Item head, Item body, Item legs) @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); 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 d4f17053c9..a0919bfd5c 100644 --- a/Items/Armor/GodSlayerHornedHelm.cs +++ b/Items/Armor/GodSlayerHornedHelm.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(0, 75, 0, 0); item.defense = 12; //96 - item.GetGlobalItem(mod).postMoonLordRarity = 14; + item.Calamity().postMoonLordRarity = 14; } public override bool IsArmorSet(Item head, Item body, Item legs) @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.godSlayer = true; modPlayer.godSlayerSummon = true; if (player.whoAmI == Main.myPlayer) diff --git a/Items/Armor/GodSlayerLeggings.cs b/Items/Armor/GodSlayerLeggings.cs index b9203a8c72..4a5a69474d 100644 --- a/Items/Armor/GodSlayerLeggings.cs +++ b/Items/Armor/GodSlayerLeggings.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(0, 45, 0, 0); item.defense = 35; - item.GetGlobalItem(mod).postMoonLordRarity = 14; + item.Calamity().postMoonLordRarity = 14; } public override void UpdateEquip(Player player) diff --git a/Items/Armor/GodSlayerMask.cs b/Items/Armor/GodSlayerMask.cs index 25abc597c1..b891071918 100644 --- a/Items/Armor/GodSlayerMask.cs +++ b/Items/Armor/GodSlayerMask.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(0, 75, 0, 0); item.defense = 29; //96 - item.GetGlobalItem(mod).postMoonLordRarity = 14; + item.Calamity().postMoonLordRarity = 14; } public override bool IsArmorSet(Item head, Item body, Item legs) @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.godSlayer = true; modPlayer.godSlayerThrowing = true; modPlayer.rogueStealthMax = 1.4f; @@ -52,8 +52,8 @@ namespace CalamityMod.Items.Armor public override void UpdateEquip(Player player) { - player.GetCalamityPlayer().throwingDamage += 0.14f; - player.GetCalamityPlayer().throwingCrit += 14; + player.Calamity().throwingDamage += 0.14f; + player.Calamity().throwingCrit += 14; player.moveSpeed += 0.18f; } diff --git a/Items/Armor/GodSlayerVisage.cs b/Items/Armor/GodSlayerVisage.cs index 2e0fa69365..df40a0186f 100644 --- a/Items/Armor/GodSlayerVisage.cs +++ b/Items/Armor/GodSlayerVisage.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(0, 75, 0, 0); item.defense = 21; //96 - item.GetGlobalItem(mod).postMoonLordRarity = 14; + item.Calamity().postMoonLordRarity = 14; } public override bool IsArmorSet(Item head, Item body, Item legs) @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); 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/MolluskShellmet.cs b/Items/Armor/MolluskShellmet.cs index 998a6f243e..d500f3b108 100644 --- a/Items/Armor/MolluskShellmet.cs +++ b/Items/Armor/MolluskShellmet.cs @@ -56,7 +56,7 @@ namespace CalamityMod.Items.Armor Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, mod.ProjectileType("Shellfish"), (int)((double)1500 * player.minionDamage), 0f, Main.myPlayer, 0f, 0f); } } - player.GetCalamityPlayer().wearingRogueArmor = true; + player.Calamity().wearingRogueArmor = true; } public override void AddRecipes() diff --git a/Items/Armor/OmegaBlueChestplate.cs b/Items/Armor/OmegaBlueChestplate.cs index 47d84d779d..afef4bf8f7 100644 --- a/Items/Armor/OmegaBlueChestplate.cs +++ b/Items/Armor/OmegaBlueChestplate.cs @@ -23,7 +23,7 @@ No positive life regen"); item.value = Item.sellPrice(0, 38, 0, 0); item.rare = 10; item.defense = 28; - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().postMoonLordRarity = 13; } public override void UpdateEquip(Player player) diff --git a/Items/Armor/OmegaBlueHelmet.cs b/Items/Armor/OmegaBlueHelmet.cs index b77bc1fae3..641a6cbb9e 100644 --- a/Items/Armor/OmegaBlueHelmet.cs +++ b/Items/Armor/OmegaBlueHelmet.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Armor item.value = Item.sellPrice(0, 35, 0, 0); item.rare = 10; item.defense = 19; - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().postMoonLordRarity = 13; } public override void UpdateEquip(Player player) @@ -57,7 +57,7 @@ Abyssal madness increases damage, critical strike chance, and tentacle aggressio This effect has a 30 second cooldown"; player.armorPenetration += 50; - player.GetCalamityPlayer().wearingRogueArmor = true; + player.Calamity().wearingRogueArmor = true; //raise rev caps player.GetModPlayer().omegaBlueSet = true; diff --git a/Items/Armor/OmegaBlueLeggings.cs b/Items/Armor/OmegaBlueLeggings.cs index b5dc037c5a..2c21c97eef 100644 --- a/Items/Armor/OmegaBlueLeggings.cs +++ b/Items/Armor/OmegaBlueLeggings.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Armor item.value = Item.sellPrice(0, 35, 25, 0); item.rare = 10; item.defense = 22; - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().postMoonLordRarity = 13; } public override void UpdateEquip(Player player) diff --git a/Items/Armor/ReaverCap.cs b/Items/Armor/ReaverCap.cs index a124da966c..cca0e8e74a 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.reaverSpore = true; modPlayer.rogueStealthMax = 1.15f; player.setBonus = "5% increased rogue damage\n" + @@ -46,16 +46,16 @@ namespace CalamityMod.Items.Armor "Rogue stealth builds while not attacking and not moving, up to a max of 115\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"; - player.GetCalamityPlayer().throwingDamage += 0.05f; - player.GetCalamityPlayer().wearingRogueArmor = true; + player.Calamity().throwingDamage += 0.05f; + player.Calamity().wearingRogueArmor = true; } public override void UpdateEquip(Player player) { player.ignoreWater = true; - player.GetCalamityPlayer().throwingDamage += 0.15f; - player.GetCalamityPlayer().throwingCrit += 5; - player.GetCalamityPlayer().throwingVelocity += 0.05f; + player.Calamity().throwingDamage += 0.15f; + player.Calamity().throwingCrit += 5; + player.Calamity().throwingVelocity += 0.05f; player.moveSpeed += 0.2f; } diff --git a/Items/Armor/ReaverCuisses.cs b/Items/Armor/ReaverCuisses.cs index 964f5befc0..cc08780c7b 100644 --- a/Items/Armor/ReaverCuisses.cs +++ b/Items/Armor/ReaverCuisses.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Armor player.meleeCrit += 5; player.magicCrit += 5; player.rangedCrit += 5; - player.GetCalamityPlayer().throwingCrit += 5; + player.Calamity().throwingCrit += 5; player.moveSpeed += 0.12f; } diff --git a/Items/Armor/ReaverHelm.cs b/Items/Armor/ReaverHelm.cs index 9165f2a1b9..ff91fccfe5 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); 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 669bb9a1a9..1faa1e3265 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.reaverOrb = true; if (player.whoAmI == Main.myPlayer) { diff --git a/Items/Armor/ReaverMask.cs b/Items/Armor/ReaverMask.cs index c3315ad8e7..027b958446 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); 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 00e6676bc3..e85438d661 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); 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 a4c1fa4b4c..6cd474c42d 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); player.shroomiteStealth = true; player.setBonus = "Ranged stealth while standing still"; } public override void UpdateEquip(Player player) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.flamethrowerBoost = true; } diff --git a/Items/Armor/SilvaArmor.cs b/Items/Armor/SilvaArmor.cs index 9cd9f56fd7..73aec8794f 100644 --- a/Items/Armor/SilvaArmor.cs +++ b/Items/Armor/SilvaArmor.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(0, 72, 0, 0); item.defense = 44; - item.GetGlobalItem(mod).postMoonLordRarity = 15; + item.Calamity().postMoonLordRarity = 15; } public override void UpdateEquip(Player player) diff --git a/Items/Armor/SilvaHelm.cs b/Items/Armor/SilvaHelm.cs index 1ad7aa811f..4cf426b225 100644 --- a/Items/Armor/SilvaHelm.cs +++ b/Items/Armor/SilvaHelm.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(0, 90, 0, 0); item.defense = 52; //110 - item.GetGlobalItem(mod).postMoonLordRarity = 15; + item.Calamity().postMoonLordRarity = 15; } public override bool IsArmorSet(Item head, Item body, Item legs) @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); 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 11cac34370..f46c623a9b 100644 --- a/Items/Armor/SilvaHelmet.cs +++ b/Items/Armor/SilvaHelmet.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(0, 90, 0, 0); item.defense = 13; //110 - item.GetGlobalItem(mod).postMoonLordRarity = 15; + item.Calamity().postMoonLordRarity = 15; } public override bool IsArmorSet(Item head, Item body, Item legs) @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); 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 890e12b448..fe8ced1149 100644 --- a/Items/Armor/SilvaHornedHelm.cs +++ b/Items/Armor/SilvaHornedHelm.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(0, 90, 0, 0); item.defense = 36; //110 - item.GetGlobalItem(mod).postMoonLordRarity = 15; + item.Calamity().postMoonLordRarity = 15; } public override bool IsArmorSet(Item head, Item body, Item legs) @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.silvaSet = true; modPlayer.silvaRanged = true; player.setBonus = "You are immune to almost all debuffs\n" + diff --git a/Items/Armor/SilvaLeggings.cs b/Items/Armor/SilvaLeggings.cs index 569ae54d2b..ed9b63a7ea 100644 --- a/Items/Armor/SilvaLeggings.cs +++ b/Items/Armor/SilvaLeggings.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(0, 54, 0, 0); item.defense = 39; - item.GetGlobalItem(mod).postMoonLordRarity = 15; + item.Calamity().postMoonLordRarity = 15; } public override void UpdateEquip(Player player) diff --git a/Items/Armor/SilvaMask.cs b/Items/Armor/SilvaMask.cs index 667df5caae..e8f40f2548 100644 --- a/Items/Armor/SilvaMask.cs +++ b/Items/Armor/SilvaMask.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(0, 90, 0, 0); item.defense = 30; //110 - item.GetGlobalItem(mod).postMoonLordRarity = 15; + item.Calamity().postMoonLordRarity = 15; } public override bool IsArmorSet(Item head, Item body, Item legs) @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.silvaSet = true; modPlayer.silvaThrowing = true; modPlayer.rogueStealthMax = 1.5f; @@ -56,8 +56,8 @@ namespace CalamityMod.Items.Armor public override void UpdateEquip(Player player) { - player.GetCalamityPlayer().throwingDamage += 0.13f; - player.GetCalamityPlayer().throwingCrit += 13; + player.Calamity().throwingDamage += 0.13f; + player.Calamity().throwingCrit += 13; player.moveSpeed += 0.2f; } diff --git a/Items/Armor/SilvaMaskedCap.cs b/Items/Armor/SilvaMaskedCap.cs index 1cc941454e..6f5ba9b842 100644 --- a/Items/Armor/SilvaMaskedCap.cs +++ b/Items/Armor/SilvaMaskedCap.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(0, 90, 0, 0); item.defense = 21; //110 - item.GetGlobalItem(mod).postMoonLordRarity = 15; + item.Calamity().postMoonLordRarity = 15; } public override bool IsArmorSet(Item head, Item body, Item legs) @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.silvaSet = true; modPlayer.silvaMage = true; player.setBonus = "You are immune to almost all debuffs\n" + diff --git a/Items/Armor/StatigelArmor.cs b/Items/Armor/StatigelArmor.cs index 7da0f41ba0..f9a04ae922 100644 --- a/Items/Armor/StatigelArmor.cs +++ b/Items/Armor/StatigelArmor.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Armor player.meleeCrit += 5; player.magicCrit += 5; player.rangedCrit += 5; - player.GetCalamityPlayer().throwingCrit += 5; + player.Calamity().throwingCrit += 5; } public override void AddRecipes() diff --git a/Items/Armor/StatigelCap.cs b/Items/Armor/StatigelCap.cs index 9b31f3379a..fba1c1ec2d 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.statigelSet = true; player.doubleJumpSail = true; player.jumpBoost = true; diff --git a/Items/Armor/StatigelHeadgear.cs b/Items/Armor/StatigelHeadgear.cs index 2b18f9e56b..47985415d6 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.statigelSet = true; player.doubleJumpSail = true; player.jumpBoost = true; diff --git a/Items/Armor/StatigelHelm.cs b/Items/Armor/StatigelHelm.cs index d203f701e8..e9ef53008b 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.statigelSet = true; player.doubleJumpSail = true; player.jumpBoost = true; diff --git a/Items/Armor/StatigelHood.cs b/Items/Armor/StatigelHood.cs index 6fe85bd7ce..66f88e7dda 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.statigelSet = true; modPlayer.slimeGod = true; player.doubleJumpSail = true; diff --git a/Items/Armor/StatigelMask.cs b/Items/Armor/StatigelMask.cs index fd61ef926c..6cb21af2a9 100644 --- a/Items/Armor/StatigelMask.cs +++ b/Items/Armor/StatigelMask.cs @@ -37,19 +37,19 @@ 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.statigelSet = true; modPlayer.rogueStealthMax = 1.05f; player.doubleJumpSail = true; player.jumpBoost = true; - player.GetCalamityPlayer().wearingRogueArmor = true; + player.Calamity().wearingRogueArmor = true; } public override void UpdateEquip(Player player) { - player.GetCalamityPlayer().throwingAmmoCost66 = true; - player.GetCalamityPlayer().throwingDamage += 0.1f; - player.GetCalamityPlayer().throwingCrit += 7; + player.Calamity().throwingAmmoCost66 = true; + player.Calamity().throwingDamage += 0.1f; + player.Calamity().throwingCrit += 7; player.moveSpeed += 0.12f; } diff --git a/Items/Armor/TarragonBreastplate.cs b/Items/Armor/TarragonBreastplate.cs index 3a03577846..17b11524e5 100644 --- a/Items/Armor/TarragonBreastplate.cs +++ b/Items/Armor/TarragonBreastplate.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Armor item.lifeRegen = 2; item.value = Item.buyPrice(0, 40, 0, 0); item.defense = 37; - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } public override void UpdateEquip(Player player) diff --git a/Items/Armor/TarragonHelm.cs b/Items/Armor/TarragonHelm.cs index dbc535cee4..e9cbc2fd1a 100644 --- a/Items/Armor/TarragonHelm.cs +++ b/Items/Armor/TarragonHelm.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(0, 50, 0, 0); item.defense = 33; //98 - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } public override bool IsArmorSet(Item head, Item body, Item legs) @@ -40,7 +40,7 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); 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 4a1250d5a6..9cd9c4da7a 100644 --- a/Items/Armor/TarragonHelmet.cs +++ b/Items/Armor/TarragonHelmet.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(0, 50, 0, 0); item.defense = 15; //98 - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } public override bool IsArmorSet(Item head, Item body, Item legs) @@ -40,7 +40,7 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.tarraSet = true; modPlayer.tarraThrowing = true; modPlayer.rogueStealthMax = 1.3f; @@ -58,8 +58,8 @@ namespace CalamityMod.Items.Armor public override void UpdateEquip(Player player) { - player.GetCalamityPlayer().throwingDamage += 0.1f; - player.GetCalamityPlayer().throwingCrit += 10; + player.Calamity().throwingDamage += 0.1f; + player.Calamity().throwingCrit += 10; player.moveSpeed += 0.12f; player.endurance += 0.05f; player.lavaMax += 240; diff --git a/Items/Armor/TarragonHornedHelm.cs b/Items/Armor/TarragonHornedHelm.cs index 20ff6a14c4..d911e06915 100644 --- a/Items/Armor/TarragonHornedHelm.cs +++ b/Items/Armor/TarragonHornedHelm.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(0, 50, 0, 0); item.defense = 3; //98 - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } public override bool IsArmorSet(Item head, Item body, Item legs) @@ -38,7 +38,7 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.tarraSet = true; modPlayer.tarraSummon = true; player.setBonus = "+1 max minion and 55% increased minion damage\n" + diff --git a/Items/Armor/TarragonLeggings.cs b/Items/Armor/TarragonLeggings.cs index 95abcacf1e..b828434338 100644 --- a/Items/Armor/TarragonLeggings.cs +++ b/Items/Armor/TarragonLeggings.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(0, 30, 0, 0); item.defense = 32; - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } public override void UpdateEquip(Player player) diff --git a/Items/Armor/TarragonMask.cs b/Items/Armor/TarragonMask.cs index 6fad1f5318..aa814236bd 100644 --- a/Items/Armor/TarragonMask.cs +++ b/Items/Armor/TarragonMask.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(0, 50, 0, 0); item.defense = 10; //98 - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } public override bool IsArmorSet(Item head, Item body, Item legs) @@ -39,7 +39,7 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); 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 baad826d3b..e1bbc4149c 100644 --- a/Items/Armor/TarragonVisage.cs +++ b/Items/Armor/TarragonVisage.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Armor item.height = 18; item.value = Item.buyPrice(0, 50, 0, 0); item.defense = 21; //98 - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } public override bool IsArmorSet(Item head, Item body, Item legs) @@ -39,7 +39,7 @@ namespace CalamityMod.Items.Armor public override void UpdateArmorSet(Player player) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.tarraSet = true; modPlayer.tarraRanged = true; player.setBonus = "Reduces enemy spawn rates\n" + diff --git a/Items/Armor/VictideBreastplate.cs b/Items/Armor/VictideBreastplate.cs index 4e323b9952..fa6437eb9f 100644 --- a/Items/Armor/VictideBreastplate.cs +++ b/Items/Armor/VictideBreastplate.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Armor player.endurance += 0.05f; player.meleeCrit += 5; player.rangedCrit += 5; - player.GetCalamityPlayer().throwingCrit += 5; + player.Calamity().throwingCrit += 5; player.magicCrit += 5; if (Collision.DrownCollision(player.position, player.width, player.height, player.gravDir)) { diff --git a/Items/Armor/VictideHeadgear.cs b/Items/Armor/VictideHeadgear.cs index 3b4bdaba19..31c0f6fcae 100644 --- a/Items/Armor/VictideHeadgear.cs +++ b/Items/Armor/VictideHeadgear.cs @@ -38,21 +38,21 @@ 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.victideSet = true; modPlayer.rogueStealthMax = 1f; modPlayer.wearingRogueArmor = true; player.ignoreWater = true; if (Collision.DrownCollision(player.position, player.width, player.height, player.gravDir)) { - player.GetCalamityPlayer().throwingDamage += 0.1f; + player.Calamity().throwingDamage += 0.1f; player.lifeRegen += 3; } } public override void UpdateEquip(Player player) { - player.GetCalamityPlayer().throwingDamage += 0.05f; + player.Calamity().throwingDamage += 0.05f; } public override void AddRecipes() diff --git a/Items/Armor/VictideHelm.cs b/Items/Armor/VictideHelm.cs index 644cd6461a..2bdf2db8ee 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); 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 422807f722..dfb67413a5 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.victideSet = true; modPlayer.urchin = true; if (player.whoAmI == Main.myPlayer) diff --git a/Items/Armor/VictideMask.cs b/Items/Armor/VictideMask.cs index cb79b40fbe..78b3cb1e86 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); 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 639942f16d..c22e4a1543 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.victideSet = true; player.ignoreWater = true; if (Collision.DrownCollision(player.position, player.width, player.height, player.gravDir)) diff --git a/Items/Armor/WulfrumArmor.cs b/Items/Armor/WulfrumArmor.cs index d620708cc1..476d797602 100644 --- a/Items/Armor/WulfrumArmor.cs +++ b/Items/Armor/WulfrumArmor.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Armor player.meleeCrit += 3; player.magicCrit += 3; player.rangedCrit += 3; - player.GetCalamityPlayer().throwingCrit += 3; + player.Calamity().throwingCrit += 3; } public override void AddRecipes() diff --git a/Items/Armor/WulfrumMask.cs b/Items/Armor/WulfrumMask.cs index 21a4d8d249..db75ff49e2 100644 --- a/Items/Armor/WulfrumMask.cs +++ b/Items/Armor/WulfrumMask.cs @@ -37,12 +37,12 @@ namespace CalamityMod.Items.Armor { player.statDefense += 5; //14 } - player.GetCalamityPlayer().wearingRogueArmor = true; + player.Calamity().wearingRogueArmor = true; } public override void UpdateEquip(Player player) { - player.GetCalamityPlayer().throwingDamage += 0.03f; + player.Calamity().throwingDamage += 0.03f; } public override void AddRecipes() diff --git a/Items/Armor/XerocCuisses.cs b/Items/Armor/XerocCuisses.cs index cfc90d157c..eb456ebb12 100644 --- a/Items/Armor/XerocCuisses.cs +++ b/Items/Armor/XerocCuisses.cs @@ -27,8 +27,8 @@ namespace CalamityMod.Items.Armor public override void UpdateEquip(Player player) { - player.GetCalamityPlayer().throwingCrit += 5; - player.GetCalamityPlayer().throwingDamage += 0.05f; + player.Calamity().throwingCrit += 5; + player.Calamity().throwingDamage += 0.05f; player.moveSpeed += 0.2f; } diff --git a/Items/Armor/XerocMask.cs b/Items/Armor/XerocMask.cs index 02e924b01d..9e848f76ab 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.xerocSet = true; modPlayer.rogueStealthMax = 1.25f; player.setBonus = "9% increased rogue damage and velocity\n" + @@ -53,15 +53,15 @@ namespace CalamityMod.Items.Armor player.AddBuff(BuffID.Wrath, 2); player.AddBuff(BuffID.Rage, 2); } - player.GetCalamityPlayer().throwingDamage += 0.09f; - player.GetCalamityPlayer().throwingVelocity += 0.09f; - player.GetCalamityPlayer().wearingRogueArmor = true; + player.Calamity().throwingDamage += 0.09f; + player.Calamity().throwingVelocity += 0.09f; + player.Calamity().wearingRogueArmor = true; } public override void UpdateEquip(Player player) { - player.GetCalamityPlayer().throwingDamage += 0.11f; - player.GetCalamityPlayer().throwingCrit += 11; + player.Calamity().throwingDamage += 0.11f; + player.Calamity().throwingCrit += 11; player.moveSpeed += 0.22f; player.lavaMax += 240; player.buffImmune[BuffID.OnFire] = true; diff --git a/Items/Armor/XerocPlateMail.cs b/Items/Armor/XerocPlateMail.cs index 0ba853ec04..f4a497afd7 100644 --- a/Items/Armor/XerocPlateMail.cs +++ b/Items/Armor/XerocPlateMail.cs @@ -30,8 +30,8 @@ namespace CalamityMod.Items.Armor { player.statLifeMax2 += 20; player.moveSpeed += 0.06f; - player.GetCalamityPlayer().throwingCrit += 7; - player.GetCalamityPlayer().throwingDamage += 0.07f; + player.Calamity().throwingCrit += 7; + player.Calamity().throwingDamage += 0.07f; } public override void AddRecipes() diff --git a/Items/BrimstoneWaifu/CharredIdol.cs b/Items/BrimstoneWaifu/CharredIdol.cs index fa392ec7df..947e523eb0 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); return modPlayer.ZoneCalamity && !NPC.AnyNPCs(mod.NPCType("BrimstoneElemental")); } diff --git a/Items/BrimstoneWaifu/RoseStone.cs b/Items/BrimstoneWaifu/RoseStone.cs index d0b8d32a50..b4cc06c94f 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.brimstoneWaifu = true; if (player.whoAmI == Main.myPlayer) { diff --git a/Items/Bumblefuck/EffulgentFeather.cs b/Items/Bumblefuck/EffulgentFeather.cs index 7a538ce05b..00a96bb8f0 100644 --- a/Items/Bumblefuck/EffulgentFeather.cs +++ b/Items/Bumblefuck/EffulgentFeather.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Bumblefuck item.maxStack = 999; item.value = Item.buyPrice(0, 6, 50, 0); item.rare = 10; - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } } } diff --git a/Items/Calamitas/CalamityRing.cs b/Items/Calamitas/CalamityRing.cs index 6801e5b120..6af8404083 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (modPlayer.calamityRing) { return false; @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Calamitas public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.calamityRing = true; player.allDamage += 0.15f; player.endurance -= 0.3f; diff --git a/Items/CalamityCustomThrowingDamage/AccretionDisk.cs b/Items/CalamityCustomThrowingDamage/AccretionDisk.cs index d0ba61590e..be82ba8906 100644 --- a/Items/CalamityCustomThrowingDamage/AccretionDisk.cs +++ b/Items/CalamityCustomThrowingDamage/AccretionDisk.cs @@ -29,8 +29,8 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.rare = 10; item.shoot = mod.ProjectileType("AccretionDisk"); item.shootSpeed = 13f; - item.GetGlobalItem(mod).rogue = true; - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().rogue = true; + item.Calamity().postMoonLordRarity = 12; } public override void AddRecipes() diff --git a/Items/CalamityCustomThrowingDamage/AdamantiteThrowingAxe.cs b/Items/CalamityCustomThrowingDamage/AdamantiteThrowingAxe.cs index 4b36a38eeb..52596d972c 100644 --- a/Items/CalamityCustomThrowingDamage/AdamantiteThrowingAxe.cs +++ b/Items/CalamityCustomThrowingDamage/AdamantiteThrowingAxe.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.rare = 4; item.shoot = mod.ProjectileType("AdamantiteThrowingAxeProjectile"); item.shootSpeed = 12f; - item.GetGlobalItem(mod).rogue = true; + item.Calamity().rogue = true; } public override void AddRecipes() diff --git a/Items/CalamityCustomThrowingDamage/BallisticPoisonBomb.cs b/Items/CalamityCustomThrowingDamage/BallisticPoisonBomb.cs index 1221c69069..d8783a00e9 100644 --- a/Items/CalamityCustomThrowingDamage/BallisticPoisonBomb.cs +++ b/Items/CalamityCustomThrowingDamage/BallisticPoisonBomb.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.rare = 7; item.shoot = mod.ProjectileType("BallisticPoisonBomb"); item.shootSpeed = 12f; - item.GetGlobalItem(mod).rogue = true; + item.Calamity().rogue = true; } public override void AddRecipes() diff --git a/Items/CalamityCustomThrowingDamage/BlastBarrel.cs b/Items/CalamityCustomThrowingDamage/BlastBarrel.cs index d3323b3745..13d4da7a28 100644 --- a/Items/CalamityCustomThrowingDamage/BlastBarrel.cs +++ b/Items/CalamityCustomThrowingDamage/BlastBarrel.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.rare = 4; item.shoot = mod.ProjectileType("BlastBarrelProjectile"); item.shootSpeed = 12f; - item.GetGlobalItem(mod).rogue = true; + item.Calamity().rogue = true; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { @@ -42,8 +42,8 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage //unitY additive is do it doesn't exploe initially int p = Projectile.NewProjectile(position - Vector2.UnitY * 12f, initialVelocity, type,damage,knockBack,player.whoAmI); - if (player.GetCalamityPlayer().StealthStrikeAvailable()) - Main.projectile[p].GetCalamityProj().stealthStrike = true; + if (player.Calamity().StealthStrikeAvailable()) + Main.projectile[p].Calamity().stealthStrike = true; return false; } } diff --git a/Items/CalamityCustomThrowingDamage/BloodsoakedCrasher.cs b/Items/CalamityCustomThrowingDamage/BloodsoakedCrasher.cs index 7dc164d93a..c22d2b6bab 100644 --- a/Items/CalamityCustomThrowingDamage/BloodsoakedCrasher.cs +++ b/Items/CalamityCustomThrowingDamage/BloodsoakedCrasher.cs @@ -30,18 +30,18 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.height = 64; item.value = Item.buyPrice(1, 40, 0, 0); item.rare = 10; - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().postMoonLordRarity = 13; item.shoot = mod.ProjectileType("BloodsoakedCrashax"); item.shootSpeed = 15f; - item.GetGlobalItem(mod).rogue = true; + item.Calamity().rogue = true; } public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { - if (player.GetCalamityPlayer().StealthStrikeAvailable()) //setting the stealth strike + if (player.Calamity().StealthStrikeAvailable()) //setting the stealth strike { int p = Projectile.NewProjectile(position, new Vector2(speedX, speedY), mod.ProjectileType("BloodsoakedCrashax"), damage, knockBack, player.whoAmI, 0f, 1f); - Main.projectile[p].GetCalamityProj().stealthStrike = true; + Main.projectile[p].Calamity().stealthStrike = true; return false; } return true; diff --git a/Items/CalamityCustomThrowingDamage/BouncingEyeball.cs b/Items/CalamityCustomThrowingDamage/BouncingEyeball.cs index d606ebd2b1..2c3cd7a4c7 100644 --- a/Items/CalamityCustomThrowingDamage/BouncingEyeball.cs +++ b/Items/CalamityCustomThrowingDamage/BouncingEyeball.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.useStyle = ItemUseStyleID.SwingThrow; item.knockBack = 3.5f; item.rare = 1; - item.GetGlobalItem(mod).rogue = true; + item.Calamity().rogue = true; item.noUseGraphic = true; item.UseSound = SoundID.Item1; item.shoot = mod.ProjectileType("BouncingEyeballProjectile"); @@ -42,11 +42,11 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage { knockBack *= 3f; } - if (player.GetCalamityPlayer().StealthStrikeAvailable()) + if (player.Calamity().StealthStrikeAvailable()) { initialVelocity *= 2f; int p = Projectile.NewProjectile(position, initialVelocity, mod.ProjectileType("BouncingEyeballProjectileStealthStrike"),damage,knockBack,player.whoAmI); - Main.projectile[p].GetCalamityProj().stealthStrike = true; + Main.projectile[p].Calamity().stealthStrike = true; } else { diff --git a/Items/CalamityCustomThrowingDamage/BrackishFlask.cs b/Items/CalamityCustomThrowingDamage/BrackishFlask.cs index 03ab930de6..20b4decf0b 100644 --- a/Items/CalamityCustomThrowingDamage/BrackishFlask.cs +++ b/Items/CalamityCustomThrowingDamage/BrackishFlask.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.rare = 7; item.shoot = mod.ProjectileType("BrackishFlask"); item.shootSpeed = 12f; - item.GetGlobalItem(mod).rogue = true; + item.Calamity().rogue = true; } public override void AddRecipes() diff --git a/Items/CalamityCustomThrowingDamage/Brimblade.cs b/Items/CalamityCustomThrowingDamage/Brimblade.cs index 130536e981..c2fe486935 100644 --- a/Items/CalamityCustomThrowingDamage/Brimblade.cs +++ b/Items/CalamityCustomThrowingDamage/Brimblade.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.rare = 6; item.shoot = mod.ProjectileType("Brimblade"); item.shootSpeed = 12f; - item.GetGlobalItem(mod).rogue = true; + item.Calamity().rogue = true; } public override void AddRecipes() diff --git a/Items/CalamityCustomThrowingDamage/CalamityDamageItem.cs b/Items/CalamityCustomThrowingDamage/CalamityDamageItem.cs index 9f59cb3f1c..83718b51de 100644 --- a/Items/CalamityCustomThrowingDamage/CalamityDamageItem.cs +++ b/Items/CalamityCustomThrowingDamage/CalamityDamageItem.cs @@ -24,13 +24,13 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage // 5E-06 to prevent downrounding is not needed anymore, added by TML itself public override void ModifyWeaponDamage(Player player, ref float add, ref float mult, ref float flat) { - add += player.GetCalamityPlayer().throwingDamage - 1f; + add += player.Calamity().throwingDamage - 1f; } // Calculates a rogue weapon's crit chance using the player's rogue crit chance. public override void GetWeaponCrit(Player player, ref int crit) { - crit = (item.crit + player.GetCalamityPlayer().throwingCrit); + crit = (item.crit + player.Calamity().throwingCrit); } // Not needed because the weapon is now internally thrown instead of ranged @@ -62,12 +62,12 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage public override bool ConsumeItem(Player player) { - if (player.GetCalamityPlayer().throwingAmmoCost50) + if (player.Calamity().throwingAmmoCost50) { if (Main.rand.Next(1, 101) > 50) return false; } - if (player.GetCalamityPlayer().throwingAmmoCost66) + if (player.Calamity().throwingAmmoCost66) { if (Main.rand.Next(1, 101) > 66) return false; diff --git a/Items/CalamityCustomThrowingDamage/CelestialReaper.cs b/Items/CalamityCustomThrowingDamage/CelestialReaper.cs index 36f9cfe918..fbd0c9cd12 100644 --- a/Items/CalamityCustomThrowingDamage/CelestialReaper.cs +++ b/Items/CalamityCustomThrowingDamage/CelestialReaper.cs @@ -39,10 +39,10 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { Vector2 velocity = new Vector2(speedX, speedY); - float strikeValue = player.GetCalamityPlayer().StealthStrikeAvailable().ToInt(); //0 if false, 1 if true + float strikeValue = player.Calamity().StealthStrikeAvailable().ToInt(); //0 if false, 1 if true int p = Projectile.NewProjectile(position, velocity, mod.ProjectileType("CelestialReaperProjectile"), damage, knockBack, player.whoAmI, strikeValue); - if (player.GetCalamityPlayer().StealthStrikeAvailable()) - Main.projectile[p].GetCalamityProj().stealthStrike = true; + if (player.Calamity().StealthStrikeAvailable()) + Main.projectile[p].Calamity().stealthStrike = true; return false; } } diff --git a/Items/CalamityCustomThrowingDamage/Celestus.cs b/Items/CalamityCustomThrowingDamage/Celestus.cs index 027435c583..b05f09e65c 100644 --- a/Items/CalamityCustomThrowingDamage/Celestus.cs +++ b/Items/CalamityCustomThrowingDamage/Celestus.cs @@ -29,8 +29,8 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.rare = 10; item.shoot = mod.ProjectileType("Celestus"); item.shootSpeed = 25f; - item.GetGlobalItem(mod).rogue = true; - item.GetGlobalItem(mod).postMoonLordRarity = 15; + item.Calamity().rogue = true; + item.Calamity().postMoonLordRarity = 15; } public override void AddRecipes() diff --git a/Items/CalamityCustomThrowingDamage/Cinquedea.cs b/Items/CalamityCustomThrowingDamage/Cinquedea.cs index 21bef889e2..4feaa4f23d 100644 --- a/Items/CalamityCustomThrowingDamage/Cinquedea.cs +++ b/Items/CalamityCustomThrowingDamage/Cinquedea.cs @@ -34,15 +34,15 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.shoot = mod.ProjectileType("CinquedeaProj"); item.shootSpeed = Speed; item.value = Item.buyPrice(0, 9, 0, 0); - item.GetGlobalItem(mod).rogue = true; + item.Calamity().rogue = true; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { - if (player.GetCalamityPlayer().StealthStrikeAvailable()) + if (player.Calamity().StealthStrikeAvailable()) { int p = Projectile.NewProjectile(position, new Vector2(speedX, speedY), mod.ProjectileType("CinquedeaProj"), damage, knockBack, player.whoAmI, 0f, 1f); - Main.projectile[p].GetCalamityProj().stealthStrike = true; + Main.projectile[p].Calamity().stealthStrike = true; return false; } return true; diff --git a/Items/CalamityCustomThrowingDamage/CobaltKunai.cs b/Items/CalamityCustomThrowingDamage/CobaltKunai.cs index 5691a62a9d..aace887e85 100644 --- a/Items/CalamityCustomThrowingDamage/CobaltKunai.cs +++ b/Items/CalamityCustomThrowingDamage/CobaltKunai.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.rare = 4; item.shoot = mod.ProjectileType("CobaltKunaiProjectile"); item.shootSpeed = 12f; - item.GetGlobalItem(mod).rogue = true; + item.Calamity().rogue = true; } public override void AddRecipes() diff --git a/Items/CalamityCustomThrowingDamage/ConsecratedWater.cs b/Items/CalamityCustomThrowingDamage/ConsecratedWater.cs index 217ebd3dca..06385bd20b 100644 --- a/Items/CalamityCustomThrowingDamage/ConsecratedWater.cs +++ b/Items/CalamityCustomThrowingDamage/ConsecratedWater.cs @@ -38,10 +38,10 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { Vector2 velocity = new Vector2(speedX, speedY); - float strikeValue = player.GetCalamityPlayer().StealthStrikeAvailable().ToInt(); //0 if false, 1 if true + float strikeValue = player.Calamity().StealthStrikeAvailable().ToInt(); //0 if false, 1 if true int p = Projectile.NewProjectile(position, velocity, mod.ProjectileType("ConsecratedWaterProjectile"), damage, knockBack, player.whoAmI, ai1:strikeValue); - if (player.GetCalamityPlayer().StealthStrikeAvailable()) - Main.projectile[p].GetCalamityProj().stealthStrike = true; + if (player.Calamity().StealthStrikeAvailable()) + Main.projectile[p].Calamity().stealthStrike = true; return false; } public override void AddRecipes() diff --git a/Items/CalamityCustomThrowingDamage/CosmicKunai.cs b/Items/CalamityCustomThrowingDamage/CosmicKunai.cs index f21b99b66c..ea4a713c94 100644 --- a/Items/CalamityCustomThrowingDamage/CosmicKunai.cs +++ b/Items/CalamityCustomThrowingDamage/CosmicKunai.cs @@ -29,8 +29,8 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.shoot = mod.ProjectileType("CosmicKunai"); item.shootSpeed = 28f; item.rare = 9; - item.GetGlobalItem(mod).rogue = true; - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().rogue = true; + item.Calamity().postMoonLordRarity = 13; } 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) diff --git a/Items/CalamityCustomThrowingDamage/CraniumSmasher.cs b/Items/CalamityCustomThrowingDamage/CraniumSmasher.cs index dbfd41ba10..67499d85ea 100644 --- a/Items/CalamityCustomThrowingDamage/CraniumSmasher.cs +++ b/Items/CalamityCustomThrowingDamage/CraniumSmasher.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.rare = 8; item.shoot = mod.ProjectileType("CraniumSmasher"); item.shootSpeed = 20f; - item.GetGlobalItem(mod).rogue = true; + item.Calamity().rogue = true; } 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) diff --git a/Items/CalamityCustomThrowingDamage/CrushsawCrasher.cs b/Items/CalamityCustomThrowingDamage/CrushsawCrasher.cs index cdc1c06cf8..25a6b0dd0a 100644 --- a/Items/CalamityCustomThrowingDamage/CrushsawCrasher.cs +++ b/Items/CalamityCustomThrowingDamage/CrushsawCrasher.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.rare = 7; item.shoot = mod.ProjectileType("Crushax"); item.shootSpeed = 11f; - item.GetGlobalItem(mod).rogue = true; + item.Calamity().rogue = true; } public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit) diff --git a/Items/CalamityCustomThrowingDamage/CrystalPiercer.cs b/Items/CalamityCustomThrowingDamage/CrystalPiercer.cs index 25d86df33e..a97371f27a 100644 --- a/Items/CalamityCustomThrowingDamage/CrystalPiercer.cs +++ b/Items/CalamityCustomThrowingDamage/CrystalPiercer.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.rare = 5; item.shoot = mod.ProjectileType("CrystalPiercerProjectile"); item.shootSpeed = 20f; - item.GetGlobalItem(mod).rogue = true; + item.Calamity().rogue = true; } public override void AddRecipes() diff --git a/Items/CalamityCustomThrowingDamage/Crystalline.cs b/Items/CalamityCustomThrowingDamage/Crystalline.cs index 33bd46e1fb..14732561bd 100644 --- a/Items/CalamityCustomThrowingDamage/Crystalline.cs +++ b/Items/CalamityCustomThrowingDamage/Crystalline.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.rare = 2; item.shoot = mod.ProjectileType("Crystalline"); item.shootSpeed = 10f; - item.GetGlobalItem(mod).rogue = true; + item.Calamity().rogue = true; } public override void AddRecipes() diff --git a/Items/CalamityCustomThrowingDamage/CursedDagger.cs b/Items/CalamityCustomThrowingDamage/CursedDagger.cs index d050fa5c04..0c3d055534 100644 --- a/Items/CalamityCustomThrowingDamage/CursedDagger.cs +++ b/Items/CalamityCustomThrowingDamage/CursedDagger.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.rare = 5; item.shoot = mod.ProjectileType("CursedDagger"); item.shootSpeed = 12f; - item.GetGlobalItem(mod).rogue = true; + item.Calamity().rogue = true; } } } diff --git a/Items/CalamityCustomThrowingDamage/DuststormInABottle.cs b/Items/CalamityCustomThrowingDamage/DuststormInABottle.cs index cbf49b0f4e..4431561fd2 100644 --- a/Items/CalamityCustomThrowingDamage/DuststormInABottle.cs +++ b/Items/CalamityCustomThrowingDamage/DuststormInABottle.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.rare = 7; item.shoot = mod.ProjectileType("DuststormInABottle"); item.shootSpeed = 12f; - item.GetGlobalItem(mod).rogue = true; + item.Calamity().rogue = true; } public override void AddRecipes() diff --git a/Items/CalamityCustomThrowingDamage/EclipsesFall.cs b/Items/CalamityCustomThrowingDamage/EclipsesFall.cs index b9f7e111a6..cf5352562d 100644 --- a/Items/CalamityCustomThrowingDamage/EclipsesFall.cs +++ b/Items/CalamityCustomThrowingDamage/EclipsesFall.cs @@ -35,18 +35,18 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.height = 72; item.value = Item.buyPrice(1, 80, 0, 0); item.rare = 10; - item.GetGlobalItem(mod).postMoonLordRarity = 14; + item.Calamity().postMoonLordRarity = 14; item.shoot = mod.ProjectileType("EclipsesFallMain"); item.shootSpeed = 15f; - item.GetGlobalItem(mod).rogue = true; + item.Calamity().rogue = true; } public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { - if (player.GetCalamityPlayer().StealthStrikeAvailable()) + if (player.Calamity().StealthStrikeAvailable()) { int p = Projectile.NewProjectile(position.X, position.Y, speedX, speedY, mod.ProjectileType("EclipsesStealth"), damage, knockBack, player.whoAmI, 0f, 0f); - Main.projectile[p].GetCalamityProj().stealthStrike = true; + Main.projectile[p].Calamity().stealthStrike = true; } else { diff --git a/Items/CalamityCustomThrowingDamage/EmpyreanKnivesThrown.cs b/Items/CalamityCustomThrowingDamage/EmpyreanKnivesThrown.cs index 43dde3910d..01cb29b2d7 100644 --- a/Items/CalamityCustomThrowingDamage/EmpyreanKnivesThrown.cs +++ b/Items/CalamityCustomThrowingDamage/EmpyreanKnivesThrown.cs @@ -31,8 +31,8 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.rare = 10; item.shoot = mod.ProjectileType("EmpyreanKnives"); item.shootSpeed = 15f; - item.GetGlobalItem(mod).rogue = true; - item.GetGlobalItem(mod).postMoonLordRarity = 14; + item.Calamity().rogue = true; + item.Calamity().postMoonLordRarity = 14; } 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) diff --git a/Items/CalamityCustomThrowingDamage/Eradicator.cs b/Items/CalamityCustomThrowingDamage/Eradicator.cs index 3b05ade02a..27cdaf5511 100644 --- a/Items/CalamityCustomThrowingDamage/Eradicator.cs +++ b/Items/CalamityCustomThrowingDamage/Eradicator.cs @@ -30,8 +30,8 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.rare = 10; item.shoot = mod.ProjectileType("EradicatorProjectile"); item.shootSpeed = 12f; - item.GetGlobalItem(mod).rogue = true; - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().rogue = true; + item.Calamity().postMoonLordRarity = 13; } public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) diff --git a/Items/CalamityCustomThrowingDamage/ExecutionersBlade.cs b/Items/CalamityCustomThrowingDamage/ExecutionersBlade.cs index 5ef7e37104..0ba30879ff 100644 --- a/Items/CalamityCustomThrowingDamage/ExecutionersBlade.cs +++ b/Items/CalamityCustomThrowingDamage/ExecutionersBlade.cs @@ -31,8 +31,8 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.rare = 10; item.shoot = mod.ProjectileType("ExecutionersBlade"); item.shootSpeed = 26f; - item.GetGlobalItem(mod).rogue = true; - item.GetGlobalItem(mod).postMoonLordRarity = 14; + item.Calamity().rogue = true; + item.Calamity().postMoonLordRarity = 14; } public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) diff --git a/Items/CalamityCustomThrowingDamage/FeatherKnife.cs b/Items/CalamityCustomThrowingDamage/FeatherKnife.cs index 2319990569..8e3440780e 100644 --- a/Items/CalamityCustomThrowingDamage/FeatherKnife.cs +++ b/Items/CalamityCustomThrowingDamage/FeatherKnife.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.rare = 3; item.shoot = mod.ProjectileType("FeatherKnifeProjectile"); item.shootSpeed = 14f; - item.GetGlobalItem(mod).rogue = true; + item.Calamity().rogue = true; } public override void AddRecipes() diff --git a/Items/CalamityCustomThrowingDamage/FlameScythe.cs b/Items/CalamityCustomThrowingDamage/FlameScythe.cs index 23e598dc29..60657dc6b0 100644 --- a/Items/CalamityCustomThrowingDamage/FlameScythe.cs +++ b/Items/CalamityCustomThrowingDamage/FlameScythe.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.rare = 8; item.shoot = mod.ProjectileType("FlameScytheProjectile"); item.shootSpeed = 16f; - item.GetGlobalItem(mod).rogue = true; + item.Calamity().rogue = true; } public override void AddRecipes() diff --git a/Items/CalamityCustomThrowingDamage/FrostyFlare.cs b/Items/CalamityCustomThrowingDamage/FrostyFlare.cs index 08a888a244..c09712950f 100644 --- a/Items/CalamityCustomThrowingDamage/FrostyFlare.cs +++ b/Items/CalamityCustomThrowingDamage/FrostyFlare.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.shootSpeed = 22f; item.maxStack = 999; item.consumable = true; - item.GetGlobalItem(mod).rogue = true; + item.Calamity().rogue = true; } } } diff --git a/Items/CalamityCustomThrowingDamage/GalaxySmasherRogue.cs b/Items/CalamityCustomThrowingDamage/GalaxySmasherRogue.cs index d4ccc5de77..f33b4fa42d 100644 --- a/Items/CalamityCustomThrowingDamage/GalaxySmasherRogue.cs +++ b/Items/CalamityCustomThrowingDamage/GalaxySmasherRogue.cs @@ -33,10 +33,10 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.UseSound = SoundID.Item1; item.rare = 10; - item.GetGlobalItem(mod).postMoonLordRarity = 14; + item.Calamity().postMoonLordRarity = 14; item.value = Item.buyPrice(1, 80, 0, 0); - item.GetGlobalItem(mod).rogue = true; + item.Calamity().rogue = true; item.shoot = mod.ProjectileType("GalaxySmasherHammer"); item.shootSpeed = Speed; } @@ -44,7 +44,7 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { int proj = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI); - Main.projectile[proj].GetGlobalProjectile(mod).forceRogue = true; + Main.projectile[proj].Calamity().forceRogue = true; return false; } diff --git a/Items/CalamityCustomThrowingDamage/GelDart.cs b/Items/CalamityCustomThrowingDamage/GelDart.cs index 1be63d07d0..b53c30a820 100644 --- a/Items/CalamityCustomThrowingDamage/GelDart.cs +++ b/Items/CalamityCustomThrowingDamage/GelDart.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.rare = 4; item.shoot = mod.ProjectileType("GelDartProjectile"); item.shootSpeed = 14f; - item.GetGlobalItem(mod).rogue = true; + item.Calamity().rogue = true; } public override void AddRecipes() diff --git a/Items/CalamityCustomThrowingDamage/GhoulishGouger.cs b/Items/CalamityCustomThrowingDamage/GhoulishGouger.cs index 369f9601f5..a20f8d4375 100644 --- a/Items/CalamityCustomThrowingDamage/GhoulishGouger.cs +++ b/Items/CalamityCustomThrowingDamage/GhoulishGouger.cs @@ -28,8 +28,8 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.rare = 10; item.shoot = mod.ProjectileType("GhoulishGouger"); item.shootSpeed = 20f; - item.GetGlobalItem(mod).rogue = true; - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().rogue = true; + item.Calamity().postMoonLordRarity = 13; } } } diff --git a/Items/CalamityCustomThrowingDamage/Glaive.cs b/Items/CalamityCustomThrowingDamage/Glaive.cs index 4194f87b34..2d26b2ff04 100644 --- a/Items/CalamityCustomThrowingDamage/Glaive.cs +++ b/Items/CalamityCustomThrowingDamage/Glaive.cs @@ -22,7 +22,7 @@ Stealth strikes are super fast and pierce infinitely"); { item.damage = BaseDamage; item.crit = 4; - item.GetGlobalItem(mod).rogue = true; + item.Calamity().rogue = true; item.noMelee = true; item.noUseGraphic = true; item.width = 1; @@ -43,7 +43,7 @@ Stealth strikes are super fast and pierce infinitely"); public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { float ai1 = 0f; - if (player.GetCalamityPlayer().StealthStrikeAvailable()) + if (player.Calamity().StealthStrikeAvailable()) { speedX *= StealthSpeedMult; speedY *= StealthSpeedMult; @@ -51,8 +51,8 @@ Stealth strikes are super fast and pierce infinitely"); } int p = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI, 0f, ai1); - if (player.GetCalamityPlayer().StealthStrikeAvailable()) - Main.projectile[p].GetCalamityProj().stealthStrike = true; + if (player.Calamity().StealthStrikeAvailable()) + Main.projectile[p].Calamity().stealthStrike = true; return false; } diff --git a/Items/CalamityCustomThrowingDamage/HeavenfallenStardisk.cs b/Items/CalamityCustomThrowingDamage/HeavenfallenStardisk.cs index e71fc21b8c..ab026fac95 100644 --- a/Items/CalamityCustomThrowingDamage/HeavenfallenStardisk.cs +++ b/Items/CalamityCustomThrowingDamage/HeavenfallenStardisk.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.rare = 7; item.shoot = mod.ProjectileType("HeavenfallenStardisk"); item.shootSpeed = 10f; - item.GetGlobalItem(mod).rogue = true; + item.Calamity().rogue = true; } 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) diff --git a/Items/CalamityCustomThrowingDamage/IceStar.cs b/Items/CalamityCustomThrowingDamage/IceStar.cs index e12da4eced..56238e0ba4 100644 --- a/Items/CalamityCustomThrowingDamage/IceStar.cs +++ b/Items/CalamityCustomThrowingDamage/IceStar.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.rare = 5; item.shoot = mod.ProjectileType("IceStarProjectile"); item.shootSpeed = 14f; - item.GetGlobalItem(mod).rogue = true; + item.Calamity().rogue = true; } public override void AddRecipes() diff --git a/Items/CalamityCustomThrowingDamage/Icebreaker.cs b/Items/CalamityCustomThrowingDamage/Icebreaker.cs index e61e1a9d7a..0c70e363d9 100644 --- a/Items/CalamityCustomThrowingDamage/Icebreaker.cs +++ b/Items/CalamityCustomThrowingDamage/Icebreaker.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.rare = 5; item.shoot = mod.ProjectileType("Icebreaker"); item.shootSpeed = 16f; - item.GetGlobalItem(mod).rogue = true; + item.Calamity().rogue = true; } public override void AddRecipes() diff --git a/Items/CalamityCustomThrowingDamage/IchorSpear.cs b/Items/CalamityCustomThrowingDamage/IchorSpear.cs index 99a98d45ab..ef0fa8ba07 100644 --- a/Items/CalamityCustomThrowingDamage/IchorSpear.cs +++ b/Items/CalamityCustomThrowingDamage/IchorSpear.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.rare = 5; item.shoot = mod.ProjectileType("IchorSpear"); item.shootSpeed = 20f; - item.GetGlobalItem(mod).rogue = true; + item.Calamity().rogue = true; } } } diff --git a/Items/CalamityCustomThrowingDamage/IronFrancisca.cs b/Items/CalamityCustomThrowingDamage/IronFrancisca.cs index 4dba7088e7..80749caa4a 100644 --- a/Items/CalamityCustomThrowingDamage/IronFrancisca.cs +++ b/Items/CalamityCustomThrowingDamage/IronFrancisca.cs @@ -37,10 +37,10 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { - if (player.GetCalamityPlayer().StealthStrikeAvailable()) + if (player.Calamity().StealthStrikeAvailable()) { int p = Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, damage, knockBack, player.whoAmI, 0f, 1f); - Main.projectile[p].GetCalamityProj().stealthStrike = true; + Main.projectile[p].Calamity().stealthStrike = true; return false; } return true; diff --git a/Items/CalamityCustomThrowingDamage/Kylie.cs b/Items/CalamityCustomThrowingDamage/Kylie.cs index de41639f7b..bf6645e76c 100644 --- a/Items/CalamityCustomThrowingDamage/Kylie.cs +++ b/Items/CalamityCustomThrowingDamage/Kylie.cs @@ -31,12 +31,12 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.shoot = mod.ProjectileType("KylieBoomerang"); item.noMelee = true; item.noUseGraphic = true; - item.GetGlobalItem(mod).rogue = true; + item.Calamity().rogue = true; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { - CalamityPlayer p = Main.player[Main.myPlayer].GetCalamityPlayer(); + CalamityPlayer p = Main.player[Main.myPlayer].Calamity(); //If stealth is full, shoot a spread of 3 boomerangs with reduced range if(p.StealthStrikeAvailable()) { @@ -45,7 +45,7 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage { Vector2 perturbedspeed = new Vector2(speedX, speedY).RotatedBy(MathHelper.ToRadians(spread)); int proj = Projectile.NewProjectile(position.X, position.Y, perturbedspeed.X, perturbedspeed.Y, mod.ProjectileType("Kylieproj"), item.damage, item.knockBack, player.whoAmI,0f,1f); - Main.projectile[proj].GetCalamityProj().stealthStrike = true; + Main.projectile[proj].Calamity().stealthStrike = true; spread -= 10; } return false; diff --git a/Items/CalamityCustomThrowingDamage/LeadTomahawk.cs b/Items/CalamityCustomThrowingDamage/LeadTomahawk.cs index 89b96a0d92..5873386bcc 100644 --- a/Items/CalamityCustomThrowingDamage/LeadTomahawk.cs +++ b/Items/CalamityCustomThrowingDamage/LeadTomahawk.cs @@ -37,10 +37,10 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { - if (player.GetCalamityPlayer().StealthStrikeAvailable()) + if (player.Calamity().StealthStrikeAvailable()) { int p = Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, damage, knockBack, player.whoAmI, 0f, 1f); - Main.projectile[p].GetCalamityProj().stealthStrike = true; + Main.projectile[p].Calamity().stealthStrike = true; return false; } return true; diff --git a/Items/CalamityCustomThrowingDamage/Lionfish.cs b/Items/CalamityCustomThrowingDamage/Lionfish.cs index e5a18e8171..c82757607a 100644 --- a/Items/CalamityCustomThrowingDamage/Lionfish.cs +++ b/Items/CalamityCustomThrowingDamage/Lionfish.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.rare = 3; item.shoot = mod.ProjectileType("Lionfish"); item.shootSpeed = 12f; - item.GetGlobalItem(mod).rogue = true; + item.Calamity().rogue = true; } } } diff --git a/Items/CalamityCustomThrowingDamage/Malachite.cs b/Items/CalamityCustomThrowingDamage/Malachite.cs index a95ab7970d..7b4ecee5f0 100644 --- a/Items/CalamityCustomThrowingDamage/Malachite.cs +++ b/Items/CalamityCustomThrowingDamage/Malachite.cs @@ -31,8 +31,8 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.rare = 8; item.shoot = mod.ProjectileType("Malachite"); item.shootSpeed = 10f; - item.GetGlobalItem(mod).rogue = true; - item.GetGlobalItem(mod).postMoonLordRarity = 17; + item.Calamity().rogue = true; + item.Calamity().postMoonLordRarity = 17; } public override bool AltFunctionUse(Player player) diff --git a/Items/CalamityCustomThrowingDamage/MangroveChakram.cs b/Items/CalamityCustomThrowingDamage/MangroveChakram.cs index 6b32bd4bb4..3584911d83 100644 --- a/Items/CalamityCustomThrowingDamage/MangroveChakram.cs +++ b/Items/CalamityCustomThrowingDamage/MangroveChakram.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.rare = 7; item.shoot = mod.ProjectileType("MangroveChakramProjectile"); item.shootSpeed = 16f; - item.GetGlobalItem(mod).rogue = true; + item.Calamity().rogue = true; } public override void AddRecipes() diff --git a/Items/CalamityCustomThrowingDamage/MeteorFist.cs b/Items/CalamityCustomThrowingDamage/MeteorFist.cs index 24e783710d..416a32cba4 100644 --- a/Items/CalamityCustomThrowingDamage/MeteorFist.cs +++ b/Items/CalamityCustomThrowingDamage/MeteorFist.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.rare = 2; item.shoot = mod.ProjectileType("MeteorFist"); item.shootSpeed = 10f; - item.GetGlobalItem(mod).rogue = true; + item.Calamity().rogue = true; } public override void AddRecipes() diff --git a/Items/CalamityCustomThrowingDamage/MoltenAmputator.cs b/Items/CalamityCustomThrowingDamage/MoltenAmputator.cs index b468bb1240..ceda6992ac 100644 --- a/Items/CalamityCustomThrowingDamage/MoltenAmputator.cs +++ b/Items/CalamityCustomThrowingDamage/MoltenAmputator.cs @@ -28,8 +28,8 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.rare = 10; item.shoot = mod.ProjectileType("MoltenAmputator"); item.shootSpeed = 12f; - item.GetGlobalItem(mod).rogue = true; - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().rogue = true; + item.Calamity().postMoonLordRarity = 12; } } } diff --git a/Items/CalamityCustomThrowingDamage/MonkeyDarts.cs b/Items/CalamityCustomThrowingDamage/MonkeyDarts.cs index 97bf32eda2..b779989618 100644 --- a/Items/CalamityCustomThrowingDamage/MonkeyDarts.cs +++ b/Items/CalamityCustomThrowingDamage/MonkeyDarts.cs @@ -1,4 +1,5 @@ -using Microsoft.Xna.Framework; +using CalamityMod.Projectiles.Rogue; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; @@ -32,20 +33,20 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.shootSpeed = 10.5f; item.shoot = mod.ProjectileType("MonkeyDart"); item.autoReuse = true; - item.GetGlobalItem(mod).rogue = true; + item.Calamity().rogue = true; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { //Checks if stealth is avalaible to shoot a spread of 3 darts - if (player.GetCalamityPlayer().StealthStrikeAvailable()) + if (player.Calamity().StealthStrikeAvailable()) { float spread = 7; for (int i = 0; i < 3; i++) { Vector2 perturbedspeed = new Vector2(speedX * 1.4f, speedY * 1.4f).RotatedBy(MathHelper.ToRadians(spread)); - int p = Projectile.NewProjectile(position.X, position.Y, perturbedspeed.X, perturbedspeed.Y, mod.ProjectileType(), item.damage, item.knockBack, player.whoAmI,1); - Main.projectile[p].GetCalamityProj().stealthStrike = true; + int p = Projectile.NewProjectile(position.X, position.Y, perturbedspeed.X, perturbedspeed.Y, ModContent.ProjectileType(), item.damage, item.knockBack, player.whoAmI,1); + Main.projectile[p].Calamity().stealthStrike = true; spread -= 7; } return false; diff --git a/Items/CalamityCustomThrowingDamage/Mycoroot.cs b/Items/CalamityCustomThrowingDamage/Mycoroot.cs index 11d3e96303..bed7ffd799 100644 --- a/Items/CalamityCustomThrowingDamage/Mycoroot.cs +++ b/Items/CalamityCustomThrowingDamage/Mycoroot.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.value = Item.buyPrice(0, 2, 0, 0); item.shoot = mod.ProjectileType("Mycoroot"); item.shootSpeed = 20f; - item.GetGlobalItem(mod).rogue = true; + item.Calamity().rogue = true; } 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) diff --git a/Items/CalamityCustomThrowingDamage/MythrilKnife.cs b/Items/CalamityCustomThrowingDamage/MythrilKnife.cs index 4e062d5542..fc545b09ac 100644 --- a/Items/CalamityCustomThrowingDamage/MythrilKnife.cs +++ b/Items/CalamityCustomThrowingDamage/MythrilKnife.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.rare = 4; item.shoot = mod.ProjectileType("MythrilKnifeProjectile"); item.shootSpeed = 12f; - item.GetGlobalItem(mod).rogue = true; + item.Calamity().rogue = true; } public override void AddRecipes() diff --git a/Items/CalamityCustomThrowingDamage/NanoblackReaperRogue.cs b/Items/CalamityCustomThrowingDamage/NanoblackReaperRogue.cs index 90a7f93ed6..dce9de3e60 100644 --- a/Items/CalamityCustomThrowingDamage/NanoblackReaperRogue.cs +++ b/Items/CalamityCustomThrowingDamage/NanoblackReaperRogue.cs @@ -34,10 +34,10 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.UseSound = SoundID.Item18; item.rare = 10; - item.GetGlobalItem(mod).postMoonLordRarity = 16; + item.Calamity().postMoonLordRarity = 16; item.value = Item.buyPrice(5, 0, 0, 0); - item.GetGlobalItem(mod).rogue = true; + item.Calamity().rogue = true; item.shoot = mod.ProjectileType("NanoblackMain"); item.shootSpeed = Speed; } @@ -45,7 +45,7 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { int proj = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI); - Main.projectile[proj].GetGlobalProjectile(mod).forceRogue = true; + Main.projectile[proj].Calamity().forceRogue = true; return false; } diff --git a/Items/CalamityCustomThrowingDamage/OrichalcumSpikedGemstone.cs b/Items/CalamityCustomThrowingDamage/OrichalcumSpikedGemstone.cs index 8e7053b2cf..e231ee6b98 100644 --- a/Items/CalamityCustomThrowingDamage/OrichalcumSpikedGemstone.cs +++ b/Items/CalamityCustomThrowingDamage/OrichalcumSpikedGemstone.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.rare = 4; item.shoot = mod.ProjectileType("OrichalcumSpikedGemstoneProjectile"); item.shootSpeed = 12f; - item.GetGlobalItem(mod).rogue = true; + item.Calamity().rogue = true; } public override void AddRecipes() diff --git a/Items/CalamityCustomThrowingDamage/PalladiumJavelin.cs b/Items/CalamityCustomThrowingDamage/PalladiumJavelin.cs index 3a4dfaab4b..3f58d821e0 100644 --- a/Items/CalamityCustomThrowingDamage/PalladiumJavelin.cs +++ b/Items/CalamityCustomThrowingDamage/PalladiumJavelin.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.rare = 4; item.shoot = mod.ProjectileType("PalladiumJavelinProjectile"); item.shootSpeed = 16f; - item.GetGlobalItem(mod).rogue = true; + item.Calamity().rogue = true; } public override void AddRecipes() diff --git a/Items/CalamityCustomThrowingDamage/Patreon/CorpusAvertor.cs b/Items/CalamityCustomThrowingDamage/Patreon/CorpusAvertor.cs index 1ea38908f0..9c48b05721 100644 --- a/Items/CalamityCustomThrowingDamage/Patreon/CorpusAvertor.cs +++ b/Items/CalamityCustomThrowingDamage/Patreon/CorpusAvertor.cs @@ -26,17 +26,17 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage.Patreon item.autoReuse = true; item.value = Item.buyPrice(0, 80, 0, 0); item.rare = 8; - item.GetGlobalItem(mod).postMoonLordRarity = 21; + item.Calamity().postMoonLordRarity = 21; item.shoot = mod.ProjectileType("CorpusAvertor"); item.shootSpeed = 5f; - item.GetGlobalItem(mod).rogue = true; + item.Calamity().rogue = true; } // Gains 20% of missing health as base damage. public override void ModifyWeaponDamage(Player player, ref float add, ref float mult, ref float flat) { int lifeAmount = player.statLifeMax2 - player.statLife; - flat += lifeAmount * 0.2f * player.GetCalamityPlayer().throwingDamage; + flat += lifeAmount * 0.2f * player.Calamity().throwingDamage; } 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) diff --git a/Items/CalamityCustomThrowingDamage/Patreon/DeepSeaDumbbell.cs b/Items/CalamityCustomThrowingDamage/Patreon/DeepSeaDumbbell.cs index 769575d67e..356d445407 100644 --- a/Items/CalamityCustomThrowingDamage/Patreon/DeepSeaDumbbell.cs +++ b/Items/CalamityCustomThrowingDamage/Patreon/DeepSeaDumbbell.cs @@ -34,8 +34,8 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage.Patreon item.rare = 10; item.shoot = mod.ProjectileType("DeepSeaDumbbell1"); item.shootSpeed = 20f; - item.GetGlobalItem(mod).rogue = true; - item.GetGlobalItem(mod).postMoonLordRarity = 21; + item.Calamity().rogue = true; + item.Calamity().postMoonLordRarity = 21; } public override bool AltFunctionUse(Player player) @@ -75,7 +75,7 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage.Patreon if (player.altFunctionUse == 2) return false; - Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, (int)((float)BaseDamage * player.GetCalamityPlayer().throwingDamage), knockBack, player.whoAmI, 0f, 0f); + Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, (int)((float)BaseDamage * player.Calamity().throwingDamage), knockBack, player.whoAmI, 0f, 0f); return false; } } diff --git a/Items/CalamityCustomThrowingDamage/Patreon/KelvinCatalyst.cs b/Items/CalamityCustomThrowingDamage/Patreon/KelvinCatalyst.cs index b7a60821eb..150fcc4f21 100644 --- a/Items/CalamityCustomThrowingDamage/Patreon/KelvinCatalyst.cs +++ b/Items/CalamityCustomThrowingDamage/Patreon/KelvinCatalyst.cs @@ -29,8 +29,8 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage.Patreon item.rare = 6; item.shoot = mod.ProjectileType("KelvinCatalyst"); item.shootSpeed = 8f; - item.GetGlobalItem(mod).rogue = true; - item.GetGlobalItem(mod).postMoonLordRarity = 21; + item.Calamity().rogue = true; + item.Calamity().postMoonLordRarity = 21; } 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) diff --git a/Items/CalamityCustomThrowingDamage/Patreon/Plaguenade.cs b/Items/CalamityCustomThrowingDamage/Patreon/Plaguenade.cs index bb6aa481c9..69031fc4f4 100644 --- a/Items/CalamityCustomThrowingDamage/Patreon/Plaguenade.cs +++ b/Items/CalamityCustomThrowingDamage/Patreon/Plaguenade.cs @@ -31,8 +31,8 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage.Patreon item.rare = 8; item.shoot = mod.ProjectileType("Plaguenade"); item.shootSpeed = 12f; - item.GetGlobalItem(mod).rogue = true; - item.GetGlobalItem(mod).postMoonLordRarity = 21; + item.Calamity().rogue = true; + item.Calamity().postMoonLordRarity = 21; } public override void AddRecipes() diff --git a/Items/CalamityCustomThrowingDamage/Patreon/TimeBolt.cs b/Items/CalamityCustomThrowingDamage/Patreon/TimeBolt.cs index 39f28248f8..bcc67e58a6 100644 --- a/Items/CalamityCustomThrowingDamage/Patreon/TimeBolt.cs +++ b/Items/CalamityCustomThrowingDamage/Patreon/TimeBolt.cs @@ -27,10 +27,10 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage.Patreon item.autoReuse = true; item.value = Item.buyPrice(1, 40, 0, 0); item.rare = 10; - item.GetGlobalItem(mod).postMoonLordRarity = 21; + item.Calamity().postMoonLordRarity = 21; item.shoot = mod.ProjectileType("TimeBolt"); item.shootSpeed = 16f; - item.GetGlobalItem(mod).rogue = true; + item.Calamity().rogue = true; } 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) diff --git a/Items/CalamityCustomThrowingDamage/Prismalline.cs b/Items/CalamityCustomThrowingDamage/Prismalline.cs index c2c449aaa6..4f2d254282 100644 --- a/Items/CalamityCustomThrowingDamage/Prismalline.cs +++ b/Items/CalamityCustomThrowingDamage/Prismalline.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.rare = 5; item.shoot = mod.ProjectileType("Prismalline"); item.shootSpeed = 16f; - item.GetGlobalItem(mod).rogue = true; + item.Calamity().rogue = true; } public override void AddRecipes() diff --git a/Items/CalamityCustomThrowingDamage/ProfanedTrident.cs b/Items/CalamityCustomThrowingDamage/ProfanedTrident.cs index c16189ddf9..4f457a28cb 100644 --- a/Items/CalamityCustomThrowingDamage/ProfanedTrident.cs +++ b/Items/CalamityCustomThrowingDamage/ProfanedTrident.cs @@ -28,8 +28,8 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.rare = 10; item.shoot = mod.ProjectileType("ProfanedTrident"); item.shootSpeed = 28f; - item.GetGlobalItem(mod).rogue = true; - item.GetGlobalItem(mod).postMoonLordRarity = 14; + item.Calamity().rogue = true; + item.Calamity().postMoonLordRarity = 14; } } } diff --git a/Items/CalamityCustomThrowingDamage/Pwnagehammer.cs b/Items/CalamityCustomThrowingDamage/Pwnagehammer.cs index 68555e1d29..c5f843f4d5 100644 --- a/Items/CalamityCustomThrowingDamage/Pwnagehammer.cs +++ b/Items/CalamityCustomThrowingDamage/Pwnagehammer.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.rare = 6; item.shoot = mod.ProjectileType("Pwnagehammer"); item.shootSpeed = 12f; - item.GetGlobalItem(mod).rogue = true; + item.Calamity().rogue = true; } public override void AddRecipes() diff --git a/Items/CalamityCustomThrowingDamage/RadiantStar.cs b/Items/CalamityCustomThrowingDamage/RadiantStar.cs index 5de4217bee..b3683133f9 100644 --- a/Items/CalamityCustomThrowingDamage/RadiantStar.cs +++ b/Items/CalamityCustomThrowingDamage/RadiantStar.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.rare = 9; item.shoot = mod.ProjectileType("RadiantStar"); item.shootSpeed = 20f; - item.GetGlobalItem(mod).rogue = true; + item.Calamity().rogue = true; } public override void AddRecipes() diff --git a/Items/CalamityCustomThrowingDamage/RareVariants/DuneHopper.cs b/Items/CalamityCustomThrowingDamage/RareVariants/DuneHopper.cs index 4124bb3250..40f6d5bd62 100644 --- a/Items/CalamityCustomThrowingDamage/RareVariants/DuneHopper.cs +++ b/Items/CalamityCustomThrowingDamage/RareVariants/DuneHopper.cs @@ -28,8 +28,8 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage.RareVariants item.rare = 2; item.shoot = mod.ProjectileType("ScourgeoftheDesert2"); item.shootSpeed = 12f; - item.GetGlobalItem(mod).rogue = true; - item.GetGlobalItem(mod).postMoonLordRarity = 22; + item.Calamity().rogue = true; + item.Calamity().postMoonLordRarity = 22; } } } diff --git a/Items/CalamityCustomThrowingDamage/RareVariants/Quasar.cs b/Items/CalamityCustomThrowingDamage/RareVariants/Quasar.cs index ce05c7ff49..fb6635393a 100644 --- a/Items/CalamityCustomThrowingDamage/RareVariants/Quasar.cs +++ b/Items/CalamityCustomThrowingDamage/RareVariants/Quasar.cs @@ -29,8 +29,8 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage.RareVariants item.rare = 9; item.shoot = mod.ProjectileType("Quasar"); item.shootSpeed = 20f; - item.GetGlobalItem(mod).rogue = true; - item.GetGlobalItem(mod).postMoonLordRarity = 22; + item.Calamity().rogue = true; + item.Calamity().postMoonLordRarity = 22; } 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) diff --git a/Items/CalamityCustomThrowingDamage/RareVariants/SpearofDestiny.cs b/Items/CalamityCustomThrowingDamage/RareVariants/SpearofDestiny.cs index 8012843281..9e32cad648 100644 --- a/Items/CalamityCustomThrowingDamage/RareVariants/SpearofDestiny.cs +++ b/Items/CalamityCustomThrowingDamage/RareVariants/SpearofDestiny.cs @@ -29,8 +29,8 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage.RareVariants item.rare = 5; item.shoot = mod.ProjectileType("IchorSpear"); item.shootSpeed = 20f; - item.GetGlobalItem(mod).rogue = true; - item.GetGlobalItem(mod).postMoonLordRarity = 22; + item.Calamity().rogue = true; + item.Calamity().postMoonLordRarity = 22; } 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) diff --git a/Items/CalamityCustomThrowingDamage/RareVariants/TheReaper.cs b/Items/CalamityCustomThrowingDamage/RareVariants/TheReaper.cs index adc4f831c6..09b3bddb07 100644 --- a/Items/CalamityCustomThrowingDamage/RareVariants/TheReaper.cs +++ b/Items/CalamityCustomThrowingDamage/RareVariants/TheReaper.cs @@ -28,8 +28,8 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage.RareVariants item.rare = 10; item.shoot = mod.ProjectileType("Valediction2"); item.shootSpeed = 20f; - item.GetGlobalItem(mod).rogue = true; - item.GetGlobalItem(mod).postMoonLordRarity = 22; + item.Calamity().rogue = true; + item.Calamity().postMoonLordRarity = 22; } } } diff --git a/Items/CalamityCustomThrowingDamage/RotBall.cs b/Items/CalamityCustomThrowingDamage/RotBall.cs index b6aeaeef72..0d53e27d07 100644 --- a/Items/CalamityCustomThrowingDamage/RotBall.cs +++ b/Items/CalamityCustomThrowingDamage/RotBall.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.rare = 3; item.shoot = mod.ProjectileType("RotBallProjectile"); item.shootSpeed = 16f; - item.GetGlobalItem(mod).rogue = true; + item.Calamity().rogue = true; } public override void AddRecipes() diff --git a/Items/CalamityCustomThrowingDamage/RoyalKnives.cs b/Items/CalamityCustomThrowingDamage/RoyalKnives.cs index 430cb1042a..41f1db996c 100644 --- a/Items/CalamityCustomThrowingDamage/RoyalKnives.cs +++ b/Items/CalamityCustomThrowingDamage/RoyalKnives.cs @@ -31,8 +31,8 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.rare = 10; item.shoot = mod.ProjectileType("RoyalKnife"); item.shootSpeed = 9f; - item.GetGlobalItem(mod).rogue = true; - item.GetGlobalItem(mod).postMoonLordRarity = 16; + item.Calamity().rogue = true; + item.Calamity().postMoonLordRarity = 16; } 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) diff --git a/Items/CalamityCustomThrowingDamage/SandDollar.cs b/Items/CalamityCustomThrowingDamage/SandDollar.cs index 061676a8b5..999c701db4 100644 --- a/Items/CalamityCustomThrowingDamage/SandDollar.cs +++ b/Items/CalamityCustomThrowingDamage/SandDollar.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.rare = 2; item.shoot = mod.ProjectileType("SandDollarProj"); item.shootSpeed = 14f; - item.GetGlobalItem(mod).rogue = true; + item.Calamity().rogue = true; } public override bool CanUseItem(Player player) diff --git a/Items/CalamityCustomThrowingDamage/ScarletDevil.cs b/Items/CalamityCustomThrowingDamage/ScarletDevil.cs index afba28fb57..91255163c2 100644 --- a/Items/CalamityCustomThrowingDamage/ScarletDevil.cs +++ b/Items/CalamityCustomThrowingDamage/ScarletDevil.cs @@ -33,8 +33,8 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.rare = 8; item.shoot = mod.ProjectileType("ScarletDevilProjectile"); item.shootSpeed = 30f; - item.GetGlobalItem(mod).rogue = true; - item.GetGlobalItem(mod).postMoonLordRarity = 16; + item.Calamity().rogue = true; + item.Calamity().postMoonLordRarity = 16; } public override void AddRecipes() diff --git a/Items/CalamityCustomThrowingDamage/ScourgeoftheCosmosThrown.cs b/Items/CalamityCustomThrowingDamage/ScourgeoftheCosmosThrown.cs index fbe4a35316..6b689bf8c3 100644 --- a/Items/CalamityCustomThrowingDamage/ScourgeoftheCosmosThrown.cs +++ b/Items/CalamityCustomThrowingDamage/ScourgeoftheCosmosThrown.cs @@ -29,8 +29,8 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.rare = 10; item.shoot = mod.ProjectileType("ScourgeoftheCosmos"); item.shootSpeed = 15f; - item.GetGlobalItem(mod).rogue = true; - item.GetGlobalItem(mod).postMoonLordRarity = 14; + item.Calamity().rogue = true; + item.Calamity().postMoonLordRarity = 14; } 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) diff --git a/Items/CalamityCustomThrowingDamage/ScourgeoftheDesert.cs b/Items/CalamityCustomThrowingDamage/ScourgeoftheDesert.cs index 1576909b0a..9af9d4637d 100644 --- a/Items/CalamityCustomThrowingDamage/ScourgeoftheDesert.cs +++ b/Items/CalamityCustomThrowingDamage/ScourgeoftheDesert.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.rare = 2; item.shoot = mod.ProjectileType("ScourgeoftheDesert"); item.shootSpeed = 12f; - item.GetGlobalItem(mod).rogue = true; + item.Calamity().rogue = true; } } } diff --git a/Items/CalamityCustomThrowingDamage/ScourgeoftheSeas.cs b/Items/CalamityCustomThrowingDamage/ScourgeoftheSeas.cs index cd4e448294..271d45f478 100644 --- a/Items/CalamityCustomThrowingDamage/ScourgeoftheSeas.cs +++ b/Items/CalamityCustomThrowingDamage/ScourgeoftheSeas.cs @@ -37,15 +37,15 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.rare = 5; item.shoot = mod.ProjectileType("ScourgeoftheSeasProjectile"); item.shootSpeed = 8f; - item.GetGlobalItem(mod).rogue = true; + item.Calamity().rogue = true; } public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { - if (player.GetCalamityPlayer().StealthStrikeAvailable()) + if (player.Calamity().StealthStrikeAvailable()) { int p = Projectile.NewProjectile(position.X, position.Y, speedX, speedY, mod.ProjectileType("ScourgeoftheSeasStealth"), damage, knockBack, player.whoAmI, 0f, 0f); - Main.projectile[p].GetCalamityProj().stealthStrike = true; + Main.projectile[p].Calamity().stealthStrike = true; } else { diff --git a/Items/CalamityCustomThrowingDamage/SeafoamBomb.cs b/Items/CalamityCustomThrowingDamage/SeafoamBomb.cs index e5588a1467..bf97dd57fb 100644 --- a/Items/CalamityCustomThrowingDamage/SeafoamBomb.cs +++ b/Items/CalamityCustomThrowingDamage/SeafoamBomb.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.rare = 2; item.shoot = mod.ProjectileType("SeafoamBomb"); item.shootSpeed = 8f; - item.GetGlobalItem(mod).rogue = true; + item.Calamity().rogue = true; } public override void AddRecipes() diff --git a/Items/CalamityCustomThrowingDamage/SeashellBoomerang.cs b/Items/CalamityCustomThrowingDamage/SeashellBoomerang.cs index c7df3b84a7..dd9bc14356 100644 --- a/Items/CalamityCustomThrowingDamage/SeashellBoomerang.cs +++ b/Items/CalamityCustomThrowingDamage/SeashellBoomerang.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.rare = 2; item.shoot = mod.ProjectileType("SeashellBoomerangProjectile"); item.shootSpeed = 11.5f; - item.GetGlobalItem(mod).rogue = true; + item.Calamity().rogue = true; } public override void AddRecipes() diff --git a/Items/CalamityCustomThrowingDamage/ShatteredSun.cs b/Items/CalamityCustomThrowingDamage/ShatteredSun.cs index 928926710b..9bdf917983 100644 --- a/Items/CalamityCustomThrowingDamage/ShatteredSun.cs +++ b/Items/CalamityCustomThrowingDamage/ShatteredSun.cs @@ -30,8 +30,8 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.rare = 10; item.shoot = mod.ProjectileType("ShatteredSun"); item.shootSpeed = 25f; - item.GetGlobalItem(mod).rogue = true; - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().rogue = true; + item.Calamity().postMoonLordRarity = 12; } public override void AddRecipes() diff --git a/Items/CalamityCustomThrowingDamage/SnapClam.cs b/Items/CalamityCustomThrowingDamage/SnapClam.cs index 1edd5e5f6f..f9d401e8c3 100644 --- a/Items/CalamityCustomThrowingDamage/SnapClam.cs +++ b/Items/CalamityCustomThrowingDamage/SnapClam.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.rare = 2; item.shoot = mod.ProjectileType("SnapClamProj"); item.shootSpeed = 12f; - item.GetGlobalItem(mod).rogue = true; + item.Calamity().rogue = true; } } } diff --git a/Items/CalamityCustomThrowingDamage/SpearofPaleolith.cs b/Items/CalamityCustomThrowingDamage/SpearofPaleolith.cs index dad1e7e6f5..d16e4aec66 100644 --- a/Items/CalamityCustomThrowingDamage/SpearofPaleolith.cs +++ b/Items/CalamityCustomThrowingDamage/SpearofPaleolith.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.rare = 5; item.shoot = mod.ProjectileType("SpearofPaleolith"); item.shootSpeed = 35f; - item.GetGlobalItem(mod).rogue = true; + item.Calamity().rogue = true; } public override void AddRecipes() diff --git a/Items/CalamityCustomThrowingDamage/StellarContemptRogue.cs b/Items/CalamityCustomThrowingDamage/StellarContemptRogue.cs index dd1e7bb5e3..96d1a03606 100644 --- a/Items/CalamityCustomThrowingDamage/StellarContemptRogue.cs +++ b/Items/CalamityCustomThrowingDamage/StellarContemptRogue.cs @@ -33,10 +33,10 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.UseSound = SoundID.Item1; item.rare = 10; - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; item.value = Item.buyPrice(1, 20, 0, 0); - item.GetGlobalItem(mod).rogue = true; + item.Calamity().rogue = true; item.shoot = mod.ProjectileType("StellarContemptHammer"); item.shootSpeed = Speed; } @@ -44,7 +44,7 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { int proj = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI); - Main.projectile[proj].GetGlobalProjectile(mod).forceRogue = true; + Main.projectile[proj].Calamity().forceRogue = true; return false; } diff --git a/Items/CalamityCustomThrowingDamage/StellarKnife.cs b/Items/CalamityCustomThrowingDamage/StellarKnife.cs index 1103c138a0..1a5cb094fb 100644 --- a/Items/CalamityCustomThrowingDamage/StellarKnife.cs +++ b/Items/CalamityCustomThrowingDamage/StellarKnife.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.rare = 7; item.shoot = mod.ProjectileType("StellarKnife"); item.shootSpeed = 10f; - item.GetGlobalItem(mod).rogue = true; + item.Calamity().rogue = true; } } } diff --git a/Items/CalamityCustomThrowingDamage/StormfrontRazor.cs b/Items/CalamityCustomThrowingDamage/StormfrontRazor.cs index ad414c9556..a1e084673f 100644 --- a/Items/CalamityCustomThrowingDamage/StormfrontRazor.cs +++ b/Items/CalamityCustomThrowingDamage/StormfrontRazor.cs @@ -39,7 +39,7 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.knockBack = 7f; item.shoot = mod.ProjectileType("Stormfrontproj"); item.shootSpeed = 7f; - item.GetGlobalItem(mod).rogue = true; + item.Calamity().rogue = true; } public override void AddRecipes() @@ -55,10 +55,10 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { - if (player.GetCalamityPlayer().StealthStrikeAvailable()) + if (player.Calamity().StealthStrikeAvailable()) { int p = Projectile.NewProjectile(position, new Vector2(speedX * 1.6f, speedY * 1.6f), mod.ProjectileType("Stormfrontproj"), damage, knockBack, player.whoAmI, 0, 40f); - Main.projectile[p].GetCalamityProj().stealthStrike = true; + Main.projectile[p].Calamity().stealthStrike = true; return false; } else diff --git a/Items/CalamityCustomThrowingDamage/TarragonThrowingDart.cs b/Items/CalamityCustomThrowingDamage/TarragonThrowingDart.cs index 1ef29bf34a..66035dbddb 100644 --- a/Items/CalamityCustomThrowingDamage/TarragonThrowingDart.cs +++ b/Items/CalamityCustomThrowingDamage/TarragonThrowingDart.cs @@ -28,8 +28,8 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.value = 25000; item.shoot = mod.ProjectileType("TarragonThrowingDartProjectile"); item.shootSpeed = 24f; - item.GetGlobalItem(mod).rogue = true; - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().rogue = true; + item.Calamity().postMoonLordRarity = 12; } public override void AddRecipes() diff --git a/Items/CalamityCustomThrowingDamage/ThrowingBrick.cs b/Items/CalamityCustomThrowingDamage/ThrowingBrick.cs index 581c28c5ad..b5b8e6d713 100644 --- a/Items/CalamityCustomThrowingDamage/ThrowingBrick.cs +++ b/Items/CalamityCustomThrowingDamage/ThrowingBrick.cs @@ -32,15 +32,15 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.consumable = true; item.noMelee = true; item.noUseGraphic = true; - item.GetGlobalItem(mod).rogue = true; + item.Calamity().rogue = true; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { //Check if stealth is full - if (player.GetCalamityPlayer().StealthStrikeAvailable()) + if (player.Calamity().StealthStrikeAvailable()) { int p = Projectile.NewProjectile(position.X, position.Y, speedX, speedY, mod.ProjectileType("Brick"), item.damage, item.knockBack, player.whoAmI, 1); - Main.projectile[p].GetCalamityProj().stealthStrike = true; + Main.projectile[p].Calamity().stealthStrike = true; return false; } return true; diff --git a/Items/CalamityCustomThrowingDamage/TitaniumShuriken.cs b/Items/CalamityCustomThrowingDamage/TitaniumShuriken.cs index fbba67fbaa..3377cfd958 100644 --- a/Items/CalamityCustomThrowingDamage/TitaniumShuriken.cs +++ b/Items/CalamityCustomThrowingDamage/TitaniumShuriken.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.rare = 4; item.shoot = mod.ProjectileType("TitaniumShurikenProjectile"); item.shootSpeed = 16f; - item.GetGlobalItem(mod).rogue = true; + item.Calamity().rogue = true; } public override void AddRecipes() diff --git a/Items/CalamityCustomThrowingDamage/ToothBall.cs b/Items/CalamityCustomThrowingDamage/ToothBall.cs index 035243eb11..c930d7e6a3 100644 --- a/Items/CalamityCustomThrowingDamage/ToothBall.cs +++ b/Items/CalamityCustomThrowingDamage/ToothBall.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.rare = 3; item.shoot = mod.ProjectileType("ToothBallProjectile"); item.shootSpeed = 16f; - item.GetGlobalItem(mod).rogue = true; + item.Calamity().rogue = true; } public override void AddRecipes() diff --git a/Items/CalamityCustomThrowingDamage/TriactisTruePaladinianMageHammerofMight.cs b/Items/CalamityCustomThrowingDamage/TriactisTruePaladinianMageHammerofMight.cs index c12c2b6ae2..bea55ad1bd 100644 --- a/Items/CalamityCustomThrowingDamage/TriactisTruePaladinianMageHammerofMight.cs +++ b/Items/CalamityCustomThrowingDamage/TriactisTruePaladinianMageHammerofMight.cs @@ -29,8 +29,8 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.rare = 10; item.shoot = mod.ProjectileType("TriactisOPHammer"); item.shootSpeed = 25f; - item.GetGlobalItem(mod).rogue = true; - item.GetGlobalItem(mod).postMoonLordRarity = 16; + item.Calamity().rogue = true; + item.Calamity().postMoonLordRarity = 16; } public override void AddRecipes() diff --git a/Items/CalamityCustomThrowingDamage/TruePaladinsHammer.cs b/Items/CalamityCustomThrowingDamage/TruePaladinsHammer.cs index ed5848624b..b8c6688827 100644 --- a/Items/CalamityCustomThrowingDamage/TruePaladinsHammer.cs +++ b/Items/CalamityCustomThrowingDamage/TruePaladinsHammer.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.rare = 8; item.shoot = mod.ProjectileType("OPHammer"); item.shootSpeed = 14f; - item.GetGlobalItem(mod).rogue = true; + item.Calamity().rogue = true; } public override void AddRecipes() diff --git a/Items/CalamityCustomThrowingDamage/UrchinStinger.cs b/Items/CalamityCustomThrowingDamage/UrchinStinger.cs index d20b1fa20c..a18d86f963 100644 --- a/Items/CalamityCustomThrowingDamage/UrchinStinger.cs +++ b/Items/CalamityCustomThrowingDamage/UrchinStinger.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.rare = 1; item.shoot = mod.ProjectileType("UrchinStinger"); item.shootSpeed = 12f; - item.GetGlobalItem(mod).rogue = true; + item.Calamity().rogue = true; } } } diff --git a/Items/CalamityCustomThrowingDamage/UtensilPoker.cs b/Items/CalamityCustomThrowingDamage/UtensilPoker.cs index 9d9c5b0ea5..bb2bf57843 100644 --- a/Items/CalamityCustomThrowingDamage/UtensilPoker.cs +++ b/Items/CalamityCustomThrowingDamage/UtensilPoker.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.width = 44; item.height = 66; item.damage = 750; - item.GetGlobalItem(mod).rogue = true; + item.Calamity().rogue = true; item.knockBack = 8f; item.noMelee = true; item.noUseGraphic = true; @@ -32,17 +32,17 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.autoReuse = true; item.value = Item.buyPrice(1, 20, 0, 0); item.rare = 10; - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; item.shoot = mod.ProjectileType("Fork"); item.shootSpeed = 16f; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { - if (player.GetCalamityPlayer().StealthStrikeAvailable()) + if (player.Calamity().StealthStrikeAvailable()) { int p = Projectile.NewProjectile(position.X, position.Y, (int) ((double)speedX * 1.2), (int) ((double)speedY * 1.2), mod.ProjectileType("ButcherKnife"), (int) ((double)damage * 3), knockBack, Main.myPlayer); - Main.projectile[p].GetCalamityProj().stealthStrike = true; + Main.projectile[p].Calamity().stealthStrike = true; if (Main.rand.NextBool(3)) { Projectile.NewProjectile(position.X, position.Y, speedX, speedY, mod.ProjectileType("Fork"), (int) ((double)damage * 1.1), knockBack * 2f, Main.myPlayer); diff --git a/Items/CalamityCustomThrowingDamage/Valediction.cs b/Items/CalamityCustomThrowingDamage/Valediction.cs index d18964c91e..d6663734c8 100644 --- a/Items/CalamityCustomThrowingDamage/Valediction.cs +++ b/Items/CalamityCustomThrowingDamage/Valediction.cs @@ -28,8 +28,8 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.rare = 10; item.shoot = mod.ProjectileType("Valediction"); item.shootSpeed = 20f; - item.GetGlobalItem(mod).rogue = true; - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().rogue = true; + item.Calamity().postMoonLordRarity = 13; } } } diff --git a/Items/CalamityCustomThrowingDamage/WulfrumKnife.cs b/Items/CalamityCustomThrowingDamage/WulfrumKnife.cs index 7433af2540..06f7a7444d 100644 --- a/Items/CalamityCustomThrowingDamage/WulfrumKnife.cs +++ b/Items/CalamityCustomThrowingDamage/WulfrumKnife.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.rare = 1; item.shoot = mod.ProjectileType("WulfrumKnife"); item.shootSpeed = 12f; - item.GetGlobalItem(mod).rogue = true; + item.Calamity().rogue = true; } public override void AddRecipes() diff --git a/Items/CalamityCustomThrowingDamage/XerocPitchfork.cs b/Items/CalamityCustomThrowingDamage/XerocPitchfork.cs index 1975969af4..c2fba3005f 100644 --- a/Items/CalamityCustomThrowingDamage/XerocPitchfork.cs +++ b/Items/CalamityCustomThrowingDamage/XerocPitchfork.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage item.rare = 9; item.shoot = mod.ProjectileType("XerocPitchforkProjectile"); item.shootSpeed = 16f; - item.GetGlobalItem(mod).rogue = true; + item.Calamity().rogue = true; } public override void AddRecipes() diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index 844b90fab5..64869b54ac 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -117,10 +117,10 @@ namespace CalamityMod.Items { if (rogue) { - speedX *= player.GetCalamityPlayer().throwingVelocity; - speedY *= player.GetCalamityPlayer().throwingVelocity; + speedX *= player.Calamity().throwingVelocity; + speedY *= player.Calamity().throwingVelocity; } - if (player.GetCalamityPlayer().luxorsGift) + if (player.Calamity().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.GetCalamityPlayer().eArtifact && item.ranged && !rogue) + if (player.Calamity().eArtifact && item.ranged && !rogue) { speedX *= 1.25f; speedY *= 1.25f; } - if (player.GetCalamityPlayer().bloodflareMage) //0 - 99 + if (player.Calamity().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.GetCalamityPlayer().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.Calamity().auricSet ? 4.2 : 2.6)), 1f, player.whoAmI, 0f, 0f); } } } - if (player.GetCalamityPlayer().bloodflareRanged) //0 - 99 + if (player.Calamity().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.GetCalamityPlayer().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.Calamity().auricSet ? 2.2 : 1.6)), 2f, player.whoAmI, 0f, 0f); } } } - if (player.GetCalamityPlayer().tarraMage) + if (player.Calamity().tarraMage) { - if (player.GetCalamityPlayer().tarraCrits >= 5 && player.whoAmI == Main.myPlayer) + if (player.Calamity().tarraCrits >= 5 && player.whoAmI == Main.myPlayer) { - player.GetCalamityPlayer().tarraCrits = 0; + player.Calamity().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.GetCalamityPlayer().ataxiaBolt) + if (player.Calamity().ataxiaBolt) { if (item.ranged && !rogue && Main.rand.NextBool(2)) { @@ -201,17 +201,17 @@ namespace CalamityMod.Items } } } - if (player.GetCalamityPlayer().godSlayerRanged) //0 - 99 + if (player.Calamity().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.GetCalamityPlayer().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.Calamity().auricSet ? 3.2 : 2.1)), 2f, player.whoAmI, 0f, 0f); } } } - if (player.GetCalamityPlayer().ataxiaVolley) + if (player.Calamity().ataxiaVolley) { if (rogue && Main.rand.NextBool(10)) { @@ -233,7 +233,7 @@ namespace CalamityMod.Items } } } - if (player.GetCalamityPlayer().reaverDoubleTap) //0 - 99 + if (player.Calamity().reaverDoubleTap) //0 - 99 { if (item.ranged && !rogue && Main.rand.Next(0, 100) >= 90) { @@ -243,7 +243,7 @@ namespace CalamityMod.Items } } } - if (player.GetCalamityPlayer().victideSet) + if (player.Calamity().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.GetCalamityPlayer().photosynthesis; + bool boostedHeart = player.Calamity().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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (item.type == ItemID.MonkStaffT1) { for (int i = 0; i < 1000; ++i) @@ -1812,11 +1812,11 @@ namespace CalamityMod.Items player.pickSpeed -= 0.4f; else if (set == "Gladiator") { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.rogueStealthMax = 1f; modPlayer.wearingRogueArmor = true; - player.GetCalamityPlayer().throwingDamage += 0.1f; - player.GetCalamityPlayer().throwingVelocity += 0.1f; + player.Calamity().throwingDamage += 0.1f; + player.Calamity().throwingVelocity += 0.1f; player.statDefense += 5; player.setBonus = "+5 defense\n" + "10% increased rogue damage and velocity\n" + @@ -1826,11 +1826,11 @@ namespace CalamityMod.Items } else if (set == "Obsidian") { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.rogueStealthMax = 1f; modPlayer.wearingRogueArmor = true; - player.GetCalamityPlayer().throwingDamage += 0.05f; - player.GetCalamityPlayer().throwingCrit += 5; + player.Calamity().throwingDamage += 0.05f; + player.Calamity().throwingCrit += 5; player.statDefense += 2; player.fireWalk = true; player.lavaMax += 180; @@ -1857,7 +1857,7 @@ namespace CalamityMod.Items if (item.type == ItemID.SpectreHood) player.magicDamage += 0.2f; else if (item.type == ItemID.GladiatorHelmet || item.type == ItemID.ObsidianHelm) - player.GetCalamityPlayer().throwingDamage += 0.05f; + player.Calamity().throwingDamage += 0.05f; else if (item.type == ItemID.ApprenticeHat) player.minionDamage += 0.3f; else if (item.type == ItemID.SquireGreatHelm) @@ -1898,21 +1898,21 @@ namespace CalamityMod.Items #region Body if (item.type == ItemID.GladiatorBreastplate || item.type == ItemID.ObsidianShirt) - player.GetCalamityPlayer().throwingCrit += 5; + player.Calamity().throwingCrit += 5; else if (item.type == ItemID.PalladiumBreastplate) - player.GetCalamityPlayer().throwingCrit += 2; + player.Calamity().throwingCrit += 2; else if (item.type == ItemID.CobaltBreastplate) - player.GetCalamityPlayer().throwingCrit += 3; + player.Calamity().throwingCrit += 3; else if (item.type == ItemID.OrichalcumBreastplate) - player.GetCalamityPlayer().throwingCrit += 6; + player.Calamity().throwingCrit += 6; else if (item.type == ItemID.TitaniumBreastplate) - player.GetCalamityPlayer().throwingCrit += 3; + player.Calamity().throwingCrit += 3; else if (item.type == ItemID.HallowedPlateMail) - player.GetCalamityPlayer().throwingCrit += 7; + player.Calamity().throwingCrit += 7; else if (item.type == ItemID.ChlorophytePlateMail) - player.GetCalamityPlayer().throwingCrit += 7; + player.Calamity().throwingCrit += 7; else if (item.type == ItemID.Gi) - player.GetCalamityPlayer().throwingCrit += 5; + player.Calamity().throwingCrit += 5; else if (item.type == ItemID.ApprenticeRobe) player.minionDamage -= 0.2f; else if (item.type == ItemID.SquirePlating) @@ -1942,17 +1942,17 @@ namespace CalamityMod.Items #region Legs if (item.type == ItemID.GladiatorLeggings || item.type == ItemID.ObsidianPants) - player.GetCalamityPlayer().throwingVelocity += 0.05f; + player.Calamity().throwingVelocity += 0.05f; else if (item.type == ItemID.PalladiumLeggings) - player.GetCalamityPlayer().throwingCrit += 1; + player.Calamity().throwingCrit += 1; else if (item.type == ItemID.MythrilGreaves) - player.GetCalamityPlayer().throwingCrit += 3; + player.Calamity().throwingCrit += 3; else if (item.type == ItemID.AdamantiteLeggings) - player.GetCalamityPlayer().throwingCrit += 4; + player.Calamity().throwingCrit += 4; else if (item.type == ItemID.TitaniumLeggings) - player.GetCalamityPlayer().throwingCrit += 3; + player.Calamity().throwingCrit += 3; else if (item.type == ItemID.ChlorophyteGreaves) - player.GetCalamityPlayer().throwingCrit += 8; + player.Calamity().throwingCrit += 8; else if (item.type == ItemID.ApprenticeTrousers) { player.magicCrit -= 20; @@ -1994,7 +1994,7 @@ namespace CalamityMod.Items #region Accessory Changes public override void UpdateAccessory(Item item, Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (item.type == ItemID.AngelWings) // Boost to max life, defense, and life regen { @@ -2189,14 +2189,14 @@ namespace CalamityMod.Items if (item.type == ItemID.CelestialStone || item.type == ItemID.CelestialShell || (item.type == ItemID.MoonStone && !Main.dayTime) || (item.type == ItemID.SunStone && Main.dayTime)) { - player.GetCalamityPlayer().throwingCrit += 2; + player.Calamity().throwingCrit += 2; } if (item.type == ItemID.DestroyerEmblem) - player.GetCalamityPlayer().throwingCrit += 8; + player.Calamity().throwingCrit += 8; if (item.type == ItemID.EyeoftheGolem) - player.GetCalamityPlayer().throwingCrit += 10; + player.Calamity().throwingCrit += 10; if (item.type == ItemID.PutridScent) - player.GetCalamityPlayer().throwingCrit += 5; + player.Calamity().throwingCrit += 5; // Hard / Guarding / Armored / Warding give 0.25% / 0.5% / 0.75% / 1% DR if (item.prefix == 62) @@ -2215,7 +2215,7 @@ namespace CalamityMod.Items player.rangedCrit -= 1; player.magicCrit -= 1; player.thrownCrit -= 1; - player.GetCalamityPlayer().throwingCrit += (item.prefix == 68 ? 3 : 1); + player.Calamity().throwingCrit += (item.prefix == 68 ? 3 : 1); } } #endregion @@ -2223,7 +2223,7 @@ namespace CalamityMod.Items #region WingChanges public override void HorizontalWingSpeeds(Item item, Player player, ref float speed, ref float acceleration) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); float flightSpeedMult = 1f + (modPlayer.soaring ? 0.1f : 0f) + (modPlayer.holyWrath ? 0.05f : 0f) + @@ -2246,7 +2246,7 @@ namespace CalamityMod.Items #region GrabChanges public override void GrabRange(Item item, Player player, ref int grabRange) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); int itemGrabRangeBoost = 0 + (modPlayer.wallOfFleshLore ? 10 : 0) + (modPlayer.planteraLore ? 20 : 0) + diff --git a/Items/Crabulon/FungalClump.cs b/Items/Crabulon/FungalClump.cs index d8472813a2..41a2ceca7e 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (modPlayer.fungalClump) { return false; @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Crabulon public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.fungalClump = true; if (player.whoAmI == Main.myPlayer) { diff --git a/Items/Cryogen/SoulofCryogen.cs b/Items/Cryogen/SoulofCryogen.cs index 3742c19c93..0ccedec399 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.cryogenSoul = true; player.pickSpeed -= 0.05f; player.allDamage += 0.05f; diff --git a/Items/DevourerMunsters/ArmoredShell.cs b/Items/DevourerMunsters/ArmoredShell.cs index 81f102ce3f..7df699d3c6 100644 --- a/Items/DevourerMunsters/ArmoredShell.cs +++ b/Items/DevourerMunsters/ArmoredShell.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.DevourerMunsters item.height = 30; item.maxStack = 999; item.value = Item.buyPrice(0, 7, 0, 0); - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().postMoonLordRarity = 13; } } } diff --git a/Items/DevourerMunsters/DarkPlasma.cs b/Items/DevourerMunsters/DarkPlasma.cs index f563932447..00359615a7 100644 --- a/Items/DevourerMunsters/DarkPlasma.cs +++ b/Items/DevourerMunsters/DarkPlasma.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.DevourerMunsters item.height = 12; item.maxStack = 999; item.value = Item.buyPrice(0, 7, 0, 0); - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().postMoonLordRarity = 13; } public override void Update(ref float gravity, ref float maxFallSpeed) diff --git a/Items/DevourerMunsters/RuneofCos.cs b/Items/DevourerMunsters/RuneofCos.cs index 8604c0492e..a66f2638e1 100644 --- a/Items/DevourerMunsters/RuneofCos.cs +++ b/Items/DevourerMunsters/RuneofCos.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.DevourerMunsters item.UseSound = SoundID.Item44; item.consumable = false; item.shoot = mod.ProjectileType("VoidSpawn"); - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().postMoonLordRarity = 13; } public override bool CanUseItem(Player player) diff --git a/Items/DevourerMunsters/TwistingNether.cs b/Items/DevourerMunsters/TwistingNether.cs index d8396c548b..fab14fe9c1 100644 --- a/Items/DevourerMunsters/TwistingNether.cs +++ b/Items/DevourerMunsters/TwistingNether.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.DevourerMunsters item.maxStack = 999; item.rare = 10; item.value = Item.buyPrice(0, 7, 0, 0); - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().postMoonLordRarity = 13; } public override void Update(ref float gravity, ref float maxFallSpeed) diff --git a/Items/Fishing/AstralCrate.cs b/Items/Fishing/AstralCrate.cs index d7877430ff..8bd36e1b39 100644 --- a/Items/Fishing/AstralCrate.cs +++ b/Items/Fishing/AstralCrate.cs @@ -52,13 +52,13 @@ namespace CalamityMod.Items.Fishing mod.ItemType("HivePod"), mod.ItemType("AstralScythe"), mod.ItemType("StellarCannon")); - + //Bait DropHelper.DropItemChance(player, mod.ItemType("Twinkler"), 5, 1, 3); DropHelper.DropItemChance(player, ItemID.EnchantedNightcrawler, 5, 1, 3); DropHelper.DropItemChance(player, mod.ItemType("ArcturusAstroidean"), 5, 1, 3); DropHelper.DropItemChance(player, ItemID.Firefly, 3, 1, 3); - + //Potions DropHelper.DropItemChance(player, ItemID.ObsidianSkinPotion, 10, 1, 3); DropHelper.DropItemChance(player, ItemID.SwiftnessPotion, 10, 1, 3); @@ -81,7 +81,7 @@ namespace CalamityMod.Items.Fishing DropHelper.DropItemChance(player, mod.ItemType("AstralInjection"), 4, 1, 3); DropHelper.DropItemChance(player, mod.ItemType("GravityNormalizerPotion"), 4, 1, 3); } - + //Money DropHelper.DropItem(player, ItemID.SilverCoin, 10, 90); DropHelper.DropItemChance(player, ItemID.GoldCoin, 0.5f, 1, 5); diff --git a/Items/Fishing/UrsaSergeant.cs b/Items/Fishing/UrsaSergeant.cs index 0c9ff16352..9932757c7f 100644 --- a/Items/Fishing/UrsaSergeant.cs +++ b/Items/Fishing/UrsaSergeant.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Fishing public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.ursaSergeant = true; player.statDefense += 20; player.buffImmune[mod.BuffType("AstralInfectionDebuff")] = true; diff --git a/Items/HiveMind/RottenBrain.cs b/Items/HiveMind/RottenBrain.cs index 3a270cf6d0..2c7fd1a4b0 100644 --- a/Items/HiveMind/RottenBrain.cs +++ b/Items/HiveMind/RottenBrain.cs @@ -52,7 +52,7 @@ namespace CalamityMod.Items.HiveMind } } } - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.rBrain = true; } } diff --git a/Items/LoreItems/KnowledgeAquaticScourge.cs b/Items/LoreItems/KnowledgeAquaticScourge.cs index 85906e1e17..c181220180 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.aquaticScourgeLore = true; } } diff --git a/Items/LoreItems/KnowledgeAstrumAureus.cs b/Items/LoreItems/KnowledgeAstrumAureus.cs index 7d21949886..01e19d6f54 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.astrumAureusLore = true; } } diff --git a/Items/LoreItems/KnowledgeAstrumDeus.cs b/Items/LoreItems/KnowledgeAstrumDeus.cs index d82e9a6976..f1b3407f1a 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.astrumDeusLore = true; } } diff --git a/Items/LoreItems/KnowledgeBrimstoneElemental.cs b/Items/LoreItems/KnowledgeBrimstoneElemental.cs index d55faba0c6..b9c3d7794b 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.brimstoneElementalLore = true; } } diff --git a/Items/LoreItems/KnowledgeBumblebirb.cs b/Items/LoreItems/KnowledgeBumblebirb.cs index 4430ecd6cd..c3d885cd4f 100644 --- a/Items/LoreItems/KnowledgeBumblebirb.cs +++ b/Items/LoreItems/KnowledgeBumblebirb.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.LoreItems item.height = 20; item.rare = 10; item.consumable = false; - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } public override bool CanUseItem(Player player) diff --git a/Items/LoreItems/KnowledgeCalamitas.cs b/Items/LoreItems/KnowledgeCalamitas.cs index c6a56c67e2..0a45109fa7 100644 --- a/Items/LoreItems/KnowledgeCalamitas.cs +++ b/Items/LoreItems/KnowledgeCalamitas.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.LoreItems item.height = 20; item.rare = 10; item.consumable = false; - item.GetGlobalItem(mod).postMoonLordRarity = 15; + item.Calamity().postMoonLordRarity = 15; } public override bool CanUseItem(Player player) @@ -31,7 +31,7 @@ namespace CalamityMod.Items.LoreItems public override void UpdateInventory(Player player) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.SCalLore = true; } } diff --git a/Items/LoreItems/KnowledgeCalamitasClone.cs b/Items/LoreItems/KnowledgeCalamitasClone.cs index 70cb5322c3..53a674779d 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.calamitasLore = true; } } diff --git a/Items/LoreItems/KnowledgeCryogen.cs b/Items/LoreItems/KnowledgeCryogen.cs index 3d257c531b..729591d34b 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.dashMod = 6; player.statDefense -= 10; } diff --git a/Items/LoreItems/KnowledgeDesertScourge.cs b/Items/LoreItems/KnowledgeDesertScourge.cs index c2655dcc39..c5be7ff32c 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.GetCalamityPlayer().ZoneSunkenSea) + if (player.ZoneDesert || player.Calamity().ZoneSunkenSea) { - player.GetCalamityPlayer().desertScourgeLore = true; + player.Calamity().desertScourgeLore = true; } } } diff --git a/Items/LoreItems/KnowledgeDestroyer.cs b/Items/LoreItems/KnowledgeDestroyer.cs index 19e4ca7a81..a905af024a 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.destroyerLore = true; } } diff --git a/Items/LoreItems/KnowledgeDevourerofGods.cs b/Items/LoreItems/KnowledgeDevourerofGods.cs index 0a5c6f609a..2611635260 100644 --- a/Items/LoreItems/KnowledgeDevourerofGods.cs +++ b/Items/LoreItems/KnowledgeDevourerofGods.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.LoreItems item.height = 20; item.rare = 10; item.consumable = false; - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().postMoonLordRarity = 13; } public override bool CanUseItem(Player player) @@ -30,7 +30,7 @@ namespace CalamityMod.Items.LoreItems public override void UpdateInventory(Player player) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.DoGLore = true; } } diff --git a/Items/LoreItems/KnowledgeDukeFishron.cs b/Items/LoreItems/KnowledgeDukeFishron.cs index 6af46ea5e3..f95a33522a 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.dukeFishronLore = true; } } diff --git a/Items/LoreItems/KnowledgeEaterofWorlds.cs b/Items/LoreItems/KnowledgeEaterofWorlds.cs index 7b41dbf629..87e74f0201 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.eaterOfWorldsLore = true; } } diff --git a/Items/LoreItems/KnowledgeGolem.cs b/Items/LoreItems/KnowledgeGolem.cs index d8de70cadc..e4c8ec5f12 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.golemLore = true; } } diff --git a/Items/LoreItems/KnowledgeHiveMind.cs b/Items/LoreItems/KnowledgeHiveMind.cs index e01703d5b5..73b948fa79 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.hiveMindLore = true; } } diff --git a/Items/LoreItems/KnowledgeLeviathanandSiren.cs b/Items/LoreItems/KnowledgeLeviathanandSiren.cs index c3b64bf937..84f6aa07c2 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.leviathanAndSirenLore = true; } } diff --git a/Items/LoreItems/KnowledgeLunaticCultist.cs b/Items/LoreItems/KnowledgeLunaticCultist.cs index 3e3912169a..6e1e6873d5 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.lunaticCultistLore = true; } } diff --git a/Items/LoreItems/KnowledgeMoonLord.cs b/Items/LoreItems/KnowledgeMoonLord.cs index af3d190608..33c35b1db3 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.moonLordLore = true; } } diff --git a/Items/LoreItems/KnowledgePerforators.cs b/Items/LoreItems/KnowledgePerforators.cs index 0a8599cb9c..3a558b115e 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.perforatorLore = true; } } diff --git a/Items/LoreItems/KnowledgePlaguebringerGoliath.cs b/Items/LoreItems/KnowledgePlaguebringerGoliath.cs index 38a35a42bf..e55e923644 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.plaguebringerGoliathLore = true; } } diff --git a/Items/LoreItems/KnowledgePlantera.cs b/Items/LoreItems/KnowledgePlantera.cs index 8c64d25ff3..574c564058 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.planteraLore = true; } } diff --git a/Items/LoreItems/KnowledgePolterghast.cs b/Items/LoreItems/KnowledgePolterghast.cs index eb2c33cdb3..78dbfd2c7f 100644 --- a/Items/LoreItems/KnowledgePolterghast.cs +++ b/Items/LoreItems/KnowledgePolterghast.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.LoreItems item.height = 20; item.rare = 10; item.consumable = false; - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().postMoonLordRarity = 13; } public override bool CanUseItem(Player player) @@ -30,7 +30,7 @@ namespace CalamityMod.Items.LoreItems public override void UpdateInventory(Player player) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.polterghastLore = true; } } diff --git a/Items/LoreItems/KnowledgeProfanedGuardians.cs b/Items/LoreItems/KnowledgeProfanedGuardians.cs index f273ea535f..27bbe91bce 100644 --- a/Items/LoreItems/KnowledgeProfanedGuardians.cs +++ b/Items/LoreItems/KnowledgeProfanedGuardians.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.LoreItems item.height = 20; item.rare = 10; item.consumable = false; - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } public override bool CanUseItem(Player player) diff --git a/Items/LoreItems/KnowledgeProvidence.cs b/Items/LoreItems/KnowledgeProvidence.cs index 68713ca699..244993c56a 100644 --- a/Items/LoreItems/KnowledgeProvidence.cs +++ b/Items/LoreItems/KnowledgeProvidence.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.LoreItems item.height = 20; item.rare = 10; item.consumable = false; - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } public override bool CanUseItem(Player player) @@ -30,7 +30,7 @@ namespace CalamityMod.Items.LoreItems public override void UpdateInventory(Player player) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.providenceLore = true; } } diff --git a/Items/LoreItems/KnowledgeQueenBee.cs b/Items/LoreItems/KnowledgeQueenBee.cs index 1dcf9584db..11fa4f3295 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.queenBeeLore = true; } } diff --git a/Items/LoreItems/KnowledgeRavager.cs b/Items/LoreItems/KnowledgeRavager.cs index 8089e3bbf4..1081c3ea05 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.ravagerLore = true; } } diff --git a/Items/LoreItems/KnowledgeSentinels.cs b/Items/LoreItems/KnowledgeSentinels.cs index 5983eedf98..3490c851ab 100644 --- a/Items/LoreItems/KnowledgeSentinels.cs +++ b/Items/LoreItems/KnowledgeSentinels.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.LoreItems item.height = 20; item.rare = 10; item.consumable = false; - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().postMoonLordRarity = 13; } public override bool CanUseItem(Player player) diff --git a/Items/LoreItems/KnowledgeSkeletron.cs b/Items/LoreItems/KnowledgeSkeletron.cs index f7ec26eec7..395c115155 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.skeletronLore = true; } } diff --git a/Items/LoreItems/KnowledgeSkeletronPrime.cs b/Items/LoreItems/KnowledgeSkeletronPrime.cs index 5447cedaf4..aaaeaf57aa 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.skeletronPrimeLore = true; } } diff --git a/Items/LoreItems/KnowledgeWallofFlesh.cs b/Items/LoreItems/KnowledgeWallofFlesh.cs index 6097861555..71468c9539 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.wallOfFleshLore = true; } } diff --git a/Items/LoreItems/KnowledgeYharon.cs b/Items/LoreItems/KnowledgeYharon.cs index 0fcc5e959a..e1d91ef2b7 100644 --- a/Items/LoreItems/KnowledgeYharon.cs +++ b/Items/LoreItems/KnowledgeYharon.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.LoreItems item.height = 20; item.rare = 10; item.consumable = false; - item.GetGlobalItem(mod).postMoonLordRarity = 14; + item.Calamity().postMoonLordRarity = 14; } public override bool CanUseItem(Player player) @@ -30,7 +30,7 @@ namespace CalamityMod.Items.LoreItems public override void UpdateInventory(Player player) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.yharonLore = true; } } diff --git a/Items/Materials/Bloodstone.cs b/Items/Materials/Bloodstone.cs index 1ef00796a8..139d0ce17c 100644 --- a/Items/Materials/Bloodstone.cs +++ b/Items/Materials/Bloodstone.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Materials item.maxStack = 999; item.value = Item.sellPrice(silver: 60); item.rare = 10; - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().postMoonLordRarity = 13; } } } diff --git a/Items/Materials/BloodstoneCore.cs b/Items/Materials/BloodstoneCore.cs index 61f8ae6f5e..b280271bd6 100644 --- a/Items/Materials/BloodstoneCore.cs +++ b/Items/Materials/BloodstoneCore.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Materials item.maxStack = 999; item.rare = 10; item.value = Item.sellPrice(gold: 4); - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().postMoonLordRarity = 13; } public override void AddRecipes() diff --git a/Items/Materials/CalamitousEssence.cs b/Items/Materials/CalamitousEssence.cs index eed037d1c7..f5bad0a802 100644 --- a/Items/Materials/CalamitousEssence.cs +++ b/Items/Materials/CalamitousEssence.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Materials item.maxStack = 999; item.rare = 10; item.value = Item.sellPrice(gold: 24); - item.GetGlobalItem(mod).postMoonLordRarity = 15; + item.Calamity().postMoonLordRarity = 15; } } } diff --git a/Items/Materials/DarksunFragment.cs b/Items/Materials/DarksunFragment.cs index f0ad4a760a..15d7f0b565 100644 --- a/Items/Materials/DarksunFragment.cs +++ b/Items/Materials/DarksunFragment.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Materials item.maxStack = 999; item.rare = 10; item.value = Item.sellPrice(gold: 12); - item.GetGlobalItem(mod).postMoonLordRarity = 15; + item.Calamity().postMoonLordRarity = 15; } } } diff --git a/Items/Materials/EndothermicEnergy.cs b/Items/Materials/EndothermicEnergy.cs index 4a1e491f96..6a8ef1147d 100644 --- a/Items/Materials/EndothermicEnergy.cs +++ b/Items/Materials/EndothermicEnergy.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Materials item.maxStack = 999; item.rare = 10; item.value = Item.sellPrice(gold: 2); - item.GetGlobalItem(mod).postMoonLordRarity = 14; + item.Calamity().postMoonLordRarity = 14; } } } diff --git a/Items/Materials/HellcasterFragment.cs b/Items/Materials/HellcasterFragment.cs index 1d0d4e832c..cb4ded03bd 100644 --- a/Items/Materials/HellcasterFragment.cs +++ b/Items/Materials/HellcasterFragment.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Materials item.height = 14; item.maxStack = 999; item.value = Item.sellPrice(gold: 16); - item.GetGlobalItem(mod).postMoonLordRarity = 20; + item.Calamity().postMoonLordRarity = 20; } } } diff --git a/Items/Materials/NightmareFuel.cs b/Items/Materials/NightmareFuel.cs index 3133b572d7..6979da451e 100644 --- a/Items/Materials/NightmareFuel.cs +++ b/Items/Materials/NightmareFuel.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Materials item.maxStack = 999; item.rare = 10; item.value = Item.sellPrice(gold: 2); - item.GetGlobalItem(mod).postMoonLordRarity = 14; + item.Calamity().postMoonLordRarity = 14; } } } diff --git a/Items/Materials/Phantoplasm.cs b/Items/Materials/Phantoplasm.cs index 2b0f22529a..2d8ca85228 100644 --- a/Items/Materials/Phantoplasm.cs +++ b/Items/Materials/Phantoplasm.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Materials item.maxStack = 999; item.rare = 10; item.value = Item.sellPrice(gold: 1); - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().postMoonLordRarity = 13; } public override Color? GetAlpha(Color lightColor) diff --git a/Items/Materials/ShadowspecBar.cs b/Items/Materials/ShadowspecBar.cs index 401bf43a5c..28e55c4df4 100644 --- a/Items/Materials/ShadowspecBar.cs +++ b/Items/Materials/ShadowspecBar.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Materials item.maxStack = 999; item.rare = 10; item.value = Item.sellPrice(gold: 27, silver: 50); - item.GetGlobalItem(mod).postMoonLordRarity = 15; + item.Calamity().postMoonLordRarity = 15; } public override void AddRecipes() diff --git a/Items/Materials/UeliaceBar.cs b/Items/Materials/UeliaceBar.cs index 473bed0719..cd59823024 100644 --- a/Items/Materials/UeliaceBar.cs +++ b/Items/Materials/UeliaceBar.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Materials item.maxStack = 999; item.rare = 10; item.value = Item.sellPrice(gold: 3); - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } public override void AddRecipes() diff --git a/Items/Mounts/Fab.cs b/Items/Mounts/Fab.cs index 8f282b2dd3..95b8b53c18 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (modPlayer.fabsolVodka) { player.allDamage += 0.1f; diff --git a/Items/Mounts/OnyxExcavator.cs b/Items/Mounts/OnyxExcavator.cs index 51edadad6a..91672a8ace 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.GetCalamityPlayer().ZoneSunkenSea || CalamityWorld.downedDesertScourge) && + (!player.Calamity().ZoneSunkenSea || CalamityWorld.downedDesertScourge) && (Main.tileValue[tile.type] < tileValueLimit || tile.type == TileID.Heart || tile.type == TileID.LifeFruit) && !player.noBuilding && tile.type != TileID.ElderCrystalStand && tile.type != TileID.Containers) { diff --git a/Items/Patreon/AngelicShotgun.cs b/Items/Patreon/AngelicShotgun.cs index 6f43c52abf..60be188e3e 100644 --- a/Items/Patreon/AngelicShotgun.cs +++ b/Items/Patreon/AngelicShotgun.cs @@ -37,7 +37,7 @@ Fighting 'til the war's won"); item.rare = 10; item.value = Item.buyPrice(1, 40, 0, 0); - item.GetGlobalItem(mod).postMoonLordRarity = 21; + item.Calamity().postMoonLordRarity = 21; item.shootSpeed = BulletSpeed; item.shoot = mod.ProjectileType("IlluminatedBullet"); diff --git a/Items/Patreon/ApronOfAffection.cs b/Items/Patreon/ApronOfAffection.cs index 0979d7b79b..5ed39240ca 100644 --- a/Items/Patreon/ApronOfAffection.cs +++ b/Items/Patreon/ApronOfAffection.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Patreon item.width = 18; item.height = 18; item.rare = 5; - item.GetGlobalItem(mod).postMoonLordRarity = 21; + item.Calamity().postMoonLordRarity = 21; item.value = Item.buyPrice(0, 15, 0, 0); item.vanity = true; } diff --git a/Items/Patreon/Ataraxia.cs b/Items/Patreon/Ataraxia.cs index cbff686094..2f39aba1e0 100644 --- a/Items/Patreon/Ataraxia.cs +++ b/Items/Patreon/Ataraxia.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Patreon item.UseSound = SoundID.Item1; item.rare = 10; - item.GetGlobalItem(mod).postMoonLordRarity = 21; + item.Calamity().postMoonLordRarity = 21; item.value = Item.buyPrice(2, 50, 0, 0); item.shoot = mod.ProjectileType("AtaraxiaMain"); diff --git a/Items/Patreon/BloodyVein.cs b/Items/Patreon/BloodyVein.cs index 8f7a08d873..ae3e77d394 100644 --- a/Items/Patreon/BloodyVein.cs +++ b/Items/Patreon/BloodyVein.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Patreon item.shoot = mod.ProjectileType("PerforaMini"); item.buffType = mod.BuffType("BloodBound"); item.rare = 3; - item.GetGlobalItem(mod).postMoonLordRarity = 21; + item.Calamity().postMoonLordRarity = 21; } public override void UseStyle(Player player) diff --git a/Items/Patreon/CorpusAvertorMelee.cs b/Items/Patreon/CorpusAvertorMelee.cs index 047abde0a5..c6aa89e0c4 100644 --- a/Items/Patreon/CorpusAvertorMelee.cs +++ b/Items/Patreon/CorpusAvertorMelee.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Patreon item.autoReuse = true; item.value = Item.buyPrice(0, 80, 0, 0); item.rare = 8; - item.GetGlobalItem(mod).postMoonLordRarity = 21; + item.Calamity().postMoonLordRarity = 21; item.shoot = mod.ProjectileType("CorpusAvertor"); item.shootSpeed = 5f; item.melee = true; diff --git a/Items/Patreon/DarkSpark.cs b/Items/Patreon/DarkSpark.cs index 575fd79ae8..c7c5c44029 100644 --- a/Items/Patreon/DarkSpark.cs +++ b/Items/Patreon/DarkSpark.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Patreon item.rare = 10; item.shoot = mod.ProjectileType("DarkSpark"); item.shootSpeed = 30f; - item.GetGlobalItem(mod).postMoonLordRarity = 21; + item.Calamity().postMoonLordRarity = 21; } 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) diff --git a/Items/Patreon/DevilsSunrise.cs b/Items/Patreon/DevilsSunrise.cs index 9e2f040ab4..e2cae03fbe 100644 --- a/Items/Patreon/DevilsSunrise.cs +++ b/Items/Patreon/DevilsSunrise.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Patreon item.useStyle = 5; item.rare = 10; - item.GetGlobalItem(mod).postMoonLordRarity = 21; + item.Calamity().postMoonLordRarity = 21; item.value = Item.buyPrice(1, 40, 0, 0); item.shoot = mod.ProjectileType("DevilsSunrise"); diff --git a/Items/Patreon/DivineRetribution.cs b/Items/Patreon/DivineRetribution.cs index 178984b60b..7c6687a1b4 100644 --- a/Items/Patreon/DivineRetribution.cs +++ b/Items/Patreon/DivineRetribution.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Patreon item.autoReuse = true; item.shootSpeed = 19f; item.shoot = mod.ProjectileType("DivineRetribution"); - item.GetGlobalItem(mod).postMoonLordRarity = 21; + item.Calamity().postMoonLordRarity = 21; } 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) diff --git a/Items/Patreon/DodusHandcannon.cs b/Items/Patreon/DodusHandcannon.cs index 9704e0a57a..d508a3a0c7 100644 --- a/Items/Patreon/DodusHandcannon.cs +++ b/Items/Patreon/DodusHandcannon.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Patreon item.value = Item.buyPrice(1, 40, 0, 0); item.rare = 10; - item.GetGlobalItem(mod).postMoonLordRarity = 21; + item.Calamity().postMoonLordRarity = 21; item.UseSound = mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/LargeWeaponFire"); diff --git a/Items/Patreon/DragonPow.cs b/Items/Patreon/DragonPow.cs index c504262328..ba6195aed6 100644 --- a/Items/Patreon/DragonPow.cs +++ b/Items/Patreon/DragonPow.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Items.Patreon item.channel = true; item.rare = 10; - item.GetGlobalItem(mod).postMoonLordRarity = 21; + item.Calamity().postMoonLordRarity = 21; item.value = Item.buyPrice(2, 50, 0, 0); item.shoot = mod.ProjectileType("DragonPowFlail"); diff --git a/Items/Patreon/FaceMelter.cs b/Items/Patreon/FaceMelter.cs index db6e3f46e0..26f5d35ecf 100644 --- a/Items/Patreon/FaceMelter.cs +++ b/Items/Patreon/FaceMelter.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Patreon item.noMelee = true; item.knockBack = 5f; item.rare = 10; - item.GetGlobalItem(mod).postMoonLordRarity = 21; + item.Calamity().postMoonLordRarity = 21; item.value = Item.buyPrice(1, 80, 0, 0); item.shoot = mod.ProjectileType("MelterNote1"); item.UseSound = SoundID.Item47; diff --git a/Items/Patreon/ForgottenDragonEgg.cs b/Items/Patreon/ForgottenDragonEgg.cs index 580d39caca..0268e3741e 100644 --- a/Items/Patreon/ForgottenDragonEgg.cs +++ b/Items/Patreon/ForgottenDragonEgg.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Patreon item.shoot = mod.ProjectileType("Akato"); item.buffType = mod.BuffType("AkatoYharonBuff"); item.rare = 10; - item.GetGlobalItem(mod).postMoonLordRarity = 21; + item.Calamity().postMoonLordRarity = 21; } public override void UseStyle(Player player) diff --git a/Items/Patreon/GazeOfCrysthamyr.cs b/Items/Patreon/GazeOfCrysthamyr.cs index 03edb297e9..e2bc6a1d7b 100644 --- a/Items/Patreon/GazeOfCrysthamyr.cs +++ b/Items/Patreon/GazeOfCrysthamyr.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Patreon item.UseSound = SoundID.NPCHit56; item.noMelee = true; item.mountType = mod.MountType("Crysthamyr"); - item.GetGlobalItem(mod).postMoonLordRarity = 21; + item.Calamity().postMoonLordRarity = 21; } public override void AddRecipes() diff --git a/Items/Patreon/HandheldTank.cs b/Items/Patreon/HandheldTank.cs index fe474e45d8..33bb4ad629 100644 --- a/Items/Patreon/HandheldTank.cs +++ b/Items/Patreon/HandheldTank.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Patreon item.value = Item.buyPrice(1, 40, 0, 0); item.rare = 10; - item.GetGlobalItem(mod).postMoonLordRarity = 21; + item.Calamity().postMoonLordRarity = 21; item.shoot = mod.ProjectileType("HandheldTankShell"); item.shootSpeed = 6f; diff --git a/Items/Patreon/Karasawa.cs b/Items/Patreon/Karasawa.cs index 37a6201aeb..3b162fe528 100644 --- a/Items/Patreon/Karasawa.cs +++ b/Items/Patreon/Karasawa.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Patreon item.value = Item.buyPrice(1, 80, 0, 0); item.rare = 10; - item.GetGlobalItem(mod).postMoonLordRarity = 21; + item.Calamity().postMoonLordRarity = 21; item.shoot = mod.ProjectileType("KarasawaShot"); item.shootSpeed = 1f; diff --git a/Items/Patreon/Keelhaul.cs b/Items/Patreon/Keelhaul.cs index 6acdd3ce97..1ff2c2cf36 100644 --- a/Items/Patreon/Keelhaul.cs +++ b/Items/Patreon/Keelhaul.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Patreon item.UseSound = SoundID.Item102; item.autoReuse = true; item.rare = 8; - item.GetGlobalItem(mod).postMoonLordRarity = 21; + item.Calamity().postMoonLordRarity = 21; item.value = Item.buyPrice(0, 80, 0, 0); item.shoot = mod.ProjectileType("KeelhaulBubble"); item.shootSpeed = 15f; diff --git a/Items/Patreon/KelvinCatalystMelee.cs b/Items/Patreon/KelvinCatalystMelee.cs index f705bea52b..17c436f956 100644 --- a/Items/Patreon/KelvinCatalystMelee.cs +++ b/Items/Patreon/KelvinCatalystMelee.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Patreon item.shoot = mod.ProjectileType("KelvinCatalyst"); item.shootSpeed = 8f; item.melee = true; - item.GetGlobalItem(mod).postMoonLordRarity = 21; + item.Calamity().postMoonLordRarity = 21; } 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) diff --git a/Items/Patreon/LightGodsBrilliance.cs b/Items/Patreon/LightGodsBrilliance.cs index 5e08148372..9eff64bcc8 100644 --- a/Items/Patreon/LightGodsBrilliance.cs +++ b/Items/Patreon/LightGodsBrilliance.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Patreon item.autoReuse = true; item.shoot = mod.ProjectileType("LightBead"); item.shootSpeed = 25f; - item.GetGlobalItem(mod).postMoonLordRarity = 21; + item.Calamity().postMoonLordRarity = 21; } 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) diff --git a/Items/Patreon/MadAlchemistsCocktailGlove.cs b/Items/Patreon/MadAlchemistsCocktailGlove.cs index ab8bd4e704..c1411dbb76 100644 --- a/Items/Patreon/MadAlchemistsCocktailGlove.cs +++ b/Items/Patreon/MadAlchemistsCocktailGlove.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Patreon item.autoReuse = true; item.shoot = mod.ProjectileType("MadAlchemistsCocktailRed"); item.shootSpeed = 12f; - item.GetGlobalItem(mod).postMoonLordRarity = 21; + item.Calamity().postMoonLordRarity = 21; } public override bool AltFunctionUse(Player player) diff --git a/Items/Patreon/Nadir.cs b/Items/Patreon/Nadir.cs index 177d73d1dd..0e470ce195 100644 --- a/Items/Patreon/Nadir.cs +++ b/Items/Patreon/Nadir.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Patreon item.UseSound = SoundID.Item1; item.rare = 10; - item.GetGlobalItem(mod).postMoonLordRarity = 21; + item.Calamity().postMoonLordRarity = 21; item.value = Item.buyPrice(1, 80, 0, 0); item.shoot = mod.ProjectileType("NadirSpear"); diff --git a/Items/Patreon/NormalityRelocator.cs b/Items/Patreon/NormalityRelocator.cs index b51f2d4c67..63a92e7528 100644 --- a/Items/Patreon/NormalityRelocator.cs +++ b/Items/Patreon/NormalityRelocator.cs @@ -24,12 +24,12 @@ namespace CalamityMod.Items.Patreon item.height = 38; item.value = Item.buyPrice(1, 20, 0, 0); item.rare = 10; - item.GetGlobalItem(mod).postMoonLordRarity = 21; + item.Calamity().postMoonLordRarity = 21; } public override void UpdateInventory(Player player) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.normalityRelocator = true; } diff --git a/Items/Patreon/Oracle.cs b/Items/Patreon/Oracle.cs index aac6a3b9b1..3f5b9d0a52 100644 --- a/Items/Patreon/Oracle.cs +++ b/Items/Patreon/Oracle.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Patreon item.channel = true; item.rare = 10; - item.GetGlobalItem(mod).postMoonLordRarity = 21; + item.Calamity().postMoonLordRarity = 21; item.value = Item.buyPrice(2, 50, 0, 0); item.shoot = mod.ProjectileType("OracleYoyo"); diff --git a/Items/Patreon/ProfanedSoulArtifact.cs b/Items/Patreon/ProfanedSoulArtifact.cs index 04e5b62fb6..7ac3e89360 100644 --- a/Items/Patreon/ProfanedSoulArtifact.cs +++ b/Items/Patreon/ProfanedSoulArtifact.cs @@ -26,12 +26,12 @@ namespace CalamityMod.Items.Patreon item.value = Item.buyPrice(1, 40, 0, 0); item.rare = 10; item.accessory = true; - item.GetGlobalItem(mod).postMoonLordRarity = 21; + item.Calamity().postMoonLordRarity = 21; } public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.pArtifact = true; } diff --git a/Items/Patreon/ResurrectionButterfly.cs b/Items/Patreon/ResurrectionButterfly.cs index e812ed031a..92bf9d6809 100644 --- a/Items/Patreon/ResurrectionButterfly.cs +++ b/Items/Patreon/ResurrectionButterfly.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Patreon item.knockBack = 1f; item.value = Item.buyPrice(0, 80, 0, 0); item.rare = 8; - item.GetGlobalItem(mod).postMoonLordRarity = 21; + item.Calamity().postMoonLordRarity = 21; item.UseSound = SoundID.Item44; item.autoReuse = true; item.shoot = mod.ProjectileType("PinkButterfly"); diff --git a/Items/Patreon/Roxcalibur.cs b/Items/Patreon/Roxcalibur.cs index d218903490..9071276132 100644 --- a/Items/Patreon/Roxcalibur.cs +++ b/Items/Patreon/Roxcalibur.cs @@ -45,7 +45,7 @@ namespace CalamityMod.Items.Patreon item.value = Item.buyPrice(0, 36, 0, 0); item.rare = 5; - item.GetGlobalItem(mod).postMoonLordRarity = 21; + item.Calamity().postMoonLordRarity = 21; } public override void AddRecipes() diff --git a/Items/Patreon/TheLastMourning.cs b/Items/Patreon/TheLastMourning.cs index 0d21f9f5ab..06bd1faf29 100644 --- a/Items/Patreon/TheLastMourning.cs +++ b/Items/Patreon/TheLastMourning.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Patreon item.UseSound = SoundID.Item1; item.rare = 10; - item.GetGlobalItem(mod).postMoonLordRarity = 21; + item.Calamity().postMoonLordRarity = 21; item.value = Item.buyPrice(1, 40, 0, 0); } diff --git a/Items/Patreon/ThePack.cs b/Items/Patreon/ThePack.cs index d412869e0f..7bf38c37d0 100644 --- a/Items/Patreon/ThePack.cs +++ b/Items/Patreon/ThePack.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Patreon item.knockBack = 7.5f; item.value = Item.buyPrice(1, 80, 0, 0); item.rare = 10; - item.GetGlobalItem(mod).postMoonLordRarity = 21; + item.Calamity().postMoonLordRarity = 21; item.UseSound = SoundID.Item11; item.autoReuse = true; item.shootSpeed = 24f; diff --git a/Items/Patreon/YateveoBloom.cs b/Items/Patreon/YateveoBloom.cs index 9be33d5e97..03312e72e7 100644 --- a/Items/Patreon/YateveoBloom.cs +++ b/Items/Patreon/YateveoBloom.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Items.Patreon item.UseSound = SoundID.Item1; item.rare = 2; - item.GetGlobalItem(mod).postMoonLordRarity = 21; + item.Calamity().postMoonLordRarity = 21; item.value = Item.buyPrice(0, 2, 0, 0); item.shoot = mod.ProjectileType("YateveoBloom"); diff --git a/Items/Perforator/BloodyWormTooth.cs b/Items/Perforator/BloodyWormTooth.cs index d5951e5ef0..123d81161a 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.bloodyWormTooth = true; } } diff --git a/Items/PermanentBoosters/BloodOrange.cs b/Items/PermanentBoosters/BloodOrange.cs index 689ad680b1..31907e4873 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (modPlayer.bOrange || player.statLifeMax < 500) { return false; @@ -45,7 +45,7 @@ namespace CalamityMod.Items.PermanentBoosters { player.HealEffect(25); } - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.bOrange = true; } return true; diff --git a/Items/PermanentBoosters/CometShard.cs b/Items/PermanentBoosters/CometShard.cs index 61982b51ed..78720e27bd 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (modPlayer.cShard) { return false; @@ -44,7 +44,7 @@ namespace CalamityMod.Items.PermanentBoosters { player.ManaEffect(50); } - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.cShard = true; } return true; diff --git a/Items/PermanentBoosters/Dragonfruit.cs b/Items/PermanentBoosters/Dragonfruit.cs index 0c9c400be7..810452e53f 100644 --- a/Items/PermanentBoosters/Dragonfruit.cs +++ b/Items/PermanentBoosters/Dragonfruit.cs @@ -24,12 +24,12 @@ namespace CalamityMod.Items.PermanentBoosters item.UseSound = SoundID.Item4; item.consumable = true; item.rare = 10; - item.GetGlobalItem(mod).postMoonLordRarity = 14; + item.Calamity().postMoonLordRarity = 14; } public override bool CanUseItem(Player player) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (modPlayer.dFruit || player.statLifeMax < 500) { return false; @@ -46,7 +46,7 @@ namespace CalamityMod.Items.PermanentBoosters { player.HealEffect(25); } - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.dFruit = true; } return true; diff --git a/Items/PermanentBoosters/Ectoheart.cs b/Items/PermanentBoosters/Ectoheart.cs index 06d843d8b3..206c401ac2 100644 --- a/Items/PermanentBoosters/Ectoheart.cs +++ b/Items/PermanentBoosters/Ectoheart.cs @@ -26,12 +26,12 @@ namespace CalamityMod.Items.PermanentBoosters item.UseSound = SoundID.Item122; item.consumable = true; item.rare = 10; - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().postMoonLordRarity = 13; } public override bool CanUseItem(Player player) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.adrenalineBoostThree = true; } return true; diff --git a/Items/PermanentBoosters/Elderberry.cs b/Items/PermanentBoosters/Elderberry.cs index 210205195b..42a35b52b3 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (modPlayer.eBerry || player.statLifeMax < 500) { return false; @@ -45,7 +45,7 @@ namespace CalamityMod.Items.PermanentBoosters { player.HealEffect(25); } - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.eBerry = true; } return true; diff --git a/Items/PermanentBoosters/ElectrolyteGelPack.cs b/Items/PermanentBoosters/ElectrolyteGelPack.cs index 5368044faf..a04eda5d77 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.adrenalineBoostOne = true; } return true; diff --git a/Items/PermanentBoosters/EtherealCore.cs b/Items/PermanentBoosters/EtherealCore.cs index c7a439cf24..6e46b60369 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (modPlayer.eCore) { return false; @@ -44,7 +44,7 @@ namespace CalamityMod.Items.PermanentBoosters { player.ManaEffect(50); } - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.eCore = true; } return true; diff --git a/Items/PermanentBoosters/InfernalBlood.cs b/Items/PermanentBoosters/InfernalBlood.cs index 278dd55906..5489c49cb0 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.rageBoostTwo = true; } return true; diff --git a/Items/PermanentBoosters/MLGRune2.cs b/Items/PermanentBoosters/MLGRune2.cs index 9edbfc0119..dc8b86f181 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); 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 9821fb012f..705ca65fbc 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (modPlayer.mFruit || player.statLifeMax < 500) { return false; @@ -45,7 +45,7 @@ namespace CalamityMod.Items.PermanentBoosters { player.HealEffect(25); } - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.mFruit = true; } return true; diff --git a/Items/PermanentBoosters/MushroomPlasmaRoot.cs b/Items/PermanentBoosters/MushroomPlasmaRoot.cs index 5389ef182b..f76c3d3587 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.rageBoostOne = true; } return true; diff --git a/Items/PermanentBoosters/PhantomHeart.cs b/Items/PermanentBoosters/PhantomHeart.cs index 8e665e926e..a18cf43966 100644 --- a/Items/PermanentBoosters/PhantomHeart.cs +++ b/Items/PermanentBoosters/PhantomHeart.cs @@ -23,12 +23,12 @@ namespace CalamityMod.Items.PermanentBoosters item.UseSound = SoundID.Item29; item.consumable = true; item.rare = 10; - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().postMoonLordRarity = 13; } public override bool CanUseItem(Player player) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (modPlayer.pHeart) { return false; @@ -45,7 +45,7 @@ namespace CalamityMod.Items.PermanentBoosters { player.ManaEffect(50); } - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.pHeart = true; } return true; diff --git a/Items/PermanentBoosters/RedLightningContainer.cs b/Items/PermanentBoosters/RedLightningContainer.cs index 46aef20f1a..31ffbc8e17 100644 --- a/Items/PermanentBoosters/RedLightningContainer.cs +++ b/Items/PermanentBoosters/RedLightningContainer.cs @@ -26,12 +26,12 @@ namespace CalamityMod.Items.PermanentBoosters item.UseSound = SoundID.Item122; item.consumable = true; item.rare = 10; - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } public override bool CanUseItem(Player player) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.rageBoostThree = true; } return true; diff --git a/Items/PermanentBoosters/StarlightFuelCell.cs b/Items/PermanentBoosters/StarlightFuelCell.cs index 5698819a5d..fa56ddb981 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.adrenalineBoostTwo = true; } return true; diff --git a/Items/Pets/CosmicPlushie.cs b/Items/Pets/CosmicPlushie.cs index cc04095835..7b7c74e18d 100644 --- a/Items/Pets/CosmicPlushie.cs +++ b/Items/Pets/CosmicPlushie.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Pets item.buffType = mod.BuffType("ChibiiBuff"); item.rare = 10; item.UseSound = new Terraria.Audio.LegacySoundStyle(SoundID.Meowmere, 5); - item.GetGlobalItem(mod).postMoonLordRarity = 14; + item.Calamity().postMoonLordRarity = 14; } public override void UseStyle(Player player) diff --git a/Items/Placeables/AuricOre.cs b/Items/Placeables/AuricOre.cs index 808e9076b5..476f69f99a 100644 --- a/Items/Placeables/AuricOre.cs +++ b/Items/Placeables/AuricOre.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Placeables item.height = 10; item.maxStack = 999; item.value = Item.sellPrice(gold: 2); - item.GetGlobalItem(mod).postMoonLordRarity = 14; + item.Calamity().postMoonLordRarity = 14; } } } diff --git a/Items/Placeables/DraedonsForge.cs b/Items/Placeables/DraedonsForge.cs index 2f4c98f36d..1febd4982b 100644 --- a/Items/Placeables/DraedonsForge.cs +++ b/Items/Placeables/DraedonsForge.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Placeables item.value = 5000000; item.rare = 10; item.createTile = mod.TileType("DraedonsForge"); - item.GetGlobalItem(mod).postMoonLordRarity = 20; + item.Calamity().postMoonLordRarity = 20; } public override void AddRecipes() diff --git a/Items/PlaguebringerGoliath/BloomStone.cs b/Items/PlaguebringerGoliath/BloomStone.cs index 65d1db8e2f..d620b2b507 100644 --- a/Items/PlaguebringerGoliath/BloomStone.cs +++ b/Items/PlaguebringerGoliath/BloomStone.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.PlaguebringerGoliath public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); Lighting.AddLight((int)player.Center.X / 16, (int)player.Center.Y / 16, 0.25f, 0.4f, 0.2f); player.allDamage += 0.03f; int bloomCounter = 0; diff --git a/Items/Polterghast/Affliction.cs b/Items/Polterghast/Affliction.cs index 74a28d012f..e1a14a4a70 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.affliction = true; if (player.whoAmI != Main.myPlayer && player.miscCounter % 10 == 0) { diff --git a/Items/Polterghast/NecroplasmicBeacon.cs b/Items/Polterghast/NecroplasmicBeacon.cs index 85ff8fb7d5..f76659fd54 100644 --- a/Items/Polterghast/NecroplasmicBeacon.cs +++ b/Items/Polterghast/NecroplasmicBeacon.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Polterghast item.useTime = 45; item.useStyle = 4; item.consumable = false; - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().postMoonLordRarity = 13; } public override bool CanUseItem(Player player) diff --git a/Items/Polterghast/RuinousSoul.cs b/Items/Polterghast/RuinousSoul.cs index f745eb0fb1..8a211e87d0 100644 --- a/Items/Polterghast/RuinousSoul.cs +++ b/Items/Polterghast/RuinousSoul.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Polterghast item.height = 20; item.maxStack = 999; item.value = Item.buyPrice(0, 7, 0, 0); - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().postMoonLordRarity = 13; } } } diff --git a/Items/Potions/DraconicElixir.cs b/Items/Potions/DraconicElixir.cs index 9866d8259b..feb9aab53f 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.GetCalamityPlayer().draconicSurgeCooldown == 0; + return player.Calamity().draconicSurgeCooldown == 0; } public override void AddRecipes() diff --git a/Items/Potions/OmegaHealingPotion.cs b/Items/Potions/OmegaHealingPotion.cs index 996ec9c45b..55afb6b8f2 100644 --- a/Items/Potions/OmegaHealingPotion.cs +++ b/Items/Potions/OmegaHealingPotion.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Potions item.potion = true; item.rare = 10; item.value = Item.buyPrice(0, 7, 0, 0); - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().postMoonLordRarity = 13; } public override void AddRecipes() diff --git a/Items/Potions/RevivifyPotion.cs b/Items/Potions/RevivifyPotion.cs index 2b6d04c293..0623a1e66e 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.revivifyTimer = 900; } return true; diff --git a/Items/Potions/SupremeHealingPotion.cs b/Items/Potions/SupremeHealingPotion.cs index f91216e152..695a544437 100644 --- a/Items/Potions/SupremeHealingPotion.cs +++ b/Items/Potions/SupremeHealingPotion.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Potions item.potion = true; item.rare = 10; item.value = Item.buyPrice(0, 6, 50, 0); - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } public override void AddRecipes() diff --git a/Items/Potions/SupremeManaPotion.cs b/Items/Potions/SupremeManaPotion.cs index 9f1ae9215e..a3f2d4bab7 100644 --- a/Items/Potions/SupremeManaPotion.cs +++ b/Items/Potions/SupremeManaPotion.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Potions item.consumable = true; item.rare = 10; item.value = Item.buyPrice(0, 6, 50, 0); - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } public override void AddRecipes() diff --git a/Items/ProfanedGuardian/ProfanedShard.cs b/Items/ProfanedGuardian/ProfanedShard.cs index fbded09cd4..4313eac320 100644 --- a/Items/ProfanedGuardian/ProfanedShard.cs +++ b/Items/ProfanedGuardian/ProfanedShard.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.ProfanedGuardian item.useTime = 45; item.useStyle = 4; item.consumable = true; - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } public override bool CanUseItem(Player player) diff --git a/Items/Providence/DivineGeode.cs b/Items/Providence/DivineGeode.cs index e36a879f5c..be1a60268d 100644 --- a/Items/Providence/DivineGeode.cs +++ b/Items/Providence/DivineGeode.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Providence item.maxStack = 999; item.rare = 10; item.value = Item.buyPrice(0, 6, 50, 0); - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } public override void Update(ref float gravity, ref float maxFallSpeed) diff --git a/Items/Providence/ElysianAegis.cs b/Items/Providence/ElysianAegis.cs index 87821bf75c..3ef79c8bf1 100644 --- a/Items/Providence/ElysianAegis.cs +++ b/Items/Providence/ElysianAegis.cs @@ -25,14 +25,14 @@ namespace CalamityMod.Items.Providence item.height = 42; item.value = Item.buyPrice(0, 60, 0, 0); item.rare = 10; - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; item.defense = 8; item.accessory = true; } public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (!hideVisual) { modPlayer.dashMod = 3; } modPlayer.elysianAegis = true; player.noKnockback = true; diff --git a/Items/Providence/ElysianWings.cs b/Items/Providence/ElysianWings.cs index 06758ea52a..d5009757a3 100644 --- a/Items/Providence/ElysianWings.cs +++ b/Items/Providence/ElysianWings.cs @@ -22,13 +22,13 @@ namespace CalamityMod.Items.Providence item.height = 32; item.value = Item.buyPrice(0, 45, 0, 0); item.rare = 10; - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; item.accessory = true; } public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); player.moveSpeed += 0.4f; player.lavaMax += 240; player.wingTimeMax = 180; diff --git a/Items/Providence/ProfanedCore.cs b/Items/Providence/ProfanedCore.cs index 5f9b0ec286..82283e68aa 100644 --- a/Items/Providence/ProfanedCore.cs +++ b/Items/Providence/ProfanedCore.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Providence item.useStyle = 4; item.consumable = true; item.rare = 10; - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } public override bool CanUseItem(Player player) diff --git a/Items/Providence/ProfanedCoreUnlimited.cs b/Items/Providence/ProfanedCoreUnlimited.cs index 3916ca77f5..b38f61fdee 100644 --- a/Items/Providence/ProfanedCoreUnlimited.cs +++ b/Items/Providence/ProfanedCoreUnlimited.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Providence item.useStyle = 4; item.consumable = false; item.rare = 10; - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } public override bool CanUseItem(Player player) diff --git a/Items/Providence/UnholyEssence.cs b/Items/Providence/UnholyEssence.cs index a9911dcd54..710bd1f40a 100644 --- a/Items/Providence/UnholyEssence.cs +++ b/Items/Providence/UnholyEssence.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Providence item.maxStack = 999; item.rare = 10; item.value = Item.buyPrice(0, 6, 50, 0); - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } public override void Update(ref float gravity, ref float maxFallSpeed) diff --git a/Items/Scavenger/BloodPact.cs b/Items/Scavenger/BloodPact.cs index 52bcda2ad0..ab8ba21898 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.bloodPact = true; } } diff --git a/Items/Scavenger/FleshTotem.cs b/Items/Scavenger/FleshTotem.cs index cf6b65b703..5831edd8bb 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.fleshTotem = true; } } diff --git a/Items/ShrineItems/FungalSymbiote.cs b/Items/ShrineItems/FungalSymbiote.cs index 2a3ad12df4..7ee066bd3f 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.fungalSymbiote = true; } } diff --git a/Items/ShrineItems/GladiatorsLocket.cs b/Items/ShrineItems/GladiatorsLocket.cs index 4267ee87c7..5da751112f 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.GetCalamityPlayer(); //there might be an upgrade sometime later? + CalamityPlayer modPlayer = player.Calamity(); //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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.gladiatorSword = true; if (player.whoAmI == Main.myPlayer) { diff --git a/Items/ShrineItems/LuxorsGift.cs b/Items/ShrineItems/LuxorsGift.cs index d9f74251a1..25948eca9d 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.luxorsGift = true; } } diff --git a/Items/ShrineItems/TrinketofChi.cs b/Items/ShrineItems/TrinketofChi.cs index a1bae1345e..3d5519b0a1 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.trinketOfChi = true; } } diff --git a/Items/ShrineItems/UnstablePrism.cs b/Items/ShrineItems/UnstablePrism.cs index 6f922f23d2..0c8ca5dd17 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.unstablePrism = true; } } diff --git a/Items/SlimeGod/ManaOverloader.cs b/Items/SlimeGod/ManaOverloader.cs index 78315a659f..99511ab5da 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.manaOverloader = true; player.statManaMax2 += 50; } diff --git a/Items/SunkenSea/GiantPearl.cs b/Items/SunkenSea/GiantPearl.cs index 00737cf460..fa4d8c8093 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); 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/SupremeCalamitas/EyeofExtinction.cs b/Items/SupremeCalamitas/EyeofExtinction.cs index cfea0e774e..76da29d737 100644 --- a/Items/SupremeCalamitas/EyeofExtinction.cs +++ b/Items/SupremeCalamitas/EyeofExtinction.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.SupremeCalamitas item.useTime = 45; item.useStyle = 4; item.consumable = false; - item.GetGlobalItem(mod).postMoonLordRarity = 15; + item.Calamity().postMoonLordRarity = 15; } public override bool CanUseItem(Player player) diff --git a/Items/TheDevourerofGods/CosmicWorm.cs b/Items/TheDevourerofGods/CosmicWorm.cs index deacb77caf..07fa3f18ce 100644 --- a/Items/TheDevourerofGods/CosmicWorm.cs +++ b/Items/TheDevourerofGods/CosmicWorm.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.TheDevourerofGods item.useTime = 45; item.useStyle = 4; item.consumable = false; - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().postMoonLordRarity = 13; } public override bool CanUseItem(Player player) diff --git a/Items/TheDevourerofGods/CosmiliteBar.cs b/Items/TheDevourerofGods/CosmiliteBar.cs index c918e50a5d..63c3b24d2d 100644 --- a/Items/TheDevourerofGods/CosmiliteBar.cs +++ b/Items/TheDevourerofGods/CosmiliteBar.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.TheDevourerofGods item.height = 24; item.maxStack = 999; item.value = Item.buyPrice(0, 7, 0, 0); - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().postMoonLordRarity = 13; } public override void Update(ref float gravity, ref float maxFallSpeed) diff --git a/Items/TheDevourerofGods/DevourerofGodsBag.cs b/Items/TheDevourerofGods/DevourerofGodsBag.cs index 6103503423..d2af0d2fd8 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.GetCalamityPlayer().fabsolVodka; + bool vodka = player.Calamity().fabsolVodka; DropHelper.DropItemCondition(player, mod.ItemType("Fabsol"), CalamityWorld.revenge && vodka); // Vanity diff --git a/Items/TheDevourerofGods/NebulousCore.cs b/Items/TheDevourerofGods/NebulousCore.cs index 78f970293c..77a8c6010b 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.nCore = true; player.allDamage += 0.12f; int damage = 1500; diff --git a/Items/Tools/BlossomPickaxe.cs b/Items/Tools/BlossomPickaxe.cs index 6068d52968..8500ac212a 100644 --- a/Items/Tools/BlossomPickaxe.cs +++ b/Items/Tools/BlossomPickaxe.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Tools item.UseSound = SoundID.Item1; item.autoReuse = true; item.tileBoost += 6; - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } public override void AddRecipes() diff --git a/Items/Tools/CrystylCrusher.cs b/Items/Tools/CrystylCrusher.cs index 8d139af935..0753d4bdfa 100644 --- a/Items/Tools/CrystylCrusher.cs +++ b/Items/Tools/CrystylCrusher.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Tools item.rare = 10; item.UseSound = SoundID.Item1; item.autoReuse = true; - item.GetGlobalItem(mod).postMoonLordRarity = 16; + item.Calamity().postMoonLordRarity = 16; } public override bool AltFunctionUse(Player player) diff --git a/Items/Tools/GallantPickaxe.cs b/Items/Tools/GallantPickaxe.cs index 13c2c298c5..92e60c1d87 100644 --- a/Items/Tools/GallantPickaxe.cs +++ b/Items/Tools/GallantPickaxe.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Tools item.UseSound = SoundID.Item1; item.autoReuse = true; item.tileBoost += 5; - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } public override void AddRecipes() diff --git a/Items/Weapons/AMR.cs b/Items/Weapons/AMR.cs index bb472edefc..6eb7271a81 100644 --- a/Items/Weapons/AMR.cs +++ b/Items/Weapons/AMR.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons item.shoot = 10; item.shootSpeed = 12f; item.useAmmo = 97; - item.GetGlobalItem(mod).postMoonLordRarity = 14; + item.Calamity().postMoonLordRarity = 14; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/AbyssWeapons/CalamarisLament.cs b/Items/Weapons/AbyssWeapons/CalamarisLament.cs index feedd9f632..08fd79669f 100644 --- a/Items/Weapons/AbyssWeapons/CalamarisLament.cs +++ b/Items/Weapons/AbyssWeapons/CalamarisLament.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.AbyssWeapons item.shoot = mod.ProjectileType("Calamari"); item.shootSpeed = 10f; item.summon = true; - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().postMoonLordRarity = 13; } public override bool AltFunctionUse(Player player) diff --git a/Items/Weapons/AbyssWeapons/EidolicWail.cs b/Items/Weapons/AbyssWeapons/EidolicWail.cs index da1f79e81b..794085844d 100644 --- a/Items/Weapons/AbyssWeapons/EidolicWail.cs +++ b/Items/Weapons/AbyssWeapons/EidolicWail.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.AbyssWeapons item.autoReuse = true; item.shootSpeed = 5f; item.shoot = mod.ProjectileType("EidolicWail"); - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().postMoonLordRarity = 13; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/AbyssWeapons/SoulEdge.cs b/Items/Weapons/AbyssWeapons/SoulEdge.cs index fe4baeed89..462221dcca 100644 --- a/Items/Weapons/AbyssWeapons/SoulEdge.cs +++ b/Items/Weapons/AbyssWeapons/SoulEdge.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.AbyssWeapons item.rare = 10; item.shoot = mod.ProjectileType("GhastlySoulLarge"); item.shootSpeed = 12f; - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().postMoonLordRarity = 13; } 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) diff --git a/Items/Weapons/AbyssWeapons/SulphuricAcidCannon.cs b/Items/Weapons/AbyssWeapons/SulphuricAcidCannon.cs index a96b06fb29..26d819c04d 100644 --- a/Items/Weapons/AbyssWeapons/SulphuricAcidCannon.cs +++ b/Items/Weapons/AbyssWeapons/SulphuricAcidCannon.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.AbyssWeapons item.UseSound = SoundID.Item95; item.shoot = mod.ProjectileType("SulphuricAcidCannon2"); item.shootSpeed = 16f; - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().postMoonLordRarity = 13; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/AccretionDiskMelee.cs b/Items/Weapons/AccretionDiskMelee.cs index bc5d1eb3b1..6a590e9d4b 100644 --- a/Items/Weapons/AccretionDiskMelee.cs +++ b/Items/Weapons/AccretionDiskMelee.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons item.rare = 10; item.shoot = mod.ProjectileType("AccretionDiskMelee"); item.shootSpeed = 13f; - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } public override void AddRecipes() diff --git a/Items/Weapons/AegisBlade.cs b/Items/Weapons/AegisBlade.cs index 007e4fbe03..71bb7fe818 100644 --- a/Items/Weapons/AegisBlade.cs +++ b/Items/Weapons/AegisBlade.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons item.rare = 7; item.value = Item.buyPrice(0, 60, 0, 0); item.shootSpeed = 14f; - item.GetGlobalItem(mod).postMoonLordRarity = 17; + item.Calamity().postMoonLordRarity = 17; } public override bool AltFunctionUse(Player player) diff --git a/Items/Weapons/AethersWhisper.cs b/Items/Weapons/AethersWhisper.cs index 8d785c604b..600ee3cdd2 100644 --- a/Items/Weapons/AethersWhisper.cs +++ b/Items/Weapons/AethersWhisper.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons item.autoReuse = true; item.shootSpeed = 12f; item.shoot = mod.ProjectileType("AetherBeam"); - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().postMoonLordRarity = 13; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/Alluvion.cs b/Items/Weapons/Alluvion.cs index 029fdae546..ad1ef08eed 100644 --- a/Items/Weapons/Alluvion.cs +++ b/Items/Weapons/Alluvion.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons item.shoot = 1; item.shootSpeed = 17f; item.useAmmo = 40; - item.GetGlobalItem(mod).postMoonLordRarity = 14; + item.Calamity().postMoonLordRarity = 14; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) @@ -69,7 +69,7 @@ namespace CalamityMod.Items.Weapons type = mod.ProjectileType("TyphoonArrow"); } int num121 = Projectile.NewProjectile(vector2.X + value9.X, vector2.Y + value9.Y, speedX, speedY, type, damage, knockBack, player.whoAmI, 0f, 0f); - Main.projectile[num121].GetGlobalProjectile(mod).forceRanged = true; + Main.projectile[num121].Calamity().forceRanged = true; Main.projectile[num121].noDropItem = true; } else diff --git a/Items/Weapons/AlphaRay.cs b/Items/Weapons/AlphaRay.cs index 3f713c9d96..e9b4735499 100644 --- a/Items/Weapons/AlphaRay.cs +++ b/Items/Weapons/AlphaRay.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons item.autoReuse = true; item.shootSpeed = 6f; item.shoot = mod.ProjectileType("ParticleBeamofDoom"); - item.GetGlobalItem(mod).postMoonLordRarity = 14; + item.Calamity().postMoonLordRarity = 14; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/Animus.cs b/Items/Weapons/Animus.cs index 5c6fd2d96c..b72936035b 100644 --- a/Items/Weapons/Animus.cs +++ b/Items/Weapons/Animus.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons item.height = 90; item.value = Item.buyPrice(5, 0, 0, 0); item.rare = 10; - item.GetGlobalItem(mod).postMoonLordRarity = 16; + item.Calamity().postMoonLordRarity = 16; } public override void AddRecipes() diff --git a/Items/Weapons/ApoctosisArray.cs b/Items/Weapons/ApoctosisArray.cs index ae0af77395..17be2d8edf 100644 --- a/Items/Weapons/ApoctosisArray.cs +++ b/Items/Weapons/ApoctosisArray.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons item.rare = 10; item.shoot = mod.ProjectileType("IonBlast"); item.shootSpeed = 8f; - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/Apotheosis.cs b/Items/Weapons/Apotheosis.cs index b53a0035c3..aaf60f5c47 100644 --- a/Items/Weapons/Apotheosis.cs +++ b/Items/Weapons/Apotheosis.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons item.autoReuse = true; item.shoot = mod.ProjectileType("ApothMark"); item.shootSpeed = 15; - item.GetGlobalItem(mod).postMoonLordRarity = 16; + item.Calamity().postMoonLordRarity = 16; } public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) diff --git a/Items/Weapons/AquaticDissolution.cs b/Items/Weapons/AquaticDissolution.cs index 71009ecc89..fd04db1ea4 100644 --- a/Items/Weapons/AquaticDissolution.cs +++ b/Items/Weapons/AquaticDissolution.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons item.rare = 10; item.shoot = mod.ProjectileType("OceanBeam"); item.shootSpeed = 12f; - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/ArkoftheAncients.cs b/Items/Weapons/ArkoftheAncients.cs index 394e8e3b04..874b41e64b 100644 --- a/Items/Weapons/ArkoftheAncients.cs +++ b/Items/Weapons/ArkoftheAncients.cs @@ -88,7 +88,7 @@ namespace CalamityMod.Items.Weapons float speedX4 = num78 + (float)Main.rand.Next(-120, 121) * 0.02f; float speedY5 = num79 + (float)Main.rand.Next(-120, 121) * 0.02f; int proj = Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, speedY5, 92, damage / 2, knockBack, player.whoAmI, 0f, (float)Main.rand.Next(5)); - Main.projectile[proj].GetGlobalProjectile(mod).forceMelee = true; + Main.projectile[proj].Calamity().forceMelee = true; } return false; } diff --git a/Items/Weapons/ArkoftheCosmos.cs b/Items/Weapons/ArkoftheCosmos.cs index 8dc43b5228..2c20c615c9 100644 --- a/Items/Weapons/ArkoftheCosmos.cs +++ b/Items/Weapons/ArkoftheCosmos.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons item.rare = 10; item.shoot = mod.ProjectileType("EonBeam"); item.shootSpeed = 28f; - item.GetGlobalItem(mod).postMoonLordRarity = 15; + item.Calamity().postMoonLordRarity = 15; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/ArkoftheElements.cs b/Items/Weapons/ArkoftheElements.cs index 36fb4767fd..ccd8e2f686 100644 --- a/Items/Weapons/ArkoftheElements.cs +++ b/Items/Weapons/ArkoftheElements.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons item.rare = 10; item.shoot = mod.ProjectileType("EonBeam"); item.shootSpeed = 16f; - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/ArterialAssault.cs b/Items/Weapons/ArterialAssault.cs index 371814cc7d..061bd257f0 100644 --- a/Items/Weapons/ArterialAssault.cs +++ b/Items/Weapons/ArterialAssault.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons item.shoot = mod.ProjectileType("BloodfireArrow"); item.shootSpeed = 30f; item.useAmmo = 40; - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().postMoonLordRarity = 13; } public override void AddRecipes() diff --git a/Items/Weapons/AsteroidStaff.cs b/Items/Weapons/AsteroidStaff.cs index 258746a422..3bf2141bd5 100644 --- a/Items/Weapons/AsteroidStaff.cs +++ b/Items/Weapons/AsteroidStaff.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons item.autoReuse = true; item.shoot = mod.ProjectileType("Asteroid"); item.shootSpeed = 20f; - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } public override void AddRecipes() diff --git a/Items/Weapons/AuguroftheElements.cs b/Items/Weapons/AuguroftheElements.cs index 7f1224a1bd..401444dc63 100644 --- a/Items/Weapons/AuguroftheElements.cs +++ b/Items/Weapons/AuguroftheElements.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons item.autoReuse = true; item.shoot = mod.ProjectileType("ElementTentacle"); item.shootSpeed = 30f; - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } public override void AddRecipes() diff --git a/Items/Weapons/Azathoth.cs b/Items/Weapons/Azathoth.cs index b4c731834f..d96b5080a2 100644 --- a/Items/Weapons/Azathoth.cs +++ b/Items/Weapons/Azathoth.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons item.rare = 10; item.autoReuse = true; item.shoot = mod.ProjectileType("AzathothProjectile"); - item.GetGlobalItem(mod).postMoonLordRarity = 16; + item.Calamity().postMoonLordRarity = 16; } public override void AddRecipes() diff --git a/Items/Weapons/BladedgeGreatbow.cs b/Items/Weapons/BladedgeGreatbow.cs index 604f4c4982..172aefe7a0 100644 --- a/Items/Weapons/BladedgeGreatbow.cs +++ b/Items/Weapons/BladedgeGreatbow.cs @@ -65,7 +65,7 @@ namespace CalamityMod.Items.Weapons value9 -= vector7; } int projectile = Projectile.NewProjectile(vector2.X + value9.X, vector2.Y + value9.Y, speedX, speedY, ProjectileID.Leaf, damage, 0f, player.whoAmI, 0f, 0f); - Main.projectile[projectile].GetGlobalProjectile(mod).forceRanged = true; + Main.projectile[projectile].Calamity().forceRanged = true; } return false; } diff --git a/Items/Weapons/BloodfireArrow.cs b/Items/Weapons/BloodfireArrow.cs index 520ea56ef6..554e3f2893 100644 --- a/Items/Weapons/BloodfireArrow.cs +++ b/Items/Weapons/BloodfireArrow.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Weapons item.shoot = mod.ProjectileType("BloodfireArrow"); item.shootSpeed = 10f; item.ammo = 40; - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().postMoonLordRarity = 13; } public override void AddRecipes() diff --git a/Items/Weapons/BlossomFlux.cs b/Items/Weapons/BlossomFlux.cs index 154725cc7d..98e3769776 100644 --- a/Items/Weapons/BlossomFlux.cs +++ b/Items/Weapons/BlossomFlux.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons item.shoot = mod.ProjectileType("LeafArrow"); item.shootSpeed = 10f; item.useAmmo = 40; - item.GetGlobalItem(mod).postMoonLordRarity = 17; + item.Calamity().postMoonLordRarity = 17; } public override bool AltFunctionUse(Player player) diff --git a/Items/Weapons/BlushieStaff.cs b/Items/Weapons/BlushieStaff.cs index 578ae56cd1..17e36ad2dd 100644 --- a/Items/Weapons/BlushieStaff.cs +++ b/Items/Weapons/BlushieStaff.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons item.shoot = mod.ProjectileType("BlushieStaffProj"); item.mana = 200; item.shootSpeed = 0f; - item.GetGlobalItem(mod).postMoonLordRarity = 19; + item.Calamity().postMoonLordRarity = 19; } public override void AddRecipes() diff --git a/Items/Weapons/BrinyBaron.cs b/Items/Weapons/BrinyBaron.cs index 2faadc5632..e0f0be08c0 100644 --- a/Items/Weapons/BrinyBaron.cs +++ b/Items/Weapons/BrinyBaron.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons item.value = Item.buyPrice(0, 80, 0, 0); item.rare = 8; item.shootSpeed = 4f; - item.GetGlobalItem(mod).postMoonLordRarity = 17; + item.Calamity().postMoonLordRarity = 17; } public override bool AltFunctionUse(Player player) diff --git a/Items/Weapons/Bumblebirb/GildedProboscis.cs b/Items/Weapons/Bumblebirb/GildedProboscis.cs index b51f72b7b2..248d265b50 100644 --- a/Items/Weapons/Bumblebirb/GildedProboscis.cs +++ b/Items/Weapons/Bumblebirb/GildedProboscis.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Bumblebirb item.rare = 10; item.shoot = mod.ProjectileType("GildedProboscis"); item.shootSpeed = 13f; - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } public override bool CanUseItem(Player player) diff --git a/Items/Weapons/Bumblebirb/GoldenEagle.cs b/Items/Weapons/Bumblebirb/GoldenEagle.cs index 35395959b8..d382adba64 100644 --- a/Items/Weapons/Bumblebirb/GoldenEagle.cs +++ b/Items/Weapons/Bumblebirb/GoldenEagle.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Weapons.Bumblebirb item.shoot = 10; item.shootSpeed = 20f; item.useAmmo = 97; - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/Bumblebirb/RougeSlash.cs b/Items/Weapons/Bumblebirb/RougeSlash.cs index 41b3d44a11..413f2449be 100644 --- a/Items/Weapons/Bumblebirb/RougeSlash.cs +++ b/Items/Weapons/Bumblebirb/RougeSlash.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Bumblebirb item.autoReuse = true; item.shoot = mod.ProjectileType("RougeSlashLarge"); item.shootSpeed = 24f; - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/ClaretCannon.cs b/Items/Weapons/ClaretCannon.cs index 7626bcb653..57bf6fe8fd 100644 --- a/Items/Weapons/ClaretCannon.cs +++ b/Items/Weapons/ClaretCannon.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons item.shootSpeed = 24f; item.shoot = mod.ProjectileType("BloodfireBullet"); item.useAmmo = 97; - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().postMoonLordRarity = 13; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/CleansingBlaze.cs b/Items/Weapons/CleansingBlaze.cs index bc2f8af1e6..1ad7c85b69 100644 --- a/Items/Weapons/CleansingBlaze.cs +++ b/Items/Weapons/CleansingBlaze.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons item.shoot = mod.ProjectileType("EssenceFire"); item.shootSpeed = 14f; item.useAmmo = 23; - item.GetGlobalItem(mod).postMoonLordRarity = 14; + item.Calamity().postMoonLordRarity = 14; } public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) diff --git a/Items/Weapons/Climax.cs b/Items/Weapons/Climax.cs index 36009057ae..d679f5b62a 100644 --- a/Items/Weapons/Climax.cs +++ b/Items/Weapons/Climax.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons item.autoReuse = true; item.shoot = mod.ProjectileType("Climax"); item.shootSpeed = 12f; - item.GetGlobalItem(mod).postMoonLordRarity = 14; + item.Calamity().postMoonLordRarity = 14; } 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) diff --git a/Items/Weapons/ClockworkBow.cs b/Items/Weapons/ClockworkBow.cs index 0cc82248e8..4c7b6be98e 100644 --- a/Items/Weapons/ClockworkBow.cs +++ b/Items/Weapons/ClockworkBow.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons item.shoot = 10; item.shootSpeed = 30f; item.useAmmo = 40; - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } public override void AddRecipes() diff --git a/Items/Weapons/CometQuasher.cs b/Items/Weapons/CometQuasher.cs index c28bffb1a8..bd6fca1323 100644 --- a/Items/Weapons/CometQuasher.cs +++ b/Items/Weapons/CometQuasher.cs @@ -84,7 +84,7 @@ namespace CalamityMod.Items.Weapons float num114 = num78; float num115 = num79 + (float)Main.rand.Next(-40, 41) * 0.02f; int proj = Projectile.NewProjectile(vector2.X, vector2.Y, num114 * 0.75f, num115 * 0.75f, 424 + Main.rand.Next(3), (int)((float)item.damage * player.meleeDamage * 0.75f), knockback, player.whoAmI, 0f, 0.5f + (float)Main.rand.NextDouble() * 0.3f); - Main.projectile[proj].GetGlobalProjectile(mod).forceMelee = true; + Main.projectile[proj].Calamity().forceMelee = true; } } diff --git a/Items/Weapons/Contagion.cs b/Items/Weapons/Contagion.cs index 90d2cbd61c..d06f6fba2d 100644 --- a/Items/Weapons/Contagion.cs +++ b/Items/Weapons/Contagion.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons item.shoot = mod.ProjectileType("Contagion"); item.shootSpeed = 20f; item.useAmmo = 40; - item.GetGlobalItem(mod).postMoonLordRarity = 16; + item.Calamity().postMoonLordRarity = 16; } public override void AddRecipes() diff --git a/Items/Weapons/CosmicDischarge.cs b/Items/Weapons/CosmicDischarge.cs index 84f1510ec4..be6724f9a6 100644 --- a/Items/Weapons/CosmicDischarge.cs +++ b/Items/Weapons/CosmicDischarge.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons item.rare = 10; item.shootSpeed = 24f; item.shoot = mod.ProjectileType("CosmicDischarge"); - item.GetGlobalItem(mod).postMoonLordRarity = 17; + item.Calamity().postMoonLordRarity = 17; } 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) diff --git a/Items/Weapons/CosmicImmaterializer.cs b/Items/Weapons/CosmicImmaterializer.cs index b88fb7fa4b..7c5531df76 100644 --- a/Items/Weapons/CosmicImmaterializer.cs +++ b/Items/Weapons/CosmicImmaterializer.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Items.Weapons item.shoot = mod.ProjectileType("CosmicEnergy"); item.shootSpeed = 10f; item.summon = true; - item.GetGlobalItem(mod).postMoonLordRarity = 15; + item.Calamity().postMoonLordRarity = 15; } public override bool CanUseItem(Player player) @@ -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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); 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/Cosmilamp.cs b/Items/Weapons/Cosmilamp.cs index faefaf9078..e87aefd42a 100644 --- a/Items/Weapons/Cosmilamp.cs +++ b/Items/Weapons/Cosmilamp.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons item.shoot = mod.ProjectileType("Cosmilamp"); item.shootSpeed = 10f; item.summon = true; - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().postMoonLordRarity = 13; } 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) diff --git a/Items/Weapons/Crabulon/HyphaeRod.cs b/Items/Weapons/Crabulon/HyphaeRod.cs index b299237d17..c908d4bec8 100644 --- a/Items/Weapons/Crabulon/HyphaeRod.cs +++ b/Items/Weapons/Crabulon/HyphaeRod.cs @@ -86,7 +86,7 @@ namespace CalamityMod.Items.Weapons.Crabulon float speedX4 = num78 + (float)Main.rand.Next(-180, 181) * 0.02f; float speedY5 = num79 + (float)Main.rand.Next(-180, 181) * 0.02f; int proj = Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, speedY5, type, damage, knockBack, i, 0f, (float)Main.rand.Next(3)); - Main.projectile[proj].GetGlobalProjectile(mod).forceMagic = true; + Main.projectile[proj].Calamity().forceMagic = true; } return false; } diff --git a/Items/Weapons/Cryogen/GlacialCrusher.cs b/Items/Weapons/Cryogen/GlacialCrusher.cs index 9202fd1c2d..b0f098a3fc 100644 --- a/Items/Weapons/Cryogen/GlacialCrusher.cs +++ b/Items/Weapons/Cryogen/GlacialCrusher.cs @@ -60,7 +60,7 @@ namespace CalamityMod.Items.Weapons.Cryogen damage *= 2; knockBack *= 2f; } - else if (target.GetGlobalNPC(mod).gState) + else if (target.Calamity().gState) { damage *= 3; knockBack *= 3f; diff --git a/Items/Weapons/Devastation.cs b/Items/Weapons/Devastation.cs index 9545992ade..2dbbf299dd 100644 --- a/Items/Weapons/Devastation.cs +++ b/Items/Weapons/Devastation.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons item.rare = 10; item.shoot = mod.ProjectileType("GalaxyBlast"); item.shootSpeed = 16f; - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/DevilsDevastation.cs b/Items/Weapons/DevilsDevastation.cs index f8e0d6bcba..08c1fedb96 100644 --- a/Items/Weapons/DevilsDevastation.cs +++ b/Items/Weapons/DevilsDevastation.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons item.rare = 10; item.shoot = mod.ProjectileType("Oathblade"); item.shootSpeed = 28f; - item.GetGlobalItem(mod).postMoonLordRarity = 14; + item.Calamity().postMoonLordRarity = 14; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/DevourerofGods/DeathhailStaff.cs b/Items/Weapons/DevourerofGods/DeathhailStaff.cs index 5dbd09a08f..69a7732eea 100644 --- a/Items/Weapons/DevourerofGods/DeathhailStaff.cs +++ b/Items/Weapons/DevourerofGods/DeathhailStaff.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Weapons.DevourerofGods item.autoReuse = true; item.shoot = mod.ProjectileType("MagicNebulaShot"); item.shootSpeed = 18f; - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().postMoonLordRarity = 13; } public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) diff --git a/Items/Weapons/DevourerofGods/Deathwind.cs b/Items/Weapons/DevourerofGods/Deathwind.cs index 5bd1bde2d7..50e02cb851 100644 --- a/Items/Weapons/DevourerofGods/Deathwind.cs +++ b/Items/Weapons/DevourerofGods/Deathwind.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.DevourerofGods item.shoot = mod.ProjectileType("NebulaShot"); item.shootSpeed = 20f; item.useAmmo = 40; - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().postMoonLordRarity = 13; } public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) diff --git a/Items/Weapons/DevourerofGods/EradicatorMelee.cs b/Items/Weapons/DevourerofGods/EradicatorMelee.cs index 581ca3485c..dc4b3281d6 100644 --- a/Items/Weapons/DevourerofGods/EradicatorMelee.cs +++ b/Items/Weapons/DevourerofGods/EradicatorMelee.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.DevourerofGods item.rare = 10; item.shoot = mod.ProjectileType("EradicatorMeleeProjectile"); item.shootSpeed = 12f; - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().postMoonLordRarity = 13; } public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) diff --git a/Items/Weapons/DevourerofGods/Excelsus.cs b/Items/Weapons/DevourerofGods/Excelsus.cs index 871ac8b10a..1a7e2d22f2 100644 --- a/Items/Weapons/DevourerofGods/Excelsus.cs +++ b/Items/Weapons/DevourerofGods/Excelsus.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.DevourerofGods item.rare = 10; item.shoot = mod.ProjectileType("Excelsus"); item.shootSpeed = 12f; - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().postMoonLordRarity = 13; } public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) diff --git a/Items/Weapons/DevourerofGods/StaffoftheMechworm.cs b/Items/Weapons/DevourerofGods/StaffoftheMechworm.cs index f4c4079ba0..1089d3c3b7 100644 --- a/Items/Weapons/DevourerofGods/StaffoftheMechworm.cs +++ b/Items/Weapons/DevourerofGods/StaffoftheMechworm.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.DevourerofGods item.shoot = mod.ProjectileType("MechwormHead"); item.shootSpeed = 10f; item.summon = true; - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().postMoonLordRarity = 13; } public override bool CanUseItem(Player player) diff --git a/Items/Weapons/DevourerofGods/TheObliterator.cs b/Items/Weapons/DevourerofGods/TheObliterator.cs index 2e36fc8514..72c8981fac 100644 --- a/Items/Weapons/DevourerofGods/TheObliterator.cs +++ b/Items/Weapons/DevourerofGods/TheObliterator.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons.DevourerofGods item.rare = 10; item.autoReuse = true; item.shoot = mod.ProjectileType("TheObliterator"); - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().postMoonLordRarity = 13; } } } diff --git a/Items/Weapons/DraconicDestruction.cs b/Items/Weapons/DraconicDestruction.cs index 50c2d509f0..40ca2f9ab2 100644 --- a/Items/Weapons/DraconicDestruction.cs +++ b/Items/Weapons/DraconicDestruction.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons item.rare = 10; item.shoot = mod.ProjectileType("DracoBeam"); item.shootSpeed = 14f; - item.GetGlobalItem(mod).postMoonLordRarity = 16; + item.Calamity().postMoonLordRarity = 16; } public override void AddRecipes() diff --git a/Items/Weapons/DraedonsExoblade.cs b/Items/Weapons/DraedonsExoblade.cs index 5a855aa33b..a38ffb8a79 100644 --- a/Items/Weapons/DraedonsExoblade.cs +++ b/Items/Weapons/DraedonsExoblade.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Items.Weapons item.rare = 10; item.shoot = mod.ProjectileType("Exobeam"); item.shootSpeed = 19f; - item.GetGlobalItem(mod).postMoonLordRarity = 15; + item.Calamity().postMoonLordRarity = 15; } // Gains 100% of missing health as base damage. diff --git a/Items/Weapons/Drataliornus.cs b/Items/Weapons/Drataliornus.cs index f91a4880bd..2c8f297b6f 100644 --- a/Items/Weapons/Drataliornus.cs +++ b/Items/Weapons/Drataliornus.cs @@ -39,7 +39,7 @@ Right click to fire two devastating barrages of five empowered fireballs. item.useTurn = false; item.useAmmo = AmmoID.Arrow; item.autoReuse = true; - item.GetGlobalItem(mod).postMoonLordRarity = 16; + item.Calamity().postMoonLordRarity = 16; } public override bool AltFunctionUse(Player player) diff --git a/Items/Weapons/Earth.cs b/Items/Weapons/Earth.cs index 501daf4cc4..98a81454ae 100644 --- a/Items/Weapons/Earth.cs +++ b/Items/Weapons/Earth.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons item.height = 104; item.value = Item.buyPrice(5, 0, 0, 0); item.rare = 10; - item.GetGlobalItem(mod).postMoonLordRarity = 16; + item.Calamity().postMoonLordRarity = 16; } public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit) diff --git a/Items/Weapons/Effervescence.cs b/Items/Weapons/Effervescence.cs index 69af5c6079..9e14902d9d 100644 --- a/Items/Weapons/Effervescence.cs +++ b/Items/Weapons/Effervescence.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons item.autoReuse = true; item.shootSpeed = 13f; item.shoot = mod.ProjectileType("UberBubble"); - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } 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) diff --git a/Items/Weapons/ElementalAxe.cs b/Items/Weapons/ElementalAxe.cs index 93eb351dbd..b2825eac32 100644 --- a/Items/Weapons/ElementalAxe.cs +++ b/Items/Weapons/ElementalAxe.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons item.autoReuse = true; item.shoot = mod.ProjectileType("ElementalAxe"); item.shootSpeed = 10f; - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } public override bool AltFunctionUse(Player player) diff --git a/Items/Weapons/ElementalBlaster.cs b/Items/Weapons/ElementalBlaster.cs index 74f60f4ad4..9010dd55f9 100644 --- a/Items/Weapons/ElementalBlaster.cs +++ b/Items/Weapons/ElementalBlaster.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons item.autoReuse = true; item.shoot = mod.ProjectileType("RainbowBlast"); item.shootSpeed = 18f; - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/ElementalEruption.cs b/Items/Weapons/ElementalEruption.cs index 4ab56317f4..bc7060cb42 100644 --- a/Items/Weapons/ElementalEruption.cs +++ b/Items/Weapons/ElementalEruption.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons item.shoot = mod.ProjectileType("TerraFireGreen2"); item.shootSpeed = 10f; item.useAmmo = 23; - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/ElementalExcalibur.cs b/Items/Weapons/ElementalExcalibur.cs index 61c77a29b9..a24418040d 100644 --- a/Items/Weapons/ElementalExcalibur.cs +++ b/Items/Weapons/ElementalExcalibur.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Items.Weapons item.rare = 10; item.shoot = mod.ProjectileType("ElementalExcaliburBeam"); item.shootSpeed = 12f; - item.GetGlobalItem(mod).postMoonLordRarity = 20; + item.Calamity().postMoonLordRarity = 20; } public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) diff --git a/Items/Weapons/ElementalRay.cs b/Items/Weapons/ElementalRay.cs index 284127de2d..056b4d7ca0 100644 --- a/Items/Weapons/ElementalRay.cs +++ b/Items/Weapons/ElementalRay.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons item.autoReuse = true; item.shoot = mod.ProjectileType("ElementRay"); item.shootSpeed = 6f; - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } public override void AddRecipes() diff --git a/Items/Weapons/ElementalShortsword.cs b/Items/Weapons/ElementalShortsword.cs index 2523c59e50..9d5314c44f 100644 --- a/Items/Weapons/ElementalShortsword.cs +++ b/Items/Weapons/ElementalShortsword.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons item.shootSpeed = 14f; item.value = Item.buyPrice(1, 20, 0, 0); item.rare = 10; - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } 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) diff --git a/Items/Weapons/ElysianArrow.cs b/Items/Weapons/ElysianArrow.cs index 914df58bf8..8ba8603ded 100644 --- a/Items/Weapons/ElysianArrow.cs +++ b/Items/Weapons/ElysianArrow.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Weapons item.shoot = mod.ProjectileType("ElysianArrow"); item.shootSpeed = 10f; item.ammo = 40; - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } public override void AddRecipes() diff --git a/Items/Weapons/EmpyreanKnives.cs b/Items/Weapons/EmpyreanKnives.cs index e44f981f98..a9ffc51252 100644 --- a/Items/Weapons/EmpyreanKnives.cs +++ b/Items/Weapons/EmpyreanKnives.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons item.rare = 10; item.shoot = mod.ProjectileType("EmpyreanKnives"); item.shootSpeed = 15f; - item.GetGlobalItem(mod).postMoonLordRarity = 14; + item.Calamity().postMoonLordRarity = 14; } 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) diff --git a/Items/Weapons/EnergyStaff.cs b/Items/Weapons/EnergyStaff.cs index b13156f073..40eaa8cd1e 100644 --- a/Items/Weapons/EnergyStaff.cs +++ b/Items/Weapons/EnergyStaff.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons item.rare = 10; item.autoReuse = true; item.shoot = mod.ProjectileType("ProfanedEnergy"); - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } 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) diff --git a/Items/Weapons/EssenceFlayer.cs b/Items/Weapons/EssenceFlayer.cs index b929a44fec..b73ae2c9c7 100644 --- a/Items/Weapons/EssenceFlayer.cs +++ b/Items/Weapons/EssenceFlayer.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons item.rare = 10; item.shoot = mod.ProjectileType("EssenceScythe"); item.shootSpeed = 21f; - item.GetGlobalItem(mod).postMoonLordRarity = 14; + item.Calamity().postMoonLordRarity = 14; } public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) diff --git a/Items/Weapons/Fabstaff.cs b/Items/Weapons/Fabstaff.cs index 9b745bf5c8..752055d22b 100644 --- a/Items/Weapons/Fabstaff.cs +++ b/Items/Weapons/Fabstaff.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons item.autoReuse = true; item.shoot = mod.ProjectileType("FabRay"); item.shootSpeed = 6f; - item.GetGlobalItem(mod).postMoonLordRarity = 18; + item.Calamity().postMoonLordRarity = 18; } public override void AddRecipes() diff --git a/Items/Weapons/FiniteUse/Bazooka.cs b/Items/Weapons/FiniteUse/Bazooka.cs index 4ebe44f49a..e17b78a4e4 100644 --- a/Items/Weapons/FiniteUse/Bazooka.cs +++ b/Items/Weapons/FiniteUse/Bazooka.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Weapons.FiniteUse item.useAmmo = mod.ItemType("GrenadeRounds"); if (CalamityPlayer.areThereAnyDamnBosses) { - item.GetGlobalItem(mod).timesUsed = 2; + item.Calamity().timesUsed = 2; } } @@ -43,14 +43,14 @@ namespace CalamityMod.Items.Weapons.FiniteUse { if (CalamityPlayer.areThereAnyDamnBosses) { - item.GetGlobalItem(mod).timesUsed = 2; + item.Calamity().timesUsed = 2; } return true; } public override bool CanUseItem(Player player) { - return item.GetGlobalItem(mod).timesUsed < 2; + return item.Calamity().timesUsed < 2; } public override Vector2? HoldoutOffset() @@ -62,7 +62,7 @@ namespace CalamityMod.Items.Weapons.FiniteUse { if (!CalamityPlayer.areThereAnyDamnBosses) { - item.GetGlobalItem(mod).timesUsed = 0; + item.Calamity().timesUsed = 0; } } @@ -74,7 +74,7 @@ namespace CalamityMod.Items.Weapons.FiniteUse { if (player.inventory[i].type == item.type) { - player.inventory[i].GetGlobalItem(mod).timesUsed++; + player.inventory[i].Calamity().timesUsed++; } } } diff --git a/Items/Weapons/FiniteUse/ElephantKiller.cs b/Items/Weapons/FiniteUse/ElephantKiller.cs index 15edd3e7ea..3fdacba176 100644 --- a/Items/Weapons/FiniteUse/ElephantKiller.cs +++ b/Items/Weapons/FiniteUse/ElephantKiller.cs @@ -34,10 +34,10 @@ namespace CalamityMod.Items.Weapons.FiniteUse item.shootSpeed = 12f; item.shoot = mod.ProjectileType("MagnumRound"); item.useAmmo = mod.ItemType("MagnumRounds"); - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; if (CalamityPlayer.areThereAnyDamnBosses) { - item.GetGlobalItem(mod).timesUsed = 3; + item.Calamity().timesUsed = 3; } } @@ -45,14 +45,14 @@ namespace CalamityMod.Items.Weapons.FiniteUse { if (CalamityPlayer.areThereAnyDamnBosses) { - item.GetGlobalItem(mod).timesUsed = 3; + item.Calamity().timesUsed = 3; } return true; } public override bool CanUseItem(Player player) { - return item.GetGlobalItem(mod).timesUsed < 3; + return item.Calamity().timesUsed < 3; } public override Vector2? HoldoutOffset() @@ -64,7 +64,7 @@ namespace CalamityMod.Items.Weapons.FiniteUse { if (!CalamityPlayer.areThereAnyDamnBosses) { - item.GetGlobalItem(mod).timesUsed = 0; + item.Calamity().timesUsed = 0; } } @@ -76,7 +76,7 @@ namespace CalamityMod.Items.Weapons.FiniteUse { if (player.inventory[i].type == item.type) { - player.inventory[i].GetGlobalItem(mod).timesUsed++; + player.inventory[i].Calamity().timesUsed++; } } } diff --git a/Items/Weapons/FiniteUse/Hydra.cs b/Items/Weapons/FiniteUse/Hydra.cs index 8a22ef27d9..3fe1041a2c 100644 --- a/Items/Weapons/FiniteUse/Hydra.cs +++ b/Items/Weapons/FiniteUse/Hydra.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Weapons.FiniteUse item.useAmmo = mod.ItemType("ExplosiveShells"); if (CalamityPlayer.areThereAnyDamnBosses) { - item.GetGlobalItem(mod).timesUsed = 1; + item.Calamity().timesUsed = 1; } } @@ -43,14 +43,14 @@ namespace CalamityMod.Items.Weapons.FiniteUse { if (CalamityPlayer.areThereAnyDamnBosses) { - item.GetGlobalItem(mod).timesUsed = 1; + item.Calamity().timesUsed = 1; } return true; } public override bool CanUseItem(Player player) { - return item.GetGlobalItem(mod).timesUsed < 1; + return item.Calamity().timesUsed < 1; } public override Vector2? HoldoutOffset() @@ -62,7 +62,7 @@ namespace CalamityMod.Items.Weapons.FiniteUse { if (!CalamityPlayer.areThereAnyDamnBosses) { - item.GetGlobalItem(mod).timesUsed = 0; + item.Calamity().timesUsed = 0; } } @@ -80,7 +80,7 @@ namespace CalamityMod.Items.Weapons.FiniteUse { if (player.inventory[i].type == item.type) { - player.inventory[i].GetGlobalItem(mod).timesUsed++; + player.inventory[i].Calamity().timesUsed++; } } } diff --git a/Items/Weapons/FiniteUse/LightningHawk.cs b/Items/Weapons/FiniteUse/LightningHawk.cs index 59cf9997e0..fc426ee13d 100644 --- a/Items/Weapons/FiniteUse/LightningHawk.cs +++ b/Items/Weapons/FiniteUse/LightningHawk.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Weapons.FiniteUse item.useAmmo = mod.ItemType("MagnumRounds"); if (CalamityPlayer.areThereAnyDamnBosses) { - item.GetGlobalItem(mod).timesUsed = 3; + item.Calamity().timesUsed = 3; } } @@ -44,14 +44,14 @@ namespace CalamityMod.Items.Weapons.FiniteUse { if (CalamityPlayer.areThereAnyDamnBosses) { - item.GetGlobalItem(mod).timesUsed = 3; + item.Calamity().timesUsed = 3; } return true; } public override bool CanUseItem(Player player) { - return item.GetGlobalItem(mod).timesUsed < 3; + return item.Calamity().timesUsed < 3; } public override Vector2? HoldoutOffset() @@ -63,7 +63,7 @@ namespace CalamityMod.Items.Weapons.FiniteUse { if (!CalamityPlayer.areThereAnyDamnBosses) { - item.GetGlobalItem(mod).timesUsed = 0; + item.Calamity().timesUsed = 0; } } @@ -75,7 +75,7 @@ namespace CalamityMod.Items.Weapons.FiniteUse { if (player.inventory[i].type == item.type) { - player.inventory[i].GetGlobalItem(mod).timesUsed++; + player.inventory[i].Calamity().timesUsed++; } } } diff --git a/Items/Weapons/FiniteUse/Magnum.cs b/Items/Weapons/FiniteUse/Magnum.cs index 339a1302b5..d23e3fade1 100644 --- a/Items/Weapons/FiniteUse/Magnum.cs +++ b/Items/Weapons/FiniteUse/Magnum.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Weapons.FiniteUse item.useAmmo = mod.ItemType("MagnumRounds"); if (CalamityPlayer.areThereAnyDamnBosses) { - item.GetGlobalItem(mod).timesUsed = 3; + item.Calamity().timesUsed = 3; } } @@ -44,14 +44,14 @@ namespace CalamityMod.Items.Weapons.FiniteUse { if (CalamityPlayer.areThereAnyDamnBosses) { - item.GetGlobalItem(mod).timesUsed = 3; + item.Calamity().timesUsed = 3; } return true; } public override bool CanUseItem(Player player) { - return item.GetGlobalItem(mod).timesUsed < 3; + return item.Calamity().timesUsed < 3; } public override Vector2? HoldoutOffset() @@ -63,7 +63,7 @@ namespace CalamityMod.Items.Weapons.FiniteUse { if (!CalamityPlayer.areThereAnyDamnBosses) { - item.GetGlobalItem(mod).timesUsed = 0; + item.Calamity().timesUsed = 0; } } @@ -75,7 +75,7 @@ namespace CalamityMod.Items.Weapons.FiniteUse { if (player.inventory[i].type == item.type) { - player.inventory[i].GetGlobalItem(mod).timesUsed++; + player.inventory[i].Calamity().timesUsed++; } } } diff --git a/Items/Weapons/FirestormCannon.cs b/Items/Weapons/FirestormCannon.cs index 34aceee5dd..1231f3592e 100644 --- a/Items/Weapons/FirestormCannon.cs +++ b/Items/Weapons/FirestormCannon.cs @@ -73,7 +73,7 @@ namespace CalamityMod.Items.Weapons int flare = Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, (int)((double)damage * 0.75), knockBack, player.whoAmI, 0.0f, 0.0f); Main.projectile[flare].penetrate = 1; Main.projectile[flare].timeLeft = 600; - Main.projectile[flare].GetGlobalProjectile(mod).forceRanged = true; + Main.projectile[flare].Calamity().forceRanged = true; } return false; } @@ -87,7 +87,7 @@ namespace CalamityMod.Items.Weapons float SpeedX = speedX + (float) Main.rand.Next(-40, 41) * 0.05f; float SpeedY = speedY + (float) Main.rand.Next(-40, 41) * 0.05f; int projectile = Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, damage, knockBack, player.whoAmI, 0.0f, 0.0f); - Main.projectile[projectile].GetGlobalProjectile(mod).forceRanged = true; + Main.projectile[projectile].Calamity().forceRanged = true; Main.projectile[projectile].timeLeft = 200; } return false; diff --git a/Items/Weapons/FlameburstShortsword.cs b/Items/Weapons/FlameburstShortsword.cs index 05f8cefa14..68290b6e6d 100644 --- a/Items/Weapons/FlameburstShortsword.cs +++ b/Items/Weapons/FlameburstShortsword.cs @@ -54,7 +54,7 @@ namespace CalamityMod.Items.Weapons if (target.life <= (target.lifeMax * 0.5f)) { int boom = Projectile.NewProjectile(target.Center.X, target.Center.Y, 0f, 0f, mod.ProjectileType("FuckYou"), (int)((float)item.damage * player.meleeDamage), knockback, player.whoAmI, 0f, 0.85f + Main.rand.NextFloat() * 1.15f); - Main.projectile[boom].GetGlobalProjectile(mod).forceMelee = true; + Main.projectile[boom].Calamity().forceMelee = true; } } } diff --git a/Items/Weapons/Floodtide.cs b/Items/Weapons/Floodtide.cs index 808dfdb76d..f086147567 100644 --- a/Items/Weapons/Floodtide.cs +++ b/Items/Weapons/Floodtide.cs @@ -40,7 +40,7 @@ namespace CalamityMod.Items.Weapons float SpeedX = speedX + (float)Main.rand.Next(-20, 21) * 0.05f; float SpeedY = speedY + (float)Main.rand.Next(-20, 21) * 0.05f; int proj = Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, damage, knockBack, player.whoAmI, 0f, 0f); - Main.projectile[proj].GetGlobalProjectile(mod).forceMelee = true; + Main.projectile[proj].Calamity().forceMelee = true; } return false; } diff --git a/Items/Weapons/FourSeasonsGalaxia.cs b/Items/Weapons/FourSeasonsGalaxia.cs index 14c73d202a..f4b971d5d5 100644 --- a/Items/Weapons/FourSeasonsGalaxia.cs +++ b/Items/Weapons/FourSeasonsGalaxia.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons item.rare = 10; item.shoot = mod.ProjectileType("Galaxia"); item.shootSpeed = 24f; - item.GetGlobalItem(mod).postMoonLordRarity = 14; + item.Calamity().postMoonLordRarity = 14; } public override void AddRecipes() diff --git a/Items/Weapons/GalacticaBlade.cs b/Items/Weapons/GalacticaBlade.cs index bab853dbb7..db38230e9f 100644 --- a/Items/Weapons/GalacticaBlade.cs +++ b/Items/Weapons/GalacticaBlade.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons item.rare = 10; item.shoot = mod.ProjectileType("GalacticaComet"); item.shootSpeed = 23f; - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } public override void AddRecipes() diff --git a/Items/Weapons/GalaxySmasherMelee.cs b/Items/Weapons/GalaxySmasherMelee.cs index 5d681e6809..f109e26c91 100644 --- a/Items/Weapons/GalaxySmasherMelee.cs +++ b/Items/Weapons/GalaxySmasherMelee.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons item.UseSound = SoundID.Item1; item.rare = 10; - item.GetGlobalItem(mod).postMoonLordRarity = 14; + item.Calamity().postMoonLordRarity = 14; item.value = Item.buyPrice(1, 80, 0, 0); item.shoot = mod.ProjectileType("GalaxySmasherHammer"); @@ -44,7 +44,7 @@ namespace CalamityMod.Items.Weapons public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { int proj = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI); - Main.projectile[proj].GetGlobalProjectile(mod).forceMelee = true; + Main.projectile[proj].Calamity().forceMelee = true; return false; } diff --git a/Items/Weapons/GammaFusillade.cs b/Items/Weapons/GammaFusillade.cs index d46bcaf24f..6ac9ce5644 100644 --- a/Items/Weapons/GammaFusillade.cs +++ b/Items/Weapons/GammaFusillade.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons item.autoReuse = true; item.shoot = mod.ProjectileType("GammaLaser"); item.shootSpeed = 20f; - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } public override void AddRecipes() diff --git a/Items/Weapons/Genisis.cs b/Items/Weapons/Genisis.cs index 959a22c9ac..c4c1dabe86 100644 --- a/Items/Weapons/Genisis.cs +++ b/Items/Weapons/Genisis.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons item.autoReuse = true; item.shootSpeed = 6f; item.shoot = mod.ProjectileType("BigBeamofDeath"); - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/Grax.cs b/Items/Weapons/Grax.cs index 0358185a60..0c0e0fd911 100644 --- a/Items/Weapons/Grax.cs +++ b/Items/Weapons/Grax.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons item.tileBoost += 5; item.value = Item.buyPrice(1, 20, 0, 0); item.rare = 10; - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } public override void AddRecipes() diff --git a/Items/Weapons/GreatswordofBlah.cs b/Items/Weapons/GreatswordofBlah.cs index 2de6aa012d..08fc11d53e 100644 --- a/Items/Weapons/GreatswordofBlah.cs +++ b/Items/Weapons/GreatswordofBlah.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons item.rare = 10; item.shoot = mod.ProjectileType("JudgementBlah"); item.shootSpeed = 12f; - item.GetGlobalItem(mod).postMoonLordRarity = 14; + item.Calamity().postMoonLordRarity = 14; } public override void AddRecipes() diff --git a/Items/Weapons/GreatswordofJudgement.cs b/Items/Weapons/GreatswordofJudgement.cs index 1709ae0f0d..b9cc06b301 100644 --- a/Items/Weapons/GreatswordofJudgement.cs +++ b/Items/Weapons/GreatswordofJudgement.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons item.rare = 10; item.shoot = mod.ProjectileType("Judgement"); item.shootSpeed = 10f; - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } public override void AddRecipes() diff --git a/Items/Weapons/HalleysInferno.cs b/Items/Weapons/HalleysInferno.cs index 5348a74fc6..c9a556cb04 100644 --- a/Items/Weapons/HalleysInferno.cs +++ b/Items/Weapons/HalleysInferno.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons item.UseSound = SoundID.Item34; item.value = Item.buyPrice(1, 40, 0, 0); item.rare = 10; - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().postMoonLordRarity = 13; item.autoReuse = true; item.shoot = mod.ProjectileType("HalleysComet"); item.shootSpeed = 14.6f; diff --git a/Items/Weapons/HeavenlyGale.cs b/Items/Weapons/HeavenlyGale.cs index 7ac62521e4..25e4163c42 100644 --- a/Items/Weapons/HeavenlyGale.cs +++ b/Items/Weapons/HeavenlyGale.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Weapons item.shoot = 1; item.shootSpeed = 17f; item.useAmmo = 40; - item.GetGlobalItem(mod).postMoonLordRarity = 15; + item.Calamity().postMoonLordRarity = 15; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/HeliumFlash.cs b/Items/Weapons/HeliumFlash.cs index 684fd8d988..f285d414b1 100644 --- a/Items/Weapons/HeliumFlash.cs +++ b/Items/Weapons/HeliumFlash.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Weapons item.UseSound = SoundID.Item73; item.rare = 10; - item.GetGlobalItem(mod).postMoonLordRarity = 14; + item.Calamity().postMoonLordRarity = 14; item.value = Item.buyPrice(1, 80, 0, 0); item.shoot = mod.ProjectileType("VolatileStarcore"); diff --git a/Items/Weapons/InfernaCutter.cs b/Items/Weapons/InfernaCutter.cs index 520e0593ad..ad8289702b 100644 --- a/Items/Weapons/InfernaCutter.cs +++ b/Items/Weapons/InfernaCutter.cs @@ -123,7 +123,7 @@ namespace CalamityMod.Items.Weapons if (crit) { int boom = Projectile.NewProjectile(target.Center.X, target.Center.Y, 0f, 0f, mod.ProjectileType("FuckYou"), (int)((float)item.damage * player.meleeDamage), knockback, player.whoAmI, 0f, 0.85f + Main.rand.NextFloat() * 1.15f); - Main.projectile[boom].GetGlobalProjectile(mod).forceMelee = true; + Main.projectile[boom].Calamity().forceMelee = true; } target.AddBuff(BuffID.OnFire, 300); target.AddBuff(mod.BuffType("BrimstoneFlames"), 300); diff --git a/Items/Weapons/Interfacer.cs b/Items/Weapons/Interfacer.cs index 6493aca9bc..9a6bb89e34 100644 --- a/Items/Weapons/Interfacer.cs +++ b/Items/Weapons/Interfacer.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons item.shootSpeed = 13f; item.shoot = 10; item.useAmmo = 97; - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/Judgement.cs b/Items/Weapons/Judgement.cs index 2b8899306b..a52db6bad7 100644 --- a/Items/Weapons/Judgement.cs +++ b/Items/Weapons/Judgement.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons item.autoReuse = true; item.shoot = mod.ProjectileType("WhiteFlame"); item.shootSpeed = 30f; - item.GetGlobalItem(mod).postMoonLordRarity = 16; + item.Calamity().postMoonLordRarity = 16; } public override void AddRecipes() diff --git a/Items/Weapons/Lacerator.cs b/Items/Weapons/Lacerator.cs index 0b729dfe9b..66f4875d1e 100644 --- a/Items/Weapons/Lacerator.cs +++ b/Items/Weapons/Lacerator.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons item.rare = 10; item.autoReuse = true; item.shoot = mod.ProjectileType("LaceratorProjectile"); - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().postMoonLordRarity = 13; } public override void AddRecipes() diff --git a/Items/Weapons/Leviathan/LureofEnthrallment.cs b/Items/Weapons/Leviathan/LureofEnthrallment.cs index 23491f5f57..cda355357f 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); modPlayer.sirenWaifu = true; if (player.whoAmI == Main.myPlayer) { diff --git a/Items/Weapons/LifefruitScythe.cs b/Items/Weapons/LifefruitScythe.cs index d7ecf7b1d6..e0750845a6 100644 --- a/Items/Weapons/LifefruitScythe.cs +++ b/Items/Weapons/LifefruitScythe.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons item.rare = 10; item.shoot = mod.ProjectileType("LifeScythe"); item.shootSpeed = 9f; - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } public override void AddRecipes() diff --git a/Items/Weapons/LunicEye.cs b/Items/Weapons/LunicEye.cs index 3f05defe65..ed00ba6681 100644 --- a/Items/Weapons/LunicEye.cs +++ b/Items/Weapons/LunicEye.cs @@ -46,7 +46,7 @@ namespace CalamityMod.Items.Weapons formula += player.rangedDamage - 1f; formula += player.magicDamage - 1f; formula += player.minionDamage - 1f; - formula += player.GetCalamityPlayer().throwingDamage - 1f; + formula += player.Calamity().throwingDamage - 1f; add += formula; } diff --git a/Items/Weapons/MagneticMeltdown.cs b/Items/Weapons/MagneticMeltdown.cs index 2225c4e090..260391c550 100644 --- a/Items/Weapons/MagneticMeltdown.cs +++ b/Items/Weapons/MagneticMeltdown.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons item.autoReuse = true; item.shoot = mod.ProjectileType("MagneticOrb"); item.shootSpeed = 12f; - item.GetGlobalItem(mod).postMoonLordRarity = 14; + item.Calamity().postMoonLordRarity = 14; } 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) diff --git a/Items/Weapons/MantisClaws.cs b/Items/Weapons/MantisClaws.cs index d2e07e22ed..c87123ae89 100644 --- a/Items/Weapons/MantisClaws.cs +++ b/Items/Weapons/MantisClaws.cs @@ -42,7 +42,7 @@ namespace CalamityMod.Items.Weapons public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit) { int boom = Projectile.NewProjectile(target.Center.X, target.Center.Y, 0f, 0f, mod.ProjectileType("FuckYou"), 0, knockback, player.whoAmI, 0f, 0.85f + Main.rand.NextFloat() * 1.15f); - Main.projectile[boom].GetGlobalProjectile(mod).forceMelee = true; + Main.projectile[boom].Calamity().forceMelee = true; } } } diff --git a/Items/Weapons/MarkedMagnum.cs b/Items/Weapons/MarkedMagnum.cs index dcca601142..e483af17b4 100644 --- a/Items/Weapons/MarkedMagnum.cs +++ b/Items/Weapons/MarkedMagnum.cs @@ -46,7 +46,7 @@ namespace CalamityMod.Items.Weapons formula += player.rangedDamage - 1f; formula += player.magicDamage - 1f; formula += player.minionDamage - 1f; - formula += player.GetCalamityPlayer().throwingDamage - 1f; + formula += player.Calamity().throwingDamage - 1f; add += formula; } diff --git a/Items/Weapons/Megafleet.cs b/Items/Weapons/Megafleet.cs index 05ab9e4600..618d750a6e 100644 --- a/Items/Weapons/Megafleet.cs +++ b/Items/Weapons/Megafleet.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Weapons item.shoot = 10; item.shootSpeed = 18f; item.useAmmo = 97; - item.GetGlobalItem(mod).postMoonLordRarity = 16; + item.Calamity().postMoonLordRarity = 16; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/Minigun.cs b/Items/Weapons/Minigun.cs index 779ec2cb4c..8e934405ce 100644 --- a/Items/Weapons/Minigun.cs +++ b/Items/Weapons/Minigun.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons item.shoot = 10; item.shootSpeed = 22f; item.useAmmo = 97; - item.GetGlobalItem(mod).postMoonLordRarity = 14; + item.Calamity().postMoonLordRarity = 14; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/MirrorBlade.cs b/Items/Weapons/MirrorBlade.cs index b59aa7d97e..565ce612d0 100644 --- a/Items/Weapons/MirrorBlade.cs +++ b/Items/Weapons/MirrorBlade.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons item.rare = 10; item.shootSpeed = 9f; item.shoot = mod.ProjectileType("MirrorBlast"); - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().postMoonLordRarity = 13; } 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) diff --git a/Items/Weapons/Mistlestorm.cs b/Items/Weapons/Mistlestorm.cs index 8d7b18bc9e..4e3e2a7148 100644 --- a/Items/Weapons/Mistlestorm.cs +++ b/Items/Weapons/Mistlestorm.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons item.autoReuse = true; item.shoot = 336; item.shootSpeed = 24f; - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().postMoonLordRarity = 13; } 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) diff --git a/Items/Weapons/MolecularManipulator.cs b/Items/Weapons/MolecularManipulator.cs index cc829baa92..9eb14db0df 100644 --- a/Items/Weapons/MolecularManipulator.cs +++ b/Items/Weapons/MolecularManipulator.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons item.autoReuse = true; item.shootSpeed = 25f; item.shoot = mod.ProjectileType("NullShot2"); - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().postMoonLordRarity = 13; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/Monsoon.cs b/Items/Weapons/Monsoon.cs index 25b3bce6b1..b5d4800205 100644 --- a/Items/Weapons/Monsoon.cs +++ b/Items/Weapons/Monsoon.cs @@ -63,7 +63,7 @@ namespace CalamityMod.Items.Weapons type = mod.ProjectileType("TyphoonArrow"); } int num121 = Projectile.NewProjectile(vector2.X + value9.X, vector2.Y + value9.Y, speedX, speedY, type, damage, knockBack, player.whoAmI, 0f, 0f); - Main.projectile[num121].GetGlobalProjectile(mod).forceRanged = true; + Main.projectile[num121].Calamity().forceRanged = true; Main.projectile[num121].noDropItem = true; } else diff --git a/Items/Weapons/Mourningstar.cs b/Items/Weapons/Mourningstar.cs index 3b40d54400..65ef721910 100644 --- a/Items/Weapons/Mourningstar.cs +++ b/Items/Weapons/Mourningstar.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons item.rare = 10; item.shootSpeed = 24f; item.shoot = mod.ProjectileType("Mourningstar"); - item.GetGlobalItem(mod).postMoonLordRarity = 14; + item.Calamity().postMoonLordRarity = 14; } public override void AddRecipes() diff --git a/Items/Weapons/Murasama.cs b/Items/Weapons/Murasama.cs index aa469d769f..d0a67736e0 100644 --- a/Items/Weapons/Murasama.cs +++ b/Items/Weapons/Murasama.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons item.rare = 10; item.shoot = mod.ProjectileType("Murasama"); item.shootSpeed = 24f; - item.GetGlobalItem(mod).postMoonLordRarity = 15; + item.Calamity().postMoonLordRarity = 15; } public override bool CanUseItem(Player player) diff --git a/Items/Weapons/NanoblackReaperMelee.cs b/Items/Weapons/NanoblackReaperMelee.cs index b6ef465c9a..f77d8a737b 100644 --- a/Items/Weapons/NanoblackReaperMelee.cs +++ b/Items/Weapons/NanoblackReaperMelee.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Weapons item.UseSound = SoundID.Item18; item.rare = 10; - item.GetGlobalItem(mod).postMoonLordRarity = 16; + item.Calamity().postMoonLordRarity = 16; item.value = Item.buyPrice(5, 0, 0, 0); item.shoot = mod.ProjectileType("NanoblackMain"); @@ -45,7 +45,7 @@ namespace CalamityMod.Items.Weapons public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { int proj = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI); - Main.projectile[proj].GetGlobalProjectile(mod).forceMelee = true; + Main.projectile[proj].Calamity().forceMelee = true; return false; } diff --git a/Items/Weapons/NeptunesBounty.cs b/Items/Weapons/NeptunesBounty.cs index 0103ccf591..c013b8953b 100644 --- a/Items/Weapons/NeptunesBounty.cs +++ b/Items/Weapons/NeptunesBounty.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons item.rare = 10; item.shoot = mod.ProjectileType("NeptuneOrb"); item.shootSpeed = 12f; - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().postMoonLordRarity = 13; } public override void AddRecipes() diff --git a/Items/Weapons/NettlelineGreatbow.cs b/Items/Weapons/NettlelineGreatbow.cs index d75dd78f82..31bdef922b 100644 --- a/Items/Weapons/NettlelineGreatbow.cs +++ b/Items/Weapons/NettlelineGreatbow.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons item.shoot = 10; item.shootSpeed = 16f; item.useAmmo = 40; - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/NuclearFury.cs b/Items/Weapons/NuclearFury.cs index 2e90564604..aebc34faf0 100644 --- a/Items/Weapons/NuclearFury.cs +++ b/Items/Weapons/NuclearFury.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons item.autoReuse = true; item.shoot = mod.ProjectileType("NuclearFuryProjectile"); item.shootSpeed = 16f; - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/OmegaBiomeBlade.cs b/Items/Weapons/OmegaBiomeBlade.cs index e1b28966fe..9b45c610dd 100644 --- a/Items/Weapons/OmegaBiomeBlade.cs +++ b/Items/Weapons/OmegaBiomeBlade.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons item.rare = 10; item.shoot = mod.ProjectileType("OmegaBiomeOrb"); item.shootSpeed = 15f; - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } 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) diff --git a/Items/Weapons/OnyxChainBlaster.cs b/Items/Weapons/OnyxChainBlaster.cs index 384449f82f..ba4200a7ef 100644 --- a/Items/Weapons/OnyxChainBlaster.cs +++ b/Items/Weapons/OnyxChainBlaster.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons item.shoot = 10; item.shootSpeed = 24f; item.useAmmo = 97; - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/Onyxia.cs b/Items/Weapons/Onyxia.cs index cf826a7d96..58a51c3ff3 100644 --- a/Items/Weapons/Onyxia.cs +++ b/Items/Weapons/Onyxia.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons item.shoot = 10; item.shootSpeed = 28f; item.useAmmo = 97; - item.GetGlobalItem(mod).postMoonLordRarity = 14; + item.Calamity().postMoonLordRarity = 14; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/Phangasm.cs b/Items/Weapons/Phangasm.cs index f09ad52621..a1ba3043c3 100644 --- a/Items/Weapons/Phangasm.cs +++ b/Items/Weapons/Phangasm.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons item.shoot = mod.ProjectileType("Phangasm"); item.shootSpeed = 20f; item.useAmmo = 40; - item.GetGlobalItem(mod).postMoonLordRarity = 14; + item.Calamity().postMoonLordRarity = 14; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/PhantasmalFury.cs b/Items/Weapons/PhantasmalFury.cs index 7a046c00ce..4fa31c9168 100644 --- a/Items/Weapons/PhantasmalFury.cs +++ b/Items/Weapons/PhantasmalFury.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons item.autoReuse = true; item.shoot = mod.ProjectileType("PhantasmalFury"); item.shootSpeed = 12f; - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().postMoonLordRarity = 13; } public override void AddRecipes() diff --git a/Items/Weapons/PhoenixBlade.cs b/Items/Weapons/PhoenixBlade.cs index 6f572ebbf4..f7aff53664 100644 --- a/Items/Weapons/PhoenixBlade.cs +++ b/Items/Weapons/PhoenixBlade.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Items.Weapons if (target.life <= 0) { int boom = Projectile.NewProjectile(target.Center.X, target.Center.Y, 0f, 0f, mod.ProjectileType("FuckYou"), damage, knockback, player.whoAmI, 0f, 0.85f + Main.rand.NextFloat() * 1.15f); - Main.projectile[boom].GetGlobalProjectile(mod).forceMelee = true; + Main.projectile[boom].Calamity().forceMelee = true; float randomSpeedX = (float)Main.rand.Next(5); float randomSpeedY = (float)Main.rand.Next(3, 7); Projectile.NewProjectile(target.Center.X, target.Center.Y, -randomSpeedX, -randomSpeedY, mod.ProjectileType("PhoenixHeal"), item.damage, knockback, player.whoAmI); diff --git a/Items/Weapons/Photoviscerator.cs b/Items/Weapons/Photoviscerator.cs index 9927ccb0a1..61fb34c704 100644 --- a/Items/Weapons/Photoviscerator.cs +++ b/Items/Weapons/Photoviscerator.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons item.shoot = mod.ProjectileType("ExoFire"); item.shootSpeed = 6f; item.useAmmo = 23; - item.GetGlobalItem(mod).postMoonLordRarity = 15; + item.Calamity().postMoonLordRarity = 15; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/PlagueKeeper.cs b/Items/Weapons/PlagueKeeper.cs index 85227841b0..8ab4540e04 100644 --- a/Items/Weapons/PlagueKeeper.cs +++ b/Items/Weapons/PlagueKeeper.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons item.rare = 10; item.shoot = mod.ProjectileType("PlagueBeeDust"); item.shootSpeed = 9f; - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } public override void AddRecipes() @@ -53,7 +53,7 @@ namespace CalamityMod.Items.Weapons int bee = Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, 0f, player.beeType(), player.beeDamage(item.damage / 3), player.beeKB(0f), player.whoAmI, 0f, 0f); Main.projectile[bee].penetrate = 1; - Main.projectile[bee].GetGlobalProjectile(mod).forceMelee = true; + Main.projectile[bee].Calamity().forceMelee = true; } } } diff --git a/Items/Weapons/PlanetaryAnnihilation.cs b/Items/Weapons/PlanetaryAnnihilation.cs index 47bd8448b3..904eb03441 100644 --- a/Items/Weapons/PlanetaryAnnihilation.cs +++ b/Items/Weapons/PlanetaryAnnihilation.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons item.shoot = mod.ProjectileType("TerraBallBow"); item.shootSpeed = 12f; item.useAmmo = 40; - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/PlasmaRifle.cs b/Items/Weapons/PlasmaRifle.cs index 55dffea277..55f1abe302 100644 --- a/Items/Weapons/PlasmaRifle.cs +++ b/Items/Weapons/PlasmaRifle.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons item.autoReuse = true; item.shootSpeed = 12f; item.shoot = mod.ProjectileType("PlasmaShot"); - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/Polterghast/BansheeHook.cs b/Items/Weapons/Polterghast/BansheeHook.cs index 5122870b5f..89dacf360b 100644 --- a/Items/Weapons/Polterghast/BansheeHook.cs +++ b/Items/Weapons/Polterghast/BansheeHook.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Polterghast item.rare = 10; item.shoot = mod.ProjectileType("BansheeHook"); item.shootSpeed = 42f; - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().postMoonLordRarity = 13; } public override bool CanUseItem(Player player) diff --git a/Items/Weapons/Polterghast/DaemonsFlame.cs b/Items/Weapons/Polterghast/DaemonsFlame.cs index 20eac6062a..58ec52d98e 100644 --- a/Items/Weapons/Polterghast/DaemonsFlame.cs +++ b/Items/Weapons/Polterghast/DaemonsFlame.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Polterghast item.shoot = mod.ProjectileType("DaemonsFlame"); item.shootSpeed = 20f; item.useAmmo = 40; - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().postMoonLordRarity = 13; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/Polterghast/EtherealSubjugator.cs b/Items/Weapons/Polterghast/EtherealSubjugator.cs index 0a8c1793c8..e7768eef19 100644 --- a/Items/Weapons/Polterghast/EtherealSubjugator.cs +++ b/Items/Weapons/Polterghast/EtherealSubjugator.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Polterghast item.shoot = mod.ProjectileType("PhantomGuy"); item.shootSpeed = 10f; item.summon = true; - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().postMoonLordRarity = 13; } 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) diff --git a/Items/Weapons/Polterghast/FatesReveal.cs b/Items/Weapons/Polterghast/FatesReveal.cs index 642d4c26fb..2afcf34918 100644 --- a/Items/Weapons/Polterghast/FatesReveal.cs +++ b/Items/Weapons/Polterghast/FatesReveal.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Polterghast item.autoReuse = true; item.shoot = mod.ProjectileType("FatesReveal"); item.shootSpeed = 1f; - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().postMoonLordRarity = 13; } 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) diff --git a/Items/Weapons/Polterghast/GhastlyVisage.cs b/Items/Weapons/Polterghast/GhastlyVisage.cs index 631abe7657..14c4dca6d0 100644 --- a/Items/Weapons/Polterghast/GhastlyVisage.cs +++ b/Items/Weapons/Polterghast/GhastlyVisage.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Polterghast item.rare = 10; item.shootSpeed = 9f; item.shoot = mod.ProjectileType("GhastlyVisage"); - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().postMoonLordRarity = 13; } 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) diff --git a/Items/Weapons/Polterghast/TerrorBlade.cs b/Items/Weapons/Polterghast/TerrorBlade.cs index a6139f6940..141309a273 100644 --- a/Items/Weapons/Polterghast/TerrorBlade.cs +++ b/Items/Weapons/Polterghast/TerrorBlade.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Polterghast item.rare = 10; item.shoot = mod.ProjectileType("TerrorBeam"); item.shootSpeed = 20f; - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().postMoonLordRarity = 13; } public override void MeleeEffects(Player player, Rectangle hitbox) diff --git a/Items/Weapons/PrimordialAncient.cs b/Items/Weapons/PrimordialAncient.cs index bd6d092c1f..4986e2a1cd 100644 --- a/Items/Weapons/PrimordialAncient.cs +++ b/Items/Weapons/PrimordialAncient.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons item.autoReuse = true; item.shoot = mod.ProjectileType("Ancient"); item.shootSpeed = 8f; - item.GetGlobalItem(mod).postMoonLordRarity = 14; + item.Calamity().postMoonLordRarity = 14; } public override void AddRecipes() diff --git a/Items/Weapons/Providence/BlissfulBombardier.cs b/Items/Weapons/Providence/BlissfulBombardier.cs index 883beb0f12..55ec3f442b 100644 --- a/Items/Weapons/Providence/BlissfulBombardier.cs +++ b/Items/Weapons/Providence/BlissfulBombardier.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Providence item.shootSpeed = 24f; item.shoot = mod.ProjectileType("Nuke"); item.useAmmo = 771; - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/Providence/HolyCollider.cs b/Items/Weapons/Providence/HolyCollider.cs index 655a802603..158769b4c7 100644 --- a/Items/Weapons/Providence/HolyCollider.cs +++ b/Items/Weapons/Providence/HolyCollider.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Providence item.value = Item.buyPrice(1, 20, 0, 0); item.rare = 10; item.shootSpeed = 10f; - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit) diff --git a/Items/Weapons/Providence/PurgeGuzzler.cs b/Items/Weapons/Providence/PurgeGuzzler.cs index 0d2bad6d68..077b941cb2 100644 --- a/Items/Weapons/Providence/PurgeGuzzler.cs +++ b/Items/Weapons/Providence/PurgeGuzzler.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Providence item.autoReuse = true; item.shoot = mod.ProjectileType("HolyLaser"); item.shootSpeed = 6f; - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/Providence/SolarFlare.cs b/Items/Weapons/Providence/SolarFlare.cs index 1fb4fc1f7f..cf6d3af2bb 100644 --- a/Items/Weapons/Providence/SolarFlare.cs +++ b/Items/Weapons/Providence/SolarFlare.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons.Providence item.rare = 10; item.autoReuse = true; item.shoot = mod.ProjectileType("SolarFlareYoyo"); - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } } } diff --git a/Items/Weapons/Providence/TelluricGlare.cs b/Items/Weapons/Providence/TelluricGlare.cs index 984976a1d9..65bee202d4 100644 --- a/Items/Weapons/Providence/TelluricGlare.cs +++ b/Items/Weapons/Providence/TelluricGlare.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Providence item.shoot = mod.ProjectileType("TelluricGlare"); item.shootSpeed = 12f; item.useAmmo = 40; - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/RareVariants/Arbalest.cs b/Items/Weapons/RareVariants/Arbalest.cs index e3324862ed..cdb24cb279 100644 --- a/Items/Weapons/RareVariants/Arbalest.cs +++ b/Items/Weapons/RareVariants/Arbalest.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.RareVariants item.shoot = 10; item.shootSpeed = 10f; item.useAmmo = 40; - item.GetGlobalItem(mod).postMoonLordRarity = 22; + item.Calamity().postMoonLordRarity = 22; } 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) diff --git a/Items/Weapons/RareVariants/Carnage.cs b/Items/Weapons/RareVariants/Carnage.cs index f490677fea..fe0c955716 100644 --- a/Items/Weapons/RareVariants/Carnage.cs +++ b/Items/Weapons/RareVariants/Carnage.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Weapons.RareVariants item.height = 60; item.value = Item.buyPrice(0, 4, 0, 0); item.rare = 3; - item.GetGlobalItem(mod).postMoonLordRarity = 22; + item.Calamity().postMoonLordRarity = 22; } public override void MeleeEffects(Player player, Rectangle hitbox) diff --git a/Items/Weapons/RareVariants/ClothiersWrath.cs b/Items/Weapons/RareVariants/ClothiersWrath.cs index d04940f2b3..066aeb61df 100644 --- a/Items/Weapons/RareVariants/ClothiersWrath.cs +++ b/Items/Weapons/RareVariants/ClothiersWrath.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.RareVariants item.autoReuse = true; item.shoot = ProjectileID.ClothiersCurse; item.shootSpeed = 6f; - item.GetGlobalItem(mod).postMoonLordRarity = 22; + item.Calamity().postMoonLordRarity = 22; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) @@ -42,7 +42,7 @@ namespace CalamityMod.Items.Weapons.RareVariants { Vector2 perturbedSpeed = new Vector2(speedX, speedY).RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (numProj - 1))); int proj = Projectile.NewProjectile(position.X, position.Y, perturbedSpeed.X, perturbedSpeed.Y, type, damage, knockBack, player.whoAmI, 0f, 0f); - Main.projectile[proj].GetGlobalProjectile(mod).forceMagic = true; + Main.projectile[proj].Calamity().forceMagic = true; } return false; } diff --git a/Items/Weapons/RareVariants/Cryophobia.cs b/Items/Weapons/RareVariants/Cryophobia.cs index 0b4b0426ca..9c9ea5bd0e 100644 --- a/Items/Weapons/RareVariants/Cryophobia.cs +++ b/Items/Weapons/RareVariants/Cryophobia.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.RareVariants item.autoReuse = true; item.shootSpeed = 12f; item.shoot = mod.ProjectileType("CryoBlast"); - item.GetGlobalItem(mod).postMoonLordRarity = 22; + item.Calamity().postMoonLordRarity = 22; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/RareVariants/EvilSmasher.cs b/Items/Weapons/RareVariants/EvilSmasher.cs index fecd91dca7..382138074c 100644 --- a/Items/Weapons/RareVariants/EvilSmasher.cs +++ b/Items/Weapons/RareVariants/EvilSmasher.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.RareVariants item.height = 62; item.value = Item.buyPrice(0, 36, 0, 0); item.rare = 5; - item.GetGlobalItem(mod).postMoonLordRarity = 22; + item.Calamity().postMoonLordRarity = 22; } public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit) diff --git a/Items/Weapons/RareVariants/EyeofMagnus.cs b/Items/Weapons/RareVariants/EyeofMagnus.cs index 360ad97962..ea45d6ecb6 100644 --- a/Items/Weapons/RareVariants/EyeofMagnus.cs +++ b/Items/Weapons/RareVariants/EyeofMagnus.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.RareVariants item.value = Item.buyPrice(0, 36, 0, 0); item.shoot = mod.ProjectileType("MagnusBeam"); item.shootSpeed = 12f; - item.GetGlobalItem(mod).postMoonLordRarity = 22; + item.Calamity().postMoonLordRarity = 22; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/RareVariants/GrandDad.cs b/Items/Weapons/RareVariants/GrandDad.cs index 7f3ef2d1c1..b02299985e 100644 --- a/Items/Weapons/RareVariants/GrandDad.cs +++ b/Items/Weapons/RareVariants/GrandDad.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.RareVariants item.height = 124; item.value = Item.buyPrice(1, 0, 0, 0); item.rare = 10; - item.GetGlobalItem(mod).postMoonLordRarity = 22; + item.Calamity().postMoonLordRarity = 22; } public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit) diff --git a/Items/Weapons/RareVariants/Hellborn.cs b/Items/Weapons/RareVariants/Hellborn.cs index 71c4c7606d..9160cc4130 100644 --- a/Items/Weapons/RareVariants/Hellborn.cs +++ b/Items/Weapons/RareVariants/Hellborn.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.RareVariants item.shoot = 10; item.shootSpeed = 14f; item.useAmmo = 97; - item.GetGlobalItem(mod).postMoonLordRarity = 22; + item.Calamity().postMoonLordRarity = 22; } 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) diff --git a/Items/Weapons/RareVariants/Infinity.cs b/Items/Weapons/RareVariants/Infinity.cs index d6b47715c5..8221587180 100644 --- a/Items/Weapons/RareVariants/Infinity.cs +++ b/Items/Weapons/RareVariants/Infinity.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Items.Weapons.RareVariants item.shoot = 10; item.shootSpeed = 12f; item.useAmmo = 97; - item.GetGlobalItem(mod).postMoonLordRarity = 22; + item.Calamity().postMoonLordRarity = 22; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/RareVariants/LeadWizard.cs b/Items/Weapons/RareVariants/LeadWizard.cs index 3f73fb7d74..fdccfb3dc4 100644 --- a/Items/Weapons/RareVariants/LeadWizard.cs +++ b/Items/Weapons/RareVariants/LeadWizard.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.RareVariants item.shoot = 10; item.shootSpeed = 20f; item.useAmmo = 97; - item.GetGlobalItem(mod).postMoonLordRarity = 22; + item.Calamity().postMoonLordRarity = 22; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/RareVariants/Norfleet.cs b/Items/Weapons/RareVariants/Norfleet.cs index f6e750e1f2..05570a30f8 100644 --- a/Items/Weapons/RareVariants/Norfleet.cs +++ b/Items/Weapons/RareVariants/Norfleet.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.RareVariants item.useTurn = false; item.useAmmo = 75; item.autoReuse = true; - item.GetGlobalItem(mod).postMoonLordRarity = 22; + item.Calamity().postMoonLordRarity = 22; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/RareVariants/PearlGod.cs b/Items/Weapons/RareVariants/PearlGod.cs index 2a7a37b520..6a56ec4e93 100644 --- a/Items/Weapons/RareVariants/PearlGod.cs +++ b/Items/Weapons/RareVariants/PearlGod.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.RareVariants item.shootSpeed = 24f; item.shoot = mod.ProjectileType("ShockblastRound"); item.useAmmo = 97; - item.GetGlobalItem(mod).postMoonLordRarity = 22; + item.Calamity().postMoonLordRarity = 22; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/RareVariants/Skullmasher.cs b/Items/Weapons/RareVariants/Skullmasher.cs index 6f3c62d936..c3d1009205 100644 --- a/Items/Weapons/RareVariants/Skullmasher.cs +++ b/Items/Weapons/RareVariants/Skullmasher.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.RareVariants item.shoot = 10; item.shootSpeed = 12f; item.useAmmo = 97; - item.GetGlobalItem(mod).postMoonLordRarity = 22; + item.Calamity().postMoonLordRarity = 22; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/RareVariants/Swordsplosion.cs b/Items/Weapons/RareVariants/Swordsplosion.cs index 1b320641bd..40dea0f554 100644 --- a/Items/Weapons/RareVariants/Swordsplosion.cs +++ b/Items/Weapons/RareVariants/Swordsplosion.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.RareVariants item.rare = 10; item.shoot = mod.ProjectileType("EonBeam"); item.shootSpeed = 16f; - item.GetGlobalItem(mod).postMoonLordRarity = 22; + item.Calamity().postMoonLordRarity = 22; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/RareVariants/ThornBlossom.cs b/Items/Weapons/RareVariants/ThornBlossom.cs index 75e6bf4e2f..1878d853f3 100644 --- a/Items/Weapons/RareVariants/ThornBlossom.cs +++ b/Items/Weapons/RareVariants/ThornBlossom.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.RareVariants item.autoReuse = true; item.shoot = mod.ProjectileType("BeamingBolt"); item.shootSpeed = 20f; - item.GetGlobalItem(mod).postMoonLordRarity = 22; + item.Calamity().postMoonLordRarity = 22; } 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) diff --git a/Items/Weapons/RareVariants/Thunderstorm.cs b/Items/Weapons/RareVariants/Thunderstorm.cs index aefb57efcf..a10e252d32 100644 --- a/Items/Weapons/RareVariants/Thunderstorm.cs +++ b/Items/Weapons/RareVariants/Thunderstorm.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.RareVariants item.autoReuse = true; item.shootSpeed = 6f; item.shoot = mod.ProjectileType("ThunderstormShot"); - item.GetGlobalItem(mod).postMoonLordRarity = 22; + item.Calamity().postMoonLordRarity = 22; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/RareVariants/TrueConferenceCall.cs b/Items/Weapons/RareVariants/TrueConferenceCall.cs index 5e9cf17a59..8d3fced23f 100644 --- a/Items/Weapons/RareVariants/TrueConferenceCall.cs +++ b/Items/Weapons/RareVariants/TrueConferenceCall.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.RareVariants item.shootSpeed = 18f; item.shoot = 10; item.useAmmo = 97; - item.GetGlobalItem(mod).postMoonLordRarity = 22; + item.Calamity().postMoonLordRarity = 22; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/RareVariants/VoidVortex.cs b/Items/Weapons/RareVariants/VoidVortex.cs index de13ef3818..f97de23c94 100644 --- a/Items/Weapons/RareVariants/VoidVortex.cs +++ b/Items/Weapons/RareVariants/VoidVortex.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.RareVariants item.autoReuse = true; item.shoot = mod.ProjectileType("Climax2"); item.shootSpeed = 12f; - item.GetGlobalItem(mod).postMoonLordRarity = 22; + item.Calamity().postMoonLordRarity = 22; } 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) diff --git a/Items/Weapons/RedSun.cs b/Items/Weapons/RedSun.cs index 2c6ad0b591..314d5fa11f 100644 --- a/Items/Weapons/RedSun.cs +++ b/Items/Weapons/RedSun.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons item.rare = 10; item.shoot = mod.ProjectileType("SolarFlare"); item.shootSpeed = 15f; - item.GetGlobalItem(mod).postMoonLordRarity = 16; + item.Calamity().postMoonLordRarity = 16; } public override void AddRecipes() diff --git a/Items/Weapons/RoyalKnivesMelee.cs b/Items/Weapons/RoyalKnivesMelee.cs index 4e74355e42..ace6648354 100644 --- a/Items/Weapons/RoyalKnivesMelee.cs +++ b/Items/Weapons/RoyalKnivesMelee.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons item.rare = 10; item.shoot = mod.ProjectileType("RoyalKnifeMelee"); item.shootSpeed = 9f; - item.GetGlobalItem(mod).postMoonLordRarity = 16; + item.Calamity().postMoonLordRarity = 16; } 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) diff --git a/Items/Weapons/SDFMG.cs b/Items/Weapons/SDFMG.cs index f163496208..c4cb7e3ba1 100644 --- a/Items/Weapons/SDFMG.cs +++ b/Items/Weapons/SDFMG.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Items.Weapons item.shoot = 10; item.shootSpeed = 16f; item.useAmmo = 97; - item.GetGlobalItem(mod).postMoonLordRarity = 14; + item.Calamity().postMoonLordRarity = 14; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/SHPC.cs b/Items/Weapons/SHPC.cs index 0c46dee341..1b08817151 100644 --- a/Items/Weapons/SHPC.cs +++ b/Items/Weapons/SHPC.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons item.autoReuse = true; item.shoot = mod.ProjectileType("SHPB"); item.shootSpeed = 20f; - item.GetGlobalItem(mod).postMoonLordRarity = 17; + item.Calamity().postMoonLordRarity = 17; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/SanguineFlare.cs b/Items/Weapons/SanguineFlare.cs index df290c3e77..d4378b7f51 100644 --- a/Items/Weapons/SanguineFlare.cs +++ b/Items/Weapons/SanguineFlare.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons item.autoReuse = true; item.shoot = mod.ProjectileType("SanguineFlare"); item.shootSpeed = 14f; - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().postMoonLordRarity = 13; } 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) diff --git a/Items/Weapons/ScourgeoftheCosmos.cs b/Items/Weapons/ScourgeoftheCosmos.cs index 290cf90dab..0d385f1156 100644 --- a/Items/Weapons/ScourgeoftheCosmos.cs +++ b/Items/Weapons/ScourgeoftheCosmos.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons item.rare = 10; item.shoot = mod.ProjectileType("ScourgeoftheCosmos"); item.shootSpeed = 15f; - item.GetGlobalItem(mod).postMoonLordRarity = 14; + item.Calamity().postMoonLordRarity = 14; } public override void AddRecipes() diff --git a/Items/Weapons/Seadragon.cs b/Items/Weapons/Seadragon.cs index 808279b548..3a3334d937 100644 --- a/Items/Weapons/Seadragon.cs +++ b/Items/Weapons/Seadragon.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons item.shoot = 10; item.shootSpeed = 16f; item.useAmmo = 97; - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().postMoonLordRarity = 13; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/ShadowboltStaff.cs b/Items/Weapons/ShadowboltStaff.cs index e796da55c3..1e7674d057 100644 --- a/Items/Weapons/ShadowboltStaff.cs +++ b/Items/Weapons/ShadowboltStaff.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons item.autoReuse = true; item.shoot = mod.ProjectileType("Shadowbolt"); item.shootSpeed = 6f; - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().postMoonLordRarity = 13; } public override void AddRecipes() diff --git a/Items/Weapons/Shredder.cs b/Items/Weapons/Shredder.cs index d9d8395560..34c8eefcca 100644 --- a/Items/Weapons/Shredder.cs +++ b/Items/Weapons/Shredder.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons item.shoot = 10; item.shootSpeed = 12f; item.useAmmo = 97; - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/SlimeGod/Goobow.cs b/Items/Weapons/SlimeGod/Goobow.cs index 5b748fe364..ae5e9f5a1d 100644 --- a/Items/Weapons/SlimeGod/Goobow.cs +++ b/Items/Weapons/SlimeGod/Goobow.cs @@ -52,7 +52,7 @@ namespace CalamityMod.Items.Weapons.SlimeGod value9 -= vector7; } int projectile = Projectile.NewProjectile(vector2.X + value9.X, vector2.Y + value9.Y, speedX * 0.6f, speedY * 0.6f, ProjectileID.SlimeGun, damage / 4, 0f, player.whoAmI, 0f, 0f); - Main.projectile[projectile].GetGlobalProjectile(mod).forceRanged = true; + Main.projectile[projectile].Calamity().forceRanged = true; } return true; } diff --git a/Items/Weapons/SolsticeClaymore.cs b/Items/Weapons/SolsticeClaymore.cs index 58a72e8a62..4cf90d4b6e 100644 --- a/Items/Weapons/SolsticeClaymore.cs +++ b/Items/Weapons/SolsticeClaymore.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons item.rare = 10; item.shoot = mod.ProjectileType("SolsticeBeam"); item.shootSpeed = 16f; - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } public override void AddRecipes() diff --git a/Items/Weapons/SomaPrime.cs b/Items/Weapons/SomaPrime.cs index 662e446278..ec88bb56f8 100644 --- a/Items/Weapons/SomaPrime.cs +++ b/Items/Weapons/SomaPrime.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons item.shoot = mod.ProjectileType("SlashRound"); item.shootSpeed = 30f; item.useAmmo = 97; - item.GetGlobalItem(mod).postMoonLordRarity = 16; + item.Calamity().postMoonLordRarity = 16; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/SoulPiercer.cs b/Items/Weapons/SoulPiercer.cs index a9164f21fd..e30df3d9d3 100644 --- a/Items/Weapons/SoulPiercer.cs +++ b/Items/Weapons/SoulPiercer.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons item.autoReuse = true; item.shoot = mod.ProjectileType("SoulPiercer"); item.shootSpeed = 6f; - item.GetGlobalItem(mod).postMoonLordRarity = 14; + item.Calamity().postMoonLordRarity = 14; } public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) diff --git a/Items/Weapons/SpatialLance.cs b/Items/Weapons/SpatialLance.cs index 5c4ad9f52a..d08749ef05 100644 --- a/Items/Weapons/SpatialLance.cs +++ b/Items/Weapons/SpatialLance.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons item.rare = 10; item.shoot = mod.ProjectileType("SpatialLanceProjectile"); item.shootSpeed = 12f; - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } public override bool CanUseItem(Player player) diff --git a/Items/Weapons/SpectralstormCannon.cs b/Items/Weapons/SpectralstormCannon.cs index b3bd203eb8..1978460f05 100644 --- a/Items/Weapons/SpectralstormCannon.cs +++ b/Items/Weapons/SpectralstormCannon.cs @@ -52,10 +52,10 @@ namespace CalamityMod.Items.Weapons float SpeedY = speedY + (float) Main.rand.Next(-40, 41) * 0.05f; int projectile = Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, damage, knockBack, player.whoAmI, 0.0f, 0.0f); Main.projectile[projectile].timeLeft = 200; - Main.projectile[projectile].GetGlobalProjectile(mod).forceRanged = true; + Main.projectile[projectile].Calamity().forceRanged = true; } int proj = Projectile.NewProjectile(position.X, position.Y, speedX, speedY, 297, damage, knockBack, player.whoAmI, 0f, 0f); - Main.projectile[proj].GetGlobalProjectile(mod).forceRanged = true; + Main.projectile[proj].Calamity().forceRanged = true; return false; } diff --git a/Items/Weapons/SpectreRifle.cs b/Items/Weapons/SpectreRifle.cs index fb911eb947..f97d0643e1 100644 --- a/Items/Weapons/SpectreRifle.cs +++ b/Items/Weapons/SpectreRifle.cs @@ -43,7 +43,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) { int proj = Projectile.NewProjectile(position.X, position.Y, speedX, speedY, 297, damage, knockBack, player.whoAmI, 0f, 0f); - Main.projectile[proj].GetGlobalProjectile(mod).forceRanged = true; + Main.projectile[proj].Calamity().forceRanged = true; return false; } diff --git a/Items/Weapons/SporeKnife.cs b/Items/Weapons/SporeKnife.cs index f76dc5a52c..2cd3c977e0 100644 --- a/Items/Weapons/SporeKnife.cs +++ b/Items/Weapons/SporeKnife.cs @@ -55,7 +55,7 @@ namespace CalamityMod.Items.Weapons if (target.life <= 0) { int proj = Projectile.NewProjectile(target.Center.X, target.Center.Y, 0f, 0f, Main.rand.Next(569, 572), (int)((float)item.damage * player.meleeDamage), knockback, Main.myPlayer); - Main.projectile[proj].GetGlobalProjectile(mod).forceMelee = true; + Main.projectile[proj].Calamity().forceMelee = true; } } } diff --git a/Items/Weapons/Spyker.cs b/Items/Weapons/Spyker.cs index 0078f6f488..c747049ef7 100644 --- a/Items/Weapons/Spyker.cs +++ b/Items/Weapons/Spyker.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons item.shootSpeed = 9f; item.shoot = mod.ProjectileType("Spyker"); item.useAmmo = 97; - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/StarCannonEX.cs b/Items/Weapons/StarCannonEX.cs index 3f6b8690e1..6d973f91d7 100644 --- a/Items/Weapons/StarCannonEX.cs +++ b/Items/Weapons/StarCannonEX.cs @@ -55,7 +55,7 @@ namespace CalamityMod.Items.Weapons case 2: type = mod.ProjectileType("AstralStar"); break; } int star = Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, damage, knockBack, player.whoAmI, 0f, 0f); - Main.projectile[star].GetGlobalProjectile(mod).forceRanged = true; + Main.projectile[star].Calamity().forceRanged = true; } return false; } diff --git a/Items/Weapons/Starfleet.cs b/Items/Weapons/Starfleet.cs index 517f07add6..d317003c7f 100644 --- a/Items/Weapons/Starfleet.cs +++ b/Items/Weapons/Starfleet.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons item.shoot = mod.ProjectileType("PlasmaBlast"); item.shootSpeed = 12f; item.useAmmo = 75; - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/StarfleetMK2.cs b/Items/Weapons/StarfleetMK2.cs index 6c307f4f87..e79fd70259 100644 --- a/Items/Weapons/StarfleetMK2.cs +++ b/Items/Weapons/StarfleetMK2.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Weapons item.useTurn = false; item.useAmmo = 75; item.autoReuse = true; - item.GetGlobalItem(mod).postMoonLordRarity = 14; + item.Calamity().postMoonLordRarity = 14; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/StellarContemptMelee.cs b/Items/Weapons/StellarContemptMelee.cs index 8526d4c4d2..60cfc83ab6 100644 --- a/Items/Weapons/StellarContemptMelee.cs +++ b/Items/Weapons/StellarContemptMelee.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons item.UseSound = SoundID.Item1; item.rare = 10; - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; item.value = Item.buyPrice(1, 20, 0, 0); item.shoot = mod.ProjectileType("StellarContemptHammer"); @@ -44,7 +44,7 @@ namespace CalamityMod.Items.Weapons public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { int proj = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI); - Main.projectile[proj].GetGlobalProjectile(mod).forceMelee = true; + Main.projectile[proj].Calamity().forceMelee = true; return false; } diff --git a/Items/Weapons/StellarStriker.cs b/Items/Weapons/StellarStriker.cs index 8b2a36b071..c545aeb721 100644 --- a/Items/Weapons/StellarStriker.cs +++ b/Items/Weapons/StellarStriker.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons item.value = Item.buyPrice(1, 20, 0, 0); item.rare = 10; item.shootSpeed = 12f; - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit) @@ -87,7 +87,7 @@ namespace CalamityMod.Items.Weapons float num114 = num78; float num115 = num79 + (float)Main.rand.Next(-80, 81) * 0.02f; int proj = Projectile.NewProjectile(vector2.X, vector2.Y, num114, num115, 645, (int)((double)((float)item.damage * player.meleeDamage) * 0.5), knockback, i, 0f, (float)Main.rand.Next(3)); - Main.projectile[proj].GetGlobalProjectile(mod).forceMelee = true; + Main.projectile[proj].Calamity().forceMelee = true; } } diff --git a/Items/Weapons/StormDragoon.cs b/Items/Weapons/StormDragoon.cs index 814630a9c0..caf56f2c54 100644 --- a/Items/Weapons/StormDragoon.cs +++ b/Items/Weapons/StormDragoon.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons item.shoot = 10; item.shootSpeed = 18f; item.useAmmo = 97; - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().postMoonLordRarity = 13; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/StreamGouge.cs b/Items/Weapons/StreamGouge.cs index 421def1a2d..9a62eccffd 100644 --- a/Items/Weapons/StreamGouge.cs +++ b/Items/Weapons/StreamGouge.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons item.rare = 10; item.shoot = mod.ProjectileType("StreamGouge"); item.shootSpeed = 15f; - item.GetGlobalItem(mod).postMoonLordRarity = 14; + item.Calamity().postMoonLordRarity = 14; } public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) diff --git a/Items/Weapons/SubsumingVortex.cs b/Items/Weapons/SubsumingVortex.cs index b0f4f1bb2a..b030e787ba 100644 --- a/Items/Weapons/SubsumingVortex.cs +++ b/Items/Weapons/SubsumingVortex.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons item.autoReuse = true; item.shoot = mod.ProjectileType("Vortex"); item.shootSpeed = 9f; - item.GetGlobalItem(mod).postMoonLordRarity = 15; + item.Calamity().postMoonLordRarity = 15; } public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) diff --git a/Items/Weapons/Svantechnical.cs b/Items/Weapons/Svantechnical.cs index 54827d4eaa..61a65fc8c7 100644 --- a/Items/Weapons/Svantechnical.cs +++ b/Items/Weapons/Svantechnical.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons item.shootSpeed = 12f; item.shoot = 10; item.useAmmo = 97; - item.GetGlobalItem(mod).postMoonLordRarity = 16; + item.Calamity().postMoonLordRarity = 16; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/T1000.cs b/Items/Weapons/T1000.cs index c3f04efff3..e6b3690088 100644 --- a/Items/Weapons/T1000.cs +++ b/Items/Weapons/T1000.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons item.autoReuse = true; item.shoot = mod.ProjectileType("T1000"); item.shootSpeed = 24f; - item.GetGlobalItem(mod).postMoonLordRarity = 14; + item.Calamity().postMoonLordRarity = 14; } public override void AddRecipes() diff --git a/Items/Weapons/TheEnforcer.cs b/Items/Weapons/TheEnforcer.cs index dcddcf44ab..074c68138c 100644 --- a/Items/Weapons/TheEnforcer.cs +++ b/Items/Weapons/TheEnforcer.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons item.rare = 10; item.shoot = mod.ProjectileType("EssenceFireball"); item.shootSpeed = 24f; - item.GetGlobalItem(mod).postMoonLordRarity = 14; + item.Calamity().postMoonLordRarity = 14; } public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) diff --git a/Items/Weapons/TheMutilator.cs b/Items/Weapons/TheMutilator.cs index b6b24c4472..0a6a2efea4 100644 --- a/Items/Weapons/TheMutilator.cs +++ b/Items/Weapons/TheMutilator.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons item.value = Item.buyPrice(1, 40, 0, 0); item.rare = 10; item.shootSpeed = 10f; - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().postMoonLordRarity = 13; } public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit) diff --git a/Items/Weapons/TheStorm.cs b/Items/Weapons/TheStorm.cs index 56db3efad9..cac863e28c 100644 --- a/Items/Weapons/TheStorm.cs +++ b/Items/Weapons/TheStorm.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons item.shoot = mod.ProjectileType("Bolt"); item.shootSpeed = 28f; item.useAmmo = 40; - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().postMoonLordRarity = 13; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/TheSwarmer.cs b/Items/Weapons/TheSwarmer.cs index 9f3ecda384..5503597479 100644 --- a/Items/Weapons/TheSwarmer.cs +++ b/Items/Weapons/TheSwarmer.cs @@ -57,7 +57,7 @@ namespace CalamityMod.Items.Weapons float SpeedY = speedY + (float)Main.rand.Next(-35, 36) * 0.05f; int wasps = Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, damage, 0f, player.whoAmI, 0f, 0f); Main.projectile[wasps].penetrate = 1; - Main.projectile[wasps].GetGlobalProjectile(mod).forceMagic = true; + Main.projectile[wasps].Calamity().forceMagic = true; } for (int i = 0; i <= 3; i++) { @@ -65,7 +65,7 @@ namespace CalamityMod.Items.Weapons float SpeedY2 = speedY + (float)Main.rand.Next(-35, 36) * 0.05f; int bees = Projectile.NewProjectile(position.X, position.Y, SpeedX2, SpeedY2, player.beeType(), player.beeDamage(item.damage), player.beeKB(0f), player.whoAmI, 0f, 0f); Main.projectile[bees].penetrate = 1; - Main.projectile[bees].GetGlobalProjectile(mod).forceMagic = true; + Main.projectile[bees].Calamity().forceMagic = true; } return false; } diff --git a/Items/Weapons/TheWand.cs b/Items/Weapons/TheWand.cs index 8bdddf3532..694ccecb94 100644 --- a/Items/Weapons/TheWand.cs +++ b/Items/Weapons/TheWand.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons item.rare = 10; item.shoot = mod.ProjectileType("SparkInfernal"); item.shootSpeed = 24f; - item.GetGlobalItem(mod).postMoonLordRarity = 15; + item.Calamity().postMoonLordRarity = 15; } public override void AddRecipes() diff --git a/Items/Weapons/TriactisTruePaladinianMageHammerofMightMelee.cs b/Items/Weapons/TriactisTruePaladinianMageHammerofMightMelee.cs index 207d1b3cfd..4e76589984 100644 --- a/Items/Weapons/TriactisTruePaladinianMageHammerofMightMelee.cs +++ b/Items/Weapons/TriactisTruePaladinianMageHammerofMightMelee.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons item.rare = 10; item.shoot = mod.ProjectileType("TriactisOPHammerMelee"); item.shootSpeed = 25f; - item.GetGlobalItem(mod).postMoonLordRarity = 16; + item.Calamity().postMoonLordRarity = 16; } public override void AddRecipes() diff --git a/Items/Weapons/Trinity.cs b/Items/Weapons/Trinity.cs index 8a5f88ced5..aeeddb3790 100644 --- a/Items/Weapons/Trinity.cs +++ b/Items/Weapons/Trinity.cs @@ -47,7 +47,7 @@ namespace CalamityMod.Items.Weapons float SpeedX = speedX + (float)Main.rand.Next(-30, 31) * 0.05f; float SpeedY = speedY + (float)Main.rand.Next(-30, 31) * 0.05f; int proj = Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, (int)((double)damage * 0.6), knockBack, Main.myPlayer, 0f, 0f); - Main.projectile[proj].GetGlobalProjectile(mod).forceMelee = true; + Main.projectile[proj].Calamity().forceMelee = true; } return false; } diff --git a/Items/Weapons/TrueArkoftheAncients.cs b/Items/Weapons/TrueArkoftheAncients.cs index 4218f480a7..5737128b69 100644 --- a/Items/Weapons/TrueArkoftheAncients.cs +++ b/Items/Weapons/TrueArkoftheAncients.cs @@ -93,7 +93,7 @@ namespace CalamityMod.Items.Weapons float speedX4 = num78 + (float)Main.rand.Next(-160, 161) * 0.02f; float speedY5 = num79 + (float)Main.rand.Next(-160, 161) * 0.02f; int proj = Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, speedY5, 92, damage / 3, num74, i, 0f, (float)Main.rand.Next(10)); - Main.projectile[proj].GetGlobalProjectile(mod).forceMelee = true; + Main.projectile[proj].Calamity().forceMelee = true; Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, speedY5, mod.ProjectileType("TerraBall"), damage / 3, num74, i, 0f, (float)Main.rand.Next(5)); } return false; diff --git a/Items/Weapons/TrueTyrantYharimsUltisword.cs b/Items/Weapons/TrueTyrantYharimsUltisword.cs index 989f591012..40d7822b10 100644 --- a/Items/Weapons/TrueTyrantYharimsUltisword.cs +++ b/Items/Weapons/TrueTyrantYharimsUltisword.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons item.rare = 10; item.shoot = mod.ProjectileType("BlazingPhantomBlade"); item.shootSpeed = 12f; - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) diff --git a/Items/Weapons/UltraLiquidator.cs b/Items/Weapons/UltraLiquidator.cs index 1801db73ec..1af4946c8b 100644 --- a/Items/Weapons/UltraLiquidator.cs +++ b/Items/Weapons/UltraLiquidator.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Weapons item.autoReuse = true; item.shoot = mod.ProjectileType("LiquidBlade"); item.shootSpeed = 16f; - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } public override void AddRecipes() diff --git a/Items/Weapons/VanquisherArrow.cs b/Items/Weapons/VanquisherArrow.cs index 043ac9f5ec..f1a7ab24b1 100644 --- a/Items/Weapons/VanquisherArrow.cs +++ b/Items/Weapons/VanquisherArrow.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Weapons item.shoot = mod.ProjectileType("VanquisherArrow"); item.shootSpeed = 10f; item.ammo = 40; - item.GetGlobalItem(mod).postMoonLordRarity = 14; + item.Calamity().postMoonLordRarity = 14; } public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) diff --git a/Items/Weapons/VenusianTrident.cs b/Items/Weapons/VenusianTrident.cs index 72509cd73c..753680dffb 100644 --- a/Items/Weapons/VenusianTrident.cs +++ b/Items/Weapons/VenusianTrident.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons item.autoReuse = true; item.shoot = mod.ProjectileType("VenusianBolt"); item.shootSpeed = 19f; - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().postMoonLordRarity = 13; } public override void AddRecipes() diff --git a/Items/Weapons/Verdant.cs b/Items/Weapons/Verdant.cs index 64cd3d1fc7..0c55ddac21 100644 --- a/Items/Weapons/Verdant.cs +++ b/Items/Weapons/Verdant.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons item.rare = 10; item.autoReuse = true; item.shoot = mod.ProjectileType("VerdantProjectile"); - item.GetGlobalItem(mod).postMoonLordRarity = 12; + item.Calamity().postMoonLordRarity = 12; } public override void AddRecipes() diff --git a/Items/Weapons/Vesuvius.cs b/Items/Weapons/Vesuvius.cs index 7464c5921d..95e36b4425 100644 --- a/Items/Weapons/Vesuvius.cs +++ b/Items/Weapons/Vesuvius.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Items.Weapons item.rare = 8; item.shootSpeed = 20f; item.shoot = mod.ProjectileType("AsteroidMolten"); - item.GetGlobalItem(mod).postMoonLordRarity = 17; + item.Calamity().postMoonLordRarity = 17; } public override bool AltFunctionUse(Player player) diff --git a/Items/Weapons/Viscera.cs b/Items/Weapons/Viscera.cs index 283f952d0e..27b0ba6431 100644 --- a/Items/Weapons/Viscera.cs +++ b/Items/Weapons/Viscera.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons item.autoReuse = true; item.shoot = mod.ProjectileType("Viscera"); item.shootSpeed = 6f; - item.GetGlobalItem(mod).postMoonLordRarity = 13; + item.Calamity().postMoonLordRarity = 13; } public override void AddRecipes() diff --git a/Items/Weapons/VividClarity.cs b/Items/Weapons/VividClarity.cs index 6c8f547315..fdb3084fea 100644 --- a/Items/Weapons/VividClarity.cs +++ b/Items/Weapons/VividClarity.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Weapons item.autoReuse = true; item.shoot = mod.ProjectileType("VividClarity"); item.shootSpeed = 6f; - item.GetGlobalItem(mod).postMoonLordRarity = 15; + item.Calamity().postMoonLordRarity = 15; } 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) diff --git a/Items/Weapons/YharimsCrystal.cs b/Items/Weapons/YharimsCrystal.cs index 9c62b4ebdc..7b83cf9cce 100644 --- a/Items/Weapons/YharimsCrystal.cs +++ b/Items/Weapons/YharimsCrystal.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons item.rare = 10; item.shoot = mod.ProjectileType("YharimsCrystal"); item.shootSpeed = 30f; - item.GetGlobalItem(mod).postMoonLordRarity = 17; + item.Calamity().postMoonLordRarity = 17; } 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) diff --git a/Items/Weapons/Yharon/AngryChickenStaff.cs b/Items/Weapons/Yharon/AngryChickenStaff.cs index 7f48a607e3..a6b8227e17 100644 --- a/Items/Weapons/Yharon/AngryChickenStaff.cs +++ b/Items/Weapons/Yharon/AngryChickenStaff.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Yharon item.shoot = mod.ProjectileType("AngryChicken"); item.shootSpeed = 10f; item.summon = true; - item.GetGlobalItem(mod).postMoonLordRarity = 14; + item.Calamity().postMoonLordRarity = 14; } public override bool AltFunctionUse(Player player) diff --git a/Items/Weapons/Yharon/ChickenCannon.cs b/Items/Weapons/Yharon/ChickenCannon.cs index ecc500da4f..fb19935351 100644 --- a/Items/Weapons/Yharon/ChickenCannon.cs +++ b/Items/Weapons/Yharon/ChickenCannon.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Yharon item.shootSpeed = 24f; item.shoot = mod.ProjectileType("Chicken"); item.useAmmo = 771; - item.GetGlobalItem(mod).postMoonLordRarity = 14; + item.Calamity().postMoonLordRarity = 14; } 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) diff --git a/Items/Weapons/Yharon/DragonRage.cs b/Items/Weapons/Yharon/DragonRage.cs index 0ef5bba719..0e8d0b08e9 100644 --- a/Items/Weapons/Yharon/DragonRage.cs +++ b/Items/Weapons/Yharon/DragonRage.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Yharon item.rare = 10; item.shoot = mod.ProjectileType("DragonRage"); item.shootSpeed = 14f; - item.GetGlobalItem(mod).postMoonLordRarity = 14; + item.Calamity().postMoonLordRarity = 14; } 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) diff --git a/Items/Weapons/Yharon/DragonsBreath.cs b/Items/Weapons/Yharon/DragonsBreath.cs index 3ddd9095d1..6c9857ea8b 100644 --- a/Items/Weapons/Yharon/DragonsBreath.cs +++ b/Items/Weapons/Yharon/DragonsBreath.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Yharon item.shoot = 10; item.shootSpeed = 12f; item.useAmmo = 97; - item.GetGlobalItem(mod).postMoonLordRarity = 14; + item.Calamity().postMoonLordRarity = 14; } public override Vector2? HoldoutOffset() diff --git a/Items/Weapons/Yharon/PhoenixFlameBarrage.cs b/Items/Weapons/Yharon/PhoenixFlameBarrage.cs index 6b2ff553cf..a9de9c9364 100644 --- a/Items/Weapons/Yharon/PhoenixFlameBarrage.cs +++ b/Items/Weapons/Yharon/PhoenixFlameBarrage.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Yharon item.autoReuse = true; item.shoot = mod.ProjectileType("HolyFlame"); item.shootSpeed = 30f; - item.GetGlobalItem(mod).postMoonLordRarity = 14; + item.Calamity().postMoonLordRarity = 14; } 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) diff --git a/Items/Weapons/Yharon/TheBurningSky.cs b/Items/Weapons/Yharon/TheBurningSky.cs index 472ff173e2..8c18cfcef6 100644 --- a/Items/Weapons/Yharon/TheBurningSky.cs +++ b/Items/Weapons/Yharon/TheBurningSky.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Yharon item.rare = 10; item.shoot = mod.ProjectileType("BurningMeteor"); item.shootSpeed = 35f; - item.GetGlobalItem(mod).postMoonLordRarity = 14; + item.Calamity().postMoonLordRarity = 14; } 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) diff --git a/Items/Yharon/ChickenEgg.cs b/Items/Yharon/ChickenEgg.cs index 210862a94e..87603d4a81 100644 --- a/Items/Yharon/ChickenEgg.cs +++ b/Items/Yharon/ChickenEgg.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Yharon item.useTime = 45; item.useStyle = 4; item.consumable = false; - item.GetGlobalItem(mod).postMoonLordRarity = 14; + item.Calamity().postMoonLordRarity = 14; } public override bool CanUseItem(Player player) diff --git a/NPCs/AbyssNPCs/AquaticScourgeBody.cs b/NPCs/AbyssNPCs/AquaticScourgeBody.cs index c5f8053c61..7b5bfca24f 100644 --- a/NPCs/AbyssNPCs/AquaticScourgeBody.cs +++ b/NPCs/AbyssNPCs/AquaticScourgeBody.cs @@ -23,7 +23,7 @@ namespace CalamityMod.NPCs.AbyssNPCs npc.width = 32; npc.height = 32; npc.defense = 20; - npc.GetCalamityNPC().RevPlusDR(0.05f); + npc.Calamity().RevPlusDR(0.05f); npc.aiStyle = -1; aiType = -1; npc.knockBackResist = 0f; diff --git a/NPCs/AbyssNPCs/AquaticScourgeBodyAlt.cs b/NPCs/AbyssNPCs/AquaticScourgeBodyAlt.cs index 413a92daab..9aea741fad 100644 --- a/NPCs/AbyssNPCs/AquaticScourgeBodyAlt.cs +++ b/NPCs/AbyssNPCs/AquaticScourgeBodyAlt.cs @@ -23,7 +23,7 @@ namespace CalamityMod.NPCs.AbyssNPCs npc.width = 32; npc.height = 32; npc.defense = 15; - npc.GetCalamityNPC().RevPlusDR(0.05f); + npc.Calamity().RevPlusDR(0.05f); npc.aiStyle = -1; aiType = -1; npc.knockBackResist = 0f; diff --git a/NPCs/AbyssNPCs/AquaticScourgeHead.cs b/NPCs/AbyssNPCs/AquaticScourgeHead.cs index 4757a7e29a..10d6c9c9e3 100644 --- a/NPCs/AbyssNPCs/AquaticScourgeHead.cs +++ b/NPCs/AbyssNPCs/AquaticScourgeHead.cs @@ -34,7 +34,7 @@ namespace CalamityMod.NPCs.AbyssNPCs npc.width = 100; npc.height = 90; npc.defense = 10; - npc.GetCalamityNPC().RevPlusDR(0.1f); + npc.Calamity().RevPlusDR(0.1f); npc.aiStyle = -1; aiType = -1; npc.lifeMax = CalamityWorld.revenge ? 85000 : 73000; @@ -145,7 +145,7 @@ namespace CalamityMod.NPCs.AbyssNPCs if (detectsPlayer) { npc.localAI[0] += 1f; - if (npc.localAI[0] >= ((npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) ? 120f : 180f)) + if (npc.localAI[0] >= ((npc.Calamity().enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) ? 120f : 180f)) { int npcPoxX = (int)(npc.position.X + (float)(npc.width / 2)) / 16; int npcPoxY = (int)(npc.position.Y + (float)(npc.height / 2)) / 16; @@ -540,7 +540,7 @@ namespace CalamityMod.NPCs.AbyssNPCs { return 0f; } - if (spawnInfo.player.GetCalamityPlayer().ZoneSulphur && spawnInfo.water) + if (spawnInfo.player.Calamity().ZoneSulphur && spawnInfo.water) { if (!NPC.AnyNPCs(mod.NPCType("AquaticScourgeHead"))) return 0.01f; diff --git a/NPCs/AbyssNPCs/AquaticScourgeTail.cs b/NPCs/AbyssNPCs/AquaticScourgeTail.cs index e2524da01a..137f69f196 100644 --- a/NPCs/AbyssNPCs/AquaticScourgeTail.cs +++ b/NPCs/AbyssNPCs/AquaticScourgeTail.cs @@ -22,7 +22,7 @@ namespace CalamityMod.NPCs.AbyssNPCs npc.width = 30; npc.height = 50; npc.defense = 25; - npc.GetCalamityNPC().RevPlusDR(0.15f); + npc.Calamity().RevPlusDR(0.15f); npc.aiStyle = -1; aiType = -1; npc.knockBackResist = 0f; diff --git a/NPCs/AbyssNPCs/AquaticSeekerHead.cs b/NPCs/AbyssNPCs/AquaticSeekerHead.cs index f23d217479..f37883dbdf 100644 --- a/NPCs/AbyssNPCs/AquaticSeekerHead.cs +++ b/NPCs/AbyssNPCs/AquaticSeekerHead.cs @@ -316,7 +316,7 @@ namespace CalamityMod.NPCs.AbyssNPCs { return 0f; } - if (spawnInfo.player.GetCalamityPlayer().ZoneSulphur && spawnInfo.water) + if (spawnInfo.player.Calamity().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 85e436ee30..f691cecf50 100644 --- a/NPCs/AbyssNPCs/AquaticUrchin.cs +++ b/NPCs/AbyssNPCs/AquaticUrchin.cs @@ -329,7 +329,7 @@ namespace CalamityMod.NPCs.AbyssNPCs { return 0f; } - if (spawnInfo.player.GetCalamityPlayer().ZoneSulphur && spawnInfo.water && NPC.CountNPCS(mod.NPCType("AquaticUrchin")) < 2) + if (spawnInfo.player.Calamity().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 6d2550e181..0f9344a463 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.GetCalamityPlayer().ZoneAbyssLayer4 && spawnInfo.water && NPC.CountNPCS(mod.NPCType("Bloatfish")) < 3) + if (spawnInfo.player.Calamity().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 66d291053a..309ebadb57 100644 --- a/NPCs/AbyssNPCs/BobbitWormHead.cs +++ b/NPCs/AbyssNPCs/BobbitWormHead.cs @@ -25,7 +25,7 @@ namespace CalamityMod.NPCs.AbyssNPCs npc.width = 80; //324 npc.height = 40; //216 npc.defense = 50; - npc.GetCalamityNPC().RevPlusDR(0.25f); + npc.Calamity().RevPlusDR(0.25f); npc.lifeMax = 10000; npc.knockBackResist = 0f; aiType = -1; @@ -65,7 +65,7 @@ namespace CalamityMod.NPCs.AbyssNPCs npc.TargetClosest(true); //if (npc.Center.Y + ((Main.player[npc.target].GetCalamityPlayer().anechoicPlating || // Main.player[npc.target].GetCalamityPlayer().anechoicCoating) ? 50f : 100f) > Main.player[npc.target].Center.Y && - if (npc.Center.Y + Main.player[npc.target].GetCalamityPlayer().GetAbyssAggro(100f, 50f) > Main.player[npc.target].Center.Y && + if (npc.Center.Y + Main.player[npc.target].Calamity().GetAbyssAggro(100f, 50f) > 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 8d09d6949c..6ad9c11672 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.GetCalamityPlayer().ZoneAbyssLayer4 && spawnInfo.water) + if (spawnInfo.player.Calamity().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 1b19ade192..551022681b 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.GetCalamityPlayer().ZoneSulphur) + if (spawnInfo.playerSafe || spawnInfo.player.Calamity().ZoneSulphur) { return 0f; } - if (spawnInfo.player.GetCalamityPlayer().ZoneAbyssLayer1 && spawnInfo.water) + if (spawnInfo.player.Calamity().ZoneAbyssLayer1 && spawnInfo.water) { return SpawnCondition.CaveJellyfish.Chance * 1.2f; } diff --git a/NPCs/AbyssNPCs/Catfish.cs b/NPCs/AbyssNPCs/Catfish.cs index 662cbfc68b..87055dedc3 100644 --- a/NPCs/AbyssNPCs/Catfish.cs +++ b/NPCs/AbyssNPCs/Catfish.cs @@ -243,7 +243,7 @@ namespace CalamityMod.NPCs.AbyssNPCs { return 0f; } - if (spawnInfo.player.GetCalamityPlayer().ZoneSulphur && spawnInfo.water) + if (spawnInfo.player.Calamity().ZoneSulphur && spawnInfo.water) { return 0.2f; } diff --git a/NPCs/AbyssNPCs/ChaoticPuffer.cs b/NPCs/AbyssNPCs/ChaoticPuffer.cs index 978b5d00b6..0f264a693c 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.GetCalamityPlayer().ZoneAbyssLayer4 && spawnInfo.water) + if (spawnInfo.player.Calamity().ZoneAbyssLayer4 && spawnInfo.water) { return SpawnCondition.CaveJellyfish.Chance * 0.6f; } diff --git a/NPCs/AbyssNPCs/ColossalSquid.cs b/NPCs/AbyssNPCs/ColossalSquid.cs index 4a9dc6dd4d..6109f93018 100644 --- a/NPCs/AbyssNPCs/ColossalSquid.cs +++ b/NPCs/AbyssNPCs/ColossalSquid.cs @@ -28,7 +28,7 @@ namespace CalamityMod.NPCs.AbyssNPCs npc.width = 180; npc.height = 180; npc.defense = 50; - npc.GetCalamityNPC().RevPlusDR(0.05f); + npc.Calamity().RevPlusDR(0.05f); npc.lifeMax = 220000; npc.aiStyle = -1; aiType = -1; @@ -325,7 +325,7 @@ namespace CalamityMod.NPCs.AbyssNPCs //(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)) || - (Main.player[npc.target].Center - npc.Center).Length() < Main.player[npc.target].GetCalamityPlayer().GetAbyssAggro(300f, 150f)) || + (Main.player[npc.target].Center - npc.Center).Length() < Main.player[npc.target].Calamity().GetAbyssAggro(300f, 150f)) || npc.justHit) { hasBeenHit = true; @@ -534,7 +534,7 @@ namespace CalamityMod.NPCs.AbyssNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.player.GetCalamityPlayer().ZoneAbyssLayer3 && spawnInfo.water && !NPC.AnyNPCs(mod.NPCType("ColossalSquid"))) + if (spawnInfo.player.Calamity().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 10fe14910f..9b3023c736 100644 --- a/NPCs/AbyssNPCs/Cuttlefish.cs +++ b/NPCs/AbyssNPCs/Cuttlefish.cs @@ -300,11 +300,11 @@ namespace CalamityMod.NPCs.AbyssNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.player.GetCalamityPlayer().ZoneAbyssLayer1 && spawnInfo.water) + if (spawnInfo.player.Calamity().ZoneAbyssLayer1 && spawnInfo.water) { return SpawnCondition.CaveJellyfish.Chance * 0.3f; } - if (spawnInfo.player.GetCalamityPlayer().ZoneAbyssLayer2 && spawnInfo.water) + if (spawnInfo.player.Calamity().ZoneAbyssLayer2 && spawnInfo.water) { return SpawnCondition.CaveJellyfish.Chance * 0.6f; } diff --git a/NPCs/AbyssNPCs/DevilFish.cs b/NPCs/AbyssNPCs/DevilFish.cs index 3e9e72baed..c45b063d5d 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.GetCalamityPlayer().ZoneAbyssLayer1 && spawnInfo.water) + if (spawnInfo.player.Calamity().ZoneAbyssLayer1 && spawnInfo.water) { return SpawnCondition.CaveJellyfish.Chance * 0.45f; } - if (spawnInfo.player.GetCalamityPlayer().ZoneAbyssLayer2 && spawnInfo.water) + if (spawnInfo.player.Calamity().ZoneAbyssLayer2 && spawnInfo.water) { return SpawnCondition.CaveJellyfish.Chance * 0.6f; } diff --git a/NPCs/AbyssNPCs/EidolonWyrmHead.cs b/NPCs/AbyssNPCs/EidolonWyrmHead.cs index 7f4e770d80..59aac6497a 100644 --- a/NPCs/AbyssNPCs/EidolonWyrmHead.cs +++ b/NPCs/AbyssNPCs/EidolonWyrmHead.cs @@ -31,7 +31,7 @@ namespace CalamityMod.NPCs.AbyssNPCs npc.width = 126; //36 npc.height = 76; //20 npc.defense = 300; - npc.GetCalamityNPC().RevPlusDR(0.15f); + npc.Calamity().RevPlusDR(0.15f); npc.lifeMax = 160000; npc.aiStyle = -1; aiType = -1; @@ -221,7 +221,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].GetCalamityPlayer().ZoneAbyss) + if (Vector2.Distance(Main.player[npc.target].Center, npc.Center) > 6400f || !NPC.AnyNPCs(mod.NPCType("EidolonWyrmTail")) || !Main.player[npc.target].Calamity().ZoneAbyss) { npc.active = false; } @@ -465,12 +465,12 @@ namespace CalamityMod.NPCs.AbyssNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.player.GetCalamityPlayer().ZoneAbyssLayer3 && spawnInfo.water && !NPC.AnyNPCs(mod.NPCType("EidolonWyrmHead")) && + if (spawnInfo.player.Calamity().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.GetCalamityPlayer().ZoneAbyssLayer4 && spawnInfo.water && !NPC.AnyNPCs(mod.NPCType("EidolonWyrmHead"))) + if (spawnInfo.player.Calamity().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 e515dc39de..fe7a1d0df9 100644 --- a/NPCs/AbyssNPCs/EidolonWyrmHeadHuge.cs +++ b/NPCs/AbyssNPCs/EidolonWyrmHeadHuge.cs @@ -466,7 +466,7 @@ namespace CalamityMod.NPCs.AbyssNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.player.GetCalamityPlayer().ZoneAbyssLayer4 && spawnInfo.water && !NPC.AnyNPCs(mod.NPCType("EidolonWyrmHeadHuge")) && CalamityWorld.downedPolterghast) + if (spawnInfo.player.Calamity().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 621e498c05..45f0f61e4c 100644 --- a/NPCs/AbyssNPCs/Flounder.cs +++ b/NPCs/AbyssNPCs/Flounder.cs @@ -271,7 +271,7 @@ namespace CalamityMod.NPCs.AbyssNPCs { return 0f; } - if (spawnInfo.player.GetCalamityPlayer().ZoneSulphur && spawnInfo.water) + if (spawnInfo.player.Calamity().ZoneSulphur && spawnInfo.water) { return 0.2f; } diff --git a/NPCs/AbyssNPCs/Frogfish.cs b/NPCs/AbyssNPCs/Frogfish.cs index 2f09283333..6581ac46a5 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.GetCalamityPlayer().ZoneSulphur) + if (spawnInfo.playerSafe || spawnInfo.player.Calamity().ZoneSulphur) { return 0f; } diff --git a/NPCs/AbyssNPCs/GiantSquid.cs b/NPCs/AbyssNPCs/GiantSquid.cs index 23a7350900..ca3f08daa0 100644 --- a/NPCs/AbyssNPCs/GiantSquid.cs +++ b/NPCs/AbyssNPCs/GiantSquid.cs @@ -100,7 +100,7 @@ namespace CalamityMod.NPCs.AbyssNPCs //(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)) || - (Main.player[npc.target].Center - npc.Center).Length() < Main.player[npc.target].GetCalamityPlayer().GetAbyssAggro(500f, 300f)) || + (Main.player[npc.target].Center - npc.Center).Length() < Main.player[npc.target].Calamity().GetAbyssAggro(500f, 300f)) || npc.justHit) { hasBeenHit = true; @@ -225,11 +225,11 @@ namespace CalamityMod.NPCs.AbyssNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.player.GetCalamityPlayer().ZoneAbyssLayer2 && spawnInfo.water) + if (spawnInfo.player.Calamity().ZoneAbyssLayer2 && spawnInfo.water) { return SpawnCondition.CaveJellyfish.Chance * 0.6f; } - if (spawnInfo.player.GetCalamityPlayer().ZoneAbyssLayer3 && spawnInfo.water) + if (spawnInfo.player.Calamity().ZoneAbyssLayer3 && spawnInfo.water) { return SpawnCondition.CaveJellyfish.Chance * 1.2f; } diff --git a/NPCs/AbyssNPCs/Gnasher.cs b/NPCs/AbyssNPCs/Gnasher.cs index 222468333c..23a62d2ce5 100644 --- a/NPCs/AbyssNPCs/Gnasher.cs +++ b/NPCs/AbyssNPCs/Gnasher.cs @@ -20,7 +20,7 @@ namespace CalamityMod.NPCs.AbyssNPCs npc.width = 50; npc.height = 36; npc.defense = 30; - npc.GetCalamityNPC().RevPlusDR(0.15f); + npc.Calamity().RevPlusDR(0.15f); npc.lifeMax = 35; npc.knockBackResist = 0.25f; npc.aiStyle = 3; @@ -100,7 +100,7 @@ namespace CalamityMod.NPCs.AbyssNPCs { return 0f; } - if (spawnInfo.player.GetCalamityPlayer().ZoneSulphur) + if (spawnInfo.player.Calamity().ZoneSulphur) { return 0.2f; } diff --git a/NPCs/AbyssNPCs/GulperEelHead.cs b/NPCs/AbyssNPCs/GulperEelHead.cs index 4bc9234f25..4c7d9c680f 100644 --- a/NPCs/AbyssNPCs/GulperEelHead.cs +++ b/NPCs/AbyssNPCs/GulperEelHead.cs @@ -66,7 +66,7 @@ namespace CalamityMod.NPCs.AbyssNPCs //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) || - if ((Main.player[npc.target].Center - npc.Center).Length() < Main.player[npc.target].GetCalamityPlayer().GetAbyssAggro(600f, 100f) || + if ((Main.player[npc.target].Center - npc.Center).Length() < Main.player[npc.target].Calamity().GetAbyssAggro(600f, 100f) || npc.justHit) { detectsPlayer = true; @@ -365,11 +365,11 @@ namespace CalamityMod.NPCs.AbyssNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.player.GetCalamityPlayer().ZoneAbyssLayer3 && spawnInfo.water && !NPC.AnyNPCs(mod.NPCType("GulperEelHead"))) + if (spawnInfo.player.Calamity().ZoneAbyssLayer3 && spawnInfo.water && !NPC.AnyNPCs(mod.NPCType("GulperEelHead"))) { return SpawnCondition.CaveJellyfish.Chance * 0.3f; } - if (spawnInfo.player.GetCalamityPlayer().ZoneAbyssLayer4 && spawnInfo.water && !NPC.AnyNPCs(mod.NPCType("GulperEelHead"))) + if (spawnInfo.player.Calamity().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 e4434ba93f..a916dc37f6 100644 --- a/NPCs/AbyssNPCs/Laserfish.cs +++ b/NPCs/AbyssNPCs/Laserfish.cs @@ -73,7 +73,7 @@ namespace CalamityMod.NPCs.AbyssNPCs //(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)) - (Main.player[npc.target].Center - npc.Center).Length() < Main.player[npc.target].GetCalamityPlayer().GetAbyssAggro(400f, 200f)) + (Main.player[npc.target].Center - npc.Center).Length() < Main.player[npc.target].Calamity().GetAbyssAggro(400f, 200f)) { flag14 = true; } @@ -275,11 +275,11 @@ namespace CalamityMod.NPCs.AbyssNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.player.GetCalamityPlayer().ZoneAbyssLayer2 && spawnInfo.water) + if (spawnInfo.player.Calamity().ZoneAbyssLayer2 && spawnInfo.water) { return SpawnCondition.CaveJellyfish.Chance * 0.6f; } - if (spawnInfo.player.GetCalamityPlayer().ZoneAbyssLayer3 && spawnInfo.water) + if (spawnInfo.player.Calamity().ZoneAbyssLayer3 && spawnInfo.water) { return SpawnCondition.CaveJellyfish.Chance * 1.2f; } diff --git a/NPCs/AbyssNPCs/LuminousCorvina.cs b/NPCs/AbyssNPCs/LuminousCorvina.cs index def03e1c2b..585fe49ffa 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.GetCalamityPlayer().ZoneAbyssLayer2 && spawnInfo.water) + if (spawnInfo.player.Calamity().ZoneAbyssLayer2 && spawnInfo.water) { return SpawnCondition.CaveJellyfish.Chance * 0.6f; } diff --git a/NPCs/AbyssNPCs/MantisShrimp.cs b/NPCs/AbyssNPCs/MantisShrimp.cs index 41d226d03e..7e0f112d6e 100644 --- a/NPCs/AbyssNPCs/MantisShrimp.cs +++ b/NPCs/AbyssNPCs/MantisShrimp.cs @@ -20,7 +20,7 @@ namespace CalamityMod.NPCs.AbyssNPCs npc.width = 40; npc.height = 24; npc.defense = 10; - npc.GetCalamityNPC().RevPlusDR(0.1f); + npc.Calamity().RevPlusDR(0.1f); npc.lifeMax = 30; npc.aiStyle = 3; aiType = 67; @@ -94,7 +94,7 @@ namespace CalamityMod.NPCs.AbyssNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.playerSafe || spawnInfo.player.GetCalamityPlayer().ZoneSulphur) + if (spawnInfo.playerSafe || spawnInfo.player.Calamity().ZoneSulphur) { return 0f; } diff --git a/NPCs/AbyssNPCs/Mauler.cs b/NPCs/AbyssNPCs/Mauler.cs index dc4452910a..554d4476a3 100644 --- a/NPCs/AbyssNPCs/Mauler.cs +++ b/NPCs/AbyssNPCs/Mauler.cs @@ -26,7 +26,7 @@ namespace CalamityMod.NPCs.AbyssNPCs npc.width = 180; npc.height = 90; npc.defense = 50; - npc.GetCalamityNPC().RevPlusDR(0.05f); + npc.Calamity().RevPlusDR(0.05f); npc.lifeMax = 165000; npc.aiStyle = -1; aiType = -1; @@ -364,7 +364,7 @@ namespace CalamityMod.NPCs.AbyssNPCs { return 0f; } - if (spawnInfo.player.GetCalamityPlayer().ZoneSulphur && spawnInfo.water && !NPC.AnyNPCs(mod.NPCType("Mauler")) && + if (spawnInfo.player.Calamity().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 621172beaf..f18893cc4a 100644 --- a/NPCs/AbyssNPCs/MirageJelly.cs +++ b/NPCs/AbyssNPCs/MirageJelly.cs @@ -180,7 +180,7 @@ namespace CalamityMod.NPCs.AbyssNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.player.GetCalamityPlayer().ZoneAbyssLayer3 && spawnInfo.water) + if (spawnInfo.player.Calamity().ZoneAbyssLayer3 && spawnInfo.water) { return SpawnCondition.CaveJellyfish.Chance * 0.6f; } diff --git a/NPCs/AbyssNPCs/MorayEel.cs b/NPCs/AbyssNPCs/MorayEel.cs index 33e6c9911e..23b61864f5 100644 --- a/NPCs/AbyssNPCs/MorayEel.cs +++ b/NPCs/AbyssNPCs/MorayEel.cs @@ -72,7 +72,7 @@ namespace CalamityMod.NPCs.AbyssNPCs //(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)) - (Main.player[npc.target].Center - npc.Center).Length() < Main.player[npc.target].GetCalamityPlayer().GetAbyssAggro(300f, 250f)) + (Main.player[npc.target].Center - npc.Center).Length() < Main.player[npc.target].Calamity().GetAbyssAggro(300f, 250f)) { flag14 = true; } @@ -252,11 +252,11 @@ namespace CalamityMod.NPCs.AbyssNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.playerSafe || spawnInfo.player.GetCalamityPlayer().ZoneSulphur) + if (spawnInfo.playerSafe || spawnInfo.player.Calamity().ZoneSulphur) { return 0f; } - if (spawnInfo.player.GetCalamityPlayer().ZoneAbyssLayer1 && spawnInfo.water) + if (spawnInfo.player.Calamity().ZoneAbyssLayer1 && spawnInfo.water) { return SpawnCondition.CaveJellyfish.Chance * 1.2f; } diff --git a/NPCs/AbyssNPCs/OarfishHead.cs b/NPCs/AbyssNPCs/OarfishHead.cs index 1391e85e63..7e6a84958d 100644 --- a/NPCs/AbyssNPCs/OarfishHead.cs +++ b/NPCs/AbyssNPCs/OarfishHead.cs @@ -134,7 +134,7 @@ namespace CalamityMod.NPCs.AbyssNPCs //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)) - if ((Main.player[npc.target].Center - npc.Center).Length() < Main.player[npc.target].GetCalamityPlayer().GetAbyssAggro(250f, 150f)) + if ((Main.player[npc.target].Center - npc.Center).Length() < Main.player[npc.target].Calamity().GetAbyssAggro(250f, 150f)) { num192 = num47; if (Math.Abs(npc.Center.X - Main.player[npc.target].Center.X) < 250f) @@ -169,7 +169,7 @@ namespace CalamityMod.NPCs.AbyssNPCs //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)) - if ((Main.player[npc.target].Center - npc.Center).Length() < Main.player[npc.target].GetCalamityPlayer().GetAbyssAggro(250f, 150f)) + if ((Main.player[npc.target].Center - npc.Center).Length() < Main.player[npc.target].Calamity().GetAbyssAggro(250f, 150f)) { for (int num51 = 0; num51 < 200; num51++) { @@ -314,11 +314,11 @@ namespace CalamityMod.NPCs.AbyssNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.player.GetCalamityPlayer().ZoneAbyssLayer2 && spawnInfo.water && !NPC.AnyNPCs(mod.NPCType("OarfishHead"))) + if (spawnInfo.player.Calamity().ZoneAbyssLayer2 && spawnInfo.water && !NPC.AnyNPCs(mod.NPCType("OarfishHead"))) { return SpawnCondition.CaveJellyfish.Chance * 0.3f; } - if (spawnInfo.player.GetCalamityPlayer().ZoneAbyssLayer3 && spawnInfo.water && !NPC.AnyNPCs(mod.NPCType("OarfishHead"))) + if (spawnInfo.player.Calamity().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 cf4f43f921..00fe508500 100644 --- a/NPCs/AbyssNPCs/Reaper.cs +++ b/NPCs/AbyssNPCs/Reaper.cs @@ -152,7 +152,7 @@ namespace CalamityMod.NPCs.AbyssNPCs //(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)) - (Main.player[npc.target].Center - npc.Center).Length() < Main.player[npc.target].GetCalamityPlayer().GetAbyssAggro(500f, 300f)) || + (Main.player[npc.target].Center - npc.Center).Length() < Main.player[npc.target].Calamity().GetAbyssAggro(500f, 300f)) || npc.justHit) { @@ -646,12 +646,12 @@ namespace CalamityMod.NPCs.AbyssNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.player.GetCalamityPlayer().ZoneAbyssLayer3 && spawnInfo.water && !NPC.AnyNPCs(mod.NPCType("Reaper")) && + if (spawnInfo.player.Calamity().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.GetCalamityPlayer().ZoneAbyssLayer4 && spawnInfo.water && !NPC.AnyNPCs(mod.NPCType("Reaper"))) + if (spawnInfo.player.Calamity().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 27501fbc49..89c658390d 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.GetCalamityPlayer().ZoneSulphur) + if (spawnInfo.playerSafe || spawnInfo.player.Calamity().ZoneSulphur) { return 0f; } diff --git a/NPCs/AbyssNPCs/ToxicMinnow.cs b/NPCs/AbyssNPCs/ToxicMinnow.cs index f6bd3fb6af..68e52a9dc2 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.GetCalamityPlayer().ZoneAbyssLayer1 && spawnInfo.water) + if (spawnInfo.player.Calamity().ZoneAbyssLayer1 && spawnInfo.water) { return SpawnCondition.CaveJellyfish.Chance * 0.6f; } - if (spawnInfo.player.GetCalamityPlayer().ZoneAbyssLayer2 && spawnInfo.water) + if (spawnInfo.player.Calamity().ZoneAbyssLayer2 && spawnInfo.water) { return SpawnCondition.CaveJellyfish.Chance * 0.9f; } - if (spawnInfo.player.GetCalamityPlayer().ZoneAbyssLayer3 && spawnInfo.water) + if (spawnInfo.player.Calamity().ZoneAbyssLayer3 && spawnInfo.water) { return SpawnCondition.CaveJellyfish.Chance * 0.6f; } diff --git a/NPCs/AbyssNPCs/Trasher.cs b/NPCs/AbyssNPCs/Trasher.cs index bb91df9eae..7571bae7e1 100644 --- a/NPCs/AbyssNPCs/Trasher.cs +++ b/NPCs/AbyssNPCs/Trasher.cs @@ -337,7 +337,7 @@ namespace CalamityMod.NPCs.AbyssNPCs { return 0f; } - if (spawnInfo.player.GetCalamityPlayer().ZoneSulphur || (spawnInfo.player.GetCalamityPlayer().ZoneSulphur && spawnInfo.water)) + if (spawnInfo.player.Calamity().ZoneSulphur || (spawnInfo.player.Calamity().ZoneSulphur && spawnInfo.water)) { return 0.1f; } diff --git a/NPCs/AbyssNPCs/Viperfish.cs b/NPCs/AbyssNPCs/Viperfish.cs index 7e8371e78c..7dcf128aab 100644 --- a/NPCs/AbyssNPCs/Viperfish.cs +++ b/NPCs/AbyssNPCs/Viperfish.cs @@ -75,7 +75,7 @@ namespace CalamityMod.NPCs.AbyssNPCs //(Main.player[npc.target].GetCalamityPlayer().fishAlert ? 3f : 1f) * // (Main.player[npc.target].GetCalamityPlayer().abyssalMirror ? 0.7f : 1f) * // (Main.player[npc.target].GetCalamityPlayer().eclipseMirror ? 0.3f : 1f)) - (Main.player[npc.target].Center - npc.Center).Length() < Main.player[npc.target].GetCalamityPlayer().GetAbyssAggro(600f, 200f)) + (Main.player[npc.target].Center - npc.Center).Length() < Main.player[npc.target].Calamity().GetAbyssAggro(600f, 200f)) { flag14 = true; } @@ -265,11 +265,11 @@ namespace CalamityMod.NPCs.AbyssNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.player.GetCalamityPlayer().ZoneAbyssLayer1 && spawnInfo.water) + if (spawnInfo.player.Calamity().ZoneAbyssLayer1 && spawnInfo.water) { return SpawnCondition.CaveJellyfish.Chance * 0.6f; } - if (spawnInfo.player.GetCalamityPlayer().ZoneAbyssLayer2 && spawnInfo.water) + if (spawnInfo.player.Calamity().ZoneAbyssLayer2 && spawnInfo.water) { return SpawnCondition.CaveJellyfish.Chance * 1.2f; } diff --git a/NPCs/Astrageldon/Astrageldon.cs b/NPCs/Astrageldon/Astrageldon.cs index 0683a2365c..fa25d519c5 100644 --- a/NPCs/Astrageldon/Astrageldon.cs +++ b/NPCs/Astrageldon/Astrageldon.cs @@ -30,7 +30,7 @@ namespace CalamityMod.NPCs.Astrageldon npc.width = 400; npc.height = 280; npc.defense = 50; - npc.GetCalamityNPC().RevPlusDR(0.15f); + npc.Calamity().RevPlusDR(0.15f); npc.LifeMaxNERD(96000, NPC.downedMoonlord ? 440000 : 122000, 187000, 1400000, 1600000); npc.aiStyle = -1; aiType = -1; diff --git a/NPCs/AstralBiomeNPCs/Aries.cs b/NPCs/AstralBiomeNPCs/Aries.cs index 640edf9b18..5d21fc7825 100644 --- a/NPCs/AstralBiomeNPCs/Aries.cs +++ b/NPCs/AstralBiomeNPCs/Aries.cs @@ -28,7 +28,7 @@ namespace CalamityMod.NPCs.AstralBiomeNPCs npc.height = 54; npc.aiStyle = 41; npc.defense = 14; - npc.GetCalamityNPC().RevPlusDR(0.15f); + npc.Calamity().RevPlusDR(0.15f); npc.lifeMax = 300; npc.knockBackResist = 0.6f; npc.value = Item.buyPrice(0, 0, 10, 0); diff --git a/NPCs/AstralBiomeNPCs/AstralProbe.cs b/NPCs/AstralBiomeNPCs/AstralProbe.cs index d7a9186b62..59738bec38 100644 --- a/NPCs/AstralBiomeNPCs/AstralProbe.cs +++ b/NPCs/AstralBiomeNPCs/AstralProbe.cs @@ -21,7 +21,7 @@ namespace CalamityMod.NPCs.AstralBiomeNPCs npc.width = 30; //324 npc.height = 30; //216 npc.defense = 10; - npc.GetCalamityNPC().RevPlusDR(0.15f); + npc.Calamity().RevPlusDR(0.15f); npc.lifeMax = 50; npc.aiStyle = -1; aiType = -1; @@ -302,7 +302,7 @@ namespace CalamityMod.NPCs.AstralBiomeNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - return (spawnInfo.player.GetCalamityPlayer().ZoneAstral && !spawnInfo.player.ZoneTowerStardust && !spawnInfo.player.ZoneTowerSolar && !spawnInfo.player.ZoneTowerVortex && !spawnInfo.player.ZoneTowerNebula) ? 0.1f : 0f; + return (spawnInfo.player.Calamity().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/AstralBiomeNPCs/AstralachneaGround.cs b/NPCs/AstralBiomeNPCs/AstralachneaGround.cs index 22f97f8a21..a1fbda0772 100644 --- a/NPCs/AstralBiomeNPCs/AstralachneaGround.cs +++ b/NPCs/AstralBiomeNPCs/AstralachneaGround.cs @@ -32,7 +32,7 @@ namespace CalamityMod.NPCs.AstralBiomeNPCs npc.aiStyle = 3; npc.damage = 55; npc.defense = 20; - npc.GetCalamityNPC().RevPlusDR(0.15f); + npc.Calamity().RevPlusDR(0.15f); npc.lifeMax = 500; npc.DeathSound = mod.GetLegacySoundSlot(SoundType.NPCKilled, "Sounds/NPCKilled/AstralEnemyDeath"); npc.knockBackResist = 0.38f; diff --git a/NPCs/AstralBiomeNPCs/AstralachneaWall.cs b/NPCs/AstralBiomeNPCs/AstralachneaWall.cs index 4a94b77840..335e684fe6 100644 --- a/NPCs/AstralBiomeNPCs/AstralachneaWall.cs +++ b/NPCs/AstralBiomeNPCs/AstralachneaWall.cs @@ -32,7 +32,7 @@ namespace CalamityMod.NPCs.AstralBiomeNPCs npc.aiStyle = -1; npc.damage = 55; npc.defense = 20; - npc.GetCalamityNPC().RevPlusDR(0.15f); + npc.Calamity().RevPlusDR(0.15f); npc.lifeMax = 500; npc.DeathSound = mod.GetLegacySoundSlot(SoundType.NPCKilled, "Sounds/NPCKilled/AstralEnemyDeath"); npc.knockBackResist = 0f; diff --git a/NPCs/AstralBiomeNPCs/Atlas.cs b/NPCs/AstralBiomeNPCs/Atlas.cs index e968ddd212..0b67216e9a 100644 --- a/NPCs/AstralBiomeNPCs/Atlas.cs +++ b/NPCs/AstralBiomeNPCs/Atlas.cs @@ -103,7 +103,7 @@ namespace CalamityMod.NPCs.AstralBiomeNPCs npc.height = 88; npc.damage = 70; npc.defense = 40; - npc.GetCalamityNPC().RevPlusDR(0.15f); + npc.Calamity().RevPlusDR(0.15f); npc.lifeMax = 1200; npc.knockBackResist = 0.08f; npc.value = Item.buyPrice(0, 1, 0, 0); diff --git a/NPCs/AstralBiomeNPCs/BigSightseer.cs b/NPCs/AstralBiomeNPCs/BigSightseer.cs index 46efa64d4c..2d42651488 100644 --- a/NPCs/AstralBiomeNPCs/BigSightseer.cs +++ b/NPCs/AstralBiomeNPCs/BigSightseer.cs @@ -30,7 +30,7 @@ namespace CalamityMod.NPCs.AstralBiomeNPCs npc.height = 56; npc.damage = 50; npc.defense = 20; - npc.GetCalamityNPC().RevPlusDR(0.15f); + npc.Calamity().RevPlusDR(0.15f); npc.lifeMax = 430; npc.DeathSound = mod.GetLegacySoundSlot(SoundType.NPCKilled, "Sounds/NPCKilled/AstralEnemyDeath"); npc.noGravity = true; diff --git a/NPCs/AstralBiomeNPCs/FusionFeeder.cs b/NPCs/AstralBiomeNPCs/FusionFeeder.cs index 11ae6021e9..405a942946 100644 --- a/NPCs/AstralBiomeNPCs/FusionFeeder.cs +++ b/NPCs/AstralBiomeNPCs/FusionFeeder.cs @@ -33,7 +33,7 @@ namespace CalamityMod.NPCs.AstralBiomeNPCs npc.aiStyle = 103; npc.lifeMax = 400; npc.defense = 12; - npc.GetCalamityNPC().RevPlusDR(0.15f); + npc.Calamity().RevPlusDR(0.15f); npc.value = Item.buyPrice(0, 0, 20, 0); npc.knockBackResist = 0.8f; npc.behindTiles = true; diff --git a/NPCs/AstralBiomeNPCs/Hadarian.cs b/NPCs/AstralBiomeNPCs/Hadarian.cs index 1ef1836288..48e659074c 100644 --- a/NPCs/AstralBiomeNPCs/Hadarian.cs +++ b/NPCs/AstralBiomeNPCs/Hadarian.cs @@ -31,7 +31,7 @@ namespace CalamityMod.NPCs.AstralBiomeNPCs npc.aiStyle = -1; npc.damage = 50; npc.defense = 8; - npc.GetCalamityNPC().RevPlusDR(0.15f); + npc.Calamity().RevPlusDR(0.15f); npc.lifeMax = 330; npc.DeathSound = mod.GetLegacySoundSlot(SoundType.NPCKilled, "Sounds/NPCKilled/AstralEnemyDeath"); npc.knockBackResist = 0.75f; diff --git a/NPCs/AstralBiomeNPCs/Hive.cs b/NPCs/AstralBiomeNPCs/Hive.cs index 3efc41c3e5..cbbd6ae0d3 100644 --- a/NPCs/AstralBiomeNPCs/Hive.cs +++ b/NPCs/AstralBiomeNPCs/Hive.cs @@ -30,7 +30,7 @@ namespace CalamityMod.NPCs.AstralBiomeNPCs npc.aiStyle = -1; npc.damage = 55; npc.defense = 15; - npc.GetCalamityNPC().RevPlusDR(0.15f); + npc.Calamity().RevPlusDR(0.15f); npc.lifeMax = 470; npc.DeathSound = mod.GetLegacySoundSlot(SoundType.NPCKilled, "Sounds/NPCKilled/AstralEnemyDeath"); npc.knockBackResist = 0f; diff --git a/NPCs/AstralBiomeNPCs/Mantis.cs b/NPCs/AstralBiomeNPCs/Mantis.cs index 12c90de84a..a278e217e1 100644 --- a/NPCs/AstralBiomeNPCs/Mantis.cs +++ b/NPCs/AstralBiomeNPCs/Mantis.cs @@ -29,7 +29,7 @@ namespace CalamityMod.NPCs.AstralBiomeNPCs npc.height = 58; npc.aiStyle = -1; npc.defense = 6; - npc.GetCalamityNPC().RevPlusDR(0.15f); + npc.Calamity().RevPlusDR(0.15f); npc.lifeMax = 340; npc.knockBackResist = 0.2f; npc.value = Item.buyPrice(0, 0, 15, 0); diff --git a/NPCs/AstralBiomeNPCs/Nova.cs b/NPCs/AstralBiomeNPCs/Nova.cs index 333b4eaf88..c458cff6f9 100644 --- a/NPCs/AstralBiomeNPCs/Nova.cs +++ b/NPCs/AstralBiomeNPCs/Nova.cs @@ -38,7 +38,7 @@ namespace CalamityMod.NPCs.AstralBiomeNPCs npc.height = 50; npc.damage = 45; npc.defense = 15; - npc.GetCalamityNPC().RevPlusDR(0.15f); + npc.Calamity().RevPlusDR(0.15f); npc.lifeMax = 230; npc.DeathSound = mod.GetLegacySoundSlot(SoundType.NPCKilled, "Sounds/NPCKilled/AstralEnemyDeath"); npc.noGravity = true; diff --git a/NPCs/AstralBiomeNPCs/SmallSightseer.cs b/NPCs/AstralBiomeNPCs/SmallSightseer.cs index ebc1bfd5c7..c3cb82617a 100644 --- a/NPCs/AstralBiomeNPCs/SmallSightseer.cs +++ b/NPCs/AstralBiomeNPCs/SmallSightseer.cs @@ -30,7 +30,7 @@ namespace CalamityMod.NPCs.AstralBiomeNPCs npc.height = 40; npc.damage = 38; npc.defense = 16; - npc.GetCalamityNPC().RevPlusDR(0.15f); + npc.Calamity().RevPlusDR(0.15f); npc.lifeMax = 310; npc.DeathSound = mod.GetLegacySoundSlot(SoundType.NPCKilled, "Sounds/NPCKilled/AstralEnemyDeath"); npc.noGravity = true; diff --git a/NPCs/AstralBiomeNPCs/StellarCulex.cs b/NPCs/AstralBiomeNPCs/StellarCulex.cs index 3a8cf01279..adda27567d 100644 --- a/NPCs/AstralBiomeNPCs/StellarCulex.cs +++ b/NPCs/AstralBiomeNPCs/StellarCulex.cs @@ -32,7 +32,7 @@ namespace CalamityMod.NPCs.AstralBiomeNPCs npc.npcSlots = 0.5f; //needed? npc.damage = 55; npc.defense = 18; - npc.GetCalamityNPC().RevPlusDR(0.15f); + npc.Calamity().RevPlusDR(0.15f); npc.knockBackResist = 0.65f; npc.lifeMax = 210; npc.value = Item.buyPrice(0, 0, 10, 0); diff --git a/NPCs/AstrumDeus/AstrumDeusBody.cs b/NPCs/AstrumDeus/AstrumDeusBody.cs index 0398a864c1..d32588b7c7 100644 --- a/NPCs/AstrumDeus/AstrumDeusBody.cs +++ b/NPCs/AstrumDeus/AstrumDeusBody.cs @@ -25,7 +25,7 @@ namespace CalamityMod.NPCs.AstrumDeus npc.width = 38; npc.height = 44; npc.defense = 40; - npc.GetCalamityNPC().RevPlusDR(0.1f); + npc.Calamity().RevPlusDR(0.1f); npc.LifeMaxNERD(12000, 18000, 29100, 360000, 420000); double HPBoost = Config.BossHealthPercentageBoost * 0.01; npc.lifeMax += (int)(npc.lifeMax * HPBoost); diff --git a/NPCs/AstrumDeus/AstrumDeusHead.cs b/NPCs/AstrumDeus/AstrumDeusHead.cs index 2b33c2f4b5..a26640646a 100644 --- a/NPCs/AstrumDeus/AstrumDeusHead.cs +++ b/NPCs/AstrumDeus/AstrumDeusHead.cs @@ -34,7 +34,7 @@ namespace CalamityMod.NPCs.AstrumDeus npc.width = 56; npc.height = 56; npc.defense = 20; - npc.GetCalamityNPC().RevPlusDR(0.1f); + npc.Calamity().RevPlusDR(0.1f); npc.lifeMax = CalamityWorld.revenge ? 18000 : 12000; if (CalamityWorld.death) { @@ -182,7 +182,7 @@ namespace CalamityMod.NPCs.AstrumDeus float speedMult = expertMode ? 1.8f : 1.6f; if (CalamityWorld.death || CalamityWorld.bossRushActive) { - speedMult = ((npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) ? 3f : 2.5f); + speedMult = ((npc.Calamity().enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) ? 3f : 2.5f); } float life = (float)npc.life; float totalLife = (float)npc.lifeMax; @@ -282,7 +282,7 @@ namespace CalamityMod.NPCs.AstrumDeus npc.localAI[1] = 1f; Rectangle rectangle12 = new Rectangle((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height); int rectX = 300; - int rectY = ((npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) ? 100 : 200); + int rectY = ((npc.Calamity().enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) ? 100 : 200); bool flag95 = true; if (npc.position.Y > Main.player[npc.target].position.Y) { diff --git a/NPCs/AstrumDeus/AstrumDeusProbe3.cs b/NPCs/AstrumDeus/AstrumDeusProbe3.cs index e8b7d3dd55..717d60dcbd 100644 --- a/NPCs/AstrumDeus/AstrumDeusProbe3.cs +++ b/NPCs/AstrumDeus/AstrumDeusProbe3.cs @@ -23,7 +23,7 @@ namespace CalamityMod.NPCs.AstrumDeus npc.width = 30; npc.height = 30; npc.defense = 30; - npc.GetCalamityNPC().RevPlusDR(0.2f); + npc.Calamity().RevPlusDR(0.2f); npc.lifeMax = 1400; if (CalamityWorld.bossRushActive) { diff --git a/NPCs/AstrumDeus/AstrumDeusTail.cs b/NPCs/AstrumDeus/AstrumDeusTail.cs index 8124ebbb89..dff51f17fc 100644 --- a/NPCs/AstrumDeus/AstrumDeusTail.cs +++ b/NPCs/AstrumDeus/AstrumDeusTail.cs @@ -21,7 +21,7 @@ namespace CalamityMod.NPCs.AstrumDeus npc.width = 52; npc.height = 68; npc.defense = 60; - npc.GetCalamityNPC().RevPlusDR(0.35f); + npc.Calamity().RevPlusDR(0.35f); npc.lifeMax = CalamityWorld.revenge ? 18000 : 12000; if (CalamityWorld.death) { diff --git a/NPCs/BrimstoneWaifu/Brimling.cs b/NPCs/BrimstoneWaifu/Brimling.cs index e90e33c1da..bb7073c1a2 100644 --- a/NPCs/BrimstoneWaifu/Brimling.cs +++ b/NPCs/BrimstoneWaifu/Brimling.cs @@ -28,7 +28,7 @@ namespace CalamityMod.NPCs.BrimstoneWaifu npc.width = 60; npc.height = 60; npc.defense = 0; - npc.GetCalamityNPC().DR = normalDR; + npc.Calamity().DR = normalDR; npc.lifeMax = 4000; if (CalamityWorld.death) { @@ -103,7 +103,7 @@ namespace CalamityMod.NPCs.BrimstoneWaifu } // Set DR based on boost status - npc.GetCalamityNPC().DR = boostDR ? boostedDR : normalDR; + npc.Calamity().DR = boostDR ? boostedDR : normalDR; float num1446 = goIntoShell ? 1f : (CalamityWorld.bossRushActive ? 12f : 6f); int num1447 = 480; diff --git a/NPCs/BrimstoneWaifu/BrimstoneElemental.cs b/NPCs/BrimstoneWaifu/BrimstoneElemental.cs index 480a1eb345..76b4fd400a 100644 --- a/NPCs/BrimstoneWaifu/BrimstoneElemental.cs +++ b/NPCs/BrimstoneWaifu/BrimstoneElemental.cs @@ -100,7 +100,7 @@ namespace CalamityMod.NPCs.BrimstoneWaifu npc.TargetClosest(true); Player player = Main.player[npc.target]; - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); bool provy = CalamityWorld.downedProvidence && !CalamityWorld.bossRushActive; bool expertMode = Main.expertMode || CalamityWorld.bossRushActive; @@ -275,7 +275,7 @@ namespace CalamityMod.NPCs.BrimstoneWaifu if (Main.netMode != NetmodeID.MultiplayerClient) { float projectileSpeed = CalamityWorld.bossRushActive ? 7f : 5f; - if (npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) + if (npc.Calamity().enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) projectileSpeed += 4f; if (revenge) projectileSpeed += 1f; @@ -382,7 +382,7 @@ namespace CalamityMod.NPCs.BrimstoneWaifu if (Main.netMode != NetmodeID.MultiplayerClient) { npc.localAI[0] += 1f + 2f * (1f - lifeRatio); - if (npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) + if (npc.Calamity().enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) npc.localAI[0] += 2f; if (CalamityWorld.death || !calamity) npc.localAI[0] += 1f; diff --git a/NPCs/Calamitas/Calamitas.cs b/NPCs/Calamitas/Calamitas.cs index d182eeb36c..0519e566b5 100644 --- a/NPCs/Calamitas/Calamitas.cs +++ b/NPCs/Calamitas/Calamitas.cs @@ -25,7 +25,7 @@ namespace CalamityMod.NPCs.Calamitas npc.width = 120; npc.height = 120; npc.defense = 15; - npc.GetCalamityNPC().RevPlusDR(0.15f); + npc.Calamity().RevPlusDR(0.15f); npc.value = 0f; npc.lifeMax = CalamityWorld.revenge ? 51750 : 37500; if (CalamityWorld.death) diff --git a/NPCs/Calamitas/CalamitasRun.cs b/NPCs/Calamitas/CalamitasRun.cs index 7ab90d5855..32d737e185 100644 --- a/NPCs/Calamitas/CalamitasRun.cs +++ b/NPCs/Calamitas/CalamitasRun.cs @@ -27,7 +27,7 @@ namespace CalamityMod.NPCs.Calamitas npc.width = 120; npc.height = 120; npc.defense = 10; - npc.GetCalamityNPC().RevPlusDR(0.15f); + npc.Calamity().RevPlusDR(0.15f); npc.lifeMax = CalamityWorld.revenge ? 13200 : 9000; if (CalamityWorld.death) { @@ -269,7 +269,7 @@ namespace CalamityMod.NPCs.Calamitas } } - npc.ai[2] += ((npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) ? 2f : 1f); + npc.ai[2] += ((npc.Calamity().enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) ? 2f : 1f); if (npc.ai[2] >= 240f) { npc.ai[1] = 1f; @@ -332,7 +332,7 @@ namespace CalamityMod.NPCs.Calamitas { num870 += 2.5f; } - if (npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) + if (npc.Calamity().enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) { num870 += 4f; } diff --git a/NPCs/Calamitas/CalamitasRun2.cs b/NPCs/Calamitas/CalamitasRun2.cs index 5a62afc0a0..cdc6f3cafd 100644 --- a/NPCs/Calamitas/CalamitasRun2.cs +++ b/NPCs/Calamitas/CalamitasRun2.cs @@ -27,7 +27,7 @@ namespace CalamityMod.NPCs.Calamitas npc.width = 120; npc.height = 120; npc.defense = 10; - npc.GetCalamityNPC().RevPlusDR(0.15f); + npc.Calamity().RevPlusDR(0.15f); npc.lifeMax = CalamityWorld.revenge ? 11025 : 7500; if (CalamityWorld.death) { @@ -270,7 +270,7 @@ namespace CalamityMod.NPCs.Calamitas } } - npc.ai[2] += ((npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) ? 2f : 1f); + npc.ai[2] += ((npc.Calamity().enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) ? 2f : 1f); if (npc.ai[2] >= 180f) { npc.ai[1] = 1f; @@ -333,7 +333,7 @@ namespace CalamityMod.NPCs.Calamitas { num870 += 2.5f; } - if (npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) + if (npc.Calamity().enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) { num870 += 4f; } diff --git a/NPCs/Calamitas/CalamitasRun3.cs b/NPCs/Calamitas/CalamitasRun3.cs index 9fc5cbf413..c486e5dc23 100644 --- a/NPCs/Calamitas/CalamitasRun3.cs +++ b/NPCs/Calamitas/CalamitasRun3.cs @@ -31,7 +31,7 @@ namespace CalamityMod.NPCs.Calamitas npc.width = 120; npc.height = 120; npc.defense = 25; - npc.GetCalamityNPC().RevPlusDR(0.15f); + npc.Calamity().RevPlusDR(0.15f); npc.lifeMax = CalamityWorld.revenge ? 38812 : 28125; if (CalamityWorld.death) { @@ -332,7 +332,7 @@ namespace CalamityMod.NPCs.Calamitas { npc.localAI[1] = 0f; float num828 = CalamityWorld.bossRushActive ? 16f : (expertMode ? 14f : 12.5f); - if (npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) + if (npc.Calamity().enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) num828 += 5f; int num829 = expertMode ? 34 : 42; @@ -408,7 +408,7 @@ namespace CalamityMod.NPCs.Calamitas npc.localAI[1] += 0.5f; if (CalamityWorld.death || CalamityWorld.bossRushActive) npc.localAI[1] += 0.5f; - if (npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) + if (npc.Calamity().enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) npc.localAI[1] += 0.5f; if (expertMode) npc.localAI[1] += 0.5f; diff --git a/NPCs/Calamitas/SoulSeeker.cs b/NPCs/Calamitas/SoulSeeker.cs index dfa821ad16..dcc0fea2bf 100644 --- a/NPCs/Calamitas/SoulSeeker.cs +++ b/NPCs/Calamitas/SoulSeeker.cs @@ -29,7 +29,7 @@ namespace CalamityMod.NPCs.Calamitas npc.canGhostHeal = false; npc.damage = 40; npc.defense = 10; - npc.GetCalamityNPC().RevPlusDR(0.1f); + npc.Calamity().RevPlusDR(0.1f); npc.lifeMax = 2500; if (CalamityWorld.bossRushActive) { diff --git a/NPCs/CalamityAI.cs b/NPCs/CalamityAI.cs index 1d4c691ce2..de5ffd0f18 100644 --- a/NPCs/CalamityAI.cs +++ b/NPCs/CalamityAI.cs @@ -57,7 +57,7 @@ namespace CalamityMod.NPCs // Fire projectiles while walking, teleporting, or falling if (npc.ai[0] == 2f || npc.ai[0] >= 5f || (npc.ai[0] == 4f && npc.velocity.Y > 0f) || - npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) + npc.Calamity().enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) { if (Main.netMode != NetmodeID.MultiplayerClient) { @@ -72,7 +72,7 @@ namespace CalamityMod.NPCs laserDamage *= 3; // Fire astral flames while teleporting - if ((npc.ai[0] >= 5f && npc.ai[0] != 7) || npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) + if ((npc.ai[0] >= 5f && npc.ai[0] != 7) || npc.Calamity().enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) { Vector2 shootFromVector = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); float spread = 45f * 0.0174f; @@ -150,7 +150,7 @@ namespace CalamityMod.NPCs // Stay vulnerable for a maximum of 1.5 or 2.5 seconds npc.ai[1] += 1f; - if (npc.ai[1] >= ((phase3 || npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) ? 90f : 150f)) + if (npc.ai[1] >= ((phase3 || npc.Calamity().enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) ? 90f : 150f)) { // Increase defense npc.defense = 70; diff --git a/NPCs/CalamityBiomeNPCs/CultistAssassin.cs b/NPCs/CalamityBiomeNPCs/CultistAssassin.cs index daace90026..c712c2d6e0 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.GetCalamityPlayer().ZoneCalamity || spawnInfo.player.ZoneDungeon) && Main.hardMode ? 0.04f : 0f; + return (spawnInfo.player.Calamity().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 00219530bf..9fd62483a3 100644 --- a/NPCs/CalamityBiomeNPCs/DespairStone.cs +++ b/NPCs/CalamityBiomeNPCs/DespairStone.cs @@ -23,7 +23,7 @@ namespace CalamityMod.NPCs.CalamityBiomeNPCs npc.width = 72; //324 npc.height = 72; //216 npc.defense = 38; - npc.GetCalamityNPC().RevPlusDR(0.35f); + npc.Calamity().RevPlusDR(0.35f); npc.lifeMax = 120; npc.knockBackResist = 0f; npc.value = Item.buyPrice(0, 0, 5, 0); @@ -339,7 +339,7 @@ namespace CalamityMod.NPCs.CalamityBiomeNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - return spawnInfo.player.GetCalamityPlayer().ZoneCalamity ? 0.25f : 0f; + return spawnInfo.player.Calamity().ZoneCalamity ? 0.25f : 0f; } public override void NPCLoot() diff --git a/NPCs/CalamityBiomeNPCs/Scryllar.cs b/NPCs/CalamityBiomeNPCs/Scryllar.cs index 7871d8e614..b753f83a73 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.GetCalamityPlayer().ZoneCalamity ? 0.25f : 0f; + return spawnInfo.player.Calamity().ZoneCalamity ? 0.25f : 0f; } public override void NPCLoot() diff --git a/NPCs/CalamityBiomeNPCs/ScryllarRage.cs b/NPCs/CalamityBiomeNPCs/ScryllarRage.cs index 7268f651c6..fda4d50343 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.GetCalamityPlayer().ZoneCalamity ? 0.125f : 0f; + return spawnInfo.player.Calamity().ZoneCalamity ? 0.125f : 0f; } public override void NPCLoot() diff --git a/NPCs/CalamityBiomeNPCs/SoulSlurper.cs b/NPCs/CalamityBiomeNPCs/SoulSlurper.cs index 2b964ec2e6..f8736d7c78 100644 --- a/NPCs/CalamityBiomeNPCs/SoulSlurper.cs +++ b/NPCs/CalamityBiomeNPCs/SoulSlurper.cs @@ -24,7 +24,7 @@ namespace CalamityMod.NPCs.CalamityBiomeNPCs npc.width = 60; //324 npc.height = 40; //216 npc.defense = 40; - npc.GetCalamityNPC().RevPlusDR(0.15f); + npc.Calamity().RevPlusDR(0.15f); npc.lifeMax = 60; npc.knockBackResist = 0.65f; npc.value = Item.buyPrice(0, 0, 5, 0); @@ -45,7 +45,7 @@ namespace CalamityMod.NPCs.CalamityBiomeNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - return spawnInfo.player.GetCalamityPlayer().ZoneCalamity ? 0.25f : 0f; + return spawnInfo.player.Calamity().ZoneCalamity ? 0.25f : 0f; } public override void AI() diff --git a/NPCs/CalamityGlobalAI.cs b/NPCs/CalamityGlobalAI.cs index 224276c403..14a664c40a 100644 --- a/NPCs/CalamityGlobalAI.cs +++ b/NPCs/CalamityGlobalAI.cs @@ -538,7 +538,7 @@ namespace CalamityMod.NPCs #region Buffed Eye of Cthulhu AI public static bool BuffedEyeofCthulhuAI(NPC npc, bool enraged, Mod mod) { - CalamityGlobalNPC calamityGlobalNPC = npc.GetGlobalNPC(mod); + CalamityGlobalNPC calamityGlobalNPC = npc.Calamity(); bool configBossRushBoost = Config.BossRushXerocCurse && CalamityWorld.bossRushActive; float num5 = 20f; @@ -1355,7 +1355,7 @@ namespace CalamityMod.NPCs #region Buffed Eater of Worlds AI public static bool BuffedEaterofWorldsAI(NPC npc, Mod mod) { - CalamityGlobalNPC calamityGlobalNPC = npc.GetGlobalNPC(mod); + CalamityGlobalNPC calamityGlobalNPC = npc.Calamity(); bool configBossRushBoost = Config.BossRushXerocCurse && CalamityWorld.bossRushActive; // Total body segments @@ -2474,7 +2474,7 @@ namespace CalamityMod.NPCs #region Buffed Queen Bee AI public static bool BuffedQueenBeeAI(NPC npc, Mod mod) { - CalamityGlobalNPC calamityGlobalNPC = npc.GetGlobalNPC(mod); + CalamityGlobalNPC calamityGlobalNPC = npc.Calamity(); // Increase bee spawn rate during bee spawning phase based on number of players near the boss int playerNearBoss = 0; @@ -3032,7 +3032,7 @@ namespace CalamityMod.NPCs #region Buffed Skeletron AI public static bool BuffedSkeletronAI(NPC npc, bool enraged, Mod mod) { - CalamityGlobalNPC calamityGlobalNPC = npc.GetGlobalNPC(mod); + CalamityGlobalNPC calamityGlobalNPC = npc.Calamity(); bool configBossRushBoost = Config.BossRushXerocCurse && CalamityWorld.bossRushActive; // Percent life remaining @@ -3702,7 +3702,7 @@ namespace CalamityMod.NPCs #region Buffed Wall of Flesh AI public static bool BuffedWallofFleshAI(NPC npc, bool enraged, Mod mod) { - CalamityGlobalNPC calamityGlobalNPC = npc.GetGlobalNPC(mod); + CalamityGlobalNPC calamityGlobalNPC = npc.Calamity(); bool configBossRushBoost = Config.BossRushXerocCurse && CalamityWorld.bossRushActive; // Despawn @@ -4076,7 +4076,7 @@ namespace CalamityMod.NPCs public static bool BuffedWallofFleshEyeAI(NPC npc, bool enraged, Mod mod) { - CalamityGlobalNPC calamityGlobalNPC = npc.GetGlobalNPC(mod); + CalamityGlobalNPC calamityGlobalNPC = npc.Calamity(); bool configBossRushBoost = Config.BossRushXerocCurse && CalamityWorld.bossRushActive; // Despawn @@ -4205,7 +4205,7 @@ namespace CalamityMod.NPCs #region Buffed Destroyer AI public static bool BuffedDestroyerAI(NPC npc, bool enraged, Mod mod) { - CalamityGlobalNPC calamityGlobalNPC = npc.GetGlobalNPC(mod); + CalamityGlobalNPC calamityGlobalNPC = npc.Calamity(); bool configBossRushBoost = Config.BossRushXerocCurse && CalamityWorld.bossRushActive; // 8 seconds of reistance to prevent spawn killing @@ -4690,7 +4690,7 @@ namespace CalamityMod.NPCs #region Buffed Twins AI public static bool BuffedRetinazerAI(NPC npc, bool enraged, Mod mod) { - CalamityGlobalNPC calamityGlobalNPC = npc.GetGlobalNPC(mod); + CalamityGlobalNPC calamityGlobalNPC = npc.Calamity(); bool configBossRushBoost = Config.BossRushXerocCurse && CalamityWorld.bossRushActive; // Enrage variable if player is floating upside down @@ -5376,7 +5376,7 @@ namespace CalamityMod.NPCs public static bool BuffedSpazmatismAI(NPC npc, bool enraged, Mod mod) { - CalamityGlobalNPC calamityGlobalNPC = npc.GetGlobalNPC(mod); + CalamityGlobalNPC calamityGlobalNPC = npc.Calamity(); bool configBossRushBoost = Config.BossRushXerocCurse && CalamityWorld.bossRushActive; // Enrage variable if player is floating upside down @@ -6125,7 +6125,7 @@ namespace CalamityMod.NPCs #region Buffed Skeletron Prime AI public static bool BuffedSkeletronPrimeAI(NPC npc, bool enraged, Mod mod) { - CalamityGlobalNPC calamityGlobalNPC = npc.GetGlobalNPC(mod); + CalamityGlobalNPC calamityGlobalNPC = npc.Calamity(); bool configBossRushBoost = Config.BossRushXerocCurse && CalamityWorld.bossRushActive; // Enrage variable if player is floating upside down @@ -7808,7 +7808,7 @@ namespace CalamityMod.NPCs #region Buffed Plantera AI public static bool BuffedPlanteraAI(NPC npc, bool enraged, Mod mod) { - CalamityGlobalNPC calamityGlobalNPC = npc.GetGlobalNPC(mod); + CalamityGlobalNPC calamityGlobalNPC = npc.Calamity(); // Percent life remaining float lifeRatio = (float)npc.life / (float)npc.lifeMax; @@ -9183,7 +9183,7 @@ namespace CalamityMod.NPCs public static bool BuffedGolemHeadFreeAI(NPC npc, bool enraged, Mod mod) { - CalamityGlobalNPC calamityGlobalNPC = npc.GetGlobalNPC(mod); + CalamityGlobalNPC calamityGlobalNPC = npc.Calamity(); // Die if body is gone if (NPC.golemBoss < 0) @@ -9461,7 +9461,7 @@ namespace CalamityMod.NPCs #region Buffed Duke Fishron AI public static bool BuffedDukeFishronAI(NPC npc, bool enraged, Mod mod) { - CalamityGlobalNPC calamityGlobalNPC = npc.GetGlobalNPC(mod); + CalamityGlobalNPC calamityGlobalNPC = npc.Calamity(); // Variables float num = 0.6f * Main.damageMultiplier; @@ -10512,7 +10512,7 @@ namespace CalamityMod.NPCs #region Buffed Cultist AI public static bool BuffedCultistAI(NPC npc, bool enraged, Mod mod) { - CalamityGlobalNPC calamityGlobalNPC = npc.GetGlobalNPC(mod); + CalamityGlobalNPC calamityGlobalNPC = npc.Calamity(); // Set contact damage to 0 npc.damage = (npc.defDamage = 0); @@ -11785,11 +11785,11 @@ namespace CalamityMod.NPCs // Take damage if other parts are down bool flag85 = true; - if (Main.npc[(int)npc.localAI[0]].GetGlobalNPC(mod).newAI[0] != 1f) + if (Main.npc[(int)npc.localAI[0]].Calamity().newAI[0] != 1f) flag85 = false; - if (Main.npc[(int)npc.localAI[1]].GetGlobalNPC(mod).newAI[0] != 1f) + if (Main.npc[(int)npc.localAI[1]].Calamity().newAI[0] != 1f) flag85 = false; - if (Main.npc[(int)npc.localAI[2]].GetGlobalNPC(mod).newAI[0] != 1f) + if (Main.npc[(int)npc.localAI[2]].Calamity().newAI[0] != 1f) flag85 = false; if (flag85) @@ -11801,7 +11801,7 @@ namespace CalamityMod.NPCs } } - // Fly near target, take damage + // Fly near target, take damage else if (npc.ai[0] == 1f) { npc.dontTakeDamage = false; @@ -12067,7 +12067,7 @@ namespace CalamityMod.NPCs } else if (npc.type == NPCID.MoonLordHead) { - CalamityGlobalNPC calamityGlobalNPC = npc.GetGlobalNPC(mod); + CalamityGlobalNPC calamityGlobalNPC = npc.Calamity(); // Despawn if (!Main.npc[(int)npc.ai[3]].active || Main.npc[(int)npc.ai[3]].type != NPCID.MoonLordCore) @@ -12354,7 +12354,7 @@ namespace CalamityMod.NPCs } else if (npc.type == NPCID.MoonLordHand) { - CalamityGlobalNPC calamityGlobalNPC = npc.GetGlobalNPC(mod); + CalamityGlobalNPC calamityGlobalNPC = npc.Calamity(); // Start attack array NPC.InitializeMoonLordAttacks(); diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 7a042a6fc6..a7c4e5d9ae 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -517,7 +517,7 @@ namespace CalamityMod.NPCs { if (!Main.LocalPlayer.dead && Main.LocalPlayer.active) { - Main.LocalPlayer.GetCalamityPlayer().adrenaline = 0; + Main.LocalPlayer.Calamity().adrenaline = 0; } } } @@ -1104,7 +1104,7 @@ namespace CalamityMod.NPCs damage /= 2; } - if (target.GetCalamityPlayer().beeResist) + if (target.Calamity().beeResist) { if (CalamityMod.beeEnemyList.Contains(npc.type)) { @@ -1332,7 +1332,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].GetCalamityPlayer().queenBeeLore) + if (Main.player[npc.target].Calamity().queenBeeLore) { CalamityGlobalAI.QueenBeeLoreEffect(npc); return false; @@ -2061,7 +2061,7 @@ namespace CalamityMod.NPCs #region On Hit Player public override void OnHitPlayer(NPC npc, Player target, int damage, bool crit) { - if (target.GetCalamityPlayer().snowman) + if (target.Calamity().snowman) { if (npc.type == NPCID.Demon || npc.type == NPCID.VoodooDemon || npc.type == NPCID.RedDevil) { @@ -2317,7 +2317,7 @@ namespace CalamityMod.NPCs } } - if (Main.player[projectile.owner].GetCalamityPlayer().eGauntlet) + if (Main.player[projectile.owner].Calamity().eGauntlet) { if (projectile.melee && ShouldAffectNPC(npc) && Main.rand.NextBool(15)) { @@ -2328,7 +2328,7 @@ namespace CalamityMod.NPCs } } - if (Main.player[projectile.owner].GetCalamityPlayer().eTalisman) + if (Main.player[projectile.owner].Calamity().eTalisman) { if (projectile.magic && ShouldAffectNPC(npc) && Main.rand.NextBool(15)) { @@ -2339,9 +2339,9 @@ namespace CalamityMod.NPCs } } - if (Main.player[projectile.owner].GetCalamityPlayer().nanotech) + if (Main.player[projectile.owner].Calamity().nanotech) { - if (projectile.GetGlobalProjectile(mod).rogue && ShouldAffectNPC(npc) && Main.rand.NextBool(15)) + if (projectile.Calamity().rogue && ShouldAffectNPC(npc) && Main.rand.NextBool(15)) { if (!CalamityPlayer.areThereAnyDamnBosses) { @@ -2350,7 +2350,7 @@ namespace CalamityMod.NPCs } } - if (Main.player[projectile.owner].GetCalamityPlayer().eQuiver) + if (Main.player[projectile.owner].Calamity().eQuiver) { if (projectile.ranged && ShouldAffectNPC(npc) && Main.rand.NextBool(15)) { @@ -2361,7 +2361,7 @@ namespace CalamityMod.NPCs } } - if (Main.player[projectile.owner].GetCalamityPlayer().statisBeltOfCurses) + if (Main.player[projectile.owner].Calamity().statisBeltOfCurses) { if ((projectile.minion || CalamityMod.projectileMinionList.Contains(projectile.type)) && ShouldAffectNPC(npc) && Main.rand.NextBool(15)) { @@ -2377,18 +2377,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.GetCalamityPlayer().bloodflareSet) + if (player.Calamity().bloodflareSet) { if (!npc.SpawnedFromStatue && npc.damage > 0 && (npc.life < npc.lifeMax * 0.5) && - player.GetCalamityPlayer().bloodflareHeartTimer <= 0) + player.Calamity().bloodflareHeartTimer <= 0) { - player.GetCalamityPlayer().bloodflareHeartTimer = 180; + player.Calamity().bloodflareHeartTimer = 180; DropHelper.DropItem(npc, ItemID.Heart); } else if (!npc.SpawnedFromStatue && npc.damage > 0 && (npc.life > npc.lifeMax * 0.5) && - player.GetCalamityPlayer().bloodflareManaTimer <= 0) + player.Calamity().bloodflareManaTimer <= 0) { - player.GetCalamityPlayer().bloodflareManaTimer = 180; + player.Calamity().bloodflareManaTimer = 180; DropHelper.DropItem(npc, ItemID.Star); } } @@ -2400,7 +2400,7 @@ namespace CalamityMod.NPCs { bool isSummon = projectile.minion || projectile.sentry || CalamityMod.projectileMinionList.Contains(projectile.type); - if (Main.player[projectile.owner].GetCalamityPlayer().sGenerator) + if (Main.player[projectile.owner].Calamity().sGenerator) { if (isSummon && npc.damage > 0) { @@ -2424,18 +2424,18 @@ namespace CalamityMod.NPCs } } - if (Main.player[projectile.owner].GetCalamityPlayer().bloodflareSet) + if (Main.player[projectile.owner].Calamity().bloodflareSet) { if (!npc.SpawnedFromStatue && npc.damage > 0 && (npc.life < npc.lifeMax * 0.5) && - Main.player[projectile.owner].GetCalamityPlayer().bloodflareHeartTimer <= 0) + Main.player[projectile.owner].Calamity().bloodflareHeartTimer <= 0) { - Main.player[projectile.owner].GetCalamityPlayer().bloodflareHeartTimer = 180; + Main.player[projectile.owner].Calamity().bloodflareHeartTimer = 180; DropHelper.DropItem(npc, ItemID.Heart); } else if (!npc.SpawnedFromStatue && npc.damage > 0 && (npc.life > npc.lifeMax * 0.5) && - Main.player[projectile.owner].GetCalamityPlayer().bloodflareManaTimer <= 0) + Main.player[projectile.owner].Calamity().bloodflareManaTimer <= 0) { - Main.player[projectile.owner].GetCalamityPlayer().bloodflareManaTimer = 180; + Main.player[projectile.owner].Calamity().bloodflareManaTimer = 180; DropHelper.DropItem(npc, ItemID.Star); } } @@ -2585,7 +2585,7 @@ namespace CalamityMod.NPCs #region Edit Spawn Rate public override void EditSpawnRate(Player player, ref int spawnRate, ref int maxSpawns) { - if (player.GetCalamityPlayer().ZoneSulphur) + if (player.Calamity().ZoneSulphur) { spawnRate = (int)(spawnRate * 1.1); maxSpawns = (int)(maxSpawns * 0.8f); @@ -2595,28 +2595,28 @@ namespace CalamityMod.NPCs maxSpawns = (int)(maxSpawns * 1.2f); } } - else if (player.GetCalamityPlayer().ZoneAbyss) + else if (player.Calamity().ZoneAbyss) { spawnRate = (int)(spawnRate * 0.7); maxSpawns = (int)(maxSpawns * 1.1f); } - else if (player.GetCalamityPlayer().ZoneCalamity) + else if (player.Calamity().ZoneCalamity) { spawnRate = (int)(spawnRate * 0.9); maxSpawns = (int)(maxSpawns * 1.1f); } - else if (player.GetCalamityPlayer().ZoneAstral) + else if (player.Calamity().ZoneAstral) { spawnRate = (int)(spawnRate * 0.6); maxSpawns = (int)(maxSpawns * 1.2f); } - else if (player.GetCalamityPlayer().ZoneSunkenSea) + else if (player.Calamity().ZoneSunkenSea) { spawnRate = (int)(spawnRate * 0.9); maxSpawns = (int)(maxSpawns * 1.1f); } - if (player.GetCalamityPlayer().clamity) + if (player.Calamity().clamity) { spawnRate = (int)(spawnRate * 0.02); maxSpawns = (int)(maxSpawns * 1.5f); @@ -2636,36 +2636,36 @@ namespace CalamityMod.NPCs spawnRate = (int)(spawnRate * 0.75); } - if (player.GetCalamityPlayer().zerg && player.GetCalamityPlayer().chaosCandle) + if (player.Calamity().zerg && player.Calamity().chaosCandle) { spawnRate = (int)(spawnRate * 0.005); maxSpawns = (int)(maxSpawns * 7.5f); } - else if (player.GetCalamityPlayer().zerg) + else if (player.Calamity().zerg) { spawnRate = (int)(spawnRate * 0.01); maxSpawns = (int)(maxSpawns * 5f); } - else if (player.GetCalamityPlayer().chaosCandle) + else if (player.Calamity().chaosCandle) { spawnRate = (int)(spawnRate * 0.02); maxSpawns = (int)(maxSpawns * 2.5f); } - if (player.GetCalamityPlayer().zen && player.GetCalamityPlayer().tranquilityCandle) + if (player.Calamity().zen && player.Calamity().tranquilityCandle) { - spawnRate = (int)(spawnRate * (player.GetCalamityPlayer().ZoneAbyss ? 1.75 : 75)); - maxSpawns = (int)(maxSpawns * (player.GetCalamityPlayer().ZoneAbyss ? 0.625f : 0.005f)); + spawnRate = (int)(spawnRate * (player.Calamity().ZoneAbyss ? 1.75 : 75)); + maxSpawns = (int)(maxSpawns * (player.Calamity().ZoneAbyss ? 0.625f : 0.005f)); } - else if (CalamityPlayer.areThereAnyDamnBosses || player.GetCalamityPlayer().zen || (Config.DisableExpertEnemySpawnsNearHouse && player.townNPCs > 1f && Main.expertMode)) + else if (CalamityPlayer.areThereAnyDamnBosses || player.Calamity().zen || (Config.DisableExpertEnemySpawnsNearHouse && player.townNPCs > 1f && Main.expertMode)) { - spawnRate = (int)(spawnRate * (player.GetCalamityPlayer().ZoneAbyss ? 1.5 : 50)); - maxSpawns = (int)(maxSpawns * (player.GetCalamityPlayer().ZoneAbyss ? 0.75f : 0.01f)); + spawnRate = (int)(spawnRate * (player.Calamity().ZoneAbyss ? 1.5 : 50)); + maxSpawns = (int)(maxSpawns * (player.Calamity().ZoneAbyss ? 0.75f : 0.01f)); } - else if (player.GetCalamityPlayer().tranquilityCandle) + else if (player.Calamity().tranquilityCandle) { - spawnRate = (int)(spawnRate * (player.GetCalamityPlayer().ZoneAbyss ? 1.25 : 25)); - maxSpawns = (int)(maxSpawns * (player.GetCalamityPlayer().ZoneAbyss ? 0.875f : 0.02f)); + spawnRate = (int)(spawnRate * (player.Calamity().ZoneAbyss ? 1.25 : 25)); + maxSpawns = (int)(maxSpawns * (player.Calamity().ZoneAbyss ? 0.875f : 0.02f)); } } #endregion @@ -2673,7 +2673,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.GetCalamityPlayer().ZoneAbyss) + if (player.Calamity().ZoneAbyss) { spawnRangeX = (int)(1920 / 16 * 0.5); //0.7 safeRangeX = (int)(1920 / 16 * 0.32); //0.52 @@ -2684,11 +2684,11 @@ namespace CalamityMod.NPCs #region Edit Spawn Pool public override void EditSpawnPool(IDictionary pool, NPCSpawnInfo spawnInfo) { - if (spawnInfo.player.GetCalamityPlayer().ZoneAbyss || - spawnInfo.player.GetCalamityPlayer().ZoneCalamity || - spawnInfo.player.GetCalamityPlayer().ZoneSulphur || - spawnInfo.player.GetCalamityPlayer().ZoneSunkenSea || - (spawnInfo.player.GetCalamityPlayer().ZoneAstral && !NPC.LunarApocalypseIsUp)) + if (spawnInfo.player.Calamity().ZoneAbyss || + spawnInfo.player.Calamity().ZoneCalamity || + spawnInfo.player.Calamity().ZoneSulphur || + spawnInfo.player.Calamity().ZoneSunkenSea || + (spawnInfo.player.Calamity().ZoneAstral && !NPC.LunarApocalypseIsUp)) { pool[0] = 0f; } @@ -2913,7 +2913,7 @@ namespace CalamityMod.NPCs public override Color? GetAlpha(NPC npc, Color drawColor) { - if (Main.LocalPlayer.GetCalamityPlayer().trippy) + if (Main.LocalPlayer.Calamity().trippy) { return new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB, npc.alpha); } @@ -2936,7 +2936,7 @@ namespace CalamityMod.NPCs } } - if (Main.LocalPlayer.GetCalamityPlayer().trippy) + if (Main.LocalPlayer.Calamity().trippy) { SpriteEffects spriteEffects = SpriteEffects.None; if (npc.spriteDirection == 1) @@ -3468,7 +3468,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.GetCalamityPlayer().ZoneAstral && Main.hardMode, Item.buyPrice(0, 0, 5)); + SetShopItem(ref shop, ref nextSlot, mod.ItemType("AstralSolution"), Main.LocalPlayer.Calamity().ZoneAstral && Main.hardMode, Item.buyPrice(0, 0, 5)); } if (type == NPCID.Wizard) diff --git a/NPCs/CalamityGlobalNPCLoot.cs b/NPCs/CalamityGlobalNPCLoot.cs index 01c6333262..b05ebe4ef6 100644 --- a/NPCs/CalamityGlobalNPCLoot.cs +++ b/NPCs/CalamityGlobalNPCLoot.cs @@ -693,7 +693,7 @@ namespace CalamityMod.NPCs { if (!Main.player[Main.myPlayer].dead && Main.player[Main.myPlayer].active) { - Main.player[Main.myPlayer].GetCalamityPlayer().adrenaline = 0; + Main.player[Main.myPlayer].Calamity().adrenaline = 0; } } } @@ -1248,7 +1248,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)].GetCalamityPlayer().tarraSet) + if (Main.player[(int)Player.FindClosest(npc.position, npc.width, npc.height)].Calamity().tarraSet) { if (!npc.SpawnedFromStatue && (npc.damage > 5 || npc.boss) && npc.lifeMax > 100) { @@ -1259,7 +1259,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)].GetCalamityPlayer().bloodflareSet) + if (Main.player[Player.FindClosest(npc.position, npc.width, npc.height)].Calamity().bloodflareSet) { DropHelper.DropItemChance(npc, mod.ItemType("BloodOrb"), 2); // 50% chance of 1 orb with Bloodflare } diff --git a/NPCs/CeaselessVoid/CeaselessVoid.cs b/NPCs/CeaselessVoid/CeaselessVoid.cs index 855c622e24..7220fc2be5 100644 --- a/NPCs/CeaselessVoid/CeaselessVoid.cs +++ b/NPCs/CeaselessVoid/CeaselessVoid.cs @@ -201,7 +201,7 @@ namespace CalamityMod.NPCs.CeaselessVoid { beamPortal += 1; } - if (npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) + if (npc.Calamity().enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) { beamPortal += 2; } diff --git a/NPCs/CosmicWraith/CosmicWraith.cs b/NPCs/CosmicWraith/CosmicWraith.cs index d6ca66dbd4..14d6db871a 100644 --- a/NPCs/CosmicWraith/CosmicWraith.cs +++ b/NPCs/CosmicWraith/CosmicWraith.cs @@ -193,7 +193,7 @@ namespace CalamityMod.NPCs.CosmicWraith { speed = expertMode ? 16f : 14f; } - if (npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) + if (npc.Calamity().enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) { speed += 3f; } @@ -365,7 +365,7 @@ namespace CalamityMod.NPCs.CosmicWraith if (Main.netMode != NetmodeID.MultiplayerClient) { float num1070 = 15f; //changed from 10 - if (npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) + if (npc.Calamity().enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) { num1070 += 3f; } diff --git a/NPCs/Crabulon/CrabulonIdle.cs b/NPCs/Crabulon/CrabulonIdle.cs index 709c80c8ed..a9ee8e8baf 100644 --- a/NPCs/Crabulon/CrabulonIdle.cs +++ b/NPCs/Crabulon/CrabulonIdle.cs @@ -221,7 +221,7 @@ namespace CalamityMod.NPCs.Crabulon num823 = 2f; if (CalamityWorld.bossRushActive) num823 = 12f; - if (npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) + if (npc.Calamity().enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) num823 = 16f; if (Math.Abs(npc.Center.X - Main.player[npc.target].Center.X) < 50f) @@ -400,7 +400,7 @@ namespace CalamityMod.NPCs.Crabulon { num626 += 1f; } - if (npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) + if (npc.Calamity().enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) { num626 += 3f; } diff --git a/NPCs/Cryogen/Cryogen.cs b/NPCs/Cryogen/Cryogen.cs index a1c597aa13..a6feb65ce2 100644 --- a/NPCs/Cryogen/Cryogen.cs +++ b/NPCs/Cryogen/Cryogen.cs @@ -31,7 +31,7 @@ namespace CalamityMod.NPCs.Cryogen npc.width = 80; npc.height = 80; npc.defense = 12; - npc.GetCalamityNPC().RevPlusDR(0.1f); + npc.Calamity().RevPlusDR(0.1f); npc.lifeMax = CalamityWorld.revenge ? 26300 : 17900; if (CalamityWorld.death) { diff --git a/NPCs/Cryogen/CryogenIce.cs b/NPCs/Cryogen/CryogenIce.cs index a471296b47..f7322f17e3 100644 --- a/NPCs/Cryogen/CryogenIce.cs +++ b/NPCs/Cryogen/CryogenIce.cs @@ -24,7 +24,7 @@ namespace CalamityMod.NPCs.Cryogen npc.width = 240; npc.height = 240; npc.defense = 0; - npc.GetCalamityNPC().RevPlusDR(0.4f); + npc.Calamity().RevPlusDR(0.4f); npc.lifeMax = 1400; if (CalamityWorld.bossRushActive) { diff --git a/NPCs/DesertScourge/DesertScourgeBody.cs b/NPCs/DesertScourge/DesertScourgeBody.cs index df8a86d962..83e1e17283 100644 --- a/NPCs/DesertScourge/DesertScourgeBody.cs +++ b/NPCs/DesertScourge/DesertScourgeBody.cs @@ -22,7 +22,7 @@ namespace CalamityMod.NPCs.DesertScourge npc.width = 32; npc.height = 36; npc.defense = 6; - npc.GetCalamityNPC().RevPlusDR(0.05f); + npc.Calamity().RevPlusDR(0.05f); npc.lifeMax = CalamityWorld.revenge ? 2650 : 2300; if (CalamityWorld.death) { @@ -98,7 +98,7 @@ namespace CalamityMod.NPCs.DesertScourge if (Main.netMode != NetmodeID.MultiplayerClient && (CalamityWorld.revenge || CalamityWorld.bossRushActive)) { npc.localAI[0] += (float)Main.rand.Next(4); - if (npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) + if (npc.Calamity().enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) { npc.localAI[0] += 4f; } diff --git a/NPCs/DesertScourge/DesertScourgeHead.cs b/NPCs/DesertScourge/DesertScourgeHead.cs index 3c40797389..8a2440e4ff 100644 --- a/NPCs/DesertScourge/DesertScourgeHead.cs +++ b/NPCs/DesertScourge/DesertScourgeHead.cs @@ -90,7 +90,7 @@ namespace CalamityMod.NPCs.DesertScourge float speedMult = expertMode ? 1.5f : 1.45f; if (CalamityWorld.death || CalamityWorld.bossRushActive) speedMult = 1.6f; - if (npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) + if (npc.Calamity().enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) speedMult = 2f; if (CalamityWorld.bossRushActive) speedMult *= 2f; @@ -184,7 +184,7 @@ namespace CalamityMod.NPCs.DesertScourge { npc.localAI[1] = 1f; Rectangle rectangle12 = new Rectangle((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height); - int num954 = ((npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) ? 500 : 1000); + int num954 = ((npc.Calamity().enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) ? 500 : 1000); if (CalamityWorld.bossRushActive) num954 /= 2; diff --git a/NPCs/DesertScourge/DesertScourgeTail.cs b/NPCs/DesertScourge/DesertScourgeTail.cs index 89a943eaa9..a7da54a5a2 100644 --- a/NPCs/DesertScourge/DesertScourgeTail.cs +++ b/NPCs/DesertScourge/DesertScourgeTail.cs @@ -21,7 +21,7 @@ namespace CalamityMod.NPCs.DesertScourge npc.width = 32; //324 npc.height = 48; //216 npc.defense = 9; - npc.GetCalamityNPC().RevPlusDR(0.1f); + npc.Calamity().RevPlusDR(0.1f); npc.lifeMax = CalamityWorld.revenge ? 2650 : 2300; if (CalamityWorld.death) { diff --git a/NPCs/GreatSandShark/GreatSandShark.cs b/NPCs/GreatSandShark/GreatSandShark.cs index 40855f0aaf..7f1a291a64 100644 --- a/NPCs/GreatSandShark/GreatSandShark.cs +++ b/NPCs/GreatSandShark/GreatSandShark.cs @@ -29,7 +29,7 @@ namespace CalamityMod.NPCs.GreatSandShark npc.width = 300; npc.height = 120; npc.defense = 60; - npc.GetCalamityNPC().RevPlusDR(0.25f); + npc.Calamity().RevPlusDR(0.25f); npc.lifeMax = CalamityWorld.revenge ? 11000 : 8000; if (CalamityWorld.death) { diff --git a/NPCs/HiveMind/HiveMind.cs b/NPCs/HiveMind/HiveMind.cs index b433570761..fa3c1938d9 100644 --- a/NPCs/HiveMind/HiveMind.cs +++ b/NPCs/HiveMind/HiveMind.cs @@ -167,7 +167,7 @@ namespace CalamityMod.NPCs.HiveMind int x = (int)(npc.position.X + (float)Main.rand.Next(npc.width - 32)); int y = (int)(npc.position.Y + (float)Main.rand.Next(npc.height - 32)); int num663 = mod.NPCType("HiveBlob"); - if (Main.rand.NextBool(3) || npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) + if (Main.rand.NextBool(3) || npc.Calamity().enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) { num663 = mod.NPCType("DankCreeper"); } diff --git a/NPCs/Leviathan/Leviathan.cs b/NPCs/Leviathan/Leviathan.cs index 946a221727..9685793de8 100644 --- a/NPCs/Leviathan/Leviathan.cs +++ b/NPCs/Leviathan/Leviathan.cs @@ -28,7 +28,7 @@ namespace CalamityMod.NPCs.Leviathan npc.width = 850; npc.height = 450; npc.defense = 40; - npc.GetCalamityNPC().RevPlusDR(0.35f); + npc.Calamity().RevPlusDR(0.35f); npc.lifeMax = CalamityWorld.revenge ? 90700 : 69000; if (CalamityWorld.death) { @@ -255,7 +255,7 @@ namespace CalamityMod.NPCs.Leviathan num418 = sirenAlive ? 14f : 17f; num419 = 33; } - if (npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) + if (npc.Calamity().enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) { num418 = 22f; } @@ -429,7 +429,7 @@ namespace CalamityMod.NPCs.Leviathan { num1044 += 2f; } - if (npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) + if (npc.Calamity().enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) { num1044 += 4f; } @@ -462,7 +462,7 @@ namespace CalamityMod.NPCs.Leviathan num1048 += 2f; num1049 += 0.1f; } - if (npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) + if (npc.Calamity().enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) { num1048 += 3f; num1049 += 0.2f; diff --git a/NPCs/Leviathan/LeviathanStart.cs b/NPCs/Leviathan/LeviathanStart.cs index 5fdd707d22..eb7e0a052e 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.GetCalamityPlayer().ZoneSulphur) + spawnInfo.player.Calamity().ZoneSulphur) { return 0f; } diff --git a/NPCs/Leviathan/Siren.cs b/NPCs/Leviathan/Siren.cs index 72090cface..a67fd6b176 100644 --- a/NPCs/Leviathan/Siren.cs +++ b/NPCs/Leviathan/Siren.cs @@ -30,7 +30,7 @@ namespace CalamityMod.NPCs.Leviathan npc.width = 100; npc.height = 100; npc.defense = 20; - npc.GetCalamityNPC().RevPlusDR(0.05f); + npc.Calamity().RevPlusDR(0.05f); npc.lifeMax = CalamityWorld.revenge ? 41600 : 27400; if (CalamityWorld.death) { @@ -392,7 +392,7 @@ namespace CalamityMod.NPCs.Leviathan npc.ai[1] += 1f; bool flag104 = false; - if (npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) + if (npc.Calamity().enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) { if (npc.ai[1] % 10f == 9f) flag104 = true; @@ -418,7 +418,7 @@ namespace CalamityMod.NPCs.Leviathan if (Main.netMode != NetmodeID.MultiplayerClient) { float num1070 = revenge ? 15f : 13f; - if (npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) + if (npc.Calamity().enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) num1070 = 24f; else if (isNotOcean || (!leviAlive && phase2) || CalamityWorld.death || CalamityWorld.bossRushActive) num1070 = revenge ? 17f : 16f; diff --git a/NPCs/Leviathan/SirenIce.cs b/NPCs/Leviathan/SirenIce.cs index 7968bed16f..fa8c01de18 100644 --- a/NPCs/Leviathan/SirenIce.cs +++ b/NPCs/Leviathan/SirenIce.cs @@ -23,7 +23,7 @@ namespace CalamityMod.NPCs.Leviathan npc.width = 100; npc.height = 100; npc.defense = 10; - npc.GetCalamityNPC().RevPlusDR(0.5f); + npc.Calamity().RevPlusDR(0.5f); npc.lifeMax = 650; if (CalamityWorld.bossRushActive) { diff --git a/NPCs/NormalNPCs/AeroSlime.cs b/NPCs/NormalNPCs/AeroSlime.cs index a5ad4f6304..13face023b 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.GetCalamityPlayer().ZoneAbyss || - spawnInfo.player.GetCalamityPlayer().ZoneSunkenSea) + if (spawnInfo.playerSafe || (!CalamityWorld.downedHiveMind && !CalamityWorld.downedPerforator) || spawnInfo.player.Calamity().ZoneAbyss || + spawnInfo.player.Calamity().ZoneSunkenSea) { return 0f; } diff --git a/NPCs/NormalNPCs/AngryDog.cs b/NPCs/NormalNPCs/AngryDog.cs index ab192314d1..4b8bdc845a 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.GetCalamityPlayer().ZoneSunkenSea && + !spawnInfo.player.Calamity().ZoneSunkenSea && !spawnInfo.playerInTown && !spawnInfo.player.ZoneOldOneArmy && !Main.snowMoon && !Main.pumpkinMoon ? 0.012f : 0f; } diff --git a/NPCs/NormalNPCs/ArmoredDiggerBody.cs b/NPCs/NormalNPCs/ArmoredDiggerBody.cs index 0fa81d4459..3ffbbe0882 100644 --- a/NPCs/NormalNPCs/ArmoredDiggerBody.cs +++ b/NPCs/NormalNPCs/ArmoredDiggerBody.cs @@ -19,7 +19,7 @@ namespace CalamityMod.NPCs.NormalNPCs npc.width = 38; npc.height = 38; npc.defense = 30; - npc.GetCalamityNPC().RevPlusDR(0.35f); + npc.Calamity().RevPlusDR(0.35f); npc.lifeMax = 20000; npc.knockBackResist = 0f; npc.aiStyle = -1; diff --git a/NPCs/NormalNPCs/ArmoredDiggerHead.cs b/NPCs/NormalNPCs/ArmoredDiggerHead.cs index f76fe9fe21..57998d6063 100644 --- a/NPCs/NormalNPCs/ArmoredDiggerHead.cs +++ b/NPCs/NormalNPCs/ArmoredDiggerHead.cs @@ -22,7 +22,7 @@ namespace CalamityMod.NPCs.NormalNPCs npc.width = 54; npc.height = 54; npc.defense = 15; - npc.GetCalamityNPC().RevPlusDR(0.15f); + npc.Calamity().RevPlusDR(0.15f); npc.lifeMax = 20000; npc.knockBackResist = 0f; npc.aiStyle = -1; diff --git a/NPCs/NormalNPCs/ArmoredDiggerTail.cs b/NPCs/NormalNPCs/ArmoredDiggerTail.cs index 7e460d6ddb..5db9e55704 100644 --- a/NPCs/NormalNPCs/ArmoredDiggerTail.cs +++ b/NPCs/NormalNPCs/ArmoredDiggerTail.cs @@ -19,7 +19,7 @@ namespace CalamityMod.NPCs.NormalNPCs npc.width = 34; npc.height = 34; npc.defense = 45; - npc.GetCalamityNPC().RevPlusDR(0.45f); + npc.Calamity().RevPlusDR(0.45f); npc.lifeMax = 20000; npc.knockBackResist = 0f; npc.aiStyle = -1; diff --git a/NPCs/NormalNPCs/BlightedEye.cs b/NPCs/NormalNPCs/BlightedEye.cs index a3e5101f71..84ef2c1d1b 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.GetCalamityPlayer().ZoneSulphur) + if (spawnInfo.playerSafe || !Main.hardMode || spawnInfo.player.Calamity().ZoneSulphur) { return 0f; } diff --git a/NPCs/NormalNPCs/BloomSlime.cs b/NPCs/NormalNPCs/BloomSlime.cs index 6a9c4023a0..e0ba45b5a1 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.GetCalamityPlayer().ZoneAbyss || - spawnInfo.player.GetCalamityPlayer().ZoneSunkenSea) + if (spawnInfo.playerSafe || !CalamityWorld.downedProvidence || spawnInfo.player.Calamity().ZoneAbyss || + spawnInfo.player.Calamity().ZoneSunkenSea) { return 0f; } diff --git a/NPCs/NormalNPCs/CalamityEye.cs b/NPCs/NormalNPCs/CalamityEye.cs index cd86fd7dad..68a0c3a697 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.GetCalamityPlayer().ZoneSulphur) + if (spawnInfo.playerSafe || !NPC.downedPlantBoss || spawnInfo.player.Calamity().ZoneSulphur) { return 0f; } diff --git a/NPCs/NormalNPCs/Cnidrion.cs b/NPCs/NormalNPCs/Cnidrion.cs index b6432f28f2..6aca19a78b 100644 --- a/NPCs/NormalNPCs/Cnidrion.cs +++ b/NPCs/NormalNPCs/Cnidrion.cs @@ -23,7 +23,7 @@ namespace CalamityMod.NPCs.NormalNPCs npc.width = 160; npc.height = 80; npc.defense = 6; - npc.GetCalamityNPC().RevPlusDR(0.05f); + npc.Calamity().RevPlusDR(0.05f); npc.lifeMax = 400; npc.knockBackResist = 0.05f; aiType = -1; @@ -37,7 +37,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.playerSafe || spawnInfo.player.GetCalamityPlayer().ZoneSunkenSea) + if (spawnInfo.playerSafe || spawnInfo.player.Calamity().ZoneSunkenSea) { return 0f; } diff --git a/NPCs/NormalNPCs/CosmicElemental.cs b/NPCs/NormalNPCs/CosmicElemental.cs index 895b27b67e..8107e28188 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.GetCalamityPlayer().ZoneAbyss || spawnInfo.player.GetCalamityPlayer().ZoneSunkenSea) + if (spawnInfo.playerSafe || spawnInfo.player.Calamity().ZoneAbyss || spawnInfo.player.Calamity().ZoneSunkenSea) { return 0f; } diff --git a/NPCs/NormalNPCs/CrawlerAmber.cs b/NPCs/NormalNPCs/CrawlerAmber.cs index de505dbc85..106e0534d0 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.GetCalamityPlayer().ZoneSunkenSea) + if (spawnInfo.playerSafe || spawnInfo.player.Calamity().ZoneSunkenSea) { return 0f; } diff --git a/NPCs/NormalNPCs/CrawlerAmethyst.cs b/NPCs/NormalNPCs/CrawlerAmethyst.cs index 26e825690a..66176c6ef2 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.GetCalamityPlayer().ZoneAbyss || spawnInfo.player.GetCalamityPlayer().ZoneSunkenSea) + if (spawnInfo.playerSafe || spawnInfo.player.Calamity().ZoneAbyss || spawnInfo.player.Calamity().ZoneSunkenSea) { return 0f; } diff --git a/NPCs/NormalNPCs/CrawlerCrystal.cs b/NPCs/NormalNPCs/CrawlerCrystal.cs index 55621b9bd0..8cf1d85214 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.GetCalamityPlayer().ZoneAbyss || spawnInfo.player.GetCalamityPlayer().ZoneSunkenSea) + if (spawnInfo.playerSafe || spawnInfo.player.Calamity().ZoneAbyss || spawnInfo.player.Calamity().ZoneSunkenSea) { return 0f; } diff --git a/NPCs/NormalNPCs/CrawlerDiamond.cs b/NPCs/NormalNPCs/CrawlerDiamond.cs index 4b96f5a268..0356341d65 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.GetCalamityPlayer().ZoneAbyss || spawnInfo.player.GetCalamityPlayer().ZoneSunkenSea) + if (spawnInfo.playerSafe || spawnInfo.player.Calamity().ZoneAbyss || spawnInfo.player.Calamity().ZoneSunkenSea) { return 0f; } diff --git a/NPCs/NormalNPCs/CrawlerEmerald.cs b/NPCs/NormalNPCs/CrawlerEmerald.cs index 9ae14b9ddd..642178360b 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.GetCalamityPlayer().ZoneAbyss || spawnInfo.player.GetCalamityPlayer().ZoneSunkenSea) + if (spawnInfo.playerSafe || spawnInfo.player.Calamity().ZoneAbyss || spawnInfo.player.Calamity().ZoneSunkenSea) { return 0f; } diff --git a/NPCs/NormalNPCs/CrawlerRuby.cs b/NPCs/NormalNPCs/CrawlerRuby.cs index 55a1dba25d..dd465e1312 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.GetCalamityPlayer().ZoneAbyss || spawnInfo.player.GetCalamityPlayer().ZoneSunkenSea) + if (spawnInfo.playerSafe || spawnInfo.player.Calamity().ZoneAbyss || spawnInfo.player.Calamity().ZoneSunkenSea) { return 0f; } diff --git a/NPCs/NormalNPCs/CrawlerSapphire.cs b/NPCs/NormalNPCs/CrawlerSapphire.cs index a94c151571..06ae1be0cb 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.GetCalamityPlayer().ZoneAbyss || spawnInfo.player.GetCalamityPlayer().ZoneSunkenSea) + if (spawnInfo.playerSafe || spawnInfo.player.Calamity().ZoneAbyss || spawnInfo.player.Calamity().ZoneSunkenSea) { return 0f; } diff --git a/NPCs/NormalNPCs/CrawlerTopaz.cs b/NPCs/NormalNPCs/CrawlerTopaz.cs index c144b69623..d9404dda9f 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.GetCalamityPlayer().ZoneAbyss || spawnInfo.player.GetCalamityPlayer().ZoneSunkenSea) + if (spawnInfo.playerSafe || spawnInfo.player.Calamity().ZoneAbyss || spawnInfo.player.Calamity().ZoneSunkenSea) { return 0f; } diff --git a/NPCs/NormalNPCs/CrimulanBlightSlime.cs b/NPCs/NormalNPCs/CrimulanBlightSlime.cs index 98d936711a..678965e67d 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.GetCalamityPlayer().ZoneAbyss) + if (spawnInfo.playerSafe || spawnInfo.player.Calamity().ZoneAbyss) { return 0f; } diff --git a/NPCs/NormalNPCs/CryoSlime.cs b/NPCs/NormalNPCs/CryoSlime.cs index a189c49e5b..9269ce7d9b 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.GetCalamityPlayer().ZoneAbyss || - spawnInfo.player.GetCalamityPlayer().ZoneSunkenSea) + if (spawnInfo.playerSafe || !CalamityWorld.downedCryogen || spawnInfo.player.Calamity().ZoneAbyss || + spawnInfo.player.Calamity().ZoneSunkenSea) { return 0f; } diff --git a/NPCs/NormalNPCs/Cryon.cs b/NPCs/NormalNPCs/Cryon.cs index f73aca9838..b38e63852f 100644 --- a/NPCs/NormalNPCs/Cryon.cs +++ b/NPCs/NormalNPCs/Cryon.cs @@ -23,7 +23,7 @@ namespace CalamityMod.NPCs.NormalNPCs npc.width = 50; npc.height = 64; npc.defense = 10; - npc.GetCalamityNPC().RevPlusDR(0.1f); + npc.Calamity().RevPlusDR(0.1f); npc.lifeMax = 300; npc.knockBackResist = 0f; npc.value = Item.buyPrice(0, 0, 5, 0); @@ -345,7 +345,7 @@ namespace CalamityMod.NPCs.NormalNPCs !spawnInfo.player.ZoneTowerVortex && !spawnInfo.player.ZoneTowerNebula && !spawnInfo.player.ZoneDungeon && - !spawnInfo.player.GetCalamityPlayer().ZoneSunkenSea && + !spawnInfo.player.Calamity().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 75caf94692..ac51afc894 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.GetCalamityPlayer().ZoneAbyss) + if (spawnInfo.playerSafe || spawnInfo.player.Calamity().ZoneAbyss) { return 0f; } diff --git a/NPCs/NormalNPCs/Eidolist.cs b/NPCs/NormalNPCs/Eidolist.cs index e0ec64b829..c522c08ce7 100644 --- a/NPCs/NormalNPCs/Eidolist.cs +++ b/NPCs/NormalNPCs/Eidolist.cs @@ -289,7 +289,7 @@ namespace CalamityMod.NPCs.NormalNPCs { return 0f; } - if (spawnInfo.player.GetCalamityPlayer().ZoneAbyssLayer3 && spawnInfo.water) + if (spawnInfo.player.Calamity().ZoneAbyssLayer3 && spawnInfo.water) { return 0.05f; } diff --git a/NPCs/NormalNPCs/FearlessGoldfishWarrior.cs b/NPCs/NormalNPCs/FearlessGoldfishWarrior.cs index fc687977a0..2dbca7d16f 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.GetCalamityPlayer().ZoneSulphur) + if (spawnInfo.playerSafe || !Main.raining || spawnInfo.player.Calamity().ZoneSulphur) { return 0f; } diff --git a/NPCs/NormalNPCs/Horse.cs b/NPCs/NormalNPCs/Horse.cs index fb3038a998..cb327d47ef 100644 --- a/NPCs/NormalNPCs/Horse.cs +++ b/NPCs/NormalNPCs/Horse.cs @@ -26,7 +26,7 @@ namespace CalamityMod.NPCs.NormalNPCs npc.width = 230; npc.height = 230; npc.defense = 20; - npc.GetCalamityNPC().RevPlusDR(0.1f); + npc.Calamity().RevPlusDR(0.1f); npc.lifeMax = 3800; npc.aiStyle = -1; aiType = -1; @@ -60,8 +60,8 @@ namespace CalamityMod.NPCs.NormalNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.playerSafe || !Main.hardMode || spawnInfo.player.GetCalamityPlayer().ZoneAbyss || - spawnInfo.player.GetCalamityPlayer().ZoneSunkenSea) + if (spawnInfo.playerSafe || !Main.hardMode || spawnInfo.player.Calamity().ZoneAbyss || + spawnInfo.player.Calamity().ZoneSunkenSea) { return 0f; } diff --git a/NPCs/NormalNPCs/IceClasper.cs b/NPCs/NormalNPCs/IceClasper.cs index ef611beebd..2ecc121297 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.GetCalamityPlayer().ZoneSunkenSea && + !spawnInfo.player.Calamity().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 9c04f46a56..f68df6a674 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.GetCalamityPlayer().ZoneSulphur || !Main.raining) + if (spawnInfo.playerSafe || !spawnInfo.player.Calamity().ZoneSulphur || !Main.raining) { return 0f; } diff --git a/NPCs/NormalNPCs/KingSlimeJewel.cs b/NPCs/NormalNPCs/KingSlimeJewel.cs index 7619ad9d58..8505780dea 100644 --- a/NPCs/NormalNPCs/KingSlimeJewel.cs +++ b/NPCs/NormalNPCs/KingSlimeJewel.cs @@ -139,7 +139,7 @@ namespace CalamityMod.NPCs.NormalNPCs Main.PlaySound(2, (int)npc.position.X, (int)npc.position.Y, 8); int proj = Projectile.NewProjectile(vector62.X, vector62.Y, num506, num507, num511, num510, 0f, Main.myPlayer, 0f, 0f); - Main.projectile[proj].GetGlobalProjectile(mod).forceHostile = true; + Main.projectile[proj].Calamity().forceHostile = true; } } } diff --git a/NPCs/NormalNPCs/OverloadedSoldier.cs b/NPCs/NormalNPCs/OverloadedSoldier.cs index 1df44b6b1f..bda612f95e 100644 --- a/NPCs/NormalNPCs/OverloadedSoldier.cs +++ b/NPCs/NormalNPCs/OverloadedSoldier.cs @@ -22,7 +22,7 @@ namespace CalamityMod.NPCs.NormalNPCs npc.width = 18; npc.height = 40; npc.defense = 18; - npc.GetCalamityNPC().RevPlusDR(0.15f); + npc.Calamity().RevPlusDR(0.15f); npc.lifeMax = 90; npc.knockBackResist = 0.5f; animationType = 77; @@ -40,8 +40,8 @@ namespace CalamityMod.NPCs.NormalNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.playerSafe || !Main.hardMode || spawnInfo.player.GetCalamityPlayer().ZoneAbyss || - spawnInfo.player.GetCalamityPlayer().ZoneSunkenSea) + if (spawnInfo.playerSafe || !Main.hardMode || spawnInfo.player.Calamity().ZoneAbyss || + spawnInfo.player.Calamity().ZoneSunkenSea) { return 0f; } diff --git a/NPCs/NormalNPCs/PerennialSlime.cs b/NPCs/NormalNPCs/PerennialSlime.cs index dff593bf3f..fa47b49db9 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.GetCalamityPlayer().ZoneAbyss || - spawnInfo.player.GetCalamityPlayer().ZoneSunkenSea) + if (spawnInfo.playerSafe || !NPC.downedPlantBoss || spawnInfo.player.Calamity().ZoneAbyss || + spawnInfo.player.Calamity().ZoneSunkenSea) { return 0f; } diff --git a/NPCs/NormalNPCs/PhantomDebris.cs b/NPCs/NormalNPCs/PhantomDebris.cs index 78ad9b4cf8..d0282e98d5 100644 --- a/NPCs/NormalNPCs/PhantomDebris.cs +++ b/NPCs/NormalNPCs/PhantomDebris.cs @@ -21,7 +21,7 @@ namespace CalamityMod.NPCs.NormalNPCs npc.width = 44; npc.height = 22; npc.defense = 20; - npc.GetCalamityNPC().RevPlusDR(0.1f); + npc.Calamity().RevPlusDR(0.1f); npc.lifeMax = 80; npc.aiStyle = 3; aiType = 67; @@ -87,8 +87,8 @@ namespace CalamityMod.NPCs.NormalNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.playerSafe || !Main.hardMode || spawnInfo.player.GetCalamityPlayer().ZoneAbyss || - spawnInfo.player.GetCalamityPlayer().ZoneSunkenSea) + if (spawnInfo.playerSafe || !Main.hardMode || spawnInfo.player.Calamity().ZoneAbyss || + spawnInfo.player.Calamity().ZoneSunkenSea) { return 0f; } diff --git a/NPCs/NormalNPCs/Piggy.cs b/NPCs/NormalNPCs/Piggy.cs index d768181a1f..bbb35718b2 100644 --- a/NPCs/NormalNPCs/Piggy.cs +++ b/NPCs/NormalNPCs/Piggy.cs @@ -35,7 +35,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.player.GetCalamityPlayer().ZoneSulphur || spawnInfo.player.GetCalamityPlayer().ZoneSunkenSea) + if (spawnInfo.player.Calamity().ZoneSulphur || spawnInfo.player.Calamity().ZoneSunkenSea) { return 0f; } diff --git a/NPCs/NormalNPCs/Pitbull.cs b/NPCs/NormalNPCs/Pitbull.cs index 58f14ef6d7..5e261c3579 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.GetCalamityPlayer().ZoneSulphur) + if (spawnInfo.playerSafe || !NPC.downedBoss1 || spawnInfo.player.Calamity().ZoneSulphur) { return 0f; } diff --git a/NPCs/NormalNPCs/PlagueBee.cs b/NPCs/NormalNPCs/PlagueBee.cs index 372603bc28..ccd34dac1a 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.GetCalamityPlayer().ZoneSunkenSea) + if (spawnInfo.playerSafe || !NPC.downedGolemBoss || spawnInfo.player.Calamity().ZoneSunkenSea) { return 0f; } diff --git a/NPCs/NormalNPCs/PlagueBeeLarge.cs b/NPCs/NormalNPCs/PlagueBeeLarge.cs index 11989642d1..847b8927dd 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.GetCalamityPlayer().ZoneSunkenSea) + if (spawnInfo.playerSafe || !NPC.downedGolemBoss || spawnInfo.player.Calamity().ZoneSunkenSea) { return 0f; } diff --git a/NPCs/NormalNPCs/PlaguedDerpling.cs b/NPCs/NormalNPCs/PlaguedDerpling.cs index e1b896eeea..6504fd11f6 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.GetCalamityPlayer().ZoneSunkenSea) + if (spawnInfo.playerSafe || !NPC.downedGolemBoss || spawnInfo.player.Calamity().ZoneSunkenSea) { return 0f; } diff --git a/NPCs/NormalNPCs/PlaguedFlyingFox.cs b/NPCs/NormalNPCs/PlaguedFlyingFox.cs index 32825d31d4..4b66a4b043 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.GetCalamityPlayer().ZoneSunkenSea) + if (spawnInfo.playerSafe || !NPC.downedGolemBoss || spawnInfo.player.Calamity().ZoneSunkenSea) { return 0f; } diff --git a/NPCs/NormalNPCs/PlaguedJungleSlime.cs b/NPCs/NormalNPCs/PlaguedJungleSlime.cs index dc7bf82e6b..d5510c550e 100644 --- a/NPCs/NormalNPCs/PlaguedJungleSlime.cs +++ b/NPCs/NormalNPCs/PlaguedJungleSlime.cs @@ -55,7 +55,7 @@ namespace CalamityMod.NPCs.NormalNPCs { spikeTimer -= 1f; } - if (!npc.wet && !Main.player[npc.target].GetCalamityPlayer().royalGel) + if (!npc.wet && !Main.player[npc.target].Calamity().royalGel) { Vector2 vector3 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); float num14 = Main.player[npc.target].position.X + (float)Main.player[npc.target].width * 0.5f - vector3.X; @@ -107,7 +107,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.playerSafe || !NPC.downedGolemBoss || spawnInfo.player.GetCalamityPlayer().ZoneSunkenSea) + if (spawnInfo.playerSafe || !NPC.downedGolemBoss || spawnInfo.player.Calamity().ZoneSunkenSea) { return 0f; } diff --git a/NPCs/NormalNPCs/PlaguedTortoise.cs b/NPCs/NormalNPCs/PlaguedTortoise.cs index d149abe9c7..aef0d5af1f 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.GetCalamityPlayer().ZoneSunkenSea) + if (spawnInfo.playerSafe || !NPC.downedGolemBoss || spawnInfo.player.Calamity().ZoneSunkenSea) { return 0f; } diff --git a/NPCs/NormalNPCs/ProfanedEnergyBody.cs b/NPCs/NormalNPCs/ProfanedEnergyBody.cs index c7b2fa21e8..adddb13030 100644 --- a/NPCs/NormalNPCs/ProfanedEnergyBody.cs +++ b/NPCs/NormalNPCs/ProfanedEnergyBody.cs @@ -20,7 +20,7 @@ namespace CalamityMod.NPCs.NormalNPCs npc.width = 72; npc.height = 36; npc.defense = 50; - npc.GetCalamityNPC().RevPlusDR(0.1f); + npc.Calamity().RevPlusDR(0.1f); npc.lifeMax = 6000; npc.knockBackResist = 0f; aiType = -1; diff --git a/NPCs/NormalNPCs/SandTortoise.cs b/NPCs/NormalNPCs/SandTortoise.cs index 4fc3a45698..9b764f0c04 100644 --- a/NPCs/NormalNPCs/SandTortoise.cs +++ b/NPCs/NormalNPCs/SandTortoise.cs @@ -22,7 +22,7 @@ namespace CalamityMod.NPCs.NormalNPCs npc.width = 46; npc.height = 32; npc.defense = 30; - npc.GetCalamityNPC().RevPlusDR(0.25f); + npc.Calamity().RevPlusDR(0.25f); npc.scale = 1.5f; npc.lifeMax = 580; npc.knockBackResist = 0.2f; @@ -52,7 +52,7 @@ namespace CalamityMod.NPCs.NormalNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.playerSafe || !Main.hardMode || spawnInfo.player.GetCalamityPlayer().ZoneSunkenSea) + if (spawnInfo.playerSafe || !Main.hardMode || spawnInfo.player.Calamity().ZoneSunkenSea) { return 0f; } diff --git a/NPCs/NormalNPCs/ScornEater.cs b/NPCs/NormalNPCs/ScornEater.cs index 9a0da33455..83f2487b7a 100644 --- a/NPCs/NormalNPCs/ScornEater.cs +++ b/NPCs/NormalNPCs/ScornEater.cs @@ -22,7 +22,7 @@ namespace CalamityMod.NPCs.NormalNPCs npc.width = 160; npc.height = 160; npc.defense = 38; - npc.GetCalamityNPC().RevPlusDR(0.05f); + npc.Calamity().RevPlusDR(0.05f); npc.lifeMax = 16000; npc.knockBackResist = 0f; aiType = -1; diff --git a/NPCs/NormalNPCs/ShockstormShuttle.cs b/NPCs/NormalNPCs/ShockstormShuttle.cs index 968569bd4f..42c5d56cb9 100644 --- a/NPCs/NormalNPCs/ShockstormShuttle.cs +++ b/NPCs/NormalNPCs/ShockstormShuttle.cs @@ -20,7 +20,7 @@ namespace CalamityMod.NPCs.NormalNPCs npc.width = 64; npc.height = 38; npc.defense = 15; - npc.GetCalamityNPC().RevPlusDR(0.15f); + npc.Calamity().RevPlusDR(0.15f); npc.lifeMax = 150; npc.aiStyle = -1; aiType = -1; diff --git a/NPCs/NormalNPCs/StormlionCharger.cs b/NPCs/NormalNPCs/StormlionCharger.cs index a8975c2c67..b8142232f9 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.GetCalamityPlayer().ZoneSunkenSea) + if (spawnInfo.playerSafe || spawnInfo.player.Calamity().ZoneSunkenSea) { return 0f; } diff --git a/NPCs/NormalNPCs/SunBat.cs b/NPCs/NormalNPCs/SunBat.cs index 5066d08cc0..e749c8eb0f 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.GetCalamityPlayer().ZoneAbyss || - spawnInfo.player.GetCalamityPlayer().ZoneSunkenSea) + if (spawnInfo.playerSafe || !Main.hardMode || spawnInfo.player.Calamity().ZoneAbyss || + spawnInfo.player.Calamity().ZoneSunkenSea) { return 0f; } diff --git a/NPCs/NormalNPCs/ThiccWaifu.cs b/NPCs/NormalNPCs/ThiccWaifu.cs index b17eb7f57a..050e58a196 100644 --- a/NPCs/NormalNPCs/ThiccWaifu.cs +++ b/NPCs/NormalNPCs/ThiccWaifu.cs @@ -24,7 +24,7 @@ namespace CalamityMod.NPCs.NormalNPCs npc.width = 80; npc.height = 140; npc.defense = 18; - npc.GetCalamityNPC().RevPlusDR(0.05f); + npc.Calamity().RevPlusDR(0.05f); npc.lifeMax = 6000; if (CalamityWorld.downedProvidence) { diff --git a/NPCs/NormalNPCs/WulfrumDrone.cs b/NPCs/NormalNPCs/WulfrumDrone.cs index f90b765428..00d51dc6f8 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.GetCalamityPlayer().ZoneSulphur) + if (spawnInfo.playerSafe || spawnInfo.player.Calamity().ZoneSulphur) { return 0f; } diff --git a/NPCs/NormalNPCs/WulfrumSlime.cs b/NPCs/NormalNPCs/WulfrumSlime.cs index da29a08bf0..59f1416f65 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.GetCalamityPlayer().ZoneSulphur) + if (spawnInfo.playerSafe || spawnInfo.player.Calamity().ZoneSulphur) { return 0f; } diff --git a/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs b/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs index 0784fdfd09..99ef8f023a 100644 --- a/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs +++ b/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs @@ -37,7 +37,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath npc.width = 198; npc.height = 198; npc.defense = 40; - npc.GetCalamityNPC().RevPlusDR(0.25f); + npc.Calamity().RevPlusDR(0.25f); npc.lifeMax = CalamityWorld.revenge ? 77275 : 58500; if (CalamityWorld.death) { @@ -261,7 +261,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath num1044 += 2f; if ((double)npc.life < (double)npc.lifeMax * 0.1 || CalamityWorld.bossRushActive) num1044 += 2f; - if (npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) + if (npc.Calamity().enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) num1044 += 2f; Vector2 vector117 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f); @@ -304,7 +304,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath num1048 += 2f; num1049 += 0.1f; } - if (npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) + if (npc.Calamity().enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) { num1048 += 2f; num1049 += 0.1f; @@ -347,7 +347,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath npc.spriteDirection = npc.direction; int num1050 = 600; - if (npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) + if (npc.Calamity().enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) num1050 = 250; else if (aboveGroundEnrage) num1050 = 350; @@ -590,7 +590,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath npc.ai[1] += 1f; bool flag104 = false; - if (npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) + if (npc.Calamity().enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) { if (npc.ai[1] % 10f == 9f) flag104 = true; @@ -615,7 +615,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath if (Main.netMode != NetmodeID.MultiplayerClient) { float projectileSpeed = revenge ? 6.5f : 6f; - if (jungleEnrage || npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) + if (jungleEnrage || npc.Calamity().enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) projectileSpeed += 10f; if (CalamityWorld.bossRushActive) projectileSpeed *= 1.5f; diff --git a/NPCs/PlaguebringerShade/PlaguebringerShade.cs b/NPCs/PlaguebringerShade/PlaguebringerShade.cs index 1d240f2696..103e75b694 100644 --- a/NPCs/PlaguebringerShade/PlaguebringerShade.cs +++ b/NPCs/PlaguebringerShade/PlaguebringerShade.cs @@ -22,7 +22,7 @@ namespace CalamityMod.NPCs.PlaguebringerShade npc.width = 66; npc.height = 66; npc.defense = 30; - npc.GetCalamityNPC().RevPlusDR(0.2f); + npc.Calamity().RevPlusDR(0.2f); npc.lifeMax = CalamityWorld.death ? 4000 : 3000; npc.value = Item.buyPrice(0, 1, 50, 0); if (CalamityWorld.bossRushActive) diff --git a/NPCs/Polterghast/Polterghast.cs b/NPCs/Polterghast/Polterghast.cs index 30d6491389..ce6976012e 100644 --- a/NPCs/Polterghast/Polterghast.cs +++ b/NPCs/Polterghast/Polterghast.cs @@ -35,7 +35,7 @@ namespace CalamityMod.NPCs.Polterghast npc.width = 90; npc.height = 120; npc.defense = 90; - CalamityGlobalNPC global = npc.GetCalamityNPC(); + CalamityGlobalNPC global = npc.Calamity(); global.DR = 0.1f; global.customDR = true; global.multDRReductions.Add(BuffID.Ichor, 0.88f); @@ -264,7 +264,7 @@ namespace CalamityMod.NPCs.Polterghast // Set DR based on phase and boostDR variable float dr = phase3 ? phase3DR : phase2 ? phase2DR : phase1DR; if (boostDR) dr += cloneDRBoost; - npc.GetCalamityNPC().DR = dr; + npc.Calamity().DR = dr; if (expertMode) { @@ -383,7 +383,7 @@ namespace CalamityMod.NPCs.Polterghast num742 += 1f; if (CalamityWorld.bossRushActive) num742 = 13f; - if (speedBoost1 || npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) + if (speedBoost1 || npc.Calamity().enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) num742 *= 2f; Vector2 vector93 = new Vector2(vector.X, vector.Y); @@ -405,7 +405,7 @@ namespace CalamityMod.NPCs.Polterghast num747 = mod.ProjectileType("PhantomBlast"); } - if (speedBoost1 || npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) + if (speedBoost1 || npc.Calamity().enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) num746 *= 2; vector93.X += num743 * 3f; @@ -421,7 +421,7 @@ namespace CalamityMod.NPCs.Polterghast num742 += 1f; if (CalamityWorld.bossRushActive) num742 = 18f; - if (speedBoost1 || npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) + if (speedBoost1 || npc.Calamity().enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) num742 *= 2f; Vector2 vector93 = new Vector2(vector.X, vector.Y); @@ -435,7 +435,7 @@ namespace CalamityMod.NPCs.Polterghast int num746 = expertMode ? 60 : 70; int num747 = mod.ProjectileType("PhantomBlast"); - if (speedBoost1 || npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) + if (speedBoost1 || npc.Calamity().enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) num746 *= 2; vector93.X += num743 * 3f; @@ -487,7 +487,7 @@ namespace CalamityMod.NPCs.Polterghast npc.damage = (int)((float)npc.defDamage * 1.2f); npc.defense = (int)((float)npc.defDefense * 0.8f); - if (speedBoost1 || npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) + if (speedBoost1 || npc.Calamity().enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) { npc.defense *= 2; npc.damage *= 2; @@ -517,7 +517,7 @@ namespace CalamityMod.NPCs.Polterghast num742 += 1f; if (CalamityWorld.bossRushActive) num742 = 13f; - if (speedBoost1 || npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) + if (speedBoost1 || npc.Calamity().enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) num742 *= 2f; Vector2 vector93 = new Vector2(vector.X, vector.Y); @@ -539,7 +539,7 @@ namespace CalamityMod.NPCs.Polterghast num747 = mod.ProjectileType("PhantomBlast2"); } - if (speedBoost1 || npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) + if (speedBoost1 || npc.Calamity().enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) num746 *= 2; vector93.X += num743 * 3f; @@ -555,7 +555,7 @@ namespace CalamityMod.NPCs.Polterghast num742 += 1f; if (CalamityWorld.bossRushActive) num742 = 18f; - if (speedBoost1 || npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) + if (speedBoost1 || npc.Calamity().enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) num742 *= 2f; Vector2 vector93 = new Vector2(vector.X, vector.Y); @@ -570,7 +570,7 @@ namespace CalamityMod.NPCs.Polterghast int num746 = expertMode ? 65 : 75; int num747 = mod.ProjectileType("PhantomBlast2"); - if (speedBoost1 || npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) + if (speedBoost1 || npc.Calamity().enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) num746 *= 2; vector93.X += num743 * 3f; @@ -638,7 +638,7 @@ namespace CalamityMod.NPCs.Polterghast npc.damage = (int)((float)npc.defDamage * 1.4f); npc.defense = (int)((float)npc.defDefense * 0.5f); - if (speedBoost1 || npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) + if (speedBoost1 || npc.Calamity().enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) { npc.defense *= 2; npc.damage *= 2; diff --git a/NPCs/ProfanedGuardianBoss/ProfanedGuardianBoss.cs b/NPCs/ProfanedGuardianBoss/ProfanedGuardianBoss.cs index 18971dff12..39a6fb3060 100644 --- a/NPCs/ProfanedGuardianBoss/ProfanedGuardianBoss.cs +++ b/NPCs/ProfanedGuardianBoss/ProfanedGuardianBoss.cs @@ -30,7 +30,7 @@ namespace CalamityMod.NPCs.ProfanedGuardianBoss npc.width = 100; npc.height = 80; npc.defense = 50; - npc.GetCalamityNPC().RevPlusDR(0.4f); + npc.Calamity().RevPlusDR(0.4f); npc.lifeMax = 102500; if (CalamityWorld.bossRushActive) { diff --git a/NPCs/ProfanedGuardianBoss/ProfanedGuardianBoss2.cs b/NPCs/ProfanedGuardianBoss/ProfanedGuardianBoss2.cs index 32f455c765..42f61fa4a6 100644 --- a/NPCs/ProfanedGuardianBoss/ProfanedGuardianBoss2.cs +++ b/NPCs/ProfanedGuardianBoss/ProfanedGuardianBoss2.cs @@ -24,7 +24,7 @@ namespace CalamityMod.NPCs.ProfanedGuardianBoss npc.width = 100; npc.height = 80; npc.defense = 50; - npc.GetCalamityNPC().RevPlusDR(0.25f); + npc.Calamity().RevPlusDR(0.25f); npc.lifeMax = 40000; if (CalamityWorld.bossRushActive) { diff --git a/NPCs/ProfanedGuardianBoss/ProfanedGuardianBoss3.cs b/NPCs/ProfanedGuardianBoss/ProfanedGuardianBoss3.cs index c9c3b00af3..3ac343a567 100644 --- a/NPCs/ProfanedGuardianBoss/ProfanedGuardianBoss3.cs +++ b/NPCs/ProfanedGuardianBoss/ProfanedGuardianBoss3.cs @@ -24,7 +24,7 @@ namespace CalamityMod.NPCs.ProfanedGuardianBoss npc.width = 100; npc.height = 80; npc.defense = 35; - npc.GetCalamityNPC().RevPlusDR(0.05f); + npc.Calamity().RevPlusDR(0.05f); npc.lifeMax = 25000; if (CalamityWorld.bossRushActive) { diff --git a/NPCs/Providence/ProvSpawnDefense.cs b/NPCs/Providence/ProvSpawnDefense.cs index 3e60e92534..79d1128805 100644 --- a/NPCs/Providence/ProvSpawnDefense.cs +++ b/NPCs/Providence/ProvSpawnDefense.cs @@ -23,7 +23,7 @@ namespace CalamityMod.NPCs.Providence npc.width = 100; npc.height = 80; npc.defense = 50; - npc.GetCalamityNPC().RevPlusDR(0.4f); + npc.Calamity().RevPlusDR(0.4f); npc.lifeMax = 25000; if (CalamityWorld.bossRushActive) { diff --git a/NPCs/Providence/ProvSpawnHealer.cs b/NPCs/Providence/ProvSpawnHealer.cs index fb1aaff529..eeec304d22 100644 --- a/NPCs/Providence/ProvSpawnHealer.cs +++ b/NPCs/Providence/ProvSpawnHealer.cs @@ -23,7 +23,7 @@ namespace CalamityMod.NPCs.Providence npc.width = 100; npc.height = 80; npc.defense = 35; - npc.GetCalamityNPC().RevPlusDR(0.15f); + npc.Calamity().RevPlusDR(0.15f); npc.lifeMax = 40000; if (CalamityWorld.bossRushActive) { diff --git a/NPCs/Providence/ProvSpawnOffense.cs b/NPCs/Providence/ProvSpawnOffense.cs index db2e12e669..731021df60 100644 --- a/NPCs/Providence/ProvSpawnOffense.cs +++ b/NPCs/Providence/ProvSpawnOffense.cs @@ -26,7 +26,7 @@ namespace CalamityMod.NPCs.Providence npc.width = 100; npc.height = 80; npc.defense = 40; - npc.GetCalamityNPC().RevPlusDR(0.3f); + npc.Calamity().RevPlusDR(0.3f); npc.lifeMax = 42500; if (CalamityWorld.bossRushActive) { diff --git a/NPCs/Providence/Providence.cs b/NPCs/Providence/Providence.cs index 845478b725..bb1ce80bc9 100644 --- a/NPCs/Providence/Providence.cs +++ b/NPCs/Providence/Providence.cs @@ -40,7 +40,7 @@ namespace CalamityMod.NPCs.Providence npc.width = 600; npc.height = 450; npc.defense = 50; - CalamityGlobalNPC global = npc.GetCalamityNPC(); + CalamityGlobalNPC global = npc.Calamity(); global.DR = normalDR; global.customDR = true; global.flatDRReductions.Add(BuffID.Ichor, 0.05f); @@ -122,7 +122,7 @@ namespace CalamityMod.NPCs.Providence public override void AI() { - CalamityGlobalNPC calamityGlobalNPC = npc.GetGlobalNPC(mod); + CalamityGlobalNPC calamityGlobalNPC = npc.Calamity(); // whoAmI variable for Guardians and other things CalamityGlobalNPC.holyBoss = npc.whoAmI; @@ -316,7 +316,7 @@ namespace CalamityMod.NPCs.Providence } // Set DR based on current attack phase - npc.GetCalamityNPC().DR = (npc.ai[0] == 2f || npc.ai[0] == 5f || npc.ai[0] == 7f) ? cocoonDR : normalDR; + npc.Calamity().DR = (npc.ai[0] == 2f || npc.ai[0] == 5f || npc.ai[0] == 7f) ? cocoonDR : normalDR; // Movement if (npc.ai[0] != 2f && npc.ai[0] != 5f) @@ -558,7 +558,7 @@ namespace CalamityMod.NPCs.Providence npc.ai[3] += 1f; int num856 = (expertMode ? 24 : 26) - (int)(4f * (1f - lifeRatio)); - if (npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) + if (npc.Calamity().enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) num856 = 19; num856 = (int)((double)num856 * attackRateMult); @@ -574,7 +574,7 @@ namespace CalamityMod.NPCs.Providence float num859 = (float)Math.Sqrt((double)(num857 * num857 + num858 * num858)); float num860 = (expertMode ? 10.25f : 9f) + (2.5f * (1f - lifeRatio)); - if (npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) + if (npc.Calamity().enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) num860 = 12.75f; if (revenge) @@ -804,7 +804,7 @@ namespace CalamityMod.NPCs.Providence npc.ai[3] += 1f; int num864 = (expertMode ? 73 : 77) - (int)(15f * (1f - lifeRatio)); - if (npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) + if (npc.Calamity().enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) num864 = 59; num864 = (int)((double)num864 * attackRateMult); @@ -846,7 +846,7 @@ namespace CalamityMod.NPCs.Providence if (Main.netMode != NetmodeID.MultiplayerClient) { - npc.ai[2] += ((npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) ? 2f : 1f) + (2f * (1f - lifeRatio)); + npc.ai[2] += ((npc.Calamity().enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) ? 2f : 1f) + (2f * (1f - lifeRatio)); if (CalamityWorld.bossRushActive) npc.ai[2] += 1f; diff --git a/NPCs/Scavenger/ScavengerBody.cs b/NPCs/Scavenger/ScavengerBody.cs index 397c69ad9d..db20f4836b 100644 --- a/NPCs/Scavenger/ScavengerBody.cs +++ b/NPCs/Scavenger/ScavengerBody.cs @@ -28,7 +28,7 @@ namespace CalamityMod.NPCs.Scavenger npc.width = 332; npc.height = 214; npc.defense = 55; - npc.GetCalamityNPC().RevPlusDR(0.4f); + npc.Calamity().RevPlusDR(0.4f); npc.lifeMax = CalamityWorld.revenge ? 53500 : 42700; if (CalamityWorld.death) { @@ -382,11 +382,11 @@ namespace CalamityMod.NPCs.Scavenger npc.ai[1] += 1f; if (npc.ai[1] > 0f) { - if ((!rightClawActive && !leftClawActive) || npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) + if ((!rightClawActive && !leftClawActive) || npc.Calamity().enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) npc.ai[1] += 1f; - if (!headActive || npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) + if (!headActive || npc.Calamity().enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) npc.ai[1] += 1f; - if ((!rightLegActive && !leftLegActive) || npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) + if ((!rightLegActive && !leftLegActive) || npc.Calamity().enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) npc.ai[1] += 1f; } @@ -396,7 +396,7 @@ namespace CalamityMod.NPCs.Scavenger { npc.TargetClosest(true); - float velocityX = ((enrage || npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) ? 8f : 4f) + (4f * (1f - lifeRatio)); + float velocityX = ((enrage || npc.Calamity().enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) ? 8f : 4f) + (4f * (1f - lifeRatio)); npc.velocity.X = velocityX * (float)npc.direction; if (CalamityWorld.revenge || CalamityWorld.bossRushActive) @@ -480,7 +480,7 @@ namespace CalamityMod.NPCs.Scavenger npc.velocity.X = npc.velocity.X + 0.2f; float velocityX = 3f + (4f * (1f - lifeRatio)); - if (npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) + if (npc.Calamity().enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) velocityX += 3f; if (!rightClawActive) velocityX += 1f; diff --git a/NPCs/Scavenger/ScavengerClawLeft.cs b/NPCs/Scavenger/ScavengerClawLeft.cs index 345dbd67d6..bc4338dd97 100644 --- a/NPCs/Scavenger/ScavengerClawLeft.cs +++ b/NPCs/Scavenger/ScavengerClawLeft.cs @@ -23,7 +23,7 @@ namespace CalamityMod.NPCs.Scavenger npc.width = 80; npc.height = 40; npc.defense = 40; - npc.GetCalamityNPC().RevPlusDR(0.1f); + npc.Calamity().RevPlusDR(0.1f); npc.lifeMax = 11120; npc.knockBackResist = 0f; aiType = -1; diff --git a/NPCs/Scavenger/ScavengerClawRight.cs b/NPCs/Scavenger/ScavengerClawRight.cs index 46bca10b5b..6a9148d555 100644 --- a/NPCs/Scavenger/ScavengerClawRight.cs +++ b/NPCs/Scavenger/ScavengerClawRight.cs @@ -23,7 +23,7 @@ namespace CalamityMod.NPCs.Scavenger npc.width = 80; //324 npc.height = 40; //216 npc.defense = 50; - npc.GetCalamityNPC().RevPlusDR(0.1f); + npc.Calamity().RevPlusDR(0.1f); npc.lifeMax = 11120; npc.knockBackResist = 0f; aiType = -1; diff --git a/NPCs/Scavenger/ScavengerHead.cs b/NPCs/Scavenger/ScavengerHead.cs index 564e73e9c3..a2a578a0b1 100644 --- a/NPCs/Scavenger/ScavengerHead.cs +++ b/NPCs/Scavenger/ScavengerHead.cs @@ -21,7 +21,7 @@ namespace CalamityMod.NPCs.Scavenger npc.width = 80; npc.height = 80; npc.defense = 50; - npc.GetCalamityNPC().RevPlusDR(0.1f); + npc.Calamity().RevPlusDR(0.1f); npc.lifeMax = 32705; npc.knockBackResist = 0f; aiType = -1; diff --git a/NPCs/Scavenger/ScavengerLegLeft.cs b/NPCs/Scavenger/ScavengerLegLeft.cs index f7b68299ae..ba2657f44b 100644 --- a/NPCs/Scavenger/ScavengerLegLeft.cs +++ b/NPCs/Scavenger/ScavengerLegLeft.cs @@ -21,7 +21,7 @@ namespace CalamityMod.NPCs.Scavenger npc.width = 60; npc.height = 60; npc.defense = 40; - npc.GetCalamityNPC().RevPlusDR(0.15f); + npc.Calamity().RevPlusDR(0.15f); npc.lifeMax = 22010; npc.knockBackResist = 0f; aiType = -1; diff --git a/NPCs/Scavenger/ScavengerLegRight.cs b/NPCs/Scavenger/ScavengerLegRight.cs index 964280f2eb..abc2b85493 100644 --- a/NPCs/Scavenger/ScavengerLegRight.cs +++ b/NPCs/Scavenger/ScavengerLegRight.cs @@ -21,7 +21,7 @@ namespace CalamityMod.NPCs.Scavenger npc.width = 60; npc.height = 60; npc.defense = 40; - npc.GetCalamityNPC().RevPlusDR(0.15f); + npc.Calamity().RevPlusDR(0.15f); npc.lifeMax = 21010; npc.knockBackResist = 0f; aiType = -1; diff --git a/NPCs/SlimeGod/SlimeGodCore.cs b/NPCs/SlimeGod/SlimeGodCore.cs index 418fce4446..a0a6640f85 100644 --- a/NPCs/SlimeGod/SlimeGodCore.cs +++ b/NPCs/SlimeGod/SlimeGodCore.cs @@ -127,7 +127,7 @@ namespace CalamityMod.NPCs.SlimeGod { if (Main.netMode != NetmodeID.MultiplayerClient) { - npc.localAI[1] += ((npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) ? 2f : 1f); + npc.localAI[1] += ((npc.Calamity().enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) ? 2f : 1f); if (expertMode && Main.rand.NextBool(2)) { if (npc.localAI[0] >= 75f) @@ -234,7 +234,7 @@ namespace CalamityMod.NPCs.SlimeGod { num1372 = 22f; } - if (npc.GetGlobalNPC(mod).enraged || player.gravDir == -1f || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) + if (npc.Calamity().enraged || player.gravDir == -1f || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) { num1372 += 8f; } @@ -347,7 +347,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)].GetCalamityPlayer(); + CalamityPlayer mp = Main.player[Player.FindClosest(npc.position, npc.width, npc.height)].Calamity(); if (!mp.revJamDrop) { DropHelper.DropItemCondition(npc, mod.ItemType("PurifiedJam"), true, CalamityWorld.revenge && !CalamityWorld.downedSlimeGod, 6, 8); diff --git a/NPCs/StormWeaver/StasisProbe.cs b/NPCs/StormWeaver/StasisProbe.cs index 48be9af7e3..cda35f14ea 100644 --- a/NPCs/StormWeaver/StasisProbe.cs +++ b/NPCs/StormWeaver/StasisProbe.cs @@ -22,7 +22,7 @@ namespace CalamityMod.NPCs.StormWeaver npc.width = 30; npc.height = 30; npc.defense = 60; - npc.GetCalamityNPC().RevPlusDR(0.25f); + npc.Calamity().RevPlusDR(0.25f); npc.lifeMax = 1200; if (CalamityWorld.bossRushActive) { diff --git a/NPCs/StormWeaver/StormWeaverHead.cs b/NPCs/StormWeaver/StormWeaverHead.cs index 28f5677587..f45174cfaa 100644 --- a/NPCs/StormWeaver/StormWeaverHead.cs +++ b/NPCs/StormWeaver/StormWeaverHead.cs @@ -167,7 +167,7 @@ namespace CalamityMod.NPCs.StormWeaver if (BoltCountdown == 0) { int speed2 = revenge ? 8 : 7; - if (npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) + if (npc.Calamity().enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) { speed2 += 1; } diff --git a/NPCs/StormWeaver/StormWeaverHeadNaked.cs b/NPCs/StormWeaver/StormWeaverHeadNaked.cs index 821ca44eaa..f2dfd6e266 100644 --- a/NPCs/StormWeaver/StormWeaverHeadNaked.cs +++ b/NPCs/StormWeaver/StormWeaverHeadNaked.cs @@ -186,7 +186,7 @@ namespace CalamityMod.NPCs.StormWeaver if (BoltCountdown == 0) { int speed2 = revenge ? 8 : 7; - if (npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) + if (npc.Calamity().enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) { speed2 += 1; } diff --git a/NPCs/SunkenSeaNPCs/BlindedAngler.cs b/NPCs/SunkenSeaNPCs/BlindedAngler.cs index 668e5627ea..2af398eb51 100644 --- a/NPCs/SunkenSeaNPCs/BlindedAngler.cs +++ b/NPCs/SunkenSeaNPCs/BlindedAngler.cs @@ -26,7 +26,7 @@ namespace CalamityMod.NPCs.SunkenSeaNPCs npc.width = 56; npc.height = 44; npc.defense = 30; - npc.GetCalamityNPC().RevPlusDR(0.2f); + npc.Calamity().RevPlusDR(0.2f); npc.lifeMax = 750; npc.aiStyle = -1; aiType = -1; @@ -247,7 +247,7 @@ namespace CalamityMod.NPCs.SunkenSeaNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (Main.hardMode && spawnInfo.player.GetCalamityPlayer().ZoneSunkenSea && spawnInfo.water && !spawnInfo.player.GetCalamityPlayer().clamity) + if (Main.hardMode && spawnInfo.player.Calamity().ZoneSunkenSea && spawnInfo.water && !spawnInfo.player.Calamity().clamity) { return SpawnCondition.CaveJellyfish.Chance * 0.45f; } diff --git a/NPCs/SunkenSeaNPCs/Clam.cs b/NPCs/SunkenSeaNPCs/Clam.cs index 3ba5fb7dea..7ee84ec3bf 100644 --- a/NPCs/SunkenSeaNPCs/Clam.cs +++ b/NPCs/SunkenSeaNPCs/Clam.cs @@ -25,7 +25,7 @@ namespace CalamityMod.NPCs.SunkenSeaNPCs npc.width = 56; npc.height = 38; npc.defense = 9999; - npc.GetCalamityNPC().RevPlusDR(0.25f); + npc.Calamity().RevPlusDR(0.25f); npc.lifeMax = Main.hardMode ? 300 : 150; if (Main.expertMode) { @@ -59,7 +59,7 @@ namespace CalamityMod.NPCs.SunkenSeaNPCs public override void AI() { npc.TargetClosest(true); - if (Main.player[npc.target].GetCalamityPlayer().clamity) + if (Main.player[npc.target].Calamity().clamity) { hitAmount = 3; hasBeenHit = true; @@ -192,7 +192,7 @@ namespace CalamityMod.NPCs.SunkenSeaNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.player.GetCalamityPlayer().ZoneSunkenSea && spawnInfo.water) + if (spawnInfo.player.Calamity().ZoneSunkenSea && spawnInfo.water) { return SpawnCondition.CaveJellyfish.Chance * 1.2f; } diff --git a/NPCs/SunkenSeaNPCs/EutrophicRay.cs b/NPCs/SunkenSeaNPCs/EutrophicRay.cs index d66ba4a98a..e84de45fa5 100644 --- a/NPCs/SunkenSeaNPCs/EutrophicRay.cs +++ b/NPCs/SunkenSeaNPCs/EutrophicRay.cs @@ -24,7 +24,7 @@ namespace CalamityMod.NPCs.SunkenSeaNPCs npc.width = 116; npc.height = 36; npc.defense = Main.hardMode ? 15 : 5; - npc.GetCalamityNPC().RevPlusDR(0.05f); + npc.Calamity().RevPlusDR(0.05f); npc.lifeMax = Main.hardMode ? 500 : 150; npc.aiStyle = -1; aiType = -1; @@ -185,7 +185,7 @@ namespace CalamityMod.NPCs.SunkenSeaNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.player.GetCalamityPlayer().ZoneSunkenSea && spawnInfo.water && !spawnInfo.player.GetCalamityPlayer().clamity) + if (spawnInfo.player.Calamity().ZoneSunkenSea && spawnInfo.water && !spawnInfo.player.Calamity().clamity) { return SpawnCondition.CaveJellyfish.Chance * 0.6f; } diff --git a/NPCs/SunkenSeaNPCs/GhostBell.cs b/NPCs/SunkenSeaNPCs/GhostBell.cs index 7e4c08e788..b40bdfb998 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.GetCalamityPlayer().ZoneSunkenSea && spawnInfo.water && !spawnInfo.player.GetCalamityPlayer().clamity) + if (spawnInfo.player.Calamity().ZoneSunkenSea && spawnInfo.water && !spawnInfo.player.Calamity().clamity) { return SpawnCondition.CaveJellyfish.Chance * 0.9f; } diff --git a/NPCs/SunkenSeaNPCs/GhostBellSmall.cs b/NPCs/SunkenSeaNPCs/GhostBellSmall.cs index 02eacf3cf1..879001c406 100644 --- a/NPCs/SunkenSeaNPCs/GhostBellSmall.cs +++ b/NPCs/SunkenSeaNPCs/GhostBellSmall.cs @@ -96,7 +96,7 @@ namespace CalamityMod.NPCs.SunkenSeaNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.player.GetCalamityPlayer().ZoneSunkenSea && spawnInfo.water && !spawnInfo.player.GetCalamityPlayer().clamity) + if (spawnInfo.player.Calamity().ZoneSunkenSea && spawnInfo.water && !spawnInfo.player.Calamity().clamity) { return SpawnCondition.CaveJellyfish.Chance * 1.5f; } diff --git a/NPCs/SunkenSeaNPCs/GiantClam.cs b/NPCs/SunkenSeaNPCs/GiantClam.cs index 5ca7eb3ba2..c71edfd5b9 100644 --- a/NPCs/SunkenSeaNPCs/GiantClam.cs +++ b/NPCs/SunkenSeaNPCs/GiantClam.cs @@ -34,7 +34,7 @@ namespace CalamityMod.NPCs.SunkenSeaNPCs npc.width = 160; npc.height = 120; npc.defense = 9999; - npc.GetCalamityNPC().RevPlusDR(0.3f); + npc.Calamity().RevPlusDR(0.3f); npc.lifeMax = Main.hardMode ? 7500 : 1250; for (int k = 0; k < npc.buffImmune.Length; k++) { @@ -348,7 +348,7 @@ namespace CalamityMod.NPCs.SunkenSeaNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.player.GetCalamityPlayer().ZoneSunkenSea && spawnInfo.water && CalamityWorld.downedDesertScourge && !NPC.AnyNPCs(mod.NPCType("GiantClam"))) + if (spawnInfo.player.Calamity().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 595fb3ff92..44ed5579a3 100644 --- a/NPCs/SunkenSeaNPCs/PrismTurtle.cs +++ b/NPCs/SunkenSeaNPCs/PrismTurtle.cs @@ -27,7 +27,7 @@ namespace CalamityMod.NPCs.SunkenSeaNPCs npc.width = 72; npc.height = 58; npc.defense = Main.hardMode ? 25 : 10; - npc.GetCalamityNPC().RevPlusDR(0.25f); + npc.Calamity().RevPlusDR(0.25f); npc.lifeMax = Main.hardMode ? 1000 : 350; npc.aiStyle = -1; aiType = -1; @@ -255,7 +255,7 @@ namespace CalamityMod.NPCs.SunkenSeaNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.player.GetCalamityPlayer().ZoneSunkenSea && spawnInfo.water && !spawnInfo.player.GetCalamityPlayer().clamity) + if (spawnInfo.player.Calamity().ZoneSunkenSea && spawnInfo.water && !spawnInfo.player.Calamity().clamity) { return SpawnCondition.CaveJellyfish.Chance * 0.9f; } diff --git a/NPCs/SunkenSeaNPCs/SeaFloaty.cs b/NPCs/SunkenSeaNPCs/SeaFloaty.cs index b2e4e0e18a..2ec45d95b2 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.GetCalamityPlayer().ZoneSunkenSea && spawnInfo.water && !spawnInfo.player.GetCalamityPlayer().clamity) + if (spawnInfo.player.Calamity().ZoneSunkenSea && spawnInfo.water && !spawnInfo.player.Calamity().clamity) { return SpawnCondition.CaveJellyfish.Chance * 0.45f; } diff --git a/NPCs/SunkenSeaNPCs/SeaMinnow.cs b/NPCs/SunkenSeaNPCs/SeaMinnow.cs index 057ae14e9b..fbb87a7508 100644 --- a/NPCs/SunkenSeaNPCs/SeaMinnow.cs +++ b/NPCs/SunkenSeaNPCs/SeaMinnow.cs @@ -200,7 +200,7 @@ namespace CalamityMod.NPCs.SunkenSeaNPCs public override float SpawnChance(NPCSpawnInfo spawnInfo) { - if (spawnInfo.player.GetCalamityPlayer().ZoneSunkenSea && spawnInfo.water && !spawnInfo.player.GetCalamityPlayer().clamity) + if (spawnInfo.player.Calamity().ZoneSunkenSea && spawnInfo.water && !spawnInfo.player.Calamity().clamity) { return SpawnCondition.CaveJellyfish.Chance * 0.6f; } diff --git a/NPCs/SunkenSeaNPCs/SeaSerpent1.cs b/NPCs/SunkenSeaNPCs/SeaSerpent1.cs index 65ea0e6f55..3de6181541 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.GetCalamityPlayer().ZoneSunkenSea && spawnInfo.water && - !NPC.AnyNPCs(mod.NPCType("SeaSerpent1")) && !spawnInfo.player.GetCalamityPlayer().clamity && !spawnInfo.playerSafe) + if (Main.hardMode && spawnInfo.player.Calamity().ZoneSunkenSea && spawnInfo.water && + !NPC.AnyNPCs(mod.NPCType("SeaSerpent1")) && !spawnInfo.player.Calamity().clamity && !spawnInfo.playerSafe) { return SpawnCondition.CaveJellyfish.Chance * 0.3f; } diff --git a/NPCs/SupremeCalamitas/SoulSeekerSupreme.cs b/NPCs/SupremeCalamitas/SoulSeekerSupreme.cs index 1a1d3b6f27..640681492c 100644 --- a/NPCs/SupremeCalamitas/SoulSeekerSupreme.cs +++ b/NPCs/SupremeCalamitas/SoulSeekerSupreme.cs @@ -29,7 +29,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas npc.canGhostHeal = false; npc.damage = 0; npc.defense = 80; - npc.GetCalamityNPC().RevPlusDR(0.35f); + npc.Calamity().RevPlusDR(0.35f); npc.lifeMax = Main.expertMode ? 90000 : 50000; if (CalamityWorld.revenge) { diff --git a/NPCs/SupremeCalamitas/SupremeCalamitas.cs b/NPCs/SupremeCalamitas/SupremeCalamitas.cs index 8053418245..762da9fe00 100644 --- a/NPCs/SupremeCalamitas/SupremeCalamitas.cs +++ b/NPCs/SupremeCalamitas/SupremeCalamitas.cs @@ -73,7 +73,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas npc.width = 120; npc.height = 120; npc.defense = 120; - CalamityGlobalNPC global = npc.GetCalamityNPC(); + CalamityGlobalNPC global = npc.Calamity(); global.DR = CalamityWorld.bossRushActive ? bossRushDR : CalamityWorld.death ? deathDR : normalDR; global.customDR = true; global.multDRReductions.Add(BuffID.Ichor, 0.9f); @@ -227,7 +227,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas if (!startText) { - if (Main.LocalPlayer.GetCalamityPlayer().sCalKillCount == 4) + if (Main.LocalPlayer.Calamity().sCalKillCount == 4) { string key = "Mods.CalamityMod.SupremeBossText12"; //kill SCal 4 times Color messageColor = Color.Orange; @@ -240,7 +240,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas NetMessage.BroadcastChatMessage(NetworkText.FromKey(key), messageColor); } } - else if (Main.LocalPlayer.GetCalamityPlayer().sCalKillCount == 1) + else if (Main.LocalPlayer.Calamity().sCalKillCount == 1) { string key = "Mods.CalamityMod.SupremeBossText11"; //kill SCal once Color messageColor = Color.Orange; @@ -253,9 +253,9 @@ namespace CalamityMod.NPCs.SupremeCalamitas NetMessage.BroadcastChatMessage(NetworkText.FromKey(key), messageColor); } } - if (Main.LocalPlayer.GetCalamityPlayer().sCalDeathCount < 51) + if (Main.LocalPlayer.Calamity().sCalDeathCount < 51) { - if (Main.LocalPlayer.GetCalamityPlayer().sCalDeathCount == 50) + if (Main.LocalPlayer.Calamity().sCalDeathCount == 50) { string key = "Mods.CalamityMod.SupremeBossText15"; //die 50 or more times Color messageColor = Color.Orange; @@ -268,7 +268,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas NetMessage.BroadcastChatMessage(NetworkText.FromKey(key), messageColor); } } - else if (Main.LocalPlayer.GetCalamityPlayer().sCalDeathCount > 19) + else if (Main.LocalPlayer.Calamity().sCalDeathCount > 19) { string key = "Mods.CalamityMod.SupremeBossText14"; //die 20 or more times Color messageColor = Color.Orange; @@ -281,7 +281,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas NetMessage.BroadcastChatMessage(NetworkText.FromKey(key), messageColor); } } - else if (Main.LocalPlayer.GetCalamityPlayer().sCalDeathCount > 4) + else if (Main.LocalPlayer.Calamity().sCalDeathCount > 4) { string key = "Mods.CalamityMod.SupremeBossText13"; //die 5 or more times Color messageColor = Color.Orange; @@ -375,7 +375,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas } // Set DR to be 99% and unbreakable if enraged. Boost DR during the 5th attack. - CalamityGlobalNPC global = npc.GetCalamityNPC(); + CalamityGlobalNPC global = npc.Calamity(); if(protectionBoost) { global.DR = enragedDR; @@ -427,7 +427,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas if (Main.netMode != NetmodeID.MultiplayerClient) { bulletHellCounter += 1; - if (bulletHellCounter > ((npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) ? 4 : 6)) + if (bulletHellCounter > ((npc.Calamity().enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) ? 4 : 6)) { bulletHellCounter = 0; int damage = expertMode ? 200 : 250; //800 500 @@ -525,7 +525,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas } } bulletHellCounter += 1; - if (bulletHellCounter > ((npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) ? 7 : 9)) + if (bulletHellCounter > ((npc.Calamity().enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) ? 7 : 9)) { bulletHellCounter = 0; if (bulletHellCounter2 < 1200) //blasts from below @@ -588,7 +588,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas Projectile.NewProjectile(player.position.X + (float)Main.rand.Next(-1000, 1000), player.position.Y - 1000f, 0f, 10f * uDieLul, mod.ProjectileType("BrimstoneFireblast"), damage, 0f, Main.myPlayer, 1f, 0f); } bulletHellCounter += 1; - if (bulletHellCounter > ((npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) ? 9 : 11)) + if (bulletHellCounter > ((npc.Calamity().enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) ? 9 : 11)) { bulletHellCounter = 0; if (bulletHellCounter2 < 2100) //blasts from above @@ -661,7 +661,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas passedVar += 1f; } bulletHellCounter += 1; - if (bulletHellCounter > ((npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) ? 13 : 15)) + if (bulletHellCounter > ((npc.Calamity().enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) ? 13 : 15)) { bulletHellCounter = 0; if (bulletHellCounter2 < 3000) //blasts from below @@ -738,7 +738,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas Projectile.NewProjectile(player.position.X + 1000f, player.position.Y + (float)Main.rand.Next(-500, 500), -10f * uDieLul, 0f, mod.ProjectileType("BrimstoneWave"), damage, 0f, Main.myPlayer, 0f, 0f); } bulletHellCounter += 1; - if (bulletHellCounter > ((npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) ? 16 : 18)) + if (bulletHellCounter > ((npc.Calamity().enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) ? 16 : 18)) { bulletHellCounter = 0; if (bulletHellCounter2 < 3900) //blasts from above @@ -2026,8 +2026,8 @@ namespace CalamityMod.NPCs.SupremeCalamitas DeathMessage(); // Incrase the player's SCal kill count - if (Main.player[npc.target].GetCalamityPlayer().sCalKillCount < 5) - Main.player[npc.target].GetCalamityPlayer().sCalKillCount++; + if (Main.player[npc.target].Calamity().sCalKillCount < 5) + Main.player[npc.target].Calamity().sCalKillCount++; // Materials int essenceMin = Main.expertMode ? 30 : 20; @@ -2076,9 +2076,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].GetCalamityPlayer().sCalKillCount == 0) + if (Main.player[npc.target].Calamity().sCalKillCount == 0) { - switch (Main.LocalPlayer.GetCalamityPlayer().sCalDeathCount) + switch (Main.LocalPlayer.Calamity().sCalDeathCount) { case 0: key = "Mods.CalamityMod.SupremeBossText16"; diff --git a/NPCs/SupremeCalamitas/SupremeCataclysm.cs b/NPCs/SupremeCalamitas/SupremeCataclysm.cs index 283111a684..dbe59559c4 100644 --- a/NPCs/SupremeCalamitas/SupremeCataclysm.cs +++ b/NPCs/SupremeCalamitas/SupremeCataclysm.cs @@ -27,7 +27,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas npc.width = 120; npc.height = 120; npc.defense = 100; - CalamityGlobalNPC global = npc.GetCalamityNPC(); + CalamityGlobalNPC global = npc.Calamity(); global.DR = CalamityWorld.bossRushActive ? 0.6f : CalamityWorld.death ? 0.75f : 0.7f; global.customDR = true; global.multDRReductions.Add(BuffID.Ichor, 0.9f); diff --git a/NPCs/SupremeCalamitas/SupremeCatastrophe.cs b/NPCs/SupremeCalamitas/SupremeCatastrophe.cs index 2fb6a6d5fd..351456d714 100644 --- a/NPCs/SupremeCalamitas/SupremeCatastrophe.cs +++ b/NPCs/SupremeCalamitas/SupremeCatastrophe.cs @@ -27,7 +27,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas npc.width = 120; npc.height = 120; npc.defense = 100; - CalamityGlobalNPC global = npc.GetCalamityNPC(); + CalamityGlobalNPC global = npc.Calamity(); global.DR = CalamityWorld.bossRushActive ? 0.6f : CalamityWorld.death ? 0.75f : 0.7f; global.customDR = true; global.multDRReductions.Add(BuffID.Ichor, 0.9f); diff --git a/NPCs/TheDevourerofGods/DevourerofGodsBody.cs b/NPCs/TheDevourerofGods/DevourerofGodsBody.cs index 5b22ce96c7..38c1224ff5 100644 --- a/NPCs/TheDevourerofGods/DevourerofGodsBody.cs +++ b/NPCs/TheDevourerofGods/DevourerofGodsBody.cs @@ -24,7 +24,7 @@ namespace CalamityMod.NPCs.TheDevourerofGods npc.width = 56; npc.height = 56; npc.defense = 70; - CalamityGlobalNPC global = npc.GetCalamityNPC(); + CalamityGlobalNPC global = npc.Calamity(); global.DR = CalamityWorld.death ? 0.95f : 0.925f; global.unbreakableDR = true; npc.lifeMax = CalamityWorld.revenge ? 750000 : 675000; diff --git a/NPCs/TheDevourerofGods/DevourerofGodsBody2.cs b/NPCs/TheDevourerofGods/DevourerofGodsBody2.cs index 359f53732a..90fca530dc 100644 --- a/NPCs/TheDevourerofGods/DevourerofGodsBody2.cs +++ b/NPCs/TheDevourerofGods/DevourerofGodsBody2.cs @@ -22,7 +22,7 @@ namespace CalamityMod.NPCs.TheDevourerofGods npc.width = 34; npc.height = 34; npc.defense = 60; - CalamityGlobalNPC global = npc.GetCalamityNPC(); + CalamityGlobalNPC global = npc.Calamity(); global.DR = 0.5f; global.unbreakableDR = true; npc.lifeMax = 100000; diff --git a/NPCs/TheDevourerofGods/DevourerofGodsBodyS.cs b/NPCs/TheDevourerofGods/DevourerofGodsBodyS.cs index 39d65822b8..c1523e9de2 100644 --- a/NPCs/TheDevourerofGods/DevourerofGodsBodyS.cs +++ b/NPCs/TheDevourerofGods/DevourerofGodsBodyS.cs @@ -25,7 +25,7 @@ namespace CalamityMod.NPCs.TheDevourerofGods npc.width = 70; npc.height = 70; npc.defense = 70; - CalamityGlobalNPC global = npc.GetCalamityNPC(); + CalamityGlobalNPC global = npc.Calamity(); global.DR = CalamityWorld.death ? 0.97f : 0.955f; global.unbreakableDR = true; npc.lifeMax = CalamityWorld.revenge ? 1350000 : 1150000; diff --git a/NPCs/TheDevourerofGods/DevourerofGodsHeadS.cs b/NPCs/TheDevourerofGods/DevourerofGodsHeadS.cs index e7e1c95e27..5751abf8ec 100644 --- a/NPCs/TheDevourerofGods/DevourerofGodsHeadS.cs +++ b/NPCs/TheDevourerofGods/DevourerofGodsHeadS.cs @@ -110,7 +110,7 @@ namespace CalamityMod.NPCs.TheDevourerofGods public override void AI() { - CalamityGlobalNPC calamityGlobalNPC = npc.GetGlobalNPC(mod); + CalamityGlobalNPC calamityGlobalNPC = npc.Calamity(); // whoAmI variable CalamityGlobalNPC.DoGHead = npc.whoAmI; diff --git a/NPCs/Yharon/Yharon.cs b/NPCs/Yharon/Yharon.cs index c91b8d7b22..d7bdddb3dd 100644 --- a/NPCs/Yharon/Yharon.cs +++ b/NPCs/Yharon/Yharon.cs @@ -74,7 +74,7 @@ namespace CalamityMod.NPCs.Yharon npc.buffImmune[mod.BuffType("DemonFlames")] = false; npc.buffImmune[mod.BuffType("Shred")] = false; - CalamityGlobalNPC global = npc.GetCalamityNPC(); + CalamityGlobalNPC global = npc.Calamity(); global.DR = Phase1_DR; global.customDR = true; global.flatDRReductions.Add(BuffID.Ichor, 0.05f); @@ -228,7 +228,7 @@ namespace CalamityMod.NPCs.Yharon int aiChangeRate = expertMode ? 36 : 38; float npcVelocity = expertMode ? 0.7f : 0.69f; float scaleFactor = expertMode ? 11f : 10.8f; - if (phase4Change || npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) + if (phase4Change || npc.Calamity().enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) { npcVelocity = 0.95f; scaleFactor = 14f; @@ -255,7 +255,7 @@ namespace CalamityMod.NPCs.Yharon int chargeTime2 = expertMode ? 34 : 36; float chargeSpeed = expertMode ? 22f : 20.5f; float chargeSpeed2 = expertMode ? 37f : 34f; - if (phase4Change || npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) + if (phase4Change || npc.Calamity().enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) { chargeTime = 28; chargeSpeed = 31f; @@ -354,7 +354,7 @@ namespace CalamityMod.NPCs.Yharon } // Set DR based on protection boost (aka enrage) - npc.GetCalamityNPC().DR = protectionBoost ? EnragedDR : Phase1_DR; + npc.Calamity().DR = protectionBoost ? EnragedDR : Phase1_DR; // Trigger spawn effects if (npc.localAI[0] == 0f) @@ -1899,7 +1899,7 @@ namespace CalamityMod.NPCs.Yharon } // Set DR based on protection boost (aka enrage) - npc.GetCalamityNPC().DR = protectionBoost ? EnragedDR : Phase2_DR; + npc.Calamity().DR = protectionBoost ? EnragedDR : Phase2_DR; int num = -1; float num2 = 1f; @@ -1936,7 +1936,7 @@ namespace CalamityMod.NPCs.Yharon scaleFactor4 = 16.5f; scaleFactor5 = 39f; } - if (npc.GetGlobalNPC(mod).enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) + if (npc.Calamity().enraged || (Config.BossRushXerocCurse && CalamityWorld.bossRushActive)) { num6 = 0.65f; scaleFactor = 11f; diff --git a/Projectiles/Amidias/HermitCrab.cs b/Projectiles/Amidias/HermitCrab.cs index 8d8c117bcb..113474c25b 100644 --- a/Projectiles/Amidias/HermitCrab.cs +++ b/Projectiles/Amidias/HermitCrab.cs @@ -45,8 +45,8 @@ namespace CalamityMod.Projectiles.Amidias { if (spawnDust) { - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue = projectile.damage; + projectile.Calamity().spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; + projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage; int num501 = 20; for (int num502 = 0; num502 < num501; num502++) { @@ -56,16 +56,16 @@ namespace CalamityMod.Projectiles.Amidias } spawnDust = false; } - if (Main.player[projectile.owner].minionDamage != projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) + if (Main.player[projectile.owner].minionDamage != projectile.Calamity().spawnedPlayerMinionDamageValue) { - int damage2 = (int)(((float)projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue / - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) * + int damage2 = (int)(((float)projectile.Calamity().spawnedPlayerMinionProjectileDamageValue / + projectile.Calamity().spawnedPlayerMinionDamageValue) * Main.player[projectile.owner].minionDamage); projectile.damage = damage2; } bool flag64 = projectile.type == mod.ProjectileType("HermitCrab"); Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); player.AddBuff(mod.BuffType("HermitCrab"), 3600); if (flag64) { diff --git a/Projectiles/Amidias/SandDollarProj.cs b/Projectiles/Amidias/SandDollarProj.cs index 9dee76e74a..224adeef34 100644 --- a/Projectiles/Amidias/SandDollarProj.cs +++ b/Projectiles/Amidias/SandDollarProj.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Projectiles.Amidias { projectile.width = 30; projectile.height = 28; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; projectile.friendly = true; projectile.penetrate = -1; projectile.aiStyle = 3; diff --git a/Projectiles/Amidias/SnapClamProj.cs b/Projectiles/Amidias/SnapClamProj.cs index d03f0fb61e..48abfc5f6f 100644 --- a/Projectiles/Amidias/SnapClamProj.cs +++ b/Projectiles/Amidias/SnapClamProj.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Projectiles.Amidias projectile.width = 20; projectile.height = 13; projectile.friendly = true; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; projectile.ignoreWater = true; projectile.penetrate = -1; } diff --git a/Projectiles/Amidias/UrchinBall.cs b/Projectiles/Amidias/UrchinBall.cs index 43bff34ff2..630372ae26 100644 --- a/Projectiles/Amidias/UrchinBall.cs +++ b/Projectiles/Amidias/UrchinBall.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Projectiles.Amidias projectile.alpha = 255; projectile.usesLocalNPCImmunity = true; projectile.localNPCHitCooldown = 3; - projectile.GetGlobalProjectile(mod).trueMelee = true; + projectile.Calamity().trueMelee = true; } public override void AI() diff --git a/Projectiles/Astral/HeavenfallenEnergy.cs b/Projectiles/Astral/HeavenfallenEnergy.cs index 67efba475b..10c887b0dd 100644 --- a/Projectiles/Astral/HeavenfallenEnergy.cs +++ b/Projectiles/Astral/HeavenfallenEnergy.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Projectiles.Astral projectile.ignoreWater = true; projectile.penetrate = 1; projectile.timeLeft = 300; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/Astral/HeavenfallenStardisk.cs b/Projectiles/Astral/HeavenfallenStardisk.cs index ac59215813..d77b2c8a87 100644 --- a/Projectiles/Astral/HeavenfallenStardisk.cs +++ b/Projectiles/Astral/HeavenfallenStardisk.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Projectiles.Astral projectile.netImportant = true; projectile.penetrate = 1; projectile.timeLeft = 600; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/Astral/Hive.cs b/Projectiles/Astral/Hive.cs index f694bff44b..6661295f91 100644 --- a/Projectiles/Astral/Hive.cs +++ b/Projectiles/Astral/Hive.cs @@ -28,14 +28,14 @@ namespace CalamityMod.Projectiles.Astral { if (projectile.localAI[0] == 0f) { - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue = projectile.damage; + projectile.Calamity().spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; + projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage; projectile.localAI[0] += 1f; } - if (Main.player[projectile.owner].minionDamage != projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) + if (Main.player[projectile.owner].minionDamage != projectile.Calamity().spawnedPlayerMinionDamageValue) { - int damage2 = (int)(((float)projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue / - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) * + int damage2 = (int)(((float)projectile.Calamity().spawnedPlayerMinionProjectileDamageValue / + projectile.Calamity().spawnedPlayerMinionDamageValue) * Main.player[projectile.owner].minionDamage); projectile.damage = damage2; } diff --git a/Projectiles/Astral/Quasar.cs b/Projectiles/Astral/Quasar.cs index 49756d9861..f4f0e70e01 100644 --- a/Projectiles/Astral/Quasar.cs +++ b/Projectiles/Astral/Quasar.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Projectiles.Astral projectile.friendly = true; projectile.penetrate = 4; projectile.timeLeft = 300; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/Astral/Quasar2.cs b/Projectiles/Astral/Quasar2.cs index 5b842be32d..5ed0e94a6b 100644 --- a/Projectiles/Astral/Quasar2.cs +++ b/Projectiles/Astral/Quasar2.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Projectiles.Astral projectile.friendly = true; projectile.penetrate = 1; projectile.timeLeft = 300; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/Astral/RadiantExplosion.cs b/Projectiles/Astral/RadiantExplosion.cs index 7afaa6a00f..418d36181b 100644 --- a/Projectiles/Astral/RadiantExplosion.cs +++ b/Projectiles/Astral/RadiantExplosion.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Projectiles.Astral projectile.tileCollide = false; projectile.penetrate = -1; projectile.timeLeft = 10; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/Astral/RadiantStar.cs b/Projectiles/Astral/RadiantStar.cs index 2a8a359b5b..1b425783ff 100644 --- a/Projectiles/Astral/RadiantStar.cs +++ b/Projectiles/Astral/RadiantStar.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Projectiles.Astral projectile.friendly = true; projectile.penetrate = 4; projectile.timeLeft = 300; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/Astral/RadiantStar2.cs b/Projectiles/Astral/RadiantStar2.cs index 2924a1ca6f..417c9ce635 100644 --- a/Projectiles/Astral/RadiantStar2.cs +++ b/Projectiles/Astral/RadiantStar2.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Projectiles.Astral projectile.friendly = true; projectile.penetrate = 1; projectile.timeLeft = 300; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/Astral/StellarKnife.cs b/Projectiles/Astral/StellarKnife.cs index 8c058c010f..bae92f4553 100644 --- a/Projectiles/Astral/StellarKnife.cs +++ b/Projectiles/Astral/StellarKnife.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Projectiles.Astral projectile.friendly = true; projectile.penetrate = 1; projectile.timeLeft = 600; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 8daddf8131..9ab4255258 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -343,7 +343,7 @@ namespace CalamityMod.Projectiles // Fire laser through walls at max length if target cannot be seen if (!Collision.CanHitLine(Main.npc[(int)projectile.ai[1]].Center, 1, 1, Main.player[Main.npc[(int)projectile.ai[1]].target].Center, 1, 1) && - Main.npc[(int)projectile.ai[1]].GetGlobalNPC(mod).newAI[0] == 1f) + Main.npc[(int)projectile.ai[1]].Calamity().newAI[0] == 1f) { num807 = 2400f; } @@ -526,7 +526,7 @@ namespace CalamityMod.Projectiles else if (projectile.type == ProjectileID.SoulDrain) projectile.magic = true; - if (Main.player[projectile.owner].GetCalamityPlayer().eQuiver && projectile.ranged && + if (Main.player[projectile.owner].Calamity().eQuiver && projectile.ranged && projectile.friendly && CalamityMod.rangedProjectileExceptionList.TrueForAll(x => projectile.type != x)) { if (Main.rand.Next(200) > 198) @@ -547,7 +547,7 @@ namespace CalamityMod.Projectiles } } - if (Main.player[projectile.owner].GetCalamityPlayer().fungalSymbiote && trueMelee) + if (Main.player[projectile.owner].Calamity().fungalSymbiote && trueMelee) { counter++; if (counter >= 6) @@ -581,7 +581,7 @@ namespace CalamityMod.Projectiles } } - if (Main.player[projectile.owner].GetCalamityPlayer().nanotech && rogue && projectile.friendly) + if (Main.player[projectile.owner].Calamity().nanotech && rogue && projectile.friendly) { counter++; if (counter >= 30) @@ -595,7 +595,7 @@ namespace CalamityMod.Projectiles } } - if (Main.player[projectile.owner].GetCalamityPlayer().daedalusSplit && rogue && projectile.friendly) + if (Main.player[projectile.owner].Calamity().daedalusSplit && rogue && projectile.friendly) { counter2++; if (counter2 >= 30) @@ -619,14 +619,14 @@ namespace CalamityMod.Projectiles } } - if (Main.player[projectile.owner].GetCalamityPlayer().theBeeDamage > 0 && projectile.owner == Main.myPlayer && projectile.friendly && projectile.damage > 0 && + if (Main.player[projectile.owner].Calamity().theBeeDamage > 0 && projectile.owner == Main.myPlayer && projectile.friendly && projectile.damage > 0 && (projectile.melee || projectile.ranged || projectile.magic || rogue)) { int dust = Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 91, projectile.oldVelocity.X * 0.5f, projectile.oldVelocity.Y * 0.5f, 0, default, 0.5f); Main.dust[dust].noGravity = true; } - if (Main.player[projectile.owner].GetCalamityPlayer().providenceLore && projectile.owner == Main.myPlayer && projectile.friendly && projectile.damage > 0 && + if (Main.player[projectile.owner].Calamity().providenceLore && projectile.owner == Main.myPlayer && projectile.friendly && projectile.damage > 0 && (projectile.melee || projectile.ranged || projectile.magic || rogue)) { int dust = Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 244, projectile.oldVelocity.X * 0.5f, projectile.oldVelocity.Y * 0.5f, 0, default, 0.5f); @@ -635,7 +635,7 @@ namespace CalamityMod.Projectiles if (rogue) { - if (Main.player[projectile.owner].GetCalamityPlayer().moonCrown) + if (Main.player[projectile.owner].Calamity().moonCrown) { //Summon moon sigils infrequently if (Main.rand.NextBool(300)) @@ -704,7 +704,7 @@ namespace CalamityMod.Projectiles Main.player[Main.myPlayer].lifeSteal -= num; } - if (Main.player[projectile.owner].GetCalamityPlayer().alchFlask && + if (Main.player[projectile.owner].Calamity().alchFlask && (projectile.magic || rogue || projectile.melee || projectile.minion || projectile.ranged || projectile.sentry || CalamityMod.projectileMinionList.Contains(projectile.type)) && Main.player[projectile.owner].ownedProjectileCounts[mod.ProjectileType("PlagueSeeker")] < 6) { @@ -717,7 +717,7 @@ namespace CalamityMod.Projectiles Main.projectile[plague].melee = false; } - if (Main.player[projectile.owner].GetCalamityPlayer().reaverBlast && projectile.melee) + if (Main.player[projectile.owner].Calamity().reaverBlast && projectile.melee) { int newDamage = (int)((double)projectile.damage * 0.2); if (newDamage > 30) @@ -727,7 +727,7 @@ namespace CalamityMod.Projectiles Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, mod.ProjectileType("ReaverBlast"), newDamage, 0f, projectile.owner, 0f, 0f); } - if (Main.player[projectile.owner].GetCalamityPlayer().auricSet && target.canGhostHeal) + if (Main.player[projectile.owner].Calamity().auricSet && target.canGhostHeal) { float num11 = 0.05f; num11 -= (float)projectile.numHits * 0.025f; @@ -761,7 +761,7 @@ namespace CalamityMod.Projectiles } Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, mod.ProjectileType("AuricOrb"), 0, 0f, projectile.owner, (float)num14, num12); } - else if (Main.player[projectile.owner].GetCalamityPlayer().silvaSet && target.canGhostHeal) + else if (Main.player[projectile.owner].Calamity().silvaSet && target.canGhostHeal) { float num11 = 0.03f; num11 -= (float)projectile.numHits * 0.015f; @@ -798,7 +798,7 @@ namespace CalamityMod.Projectiles if (projectile.magic) { - if (Main.player[projectile.owner].GetCalamityPlayer().silvaMage && projectile.penetrate == 1 && Main.rand.Next(0, 100) >= 97) + if (Main.player[projectile.owner].Calamity().silvaMage && projectile.penetrate == 1 && Main.rand.Next(0, 100) >= 97) { Main.PlaySound(29, (int)projectile.position.X, (int)projectile.position.Y, 103); projectile.position = projectile.Center; @@ -818,15 +818,15 @@ namespace CalamityMod.Projectiles Main.dust[num195].velocity *= 2f; Main.dust[num195].noGravity = true; } - projectile.damage *= (Main.player[projectile.owner].GetCalamityPlayer().auricSet ? 7 : 4); + projectile.damage *= (Main.player[projectile.owner].Calamity().auricSet ? 7 : 4); projectile.Damage(); } - if (Main.player[projectile.owner].GetCalamityPlayer().tarraMage && target.canGhostHeal) + if (Main.player[projectile.owner].Calamity().tarraMage && target.canGhostHeal) { - if (Main.player[projectile.owner].GetCalamityPlayer().tarraMageHealCooldown <= 0) + if (Main.player[projectile.owner].Calamity().tarraMageHealCooldown <= 0) { - Main.player[projectile.owner].GetCalamityPlayer().tarraMageHealCooldown = 90; + Main.player[projectile.owner].Calamity().tarraMageHealCooldown = 90; float num11 = 0.03f; num11 -= (float)projectile.numHits * 0.015f; if (num11 <= 0f) @@ -843,7 +843,7 @@ namespace CalamityMod.Projectiles return; } Main.player[Main.myPlayer].lifeSteal -= num12 * 1.5f; - int healAmount = (Main.player[projectile.owner].GetCalamityPlayer().auricSet ? projectile.damage / 100 : projectile.damage / 50); + int healAmount = (Main.player[projectile.owner].Calamity().auricSet ? projectile.damage / 100 : projectile.damage / 50); Player player = Main.player[projectile.owner]; player.statLife += healAmount; player.HealEffect(healAmount); @@ -854,7 +854,7 @@ namespace CalamityMod.Projectiles } } - if (Main.player[projectile.owner].GetCalamityPlayer().reaverBurst) + if (Main.player[projectile.owner].Calamity().reaverBurst) { int num251 = Main.rand.Next(2, 5); for (int num252 = 0; num252 < num251; num252++) @@ -876,10 +876,10 @@ namespace CalamityMod.Projectiles Main.projectile[proj].localNPCHitCooldown = 30; } } - else if (Main.player[projectile.owner].GetCalamityPlayer().ataxiaMage && Main.player[projectile.owner].GetCalamityPlayer().ataxiaDmg <= 0) + else if (Main.player[projectile.owner].Calamity().ataxiaMage && Main.player[projectile.owner].Calamity().ataxiaDmg <= 0) { int num = projectile.damage / 2; - Main.player[projectile.owner].GetCalamityPlayer().ataxiaDmg += (float)num; + Main.player[projectile.owner].Calamity().ataxiaDmg += (float)num; int[] array = new int[200]; int num3 = 0; int num4 = 0; @@ -959,10 +959,10 @@ namespace CalamityMod.Projectiles Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, mod.ProjectileType("AtaxiaHealOrb"), 0, 0f, projectile.owner, (float)num14, num12); } } - else if (Main.player[projectile.owner].GetCalamityPlayer().xerocSet && Main.player[projectile.owner].GetCalamityPlayer().xerocDmg <= 0) + else if (Main.player[projectile.owner].Calamity().xerocSet && Main.player[projectile.owner].Calamity().xerocDmg <= 0) { int num = projectile.damage / 2; - Main.player[projectile.owner].GetCalamityPlayer().xerocDmg += (float)num; + Main.player[projectile.owner].Calamity().xerocDmg += (float)num; int[] array = new int[200]; int num3 = 0; int num4 = 0; @@ -1042,10 +1042,10 @@ namespace CalamityMod.Projectiles Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, mod.ProjectileType("XerocHealOrb"), 0, 0f, projectile.owner, (float)num14, num12); } } - else if (Main.player[projectile.owner].GetCalamityPlayer().godSlayerMage && Main.player[projectile.owner].GetCalamityPlayer().godSlayerDmg <= 0) + else if (Main.player[projectile.owner].Calamity().godSlayerMage && Main.player[projectile.owner].Calamity().godSlayerDmg <= 0) { int num = projectile.damage / 2; - Main.player[projectile.owner].GetCalamityPlayer().godSlayerDmg += (float)num; + Main.player[projectile.owner].Calamity().godSlayerDmg += (float)num; int[] array = new int[200]; int num3 = 0; int num4 = 0; @@ -1090,10 +1090,10 @@ namespace CalamityMod.Projectiles num8 *= num10; num9 *= num10; Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, num8, num9, mod.ProjectileType("GodSlayerOrb"), - (int)((double)num * (Main.player[projectile.owner].GetCalamityPlayer().auricSet ? 2.0 : 1.5)), 0f, projectile.owner, (float)num6, 0f); + (int)((double)num * (Main.player[projectile.owner].Calamity().auricSet ? 2.0 : 1.5)), 0f, projectile.owner, (float)num6, 0f); if (target.canGhostHeal) { - float num11 = (Main.player[projectile.owner].GetCalamityPlayer().auricSet ? 0.03f : 0.06f); //0.2 + float num11 = (Main.player[projectile.owner].Calamity().auricSet ? 0.03f : 0.06f); //0.2 num11 -= (float)projectile.numHits * 0.015f; //0.05 if (num11 <= 0f) { @@ -1129,7 +1129,7 @@ namespace CalamityMod.Projectiles } else if (projectile.melee) { - if (Main.player[projectile.owner].GetCalamityPlayer().ataxiaGeyser && Main.player[projectile.owner].ownedProjectileCounts[mod.ProjectileType("ChaosGeyser")] < 3) + if (Main.player[projectile.owner].Calamity().ataxiaGeyser && Main.player[projectile.owner].ownedProjectileCounts[mod.ProjectileType("ChaosGeyser")] < 3) { int newDamage = (int)((double)projectile.damage * 0.15); if (newDamage > 35) @@ -1138,7 +1138,7 @@ namespace CalamityMod.Projectiles } Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, mod.ProjectileType("ChaosGeyser"), newDamage, 0f, projectile.owner, 0f, 0f); } - else if (Main.player[projectile.owner].GetCalamityPlayer().xerocSet && Main.player[projectile.owner].ownedProjectileCounts[mod.ProjectileType("XerocBlast")] < 3) + else if (Main.player[projectile.owner].Calamity().xerocSet && Main.player[projectile.owner].ownedProjectileCounts[mod.ProjectileType("XerocBlast")] < 3) { int newDamage = (int)((double)projectile.damage * 0.2); if (newDamage > 40) @@ -1150,7 +1150,7 @@ namespace CalamityMod.Projectiles } else if (projectile.ranged) { - if (Main.player[projectile.owner].GetCalamityPlayer().xerocSet && Main.player[projectile.owner].ownedProjectileCounts[mod.ProjectileType("XerocFire")] < 3) + if (Main.player[projectile.owner].Calamity().xerocSet && Main.player[projectile.owner].ownedProjectileCounts[mod.ProjectileType("XerocFire")] < 3) { int newDamage = (int)((double)projectile.damage * 0.15); if (newDamage > 40) @@ -1162,10 +1162,10 @@ namespace CalamityMod.Projectiles } else if (rogue) { - if (Main.player[projectile.owner].GetCalamityPlayer().xerocSet && Main.player[projectile.owner].GetCalamityPlayer().xerocDmg <= 0) + if (Main.player[projectile.owner].Calamity().xerocSet && Main.player[projectile.owner].Calamity().xerocDmg <= 0) { int num = projectile.damage / 2; - Main.player[projectile.owner].GetCalamityPlayer().xerocDmg += (float)num; + Main.player[projectile.owner].Calamity().xerocDmg += (float)num; int[] array = new int[200]; int num3 = 0; int num4 = 0; @@ -1212,7 +1212,7 @@ namespace CalamityMod.Projectiles Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, num8, num9, mod.ProjectileType("XerocStar"), (int)((double)num * 1.6), 0f, projectile.owner, (float)num6, 0f); } - if (Main.player[projectile.owner].GetCalamityPlayer().featherCrown && stealthStrike) + if (Main.player[projectile.owner].Calamity().featherCrown && stealthStrike) { for (int i = 0; i < 10; i++) { @@ -1221,11 +1221,11 @@ namespace CalamityMod.Projectiles float speedY = (target.position.Y - pos.Y) * 8; int feather = Projectile.NewProjectile(pos.X, pos.Y, speedX, speedY, mod.ProjectileType("StickyFeather"), 15, 3, projectile.owner, 0f, (float)Main.rand.Next(15)); Main.projectile[feather].magic = false; - Main.projectile[feather].GetGlobalProjectile(mod).rogue = true; + Main.projectile[feather].Calamity().rogue = true; } } - if (Main.player[projectile.owner].GetCalamityPlayer().moonCrown && stealthStrike) + if (Main.player[projectile.owner].Calamity().moonCrown && stealthStrike) { for (int i = 0; i < 20; i++) { @@ -1233,32 +1233,32 @@ namespace CalamityMod.Projectiles Vector2 velocity = (target.position - pos) / 10f; int flare = Projectile.NewProjectile(pos, velocity, ProjectileID.LunarFlare, 50, 3, projectile.owner); Main.projectile[flare].magic = false; - Main.projectile[flare].GetGlobalProjectile(mod).rogue = true; + Main.projectile[flare].Calamity().rogue = true; } } } else if (projectile.minion || projectile.sentry || CalamityMod.projectileMinionList.Contains(projectile.type)) { - if (Main.player[projectile.owner].GetCalamityPlayer().pArtifact) + if (Main.player[projectile.owner].Calamity().pArtifact) { target.AddBuff(mod.BuffType("HolyLight"), 300); } - if (Main.player[projectile.owner].GetCalamityPlayer().tearMinions) + if (Main.player[projectile.owner].Calamity().tearMinions) { target.AddBuff(mod.BuffType("TemporalSadness"), 60); } - if (Main.player[projectile.owner].GetCalamityPlayer().shadowMinions) + if (Main.player[projectile.owner].Calamity().shadowMinions) { target.AddBuff(BuffID.ShadowFlame, 300); } - if (Main.player[projectile.owner].GetCalamityPlayer().godSlayerSummon && Main.player[projectile.owner].GetCalamityPlayer().godSlayerDmg <= 0) + if (Main.player[projectile.owner].Calamity().godSlayerSummon && Main.player[projectile.owner].Calamity().godSlayerDmg <= 0) { int num = projectile.damage / 2; float ai1 = (Main.rand.NextFloat() + 0.5f); - Main.player[projectile.owner].GetCalamityPlayer().godSlayerDmg += (float)num; + Main.player[projectile.owner].Calamity().godSlayerDmg += (float)num; int[] array = new int[200]; int num3 = 0; int num4 = 0; @@ -1304,10 +1304,10 @@ namespace CalamityMod.Projectiles num9 *= num10; Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, num8, num9, mod.ProjectileType("GodSlayerPhantom"), (int)((double)num * 2.0), 0f, projectile.owner, 0f, ai1); } - else if (Main.player[projectile.owner].GetCalamityPlayer().xerocSet && Main.player[projectile.owner].GetCalamityPlayer().xerocDmg <= 0) + else if (Main.player[projectile.owner].Calamity().xerocSet && Main.player[projectile.owner].Calamity().xerocDmg <= 0) { int num = projectile.damage / 2; - Main.player[projectile.owner].GetCalamityPlayer().xerocDmg += (float)num; + Main.player[projectile.owner].Calamity().xerocDmg += (float)num; int[] array = new int[200]; int num3 = 0; int num4 = 0; @@ -1383,7 +1383,7 @@ namespace CalamityMod.Projectiles #region Drawing public override Color? GetAlpha(Projectile projectile, Color lightColor) { - if (Main.player[Main.myPlayer].GetCalamityPlayer().trippy) + if (Main.player[Main.myPlayer].Calamity().trippy) return new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB, projectile.alpha); if (projectile.type == ProjectileID.PinkLaser) @@ -1399,7 +1399,7 @@ namespace CalamityMod.Projectiles public override bool PreDraw(Projectile projectile, SpriteBatch spriteBatch, Color lightColor) { - if (Main.player[Main.myPlayer].GetCalamityPlayer().trippy) + if (Main.player[Main.myPlayer].Calamity().trippy) { Texture2D texture = Main.projectileTexture[projectile.type]; SpriteEffects spriteEffects = SpriteEffects.None; @@ -1509,7 +1509,7 @@ namespace CalamityMod.Projectiles { if (projectile.owner == Main.myPlayer) { - if (Main.player[projectile.owner].GetCalamityPlayer().providenceLore && projectile.friendly && projectile.damage > 0 && (projectile.melee || projectile.ranged || projectile.magic || rogue)) + if (Main.player[projectile.owner].Calamity().providenceLore && projectile.friendly && projectile.damage > 0 && (projectile.melee || projectile.ranged || projectile.magic || rogue)) { Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 20); for (int i = 0; i < 3; i++) @@ -1521,7 +1521,7 @@ namespace CalamityMod.Projectiles if (projectile.ranged) { - if (Main.player[projectile.owner].GetCalamityPlayer().tarraRanged && Main.rand.Next(0, 100) >= 88) + if (Main.player[projectile.owner].Calamity().tarraRanged && Main.rand.Next(0, 100) >= 88) { int num251 = Main.rand.Next(2, 4); for (int num252 = 0; num252 < num251; num252++) diff --git a/Projectiles/Healing/FungalHeal.cs b/Projectiles/Healing/FungalHeal.cs index 8840096152..921178dd34 100644 --- a/Projectiles/Healing/FungalHeal.cs +++ b/Projectiles/Healing/FungalHeal.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Projectiles.Healing !player.inventory[player.selectedItem].melee && !player.inventory[player.selectedItem].ranged && !player.inventory[player.selectedItem].magic && - !player.inventory[player.selectedItem].GetGlobalItem(mod).rogue) || + !player.inventory[player.selectedItem].Calamity().rogue) || player.inventory[player.selectedItem].hammer > 0 || player.inventory[player.selectedItem].pick > 0 || player.inventory[player.selectedItem].axe > 0) diff --git a/Projectiles/Magic/AetherBeam.cs b/Projectiles/Magic/AetherBeam.cs index 257ddb1f00..d0a545fa6b 100644 --- a/Projectiles/Magic/AetherBeam.cs +++ b/Projectiles/Magic/AetherBeam.cs @@ -41,7 +41,7 @@ namespace CalamityMod.Projectiles.Magic projectile.tileCollide = false; projectile.ai[1] = 0f; } - projectile.damage += projectile.GetGlobalProjectile(mod).defDamage / 200; + projectile.damage += projectile.Calamity().defDamage / 200; if (projectile.alpha > 0) { projectile.alpha -= 25; diff --git a/Projectiles/Magic/HolyLaser.cs b/Projectiles/Magic/HolyLaser.cs index 30096f88ee..79f95a631b 100644 --- a/Projectiles/Magic/HolyLaser.cs +++ b/Projectiles/Magic/HolyLaser.cs @@ -53,7 +53,7 @@ namespace CalamityMod.Projectiles.Magic if (projectile.owner == Main.myPlayer) { int proj = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, mod.ProjectileType("FuckYou"), projectile.damage, projectile.knockBack, projectile.owner, 0f, 0.85f + Main.rand.NextFloat() * 1.15f); - Main.projectile[proj].GetGlobalProjectile(mod).forceMagic = true; + Main.projectile[proj].Calamity().forceMagic = true; } } } diff --git a/Projectiles/Magic/SolarBeam2.cs b/Projectiles/Magic/SolarBeam2.cs index 8330a37750..3c2bd6f6ac 100644 --- a/Projectiles/Magic/SolarBeam2.cs +++ b/Projectiles/Magic/SolarBeam2.cs @@ -68,7 +68,7 @@ namespace CalamityMod.Projectiles.Magic if (projectile.owner == Main.myPlayer) { int proj = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, mod.ProjectileType("FuckYou"), projectile.damage, projectile.knockBack, projectile.owner, 0f, 0.85f + Main.rand.NextFloat() * 1.15f); - Main.projectile[proj].GetGlobalProjectile(mod).forceMagic = true; + Main.projectile[proj].Calamity().forceMagic = true; } } } diff --git a/Projectiles/Melee/CosmicDischarge.cs b/Projectiles/Melee/CosmicDischarge.cs index f45bad78ba..4ec6f7b729 100644 --- a/Projectiles/Melee/CosmicDischarge.cs +++ b/Projectiles/Melee/CosmicDischarge.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Projectiles.Melee projectile.ignoreWater = true; projectile.usesLocalNPCImmunity = true; projectile.localNPCHitCooldown = 4; - projectile.GetGlobalProjectile(mod).trueMelee = true; + projectile.Calamity().trueMelee = true; } public override void AI() diff --git a/Projectiles/Melee/Cyclone.cs b/Projectiles/Melee/Cyclone.cs index ad9fea509c..eee47471c6 100644 --- a/Projectiles/Melee/Cyclone.cs +++ b/Projectiles/Melee/Cyclone.cs @@ -113,7 +113,7 @@ namespace CalamityMod.Projectiles.Melee public override void Kill(int timeLeft) { Main.PlaySound(2, (int)projectile.Center.X,(int)projectile.Center.Y, 60, 0.6f); - + for (int i = 0; i <= 360; i += 3) { Vector2 dustspeed = new Vector2(3f, 3f).RotatedBy(MathHelper.ToRadians(i)); diff --git a/Projectiles/Melee/EradicatorMeleeProjectile.cs b/Projectiles/Melee/EradicatorMeleeProjectile.cs index 9302107bef..ec2822a842 100644 --- a/Projectiles/Melee/EradicatorMeleeProjectile.cs +++ b/Projectiles/Melee/EradicatorMeleeProjectile.cs @@ -80,7 +80,7 @@ namespace CalamityMod.Projectiles.Melee if (projectile.owner == Main.myPlayer) { int proj = Projectile.NewProjectile(value10.X, value10.Y, num438, num439, mod.ProjectileType("NebulaShot"), projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); - Main.projectile[proj].GetGlobalProjectile(mod).forceMelee = true; + Main.projectile[proj].Calamity().forceMelee = true; } } } diff --git a/Projectiles/Melee/FlameScytheProjectileMelee.cs b/Projectiles/Melee/FlameScytheProjectileMelee.cs index 8477665aa6..1652ec4856 100644 --- a/Projectiles/Melee/FlameScytheProjectileMelee.cs +++ b/Projectiles/Melee/FlameScytheProjectileMelee.cs @@ -50,7 +50,7 @@ namespace CalamityMod.Projectiles.Melee if (projectile.owner == Main.myPlayer) { int boom = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, mod.ProjectileType("FuckYou"), projectile.damage, projectile.knockBack, projectile.owner, 0f, 0.85f + Main.rand.NextFloat() * 1.15f); - Main.projectile[boom].GetGlobalProjectile(mod).forceMelee = true; + Main.projectile[boom].Calamity().forceMelee = true; } } } diff --git a/Projectiles/Melee/Galaxia.cs b/Projectiles/Melee/Galaxia.cs index 1654c58354..88db2df466 100644 --- a/Projectiles/Melee/Galaxia.cs +++ b/Projectiles/Melee/Galaxia.cs @@ -163,7 +163,7 @@ namespace CalamityMod.Projectiles.Melee target.AddBuff(mod.BuffType("Plague"), 1200); player.AddBuff(BuffID.Thorns, 600); int proj = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X, projectile.velocity.Y, 206, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); - Main.projectile[proj].GetGlobalProjectile(mod).forceMelee = true; + Main.projectile[proj].Calamity().forceMelee = true; } else if (snow) { @@ -176,20 +176,20 @@ namespace CalamityMod.Projectiles.Melee target.AddBuff(mod.BuffType("CrushDepth"), 1200); player.AddBuff(BuffID.Wet, 600); int proj = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X * 0.25f, projectile.velocity.Y * 0.25f, 405, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); - Main.projectile[proj].GetGlobalProjectile(mod).forceMelee = true; + Main.projectile[proj].Calamity().forceMelee = true; } else if (corrupt) { player.AddBuff(BuffID.Wrath, 600); int ball = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X, projectile.velocity.Y, 95, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); - Main.projectile[ball].GetGlobalProjectile(mod).forceMelee = true; + Main.projectile[ball].Calamity().forceMelee = true; Main.projectile[ball].penetrate = 1; } else if (crimson) { player.AddBuff(BuffID.Rage, 600); int ball = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X, projectile.velocity.Y, 280, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); - Main.projectile[ball].GetGlobalProjectile(mod).forceMelee = true; + Main.projectile[ball].Calamity().forceMelee = true; Main.projectile[ball].penetrate = 1; } else if (dungeon) @@ -197,7 +197,7 @@ namespace CalamityMod.Projectiles.Melee target.AddBuff(BuffID.Frostburn, 1200); player.AddBuff(BuffID.Dangersense, 600); int ball = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X, projectile.velocity.Y, 27, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); - Main.projectile[ball].GetGlobalProjectile(mod).forceMelee = true; + Main.projectile[ball].Calamity().forceMelee = true; Main.projectile[ball].penetrate = 1; } else if (desert) @@ -205,40 +205,40 @@ namespace CalamityMod.Projectiles.Melee target.AddBuff(mod.BuffType("HolyLight"), 1200); player.AddBuff(BuffID.Endurance, 600); int proj = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X, projectile.velocity.Y, 661, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); - Main.projectile[proj].GetGlobalProjectile(mod).forceMelee = true; + Main.projectile[proj].Calamity().forceMelee = true; } else if (glow) { target.AddBuff(mod.BuffType("TemporalSadness"), 1200); player.AddBuff(BuffID.Spelunker, 600); int proj = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X, projectile.velocity.Y, 131, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); - Main.projectile[proj].GetGlobalProjectile(mod).forceMelee = true; + Main.projectile[proj].Calamity().forceMelee = true; } else if (hell) { target.AddBuff(mod.BuffType("BrimstoneFlames"), 1200); player.AddBuff(BuffID.Inferno, 600); int proj = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X, projectile.velocity.Y, 15, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); - Main.projectile[proj].GetGlobalProjectile(mod).forceMelee = true; + Main.projectile[proj].Calamity().forceMelee = true; } else if (holy) { target.AddBuff(mod.BuffType("HolyLight"), 1200); player.AddBuff(BuffID.Heartreach, 600); int proj = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X, projectile.velocity.Y, 644, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); - Main.projectile[proj].GetGlobalProjectile(mod).forceMelee = true; + Main.projectile[proj].Calamity().forceMelee = true; } else if (nebula) { player.AddBuff(BuffID.MagicPower, 600); int proj = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X, projectile.velocity.Y, 634, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); - Main.projectile[proj].GetGlobalProjectile(mod).forceMelee = true; + Main.projectile[proj].Calamity().forceMelee = true; } else if (stardust) { player.AddBuff(BuffID.Summoning, 600); int ball = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X, projectile.velocity.Y, 614, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); - Main.projectile[ball].GetGlobalProjectile(mod).forceMelee = true; + Main.projectile[ball].Calamity().forceMelee = true; Main.projectile[ball].penetrate = 1; } else if (solar) @@ -250,7 +250,7 @@ namespace CalamityMod.Projectiles.Melee { player.AddBuff(BuffID.AmmoReservation, 600); int proj = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X, projectile.velocity.Y, 616, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); - Main.projectile[proj].GetGlobalProjectile(mod).forceMelee = true; + Main.projectile[proj].Calamity().forceMelee = true; } else { diff --git a/Projectiles/Melee/Galaxia2.cs b/Projectiles/Melee/Galaxia2.cs index 0c5e4fa64d..c0400e9a67 100644 --- a/Projectiles/Melee/Galaxia2.cs +++ b/Projectiles/Melee/Galaxia2.cs @@ -162,7 +162,7 @@ namespace CalamityMod.Projectiles.Melee target.AddBuff(mod.BuffType("Plague"), 1200); player.AddBuff(BuffID.Thorns, 600); int proj = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X, projectile.velocity.Y, 206, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); - Main.projectile[proj].GetGlobalProjectile(mod).forceMelee = true; + Main.projectile[proj].Calamity().forceMelee = true; } else if (snow) { @@ -175,20 +175,20 @@ namespace CalamityMod.Projectiles.Melee target.AddBuff(mod.BuffType("CrushDepth"), 1200); player.AddBuff(BuffID.Wet, 600); int proj = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X * 0.25f, projectile.velocity.Y * 0.25f, 405, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); - Main.projectile[proj].GetGlobalProjectile(mod).forceMelee = true; + Main.projectile[proj].Calamity().forceMelee = true; } else if (corrupt) { player.AddBuff(BuffID.Wrath, 600); int ball = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X, projectile.velocity.Y, 95, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); - Main.projectile[ball].GetGlobalProjectile(mod).forceMelee = true; + Main.projectile[ball].Calamity().forceMelee = true; Main.projectile[ball].penetrate = 1; } else if (crimson) { player.AddBuff(BuffID.Rage, 600); int ball = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X, projectile.velocity.Y, 280, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); - Main.projectile[ball].GetGlobalProjectile(mod).forceMelee = true; + Main.projectile[ball].Calamity().forceMelee = true; Main.projectile[ball].penetrate = 1; } else if (dungeon) @@ -196,7 +196,7 @@ namespace CalamityMod.Projectiles.Melee target.AddBuff(BuffID.Frostburn, 1200); player.AddBuff(BuffID.Dangersense, 600); int ball = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X, projectile.velocity.Y, 27, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); - Main.projectile[ball].GetGlobalProjectile(mod).forceMelee = true; + Main.projectile[ball].Calamity().forceMelee = true; Main.projectile[ball].penetrate = 1; } else if (desert) @@ -204,40 +204,40 @@ namespace CalamityMod.Projectiles.Melee target.AddBuff(mod.BuffType("HolyLight"), 1200); player.AddBuff(BuffID.Endurance, 600); int proj = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X, projectile.velocity.Y, 661, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); - Main.projectile[proj].GetGlobalProjectile(mod).forceMelee = true; + Main.projectile[proj].Calamity().forceMelee = true; } else if (glow) { target.AddBuff(mod.BuffType("TemporalSadness"), 1200); player.AddBuff(BuffID.Spelunker, 600); int proj = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X, projectile.velocity.Y, 131, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); - Main.projectile[proj].GetGlobalProjectile(mod).forceMelee = true; + Main.projectile[proj].Calamity().forceMelee = true; } else if (hell) { target.AddBuff(mod.BuffType("BrimstoneFlames"), 1200); player.AddBuff(BuffID.Inferno, 600); int proj = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X, projectile.velocity.Y, 15, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); - Main.projectile[proj].GetGlobalProjectile(mod).forceMelee = true; + Main.projectile[proj].Calamity().forceMelee = true; } else if (holy) { target.AddBuff(mod.BuffType("HolyLight"), 1200); player.AddBuff(BuffID.Heartreach, 600); int proj = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X, projectile.velocity.Y, 644, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); - Main.projectile[proj].GetGlobalProjectile(mod).forceMelee = true; + Main.projectile[proj].Calamity().forceMelee = true; } else if (nebula) { player.AddBuff(BuffID.MagicPower, 600); int proj = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X, projectile.velocity.Y, 634, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); - Main.projectile[proj].GetGlobalProjectile(mod).forceMelee = true; + Main.projectile[proj].Calamity().forceMelee = true; } else if (stardust) { player.AddBuff(BuffID.Summoning, 600); int ball = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X, projectile.velocity.Y, 614, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); - Main.projectile[ball].GetGlobalProjectile(mod).forceMelee = true; + Main.projectile[ball].Calamity().forceMelee = true; Main.projectile[ball].penetrate = 1; } else if (solar) @@ -249,7 +249,7 @@ namespace CalamityMod.Projectiles.Melee { player.AddBuff(BuffID.AmmoReservation, 600); int proj = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X, projectile.velocity.Y, 616, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); - Main.projectile[proj].GetGlobalProjectile(mod).forceMelee = true; + Main.projectile[proj].Calamity().forceMelee = true; } else { diff --git a/Projectiles/Melee/IceBombFriendly.cs b/Projectiles/Melee/IceBombFriendly.cs index a60653b4fb..c507d5fabc 100644 --- a/Projectiles/Melee/IceBombFriendly.cs +++ b/Projectiles/Melee/IceBombFriendly.cs @@ -46,9 +46,9 @@ namespace CalamityMod.Projectiles.Melee { offsetAngle = (startAngle + deltaAngle * ( i + i * i ) / 2f ) + 32f * i; int projectile1 = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, (float)( Math.Sin(offsetAngle) * 5f ), (float)( Math.Cos(offsetAngle) * 5f ), 349, 30, 2f, projectile.owner, 0f, 0f); - Main.projectile[projectile1].GetGlobalProjectile(mod).forceMelee = true; + Main.projectile[projectile1].Calamity().forceMelee = true; int projectile2 = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, (float)( -Math.Sin(offsetAngle) * 5f ), (float)( -Math.Cos(offsetAngle) * 5f ), 349, 30, 2f, projectile.owner, 0f, 0f); - Main.projectile[projectile2].GetGlobalProjectile(mod).forceMelee = true; + Main.projectile[projectile2].Calamity().forceMelee = true; } } for (int k = 0; k < 3; k++) diff --git a/Projectiles/Melee/Icebreaker.cs b/Projectiles/Melee/Icebreaker.cs index aba7682ceb..8737033f0a 100644 --- a/Projectiles/Melee/Icebreaker.cs +++ b/Projectiles/Melee/Icebreaker.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Projectiles.Melee projectile.width = 30; projectile.height = 30; projectile.friendly = true; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; projectile.penetrate = -1; projectile.aiStyle = 3; projectile.timeLeft = 120; diff --git a/Projectiles/Melee/LaserFountain.cs b/Projectiles/Melee/LaserFountain.cs index 38d8eef270..f520cea869 100644 --- a/Projectiles/Melee/LaserFountain.cs +++ b/Projectiles/Melee/LaserFountain.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Projectiles.Melee if (projectile.owner == Main.myPlayer) { int projectile1 = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, SpeedX, SpeedY, mod.ProjectileType("NebulaShot"), (int)(350f * Main.player[projectile.owner].meleeDamage), projectile.knockBack, projectile.owner, 0f, 0f); - Main.projectile[projectile1].GetGlobalProjectile(mod).forceMelee = true; + Main.projectile[projectile1].Calamity().forceMelee = true; Main.projectile[projectile1].aiStyle = 1; } projectile.localAI[0] = 0f; diff --git a/Projectiles/Melee/Mourningstar.cs b/Projectiles/Melee/Mourningstar.cs index 1b0ce6e37b..20ee67ea35 100644 --- a/Projectiles/Melee/Mourningstar.cs +++ b/Projectiles/Melee/Mourningstar.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Projectiles.Melee projectile.ignoreWater = true; projectile.usesLocalNPCImmunity = true; projectile.localNPCHitCooldown = 3; - projectile.GetGlobalProjectile(mod).trueMelee = true; + projectile.Calamity().trueMelee = true; } public override void AI() diff --git a/Projectiles/Melee/Murasama.cs b/Projectiles/Melee/Murasama.cs index 24046f7ff8..744c0f682d 100644 --- a/Projectiles/Melee/Murasama.cs +++ b/Projectiles/Melee/Murasama.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Projectiles.Melee projectile.ownerHitCheck = true; projectile.usesLocalNPCImmunity = true; projectile.localNPCHitCooldown = 0; - projectile.GetGlobalProjectile(mod).trueMelee = true; + projectile.Calamity().trueMelee = true; } public override void AI() diff --git a/Projectiles/Melee/Nebulash.cs b/Projectiles/Melee/Nebulash.cs index f0325f00ba..09b5bb52b1 100644 --- a/Projectiles/Melee/Nebulash.cs +++ b/Projectiles/Melee/Nebulash.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Projectiles.Melee projectile.ignoreWater = true; projectile.usesLocalNPCImmunity = true; projectile.localNPCHitCooldown = 2; - projectile.GetGlobalProjectile(mod).trueMelee = true; + projectile.Calamity().trueMelee = true; } public override void AI() diff --git a/Projectiles/Melee/OPHammerMelee.cs b/Projectiles/Melee/OPHammerMelee.cs index 22a7fb7903..0783adcb2d 100644 --- a/Projectiles/Melee/OPHammerMelee.cs +++ b/Projectiles/Melee/OPHammerMelee.cs @@ -117,7 +117,7 @@ namespace CalamityMod.Projectiles.Melee if (projectile.owner == Main.myPlayer) { int boom = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, mod.ProjectileType("FuckYou"), projectile.damage, projectile.knockBack, projectile.owner, 0f, 0.85f + Main.rand.NextFloat() * 1.15f); - Main.projectile[boom].GetGlobalProjectile(mod).forceMelee = true; + Main.projectile[boom].Calamity().forceMelee = true; } } diff --git a/Projectiles/Melee/ScourgeoftheCosmos.cs b/Projectiles/Melee/ScourgeoftheCosmos.cs index 0197a0548c..6c68953520 100644 --- a/Projectiles/Melee/ScourgeoftheCosmos.cs +++ b/Projectiles/Melee/ScourgeoftheCosmos.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Projectiles.Melee if (projectile.ai[1] == 1f) { projectile.melee = false; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } if (projectile.alpha <= 200) { diff --git a/Projectiles/Melee/ScourgeoftheCosmosMini.cs b/Projectiles/Melee/ScourgeoftheCosmosMini.cs index 798aef1835..0f865c333a 100644 --- a/Projectiles/Melee/ScourgeoftheCosmosMini.cs +++ b/Projectiles/Melee/ScourgeoftheCosmosMini.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Projectiles.Melee if (projectile.ai[1] == 1f) { projectile.melee = false; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } if (projectile.alpha > 0) { diff --git a/Projectiles/Melee/Spears/AstralPike.cs b/Projectiles/Melee/Spears/AstralPike.cs index 92dcdbe712..2f83ff8b75 100644 --- a/Projectiles/Melee/Spears/AstralPike.cs +++ b/Projectiles/Melee/Spears/AstralPike.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Projectiles.Melee.Spears projectile.penetrate = -1; projectile.ownerHitCheck = true; projectile.hide = true; - projectile.GetGlobalProjectile(mod).trueMelee = true; + projectile.Calamity().trueMelee = true; } public override void AI() @@ -107,7 +107,7 @@ namespace CalamityMod.Projectiles.Melee.Spears if (projectile.owner == Main.myPlayer) { int proj = Projectile.NewProjectile(vector2.X, vector2.Y, speedX, speedY, mod.ProjectileType("AstralStar"), (int)((double)projectile.damage * 0.2), 1f, projectile.owner); - Main.projectile[proj].GetGlobalProjectile(mod).forceMelee = true; + Main.projectile[proj].Calamity().forceMelee = true; } } } diff --git a/Projectiles/Melee/Spears/Brimlance.cs b/Projectiles/Melee/Spears/Brimlance.cs index 1f05ef0a71..1b75355d80 100644 --- a/Projectiles/Melee/Spears/Brimlance.cs +++ b/Projectiles/Melee/Spears/Brimlance.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Projectiles.Melee.Spears projectile.penetrate = -1; projectile.ownerHitCheck = true; projectile.hide = true; - projectile.GetGlobalProjectile(mod).trueMelee = true; + projectile.Calamity().trueMelee = true; } public override void AI() diff --git a/Projectiles/Melee/Spears/DiseasedPike.cs b/Projectiles/Melee/Spears/DiseasedPike.cs index 110a1161c9..b99759a8e7 100644 --- a/Projectiles/Melee/Spears/DiseasedPike.cs +++ b/Projectiles/Melee/Spears/DiseasedPike.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Projectiles.Melee.Spears projectile.penetrate = -1; projectile.ownerHitCheck = true; projectile.hide = true; - projectile.GetGlobalProjectile(mod).trueMelee = true; + projectile.Calamity().trueMelee = true; } public override void AI() diff --git a/Projectiles/Melee/Spears/EarthenPike.cs b/Projectiles/Melee/Spears/EarthenPike.cs index 2e09aa3c58..688919d689 100644 --- a/Projectiles/Melee/Spears/EarthenPike.cs +++ b/Projectiles/Melee/Spears/EarthenPike.cs @@ -57,7 +57,7 @@ namespace CalamityMod.Projectiles.Melee.Spears } int proj = Projectile.NewProjectile(projectile.Center.X + projectile.velocity.X, projectile.Center.Y + projectile.velocity.Y, projectile.velocity.X * 1.25f, velocityY, mod.ProjectileType("FossilShard"), (int)((double)projectile.damage * 0.5), 0f, projectile.owner, 0f, 0f); - Main.projectile[proj].GetGlobalProjectile(mod).forceMelee = true; + Main.projectile[proj].Calamity().forceMelee = true; } } if (Main.player[projectile.owner].itemAnimation < Main.player[projectile.owner].itemAnimationMax / 3) diff --git a/Projectiles/Melee/Spears/ExsanguinationLanceProjectile.cs b/Projectiles/Melee/Spears/ExsanguinationLanceProjectile.cs index 8cfe6c2218..8cc003866f 100644 --- a/Projectiles/Melee/Spears/ExsanguinationLanceProjectile.cs +++ b/Projectiles/Melee/Spears/ExsanguinationLanceProjectile.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Projectiles.Melee.Spears projectile.penetrate = -1; projectile.ownerHitCheck = true; projectile.hide = true; - projectile.GetGlobalProjectile(mod).trueMelee = true; + projectile.Calamity().trueMelee = true; } public override void AI() @@ -77,7 +77,7 @@ namespace CalamityMod.Projectiles.Melee.Spears if (projectile.owner == Main.myPlayer) { int boom = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, mod.ProjectileType("FuckYou"), projectile.damage, projectile.knockBack, projectile.owner, 0f, 0.85f + Main.rand.NextFloat() * 1.15f); - Main.projectile[boom].GetGlobalProjectile(mod).forceMelee = true; + Main.projectile[boom].Calamity().forceMelee = true; } if (crit) { diff --git a/Projectiles/Melee/Spears/FulgurationHalberd.cs b/Projectiles/Melee/Spears/FulgurationHalberd.cs index 9fd3853dea..77b11325c8 100644 --- a/Projectiles/Melee/Spears/FulgurationHalberd.cs +++ b/Projectiles/Melee/Spears/FulgurationHalberd.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Projectiles.Melee.Spears projectile.penetrate = -1; projectile.ownerHitCheck = true; projectile.hide = true; - projectile.GetGlobalProjectile(mod).trueMelee = true; + projectile.Calamity().trueMelee = true; } public override void AI() diff --git a/Projectiles/Melee/Spears/GildedProboscis.cs b/Projectiles/Melee/Spears/GildedProboscis.cs index ae1c18b957..45db44b686 100644 --- a/Projectiles/Melee/Spears/GildedProboscis.cs +++ b/Projectiles/Melee/Spears/GildedProboscis.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Projectiles.Melee.Spears projectile.hide = true; projectile.usesLocalNPCImmunity = true; projectile.localNPCHitCooldown = 1; - projectile.GetGlobalProjectile(mod).trueMelee = true; + projectile.Calamity().trueMelee = true; } public override void AI() diff --git a/Projectiles/Melee/Spears/HeartRapierProjectile.cs b/Projectiles/Melee/Spears/HeartRapierProjectile.cs index ee611a57ae..8e5dd2e112 100644 --- a/Projectiles/Melee/Spears/HeartRapierProjectile.cs +++ b/Projectiles/Melee/Spears/HeartRapierProjectile.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Projectiles.Melee.Spears projectile.penetrate = -1; projectile.ownerHitCheck = true; projectile.hide = true; - projectile.GetGlobalProjectile(mod).trueMelee = true; + projectile.Calamity().trueMelee = true; } public override void AI() diff --git a/Projectiles/Melee/Spears/MarniteSpearProjectile.cs b/Projectiles/Melee/Spears/MarniteSpearProjectile.cs index c01f854f6c..4e07efff21 100644 --- a/Projectiles/Melee/Spears/MarniteSpearProjectile.cs +++ b/Projectiles/Melee/Spears/MarniteSpearProjectile.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Projectiles.Melee.Spears projectile.penetrate = -1; projectile.ownerHitCheck = true; projectile.hide = true; - projectile.GetGlobalProjectile(mod).trueMelee = true; + projectile.Calamity().trueMelee = true; } public override void AI() diff --git a/Projectiles/Melee/Spears/SausageMaker.cs b/Projectiles/Melee/Spears/SausageMaker.cs index 63c916102a..cba23a73b1 100644 --- a/Projectiles/Melee/Spears/SausageMaker.cs +++ b/Projectiles/Melee/Spears/SausageMaker.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Projectiles.Melee.Spears projectile.penetrate = -1; projectile.ownerHitCheck = true; projectile.hide = true; - projectile.GetGlobalProjectile(mod).trueMelee = true; + projectile.Calamity().trueMelee = true; } public override void AI() diff --git a/Projectiles/Melee/Tumbleweed.cs b/Projectiles/Melee/Tumbleweed.cs index b91de5838b..ca78ec40b7 100644 --- a/Projectiles/Melee/Tumbleweed.cs +++ b/Projectiles/Melee/Tumbleweed.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Projectiles.Melee projectile.penetrate = -1; projectile.melee = true; projectile.alpha = 255; - projectile.GetGlobalProjectile(mod).trueMelee = true; + projectile.Calamity().trueMelee = true; } public override void AI() diff --git a/Projectiles/Melee/Yoyos/ChaotrixProjectile.cs b/Projectiles/Melee/Yoyos/ChaotrixProjectile.cs index a64ce0db07..b546bcc0a2 100644 --- a/Projectiles/Melee/Yoyos/ChaotrixProjectile.cs +++ b/Projectiles/Melee/Yoyos/ChaotrixProjectile.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Projectiles.Melee.Yoyos if (projectile.owner == Main.myPlayer) { int boom = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, mod.ProjectileType("FuckYou"), projectile.damage, projectile.knockBack, projectile.owner, 0f, 0.85f + Main.rand.NextFloat() * 1.15f); - Main.projectile[boom].GetGlobalProjectile(mod).forceMelee = true; + Main.projectile[boom].Calamity().forceMelee = true; } } diff --git a/Projectiles/Melee/Yoyos/CnidarianProjectile.cs b/Projectiles/Melee/Yoyos/CnidarianProjectile.cs index 3d2cc9bcf2..fad047f0ef 100644 --- a/Projectiles/Melee/Yoyos/CnidarianProjectile.cs +++ b/Projectiles/Melee/Yoyos/CnidarianProjectile.cs @@ -71,7 +71,7 @@ namespace CalamityMod.Projectiles.Melee.Yoyos if (projectile.owner == Main.myPlayer) { int projectile2 = Projectile.NewProjectile(value10.X, value10.Y, num438, num439, mod.ProjectileType("Seashell"), projectile.damage / 3, 0f, projectile.owner, 0f, 0f); - Main.projectile[projectile2].GetGlobalProjectile(mod).forceMelee = true; + Main.projectile[projectile2].Calamity().forceMelee = true; } } } diff --git a/Projectiles/Melee/Yoyos/QuagmireProjectile.cs b/Projectiles/Melee/Yoyos/QuagmireProjectile.cs index 29984d9120..12d7d12fb7 100644 --- a/Projectiles/Melee/Yoyos/QuagmireProjectile.cs +++ b/Projectiles/Melee/Yoyos/QuagmireProjectile.cs @@ -36,21 +36,21 @@ namespace CalamityMod.Projectiles.Melee.Yoyos if (Main.rand.NextBool(10)) { proj = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X * 0.35f, projectile.velocity.Y * 0.35f, 569, (int)((double)projectile.damage * 0.5), projectile.knockBack, projectile.owner, 0f, 0f); - Main.projectile[proj].GetGlobalProjectile(mod).forceMelee = true; + Main.projectile[proj].Calamity().forceMelee = true; Main.projectile[proj].usesLocalNPCImmunity = true; Main.projectile[proj].localNPCHitCooldown = 30; } if (Main.rand.NextBool(30)) { proj = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X * 0.25f, projectile.velocity.Y * 0.25f, 570, (int)((double)projectile.damage * 0.6), projectile.knockBack, projectile.owner, 0f, 0f); - Main.projectile[proj].GetGlobalProjectile(mod).forceMelee = true; + Main.projectile[proj].Calamity().forceMelee = true; Main.projectile[proj].usesLocalNPCImmunity = true; Main.projectile[proj].localNPCHitCooldown = 30; } if (Main.rand.NextBool(50)) { proj = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X * 0.15f, projectile.velocity.Y * 0.15f, 571, (int)((double)projectile.damage * 0.7), projectile.knockBack, projectile.owner, 0f, 0f); - Main.projectile[proj].GetGlobalProjectile(mod).forceMelee = true; + Main.projectile[proj].Calamity().forceMelee = true; Main.projectile[proj].usesLocalNPCImmunity = true; Main.projectile[proj].localNPCHitCooldown = 30; } diff --git a/Projectiles/Melee/Yoyos/ShimmersparkProjectile.cs b/Projectiles/Melee/Yoyos/ShimmersparkProjectile.cs index 5efe8a671f..4857224b74 100644 --- a/Projectiles/Melee/Yoyos/ShimmersparkProjectile.cs +++ b/Projectiles/Melee/Yoyos/ShimmersparkProjectile.cs @@ -77,7 +77,7 @@ namespace CalamityMod.Projectiles.Melee.Yoyos if (projectile.owner == Main.myPlayer) { int proj = Projectile.NewProjectile(value10.X, value10.Y, num438, num439, 92, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); - Main.projectile[proj].GetGlobalProjectile(mod).forceMelee = true; + Main.projectile[proj].Calamity().forceMelee = true; } } } diff --git a/Projectiles/Melee/Yoyos/SolarFlareYoyo.cs b/Projectiles/Melee/Yoyos/SolarFlareYoyo.cs index 7fe79731a8..660d822474 100644 --- a/Projectiles/Melee/Yoyos/SolarFlareYoyo.cs +++ b/Projectiles/Melee/Yoyos/SolarFlareYoyo.cs @@ -41,7 +41,7 @@ namespace CalamityMod.Projectiles.Melee.Yoyos if (projectile.owner == Main.myPlayer) { int proj = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, mod.ProjectileType("HolyExplosionSupreme"), projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); - Main.projectile[proj].GetGlobalProjectile(mod).forceMelee = true; + Main.projectile[proj].Calamity().forceMelee = true; } } diff --git a/Projectiles/Melee/Yoyos/TheGodsGambitProjectile.cs b/Projectiles/Melee/Yoyos/TheGodsGambitProjectile.cs index 3d7619b29c..da525c2bec 100644 --- a/Projectiles/Melee/Yoyos/TheGodsGambitProjectile.cs +++ b/Projectiles/Melee/Yoyos/TheGodsGambitProjectile.cs @@ -73,7 +73,7 @@ namespace CalamityMod.Projectiles.Melee.Yoyos if (projectile.owner == Main.myPlayer) { int projectile2 = Projectile.NewProjectile(value10.X, value10.Y, num438, num439, ProjectileID.SlimeGun, (int)((double)projectile.damage * 0.75), 0f, projectile.owner, 0f, 0f); - Main.projectile[projectile2].GetGlobalProjectile(mod).forceMelee = true; + Main.projectile[projectile2].Calamity().forceMelee = true; } } } diff --git a/Projectiles/Melee/Yoyos/TheObliterator.cs b/Projectiles/Melee/Yoyos/TheObliterator.cs index e733e9e91f..6ac9e162a3 100644 --- a/Projectiles/Melee/Yoyos/TheObliterator.cs +++ b/Projectiles/Melee/Yoyos/TheObliterator.cs @@ -73,7 +73,7 @@ namespace CalamityMod.Projectiles.Melee.Yoyos if (projectile.owner == Main.myPlayer) { int proj = Projectile.NewProjectile(value10.X, value10.Y, num438, num439, mod.ProjectileType("NebulaShot"), projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); - Main.projectile[proj].GetGlobalProjectile(mod).forceMelee = true; + Main.projectile[proj].Calamity().forceMelee = true; } } } diff --git a/Projectiles/Melee/Yoyos/VerdantProjectile.cs b/Projectiles/Melee/Yoyos/VerdantProjectile.cs index f7fdda6b10..8c63bfad6b 100644 --- a/Projectiles/Melee/Yoyos/VerdantProjectile.cs +++ b/Projectiles/Melee/Yoyos/VerdantProjectile.cs @@ -79,7 +79,7 @@ namespace CalamityMod.Projectiles.Melee.Yoyos if (projectile.owner == Main.myPlayer) { int proj = Projectile.NewProjectile(value10.X, value10.Y, num438, num439, 227, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); - Main.projectile[proj].GetGlobalProjectile(mod).forceMelee = true; + Main.projectile[proj].Calamity().forceMelee = true; } } } diff --git a/Projectiles/Patreon/Akato.cs b/Projectiles/Patreon/Akato.cs index 37d5015e01..7e5c41d66d 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (player.dead) { modPlayer.akato = false; diff --git a/Projectiles/Patreon/CorpusAvertor.cs b/Projectiles/Patreon/CorpusAvertor.cs index c68da9692f..b4ac6a95c1 100644 --- a/Projectiles/Patreon/CorpusAvertor.cs +++ b/Projectiles/Patreon/CorpusAvertor.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Projectiles.Patreon if (projectile.ai[1] == 1f) { projectile.melee = false; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } projectile.rotation += (Math.Abs(projectile.velocity.X) + Math.Abs(projectile.velocity.Y)) * 0.02f; diff --git a/Projectiles/Patreon/CorpusAvertorClone.cs b/Projectiles/Patreon/CorpusAvertorClone.cs index 381dc43aae..7ac14dc078 100644 --- a/Projectiles/Patreon/CorpusAvertorClone.cs +++ b/Projectiles/Patreon/CorpusAvertorClone.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Projectiles.Patreon if (projectile.ai[1] == 1f) { projectile.melee = false; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } projectile.rotation += (Math.Abs(projectile.velocity.X) + Math.Abs(projectile.velocity.Y)) * 0.04f; diff --git a/Projectiles/Patreon/DeepSeaDumbbell1.cs b/Projectiles/Patreon/DeepSeaDumbbell1.cs index ae894b96b0..8e01a35747 100644 --- a/Projectiles/Patreon/DeepSeaDumbbell1.cs +++ b/Projectiles/Patreon/DeepSeaDumbbell1.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Projectiles.Patreon projectile.width = 26; projectile.height = 26; projectile.friendly = true; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; projectile.ignoreWater = true; projectile.penetrate = 1; } diff --git a/Projectiles/Patreon/DeepSeaDumbbell2.cs b/Projectiles/Patreon/DeepSeaDumbbell2.cs index f5b5a84abf..9c6151b4e6 100644 --- a/Projectiles/Patreon/DeepSeaDumbbell2.cs +++ b/Projectiles/Patreon/DeepSeaDumbbell2.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Projectiles.Patreon projectile.width = 26; projectile.height = 26; projectile.friendly = true; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; projectile.ignoreWater = true; projectile.penetrate = 1; } diff --git a/Projectiles/Patreon/DeepSeaDumbbell3.cs b/Projectiles/Patreon/DeepSeaDumbbell3.cs index 1c8b655ef3..39a168bccc 100644 --- a/Projectiles/Patreon/DeepSeaDumbbell3.cs +++ b/Projectiles/Patreon/DeepSeaDumbbell3.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Projectiles.Patreon projectile.width = 26; projectile.height = 26; projectile.friendly = true; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; projectile.ignoreWater = true; projectile.penetrate = 1; } diff --git a/Projectiles/Patreon/DeepSeaDumbbellWeight.cs b/Projectiles/Patreon/DeepSeaDumbbellWeight.cs index d8f8bbb1b1..b1d168f5fd 100644 --- a/Projectiles/Patreon/DeepSeaDumbbellWeight.cs +++ b/Projectiles/Patreon/DeepSeaDumbbellWeight.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Projectiles.Patreon projectile.width = 14; projectile.height = 14; projectile.friendly = true; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; projectile.ignoreWater = true; projectile.penetrate = 1; } diff --git a/Projectiles/Patreon/DevilsSunrise.cs b/Projectiles/Patreon/DevilsSunrise.cs index 3aa2ceb3e2..b8bdc53211 100644 --- a/Projectiles/Patreon/DevilsSunrise.cs +++ b/Projectiles/Patreon/DevilsSunrise.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Projectiles.Patreon projectile.ownerHitCheck = true; projectile.usesLocalNPCImmunity = true; projectile.localNPCHitCooldown = 5; - projectile.GetGlobalProjectile(mod).trueMelee = true; + projectile.Calamity().trueMelee = true; } public override void AI() @@ -37,7 +37,7 @@ namespace CalamityMod.Projectiles.Patreon projectile.ai[1] += 1f; if (projectile.ai[1] == 255f) - projectile.damage = (int)((double)projectile.GetGlobalProjectile(mod).defDamage * 2.0); + projectile.damage = (int)((double)projectile.Calamity().defDamage * 2.0); red = 64 + (int)(projectile.ai[1] * 0.75f); if (red > 255) diff --git a/Projectiles/Patreon/DevilsSunriseCyclone.cs b/Projectiles/Patreon/DevilsSunriseCyclone.cs index 43256e6f57..566ed2f4a4 100644 --- a/Projectiles/Patreon/DevilsSunriseCyclone.cs +++ b/Projectiles/Patreon/DevilsSunriseCyclone.cs @@ -41,12 +41,12 @@ namespace CalamityMod.Projectiles.Patreon if (!Main.player[projectile.owner].channel) { projectile.ai[1] = -1f; - projectile.damage = projectile.GetGlobalProjectile(mod).defDamage; + projectile.damage = projectile.Calamity().defDamage; } } if (projectile.ai[1] >= 255f) - projectile.damage = (int)((double)projectile.GetGlobalProjectile(mod).defDamage * 2.0); + projectile.damage = (int)((double)projectile.Calamity().defDamage * 2.0); red = 64 + (int)(projectile.ai[1] * 0.75f); if (red > 255) diff --git a/Projectiles/Patreon/KelvinCatalyst.cs b/Projectiles/Patreon/KelvinCatalyst.cs index d7a3f5eec8..8d3933a9da 100644 --- a/Projectiles/Patreon/KelvinCatalyst.cs +++ b/Projectiles/Patreon/KelvinCatalyst.cs @@ -44,7 +44,7 @@ namespace CalamityMod.Projectiles.Patreon if (projectile.ai[1] == 1f) { projectile.melee = false; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } if (projectile.soundDelay == 0) diff --git a/Projectiles/Patreon/MiniGuardianAttack.cs b/Projectiles/Patreon/MiniGuardianAttack.cs index 30d8ed9755..4c7d0266c9 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (player.dead) { modPlayer.gOffense = false; diff --git a/Projectiles/Patreon/MiniGuardianDefense.cs b/Projectiles/Patreon/MiniGuardianDefense.cs index d77ea160ab..8cf1feb79a 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (player.dead) { modPlayer.gDefense = false; diff --git a/Projectiles/Patreon/MiniGuardianHealer.cs b/Projectiles/Patreon/MiniGuardianHealer.cs index be97e57ee9..10611f8542 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (player.dead) { modPlayer.gHealer = false; diff --git a/Projectiles/Patreon/PerforaMini.cs b/Projectiles/Patreon/PerforaMini.cs index 4aba8bab62..10582748f6 100644 --- a/Projectiles/Patreon/PerforaMini.cs +++ b/Projectiles/Patreon/PerforaMini.cs @@ -45,7 +45,7 @@ namespace CalamityMod.Projectiles.Patreon projectile.Kill(); } - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (player.dead) { modPlayer.perfmini = false; diff --git a/Projectiles/Patreon/PinkButterfly.cs b/Projectiles/Patreon/PinkButterfly.cs index 85fbcc34dc..bafe4fc126 100644 --- a/Projectiles/Patreon/PinkButterfly.cs +++ b/Projectiles/Patreon/PinkButterfly.cs @@ -37,8 +37,8 @@ namespace CalamityMod.Projectiles.Patreon { if (projectile.localAI[0] == 0f) { - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue = projectile.damage; + projectile.Calamity().spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; + projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage; int num226 = 36; for (int num227 = 0; num227 < num226; num227++) { @@ -50,10 +50,10 @@ namespace CalamityMod.Projectiles.Patreon } projectile.localAI[0] += 1f; } - if (Main.player[projectile.owner].minionDamage != projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) + if (Main.player[projectile.owner].minionDamage != projectile.Calamity().spawnedPlayerMinionDamageValue) { - int damage2 = (int)(((float)projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue / - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) * + int damage2 = (int)(((float)projectile.Calamity().spawnedPlayerMinionProjectileDamageValue / + projectile.Calamity().spawnedPlayerMinionDamageValue) * Main.player[projectile.owner].minionDamage); projectile.damage = damage2; } @@ -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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); player.AddBuff(mod.BuffType("ResurrectionButterflyBuff"), 3600); if (flag64) { diff --git a/Projectiles/Patreon/PlagueBee.cs b/Projectiles/Patreon/PlagueBee.cs index 4c97d18762..6b35ce8825 100644 --- a/Projectiles/Patreon/PlagueBee.cs +++ b/Projectiles/Patreon/PlagueBee.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Projectiles.Patreon projectile.penetrate = 2; projectile.timeLeft = 420; projectile.ignoreWater = true; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/Patreon/Plaguenade.cs b/Projectiles/Patreon/Plaguenade.cs index a5b8913a79..d0c61af029 100644 --- a/Projectiles/Patreon/Plaguenade.cs +++ b/Projectiles/Patreon/Plaguenade.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Projectiles.Patreon projectile.penetrate = 1; projectile.extraUpdates = 1; projectile.timeLeft = 180; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/Patreon/PurpleButterfly.cs b/Projectiles/Patreon/PurpleButterfly.cs index 74ed8b3bfa..20a6c17ca6 100644 --- a/Projectiles/Patreon/PurpleButterfly.cs +++ b/Projectiles/Patreon/PurpleButterfly.cs @@ -39,8 +39,8 @@ namespace CalamityMod.Projectiles.Patreon { if (dust > 0) { - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue = projectile.damage; + projectile.Calamity().spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; + projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage; int num226 = 36; for (int num227 = 0; num227 < num226; num227++) { @@ -52,10 +52,10 @@ namespace CalamityMod.Projectiles.Patreon } dust--; } - if (Main.player[projectile.owner].minionDamage != projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) + if (Main.player[projectile.owner].minionDamage != projectile.Calamity().spawnedPlayerMinionDamageValue) { - int damage2 = (int)(((float)projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue / - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) * + int damage2 = (int)(((float)projectile.Calamity().spawnedPlayerMinionProjectileDamageValue / + projectile.Calamity().spawnedPlayerMinionDamageValue) * Main.player[projectile.owner].minionDamage); projectile.damage = damage2; } @@ -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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); player.AddBuff(mod.BuffType("ResurrectionButterflyBuff"), 3600); if (flag64) { diff --git a/Projectiles/Patreon/TimeBolt.cs b/Projectiles/Patreon/TimeBolt.cs index 8938a54044..9be93e142e 100644 --- a/Projectiles/Patreon/TimeBolt.cs +++ b/Projectiles/Patreon/TimeBolt.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Projectiles.Patreon projectile.friendly = true; projectile.penetrate = penetrationAmt; projectile.timeLeft = 600; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; projectile.usesLocalNPCImmunity = true; projectile.localNPCHitCooldown = 5; } diff --git a/Projectiles/Patreon/YateveoBloom.cs b/Projectiles/Patreon/YateveoBloom.cs index ef5eb51de8..fef315698b 100644 --- a/Projectiles/Patreon/YateveoBloom.cs +++ b/Projectiles/Patreon/YateveoBloom.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Projectiles.Patreon projectile.penetrate = -1; projectile.melee = true; projectile.alpha = 255; - projectile.GetGlobalProjectile(mod).trueMelee = true; + projectile.Calamity().trueMelee = true; } public override void AI() diff --git a/Projectiles/Patreon/YateveoBloomSpear.cs b/Projectiles/Patreon/YateveoBloomSpear.cs index c7d32250fa..de3105ab17 100644 --- a/Projectiles/Patreon/YateveoBloomSpear.cs +++ b/Projectiles/Patreon/YateveoBloomSpear.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Projectiles.Patreon projectile.penetrate = -1; projectile.ownerHitCheck = true; projectile.hide = true; - projectile.GetGlobalProjectile(mod).trueMelee = true; + projectile.Calamity().trueMelee = true; } public override void AI() diff --git a/Projectiles/Permafrost/FrostShardFriendly.cs b/Projectiles/Permafrost/FrostShardFriendly.cs index 695b12af17..e03fefcc68 100644 --- a/Projectiles/Permafrost/FrostShardFriendly.cs +++ b/Projectiles/Permafrost/FrostShardFriendly.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Projectiles.Permafrost projectile.friendly = true; projectile.minion = true; projectile.penetrate = 1; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void SetStaticDefaults() diff --git a/Projectiles/Permafrost/FrostyFlare.cs b/Projectiles/Permafrost/FrostyFlare.cs index 3fb991c950..42a40ec5e5 100644 --- a/Projectiles/Permafrost/FrostyFlare.cs +++ b/Projectiles/Permafrost/FrostyFlare.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Projectiles.Permafrost projectile.friendly = true; projectile.penetrate = -1; projectile.timeLeft = 300; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void SetStaticDefaults() diff --git a/Projectiles/Permafrost/IceSentry.cs b/Projectiles/Permafrost/IceSentry.cs index 80d69983cc..9184e0e86b 100644 --- a/Projectiles/Permafrost/IceSentry.cs +++ b/Projectiles/Permafrost/IceSentry.cs @@ -30,14 +30,14 @@ namespace CalamityMod.Projectiles.Permafrost { if (setDamage) { - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue = projectile.damage; + projectile.Calamity().spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; + projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage; setDamage = false; } - if (Main.player[projectile.owner].minionDamage != projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) + if (Main.player[projectile.owner].minionDamage != projectile.Calamity().spawnedPlayerMinionDamageValue) { - int damage2 = (int)(((float)projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue / - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) * + int damage2 = (int)(((float)projectile.Calamity().spawnedPlayerMinionProjectileDamageValue / + projectile.Calamity().spawnedPlayerMinionDamageValue) * Main.player[projectile.owner].minionDamage); projectile.damage = damage2; } diff --git a/Projectiles/Pets/Bear.cs b/Projectiles/Pets/Bear.cs index eea739153c..63344e9c0c 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (player.dead) { modPlayer.bearPet = false; diff --git a/Projectiles/Pets/Brimling.cs b/Projectiles/Pets/Brimling.cs index 46c7232054..df659dec09 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (player.dead) { modPlayer.brimling = false; diff --git a/Projectiles/Pets/ChibiiDoggo.cs b/Projectiles/Pets/ChibiiDoggo.cs index 03399539aa..e22876a95b 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (player.dead) { modPlayer.chibii = false; diff --git a/Projectiles/Pets/ChibiiDoggoFly.cs b/Projectiles/Pets/ChibiiDoggoFly.cs index de8eeb3db4..e3ac773ade 100644 --- a/Projectiles/Pets/ChibiiDoggoFly.cs +++ b/Projectiles/Pets/ChibiiDoggoFly.cs @@ -88,7 +88,7 @@ namespace CalamityMod.Projectiles.Pets public override void AI() { - if (Main.player[projectile.owner].GetCalamityPlayer().chibii) + if (Main.player[projectile.owner].Calamity().chibii) projectile.timeLeft = 2; int byUuid = (int) projectile.ai[0]; //contains identity of parent projectile in main.projectile array diff --git a/Projectiles/Pets/DannyDevito.cs b/Projectiles/Pets/DannyDevito.cs index 05d7e3dcc5..81602dccad 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (player.dead) { modPlayer.trashMan = false; diff --git a/Projectiles/Pets/Fox.cs b/Projectiles/Pets/Fox.cs index f9190ef007..f55fecde78 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (player.dead) { modPlayer.fox = false; diff --git a/Projectiles/Pets/Kendra.cs b/Projectiles/Pets/Kendra.cs index f438372de5..2f27b65b3e 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (player.dead) { modPlayer.kendra = false; diff --git a/Projectiles/Pets/Levi.cs b/Projectiles/Pets/Levi.cs index c492115e7d..0ab65216f3 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (player.dead) { modPlayer.leviPet = false; diff --git a/Projectiles/Pets/SirenYoung.cs b/Projectiles/Pets/SirenYoung.cs index 596dc6c5cf..78557d8391 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (player.dead) { modPlayer.sirenPet = false; diff --git a/Projectiles/Pets/ThirdSage.cs b/Projectiles/Pets/ThirdSage.cs index 1dab212859..9d67718d1d 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (player.dead) { modPlayer.thirdSage = false; diff --git a/Projectiles/Ranged/BeeRPG.cs b/Projectiles/Ranged/BeeRPG.cs index 4214319284..9a6fb26b5d 100644 --- a/Projectiles/Ranged/BeeRPG.cs +++ b/Projectiles/Ranged/BeeRPG.cs @@ -115,7 +115,7 @@ namespace CalamityMod.Projectiles.Ranged num519 += projectile.oldVelocity.Y / 6f; int num520 = Projectile.NewProjectile(value20.X, value20.Y, num518, num519, Main.player[projectile.owner].beeType(), Main.player[projectile.owner].beeDamage(projectile.damage / 4), Main.player[projectile.owner].beeKB(0f), Main.myPlayer, 0f, 0f); Main.projectile[num520].penetrate = 2; - Main.projectile[num520].GetGlobalProjectile(mod).forceRanged = true; + Main.projectile[num520].Calamity().forceRanged = true; } } } diff --git a/Projectiles/Ranged/DragonBurst.cs b/Projectiles/Ranged/DragonBurst.cs index 9a760b8ef2..7515c8cb6c 100644 --- a/Projectiles/Ranged/DragonBurst.cs +++ b/Projectiles/Ranged/DragonBurst.cs @@ -58,7 +58,7 @@ namespace CalamityMod.Projectiles.Ranged if (projectile.owner == Main.myPlayer) { int proj = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, mod.ProjectileType("FuckYou"), projectile.damage, projectile.knockBack, projectile.owner, 0f, 0.85f + Main.rand.NextFloat() * 1.15f); - Main.projectile[proj].GetGlobalProjectile(mod).forceRanged = true; + Main.projectile[proj].Calamity().forceRanged = true; } } diff --git a/Projectiles/Ranged/DrataliornusFlame.cs b/Projectiles/Ranged/DrataliornusFlame.cs index a23e331f0b..67f36988da 100644 --- a/Projectiles/Ranged/DrataliornusFlame.cs +++ b/Projectiles/Ranged/DrataliornusFlame.cs @@ -179,7 +179,7 @@ namespace CalamityMod.Projectiles.Ranged Vector2 vector3 = projectile.Center + new Vector2(600, 0).RotatedBy(MathHelper.ToRadians(Main.rand.Next(360))); Vector2 speed = projectile.Center - vector3; speed /= 30f; - Projectile.NewProjectile(vector3.X, vector3.Y, speed.X, speed.Y, mod.ProjectileType(), projectile.damage / 2, projectile.knockBack, projectile.owner); + Projectile.NewProjectile(vector3.X, vector3.Y, speed.X, speed.Y, ModContent.ProjectileType(), projectile.damage / 2, projectile.knockBack, projectile.owner); Projectile.NewProjectile(projectile.Center, Vector2.Zero, DragonDust, projectile.damage / 3, projectile.knockBack * 2f, projectile.owner); } diff --git a/Projectiles/Ranged/ExplodingStake.cs b/Projectiles/Ranged/ExplodingStake.cs index 589334b9dd..7d6ecaab8d 100644 --- a/Projectiles/Ranged/ExplodingStake.cs +++ b/Projectiles/Ranged/ExplodingStake.cs @@ -63,7 +63,7 @@ namespace CalamityMod.Projectiles.Ranged if (projectile.owner == Main.myPlayer) { int boom = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, mod.ProjectileType("FuckYou"), projectile.damage, projectile.knockBack, projectile.owner, 0f, 0.85f + Main.rand.NextFloat() * 1.15f); - Main.projectile[boom].GetGlobalProjectile(mod).forceRanged = true; + Main.projectile[boom].Calamity().forceRanged = true; } } diff --git a/Projectiles/Ranged/GoliathRocket.cs b/Projectiles/Ranged/GoliathRocket.cs index fe4f54fd0a..a7b61e4304 100644 --- a/Projectiles/Ranged/GoliathRocket.cs +++ b/Projectiles/Ranged/GoliathRocket.cs @@ -132,7 +132,7 @@ namespace CalamityMod.Projectiles.Ranged num519 += projectile.oldVelocity.Y / 6f; int num520 = Projectile.NewProjectile(value20.X, value20.Y, num518, num519, Main.player[projectile.owner].beeType(), Main.player[projectile.owner].beeDamage(projectile.damage), Main.player[projectile.owner].beeKB(0f), Main.myPlayer, 0f, 0f); Main.projectile[num520].penetrate = 2; - Main.projectile[num520].GetGlobalProjectile(mod).forceRanged = true; + Main.projectile[num520].Calamity().forceRanged = true; } } } diff --git a/Projectiles/Ranged/HiveBomb.cs b/Projectiles/Ranged/HiveBomb.cs index f8f8e1c346..90fa13af95 100644 --- a/Projectiles/Ranged/HiveBomb.cs +++ b/Projectiles/Ranged/HiveBomb.cs @@ -132,7 +132,7 @@ namespace CalamityMod.Projectiles.Ranged num519 += projectile.oldVelocity.Y / 6f; int num520 = Projectile.NewProjectile(value20.X, value20.Y, num518, num519, Main.player[projectile.owner].beeType(), Main.player[projectile.owner].beeDamage(projectile.damage / 3), Main.player[projectile.owner].beeKB(0f), Main.myPlayer, 0f, 0f); Main.projectile[num520].penetrate = 2; - Main.projectile[num520].GetGlobalProjectile(mod).forceRanged = true; + Main.projectile[num520].Calamity().forceRanged = true; } } } diff --git a/Projectiles/Ranged/HiveMissile.cs b/Projectiles/Ranged/HiveMissile.cs index eaedc604e9..994c96fa44 100644 --- a/Projectiles/Ranged/HiveMissile.cs +++ b/Projectiles/Ranged/HiveMissile.cs @@ -133,7 +133,7 @@ namespace CalamityMod.Projectiles.Ranged num519 += projectile.oldVelocity.Y / 6f; int num520 = Projectile.NewProjectile(value20.X, value20.Y, num518, num519, Main.player[projectile.owner].beeType(), Main.player[projectile.owner].beeDamage(projectile.damage / 2), Main.player[projectile.owner].beeKB(0f), Main.myPlayer, 0f, 0f); Main.projectile[num520].penetrate = 2; - Main.projectile[num520].GetGlobalProjectile(mod).forceRanged = true; + Main.projectile[num520].Calamity().forceRanged = true; } } } diff --git a/Projectiles/Ranged/HolyFireBullet.cs b/Projectiles/Ranged/HolyFireBullet.cs index 02f53dc92c..902b08d971 100644 --- a/Projectiles/Ranged/HolyFireBullet.cs +++ b/Projectiles/Ranged/HolyFireBullet.cs @@ -70,7 +70,7 @@ namespace CalamityMod.Projectiles.Ranged if (projectile.owner == Main.myPlayer) { int proj = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, mod.ProjectileType("FuckYou"), (int)((double)projectile.damage * 0.85), projectile.knockBack, projectile.owner, 0f, 0.85f + Main.rand.NextFloat() * 1.15f); - Main.projectile[proj].GetGlobalProjectile(mod).forceRanged = true; + Main.projectile[proj].Calamity().forceRanged = true; } for (int k = 0; k < 10; k++) { diff --git a/Projectiles/Ranged/NebulaShot.cs b/Projectiles/Ranged/NebulaShot.cs index b9c9f7bd65..571bd12afb 100644 --- a/Projectiles/Ranged/NebulaShot.cs +++ b/Projectiles/Ranged/NebulaShot.cs @@ -37,9 +37,9 @@ namespace CalamityMod.Projectiles.Ranged // Force damage type based on AI variable (this is outdated code and the weapons themselves should set the force variables) if (projectile.ai[0] == 1f) - projectile.GetGlobalProjectile(mod).forceMelee = true; + projectile.Calamity().forceMelee = true; else if (projectile.ai[0] == 2f) - projectile.GetGlobalProjectile(mod).forceRogue = true; + projectile.Calamity().forceRogue = true; if (projectile.alpha > 0) { diff --git a/Projectiles/Ranged/PlagueArrow.cs b/Projectiles/Ranged/PlagueArrow.cs index a88eba9b46..1bd64640d8 100644 --- a/Projectiles/Ranged/PlagueArrow.cs +++ b/Projectiles/Ranged/PlagueArrow.cs @@ -49,7 +49,7 @@ namespace CalamityMod.Projectiles.Ranged num518 += projectile.oldVelocity.X / 6f; num519 += projectile.oldVelocity.Y / 6f; int num520 = Projectile.NewProjectile(value20.X, value20.Y, num518, num519, Main.player[projectile.owner].beeType(), Main.player[projectile.owner].beeDamage(projectile.damage / 2), Main.player[projectile.owner].beeKB(0f), Main.myPlayer, 0f, 0f); - Main.projectile[num520].GetGlobalProjectile(mod).forceRanged = true; + Main.projectile[num520].Calamity().forceRanged = true; Main.projectile[num520].penetrate = 2; } } diff --git a/Projectiles/Ranged/StarfleetMK2.cs b/Projectiles/Ranged/StarfleetMK2.cs index 43b499b60a..701e01e6ae 100644 --- a/Projectiles/Ranged/StarfleetMK2.cs +++ b/Projectiles/Ranged/StarfleetMK2.cs @@ -105,7 +105,7 @@ namespace CalamityMod.Projectiles.Ranged int star = Projectile.NewProjectile(position, speed, type, damage, knockBack, projectile.owner, 0f, 0f); Main.projectile[star].penetrate = 1; Main.projectile[star].timeLeft = 300; - Main.projectile[star].GetGlobalProjectile(mod).forceRanged = true; + Main.projectile[star].Calamity().forceRanged = true; Main.projectile[star].netUpdate = true; projectile.netUpdate = true; } diff --git a/Projectiles/Rogue/AccretionDisk.cs b/Projectiles/Rogue/AccretionDisk.cs index 81e9aeb1be..b4157a16d3 100644 --- a/Projectiles/Rogue/AccretionDisk.cs +++ b/Projectiles/Rogue/AccretionDisk.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.aiStyle = 3; projectile.timeLeft = 400; aiType = 52; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/Rogue/AccretionDisk2.cs b/Projectiles/Rogue/AccretionDisk2.cs index 701fd93f90..6574a74365 100644 --- a/Projectiles/Rogue/AccretionDisk2.cs +++ b/Projectiles/Rogue/AccretionDisk2.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.aiStyle = 3; projectile.timeLeft = 60; aiType = 52; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/Rogue/AdamantiteThrowingAxeProjectile.cs b/Projectiles/Rogue/AdamantiteThrowingAxeProjectile.cs index 04bf236111..921f5796ed 100644 --- a/Projectiles/Rogue/AdamantiteThrowingAxeProjectile.cs +++ b/Projectiles/Rogue/AdamantiteThrowingAxeProjectile.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.aiStyle = 2; projectile.timeLeft = 600; aiType = 3; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) diff --git a/Projectiles/Rogue/BallisticPoisonBomb.cs b/Projectiles/Rogue/BallisticPoisonBomb.cs index 76e2baac18..b54ffe019c 100644 --- a/Projectiles/Rogue/BallisticPoisonBomb.cs +++ b/Projectiles/Rogue/BallisticPoisonBomb.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.penetrate = -1; projectile.timeLeft = 200; projectile.tileCollide = false; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/Rogue/BallisticPoisonBombSpike.cs b/Projectiles/Rogue/BallisticPoisonBombSpike.cs index 2ad71882fc..ae0dc54554 100644 --- a/Projectiles/Rogue/BallisticPoisonBombSpike.cs +++ b/Projectiles/Rogue/BallisticPoisonBombSpike.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.extraUpdates = 2; projectile.aiStyle = 93; aiType = 514; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/Rogue/BarrelShrapnel.cs b/Projectiles/Rogue/BarrelShrapnel.cs index df7733a1a5..2840269c74 100644 --- a/Projectiles/Rogue/BarrelShrapnel.cs +++ b/Projectiles/Rogue/BarrelShrapnel.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.penetrate = 1; projectile.timeLeft = 160; projectile.tileCollide = true; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override bool OnTileCollide(Vector2 oldVelocity) => false; diff --git a/Projectiles/Rogue/BlastBarrelProjectile.cs b/Projectiles/Rogue/BlastBarrelProjectile.cs index 40863198e3..243b7e0962 100644 --- a/Projectiles/Rogue/BlastBarrelProjectile.cs +++ b/Projectiles/Rogue/BlastBarrelProjectile.cs @@ -26,14 +26,14 @@ namespace CalamityMod.Projectiles.Rogue projectile.friendly = true; projectile.penetrate = -1; projectile.timeLeft = 480; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } //Jesus christ, why isn't this in the Entity class instead of just NPC??? //Negative check is so that it doesn't register a bounce as a collision public bool collideX => projectile.oldPosition.X == projectile.position.X; public override void AI() { - bool stealthS = projectile.GetCalamityProj().stealthStrike; + bool stealthS = projectile.Calamity().stealthStrike; if (projectile.localAI[0] == 0f) { projectile.ai[1] = stealthS.ToInt() == 0 ? 1 : 3; @@ -61,7 +61,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool OnTileCollide(Vector2 oldVelocity) => false; public void BounceEffects() { - bool stealthS = projectile.GetCalamityProj().stealthStrike; + bool stealthS = projectile.Calamity().stealthStrike; int projectileCount = 12; Main.PlaySound(2, projectile.Center, 14); //aka can bounce multiple times @@ -84,7 +84,7 @@ namespace CalamityMod.Projectiles.Rogue Main.rand.Next(ProjectileID.MolotovFire, ProjectileID.MolotovFire3 + 1), BlastBarrel.BaseDamage, 1f, projectile.owner); Main.projectile[fireIndex].thrown = false; - Main.projectile[fireIndex].GetGlobalProjectile(mod).rogue = true; + Main.projectile[fireIndex].Calamity().rogue = true; } } projectile.ai[1]--; diff --git a/Projectiles/Rogue/BloodsoakedCrashax.cs b/Projectiles/Rogue/BloodsoakedCrashax.cs index 92667aca1d..b3d4f4f419 100644 --- a/Projectiles/Rogue/BloodsoakedCrashax.cs +++ b/Projectiles/Rogue/BloodsoakedCrashax.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.aiStyle = 2; projectile.timeLeft = 600; //10 seconds and counting aiType = 48; //Throwing Knife AI - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; projectile.usesIDStaticNPCImmunity = true; //afaik, no Calamity projectiles use this and only 1 vanilla projectile projectile.idStaticNPCHitCooldown = 5; projectile.extraUpdates = 1; @@ -95,7 +95,7 @@ namespace CalamityMod.Projectiles.Rogue if (projectile.ai[1] == 1f && projectile.owner == Main.myPlayer && grind >= 1) //stealth strike attack { int stealth = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, mod.ProjectileType("Blood"), projectile.damage, projectile.knockBack, projectile.owner, 0f, 0.85f + Main.rand.NextFloat() * 1.15f); - Main.projectile[stealth].GetGlobalProjectile(mod).forceRogue = true; + Main.projectile[stealth].Calamity().forceRogue = true; } if (!target.canGhostHeal) //canGhostHeal be like lol { diff --git a/Projectiles/Rogue/BouncingEyeballProjectile.cs b/Projectiles/Rogue/BouncingEyeballProjectile.cs index ce2419e7e9..b4e8556a58 100644 --- a/Projectiles/Rogue/BouncingEyeballProjectile.cs +++ b/Projectiles/Rogue/BouncingEyeballProjectile.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.tileCollide = true; projectile.timeLeft = 300; projectile.penetrate = 2; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override bool OnTileCollide(Vector2 oldVelocity) { diff --git a/Projectiles/Rogue/BouncingEyeballProjectileStealthStrike.cs b/Projectiles/Rogue/BouncingEyeballProjectileStealthStrike.cs index 87f7cc7c6b..85ff1b9623 100644 --- a/Projectiles/Rogue/BouncingEyeballProjectileStealthStrike.cs +++ b/Projectiles/Rogue/BouncingEyeballProjectileStealthStrike.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.tileCollide = true; projectile.timeLeft = 280; projectile.penetrate = -1; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/Rogue/BrackishFlask.cs b/Projectiles/Rogue/BrackishFlask.cs index 1b46431e8b..a6a75b04b0 100644 --- a/Projectiles/Rogue/BrackishFlask.cs +++ b/Projectiles/Rogue/BrackishFlask.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.aiStyle = 2; projectile.timeLeft = 180; aiType = 48; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void Kill(int timeLeft) diff --git a/Projectiles/Rogue/BrackishWater.cs b/Projectiles/Rogue/BrackishWater.cs index 94d7c293d5..8bc5b17234 100644 --- a/Projectiles/Rogue/BrackishWater.cs +++ b/Projectiles/Rogue/BrackishWater.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.ignoreWater = true; projectile.penetrate = 1; projectile.timeLeft = 60; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/Rogue/BrackishWaterBlast.cs b/Projectiles/Rogue/BrackishWaterBlast.cs index ceb2f45e16..85d3419afa 100644 --- a/Projectiles/Rogue/BrackishWaterBlast.cs +++ b/Projectiles/Rogue/BrackishWaterBlast.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.tileCollide = false; projectile.penetrate = -1; projectile.timeLeft = 60; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/Rogue/Brick.cs b/Projectiles/Rogue/Brick.cs index 09e933a1e9..04a0f2f749 100644 --- a/Projectiles/Rogue/Brick.cs +++ b/Projectiles/Rogue/Brick.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.width = 19; projectile.height = 19; projectile.friendly = true; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() @@ -65,7 +65,7 @@ namespace CalamityMod.Projectiles.Rogue } //Spawn the projectile - Projectile.NewProjectile(projectile.position.X + shardspeedX, projectile.position.Y + shardspeedY, shardspeedX, shardspeedY, mod.ProjectileType(), (int)(projectile.damage * 0.3), 2f, projectile.owner); + Projectile.NewProjectile(projectile.position.X + shardspeedX, projectile.position.Y + shardspeedY, shardspeedX, shardspeedY, ModContent.ProjectileType(), (int)(projectile.damage * 0.3), 2f, projectile.owner); split += 1; } } diff --git a/Projectiles/Rogue/BrickFragment.cs b/Projectiles/Rogue/BrickFragment.cs index 0f60d23fc7..6786470d7c 100644 --- a/Projectiles/Rogue/BrickFragment.cs +++ b/Projectiles/Rogue/BrickFragment.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.friendly = true; projectile.width = 13; projectile.height = 13; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() { diff --git a/Projectiles/Rogue/Brimblade.cs b/Projectiles/Rogue/Brimblade.cs index e2a31c1bae..6b2cadab9d 100644 --- a/Projectiles/Rogue/Brimblade.cs +++ b/Projectiles/Rogue/Brimblade.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.aiStyle = 3; projectile.timeLeft = 300; aiType = 52; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) diff --git a/Projectiles/Rogue/Brimblade2.cs b/Projectiles/Rogue/Brimblade2.cs index 42269c9bba..058b961525 100644 --- a/Projectiles/Rogue/Brimblade2.cs +++ b/Projectiles/Rogue/Brimblade2.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.aiStyle = 3; projectile.timeLeft = 300; aiType = 52; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) diff --git a/Projectiles/Rogue/ButcherKnife.cs b/Projectiles/Rogue/ButcherKnife.cs index eea33c43ef..0426123a64 100644 --- a/Projectiles/Rogue/ButcherKnife.cs +++ b/Projectiles/Rogue/ButcherKnife.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.friendly = true; projectile.penetrate = -1; projectile.timeLeft = 300; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; projectile.extraUpdates = 1; projectile.usesLocalNPCImmunity = true; projectile.localNPCHitCooldown = 60; diff --git a/Projectiles/Rogue/CarvingFork.cs b/Projectiles/Rogue/CarvingFork.cs index af5afc485e..5b5d73ddfa 100644 --- a/Projectiles/Rogue/CarvingFork.cs +++ b/Projectiles/Rogue/CarvingFork.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.aiStyle = 113; projectile.timeLeft = 600; aiType = 598; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; projectile.usesLocalNPCImmunity = true; projectile.localNPCHitCooldown = 30; } diff --git a/Projectiles/Rogue/Celestus.cs b/Projectiles/Rogue/Celestus.cs index 6e52df09d8..a325951b02 100644 --- a/Projectiles/Rogue/Celestus.cs +++ b/Projectiles/Rogue/Celestus.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.extraUpdates = 3; projectile.usesLocalNPCImmunity = true; projectile.localNPCHitCooldown = 30; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/Rogue/Celestus2.cs b/Projectiles/Rogue/Celestus2.cs index d78710c6ba..90928142f3 100644 --- a/Projectiles/Rogue/Celestus2.cs +++ b/Projectiles/Rogue/Celestus2.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.usesLocalNPCImmunity = true; projectile.localNPCHitCooldown = 40; projectile.timeLeft = 85; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/Rogue/CinquedeaProj.cs b/Projectiles/Rogue/CinquedeaProj.cs index 09fede144f..2e9c2b4f7e 100644 --- a/Projectiles/Rogue/CinquedeaProj.cs +++ b/Projectiles/Rogue/CinquedeaProj.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.penetrate = 2; projectile.tileCollide = false; projectile.extraUpdates = 1; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/Rogue/CobaltKunaiProjectile.cs b/Projectiles/Rogue/CobaltKunaiProjectile.cs index b35b43f538..8b5612166f 100644 --- a/Projectiles/Rogue/CobaltKunaiProjectile.cs +++ b/Projectiles/Rogue/CobaltKunaiProjectile.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.aiStyle = 2; projectile.timeLeft = 600; aiType = 48; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override bool OnTileCollide(Vector2 oldVelocity) diff --git a/Projectiles/Rogue/CosmicKunai.cs b/Projectiles/Rogue/CosmicKunai.cs index 7c8ebb643d..09c0ccf4aa 100644 --- a/Projectiles/Rogue/CosmicKunai.cs +++ b/Projectiles/Rogue/CosmicKunai.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.friendly = true; projectile.tileCollide = false; projectile.penetrate = 1; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/Rogue/CraniumSmasher.cs b/Projectiles/Rogue/CraniumSmasher.cs index 6a43b57d4c..6f20aa7028 100644 --- a/Projectiles/Rogue/CraniumSmasher.cs +++ b/Projectiles/Rogue/CraniumSmasher.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.usesLocalNPCImmunity = true; projectile.localNPCHitCooldown = 15; projectile.tileCollide = false; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/Rogue/CraniumSmasherExplosive.cs b/Projectiles/Rogue/CraniumSmasherExplosive.cs index 905d50b413..91cfa8f538 100644 --- a/Projectiles/Rogue/CraniumSmasherExplosive.cs +++ b/Projectiles/Rogue/CraniumSmasherExplosive.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.timeLeft = 300; projectile.localNPCHitCooldown = 15; projectile.tileCollide = false; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/Rogue/Crushax.cs b/Projectiles/Rogue/Crushax.cs index 3f41834b35..5c56a7f114 100644 --- a/Projectiles/Rogue/Crushax.cs +++ b/Projectiles/Rogue/Crushax.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.aiStyle = 2; projectile.timeLeft = 300; aiType = 48; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/Rogue/CrystalPiercerProjectile.cs b/Projectiles/Rogue/CrystalPiercerProjectile.cs index 2fed9b66ff..1976cb1ff1 100644 --- a/Projectiles/Rogue/CrystalPiercerProjectile.cs +++ b/Projectiles/Rogue/CrystalPiercerProjectile.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.aiStyle = 113; projectile.timeLeft = 600; aiType = 598; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/Rogue/Crystalline.cs b/Projectiles/Rogue/Crystalline.cs index def79fd719..00602a8e26 100644 --- a/Projectiles/Rogue/Crystalline.cs +++ b/Projectiles/Rogue/Crystalline.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.aiStyle = 113; projectile.timeLeft = 120; aiType = 598; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/Rogue/Crystalline2.cs b/Projectiles/Rogue/Crystalline2.cs index 7cd9a4624e..e4114935bc 100644 --- a/Projectiles/Rogue/Crystalline2.cs +++ b/Projectiles/Rogue/Crystalline2.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.aiStyle = 113; projectile.timeLeft = 30; aiType = 598; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/Rogue/CursedDagger.cs b/Projectiles/Rogue/CursedDagger.cs index 910f96ce2b..7134e1f7f1 100644 --- a/Projectiles/Rogue/CursedDagger.cs +++ b/Projectiles/Rogue/CursedDagger.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.aiStyle = 2; projectile.timeLeft = 600; aiType = 48; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override bool OnTileCollide(Vector2 oldVelocity) diff --git a/Projectiles/Rogue/DuststormCloud.cs b/Projectiles/Rogue/DuststormCloud.cs index 210471850f..519e7b04b2 100644 --- a/Projectiles/Rogue/DuststormCloud.cs +++ b/Projectiles/Rogue/DuststormCloud.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.tileCollide = false; projectile.ignoreWater = true; projectile.timeLeft = 3600; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/Rogue/DuststormInABottle.cs b/Projectiles/Rogue/DuststormInABottle.cs index 608872ea96..7d58f6f967 100644 --- a/Projectiles/Rogue/DuststormInABottle.cs +++ b/Projectiles/Rogue/DuststormInABottle.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.aiStyle = 2; projectile.timeLeft = 180; aiType = 48; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void Kill(int timeLeft) diff --git a/Projectiles/Rogue/EclipsesFallMain.cs b/Projectiles/Rogue/EclipsesFallMain.cs index 425511c88c..dc9bed25e4 100644 --- a/Projectiles/Rogue/EclipsesFallMain.cs +++ b/Projectiles/Rogue/EclipsesFallMain.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.extraUpdates = 1; projectile.ignoreWater = true; projectile.tileCollide = false; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/Rogue/EclipsesSmol.cs b/Projectiles/Rogue/EclipsesSmol.cs index 2c083f7e7b..3fa11cbd47 100644 --- a/Projectiles/Rogue/EclipsesSmol.cs +++ b/Projectiles/Rogue/EclipsesSmol.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.ignoreWater = true; projectile.timeLeft = 300; projectile.extraUpdates = 1; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/Rogue/EclipsesStealth.cs b/Projectiles/Rogue/EclipsesStealth.cs index 27c71c199c..9773437aac 100644 --- a/Projectiles/Rogue/EclipsesStealth.cs +++ b/Projectiles/Rogue/EclipsesStealth.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.tileCollide = false; projectile.usesLocalNPCImmunity = true; projectile.localNPCHitCooldown = 30; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/Rogue/EmpyreanKnives.cs b/Projectiles/Rogue/EmpyreanKnives.cs index 77c465e455..08c95297bb 100644 --- a/Projectiles/Rogue/EmpyreanKnives.cs +++ b/Projectiles/Rogue/EmpyreanKnives.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Projectiles.Rogue if (projectile.ai[1] == 1f) { projectile.melee = false; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } projectile.ai[0] += 1f; if (projectile.ai[0] >= 75f) diff --git a/Projectiles/Rogue/EradicatorProjectile.cs b/Projectiles/Rogue/EradicatorProjectile.cs index b653e59273..492eca0ccb 100644 --- a/Projectiles/Rogue/EradicatorProjectile.cs +++ b/Projectiles/Rogue/EradicatorProjectile.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Projectiles.Rogue aiType = 52; projectile.usesLocalNPCImmunity = true; projectile.localNPCHitCooldown = 3; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() @@ -80,7 +80,7 @@ namespace CalamityMod.Projectiles.Rogue if (projectile.owner == Main.myPlayer) { int proj = Projectile.NewProjectile(value10.X, value10.Y, num438, num439, mod.ProjectileType("NebulaShot"), projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f); - Main.projectile[proj].GetGlobalProjectile(mod).forceRogue = true; + Main.projectile[proj].Calamity().forceRogue = true; } } } diff --git a/Projectiles/Rogue/ExecutionersBlade.cs b/Projectiles/Rogue/ExecutionersBlade.cs index f17708b868..81841430b8 100644 --- a/Projectiles/Rogue/ExecutionersBlade.cs +++ b/Projectiles/Rogue/ExecutionersBlade.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.aiStyle = 2; projectile.timeLeft = 240; aiType = 48; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/Rogue/FeatherKnifeProjectile.cs b/Projectiles/Rogue/FeatherKnifeProjectile.cs index 84dbf49285..dc920400c4 100644 --- a/Projectiles/Rogue/FeatherKnifeProjectile.cs +++ b/Projectiles/Rogue/FeatherKnifeProjectile.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.aiStyle = 2; projectile.timeLeft = 600; aiType = 48; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override bool OnTileCollide(Vector2 oldVelocity) diff --git a/Projectiles/Rogue/FlameScytheProjectile.cs b/Projectiles/Rogue/FlameScytheProjectile.cs index a9ec2eae4c..192c22189b 100644 --- a/Projectiles/Rogue/FlameScytheProjectile.cs +++ b/Projectiles/Rogue/FlameScytheProjectile.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.timeLeft = 600; projectile.alpha = 55; aiType = 52; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() @@ -50,7 +50,7 @@ namespace CalamityMod.Projectiles.Rogue if (projectile.owner == Main.myPlayer) { int proj = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, mod.ProjectileType("FuckYou"), projectile.damage, projectile.knockBack, projectile.owner, 0f, 0.85f + Main.rand.NextFloat() * 1.15f); - Main.projectile[proj].GetGlobalProjectile(mod).forceRogue = true; + Main.projectile[proj].Calamity().forceRogue = true; } } } diff --git a/Projectiles/Rogue/Fork.cs b/Projectiles/Rogue/Fork.cs index 82e9fa417d..bc092c50b1 100644 --- a/Projectiles/Rogue/Fork.cs +++ b/Projectiles/Rogue/Fork.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.aiStyle = 113; projectile.timeLeft = 600; aiType = 598; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/Rogue/FossilShardThrown.cs b/Projectiles/Rogue/FossilShardThrown.cs index bfeaae0084..34df455317 100644 --- a/Projectiles/Rogue/FossilShardThrown.cs +++ b/Projectiles/Rogue/FossilShardThrown.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.aiStyle = 1; projectile.timeLeft = 90; aiType = 1; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/Rogue/GelDartProjectile.cs b/Projectiles/Rogue/GelDartProjectile.cs index 05b2b63e80..858959518a 100644 --- a/Projectiles/Rogue/GelDartProjectile.cs +++ b/Projectiles/Rogue/GelDartProjectile.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.aiStyle = 2; projectile.timeLeft = 600; aiType = 48; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override bool OnTileCollide(Vector2 oldVelocity) diff --git a/Projectiles/Rogue/GhoulishGouger.cs b/Projectiles/Rogue/GhoulishGouger.cs index b36f80b549..fd8cc7eb82 100644 --- a/Projectiles/Rogue/GhoulishGouger.cs +++ b/Projectiles/Rogue/GhoulishGouger.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.extraUpdates = 4; projectile.usesLocalNPCImmunity = true; projectile.localNPCHitCooldown = 2; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/Rogue/GlaiveProj.cs b/Projectiles/Rogue/GlaiveProj.cs index 8ac7d7dacb..4b3c40732b 100644 --- a/Projectiles/Rogue/GlaiveProj.cs +++ b/Projectiles/Rogue/GlaiveProj.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.penetrate = 3; projectile.timeLeft = Lifetime; drawOffsetX = -10; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/Rogue/IceStarProjectile.cs b/Projectiles/Rogue/IceStarProjectile.cs index c5cd4aad55..181d201c2c 100644 --- a/Projectiles/Rogue/IceStarProjectile.cs +++ b/Projectiles/Rogue/IceStarProjectile.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.aiStyle = 2; projectile.timeLeft = 280; aiType = 48; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/Rogue/IchorSpear.cs b/Projectiles/Rogue/IchorSpear.cs index 5bd99fc14e..46dfd24f0d 100644 --- a/Projectiles/Rogue/IchorSpear.cs +++ b/Projectiles/Rogue/IchorSpear.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.aiStyle = 113; projectile.timeLeft = 600; aiType = 598; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/Rogue/IchorSpear2.cs b/Projectiles/Rogue/IchorSpear2.cs index 216ba92003..109f1dad9d 100644 --- a/Projectiles/Rogue/IchorSpear2.cs +++ b/Projectiles/Rogue/IchorSpear2.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.aiStyle = 113; projectile.timeLeft = 600; aiType = 598; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/Rogue/Knife.cs b/Projectiles/Rogue/Knife.cs index 47467a6a1f..568f0d32b5 100644 --- a/Projectiles/Rogue/Knife.cs +++ b/Projectiles/Rogue/Knife.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.aiStyle = 113; projectile.timeLeft = 600; aiType = 598; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/Rogue/Lionfish.cs b/Projectiles/Rogue/Lionfish.cs index da5e1dedaa..65c11115d8 100644 --- a/Projectiles/Rogue/Lionfish.cs +++ b/Projectiles/Rogue/Lionfish.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.ignoreWater = true; projectile.penetrate = -1; projectile.alpha = 255; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/Rogue/Malachite.cs b/Projectiles/Rogue/Malachite.cs index eb01d86130..048b5613f3 100644 --- a/Projectiles/Rogue/Malachite.cs +++ b/Projectiles/Rogue/Malachite.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Projectiles.Rogue aiType = 514; projectile.usesLocalNPCImmunity = true; projectile.localNPCHitCooldown = 1; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/Rogue/MalachiteBolt.cs b/Projectiles/Rogue/MalachiteBolt.cs index 3954adc1a9..1d0c94fb32 100644 --- a/Projectiles/Rogue/MalachiteBolt.cs +++ b/Projectiles/Rogue/MalachiteBolt.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.extraUpdates = 10; projectile.usesLocalNPCImmunity = true; projectile.localNPCHitCooldown = 10; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/Rogue/MangroveChakramProjectile.cs b/Projectiles/Rogue/MangroveChakramProjectile.cs index 0b3b3c805f..ddbbe98cea 100644 --- a/Projectiles/Rogue/MangroveChakramProjectile.cs +++ b/Projectiles/Rogue/MangroveChakramProjectile.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.aiStyle = 3; projectile.timeLeft = 600; aiType = 52; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/Rogue/MeteorFist.cs b/Projectiles/Rogue/MeteorFist.cs index af5ab65cdf..75fd3c73bb 100644 --- a/Projectiles/Rogue/MeteorFist.cs +++ b/Projectiles/Rogue/MeteorFist.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.friendly = true; projectile.penetrate = 1; projectile.timeLeft = 180; - projectile.GetCalamityProj().rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/Rogue/MoltenAmputator.cs b/Projectiles/Rogue/MoltenAmputator.cs index 4e1131b22e..11105cfe1f 100644 --- a/Projectiles/Rogue/MoltenAmputator.cs +++ b/Projectiles/Rogue/MoltenAmputator.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.aiStyle = 3; projectile.timeLeft = 300; aiType = 52; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) diff --git a/Projectiles/Rogue/MoltenBlobThrown.cs b/Projectiles/Rogue/MoltenBlobThrown.cs index dbc9172e20..ace7351982 100644 --- a/Projectiles/Rogue/MoltenBlobThrown.cs +++ b/Projectiles/Rogue/MoltenBlobThrown.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.friendly = true; projectile.penetrate = 1; projectile.timeLeft = 300; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/Rogue/MonkeyDart.cs b/Projectiles/Rogue/MonkeyDart.cs index 392144ec33..16da3ec20a 100644 --- a/Projectiles/Rogue/MonkeyDart.cs +++ b/Projectiles/Rogue/MonkeyDart.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Projectiles.Rogue drawOriginOffsetY = 0; drawOriginOffsetX = 0; projectile.extraUpdates = 1; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() @@ -70,7 +70,7 @@ namespace CalamityMod.Projectiles.Rogue //Randomly not consume item if it wasnt a stealth strike if (Main.rand.Next(4) == 0 && projectile.ai[0] != 1) { - Item.NewItem((int)projectile.position.X,(int) projectile.position.Y, 27, 27, mod.ItemType() ); + Item.NewItem((int)projectile.position.X,(int) projectile.position.Y, 27, 27, ModContent.ItemType() ); } } diff --git a/Projectiles/Rogue/Mycoroot.cs b/Projectiles/Rogue/Mycoroot.cs index 833af2e073..56a335746b 100644 --- a/Projectiles/Rogue/Mycoroot.cs +++ b/Projectiles/Rogue/Mycoroot.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.height = 12; projectile.friendly = true; projectile.penetrate = 1; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/Rogue/MythrilKnifeProjectile.cs b/Projectiles/Rogue/MythrilKnifeProjectile.cs index d8a4c64d16..97c2863317 100644 --- a/Projectiles/Rogue/MythrilKnifeProjectile.cs +++ b/Projectiles/Rogue/MythrilKnifeProjectile.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.aiStyle = 2; projectile.timeLeft = 600; aiType = 48; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override bool OnTileCollide(Vector2 oldVelocity) diff --git a/Projectiles/Rogue/OPHammer.cs b/Projectiles/Rogue/OPHammer.cs index 41efc251d1..48ea16ef7a 100644 --- a/Projectiles/Rogue/OPHammer.cs +++ b/Projectiles/Rogue/OPHammer.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.tileCollide = false; projectile.penetrate = -1; projectile.extraUpdates = 2; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() @@ -117,7 +117,7 @@ namespace CalamityMod.Projectiles.Rogue if (projectile.owner == Main.myPlayer) { int proj = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, mod.ProjectileType("FuckYou"), projectile.damage, projectile.knockBack, projectile.owner, 0f, 0.85f + Main.rand.NextFloat() * 1.15f); - Main.projectile[proj].GetGlobalProjectile(mod).forceRogue = true; + Main.projectile[proj].Calamity().forceRogue = true; } } diff --git a/Projectiles/Rogue/OrichalcumSpikedGemstoneProjectile.cs b/Projectiles/Rogue/OrichalcumSpikedGemstoneProjectile.cs index 549e799237..50bb26b31a 100644 --- a/Projectiles/Rogue/OrichalcumSpikedGemstoneProjectile.cs +++ b/Projectiles/Rogue/OrichalcumSpikedGemstoneProjectile.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.penetrate = 6; projectile.timeLeft = 600; aiType = 48; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override bool OnTileCollide(Vector2 oldVelocity) diff --git a/Projectiles/Rogue/PalladiumJavelinProjectile.cs b/Projectiles/Rogue/PalladiumJavelinProjectile.cs index 8ae7a9ebcb..c1ab2acddb 100644 --- a/Projectiles/Rogue/PalladiumJavelinProjectile.cs +++ b/Projectiles/Rogue/PalladiumJavelinProjectile.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.aiStyle = 113; projectile.timeLeft = 600; aiType = 598; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/Rogue/ProfanedTrident.cs b/Projectiles/Rogue/ProfanedTrident.cs index a98a2629f8..794cb5f15e 100644 --- a/Projectiles/Rogue/ProfanedTrident.cs +++ b/Projectiles/Rogue/ProfanedTrident.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.penetrate = 1; projectile.tileCollide = false; projectile.timeLeft = 300; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/Rogue/Pwnagehammer.cs b/Projectiles/Rogue/Pwnagehammer.cs index 2f3160616e..cbb60ef4d9 100644 --- a/Projectiles/Rogue/Pwnagehammer.cs +++ b/Projectiles/Rogue/Pwnagehammer.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.timeLeft = 120; projectile.extraUpdates = 3; aiType = 301; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/Rogue/RotBallProjectile.cs b/Projectiles/Rogue/RotBallProjectile.cs index 003aa3bf92..28e1f6ee6c 100644 --- a/Projectiles/Rogue/RotBallProjectile.cs +++ b/Projectiles/Rogue/RotBallProjectile.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.aiStyle = 2; projectile.timeLeft = 600; aiType = 48; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) diff --git a/Projectiles/Rogue/RoyalKnife.cs b/Projectiles/Rogue/RoyalKnife.cs index 42609f3844..28ebb4e5df 100644 --- a/Projectiles/Rogue/RoyalKnife.cs +++ b/Projectiles/Rogue/RoyalKnife.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.friendly = true; projectile.penetrate = 1; projectile.timeLeft = 300; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/Rogue/ScarletBlast.cs b/Projectiles/Rogue/ScarletBlast.cs index 7a421f69cf..d7ebb504ee 100644 --- a/Projectiles/Rogue/ScarletBlast.cs +++ b/Projectiles/Rogue/ScarletBlast.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.timeLeft = 30; projectile.usesLocalNPCImmunity = true; projectile.localNPCHitCooldown = 1; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/Rogue/ScarletDevilBullet.cs b/Projectiles/Rogue/ScarletDevilBullet.cs index 5d9fa8aaf6..bc489173c7 100644 --- a/Projectiles/Rogue/ScarletDevilBullet.cs +++ b/Projectiles/Rogue/ScarletDevilBullet.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.timeLeft = 140; projectile.tileCollide = false; projectile.ignoreWater = true; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/Rogue/ScarletDevilProjectile.cs b/Projectiles/Rogue/ScarletDevilProjectile.cs index 330f0adde8..313e230e1c 100644 --- a/Projectiles/Rogue/ScarletDevilProjectile.cs +++ b/Projectiles/Rogue/ScarletDevilProjectile.cs @@ -28,19 +28,19 @@ namespace CalamityMod.Projectiles.Rogue projectile.tileCollide = false; projectile.timeLeft = 300; projectile.extraUpdates = 1; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } - + public override void AI() { - CalamityPlayer modPlayer = Main.player[Main.myPlayer].GetCalamityPlayer(); + CalamityPlayer modPlayer = Main.player[Main.myPlayer].Calamity(); 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); projectile.ai[0] += 1f; if (projectile.ai[0] == 1f && modPlayer.StealthStrikeAvailable()) { - projectile.GetCalamityProj().stealthStrike = true; + projectile.Calamity().stealthStrike = true; lifesteal = true; } if ((projectile.ai[0] %= 5f) == 0f) diff --git a/Projectiles/Rogue/ScourgeVenomCloud.cs b/Projectiles/Rogue/ScourgeVenomCloud.cs index 0316c517ee..63bdbdcdd9 100644 --- a/Projectiles/Rogue/ScourgeVenomCloud.cs +++ b/Projectiles/Rogue/ScourgeVenomCloud.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.timeLeft = 3600; projectile.usesLocalNPCImmunity = true; projectile.localNPCHitCooldown = 30; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/Rogue/ScourgeoftheDesert.cs b/Projectiles/Rogue/ScourgeoftheDesert.cs index 6c4ef3c1ea..cce72a54e5 100644 --- a/Projectiles/Rogue/ScourgeoftheDesert.cs +++ b/Projectiles/Rogue/ScourgeoftheDesert.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.aiStyle = 113; aiType = 598; projectile.penetrate = 3; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/Rogue/ScourgeoftheDesert2.cs b/Projectiles/Rogue/ScourgeoftheDesert2.cs index 54c6e44480..130194b47b 100644 --- a/Projectiles/Rogue/ScourgeoftheDesert2.cs +++ b/Projectiles/Rogue/ScourgeoftheDesert2.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.height = 26; projectile.friendly = true; projectile.penetrate = 6; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/Rogue/ScourgeoftheSeasProjectile.cs b/Projectiles/Rogue/ScourgeoftheSeasProjectile.cs index b99e150e4d..aee44bd1c3 100644 --- a/Projectiles/Rogue/ScourgeoftheSeasProjectile.cs +++ b/Projectiles/Rogue/ScourgeoftheSeasProjectile.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.penetrate = 1; projectile.extraUpdates = 1; projectile.timeLeft = 1200; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/Rogue/ScourgeoftheSeasStealth.cs b/Projectiles/Rogue/ScourgeoftheSeasStealth.cs index 461bc85be5..b69d070557 100644 --- a/Projectiles/Rogue/ScourgeoftheSeasStealth.cs +++ b/Projectiles/Rogue/ScourgeoftheSeasStealth.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.penetrate = -1; projectile.extraUpdates = 1; projectile.timeLeft = 1200; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; projectile.usesLocalNPCImmunity = true; projectile.localNPCHitCooldown = 60; } diff --git a/Projectiles/Rogue/SeashellBoomerangProjectile.cs b/Projectiles/Rogue/SeashellBoomerangProjectile.cs index 8524e0a4bf..bc4d4d5050 100644 --- a/Projectiles/Rogue/SeashellBoomerangProjectile.cs +++ b/Projectiles/Rogue/SeashellBoomerangProjectile.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.aiStyle = 3; projectile.timeLeft = 240; aiType = 52; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } } } diff --git a/Projectiles/Rogue/ShatteredExplosion.cs b/Projectiles/Rogue/ShatteredExplosion.cs index 7954a5eaaa..4f147078b5 100644 --- a/Projectiles/Rogue/ShatteredExplosion.cs +++ b/Projectiles/Rogue/ShatteredExplosion.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.timeLeft = 15; projectile.usesLocalNPCImmunity = true; projectile.localNPCHitCooldown = 5; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/Rogue/ShatteredSun.cs b/Projectiles/Rogue/ShatteredSun.cs index 2ff0e44f23..8f16087dbe 100644 --- a/Projectiles/Rogue/ShatteredSun.cs +++ b/Projectiles/Rogue/ShatteredSun.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.tileCollide = false; projectile.usesLocalNPCImmunity = true; projectile.localNPCHitCooldown = 15; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/Rogue/ShatteredSun2.cs b/Projectiles/Rogue/ShatteredSun2.cs index 29707b916a..0c4f54167d 100644 --- a/Projectiles/Rogue/ShatteredSun2.cs +++ b/Projectiles/Rogue/ShatteredSun2.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.timeLeft = 300; projectile.usesLocalNPCImmunity = true; projectile.localNPCHitCooldown = 15; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/Rogue/ShatteredSun3.cs b/Projectiles/Rogue/ShatteredSun3.cs index 1000a2ad5c..492c035336 100644 --- a/Projectiles/Rogue/ShatteredSun3.cs +++ b/Projectiles/Rogue/ShatteredSun3.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.friendly = true; projectile.penetrate = 1; projectile.timeLeft = 300; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/Rogue/SpearofPaleolith.cs b/Projectiles/Rogue/SpearofPaleolith.cs index 5fe9098d7c..718eebde28 100644 --- a/Projectiles/Rogue/SpearofPaleolith.cs +++ b/Projectiles/Rogue/SpearofPaleolith.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.aiStyle = 113; projectile.timeLeft = 600; aiType = 598; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/Rogue/Stormfrontproj.cs b/Projectiles/Rogue/Stormfrontproj.cs index 0a3c986aeb..da18a6e87d 100644 --- a/Projectiles/Rogue/Stormfrontproj.cs +++ b/Projectiles/Rogue/Stormfrontproj.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.penetrate = 5; projectile.timeLeft = 300; projectile.extraUpdates = 1; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/Rogue/Stormfrontspark.cs b/Projectiles/Rogue/Stormfrontspark.cs index 4761d6bebb..1f13886678 100644 --- a/Projectiles/Rogue/Stormfrontspark.cs +++ b/Projectiles/Rogue/Stormfrontspark.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.height = 12; projectile.timeLeft = 240; projectile.penetrate = -1; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/Rogue/TarragonThrowingDartProjectile.cs b/Projectiles/Rogue/TarragonThrowingDartProjectile.cs index f572bec3b4..8ecd1e4e2f 100644 --- a/Projectiles/Rogue/TarragonThrowingDartProjectile.cs +++ b/Projectiles/Rogue/TarragonThrowingDartProjectile.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.aiStyle = 113; projectile.timeLeft = 600; aiType = 598; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/Rogue/TitaniumShurikenProjectile.cs b/Projectiles/Rogue/TitaniumShurikenProjectile.cs index 33a3cbc39b..defcad7d6d 100644 --- a/Projectiles/Rogue/TitaniumShurikenProjectile.cs +++ b/Projectiles/Rogue/TitaniumShurikenProjectile.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.aiStyle = 2; projectile.timeLeft = 600; aiType = 48; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) diff --git a/Projectiles/Rogue/ToothBallProjectile.cs b/Projectiles/Rogue/ToothBallProjectile.cs index 26b4b1fee5..5fc85287ff 100644 --- a/Projectiles/Rogue/ToothBallProjectile.cs +++ b/Projectiles/Rogue/ToothBallProjectile.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.aiStyle = 2; projectile.timeLeft = 600; aiType = 48; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) diff --git a/Projectiles/Rogue/TriactisOPHammer.cs b/Projectiles/Rogue/TriactisOPHammer.cs index af145fd12a..911eb0975d 100644 --- a/Projectiles/Rogue/TriactisOPHammer.cs +++ b/Projectiles/Rogue/TriactisOPHammer.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.tileCollide = false; projectile.penetrate = -1; projectile.extraUpdates = 3; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/Rogue/UrchinStinger.cs b/Projectiles/Rogue/UrchinStinger.cs index fa74aee6dc..404c57d909 100644 --- a/Projectiles/Rogue/UrchinStinger.cs +++ b/Projectiles/Rogue/UrchinStinger.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.aiStyle = 2; projectile.timeLeft = 600; aiType = 48; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) diff --git a/Projectiles/Rogue/Valediction.cs b/Projectiles/Rogue/Valediction.cs index 145ee9f235..eed74aac7c 100644 --- a/Projectiles/Rogue/Valediction.cs +++ b/Projectiles/Rogue/Valediction.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.extraUpdates = 3; projectile.usesLocalNPCImmunity = true; projectile.localNPCHitCooldown = 15; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/Rogue/Valediction2.cs b/Projectiles/Rogue/Valediction2.cs index 2a7452244f..66ec5dc524 100644 --- a/Projectiles/Rogue/Valediction2.cs +++ b/Projectiles/Rogue/Valediction2.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.extraUpdates = 3; projectile.usesLocalNPCImmunity = true; projectile.localNPCHitCooldown = 15; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/Rogue/WulfrumKnife.cs b/Projectiles/Rogue/WulfrumKnife.cs index 410a7b0a03..c57f765f42 100644 --- a/Projectiles/Rogue/WulfrumKnife.cs +++ b/Projectiles/Rogue/WulfrumKnife.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.aiStyle = 2; projectile.timeLeft = 600; aiType = 48; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) diff --git a/Projectiles/Rogue/XerocPitchforkProjectile.cs b/Projectiles/Rogue/XerocPitchforkProjectile.cs index d06420366f..d60cc5fb15 100644 --- a/Projectiles/Rogue/XerocPitchforkProjectile.cs +++ b/Projectiles/Rogue/XerocPitchforkProjectile.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.aiStyle = 113; projectile.timeLeft = 600; aiType = 598; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/Shrines/GladiatorSword.cs b/Projectiles/Shrines/GladiatorSword.cs index 27fc3d8f92..47dc0666f3 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (!modPlayer.gladiatorSword) { projectile.active = false; diff --git a/Projectiles/Shrines/GladiatorSword2.cs b/Projectiles/Shrines/GladiatorSword2.cs index cb54a8803b..e4649ec1c1 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (!modPlayer.gladiatorSword) { projectile.active = false; diff --git a/Projectiles/Shrines/LuxorsGiftRogue.cs b/Projectiles/Shrines/LuxorsGiftRogue.cs index f390f35e48..237ed19451 100644 --- a/Projectiles/Shrines/LuxorsGiftRogue.cs +++ b/Projectiles/Shrines/LuxorsGiftRogue.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Projectiles.Shrines aiType = 48; projectile.usesLocalNPCImmunity = true; projectile.localNPCHitCooldown = 10; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/Shrines/LuxorsGiftSummon.cs b/Projectiles/Shrines/LuxorsGiftSummon.cs index bdc41195d5..1a4a243e00 100644 --- a/Projectiles/Shrines/LuxorsGiftSummon.cs +++ b/Projectiles/Shrines/LuxorsGiftSummon.cs @@ -41,8 +41,8 @@ namespace CalamityMod.Projectiles.Shrines { if (dust > 0) { - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue = projectile.damage; + projectile.Calamity().spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; + projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage; int num226 = 36; for (int num227 = 0; num227 < num226; num227++) { @@ -55,10 +55,10 @@ namespace CalamityMod.Projectiles.Shrines } dust--; } - if (Main.player[projectile.owner].minionDamage != projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) + if (Main.player[projectile.owner].minionDamage != projectile.Calamity().spawnedPlayerMinionDamageValue) { - int damage2 = (int)(((float)projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue / - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) * + int damage2 = (int)(((float)projectile.Calamity().spawnedPlayerMinionProjectileDamageValue / + projectile.Calamity().spawnedPlayerMinionDamageValue) * Main.player[projectile.owner].minionDamage); projectile.damage = damage2; } @@ -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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (flag64) { if (!modPlayer.luxorsGift || player.dead) diff --git a/Projectiles/Summon/AngryChicken.cs b/Projectiles/Summon/AngryChicken.cs index 652e147880..0c27caccd3 100644 --- a/Projectiles/Summon/AngryChicken.cs +++ b/Projectiles/Summon/AngryChicken.cs @@ -40,8 +40,8 @@ namespace CalamityMod.Projectiles.Summon { if (projectile.localAI[0] == 0f) { - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue = projectile.damage; + projectile.Calamity().spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; + projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage; int num501 = 100; for (int num502 = 0; num502 < num501; num502++) { @@ -51,10 +51,10 @@ namespace CalamityMod.Projectiles.Summon } projectile.localAI[0] += 1f; } - if (Main.player[projectile.owner].minionDamage != projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) + if (Main.player[projectile.owner].minionDamage != projectile.Calamity().spawnedPlayerMinionDamageValue) { - int damage2 = (int)(((float)projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue / - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) * + int damage2 = (int)(((float)projectile.Calamity().spawnedPlayerMinionProjectileDamageValue / + projectile.Calamity().spawnedPlayerMinionDamageValue) * Main.player[projectile.owner].minionDamage); projectile.damage = damage2; } @@ -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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); player.AddBuff(mod.BuffType("AngryChicken"), 3600); if (flag64) { diff --git a/Projectiles/Summon/AquaticStar.cs b/Projectiles/Summon/AquaticStar.cs index 94034123b2..2b7fcce6c4 100644 --- a/Projectiles/Summon/AquaticStar.cs +++ b/Projectiles/Summon/AquaticStar.cs @@ -38,8 +38,8 @@ namespace CalamityMod.Projectiles.Summon { if (dust == 0f) { - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue = projectile.damage; + projectile.Calamity().spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; + projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage; int num226 = 36; for (int num227 = 0; num227 < num226; num227++) { @@ -53,17 +53,17 @@ namespace CalamityMod.Projectiles.Summon } dust += 1f; } - if (Main.player[projectile.owner].minionDamage != projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) + if (Main.player[projectile.owner].minionDamage != projectile.Calamity().spawnedPlayerMinionDamageValue) { - int damage2 = (int)(((float)projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue / - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) * + int damage2 = (int)(((float)projectile.Calamity().spawnedPlayerMinionProjectileDamageValue / + projectile.Calamity().spawnedPlayerMinionDamageValue) * Main.player[projectile.owner].minionDamage); projectile.damage = damage2; } projectile.rotation += projectile.velocity.X * 0.04f; bool flag64 = projectile.type == mod.ProjectileType("AquaticStar"); Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); player.AddBuff(mod.BuffType("AquaticStar"), 3600); if (flag64) { diff --git a/Projectiles/Summon/BigBustyRose.cs b/Projectiles/Summon/BigBustyRose.cs index 8c76860cb6..a88be5a51a 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (!modPlayer.brimstoneWaifu && !modPlayer.allWaifus) { projectile.active = false; @@ -65,8 +65,8 @@ namespace CalamityMod.Projectiles.Summon dust--; if (dust >= 0) { - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue = projectile.damage; + projectile.Calamity().spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; + projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage; int num501 = 50; for (int num502 = 0; num502 < num501; num502++) { @@ -75,10 +75,10 @@ namespace CalamityMod.Projectiles.Summon Main.dust[num503].scale *= 1.15f; } } - if (Main.player[projectile.owner].minionDamage != projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) + if (Main.player[projectile.owner].minionDamage != projectile.Calamity().spawnedPlayerMinionDamageValue) { - int damage2 = (int)(((float)projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue / - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) * + int damage2 = (int)(((float)projectile.Calamity().spawnedPlayerMinionProjectileDamageValue / + projectile.Calamity().spawnedPlayerMinionDamageValue) * Main.player[projectile.owner].minionDamage); projectile.damage = damage2; } @@ -234,7 +234,7 @@ namespace CalamityMod.Projectiles.Summon value19 *= scaleFactor3; int num659 = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, value19.X, value19.Y, num658, projectile.damage, 0f, Main.myPlayer, 0f, 0f); Main.projectile[num659].timeLeft = 200; - Main.projectile[num659].GetGlobalProjectile(mod).forceMinion = true; + Main.projectile[num659].Calamity().forceMinion = true; projectile.netUpdate = true; } } diff --git a/Projectiles/Summon/BlackHawkSummon.cs b/Projectiles/Summon/BlackHawkSummon.cs index 25f7ce94ee..a56a8e0352 100644 --- a/Projectiles/Summon/BlackHawkSummon.cs +++ b/Projectiles/Summon/BlackHawkSummon.cs @@ -66,8 +66,8 @@ namespace CalamityMod.Projectiles.Summon { if (projectile.localAI[0] == 0f) { - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue = projectile.damage; + projectile.Calamity().spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; + projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage; int num226 = 36; for (int num227 = 0; num227 < num226; num227++) { @@ -80,10 +80,10 @@ namespace CalamityMod.Projectiles.Summon } projectile.localAI[0] += 1f; } - if (Main.player[projectile.owner].minionDamage != projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) + if (Main.player[projectile.owner].minionDamage != projectile.Calamity().spawnedPlayerMinionDamageValue) { - int damage2 = (int)(((float)projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue / - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) * + int damage2 = (int)(((float)projectile.Calamity().spawnedPlayerMinionProjectileDamageValue / + projectile.Calamity().spawnedPlayerMinionDamageValue) * Main.player[projectile.owner].minionDamage); projectile.damage = damage2; } diff --git a/Projectiles/Summon/BloodClotMinion.cs b/Projectiles/Summon/BloodClotMinion.cs index ee66173ab2..cec1497064 100644 --- a/Projectiles/Summon/BloodClotMinion.cs +++ b/Projectiles/Summon/BloodClotMinion.cs @@ -37,8 +37,8 @@ namespace CalamityMod.Projectiles.Summon { if (projectile.localAI[0] == 0f) { - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue = projectile.damage; + projectile.Calamity().spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; + projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage; int num226 = 36; for (int num227 = 0; num227 < num226; num227++) { @@ -52,10 +52,10 @@ namespace CalamityMod.Projectiles.Summon } projectile.localAI[0] += 1f; } - if (Main.player[projectile.owner].minionDamage != projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) + if (Main.player[projectile.owner].minionDamage != projectile.Calamity().spawnedPlayerMinionDamageValue) { - int damage2 = (int)(((float)projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue / - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) * + int damage2 = (int)(((float)projectile.Calamity().spawnedPlayerMinionProjectileDamageValue / + projectile.Calamity().spawnedPlayerMinionDamageValue) * Main.player[projectile.owner].minionDamage); projectile.damage = damage2; } @@ -75,7 +75,7 @@ namespace CalamityMod.Projectiles.Summon } bool flag64 = projectile.type == mod.ProjectileType("BloodClotMinion"); Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); player.AddBuff(mod.BuffType("BloodClot"), 3600); if (flag64) { diff --git a/Projectiles/Summon/BrittleStar.cs b/Projectiles/Summon/BrittleStar.cs index 24f0cf2b25..4a8b9249f1 100644 --- a/Projectiles/Summon/BrittleStar.cs +++ b/Projectiles/Summon/BrittleStar.cs @@ -38,8 +38,8 @@ namespace CalamityMod.Projectiles.Summon { if (dust == 0f) { - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue = projectile.damage; + projectile.Calamity().spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; + projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage; int num226 = 36; for (int num227 = 0; num227 < num226; num227++) { @@ -53,17 +53,17 @@ namespace CalamityMod.Projectiles.Summon } dust += 1f; } - if (Main.player[projectile.owner].minionDamage != projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) + if (Main.player[projectile.owner].minionDamage != projectile.Calamity().spawnedPlayerMinionDamageValue) { - int damage2 = (int)(((float)projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue / - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) * + int damage2 = (int)(((float)projectile.Calamity().spawnedPlayerMinionProjectileDamageValue / + projectile.Calamity().spawnedPlayerMinionDamageValue) * Main.player[projectile.owner].minionDamage); projectile.damage = damage2; } projectile.rotation += projectile.velocity.X * 0.04f; bool flag64 = projectile.type == mod.ProjectileType("BrittleStar"); Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); player.AddBuff(mod.BuffType("BrittleStar"), 3600); if (flag64) { diff --git a/Projectiles/Summon/Calamari.cs b/Projectiles/Summon/Calamari.cs index 3d71fa5ba1..f4dc3a49bf 100644 --- a/Projectiles/Summon/Calamari.cs +++ b/Projectiles/Summon/Calamari.cs @@ -39,8 +39,8 @@ namespace CalamityMod.Projectiles.Summon { if (projectile.localAI[1] == 0f) { - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; //66% = 1.66 - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue = projectile.damage; //300 * 1.66 = 498 (new value) + projectile.Calamity().spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; //66% = 1.66 + projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage; //300 * 1.66 = 498 (new value) int num226 = 36; for (int num227 = 0; num227 < num226; num227++) { @@ -54,10 +54,10 @@ namespace CalamityMod.Projectiles.Summon } projectile.localAI[1] += 1f; } - if (Main.player[projectile.owner].minionDamage != projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) //15% = 1.15 != 1.66 + if (Main.player[projectile.owner].minionDamage != projectile.Calamity().spawnedPlayerMinionDamageValue) //15% = 1.15 != 1.66 { - int damage2 = (int)(((float)projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue / //498 - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) * //1.66 498 / 1.66 = 300 (original value) + int damage2 = (int)(((float)projectile.Calamity().spawnedPlayerMinionProjectileDamageValue / //498 + projectile.Calamity().spawnedPlayerMinionDamageValue) * //1.66 498 / 1.66 = 300 (original value) Main.player[projectile.owner].minionDamage); //300 * 1.15 = 345 (new value) projectile.damage = damage2; } @@ -73,7 +73,7 @@ namespace CalamityMod.Projectiles.Summon } bool flag64 = projectile.type == mod.ProjectileType("Calamari"); Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); player.AddBuff(mod.BuffType("Calamari"), 3600); if (flag64) { diff --git a/Projectiles/Summon/Calamitamini.cs b/Projectiles/Summon/Calamitamini.cs index b3303f7ef7..0a151558c8 100644 --- a/Projectiles/Summon/Calamitamini.cs +++ b/Projectiles/Summon/Calamitamini.cs @@ -37,8 +37,8 @@ namespace CalamityMod.Projectiles.Summon { if (projectile.localAI[0] == 0f) { - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue = projectile.damage; + projectile.Calamity().spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; + projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage; int num226 = 36; for (int num227 = 0; num227 < num226; num227++) { @@ -51,10 +51,10 @@ namespace CalamityMod.Projectiles.Summon } projectile.localAI[0] += 1f; } - if (Main.player[projectile.owner].minionDamage != projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) + if (Main.player[projectile.owner].minionDamage != projectile.Calamity().spawnedPlayerMinionDamageValue) { - int damage2 = (int)(((float)projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue / - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) * + int damage2 = (int)(((float)projectile.Calamity().spawnedPlayerMinionProjectileDamageValue / + projectile.Calamity().spawnedPlayerMinionDamageValue) * Main.player[projectile.owner].minionDamage); projectile.damage = damage2; } @@ -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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); player.AddBuff(mod.BuffType("CalamitasEyes"), 3600); if (flag64) { diff --git a/Projectiles/Summon/Cataclymini.cs b/Projectiles/Summon/Cataclymini.cs index 24dc48a465..f153dce789 100644 --- a/Projectiles/Summon/Cataclymini.cs +++ b/Projectiles/Summon/Cataclymini.cs @@ -37,8 +37,8 @@ namespace CalamityMod.Projectiles.Summon { if (projectile.localAI[0] == 0f) { - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue = projectile.damage; + projectile.Calamity().spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; + projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage; int num226 = 36; for (int num227 = 0; num227 < num226; num227++) { @@ -51,10 +51,10 @@ namespace CalamityMod.Projectiles.Summon } projectile.localAI[0] += 1f; } - if (Main.player[projectile.owner].minionDamage != projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) + if (Main.player[projectile.owner].minionDamage != projectile.Calamity().spawnedPlayerMinionDamageValue) { - int damage2 = (int)(((float)projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue / - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) * + int damage2 = (int)(((float)projectile.Calamity().spawnedPlayerMinionProjectileDamageValue / + projectile.Calamity().spawnedPlayerMinionDamageValue) * Main.player[projectile.owner].minionDamage); projectile.damage = damage2; } @@ -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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (flag64) { if (player.dead) diff --git a/Projectiles/Summon/Catastromini.cs b/Projectiles/Summon/Catastromini.cs index 0b454e5572..df3d6addcb 100644 --- a/Projectiles/Summon/Catastromini.cs +++ b/Projectiles/Summon/Catastromini.cs @@ -37,8 +37,8 @@ namespace CalamityMod.Projectiles.Summon { if (projectile.localAI[0] == 0f) { - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue = projectile.damage; + projectile.Calamity().spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; + projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage; int num226 = 36; for (int num227 = 0; num227 < num226; num227++) { @@ -51,10 +51,10 @@ namespace CalamityMod.Projectiles.Summon } projectile.localAI[0] += 1f; } - if (Main.player[projectile.owner].minionDamage != projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) + if (Main.player[projectile.owner].minionDamage != projectile.Calamity().spawnedPlayerMinionDamageValue) { - int damage2 = (int)(((float)projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue / - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) * + int damage2 = (int)(((float)projectile.Calamity().spawnedPlayerMinionProjectileDamageValue / + projectile.Calamity().spawnedPlayerMinionDamageValue) * Main.player[projectile.owner].minionDamage); projectile.damage = damage2; } @@ -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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (flag64) { if (player.dead) diff --git a/Projectiles/Summon/ChaosSpirit.cs b/Projectiles/Summon/ChaosSpirit.cs index 97911f60e8..968bd57b05 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (!modPlayer.chaosSpirit) { projectile.active = false; @@ -58,8 +58,8 @@ namespace CalamityMod.Projectiles.Summon dust--; if (dust >= 0) { - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue = projectile.damage; + projectile.Calamity().spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; + projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage; int num501 = 50; for (int num502 = 0; num502 < num501; num502++) { @@ -68,10 +68,10 @@ namespace CalamityMod.Projectiles.Summon Main.dust[num503].scale *= 1.15f; } } - if (Main.player[projectile.owner].minionDamage != projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) + if (Main.player[projectile.owner].minionDamage != projectile.Calamity().spawnedPlayerMinionDamageValue) { - int damage2 = (int)(((float)projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue / - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) * + int damage2 = (int)(((float)projectile.Calamity().spawnedPlayerMinionProjectileDamageValue / + projectile.Calamity().spawnedPlayerMinionDamageValue) * Main.player[projectile.owner].minionDamage); projectile.damage = damage2; } diff --git a/Projectiles/Summon/CloudyWaifu.cs b/Projectiles/Summon/CloudyWaifu.cs index bdfb58dc46..c351b3d778 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (!modPlayer.cloudWaifu && !modPlayer.allWaifus) { projectile.active = false; @@ -65,8 +65,8 @@ namespace CalamityMod.Projectiles.Summon dust--; if (dust >= 0) { - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue = projectile.damage; + projectile.Calamity().spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; + projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage; int num501 = 50; for (int num502 = 0; num502 < num501; num502++) { @@ -75,10 +75,10 @@ namespace CalamityMod.Projectiles.Summon Main.dust[num503].scale *= 1.15f; } } - if (Main.player[projectile.owner].minionDamage != projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) + if (Main.player[projectile.owner].minionDamage != projectile.Calamity().spawnedPlayerMinionDamageValue) { - int damage2 = (int)(((float)projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue / - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) * + int damage2 = (int)(((float)projectile.Calamity().spawnedPlayerMinionProjectileDamageValue / + projectile.Calamity().spawnedPlayerMinionDamageValue) * Main.player[projectile.owner].minionDamage); projectile.damage = damage2; } diff --git a/Projectiles/Summon/Corroslime.cs b/Projectiles/Summon/Corroslime.cs index 87c4303f20..ff69b934db 100644 --- a/Projectiles/Summon/Corroslime.cs +++ b/Projectiles/Summon/Corroslime.cs @@ -48,8 +48,8 @@ namespace CalamityMod.Projectiles.Summon { if (dust == 0f) { - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue = projectile.damage; + projectile.Calamity().spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; + projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage; int num226 = 16; for (int num227 = 0; num227 < num226; num227++) { @@ -63,16 +63,16 @@ namespace CalamityMod.Projectiles.Summon } dust += 1f; } - if (Main.player[projectile.owner].minionDamage != projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) + if (Main.player[projectile.owner].minionDamage != projectile.Calamity().spawnedPlayerMinionDamageValue) { - int damage2 = (int)(((float)projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue / - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) * + int damage2 = (int)(((float)projectile.Calamity().spawnedPlayerMinionProjectileDamageValue / + projectile.Calamity().spawnedPlayerMinionDamageValue) * Main.player[projectile.owner].minionDamage); projectile.damage = damage2; } bool flag64 = projectile.type == mod.ProjectileType("Corroslime"); Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); player.AddBuff(mod.BuffType("Corroslime"), 3600); if (flag64) { diff --git a/Projectiles/Summon/CosmicEnergy.cs b/Projectiles/Summon/CosmicEnergy.cs index a86b1f5bab..860cf376d4 100644 --- a/Projectiles/Summon/CosmicEnergy.cs +++ b/Projectiles/Summon/CosmicEnergy.cs @@ -40,20 +40,20 @@ namespace CalamityMod.Projectiles.Summon Lighting.AddLight((int)projectile.Center.X / 16, (int)projectile.Center.Y / 16, ((float)Main.DiscoR / 255f), ((float)Main.DiscoG / 255f), ((float)Main.DiscoB / 255f)); if (projectile.localAI[0] == 0f) { - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue = projectile.damage; + projectile.Calamity().spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; + projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage; projectile.localAI[0] += 1f; } - if (Main.player[projectile.owner].minionDamage != projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) + if (Main.player[projectile.owner].minionDamage != projectile.Calamity().spawnedPlayerMinionDamageValue) { - int damage2 = (int)(((float)projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue / - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) * + int damage2 = (int)(((float)projectile.Calamity().spawnedPlayerMinionProjectileDamageValue / + projectile.Calamity().spawnedPlayerMinionDamageValue) * Main.player[projectile.owner].minionDamage); projectile.damage = damage2; } bool flag64 = projectile.type == mod.ProjectileType("CosmicEnergy"); Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); player.AddBuff(mod.BuffType("CosmicEnergy"), 3600); if (flag64) { diff --git a/Projectiles/Summon/Cosmilamp.cs b/Projectiles/Summon/Cosmilamp.cs index 248bfd5b66..74d8893d96 100644 --- a/Projectiles/Summon/Cosmilamp.cs +++ b/Projectiles/Summon/Cosmilamp.cs @@ -37,8 +37,8 @@ namespace CalamityMod.Projectiles.Summon { if (projectile.localAI[0] == 0f) { - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue = projectile.damage; + projectile.Calamity().spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; + projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage; int num226 = 36; for (int num227 = 0; num227 < num226; num227++) { @@ -52,10 +52,10 @@ namespace CalamityMod.Projectiles.Summon } projectile.localAI[0] += 1f; } - if (Main.player[projectile.owner].minionDamage != projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) + if (Main.player[projectile.owner].minionDamage != projectile.Calamity().spawnedPlayerMinionDamageValue) { - int damage2 = (int)(((float)projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue / - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) * + int damage2 = (int)(((float)projectile.Calamity().spawnedPlayerMinionProjectileDamageValue / + projectile.Calamity().spawnedPlayerMinionDamageValue) * Main.player[projectile.owner].minionDamage); projectile.damage = damage2; } @@ -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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); player.AddBuff(mod.BuffType("Cosmilamp"), 3600); if (flag64) { diff --git a/Projectiles/Summon/Crimslime.cs b/Projectiles/Summon/Crimslime.cs index a39c5b1fd1..19c39213af 100644 --- a/Projectiles/Summon/Crimslime.cs +++ b/Projectiles/Summon/Crimslime.cs @@ -48,8 +48,8 @@ namespace CalamityMod.Projectiles.Summon { if (dust == 0f) { - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue = projectile.damage; + projectile.Calamity().spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; + projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage; int num226 = 16; for (int num227 = 0; num227 < num226; num227++) { @@ -63,16 +63,16 @@ namespace CalamityMod.Projectiles.Summon } dust += 1f; } - if (Main.player[projectile.owner].minionDamage != projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) + if (Main.player[projectile.owner].minionDamage != projectile.Calamity().spawnedPlayerMinionDamageValue) { - int damage2 = (int)(((float)projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue / - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) * + int damage2 = (int)(((float)projectile.Calamity().spawnedPlayerMinionProjectileDamageValue / + projectile.Calamity().spawnedPlayerMinionDamageValue) * Main.player[projectile.owner].minionDamage); projectile.damage = damage2; } bool flag64 = projectile.type == mod.ProjectileType("Crimslime"); Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); player.AddBuff(mod.BuffType("Crimslime"), 3600); if (flag64) { diff --git a/Projectiles/Summon/DaedalusCrystal.cs b/Projectiles/Summon/DaedalusCrystal.cs index 03060dd9c3..4a1e3b2eb1 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (!modPlayer.daedalusCrystal) { projectile.active = false; @@ -57,8 +57,8 @@ namespace CalamityMod.Projectiles.Summon dust--; if (dust >= 0) { - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue = projectile.damage; + projectile.Calamity().spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; + projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage; int num501 = 50; for (int num502 = 0; num502 < num501; num502++) { @@ -67,10 +67,10 @@ namespace CalamityMod.Projectiles.Summon Main.dust[num503].scale *= 1.15f; } } - if (Main.player[projectile.owner].minionDamage != projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) + if (Main.player[projectile.owner].minionDamage != projectile.Calamity().spawnedPlayerMinionDamageValue) { - int damage2 = (int)(((float)projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue / - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) * + int damage2 = (int)(((float)projectile.Calamity().spawnedPlayerMinionProjectileDamageValue / + projectile.Calamity().spawnedPlayerMinionDamageValue) * Main.player[projectile.owner].minionDamage); projectile.damage = damage2; } diff --git a/Projectiles/Summon/DankCreeper.cs b/Projectiles/Summon/DankCreeper.cs index 22396b54e2..332922e5df 100644 --- a/Projectiles/Summon/DankCreeper.cs +++ b/Projectiles/Summon/DankCreeper.cs @@ -40,8 +40,8 @@ namespace CalamityMod.Projectiles.Summon { if (projectile.localAI[0] == 0f) { - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue = projectile.damage; + projectile.Calamity().spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; + projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage; int num226 = 36; for (int num227 = 0; num227 < num226; num227++) { @@ -55,16 +55,16 @@ namespace CalamityMod.Projectiles.Summon } projectile.localAI[0] += 1f; } - if (Main.player[projectile.owner].minionDamage != projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) + if (Main.player[projectile.owner].minionDamage != projectile.Calamity().spawnedPlayerMinionDamageValue) { - int damage2 = (int)(((float)projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue / - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) * + int damage2 = (int)(((float)projectile.Calamity().spawnedPlayerMinionProjectileDamageValue / + projectile.Calamity().spawnedPlayerMinionDamageValue) * Main.player[projectile.owner].minionDamage); projectile.damage = damage2; } bool flag64 = projectile.type == mod.ProjectileType("DankCreeper"); Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); player.AddBuff(mod.BuffType("DankCreeper"), 3600); if (flag64) { diff --git a/Projectiles/Summon/DreadmineTurret.cs b/Projectiles/Summon/DreadmineTurret.cs index 138b725212..3e52795989 100644 --- a/Projectiles/Summon/DreadmineTurret.cs +++ b/Projectiles/Summon/DreadmineTurret.cs @@ -30,14 +30,14 @@ namespace CalamityMod.Projectiles.Summon { if (projectile.localAI[0] == 0f) { - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue = projectile.damage; + projectile.Calamity().spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; + projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage; projectile.localAI[0] += 1f; } - if (Main.player[projectile.owner].minionDamage != projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) + if (Main.player[projectile.owner].minionDamage != projectile.Calamity().spawnedPlayerMinionDamageValue) { - int damage2 = (int)(((float)projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue / - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) * + int damage2 = (int)(((float)projectile.Calamity().spawnedPlayerMinionProjectileDamageValue / + projectile.Calamity().spawnedPlayerMinionDamageValue) * Main.player[projectile.owner].minionDamage); projectile.damage = damage2; } diff --git a/Projectiles/Summon/DrewsSandyWaifu.cs b/Projectiles/Summon/DrewsSandyWaifu.cs index ff322c9c14..14e162d97c 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (!modPlayer.sandBoobWaifu && !modPlayer.allWaifus) { projectile.active = false; @@ -65,8 +65,8 @@ namespace CalamityMod.Projectiles.Summon dust--; if (dust >= 0) { - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue = projectile.damage; + projectile.Calamity().spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; + projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage; int num501 = 50; for (int num502 = 0; num502 < num501; num502++) { @@ -75,10 +75,10 @@ namespace CalamityMod.Projectiles.Summon Main.dust[num503].scale *= 1.15f; } } - if (Main.player[projectile.owner].minionDamage != projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) + if (Main.player[projectile.owner].minionDamage != projectile.Calamity().spawnedPlayerMinionDamageValue) { - int damage2 = (int)(((float)projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue / - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) * + int damage2 = (int)(((float)projectile.Calamity().spawnedPlayerMinionProjectileDamageValue / + projectile.Calamity().spawnedPlayerMinionDamageValue) * Main.player[projectile.owner].minionDamage); projectile.damage = damage2; } diff --git a/Projectiles/Summon/ElementalAxe.cs b/Projectiles/Summon/ElementalAxe.cs index d6c2bbf388..f3a8a70a61 100644 --- a/Projectiles/Summon/ElementalAxe.cs +++ b/Projectiles/Summon/ElementalAxe.cs @@ -37,20 +37,20 @@ namespace CalamityMod.Projectiles.Summon { if (projectile.localAI[0] == 0f) { - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue = projectile.damage; + projectile.Calamity().spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; + projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage; projectile.localAI[0] += 1f; } - if (Main.player[projectile.owner].minionDamage != projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) + if (Main.player[projectile.owner].minionDamage != projectile.Calamity().spawnedPlayerMinionDamageValue) { - int damage2 = (int)(((float)projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue / - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) * + int damage2 = (int)(((float)projectile.Calamity().spawnedPlayerMinionProjectileDamageValue / + projectile.Calamity().spawnedPlayerMinionDamageValue) * Main.player[projectile.owner].minionDamage); projectile.damage = damage2; } bool flag64 = (projectile.type == mod.ProjectileType("ElementalAxe")); Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); player.AddBuff(mod.BuffType("ElementalAxe"), 3600); if (flag64) { diff --git a/Projectiles/Summon/FungalClump.cs b/Projectiles/Summon/FungalClump.cs index 35f11d9975..f60a71135b 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (!modPlayer.fungalClump) { projectile.active = false; @@ -56,8 +56,8 @@ namespace CalamityMod.Projectiles.Summon } if (projectile.localAI[0] == 0f) { - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue = projectile.damage; + projectile.Calamity().spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; + projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage; int num226 = 36; for (int num227 = 0; num227 < num226; num227++) { @@ -71,10 +71,10 @@ namespace CalamityMod.Projectiles.Summon } projectile.localAI[0] += 1f; } - if (Main.player[projectile.owner].minionDamage != projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) + if (Main.player[projectile.owner].minionDamage != projectile.Calamity().spawnedPlayerMinionDamageValue) { - int damage2 = (int)(((float)projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue / - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) * + int damage2 = (int)(((float)projectile.Calamity().spawnedPlayerMinionProjectileDamageValue / + projectile.Calamity().spawnedPlayerMinionDamageValue) * Main.player[projectile.owner].minionDamage); projectile.damage = damage2; } diff --git a/Projectiles/Summon/GhostlyMine.cs b/Projectiles/Summon/GhostlyMine.cs index 996324e0fa..9d3d7daf96 100644 --- a/Projectiles/Summon/GhostlyMine.cs +++ b/Projectiles/Summon/GhostlyMine.cs @@ -33,16 +33,16 @@ namespace CalamityMod.Projectiles.Summon { if (start) { - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue = projectile.damage; + projectile.Calamity().spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; + projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage; Main.PlaySound(SoundID.Item20, projectile.position); projectile.ai[1] = projectile.ai[0]; start = false; } - if (Main.player[projectile.owner].minionDamage != projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) + if (Main.player[projectile.owner].minionDamage != projectile.Calamity().spawnedPlayerMinionDamageValue) { - int damage2 = (int)(((float)projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue / - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) * + int damage2 = (int)(((float)projectile.Calamity().spawnedPlayerMinionProjectileDamageValue / + projectile.Calamity().spawnedPlayerMinionDamageValue) * Main.player[projectile.owner].minionDamage); projectile.damage = damage2; } diff --git a/Projectiles/Summon/Herring.cs b/Projectiles/Summon/Herring.cs index 7901a37603..572f0c49a3 100644 --- a/Projectiles/Summon/Herring.cs +++ b/Projectiles/Summon/Herring.cs @@ -39,8 +39,8 @@ namespace CalamityMod.Projectiles.Summon { if (dust > 0) { - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue = projectile.damage; + projectile.Calamity().spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; + projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage; int num226 = 36; for (int num227 = 0; num227 < num226; num227++) { @@ -53,10 +53,10 @@ namespace CalamityMod.Projectiles.Summon } dust--; } - if (Main.player[projectile.owner].minionDamage != projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) + if (Main.player[projectile.owner].minionDamage != projectile.Calamity().spawnedPlayerMinionDamageValue) { - int damage2 = (int)(((float)projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue / - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) * + int damage2 = (int)(((float)projectile.Calamity().spawnedPlayerMinionProjectileDamageValue / + projectile.Calamity().spawnedPlayerMinionDamageValue) * Main.player[projectile.owner].minionDamage); projectile.damage = damage2; } @@ -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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); player.AddBuff(mod.BuffType("Herring"), 3600); if (flag64) { diff --git a/Projectiles/Summon/IceClasper.cs b/Projectiles/Summon/IceClasper.cs index fdf82b0753..18eb4f0d84 100644 --- a/Projectiles/Summon/IceClasper.cs +++ b/Projectiles/Summon/IceClasper.cs @@ -39,8 +39,8 @@ namespace CalamityMod.Projectiles.Summon { if (dust > 0) { - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue = projectile.damage; + projectile.Calamity().spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; + projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage; int num226 = 36; for (int num227 = 0; num227 < num226; num227++) { @@ -53,10 +53,10 @@ namespace CalamityMod.Projectiles.Summon } dust--; } - if (Main.player[projectile.owner].minionDamage != projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) + if (Main.player[projectile.owner].minionDamage != projectile.Calamity().spawnedPlayerMinionDamageValue) { - int damage2 = (int)(((float)projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue / - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) * + int damage2 = (int)(((float)projectile.Calamity().spawnedPlayerMinionProjectileDamageValue / + projectile.Calamity().spawnedPlayerMinionDamageValue) * Main.player[projectile.owner].minionDamage); projectile.damage = damage2; } @@ -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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); player.AddBuff(mod.BuffType("IceClasper"), 3600); if (flag64) { diff --git a/Projectiles/Summon/MechwormBody.cs b/Projectiles/Summon/MechwormBody.cs index 9a9479c6e7..7164c8689e 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player9.Calamity(); if ((int)Main.time % 120 == 0) { projectile.netUpdate = true; diff --git a/Projectiles/Summon/MechwormBody2.cs b/Projectiles/Summon/MechwormBody2.cs index f62f0d51eb..d18280d658 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player9.Calamity(); if ((int)Main.time % 120 == 0) { projectile.netUpdate = true; diff --git a/Projectiles/Summon/MechwormHead.cs b/Projectiles/Summon/MechwormHead.cs index 16e6b3537e..6819cbb6b6 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player9.Calamity(); 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 a0bd5fb4f6..46402c53b0 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player9.Calamity(); if ((int)Main.time % 120 == 0) { projectile.netUpdate = true; diff --git a/Projectiles/Summon/PhantomGuy.cs b/Projectiles/Summon/PhantomGuy.cs index 65de5ce00a..77d1bcf56c 100644 --- a/Projectiles/Summon/PhantomGuy.cs +++ b/Projectiles/Summon/PhantomGuy.cs @@ -35,8 +35,8 @@ namespace CalamityMod.Projectiles.Summon { if (projectile.localAI[0] == 0f) { - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue = projectile.damage; + projectile.Calamity().spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; + projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage; int num226 = 36; for (int num227 = 0; num227 < num226; num227++) { @@ -49,10 +49,10 @@ namespace CalamityMod.Projectiles.Summon } projectile.localAI[0] += 1f; } - if (Main.player[projectile.owner].minionDamage != projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) + if (Main.player[projectile.owner].minionDamage != projectile.Calamity().spawnedPlayerMinionDamageValue) { - int damage2 = (int)(((float)projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue / - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) * + int damage2 = (int)(((float)projectile.Calamity().spawnedPlayerMinionProjectileDamageValue / + projectile.Calamity().spawnedPlayerMinionDamageValue) * Main.player[projectile.owner].minionDamage); projectile.damage = damage2; } @@ -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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); player.AddBuff(mod.BuffType("Phantom"), 3600); if (flag64) { diff --git a/Projectiles/Summon/ProfanedEnergy.cs b/Projectiles/Summon/ProfanedEnergy.cs index 0bf9790671..faaef7c94a 100644 --- a/Projectiles/Summon/ProfanedEnergy.cs +++ b/Projectiles/Summon/ProfanedEnergy.cs @@ -42,8 +42,8 @@ namespace CalamityMod.Projectiles.Summon } if (count == 0f) { - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue = projectile.damage; + projectile.Calamity().spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; + projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage; Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 20); for (int num621 = 0; num621 < 5; num621++) { @@ -65,10 +65,10 @@ namespace CalamityMod.Projectiles.Summon } count += 1f; } - if (Main.player[projectile.owner].minionDamage != projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) + if (Main.player[projectile.owner].minionDamage != projectile.Calamity().spawnedPlayerMinionDamageValue) { - int damage2 = (int)(((float)projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue / - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) * + int damage2 = (int)(((float)projectile.Calamity().spawnedPlayerMinionProjectileDamageValue / + projectile.Calamity().spawnedPlayerMinionDamageValue) * Main.player[projectile.owner].minionDamage); projectile.damage = damage2; } diff --git a/Projectiles/Summon/ReaverOrb.cs b/Projectiles/Summon/ReaverOrb.cs index 0f4cb29b7c..43adfa19fd 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (!modPlayer.reaverOrb) { projectile.active = false; @@ -57,8 +57,8 @@ namespace CalamityMod.Projectiles.Summon dust--; if (dust >= 0) { - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue = projectile.damage; + projectile.Calamity().spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; + projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage; int num501 = 50; for (int num502 = 0; num502 < num501; num502++) { @@ -67,10 +67,10 @@ namespace CalamityMod.Projectiles.Summon Main.dust[num503].scale *= 1.15f; } } - if (Main.player[projectile.owner].minionDamage != projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) + if (Main.player[projectile.owner].minionDamage != projectile.Calamity().spawnedPlayerMinionDamageValue) { - int damage2 = (int)(((float)projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue / - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) * + int damage2 = (int)(((float)projectile.Calamity().spawnedPlayerMinionProjectileDamageValue / + projectile.Calamity().spawnedPlayerMinionDamageValue) * Main.player[projectile.owner].minionDamage); projectile.damage = damage2; } diff --git a/Projectiles/Summon/RedDevil.cs b/Projectiles/Summon/RedDevil.cs index b00f132d8e..57e45f45a3 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (!modPlayer.redDevil) { projectile.active = false; diff --git a/Projectiles/Summon/Sandnado.cs b/Projectiles/Summon/Sandnado.cs index 442bfd5610..9228ea83e5 100644 --- a/Projectiles/Summon/Sandnado.cs +++ b/Projectiles/Summon/Sandnado.cs @@ -39,8 +39,8 @@ namespace CalamityMod.Projectiles.Summon { if (projectile.localAI[1] == 0f) { - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue = projectile.damage; + projectile.Calamity().spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; + projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage; int num226 = 36; for (int num227 = 0; num227 < num226; num227++) { @@ -54,16 +54,16 @@ namespace CalamityMod.Projectiles.Summon } projectile.localAI[1] += 1f; } - if (Main.player[projectile.owner].minionDamage != projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) + if (Main.player[projectile.owner].minionDamage != projectile.Calamity().spawnedPlayerMinionDamageValue) { - int damage2 = (int)(((float)projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue / - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) * + int damage2 = (int)(((float)projectile.Calamity().spawnedPlayerMinionProjectileDamageValue / + projectile.Calamity().spawnedPlayerMinionDamageValue) * Main.player[projectile.owner].minionDamage); projectile.damage = damage2; } bool flag64 = projectile.type == mod.ProjectileType("Sandnado"); Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); player.AddBuff(mod.BuffType("Sandnado"), 3600); if (flag64) { diff --git a/Projectiles/Summon/SandyWaifu.cs b/Projectiles/Summon/SandyWaifu.cs index aedd5c5f32..34d83d3dd5 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (!modPlayer.sandWaifu && !modPlayer.allWaifus) { projectile.active = false; @@ -65,8 +65,8 @@ namespace CalamityMod.Projectiles.Summon dust--; if (dust >= 0) { - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue = projectile.damage; + projectile.Calamity().spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; + projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage; int num501 = 50; for (int num502 = 0; num502 < num501; num502++) { @@ -75,10 +75,10 @@ namespace CalamityMod.Projectiles.Summon Main.dust[num503].scale *= 1.15f; } } - if (Main.player[projectile.owner].minionDamage != projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) + if (Main.player[projectile.owner].minionDamage != projectile.Calamity().spawnedPlayerMinionDamageValue) { - int damage2 = (int)(((float)projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue / - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) * + int damage2 = (int)(((float)projectile.Calamity().spawnedPlayerMinionProjectileDamageValue / + projectile.Calamity().spawnedPlayerMinionDamageValue) * Main.player[projectile.owner].minionDamage); projectile.damage = damage2; } diff --git a/Projectiles/Summon/SilvaCrystal.cs b/Projectiles/Summon/SilvaCrystal.cs index 9b6607d2c1..7ae993c58a 100644 --- a/Projectiles/Summon/SilvaCrystal.cs +++ b/Projectiles/Summon/SilvaCrystal.cs @@ -37,20 +37,20 @@ namespace CalamityMod.Projectiles.Summon { if (projectile.localAI[1] == 0f) { - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue = projectile.damage; + projectile.Calamity().spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; + projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage; projectile.localAI[1] += 1f; } - if (Main.player[projectile.owner].minionDamage != projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) + if (Main.player[projectile.owner].minionDamage != projectile.Calamity().spawnedPlayerMinionDamageValue) { - int damage2 = (int)(((float)projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue / - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) * + int damage2 = (int)(((float)projectile.Calamity().spawnedPlayerMinionProjectileDamageValue / + projectile.Calamity().spawnedPlayerMinionDamageValue) * Main.player[projectile.owner].minionDamage); projectile.damage = damage2; } bool flag64 = projectile.type == mod.ProjectileType("SilvaCrystal"); Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (!modPlayer.silvaSummon) { projectile.active = false; diff --git a/Projectiles/Summon/SirenLure.cs b/Projectiles/Summon/SirenLure.cs index 4380e07c17..c98c9637e5 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (!modPlayer.sirenWaifu && !modPlayer.allWaifus) { projectile.active = false; @@ -57,8 +57,8 @@ namespace CalamityMod.Projectiles.Summon } if (dust > 0) { - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue = projectile.damage; + projectile.Calamity().spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; + projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage; int num501 = 50; for (int num502 = 0; num502 < num501; num502++) { @@ -68,10 +68,10 @@ namespace CalamityMod.Projectiles.Summon } dust--; } - if (Main.player[projectile.owner].minionDamage != projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) + if (Main.player[projectile.owner].minionDamage != projectile.Calamity().spawnedPlayerMinionDamageValue) { - int damage2 = (int)(((float)projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue / - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) * + int damage2 = (int)(((float)projectile.Calamity().spawnedPlayerMinionProjectileDamageValue / + projectile.Calamity().spawnedPlayerMinionDamageValue) * Main.player[projectile.owner].minionDamage); projectile.damage = damage2; } diff --git a/Projectiles/Summon/SlimeGod.cs b/Projectiles/Summon/SlimeGod.cs index 177161f1f3..ba7b155b86 100644 --- a/Projectiles/Summon/SlimeGod.cs +++ b/Projectiles/Summon/SlimeGod.cs @@ -47,8 +47,8 @@ namespace CalamityMod.Projectiles.Summon { if (dust == 0f) { - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue = projectile.damage; + projectile.Calamity().spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; + projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage; int num226 = 16; for (int num227 = 0; num227 < num226; num227++) { @@ -62,16 +62,16 @@ namespace CalamityMod.Projectiles.Summon } dust += 1f; } - if (Main.player[projectile.owner].minionDamage != projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) + if (Main.player[projectile.owner].minionDamage != projectile.Calamity().spawnedPlayerMinionDamageValue) { - int damage2 = (int)(((float)projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue / - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) * + int damage2 = (int)(((float)projectile.Calamity().spawnedPlayerMinionProjectileDamageValue / + projectile.Calamity().spawnedPlayerMinionDamageValue) * Main.player[projectile.owner].minionDamage); projectile.damage = damage2; } bool flag64 = projectile.type == mod.ProjectileType("SlimeGod"); Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); player.AddBuff(mod.BuffType("SlimeGod"), 3600); if (!modPlayer.slimeGod) { diff --git a/Projectiles/Summon/SlimeGodAlt.cs b/Projectiles/Summon/SlimeGodAlt.cs index df97970631..696ad5359b 100644 --- a/Projectiles/Summon/SlimeGodAlt.cs +++ b/Projectiles/Summon/SlimeGodAlt.cs @@ -47,8 +47,8 @@ namespace CalamityMod.Projectiles.Summon { if (dust == 0f) { - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue = projectile.damage; + projectile.Calamity().spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; + projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage; int num226 = 16; for (int num227 = 0; num227 < num226; num227++) { @@ -62,16 +62,16 @@ namespace CalamityMod.Projectiles.Summon } dust += 1f; } - if (Main.player[projectile.owner].minionDamage != projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) + if (Main.player[projectile.owner].minionDamage != projectile.Calamity().spawnedPlayerMinionDamageValue) { - int damage2 = (int)(((float)projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue / - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) * + int damage2 = (int)(((float)projectile.Calamity().spawnedPlayerMinionProjectileDamageValue / + projectile.Calamity().spawnedPlayerMinionDamageValue) * Main.player[projectile.owner].minionDamage); projectile.damage = damage2; } bool flag64 = projectile.type == mod.ProjectileType("SlimeGodAlt"); Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); player.AddBuff(mod.BuffType("SlimeGod"), 3600); if (!modPlayer.slimeGod) { diff --git a/Projectiles/Summon/SolarGod.cs b/Projectiles/Summon/SolarGod.cs index b3e15781f1..be462ade0e 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); player.AddBuff(mod.BuffType("SolarSpiritGod"), 3600); if (flag64) { @@ -67,8 +67,8 @@ namespace CalamityMod.Projectiles.Summon projectile.scale = num395 + 0.95f; if (projectile.localAI[0] == 0f) { - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue = projectile.damage; + projectile.Calamity().spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; + projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage; int num501 = 50; for (int num502 = 0; num502 < num501; num502++) { @@ -78,10 +78,10 @@ namespace CalamityMod.Projectiles.Summon } projectile.localAI[0] += 1f; } - if (Main.player[projectile.owner].minionDamage != projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) + if (Main.player[projectile.owner].minionDamage != projectile.Calamity().spawnedPlayerMinionDamageValue) { - int damage2 = (int)(((float)projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue / - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) * + int damage2 = (int)(((float)projectile.Calamity().spawnedPlayerMinionProjectileDamageValue / + projectile.Calamity().spawnedPlayerMinionDamageValue) * Main.player[projectile.owner].minionDamage); projectile.damage = damage2; } diff --git a/Projectiles/Summon/SolarPixie.cs b/Projectiles/Summon/SolarPixie.cs index 435ebdd56e..439c5327bd 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); player.AddBuff(mod.BuffType("SolarSpirit"), 3600); if (flag64) { @@ -67,8 +67,8 @@ namespace CalamityMod.Projectiles.Summon projectile.scale = num395 + 0.95f; if (projectile.localAI[0] == 0f) { - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue = projectile.damage; + projectile.Calamity().spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; + projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage; int num501 = 25; for (int num502 = 0; num502 < num501; num502++) { @@ -78,10 +78,10 @@ namespace CalamityMod.Projectiles.Summon } projectile.localAI[0] += 1f; } - if (Main.player[projectile.owner].minionDamage != projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) + if (Main.player[projectile.owner].minionDamage != projectile.Calamity().spawnedPlayerMinionDamageValue) { - int damage2 = (int)(((float)projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue / - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) * + int damage2 = (int)(((float)projectile.Calamity().spawnedPlayerMinionProjectileDamageValue / + projectile.Calamity().spawnedPlayerMinionDamageValue) * Main.player[projectile.owner].minionDamage); projectile.damage = damage2; } diff --git a/Projectiles/Summon/Spikecrag.cs b/Projectiles/Summon/Spikecrag.cs index 0c97f9e81e..f23b22bb96 100644 --- a/Projectiles/Summon/Spikecrag.cs +++ b/Projectiles/Summon/Spikecrag.cs @@ -31,14 +31,14 @@ namespace CalamityMod.Projectiles.Summon { if (projectile.localAI[0] == 0f) { - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue = projectile.damage; + projectile.Calamity().spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; + projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage; projectile.localAI[0] += 1f; } - if (Main.player[projectile.owner].minionDamage != projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) + if (Main.player[projectile.owner].minionDamage != projectile.Calamity().spawnedPlayerMinionDamageValue) { - int damage2 = (int)(((float)projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue / - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) * + int damage2 = (int)(((float)projectile.Calamity().spawnedPlayerMinionProjectileDamageValue / + projectile.Calamity().spawnedPlayerMinionDamageValue) * Main.player[projectile.owner].minionDamage); projectile.damage = damage2; } diff --git a/Projectiles/Summon/Urchin.cs b/Projectiles/Summon/Urchin.cs index 8ac8cf1642..d79fe81247 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (!modPlayer.urchin) { projectile.active = false; @@ -56,8 +56,8 @@ namespace CalamityMod.Projectiles.Summon dust--; if (dust >= 0) { - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue = projectile.damage; + projectile.Calamity().spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; + projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage; int num501 = 50; for (int num502 = 0; num502 < num501; num502++) { @@ -66,10 +66,10 @@ namespace CalamityMod.Projectiles.Summon Main.dust[num503].scale *= 1.15f; } } - if (Main.player[projectile.owner].minionDamage != projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) + if (Main.player[projectile.owner].minionDamage != projectile.Calamity().spawnedPlayerMinionDamageValue) { - int damage2 = (int)(((float)projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue / - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) * + int damage2 = (int)(((float)projectile.Calamity().spawnedPlayerMinionProjectileDamageValue / + projectile.Calamity().spawnedPlayerMinionDamageValue) * Main.player[projectile.owner].minionDamage); projectile.damage = damage2; } diff --git a/Projectiles/Summon/Valkyrie.cs b/Projectiles/Summon/Valkyrie.cs index 45eb82886d..9e221f1648 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.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); if (!modPlayer.valkyrie) { projectile.active = false; @@ -58,8 +58,8 @@ namespace CalamityMod.Projectiles.Summon } if (projectile.localAI[0] == 0f) { - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue = projectile.damage; + projectile.Calamity().spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; + projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage; int num501 = 30; for (int num502 = 0; num502 < num501; num502++) { @@ -69,10 +69,10 @@ namespace CalamityMod.Projectiles.Summon } projectile.localAI[0] += 1f; } - if (Main.player[projectile.owner].minionDamage != projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) + if (Main.player[projectile.owner].minionDamage != projectile.Calamity().spawnedPlayerMinionDamageValue) { - int damage2 = (int)(((float)projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue / - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) * + int damage2 = (int)(((float)projectile.Calamity().spawnedPlayerMinionProjectileDamageValue / + projectile.Calamity().spawnedPlayerMinionDamageValue) * Main.player[projectile.owner].minionDamage); projectile.damage = damage2; } diff --git a/Projectiles/SunkenSea/ClamCrusherFlail.cs b/Projectiles/SunkenSea/ClamCrusherFlail.cs index 43aa23f436..c2f20f14c8 100644 --- a/Projectiles/SunkenSea/ClamCrusherFlail.cs +++ b/Projectiles/SunkenSea/ClamCrusherFlail.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Projectiles.SunkenSea projectile.melee = true; projectile.alpha = 255; projectile.tileCollide = false; - projectile.GetGlobalProjectile(mod).trueMelee = true; + projectile.Calamity().trueMelee = true; } public override void AI() diff --git a/Projectiles/SunkenSea/Prismalline.cs b/Projectiles/SunkenSea/Prismalline.cs index c0b959fb73..b7b17607a4 100644 --- a/Projectiles/SunkenSea/Prismalline.cs +++ b/Projectiles/SunkenSea/Prismalline.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Projectiles.SunkenSea projectile.aiStyle = 113; projectile.timeLeft = 180; aiType = 598; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/SunkenSea/Prismalline2.cs b/Projectiles/SunkenSea/Prismalline2.cs index a066a7d9f6..e48ccdc815 100644 --- a/Projectiles/SunkenSea/Prismalline2.cs +++ b/Projectiles/SunkenSea/Prismalline2.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Projectiles.SunkenSea projectile.aiStyle = 113; projectile.timeLeft = 60; aiType = 598; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/SunkenSea/Prismalline3.cs b/Projectiles/SunkenSea/Prismalline3.cs index c974e01840..ac8bdcac09 100644 --- a/Projectiles/SunkenSea/Prismalline3.cs +++ b/Projectiles/SunkenSea/Prismalline3.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Projectiles.SunkenSea projectile.friendly = true; projectile.penetrate = 1; projectile.timeLeft = 180; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/SunkenSea/SeafoamBomb.cs b/Projectiles/SunkenSea/SeafoamBomb.cs index b927045c3c..9ef78afcf2 100644 --- a/Projectiles/SunkenSea/SeafoamBomb.cs +++ b/Projectiles/SunkenSea/SeafoamBomb.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Projectiles.SunkenSea projectile.friendly = true; projectile.penetrate = 1; projectile.timeLeft = 240; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/SunkenSea/SeafoamBubble.cs b/Projectiles/SunkenSea/SeafoamBubble.cs index 61cf1a3b7d..13945bceab 100644 --- a/Projectiles/SunkenSea/SeafoamBubble.cs +++ b/Projectiles/SunkenSea/SeafoamBubble.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Projectiles.SunkenSea projectile.alpha = 255; projectile.scale = 1f; projectile.localNPCHitCooldown = 30; - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } public override void AI() diff --git a/Projectiles/SunkenSea/Shellfish.cs b/Projectiles/SunkenSea/Shellfish.cs index 47c4ece711..f4d241eb4f 100644 --- a/Projectiles/SunkenSea/Shellfish.cs +++ b/Projectiles/SunkenSea/Shellfish.cs @@ -45,8 +45,8 @@ namespace CalamityMod.Projectiles.SunkenSea { if (spawnDust) { - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue = projectile.damage; + projectile.Calamity().spawnedPlayerMinionDamageValue = Main.player[projectile.owner].minionDamage; + projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage; int num501 = 20; for (int num502 = 0; num502 < num501; num502++) { @@ -58,7 +58,7 @@ namespace CalamityMod.Projectiles.SunkenSea } bool flag64 = projectile.type == mod.ProjectileType("Shellfish"); Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.GetCalamityPlayer(); + CalamityPlayer modPlayer = player.Calamity(); player.AddBuff(mod.BuffType("Shellfish"), 3600); if (flag64) { @@ -84,10 +84,10 @@ namespace CalamityMod.Projectiles.SunkenSea if (projectile.ai[0] == 0f) { projectile.damage = 70; - if (Main.player[projectile.owner].minionDamage != projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) + if (Main.player[projectile.owner].minionDamage != projectile.Calamity().spawnedPlayerMinionDamageValue) { - int damage2 = (int)(((float)projectile.GetGlobalProjectile(mod).spawnedPlayerMinionProjectileDamageValue / - projectile.GetGlobalProjectile(mod).spawnedPlayerMinionDamageValue) * + int damage2 = (int)(((float)projectile.Calamity().spawnedPlayerMinionProjectileDamageValue / + projectile.Calamity().spawnedPlayerMinionDamageValue) * Main.player[projectile.owner].minionDamage); projectile.damage = damage2; } diff --git a/Projectiles/Typeless/AstralStar.cs b/Projectiles/Typeless/AstralStar.cs index 33ae445745..192f665445 100644 --- a/Projectiles/Typeless/AstralStar.cs +++ b/Projectiles/Typeless/AstralStar.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Projectiles.Typeless { if (projectile.ai[0] == 2f) { - projectile.GetGlobalProjectile(mod).rogue = true; + projectile.Calamity().rogue = true; } int randomToSubtract = Main.rand.Next(1, 3); noTileHitCounter -= randomToSubtract; diff --git a/Projectiles/Typeless/NanoblackMain.cs b/Projectiles/Typeless/NanoblackMain.cs index 5daf2c16fe..7729445e4a 100644 --- a/Projectiles/Typeless/NanoblackMain.cs +++ b/Projectiles/Typeless/NanoblackMain.cs @@ -155,7 +155,7 @@ namespace CalamityMod.Projectiles.Typeless if (projectile.owner == Main.myPlayer) { int proj = Projectile.NewProjectile(pos, Vector2.Zero, bladeID, bladeDamage, bladeKB, projectile.owner, 0f, spin); - CalamityGlobalProjectile cgp = Main.projectile[proj].GetGlobalProjectile(mod); + CalamityGlobalProjectile cgp = Main.projectile[proj].Calamity(); if (projectile.melee) cgp.forceMelee = true; else diff --git a/Projectiles/Typeless/StellarContemptHammer.cs b/Projectiles/Typeless/StellarContemptHammer.cs index 885634b4d5..d5a13645f3 100644 --- a/Projectiles/Typeless/StellarContemptHammer.cs +++ b/Projectiles/Typeless/StellarContemptHammer.cs @@ -181,7 +181,7 @@ namespace CalamityMod.Projectiles.Typeless if (projectile.owner == Main.myPlayer) { int proj = Projectile.NewProjectile(startPoint, velocity, ProjectileID.LunarFlare, flareDamage, flareKB, Main.myPlayer, 0f, AI1); - CalamityGlobalProjectile cgp = Main.projectile[proj].GetGlobalProjectile(mod); + CalamityGlobalProjectile cgp = Main.projectile[proj].Calamity(); if (projectile.melee) cgp.forceMelee = true; else diff --git a/Tiles/FurniturePlaguedPlate/PlagueInfuser.cs b/Tiles/FurniturePlaguedPlate/PlagueInfuser.cs index bbbaf8e3e4..5cdbe8cb5f 100644 --- a/Tiles/FurniturePlaguedPlate/PlagueInfuser.cs +++ b/Tiles/FurniturePlaguedPlate/PlagueInfuser.cs @@ -135,7 +135,7 @@ namespace CalamityMod.Tiles.FurniturePlaguedPlate // public override void SetDefaults() // { // item.CloneDefaults(ItemID.FireflyinaBottle); - // item.createTile = mod.TileType(); + // item.createTile = ModContent.TileType(); // } //} } diff --git a/Tiles/FurnitureStatigel/StaticRefiner.cs b/Tiles/FurnitureStatigel/StaticRefiner.cs index 58462e04f5..e7425291af 100644 --- a/Tiles/FurnitureStatigel/StaticRefiner.cs +++ b/Tiles/FurnitureStatigel/StaticRefiner.cs @@ -126,7 +126,7 @@ namespace CalamityMod.Tiles.FurnitureStatigel // public override void SetDefaults() // { // item.CloneDefaults(ItemID.FireflyinaBottle); - // item.createTile = mod.TileType(); + // item.createTile = ModContent.TileType(); // } //} } diff --git a/Utilities/CalamityUtils.cs b/Utilities/CalamityUtils.cs index 33e11e93fb..52f1a5de82 100644 --- a/Utilities/CalamityUtils.cs +++ b/Utilities/CalamityUtils.cs @@ -1,4 +1,5 @@ using CalamityMod.CalPlayer; +using CalamityMod.Items; using CalamityMod.NPCs; using CalamityMod.Projectiles; using CalamityMod.World; @@ -8,40 +9,43 @@ using Terraria; namespace CalamityMod { - public static class CPlayerUtils + public static class CalamityUtils { - public static CalamityPlayer GetCalamityPlayer(this Player player) => player.GetModPlayer(); + #region Object Extensions + public static CalamityPlayer Calamity(this Player player) => player.GetModPlayer(); + public static CalamityGlobalNPC Calamity(this NPC npc) => npc.GetGlobalNPC(); + public static CalamityGlobalItem Calamity(this Item item) => item.GetGlobalItem(); + public static CalamityGlobalProjectile Calamity(this Projectile proj) => proj.GetGlobalProjectile(); + #endregion - public static bool InCalamity(this Player player) => player.GetCalamityPlayer().ZoneCalamity; - public static bool InAstral(this Player player) => player.GetCalamityPlayer().ZoneAstral; - public static bool InSunkenSea(this Player player) => player.GetCalamityPlayer().ZoneSunkenSea; - public static bool InSulphur(this Player player) => player.GetCalamityPlayer().ZoneSulphur; + #region Player Utilities + public static bool InCalamity(this Player player) => player.Calamity().ZoneCalamity; + public static bool InAstral(this Player player) => player.Calamity().ZoneAstral; + public static bool InSunkenSea(this Player player) => player.Calamity().ZoneSunkenSea; + public static bool InSulphur(this Player player) => player.Calamity().ZoneSulphur; public static bool InAbyss(this Player player, int layer = 0) { switch (layer) { case 1: - return player.GetCalamityPlayer().ZoneAbyssLayer1; + return player.Calamity().ZoneAbyssLayer1; case 2: - return player.GetCalamityPlayer().ZoneAbyssLayer2; + return player.Calamity().ZoneAbyssLayer2; case 3: - return player.GetCalamityPlayer().ZoneAbyssLayer3; + return player.Calamity().ZoneAbyssLayer3; case 4: - return player.GetCalamityPlayer().ZoneAbyssLayer4; + return player.Calamity().ZoneAbyssLayer4; default: - return player.GetCalamityPlayer().ZoneAbyss; + return player.Calamity().ZoneAbyss; } } - } - - public static class CNPCUtils - { - public static CalamityGlobalNPC GetCalamityNPC(this NPC npc) => npc.GetGlobalNPC(); + #endregion + #region NPC Utilities /// /// Allows you to set the lifeMax value of a NPC to different values based on the mode. Called instead of npc.lifeMax = X. /// @@ -70,7 +74,7 @@ namespace CalamityMod if (npc.boss) { double HPBoost = (double)Config.BossHealthPercentageBoost * 0.01; - npc.lifeMax += (int)((double)npc.lifeMax * HPBoost); + npc.lifeMax += (int)((double)npc.lifeMax * HPBoost); } } /// @@ -108,7 +112,7 @@ namespace CalamityMod { return Main.npc[owner.MinionAttackTargetNPC]; } - return ClosestNPCAt(origin,maxDistanceToCheck); + return ClosestNPCAt(origin, maxDistanceToCheck); } /// @@ -124,21 +128,14 @@ namespace CalamityMod damage = 0D; return true; } - } + #endregion - public static class CProjectileUtils - { - public static CalamityGlobalProjectile GetCalamityProj(this Projectile proj) => proj.GetGlobalProjectile(); - } - - public static class CMiscUtils - { + #region Miscellaneous Utilities public static void AddWithCondition(this List list, T type, bool condition) { if (condition) - { list.Add(type); - } } + #endregion } } diff --git a/Waters/AbyssWater.cs b/Waters/AbyssWater.cs index c88f2a7647..421e803420 100644 --- a/Waters/AbyssWater.cs +++ b/Waters/AbyssWater.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Waters { public override bool ChooseWaterStyle() { - return Main.LocalPlayer.GetCalamityPlayer().ZoneAbyss; + return Main.LocalPlayer.Calamity().ZoneAbyss; } public override int ChooseWaterfallStyle() diff --git a/Waters/AstralWater.cs b/Waters/AstralWater.cs index 81355ce230..47d60eacf4 100644 --- a/Waters/AstralWater.cs +++ b/Waters/AstralWater.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Waters { public override bool ChooseWaterStyle() { - return Main.LocalPlayer.GetCalamityPlayer().ZoneAstral; + return Main.LocalPlayer.Calamity().ZoneAstral; } public override int ChooseWaterfallStyle() diff --git a/Waters/SulphuricWater.cs b/Waters/SulphuricWater.cs index 7d0a8ae89d..b8f20d39ad 100644 --- a/Waters/SulphuricWater.cs +++ b/Waters/SulphuricWater.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Waters { public override bool ChooseWaterStyle() { - return Main.LocalPlayer.GetCalamityPlayer().ZoneSulphur; + return Main.LocalPlayer.Calamity().ZoneSulphur; } public override int ChooseWaterfallStyle() diff --git a/Waters/SunkenSeaWater.cs b/Waters/SunkenSeaWater.cs index ea84d429d7..21de283e6b 100644 --- a/Waters/SunkenSeaWater.cs +++ b/Waters/SunkenSeaWater.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Waters { public override bool ChooseWaterStyle() { - return Main.LocalPlayer.GetCalamityPlayer().ZoneSunkenSea; + return Main.LocalPlayer.Calamity().ZoneSunkenSea; } public override int ChooseWaterfallStyle() diff --git a/World/CalamityWorld.cs b/World/CalamityWorld.cs index fcdc18ffe7..c9ee73eea7 100644 --- a/World/CalamityWorld.cs +++ b/World/CalamityWorld.cs @@ -1022,11 +1022,11 @@ namespace CalamityMod.World !Main.player[closestPlayer].ZoneUnderworldHeight && !Main.player[closestPlayer].ZoneDungeon && !Main.player[closestPlayer].ZoneJungle && - !Main.player[closestPlayer].GetCalamityPlayer().ZoneSunkenSea && + !Main.player[closestPlayer].Calamity().ZoneSunkenSea && !CalamityPlayer.areThereAnyDamnBosses) { if (NPC.downedPlantBoss && - !Main.player[closestPlayer].GetCalamityPlayer().ZoneAbyss && + !Main.player[closestPlayer].Calamity().ZoneAbyss && Main.player[closestPlayer].townNPCs < 3f) { double spawnRate = 100000D; @@ -1039,18 +1039,18 @@ namespace CalamityMod.World if (demonMode) spawnRate *= 0.75D; - if (Main.player[closestPlayer].GetCalamityPlayer().zerg && Main.player[closestPlayer].GetCalamityPlayer().chaosCandle) + if (Main.player[closestPlayer].Calamity().zerg && Main.player[closestPlayer].Calamity().chaosCandle) spawnRate *= 0.005D; - else if (Main.player[closestPlayer].GetCalamityPlayer().zerg) + else if (Main.player[closestPlayer].Calamity().zerg) spawnRate *= 0.01D; - else if (Main.player[closestPlayer].GetCalamityPlayer().chaosCandle) + else if (Main.player[closestPlayer].Calamity().chaosCandle) spawnRate *= 0.02D; - if (Main.player[closestPlayer].GetCalamityPlayer().zen && Main.player[closestPlayer].GetCalamityPlayer().tranquilityCandle) + if (Main.player[closestPlayer].Calamity().zen && Main.player[closestPlayer].Calamity().tranquilityCandle) spawnRate *= 75D; - else if (Main.player[closestPlayer].GetCalamityPlayer().zen) + else if (Main.player[closestPlayer].Calamity().zen) spawnRate *= 50D; - else if (Main.player[closestPlayer].GetCalamityPlayer().tranquilityCandle) + else if (Main.player[closestPlayer].Calamity().tranquilityCandle) spawnRate *= 25D; int chance = (int)spawnRate; @@ -1075,7 +1075,7 @@ namespace CalamityMod.World } } - if (Main.player[closestPlayer].GetCalamityPlayer().ZoneAbyss) + if (Main.player[closestPlayer].Calamity().ZoneAbyss) { if (Main.player[closestPlayer].chaosState) { @@ -1203,7 +1203,7 @@ namespace CalamityMod.World } if (!NPC.downedFishron && bossType == 0) - if (Main.player[closestPlayer].ZoneBeach && !Main.player[closestPlayer].GetCalamityPlayer().ZoneSulphur) + if (Main.player[closestPlayer].ZoneBeach && !Main.player[closestPlayer].Calamity().ZoneSulphur) { BossText(); bossType = NPCID.DukeFishron; @@ -1227,7 +1227,7 @@ namespace CalamityMod.World } if (!downedAstrageldon && bossType == 0) - if (Main.player[closestPlayer].GetCalamityPlayer().ZoneAstral && + if (Main.player[closestPlayer].Calamity().ZoneAstral && !Main.dayTime && Main.player[closestPlayer].ZoneOverworldHeight) { BossText(); @@ -1361,7 +1361,7 @@ namespace CalamityMod.World } else if (bossType == mod.NPCType("Astrageldon")) { - if (!Main.player[closestPlayer].GetCalamityPlayer().ZoneAstral || + if (!Main.player[closestPlayer].Calamity().ZoneAstral || Main.dayTime || !Main.player[closestPlayer].ZoneOverworldHeight) canSpawn = false; }