Merge branch '1.4.4' into the-yhar-flat

This commit is contained in:
CongratsIsTrash committed 2025-08-05 00:14:17 -04:00
commit b79e452d55
1141 files changed
+10243 -9022

No files matched your search

+49
View File
@@ -56,6 +56,55 @@ namespace CalamityMod.Backgrounds
}
}
}
if (!Main.dedServ && (Main.LocalPlayer.InModBiome(ModContent.GetInstance<BiomeManagers.TimelessShoresBiome>())))
{
int drawLimitX = Main.screenWidth / 16;
int drawLimitY = Main.screenHeight / 16;
Point drawPoint = (Main.screenPosition / 16).ToPoint();
for (int i = 0; i < drawLimitX; i++)
{
for (int j = 0; j < drawLimitY; j++)
{
Point pos = drawPoint + new Point(i, j);
if (!Main.tile[pos.X, pos.Y].HasTile &&
Main.tile[pos.X, pos.Y].WallType == 0 &&
Main.tile[pos.X, pos.Y].LiquidAmount == 0)
Lighting.AddLight(pos.X, pos.Y, TorchID.White, 0.2f);
}
}
}
if (!Main.dedServ && (Main.LocalPlayer.InModBiome(ModContent.GetInstance<BiomeManagers.PolypForestBiome>())))
{
int drawLimitX = Main.screenWidth / 16;
int drawLimitY = Main.screenHeight / 16;
Point drawPoint = (Main.screenPosition / 16).ToPoint();
for (int i = 0; i < drawLimitX; i++)
{
for (int j = 0; j < drawLimitY; j++)
{
Point pos = drawPoint + new Point(i, j);
if (!Main.tile[pos.X, pos.Y].HasTile &&
Main.tile[pos.X, pos.Y].WallType == 0)
Lighting.AddLight(pos.X, pos.Y, TorchID.White, 0.2f);
}
}
}
if (!Main.dedServ && (Main.LocalPlayer.InModBiome(ModContent.GetInstance<BiomeManagers.RadiantReefsBiome>())))
{
int drawLimitX = Main.screenWidth / 16;
int drawLimitY = Main.screenHeight / 16;
Point drawPoint = (Main.screenPosition / 16).ToPoint();
for (int i = 0; i < drawLimitX; i++)
{
for (int j = 0; j < drawLimitY; j++)
{
Point pos = drawPoint + new Point(i, j);
if (!Main.tile[pos.X, pos.Y].HasTile &&
Main.tile[pos.X, pos.Y].WallType == 0)
Lighting.AddLight(pos.X, pos.Y, TorchID.White, 0.2f);
}
}
}
}
private void DrawToTarget(On_Main.orig_CheckMonoliths orig)
+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

+162 -144
View File
@@ -21,6 +21,7 @@ using CalamityMod.Items.Armor.Bloodflare;
using CalamityMod.Items.Armor.Brimflame;
using CalamityMod.Items.Armor.Daedalus;
using CalamityMod.Items.Armor.Demonshade;
using CalamityMod.Items.Armor.DesertProwler;
using CalamityMod.Items.Armor.Empyrean;
using CalamityMod.Items.Armor.LunicCorps;
using CalamityMod.Items.Armor.OmegaBlue;
@@ -28,7 +29,9 @@ using CalamityMod.Items.Armor.PlagueReaper;
using CalamityMod.Items.Armor.Silva;
using CalamityMod.Items.Armor.SnowRuffian;
using CalamityMod.Items.Armor.Victide;
using CalamityMod.Items.Armor.Wulfrum;
using CalamityMod.Items.Dyes;
using CalamityMod.Items.Materials;
using CalamityMod.Items.Mounts;
using CalamityMod.Items.Mounts.Minecarts;
using CalamityMod.Items.PermanentBoosters;
@@ -103,10 +106,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;
@@ -177,6 +176,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
@@ -301,9 +307,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;
@@ -339,10 +345,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;
@@ -408,7 +414,6 @@ namespace CalamityMod.CalPlayer
public static readonly SoundStyle RogueStealthSound = new("CalamityMod/Sounds/Custom/RogueStealth");
public static readonly SoundStyle DefenseDamageSound = new("CalamityMod/Sounds/Custom/DefenseDamage");
public static readonly SoundStyle BloodCritSound = new("CalamityMod/Sounds/Custom/BloodPactCrit");
public static readonly SoundStyle IjiDeathSound = new("CalamityMod/Sounds/Custom/IjiDies");
public static readonly SoundStyle DrownSound = new("CalamityMod/Sounds/Custom/AbyssDrown");
@@ -562,7 +567,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
@@ -769,8 +773,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;
@@ -785,10 +787,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;
@@ -805,12 +803,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;
@@ -879,7 +879,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;
@@ -931,15 +930,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;
@@ -983,16 +981,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;
@@ -1053,7 +1051,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;
@@ -1067,6 +1064,8 @@ namespace CalamityMod.CalPlayer
/// <summary> Calamity's Silver armor set bonus; taking over 20 damage heals 10 health if the player avoids damage for 2 seconds. </summary>
public bool silverMedkit = false;
public int silverMedkitTimer = 0;
/// <summary> Calamity's Tungsten armor set bonus; makes grappling hooks fly and retract faster. </summary>
public bool tungstenArmorHookBoost = false;
/// <summary> Calamity's Gold armor set bonus; makes enemies drop Gold Coins. </summary>
public bool goldArmorGoldDrops = false;
/// <summary> Calamity's Mining armor set bonus; gives a chance for extra items to drop when mining ores. </summary>
@@ -1184,8 +1183,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;
@@ -1248,25 +1247,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;
@@ -1277,9 +1276,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;
@@ -1289,9 +1288,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;
@@ -1448,21 +1447,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;
@@ -2217,8 +2216,6 @@ namespace CalamityMod.CalPlayer
cryogenSoul = false;
ascendantInsignia = false;
ascendantTrail = false;
frozenWingsCold = false;
flameWingsHeat = false;
magmaStoneVisuals = true;
eGauntlet = false;
eGauntletVisuals = true;
@@ -2306,7 +2303,6 @@ namespace CalamityMod.CalPlayer
scionsCurio = false;
rottenDogTooth = false;
angelicAlliance = false;
BloomStoneRegen = false;
ChaosStone = false;
CryoStone = false;
CryoStoneVanity = false;
@@ -2362,6 +2358,7 @@ namespace CalamityMod.CalPlayer
forbiddenCirclet = false;
silverMedkit = false;
tungstenArmorHookBoost = false;
goldArmorGoldDrops = false;
miningSet = false;
@@ -2444,26 +2441,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;
@@ -2473,9 +2470,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;
@@ -2485,13 +2482,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;
@@ -2535,8 +2539,6 @@ namespace CalamityMod.CalPlayer
bloodfinBoost = false;
divineBless = false;
killSpikyBalls = false;
vodka = false;
redWine = false;
grapeBeer = false;
@@ -2595,11 +2597,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;
@@ -2613,18 +2615,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;
@@ -2725,7 +2727,6 @@ namespace CalamityMod.CalPlayer
rageModeActive = false;
adrenalineModeActive = false;
AdrenalineTrail = false;
RageDuration = BalancingConstants.DefaultRageDuration;
RageDamageBoost = BalancingConstants.DefaultRageDamageBoost;
@@ -2771,14 +2772,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
@@ -2841,10 +2840,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;
@@ -2888,11 +2887,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;
@@ -2903,26 +2900,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;
@@ -2932,9 +2929,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;
@@ -2944,13 +2941,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
@@ -3071,6 +3074,7 @@ namespace CalamityMod.CalPlayer
#region Armor Set Bonuses
silverMedkit = false;
silverMedkitTimer = 0;
tungstenArmorHookBoost = false;
goldArmorGoldDrops = false;
miningSet = false;
miningSetCooldown = 0;
@@ -3087,7 +3091,7 @@ namespace CalamityMod.CalPlayer
silvaMage = false;
silvaSummon = false;
hasSilvaEffect = false;
silvaCountdown = silvaReviveDuration;
silvaCountdown = SilvaReviveDuration;
auricSet = false;
GemTechSet = false;
CobaltSet = false;
@@ -3204,8 +3208,6 @@ namespace CalamityMod.CalPlayer
CurrentlyViewedHologramText = string.Empty;
#endregion
KameiBladeUseDelay = 0;
AdrenalineTrail = false;
ascendantTrail = false;
evilSmasherBoost = 0;
burningSeaBurnOut = 0;
@@ -3519,19 +3521,16 @@ namespace CalamityMod.CalPlayer
{
PlayerLoader.ArmorSetBonusActivated(Player);
if (CalamityClientConfig.Instance.CalamityArmorSetBonusDoubleTap)
// Activate vanilla set bonuses
if (Player.setVortex && !Player.mount.Active)
Player.vortexStealthActive = !Player.vortexStealthActive;
if (Player.setForbidden)
{
// Activate vanilla set bonuses
if (Player.setVortex && !Player.mount.Active)
Player.vortexStealthActive = !Player.vortexStealthActive;
Player.MinionRestTargetAim();
if (Player.setForbidden)
{
Player.MinionRestTargetAim();
if (!Player.setForbiddenCooldownLocked)
Player.CommandForbiddenStorm();
}
if (!Player.setForbiddenCooldownLocked)
Player.CommandForbiddenStorm();
}
}
@@ -3744,10 +3743,6 @@ namespace CalamityMod.CalPlayer
public override void ArmorSetBonusActivated()
{
// Don't trigger set bonuses if the config is disabled and the double-tap hotkey was triggered
if (!(CalamityKeybinds.ArmorSetBonusHotKey.JustPressed || CalamityClientConfig.Instance.CalamityArmorSetBonusDoubleTap))
return;
// TODO -- It would be nice if triggerable set bonuses used interfaces instead of having to go through this large if chain.
if (brimflameSet && !Player.HasCooldown(BrimflameFrenzy.ID))
{
@@ -3755,14 +3750,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);
@@ -3916,6 +3910,30 @@ namespace CalamityMod.CalPlayer
}
if (prismaticSet && !Player.HasCooldown(PrismaticLaser.ID) && prismaticLasers <= 0)
prismaticLasers = CalamityUtils.SecondsToFrames(35f);
if (WulfrumHat.HasArmorSet(Player))
{
//Only activate if no cooldown & available scrap.
if (cooldowns.TryGetValue(WulfrumBastion.ID, out CooldownInstance cd))
{
// Quick dismount if activated again
if (cd.timeLeft > WulfrumHat.BastionCooldown && cd.timeLeft < WulfrumHat.BastionCooldown + WulfrumHat.BastionTime - 60 * 3)
{
cd.timeLeft = WulfrumHat.BastionCooldown + 1;
SyncCooldownDictionary(false);
}
}
else if (Player.HasItem(ItemType<WulfrumMetalScrap>()))
{
Player.ConsumeItem(ItemType<WulfrumMetalScrap>());
//I Thiiiinnnk there's no need to add mp syncing packets since cooldowns get auto synced right
Player.AddCooldown(WulfrumBastion.ID, WulfrumHat.BastionCooldown + WulfrumHat.BastionTime);
//Though do I need to sync that or is the player inventory auto synced?
WulfrumHat.DummyCannon.SetDefaults(ItemType<WulfrumFusionCannon>());
}
}
if (DesertProwlerHat.HasArmorSet(Player) && !Player.HasCooldown(SandsmokeBomb.ID))
Player.AddCooldown(SandsmokeBomb.ID, DesertProwlerHat.SmokeCooldown + DesertProwlerHat.SmokeDuration);
}
#endregion
@@ -4584,7 +4602,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;
}
@@ -4746,10 +4764,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);
@@ -4894,7 +4912,7 @@ namespace CalamityMod.CalPlayer
{
if (!Player.mount.Active)
{
Player.velocity.Y *= 0.9f;
Player.velocity.Y *= SnowRuffianMask.GlideFallSpeedMult;
Player.wingFrame = 3;
}
Player.noFallDmg = true;
@@ -5182,7 +5200,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
@@ -199,10 +199,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);
@@ -211,7 +211,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
@@ -230,17 +230,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
@@ -260,10 +260,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)
@@ -319,7 +319,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))
{
+75 -77
View File
@@ -17,6 +17,7 @@ using CalamityMod.Items.Armor.Aerospec;
using CalamityMod.Items.Armor.Demonshade;
using CalamityMod.Items.Armor.LunicCorps;
using CalamityMod.Items.Armor.Silva;
using CalamityMod.Items.Armor.Sulphurous;
using CalamityMod.Items.Armor.Wulfrum;
using CalamityMod.Items.Mounts;
using CalamityMod.Items.Placeables.Furniture;
@@ -31,6 +32,7 @@ using CalamityMod.NPCs.Other;
using CalamityMod.NPCs.ProfanedGuardians;
using CalamityMod.NPCs.Providence;
using CalamityMod.NPCs.SupremeCalamitas;
using CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses;
using CalamityMod.Particles;
using CalamityMod.Projectiles.Melee;
using CalamityMod.Projectiles.Ranged;
@@ -244,7 +246,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)
{
@@ -292,10 +294,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;
@@ -377,7 +379,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));
}
@@ -408,11 +410,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));
}
@@ -424,7 +426,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));
}
@@ -444,23 +446,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));
}
@@ -703,7 +705,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;
}
}
@@ -718,7 +720,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)
@@ -733,7 +735,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)
@@ -746,9 +748,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)
@@ -761,9 +763,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)
@@ -776,9 +778,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)
@@ -809,7 +811,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)
@@ -874,7 +876,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;
@@ -913,7 +915,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);
@@ -1015,7 +1017,7 @@ namespace CalamityMod.CalPlayer
if (Player.Calamity().trapProtection && isReducedTrap)
modifiers.SourceDamage *= 0.35f;
// Reduce damage dealt by rainbow trails depending on how faded they are.
// Reduce damage dealt by rainbow trails
if (proj.type == ProjectileID.HallowBossLastingRainbow)
{
// Find the oldPos of the projectile that is intersecting the player hitbox.
@@ -1030,11 +1032,10 @@ namespace CalamityMod.CalPlayer
hitbox.X = (int)trailHitbox.X;
hitbox.Y = (int)trailHitbox.Y;
// Adjust damage based on what part of the trail intersected the player hitbox.
if (hitbox.Intersects(Player.Hitbox))
{
if (k > startOfDamageFalloff)
modifiers.SourceDamage *= MathHelper.Lerp(0.4f, 1f, 1f - (k - startOfDamageFalloff) / (float)(trailLength - startOfDamageFalloff));
modifiers.SourceDamage *= EmpressofLightAI.EverlastingRainbowTrailDamageMult;
break;
}
@@ -1053,7 +1054,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))
@@ -1134,7 +1135,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;
@@ -1300,7 +1301,7 @@ namespace CalamityMod.CalPlayer
if (Main.npc[proj.Calamity().ParentNPCIndex].active)
{
if (sulphurSet)
Main.npc[proj.Calamity().ParentNPCIndex].AddBuff(BuffID.Poisoned, 60);
Main.npc[proj.Calamity().ParentNPCIndex].AddBuff(BuffID.Poisoned, SulphurousHelmet.SetBonusPoisonDuration);
if (ilSpark)
Main.npc[proj.Calamity().ParentNPCIndex].Calamity().shocked = 120;
}
@@ -1363,54 +1364,10 @@ namespace CalamityMod.CalPlayer
{
Player.AddBuff(BuffID.BrokenArmor, 600);
}
else if (proj.type == ProjectileID.CursedFlameHostile || proj.type == ProjectileID.EyeFire)
{
// Guaranteed Cursed Inferno for 1 second (vanilla also has a 68.75% chance of Cursed Inferno for 2 to 3 seconds)
Player.AddBuff(BuffID.CursedInferno, 60);
}
else if (proj.type == ProjectileID.DesertDjinnCurse)
{
Player.AddBuff(BuffID.Cursed, 180);
}
else if (proj.type == ProjectileID.ThornBall)
{
Player.AddBuff(BuffID.Poisoned, 420);
}
else if (proj.type == ProjectileID.CultistBossFireBall)
{
Player.AddBuff(ModContent.BuffType<Daybroken>(), 180);
}
else if (proj.type == ProjectileID.CultistBossIceMist)
{
if (!Player.frozen)
Player.AddBuff(BuffID.Frozen, 60);
Player.AddBuff(BuffID.Chilled, 180);
}
else if (proj.type == ProjectileID.CultistBossLightningOrbArc)
{
Player.AddBuff(BuffID.Electrified, 180);
}
else if (proj.type == ProjectileID.AncientDoomProjectile)
{
Player.AddBuff(ModContent.BuffType<Shadowflame>(), 120);
}
else if (proj.type == ProjectileID.CultistBossFireBallClone)
{
Player.AddBuff(ModContent.BuffType<Shadowflame>(), 180);
}
else if (proj.type == ProjectileID.PhantasmalBolt || proj.type == ProjectileID.PhantasmalEye)
{
Player.AddBuff(ModContent.BuffType<Nightwither>(), 120);
}
else if (proj.type == ProjectileID.PhantasmalSphere)
{
Player.AddBuff(ModContent.BuffType<Nightwither>(), 210);
}
else if (proj.type == ProjectileID.PhantasmalDeathray)
{
Player.AddBuff(ModContent.BuffType<Nightwither>(), 300);
}
else if (proj.type == ProjectileID.BloodNautilusShot)
{
Player.AddBuff(ModContent.BuffType<BurningBlood>(), 240);
@@ -1423,10 +1380,51 @@ namespace CalamityMod.CalPlayer
{
Player.AddBuff(ModContent.BuffType<MiracleBlight>(), 600);
}
if (CalamityWorld.revenge)
{
if (proj.type == ProjectileID.CursedFlameHostile || proj.type == ProjectileID.EyeFire)
{
// Guaranteed Cursed Inferno for 1 second (vanilla also has a 68.75% chance of Cursed Inferno for 2 to 3 seconds)
Player.AddBuff(BuffID.CursedInferno, 60);
}
else if (proj.type == ProjectileID.ThornBall)
{
Player.AddBuff(BuffID.Venom, 120);
}
else if (proj.type == ProjectileID.CultistBossFireBall)
{
Player.AddBuff(ModContent.BuffType<Daybroken>(), 180);
}
else if (proj.type == ProjectileID.CultistBossIceMist && proj.ai[1] == 1f) // Main ice mists only; no shards
{
Player.AddBuff(BuffID.Chilled, 180);
}
else if (proj.type == ProjectileID.CultistBossLightningOrbArc)
{
Player.AddBuff(BuffID.Electrified, 180);
}
else if (proj.type == ProjectileID.CultistBossFireBallClone)
{
Player.AddBuff(ModContent.BuffType<Shadowflame>(), 240);
}
else if (proj.type == ProjectileID.PhantasmalBolt || proj.type == ProjectileID.PhantasmalEye)
{
Player.AddBuff(ModContent.BuffType<Nightwither>(), 120);
}
else if (proj.type == ProjectileID.PhantasmalSphere)
{
Player.AddBuff(ModContent.BuffType<Nightwither>(), 180);
}
else if (proj.type == ProjectileID.PhantasmalDeathray)
{
Player.AddBuff(ModContent.BuffType<Nightwither>(), 240);
}
}
}
// 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);
@@ -2550,13 +2548,13 @@ namespace CalamityMod.CalPlayer
if (!canTriggerHitEffects)
return;
if (aeroSet && hurtInfo.Damage > 25)
if (aeroSet && hurtInfo.Damage > AerospecBreastplate.SetBonusHurtDamageThreshold)
{
// https://github.com/tModLoader/tModLoader/wiki/IEntitySource#detailed-list
var source = Player.GetSource_OnHurt(hurtInfo.DamageSource, AerospecBreastplate.FeatherEntitySourceContext);
for (int n = 0; n < 4; n++)
{
int featherDamage = (int)Player.GetBestClassDamage().ApplyTo(30);
int featherDamage = (int)Player.GetBestClassDamage().ApplyTo(AerospecBreastplate.SetBonusFeatherDamage);
CalamityUtils.ProjectileRain(source, Player.Center, 400f, 100f, 500f, 800f, 20f, ModContent.ProjectileType<StickyFeatherAero>(), featherDamage, 1f, Player.whoAmI);
}
+21 -30
View File
@@ -97,41 +97,41 @@ 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
ApplyDoTDebuff(trueVHex, 50);
int dragonfireDoT = ((Player.name == "JFL" || Player.name == "MrJFL") ? 240 : 50) / (dynamoStemCells ? 2 : 1);
int dragonfireDoT = ((Player.name == "JFL" || Player.name == "MrJFL") ? 200 : 50) / (dynamoStemCells ? 2 : 1);
ApplyDoTDebuff(dragonFire, dragonfireDoT);
ApplyDoTDebuff(miracleBlight, 60);
ApplyDoTDebuff(banishingFire, 60); // 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;
+128 -82
View File
@@ -17,6 +17,7 @@ using CalamityMod.ExtraTextures;
using CalamityMod.Items;
using CalamityMod.Items.Accessories;
using CalamityMod.Items.Ammo;
using CalamityMod.Items.Armor.Aerospec;
using CalamityMod.Items.Armor.Bloodflare;
using CalamityMod.Items.Armor.Brimflame;
using CalamityMod.Items.Armor.DesertProwler;
@@ -201,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++;
@@ -221,11 +222,6 @@ namespace CalamityMod.CalPlayer
// Apply stealth damage to rogue.
Player.GetDamage<RogueDamageClass>() += stealthDamage;
//Slow the player down after any other speed modifiers might have been applied.
//Todo - Move this back to the wulfrum set class whenever statmodifiers are implemented for stats other than damage
if (WulfrumHat.PowerModeEngaged(Player, out _))
Player.moveSpeed *= 0.8f;
if ((XykVisualsBlue || XykVisualsOrange))
{
bool Orange = XykVisualsOrange;
@@ -294,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)
@@ -627,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;
}
}
@@ -914,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++)
@@ -947,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++)
@@ -1142,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]--;
}
}
@@ -1156,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.
@@ -1177,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);
}
@@ -1203,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--;
@@ -1293,18 +1300,16 @@ namespace CalamityMod.CalPlayer
if (!Player.wet)
{
if (aeroSet)
Player.maxFallSpeed = 15f;
Player.maxFallSpeed = AerospecBreastplate.SetBonusFallSpeed;
if (Player.PortalPhysicsEnabled)
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)
@@ -1325,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;
}
@@ -1530,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--;
@@ -1872,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)
{
@@ -2035,8 +2069,6 @@ namespace CalamityMod.CalPlayer
phantomicHeartRegen--;
if (phantomicBulwarkCooldown > 0)
phantomicBulwarkCooldown--;
if (KameiBladeUseDelay > 0)
KameiBladeUseDelay--;
if (galileoCooldown > 0)
galileoCooldown--;
if (gladiatorTimer > 0)
@@ -2078,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)
@@ -2097,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;
@@ -2138,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)
@@ -2297,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
@@ -2369,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;
@@ -2449,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;
}
}
@@ -2499,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;
@@ -2582,7 +2628,7 @@ namespace CalamityMod.CalPlayer
// Permafrost's Concoction bonuses/debuffs
if (permafrostsConcoction)
{
Player.manaCost *= 0.85f;
Player.manaCost -= 0.15f;
Player.statManaMax2 += 50;
}
@@ -2772,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)
{
@@ -2978,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)
@@ -2991,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);
}
}
@@ -3149,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))
{
@@ -3514,7 +3560,7 @@ namespace CalamityMod.CalPlayer
if (starBeamRye)
{
Player.GetDamage<MagicDamageClass>() += StarBeamRye.MagicDamageBoost;
Player.manaCost *= (1f - StarBeamRye.ManaCostReduction);
Player.manaCost -= StarBeamRye.ManaCostReduction;
Player.statManaMax2 += StarBeamRye.MaxManaBoost;
}
@@ -3545,7 +3591,7 @@ namespace CalamityMod.CalPlayer
}
}
if (HighTestFishingPoleList.Includes(Player.ActiveItem().type))
if (CalamityItemSets.FishingPoleThatNeverBreaks[Player.ActiveItem().type])
Player.accFishingLine = true;
if (planarSpeedBoost != 0)
@@ -3654,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;
@@ -3977,7 +4023,7 @@ namespace CalamityMod.CalPlayer
if (eArtifact)
{
Player.manaCost *= 0.75f;
Player.manaCost -= 0.25f;
Player.maxMinions++;
}
@@ -4318,7 +4364,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)
{
@@ -4335,7 +4381,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;
}
}
@@ -4410,7 +4456,7 @@ namespace CalamityMod.CalPlayer
break;
case BuffID.Confused:
Player.confused = false;
Player.statDefense += 10;
Player.statDefense += 15;
break;
case BuffID.Cursed:
Player.cursed = false;
@@ -4828,7 +4874,7 @@ namespace CalamityMod.CalPlayer
}
if (DesertProwlerHat.ShroudedInSmoke(Player, out _))
Player.statDefense -= (int)(Player.statDefense * 0.75);
Player.statDefense -= (int)(Player.statDefense * DesertProwlerHat.SmokeDefenseMult);
}
#endregion
+16 -26
View File
@@ -8,7 +8,10 @@ using CalamityMod.Buffs.StatDebuffs;
using CalamityMod.Cooldowns;
using CalamityMod.Dusts;
using CalamityMod.Items.Accessories;
using CalamityMod.Items.Armor.Astral;
using CalamityMod.Items.Armor.Reaver;
using CalamityMod.Items.Armor.SnowRuffian;
using CalamityMod.Items.Armor.Sulphurous;
using CalamityMod.Items.Fishing.AstralCatches;
using CalamityMod.Items.VanillaArmorChanges;
using CalamityMod.NPCs;
@@ -234,25 +237,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)
{
@@ -415,7 +405,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
@@ -630,7 +620,7 @@ namespace CalamityMod.CalPlayer
}
if (astralStarRain && crit && astralStarRainCooldown <= 0)
{
astralStarRainCooldown = 60;
astralStarRainCooldown = AstralHelm.StarRainCooldown;
for (int n = 0; n < 3; n++)
{
int projectileType = Utils.SelectRandom(Main.rand, new int[]
@@ -641,7 +631,7 @@ namespace CalamityMod.CalPlayer
ProjectileID.StarCannonStar
});
int astralStarDamage = (int)Player.GetBestClassDamage().ApplyTo(120);
int astralStarDamage = (int)Player.GetBestClassDamage().ApplyTo(AstralHelm.StarDamage);
Projectile star = CalamityUtils.ProjectileRain(source, position, 400f, 100f, 500f, 800f, 12f, projectileType, astralStarDamage, 5f, Player.whoAmI);
if (star.whoAmI.WithinBounds(Main.maxProjectiles))
@@ -700,7 +690,7 @@ namespace CalamityMod.CalPlayer
{
if (astralStarRain && crit && astralStarRainCooldown <= 0)
{
astralStarRainCooldown = 60;
astralStarRainCooldown = AstralHelm.StarRainCooldown;
for (int n = 0; n < 3; n++)
{
int projectileType = Utils.SelectRandom(Main.rand, new int[]
@@ -711,7 +701,7 @@ namespace CalamityMod.CalPlayer
ProjectileID.StarCannonStar
});
int astralStarDamage = (int)Player.GetBestClassDamage().ApplyTo(120);
int astralStarDamage = (int)Player.GetBestClassDamage().ApplyTo(AstralHelm.StarDamage);
Projectile star = CalamityUtils.ProjectileRain(source, position, 400f, 100f, 500f, 800f, 25f, projectileType, astralStarDamage, 5f, Player.whoAmI);
if (star.whoAmI.WithinBounds(Main.maxProjectiles))
@@ -1293,7 +1283,7 @@ namespace CalamityMod.CalPlayer
if (omegaBlueChestplate)
target.AddBuff(BuffType<HadopelagicPressure>(), 180);
if (sulphurSet)
target.AddBuff(BuffID.Poisoned, 60);
target.AddBuff(BuffID.Poisoned, SulphurousHelmet.SetBonusPoisonDuration);
if (ilSpark && Player.Calamity().countsAsAnyWet)
{
int duration = 60;
@@ -1313,7 +1303,7 @@ namespace CalamityMod.CalPlayer
}
if (snowRuffianSet && ranged && crit)
{
target.AddBuff(BuffID.Frostburn, 300, false);
target.AddBuff(BuffID.Frostburn, SnowRuffianMask.SetBonusFrostburnDuration, false);
}
}
#endregion
+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;
}
}
-1
View File
@@ -21,7 +21,6 @@ namespace CalamityMod
public static readonly Condition PlayerHasRogueArmor = Create("HasRogueArmor", () => Main.LocalPlayer.Calamity().rogueStealthMax > 0f && Main.LocalPlayer.Calamity().wearingRogueArmor);
public static readonly Condition PlayerHasWings = Create("HasWings", () => Main.LocalPlayer.wingTimeMax > 0);
public static readonly Condition PlayerAlcoholPoisoned = Create("AlcoholPoison", () => Main.LocalPlayer.Calamity().alcoholPoisoning);
//
// Calamity Event Flag conditions
+5 -32
View File
@@ -1,6 +1,7 @@
using System.ComponentModel;
using System.Reflection;
using System.Runtime.Serialization;
using CalamityMod.Enums;
using CalamityMod.UI;
using CalamityMod.UI.DraedonsArsenal;
using CalamityMod.UI.Rippers;
@@ -27,36 +28,6 @@ namespace CalamityMod
ParticleLimit = (int)Utils.Clamp(ParticleLimit, MinParticleLimit, MaxParticleLimit);
}
internal static void SaveConfig()
{
// There is no current way to manually save a mod configuration file in tModLoader.
// The method which saves mod config files is private in ConfigManager, so reflection is used to invoke it.
try
{
MethodInfo saveMethodInfo = typeof(ConfigManager).GetMethod("Save", BindingFlags.Static | BindingFlags.NonPublic);
if (saveMethodInfo is not null)
saveMethodInfo.Invoke(null, [Instance]);
else
CalamityMod.Instance.Logger.Error("TML ConfigManager.Save reflection failed. Method signature has changed. Notify Calamity Devs if you see this in your log.");
}
catch
{
CalamityMod.Instance.Logger.Error("An error occurred while manually saving Calamity mod configuration. This may be due to a complex mod conflict. It is safe to ignore this error.");
}
}
#region Multi-Threading Settings
[Header("Multithreading")]
[BackgroundColor(192, 54, 64, 192)]
[SliderColor(224, 165, 56, 128)]
[Range(0f, 2f)]
[DefaultValue(0f)]
[Increment(1f)]
[DrawTicks]
public float SunkenSeaMultiThreading { get; set; }
#endregion
#region Graphics Changes
[Header("Graphics")]
@@ -299,8 +270,10 @@ namespace CalamityMod
public bool FasterFallHotkey { get; set; }
[BackgroundColor(192, 54, 64, 192)]
[DefaultValue(true)]
public bool CalamityArmorSetBonusDoubleTap { get; set; }
[SliderColor(224, 165, 56, 128)]
[DrawTicks]
[DefaultValue(SetBonusDoubleTapOptions.Auto)]
public SetBonusDoubleTapOptions SetBonusDoubleTap { get; set; }
[BackgroundColor(192, 54, 64, 192)]
[DefaultValue(false)]
+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
}
}
+14
View File
@@ -0,0 +1,14 @@
using Terraria.ModLoader.Config;
namespace CalamityMod.Enums
{
public enum SetBonusDoubleTapOptions
{
[LabelKey("$Mods.CalamityMod.Configs.CalamityClientConfig.SetBonusDoubleTap.Options.On")]
On,
[LabelKey("$Mods.CalamityMod.Configs.CalamityClientConfig.SetBonusDoubleTap.Options.Auto")]
Auto,
[LabelKey("$Mods.CalamityMod.Configs.CalamityClientConfig.SetBonusDoubleTap.Options.Off")]
Off
}
}
+2 -1
View File
@@ -1,4 +1,5 @@
using CalamityMod.CalPlayer;
using CalamityMod.Items.Armor.Sulphurous;
using CalamityMod.Items.Potions.Alcohol;
using CalamityMod.Particles;
using CalamityMod.Projectiles.Typeless;
@@ -46,7 +47,7 @@ namespace CalamityMod.ExtraJumps
if (modPlayer.sulphurBubbleCooldown <= 0)
{
var source = player.GetSource_Misc("0");
int damage = (int)player.GetTotalDamage<RogueDamageClass>().ApplyTo(20);
int damage = (int)player.GetTotalDamage<RogueDamageClass>().ApplyTo(SulphurousHelmet.BubbleDamage);
int bubble = Projectile.NewProjectile(source, new Vector2(player.position.X, player.position.Y + (player.gravDir == -1f ? 20 : -20)), Vector2.Zero, ModContent.ProjectileType<SulphuricAcidBubbleFriendly>(), damage, 0f, player.whoAmI, 1f, 0f);
if (bubble.WithinBounds(Main.maxProjectiles))
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.
+1
View File
@@ -76,6 +76,7 @@ namespace CalamityMod.ILEditing
IL_Player.DashMovement += FixAllDashMechanics;
On_Player.DashMovement += DashMovementEdits;
On_Player.DoCommonDashHandle += ApplyDashKeybind;
On_Player.KeyDoubleTap += DisableDoubleTapOnConfig;
IL_Player.GiveImmuneTimeForCollisionAttack += MakeShieldSlamIFramesConsistent;
IL_Player.Update_NPCCollision += NerfShieldOfCthulhuBonkSafety;
On_WorldGen.OpenDoor += OpenDoor_LabDoorOverride;
+15
View File
@@ -6,6 +6,7 @@ using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.CalPlayer;
using CalamityMod.Cooldowns;
using CalamityMod.DataStructures;
using CalamityMod.Enums;
using CalamityMod.Events;
using CalamityMod.FluidSimulation;
using CalamityMod.Items.Accessories;
@@ -312,6 +313,20 @@ namespace CalamityMod.ILEditing
self.dashTime = 0;
}
}
private static void DisableDoubleTapOnConfig(On_Player.orig_KeyDoubleTap orig, Player self, int keyDir)
{
if (self.whoAmI != Main.myPlayer)
{
orig(self, keyDir);
return;
}
if ((CalamityKeybinds.ArmorSetBonusHotKey.GetAssignedKeys().Count != 0 && CalamityClientConfig.Instance.SetBonusDoubleTap == SetBonusDoubleTapOptions.Auto) || CalamityClientConfig.Instance.SetBonusDoubleTap == SetBonusDoubleTapOptions.Off)
return;
orig(self, keyDir);
}
#endregion
#region Prevent Vanilla Bosses From Being Marked as Defeated in Boss Rush
+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

+1 -1
View File
@@ -31,7 +31,7 @@ namespace CalamityMod.Items.Accessories
player.statManaMax2 += 150;
player.GetDamage<MagicDamageClass>() += 0.15f;
player.manaCost *= 0.9f;
player.manaCost -= 0.1f;
player.GetCritChance<MagicDamageClass>() += 5;
}
+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;
}
}
}
Loaded 100 of 1141 files, more files were not shown because too many files have changed in this diff. Show more