1 - Removed demonshade enrage AI changes.

2 - Murdered Timed DR entirely, fuck it, burn it down.
This commit is contained in:
mountaindrew10 committed 2022-02-06 21:41:42 -06:00
1 parent f3f5c5afbf
commit 28cc25a5f5
46 files changed
+192 -399

No files matched your search

+11 -11
View File
@@ -18,19 +18,19 @@ namespace CalamityMod.Items.DifficultyItems
DisplayName.SetDefault("Malice");
Tooltip.SetDefault("Enables/disables Malice Mode, can only be used in Death Mode.\n" +
// Overall description and warning lines
"[c/c01818:This mode is subjective, play how you want, don't expect to live.]\n" +
// Overall description and warning lines
"[c/c01818:This mode is subjective, play how you want, don't expect to live.]\n" +
// Rev Mode line
"All effects from Death Mode are enabled, including the following:\n" +
// Rev Mode line
"All effects from Death Mode are enabled, including the following:\n" +
// Misc lines
"Nerfs the effectiveness of life steal a bit more.\n" +
// Boss lines
"Enrages all bosses and gives them far more aggressive AI.\n" +
"Bosses and their projectiles deal 25% more damage.\n" +
"Increases the velocity of most boss projectiles by 25%.");
// Misc lines
"Nerfs the effectiveness of life steal a bit more.\n" +
// Boss lines
"Enrages all bosses and gives them far more aggressive AI.\n" +
"Bosses and their projectiles deal 25% more damage.\n" +
"Increases the velocity of most boss projectiles by 25%.");
}
public override void SetDefaults()
+1 -2
View File
@@ -145,8 +145,7 @@ namespace CalamityMod.NPCs.AdultEidolonWyrm
CalamityGlobalNPC.adultEidolonWyrmHead = npc.whoAmI;
// Difficulty modes
bool enraged = calamityGlobalNPC.enraged > 0;
bool malice = CalamityWorld.malice || enraged;
bool malice = CalamityWorld.malice;
bool death = CalamityWorld.death;
bool revenge = CalamityWorld.revenge;
bool expertMode = Main.expertMode;
+22 -32
View File
@@ -34,8 +34,7 @@ namespace CalamityMod.NPCs
public static void AquaticScourgeAI(NPC npc, Mod mod, bool head)
{
CalamityGlobalNPC calamityGlobalNPC = npc.Calamity();
bool enraged = calamityGlobalNPC.enraged > 0;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive;
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
@@ -108,7 +107,7 @@ namespace CalamityMod.NPCs
float enrageScale = BossRushEvent.BossRushActive ? 1f : 0f;
if (biomeEnraged)
{
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive || enraged;
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive;
enrageScale += 2f;
}
@@ -690,8 +689,7 @@ namespace CalamityMod.NPCs
// Variables for buffing the AI
bool provy = CalamityWorld.downedProvidence && !BossRushEvent.BossRushActive;
bool enraged = calamityGlobalNPC.enraged > 0;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive;
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
@@ -713,12 +711,12 @@ namespace CalamityMod.NPCs
float enrageScale = BossRushEvent.BossRushActive ? 1f : 0f;
if (biomeEnraged && (!player.ZoneUnderworldHeight || malice))
{
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive || enraged;
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive;
enrageScale += 1f;
}
if (biomeEnraged && (!modPlayer.ZoneCalamity || malice))
{
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive || enraged;
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive;
enrageScale += 1f;
}
@@ -1230,8 +1228,7 @@ namespace CalamityMod.NPCs
Lighting.AddLight((int)((npc.position.X + (npc.width / 2)) / 16f), (int)((npc.position.Y + (npc.height / 2)) / 16f), 1f, 0f, 0f);
// Variables for increasing difficulty
bool enraged = calamityGlobalNPC.enraged > 0;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive;
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
@@ -1397,7 +1394,7 @@ namespace CalamityMod.NPCs
float enrageScale = BossRushEvent.BossRushActive ? 1f : 0f;
if (Main.dayTime || malice)
{
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive || enraged;
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive;
enrageScale += 2f;
}
@@ -2018,8 +2015,7 @@ namespace CalamityMod.NPCs
CalamityGlobalNPC.cataclysm = npc.whoAmI;
bool enraged = calamityGlobalNPC.enraged > 0;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive;
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
@@ -2038,7 +2034,7 @@ namespace CalamityMod.NPCs
float enrageScale = BossRushEvent.BossRushActive ? 1f : 0f;
if (Main.dayTime || malice)
{
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive || enraged;
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive;
enrageScale += 2f;
}
@@ -2300,8 +2296,7 @@ namespace CalamityMod.NPCs
CalamityGlobalNPC.catastrophe = npc.whoAmI;
bool enraged = calamityGlobalNPC.enraged > 0;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive;
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
@@ -2320,7 +2315,7 @@ namespace CalamityMod.NPCs
float enrageScale = BossRushEvent.BossRushActive ? 1f : 0f;
if (Main.dayTime || malice)
{
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive || enraged;
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive;
enrageScale += 2f;
}
@@ -2582,8 +2577,7 @@ namespace CalamityMod.NPCs
float lifeRatio = npc.life / (float)npc.lifeMax;
// Variables
bool enraged = calamityGlobalNPC.enraged > 0;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive;
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
@@ -2595,7 +2589,7 @@ namespace CalamityMod.NPCs
float enrageScale = BossRushEvent.BossRushActive ? 1f : 0f;
if (Main.dayTime || malice)
{
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive || enraged;
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive;
enrageScale += 2f;
}
@@ -3229,8 +3223,7 @@ namespace CalamityMod.NPCs
CalamityGlobalNPC calamityGlobalNPC = npc.Calamity();
// Difficulty variables
bool enraged = calamityGlobalNPC.enraged > 0;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive;
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
@@ -3238,7 +3231,7 @@ namespace CalamityMod.NPCs
float enrageScale = BossRushEvent.BossRushActive ? 0.5f : 0f;
if (Main.dayTime || malice)
{
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive || enraged;
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive;
enrageScale += 1.5f;
}
@@ -3958,8 +3951,7 @@ namespace CalamityMod.NPCs
double lifeRatio = npc.life / (double)npc.lifeMax;
// Difficulty modes
bool enraged = calamityGlobalNPC.enraged > 0;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive;
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
@@ -4049,8 +4041,8 @@ namespace CalamityMod.NPCs
npc.timeLeft = 1800;
// Scale multiplier based on nearby active tiles
float tileEnrageMult = (BossRushEvent.BossRushActive || enraged) ? 1.375f : malice ? 1.25f : 1f;
npc.Calamity().CurrentlyEnraged = (tileEnrageMult > 1f && !BossRushEvent.BossRushActive) || enraged;
float tileEnrageMult = BossRushEvent.BossRushActive ? 1.375f : malice ? 1.25f : 1f;
npc.Calamity().CurrentlyEnraged = tileEnrageMult > 1f && !BossRushEvent.BossRushActive;
// Set AI variable to be used by Dark Energies
npc.ai[1] = tileEnrageMult;
@@ -4537,8 +4529,7 @@ namespace CalamityMod.NPCs
// Variables
float rotationMult = 3f;
float rotationAmt = 0.03f;
bool enraged = calamityGlobalNPC.enraged > 0;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive;
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
@@ -4574,7 +4565,7 @@ namespace CalamityMod.NPCs
float enrageScale = death ? 1.5f : 1f;
if (npc.localAI[1] >= CalamityGlobalNPC.biomeEnrageTimerMax || malice)
{
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive || enraged;
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive;
enrageScale += 1f;
}
if (npc.localAI[2] > 0f || malice)
@@ -5427,8 +5418,7 @@ namespace CalamityMod.NPCs
float lifeRatio = npc.life / (float)npc.lifeMax;
// Variables
bool enraged = calamityGlobalNPC.enraged > 0;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive;
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
@@ -5607,7 +5597,7 @@ namespace CalamityMod.NPCs
bool biomeEnraged = npc.localAI[1] <= 0f;
npc.Calamity().CurrentlyEnraged = biomeEnraged || enraged;
npc.Calamity().CurrentlyEnraged = biomeEnraged;
// If the player isn't in the ocean biome or Old Duke is transitioning between phases, become immune
if (!phase3AI)
+29 -184
View File
@@ -79,14 +79,6 @@ namespace CalamityMod.NPCs
{
#region Variables
public float TimedDRScaleFactor { get; set; } = 0f;
private const float timedDR_Disabled = 0f;
private const float timedDR_Malice = 2f;
private const float timedDR_Worm = 3f;
private const float timedDR_NightProvi = 10f;
private const float timedDRMult_Normal = 0.67f;
private const float timedDRMult_Expert = 0.85f;
public float DR { get; set; } = 0f;
public int KillTime { get; set; } = 0;
@@ -900,8 +892,6 @@ namespace CalamityMod.NPCs
VulnerabilitiesAndResistances(npc);
TimedDRScaleFactors(npc);
BoundNPCSafety(mod, npc);
}
#endregion
@@ -1262,149 +1252,6 @@ namespace CalamityMod.NPCs
}
#endregion
#region Timed DR Stats
private void TimedDRScaleFactors(NPC npc)
{
bool malice = CalamityWorld.malice;
bool bossHasBeenDowned = GetDownedBossVariable(npc.type);
// Every boss post-DoG has normal timed DR until it is downed
bool removePostDoGTimedDR = bossHasBeenDowned;
// Post-Provi Pre-DoG timed DR is removed when anything DoG and onward is defeated
bool removePostProviPreDoGTimedDR = removePostDoGTimedDR || CalamityWorld.downedAdultEidolonWyrm ||
CalamityWorld.downedSCal || CalamityWorld.downedExoMechs || CalamityWorld.downedYharon || CalamityWorld.downedDoG;
// Post-ML Pre-Provi timed DR is removed when anything Providence and onward is defeated
bool removePostMLPreProviTimedDR = removePostProviPreDoGTimedDR || CalamityWorld.downedBoomerDuke ||
CalamityWorld.downedPolterghast || CalamityWorld.downedSentinel1 || CalamityWorld.downedSentinel2 ||
CalamityWorld.downedSentinel3 || CalamityWorld.downedProvidence;
// Late Hardmode timed DR is removed when anything Moon Lord and onward is defeated
bool removeLateHardmodeTimedDR = removePostMLPreProviTimedDR || CalamityWorld.downedBumble ||
CalamityWorld.downedGuardians || NPC.downedMoonlord;
// Early Hardmode timed DR is removed when anything Plantera and onward is defeated
bool removeEarlyHardmodeTimedDR = removeLateHardmodeTimedDR || CalamityWorld.downedStarGod ||
NPC.downedAncientCultist || CalamityWorld.downedScavenger || NPC.downedFishron ||
CalamityWorld.downedPlaguebringer || NPC.downedGolemBoss || CalamityWorld.downedAstrageldon ||
CalamityWorld.downedLeviathan || NPC.downedPlantBoss;
// Pre Hardmode timed DR is removed when anything Wall of Flesh and onward is defeated
bool removePreHardmodeTimedDR = removeEarlyHardmodeTimedDR || CalamityWorld.downedCalamitas ||
NPC.downedMechBoss1 || NPC.downedMechBoss2 || NPC.downedMechBoss3 || CalamityWorld.downedBrimstoneElemental ||
CalamityWorld.downedAquaticScourge || CalamityWorld.downedCryogen || Main.hardMode;
// Vanilla bosses
switch (npc.type)
{
// Pre Hardmode bosses
case NPCID.KingSlime:
case NPCID.EyeofCthulhu:
case NPCID.EaterofWorldsHead:
case NPCID.EaterofWorldsBody:
case NPCID.EaterofWorldsTail:
case NPCID.BrainofCthulhu:
case NPCID.Creeper:
case NPCID.QueenBee:
case NPCID.SkeletronHead:
case NPCID.WallofFlesh:
case NPCID.WallofFleshEye:
TimedDRScaleFactor = removePreHardmodeTimedDR ? timedDR_Disabled : malice ? timedDR_Malice : timedDR_Disabled;
break;
// The Destroyer
case NPCID.TheDestroyer:
case NPCID.TheDestroyerBody:
case NPCID.TheDestroyerTail:
TimedDRScaleFactor = removeEarlyHardmodeTimedDR ? timedDR_Disabled : malice ? timedDR_Worm : timedDR_Disabled;
break;
// Early Hardmode bosses
case NPCID.Spazmatism:
case NPCID.Retinazer:
case NPCID.SkeletronPrime:
case NPCID.Plantera:
TimedDRScaleFactor = removeEarlyHardmodeTimedDR ? timedDR_Disabled : malice ? timedDR_Malice : timedDR_Disabled;
break;
// Late Hardmode bosses
case NPCID.Golem:
case NPCID.GolemHead:
case NPCID.DukeFishron:
case NPCID.CultistBoss:
case NPCID.MoonLordCore:
case NPCID.MoonLordHead:
case NPCID.MoonLordHand:
TimedDRScaleFactor = removeLateHardmodeTimedDR ? timedDR_Disabled : malice ? timedDR_Malice : timedDR_Disabled;
break;
}
// Calamity bosses
bool preHardmodeCalamityBosses = CalamityLists.DesertScourgeIDs.Contains(npc.type) || npc.type == NPCType<CrabulonIdle>() ||
npc.type == NPCType<HiveMind.HiveMind>() || npc.type == NPCType<PerforatorHive>() || npc.type == NPCType<SlimeGod.SlimeGod>() ||
npc.type == NPCType<SlimeGodRun>() || npc.type == NPCType<SlimeGodSplit>() || npc.type == NPCType<SlimeGodRunSplit>() ||
npc.type == NPCType<SlimeGodCore>();
bool earlyHardmodeCalamityBosses = npc.type == NPCType<Cryogen.Cryogen>() || CalamityLists.AquaticScourgeIDs.Contains(npc.type) ||
npc.type == NPCType<BrimstoneElemental.BrimstoneElemental>() || npc.type == NPCType<CalamitasRun3>();
bool lateHardmodeCalamityBosses = npc.type == NPCType<Siren>() || npc.type == NPCType<Leviathan.Leviathan>() ||
npc.type == NPCType<AstrumAureus.AstrumAureus>() || npc.type == NPCType<PlaguebringerGoliath.PlaguebringerGoliath>() ||
npc.type == NPCType<RavagerBody>() || CalamityLists.AstrumDeusIDs.Contains(npc.type);
bool postMLPreProviCalamityBosses = npc.type == NPCType<ProfanedGuardianBoss>() || npc.type == NPCType<Bumblefuck>() ||
npc.type == NPCType<Providence.Providence>();
bool postProviPreDoGCalamityBosses = npc.type == NPCType<CeaselessVoid.CeaselessVoid>() || npc.type == NPCType<DarkEnergy>() ||
CalamityLists.StormWeaverIDs.Contains(npc.type) || npc.type == NPCType<Signus.Signus>() || npc.type == NPCType<Polterghast.Polterghast>() ||
npc.type == NPCType<OldDuke.OldDuke>() || CalamityLists.DevourerOfGodsIDs.Contains(npc.type);
bool postDoGCalamityBosses = npc.type == NPCType<Yharon.Yharon>() || npc.type == NPCType<SupremeCalamitas.SupremeCalamitas>() ||
CalamityLists.ThanatosIDs.Contains(npc.type) || npc.type == NPCType<Apollo>() || npc.type == NPCType<Artemis>() ||
CalamityLists.AresIDs.Contains(npc.type) || npc.type == NPCType<EidolonWyrmHeadHuge>();
if (preHardmodeCalamityBosses)
{
TimedDRScaleFactor = removePreHardmodeTimedDR ? timedDR_Disabled : malice ? (CalamityLists.DesertScourgeIDs.Contains(npc.type) ? timedDR_Worm : timedDR_Malice) : timedDR_Disabled;
}
else if (earlyHardmodeCalamityBosses)
{
TimedDRScaleFactor = removeEarlyHardmodeTimedDR ? timedDR_Disabled : malice ? (CalamityLists.AquaticScourgeIDs.Contains(npc.type) ? timedDR_Worm : timedDR_Malice) : timedDR_Disabled;
}
else if (lateHardmodeCalamityBosses)
{
TimedDRScaleFactor = removeLateHardmodeTimedDR ? timedDR_Disabled : malice ? (CalamityLists.AstrumDeusIDs.Contains(npc.type) ? timedDR_Worm : timedDR_Malice) : timedDR_Disabled;
}
else if (postMLPreProviCalamityBosses)
{
TimedDRScaleFactor = removePostMLPreProviTimedDR ? timedDR_Disabled : malice ? timedDR_Malice : timedDR_Disabled;
}
else if (postProviPreDoGCalamityBosses)
{
TimedDRScaleFactor = removePostProviPreDoGTimedDR ? timedDR_Disabled : malice ? (CalamityLists.StormWeaverIDs.Contains(npc.type) ? timedDR_Worm : timedDR_Malice) : timedDR_Disabled;
}
else if (postDoGCalamityBosses)
{
TimedDRScaleFactor = removePostDoGTimedDR ? timedDR_Disabled : malice ? timedDR_Malice : timedDR_Disabled;
}
// Reduce timed DR in lower difficulties
if (!Main.expertMode)
TimedDRScaleFactor *= timedDRMult_Normal;
else if (!CalamityWorld.revenge)
TimedDRScaleFactor *= timedDRMult_Expert;
}
#endregion
#region Vulnerabilities and Resistances
private void VulnerabilitiesAndResistances(NPC npc)
{
@@ -2578,14 +2425,12 @@ namespace CalamityMod.NPCs
if (yellowCandle > 0 && DR < 0.99f && npc.takenDamageMultiplier > 0.05f)
damage += yellowCandleDamage;
// Boss that get higher timed DR than normal in specific circumstances
bool nightProvi = npc.type == NPCType<Providence.Providence>() && (!Main.dayTime || CalamityWorld.malice);
// Calculate extra DR based on kill time, similar to the Hush boss from The Binding of Isaac
if (KillTime > 0 && AITimer < KillTime && !BossRushEvent.BossRushActive && (TimedDRScaleFactor > 0f || nightProvi))
bool nightProvi = npc.type == NPCType<Providence.Providence>() && (!Main.dayTime || CalamityWorld.malice);
if (KillTime > 0 && AITimer < KillTime && !BossRushEvent.BossRushActive && nightProvi)
{
// Set the DR scaling factor
float DRScalar = nightProvi ? timedDR_NightProvi : TimedDRScaleFactor;
float DRScalar = 10f;
// The limit for how much extra DR the boss can have
float extraDRLimit = (1f - DR) * DRScalar;
@@ -2800,76 +2645,76 @@ namespace CalamityMod.NPCs
switch (npc.type)
{
case NPCID.KingSlime:
return KingSlimeAI.BuffedKingSlimeAI(npc, enraged > 0, mod);
return KingSlimeAI.BuffedKingSlimeAI(npc, mod);
case NPCID.EyeofCthulhu:
return EyeOfCthulhuAI.BuffedEyeofCthulhuAI(npc, enraged > 0, mod);
return EyeOfCthulhuAI.BuffedEyeofCthulhuAI(npc, mod);
case NPCID.EaterofWorldsHead:
case NPCID.EaterofWorldsBody:
case NPCID.EaterofWorldsTail:
return EaterOfWorldsAI.BuffedEaterofWorldsAI(npc, enraged > 0, mod);
return EaterOfWorldsAI.BuffedEaterofWorldsAI(npc, mod);
case NPCID.BrainofCthulhu:
return BrainOfCthulhuAI.BuffedBrainofCthulhuAI(npc, enraged > 0, mod);
return BrainOfCthulhuAI.BuffedBrainofCthulhuAI(npc, mod);
case NPCID.Creeper:
return BrainOfCthulhuAI.BuffedCreeperAI(npc, enraged > 0, mod);
return BrainOfCthulhuAI.BuffedCreeperAI(npc, mod);
case NPCID.QueenBee:
return QueenBeeAI.BuffedQueenBeeAI(npc, enraged > 0, mod);
return QueenBeeAI.BuffedQueenBeeAI(npc, mod);
case NPCID.SkeletronHand:
return SkeletronAI.BuffedSkeletronHandAI(npc, enraged > 0, mod);
return SkeletronAI.BuffedSkeletronHandAI(npc, mod);
case NPCID.SkeletronHead:
return SkeletronAI.BuffedSkeletronAI(npc, enraged > 0, mod);
return SkeletronAI.BuffedSkeletronAI(npc, mod);
case NPCID.WallofFlesh:
return WallOfFleshAI.BuffedWallofFleshAI(npc, enraged > 0, mod);
return WallOfFleshAI.BuffedWallofFleshAI(npc, mod);
case NPCID.WallofFleshEye:
return WallOfFleshAI.BuffedWallofFleshEyeAI(npc, enraged > 0, mod);
return WallOfFleshAI.BuffedWallofFleshEyeAI(npc, mod);
case NPCID.TheDestroyer:
case NPCID.TheDestroyerBody:
case NPCID.TheDestroyerTail:
return DestroyerAI.BuffedDestroyerAI(npc, enraged > 0, mod);
return DestroyerAI.BuffedDestroyerAI(npc, mod);
case NPCID.Probe:
return DestroyerAI.BuffedProbeAI(npc, mod);
case NPCID.Retinazer:
return TwinsAI.BuffedRetinazerAI(npc, enraged > 0, mod);
return TwinsAI.BuffedRetinazerAI(npc, mod);
case NPCID.Spazmatism:
return TwinsAI.BuffedSpazmatismAI(npc, enraged > 0, mod);
return TwinsAI.BuffedSpazmatismAI(npc, mod);
case NPCID.SkeletronPrime:
return SkeletronPrimeAI.BuffedSkeletronPrimeAI(npc, enraged > 0, mod);
return SkeletronPrimeAI.BuffedSkeletronPrimeAI(npc, mod);
case NPCID.PrimeLaser:
return SkeletronPrimeAI.BuffedPrimeLaserAI(npc, enraged > 0, mod);
return SkeletronPrimeAI.BuffedPrimeLaserAI(npc, mod);
case NPCID.PrimeCannon:
return SkeletronPrimeAI.BuffedPrimeCannonAI(npc, enraged > 0, mod);
return SkeletronPrimeAI.BuffedPrimeCannonAI(npc, mod);
case NPCID.PrimeVice:
return SkeletronPrimeAI.BuffedPrimeViceAI(npc, enraged > 0, mod);
return SkeletronPrimeAI.BuffedPrimeViceAI(npc, mod);
case NPCID.PrimeSaw:
return SkeletronPrimeAI.BuffedPrimeSawAI(npc, enraged > 0, mod);
return SkeletronPrimeAI.BuffedPrimeSawAI(npc, mod);
case NPCID.Plantera:
return PlanteraAI.BuffedPlanteraAI(npc, enraged > 0, mod);
return PlanteraAI.BuffedPlanteraAI(npc, mod);
case NPCID.PlanterasHook:
return PlanteraAI.BuffedPlanterasHookAI(npc, mod);
case NPCID.PlanterasTentacle:
return PlanteraAI.BuffedPlanterasTentacleAI(npc, mod);
case NPCID.Golem:
return GolemAI.BuffedGolemAI(npc, enraged > 0, mod);
return GolemAI.BuffedGolemAI(npc, mod);
case NPCID.GolemFistLeft:
case NPCID.GolemFistRight:
return GolemAI.BuffedGolemFistAI(npc, enraged > 0, mod);
return GolemAI.BuffedGolemFistAI(npc, mod);
case NPCID.GolemHead:
return GolemAI.BuffedGolemHeadAI(npc, enraged > 0, mod);
return GolemAI.BuffedGolemHeadAI(npc, mod);
case NPCID.GolemHeadFree:
return GolemAI.BuffedGolemHeadFreeAI(npc, enraged > 0, mod);
return GolemAI.BuffedGolemHeadFreeAI(npc, mod);
case NPCID.DukeFishron:
return DukeFishronAI.BuffedDukeFishronAI(npc, enraged > 0, mod);
return DukeFishronAI.BuffedDukeFishronAI(npc, mod);
case NPCID.Pumpking:
if (CalamityWorld.downedDoG)
@@ -2905,7 +2750,7 @@ namespace CalamityMod.NPCs
case NPCID.CultistBoss:
case NPCID.CultistBossClone:
return CultistAI.BuffedCultistAI(npc, enraged > 0, mod);
return CultistAI.BuffedCultistAI(npc, mod);
case NPCID.AncientLight:
return CultistAI.BuffedAncientLightAI(npc, mod);
case NPCID.AncientDoom:
@@ -2916,7 +2761,7 @@ namespace CalamityMod.NPCs
case NPCID.MoonLordHead:
case NPCID.MoonLordFreeEye:
case NPCID.MoonLordLeechBlob:
return MoonLordAI.BuffedMoonLordAI(npc, enraged > 0, mod);
return MoonLordAI.BuffedMoonLordAI(npc, mod);
default:
break;
+2 -3
View File
@@ -51,9 +51,8 @@ namespace CalamityMod.NPCs.Crabulon
public override void AI()
{
Lighting.AddLight((int)((npc.position.X + (npc.width / 2)) / 16f), (int)((npc.position.Y + (npc.height / 2)) / 16f), 0f, 0.2f, 0.4f);
bool enraged = npc.Calamity().enraged > 0;
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive || enraged;
float xVelocityLimit = (CalamityWorld.malice || BossRushEvent.BossRushActive || enraged) ? 7.5f : 5f;
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
float xVelocityLimit = (CalamityWorld.malice || BossRushEvent.BossRushActive) ? 7.5f : 5f;
float yVelocityLimit = revenge ? 1.25f : 1f;
Player player = Main.player[npc.target];
npc.velocity.Y += 0.02f;
+3 -6
View File
@@ -75,12 +75,9 @@ namespace CalamityMod.NPCs.Crabulon
public override void AI()
{
CalamityGlobalNPC calamityGlobalNPC = npc.Calamity();
Lighting.AddLight((int)((npc.position.X + (npc.width / 2)) / 16f), (int)((npc.position.Y + (npc.height / 2)) / 16f), 0f, 0.3f, 0.7f);
bool enraged = calamityGlobalNPC.enraged > 0;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive;
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
@@ -149,12 +146,12 @@ namespace CalamityMod.NPCs.Crabulon
float enrageScale = BossRushEvent.BossRushActive ? 1f : 0f;
if (biomeEnraged && ((npc.position.Y / 16f) < Main.worldSurface || malice))
{
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive || enraged;
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive;
enrageScale += 1f;
}
if (biomeEnraged && (!player.ZoneGlowshroom || malice))
{
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive || enraged;
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive;
enrageScale += 1f;
}
+3 -4
View File
@@ -107,8 +107,7 @@ namespace CalamityMod.NPCs.Cryogen
Player player = Main.player[npc.target];
bool enraged = calamityGlobalNPC.enraged > 0;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive;
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
@@ -127,14 +126,14 @@ namespace CalamityMod.NPCs.Cryogen
float enrageScale = death ? 0.5f : 0f;
if (biomeEnraged)
{
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive || enraged;
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive;
enrageScale += 2f;
}
if (enrageScale > 2f)
enrageScale = 2f;
if (BossRushEvent.BossRushActive || enraged)
if (BossRushEvent.BossRushActive)
enrageScale = 3f;
// Percent life remaining
+1 -2
View File
@@ -63,8 +63,7 @@ namespace CalamityMod.NPCs.DesertScourge
public override void AI()
{
Player player = Main.player[npc.target];
bool enraged = npc.Calamity().enraged > 0;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive;
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
float burrowTimeGateValue = death ? 420f : 540f;
+2 -3
View File
@@ -94,8 +94,7 @@ namespace CalamityMod.NPCs.DesertScourge
{
CalamityGlobalNPC calamityGlobalNPC = npc.Calamity();
bool enraged = calamityGlobalNPC.enraged > 0;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive;
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
@@ -124,7 +123,7 @@ namespace CalamityMod.NPCs.DesertScourge
float enrageScale = BossRushEvent.BossRushActive ? 1f : 0f;
if (biomeEnraged)
{
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive || enraged;
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive;
enrageScale += 2f;
}
+2 -3
View File
@@ -262,12 +262,11 @@ namespace CalamityMod.NPCs.DevourerofGods
// Variables
Vector2 vector = npc.Center;
bool flies = npc.ai[3] == 0f;
bool enraged = calamityGlobalNPC.enraged > 0;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive;
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
npc.Calamity().CurrentlyEnraged = (!BossRushEvent.BossRushActive && malice) || enraged;
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive && malice;
// Percent life remaining
float lifeRatio = npc.life / (float)npc.lifeMax;
+3 -4
View File
@@ -352,8 +352,7 @@ namespace CalamityMod.NPCs.HiveMind
Player player = Main.player[npc.target];
bool enraged = calamityGlobalNPC.enraged > 0;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive;
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
@@ -375,12 +374,12 @@ namespace CalamityMod.NPCs.HiveMind
float enrageScale = BossRushEvent.BossRushActive ? 1f : 0f;
if (biomeEnraged && (!player.ZoneCorrupt || malice))
{
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive || enraged;
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive;
enrageScale += 1f;
}
if (biomeEnraged && ((npc.position.Y / 16f) < Main.worldSurface || malice))
{
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive || enraged;
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive;
enrageScale += 1f;
}
+2 -3
View File
@@ -93,8 +93,7 @@ namespace CalamityMod.NPCs.Leviathan
CalamityGlobalNPC.leviathan = npc.whoAmI;
bool enraged = calamityGlobalNPC.enraged > 0;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive;
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
@@ -172,7 +171,7 @@ namespace CalamityMod.NPCs.Leviathan
float enrageScale = BossRushEvent.BossRushActive ? 1f : 0f;
if (biomeEnraged)
{
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive || enraged;
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive;
enrageScale += 2f;
}
+2 -3
View File
@@ -123,8 +123,7 @@ namespace CalamityMod.NPCs.Leviathan
// Variables
Player player = Main.player[npc.target];
bool enraged = calamityGlobalNPC.enraged > 0;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive;
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
@@ -144,7 +143,7 @@ namespace CalamityMod.NPCs.Leviathan
float enrageScale = BossRushEvent.BossRushActive ? 0.5f : 0f;
if (biomeEnraged)
{
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive || enraged;
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive;
enrageScale += 1.5f;
}
+1 -2
View File
@@ -77,8 +77,7 @@ namespace CalamityMod.NPCs.Perforator
{
CalamityGlobalNPC calamityGlobalNPC = npc.Calamity();
bool enraged = calamityGlobalNPC.enraged > 0;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive;
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
+1 -2
View File
@@ -62,8 +62,7 @@ namespace CalamityMod.NPCs.Perforator
{
CalamityGlobalNPC calamityGlobalNPC = npc.Calamity();
bool enraged = calamityGlobalNPC.enraged > 0;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive;
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
+1 -2
View File
@@ -73,8 +73,7 @@ namespace CalamityMod.NPCs.Perforator
{
CalamityGlobalNPC calamityGlobalNPC = npc.Calamity();
bool enraged = calamityGlobalNPC.enraged > 0;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive;
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
+3 -4
View File
@@ -98,8 +98,7 @@ namespace CalamityMod.NPCs.Perforator
if (Vector2.Distance(Main.player[npc.target].Center, npc.Center) > CalamityGlobalNPC.CatchUpDistance200Tiles)
npc.TargetClosest();
bool enraged = calamityGlobalNPC.enraged > 0;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive;
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
@@ -140,12 +139,12 @@ namespace CalamityMod.NPCs.Perforator
float enrageScale = BossRushEvent.BossRushActive ? 1f : 0f;
if (biomeEnraged && (!player.ZoneCrimson || malice))
{
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive || enraged;
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive;
enrageScale += 1f;
}
if (biomeEnraged && ((npc.position.Y / 16f) < Main.worldSurface || malice))
{
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive || enraged;
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive;
enrageScale += 1f;
}
@@ -113,8 +113,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath
npc.height = (int)(npc.frame.Height * (charging ? 1.5f : 1.8f));
// Mode variables
bool enraged = calamityGlobalNPC.enraged > 0;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive;
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
@@ -206,14 +205,14 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath
float enrageScale = death ? 0.5f : 0f;
if (biomeEnraged)
{
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive || enraged;
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive;
enrageScale += 1.5f;
}
if (enrageScale > 1.5f)
enrageScale = 1.5f;
if (BossRushEvent.BossRushActive || enraged)
if (BossRushEvent.BossRushActive)
enrageScale = 2f;
bool diagonalDash = (revenge && phase2) || malice;
+2 -3
View File
@@ -142,8 +142,7 @@ namespace CalamityMod.NPCs.Polterghast
// Variables
Vector2 vector = npc.Center;
bool enraged = calamityGlobalNPC.enraged > 0;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive;
bool speedBoost = false;
bool despawnBoost = false;
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
@@ -341,7 +340,7 @@ namespace CalamityMod.NPCs.Polterghast
if (malice)
tileEnrageMult = 1.75f;
npc.Calamity().CurrentlyEnraged = (!BossRushEvent.BossRushActive || enraged) && tileEnrageMult >= 1.6f;
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive && tileEnrageMult >= 1.6f;
// Used to inform clone and hooks about number of active tiles nearby
npc.ai[3] = tileEnrageMult;
@@ -87,12 +87,9 @@ namespace CalamityMod.NPCs.ProfanedGuardians
public override void AI()
{
CalamityGlobalNPC calamityGlobalNPC = npc.Calamity();
CalamityGlobalNPC.doughnutBoss = npc.whoAmI;
bool enraged = calamityGlobalNPC.enraged > 0;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive;
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
@@ -160,9 +157,6 @@ namespace CalamityMod.NPCs.ProfanedGuardians
else
biomeEnrageTimer = CalamityGlobalNPC.biomeEnrageTimerMax;
if (enraged)
npc.Calamity().CurrentlyEnraged = true;
// Take damage or not
npc.dontTakeDamage = biomeEnrageTimer <= 0 && !malice;
+3 -4
View File
@@ -176,7 +176,6 @@ namespace CalamityMod.NPCs.Providence
// Night bool
bool malice = CalamityWorld.malice;
bool enraged = npc.Calamity().enraged > 0;
bool nightTime = !Main.dayTime || malice;
// Difficulty bools
@@ -216,7 +215,7 @@ namespace CalamityMod.NPCs.Providence
if (nightTime)
projectileDamageMult = 2;
npc.Calamity().CurrentlyEnraged = (!BossRushEvent.BossRushActive && (nightTime || malice)) || enraged || biomeEnrageTimer <= 0;
npc.Calamity().CurrentlyEnraged = (!BossRushEvent.BossRushActive && (nightTime || malice)) || biomeEnrageTimer <= 0;
// Projectile damage values
int holyLaserDamage = npc.GetProjectileDamage(ModContent.ProjectileType<ProvidenceHolyRay>()) * projectileDamageMult;
@@ -248,7 +247,7 @@ namespace CalamityMod.NPCs.Providence
float baseSpearRate = 18f;
float spearRate = 1f + spearRateIncrease;
if (BossRushEvent.BossRushActive || enraged)
if (BossRushEvent.BossRushActive)
spearRate += bossRushSpearRateIncrease;
// Projectile fire rate multiplier
@@ -518,7 +517,7 @@ namespace CalamityMod.NPCs.Providence
float velocityBoost = death ? 6f * (1f - lifeRatio) : 4f * (1f - lifeRatio);
float acceleration = (expertMode ? 1.1f : 1.05f) + accelerationBoost;
float velocity = (expertMode ? 16f : 15f) + velocityBoost;
if (BossRushEvent.BossRushActive || enraged || nightTime)
if (BossRushEvent.BossRushActive || nightTime)
{
acceleration = 1.5f;
velocity = 25f;
+2 -4
View File
@@ -96,14 +96,12 @@ namespace CalamityMod.NPCs.Ravager
{
CalamityGlobalNPC calamityGlobalNPC = npc.Calamity();
bool provy = CalamityWorld.downedProvidence && !BossRushEvent.BossRushActive;
bool enraged = calamityGlobalNPC.enraged > 0;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive;
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
npc.Calamity().CurrentlyEnraged = (!BossRushEvent.BossRushActive && malice) || enraged;
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive && malice;
// Percent life remaining
float lifeRatio = npc.life / (float)npc.lifeMax;
+2 -3
View File
@@ -96,8 +96,7 @@ namespace CalamityMod.NPCs.Signus
CalamityGlobalNPC.signus = npc.whoAmI;
bool enraged = calamityGlobalNPC.enraged > 0;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive;
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
@@ -115,7 +114,7 @@ namespace CalamityMod.NPCs.Signus
bool phase3 = lifeRatio < 0.5f;
bool phase4 = lifeRatio < 0.33f;
npc.Calamity().CurrentlyEnraged = (!BossRushEvent.BossRushActive && malice) || enraged;
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive && malice;
npc.damage = npc.defDamage;
+2 -3
View File
@@ -62,12 +62,11 @@ namespace CalamityMod.NPCs.SlimeGod
CalamityGlobalNPC calamityGlobalNPC = npc.Calamity();
CalamityGlobalNPC.slimeGodPurple = npc.whoAmI;
bool enraged = calamityGlobalNPC.enraged > 0;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive;
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
bool death = CalamityWorld.death || npc.localAI[1] == 1f || BossRushEvent.BossRushActive;
npc.Calamity().CurrentlyEnraged = (!BossRushEvent.BossRushActive && malice) || enraged;
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive && malice;
Vector2 vector = npc.Center;
+2 -3
View File
@@ -92,12 +92,11 @@ namespace CalamityMod.NPCs.SlimeGod
CalamityGlobalNPC.slimeGod = npc.whoAmI;
bool enraged = calamityGlobalNPC.enraged > 0;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive;
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
npc.Calamity().CurrentlyEnraged = (!BossRushEvent.BossRushActive && malice) || enraged;
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive && malice;
// Percent life remaining
float lifeRatio = npc.life / (float)npc.lifeMax;
+2 -3
View File
@@ -65,12 +65,11 @@ namespace CalamityMod.NPCs.SlimeGod
CalamityGlobalNPC calamityGlobalNPC = npc.Calamity();
CalamityGlobalNPC.slimeGodRed = npc.whoAmI;
bool enraged = calamityGlobalNPC.enraged > 0;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive;
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
bool death = CalamityWorld.death || npc.localAI[1] == 1f || BossRushEvent.BossRushActive;
npc.Calamity().CurrentlyEnraged = (!BossRushEvent.BossRushActive && malice) || enraged;
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive && malice;
Vector2 vector = npc.Center;
+2 -3
View File
@@ -67,12 +67,11 @@ namespace CalamityMod.NPCs.SlimeGod
if (CalamityGlobalNPC.slimeGodRed < 0 || !Main.npc[CalamityGlobalNPC.slimeGodRed].active)
CalamityGlobalNPC.slimeGodRed = npc.whoAmI;
bool enraged = calamityGlobalNPC.enraged > 0;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive;
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
bool death = CalamityWorld.death || npc.localAI[1] == 1f || BossRushEvent.BossRushActive;
npc.Calamity().CurrentlyEnraged = (!BossRushEvent.BossRushActive && malice) || enraged;
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive && malice;
Vector2 vector = npc.Center;
+2 -3
View File
@@ -67,12 +67,11 @@ namespace CalamityMod.NPCs.SlimeGod
if (CalamityGlobalNPC.slimeGodPurple < 0 || !Main.npc[CalamityGlobalNPC.slimeGodPurple].active)
CalamityGlobalNPC.slimeGodPurple = npc.whoAmI;
bool enraged = calamityGlobalNPC.enraged > 0;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive;
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
bool death = CalamityWorld.death || npc.localAI[1] == 1f || BossRushEvent.BossRushActive;
npc.Calamity().CurrentlyEnraged = (!BossRushEvent.BossRushActive && malice) || enraged;
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive && malice;
Vector2 vector = npc.Center;
+2 -3
View File
@@ -143,12 +143,11 @@ namespace CalamityMod.NPCs.StormWeaver
{
CalamityGlobalNPC calamityGlobalNPC = npc.Calamity();
bool enraged = calamityGlobalNPC.enraged > 0;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive;
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
npc.Calamity().CurrentlyEnraged = (!BossRushEvent.BossRushActive && malice) || enraged;
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive && malice;
if (invinceTime > 0)
{
+2 -3
View File
@@ -350,8 +350,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
CalamityMod.StopRain();
bool enraged = npc.Calamity().enraged > 0;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive;
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
@@ -541,7 +540,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
uDieLul = MathHelper.Clamp(uDieLul * 0.99f, 1f, 2f);
protectionBoost = false;
}
npc.Calamity().CurrentlyEnraged = !player.Hitbox.Intersects(safeBox) || enraged;
npc.Calamity().CurrentlyEnraged = !player.Hitbox.Intersects(safeBox);
// Set DR to be 99% and unbreakable if enraged. Boost DR during the 5th attack.
CalamityGlobalNPC global = npc.Calamity();
@@ -15,14 +15,14 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
2 - No longer spins before charging in final phase
3 - Creepers spread out from each other
4 - Creepers are immune to debuffs*/
public static bool BuffedBrainofCthulhuAI(NPC npc, bool enraged, Mod mod)
public static bool BuffedBrainofCthulhuAI(NPC npc, Mod mod)
{
CalamityGlobalNPC calamityGlobalNPC = npc.Calamity();
// whoAmI variable
NPC.crimsonBoss = npc.whoAmI;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive;
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
// Get a target
@@ -36,12 +36,12 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
float enrageScale = BossRushEvent.BossRushActive ? 1f : 0f;
if ((npc.position.Y / 16f) < Main.worldSurface || malice)
{
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive || enraged;
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive;
enrageScale += 1f;
}
if (!Main.player[npc.target].ZoneCrimson || malice)
{
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive || enraged;
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive;
enrageScale += 2f;
}
@@ -551,7 +551,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
return false;
}
public static bool BuffedCreeperAI(NPC npc, bool enraged, Mod mod)
public static bool BuffedCreeperAI(NPC npc, Mod mod)
{
// Despawn if Brain is gone
if (NPC.crimsonBoss < 0)
@@ -561,7 +561,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
return false;
}
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive;
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
// Get a target
+3 -3
View File
@@ -15,7 +15,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
// Master Mode changes
// 1 - Use more dangerous attacks more often,
// 2 - Cycles between attacks faster
public static bool BuffedCultistAI(NPC npc, bool enraged, Mod mod)
public static bool BuffedCultistAI(NPC npc, Mod mod)
{
CalamityGlobalNPC calamityGlobalNPC = npc.Calamity();
@@ -27,7 +27,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
float lifeRatio = npc.life / (float)npc.lifeMax;
// Phases
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive;
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
bool phase2 = lifeRatio < 0.85f;
bool phase3 = lifeRatio < 0.7f;
@@ -68,7 +68,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
idleTime = 30;
}
npc.Calamity().CurrentlyEnraged = (!BossRushEvent.BossRushActive && malice) || enraged;
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive && malice;
// Get a target
if (npc.target < 0 || npc.target == Main.maxPlayers || Main.player[npc.target].dead || !Main.player[npc.target].active)
@@ -15,11 +15,11 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
{
// Master Mode changes
// 1 - Splits like the Eater of Worlds
public static bool BuffedDestroyerAI(NPC npc, bool enraged, Mod mod)
public static bool BuffedDestroyerAI(NPC npc, Mod mod)
{
CalamityGlobalNPC calamityGlobalNPC = npc.Calamity();
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive;
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
// 10 seconds of resistance to prevent spawn killing
@@ -65,7 +65,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
float enrageScale = BossRushEvent.BossRushActive ? 1f : 0f;
if (Main.dayTime || malice)
{
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive || enraged;
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive;
enrageScale += 2f;
}
@@ -14,7 +14,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
// 1 - Cycles between attacks faster,
// 2 - Moves faster,
// 3 - Bigger tornadoes
public static bool BuffedDukeFishronAI(NPC npc, bool enraged, Mod mod)
public static bool BuffedDukeFishronAI(NPC npc, Mod mod)
{
CalamityGlobalNPC calamityGlobalNPC = npc.Calamity();
@@ -22,7 +22,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
float lifeRatio = npc.life / (float)npc.lifeMax;
// Variables
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive;
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
bool phase2 = lifeRatio < 0.7f;
bool phase3 = lifeRatio < 0.4f;
@@ -141,7 +141,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
(player.position.Y < 800f || player.position.Y > Main.worldSurface * 16.0 ||
(player.position.X > 6400f && player.position.X < (Main.maxTilesX * 16 - 6400)));
npc.Calamity().CurrentlyEnraged = (!BossRushEvent.BossRushActive && enrage) || enraged;
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive && enrage;
// If the player isn't in the ocean biome or Fishron is transitioning between phases, become immune
if (!phase3AI)
@@ -15,11 +15,11 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
2 - Each worm is 30 segments long and is immune to debuffs
3 - Worm heads push away from each other
4 - Vile Spits home in on the target slightly and no longer die when hit*/
public static bool BuffedEaterofWorldsAI(NPC npc, bool enraged, Mod mod)
public static bool BuffedEaterofWorldsAI(NPC npc, Mod mod)
{
CalamityGlobalNPC calamityGlobalNPC = npc.Calamity();
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive;
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
// Causes it to split far more in malice mode
@@ -40,12 +40,12 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
float enrageScale = BossRushEvent.BossRushActive ? 1f : 0f;
if ((npc.position.Y / 16f) < Main.worldSurface || malice)
{
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive || enraged;
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive;
enrageScale += 1f;
}
if (!Main.player[npc.target].ZoneCorrupt || malice)
{
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive || enraged;
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive;
enrageScale += 2f;
}
@@ -16,14 +16,14 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
2 - Damaging either eye causes damage to both
3 - Horizontal dashes are far more common
4 - The delay between dashes and horizontal dashes is reduced*/
public static bool BuffedEyeofCthulhuAI(NPC npc, bool enraged, Mod mod)
public static bool BuffedEyeofCthulhuAI(NPC npc, Mod mod)
{
CalamityGlobalNPC calamityGlobalNPC = npc.Calamity();
// Percent life remaining
float lifeRatio = npc.life / (float)npc.lifeMax;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive;
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
bool phase2 = lifeRatio < 0.75f;
bool phase3 = lifeRatio < 0.65f;
@@ -34,7 +34,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
float enrageScale = BossRushEvent.BossRushActive ? 1f : 0f;
if (Main.dayTime || malice)
{
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive || enraged;
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive;
enrageScale += 2f;
}
+9 -12
View File
@@ -14,7 +14,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
// 1 - Allow fists to travel further and faster,
// 2 - More projectiles,
// 3 - Fists can no longer be broken
public static bool BuffedGolemAI(NPC npc, bool enraged, Mod mod)
public static bool BuffedGolemAI(NPC npc, Mod mod)
{
CalamityGlobalNPC calamityGlobalNPC = npc.Calamity();
@@ -25,7 +25,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
float lifeRatio = npc.life / (float)npc.lifeMax;
// Phases
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive;
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
bool phase2 = lifeRatio < 0.75f;
bool phase3 = lifeRatio < 0.5f;
@@ -77,7 +77,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
if (malice)
enrage = true;
npc.Calamity().CurrentlyEnraged = (!BossRushEvent.BossRushActive && (enrage || turboEnrage)) || enraged;
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive && (enrage || turboEnrage);
bool reduceFallSpeed = npc.velocity.Y > 0f && npc.Bottom.Y > Main.player[npc.target].Top.Y;
@@ -403,9 +403,9 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
return false;
}
public static bool BuffedGolemFistAI(NPC npc, bool enraged, Mod mod)
public static bool BuffedGolemFistAI(NPC npc, Mod mod)
{
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive;
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
// Enrage if the target isn't inside the temple
@@ -630,10 +630,8 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
}
public static bool BuffedGolemHeadAI(NPC npc, bool enraged, Mod mod)
public static bool BuffedGolemHeadAI(NPC npc, Mod mod)
{
CalamityGlobalNPC calamityGlobalNPC = npc.Calamity();
// Don't collide
npc.noTileCollide = true;
@@ -655,7 +653,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
// Percent life remaining
float lifeRatio = npc.life / (float)npc.lifeMax;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive;
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
// Count body parts
@@ -872,7 +870,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
return false;
}
public static bool BuffedGolemHeadFreeAI(NPC npc, bool enraged, Mod mod)
public static bool BuffedGolemHeadFreeAI(NPC npc, Mod mod)
{
CalamityGlobalNPC calamityGlobalNPC = npc.Calamity();
@@ -894,10 +892,9 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
// Percent life remaining
float lifeRatio = npc.life / (float)npc.lifeMax;
float golemLifeRatio = Main.npc[NPC.golemBoss].life / (float)Main.npc[NPC.golemBoss].lifeMax;
float combinedRatio = lifeRatio + golemLifeRatio;
// Phases
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive;
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
bool phase2 = lifeRatio < 0.7f || golemLifeRatio < 0.85f;
bool phase3 = lifeRatio < 0.55f || golemLifeRatio < 0.7f;
@@ -16,19 +16,17 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
2 - Spawns a rainbow slime every 5% HP
3 - Teleports ahead of his target
4 - Can use a jump and slam like a Big Mimic*/
public static bool BuffedKingSlimeAI(NPC npc, bool enraged, Mod mod)
public static bool BuffedKingSlimeAI(NPC npc, Mod mod)
{
CalamityGlobalNPC calamityGlobalNPC = npc.Calamity();
// Variables
float num234 = 1f;
bool teleporting = false;
bool flag9 = false;
npc.aiAction = 0;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive;
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
npc.Calamity().CurrentlyEnraged = (!BossRushEvent.BossRushActive && malice) || enraged;
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive && malice;
// Get a target
if (npc.target < 0 || npc.target == Main.maxPlayers || Main.player[npc.target].dead || !Main.player[npc.target].active)
@@ -13,11 +13,11 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
{
// Master Mode changes
// 1 - Moon Lord is at maximum aggression at all times
public static bool BuffedMoonLordAI(NPC npc, bool enraged, Mod mod)
public static bool BuffedMoonLordAI(NPC npc, Mod mod)
{
CalamityGlobalNPC calamityGlobalNPC = npc.Calamity();
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive;
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
int aggressionLevel = 4;
@@ -44,7 +44,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
if (malice)
aggressionLevel = 5;
npc.Calamity().CurrentlyEnraged = (!BossRushEvent.BossRushActive && malice) || enraged;
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive && malice;
if (npc.type == NPCID.MoonLordCore)
{
@@ -16,11 +16,11 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
// 2 - Spawns far more tentacles to protect herself in phase 2 and they resist piercing,
// 3 - Spore gas spreads out far more,
// 4 - Plantera is larger
public static bool BuffedPlanteraAI(NPC npc, bool enraged, Mod mod)
public static bool BuffedPlanteraAI(NPC npc, Mod mod)
{
CalamityGlobalNPC calamityGlobalNPC = npc.Calamity();
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive;
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
// Get a target
@@ -130,7 +130,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
acceleration = 0.15f;
}
npc.Calamity().CurrentlyEnraged = (!BossRushEvent.BossRushActive && enrage) || enraged;
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive && enrage;
// Detect active tiles around Plantera
int radius = 20; // 20 tile radius
@@ -17,29 +17,29 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
2 - Charges start off slow but accelerate to insane speed after several frames, this delay becomes shorter for the second and third dashes
3 - Fires stingers in a triple spread and they accelerate over time
4 - All attacks inflict Venom*/
public static bool BuffedQueenBeeAI(NPC npc, bool enraged, Mod mod)
public static bool BuffedQueenBeeAI(NPC npc, Mod mod)
{
CalamityGlobalNPC calamityGlobalNPC = npc.Calamity();
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive;
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
float enrageScale = death ? 0.25f : 0f;
if ((npc.position.Y / 16f) < Main.worldSurface || malice)
{
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive || enraged;
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive;
enrageScale += 0.5f;
}
if (!Main.player[npc.target].ZoneJungle || malice)
{
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive || enraged;
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive;
enrageScale += 0.5f;
}
if (enrageScale > 1f)
enrageScale = 1f;
if (BossRushEvent.BossRushActive || enraged)
if (BossRushEvent.BossRushActive)
enrageScale = 2f;
// Percent life remaining
@@ -13,13 +13,13 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
// Master Mode changes
// 1 - Arms are immune to damage and Skeletron no longer has increased defense while the arms are alive,
// 2 - Moves far more aggressively
public static bool BuffedSkeletronAI(NPC npc, bool enraged, Mod mod)
public static bool BuffedSkeletronAI(NPC npc, Mod mod)
{
CalamityGlobalNPC calamityGlobalNPC = npc.Calamity();
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive;
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
npc.Calamity().CurrentlyEnraged = (!BossRushEvent.BossRushActive && malice) || enraged;
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive && malice;
Vector2 vectorCenter = npc.Center;
@@ -479,11 +479,11 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
return false;
}
public static bool BuffedSkeletronHandAI(NPC npc, bool enraged, Mod mod)
public static bool BuffedSkeletronHandAI(NPC npc, Mod mod)
{
CalamityGlobalNPC calamityGlobalNPC = npc.Calamity();
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive;
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
// Get a target
@@ -16,13 +16,13 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
// 1 - Charges far quicker,
// 2 - Arms and head accelerate extremely fast,
// 3 - Arms remain closer to the head and resist piercing
public static bool BuffedSkeletronPrimeAI(NPC npc, bool enraged, Mod mod)
public static bool BuffedSkeletronPrimeAI(NPC npc, Mod mod)
{
CalamityGlobalNPC calamityGlobalNPC = npc.Calamity();
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive;
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
npc.Calamity().CurrentlyEnraged = (!BossRushEvent.BossRushActive && malice) || enraged;
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive && malice;
// Get a target
if (npc.target < 0 || npc.target == Main.maxPlayers || Main.player[npc.target].dead || !Main.player[npc.target].active)
@@ -633,9 +633,9 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
return false;
}
public static bool BuffedPrimeLaserAI(NPC npc, bool enraged, Mod mod)
public static bool BuffedPrimeLaserAI(NPC npc, Mod mod)
{
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive;
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
// Get a target
@@ -899,9 +899,9 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
return false;
}
public static bool BuffedPrimeCannonAI(NPC npc, bool enraged, Mod mod)
public static bool BuffedPrimeCannonAI(NPC npc, Mod mod)
{
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive;
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
// Get a target
@@ -1188,10 +1188,10 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
return false;
}
public static bool BuffedPrimeViceAI(NPC npc, bool enraged, Mod mod)
public static bool BuffedPrimeViceAI(NPC npc, Mod mod)
{
bool death = CalamityWorld.death || BossRushEvent.BossRushActive || enraged;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged;
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive;
// Get a target
if (npc.target < 0 || npc.target == Main.maxPlayers || Main.player[npc.target].dead || !Main.player[npc.target].active)
@@ -1524,10 +1524,10 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
return false;
}
public static bool BuffedPrimeSawAI(NPC npc, bool enraged, Mod mod)
public static bool BuffedPrimeSawAI(NPC npc, Mod mod)
{
bool death = CalamityWorld.death || BossRushEvent.BossRushActive || enraged;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged;
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive;
// Get a target
if (npc.target < 0 || npc.target == Main.maxPlayers || Main.player[npc.target].dead || !Main.player[npc.target].active)
+6 -6
View File
@@ -327,11 +327,11 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
// 2 - Spazmatism moves and charges more often and faster, cycles attacks faster,
// 3 - Retinazer is slightly smaller and Spazmatism is slightly larger
#region Twins AI
public static bool BuffedRetinazerAI(NPC npc, bool enraged, Mod mod)
public static bool BuffedRetinazerAI(NPC npc, Mod mod)
{
CalamityGlobalNPC calamityGlobalNPC = npc.Calamity();
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive;
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
// Get a target
@@ -345,7 +345,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
float enrageScale = BossRushEvent.BossRushActive ? 0.5f : 0f;
if (Main.dayTime || malice)
{
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive || enraged;
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive;
enrageScale += 1f;
}
@@ -1025,11 +1025,11 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
return false;
}
public static bool BuffedSpazmatismAI(NPC npc, bool enraged, Mod mod)
public static bool BuffedSpazmatismAI(NPC npc, Mod mod)
{
CalamityGlobalNPC calamityGlobalNPC = npc.Calamity();
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive;
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
// Get a target
@@ -1043,7 +1043,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
float enrageScale = BossRushEvent.BossRushActive ? 0.5f : 0f;
if (Main.dayTime || malice)
{
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive || enraged;
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive;
enrageScale += 1f;
}
@@ -15,13 +15,13 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
// 2 - Moves quicker overall,
// 3 - Mouth vomits a tight spread of 3 demon scythes at the same time as its leech vomit,
// 4 - Eyes become immune to damage and stop firing when the wall drops below 15% health
public static bool BuffedWallofFleshAI(NPC npc, bool enraged, Mod mod)
public static bool BuffedWallofFleshAI(NPC npc, Mod mod)
{
CalamityGlobalNPC calamityGlobalNPC = npc.Calamity();
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive;
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
npc.Calamity().CurrentlyEnraged = (!BossRushEvent.BossRushActive && malice) || enraged;
npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive && malice;
// Despawn
if (npc.position.X < 160f || npc.position.X > ((Main.maxTilesX - 10) * 16))
@@ -409,11 +409,11 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
return false;
}
public static bool BuffedWallofFleshEyeAI(NPC npc, bool enraged, Mod mod)
public static bool BuffedWallofFleshEyeAI(NPC npc, Mod mod)
{
CalamityGlobalNPC calamityGlobalNPC = npc.Calamity();
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive;
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
// Despawn
+2 -4
View File
@@ -153,8 +153,7 @@ namespace CalamityMod.NPCs.Yharon
CalamityMod.StopRain();
// Variables
bool enraged2 = calamityGlobalNPC.enraged > 0;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive || enraged2;
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive;
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
@@ -339,7 +338,7 @@ namespace CalamityMod.NPCs.Yharon
else
{
enraged = !player.Hitbox.Intersects(safeBox);
npc.Calamity().CurrentlyEnraged = enraged || enraged2;
npc.Calamity().CurrentlyEnraged = enraged;
if (enraged)
{
phaseSwitchTimer = 15;
@@ -1605,7 +1604,6 @@ namespace CalamityMod.NPCs.Yharon
}
// Set DR based on protection boost (aka enrage)
bool chargeTelegraph = npc.ai[0] < 2f && npc.localAI[1] > 0f;
bool bulletHell = npc.ai[0] == 5f;
calamityGlobalNPC.DR = protectionBoost ? EnragedDR : normalDR;