Merge branch '1.4.4' of https://github.com/CalamityTeam/CalamityMod into VictideSet

This commit is contained in:
Altixal committed 2025-08-08 11:38:56 +07:00
commit 18ff0de245
321 files changed
+6249 -7261

No files matched your search

+86 -86
View File
@@ -61,13 +61,13 @@ namespace CalamityMod.Balancing
#region Eater of Worlds
// 50% resist to Demon Scythe.
NPCSpecificBalancingChanges.AddRange(Bundle(EaterOfWorldsIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileID.DemonScythe))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.EaterOfWorlds, Do(new ProjectileResistBalancingRule(0.5f, ProjectileID.DemonScythe))));
// 40% resist to Sky Glaze.
NPCSpecificBalancingChanges.AddRange(Bundle(EaterOfWorldsIDList.List, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType<StickyFeather>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.EaterOfWorlds, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType<StickyFeather>()))));
// 25% resist to true melee.
NPCSpecificBalancingChanges.AddRange(Bundle(EaterOfWorldsIDList.List, Do(ResistTrueMelee(0.75f))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.EaterOfWorlds, Do(ResistTrueMelee(0.75f))));
#endregion
#region Brain of Cthulhu: Creepers
@@ -80,7 +80,7 @@ namespace CalamityMod.Balancing
#region The Perforators
// 50% resist to true melee.
NPCSpecificBalancingChanges.AddRange(Bundle(PerforatorWormIDList.List, Do(ResistTrueMelee(0.5f))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Perforators, Do(ResistTrueMelee(0.5f))));
#endregion
#region Wall of Flesh
@@ -90,50 +90,50 @@ namespace CalamityMod.Balancing
#region Aquatic Scourge
// 50% resist to true melee.
NPCSpecificBalancingChanges.AddRange(Bundle(AquaticScourgeIDList.List, Do(ResistTrueMelee(0.5f))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AquaticScourge, Do(ResistTrueMelee(0.5f))));
// 50% resist to Adamantite Throwing Axe's lightning.
// Twisting Thunder and Gael's Greatsword use this projectile too, but they are far beyond progression, so who cares!
NPCSpecificBalancingChanges.AddRange(Bundle(AquaticScourgeIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileID.CultistBossLightningOrbArc))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AquaticScourge, Do(new ProjectileResistBalancingRule(0.5f, ProjectileID.CultistBossLightningOrbArc))));
// 50% resist to Dormant Brimseeker.
NPCSpecificBalancingChanges.AddRange(Bundle(AquaticScourgeIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<DormantBrimseekerBab>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AquaticScourge, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<DormantBrimseekerBab>()))));
// 50% resist to Mounted Scanner.
NPCSpecificBalancingChanges.AddRange(Bundle(AquaticScourgeIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<MountedScannerLaser>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AquaticScourge, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<MountedScannerLaser>()))));
// 40% resist to Cryophobia.
NPCSpecificBalancingChanges.AddRange(Bundle(AquaticScourgeIDList.List, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType<CryoBlast>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AquaticScourge, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType<CryoBlast>()))));
// 30% resist to Meowthrower.
NPCSpecificBalancingChanges.AddRange(Bundle(AquaticScourgeIDList.List, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<MeowFire>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AquaticScourge, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<MeowFire>()))));
// 25% resist to Snowstorm Staff.
NPCSpecificBalancingChanges.AddRange(Bundle(AquaticScourgeIDList.List, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<Snowflake>(), ProjectileType<SnowflakeIceStar>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AquaticScourge, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<Snowflake>(), ProjectileType<SnowflakeIceStar>()))));
#endregion
#region The Destroyer
// 50% resist to true melee.
NPCSpecificBalancingChanges.AddRange(Bundle(DestroyerIDList.List, Do(ResistTrueMelee(0.5f))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Destroyer, Do(ResistTrueMelee(0.5f))));
// 50% resist to Adamantite Throwing Axe's lightning.
// See Aquatic Scourge comment.
NPCSpecificBalancingChanges.AddRange(Bundle(DestroyerIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileID.CultistBossLightningOrbArc))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Destroyer, Do(new ProjectileResistBalancingRule(0.5f, ProjectileID.CultistBossLightningOrbArc))));
// 50% resist to Dormant Brimseeker.
NPCSpecificBalancingChanges.AddRange(Bundle(DestroyerIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<DormantBrimseekerBab>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Destroyer, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<DormantBrimseekerBab>()))));
// 45% resist to Mounted Scanner.
NPCSpecificBalancingChanges.AddRange(Bundle(DestroyerIDList.List, Do(new ProjectileResistBalancingRule(0.55f, ProjectileType<MountedScannerLaser>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Destroyer, Do(new ProjectileResistBalancingRule(0.55f, ProjectileType<MountedScannerLaser>()))));
// 30% resist to Meowthrower.
NPCSpecificBalancingChanges.AddRange(Bundle(DestroyerIDList.List, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<MeowFire>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Destroyer, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<MeowFire>()))));
// 25% resist to Avalanche's Ice Bombs and shards.
NPCSpecificBalancingChanges.AddRange(Bundle(DestroyerIDList.List, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<IceBombFriendly>(), ProjectileType<FrostShardFriendly>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Destroyer, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<IceBombFriendly>(), ProjectileType<FrostShardFriendly>()))));
// 25% resist to Snowstorm Staff.
NPCSpecificBalancingChanges.AddRange(Bundle(DestroyerIDList.List, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<Snowflake>(), ProjectileType<SnowflakeIceStar>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Destroyer, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<Snowflake>(), ProjectileType<SnowflakeIceStar>()))));
#endregion
#region Astrum Aureus
@@ -162,25 +162,25 @@ namespace CalamityMod.Balancing
#region Ravager
// 50% resist to true melee.
NPCSpecificBalancingChanges.AddRange(Bundle(RavagerIDList.List, Do(ResistTrueMelee(0.5f))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Ravager, Do(ResistTrueMelee(0.5f))));
// 50% resist to Aegis Blade's explosions because the true melee resist ain't enough.
NPCSpecificBalancingChanges.AddRange(Bundle(RavagerIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<AegisBlast>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Ravager, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<AegisBlast>()))));
// 40% resist to Icicle Arrows.
NPCSpecificBalancingChanges.AddRange(Bundle(RavagerIDList.List, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType<IcicleArrowProj>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Ravager, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType<IcicleArrowProj>()))));
// 35% resist to Flying Dragon.
NPCSpecificBalancingChanges.AddRange(Bundle(RavagerIDList.List, Do(new ProjectileResistBalancingRule(0.65f, ProjectileID.DD2SquireSonicBoom))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Ravager, Do(new ProjectileResistBalancingRule(0.65f, ProjectileID.DD2SquireSonicBoom))));
// 25% resist to Lucrecia.
NPCSpecificBalancingChanges.AddRange(Bundle(RavagerIDList.List, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<DNA>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Ravager, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<DNA>()))));
// 20% resist to Aurora Blazer.
NPCSpecificBalancingChanges.AddRange(Bundle(RavagerIDList.List, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<AuroraFire>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Ravager, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<AuroraFire>()))));
// 20% resist to The Hive.
NPCSpecificBalancingChanges.AddRange(Bundle(RavagerIDList.List, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<HiveNuke>(), ProjectileType<HiveMissile>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Ravager, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<HiveNuke>(), ProjectileType<HiveMissile>()))));
#endregion
#region Lunatic Cultist
@@ -199,37 +199,37 @@ namespace CalamityMod.Balancing
#region Astrum Deus
// 75% resist to Plaguenades.
NPCSpecificBalancingChanges.AddRange(Bundle(AstrumDeusIDList.List, Do(new ProjectileResistBalancingRule(0.25f, ProjectileType<PlaguenadeBee>(), ProjectileType<PlaguenadeProj>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AstrumDeus, Do(new ProjectileResistBalancingRule(0.25f, ProjectileType<PlaguenadeBee>(), ProjectileType<PlaguenadeProj>()))));
// 70% resist to Charged Blaster Cannon.
NPCSpecificBalancingChanges.AddRange(Bundle(AstrumDeusIDList.List, Do(new ProjectileResistBalancingRule(0.3f, ProjectileID.ChargedBlasterLaser))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AstrumDeus, Do(new ProjectileResistBalancingRule(0.3f, ProjectileID.ChargedBlasterLaser))));
// 70% resist to Stardust Dragon Staff.
NPCSpecificBalancingChanges.AddRange(Bundle(AstrumDeusIDList.List, Do(new ProjectileResistBalancingRule(0.3f, ProjectileID.StardustDragon1, ProjectileID.StardustDragon2, ProjectileID.StardustDragon3, ProjectileID.StardustDragon4))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AstrumDeus, Do(new ProjectileResistBalancingRule(0.3f, ProjectileID.StardustDragon1, ProjectileID.StardustDragon2, ProjectileID.StardustDragon3, ProjectileID.StardustDragon4))));
// 50% resist to true melee.
NPCSpecificBalancingChanges.AddRange(Bundle(AstrumDeusIDList.List, Do(ResistTrueMelee(0.5f))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AstrumDeus, Do(ResistTrueMelee(0.5f))));
// 50% resist to Atlantis (Atlantis gaming!).
NPCSpecificBalancingChanges.AddRange(Bundle(AstrumDeusIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<AtlantisSpear>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AstrumDeus, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<AtlantisSpear>()))));
// 35% resist to Aerial Bane.
NPCSpecificBalancingChanges.AddRange(Bundle(AstrumDeusIDList.List, Do(new ProjectileResistBalancingRule(0.65f, ProjectileID.DD2BetsyArrow))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AstrumDeus, Do(new ProjectileResistBalancingRule(0.65f, ProjectileID.DD2BetsyArrow))));
// 35% resist to Icicle Arrows.
NPCSpecificBalancingChanges.AddRange(Bundle(AstrumDeusIDList.List, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType<IcicleArrowProj>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AstrumDeus, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType<IcicleArrowProj>()))));
// 30% resist to Aurora Blazer.
NPCSpecificBalancingChanges.AddRange(Bundle(AstrumDeusIDList.List, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<AuroraFire>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AstrumDeus, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<AuroraFire>()))));
// 30% resist to Flak Kraken.
NPCSpecificBalancingChanges.AddRange(Bundle(AstrumDeusIDList.List, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<FlakKrakenProjectile>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AstrumDeus, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<FlakKrakenProjectile>()))));
// 20% resist to Ballistic Poison Bomb's clouds.
NPCSpecificBalancingChanges.AddRange(Bundle(AstrumDeusIDList.List, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<BallisticPoisonCloud>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AstrumDeus, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<BallisticPoisonCloud>()))));
// 20% resist to Cluster Rocket fragments.
NPCSpecificBalancingChanges.AddRange(Bundle(AstrumDeusIDList.List, Do(new ProjectileResistBalancingRule(0.8f, ProjectileID.ClusterFragmentsI, ProjectileID.ClusterFragmentsII))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AstrumDeus, Do(new ProjectileResistBalancingRule(0.8f, ProjectileID.ClusterFragmentsI, ProjectileID.ClusterFragmentsII))));
#endregion
#region Moon Lord
@@ -263,28 +263,28 @@ namespace CalamityMod.Balancing
#region Storm Weaver
// 50% resist to true melee.
NPCSpecificBalancingChanges.AddRange(Bundle(StormWeaverIDList.List, Do(ResistTrueMelee(0.5f))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.StormWeaver, Do(ResistTrueMelee(0.5f))));
// 50% resist to Dazzling Stabber Staff.
NPCSpecificBalancingChanges.AddRange(Bundle(StormWeaverIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<DazzlingStabber>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.StormWeaver, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<DazzlingStabber>()))));
// 50% resist to Last Prism.
NPCSpecificBalancingChanges.AddRange(Bundle(StormWeaverIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileID.LastPrismLaser))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.StormWeaver, Do(new ProjectileResistBalancingRule(0.5f, ProjectileID.LastPrismLaser))));
// 50% resist to Legion of Celestia.
NPCSpecificBalancingChanges.AddRange(Bundle(StormWeaverIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<CelestialAxeMinion>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.StormWeaver, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<CelestialAxeMinion>()))));
// 50% resist to Pristine Fury's alt fire.
NPCSpecificBalancingChanges.AddRange(Bundle(StormWeaverIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<PristineSecondary>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.StormWeaver, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<PristineSecondary>()))));
// 50% resist to Tactician's Trump Card's explosions.
NPCSpecificBalancingChanges.AddRange(Bundle(StormWeaverIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<TacticiansElectricBoom>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.StormWeaver, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<TacticiansElectricBoom>()))));
// 40% resist to Devil's Sunrise's slashes.
NPCSpecificBalancingChanges.AddRange(Bundle(StormWeaverIDList.List, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType<DevilsSunriseProj>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.StormWeaver, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType<DevilsSunriseProj>()))));
// 35% resist to Event Horizon.
NPCSpecificBalancingChanges.AddRange(Bundle(StormWeaverIDList.List, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType<EventHorizonStar>(), ProjectileType<EventHorizonBlackhole>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.StormWeaver, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType<EventHorizonStar>(), ProjectileType<EventHorizonBlackhole>()))));
#endregion
#region Old Duke
@@ -294,19 +294,19 @@ namespace CalamityMod.Balancing
#region The Devourer of Gods
// 65% resist to Wave Pounder.
NPCSpecificBalancingChanges.AddRange(Bundle(DevourerOfGodsIDList.List, Do(new ProjectileResistBalancingRule(0.35f, ProjectileType<WavePounderBoom>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.DevourerOfGods, Do(new ProjectileResistBalancingRule(0.35f, ProjectileType<WavePounderBoom>()))));
// 35% resist to Sulphuric Acid Cannon's explosions.
NPCSpecificBalancingChanges.AddRange(Bundle(DevourerOfGodsIDList.List, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType<SulphuricAcidCannonExplosion>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.DevourerOfGods, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType<SulphuricAcidCannonExplosion>()))));
// 25% resist to Corinth Prime's grenades.
NPCSpecificBalancingChanges.AddRange(Bundle(DevourerOfGodsIDList.List, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<CorinthPrimeAirburst>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.DevourerOfGods, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<CorinthPrimeAirburst>()))));
// 20% resist to Valediction's typhoons; will catch Nuclear Fury as well but that doesn't matter.
NPCSpecificBalancingChanges.AddRange(Bundle(DevourerOfGodsIDList.List, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<NuclearFuryProjectile>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.DevourerOfGods, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<NuclearFuryProjectile>()))));
// 15% vulnerability to Time Bolt stealth strikes.
NPCSpecificBalancingChanges.AddRange(Bundle(DevourerOfGodsIDList.List, Do(new StealthStrikeBalancingRule(1.15f, ProjectileType<TimeBoltKnife>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.DevourerOfGods, Do(new StealthStrikeBalancingRule(1.15f, ProjectileType<TimeBoltKnife>()))));
#endregion The Devourer of Gods
#region Yharon
@@ -319,34 +319,34 @@ namespace CalamityMod.Balancing
#region Exo Mechs: Ares
// 35% resist to Devil's Devastation's slash.
NPCSpecificBalancingChanges.AddRange(Bundle(AresIDList.List, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType<DevilsDevastationHoldout>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Ares, Do(new ProjectileResistBalancingRule(0.65f, ProjectileType<DevilsDevastationHoldout>()))));
// 30% resist to Dynamic Pursuer.
NPCSpecificBalancingChanges.AddRange(Bundle(AresIDList.List, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<DynamicPursuerProjectile>(), ProjectileType<DynamicPursuerLaser>(), ProjectileType<DynamicPursuerElectricity>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Ares, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<DynamicPursuerProjectile>(), ProjectileType<DynamicPursuerLaser>(), ProjectileType<DynamicPursuerElectricity>()))));
// 25% resist to Aetherflux Cannon.
NPCSpecificBalancingChanges.AddRange(Bundle(AresIDList.List, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<PhasedGodRay>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Ares, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<PhasedGodRay>()))));
// 25% resist to Prismatic Breaker's deathray.
NPCSpecificBalancingChanges.AddRange(Bundle(AresIDList.List, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<PrismaticRay>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Ares, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<PrismaticRay>()))));
// 20% resist to the Spin Throw part of the Ark of the Cosmos' combo.
NPCSpecificBalancingChanges.AddRange(Bundle(AresIDList.List, Do(new ProjectileSpecificRequirementBalancingRule(0.8f, AotCThrowCombo))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Ares, Do(new ProjectileSpecificRequirementBalancingRule(0.8f, AotCThrowCombo))));
// 20% resist to Dragon Rage projectiles.
NPCSpecificBalancingChanges.AddRange(Bundle(AresIDList.List, Do(new ProjectileSpecificRequirementBalancingRule(0.8f, DragonRageFilter))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Ares, Do(new ProjectileSpecificRequirementBalancingRule(0.8f, DragonRageFilter))));
// 20% resist to Eclipse's Fall.
NPCSpecificBalancingChanges.AddRange(Bundle(AresIDList.List, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<EclipsesSmol>(), ProjectileType<EclipsesFallMain>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Ares, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<EclipsesSmol>(), ProjectileType<EclipsesFallMain>()))));
// 20% resist to Rancor.
NPCSpecificBalancingChanges.AddRange(Bundle(AresIDList.List, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<RancorLaserbeam>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Ares, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<RancorLaserbeam>()))));
// 20% resist to Yharim's Crystal.
NPCSpecificBalancingChanges.AddRange(Bundle(AresIDList.List, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<YharimsCrystalBeam>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Ares, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<YharimsCrystalBeam>()))));
// 20% resist to Zenith.
NPCSpecificBalancingChanges.AddRange(Bundle(AresIDList.List, Do(new ProjectileResistBalancingRule(0.8f, ProjectileID.FinalFractal))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Ares, Do(new ProjectileResistBalancingRule(0.8f, ProjectileID.FinalFractal))));
#endregion
#region Exo Mechs: Artemis and Apollo
@@ -358,85 +358,85 @@ namespace CalamityMod.Balancing
#region Exo Mechs: Thanatos
// 65% resist to true melee.
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(ResistTrueMelee(0.35f))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(ResistTrueMelee(0.35f))));
// 65% resist to The Final Dawn's lunge.
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.35f, ProjectileType<FinalDawnThrow2>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileResistBalancingRule(0.35f, ProjectileType<FinalDawnThrow2>()))));
// 65% resist to Stellar Torus Staff.
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.35f, ProjectileType<StellarTorusBeam>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileResistBalancingRule(0.35f, ProjectileType<StellarTorusBeam>()))));
// 60% resist to Dynamic Pursuer.
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.4f, ProjectileType<DynamicPursuerProjectile>(), ProjectileType<DynamicPursuerLaser>(), ProjectileType<DynamicPursuerElectricity>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileResistBalancingRule(0.4f, ProjectileType<DynamicPursuerProjectile>(), ProjectileType<DynamicPursuerLaser>(), ProjectileType<DynamicPursuerElectricity>()))));
// 50% resist to Chicken Cannon.
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<ChickenExplosion>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<ChickenExplosion>()))));
// 50% resist to Omicron's beam.
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<OmicronBeam>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<OmicronBeam>()))));
// 50% resist to Rancor.
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<RancorLaserbeam>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<RancorLaserbeam>()))));
// 50% resist to Vehemence's skulls.
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<VehemenceSkull>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<VehemenceSkull>()))));
// 50% resist to Yharim's Crystal.
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<YharimsCrystalBeam>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<YharimsCrystalBeam>()))));
// 45% resist to Prismatic Breaker's deathray.
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.55f, ProjectileType<PrismaticRay>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileResistBalancingRule(0.55f, ProjectileType<PrismaticRay>()))));
// 45% resist to Wrathwing's stealth strike fireballs.
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.55f, ProjectileType<WrathwingCinder>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileResistBalancingRule(0.55f, ProjectileType<WrathwingCinder>()))));
// 30% resist to Eclipse's Fall.
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<EclipsesFallMain>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<EclipsesFallMain>()))));
// 30% resist to Sirius.
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<SiriusExplosion>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<SiriusExplosion>()))));
// 30% resist to Ultima's rays.
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<UltimaRay>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<UltimaRay>()))));
// 30% resist to Dragon Scales and The Wand's tornadoes.
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<InfernadoFriendly>(), ProjectileType<DragonScalesInfernado>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<InfernadoFriendly>(), ProjectileType<DragonScalesInfernado>()))));
// 25% resist to the Spin Throw part of the Ark of the Cosmos' combo.
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileSpecificRequirementBalancingRule(0.75f, AotCThrowCombo))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileSpecificRequirementBalancingRule(0.75f, AotCThrowCombo))));
// 25% resist to Dragon Rage projectiles.
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileSpecificRequirementBalancingRule(0.75f, DragonRageFilter))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileSpecificRequirementBalancingRule(0.75f, DragonRageFilter))));
// 25% resist to Gael's Greatsword's big skulls.
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileSpecificRequirementBalancingRule(0.75f, BigGaelsSkullFilter))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileSpecificRequirementBalancingRule(0.75f, BigGaelsSkullFilter))));
// 25% resist to Mirror of Kalandra's Paradoxica minion.
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<Paradoxica>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileResistBalancingRule(0.75f, ProjectileType<Paradoxica>()))));
// 25% resist to Zenith.
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.75f, ProjectileID.FinalFractal))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileResistBalancingRule(0.75f, ProjectileID.FinalFractal))));
// 20% resist to The Anomaly's Nanogun's bomb explosions.
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<AnomalysNanogunMPFBBoom>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<AnomalysNanogunMPFBBoom>()))));
// 20% resist to Ariane's aura (Lilies of Finality).
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<LiliesOfFinalityAoE>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<LiliesOfFinalityAoE>()))));
// 20% resist to Eradicator's beams.
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<NebulaShot>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<NebulaShot>()))));
// 20% resist to Plasma Grenade and Dynamic Pursuer's explosions.
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<PlasmaGrenadeProjectile>(), ProjectileType<PlasmaGrenadeSmallExplosion>(), ProjectileType<MassivePlasmaExplosion>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<PlasmaGrenadeProjectile>(), ProjectileType<PlasmaGrenadeSmallExplosion>(), ProjectileType<MassivePlasmaExplosion>()))));
// 20% resist to Voltaic Climax / Void Vortex hitscan beams.
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<ClimaxBeam>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<ClimaxBeam>()))));
// 15% resist to The Final Dawn's AoE sweep flames.
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.85f, ProjectileType<FinalDawnFlame>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileResistBalancingRule(0.85f, ProjectileType<FinalDawnFlame>()))));
// 15% resist to Gruesome Eminence.
NPCSpecificBalancingChanges.AddRange(Bundle(ThanatosIDList.List, Do(new ProjectileResistBalancingRule(0.85f, ProjectileType<SpiritCongregation>()))));
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileResistBalancingRule(0.85f, ProjectileType<SpiritCongregation>()))));
#endregion
#region Supreme Calamitas: Brimstone Hearts
+2
View File
@@ -1,4 +1,5 @@
using Terraria;
using Terraria.GameContent;
using Terraria.ID;
using Terraria.ModLoader;
@@ -17,6 +18,7 @@ namespace CalamityMod.Buffs.Alcohol
public override void Update(Player player, ref int buffIndex)
{
player.Calamity().cinnamonRoll = true;
player.Calamity().HeatDebuffMultiplier += 0.5f;
}
}
}
+2
View File
@@ -17,6 +17,8 @@ namespace CalamityMod.Buffs.Alcohol
public override void Update(Player player, ref int buffIndex)
{
player.Calamity().evergreenGin = true;
player.Calamity().SicknessDebuffMultiplier += 0.25f;
player.Calamity().WaterDebuffMultiplier += 0.25f;
}
}
}
+1
View File
@@ -17,6 +17,7 @@ namespace CalamityMod.Buffs.Alcohol
public override void Update(Player player, ref int buffIndex)
{
player.Calamity().fireball = true;
player.Calamity().HeatDebuffMultiplier += 0.25f;
}
}
}
+8 -14
View File
@@ -16,14 +16,14 @@ namespace CalamityMod.Buffs
{
// Globally remove summon tag buff stacking
// Other mods need to add to this list because we genuinely don't have any way to tell this
if (SummonTagBuffList.Includes(type) && buffIndex > 0)
if (CalamityBuffSets.IsSummonTagBuff[type] && buffIndex > 0)
{
for (int i = buffIndex; i >= 0; i--)
{
if (player.buffTime[i] > 0)
{
int buffID = player.buffType[i];
if (SummonTagBuffList.Includes(buffID) && buffID != type)
if (CalamityBuffSets.IsSummonTagBuff[buffID] && buffID != type)
{
player.DelBuff(i);
break;
@@ -131,14 +131,14 @@ namespace CalamityMod.Buffs
{
// Globally remove summon tag debuff stacking, unless allowed in the SummonTag
// Other mods need to add to this list because otherwise we can't tell which IsATag buff is actually for whips
if (SummonTagDebuffDict.TryGet(type, out var tag1) && !tag1.AllowsWhipStacking && buffIndex > 0)
if (CalamityBuffSets.SummonTagDebuff.TryGetValue(type, out var tag1) && !tag1.AllowsWhipStacking && buffIndex > 0)
{
for (int i = buffIndex; i >= 0; i--)
{
if (npc.buffTime[i] > 0)
{
int buffID = npc.buffType[i];
if (SummonTagDebuffDict.TryGet(buffID, out var tag2) && !tag2.AllowsWhipStacking && buffID != type)
if (CalamityBuffSets.SummonTagDebuff.TryGetValue(buffID, out var tag2) && !tag2.AllowsWhipStacking && buffID != type)
{
npc.DelBuff(i);
break;
@@ -149,19 +149,13 @@ namespace CalamityMod.Buffs
if (type == BuffID.Webbed)
{
if (npc.Calamity().webbed < npc.buffTime[buffIndex])
npc.Calamity().webbed = npc.buffTime[buffIndex];
if ((EnemyImmunitiesList.Includes(npc.type) || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.Calamity().webbed;
npc.DelBuff(buffIndex);
buffIndex--;
npc.Calamity().webbed = true;
if ((CalamityNPCSets.ResistSlowingDebuffsAndOtherSpecialEffects[npc.type] || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.buffTime[buffIndex];
}
if (type == BuffID.Electrified)
{
if (npc.Calamity().electrified < npc.buffTime[buffIndex])
npc.Calamity().electrified = npc.buffTime[buffIndex];
npc.DelBuff(buffIndex);
buffIndex--;
npc.Calamity().electrified = true;
}
}
@@ -1,4 +1,5 @@
using CalamityMod.Particles;
using CalamityMod.DataStructures;
using CalamityMod.Particles;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
@@ -9,12 +10,18 @@ namespace CalamityMod.Buffs.DamageOverTime
{
public class AstralInfectionDebuff : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
EnemyLostRegen = 75,
SicknessDebuffScaling = 1
};
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex)
@@ -24,10 +31,7 @@ namespace CalamityMod.Buffs.DamageOverTime
public override void Update(NPC npc, ref int buffIndex)
{
if (npc.Calamity().astralInfection < npc.buffTime[buffIndex])
npc.Calamity().astralInfection = npc.buffTime[buffIndex];
npc.DelBuff(buffIndex);
buffIndex--;
npc.Calamity().astralInfection = true;
}
internal static void DrawEffects(PlayerDrawSet drawInfo)
+9 -5
View File
@@ -1,4 +1,5 @@
using CalamityMod.Particles;
using CalamityMod.DataStructures;
using CalamityMod.Particles;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
@@ -9,12 +10,18 @@ namespace CalamityMod.Buffs.DamageOverTime
{
public class AuricRebuke : ModBuff
{
public static DebuffData debuffData = new DebuffData(DebuffData.DebuffBehavior.Electric)
{
EnemyLostRegen = 200,
ElectricDebuffScaling = 1
};
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex)
@@ -24,10 +31,7 @@ namespace CalamityMod.Buffs.DamageOverTime
public override void Update(NPC npc, ref int buffIndex)
{
if (npc.Calamity().auricRebuke < npc.buffTime[buffIndex])
npc.Calamity().auricRebuke = npc.buffTime[buffIndex];
npc.DelBuff(buffIndex);
buffIndex--;
npc.Calamity().auricRebuke = true;
}
internal static void DrawEffects(PlayerDrawSet drawInfo)
+15 -5
View File
@@ -1,4 +1,5 @@
using Terraria;
using CalamityMod.DataStructures;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -6,12 +7,24 @@ namespace CalamityMod.Buffs.DamageOverTime
{
public class BanishingFire : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
EnemyLostRegen = 4000, //This is the minimum DoT. Banishing Fire scales with max HP
HeatDebuffScaling = 1, //Unused in the method, but kept so other things can know this is a heat debuff
NPCLifeRegenMethod = BanishingFireNPCLifeRegen
};
public static void BanishingFireNPCLifeRegen(NPC npc, int buffType, ref int buffIndex, ref int damage)
{
int baseBanishingFireDoTValue = (int)npc.Calamity().ActiveHeatDebuffMultiplier.ApplyTo((npc.lifeMax >= 1000000 ? npc.lifeMax / 500 : debuffData.EnemyLostRegen));
npc.Calamity().ApplyDPSDebuff(baseBanishingFireDoTValue, baseBanishingFireDoTValue / 5, ref npc.lifeRegen, ref damage);
}
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex)
@@ -21,10 +34,7 @@ namespace CalamityMod.Buffs.DamageOverTime
public override void Update(NPC npc, ref int buffIndex)
{
if (npc.Calamity().banishingFire < npc.buffTime[buffIndex])
npc.Calamity().banishingFire = npc.buffTime[buffIndex];
npc.DelBuff(buffIndex);
buffIndex--;
npc.Calamity().banishingFire = true;
}
}
}
+9 -5
View File
@@ -1,4 +1,5 @@
using CalamityMod.Particles;
using CalamityMod.DataStructures;
using CalamityMod.Particles;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
@@ -9,12 +10,18 @@ namespace CalamityMod.Buffs.DamageOverTime
{
public class BrainRot : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
EnemyLostRegen = 40,
SicknessDebuffScaling = 1
};
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex)
@@ -24,10 +31,7 @@ namespace CalamityMod.Buffs.DamageOverTime
public override void Update(NPC npc, ref int buffIndex)
{
if (npc.Calamity().brainRot < npc.buffTime[buffIndex])
npc.Calamity().brainRot = npc.buffTime[buffIndex];
npc.DelBuff(buffIndex);
buffIndex--;
npc.Calamity().brainRot = true;
}
internal static void DrawEffects(PlayerDrawSet drawInfo)
+10 -6
View File
@@ -1,4 +1,5 @@
using CalamityMod.Dusts;
using CalamityMod.DataStructures;
using CalamityMod.Dusts;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
@@ -9,25 +10,28 @@ namespace CalamityMod.Buffs.DamageOverTime
{
public class BrimstoneFlames : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
EnemyLostRegen = 60,
HeatDebuffScaling = 1
};
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex)
{
player.Calamity().bFlames = true;
player.Calamity().brimstoneFlames = true;
}
public override void Update(NPC npc, ref int buffIndex)
{
if (npc.Calamity().bFlames < npc.buffTime[buffIndex])
npc.Calamity().bFlames = npc.buffTime[buffIndex];
npc.DelBuff(buffIndex);
buffIndex--;
npc.Calamity().brimstoneFlames = true;
}
internal static void DrawEffects(PlayerDrawSet drawInfo, bool hasDebuffResistance = false)
+10 -6
View File
@@ -1,4 +1,5 @@
using CalamityMod.Particles;
using CalamityMod.DataStructures;
using CalamityMod.Particles;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
@@ -9,25 +10,28 @@ namespace CalamityMod.Buffs.DamageOverTime
{
public class BurningBlood : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
EnemyLostRegen = 40,
SicknessDebuffScaling = 1
};
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex)
{
player.Calamity().bBlood = true;
player.Calamity().burningBlood = true;
}
public override void Update(NPC npc, ref int buffIndex)
{
if (npc.Calamity().bBlood < npc.buffTime[buffIndex])
npc.Calamity().bBlood = npc.buffTime[buffIndex];
npc.DelBuff(buffIndex);
buffIndex--;
npc.Calamity().burningBlood = true;
}
internal static void DrawEffects(PlayerDrawSet drawInfo)
+10 -6
View File
@@ -1,4 +1,5 @@
using CalamityMod.Particles;
using CalamityMod.DataStructures;
using CalamityMod.Particles;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
@@ -9,25 +10,28 @@ namespace CalamityMod.Buffs.DamageOverTime
{
public class CrushDepth : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
EnemyLostRegen = 100,
WaterDebuffScaling = 1
};
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex)
{
player.Calamity().cDepth = true;
player.Calamity().crushDepth = true;
}
public override void Update(NPC npc, ref int buffIndex)
{
if (npc.Calamity().cDepth < npc.buffTime[buffIndex])
npc.Calamity().cDepth = npc.buffTime[buffIndex];
npc.DelBuff(buffIndex);
buffIndex--;
npc.Calamity().crushDepth = true;
}
internal static void DrawEffects(PlayerDrawSet drawInfo)
+4 -1
View File
@@ -1,4 +1,6 @@
using Terraria;
using CalamityMod.DataStructures;
using CalamityMod.Projectiles.Boss;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.Localization;
@@ -16,6 +18,7 @@ namespace CalamityMod.Buffs.DamageOverTime
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = DebuffData.Daybroken;
}
public override void Update(Player player, ref int buffIndex)
+13 -4
View File
@@ -1,4 +1,5 @@
using System;
using CalamityMod.DataStructures;
using CalamityMod.Dusts;
using CalamityMod.Particles;
using CalamityMod.Projectiles.Pets;
@@ -12,6 +13,17 @@ namespace CalamityMod.Buffs.DamageOverTime
{
public class DemonicFlames : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
EnemyLostRegen = 60, //Unused in the method, this is the amount of DoT from Forbidden Oathblade demon flames
HeatDebuffScaling = 1, //Unused in the method, but kept so other things can know this is a heat debuff
NPCLifeRegenMethod = DemonFlamesNPCLifeRegen
};
public static void DemonFlamesNPCLifeRegen(NPC npc, int buffType, ref int buffIndex, ref int damage)
{
int baseDemonicFlamesDoTValue = (int)Math.Max(npc.Calamity().ActiveHeatDebuffMultiplier.ApplyTo(npc.Calamity().demonicFlamesBonusDamage), npc.Calamity().demonicFlamesBonusDamage);
npc.Calamity().ApplyDPSDebuff(baseDemonicFlamesDoTValue, baseDemonicFlamesDoTValue / 15, ref npc.lifeRegen, ref damage);
}
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
@@ -27,10 +39,7 @@ namespace CalamityMod.Buffs.DamageOverTime
public override void Update(NPC npc, ref int buffIndex)
{
if (npc.Calamity().demonicFlames < npc.buffTime[buffIndex])
npc.Calamity().demonicFlames = npc.buffTime[buffIndex];
npc.DelBuff(buffIndex);
buffIndex--;
npc.Calamity().demonicFlames = true;
}
internal static void DrawEffects(PlayerDrawSet drawInfo, bool hasDebuffResistance = false)
+9 -5
View File
@@ -1,4 +1,5 @@
using CalamityMod.Particles;
using CalamityMod.DataStructures;
using CalamityMod.Particles;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
@@ -9,12 +10,18 @@ namespace CalamityMod.Buffs.DamageOverTime
{
public class Dragonfire : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
EnemyLostRegen = 960,
HeatDebuffScaling = 1
};
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex)
@@ -24,10 +31,7 @@ namespace CalamityMod.Buffs.DamageOverTime
public override void Update(NPC npc, ref int buffIndex)
{
if (npc.Calamity().dragonFire < npc.buffTime[buffIndex])
npc.Calamity().dragonFire = npc.buffTime[buffIndex];
npc.DelBuff(buffIndex);
buffIndex--;
npc.Calamity().dragonFire = true;
}
internal static void DrawEffects(PlayerDrawSet drawInfo)
+8 -5
View File
@@ -1,4 +1,5 @@
using CalamityMod.Dusts;
using CalamityMod.DataStructures;
using CalamityMod.Dusts;
using CalamityMod.Particles;
using Microsoft.Xna.Framework;
using Terraria;
@@ -10,12 +11,17 @@ namespace CalamityMod.Buffs.DamageOverTime
{
public class ElementalMix : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
EnemyLostRegen = 400
};
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex)
@@ -25,10 +31,7 @@ namespace CalamityMod.Buffs.DamageOverTime
public override void Update(NPC npc, ref int buffIndex)
{
if (npc.Calamity().elementalMix < npc.buffTime[buffIndex])
npc.Calamity().elementalMix = npc.buffTime[buffIndex];
npc.DelBuff(buffIndex);
buffIndex--;
npc.Calamity().elementalMix = true;
}
internal static void DrawEffects(PlayerDrawSet drawInfo)
+10 -6
View File
@@ -1,4 +1,5 @@
using CalamityMod.Particles;
using CalamityMod.DataStructures;
using CalamityMod.Particles;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
@@ -9,25 +10,28 @@ namespace CalamityMod.Buffs.DamageOverTime
{
public class GodSlayerInferno : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
EnemyLostRegen = 500,
HeatDebuffScaling = 1
};
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex)
{
player.Calamity().gsInferno = true;
player.Calamity().godSlayerInferno = true;
}
public override void Update(NPC npc, ref int buffIndex)
{
if (npc.Calamity().gsInferno < npc.buffTime[buffIndex])
npc.Calamity().gsInferno = npc.buffTime[buffIndex];
npc.DelBuff(buffIndex);
buffIndex--;
npc.Calamity().godSlayerInferno = true;
}
internal static void DrawEffects(PlayerDrawSet drawInfo)
+10 -6
View File
@@ -1,4 +1,5 @@
using CalamityMod.Particles;
using CalamityMod.DataStructures;
using CalamityMod.Particles;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
@@ -9,25 +10,28 @@ namespace CalamityMod.Buffs.DamageOverTime
{
public class HadopelagicPressure : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
EnemyLostRegen = 400,
WaterDebuffScaling = 1
};
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex)
{
player.Calamity().hPressure = true;
player.Calamity().hadopelagicPressure = true;
}
public override void Update(NPC npc, ref int buffIndex)
{
if (npc.Calamity().hPressure < npc.buffTime[buffIndex])
npc.Calamity().hPressure = npc.buffTime[buffIndex];
npc.DelBuff(buffIndex);
buffIndex--;
npc.Calamity().hadopelagicPressure = true;
}
internal static void DrawEffects(PlayerDrawSet drawInfo)
+9 -6
View File
@@ -1,6 +1,7 @@
using CalamityMod.Particles;
using System;
using CalamityMod.DataStructures;
using CalamityMod.Particles;
using Microsoft.Xna.Framework;
using System;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
@@ -10,12 +11,17 @@ namespace CalamityMod.Buffs.DamageOverTime
{
public class HeavyBleeding : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
EnemyLostRegen = 80
};
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex)
@@ -25,10 +31,7 @@ namespace CalamityMod.Buffs.DamageOverTime
public override void Update(NPC npc, ref int buffIndex)
{
if (npc.Calamity().heavybleeding < npc.buffTime[buffIndex])
npc.Calamity().heavybleeding = npc.buffTime[buffIndex];
npc.DelBuff(buffIndex);
buffIndex--;
npc.Calamity().heavyBleeding = true;
}
internal static void DrawEffects(PlayerDrawSet drawInfo)
{
+10 -6
View File
@@ -1,4 +1,5 @@
using CalamityMod.Particles;
using CalamityMod.DataStructures;
using CalamityMod.Particles;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
@@ -9,25 +10,28 @@ namespace CalamityMod.Buffs.DamageOverTime
{
public class HolyFlames : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
EnemyLostRegen = 300,
HeatDebuffScaling = 1
};
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex)
{
player.Calamity().hFlames = true;
player.Calamity().holyFlames = true;
}
public override void Update(NPC npc, ref int buffIndex)
{
if (npc.Calamity().hFlames < npc.buffTime[buffIndex])
npc.Calamity().hFlames = npc.buffTime[buffIndex];
npc.DelBuff(buffIndex);
buffIndex--;
npc.Calamity().holyFlames = true;
}
internal static void DrawEffects(PlayerDrawSet drawInfo)
+10 -2
View File
@@ -1,4 +1,5 @@
using Terraria;
using CalamityMod.DataStructures;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -6,17 +7,24 @@ namespace CalamityMod.Buffs.DamageOverTime
{
public class HolyInferno : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
EnemyLostRegen = 10000, //this is never applied to enemies
HeatDebuffScaling = 1,
GearCanModifyDebuff = false
};
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex)
{
player.Calamity().hInferno = true;
player.Calamity().holyInferno = true;
}
}
}
+9 -6
View File
@@ -1,6 +1,7 @@
using CalamityMod.Particles;
using System;
using CalamityMod.DataStructures;
using CalamityMod.Particles;
using Microsoft.Xna.Framework;
using System;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
@@ -10,12 +11,17 @@ namespace CalamityMod.Buffs.DamageOverTime
{
public class Laceration : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
EnemyLostRegen = 400
};
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex)
@@ -25,10 +31,7 @@ namespace CalamityMod.Buffs.DamageOverTime
public override void Update(NPC npc, ref int buffIndex)
{
if (npc.Calamity().laceration < npc.buffTime[buffIndex])
npc.Calamity().laceration = npc.buffTime[buffIndex];
npc.DelBuff(buffIndex);
buffIndex--;
npc.Calamity().laceration = true;
}
internal static void DrawEffects(PlayerDrawSet drawInfo)
{
+1
View File
@@ -6,6 +6,7 @@ namespace CalamityMod.Buffs.DamageOverTime
{
public class ManaBurn : ModBuff
{
//as of now, this doesn't use the custom debuff system due to the debuff being a front for the actual effects in the Chaos Stone rework
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
+8 -5
View File
@@ -1,4 +1,5 @@
using CalamityMod.Particles;
using CalamityMod.DataStructures;
using CalamityMod.Particles;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
@@ -9,12 +10,17 @@ namespace CalamityMod.Buffs.DamageOverTime
{
public class MiracleBlight : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
EnemyLostRegen = 3000
};
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex)
@@ -24,10 +30,7 @@ namespace CalamityMod.Buffs.DamageOverTime
public override void Update(NPC npc, ref int buffIndex)
{
if (npc.Calamity().miracleBlight < npc.buffTime[buffIndex])
npc.Calamity().miracleBlight = npc.buffTime[buffIndex];
npc.DelBuff(buffIndex);
buffIndex--;
npc.Calamity().miracleBlight = true;
}
internal static void DrawEffects(PlayerDrawSet drawInfo)
+9 -5
View File
@@ -1,4 +1,5 @@
using CalamityMod.Particles;
using CalamityMod.DataStructures;
using CalamityMod.Particles;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
@@ -9,12 +10,18 @@ namespace CalamityMod.Buffs.DamageOverTime
{
public class Nightwither : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
EnemyLostRegen = 200,
ColdDebuffScaling = 1
};
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex)
@@ -24,10 +31,7 @@ namespace CalamityMod.Buffs.DamageOverTime
public override void Update(NPC npc, ref int buffIndex)
{
if (npc.Calamity().nightwither < npc.buffTime[buffIndex])
npc.Calamity().nightwither = npc.buffTime[buffIndex];
npc.DelBuff(buffIndex);
buffIndex--;
npc.Calamity().nightwither = true;
}
internal static void DrawEffects(PlayerDrawSet drawInfo, bool hasDebuffResistance = false)
+10 -6
View File
@@ -1,4 +1,5 @@
using CalamityMod.Particles;
using CalamityMod.DataStructures;
using CalamityMod.Particles;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
@@ -9,25 +10,28 @@ namespace CalamityMod.Buffs.DamageOverTime
{
public class Plague : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
EnemyLostRegen = 100,
SicknessDebuffScaling = 1
};
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex)
{
player.Calamity().pFlames = true;
player.Calamity().plague = true;
}
public override void Update(NPC npc, ref int buffIndex)
{
if (npc.Calamity().pFlames < npc.buffTime[buffIndex])
npc.Calamity().pFlames = npc.buffTime[buffIndex];
npc.DelBuff(buffIndex);
buffIndex--;
npc.Calamity().plague = true;
}
internal static void DrawEffects(PlayerDrawSet drawInfo)
+10 -6
View File
@@ -1,4 +1,5 @@
using Microsoft.Xna.Framework;
using CalamityMod.DataStructures;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
@@ -8,25 +9,28 @@ namespace CalamityMod.Buffs.DamageOverTime
{
public class RiptideDebuff : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
EnemyLostRegen = 30,
WaterDebuffScaling = 1
};
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex)
{
player.Calamity().rTide = true;
player.Calamity().riptide = true;
}
public override void Update(NPC npc, ref int buffIndex)
{
if (npc.Calamity().rTide < npc.buffTime[buffIndex])
npc.Calamity().rTide = npc.buffTime[buffIndex];
npc.DelBuff(buffIndex);
buffIndex--;
npc.Calamity().riptide = true;
}
internal static void DrawEffects(PlayerDrawSet drawInfo)
+16 -5
View File
@@ -1,10 +1,24 @@
using Terraria;
using CalamityMod.DataStructures;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.DamageOverTime
{
public class SagePoison : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
EnemyLostRegen = 50,
NPCLifeRegenMethod = SagePoisonPower
};
public static void SagePoisonPower(NPC npc, int buffType, ref int buffIndex, ref int damage)
{
// The dot ia multipliplied by this before being applied:
// (float)(Math.Pow(totalSageSpirits, 0.9D) + Math.Pow(totalSageSpirits, 1.13D)) * 0.5f;
// See SageNeedle.cs for details
int baseSagePoisonDoTValue = (int)npc.Calamity().ActiveTypelessDebuffMultiplier.ApplyTo(npc.Calamity().sagePoisonDamage);
npc.Calamity().ApplyDPSDebuff(baseSagePoisonDoTValue, baseSagePoisonDoTValue / 5, ref npc.lifeRegen, ref damage);
}
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
@@ -13,10 +27,7 @@ namespace CalamityMod.Buffs.DamageOverTime
}
public override void Update(NPC npc, ref int buffIndex)
{
if (npc.Calamity().sagePoisonTime < npc.buffTime[buffIndex])
npc.Calamity().sagePoisonTime = npc.buffTime[buffIndex];
npc.DelBuff(buffIndex);
buffIndex--;
npc.Calamity().sagePoison = true;
}
}
}
+9 -2
View File
@@ -1,4 +1,5 @@
using Terraria;
using CalamityMod.DataStructures;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.DamageOverTime
@@ -6,17 +7,23 @@ namespace CalamityMod.Buffs.DamageOverTime
[LegacyName("CragsLava")]
public class SearingLava : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
EnemyLostRegen = 1000, //Never infliced on enemies, token value. Really high bc this hurts a lot on players
HeatDebuffScaling = 1
};
public override void SetStaticDefaults()
{
Main.buffNoTimeDisplay[Type] = true;
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex)
{
player.Calamity().cragsLava = true;
player.Calamity().searingLava = true;
}
}
}
+3 -1
View File
@@ -1,4 +1,5 @@
using Microsoft.Xna.Framework;
using CalamityMod.DataStructures;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
@@ -17,6 +18,7 @@ namespace CalamityMod.Buffs.DamageOverTime
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = DebuffData.Shadowflame;
}
public override void Update(Player player, ref int buffIndex)
+39 -5
View File
@@ -1,23 +1,57 @@
using Terraria;
using CalamityMod.Balancing;
using CalamityMod.DataStructures;
using CalamityMod.Projectiles.Summon;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.DamageOverTime
{
public class ShellfishClaps : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
EnemyLostRegen = 150, //Damage per shellfish
NPCLifeRegenMethod = ShellfishStacking
};
public static void ShellfishStacking(NPC npc, int buffType, ref int buffIndex, ref int damage)
{
int projectileCount = 0;
int owner = 255;
foreach (Projectile p in Main.ActiveProjectiles)
{
if (p.type == ModContent.ProjectileType<Shellfish>() &&
p.ai[0] == 1f && p.ai[1] == npc.whoAmI)
{
owner = p.owner;
projectileCount++;
if (projectileCount >= 5)
{
projectileCount = 5;
break;
}
}
}
Item heldItem = Main.player[owner].ActiveItem();
int totalDamage = (int)Main.player[owner].GetTotalDamage<SummonDamageClass>().ApplyTo(debuffData.EnemyLostRegen);
if (CalamityUtils.ShouldTriggerSummonPenalty(Main.player[owner], heldItem))
totalDamage = (int)(totalDamage * BalancingConstants.SummonerCrossClassNerf);
int totalDisplayedDamage = totalDamage / 5;
npc.Calamity().ApplyDPSDebuff(projectileCount * totalDamage, projectileCount * totalDisplayedDamage, ref npc.lifeRegen, ref damage);
}
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
}
public override void Update(NPC npc, ref int buffIndex)
{
if (npc.Calamity().shellfishVore < npc.buffTime[buffIndex])
npc.Calamity().shellfishVore = npc.buffTime[buffIndex];
npc.DelBuff(buffIndex);
buffIndex--;
npc.Calamity().shellfishStaffDebuff = true;
}
}
}
+2
View File
@@ -11,6 +11,8 @@ namespace CalamityMod.Buffs.DamageOverTime
{
public class Shred : ModBuff
{
//This is not ported to the custom debuff system yet due to the complexities of it.
//I didn't want to break it! It will be done in a future PR
internal const int StackFalloffFrames = 320;
// This deals 600 DPS per stack, is boosted by ranged stats and can supercrit.
+29 -5
View File
@@ -1,23 +1,47 @@
using Terraria;
using CalamityMod.Balancing;
using CalamityMod.DataStructures;
using CalamityMod.Projectiles.Rogue;
using CalamityMod.Projectiles.Summon;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.DamageOverTime
{
public class SnapClamDebuff : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
EnemyLostRegen = 15, //Damage per shellfish
NPCLifeRegenMethod = ShellfishStacking
};
public static void ShellfishStacking(NPC npc, int buffType, ref int buffIndex, ref int damage)
{
int projectileCount = 0;
foreach (Projectile p in Main.ActiveProjectiles)
{
if (p.ai[0] == 1f && p.ai[1] == npc.whoAmI)
{
if (p.type == ModContent.ProjectileType<SnapClamProj>())
projectileCount += 2;
if (p.type == ModContent.ProjectileType<SnapClamStealth>())
projectileCount++;
}
}
npc.Calamity().ApplyDPSDebuff((int)(projectileCount * debuffData.EnemyLostRegen), projectileCount * 3, ref npc.lifeRegen, ref damage);
}
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
}
public override void Update(NPC npc, ref int buffIndex)
{
if (npc.Calamity().clamDebuff < npc.buffTime[buffIndex])
npc.Calamity().clamDebuff = npc.buffTime[buffIndex];
npc.DelBuff(buffIndex);
buffIndex--;
npc.Calamity().snapClamDebuff = true;
}
}
}
+9 -5
View File
@@ -1,4 +1,5 @@
using CalamityMod.Particles;
using CalamityMod.DataStructures;
using CalamityMod.Particles;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
@@ -9,12 +10,18 @@ namespace CalamityMod.Buffs.DamageOverTime
{
public class StaticDischarge : ModBuff
{
public static DebuffData debuffData = new DebuffData(DebuffData.DebuffBehavior.Electric)
{
EnemyLostRegen = 5,
ElectricDebuffScaling = 1
};
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex)
@@ -24,10 +31,7 @@ namespace CalamityMod.Buffs.DamageOverTime
public override void Update(NPC npc, ref int buffIndex)
{
if (npc.Calamity().staticDischarge < npc.buffTime[buffIndex])
npc.Calamity().staticDischarge = npc.buffTime[buffIndex];
npc.DelBuff(buffIndex);
buffIndex--;
npc.Calamity().staticDischarge = true;
}
internal static void DrawEffects(PlayerDrawSet drawInfo)
+9 -5
View File
@@ -1,4 +1,5 @@
using CalamityMod.Particles;
using CalamityMod.DataStructures;
using CalamityMod.Particles;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
@@ -9,12 +10,18 @@ namespace CalamityMod.Buffs.DamageOverTime
{
public class SulphuricPoisoning : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
EnemyLostRegen = 240,
SicknessDebuffScaling = 1
};
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
// Acid Venom immunity is granted automatically if you are immune to Sulphuric Poisoning.
BuffID.Sets.GrantImmunityWith[BuffID.Venom].Add(Type);
@@ -33,10 +40,7 @@ namespace CalamityMod.Buffs.DamageOverTime
public override void Update(NPC npc, ref int buffIndex)
{
if (npc.Calamity().sulphurPoison < npc.buffTime[buffIndex])
npc.Calamity().sulphurPoison = npc.buffTime[buffIndex];
npc.DelBuff(buffIndex);
buffIndex--;
npc.Calamity().sulphurPoison = true;
}
internal static void DrawEffects(PlayerDrawSet drawInfo)
+17 -20
View File
@@ -1,4 +1,5 @@
using CalamityMod.Dusts;
using CalamityMod.DataStructures;
using CalamityMod.Dusts;
using CalamityMod.NPCs;
using CalamityMod.Particles;
using CalamityMod.Systems.Collections;
@@ -12,11 +13,13 @@ namespace CalamityMod.Buffs.DamageOverTime
{
public class TrueVulnerabilityHex : ModBuff
{
// The visual number displayed in ticks as the enemy takes damage.
public const int TickNumber = 666;
// The exact amount True Vulnerability Hex reduces NPC life regen by.
public const int DPS = TickNumber * 6; // -3996 life regen, 1998 DPS
public static DebuffData debuffData = new DebuffData()
{
EnemyLostRegen = 3996, //6x the tick size
SicknessDebuffScaling = 1,
MinimumDamageTickSize = 666, //Vhex should always have ticks of 666
MultiplierDamageTickSize = 0
};
public override void SetStaticDefaults()
{
@@ -25,6 +28,7 @@ namespace CalamityMod.Buffs.DamageOverTime
Main.buffNoSave[Type] = true;
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex) => player.Calamity().trueVHex = true;
@@ -32,21 +36,14 @@ namespace CalamityMod.Buffs.DamageOverTime
public override void Update(NPC npc, ref int buffIndex)
{
CalamityGlobalNPC cgn = npc.Calamity();
if (cgn.trueVulnerabilityHex < npc.buffTime[buffIndex])
{
cgn.trueVulnerabilityHex = npc.buffTime[buffIndex];
// Set the remaining time of the fire drawer to be exactly right.
if (cgn.VulnerabilityHexFireDrawer != null)
cgn.VulnerabilityHexFireDrawer.SetLifetime = cgn.VulnerabilityHexFireDrawer.LocalTimer + cgn.trueVulnerabilityHex;
}
//If this isn't here the drawcode gives an index out of bounds
if (npc.buffTime[buffIndex] > 1)
cgn.trueVulnerabilityHex = true;
if (cgn.VulnerabilityHexFireDrawer != null)
cgn.VulnerabilityHexFireDrawer.SetLifetime = cgn.VulnerabilityHexFireDrawer.LocalTimer + npc.buffTime[buffIndex];
if ((CalamityNPCSets.ResistSlowingDebuffsAndOtherSpecialEffects[npc.type] || npc.boss) && cgn.debuffResistanceTimer <= 0)
cgn.debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.buffTime[buffIndex];
// Apply immunity timer.
if ((EnemyImmunitiesList.Includes(npc.type) || npc.boss) && cgn.debuffResistanceTimer <= 0)
cgn.debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + cgn.trueVulnerabilityHex;
// Destroy the vanilla buff, we don't use it.
npc.DelBuff(buffIndex);
buffIndex--;
}
internal static void DrawEffects(NPC npc, ref Color drawColor)
+12 -7
View File
@@ -1,4 +1,5 @@
using CalamityMod.NPCs;
using CalamityMod.DataStructures;
using CalamityMod.NPCs;
using CalamityMod.Systems.Collections;
using Microsoft.Xna.Framework;
using Terraria;
@@ -10,12 +11,19 @@ namespace CalamityMod.Buffs.DamageOverTime
{
public class Vaporfied : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
EnemyLostRegen = 30,
MinimumDamageTickSize = 6,
MultiplierDamageTickSize = 0
};
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex)
@@ -25,12 +33,9 @@ namespace CalamityMod.Buffs.DamageOverTime
public override void Update(NPC npc, ref int buffIndex)
{
if (npc.Calamity().vaporfied < npc.buffTime[buffIndex])
npc.Calamity().vaporfied = npc.buffTime[buffIndex];
if ((EnemyImmunitiesList.Includes(npc.type) || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.Calamity().vaporfied;
npc.DelBuff(buffIndex);
buffIndex--;
npc.Calamity().vaporfied = true;
if ((CalamityNPCSets.ResistSlowingDebuffsAndOtherSpecialEffects[npc.type] || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin +npc.buffTime[buffIndex];
}
internal static void DrawEffects(PlayerDrawSet drawInfo)
+9 -5
View File
@@ -1,4 +1,5 @@
using CalamityMod.Particles;
using CalamityMod.DataStructures;
using CalamityMod.Particles;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
@@ -9,12 +10,18 @@ namespace CalamityMod.Buffs.DamageOverTime
{
public class VermillionFlux : ModBuff
{
public static DebuffData debuffData = new DebuffData(DebuffData.DebuffBehavior.Electric)
{
EnemyLostRegen = 100,
ElectricDebuffScaling = 1
};
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex)
@@ -24,10 +31,7 @@ namespace CalamityMod.Buffs.DamageOverTime
public override void Update(NPC npc, ref int buffIndex)
{
if (npc.Calamity().vermillionFlux < npc.buffTime[buffIndex])
npc.Calamity().vermillionFlux = npc.buffTime[buffIndex];
npc.DelBuff(buffIndex);
buffIndex--;
npc.Calamity().vermillionFlux = true;
}
internal static void DrawEffects(PlayerDrawSet drawInfo)
+9 -5
View File
@@ -1,4 +1,5 @@
using CalamityMod.Particles;
using CalamityMod.DataStructures;
using CalamityMod.Particles;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
@@ -9,12 +10,18 @@ namespace CalamityMod.Buffs.DamageOverTime
{
public class Voidfrost : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
EnemyLostRegen = 200,
ColdDebuffScaling = 1
};
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex)
@@ -24,10 +31,7 @@ namespace CalamityMod.Buffs.DamageOverTime
public override void Update(NPC npc, ref int buffIndex)
{
if (npc.Calamity().voidfrost < npc.buffTime[buffIndex])
npc.Calamity().voidfrost = npc.buffTime[buffIndex];
npc.DelBuff(buffIndex);
buffIndex--;
npc.Calamity().voidfrost = true;
}
internal static void DrawEffects(PlayerDrawSet drawInfo, bool hasDebuffResistance = false)
+19 -19
View File
@@ -1,4 +1,5 @@
using CalamityMod.Dusts;
using CalamityMod.DataStructures;
using CalamityMod.Dusts;
using CalamityMod.NPCs;
using CalamityMod.Particles;
using CalamityMod.Systems.Collections;
@@ -12,11 +13,13 @@ namespace CalamityMod.Buffs.DamageOverTime
{
public class VulnerabilityHex : ModBuff
{
// The visual number displayed in ticks as the enemy takes damage.
public const int TickNumber = 666;
// The exact amount Vulnerability Hex reduces NPC life regen by.
public const int DPS = TickNumber * 4; // -2664 life regen, 1332 DPS
public static DebuffData debuffData = new DebuffData()
{
EnemyLostRegen = 2664, //4x tick size
HeatDebuffScaling = 1,
MinimumDamageTickSize = 666,
MultiplierDamageTickSize = 0
};
public const int CalamityDuration = 60;
public const int AflameDuration = 120;
@@ -28,6 +31,7 @@ namespace CalamityMod.Buffs.DamageOverTime
Main.buffNoSave[Type] = true;
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex) => player.Calamity().vHex = true;
@@ -35,21 +39,17 @@ namespace CalamityMod.Buffs.DamageOverTime
public override void Update(NPC npc, ref int buffIndex)
{
CalamityGlobalNPC cgn = npc.Calamity();
if (cgn.vulnerabilityHex < npc.buffTime[buffIndex])
{
cgn.vulnerabilityHex = npc.buffTime[buffIndex];
// Set the remaining time of the fire drawer to be exactly right.
if (cgn.VulnerabilityHexFireDrawer != null)
cgn.VulnerabilityHexFireDrawer.SetLifetime = cgn.VulnerabilityHexFireDrawer.LocalTimer + cgn.vulnerabilityHex;
}
//If this isn't here the drawcode gives an index out of bounds
if (npc.buffTime[buffIndex] > 1)
cgn.vulnerabilityHex = true;
// Set the remaining time of the fire drawer to be exactly right.
if (cgn.VulnerabilityHexFireDrawer != null)
cgn.VulnerabilityHexFireDrawer.SetLifetime = cgn.VulnerabilityHexFireDrawer.LocalTimer + npc.buffTime[buffIndex];
// Apply immunity timer.
if ((EnemyImmunitiesList.Includes(npc.type) || npc.boss) && cgn.debuffResistanceTimer <= 0)
cgn.debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + cgn.vulnerabilityHex;
// Destroy the vanilla buff, we don't use it.
npc.DelBuff(buffIndex);
buffIndex--;
if ((CalamityNPCSets.ResistSlowingDebuffsAndOtherSpecialEffects[npc.type] || npc.boss) && cgn.debuffResistanceTimer <= 0)
cgn.debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + +npc.buffTime[buffIndex];
}
internal static void DrawEffects(PlayerDrawSet drawInfo)
{
+8 -1
View File
@@ -1,16 +1,23 @@
using Terraria;
using CalamityMod.DataStructures;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.DamageOverTime
{
public class WeakBrimstoneFlames : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
EnemyLostRegen = 10, //This is never infliced on enemies, this is just a token value
HeatDebuffScaling = 1,
};
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
Main.buffNoTimeDisplay[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex) => player.Calamity().weakBrimstoneFlames = true;
-1
View File
@@ -21,7 +21,6 @@ namespace CalamityMod.Buffs.StatBuffs
public override void Update(Player player, ref int buffIndex)
{
player.Calamity().adrenalineModeActive = true;
player.Calamity().AdrenalineTrail = true;
}
public override void ModifyBuffText(ref string buffName, ref string tip, ref int rare)
+11 -5
View File
@@ -1,4 +1,5 @@
using CalamityMod.Dusts;
using CalamityMod.DataStructures;
using CalamityMod.Dusts;
using CalamityMod.Particles;
using Microsoft.Xna.Framework;
using Terraria;
@@ -8,19 +9,24 @@ namespace CalamityMod.Buffs.StatDebuffs
{
public class AbsorberAffliction : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
EnemyLostRegen = 400,
SicknessDebuffScaling = 1,
MultiplierDamageTickSize = 1 / 20f
};
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
}
public override void Update(NPC npc, ref int buffIndex)
{
if (npc.Calamity().absorberAffliction < npc.buffTime[buffIndex])
npc.Calamity().absorberAffliction = npc.buffTime[buffIndex];
npc.DelBuff(buffIndex);
buffIndex--;
npc.Calamity().absorberAffliction = true;
}
internal static void DrawEffects(NPC npc, ref Color drawColor)
+2 -5
View File
@@ -22,15 +22,12 @@ namespace CalamityMod.Buffs.StatDebuffs
public override void Update(NPC npc, ref int buffIndex)
{
if (npc.Calamity().aCrunch < npc.buffTime[buffIndex])
npc.Calamity().aCrunch = npc.buffTime[buffIndex];
npc.DelBuff(buffIndex);
buffIndex--;
npc.Calamity().armorCrunch = true;
}
public override void Update(Player player, ref int buffIndex)
{
player.Calamity().aCrunch = true;
player.Calamity().armorCrunch = true;
}
}
}
+1 -4
View File
@@ -22,10 +22,7 @@ namespace CalamityMod.Buffs.StatDebuffs
public override void Update(NPC npc, ref int buffIndex)
{
if (npc.Calamity().crumble < npc.buffTime[buffIndex])
npc.Calamity().crumble = npc.buffTime[buffIndex];
npc.DelBuff(buffIndex);
buffIndex--;
npc.Calamity().crumble = true;
}
public override void Update(Player player, ref int buffIndex)
+3 -6
View File
@@ -25,12 +25,9 @@ namespace CalamityMod.Buffs.StatDebuffs
public override void Update(NPC npc, ref int buffIndex)
{
if (npc.Calamity().eutrophication < npc.buffTime[buffIndex])
npc.Calamity().eutrophication = npc.buffTime[buffIndex];
if ((EnemyImmunitiesList.Includes(npc.type) || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.Calamity().eutrophication;
npc.DelBuff(buffIndex);
buffIndex--;
npc.Calamity().eutrophication = true;
if ((CalamityNPCSets.ResistSlowingDebuffsAndOtherSpecialEffects[npc.type] || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.buffTime[buffIndex];
}
internal static void DrawEffects(PlayerDrawSet drawInfo)
+1 -1
View File
@@ -15,7 +15,7 @@ namespace CalamityMod.Buffs.StatDebuffs
public override void Update(Player player, ref int buffIndex)
{
player.Calamity().iCantBreathe = true;
player.Calamity().frozenLungs = true;
}
}
}
+3 -6
View File
@@ -18,12 +18,9 @@ namespace CalamityMod.Buffs.StatDebuffs
public override void Update(NPC npc, ref int buffIndex)
{
if (npc.Calamity().tesla < npc.buffTime[buffIndex])
npc.Calamity().tesla = npc.buffTime[buffIndex];
if ((EnemyImmunitiesList.Includes(npc.type) || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.Calamity().tesla;
npc.DelBuff(buffIndex);
buffIndex--;
npc.Calamity().galvanicCorrosion = true;
if ((CalamityNPCSets.ResistSlowingDebuffsAndOtherSpecialEffects[npc.type] || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.buffTime[buffIndex];
}
public override void Update(Player player, ref int buffIndex)
+3 -4
View File
@@ -20,10 +20,9 @@ namespace CalamityMod.Buffs.StatDebuffs
public override void Update(NPC npc, ref int buffIndex)
{
if (npc.Calamity().gState < npc.buffTime[buffIndex])
npc.Calamity().gState = npc.buffTime[buffIndex];
if ((EnemyImmunitiesList.Includes(npc.type) || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.Calamity().gState;
npc.Calamity().glacialState = true;
if ((CalamityNPCSets.ResistSlowingDebuffsAndOtherSpecialEffects[npc.type] || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.buffTime[buffIndex];
npc.DelBuff(buffIndex);
buffIndex--;
}
+43 -5
View File
@@ -1,4 +1,6 @@
using Terraria;
using CalamityMod.DataStructures;
using CalamityMod.Projectiles.Magic;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -6,6 +8,44 @@ namespace CalamityMod.Buffs.StatDebuffs
{
public class Irradiated : ModBuff
{
public static DebuffData debuffData = new DebuffData()
{
EnemyLostRegen = 20, //Base irradiated DOT. This is changed with some application sources.
NPCLifeRegenMethod = IrradiatedNPCLifeRegen
};
public static void IrradiatedNPCLifeRegen(NPC npc, int buffType, ref int buffIndex, ref int damage)
{
var cnpc = npc.Calamity();
int projectileCount = 0;
foreach (Projectile p in Main.ActiveProjectiles)
{
if (p.type == ModContent.ProjectileType<WaterLeechProj>() &&
p.ai[0] == 1f && p.ai[1] == npc.whoAmI)
{
projectileCount++;
}
}
int baseIrradiatedDoTValue = (int)(cnpc.scionsCurioEffected ? (int)(debuffData.EnemyLostRegen * 1.5f) : debuffData.EnemyLostRegen);
if (cnpc.scionsCurioEffected)
{
for (int playerIndex = 0; playerIndex < Main.maxPlayers; playerIndex++)
{
Player player = Main.player[playerIndex];
if (player.active)
{
float playerRangedDamage = player.GetTotalDamage(DamageClass.Ranged).ApplyTo(baseIrradiatedDoTValue * (1 + player.GetTotalCritChance(DamageClass.Ranged) * 0.01f));
if (playerRangedDamage > baseIrradiatedDoTValue && player.Calamity().scionsCurio)
{
baseIrradiatedDoTValue = (int)playerRangedDamage;
}
}
}
}
if (projectileCount > 0)
cnpc.ApplyDPSDebuff(projectileCount * baseIrradiatedDoTValue, projectileCount * 4, ref npc.lifeRegen, ref damage);
else
cnpc.ApplyDPSDebuff(baseIrradiatedDoTValue, baseIrradiatedDoTValue / 20, ref npc.lifeRegen, ref damage);
}
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
@@ -13,6 +53,7 @@ namespace CalamityMod.Buffs.StatDebuffs
Main.buffNoSave[Type] = true;
BuffID.Sets.NurseCannotRemoveDebuff[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
BuffDatasets.DebuffDataset[Type] = debuffData;
}
public override void Update(Player player, ref int buffIndex)
@@ -22,10 +63,7 @@ namespace CalamityMod.Buffs.StatDebuffs
public override void Update(NPC npc, ref int buffIndex)
{
if (npc.Calamity().irradiated < npc.buffTime[buffIndex])
npc.Calamity().irradiated = npc.buffTime[buffIndex];
npc.DelBuff(buffIndex);
buffIndex--;
npc.Calamity().irradiated = true;
}
}
}
+3 -5
View File
@@ -1,4 +1,5 @@
using Terraria;
using CalamityMod.DataStructures;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.StatDebuffs
@@ -16,10 +17,7 @@ namespace CalamityMod.Buffs.StatDebuffs
public override void Update(NPC npc, ref int buffIndex)
{
if (npc.Calamity().marked < npc.buffTime[buffIndex])
npc.Calamity().marked = npc.buffTime[buffIndex];
npc.DelBuff(buffIndex);
buffIndex--;
npc.Calamity().markedForDeath = true;
}
}
}
+1 -4
View File
@@ -16,10 +16,7 @@ namespace CalamityMod.Buffs.StatDebuffs
public override void Update(NPC npc, ref int buffIndex)
{
if (npc.Calamity().pearlAura < npc.buffTime[buffIndex])
npc.Calamity().pearlAura = npc.buffTime[buffIndex];
npc.DelBuff(buffIndex);
buffIndex--;
npc.Calamity().pearlAura = true;
}
internal static void DrawEffects(NPC npc, ref Color drawColor)
+1 -4
View File
@@ -16,10 +16,7 @@ namespace CalamityMod.Buffs.StatDebuffs
}
public override void Update(NPC npc, ref int buffIndex)
{
if (npc.Calamity().relicOfResilienceWeakness < npc.buffTime[buffIndex])
npc.Calamity().relicOfResilienceWeakness = npc.buffTime[buffIndex];
npc.DelBuff(buffIndex);
buffIndex--;
npc.Calamity().relicOfResilienceWeakness = true;
}
internal static void DrawEffects(NPC npc, ref Color drawColor)
{
+3 -6
View File
@@ -16,12 +16,9 @@ namespace CalamityMod.Buffs.StatDebuffs
public override void Update(NPC npc, ref int buffIndex)
{
if (npc.Calamity().tSad < npc.buffTime[buffIndex])
npc.Calamity().tSad = npc.buffTime[buffIndex];
if ((EnemyImmunitiesList.Includes(npc.type) || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.Calamity().tSad;
npc.DelBuff(buffIndex);
buffIndex--;
npc.Calamity().temporalSadness = true;
if ((CalamityNPCSets.ResistSlowingDebuffsAndOtherSpecialEffects[npc.type] || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.buffTime[buffIndex];
}
}
}
+3 -6
View File
@@ -18,12 +18,9 @@ namespace CalamityMod.Buffs.StatDebuffs
public override void Update(NPC npc, ref int buffIndex)
{
if (npc.Calamity().timeSlow < npc.buffTime[buffIndex])
npc.Calamity().timeSlow = npc.buffTime[buffIndex];
if ((EnemyImmunitiesList.Includes(npc.type) || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.Calamity().timeSlow;
npc.DelBuff(buffIndex);
buffIndex--;
npc.Calamity().timeDistortion = true;
if ((CalamityNPCSets.ResistSlowingDebuffsAndOtherSpecialEffects[npc.type] || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.buffTime[buffIndex];
}
}
}
+2 -5
View File
@@ -16,15 +16,12 @@ namespace CalamityMod.Buffs.StatDebuffs
public override void Update(Player player, ref int buffIndex)
{
player.Calamity().wDeath = true;
player.Calamity().whisperingDeath = true;
}
public override void Update(NPC npc, ref int buffIndex)
{
if (npc.Calamity().wDeath < npc.buffTime[buffIndex])
npc.Calamity().wDeath = npc.buffTime[buffIndex];
npc.DelBuff(buffIndex);
buffIndex--;
npc.Calamity().whisperingDeath = true;
}
}
}
+1 -4
View File
@@ -20,10 +20,7 @@ namespace CalamityMod.Buffs.StatDebuffs
public override void Update(NPC npc, ref int buffIndex)
{
if (npc.Calamity().wither < npc.buffTime[buffIndex])
npc.Calamity().wither = npc.buffTime[buffIndex];
npc.DelBuff(buffIndex);
buffIndex--;
npc.Calamity().wither = true;
}
public override void Update(Player player, ref int buffIndex)
@@ -1,12 +1,12 @@
using CalamityMod.Projectiles.Summon;
using CalamityMod.Projectiles.Summon;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Summon
{
public class BrimstoneWaifu : BaseSummonBuff
public class BrimstoneElemental : BaseSummonBuff
{
protected override int MinionProjectileType => ModContent.ProjectileType<BrimstoneElementalMinion>();
protected override ref bool MinionBool => ref BuffModdedOwner.bWaifu;
protected override ref bool MinionBool => ref BuffModdedOwner.brimEleBuff;
}
}
File renamed without changes.

Before

Width:  |  Height:  |  Size: 467 B

After

Width:  |  Height:  |  Size: 467 B

@@ -3,10 +3,10 @@ using Terraria.ModLoader;
namespace CalamityMod.Buffs.Summon
{
public class CloudyWaifu : BaseSummonBuff
public class CloudElemental : BaseSummonBuff
{
protected override int MinionProjectileType => ModContent.ProjectileType<CloudElementalMinion>();
protected override ref bool MinionBool => ref BuffModdedOwner.cWaifu;
protected override ref bool MinionBool => ref BuffModdedOwner.cloudEleBuff;
}
}
File renamed without changes.

Before

Width:  |  Height:  |  Size: 488 B

After

Width:  |  Height:  |  Size: 488 B

+1 -1
View File
@@ -16,7 +16,7 @@ namespace CalamityMod.Buffs.Summon
{
CalamityPlayer modPlayer = player.Calamity();
if (!modPlayer.allWaifus)
if (!modPlayer.allElementals)
{
player.DelBuff(buffIndex);
buffIndex--;
@@ -3,10 +3,10 @@ using Terraria.ModLoader;
namespace CalamityMod.Buffs.Summon
{
public class SandyHealingWaifu : BaseSummonBuff
public class RareSandElemental : BaseSummonBuff
{
protected override int MinionProjectileType => ModContent.ProjectileType<SandElementalHealer>();
protected override ref bool MinionBool => ref BuffModdedOwner.dWaifu;
protected override ref bool MinionBool => ref BuffModdedOwner.rareSandEleBuff;
}
}
File renamed without changes.

Before

Width:  |  Height:  |  Size: 601 B

After

Width:  |  Height:  |  Size: 601 B

@@ -3,10 +3,10 @@ using Terraria.ModLoader;
namespace CalamityMod.Buffs.Summon
{
public class SandyWaifu : BaseSummonBuff
public class SandElemental : BaseSummonBuff
{
protected override int MinionProjectileType => ModContent.ProjectileType<SandElementalMinion>();
protected override ref bool MinionBool => ref BuffModdedOwner.sWaifu;
protected override ref bool MinionBool => ref BuffModdedOwner.sandEleBuff;
}
}
File renamed without changes.

Before

Width:  |  Height:  |  Size: 642 B

After

Width:  |  Height:  |  Size: 642 B

@@ -3,10 +3,10 @@ using Terraria.ModLoader;
namespace CalamityMod.Buffs.Summon
{
public class WaterWaifu : BaseSummonBuff
public class WaterElemental : BaseSummonBuff
{
protected override int MinionProjectileType => ModContent.ProjectileType<WaterElementalMinion>();
protected override ref bool MinionBool => ref BuffModdedOwner.slWaifu;
protected override ref bool MinionBool => ref BuffModdedOwner.waterEleBuff;
}
}
File renamed without changes.

Before

Width:  |  Height:  |  Size: 636 B

After

Width:  |  Height:  |  Size: 636 B

+131 -147
View File
@@ -28,6 +28,7 @@ using CalamityMod.Items.Armor.OmegaBlue;
using CalamityMod.Items.Armor.PlagueReaper;
using CalamityMod.Items.Armor.Silva;
using CalamityMod.Items.Armor.SnowRuffian;
using CalamityMod.Items.Armor.TitanHeart;
using CalamityMod.Items.Armor.Victide;
using CalamityMod.Items.Armor.Wulfrum;
using CalamityMod.Items.Dyes;
@@ -106,10 +107,6 @@ namespace CalamityMod.CalPlayer
public static int chaosStateDuration = 900;
/// <summary> Constant variable used for how long Chaos State is inflicted by Normality Relocator while a boss is alive. </summary>
public static int chaosStateDuration_NR = 1200;
/// <summary> Used by Sky Stabber and Gods' Paranoia to delete spiky balls when using right-click. </summary>
public bool killSpikyBalls = false;
public float KameiTrailXScale = 0.1f;
public int KameiBladeUseDelay = 0;
/// <summary> Stores the positions of the player within the previous 4 frames. Used for drawing trail effects. </summary>
public Vector2[] OldPositions = new Vector2[4];
public double contactDamageReduction = 0D;
@@ -180,6 +177,13 @@ namespace CalamityMod.CalPlayer
public float momentumCapacitorBoost = 0f;
public bool countsAsAnyWet => (Player.armor[0].type == ItemID.FishBowl || Player.wetCount > 0 || Player.wet || Player.honeyWet || Player.lavaWet);
public StatModifier TypelessDebuffMultiplier = new();
public StatModifier HeatDebuffMultiplier = new();
public StatModifier ColdDebuffMultiplier = new();
public StatModifier SicknessDebuffMultiplier = new();
public StatModifier WaterDebuffMultiplier = new();
public StatModifier ElectricDebuffMultiplier = new();
#endregion
#region Speedrun Timer
@@ -304,9 +308,9 @@ namespace CalamityMod.CalPlayer
public bool despoilerNerf = false;
/// <summary> Variable used to trigger Molten Amputator's stealth effect on right-click. </summary>
public int amputatorBuff = 0;
/// <summary> Variable used to track the fuel of Pristine Fury right click </summary>
public int furyFuelMax = 1800;
/// <summary> Variables used to track the fuel of Pristine Fury right click </summary>
public int furyFuel = 1800;
public const int FuryFuelMax = 1800;
public float furyRefuelTimer = 0;
/// <summary> Variable used to track if Auger can do a big slash </summary>
public bool buffedAuger = false;
@@ -342,10 +346,10 @@ namespace CalamityMod.CalPlayer
public int dragonRageHits = 0;
/// <summary> Cooldown variable for Dragon Rage's fireball spawning to prevent spamming projectiles when hitting multiple enemies simultaneously. </summary>
public int dragonRageCooldown = 0;
public float aquaticBoostMax = 10000f;
public const float AquaticBoostMax = 10000f;
/// <summary>
/// Counter variable which controls Aquatic Emblem's stat boosts while underwater.<br/>
/// This counter starts at <see cref="aquaticBoostMax"/>, and is decremented by 2 for every frame the player remains underwater, reaching maximum boosts when it hits 0.
/// This counter starts at <see cref="AquaticBoostMax"/>, and is decremented by 2 for every frame the player remains underwater, reaching maximum boosts when it hits 0.
/// </summary>
public float aquaticBoost = 0f;
public int galileoCooldown = 0;
@@ -564,7 +568,6 @@ namespace CalamityMod.CalPlayer
}
}
public bool adrenalineModeActive = false;
public bool AdrenalineTrail = false;
/// <summary> The player's current Adrenaline level. Expressed as a percentage of maximum Adrenaline. </summary>
public float adrenaline = 0f;
public float adrenalineMax = 100f; // 0 to 100% by default
@@ -771,8 +774,6 @@ namespace CalamityMod.CalPlayer
public int ascendantInsigniaBuffTime = 0;
public int ascendantInsigniaCooldown = 0;
public bool ascendantTrail = false;
public bool frozenWingsCold = false;
public bool flameWingsHeat = false;
/// <summary> Used to toggle dust spawned while swinging, through accessory visibility. </summary>
public bool magmaStoneVisuals = true;
public bool eGauntlet = false;
@@ -787,10 +788,6 @@ namespace CalamityMod.CalPlayer
public bool eTalisman = false;
public bool lastDashWasTabi = false;
public bool statisNinjaBelt = false;
/// <summary> Used to keep track of how many dashes in the same direction you make to prevent dashing away from bosses forever at max efficency. </summary>
public int statisPenaltyTimer = 0;
public int statisAnticheese = 0;
public int statisTimerMax => (int)(Utils.Remap(statisAnticheese, 1, 6, 120, 50, true));
public bool voidSashVisuals = true;
public bool statisVoidSash = false;
public bool nucleogenesis = false;
@@ -807,12 +804,14 @@ namespace CalamityMod.CalPlayer
public int transformerCooldown = 0;
public int transformerDelay = 0;
public int transformerStoredKills = 0;
public int hookPullVisuals = 0;
public bool bloomStone = false;
public bool bloomStoneHookVisuals = false;
public int bloomStoneHealInc = 0;
public int bloomStoneHealPool = 0;
public int bloomStoneTotalHeal = 0;
public int bloomStoneHealTimer = 0;
public int bloomStoneDR = 0;
public float bloomStoneHealTimer = 0;
public float bloomStoneHealRate = 0;
public int bloomStoneBuffedHealRateTimer = 0;
public bool hideOfDeus = false;
public bool dAmulet = false;
public bool rampartOfDeities = false;
@@ -881,7 +880,6 @@ namespace CalamityMod.CalPlayer
public bool shatteredCommunity = false;
public bool fleshTotem = false;
public bool bloodPact = false;
public bool bloodPactBoost = false;
public bool bloodflareCore = false;
public int bloodflareCoreRemainingHealOverTime = 0;
@@ -933,15 +931,14 @@ namespace CalamityMod.CalPlayer
public bool spiritOrigin = false;
public bool spiritOriginVanity = false;
public int spiritOriginCritBoost = 0;
/// <summary>
/// The amount of bonus crit damage the player has.
/// At 0f, the player has regular crit damage. At 1f, the player has +100% crit damage.
/// </summary>
/// <summary>
/// The amount of bonus crit damage the player has.
/// At 0f, the player has regular crit damage. At 1f, the player has +100% crit damage.
/// </summary>
public float critDamage = 0;
public bool darkSunRing = false;
public bool crawCarapace = false;
public bool baroclaw = false;
public bool HasIncreasedDashFirstFrame = false;
public bool IsFirstDashFrame = true;
public int fallingBootVelCheckTimer = 0;
public bool voidOfCalamity = false;
@@ -985,16 +982,16 @@ namespace CalamityMod.CalPlayer
public bool jellyChargedBattery = false;
/// <summary> General cooldown for accessories which spawn projectiles on minion hits. </summary>
public float summonProjCooldown;
public bool sandWaifu = false;
public bool sandWaifuVanity = false;
public bool sandBoobWaifu = false;
public bool sandBoobWaifuVanity = false;
public bool cloudWaifu = false;
public bool cloudWaifuVanity = false;
public bool brimstoneWaifu = false;
public bool brimstoneWaifuVanity = false;
public bool sirenWaifu = false;
public bool sirenWaifuVanity = false;
public bool sandElemental = false;
public bool sandElementalVanity = false;
public bool rareSandElemental = false;
public bool rareSandElementalVanity = false;
public bool cloudElemental = false;
public bool cloudElementalVanity = false;
public bool brimElemental = false;
public bool brimElementalVanity = false;
public bool waterElemental = false;
public bool waterElementalVanity = false;
public bool fungalClump = false;
public bool fungalClumpVanity = false;
public bool howlsHeart = false;
@@ -1055,7 +1052,6 @@ namespace CalamityMod.CalPlayer
public bool rottenDogTooth = false;
public bool angelicAlliance = false;
public int angelicActivate = -1;
public bool BloomStoneRegen = false;
public bool ChaosStone = false;
public bool CryoStone = false;
public bool CryoStoneVanity = false;
@@ -1153,7 +1149,6 @@ namespace CalamityMod.CalPlayer
public bool titanHeartSet = false;
public bool titanHeartMask = false;
public bool titanHeartMantle = false;
public bool titanHeartBoots = false;
public int titanCooldown = 0;
public bool umbraphileSet = false;
public bool reaverSpeed = false;
@@ -1192,8 +1187,8 @@ namespace CalamityMod.CalPlayer
public bool silvaSummon = false;
public bool hasSilvaEffect = false;
/// <summary> Constant variable representing the duration of Silva armor's revive, in frames. </summary>
public const int silvaReviveDuration = 300;
public int silvaCountdown = silvaReviveDuration;
public const int SilvaReviveDuration = 300;
public int silvaCountdown = SilvaReviveDuration;
public bool auricSet = false;
public bool omegaBlueChestplate = false;
public bool omegaBlueSet = false;
@@ -1256,25 +1251,25 @@ namespace CalamityMod.CalPlayer
public bool alcoholPoisoning = false;
public bool shadowflame = false;
public bool daybroken = false;
public bool wDeath = false;
public bool whisperingDeath = false;
public bool dragonFire = false;
public bool vermillionFlux = false;
public bool auricRebuke = false;
public bool staticDischarge = false;
public bool miracleBlight = false;
public bool aCrunch = false;
public bool armorCrunch = false;
public bool crumble = false;
public bool irradiated = false;
public bool bFlames = false;
public bool brimstoneFlames = false;
public bool weakBrimstoneFlames = false;
public bool demonicFlames = false;
public bool gsInferno = false;
public bool godSlayerInferno = false;
public bool astralInfection = false;
/// <summary> Plague debuff. </summary>
public bool pFlames = false;
public bool hFlames = false;
public bool hInferno = false;
public bool bBlood = false;
public bool plague = false;
public bool holyFlames = false;
public bool holyInferno = false;
public bool burningBlood = false;
public bool brainRot = false;
public bool heavybleeding = false;
public bool laceration = false;
@@ -1285,9 +1280,9 @@ namespace CalamityMod.CalPlayer
public bool trueVHex = false;
public bool DoGExtremeGravity = false;
public bool warped = false;
public bool cDepth = false;
public bool rTide = false;
public bool hPressure = false;
public bool crushDepth = false;
public bool riptide = false;
public bool hadopelagicPressure = false;
public bool fishAlert = false;
public bool clamity = false;
public bool NOU = false;
@@ -1297,9 +1292,9 @@ namespace CalamityMod.CalPlayer
public bool voidfrost = false;
public bool eutrophication = false;
/// <summary> Frozen Lungs debuff. </summary>
public bool iCantBreathe = false;
public bool frozenLungs = false;
/// <summary> Searing Lava debuff. </summary>
public bool cragsLava = false;
public bool searingLava = false;
public bool vaporfied = false;
public bool banishingFire = false;
public bool wither = false;
@@ -1456,21 +1451,21 @@ namespace CalamityMod.CalPlayer
/// <summary> Enchanted Conch. </summary>
public bool hCrab = false;
/// <summary> Heart of the Elements. </summary>
public bool allWaifus = false;
public bool allElementals = false;
/// <summary> Hearts of the Elements; however, the minions will not attack. </summary>
public bool allWaifusVanity = false;
public bool allElementalsVanity = false;
/// <summary> Silva armor's Silva Crystal. </summary>
public bool sCrystal = false;
/// <summary> Elemental in a Bottle. </summary>
public bool sWaifu = false;
public bool sandEleBuff = false;
/// <summary> Rare Elemental in a Bottle. </summary>
public bool dWaifu = false;
public bool rareSandEleBuff = false;
/// <summary> Eye of the Storm. </summary>
public bool cWaifu = false;
public bool cloudEleBuff = false;
/// <summary> Rose Stone. </summary>
public bool bWaifu = false;
public bool brimEleBuff = false;
/// <summary> Pearl of Enthrallment. </summary>
public bool slWaifu = false;
public bool waterEleBuff = false;
public bool fClump = false;
/// <summary> Demonshade armor's Red Devil. </summary>
public bool rDevil = false;
@@ -2225,8 +2220,6 @@ namespace CalamityMod.CalPlayer
cryogenSoul = false;
ascendantInsignia = false;
ascendantTrail = false;
frozenWingsCold = false;
flameWingsHeat = false;
magmaStoneVisuals = true;
eGauntlet = false;
eGauntletVisuals = true;
@@ -2314,7 +2307,6 @@ namespace CalamityMod.CalPlayer
scionsCurio = false;
rottenDogTooth = false;
angelicAlliance = false;
BloomStoneRegen = false;
ChaosStone = false;
CryoStone = false;
CryoStoneVanity = false;
@@ -2397,7 +2389,6 @@ namespace CalamityMod.CalPlayer
titanHeartSet = false;
titanHeartMask = false;
titanHeartMantle = false;
titanHeartBoots = false;
umbraphileSet = false;
plagueReaper = false;
plaguebringerPatronSet = false;
@@ -2456,26 +2447,26 @@ namespace CalamityMod.CalPlayer
alcoholPoisoning = false;
shadowflame = false;
daybroken = false;
wDeath = false;
whisperingDeath = false;
dragonFire = false;
vermillionFlux = false;
auricRebuke = false;
staticDischarge = false;
miracleBlight = false;
aCrunch = false;
armorCrunch = false;
crumble = false;
irradiated = false;
bFlames = false;
brimstoneFlames = false;
witheredDebuff = false;
absorberAffliction = false;
weakBrimstoneFlames = false;
demonicFlames = false;
gsInferno = false;
godSlayerInferno = false;
astralInfection = false;
pFlames = false;
hFlames = false;
hInferno = false;
bBlood = false;
plague = false;
holyFlames = false;
holyInferno = false;
burningBlood = false;
brainRot = false;
heavybleeding = false;
laceration = false;
@@ -2485,9 +2476,9 @@ namespace CalamityMod.CalPlayer
trueVHex = false;
DoGExtremeGravity = false;
warped = false;
cDepth = false;
rTide = false;
hPressure = false;
crushDepth = false;
riptide = false;
hadopelagicPressure = false;
fishAlert = false;
clamity = false;
NOU = false;
@@ -2497,13 +2488,20 @@ namespace CalamityMod.CalPlayer
nightwither = false;
voidfrost = false;
eutrophication = false;
iCantBreathe = false;
cragsLava = false;
frozenLungs = false;
searingLava = false;
vaporfied = false;
banishingFire = false;
wither = false;
ManaBurn = false;
TypelessDebuffMultiplier = new();
HeatDebuffMultiplier = new();
ColdDebuffMultiplier = new();
SicknessDebuffMultiplier = new();
WaterDebuffMultiplier = new();
ElectricDebuffMultiplier = new();
trinketOfChiBuff = false;
sandsWindBuff = false;
aeolianEarthBuff = false;
@@ -2547,8 +2545,6 @@ namespace CalamityMod.CalPlayer
bloodfinBoost = false;
divineBless = false;
killSpikyBalls = false;
vodka = false;
redWine = false;
grapeBeer = false;
@@ -2607,11 +2603,11 @@ namespace CalamityMod.CalPlayer
pGuy = false;
cEnergy = false;
pSoulGuardians = false;
sWaifu = false;
dWaifu = false;
cWaifu = false;
bWaifu = false;
slWaifu = false;
sandEleBuff = false;
rareSandEleBuff = false;
cloudEleBuff = false;
brimEleBuff = false;
waterEleBuff = false;
fClump = false;
rDevil = false;
aValkyrie = false;
@@ -2625,18 +2621,18 @@ namespace CalamityMod.CalPlayer
rOrb = false;
dCrystal = false;
MutatedTruffleBool = false;
sandWaifu = false;
sandWaifuVanity = false;
sandBoobWaifu = false;
sandBoobWaifuVanity = false;
cloudWaifu = false;
cloudWaifuVanity = false;
brimstoneWaifu = false;
brimstoneWaifuVanity = false;
sirenWaifu = false;
sirenWaifuVanity = false;
allWaifus = false;
allWaifusVanity = false;
sandElemental = false;
sandElementalVanity = false;
rareSandElemental = false;
rareSandElementalVanity = false;
cloudElemental = false;
cloudElementalVanity = false;
brimElemental = false;
brimElementalVanity = false;
waterElemental = false;
waterElementalVanity = false;
allElementals = false;
allElementalsVanity = false;
fungalClump = false;
fungalClumpVanity = false;
howlsHeart = false;
@@ -2737,7 +2733,6 @@ namespace CalamityMod.CalPlayer
rageModeActive = false;
adrenalineModeActive = false;
AdrenalineTrail = false;
RageDuration = BalancingConstants.DefaultRageDuration;
RageDamageBoost = BalancingConstants.DefaultRageDamageBoost;
@@ -2783,14 +2778,12 @@ namespace CalamityMod.CalPlayer
public override void ModifyScreenPosition()
{
// CIT 08FEB2025: Photosensitivity config also disables screenshake
if (CalamityClientConfig.Instance.ScreenshakePower == 0 || CalamityClientConfig.Instance.Photosensitivity)
return;
bool allowScreenshake = CalamityClientConfig.Instance.ScreenshakePower > 0 && !CalamityClientConfig.Instance.Photosensitivity;
if (GeneralScreenShakePower > 0f)
{
if (GeneralScreenShakePower > 0f && allowScreenshake)
Main.screenPosition += Main.rand.NextVector2Circular(GeneralScreenShakePower * CalamityClientConfig.Instance.ScreenshakePower, GeneralScreenShakePower * CalamityClientConfig.Instance.ScreenshakePower);
GeneralScreenShakePower = MathHelper.Clamp(GeneralScreenShakePower - 0.185f, 0f, 20f * CalamityClientConfig.Instance.ScreenshakePower);
}
GeneralScreenShakePower = MathHelper.Clamp(GeneralScreenShakePower - 0.185f, 0f, 20f * CalamityClientConfig.Instance.ScreenshakePower);
}
#endregion
@@ -2853,10 +2846,10 @@ namespace CalamityMod.CalPlayer
auralisAurora = 0;
necroReviveCounter = -1;
hideOfDeusTimer = 0;
bloomStoneHealInc = 0;
bloomStoneHealPool = 0;
bloomStoneTotalHeal = 0;
bloomStoneHealTimer = 0;
bloomStoneDR = 0;
bloomStoneHealRate = 0;
murasamaHitCooldown = 0;
SulphWaterPoisoningLevel = 0f;
holyInfernoFadeIntensity = 0f;
@@ -2900,11 +2893,9 @@ namespace CalamityMod.CalPlayer
jetPackDirection = 0;
andromedaCripple = 0;
theBeeCooldown = 0;
killSpikyBalls = false;
scuttlerCooldown = 0;
rogueCrownCooldown = 0;
wingProjectileCooldown = 0;
statisPenaltyTimer = -1;
hallowedRuneCooldown = 0;
sulphurBubbleCooldown = 0;
ladHearts = 0;
@@ -2915,26 +2906,26 @@ namespace CalamityMod.CalPlayer
alcoholPoisoning = false;
shadowflame = false;
daybroken = false;
wDeath = false;
whisperingDeath = false;
dragonFire = false;
vermillionFlux = false;
auricRebuke = false;
staticDischarge = false;
miracleBlight = false;
aCrunch = false;
armorCrunch = false;
crumble = false;
irradiated = false;
bFlames = false;
brimstoneFlames = false;
witheredDebuff = false;
absorberAffliction = false;
weakBrimstoneFlames = false;
demonicFlames = false;
gsInferno = false;
godSlayerInferno = false;
astralInfection = false;
pFlames = false;
hFlames = false;
hInferno = false;
bBlood = false;
plague = false;
holyFlames = false;
holyInferno = false;
burningBlood = false;
brainRot = false;
heavybleeding = false;
laceration = false;
@@ -2944,9 +2935,9 @@ namespace CalamityMod.CalPlayer
trueVHex = false;
DoGExtremeGravity = false;
warped = false;
cDepth = false;
rTide = false;
hPressure = false;
crushDepth = false;
riptide = false;
hadopelagicPressure = false;
fishAlert = false;
clamity = false;
NOU = false;
@@ -2956,13 +2947,19 @@ namespace CalamityMod.CalPlayer
nightwither = false;
voidfrost = false;
eutrophication = false;
iCantBreathe = false;
cragsLava = false;
frozenLungs = false;
searingLava = false;
vaporfied = false;
banishingFire = false;
wither = false;
PurityHealSlowdownFrames = 0;
ImmobilityDebuffImmunityTimer = 0;
TypelessDebuffMultiplier = new();
HeatDebuffMultiplier = new();
ColdDebuffMultiplier = new();
SicknessDebuffMultiplier = new();
WaterDebuffMultiplier = new();
ElectricDebuffMultiplier = new();
#endregion
#region Rogue
@@ -3100,7 +3097,7 @@ namespace CalamityMod.CalPlayer
silvaMage = false;
silvaSummon = false;
hasSilvaEffect = false;
silvaCountdown = silvaReviveDuration;
silvaCountdown = SilvaReviveDuration;
auricSet = false;
GemTechSet = false;
CobaltSet = false;
@@ -3132,7 +3129,6 @@ namespace CalamityMod.CalPlayer
titanHeartSet = false;
titanHeartMask = false;
titanHeartMantle = false;
titanHeartBoots = false;
titanCooldown = 0;
umbraphileSet = false;
fathomSwarmer = false;
@@ -3220,8 +3216,6 @@ namespace CalamityMod.CalPlayer
CurrentlyViewedHologramText = string.Empty;
#endregion
KameiBladeUseDelay = 0;
AdrenalineTrail = false;
ascendantTrail = false;
evilSmasherBoost = 0;
burningSeaBurnOut = 0;
@@ -3793,14 +3787,13 @@ namespace CalamityMod.CalPlayer
{
if (brimflameFrenzy)
{
brimflameFrenzy = false;
Player.ClearBuff(BuffType<BrimflameFrenzyBuff>());
Player.AddCooldown(BrimflameFrenzy.ID, BrimflameCowl.FrenzyCooldown);
}
else
{
brimflameFrenzy = true;
Player.AddBuff(BuffType<BrimflameFrenzyBuff>(), 10 * 60, true);
SoundEngine.PlaySound(BrimflameScowl.ActivationSound, Player.Center);
Player.AddBuff(BuffType<BrimflameFrenzyBuff>(), BrimflameCowl.FrenzyDuration, true);
SoundEngine.PlaySound(BrimflameCowl.ActivationSound, Player.Center);
for (int i = 0; i < 36; i++)
{
Dust brimDust = Dust.NewDustDirect(new Vector2(Player.position.X, Player.position.Y + 16f), Player.width, Player.height - 16, (int)CalamityDusts.Brimstone, 0f, 0f, 0, default, 1f);
@@ -3923,8 +3916,8 @@ namespace CalamityMod.CalPlayer
}
if (forbiddenCirclet && forbiddenCooldown <= 0)
{
forbiddenCooldown = 45;
int stormMana = (int)(ForbiddenCirclet.manaCost * Player.manaCost);
forbiddenCooldown = ForbiddenCirclet.StormCooldown;
int stormMana = (int)(ForbiddenCirclet.StormManaCost * Player.manaCost);
if (Player.statMana < stormMana)
{
if (Player.manaFlower)
@@ -3940,9 +3933,9 @@ namespace CalamityMod.CalPlayer
// To compute Forbidden Circlet tornado damage, create a fake stat modifier on the spot which combines both classes.
StatModifier forbidden = Player.GetTotalDamage<SummonDamageClass>().CombineWith(Player.GetDamage<RogueDamageClass>());
int damage = (int)forbidden.ApplyTo(ForbiddenCirclet.tornadoBaseDmg);
int damage = (int)forbidden.ApplyTo(ForbiddenCirclet.StormDamage);
float kBack = Player.GetTotalKnockback<SummonDamageClass>().ApplyTo(ForbiddenCirclet.tornadoBaseKB);
float kBack = Player.GetTotalKnockback<SummonDamageClass>().ApplyTo(ForbiddenCirclet.StormKB);
if (Player.whoAmI == Main.myPlayer)
{
@@ -4491,7 +4484,7 @@ namespace CalamityMod.CalPlayer
{
float runAccMult = 1f +
(victideBurrowHead ? VictideHeadBurrow.MoveSpeedAccelerationBoost : 0f) +
(lunicCorpsLegs ? 0.1f : 0f) +
(lunicCorpsLegs ? LunicCorpsBoots.MoveSpeedAccelerationBoost : 0f) +
(shadowSpeed ? 0.5f : 0f) +
(stressPills ? 0.05f : 0f) +
((abyssalDivingSuit && Player.IsUnderwater()) ? 0.05f : 0f) +
@@ -4513,7 +4506,7 @@ namespace CalamityMod.CalPlayer
float runSpeedMult = 1f +
(victideBurrowHead ? VictideHeadBurrow.MoveSpeedAccelerationBoost : 0f) +
(lunicCorpsLegs ? 0.1f : 0f) +
(lunicCorpsLegs ? LunicCorpsBoots.MoveSpeedAccelerationBoost : 0f) +
(shadowSpeed ? 0.5f : 0f) +
(stressPills ? 0.05f : 0f) +
((abyssalDivingSuit && Player.IsUnderwater()) ? 0.05f : 0f) +
@@ -4627,20 +4620,11 @@ namespace CalamityMod.CalPlayer
if (moscowMule)
knockback += MoscowMule.KnockbackBoost;
if (titanHeartMask && rogue)
knockback += 0.05f;
if (titanHeartMantle && rogue)
knockback += 0.05f;
if (titanHeartBoots && rogue)
knockback += 0.05f;
if (titanHeartSet && rogue)
knockback += 0.2f;
knockback += TitanHeartMantle.RogueKnockbackBoost;
if (titanHeartSet && StealthStrikeAvailable() && rogue)
knockback += 1f;
knockback *= TitanHeartMask.StealthStrikeKnockbackMult;
}
#endregion
@@ -4654,7 +4638,7 @@ namespace CalamityMod.CalPlayer
#region Modify Mana Cost
public override void ModifyManaCost(Item item, ref float reduce, ref float mult)
{
if (MagicGunIDList.Includes(item.type) && meteorSet)
if (CalamityItemSets.MagicGun[item.type] && meteorSet)
{
mult *= 0.33f;
}
@@ -4816,10 +4800,10 @@ namespace CalamityMod.CalPlayer
if (veneratedLocket)
{
var LocketSource = Player.GetSource_Accessory(FindAccessory(ModContent.ItemType<VeneratedLocket>()));
var LocketSource = Player.GetSource_Accessory(FindAccessory(ItemType<VeneratedLocket>()));
if (item.CountsAsClass<RogueDamageClass>())
{
if (!VeneratedLocketBanList.Includes(item.type))
if (!CalamityItemSets.DisablesVeneratedLocketEffect[item.type])
{
float veneratedCloneSpeed = item.shootSpeed;
Vector2 realPlayerPos = Player.RotatedRelativePoint(Player.MountedCenter, true);
@@ -5252,7 +5236,7 @@ namespace CalamityMod.CalPlayer
for (int i = 0; i < Player.MaxBuffs; i++)
{
int buff = Player.buffType[i];
if (AlcoholsDict.TryGet(buff, out int level))
if (CalamityBuffSets.AlcoholStrength.TryGetValue(buff, out int level))
Alcohol.Insert(0, new int[] { i, level });
}
+9 -9
View File
@@ -207,10 +207,10 @@ namespace CalamityMod.CalPlayer
if (calamityPlayer.auricRebuke && drawInfo.shadow == 0f)
AuricRebuke.DrawEffects(drawInfo);
if (calamityPlayer.bBlood && drawInfo.shadow == 0f)
if (calamityPlayer.burningBlood && drawInfo.shadow == 0f)
BurningBlood.DrawEffects(drawInfo);
if (calamityPlayer.bFlames && drawInfo.shadow == 0f)
if (calamityPlayer.brimstoneFlames && drawInfo.shadow == 0f)
{
bool resistsBrimstoneFlames = abaddon; // Looks weaker if you have Abaddon equipped
BrimstoneFlames.DrawEffects(drawInfo, resistsBrimstoneFlames);
@@ -219,7 +219,7 @@ namespace CalamityMod.CalPlayer
if (calamityPlayer.brainRot && drawInfo.shadow == 0f)
BrainRot.DrawEffects(drawInfo);
if (calamityPlayer.cDepth && drawInfo.shadow == 0f)
if (calamityPlayer.crushDepth && drawInfo.shadow == 0f)
CrushDepth.DrawEffects(drawInfo);
// Daybroken's visual effects are reduced if the player resists it
@@ -238,17 +238,17 @@ namespace CalamityMod.CalPlayer
if (calamityPlayer.eutrophication && drawInfo.shadow == 0f)
Eutrophication.DrawEffects(drawInfo);
if (calamityPlayer.gsInferno && drawInfo.shadow == 0f)
if (calamityPlayer.godSlayerInferno && drawInfo.shadow == 0f)
GodSlayerInferno.DrawEffects(drawInfo);
if (calamityPlayer.heavybleeding && drawInfo.shadow == 0f)
HeavyBleeding.DrawEffects(drawInfo);
// Holy Flames, Holy Inferno and Banishing Fire share the same visual effects
if (drawInfo.shadow == 0f && (calamityPlayer.hFlames || calamityPlayer.hInferno || calamityPlayer.banishingFire))
if (drawInfo.shadow == 0f && (calamityPlayer.holyFlames || calamityPlayer.holyInferno || calamityPlayer.banishingFire))
HolyFlames.DrawEffects(drawInfo);
if (calamityPlayer.hPressure && drawInfo.shadow == 0f)
if (calamityPlayer.hadopelagicPressure && drawInfo.shadow == 0f)
HadopelagicPressure.DrawEffects(drawInfo);
// Icarus' Folly has visual effects but they are mutually exclusive with all Holy Flames variations to prevent visual clutter
@@ -268,10 +268,10 @@ namespace CalamityMod.CalPlayer
if (calamityPlayer.nightwither && drawInfo.shadow == 0f) // Looks weaker if you have Moon Stone equipped
Nightwither.DrawEffects(drawInfo, reducedNightwitherDamage);
if (calamityPlayer.pFlames && drawInfo.shadow == 0f)
if (calamityPlayer.plague && drawInfo.shadow == 0f)
Plague.DrawEffects(drawInfo);
if (calamityPlayer.rTide && drawInfo.shadow == 0f)
if (calamityPlayer.riptide && drawInfo.shadow == 0f)
RiptideDebuff.DrawEffects(drawInfo);
if (calamityPlayer.shadowflame && drawInfo.shadow == 0f)
@@ -327,7 +327,7 @@ namespace CalamityMod.CalPlayer
GeneralParticleHandler.SpawnParticle(Plus);
}
}
if (calamityPlayer.bloomStoneDR > 0 && drawInfo.shadow == 0f)
if (calamityPlayer.bloomStoneBuffedHealRateTimer > 0 && drawInfo.shadow == 0f)
{
if (Main.rand.NextBool(10))
{
+27 -27
View File
@@ -247,7 +247,7 @@ namespace CalamityMod.CalPlayer
Projectile.NewProjectile(Player.GetSource_FromThis(), Player.Center, Vector2.Zero, ModContent.ProjectileType<XykDeathAnim>(), Main.zenithWorld ? Main.rand.Next(5000, 50000 + 1) : 0, 0, Player.whoAmI);
}
if (hInferno)
if (holyInferno)
{
foreach (NPC n in Main.ActiveNPCs)
{
@@ -295,10 +295,10 @@ namespace CalamityMod.CalPlayer
if (silvaSet && silvaCountdown > 0)
{
if (silvaCountdown == silvaReviveDuration && !hasSilvaEffect)
if (silvaCountdown == SilvaReviveDuration && !hasSilvaEffect)
{
SoundEngine.PlaySound(SilvaHeadSummon.ActivationSound, Player.Center);
Player.AddBuff(ModContent.BuffType<SilvaRevival>(), silvaReviveDuration);
Player.AddBuff(ModContent.BuffType<SilvaRevival>(), SilvaReviveDuration);
}
hasSilvaEffect = true;
@@ -380,7 +380,7 @@ namespace CalamityMod.CalPlayer
{
damageSource = PlayerDeathReason.ByCustomReason(CalamityUtils.GetText("Status.Death.SearingLava" + Main.rand.Next(1, 2 + 1)).ToNetworkText(Player.name));
}
if (gsInferno)
if (godSlayerInferno)
{
damageSource = PlayerDeathReason.ByCustomReason(CalamityUtils.GetText("Status.Death.GodSlayerInferno" + Main.rand.Next(1, 3 + 1)).ToNetworkText(Player.name));
}
@@ -411,11 +411,11 @@ namespace CalamityMod.CalPlayer
{
damageSource = PlayerDeathReason.ByCustomReason(CalamityUtils.GetText("Status.Death.MiracleBlight" + Main.rand.Next(1, 3 + 1)).ToNetworkText(Player.name));
}
if (hInferno)
if (holyInferno)
{
damageSource = PlayerDeathReason.ByCustomReason(CalamityUtils.GetText("Status.Death.HolyInferno").ToNetworkText(Player.name));
}
if (hFlames || banishingFire)
if (holyFlames || banishingFire)
{
damageSource = PlayerDeathReason.ByCustomReason(CalamityUtils.GetText("Status.Death.HolyFlames" + Main.rand.Next(1, 3 + 1)).ToNetworkText(Player.name));
}
@@ -427,7 +427,7 @@ namespace CalamityMod.CalPlayer
{
damageSource = PlayerDeathReason.ByCustomReason(CalamityUtils.GetText("Status.Death.Daybroken").ToNetworkText(Player.name));
}
if (bBlood)
if (burningBlood)
{
damageSource = PlayerDeathReason.ByCustomReason(CalamityUtils.GetText("Status.Death.BurningBlood" + Main.rand.Next(1, 2 + 1)).ToNetworkText(Player.name));
}
@@ -447,23 +447,23 @@ namespace CalamityMod.CalPlayer
{
damageSource = PlayerDeathReason.ByCustomReason(CalamityUtils.GetText("Status.Death.ElementalMix" + Main.rand.Next(1, 2 + 1)).ToNetworkText(Player.name));
}
if (cDepth)
if (crushDepth)
{
damageSource = PlayerDeathReason.ByCustomReason(CalamityUtils.GetText("Status.Death.CrushDepth" + Main.rand.Next(1, 3 + 1)).ToNetworkText(Player.name));
}
if (rTide)
if (riptide)
{
damageSource = PlayerDeathReason.ByCustomReason(CalamityUtils.GetText("Status.Death.Riptide" + Main.rand.Next(1, 2 + 1)).ToNetworkText(Player.name));
}
if (hPressure)
if (hadopelagicPressure)
{
damageSource = PlayerDeathReason.ByCustomReason(CalamityUtils.GetText("Status.Death.HadopelagicPressure" + Main.rand.Next(1, 3 + 1)).ToNetworkText(Player.name));
}
if (bFlames || weakBrimstoneFlames || demonicFlames)
if (brimstoneFlames || weakBrimstoneFlames || demonicFlames)
{
damageSource = PlayerDeathReason.ByCustomReason(CalamityUtils.GetText("Status.Death.BrimstoneFlames" + Main.rand.Next(1, 3 + 1)).ToNetworkText(Player.name));
}
if (pFlames)
if (plague)
{
damageSource = PlayerDeathReason.ByCustomReason(CalamityUtils.GetText("Status.Death.Plague" + Main.rand.Next(1, 3 + 1)).ToNetworkText(Player.name));
}
@@ -706,7 +706,7 @@ namespace CalamityMod.CalPlayer
{
Item heldItem = Player.ActiveItem();
if (CalamityUtils.ShouldTriggerSummonPenalty(Player, heldItem) && !DisabledSummonerNerfMinionList.Includes(proj.type))
if (CalamityUtils.ShouldTriggerSummonPenalty(Player, heldItem) && !CalamityProjectileSets.MinionWhichIgnoresSummonerNerf[proj.type])
modifiers.FinalDamage *= BalancingConstants.SummonerCrossClassNerf;
}
}
@@ -721,7 +721,7 @@ namespace CalamityMod.CalPlayer
// Enemies deal less contact damage while sick, due to being weakened.
if (npc.poisoned)
{
float damageReductionFromPoison = (float)((npc.Calamity().irradiated > 0 ? npc.Calamity().irradiatedContactBoost : 1) * 0.05f);
float damageReductionFromPoison = (float)((npc.Calamity().irradiated ? npc.Calamity().irradiatedContactBoost : 1) * 0.05f);
if (npc.Calamity().VulnerableToSickness.HasValue)
{
if (npc.Calamity().VulnerableToSickness.Value)
@@ -736,7 +736,7 @@ namespace CalamityMod.CalPlayer
if (npc.venom)
{
float damageReductionFromVenom = (float)((npc.Calamity().irradiated > 0 ? npc.Calamity().irradiatedContactBoost : 1) * 0.05f);
float damageReductionFromVenom = (float)((npc.Calamity().irradiated ? npc.Calamity().irradiatedContactBoost : 1) * 0.05f);
if (npc.Calamity().VulnerableToSickness.HasValue)
{
if (npc.Calamity().VulnerableToSickness.Value)
@@ -749,9 +749,9 @@ namespace CalamityMod.CalPlayer
modifiers.SourceDamage *= damageReductionFromVenom;
}
if (npc.Calamity().astralInfection > 0)
if (npc.Calamity().astralInfection)
{
float damageReductionFromAstralInfection = (float)((npc.Calamity().irradiated > 0 ? npc.Calamity().irradiatedContactBoost : 1) * 0.05f);
float damageReductionFromAstralInfection = (float)((npc.Calamity().irradiated ? npc.Calamity().irradiatedContactBoost : 1) * 0.05f);
if (npc.Calamity().VulnerableToSickness.HasValue)
{
if (npc.Calamity().VulnerableToSickness.Value)
@@ -764,9 +764,9 @@ namespace CalamityMod.CalPlayer
modifiers.SourceDamage *= damageReductionFromAstralInfection;
}
if (npc.Calamity().pFlames > 0)
if (npc.Calamity().plague)
{
float damageReductionFromPlague = (float)((npc.Calamity().irradiated > 0 ? npc.Calamity().irradiatedContactBoost : 1) * 0.05f);
float damageReductionFromPlague = (float)((npc.Calamity().irradiated? npc.Calamity().irradiatedContactBoost : 1) * 0.05f);
if (npc.Calamity().VulnerableToSickness.HasValue)
{
if (npc.Calamity().VulnerableToSickness.Value)
@@ -779,9 +779,9 @@ namespace CalamityMod.CalPlayer
modifiers.SourceDamage *= damageReductionFromPlague;
}
if (npc.Calamity().wDeath > 0)
if (npc.Calamity().whisperingDeath)
{
float damageReductionFromWhisperingDeath = (float)((npc.Calamity().irradiated > 0 ? npc.Calamity().irradiatedContactBoost : 1) * 0.1f);
float damageReductionFromWhisperingDeath = (float)((npc.Calamity().irradiated ? npc.Calamity().irradiatedContactBoost : 1) * 0.1f);
if (npc.Calamity().VulnerableToSickness.HasValue)
{
if (npc.Calamity().VulnerableToSickness.Value)
@@ -812,7 +812,7 @@ namespace CalamityMod.CalPlayer
if (bloodflareMelee && bloodflareFrenzy && !Player.HasCooldown(BloodflareFrenzy.ID))
contactDamageReduction += 0.5;
if (npc.Calamity().tSad > 0)
if (npc.Calamity().temporalSadness)
contactDamageReduction += 0.5;
if (eskimoSet)
@@ -877,7 +877,7 @@ namespace CalamityMod.CalPlayer
// 10% is converted to 9%, 25% is converted to 20%, 50% is converted to 33%, 75% is converted to 43%, 100% is converted to 50%
if (contactDamageReduction > 0D)
{
if (aCrunch)
if (armorCrunch)
contactDamageReduction *= (double)ArmorCrunch.MultiplicativeDamageReductionPlayer;
if (crumble)
contactDamageReduction *= (double)Crumbling.MultiplicativeDamageReductionPlayer;
@@ -916,7 +916,7 @@ namespace CalamityMod.CalPlayer
#region Modify Hit By Proj
public override void ModifyHitByProjectile(Projectile proj, ref Player.HurtModifiers modifiers)
{
if (!ProjectileDestroyExceptionsList.Includes(proj.type) && proj.active && !proj.friendly && proj.hostile && proj.damage > 0)
if (!CalamityProjectileSets.ShouldNotBeReflected[proj.type] && proj.active && !proj.friendly && proj.hostile && proj.damage > 0 && !modifiers.PvP)
{
double dodgeDamageGateValuePercent = 0.05;
int dodgeDamageGateValue = (int)Math.Round(Player.statLifeMax2 * dodgeDamageGateValuePercent);
@@ -1055,7 +1055,7 @@ namespace CalamityMod.CalPlayer
projectileDamageReduction += 0.25;
}
if (!ProjectileDestroyExceptionsList.Includes(proj.type) && proj.active && !proj.friendly && proj.hostile && proj.damage > 0)
if (!CalamityProjectileSets.ShouldNotBeReflected[proj.type] && proj.active && !proj.friendly && proj.hostile && proj.damage > 0 && !modifiers.PvP)
{
// Daedalus Reflect counts as a reflect but doesn't actually stop you from taking damage
if (daedalusReflect && !disableAllDodges && !evolution && !Player.HasCooldown(GlobalDodge.ID))
@@ -1136,7 +1136,7 @@ namespace CalamityMod.CalPlayer
// 10% is converted to 9%, 25% is converted to 20%, 50% is converted to 33%, 75% is converted to 43%, 100% is converted to 50%
if (projectileDamageReduction > 0D)
{
if (aCrunch)
if (armorCrunch)
projectileDamageReduction *= (double)ArmorCrunch.MultiplicativeDamageReductionPlayer;
if (crumble)
projectileDamageReduction *= (double)Crumbling.MultiplicativeDamageReductionPlayer;
@@ -1425,7 +1425,7 @@ namespace CalamityMod.CalPlayer
}
// As these reflects do not cancel damage, they need to be in OnHit rather than ModifyHit
if (!ProjectileDestroyExceptionsList.Includes(proj.type) && proj.active && !proj.friendly && proj.hostile && hurtInfo.Damage > 0)
if (!CalamityProjectileSets.ShouldNotBeReflected[proj.type] && proj.active && !proj.friendly && proj.hostile && hurtInfo.Damage > 0 && !hurtInfo.PvP)
{
double dodgeDamageGateValuePercent = 0.05;
int dodgeDamageGateValue = (int)Math.Round(Player.statLifeMax2 * dodgeDamageGateValuePercent);
+20 -29
View File
@@ -97,36 +97,36 @@ namespace CalamityMod.CalPlayer
}
// Whispering Death sets positive regen to zero but doesn't actually deal any damage
ApplyDoTDebuff(wDeath, 0, laudanum);
ApplyDoTDebuff(whisperingDeath, 0, laudanum);
ApplyDoTDebuff(irradiated, 4, purity);
int sulphurDoT = 6 - (sulphurSet ? 2 : 0) - (sulphurskin ? 2 : 0) - (corrosiveSpine ? 2 : 0);
ApplyDoTDebuff(sulphurPoison, sulphurDoT, purity);
ApplyDoTDebuff(rTide, 6, purity);
ApplyDoTDebuff(riptide, 6, purity);
ApplyDoTDebuff(weakBrimstoneFlames, 7);
ApplyDoTDebuff(bBlood, 8, purity);
ApplyDoTDebuff(burningBlood, 8, purity);
ApplyDoTDebuff(brainRot, 8, purity);
ApplyDoTDebuff(vaporfied, 8, purity);
int staticDoT = ((Player.controlLeft || Player.controlRight) ? 12 : 3) / (eleResist ? 2 : 1);
ApplyDoTDebuff(staticDischarge, staticDoT, purity);
ApplyDoTDebuff(heavybleeding, 16, purity);
ApplyDoTDebuff(cDepth, 18, purity);
ApplyDoTDebuff(crushDepth, 18, purity);
ApplyDoTDebuff(astralInfection, 24, infectedJewel || hideOfDeus || purity);
ApplyDoTDebuff(shadowflame, 30, purity);
ApplyDoTDebuff(bFlames, abaddon ? 15 : 30, purity);
ApplyDoTDebuff(pFlames, alchFlask ? 15 : 30, purity);
ApplyDoTDebuff(brimstoneFlames, abaddon ? 15 : 30, purity);
ApplyDoTDebuff(plague, alchFlask ? 15 : 30, purity);
ApplyDoTDebuff(vHex, 30); // Has other effects
ApplyDoTDebuff(cragsLava, 30);
ApplyDoTDebuff(searingLava, 30);
ApplyDoTDebuff(demonicFlames, 33, purity); // Never inflicted on the player
ApplyDoTDebuff(laceration, 36, purity);
ApplyDoTDebuff(daybroken, reducedDaybrokenDamage ? 20 : 40, purity);
ApplyDoTDebuff(nightwither, reducedNightwitherDamage ? 20 : 40, purity);
ApplyDoTDebuff(hFlames, 40, purity);
ApplyDoTDebuff(holyFlames, 40, purity);
ApplyDoTDebuff(voidfrost, 40, purity);
ApplyDoTDebuff(hPressure, 40, purity);
ApplyDoTDebuff(hadopelagicPressure, 40, purity);
// Profaned Soul Crystal turns you into Providence, a God, and you take more damage from God Slayer Inferno
ApplyDoTDebuff(gsInferno, profanedCrystalBuffs ? 50 : 40);
ApplyDoTDebuff(godSlayerInferno, profanedCrystalBuffs ? 50 : 40);
int fluxDoT = ((Player.controlLeft || Player.controlRight) ? 50 : 10) / (eleResist ? 2 : 1);
ApplyDoTDebuff(vermillionFlux, fluxDoT);
ApplyDoTDebuff(elementalMix, 50, purity); // Never inflicted on the player
@@ -191,7 +191,7 @@ namespace CalamityMod.CalPlayer
for (int l = 0; l < Player.MaxBuffs; l++)
{
int buff = Player.buffType[l];
if (AlcoholsDict.TryGet(buff, out var level))
if (CalamityBuffSets.AlcoholStrength.TryGetValue(buff, out int level))
alcoholPoisonLevel += level;
}
if (vodka)
@@ -331,11 +331,11 @@ namespace CalamityMod.CalPlayer
int buffID = Player.buffType[l];
if (Player.buffTime[l] <= 2)
continue;
bool shouldHalveDuration = SicknessDebuffsList.Includes(buffID);
bool shouldHalveDuration = CalamityBuffSets.IsSicknessDebuff[buffID];
if (livingDewHalveDebuffs)
shouldHalveDuration |= FireDebuffsList.Includes(buffID);
shouldHalveDuration |= CalamityBuffSets.IsFireDebuff[buffID];
if (purity)
shouldHalveDuration |= DebuffsList.Includes(buffID);
shouldHalveDuration |= CalamityBuffSets.IsDebuff[buffID];
if (shouldHalveDuration)
--Player.buffTime[l];
@@ -379,7 +379,7 @@ namespace CalamityMod.CalPlayer
}
// Permafrost's Concoction increases life regen while afflicted with a fire debuff
if (permafrostsConcoction && Player.buffType.Any(FireDebuffsList.Includes))
if (permafrostsConcoction && Player.buffType.Any(l => CalamityBuffSets.IsFireDebuff[l]))
{
if (Player.lifeRegenTime < 900)
Player.lifeRegenTime = 900;
@@ -402,7 +402,7 @@ namespace CalamityMod.CalPlayer
if (purity)
{
int intendedPurityDefense = 0;
int currentDebuffs = Player.buffType.Count(DebuffsList.List.Contains);
int currentDebuffs = Player.buffType.Count(i => CalamityBuffSets.IsDebuff[i]);
if (currentDebuffs > 0)
{
// Healing rate is normally 5 HP/s (+1 every 12 frames)
@@ -457,7 +457,7 @@ namespace CalamityMod.CalPlayer
// If the player has any debuffs, give the extra life regen and defense
// More defense is given for each additional debuff
int intendedJewelDefense = 0;
int currentDebuffs = Player.buffType.Count(DebuffsList.List.Contains);
int currentDebuffs = Player.buffType.Count(i => CalamityBuffSets.IsDebuff[i]);
if (currentDebuffs > 0)
{
Player.lifeRegen += 4;
@@ -484,7 +484,7 @@ namespace CalamityMod.CalPlayer
Player.lifeRegen += 2;
// If any debuff is detected, provide even more life regen and massively accelerate it
if (Player.buffType.Any(DebuffsList.List.Contains))
if (Player.buffType.Any(i => CalamityBuffSets.IsDebuff[i]))
{
Player.lifeRegen += 3;
if (Player.lifeRegenTime < 900)
@@ -525,7 +525,7 @@ namespace CalamityMod.CalPlayer
Player.lifeRegenCount = 0;
}
if (hInferno)
if (holyInferno)
{
Player.nebulaLevelLife = 0;
@@ -651,7 +651,7 @@ namespace CalamityMod.CalPlayer
for (int l = 0; l < Player.MaxBuffs; l++)
{
int hasBuff = Player.buffType[l];
lesserEffect = AlcoholsDict.TryGet(hasBuff, out var a);
lesserEffect = CalamityBuffSets.AlcoholStrength.TryGetValue(hasBuff, out var a);
}
if (Player.lifeRegen < 0)
Player.lifeRegen += lesserEffect ? 1 : regenBoost;
@@ -696,15 +696,6 @@ namespace CalamityMod.CalPlayer
else
pinkCandleHealFraction = 0D;
if (BloomStoneRegen)
{
float dayTimeCompletion = !Main.dayTime ? 1f : (float)(Main.time / Main.dayLength);
float regenBenefitFactor = MathHelper.SmoothStep(0.25f, 1f, Utils.GetLerpValue(0f, 0.24f, dayTimeCompletion, true) * Utils.GetLerpValue(1f, 0.76f, dayTimeCompletion, true));
Player.lifeRegen += (int)MathHelper.Lerp(2f, 6f, regenBenefitFactor);
Player.lifeRegenTime += (int)MathHelper.Lerp(1f, 3f, regenBenefitFactor);
}
if (manaOverloader)
{
float manaRatio = Player.statMana / (float)Player.statManaMax2;
+121 -71
View File
@@ -202,12 +202,12 @@ namespace CalamityMod.CalPlayer
rage = 0f;
}
if (furyFuel < furyFuelMax && furyRefuelTimer >= 0)
if (furyFuel < FuryFuelMax && furyRefuelTimer >= 0)
{
furyFuel += (int)furyRefuelTimer;
furyRefuelTimer = MathHelper.Lerp(furyRefuelTimer, 25, 0.01f);
if (furyFuel > furyFuelMax)
furyFuel = furyFuelMax;
if (furyFuel > FuryFuelMax)
furyFuel = FuryFuelMax;
}
else if (furyRefuelTimer < 0)
furyRefuelTimer++;
@@ -290,12 +290,16 @@ namespace CalamityMod.CalPlayer
{
if (dashStart)
{
Player.velocity.X *= 3.5f;
Player.velocity.X *= 2f;
lastDashWasTabi = true;
}
if (Player.dashDelay == -1)
{
Player.velocity.X *= 0.9f;
Player.velocity.X *= 0.95f;
if (Player.timeSinceLastDashStarted > 12)
{
Player.velocity.X *= 0.75f;
}
}
}
if ((devilsDevastationKillMode || exaltedKillMode) && !Player.mount.Active)
@@ -623,7 +627,7 @@ namespace CalamityMod.CalPlayer
// If they're a boss, reduce the boss distance.
// Boss distance will always be >= enemy distance, so there's no need to do another check.
// Worm boss body and tail segments are not counted as bosses for this calculation.
if (npc.IsABoss() && !NoRageWormSegmentList.Includes(npc.type))
if (npc.IsABoss() && !CalamityNPCSets.BossSegmentThatDoesNotGenerateRageFaster[npc.type])
bossDistance = hitboxEdgeDist;
}
}
@@ -910,8 +914,11 @@ namespace CalamityMod.CalPlayer
if (target.Calamity().cursorFocus >= CalamityGlobalNPC.cursorFocusMax)
{
target.Calamity().trueVulnerabilityHex = target.Calamity().vulnerabilityHex >= 300 ? target.Calamity().vulnerabilityHex : 300;
target.Calamity().vulnerabilityHex = 0;
int vHexDuration = 0;
if (target.HasBuff<VulnerabilityHex>())
vHexDuration = target.buffTime[target.FindBuffIndex(ModContent.BuffType<VulnerabilityHex>())];
target.AddBuff(ModContent.BuffType<TrueVulnerabilityHex>(),vHexDuration <= 300 ? vHexDuration : 300);
target.RequestBuffRemoval(ModContent.BuffType<VulnerabilityHex>());
SoundEngine.PlaySound(new("CalamityMod/Sounds/Custom/WeaponEnchant"), target.Center);
for (int i = 0; i < 18; i++)
@@ -943,8 +950,12 @@ namespace CalamityMod.CalPlayer
// Incinerate the target with either Vulnerability Hex or True Vulnerability Hex, depending on current cursor focus.
// This adds 8 to the buff duration, which results in a net increase of 3 frames every time damage is dealt, due to damage occurring every 5 frames.
int buffToInflict = target.Calamity().trueVulnerabilityHex > 0 ? ModContent.BuffType<TrueVulnerabilityHex>() : ModContent.BuffType<VulnerabilityHex>();
target.AddBuff(buffToInflict, target.Calamity().trueVulnerabilityHex > 0 ? target.Calamity().trueVulnerabilityHex + 8 : target.Calamity().vulnerabilityHex < VulnerabilityHex.CalamityDuration ? VulnerabilityHex.CalamityDuration : target.Calamity().vulnerabilityHex + 8);
int buffToInflict = target.Calamity().trueVulnerabilityHex? ModContent.BuffType<TrueVulnerabilityHex>() : ModContent.BuffType<VulnerabilityHex>();
if (!target.HasBuff(buffToInflict))
target.AddBuff(buffToInflict, 52);
target.buffTime[target.FindBuffIndex(buffToInflict)] += 8;
if (target.buffTime[target.FindBuffIndex(buffToInflict)] < VulnerabilityHex.CalamityDuration)
target.buffTime[target.FindBuffIndex(buffToInflict)] = VulnerabilityHex.CalamityDuration;
// Make some fancy dust to indicate damage is being done.
for (int j = 0; j < 12; j++)
@@ -1138,7 +1149,7 @@ namespace CalamityMod.CalPlayer
for (int l = 0; l < Player.MaxBuffs; l++)
{
int buffID = Player.buffType[l];
if (Player.buffTime[l] > 2 && DebuffsList.Includes(buffID))
if (Player.buffTime[l] > 2 && CalamityBuffSets.IsDebuff[buffID])
Player.buffTime[l]--;
}
}
@@ -1152,7 +1163,7 @@ namespace CalamityMod.CalPlayer
ProvidenceBurnEffectDrawer.ParticleSpawnRate = int.MaxValue;
// If the player has holy inferno, cause the player to ignite into flames.
if (hInferno)
if (holyInferno)
ProvidenceBurnEffectDrawer.ParticleSpawnRate = 1;
// Otherwise, if the intensity is too weak, but still present, cause the player to release holy cinders.
@@ -1173,11 +1184,11 @@ namespace CalamityMod.CalPlayer
}
ProvidenceBurnEffectDrawer.Update();
if (hInferno && holyInfernoFadeIntensity < 1f)
if (holyInferno && holyInfernoFadeIntensity < 1f)
{
holyInfernoFadeIntensity = MathHelper.Clamp(holyInfernoFadeIntensity + 0.015f, 0f, 1f);
}
else if (!hInferno && holyInfernoFadeIntensity > 0f)
else if (!holyInferno && holyInfernoFadeIntensity > 0f)
{
holyInfernoFadeIntensity = MathHelper.Clamp(holyInfernoFadeIntensity - 0.01f, 0f, 1f);
}
@@ -1199,7 +1210,7 @@ namespace CalamityMod.CalPlayer
Player.AddBuff(ModContent.BuffType<FrozenLungs>(), 2, false);
}
}
if (iCantBreathe)
if (frozenLungs)
{
if (Player.breath > 0 && Player.miscCounter % 2 == 0)
Player.breath--;
@@ -1294,13 +1305,11 @@ namespace CalamityMod.CalPlayer
Player.maxFallSpeed = 20f;
}
if (Player.controlDown && !Player.controlJump && ironBoots)
if (Player.controlDown && !Player.controlJump && (ironBoots || gSabaton) && !gSabatonFalling)
{
Player.maxFallSpeed = 23f; // This is slightly faster than slimy saddle (so it can be viable)
Player.maxFallSpeed *= 2; //This ties Slimy Saddle. It is made viable by also allowing the player to move horizontal, unlike Saddle, and curbing existing vertical speed very fast
if (Player.gravDir == 1 ? Player.velocity.Y <= 0 : Player.velocity.Y >= 0)
Player.velocity.Y *= 0.7f;
else if (Player.gravDir == 1 ? Player.velocity.Y < Player.maxFallSpeed : Player.velocity.Y > Player.maxFallSpeed)
Player.velocity.Y = MathHelper.Lerp(Player.velocity.Y, Player.maxFallSpeed, 0.1f);
}
if (LungingDown)
@@ -1321,10 +1330,6 @@ namespace CalamityMod.CalPlayer
if (holdingDown && Player.ControlsEnabled() && notInLiquid && notOnRope && notGrappling && airborne && !Player.Calamity().gSabatonFalling) //Player cannot further increase their ridiculous gravity during a Gravistar Slam
{
Player.velocity.Y += Player.gravity * Player.gravDir * (BalancingConstants.HoldingDownGravityMultiplier - 1f);
if (Player.Calamity().gSabaton && !Player.gravControl2)
{
Player.maxFallSpeed *= 1.5f;
}
if (Player.velocity.Y * Player.gravDir > Player.maxFallSpeed)
Player.velocity.Y = Player.maxFallSpeed * Player.gravDir;
}
@@ -1526,11 +1531,9 @@ namespace CalamityMod.CalPlayer
// The fire boots debuff boosts
if (hellfireTreads)
bootLevel = 2;
HeatDebuffMultiplier += 0.5f;
else if (flameWakerBoots)
bootLevel = 1;
else
bootLevel = 0;
HeatDebuffMultiplier += 0.25f;
if (rOfResilienceEffect > 0)
rOfResilienceEffect--;
@@ -1868,6 +1871,41 @@ namespace CalamityMod.CalPlayer
dOfTheDeepTimer++;
}
}
if (hookPullVisuals > 0)
{
if (bloomStone && Player.Calamity().bloomStoneHookVisuals) // Visual flowers while being pulled
{
Vector2 spawnPos = Player.Center + Main.rand.NextVector2Circular(20f, 20f);
float fade = (float)Math.Pow(Utils.GetLerpValue(0, 30, hookPullVisuals, true), 2);
Particle trail = new CustomSpark(Player.Center, -Player.velocity.SafeNormalize(Vector2.UnitX) * Main.rand.NextFloat(5f, 8f),
"CalamityMod/Particles/BloomCircle", false, Main.rand.Next(7, 10 + 1), 0.65f,
Color.Lerp(Color.HotPink, Color.Gold, Utils.GetLerpValue(60, 30, hookPullVisuals, true)) * 0.75f * fade, new Vector2(1f, 0.7f), true, shrinkSpeed: 0.6f);
GeneralParticleHandler.SpawnParticle(trail);
if (Main.rand.NextBool(3))
{
Particle floweyFromHitGameUndertale = new CustomSpark(spawnPos, -Player.velocity.SafeNormalize(Vector2.UnitX) * Main.rand.NextFloat(5f, 8f),
"CalamityMod/Particles/MiniFlower", false, Main.rand.Next(25, 28 + 1), Main.rand.NextFloat(2.3f, 2.6f) * fade,
Color.Lerp(Color.HotPink, Color.Plum, Main.rand.NextFloat(0, 0.65f)), new Vector2(1f, 1f), true, extraRotation: Main.rand.NextFloat(0, MathHelper.TwoPi));
GeneralParticleHandler.SpawnParticle(floweyFromHitGameUndertale);
}
if (Main.rand.NextBool())
{
Dust pollenDust = Dust.NewDustPerfect(Player.Center + Main.rand.NextVector2Circular(20f, 20f), ModContent.DustType<SquashDust>());
pollenDust.noLightEmittence = true;
pollenDust.noGravity = true;
pollenDust.scale = Main.rand.NextFloat(0.9f, 1.4f);
pollenDust.color = Color.Lerp(Color.Gold, Color.HotPink, Utils.GetLerpValue(60, 30, hookPullVisuals, true));
pollenDust.velocity = -Player.velocity.SafeNormalize(Vector2.UnitX) * Main.rand.NextFloat(2f, 5f);
pollenDust.fadeIn = -0.5f * fade;
}
}
hookPullVisuals--;
if (Player.velocity.Length() < 6)
hookPullVisuals = 0;
}
if (unstableGraniteCore)
{
@@ -2031,8 +2069,6 @@ namespace CalamityMod.CalPlayer
phantomicHeartRegen--;
if (phantomicBulwarkCooldown > 0)
phantomicBulwarkCooldown--;
if (KameiBladeUseDelay > 0)
KameiBladeUseDelay--;
if (galileoCooldown > 0)
galileoCooldown--;
if (gladiatorTimer > 0)
@@ -2074,15 +2110,27 @@ namespace CalamityMod.CalPlayer
if (theBeeCooldown > 0)
theBeeCooldown--;
if (bloomStoneHealTimer > 0)
if (bloomStoneTotalHeal > 0)
{
if (bloomStone && bloomStoneHealTimer % 40 == 0)
float healRateDiv = (Player.statLife >= Player.statLifeMax ? 5 : // 5 times as slow if at max hp already (overheal prevention)
bloomStoneBuffedHealRateTimer > 0 ? Utils.Remap(bloomStoneBuffedHealRateTimer, 90, 0, 0.5f, 1f, true) // 2 times faster if pollen buffed, scales back down to regular speed as the buff fades
: 1); // Regular speed
bloomStoneHealRate = 1 / healRateDiv;
if (!bloomStone) // If you take it off, all your healing is instantly gone
bloomStoneTotalHeal = 0;
float secondsOfHealing = 16; // Number of seconds healing occurs over at base, this can be met slower or faster depending on heal rate
if (bloomStoneHealTimer >= 60) // heal the player a portion of their potion every second
{
Player.HealPlayer(Math.Min(bloomStoneHealInc, bloomStoneTotalHeal));
int healAmount = (int)(Math.Max(Math.Min(bloomStoneHealPool, (int)(bloomStoneTotalHeal / secondsOfHealing)), 1));
Player.HealPlayer(healAmount);
bloomStoneHealPool -= healAmount; // Subtract the amount healed from the pool until it's empty
// Special specifically programmed interaction with Chalice of the Blood God: Healing over time clears bits of the bleedout buffer.
if (chaliceOfTheBloodGod && chaliceBleedoutBuffer > 0D)
{
float amountOfBleedToClear = ChaliceOfTheBloodGod.HealingPotionRatioForBufferClear * bloomStoneHealInc;
float amountOfBleedToClear = ChaliceOfTheBloodGod.HealingPotionRatioForBufferClear * healAmount;
chaliceBleedoutBuffer -= amountOfBleedToClear;
// Display text indicating that healing was applied to the bleedout buffer.
if (!Main.dedServ)
@@ -2093,22 +2141,16 @@ namespace CalamityMod.CalPlayer
}
}
bloomStoneTotalHeal -= bloomStoneHealInc;
if (bloomStoneTotalHeal < 0)
if (bloomStoneHealPool == 0) // When you're out of healing, reset values
{
bloomStoneTotalHeal = 0;
}
bloomStoneHealTimer = 0;
}
bloomStoneHealTimer--;
}
else
{
bloomStoneTotalHeal = 0;
bloomStoneHealInc = 0;
}
if (bloomStoneDR > 0)
{
Player.endurance += bloomStoneHealTimer > 0 ? 0.12f : 0.06f;
bloomStoneDR--;
bloomStoneHealTimer += bloomStoneHealRate;
}
if (bloomStoneBuffedHealRateTimer > 0)
bloomStoneBuffedHealRateTimer--;
if (summonProjCooldown > 0f)
summonProjCooldown -= 1f;
@@ -2134,13 +2176,6 @@ namespace CalamityMod.CalPlayer
if (vortexBoosterStealthDelay == 1 && Player.setVortex)
Player.vortexStealthActive = true;
}
if (statisPenaltyTimer > 0)
statisPenaltyTimer--;
if (statisPenaltyTimer == 0 && statisAnticheese > 0)
{
statisAnticheese--;
statisPenaltyTimer = statisTimerMax;
}
if (hallowedRuneCooldown > 0)
hallowedRuneCooldown--;
if (sulphurBubbleCooldown > 0)
@@ -2293,8 +2328,10 @@ namespace CalamityMod.CalPlayer
// God Slayer Armor dash debuff immunity
if (LastUsedDashID == GodslayerArmorDash.ID && Player.dashDelay < 0)
{
foreach (int debuff in DebuffsList.List)
Player.buffImmune[debuff] = true;
for (int d = 0; d < Player.buffImmune.Length; d++)
{
Player.buffImmune[d] |= CalamityBuffSets.IsDebuff[d];
}
}
// Shield of the High Ruler
@@ -2365,8 +2402,11 @@ namespace CalamityMod.CalPlayer
if (silvaCountdown > 0 && hasSilvaEffect && silvaSet)
{
// You become immune to all debuffs
foreach (int debuff in DebuffsList.List)
Player.buffImmune[debuff] = true;
foreach (int debuff in Player.buffType)
{
if (CalamityBuffSets.IsDebuff[debuff])
Player.buffImmune[debuff] = true;
}
// Prevent thorns effects from being abused during invincibility
Player.thorns = 0f;
@@ -2445,8 +2485,7 @@ namespace CalamityMod.CalPlayer
if (Player.whoAmI == Main.myPlayer)
Player.AddCooldown(Cooldowns.TarragonImmunity.ID, CalamityUtils.SecondsToFrames(25));
bool shouldAffect = DebuffsList.Includes(buffID);
if (shouldAffect)
if (CalamityBuffSets.IsDebuff[buffID])
Player.GetDamage<RogueDamageClass>() += 0.1f;
}
}
@@ -2495,6 +2534,17 @@ namespace CalamityMod.CalPlayer
}
}
if (brimflameFrenzy)
{
Player.GetDamage<MagicDamageClass>() += BrimflameCowl.FrenzyMagicDamageBoost;
for (int l = 0; l < Player.MaxBuffs; l++)
{
if (Player.buffTime[l] <= 2 && Player.buffType[l] == ModContent.BuffType<BrimflameFrenzyBuff>() && Player.whoAmI == Main.myPlayer)
Player.AddCooldown(BrimflameFrenzy.ID, BrimflameCowl.FrenzyCooldown);
}
}
// Raider Talisman bonus
if (raiderTalisman && !vampiricTalisman && !StealthStrikeAvailable() && raiderCritLifespan > 0f)
Player.GetCritChance<ThrowingDamageClass>() += RaidersTalisman.RaiderBonus;
@@ -2768,7 +2818,7 @@ namespace CalamityMod.CalPlayer
{
brimflameFrenzy = false;
Player.ClearBuff(ModContent.BuffType<BrimflameFrenzyBuff>());
Player.AddCooldown(BrimflameFrenzy.ID, BrimflameScowl.CooldownLength);
Player.AddCooldown(BrimflameFrenzy.ID, BrimflameCowl.FrenzyCooldown);
}
if (!bloodflareMelee && bloodflareFrenzy)
{
@@ -2974,7 +3024,7 @@ namespace CalamityMod.CalPlayer
abyssBreathLossRateStat = (float)tick;
float resistanceSlowdownFactor = 1f;
if (hPressure)
if (hadopelagicPressure)
resistanceSlowdownFactor -= abyssalDivingSuit ? 0.2f : 0.5f;
// Reduce breath over ticks (frames)
@@ -2987,7 +3037,7 @@ namespace CalamityMod.CalPlayer
// Reduce breath
if (Player.breath > 0)
{
Player.breath -= (int)(cDepth && !depthCharm ? breathLoss + 1D : breathLoss);
Player.breath -= (int)(crushDepth && !depthCharm ? breathLoss + 1D : breathLoss);
}
}
@@ -3145,17 +3195,17 @@ namespace CalamityMod.CalPlayer
else
{
aquaticBoost += 2f;
if (aquaticBoost > aquaticBoostMax)
aquaticBoost = aquaticBoostMax;
if (aquaticBoost > AquaticBoostMax)
aquaticBoost = AquaticBoostMax;
if (Player.mount.Active)
aquaticBoost = aquaticBoostMax;
aquaticBoost = AquaticBoostMax;
}
Player.statDefense += (int)((1f - aquaticBoost * 0.0001f) * 20f);
Player.moveSpeed -= (1f - aquaticBoost * 0.0001f) * 0.1f;
}
else
aquaticBoost = aquaticBoostMax;
aquaticBoost = AquaticBoostMax;
if (Player.ActiveItem().type == ModContent.ItemType<Auralis>() && Player.StandingStill(0.1f))
{
@@ -3541,7 +3591,7 @@ namespace CalamityMod.CalPlayer
}
}
if (HighTestFishingPoleList.Includes(Player.ActiveItem().type))
if (CalamityItemSets.FishingPoleThatNeverBreaks[Player.ActiveItem().type])
Player.accFishingLine = true;
if (planarSpeedBoost != 0)
@@ -3650,10 +3700,10 @@ namespace CalamityMod.CalPlayer
if (tarraSet)
Player.lifeMagnet = true;
if (wDeath && !laudanum && !purity)
if (whisperingDeath && !laudanum && !purity)
Player.GetDamage<GenericDamageClass>() -= 0.2f;
if (aCrunch && !laudanum && !purity)
if (armorCrunch && !laudanum && !purity)
{
Player.statDefense -= ArmorCrunch.DefenseReduction;
Player.endurance *= ArmorCrunch.MultiplicativeDamageReductionPlayer;
@@ -4313,7 +4363,7 @@ namespace CalamityMod.CalPlayer
for (int l = 0; l < Player.MaxBuffs; l++)
{
int buffID = Player.buffType[l];
if (AmalgamBuffList.Includes(buffID))
if (CalamityBuffSets.BuffedByAmalgam[buffID])
{
if (amalgam)
{
@@ -4330,7 +4380,7 @@ namespace CalamityMod.CalPlayer
else
{
// Reset buff persistence if Amalgam is removed.
if (Main.persistentBuff[buffID] && !PersistentBuffList.Includes(buffID))
if (Main.persistentBuff[buffID] && !CalamityBuffSets.IsPersistentBuff[buffID])
Main.persistentBuff[buffID] = false;
}
}
+18 -32
View File
@@ -8,10 +8,13 @@ using CalamityMod.Buffs.StatDebuffs;
using CalamityMod.Cooldowns;
using CalamityMod.Dusts;
using CalamityMod.Items.Accessories;
using CalamityMod.Items.Armor;
using CalamityMod.Items.Armor.Astral;
using CalamityMod.Items.Armor.Reaver;
using CalamityMod.Items.Armor.SnowRuffian;
using CalamityMod.Items.Armor.Sulphurous;
using CalamityMod.Items.Armor.TitanHeart;
using CalamityMod.Items.Armor.Umbraphile;
using CalamityMod.Items.Fishing.AstralCatches;
using CalamityMod.Items.VanillaArmorChanges;
using CalamityMod.NPCs;
@@ -237,25 +240,12 @@ namespace CalamityMod.CalPlayer
if (witheringWeaponEnchant)
witheringDamageDone += (int)(damageDone * (hit.Crit ? 2D : 1D));
cgn.IncreasedColdEffects_EskimoSet = eskimoSet;
cgn.IncreasedColdEffects_CryoStone = CryoStone;
cgn.IncreasedElectricityEffects_Unused = false;
cgn.IncreasedHeatEffects_Fireball = fireball;
cgn.IncreasedHeatEffects_CinnamonRoll = cinnamonRoll;
cgn.IncreasedHeatEffects_FireBoots = bootLevel;
cgn.IncreasedSicknessEffects_ToxicHeart = toxicHeart;
cgn.IncreasedWaterEffects_Amulet1 = sSpiritAmulet;
cgn.IncreasedWaterEffects_Amulet2 = dOfTheDeep;
cgn.IncreasedSicknessAndWaterEffects_EvergreenGin = evergreenGin;
cgn.IncreasedSicknessAndWaterEffects_CorrosiveSpine = corrosiveSpine;
cgn.IncreasedDebuffEffects_Amalgam = amalgam;
cgn.TypelessDebuffMultiplier = TypelessDebuffMultiplier;
cgn.HeatDebuffMultiplier = HeatDebuffMultiplier;
cgn.ColdDebuffMultiplier = ColdDebuffMultiplier;
cgn.SicknessDebuffMultiplier = SicknessDebuffMultiplier;
cgn.WaterDebuffMultiplier = WaterDebuffMultiplier;
cgn.ElectricDebuffMultiplier = ElectricDebuffMultiplier;
switch (proj.type)
{
@@ -418,7 +408,7 @@ namespace CalamityMod.CalPlayer
if (!proj.npcProj && !proj.trap && proj.friendly)
{
if (plaguebringerCarapace && FriendlyBeesList.Includes(proj.type))
if (plaguebringerCarapace && CalamityProjectileSets.IsFriendlyBeeProjectile[proj.type])
target.AddBuff(BuffType<Plague>(), 300);
// All projectiles fired from Soma Prime are marked using CalamityGlobalProjectile
@@ -1116,24 +1106,22 @@ namespace CalamityMod.CalPlayer
if (forbiddenCirclet && modProj.stealthStrike && forbiddenCooldown <= 0 && modProj.stealthStrikeHitCount < 3)
{
for (int index2 = 0; index2 < 6; index2++)
for (int index2 = 0; index2 < ForbiddenCirclet.EaterSpawnCount; index2++)
{
float xVector = Main.rand.Next(-35, 36) * 0.02f;
float yVector = Main.rand.Next(-35, 36) * 0.02f;
xVector *= 10f;
yVector *= 10f;
int damage = (int)Player.GetTotalDamage<RogueDamageClass>().ApplyTo(40);
float xVector = Main.rand.NextFloat(-7f, 7f);
float yVector = Main.rand.NextFloat(-7f, 7f);
int damage = (int)Player.GetTotalDamage<RogueDamageClass>().ApplyTo(ForbiddenCirclet.EaterDamage);
int eater = Projectile.NewProjectile(spawnSource, proj.Center.X, proj.Center.Y, xVector, yVector, ProjectileType<ForbiddenCircletEater>(), damage, proj.knockBack, proj.owner);
if (eater.WithinBounds(Main.maxProjectiles))
Main.projectile[eater].DamageType = DamageClass.Generic;
forbiddenCooldown = 15;
forbiddenCooldown = ForbiddenCirclet.EaterSpawnCooldown;
}
}
if (titanHeartSet && modProj.stealthStrike && titanCooldown <= 0 && modProj.stealthStrikeHitCount < 3)
{
int damage = (int)Player.GetTotalDamage<RogueDamageClass>().ApplyTo(40);
int damage = (int)Player.GetTotalDamage<RogueDamageClass>().ApplyTo(TitanHeartMask.ExplosionDamage);
Projectile.NewProjectile(spawnSource, proj.Center, Vector2.Zero, ProjectileType<TitanHeartBoom>(), damage, proj.knockBack, proj.owner, 1f, 0f);
SoundEngine.PlaySound(SoundID.Item14, proj.Center);
@@ -1163,9 +1151,7 @@ namespace CalamityMod.CalPlayer
// Umbraphile cannot trigger off of itself. It is guaranteed on stealth strikes and 20% chance otherwise.
if (umbraphileSet && ((modProj.stealthStrike && modProj.stealthStrikeHitCount < 3) || Main.rand.NextBool(5)))
{
// Umbraphile Rogue Blasts: 20%, softcap starts at 50 base damage
int umbraBlastDamage = CalamityUtils.DamageSoftCap(proj.damage * 0.20, 50);
int umbraBlastDamage = CalamityUtils.DamageSoftCap(proj.damage * UmbraphileHood.ExplosionDamageRatio, UmbraphileHood.ExplosionDamageSoftcap);
Projectile.NewProjectile(spawnSource, proj.Center, Vector2.Zero, ProjectileType<UmbraphileBoom>(), umbraBlastDamage, 0f, Player.whoAmI);
}
if (electricianGlove && modProj.stealthStrike && modProj.stealthStrikeHitCount < 3)
@@ -1246,7 +1232,7 @@ namespace CalamityMod.CalPlayer
}
if (titanHeartMask)
{
target.AddBuff(BuffType<AstralInfectionDebuff>(), 120);
target.AddBuff(BuffType<AstralInfectionDebuff>(), TitanHeartMask.OnHitDebuffDuration);
}
}
if (summon)
+2 -15
View File
@@ -15,24 +15,11 @@ namespace CalamityMod.CalPlayer.Dashes
public override DashCollisionType CollisionType => DashCollisionType.NoCollision;
public override bool IsOmnidirectional => false;
public int Time = 0;
public int lastDashDir = 0;
public override float CalculateDashSpeed(Player player) => (55f * player.moveSpeed);
public override float CalculateDashSpeed(Player player) => (48f);
public override void OnDashEffects(Player player)
{
if (Math.Sign(player.velocity.X) == lastDashDir && lastDashDir != 0)
{
player.Calamity().statisPenaltyTimer = player.Calamity().statisTimerMax;
if (player.Calamity().statisAnticheese < 6)
player.Calamity().statisAnticheese++;
}
else
player.Calamity().statisAnticheese = 0;
if (player.Calamity().statisAnticheese > 1)
player.velocity.X *= Utils.Remap(player.Calamity().statisAnticheese, 1, 6, 0.9f, 0.3f, true);
lastDashDir = Math.Sign(player.velocity.X);
lastDashDir = Math.Sign(player.velocity.X);
Time = 0;
for (int i = 0; i < 15; i++)
@@ -78,7 +65,7 @@ namespace CalamityMod.CalPlayer.Dashes
{
player.velocity.X = -140;
}
if (Time > 6)
if (Time > 8)
player.velocity.X *= 0.5f;
}
}
+6 -18
View File
@@ -24,23 +24,11 @@ namespace CalamityMod.CalPlayer.Dashes
public int Time = 0;
public Vector2 aimVel;
public bool strongVisuals = true;
public int lastDashDir = 0;
public override float CalculateDashSpeed(Player player) => (70f * player.moveSpeed);
public override float CalculateDashSpeed(Player player) => (64f);
public override void OnDashEffects(Player player)
{
if (Math.Sign(player.velocity.X) == lastDashDir && lastDashDir != 0)
{
player.Calamity().statisPenaltyTimer = player.Calamity().statisTimerMax;
if (player.Calamity().statisAnticheese < 6)
player.Calamity().statisAnticheese++;
}
else
player.Calamity().statisAnticheese = 0;
if (player.Calamity().statisAnticheese > 1)
player.velocity.X *= Utils.Remap(player.Calamity().statisAnticheese, 1, 6, 0.9f, 0.3f, true);
lastDashDir = Math.Sign(player.velocity.X);
strongVisuals = player.Calamity().voidSashVisuals;
Time = 0;
@@ -52,7 +40,7 @@ namespace CalamityMod.CalPlayer.Dashes
SoundEngine.PlaySound(sound with { Volume = 0.7f, Pitch = Main.rand.NextFloat(-0.15f, 0.15f) }, player.Center);
for (int i = 0; i < 40; i++)
{
Vector2 intenededVel = (MathHelper.TwoPi * i / 40f).ToRotationVector2() * 5.5f;
Vector2 intenededVel = (MathHelper.TwoPi * i / 40f).ToRotationVector2() * 3f;
Vector2 fxVel = new Vector2(intenededVel.X, intenededVel.Y * 2.3f).RotatedBy(player.velocity.ToRotation());
Vector2 fxPlace = player.Center + fxVel.RotatedBy(player.velocity.ToRotation()) + player.velocity.SafeNormalize(Vector2.UnitX) * 60;
@@ -61,8 +49,8 @@ namespace CalamityMod.CalPlayer.Dashes
}
for (int i = 0; i < 30; i++)
{
Vector2 intenededVel = (MathHelper.TwoPi * i / 30f).ToRotationVector2() * 5.5f;
Vector2 fxVel = new Vector2(intenededVel.X, intenededVel.Y * 2.3f).RotatedBy(player.velocity.ToRotation());
Vector2 intenededVel = (MathHelper.TwoPi * i / 30f).ToRotationVector2() * 3f;
Vector2 fxVel = new Vector2(intenededVel.X, intenededVel.Y * 2f).RotatedBy(player.velocity.ToRotation());
Vector2 fxPlace = player.Center + fxVel.RotatedBy(player.velocity.ToRotation()) + player.velocity.SafeNormalize(Vector2.UnitX) * 60;
Color dustColor = Main.rand.NextBool(3) ? Color.Indigo : Color.DarkOrchid;
@@ -109,7 +97,7 @@ namespace CalamityMod.CalPlayer.Dashes
SignusMetaball.SpawnParticle(fxPlace, fxVelocity * Main.rand.NextFloat(5, 8), 50f * Main.rand.NextFloat(0.7f, 1f), 8, new Vector2(0.8f, 1.2f), 0.18f, 0);
}
}
player.velocity.X *= 0.912f;
player.velocity.X *= 0.95f;
if (player.velocity.X > 140)
{
player.velocity.X = 140;
@@ -118,7 +106,7 @@ namespace CalamityMod.CalPlayer.Dashes
{
player.velocity.X = -140;
}
if (Time > 8)
if (Time > 10)
player.velocity.X *= 0.5f;
}
}
+2 -10
View File
@@ -1,13 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\tModLoader.targets" />
<PropertyGroup>
<AssemblyName>CalamityMod</AssemblyName>
<TargetFramework>net8.0</TargetFramework>
<PlatformTarget>AnyCPU</PlatformTarget>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="tModLoader.CodeAssist" Version="0.1.5" />
</ItemGroup>
</Project>
+410
View File
@@ -0,0 +1,410 @@
using System;
using System.Diagnostics;
using System.Security.Cryptography;
using CalamityMod.NPCs;
using Microsoft.Xna.Framework.Graphics;
using ReLogic.Content;
using Terraria;
using Terraria.GameContent;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.DataStructures
{
[ReinitializeDuringResizeArrays]
public static class BuffDatasets
{
public static DebuffData[] DebuffDataset = BuffID.Sets.Factory.CreateNamedSet("DebuffData")
.Description("Stores DebuffData for a particular debuff")
.RegisterCustomSet<DebuffData>(null,
BuffID.OnFire, DebuffData.OnFire,
BuffID.OnFire3, DebuffData.Hellfire,
BuffID.CursedInferno, DebuffData.CursedInferno,
BuffID.ShadowFlame, DebuffData.Shadowflame,
BuffID.Daybreak, DebuffData.Daybroken,
BuffID.Frostburn, DebuffData.Frostburn,
BuffID.Frostburn2, DebuffData.Frostbite,
BuffID.Poisoned, DebuffData.Poisoned,
BuffID.Venom, DebuffData.AcidVenom,
BuffID.Electrified, DebuffData.Electrified
);
}
public class DebuffData
{
/// <summary>
/// Determines the behavior of the debuff.
/// </summary>
public enum DebuffBehavior
{
Default,
Electric
}
#region DebuffData data
/// <summary>
/// UNIMPLEMENTED. WILL BE DONE IN A FUTURE PR
/// Amount of life regen lost by a player under this debuff
/// For debuffs with unique scaling, this should usually be the "base" amount.
/// Defaults to 0
/// </summary>
public float PlayerLostRegen = 0;
/// <summary>
/// Amount of life regen lost by an enemy under this debuff.
/// For debuffs with unique scaling, this should usually be the "base" amount.
/// Defaults to 0
/// </summary>
public float EnemyLostRegen = 0;
/// <summary>
/// This is used to cancel Vanilla DoT damage on enemies and allow using Calamity's own instead.
/// </summary>
public int EnemyVanillaRegenToCancelOut = 0;
/// <summary>
/// The minimum size of damage ticks from this debuff on an enemy.
/// Ticks can be larger than this due to MultiplierDamageTickSize
/// Defaults to 1
/// </summary>
public int MinimumDamageTickSize = 1;
/// <summary>
/// The size of damage ticks from this debuff on an enemy
/// This is based on the applied regen of the debuff, and will cause the tick to scale with amplifiers
/// Ticks can be larger than this due to MinimumDamageTickSize
/// Defaults to 0.25f
/// </summary>
public float MultiplierDamageTickSize = 0.25f;
/// <summary>
/// How much this benefits from heat debuff amplifiers.
/// Default is 0, which means it does not benefit.
/// </summary>
public float HeatDebuffScaling = 0;
/// <summary>
/// How much this benefits from sickness debuff amplifiers.
/// Default is 0, which means it does not benefit.
/// </summary>
public float SicknessDebuffScaling = 0;
/// <summary>
/// How much this benefits from cold debuff amplifiers.
/// Default is 0, which means it does not benefit.
/// </summary>
public float ColdDebuffScaling = 0;
/// <summary>
/// How much this benefits from water debuff amplifiers.
/// Default is 0, which means it does not benefit.
/// </summary>
public float WaterDebuffScaling = 0;
/// <summary>
/// How much this benefits from electric debuff amplifiers.
/// Default is 0, which means it does not benefit.
/// </summary>
public float ElectricDebuffScaling = 0;
/// <summary>
/// UNIMPLEMENTED. WILL BE DONE IN A FUTURE PR
/// Whether or not this debuff should draw above inflicted NPCs.
/// Defaults to TRUE
/// </summary>
public bool DrawAboveNPC = true;
/// <summary>
/// UNIMPLEMENTED. WILL BE DONE IN A FUTURE PR
/// Whether or not gear can modify the debuff effects such as duration or damage on the player.
/// </summary>
public bool GearCanModifyDebuff = true;
/// <summary>
/// UNIMPLEMENTED. WILL BE DONE IN A FUTURE PR
/// How much alcohol this counts as.
/// Default is 0, most alcohol is 1, and Everclear is 2
/// </summary>
public float AlcoholLevel = 0f;
/// <summary>
/// UNIMPLEMENTED. WILL BE DONE IN A FUTURE PR
/// The UpdatePlayerLifeRegen code to run. Defaults to just applying DoT
/// </summary>
public UpdatePlayerLifeRegen PlayerUpdateMethod;
/// <summary>
/// The UpdateNPCLifeRegen code to run. Defaults to just applying DoT
/// Parameters of the method should be (NPC npc, int buffType, ref int buffIndex, ref int damage)
/// </summary>
public UpdateNPCLifeRegen NPCLifeRegenMethod;
public DebuffData()
{
PlayerUpdateMethod = DefaultUpdateOnPlayer;
NPCLifeRegenMethod = BaseUpdateNPCLifeRegen;
}
/// <summary>
/// Allows using DebuffBehavior to determine preset behavior
/// "electric" causes debuffs to scale 4x when moving
/// Uses default behavior if no known key is inputed
/// </summary>
/// <param name="behavior">This determines the type of behavior of the debuff</param>
public DebuffData(DebuffBehavior behavior)
{
PlayerUpdateMethod = DefaultUpdateOnPlayer;
if (behavior == DebuffBehavior.Electric)
NPCLifeRegenMethod = ElectricDebuffNPCLifeRegen;
else
NPCLifeRegenMethod = BaseUpdateNPCLifeRegen;
}
/// <summary>
/// UNIMPLEMENTED. WILL BE IN A FUTURE PR
/// This is the code that should be run when updating the buff on a player.
/// Use for DoT damage. Other effects should be in the ModBuff class, or wherever appropriate.
/// </summary>
/// <param name="player"></param>
public delegate void UpdatePlayerLifeRegen(Player player, int buffType, ref int buffIndex, ref int damage);
/// <summary>
/// This is the code that should be run when updating life regen on NPC
/// Use for DoT damage. Other effects should be in the ModBuff class, or wherever appropriate.
/// </summary>
/// <param name="npc"></param>
public delegate void UpdateNPCLifeRegen(NPC npc, int buffType, ref int buffIndex, ref int damage);
/// <summary>
/// Applies a scaling amount to a StatModifer
/// </summary>
/// <param name="Modifer"></param>
/// <param name="scaling"></param>
/// <returns></returns>
public static StatModifier ApplyScalingToStatModifer(StatModifier Modifer, float scaling)
{
StatModifier output = new();
output += (Modifer.Additive-1) * scaling;
output *= 1 + (Modifer.Multiplicative-1) * scaling;
output.Base = Modifer.Base * scaling;
output.Flat = Modifer.Flat * scaling;
return output;
}
/// <summary>
/// UNIMPLEMENTED. WILL BE IN A FUTURE PR
/// The default debuff DoT functionality on a player
/// </summary>
public void DefaultUpdateOnPlayer(Player player, int buffType, ref int buffIndex, ref int damage)
{
}
/// <summary>
/// The default debuff DoT functionality on enemies.
/// </summary>
public void BaseUpdateNPCLifeRegen(NPC npc, int buffType, ref int buffIndex, ref int damage)
{
var cnpc = npc.Calamity();
float totalDPS = EnemyLostRegen;
StatModifier totalScaling =
HeatDebuffScaling + ColdDebuffScaling + SicknessDebuffScaling + WaterDebuffScaling + ElectricDebuffScaling != 0
?
ApplyScalingToStatModifer(cnpc.ActiveHeatDebuffMultiplier, HeatDebuffScaling)
.CombineWith(ApplyScalingToStatModifer(cnpc.ActiveColdDebuffMultiplier, ColdDebuffScaling)
.CombineWith(ApplyScalingToStatModifer(cnpc.ActiveSicknessDebuffMultiplier, SicknessDebuffScaling)
.CombineWith(ApplyScalingToStatModifer(cnpc.ActiveWaterDebuffMultiplier, WaterDebuffScaling)
.CombineWith(ApplyScalingToStatModifer(cnpc.ActiveElectricDebuffMultiplier, ElectricDebuffScaling)
))))
:
cnpc.ActiveTypelessDebuffMultiplier;
totalDPS = totalScaling.ApplyTo(totalDPS);
var totalDPSAdjusted = totalDPS-EnemyVanillaRegenToCancelOut;
npc.Calamity().ApplyDPSDebuff((int)(totalDPSAdjusted), (int)Math.Max(totalDPS*MultiplierDamageTickSize,MinimumDamageTickSize), ref npc.lifeRegen, ref damage);
}
/// <summary>
/// DoT functionality that takes into account Electric debuff's 4x DPS when moving
/// </summary>
/// <param name="npc"></param>
/// <param name="buffType"></param>
/// <param name="buffIndex"></param>
/// <param name="damage"></param>
public void ElectricDebuffNPCLifeRegen(NPC npc, int buffType, ref int buffIndex, ref int damage)
{
var cnpc = npc.Calamity();
float totalDPS = EnemyLostRegen;
StatModifier totalScaling =
HeatDebuffScaling + ColdDebuffScaling + SicknessDebuffScaling + WaterDebuffScaling + ElectricDebuffScaling != 0
?
ApplyScalingToStatModifer(cnpc.ActiveHeatDebuffMultiplier, HeatDebuffScaling)
.CombineWith(ApplyScalingToStatModifer(cnpc.ActiveColdDebuffMultiplier, ColdDebuffScaling)
.CombineWith(ApplyScalingToStatModifer(cnpc.ActiveSicknessDebuffMultiplier, SicknessDebuffScaling)
.CombineWith(ApplyScalingToStatModifer(cnpc.ActiveWaterDebuffMultiplier, WaterDebuffScaling)
.CombineWith(ApplyScalingToStatModifer(cnpc.ActiveElectricDebuffMultiplier, ElectricDebuffScaling)
))))
:
cnpc.ActiveTypelessDebuffMultiplier;
totalDPS = totalScaling.ApplyTo(totalDPS);
totalDPS *= (npc.velocity.X == 0 ? 1 : 4);
totalDPS -= EnemyVanillaRegenToCancelOut * (npc.velocity.X == 0 ? 1 : 5); //Vanilla Electrified is 5x when moving, not 4x
npc.Calamity().ApplyDPSDebuff((int)(totalDPS), (int)Math.Max(totalDPS * MultiplierDamageTickSize, MinimumDamageTickSize), ref npc.lifeRegen, ref damage);
}
#region Special Regen Functions
/// <summary>
/// 18OCT2023: Ozzatron: im not gonna sugarcoat it
/// vanilla debuff damage from Daybreak impales scales linearly up to 8 for 800 DPS
/// instead of allowing this entire 800 DPS to be multiplied by heat weakness + heat DoT bonuses,
/// each Daybreak spear beyond the first is only affected 25% as much by weaknesses or resistances.
/// This also stops Daybreak's DPS from being utterly shafted by heat resistance.
/// As no other weapon can stack Daybroken, this has no effect on other weapons (they count as "1 Daybreak spear")
/// </summary>
/// <param name="npc"></param>
/// <param name="buffType"></param>
/// <param name="buffIndex"></param>
/// <param name="damage"></param>
public static void DaybrokenRegen(NPC npc, int buffType, ref int buffIndex, ref int damage)
{
var cnpc = npc.Calamity();
int numImpaledSpears = 0;
for (int k = 0; k < Main.maxProjectiles; k++)
{
if (Main.projectile[k].active && Main.projectile[k].type == ProjectileID.Daybreak && Main.projectile[k].ai[0] == 1f && Main.projectile[k].ai[1] == npc.whoAmI)
numImpaledSpears++;
}
// If there are no Daybreak impaled spears, Daybroken has 1x potency (it was applied some other way)
float daybrokenMultiplier = numImpaledSpears <= 1 ? 1f : (1f + 0.25f * (numImpaledSpears - 1));
int adjustedSpears = Math.Max(1, numImpaledSpears);
int baseDaybreakDoTValue = (int)(npc.Calamity().ActiveHeatDebuffMultiplier.ApplyTo(Daybroken.EnemyLostRegen * adjustedSpears) + npc.Calamity().ActiveHeatDebuffMultiplier.ApplyTo(Daybroken.EnemyLostRegen * 0.25f * (adjustedSpears - 1)));
var totalDPSAdjusted = baseDaybreakDoTValue - Daybroken.EnemyVanillaRegenToCancelOut*numImpaledSpears;
if (numImpaledSpears == 0)
{
totalDPSAdjusted -= Daybroken.EnemyVanillaRegenToCancelOut;
}
npc.Calamity().ApplyDPSDebuff((int)(totalDPSAdjusted), (int)Math.Max(baseDaybreakDoTValue * Daybroken.MultiplierDamageTickSize, Daybroken.MinimumDamageTickSize), ref npc.lifeRegen, ref damage);
}
/// <summary>
/// Apply Oiled DoT.
/// </summary>
public static void OiledNPCMethod(NPC npc, int buffType, ref int buffIndex, ref int damage)
{
var cnpc = npc.Calamity();
double totalDPS = ApplyScalingToStatModifer(cnpc.ActiveHeatDebuffMultiplier,Oiled.HeatDebuffScaling).ApplyTo(Oiled.EnemyLostRegen);
if (totalDPS <= 0)
return;
npc.Calamity().ApplyDPSDebuff((int)(totalDPS), damage+(int)Math.Max(totalDPS * Oiled.MultiplierDamageTickSize, Oiled.MinimumDamageTickSize), ref npc.lifeRegen, ref damage);
}
/// <summary>
/// Has Dryad's Bane scale with Calamity's town NPC buffs
/// </summary>
public static void DryadsBaneNPCMethod(NPC npc, int buffType, ref int buffIndex, ref int damage)
{
// Buffs match 1:1 with Town NPC buffs
// See CalamityGlobalTownNPC: BuffTownNPC
float buffedDryadsBaneMult = 0f +
(NPC.downedMoonlord ? 0.6f : 0f) +
(DownedBossSystem.downedProvidence ? 0.2f : 0f) +
(DownedBossSystem.downedPolterghast ? 0.2f : 0f) +
(DownedBossSystem.downedDoG ? 0.2f : 0f) +
(DownedBossSystem.downedYharon ? 0.2f : 0f) +
(DownedBossSystem.downedExoMechs ? 0.6f : 0f) +
(DownedBossSystem.downedCalamitas ? 0.6f : 0f);
if (Main.expertMode)
buffedDryadsBaneMult *= Main.GameModeInfo.TownNPCDamageMultiplier;
int buffedDryadsBaneDoTValue = 2 * (int)(4 * buffedDryadsBaneMult);
npc.lifeRegen -= buffedDryadsBaneDoTValue;
// Scales damage tick if greater than the vanilla amount
float vanillaDryadsBaneMult = 1f +
(NPC.downedBoss1 ? 0.1f : 0f) +
(NPC.downedBoss2 ? 0.1f : 0f) +
(NPC.downedBoss3 ? 0.1f : 0f) +
(NPC.downedQueenBee ? 0.1f : 0f) +
(Main.hardMode ? 0.4f : 0f) +
(NPC.downedMechBoss1 ? 0.15f : 0f) +
(NPC.downedMechBoss1 ? 0.15f : 0f) +
(NPC.downedMechBoss1 ? 0.15f : 0f) +
(NPC.downedPlantBoss ? 0.15f : 0f) +
(NPC.downedGolemBoss ? 0.15f : 0f) +
(NPC.downedAncientCultist ? 0.15f : 0f);
if (Main.expertMode)
vanillaDryadsBaneMult *= Main.GameModeInfo.TownNPCDamageMultiplier;
int totalDryadsBaneDoTValue = 2 * (int)(4 * vanillaDryadsBaneMult) + buffedDryadsBaneDoTValue;
if (damage < totalDryadsBaneDoTValue / 6)
damage = totalDryadsBaneDoTValue / 6;
}
#endregion
#endregion
#region Vanilla debuff stats
public static DebuffData OnFire = new DebuffData()
{
EnemyLostRegen = 12,
EnemyVanillaRegenToCancelOut = 12,
HeatDebuffScaling = 1
};
public static DebuffData Hellfire = new DebuffData()
{
EnemyLostRegen = 30,
EnemyVanillaRegenToCancelOut = 30,
HeatDebuffScaling = 1
};
public static DebuffData CursedInferno = new DebuffData()
{
EnemyLostRegen = 48,
EnemyVanillaRegenToCancelOut = 48,
HeatDebuffScaling = 1
};
public static DebuffData Shadowflame = new DebuffData()
{
EnemyLostRegen = 60,
EnemyVanillaRegenToCancelOut = 60,
HeatDebuffScaling = 1
};
public static DebuffData Daybroken = new DebuffData()
{
EnemyLostRegen = 200,
EnemyVanillaRegenToCancelOut = 200,
HeatDebuffScaling = 1,
NPCLifeRegenMethod = DaybrokenRegen
};
public static DebuffData Frostburn = new DebuffData()
{
EnemyLostRegen = 16,
EnemyVanillaRegenToCancelOut = 16,
ColdDebuffScaling = 1
};
public static DebuffData Frostbite = new DebuffData()
{
EnemyLostRegen = 50,
EnemyVanillaRegenToCancelOut = 50,
ColdDebuffScaling = 1
};
public static DebuffData Poisoned = new DebuffData()
{
EnemyLostRegen = 12,
EnemyVanillaRegenToCancelOut = 12,
SicknessDebuffScaling = 1
};
public static DebuffData AcidVenom = new DebuffData()
{
EnemyLostRegen = 60,
EnemyVanillaRegenToCancelOut = 60,
SicknessDebuffScaling = 1
};
public static DebuffData Electrified = new DebuffData(DebuffBehavior.Electric)
{
EnemyLostRegen = 21,
EnemyVanillaRegenToCancelOut = 8,
ElectricDebuffScaling = 1
};
public static DebuffData Oiled = new DebuffData()
{
EnemyLostRegen = 50, //This is how much DPS Oiled does when applied alongside a valid debuff
EnemyVanillaRegenToCancelOut = 50,
HeatDebuffScaling = 2, //Oiled scales twice as hard with heat debuff scaling to reward debuff builds who use such a rare and difficult to apply debuff.
NPCLifeRegenMethod = OiledNPCMethod
};
public static DebuffData DryadsBane = new DebuffData()
{
EnemyLostRegen = 8, //This is not used in the method, serves as a token amount for anything that may need to interface in the future.
NPCLifeRegenMethod = DryadsBaneNPCMethod
};
#endregion
}
}
+1 -1
View File
@@ -178,7 +178,7 @@ namespace CalamityMod.Events
new Boss(NPCID.BrainofCthulhu, permittedNPCs: NPCID.Creeper),
new Boss(ModContent.NPCType<HiveMind>(), permittedNPCs: new int[] { ModContent.NPCType<DankCreeper>(), ModContent.NPCType<DarkHeart>(), ModContent.NPCType<HiveBlob>(), ModContent.NPCType<HiveBlob2>() }),
new Boss(ModContent.NPCType<HiveMind>(), permittedNPCs: new int[] { ModContent.NPCType<DankCreeper>(), ModContent.NPCType<DarkHeart>(), ModContent.NPCType<HiveBlob>() }),
new Boss(ModContent.NPCType<PerforatorHive>(), permittedNPCs: new int[] { ModContent.NPCType<PerforatorHeadLarge>(), ModContent.NPCType<PerforatorBodyLarge>(), ModContent.NPCType<PerforatorTailLarge>(),
ModContent.NPCType<PerforatorHeadMedium>(), ModContent.NPCType<PerforatorBodyMedium>(), ModContent.NPCType<PerforatorTailMedium>(), ModContent.NPCType<PerforatorHeadSmall>(),
BIN
View File
Binary file not shown.
+41
View File
@@ -0,0 +1,41 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CalamityMod.Projectiles.Boss;
using CalamityMod.UI.DraedonSummoning;
using ReLogic.Content;
using ReLogic.Graphics;
using Terraria.GameContent;
using Terraria.ModLoader;
namespace CalamityMod.Fonts
{
public class FontAssetSystem : ModSystem
{
public static readonly Dictionary<string, DynamicSpriteFont> Fonts = new() {
{ "MouseText", FontAssets.MouseText.Value },
{ "ItemStack", FontAssets.ItemStack.Value},
{ "DeathText", FontAssets.DeathText.Value },
{ "CombatText", FontAssets.CombatText[0].Value },
{ "CombatTextCrit", FontAssets.CombatText[1].Value }
};
public override void OnModLoad()
{
AddFont("Wingdings", CalamityMod.Instance.Assets.Request<DynamicSpriteFont>("Fonts/Wingdings", AssetRequestMode.ImmediateLoad).Value); //Intentionally does not have a fallback due to it already having null checks where it is utilized to prevent them from appearing
AddFont("CodebreakerDialog", CalamityMod.Instance.Assets.Request<DynamicSpriteFont>("Fonts/CodebreakerDialog", AssetRequestMode.ImmediateLoad).Value, FontAssets.MouseText.Value);
AddFont("Impact", CalamityMod.Instance.Assets.Request<DynamicSpriteFont>("Fonts/Impact", AssetRequestMode.ImmediateLoad).Value, FontAssets.CombatText[1].Value);
AddFont("Flexure", CalamityMod.Instance.Assets.Request<DynamicSpriteFont>("Fonts/Flexure", AssetRequestMode.ImmediateLoad).Value, FontAssets.CombatText[1].Value);
}
private static void AddFont(string key, DynamicSpriteFont font, DynamicSpriteFont fallback = null)
{
if (Environment.OSVersion.Platform == PlatformID.Win32NT)
Fonts.Add(key, font);
else
Fonts.Add(key, fallback);
}
}
}
BIN
View File
Binary file not shown.
+2
View File
@@ -24,6 +24,8 @@ namespace CalamityMod.Items.Accessories
CalamityPlayer modPlayer = player.Calamity();
modPlayer.corrosiveSpine = true;
player.moveSpeed += 0.05f;
modPlayer.WaterDebuffMultiplier += 0.25f;
modPlayer.SicknessDebuffMultiplier += 0.25f;
}
}
}
+5 -1
View File
@@ -23,7 +23,11 @@ namespace CalamityMod.Items.Accessories
Item.accessory = true;
}
public override void UpdateAccessory(Player player, bool hideVisual) => player.Calamity().CryoStone = true;
public override void UpdateAccessory(Player player, bool hideVisual)
{
player.Calamity().CryoStone = true;
player.Calamity().ColdDebuffMultiplier += 0.5f;
}
public override void UpdateVanity(Player player) => player.Calamity().CryoStoneVanity = true;
}
+1
View File
@@ -28,6 +28,7 @@ namespace CalamityMod.Items.Accessories
CalamityPlayer modPlayer = player.Calamity();
modPlayer.dOfTheDeep = true;
modPlayer.dOfTheDeepVisual = !hideVisual;
modPlayer.WaterDebuffMultiplier += 0.75f;
}
public override void AddRecipes()
@@ -9,7 +9,8 @@ using Terraria.ModLoader;
namespace CalamityMod.Items.Accessories
{
public class WifeinaBottle : ModItem, ILocalizedModType
[LegacyName("WifeinaBottle")]
public class ElementalinaBottle : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Accessories";
public const int ElementalDamage = 45;
@@ -28,14 +29,14 @@ namespace CalamityMod.Items.Accessories
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.sandWaifu = true;
modPlayer.sandElemental = true;
SpawnElemental(player);
}
public override void UpdateVanity(Player player)
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.sandWaifuVanity = true;
modPlayer.sandElementalVanity = true;
SpawnElemental(player);
}
@@ -43,9 +44,9 @@ namespace CalamityMod.Items.Accessories
{
if (player.whoAmI == Main.myPlayer)
{
if (player.FindBuffIndex(ModContent.BuffType<SandyWaifu>()) == -1)
if (player.FindBuffIndex(ModContent.BuffType<SandElemental>()) == -1)
{
player.AddBuff(ModContent.BuffType<SandyWaifu>(), 3600, true);
player.AddBuff(ModContent.BuffType<SandElemental>(), 3600, true);
}
if (player.ownedProjectileCounts[ModContent.ProjectileType<SandElementalMinion>()] < 1)
{
File renamed without changes.

Before

Width:  |  Height:  |  Size: 485 B

After

Width:  |  Height:  |  Size: 485 B

+6 -6
View File
@@ -34,12 +34,12 @@ namespace CalamityMod.Items.Accessories
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.cloudWaifu = true;
modPlayer.cloudElemental = true;
if (player.whoAmI == Main.myPlayer)
{
if (player.FindBuffIndex(ModContent.BuffType<CloudyWaifu>()) == -1)
if (player.FindBuffIndex(ModContent.BuffType<CloudElemental>()) == -1)
{
player.AddBuff(ModContent.BuffType<CloudyWaifu>(), 3600, true);
player.AddBuff(ModContent.BuffType<CloudElemental>(), 3600, true);
}
if (player.ownedProjectileCounts[ModContent.ProjectileType<CloudElementalMinion>()] < 1)
{
@@ -55,12 +55,12 @@ namespace CalamityMod.Items.Accessories
public override void UpdateVanity(Player player)
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.cloudWaifuVanity = true;
modPlayer.cloudElementalVanity = true;
if (player.whoAmI == Main.myPlayer)
{
if (player.FindBuffIndex(ModContent.BuffType<CloudyWaifu>()) == -1)
if (player.FindBuffIndex(ModContent.BuffType<CloudElemental>()) == -1)
{
player.AddBuff(ModContent.BuffType<CloudyWaifu>(), 3600, true);
player.AddBuff(ModContent.BuffType<CloudElemental>(), 3600, true);
}
if (player.ownedProjectileCounts[ModContent.ProjectileType<CloudElementalMinion>()] < 1)
{
+5 -5
View File
@@ -36,7 +36,7 @@ namespace CalamityMod.Items.Accessories
public override bool CanEquipAccessory(Player player, int slot, bool modded)
{
CalamityPlayer modPlayer = player.Calamity();
if (modPlayer.brimstoneWaifu || modPlayer.sandWaifu || modPlayer.sandBoobWaifu || modPlayer.cloudWaifu || modPlayer.sirenWaifu)
if (modPlayer.brimElemental || modPlayer.sandElemental || modPlayer.rareSandElemental || modPlayer.cloudElemental || modPlayer.waterElemental)
{
return false;
}
@@ -49,7 +49,7 @@ namespace CalamityMod.Items.Accessories
Lighting.AddLight((int)player.Center.X / 16, (int)player.Center.Y / 16, Main.DiscoR / 255f, Main.DiscoG / 255f, Main.DiscoB / 255f);
CalamityPlayer modPlayer = player.Calamity();
modPlayer.allWaifus = true;
modPlayer.allElementals = true;
modPlayer.elementalHeart = true;
int brimmy = ProjectileType<BrimstoneElementalMinion>();
@@ -113,7 +113,7 @@ namespace CalamityMod.Items.Accessories
public override void UpdateVanity(Player player)
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.allWaifusVanity = true;
modPlayer.allElementalsVanity = true;
// modPlayer.elementalHeart = true;
int brimmy = ProjectileType<BrimstoneElementalMinion>();
@@ -178,8 +178,8 @@ namespace CalamityMod.Items.Accessories
public override void AddRecipes()
{
CreateRecipe().
AddIngredient<WifeinaBottle>().
AddIngredient<WifeinaBottlewithBoobs>().
AddIngredient<ElementalinaBottle>().
AddIngredient<RareElementalinaBottle>().
AddIngredient<PearlofEnthrallment>().
AddIngredient<EyeoftheStorm>().
AddIngredient<RoseStone>().
+6 -6
View File
@@ -37,13 +37,13 @@ namespace CalamityMod.Items.Accessories
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.sirenWaifu = true;
modPlayer.waterElemental = true;
if (player.whoAmI == Main.myPlayer)
{
var source = player.GetSource_Accessory(Item);
if (player.FindBuffIndex(ModContent.BuffType<WaterWaifu>()) == -1)
if (player.FindBuffIndex(ModContent.BuffType<WaterElemental>()) == -1)
{
player.AddBuff(ModContent.BuffType<WaterWaifu>(), 3600, true);
player.AddBuff(ModContent.BuffType<WaterElemental>(), 3600, true);
}
if (player.ownedProjectileCounts[ModContent.ProjectileType<WaterElementalMinion>()] < 1)
{
@@ -59,13 +59,13 @@ namespace CalamityMod.Items.Accessories
public override void UpdateVanity(Player player)
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.sirenWaifuVanity = true;
modPlayer.waterElementalVanity = true;
if (player.whoAmI == Main.myPlayer)
{
var source = player.GetSource_Accessory(Item);
if (player.FindBuffIndex(ModContent.BuffType<WaterWaifu>()) == -1)
if (player.FindBuffIndex(ModContent.BuffType<WaterElemental>()) == -1)
{
player.AddBuff(ModContent.BuffType<WaterWaifu>(), 3600, true);
player.AddBuff(ModContent.BuffType<WaterElemental>(), 3600, true);
}
if (player.ownedProjectileCounts[ModContent.ProjectileType<WaterElementalMinion>()] < 1)
{
@@ -9,7 +9,8 @@ using Terraria.ModLoader;
namespace CalamityMod.Items.Accessories
{
public class WifeinaBottlewithBoobs : ModItem, ILocalizedModType
[LegacyName("WifeinaBottlewithBoobs")] // Yes, that was the actual name.
public class RareElementalinaBottle : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Accessories";
@@ -38,12 +39,12 @@ namespace CalamityMod.Items.Accessories
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.sandBoobWaifu = true;
modPlayer.rareSandElemental = true;
if (player.whoAmI == Main.myPlayer)
{
if (player.FindBuffIndex(ModContent.BuffType<SandyHealingWaifu>()) == -1)
if (player.FindBuffIndex(ModContent.BuffType<RareSandElemental>()) == -1)
{
player.AddBuff(ModContent.BuffType<SandyHealingWaifu>(), 3600, true);
player.AddBuff(ModContent.BuffType<RareSandElemental>(), 3600, true);
}
if (player.ownedProjectileCounts[ModContent.ProjectileType<SandElementalHealer>()] < 1)
{
@@ -59,12 +60,12 @@ namespace CalamityMod.Items.Accessories
public override void UpdateVanity(Player player)
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.sandBoobWaifuVanity = true;
modPlayer.rareSandElementalVanity = true;
if (player.whoAmI == Main.myPlayer)
{
if (player.FindBuffIndex(ModContent.BuffType<SandyHealingWaifu>()) == -1)
if (player.FindBuffIndex(ModContent.BuffType<RareSandElemental>()) == -1)
{
player.AddBuff(ModContent.BuffType<SandyHealingWaifu>(), 3600, true);
player.AddBuff(ModContent.BuffType<RareSandElemental>(), 3600, true);
}
if (player.ownedProjectileCounts[ModContent.ProjectileType<SandElementalHealer>()] < 1)
{
File renamed without changes.

Before

Width:  |  Height:  |  Size: 472 B

After

Width:  |  Height:  |  Size: 472 B

+6 -6
View File
@@ -35,13 +35,13 @@ namespace CalamityMod.Items.Accessories
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.brimstoneWaifu = true;
modPlayer.brimElemental = true;
if (player.whoAmI == Main.myPlayer)
{
var source = player.GetSource_Accessory(Item);
if (player.FindBuffIndex(ModContent.BuffType<BrimstoneWaifu>()) == -1)
if (player.FindBuffIndex(ModContent.BuffType<BrimstoneElemental>()) == -1)
{
player.AddBuff(ModContent.BuffType<BrimstoneWaifu>(), 3600, true);
player.AddBuff(ModContent.BuffType<BrimstoneElemental>(), 3600, true);
}
if (player.ownedProjectileCounts[ModContent.ProjectileType<BrimstoneElementalMinion>()] < 1)
{
@@ -58,13 +58,13 @@ namespace CalamityMod.Items.Accessories
public override void UpdateVanity(Player player)
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.brimstoneWaifuVanity = true;
modPlayer.brimElementalVanity = true;
if (player.whoAmI == Main.myPlayer)
{
var source = player.GetSource_Accessory(Item);
if (player.FindBuffIndex(ModContent.BuffType<BrimstoneWaifu>()) == -1)
if (player.FindBuffIndex(ModContent.BuffType<BrimstoneElemental>()) == -1)
{
player.AddBuff(ModContent.BuffType<BrimstoneWaifu>(), 3600, true);
player.AddBuff(ModContent.BuffType<BrimstoneElemental>(), 3600, true);
}
if (player.ownedProjectileCounts[ModContent.ProjectileType<BrimstoneElementalMinion>()] < 1)
{
+1
View File
@@ -25,6 +25,7 @@ namespace CalamityMod.Items.Accessories
CalamityPlayer modPlayer = player.Calamity();
modPlayer.sSpiritAmulet = true;
modPlayer.sSpiritAmuletVisual = !hideVisual;
modPlayer.WaterDebuffMultiplier += 0.35f;
}
}
}
+5
View File
@@ -38,6 +38,11 @@ namespace CalamityMod.Items.Accessories
modPlayer.amalgam = true;
player.brainOfConfusionItem = Item;
player.GetDamage<GenericDamageClass>() += 0.1f;
modPlayer.HeatDebuffMultiplier += 2f;
modPlayer.ColdDebuffMultiplier += 2f;
modPlayer.SicknessDebuffMultiplier += 2f;
modPlayer.WaterDebuffMultiplier += 2f;
modPlayer.ElectricDebuffMultiplier += 2f;
}
public override void AddRecipes()
+1
View File
@@ -28,6 +28,7 @@ namespace CalamityMod.Items.Accessories
CalamityPlayer modPlayer = player.Calamity();
modPlayer.toxicHeart = true;
modPlayer.toxicHeartVisuals = !hideVisual;
modPlayer.SicknessDebuffMultiplier += 0.5f;
}
}
}
+9 -3
View File
@@ -1,6 +1,7 @@
using CalamityMod.Items.Materials;
using Terraria;
using Terraria.ID;
using Terraria.Localization;
using Terraria.ModLoader;
namespace CalamityMod.Items.Armor.Brimflame
@@ -9,19 +10,24 @@ namespace CalamityMod.Items.Armor.Brimflame
public class BrimflameBoots : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Armor.Hardmode";
public static float MagicDamageBoost = 0.05f;
public static float MoveSpeedBoost = 0.05f;
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MagicDamageBoost.ToPercent(), MoveSpeedBoost.ToPercent());
public override void SetDefaults()
{
Item.width = 18;
Item.height = 18;
Item.value = CalamityGlobalItem.RarityLimeBuyPrice;
Item.rare = ItemRarityID.Lime;
Item.defense = 15;
Item.defense = 13;
}
public override void UpdateEquip(Player player)
{
player.moveSpeed += 0.05f;
player.GetDamage<MagicDamageClass>() += 0.05f;
player.GetDamage<MagicDamageClass>() += MagicDamageBoost;
player.moveSpeed += MoveSpeedBoost;
player.fireWalk = true;
}
+79
View File
@@ -0,0 +1,79 @@
using System;
using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.CalPlayer;
using CalamityMod.Cooldowns;
using CalamityMod.Items.Materials;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.Audio;
using Terraria.ID;
using Terraria.Localization;
using Terraria.ModLoader;
namespace CalamityMod.Items.Armor.Brimflame
{
[AutoloadEquip(EquipType.Head)]
[LegacyName("BrimflameScowl")]
public class BrimflameCowl : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Armor.Hardmode";
public static readonly SoundStyle ActivationSound = new("CalamityMod/Sounds/Custom/AbilitySounds/BrimflameAbility");
public static int MaxManaBoost = 80;
public static float ManaCostReduction = 0.1f;
public static float MagicDamageBoost = 0.1f;
public static int MagicCritBoost = 10; // NOTE: Tooltip shares this number with damage % as they're equal
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MaxManaBoost, ManaCostReduction.ToPercent(), MagicDamageBoost.ToPercent());
// Set Bonus
public static float SetBonusMagicDamageBoost = 0.08f;
public static int SetBonusMagicCritBoost = 8; // NOTE: Tooltip shares this number with damage % as they're equal
public static float FrenzyMagicDamageBoost = 0.4f;
public static int FrenzyDuration = CalamityUtils.SecondsToFrames(10);
public static int FrenzyCooldown = CalamityUtils.SecondsToFrames(30);
public override void SetDefaults()
{
Item.width = 18;
Item.height = 18;
Item.value = CalamityGlobalItem.RarityLimeBuyPrice;
Item.rare = ItemRarityID.Lime;
Item.defense = 12;
}
public override void UpdateEquip(Player player)
{
player.GetDamage<MagicDamageClass>() += MagicDamageBoost;
player.GetCritChance<MagicDamageClass>() += MagicCritBoost;
player.statManaMax2 += MaxManaBoost;
player.manaCost -= ManaCostReduction;
player.buffImmune[ModContent.BuffType<BrimstoneFlames>()] = true;
player.buffImmune[BuffID.OnFire] = true;
player.buffImmune[BuffID.Frostburn] = true;
}
public override bool IsArmorSet(Item head, Item body, Item legs) => body.type == ModContent.ItemType<BrimflameRobes>() && legs.type == ModContent.ItemType<BrimflameBoots>();
public override void ArmorSetShadows(Player player) => player.armorEffectDrawShadowSubtle = true;
public override void UpdateArmorSet(Player player)
{
var modPlayer = player.Calamity();
modPlayer.brimflameSet = true;
player.GetDamage<MagicDamageClass>() += SetBonusMagicDamageBoost;
player.GetCritChance<MagicDamageClass>() += SetBonusMagicCritBoost;
Color AbilityBriefColor = Color.Lerp(new Color(250, 202, 140), new Color(227, 79, 79), 0.5f + 0.5f * MathF.Sin(Main.GlobalTimeWrappedHourly * 3f));
player.setBonus = this.GetLocalization("SetBonus").Format(SetBonusMagicDamageBoost.ToPercent(), AbilityBriefColor.Hex3(), CalamityUtils.GetArmorSetBonusKey(), FrenzyDuration.FramesToSeconds(), FrenzyMagicDamageBoost.ToPercent(), FrenzyCooldown.FramesToSeconds());
}
public override void AddRecipes()
{
CreateRecipe().
AddIngredient<AshesofCalamity>(4).
AddIngredient<UnholyCore>(2).
AddTile(TileID.MythrilAnvil).
SortBeforeFirstRecipesOf(ModContent.ItemType<BrimflameBoots>()).
Register();
}
}
}
File renamed without changes.

Before

Width:  |  Height:  |  Size: 593 B

After

Width:  |  Height:  |  Size: 593 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Loaded 100 of 321 files, more files were not shown because too many files have changed in this diff. Show more