Slowing debuffs no longer affect bosses, period
This commit is contained in:
1 parent
cef0c4fcba
commit
757ba37f1e
22 files changed
+5
-144
No files matched your search
@@ -159,8 +159,6 @@ namespace CalamityMod.Buffs
|
||||
if (type == BuffID.Webbed)
|
||||
{
|
||||
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)
|
||||
{
|
||||
|
||||
@@ -41,9 +41,6 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
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];
|
||||
|
||||
}
|
||||
|
||||
internal static void DrawEffects(NPC npc, ref Color drawColor)
|
||||
|
||||
@@ -34,8 +34,6 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
public override void Update(NPC npc, ref int 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)
|
||||
|
||||
@@ -46,10 +46,6 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
// 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 ((CalamityNPCSets.ResistSlowingDebuffsAndOtherSpecialEffects[npc.type] || npc.boss) && cgn.debuffResistanceTimer <= 0)
|
||||
cgn.debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + +npc.buffTime[buffIndex];
|
||||
}
|
||||
internal static void DrawEffects(PlayerDrawSet drawInfo)
|
||||
{
|
||||
|
||||
@@ -26,8 +26,6 @@ namespace CalamityMod.Buffs.StatDebuffs
|
||||
public override void Update(NPC npc, ref int 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)
|
||||
|
||||
@@ -26,8 +26,6 @@ namespace CalamityMod.Buffs.StatDebuffs
|
||||
public override void Update(NPC npc, ref int 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)
|
||||
|
||||
@@ -19,8 +19,6 @@ namespace CalamityMod.Buffs.StatDebuffs
|
||||
public override void Update(NPC npc, ref int buffIndex)
|
||||
{
|
||||
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--;
|
||||
}
|
||||
|
||||
@@ -17,8 +17,6 @@ namespace CalamityMod.Buffs.StatDebuffs
|
||||
public override void Update(NPC npc, ref int buffIndex)
|
||||
{
|
||||
npc.Calamity().temporalSadness = true;
|
||||
if ((CalamityNPCSets.ResistSlowingDebuffsAndOtherSpecialEffects[npc.type] || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
|
||||
npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.buffTime[buffIndex];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -19,8 +19,6 @@ namespace CalamityMod.Buffs.StatDebuffs
|
||||
public override void Update(NPC npc, ref int buffIndex)
|
||||
{
|
||||
npc.Calamity().timeDistortion = true;
|
||||
if ((CalamityNPCSets.ResistSlowingDebuffsAndOtherSpecialEffects[npc.type] || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
|
||||
npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.buffTime[buffIndex];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -155,16 +155,6 @@ namespace CalamityMod.NPCs.AquaticScourge
|
||||
enrageScale += 2f;
|
||||
}
|
||||
|
||||
// Adjust slowing debuff immunity
|
||||
bool immuneToSlowingDebuffs = getFuckedAI;
|
||||
NPC.buffImmune[ModContent.BuffType<GlacialState>()] = immuneToSlowingDebuffs;
|
||||
NPC.buffImmune[ModContent.BuffType<TemporalSadness>()] = immuneToSlowingDebuffs;
|
||||
NPC.buffImmune[ModContent.BuffType<Eutrophication>()] = immuneToSlowingDebuffs;
|
||||
NPC.buffImmune[ModContent.BuffType<TimeDistortion>()] = immuneToSlowingDebuffs;
|
||||
NPC.buffImmune[ModContent.BuffType<GalvanicCorrosion>()] = immuneToSlowingDebuffs;
|
||||
NPC.buffImmune[ModContent.BuffType<Vaporfied>()] = immuneToSlowingDebuffs;
|
||||
NPC.buffImmune[BuffID.Webbed] = immuneToSlowingDebuffs;
|
||||
|
||||
// Fire teeth
|
||||
if (calamityGlobalNPC.newAI[0] == 1f && (!phase3 || phase4))
|
||||
{
|
||||
|
||||
@@ -151,16 +151,6 @@ namespace CalamityMod.NPCs.AquaticScourge
|
||||
enrageScale += 2f;
|
||||
}
|
||||
|
||||
// Adjust slowing debuff immunity
|
||||
bool immuneToSlowingDebuffs = getFuckedAI;
|
||||
NPC.buffImmune[ModContent.BuffType<GlacialState>()] = immuneToSlowingDebuffs;
|
||||
NPC.buffImmune[ModContent.BuffType<TemporalSadness>()] = immuneToSlowingDebuffs;
|
||||
NPC.buffImmune[ModContent.BuffType<Eutrophication>()] = immuneToSlowingDebuffs;
|
||||
NPC.buffImmune[ModContent.BuffType<TimeDistortion>()] = immuneToSlowingDebuffs;
|
||||
NPC.buffImmune[ModContent.BuffType<GalvanicCorrosion>()] = immuneToSlowingDebuffs;
|
||||
NPC.buffImmune[ModContent.BuffType<Vaporfied>()] = immuneToSlowingDebuffs;
|
||||
NPC.buffImmune[BuffID.Webbed] = immuneToSlowingDebuffs;
|
||||
|
||||
// Kill body and tail
|
||||
bool shouldDespawn = true;
|
||||
for (int i = 0; i < Main.maxNPCs; i++)
|
||||
|
||||
@@ -291,16 +291,6 @@ namespace CalamityMod.NPCs.AquaticScourge
|
||||
}
|
||||
}
|
||||
|
||||
// Adjust slowing debuff immunity
|
||||
bool immuneToSlowingDebuffs = doSpiral || getFuckedAI;
|
||||
NPC.buffImmune[ModContent.BuffType<GlacialState>()] = immuneToSlowingDebuffs;
|
||||
NPC.buffImmune[ModContent.BuffType<TemporalSadness>()] = immuneToSlowingDebuffs;
|
||||
NPC.buffImmune[ModContent.BuffType<Eutrophication>()] = immuneToSlowingDebuffs;
|
||||
NPC.buffImmune[ModContent.BuffType<TimeDistortion>()] = immuneToSlowingDebuffs;
|
||||
NPC.buffImmune[ModContent.BuffType<GalvanicCorrosion>()] = immuneToSlowingDebuffs;
|
||||
NPC.buffImmune[ModContent.BuffType<Vaporfied>()] = immuneToSlowingDebuffs;
|
||||
NPC.buffImmune[BuffID.Webbed] = immuneToSlowingDebuffs;
|
||||
|
||||
// Spawn segments
|
||||
if (calamityGlobalNPC.newAI[2] == 0f && NPC.ai[0] == 0f)
|
||||
{
|
||||
|
||||
@@ -150,16 +150,6 @@ namespace CalamityMod.NPCs.AquaticScourge
|
||||
enrageScale += 2f;
|
||||
}
|
||||
|
||||
// Adjust slowing debuff immunity
|
||||
bool immuneToSlowingDebuffs = getFuckedAI;
|
||||
NPC.buffImmune[ModContent.BuffType<GlacialState>()] = immuneToSlowingDebuffs;
|
||||
NPC.buffImmune[ModContent.BuffType<TemporalSadness>()] = immuneToSlowingDebuffs;
|
||||
NPC.buffImmune[ModContent.BuffType<Eutrophication>()] = immuneToSlowingDebuffs;
|
||||
NPC.buffImmune[ModContent.BuffType<TimeDistortion>()] = immuneToSlowingDebuffs;
|
||||
NPC.buffImmune[ModContent.BuffType<GalvanicCorrosion>()] = immuneToSlowingDebuffs;
|
||||
NPC.buffImmune[ModContent.BuffType<Vaporfied>()] = immuneToSlowingDebuffs;
|
||||
NPC.buffImmune[BuffID.Webbed] = immuneToSlowingDebuffs;
|
||||
|
||||
// Kill body and tail
|
||||
bool shouldDespawn = true;
|
||||
for (int i = 0; i < Main.maxNPCs; i++)
|
||||
|
||||
@@ -139,16 +139,6 @@ namespace CalamityMod.NPCs.Bumblebirb
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
|
||||
// Adjust slowing debuff immunity
|
||||
bool immuneToSlowingDebuffs = NPC.ai[0] == 3f || NPC.ai[0] == 3.1f || NPC.ai[0] == 3.2f;
|
||||
NPC.buffImmune[ModContent.BuffType<GlacialState>()] = immuneToSlowingDebuffs;
|
||||
NPC.buffImmune[ModContent.BuffType<TemporalSadness>()] = immuneToSlowingDebuffs;
|
||||
NPC.buffImmune[ModContent.BuffType<Eutrophication>()] = immuneToSlowingDebuffs;
|
||||
NPC.buffImmune[ModContent.BuffType<TimeDistortion>()] = immuneToSlowingDebuffs;
|
||||
NPC.buffImmune[ModContent.BuffType<GalvanicCorrosion>()] = immuneToSlowingDebuffs;
|
||||
NPC.buffImmune[ModContent.BuffType<Vaporfied>()] = immuneToSlowingDebuffs;
|
||||
NPC.buffImmune[BuffID.Webbed] = immuneToSlowingDebuffs;
|
||||
|
||||
// If target is outside the jungle for more than 5 seconds, enrage
|
||||
if (!player.ZoneJungle && !BossRushEvent.BossRushActive)
|
||||
{
|
||||
|
||||
@@ -252,11 +252,6 @@ namespace CalamityMod.NPCs
|
||||
/// <summary> If set to true, allows for manually disabling this NPC's Boss Health Bar, even if they are still active. </summary>
|
||||
public bool ShouldCloseHPBar = false;
|
||||
|
||||
/// <summary> Constant representing the cooldown, in frames, before a boss can be affected by a slowing debuff. </summary>
|
||||
public const int slowingDebuffResistanceMin = 1800;
|
||||
/// <summary> Tracks the current slowing debuff cooldown for this NPC. </summary>
|
||||
public int debuffResistanceTimer = 0;
|
||||
|
||||
#region Debuffs
|
||||
public bool vaporfied = false;
|
||||
public bool timeDistortion = false;
|
||||
@@ -550,8 +545,6 @@ namespace CalamityMod.NPCs
|
||||
myClone.CanHaveBossHealthBar = CanHaveBossHealthBar;
|
||||
myClone.ShouldCloseHPBar = ShouldCloseHPBar;
|
||||
|
||||
myClone.debuffResistanceTimer = debuffResistanceTimer;
|
||||
|
||||
myClone.vaporfied = vaporfied;
|
||||
myClone.timeDistortion = timeDistortion;
|
||||
myClone.glacialState = glacialState;
|
||||
@@ -751,9 +744,6 @@ namespace CalamityMod.NPCs
|
||||
|
||||
//Debuff Bool clearing.
|
||||
// Doze 2jun2025 - Moved here from PostAI so drawing can read the bools.
|
||||
if (debuffResistanceTimer > 0)
|
||||
debuffResistanceTimer--;
|
||||
|
||||
timeDistortion = false;
|
||||
galvanicCorrosion = false;
|
||||
glacialState = false;
|
||||
@@ -3324,10 +3314,6 @@ namespace CalamityMod.NPCs
|
||||
laserBurnDamage = 0;
|
||||
}
|
||||
|
||||
// Queen Bee is completely immune to having her movement impaired if not in a high difficulty mode.
|
||||
if (npc.type == NPCID.QueenBee && !CalamityWorld.revenge && !BossRushEvent.BossRushActive)
|
||||
return;
|
||||
|
||||
// Pearl Aura shard spawning
|
||||
// Slowing is handled in the general slowing code below
|
||||
if (pearlAura)
|
||||
@@ -3369,8 +3355,8 @@ namespace CalamityMod.NPCs
|
||||
}
|
||||
impalePacketTimer++;
|
||||
|
||||
// Apply slowing debuff effects
|
||||
if (debuffResistanceTimer <= 0 || (debuffResistanceTimer > slowingDebuffResistanceMin))
|
||||
// Apply slowing debuff effects, will not apply to bosses
|
||||
if (!(CalamityNPCSets.ImmuneToSlowsAndOtherSpecialEffects[npc.type] || npc.boss))
|
||||
{
|
||||
// Slowing debuffs which set a velocity hard cap take priority first.
|
||||
if (vulnerabilityHex)
|
||||
@@ -5487,7 +5473,7 @@ namespace CalamityMod.NPCs
|
||||
if (target.damage > 0 && !target.boss && !target.friendly && !target.dontTakeDamage && target.type != NPCID.Creeper && target.type != NPCType<RavagerClawLeft>() &&
|
||||
target.type != NPCID.MourningWood && target.type != NPCID.Everscream && target.type != NPCID.SantaNK1 && target.type != NPCType<RavagerClawRight>() &&
|
||||
target.type != NPCType<ReaperShark>() && target.type != NPCType<Mauler>() && target.type != NPCType<EidolonWyrmHead>() && target.type != NPCID.GolemFistLeft && target.type != NPCID.GolemFistRight &&
|
||||
target.type != NPCType<PrimordialWyrmHead>() && target.type != NPCType<ColossalSquid>() && target.type != NPCID.DD2Betsy && !CalamityNPCSets.ResistSlowingDebuffsAndOtherSpecialEffects[target.type] && !AcidRainEvent.AllMinibosses.Contains(target.type))
|
||||
target.type != NPCType<PrimordialWyrmHead>() && target.type != NPCType<ColossalSquid>() && target.type != NPCID.DD2Betsy && !CalamityNPCSets.ImmuneToSlowsAndOtherSpecialEffects[target.type] && !AcidRainEvent.AllMinibosses.Contains(target.type))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -218,16 +218,6 @@ namespace CalamityMod.NPCs.Leviathan
|
||||
|
||||
NPC.dontTakeDamage = spawnAnimation;
|
||||
|
||||
// Adjust slowing debuff immunity
|
||||
bool immuneToSlowingDebuffs = NPC.ai[0] == 2f;
|
||||
NPC.buffImmune[ModContent.BuffType<GlacialState>()] = immuneToSlowingDebuffs;
|
||||
NPC.buffImmune[ModContent.BuffType<TemporalSadness>()] = immuneToSlowingDebuffs;
|
||||
NPC.buffImmune[ModContent.BuffType<Eutrophication>()] = immuneToSlowingDebuffs;
|
||||
NPC.buffImmune[ModContent.BuffType<TimeDistortion>()] = immuneToSlowingDebuffs;
|
||||
NPC.buffImmune[ModContent.BuffType<GalvanicCorrosion>()] = immuneToSlowingDebuffs;
|
||||
NPC.buffImmune[ModContent.BuffType<Vaporfied>()] = immuneToSlowingDebuffs;
|
||||
NPC.buffImmune[BuffID.Webbed] = immuneToSlowingDebuffs;
|
||||
|
||||
// Despawn
|
||||
if (!player.active || player.dead || Vector2.Distance(player.Center, npcCenter) > 5600f)
|
||||
{
|
||||
|
||||
@@ -180,16 +180,6 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath
|
||||
nukeBarrageChallengeAmt *= 1.5f;
|
||||
}
|
||||
|
||||
// Adjust slowing debuff immunity
|
||||
bool immuneToSlowingDebuffs = NPC.ai[0] == 0f || NPC.ai[0] == 4f;
|
||||
NPC.buffImmune[ModContent.BuffType<GlacialState>()] = immuneToSlowingDebuffs;
|
||||
NPC.buffImmune[ModContent.BuffType<TemporalSadness>()] = immuneToSlowingDebuffs;
|
||||
NPC.buffImmune[ModContent.BuffType<Eutrophication>()] = immuneToSlowingDebuffs;
|
||||
NPC.buffImmune[ModContent.BuffType<TimeDistortion>()] = immuneToSlowingDebuffs;
|
||||
NPC.buffImmune[ModContent.BuffType<GalvanicCorrosion>()] = immuneToSlowingDebuffs;
|
||||
NPC.buffImmune[ModContent.BuffType<Vaporfied>()] = immuneToSlowingDebuffs;
|
||||
NPC.buffImmune[BuffID.Webbed] = immuneToSlowingDebuffs;
|
||||
|
||||
// Light
|
||||
Lighting.AddLight((int)(NPC.Center.X / 16f), (int)(NPC.Center.Y / 16f), 0.3f, 0.7f, 0f);
|
||||
|
||||
|
||||
@@ -341,16 +341,6 @@ namespace CalamityMod.NPCs.PrimordialWyrm
|
||||
iceMistDuration *= 0.5f;
|
||||
}
|
||||
|
||||
// Adjust slowing debuff immunity
|
||||
bool immuneToSlowingDebuffs = AIState == (float)Phase.FinalPhase || AIState == (float)Phase.ShadowFireballSpin;
|
||||
NPC.buffImmune[ModContent.BuffType<GlacialState>()] = immuneToSlowingDebuffs;
|
||||
NPC.buffImmune[ModContent.BuffType<TemporalSadness>()] = immuneToSlowingDebuffs;
|
||||
NPC.buffImmune[ModContent.BuffType<Eutrophication>()] = immuneToSlowingDebuffs;
|
||||
NPC.buffImmune[ModContent.BuffType<TimeDistortion>()] = immuneToSlowingDebuffs;
|
||||
NPC.buffImmune[ModContent.BuffType<GalvanicCorrosion>()] = immuneToSlowingDebuffs;
|
||||
NPC.buffImmune[ModContent.BuffType<Vaporfied>()] = immuneToSlowingDebuffs;
|
||||
NPC.buffImmune[BuffID.Webbed] = immuneToSlowingDebuffs;
|
||||
|
||||
// Adjust opacity
|
||||
bool invisiblePartOfChargePhase = calamityGlobalNPC.newAI[2] >= chargePhaseGateValue && calamityGlobalNPC.newAI[2] <= chargePhaseGateValue + 1f && (AIState == (float)Phase.ChargeOne || AIState == (float)Phase.ChargeTwo || AIState == (float)Phase.FastCharge);
|
||||
bool invisiblePartOfLightningChargePhase = calamityGlobalNPC.newAI[2] >= lightningChargePhaseGateValue && calamityGlobalNPC.newAI[2] <= lightningChargePhaseGateValue + 1f && AIState == (float)Phase.LightningCharge;
|
||||
|
||||
@@ -243,7 +243,6 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
int whoAmI = NPC.whoAmI;
|
||||
float ai0Holdover = NPC.ai[0];
|
||||
float newAI1Holdover = calamityGlobalNPC.newAI[1];
|
||||
int slowingDebuffResistTimer = calamityGlobalNPC.debuffResistanceTimer;
|
||||
|
||||
// Actually transform the body segment into a head segment.
|
||||
NPC.SetDefaultsKeepPlayerInteraction(NPC.type);
|
||||
@@ -253,7 +252,6 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
// Heads spawned mid fight by splitting do not get reset spawn invincibility.
|
||||
CalamityGlobalNPC newCGN = NPC.Calamity();
|
||||
newCGN.newAI[1] = newAI1Holdover;
|
||||
newCGN.debuffResistanceTimer = slowingDebuffResistTimer;
|
||||
|
||||
CalamityUtils.CalamityTargeting(NPC, CalamityTargetingParameters.BossDefaults);
|
||||
|
||||
@@ -268,14 +266,12 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
float segmentLifeRatio = MathHelper.Lerp(0.5f, 1f, NPC.life / (float)NPC.lifeMax);
|
||||
int whoAmI = NPC.whoAmI;
|
||||
float ai1Holdover = NPC.ai[1];
|
||||
int slowingDebuffResistTimer = calamityGlobalNPC.debuffResistanceTimer;
|
||||
|
||||
// Actually transform the body segment into a tail segment.
|
||||
NPC.SetDefaultsKeepPlayerInteraction(NPC.type);
|
||||
NPC.life = (int)(NPC.lifeMax * segmentLifeRatio);
|
||||
NPC.whoAmI = whoAmI;
|
||||
NPC.ai[1] = ai1Holdover;
|
||||
NPC.Calamity().debuffResistanceTimer = slowingDebuffResistTimer;
|
||||
|
||||
CalamityUtils.CalamityTargeting(NPC, CalamityTargetingParameters.BossDefaults);
|
||||
|
||||
|
||||
@@ -136,16 +136,6 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
if (Main.player[NPC.target].dead)
|
||||
NPC.ai[0] = 7f;
|
||||
|
||||
// Adjust slowing debuff immunity
|
||||
bool immuneToSlowingDebuffs = NPC.ai[0] == 0f;
|
||||
NPC.buffImmune[ModContent.BuffType<GlacialState>()] = immuneToSlowingDebuffs;
|
||||
NPC.buffImmune[ModContent.BuffType<TemporalSadness>()] = immuneToSlowingDebuffs;
|
||||
NPC.buffImmune[ModContent.BuffType<Eutrophication>()] = immuneToSlowingDebuffs;
|
||||
NPC.buffImmune[ModContent.BuffType<TimeDistortion>()] = immuneToSlowingDebuffs;
|
||||
NPC.buffImmune[ModContent.BuffType<GalvanicCorrosion>()] = immuneToSlowingDebuffs;
|
||||
NPC.buffImmune[ModContent.BuffType<Vaporfied>()] = immuneToSlowingDebuffs;
|
||||
NPC.buffImmune[BuffID.Webbed] = immuneToSlowingDebuffs;
|
||||
|
||||
// Always start in enemy spawning phase
|
||||
if (calamityGlobalNPC.newAI[3] == 0f)
|
||||
{
|
||||
|
||||
@@ -147,16 +147,6 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
SoundEngine.PlaySound(SoundID.ForceRoar, NPC.Center);
|
||||
}
|
||||
|
||||
// Adjust slowing debuff immunity
|
||||
bool immuneToSlowingDebuffs = NPC.ai[1] == 5f;
|
||||
NPC.buffImmune[ModContent.BuffType<GlacialState>()] = immuneToSlowingDebuffs;
|
||||
NPC.buffImmune[ModContent.BuffType<TemporalSadness>()] = immuneToSlowingDebuffs;
|
||||
NPC.buffImmune[ModContent.BuffType<Eutrophication>()] = immuneToSlowingDebuffs;
|
||||
NPC.buffImmune[ModContent.BuffType<TimeDistortion>()] = immuneToSlowingDebuffs;
|
||||
NPC.buffImmune[ModContent.BuffType<GalvanicCorrosion>()] = immuneToSlowingDebuffs;
|
||||
NPC.buffImmune[ModContent.BuffType<Vaporfied>()] = immuneToSlowingDebuffs;
|
||||
NPC.buffImmune[BuffID.Webbed] = immuneToSlowingDebuffs;
|
||||
|
||||
bool normalLaserRotation = NPC.localAI[1] % 2f == 0f;
|
||||
|
||||
// Float near player
|
||||
|
||||
@@ -177,11 +177,11 @@ namespace CalamityMod.Systems.Collections
|
||||
NPCID.MothronEgg, NPCID.MothronSpawn);
|
||||
|
||||
/// <summary>
|
||||
/// If <see langword="true"/> for an NPC type, then the NPC will receive a 30 second global cooldown to slowing debuffs after being inflicted by one.<br/>
|
||||
/// If <see langword="true"/> for an NPC type, then the NPC will not be affected by slowing debuffs.<br/>
|
||||
/// Also used to prevent weapon pulling effects and Anarchy Blade's ability to instantly kill enemies that are below 50% health.<br/>
|
||||
/// Defaults to <see langword="false"/>.
|
||||
/// </summary>
|
||||
public static bool[] ResistSlowingDebuffsAndOtherSpecialEffects = Factory.CreateBoolSet(NPCID.KingSlime, NPCType<KingSlimeJewelRuby>(),
|
||||
public static bool[] ImmuneToSlowsAndOtherSpecialEffects = Factory.CreateBoolSet(NPCID.KingSlime, NPCType<KingSlimeJewelRuby>(),
|
||||
NPCID.EyeofCthulhu, NPCID.EaterofWorldsHead, NPCID.EaterofWorldsBody, NPCID.EaterofWorldsTail, NPCID.BrainofCthulhu, NPCID.Creeper,
|
||||
NPCID.QueenBee, NPCID.Deerclops, NPCID.SkeletronHead, NPCID.SkeletronHand, NPCID.WallofFlesh, NPCID.WallofFleshEye, NPCID.PirateShipCannon, NPCID.QueenSlimeBoss,
|
||||
NPCID.Probe, NPCID.Retinazer, NPCID.Spazmatism, NPCID.SkeletronPrime, NPCID.PrimeCannon, NPCID.PrimeSaw, NPCID.PrimeLaser, NPCID.PrimeVice, NPCID.Plantera,
|
||||
|
||||
Reference in new issue
Block a user