Removed several sickness debuffs reducing enemy contact damage

Especially overdue for Astral Infection and Plague since their reduced player damage died in 2.1
This commit is contained in:
CongratsIsTrash committed 2026-05-08 17:15:22 -04:00
1 parent ae4f98809e
commit 84a1c895f2
2 files changed
+9 -63

No files matched your search

+1 -61
View File
@@ -719,67 +719,7 @@ namespace CalamityMod.CalPlayer
if (npc.Calamity().antlionCloudDebuffTimer > 0)
modifiers.SourceDamage *= AntlionSkewer.CloudDamageDebuffMult;
// Enemies deal less contact damage while sick, due to being weakened.
if (npc.poisoned)
{
float damageReductionFromPoison = (float)((npc.Calamity().irradiated ? npc.Calamity().irradiatedContactBoost : 1) * 0.05f);
if (npc.Calamity().VulnerableToSickness.HasValue)
{
if (npc.Calamity().VulnerableToSickness.Value)
damageReductionFromPoison *= 2f;
else
damageReductionFromPoison /= 2f;
}
damageReductionFromPoison = 1f - damageReductionFromPoison;
modifiers.SourceDamage *= damageReductionFromPoison;
}
if (npc.venom)
{
float damageReductionFromVenom = (float)((npc.Calamity().irradiated ? npc.Calamity().irradiatedContactBoost : 1) * 0.05f);
if (npc.Calamity().VulnerableToSickness.HasValue)
{
if (npc.Calamity().VulnerableToSickness.Value)
damageReductionFromVenom *= 2f;
else
damageReductionFromVenom /= 2f;
}
damageReductionFromVenom = 1f - damageReductionFromVenom;
modifiers.SourceDamage *= damageReductionFromVenom;
}
if (npc.Calamity().astralInfection)
{
float damageReductionFromAstralInfection = (float)((npc.Calamity().irradiated ? npc.Calamity().irradiatedContactBoost : 1) * 0.05f);
if (npc.Calamity().VulnerableToSickness.HasValue)
{
if (npc.Calamity().VulnerableToSickness.Value)
damageReductionFromAstralInfection *= 2f;
else
damageReductionFromAstralInfection /= 2f;
}
damageReductionFromAstralInfection = 1f - damageReductionFromAstralInfection;
modifiers.SourceDamage *= damageReductionFromAstralInfection;
}
if (npc.Calamity().plague)
{
float damageReductionFromPlague = (float)((npc.Calamity().irradiated? npc.Calamity().irradiatedContactBoost : 1) * 0.05f);
if (npc.Calamity().VulnerableToSickness.HasValue)
{
if (npc.Calamity().VulnerableToSickness.Value)
damageReductionFromPlague *= 2f;
else
damageReductionFromPlague /= 2f;
}
damageReductionFromPlague = 1f - damageReductionFromPlague;
modifiers.SourceDamage *= damageReductionFromPlague;
}
// Whispering Death makes enemies deal less damage
if (npc.Calamity().whisperingDeath)
{
float damageReductionFromWhisperingDeath = (float)((npc.Calamity().irradiated ? npc.Calamity().irradiatedContactBoost : 1) * 0.1f);
+8 -2
View File
@@ -423,8 +423,14 @@ namespace CalamityMod.Projectiles
}
}
public override void SendExtraAI(Projectile projectile, BitWriter bitWriter, BinaryWriter binaryWriter) => binaryWriter.Write(ParentNPCIndex);
public override void ReceiveExtraAI(Projectile projectile, BitReader bitReader, BinaryReader binaryReader) => ParentNPCIndex = binaryReader.ReadInt32();
public override void SendExtraAI(Projectile projectile, BitWriter bitWriter, BinaryWriter binaryWriter)
{
binaryWriter.Write(ParentNPCIndex);
}
public override void ReceiveExtraAI(Projectile projectile, BitReader bitReader, BinaryReader binaryReader)
{
ParentNPCIndex = binaryReader.ReadInt32();
}
#endregion On Spawn
#region Set Defaults