Sage Poison adjustments

- Now counts ALL player's minions in multiplayer & supports viral+virid mixes
- Now does one DoT tick per second per sprout
This commit is contained in:
doze-zoze committed 2026-03-17 22:27:28 -05:00
1 parent 0e8ff954b9
commit ccd2075112
4 files changed
+16 -11

No files matched your search

+15 -4
View File
@@ -1,4 +1,5 @@
using CalamityMod.DataStructures;
using CalamityMod.Projectiles.Summon;
using CalamityMod.Systems.Collections;
using Terraria;
using Terraria.ModLoader;
@@ -17,8 +18,17 @@ namespace CalamityMod.Buffs.DamageOverTime
public static float ViridVanguardPoisonMultiplier => 2;
public static void SagePoisonPower(NPC npc, int buffType, ref int buffIndex, ref int damage)
{
// The base DoT is multiplied by the amount of Viral Sprouts you have when applied
// See SageNeedle.cs for details
int viralCount = 0;
int viridCount = 0;
foreach (var item in Main.ActiveProjectiles)
{
if (item.type == ModContent.ProjectileType<SageSpirit>())
viralCount++;
if (item.type == ModContent.ProjectileType<ViridVanguardBlade>())
viridCount++;
}
if ((viralCount + viridCount) <= 0)
return;
//Reduce power of weakness/resistances but leave sickness debuff boosters at full power
//We first need to apply Irradiated as that isn't included in SicknessDebuffMultiplier due to needing to dynamically update if Irradiated is applied
@@ -39,8 +49,9 @@ namespace CalamityMod.Buffs.DamageOverTime
multiplier *= NewResistanceEffectiveness;
//Apply the DOT
int baseSagePoisonDoTValue = (int)multiplier.ApplyTo(npc.Calamity().sagePoisonDamage);
npc.Calamity().ApplyDPSDebuff(baseSagePoisonDoTValue, baseSagePoisonDoTValue / 5, ref npc.lifeRegen, ref damage);
float SagePoisonRegen = (viralCount + ViridVanguardPoisonMultiplier * viridCount) * debuffData.EnemyLostRegen;
int totalDoT = (int)multiplier.ApplyTo(SagePoisonRegen);
npc.Calamity().ApplyDPSDebuff(totalDoT, totalDoT/(2*(viridCount+viralCount)), ref npc.lifeRegen, ref damage);
}
public override void SetStaticDefaults()
{
-3
View File
@@ -387,7 +387,6 @@ namespace CalamityMod.NPCs
public int ladHearts = 0;
public bool relicOfResilienceWeakness = false;
public bool sagePoison = false;
public int sagePoisonDamage = 0;
public bool vulnerabilityHex = false;
public bool trueVulnerabilityHex = false;
public bool banishingFire = false;
@@ -636,7 +635,6 @@ namespace CalamityMod.NPCs
myClone.ladHearts = ladHearts;
myClone.relicOfResilienceWeakness = relicOfResilienceWeakness;
myClone.sagePoison = sagePoison;
myClone.sagePoisonDamage = sagePoisonDamage;
myClone.vulnerabilityHex = vulnerabilityHex;
myClone.trueVulnerabilityHex = trueVulnerabilityHex;
myClone.banishingFire = banishingFire;
@@ -1217,7 +1215,6 @@ namespace CalamityMod.NPCs
if (npc.type == NPCID.WallofFleshEye)
npc.netAlways = true;
sagePoisonDamage = 0;
if (npc.type == NPCID.Golem && (CalamityWorld.revenge || BossRushEvent.BossRushActive))
npc.noGravity = true;
-2
View File
@@ -35,9 +35,7 @@ namespace CalamityMod.Projectiles.Summon
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
int sagePoisonDamage = (int)(SagePoison.debuffData.EnemyLostRegen * Main.player[Projectile.owner].ownedProjectileCounts[ModContent.ProjectileType<SageSpirit>()]);
target.AddBuff(ModContent.BuffType<SagePoison>(), 300);
target.Calamity().sagePoisonDamage = sagePoisonDamage;
}
public override void OnKill(int timeLeft)
+1 -2
View File
@@ -559,8 +559,7 @@ namespace CalamityMod.Projectiles.Summon
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
target.Calamity().sagePoisonDamage = (int)(SagePoison.debuffData.EnemyLostRegen * SagePoison.ViridVanguardPoisonMultiplier * CurrentViridCount);
target.AddBuff(ModContent.BuffType<SagePoison>(), 60);
target.AddBuff(ModContent.BuffType<SagePoison>(), 300);
if (ActiveAttacking)
{
Vector2 vel = new Vector2(0.1f, 0.1f).RotatedByRandom(100);