Removed Boss Rush AI changes
This commit is contained in:
1 parent
64411ec4f6
commit
e3454e07bc
152 files changed
+1057
-1450
No files matched your search
@@ -50,9 +50,7 @@ namespace CalamityMod.NPCs.AquaticScourge
|
||||
NPC.dontCountMe = true;
|
||||
NPC.chaseable = false;
|
||||
|
||||
if (BossRushEvent.BossRushActive)
|
||||
NPC.scale *= 1.25f;
|
||||
else if (CalamityWorld.death)
|
||||
if (CalamityWorld.death || BossRushEvent.BossRushActive)
|
||||
NPC.scale *= 1.2f;
|
||||
else if (CalamityWorld.revenge)
|
||||
NPC.scale *= 1.15f;
|
||||
@@ -90,16 +88,15 @@ namespace CalamityMod.NPCs.AquaticScourge
|
||||
public override void AI()
|
||||
{
|
||||
CalamityGlobalNPC calamityGlobalNPC = NPC.Calamity();
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
|
||||
bool getFuckedAI = Main.zenithWorld;
|
||||
|
||||
// Adjust hostility and stats
|
||||
bool nonHostile = calamityGlobalNPC.newAI[0] == 0f;
|
||||
if (NPC.justHit || NPC.life <= NPC.lifeMax * 0.999 || bossRush || CalamityWorld.LegendaryMode)
|
||||
if (NPC.justHit || NPC.life <= NPC.lifeMax * 0.999 || BossRushEvent.BossRushActive || CalamityWorld.LegendaryMode)
|
||||
{
|
||||
if (nonHostile)
|
||||
{
|
||||
@@ -148,11 +145,11 @@ namespace CalamityMod.NPCs.AquaticScourge
|
||||
(player.position.X > 7680f && player.position.X < (Main.maxTilesX * 16 - 7680));
|
||||
}
|
||||
|
||||
bool biomeEnraged = NPC.localAI[2] <= 0f || bossRush;
|
||||
float enrageScale = bossRush ? 1f : 0f;
|
||||
bool biomeEnraged = NPC.localAI[2] <= 0f;
|
||||
float enrageScale = 0f;
|
||||
if (biomeEnraged)
|
||||
{
|
||||
NPC.Calamity().CurrentlyEnraged = !bossRush;
|
||||
NPC.Calamity().CurrentlyEnraged = true;
|
||||
enrageScale += 2f;
|
||||
}
|
||||
|
||||
|
||||
@@ -50,9 +50,7 @@ namespace CalamityMod.NPCs.AquaticScourge
|
||||
NPC.dontCountMe = true;
|
||||
NPC.chaseable = false;
|
||||
|
||||
if (BossRushEvent.BossRushActive)
|
||||
NPC.scale *= 1.25f;
|
||||
else if (CalamityWorld.death)
|
||||
if (CalamityWorld.death || BossRushEvent.BossRushActive)
|
||||
NPC.scale *= 1.2f;
|
||||
else if (CalamityWorld.revenge)
|
||||
NPC.scale *= 1.15f;
|
||||
@@ -90,16 +88,15 @@ namespace CalamityMod.NPCs.AquaticScourge
|
||||
public override void AI()
|
||||
{
|
||||
CalamityGlobalNPC calamityGlobalNPC = NPC.Calamity();
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
|
||||
bool getFuckedAI = Main.zenithWorld;
|
||||
|
||||
// Adjust hostility and stats
|
||||
bool nonHostile = calamityGlobalNPC.newAI[0] == 0f;
|
||||
if (NPC.justHit || NPC.life <= NPC.lifeMax * 0.999 || bossRush || CalamityWorld.LegendaryMode)
|
||||
if (NPC.justHit || NPC.life <= NPC.lifeMax * 0.999 || BossRushEvent.BossRushActive || CalamityWorld.LegendaryMode)
|
||||
{
|
||||
if (nonHostile)
|
||||
{
|
||||
@@ -148,11 +145,11 @@ namespace CalamityMod.NPCs.AquaticScourge
|
||||
(player.position.X > 7680f && player.position.X < (Main.maxTilesX * 16 - 7680));
|
||||
}
|
||||
|
||||
bool biomeEnraged = NPC.localAI[2] <= 0f || bossRush;
|
||||
float enrageScale = bossRush ? 1f : 0f;
|
||||
bool biomeEnraged = NPC.localAI[2] <= 0f;
|
||||
float enrageScale = 0f;
|
||||
if (biomeEnraged)
|
||||
{
|
||||
NPC.Calamity().CurrentlyEnraged = !bossRush;
|
||||
NPC.Calamity().CurrentlyEnraged = true;
|
||||
enrageScale += 2f;
|
||||
}
|
||||
|
||||
|
||||
@@ -77,9 +77,7 @@ namespace CalamityMod.NPCs.AquaticScourge
|
||||
NPC.DeathSound = SoundID.NPCDeath1;
|
||||
NPC.netAlways = true;
|
||||
|
||||
if (BossRushEvent.BossRushActive)
|
||||
NPC.scale *= 1.25f;
|
||||
else if (CalamityWorld.death)
|
||||
if (CalamityWorld.death || BossRushEvent.BossRushActive)
|
||||
NPC.scale *= 1.2f;
|
||||
else if (CalamityWorld.revenge)
|
||||
NPC.scale *= 1.15f;
|
||||
@@ -131,17 +129,16 @@ namespace CalamityMod.NPCs.AquaticScourge
|
||||
public override void AI()
|
||||
{
|
||||
CalamityGlobalNPC calamityGlobalNPC = NPC.Calamity();
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
|
||||
bool getFuckedAI = Main.zenithWorld;
|
||||
CalamityGlobalNPC.aquaticScourge = NPC.whoAmI;
|
||||
|
||||
// Adjust hostility and stats
|
||||
bool nonHostile = calamityGlobalNPC.newAI[0] == 0f;
|
||||
if (NPC.justHit || NPC.life <= NPC.lifeMax * 0.999 || bossRush || CalamityWorld.LegendaryMode)
|
||||
if (NPC.justHit || NPC.life <= NPC.lifeMax * 0.999 || BossRushEvent.BossRushActive || CalamityWorld.LegendaryMode)
|
||||
{
|
||||
if (nonHostile)
|
||||
{
|
||||
@@ -190,7 +187,7 @@ namespace CalamityMod.NPCs.AquaticScourge
|
||||
}
|
||||
|
||||
// Enrage
|
||||
if (notOcean && !player.Calamity().ZoneSulphur && !bossRush)
|
||||
if (notOcean && !player.Calamity().ZoneSulphur && !BossRushEvent.BossRushActive)
|
||||
{
|
||||
if (NPC.localAI[2] > 0f)
|
||||
NPC.localAI[2] -= 1f;
|
||||
@@ -198,12 +195,12 @@ namespace CalamityMod.NPCs.AquaticScourge
|
||||
else
|
||||
NPC.localAI[2] = CalamityGlobalNPC.biomeEnrageTimerMax;
|
||||
|
||||
bool biomeEnraged = NPC.localAI[2] <= 0f || bossRush;
|
||||
bool biomeEnraged = NPC.localAI[2] <= 0f;
|
||||
|
||||
float enrageScale = bossRush ? 1f : 0f;
|
||||
float enrageScale = 0f;
|
||||
if (biomeEnraged)
|
||||
{
|
||||
NPC.Calamity().CurrentlyEnraged = !bossRush;
|
||||
NPC.Calamity().CurrentlyEnraged = true;
|
||||
enrageScale += 2f;
|
||||
}
|
||||
|
||||
@@ -222,7 +219,7 @@ namespace CalamityMod.NPCs.AquaticScourge
|
||||
NPC.localAI[3] = colorFadeTimeAfterSpiral;
|
||||
|
||||
// Vomit acid mist
|
||||
float acidMistBarfDivisor = getFuckedAI ? 2f : ((float)Math.Floor(bossRush ? 4f : death ? 5f : 6f) * (phase3 ? 1.5f : 1f));
|
||||
float acidMistBarfDivisor = getFuckedAI ? 2f : ((float)Math.Floor(death ? 5f : 6f) * (phase3 ? 1.5f : 1f));
|
||||
if (calamityGlobalNPC.newAI[3] % acidMistBarfDivisor == 0f)
|
||||
{
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
@@ -238,7 +235,7 @@ namespace CalamityMod.NPCs.AquaticScourge
|
||||
}
|
||||
|
||||
// Vomit circular spreads of acid clouds while in phase 3
|
||||
float toxicCloudBarfDivisor = bossRush ? 20f : death ? 30f : 40f;
|
||||
float toxicCloudBarfDivisor = death ? 30f : 40f;
|
||||
if (calamityGlobalNPC.newAI[3] % toxicCloudBarfDivisor == 0f && phase3)
|
||||
{
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
@@ -351,7 +348,7 @@ namespace CalamityMod.NPCs.AquaticScourge
|
||||
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
int totalProjectiles = bossRush ? 10 : expertMode ? 8 : 6;
|
||||
int totalProjectiles = expertMode ? 8 : 6;
|
||||
if (phase3)
|
||||
totalProjectiles *= 2;
|
||||
|
||||
|
||||
@@ -48,9 +48,7 @@ namespace CalamityMod.NPCs.AquaticScourge
|
||||
NPC.dontCountMe = true;
|
||||
NPC.chaseable = false;
|
||||
|
||||
if (BossRushEvent.BossRushActive)
|
||||
NPC.scale *= 1.25f;
|
||||
else if (CalamityWorld.death)
|
||||
if (CalamityWorld.death || BossRushEvent.BossRushActive)
|
||||
NPC.scale *= 1.2f;
|
||||
else if (CalamityWorld.revenge)
|
||||
NPC.scale *= 1.15f;
|
||||
@@ -88,16 +86,15 @@ namespace CalamityMod.NPCs.AquaticScourge
|
||||
public override void AI()
|
||||
{
|
||||
CalamityGlobalNPC calamityGlobalNPC = NPC.Calamity();
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
|
||||
bool getFuckedAI = Main.zenithWorld;
|
||||
|
||||
// Adjust hostility and stats
|
||||
bool nonHostile = calamityGlobalNPC.newAI[0] == 0f;
|
||||
if (NPC.justHit || NPC.life <= NPC.lifeMax * 0.999 || bossRush || CalamityWorld.LegendaryMode)
|
||||
if (NPC.justHit || NPC.life <= NPC.lifeMax * 0.999 || BossRushEvent.BossRushActive || CalamityWorld.LegendaryMode)
|
||||
{
|
||||
if (nonHostile)
|
||||
{
|
||||
@@ -146,11 +143,11 @@ namespace CalamityMod.NPCs.AquaticScourge
|
||||
(player.position.X > 7680f && player.position.X < (Main.maxTilesX * 16 - 7680));
|
||||
}
|
||||
|
||||
bool biomeEnraged = NPC.localAI[2] <= 0f || bossRush;
|
||||
float enrageScale = bossRush ? 1f : 0f;
|
||||
bool biomeEnraged = NPC.localAI[2] <= 0f;
|
||||
float enrageScale = 0f;
|
||||
if (biomeEnraged)
|
||||
{
|
||||
NPC.Calamity().CurrentlyEnraged = !bossRush;
|
||||
NPC.Calamity().CurrentlyEnraged = true;
|
||||
enrageScale += 2f;
|
||||
}
|
||||
|
||||
|
||||
@@ -155,10 +155,9 @@ namespace CalamityMod.NPCs.AstrumAureus
|
||||
CalamityGlobalNPC.astrumAureus = NPC.whoAmI;
|
||||
|
||||
// Variables
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
|
||||
// Percent life remaining
|
||||
float lifeRatio = NPC.life / (float)NPC.lifeMax;
|
||||
@@ -195,10 +194,10 @@ namespace CalamityMod.NPCs.AstrumAureus
|
||||
NPC.localAI[3] -= death ? 4f : expertMode ? 2f : 1f;
|
||||
}
|
||||
|
||||
float enrageScale = bossRush ? 1f : 0f;
|
||||
if ((Main.IsItDay() && !player.Calamity().ZoneAstral) || bossRush)
|
||||
float enrageScale = 0f;
|
||||
if (Main.IsItDay() && !player.Calamity().ZoneAstral)
|
||||
{
|
||||
NPC.Calamity().CurrentlyEnraged = !bossRush;
|
||||
NPC.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive;
|
||||
enrageScale += 1f;
|
||||
}
|
||||
|
||||
@@ -277,7 +276,7 @@ namespace CalamityMod.NPCs.AstrumAureus
|
||||
{
|
||||
int type = ModContent.ProjectileType<AstralFlame>();
|
||||
int damage = NPC.GetProjectileDamage(type);
|
||||
int totalProjectiles = bossRush ? 14 : death ? 12 : revenge ? 10 : expertMode ? 8 : 6;
|
||||
int totalProjectiles = death ? 12 : revenge ? 10 : expertMode ? 8 : 6;
|
||||
float radians = MathHelper.TwoPi / totalProjectiles;
|
||||
float velocity = 10f;
|
||||
Vector2 spinningPoint = new Vector2(0f, -velocity);
|
||||
@@ -371,8 +370,8 @@ namespace CalamityMod.NPCs.AstrumAureus
|
||||
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
int maxProjectiles = !phase2 ? (bossRush ? 5 : 3) : (bossRush ? 7 : 5);
|
||||
int spread = !phase2 ? (bossRush ? 11 : 8) : (bossRush ? 12 : 10);
|
||||
int maxProjectiles = !phase2 ? 3 : 5;
|
||||
int spread = !phase2 ? 8 : 10;
|
||||
|
||||
int type = ModContent.ProjectileType<AstralLaser>();
|
||||
int damage = NPC.GetProjectileDamage(type);
|
||||
@@ -408,8 +407,8 @@ namespace CalamityMod.NPCs.AstrumAureus
|
||||
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
int maxProjectiles = !phase3 ? (bossRush ? 13 : death ? 11 : 9) : (bossRush ? 19 : death ? 17 : 15);
|
||||
int spread = !phase3 ? (bossRush ? 20 : death ? 18 : 16) : (bossRush ? 24 : death ? 22 : 20);
|
||||
int maxProjectiles = !phase3 ? (death ? 11 : 9) : (death ? 17 : 15);
|
||||
int spread = !phase3 ? (death ? 18 : 16) : (death ? 22 : 20);
|
||||
|
||||
int type = ModContent.ProjectileType<AstralLaser>();
|
||||
int damage = NPC.GetProjectileDamage(type);
|
||||
@@ -458,7 +457,7 @@ namespace CalamityMod.NPCs.AstrumAureus
|
||||
if (NPC.Distance(player.Center) < 240f)
|
||||
NPC.ai[1] += death ? 4f : expertMode ? 2f : 1f;
|
||||
|
||||
if (NPC.ai[1] >= 180f || bossRush)
|
||||
if (NPC.ai[1] >= 180f)
|
||||
{
|
||||
// Set AI to random state and reset other AI arrays
|
||||
NPC.TargetClosest();
|
||||
@@ -570,7 +569,7 @@ namespace CalamityMod.NPCs.AstrumAureus
|
||||
NPC.ai[1] += death ? 4f : expertMode ? 2f : 1f;
|
||||
}
|
||||
|
||||
if (NPC.ai[1] >= ((bossRush ? 270f : 360f) - (death ? 90f * (1f - lifeRatio) : 0f)))
|
||||
if (NPC.ai[1] >= (360f - (death ? 90f * (1f - lifeRatio) : 0f)))
|
||||
{
|
||||
// Collide with tiles again
|
||||
NPC.noTileCollide = false;
|
||||
@@ -736,7 +735,7 @@ namespace CalamityMod.NPCs.AstrumAureus
|
||||
{
|
||||
int type = Main.rand.NextBool() ? ModContent.ProjectileType<AstralLaser>() : ModContent.ProjectileType<AstralFlame>();
|
||||
int damage = NPC.GetProjectileDamage(type);
|
||||
int totalProjectiles = bossRush ? 14 : death ? 12 : revenge ? 10 : expertMode ? 8 : 6;
|
||||
int totalProjectiles = death ? 12 : revenge ? 10 : expertMode ? 8 : 6;
|
||||
float radians = MathHelper.TwoPi / totalProjectiles;
|
||||
float velocity = 10f;
|
||||
Vector2 spinningPoint = new Vector2(0f, -velocity);
|
||||
@@ -754,8 +753,8 @@ namespace CalamityMod.NPCs.AstrumAureus
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
float flameVelocity = 6f;
|
||||
int maxProjectiles = bossRush ? 4 : death ? 3 : 2;
|
||||
int spread = bossRush ? 36 : death ? 28 : 20;
|
||||
int maxProjectiles = death ? 3 : 2;
|
||||
int spread = death ? 28 : 20;
|
||||
|
||||
int type = ModContent.ProjectileType<AstralFlame>();
|
||||
int damage = NPC.GetProjectileDamage(type);
|
||||
@@ -777,8 +776,8 @@ namespace CalamityMod.NPCs.AstrumAureus
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
float laserVelocity = (CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? 7f : death ? 6f : 5f;
|
||||
int maxProjectiles = !phase3 ? (bossRush ? 13 : death ? 11 : 9) : (bossRush ? 17 : death ? 15 : 13);
|
||||
int spread = !phase3 ? (bossRush ? 20 : death ? 18 : 16) : (bossRush ? 24 : death ? 22 : 20);
|
||||
int maxProjectiles = !phase3 ? (death ? 11 : 9) : (death ? 15 : 13);
|
||||
int spread = !phase3 ? (death ? 18 : 16) : (death ? 22 : 20);
|
||||
|
||||
int type = ModContent.ProjectileType<AstralLaser>();
|
||||
int damage = NPC.GetProjectileDamage(type);
|
||||
@@ -905,7 +904,7 @@ namespace CalamityMod.NPCs.AstrumAureus
|
||||
NPC.localAI[2] += 1.25f;
|
||||
}
|
||||
|
||||
if (NPC.localAI[1] >= (bossRush ? 60f : death ? 180f : 240f))
|
||||
if (NPC.localAI[1] >= (death ? 180f : 240f))
|
||||
{
|
||||
// Reset localAI and find a teleport destination
|
||||
NPC.TargetClosest();
|
||||
|
||||
@@ -67,9 +67,7 @@ namespace CalamityMod.NPCs.AstrumDeus
|
||||
AIType = -1;
|
||||
NPC.knockBackResist = 0f;
|
||||
|
||||
if (BossRushEvent.BossRushActive)
|
||||
NPC.scale *= 1.5f;
|
||||
else if (CalamityWorld.death)
|
||||
if (CalamityWorld.death || BossRushEvent.BossRushActive)
|
||||
NPC.scale *= 1.4f;
|
||||
else if (CalamityWorld.revenge)
|
||||
NPC.scale *= 1.35f;
|
||||
@@ -115,15 +113,14 @@ namespace CalamityMod.NPCs.AstrumDeus
|
||||
CalamityGlobalNPC calamityGlobalNPC = NPC.Calamity();
|
||||
|
||||
// Difficulty variables
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
|
||||
float enrageScale = bossRush ? 0.5f : 0f;
|
||||
if (Main.IsItDay() || bossRush)
|
||||
float enrageScale = 0f;
|
||||
if (Main.IsItDay())
|
||||
{
|
||||
NPC.Calamity().CurrentlyEnraged = !bossRush;
|
||||
NPC.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive;
|
||||
enrageScale += 1.5f;
|
||||
}
|
||||
|
||||
|
||||
@@ -89,9 +89,7 @@ namespace CalamityMod.NPCs.AstrumDeus
|
||||
AIType = -1;
|
||||
NPC.knockBackResist = 0f;
|
||||
|
||||
if (BossRushEvent.BossRushActive)
|
||||
NPC.scale *= 1.5f;
|
||||
else if (CalamityWorld.death)
|
||||
if (CalamityWorld.death || BossRushEvent.BossRushActive)
|
||||
NPC.scale *= 1.4f;
|
||||
else if (CalamityWorld.revenge)
|
||||
NPC.scale *= 1.35f;
|
||||
@@ -149,15 +147,14 @@ namespace CalamityMod.NPCs.AstrumDeus
|
||||
CalamityGlobalNPC calamityGlobalNPC = NPC.Calamity();
|
||||
|
||||
// Difficulty variables
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
|
||||
float enrageScale = bossRush ? 0.5f : 0f;
|
||||
if (Main.IsItDay() || bossRush)
|
||||
float enrageScale = 0f;
|
||||
if (Main.IsItDay())
|
||||
{
|
||||
NPC.Calamity().CurrentlyEnraged = !bossRush;
|
||||
NPC.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive;
|
||||
enrageScale += 1.5f;
|
||||
}
|
||||
|
||||
|
||||
@@ -52,9 +52,7 @@ namespace CalamityMod.NPCs.AstrumDeus
|
||||
AIType = -1;
|
||||
NPC.knockBackResist = 0f;
|
||||
|
||||
if (BossRushEvent.BossRushActive)
|
||||
NPC.scale *= 1.5f;
|
||||
else if (CalamityWorld.death)
|
||||
if (CalamityWorld.death || BossRushEvent.BossRushActive)
|
||||
NPC.scale *= 1.4f;
|
||||
else if (CalamityWorld.revenge)
|
||||
NPC.scale *= 1.35f;
|
||||
@@ -98,15 +96,14 @@ namespace CalamityMod.NPCs.AstrumDeus
|
||||
CalamityGlobalNPC calamityGlobalNPC = NPC.Calamity();
|
||||
|
||||
// Difficulty variables
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
|
||||
float enrageScale = bossRush ? 0.5f : 0f;
|
||||
if (Main.IsItDay() || bossRush)
|
||||
float enrageScale = 0f;
|
||||
if (Main.IsItDay())
|
||||
{
|
||||
NPC.Calamity().CurrentlyEnraged = !bossRush;
|
||||
NPC.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive;
|
||||
enrageScale += 1.5f;
|
||||
}
|
||||
|
||||
|
||||
@@ -93,25 +93,18 @@ namespace CalamityMod.NPCs.BrimstoneElemental
|
||||
}
|
||||
|
||||
// Variables for buffing the AI
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
|
||||
// Percent life remaining for Brim
|
||||
float lifeRatio = Main.npc[CalamityGlobalNPC.brimstoneElemental].life / (float)Main.npc[CalamityGlobalNPC.brimstoneElemental].lifeMax;
|
||||
|
||||
// Enraged Brim checks
|
||||
bool biomeEnraged = Main.npc[CalamityGlobalNPC.brimstoneElemental].Calamity().newAI[3] <= 0f || bossRush;
|
||||
float enrageScale = bossRush ? 1f : 0f;
|
||||
if (biomeEnraged && (!Main.player[Main.npc[CalamityGlobalNPC.brimstoneElemental].target].ZoneUnderworldHeight || bossRush))
|
||||
{
|
||||
Main.npc[CalamityGlobalNPC.brimstoneElemental].Calamity().CurrentlyEnraged = !bossRush;
|
||||
bool biomeEnraged = Main.npc[CalamityGlobalNPC.brimstoneElemental].Calamity().newAI[3] <= 0f;
|
||||
float enrageScale = 0f;
|
||||
if (biomeEnraged && !Main.player[Main.npc[CalamityGlobalNPC.brimstoneElemental].target].ZoneUnderworldHeight)
|
||||
enrageScale += 1f;
|
||||
}
|
||||
if (biomeEnraged && (!Main.player[Main.npc[CalamityGlobalNPC.brimstoneElemental].target].Calamity().ZoneCalamity || bossRush))
|
||||
{
|
||||
Main.npc[CalamityGlobalNPC.brimstoneElemental].Calamity().CurrentlyEnraged = !bossRush;
|
||||
if (biomeEnraged && !Main.player[Main.npc[CalamityGlobalNPC.brimstoneElemental].target].Calamity().ZoneCalamity)
|
||||
enrageScale += 1f;
|
||||
}
|
||||
|
||||
// Brim phase checks
|
||||
bool brimIsAboutToTeleport = Main.npc[CalamityGlobalNPC.brimstoneElemental].ai[0] == 1f && Main.npc[CalamityGlobalNPC.brimstoneElemental].alpha == 0;
|
||||
|
||||
@@ -179,16 +179,15 @@ namespace CalamityMod.NPCs.BrimstoneElemental
|
||||
float lifeRatio = NPC.life / (float)NPC.lifeMax;
|
||||
|
||||
// Variables for buffing the AI
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
|
||||
bool phase2 = lifeRatio < 0.5f && revenge;
|
||||
bool phase3 = lifeRatio < 0.33f;
|
||||
|
||||
// Enrage
|
||||
if ((!player.ZoneUnderworldHeight || !player.Calamity().ZoneCalamity) && !bossRush)
|
||||
if ((!player.ZoneUnderworldHeight || !player.Calamity().ZoneCalamity) && !BossRushEvent.BossRushActive)
|
||||
{
|
||||
if (calamityGlobalNPC.newAI[3] > 0f)
|
||||
calamityGlobalNPC.newAI[3] -= 1f;
|
||||
@@ -196,17 +195,17 @@ namespace CalamityMod.NPCs.BrimstoneElemental
|
||||
else
|
||||
calamityGlobalNPC.newAI[3] = CalamityGlobalNPC.biomeEnrageTimerMax;
|
||||
|
||||
bool biomeEnraged = calamityGlobalNPC.newAI[3] <= 0f || bossRush;
|
||||
bool biomeEnraged = calamityGlobalNPC.newAI[3] <= 0f;
|
||||
|
||||
float enrageScale = bossRush ? 0.5f : 0f;
|
||||
if (biomeEnraged && (!player.ZoneUnderworldHeight || bossRush))
|
||||
float enrageScale = 0f;
|
||||
if (biomeEnraged && !player.ZoneUnderworldHeight)
|
||||
{
|
||||
NPC.Calamity().CurrentlyEnraged = !bossRush;
|
||||
NPC.Calamity().CurrentlyEnraged = true;
|
||||
enrageScale += 0.5f;
|
||||
}
|
||||
if (biomeEnraged && (!player.Calamity().ZoneCalamity || bossRush))
|
||||
if (biomeEnraged && !player.Calamity().ZoneCalamity)
|
||||
{
|
||||
NPC.Calamity().CurrentlyEnraged = !bossRush;
|
||||
NPC.Calamity().CurrentlyEnraged = true;
|
||||
enrageScale += 1f;
|
||||
}
|
||||
|
||||
@@ -336,7 +335,7 @@ namespace CalamityMod.NPCs.BrimstoneElemental
|
||||
{
|
||||
NPC.localAI[1] += 1f;
|
||||
|
||||
if (NPC.localAI[1] >= (bossRush ? 90f : death ? 120f : 180f))
|
||||
if (NPC.localAI[1] >= (death ? 120f : 180f))
|
||||
{
|
||||
NPC.TargetClosest();
|
||||
NPC.localAI[1] = 0f;
|
||||
@@ -390,7 +389,7 @@ namespace CalamityMod.NPCs.BrimstoneElemental
|
||||
Main.dust[dust].noGravity = true;
|
||||
Main.dust[dust].fadeIn = 1f;
|
||||
}
|
||||
NPC.alpha += bossRush ? 8 : death ? 5 : revenge ? 4 : expertMode ? 3 : 2;
|
||||
NPC.alpha += death ? 5 : revenge ? 4 : expertMode ? 3 : 2;
|
||||
if (NPC.alpha >= 255)
|
||||
{
|
||||
int spawnType = currentMode == 3 ? NPCID.AngryNimbus : ModContent.NPCType<Brimling>();
|
||||
@@ -696,7 +695,7 @@ namespace CalamityMod.NPCs.BrimstoneElemental
|
||||
|
||||
Vector2 source = new Vector2(NPC.Center.X + (NPC.spriteDirection > 0 ? 34f : -34f), NPC.Center.Y - 74f);
|
||||
Vector2 aimAt = player.Center + player.velocity * 20f;
|
||||
float aimResponsiveness = bossRush ? 0.05f : (NPC.ai[2] == 1f || death) ? 0.1f : 0.25f;
|
||||
float aimResponsiveness = (NPC.ai[2] == 1f || death) ? 0.1f : 0.25f;
|
||||
|
||||
Vector2 aimVector = (aimAt - source).SafeNormalize(Vector2.UnitY);
|
||||
if (aimVector.HasNaNs())
|
||||
|
||||
@@ -132,10 +132,9 @@ namespace CalamityMod.NPCs.Bumblebirb
|
||||
// Variables
|
||||
float rotationMult = 3f;
|
||||
float rotationAmt = 0.03f;
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
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;
|
||||
@@ -148,7 +147,7 @@ namespace CalamityMod.NPCs.Bumblebirb
|
||||
NPC.buffImmune[BuffID.Webbed] = immuneToSlowingDebuffs;
|
||||
|
||||
// If target is outside the jungle for more than 5 seconds, enrage
|
||||
if (!player.ZoneJungle)
|
||||
if (!player.ZoneJungle && !BossRushEvent.BossRushActive)
|
||||
{
|
||||
if (NPC.localAI[1] < CalamityGlobalNPC.biomeEnrageTimerMax)
|
||||
NPC.localAI[1] += 1f;
|
||||
@@ -162,13 +161,13 @@ namespace CalamityMod.NPCs.Bumblebirb
|
||||
|
||||
// Enrage scale
|
||||
float enrageScale = death ? 1.5f : 1f;
|
||||
if (NPC.localAI[1] >= CalamityGlobalNPC.biomeEnrageTimerMax || bossRush)
|
||||
if (NPC.localAI[1] >= CalamityGlobalNPC.biomeEnrageTimerMax)
|
||||
{
|
||||
NPC.Calamity().CurrentlyEnraged = !bossRush;
|
||||
NPC.Calamity().CurrentlyEnraged = true;
|
||||
enrageScale += 1f;
|
||||
}
|
||||
|
||||
if (NPC.localAI[2] > 0f || bossRush)
|
||||
if (NPC.localAI[2] > 0f)
|
||||
enrageScale += 1f;
|
||||
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
@@ -223,8 +222,8 @@ namespace CalamityMod.NPCs.Bumblebirb
|
||||
bool phaseSwitchPhase = (phase2 && calamityGlobalNPC.newAI[0] < newPhaseTimer && calamityGlobalNPC.newAI[2] != 1f) ||
|
||||
(phase3 && calamityGlobalNPC.newAI[1] < newPhaseTimer && calamityGlobalNPC.newAI[3] != 1f);
|
||||
|
||||
calamityGlobalNPC.DR = (phaseSwitchPhase || NPC.ai[0] == 5f || (enrageScale == 3f && !bossRush)) ? (bossRush ? 0.99f : 0.55f) : 0.1f;
|
||||
calamityGlobalNPC.CurrentlyIncreasingDefenseOrDR = phaseSwitchPhase || NPC.ai[0] == 5f || (enrageScale == 3f && !bossRush);
|
||||
calamityGlobalNPC.DR = phaseSwitchPhase || NPC.ai[0] == 5f || enrageScale == 3f ? 0.55f : 0.1f;
|
||||
calamityGlobalNPC.CurrentlyIncreasingDefenseOrDR = phaseSwitchPhase || NPC.ai[0] == 5f || enrageScale == 3f;
|
||||
|
||||
int reducedSetDamage = (int)Math.Round(NPC.defDamage * 0.5);
|
||||
|
||||
|
||||
@@ -137,10 +137,9 @@ namespace CalamityMod.NPCs.CalClone
|
||||
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 bossRush = BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
|
||||
// Percent life remaining
|
||||
float lifeRatio = NPC.life / (float)NPC.lifeMax;
|
||||
@@ -289,10 +288,10 @@ namespace CalamityMod.NPCs.CalClone
|
||||
// Target variable
|
||||
Player player = Main.player[NPC.target];
|
||||
|
||||
float enrageScale = bossRush ? 1f : 0f;
|
||||
if (Main.IsItDay() || bossRush)
|
||||
float enrageScale = 0f;
|
||||
if (Main.IsItDay())
|
||||
{
|
||||
NPC.Calamity().CurrentlyEnraged = !bossRush;
|
||||
NPC.Calamity().CurrentlyEnraged = true;
|
||||
enrageScale += 2f;
|
||||
}
|
||||
|
||||
@@ -301,16 +300,6 @@ namespace CalamityMod.NPCs.CalClone
|
||||
Vector2 lookAt = new Vector2(player.position.X - (player.width / 2), player.position.Y - (player.height / 2));
|
||||
Vector2 rotationVector = npcCenter - lookAt;
|
||||
|
||||
// Boss Rush predictive charge rotation
|
||||
if (NPC.ai[1] == 4f && phase4 && bossRush)
|
||||
{
|
||||
// Velocity
|
||||
float chargeVelocity = 30f;
|
||||
chargeVelocity += 5f * enrageScale;
|
||||
lookAt += Main.player[NPC.target].velocity * 20f;
|
||||
rotationVector = Vector2.Normalize(npcCenter - lookAt) * chargeVelocity;
|
||||
}
|
||||
|
||||
float rotation = (float)Math.Atan2(rotationVector.Y, rotationVector.X) + MathHelper.PiOver2;
|
||||
if (rotation < 0f)
|
||||
rotation += MathHelper.TwoPi;
|
||||
@@ -464,7 +453,7 @@ namespace CalamityMod.NPCs.CalClone
|
||||
type = ModContent.ProjectileType<SCalBrimstoneGigablast>();
|
||||
|
||||
float gigaBlastFrequency = (CalamityWorld.LegendaryMode ? 120f : expertMode ? 180f : 240f) - enrageScale * 15f;
|
||||
float projSpeed = bossRush ? 6.25f : 5f;
|
||||
float projSpeed = 5f;
|
||||
if (calamityGlobalNPC.newAI[3] <= 300f)
|
||||
{
|
||||
if (calamityGlobalNPC.newAI[3] % gigaBlastFrequency == 0f) // Blasts from top
|
||||
@@ -493,7 +482,7 @@ namespace CalamityMod.NPCs.CalClone
|
||||
{
|
||||
int type = ModContent.ProjectileType<BrimstoneHellblast2>();
|
||||
int damage = NPC.GetProjectileDamage(type);
|
||||
float projSpeed = bossRush ? 4.5f : 4f;
|
||||
float projSpeed = 4f;
|
||||
// Blasts aimed directly at the player's horizontal position, does not spawn during the second bullet hell
|
||||
if (calamityGlobalNPC.newAI[3] % (hellblastGateValue * 6f) == 0f && calamityGlobalNPC.newAI[2] != 2f)
|
||||
{
|
||||
@@ -618,7 +607,7 @@ namespace CalamityMod.NPCs.CalClone
|
||||
{
|
||||
int type = ModContent.ProjectileType<BrimstoneHellblast2>();
|
||||
int damage = NPC.GetProjectileDamage(type);
|
||||
float projSpeed = bossRush ? 5f : 4f;
|
||||
float projSpeed = 4f;
|
||||
if (calamityGlobalNPC.newAI[3] % (hellblastGateValue * 6f) == 0f)
|
||||
{
|
||||
float distance = Main.rand.NextBool() ? -1000f : 1000f;
|
||||
@@ -768,7 +757,7 @@ namespace CalamityMod.NPCs.CalClone
|
||||
float chargeVelocity = phase4 ? 30f : death ? 28f : 25f;
|
||||
chargeVelocity += 5f * enrageScale;
|
||||
|
||||
Vector2 vector = Vector2.Normalize(player.Center + (phase4 && bossRush ? player.velocity * 20f : Vector2.Zero) - NPC.Center);
|
||||
Vector2 vector = Vector2.Normalize(player.Center - NPC.Center);
|
||||
NPC.velocity = vector * chargeVelocity;
|
||||
|
||||
NPC.ai[1] = 3f;
|
||||
|
||||
@@ -145,10 +145,9 @@ namespace CalamityMod.NPCs.CalClone
|
||||
// Emit light
|
||||
Lighting.AddLight((int)((NPC.position.X + (NPC.width / 2)) / 16f), (int)((NPC.position.Y + (NPC.height / 2)) / 16f), 1f, 0f, 0f);
|
||||
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
|
||||
// Get a target
|
||||
if (NPC.target < 0 || NPC.target == Main.maxPlayers || Main.player[NPC.target].dead || !Main.player[NPC.target].active)
|
||||
@@ -156,10 +155,10 @@ namespace CalamityMod.NPCs.CalClone
|
||||
|
||||
Player player = Main.player[NPC.target];
|
||||
|
||||
float enrageScale = bossRush ? 1f : 0f;
|
||||
if (Main.IsItDay() || bossRush)
|
||||
float enrageScale = 0f;
|
||||
if (Main.IsItDay())
|
||||
{
|
||||
NPC.Calamity().CurrentlyEnraged = !bossRush;
|
||||
NPC.Calamity().CurrentlyEnraged = true;
|
||||
enrageScale += 2f;
|
||||
}
|
||||
|
||||
@@ -378,10 +377,8 @@ namespace CalamityMod.NPCs.CalClone
|
||||
|
||||
int type = ModContent.ProjectileType<BrimstoneBarrage>();
|
||||
int damage = NPC.GetProjectileDamage(ModContent.ProjectileType<BrimstoneFire>());
|
||||
if (bossRush)
|
||||
damage /= 2;
|
||||
|
||||
int totalProjectiles = bossRush ? 12 : death ? 10 : revenge ? 8 : expertMode ? 6 : 4;
|
||||
int totalProjectiles = death ? 10 : revenge ? 8 : expertMode ? 6 : 4;
|
||||
float radians = MathHelper.TwoPi / totalProjectiles;
|
||||
float velocity = 5f;
|
||||
Vector2 spinningPoint = new Vector2(0f, -velocity);
|
||||
|
||||
@@ -139,10 +139,9 @@ namespace CalamityMod.NPCs.CalClone
|
||||
// Emit light
|
||||
Lighting.AddLight((int)((NPC.position.X + (NPC.width / 2)) / 16f), (int)((NPC.position.Y + (NPC.height / 2)) / 16f), 1f, 0f, 0f);
|
||||
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
|
||||
// Get a target
|
||||
if (NPC.target < 0 || NPC.target == Main.maxPlayers || Main.player[NPC.target].dead || !Main.player[NPC.target].active)
|
||||
@@ -150,10 +149,10 @@ namespace CalamityMod.NPCs.CalClone
|
||||
|
||||
Player player = Main.player[NPC.target];
|
||||
|
||||
float enrageScale = bossRush ? 1f : 0f;
|
||||
if (Main.IsItDay() || bossRush)
|
||||
float enrageScale = 0f;
|
||||
if (Main.IsItDay())
|
||||
{
|
||||
NPC.Calamity().CurrentlyEnraged = !bossRush;
|
||||
NPC.Calamity().CurrentlyEnraged = true;
|
||||
enrageScale += 2f;
|
||||
}
|
||||
|
||||
@@ -369,10 +368,8 @@ namespace CalamityMod.NPCs.CalClone
|
||||
|
||||
int type = ModContent.ProjectileType<BrimstoneBarrage>();
|
||||
int damage = NPC.GetProjectileDamage(ModContent.ProjectileType<BrimstoneBall>());
|
||||
if (bossRush)
|
||||
damage /= 2;
|
||||
|
||||
int totalProjectiles = bossRush ? 12 : death ? 10 : revenge ? 8 : expertMode ? 6 : 4;
|
||||
int totalProjectiles = death ? 10 : revenge ? 8 : expertMode ? 6 : 4;
|
||||
float radians = MathHelper.TwoPi / totalProjectiles;
|
||||
float velocity = 5f;
|
||||
Vector2 spinningPoint = new Vector2(0f, -velocity);
|
||||
|
||||
@@ -3705,7 +3705,7 @@ namespace CalamityMod.NPCs
|
||||
if (CalamityWorld.revenge)
|
||||
{
|
||||
if (EaterOfWorldsIDList.Includes(npc.type) && newAI[1] < EaterOfWorldsAI.DRIncreaseTime)
|
||||
modifiers.FinalDamage *= 1f - (float)Math.Sqrt(MathHelper.Lerp(BossRushEvent.BossRushActive ? 0.6f : 0f, 0.99f, MathHelper.Clamp(1f - newAI[1] / EaterOfWorldsAI.DRIncreaseTime, 0f, 1f)));
|
||||
modifiers.FinalDamage *= 1f - (float)Math.Sqrt(MathHelper.Lerp(0f, 0.99f, MathHelper.Clamp(1f - newAI[1] / EaterOfWorldsAI.DRIncreaseTime, 0f, 1f)));
|
||||
if (DestroyerIDList.Includes(npc.type) && newAI[1] < DestroyerAI.DRIncreaseTime)
|
||||
modifiers.FinalDamage *= 1f - (float)Math.Sqrt(MathHelper.Lerp(0f, 0.99f, MathHelper.Clamp(1f - newAI[1] / DestroyerAI.DRIncreaseTime, 0f, 1f)));
|
||||
}
|
||||
@@ -3847,15 +3847,12 @@ namespace CalamityMod.NPCs
|
||||
#region Boss Head Slot
|
||||
public override void BossHeadSlot(NPC npc, ref int index)
|
||||
{
|
||||
if (CalamityWorld.revenge || BossRushEvent.BossRushActive)
|
||||
if (npc.type == NPCID.DukeFishron && (CalamityWorld.death || BossRushEvent.BossRushActive))
|
||||
{
|
||||
if (npc.type == NPCID.DukeFishron && (CalamityWorld.death || BossRushEvent.BossRushActive))
|
||||
{
|
||||
float lifeRatio = npc.life / (float)npc.lifeMax;
|
||||
float mapIconVanishValue = CalamityWorld.death ? 0.3f : 0.4f;
|
||||
if (lifeRatio < mapIconVanishValue || (lifeRatio > 0.9f && (CalamityWorld.death || BossRushEvent.BossRushActive)))
|
||||
index = -1;
|
||||
}
|
||||
float lifeRatio = npc.life / (float)npc.lifeMax;
|
||||
float mapIconVanishValue = 0.3f;
|
||||
if (lifeRatio < mapIconVanishValue || lifeRatio > 0.9f)
|
||||
index = -1;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@@ -8311,7 +8308,7 @@ namespace CalamityMod.NPCs
|
||||
// Laser telegraph
|
||||
else if (npc.type == NPCID.Probe)
|
||||
{
|
||||
float eyeTelegraphGateValue = (NPC.IsMechQueenUp ? DestroyerAI.ProbeLaserGateValue_Mechdusa : BossRushEvent.BossRushActive ? DestroyerAI.ProbeLaserGateValue_BossRush : revenge ? DestroyerAI.ProbeLaserGateValue_Rev : DestroyerAI.ProbeLaserGateValue) - DestroyerAI.ProbeLaserTelegraphTime;
|
||||
float eyeTelegraphGateValue = (NPC.IsMechQueenUp ? DestroyerAI.ProbeLaserGateValue_Mechdusa : revenge ? DestroyerAI.ProbeLaserGateValue_Rev : DestroyerAI.ProbeLaserGateValue) - DestroyerAI.ProbeLaserTelegraphTime;
|
||||
Texture2D glowTexture = Request<Texture2D>("CalamityMod/Particles/Sparkle").Value;
|
||||
Vector2 halfSize = npc.frame.Size() / 2;
|
||||
|
||||
|
||||
@@ -133,10 +133,9 @@ namespace CalamityMod.NPCs.CeaselessVoid
|
||||
double lifeRatio = NPC.life / (double)NPC.lifeMax;
|
||||
|
||||
// Difficulty modes
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
|
||||
// Phases
|
||||
bool phase2 = lifeRatio <= 0.7;
|
||||
@@ -188,7 +187,7 @@ namespace CalamityMod.NPCs.CeaselessVoid
|
||||
Player player = Main.player[NPC.target];
|
||||
|
||||
// Speed enrage
|
||||
bool moveVeryFast = Vector2.Distance(NPC.Center, player.Center) > 960f || (!player.ZoneDungeon && !bossRush && player.position.Y < Main.worldSurface * 16.0);
|
||||
bool moveVeryFast = Vector2.Distance(NPC.Center, player.Center) > 960f || (!player.ZoneDungeon && !BossRushEvent.BossRushActive && player.position.Y < Main.worldSurface * 16.0);
|
||||
|
||||
// Despawn
|
||||
if (!player.active || player.dead || Vector2.Distance(player.Center, NPC.Center) > 5600f)
|
||||
@@ -212,8 +211,8 @@ namespace CalamityMod.NPCs.CeaselessVoid
|
||||
else if (NPC.timeLeft < 1800)
|
||||
NPC.timeLeft = 1800;
|
||||
|
||||
float tileEnrageMult = (CalamityWorld.LegendaryMode && revenge) ? 1.5f : bossRush ? 1.375f : 1f;
|
||||
NPC.Calamity().CurrentlyEnraged = tileEnrageMult > 1f && !bossRush;
|
||||
float tileEnrageMult = (CalamityWorld.LegendaryMode && revenge) ? 1.5f : 1f;
|
||||
NPC.Calamity().CurrentlyEnraged = tileEnrageMult > 1f && !BossRushEvent.BossRushActive;
|
||||
|
||||
// Set AI variable to be used by Dark Energies
|
||||
NPC.ai[1] = tileEnrageMult;
|
||||
@@ -229,7 +228,7 @@ namespace CalamityMod.NPCs.CeaselessVoid
|
||||
if (!anyDarkEnergies)
|
||||
{
|
||||
// This is here because it's used in multiple places
|
||||
float suckDistance = (CalamityWorld.LegendaryMode && revenge) ? 2400f : bossRush ? 1920f : death ? 1600f : revenge ? 1440f : expertMode ? 1280f : 1040f;
|
||||
float suckDistance = (CalamityWorld.LegendaryMode && revenge) ? 2400f : death ? 1600f : revenge ? 1440f : expertMode ? 1280f : 1040f;
|
||||
|
||||
// Move closer to the target before trying to succ
|
||||
if (movingDuringSuccPhase)
|
||||
@@ -344,9 +343,9 @@ namespace CalamityMod.NPCs.CeaselessVoid
|
||||
{
|
||||
if (calamityGlobalNPC.newAI[1] == 0f)
|
||||
{
|
||||
int numBeamPortals = bossRush ? 4 : revenge ? 3 : 2;
|
||||
int numBeamPortals = revenge ? 3 : 2;
|
||||
float degrees = 360 / numBeamPortals;
|
||||
float beamPortalDistance = bossRush ? 360f : death ? 400f : revenge ? 420f : expertMode ? 440f : 480f;
|
||||
float beamPortalDistance = death ? 400f : revenge ? 420f : expertMode ? 440f : 480f;
|
||||
int type = ProjectileType<DoGBeamPortal>();
|
||||
int damage = NPC.GetProjectileDamage(type);
|
||||
for (int i = 0; i < numBeamPortals; i++)
|
||||
@@ -489,7 +488,7 @@ namespace CalamityMod.NPCs.CeaselessVoid
|
||||
}
|
||||
|
||||
// Destroy all Dark Energies if their total HP is below 20%
|
||||
int darkEnergyMaxHP = bossRush ? DarkEnergy.MaxBossRushHP : DarkEnergy.MaxHP;
|
||||
int darkEnergyMaxHP = BossRushEvent.BossRushActive ? DarkEnergy.MaxBossRushHP : DarkEnergy.MaxHP;
|
||||
//These are still needed so that CV Dark energy despawn works properly
|
||||
double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01;
|
||||
darkEnergyMaxHP += (int)(darkEnergyMaxHP * HPBoost);
|
||||
@@ -533,8 +532,8 @@ namespace CalamityMod.NPCs.CeaselessVoid
|
||||
// Basic movement towards a location
|
||||
void Movement(bool succ)
|
||||
{
|
||||
float velocity = moveVeryFast ? 25f : bossRush ? 15f : ((expertMode ? 7.5f : 6f) + (float)(death ? 2f * (1D - lifeRatio) : 0f)) * tileEnrageMult;
|
||||
float acceleration = (moveVeryFast ? 0.75f : bossRush ? 0.3f : death ? 0.2f : expertMode ? 0.16f : 0.12f) + (float)(death ? 0.04f * (1D - lifeRatio) : 0f) * tileEnrageMult;
|
||||
float velocity = moveVeryFast ? 25f : ((expertMode ? 7.5f : 6f) + (float)(death ? 2f * (1D - lifeRatio) : 0f)) * tileEnrageMult;
|
||||
float acceleration = (moveVeryFast ? 0.75f : death ? 0.2f : expertMode ? 0.16f : 0.12f) + (float)(death ? 0.04f * (1D - lifeRatio) : 0f) * tileEnrageMult;
|
||||
|
||||
// Increase speed dramatically in succ phase
|
||||
if (succ)
|
||||
@@ -565,7 +564,7 @@ namespace CalamityMod.NPCs.CeaselessVoid
|
||||
{
|
||||
// Move to a new location every few seconds
|
||||
calamityGlobalNPC.newAI[2] += 1f;
|
||||
float newPositionGateValue = bossRush ? 120f : death ? 180f : revenge ? 210f : expertMode ? 240f : 300f;
|
||||
float newPositionGateValue = death ? 180f : revenge ? 210f : expertMode ? 240f : 300f;
|
||||
if (calamityGlobalNPC.newAI[2] > newPositionGateValue)
|
||||
{
|
||||
calamityGlobalNPC.newAI[2] = 0f;
|
||||
|
||||
@@ -157,16 +157,15 @@ namespace CalamityMod.NPCs.CeaselessVoid
|
||||
NPC.timeLeft = 1800;
|
||||
|
||||
// Difficulty modes
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
|
||||
// Gets how enraged Ceaseless Void is
|
||||
float tileEnrageMult = Main.npc[CalamityGlobalNPC.voidBoss].ai[1];
|
||||
|
||||
// Distance from Ceaseless Void
|
||||
double maxDistance = bossRush ? 1200D : death ? 1040D : revenge ? 960D : expertMode ? 880D : minMaxDistance;
|
||||
double maxDistance = death ? 1040D : revenge ? 960D : expertMode ? 880D : minMaxDistance;
|
||||
double rateOfChangeIncrease = (maxDistance / minMaxDistance) - 1D;
|
||||
double rateOfChange = (NPC.ai[1] * 0.5f) + 2D + (tileEnrageMult - 1f) + rateOfChangeIncrease;
|
||||
if (NPC.Calamity().newAI[0] == 0f)
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace CalamityMod.NPCs.Crabulon
|
||||
|
||||
NPC.lifeMax = CalamityWorld.LegendaryMode ? 180 : 15;
|
||||
if (BossRushEvent.BossRushActive)
|
||||
NPC.lifeMax = 8000;
|
||||
NPC.lifeMax = 6000;
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
NPC.lifeMax *= 2;
|
||||
AIType = -1;
|
||||
@@ -66,7 +66,7 @@ namespace CalamityMod.NPCs.Crabulon
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
|
||||
float xVelocityLimit = BossRushEvent.BossRushActive ? 12f : death ? 8f : revenge ? 6f : 5f;
|
||||
float xVelocityLimit = death ? 8f : revenge ? 6f : 5f;
|
||||
float yVelocityLimit = CalamityWorld.LegendaryMode ? 0.25f : death ? 0.75f : revenge ? 0.9f : 1f;
|
||||
|
||||
// Get a target
|
||||
|
||||
+16
-17
@@ -129,10 +129,9 @@ namespace CalamityMod.NPCs.Crabulon
|
||||
{
|
||||
Lighting.AddLight(NPC.Center, 0f, 0.3f, 0.7f);
|
||||
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
|
||||
NPC.spriteDirection = NPC.direction;
|
||||
|
||||
@@ -183,7 +182,7 @@ namespace CalamityMod.NPCs.Crabulon
|
||||
NPC.timeLeft = 1800;
|
||||
|
||||
// Enrage
|
||||
if ((!player.ZoneGlowshroom || (NPC.position.Y / 16f) < Main.worldSurface) && !bossRush)
|
||||
if ((!player.ZoneGlowshroom || (NPC.position.Y / 16f) < Main.worldSurface) && !BossRushEvent.BossRushActive)
|
||||
{
|
||||
if (biomeEnrageTimer > 0)
|
||||
biomeEnrageTimer--;
|
||||
@@ -191,17 +190,17 @@ namespace CalamityMod.NPCs.Crabulon
|
||||
else
|
||||
biomeEnrageTimer = CalamityGlobalNPC.biomeEnrageTimerMax;
|
||||
|
||||
bool biomeEnraged = biomeEnrageTimer <= 0 || bossRush;
|
||||
bool biomeEnraged = biomeEnrageTimer <= 0;
|
||||
|
||||
float enrageScale = bossRush ? 1f : 0f;
|
||||
if (biomeEnraged && ((NPC.position.Y / 16f) < Main.worldSurface || bossRush))
|
||||
float enrageScale = 0f;
|
||||
if (biomeEnraged && (NPC.position.Y / 16f) < Main.worldSurface)
|
||||
{
|
||||
NPC.Calamity().CurrentlyEnraged = !bossRush;
|
||||
NPC.Calamity().CurrentlyEnraged = true;
|
||||
enrageScale += 1f;
|
||||
}
|
||||
if (biomeEnraged && (!player.ZoneGlowshroom || bossRush))
|
||||
if (biomeEnraged && !player.ZoneGlowshroom)
|
||||
{
|
||||
NPC.Calamity().CurrentlyEnraged = !bossRush;
|
||||
NPC.Calamity().CurrentlyEnraged = true;
|
||||
enrageScale += 1f;
|
||||
}
|
||||
|
||||
@@ -406,7 +405,7 @@ namespace CalamityMod.NPCs.Crabulon
|
||||
NPC.ai[1] += 1f;
|
||||
}
|
||||
|
||||
float jumpGateValue = (bossRush ? 15f : expertMode ? 60f : 120f) / (enrageScale + 1f);
|
||||
float jumpGateValue = (expertMode ? 60f : 120f) / (enrageScale + 1f);
|
||||
if (NPC.ai[1] >= jumpGateValue)
|
||||
{
|
||||
NPC.ai[1] = -20f;
|
||||
@@ -521,13 +520,13 @@ namespace CalamityMod.NPCs.Crabulon
|
||||
SoundEngine.PlaySound(SoundID.Item42, NPC.Center);
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
float projectileVelocity = BossRushEvent.BossRushActive ? 24f : CalamityWorld.death ? 15f : 10f;
|
||||
float projectileVelocity = CalamityWorld.death ? 15f : 10f;
|
||||
Vector2 destination = new Vector2(NPC.Center.X, NPC.Center.Y - 100f) - NPC.Center;
|
||||
destination.Normalize();
|
||||
destination *= projectileVelocity;
|
||||
|
||||
// Less mushrooms in Death Mode phase 3 because otherwise it's an absolute shitshow.
|
||||
int numProj = bossRush ? 24 : phase4 ? 14 : CalamityWorld.death ? (phase3 ? 10 : 16) : 12;
|
||||
int numProj = phase4 ? 14 : CalamityWorld.death ? (phase3 ? 10 : 16) : 12;
|
||||
float rotation = MathHelper.ToRadians(90);
|
||||
for (int i = 0; i < numProj; i++)
|
||||
{
|
||||
@@ -546,13 +545,13 @@ namespace CalamityMod.NPCs.Crabulon
|
||||
SoundEngine.PlaySound(SoundID.Item42, NPC.Center);
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
float projectileVelocity = BossRushEvent.BossRushActive ? 24f : CalamityWorld.death ? 15f : 10f;
|
||||
float projectileVelocity = CalamityWorld.death ? 15f : 10f;
|
||||
Vector2 destination = new Vector2(NPC.Center.X, NPC.Center.Y - 100f) - NPC.Center;
|
||||
destination.Normalize();
|
||||
destination *= projectileVelocity;
|
||||
|
||||
// Less mushrooms in Death Mode phase 3 because otherwise it's an absolute shitshow.
|
||||
int numProj = bossRush ? 16 : phase4 ? 8 : (phase3 && death) ? 6 : 8;
|
||||
int numProj = phase4 ? 8 : (phase3 && death) ? 6 : 8;
|
||||
float rotation = MathHelper.ToRadians(60);
|
||||
for (int i = 0; i < numProj; i++)
|
||||
{
|
||||
@@ -716,7 +715,7 @@ namespace CalamityMod.NPCs.Crabulon
|
||||
NPC.ai[3] = NPC.Bottom.Y;
|
||||
NPC.noTileCollide = true;
|
||||
|
||||
float leapVelocity = bossRush ? 24f : death ? 18f : 16f;
|
||||
float leapVelocity = death ? 18f : 16f;
|
||||
NPC.velocity = center - NPC.Center;
|
||||
NPC.velocity = NPC.velocity.SafeNormalize(Vector2.Zero);
|
||||
NPC.velocity *= leapVelocity;
|
||||
|
||||
+16
-20
@@ -180,13 +180,12 @@ namespace CalamityMod.NPCs.Cryogen
|
||||
|
||||
Player player = Main.player[NPC.target];
|
||||
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
|
||||
// Enrage
|
||||
if (!player.ZoneSnow && !bossRush)
|
||||
if (!player.ZoneSnow && !BossRushEvent.BossRushActive)
|
||||
{
|
||||
if (biomeEnrageTimer > 0)
|
||||
biomeEnrageTimer--;
|
||||
@@ -194,21 +193,18 @@ namespace CalamityMod.NPCs.Cryogen
|
||||
else
|
||||
biomeEnrageTimer = CalamityGlobalNPC.biomeEnrageTimerMax;
|
||||
|
||||
bool biomeEnraged = biomeEnrageTimer <= 0 || bossRush;
|
||||
bool biomeEnraged = biomeEnrageTimer <= 0;
|
||||
|
||||
float enrageScale = death ? 0.5f : 0f;
|
||||
if (biomeEnraged)
|
||||
{
|
||||
NPC.Calamity().CurrentlyEnraged = !bossRush;
|
||||
NPC.Calamity().CurrentlyEnraged = true;
|
||||
enrageScale += 2f;
|
||||
}
|
||||
|
||||
if (enrageScale > 2f)
|
||||
enrageScale = 2f;
|
||||
|
||||
if (bossRush)
|
||||
enrageScale = 3f;
|
||||
|
||||
// Percent life remaining
|
||||
float lifeRatio = NPC.life / (float)NPC.lifeMax;
|
||||
|
||||
@@ -317,7 +313,7 @@ namespace CalamityMod.NPCs.Cryogen
|
||||
}
|
||||
}
|
||||
|
||||
float chargePhaseGateValue = bossRush ? 240f : 360f;
|
||||
float chargePhaseGateValue = 360f;
|
||||
float chargeDuration = 60f;
|
||||
float chargeTelegraphTime = NPC.ai[0] == 2f ? (CalamityWorld.LegendaryMode ? 60f : 80f) : (CalamityWorld.LegendaryMode ? 90f : 120f);
|
||||
float chargeTelegraphMaxRotationIncrement = 1f;
|
||||
@@ -337,7 +333,7 @@ namespace CalamityMod.NPCs.Cryogen
|
||||
if (expertMode && (NPC.ai[0] < 5f || !phase6) && !chargePhase)
|
||||
{
|
||||
calamityGlobalNPC.newAI[3] += 1f;
|
||||
if (calamityGlobalNPC.newAI[3] >= (bossRush ? 660f : 900f))
|
||||
if (calamityGlobalNPC.newAI[3] >= 900f)
|
||||
{
|
||||
calamityGlobalNPC.newAI[3] = 0f;
|
||||
SoundEngine.PlaySound(Main.zenithWorld ? SoundID.NPCHit41 : HitSound, NPC.Center);
|
||||
@@ -379,7 +375,7 @@ namespace CalamityMod.NPCs.Cryogen
|
||||
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
int totalProjectiles = bossRush ? 24 : 16;
|
||||
int totalProjectiles = 16;
|
||||
float radians = MathHelper.TwoPi / totalProjectiles;
|
||||
int type = iceBlast;
|
||||
int damage = NPC.GetProjectileDamage(type);
|
||||
@@ -455,7 +451,7 @@ namespace CalamityMod.NPCs.Cryogen
|
||||
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
int totalProjectiles = bossRush ? 18 : 12;
|
||||
int totalProjectiles = 12;
|
||||
float radians = MathHelper.TwoPi / totalProjectiles;
|
||||
int type = iceBlast;
|
||||
int damage = NPC.GetProjectileDamage(type);
|
||||
@@ -653,7 +649,7 @@ namespace CalamityMod.NPCs.Cryogen
|
||||
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
int totalProjectiles = bossRush ? 18 : 12;
|
||||
int totalProjectiles = 12;
|
||||
float radians = MathHelper.TwoPi / totalProjectiles;
|
||||
int type = iceBlast;
|
||||
int damage = NPC.GetProjectileDamage(type);
|
||||
@@ -816,7 +812,7 @@ namespace CalamityMod.NPCs.Cryogen
|
||||
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
int totalProjectiles = bossRush ? 18 : 12;
|
||||
int totalProjectiles = 12;
|
||||
float radians = MathHelper.TwoPi / totalProjectiles;
|
||||
int type = iceBlast;
|
||||
int damage = NPC.GetProjectileDamage(type);
|
||||
@@ -928,7 +924,7 @@ namespace CalamityMod.NPCs.Cryogen
|
||||
float velocity = 9f + enrageScale;
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
int totalProjectiles = bossRush ? 9 : 6;
|
||||
int totalProjectiles = 6;
|
||||
float radians = MathHelper.TwoPi / totalProjectiles;
|
||||
float newVelocity = velocity - (velocity * 0.33f * i);
|
||||
float projectileVelocityToPass = 0f;
|
||||
@@ -1030,7 +1026,7 @@ namespace CalamityMod.NPCs.Cryogen
|
||||
int totalSpreads = phase7 ? 3 : 2;
|
||||
for (int i = 0; i < totalSpreads; i++)
|
||||
{
|
||||
int totalProjectiles = bossRush ? 3 : 2;
|
||||
int totalProjectiles = 2;
|
||||
float radians = MathHelper.TwoPi / totalProjectiles;
|
||||
float newVelocity = velocity - (velocity * (phase7 ? 0.25f : 0.5f) * i);
|
||||
float projectileVelocityToPass = 0f;
|
||||
@@ -1153,7 +1149,7 @@ namespace CalamityMod.NPCs.Cryogen
|
||||
NPC.rotation = NPC.velocity.X * 0.1f;
|
||||
|
||||
calamityGlobalNPC.newAI[3] += 1f;
|
||||
if (calamityGlobalNPC.newAI[3] >= (bossRush ? 50f : 75f))
|
||||
if (calamityGlobalNPC.newAI[3] >= 75f)
|
||||
{
|
||||
calamityGlobalNPC.newAI[3] = 0f;
|
||||
SoundEngine.PlaySound(Main.zenithWorld ? SoundID.NPCHit41 : HitSound, NPC.Center);
|
||||
@@ -1174,7 +1170,7 @@ namespace CalamityMod.NPCs.Cryogen
|
||||
}
|
||||
|
||||
NPC.ai[1] += 1f;
|
||||
if (NPC.ai[1] >= (bossRush ? 120f : 180f))
|
||||
if (NPC.ai[1] >= 180f)
|
||||
{
|
||||
NPC.TargetClosest();
|
||||
NPC.ai[0] = 4f;
|
||||
|
||||
@@ -70,9 +70,8 @@ namespace CalamityMod.NPCs.DesertScourge
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
|
||||
if (NPC.ai[3] > 0f)
|
||||
{
|
||||
|
||||
@@ -70,9 +70,8 @@ namespace CalamityMod.NPCs.DesertScourge
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
|
||||
if (NPC.ai[3] > 0f)
|
||||
{
|
||||
|
||||
@@ -107,16 +107,15 @@ namespace CalamityMod.NPCs.DesertScourge
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
|
||||
// Become angry when the other Nuisance dies.
|
||||
bool getMad = (!NPC.AnyNPCs(ModContent.NPCType<DesertNuisanceHeadYoung>()) && revenge) || death;
|
||||
|
||||
// Enrage
|
||||
if (!Main.player[NPC.target].ZoneDesert && !bossRush)
|
||||
if (!Main.player[NPC.target].ZoneDesert && !BossRushEvent.BossRushActive)
|
||||
{
|
||||
if (biomeEnrageTimer > 0)
|
||||
biomeEnrageTimer--;
|
||||
@@ -124,12 +123,12 @@ namespace CalamityMod.NPCs.DesertScourge
|
||||
else
|
||||
biomeEnrageTimer = CalamityGlobalNPC.biomeEnrageTimerMax;
|
||||
|
||||
bool biomeEnraged = biomeEnrageTimer <= 0 || bossRush;
|
||||
bool biomeEnraged = biomeEnrageTimer <= 0;
|
||||
|
||||
float enrageScale = bossRush ? 1f : getMad ? 0.5f : 0f;
|
||||
float enrageScale = getMad ? 0.5f : 0f;
|
||||
if (biomeEnraged)
|
||||
{
|
||||
NPC.Calamity().CurrentlyEnraged = !bossRush;
|
||||
NPC.Calamity().CurrentlyEnraged = true;
|
||||
enrageScale += 2f;
|
||||
}
|
||||
|
||||
|
||||
@@ -103,16 +103,15 @@ namespace CalamityMod.NPCs.DesertScourge
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
|
||||
// Become angry when the other Nuisance dies.
|
||||
bool getMad = (!NPC.AnyNPCs(ModContent.NPCType<DesertNuisanceHead>()) && revenge) || death;
|
||||
|
||||
// Enrage
|
||||
if (!Main.player[NPC.target].ZoneDesert && !bossRush)
|
||||
if (!Main.player[NPC.target].ZoneDesert && !BossRushEvent.BossRushActive)
|
||||
{
|
||||
if (biomeEnrageTimer > 0)
|
||||
biomeEnrageTimer--;
|
||||
@@ -120,12 +119,12 @@ namespace CalamityMod.NPCs.DesertScourge
|
||||
else
|
||||
biomeEnrageTimer = CalamityGlobalNPC.biomeEnrageTimerMax;
|
||||
|
||||
bool biomeEnraged = biomeEnrageTimer <= 0 || bossRush;
|
||||
bool biomeEnraged = biomeEnrageTimer <= 0;
|
||||
|
||||
float enrageScale = bossRush ? 1f : getMad ? 0.5f : 0f;
|
||||
float enrageScale = getMad ? 0.5f : 0f;
|
||||
if (biomeEnraged)
|
||||
{
|
||||
NPC.Calamity().CurrentlyEnraged = !bossRush;
|
||||
NPC.Calamity().CurrentlyEnraged = true;
|
||||
enrageScale += 2f;
|
||||
}
|
||||
|
||||
|
||||
@@ -52,9 +52,8 @@ namespace CalamityMod.NPCs.DesertScourge
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
|
||||
if (NPC.ai[2] > 0f)
|
||||
NPC.realLife = (int)NPC.ai[2];
|
||||
|
||||
@@ -52,9 +52,8 @@ namespace CalamityMod.NPCs.DesertScourge
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
|
||||
if (NPC.ai[2] > 0f)
|
||||
NPC.realLife = (int)NPC.ai[2];
|
||||
|
||||
@@ -89,9 +89,8 @@ namespace CalamityMod.NPCs.DesertScourge
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
|
||||
if (NPC.ai[3] > 0f)
|
||||
{
|
||||
|
||||
@@ -56,7 +56,6 @@ namespace CalamityMod.NPCs.DesertScourge
|
||||
public const float LungeUpwardCutoffDistance = 420f;
|
||||
public const float BurrowDistance_Hide = 1080f;
|
||||
public const float BurrowDistance = 800f;
|
||||
public const float BurrowDistance_BossRush = 400f;
|
||||
public const float OpenMouthForBiteDistance = 220f;
|
||||
|
||||
private const int OpenMouthStopFrame = 4;
|
||||
@@ -162,10 +161,9 @@ namespace CalamityMod.NPCs.DesertScourge
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
|
||||
// Check for Nuisances
|
||||
bool hide = (NPC.AnyNPCs(ModContent.NPCType<DesertNuisanceHead>()) || NPC.AnyNPCs(ModContent.NPCType<DesertNuisanceHeadYoung>())) && !death;
|
||||
@@ -188,7 +186,7 @@ namespace CalamityMod.NPCs.DesertScourge
|
||||
Player player = Main.player[NPC.target];
|
||||
|
||||
// Enrage
|
||||
if (!player.ZoneDesert && !bossRush)
|
||||
if (!player.ZoneDesert && !BossRushEvent.BossRushActive)
|
||||
{
|
||||
if (biomeEnrageTimer > 0)
|
||||
biomeEnrageTimer--;
|
||||
@@ -196,12 +194,12 @@ namespace CalamityMod.NPCs.DesertScourge
|
||||
else
|
||||
biomeEnrageTimer = CalamityGlobalNPC.biomeEnrageTimerMax;
|
||||
|
||||
bool biomeEnraged = biomeEnrageTimer <= 0 || bossRush;
|
||||
bool biomeEnraged = biomeEnrageTimer <= 0;
|
||||
|
||||
float enrageScale = bossRush ? 1f : 0f;
|
||||
float enrageScale = 0f;
|
||||
if (biomeEnraged)
|
||||
{
|
||||
NPC.Calamity().CurrentlyEnraged = !bossRush;
|
||||
NPC.Calamity().CurrentlyEnraged = true;
|
||||
enrageScale += 2f;
|
||||
}
|
||||
|
||||
@@ -234,7 +232,7 @@ namespace CalamityMod.NPCs.DesertScourge
|
||||
bool lungeUpward = burrow && NPC.Calamity().newAI[1] == 1f;
|
||||
bool quickFall = NPC.Calamity().newAI[1] == 2f;
|
||||
|
||||
float burrowDistance = hide ? BurrowDistance_Hide : bossRush ? BurrowDistance_BossRush : BurrowDistance;
|
||||
float burrowDistance = hide ? BurrowDistance_Hide : BurrowDistance;
|
||||
|
||||
float speed = death ? 0.105f : 0.085f;
|
||||
float turnSpeed = death ? 0.21f : 0.17f;
|
||||
@@ -598,11 +596,11 @@ namespace CalamityMod.NPCs.DesertScourge
|
||||
{
|
||||
// Spit a huge spread of sand upwards that falls down
|
||||
SoundEngine.PlaySound(SandBlastSound, NPC.Center);
|
||||
float velocity = CalamityWorld.LegendaryMode ? 16f : bossRush ? 10f : death ? 8.5f : revenge ? 8f : expertMode ? 7.5f : 6f;
|
||||
float velocity = CalamityWorld.LegendaryMode ? 16f : death ? 8.5f : revenge ? 8f : expertMode ? 7.5f : 6f;
|
||||
int type = ModContent.ProjectileType<DesertScourgeSpit>();
|
||||
int damage = NPC.GetProjectileDamage(type);
|
||||
Vector2 projectileVelocity = (NPC.Center + NPC.velocity * 10f - NPC.Center).SafeNormalize(Vector2.UnitY) * velocity;
|
||||
int numProj = bossRush ? 30 : death ? 24 : revenge ? 21 : expertMode ? 18 : 12;
|
||||
int numProj = death ? 24 : revenge ? 21 : expertMode ? 18 : 12;
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
numProj *= 2;
|
||||
|
||||
|
||||
@@ -69,9 +69,8 @@ namespace CalamityMod.NPCs.DesertScourge
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
|
||||
if (NPC.ai[2] > 0f)
|
||||
NPC.realLife = (int)NPC.ai[2];
|
||||
|
||||
@@ -140,7 +140,7 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
}
|
||||
|
||||
// Calculate contact damage based on velocity
|
||||
float segmentVelocity = BossRushEvent.BossRushActive ? 30f : CalamityWorld.revenge ? 25f : 23f;
|
||||
float segmentVelocity = CalamityWorld.revenge ? 25f : 23f;
|
||||
float minimalContactDamageVelocity = segmentVelocity * 0.25f;
|
||||
float minimalDamageVelocity = segmentVelocity * 0.5f;
|
||||
float bodyAndTailVelocity = (NPC.position - NPC.oldPosition).Length();
|
||||
|
||||
@@ -185,8 +185,8 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
Vector2 segmentDirection = NPC.Center;
|
||||
float dogHeadX = Main.npc[CalamityGlobalNPC.DoGHead].position.X + (Main.npc[CalamityGlobalNPC.DoGHead].width / 2);
|
||||
float dogHeadY = Main.npc[CalamityGlobalNPC.DoGHead].position.Y + (Main.npc[CalamityGlobalNPC.DoGHead].height / 2);
|
||||
float segmentVelocity = BossRushEvent.BossRushActive ? 30f : CalamityWorld.revenge ? 25f : 23f;
|
||||
float velocityMult = BossRushEvent.BossRushActive ? 0.9f : CalamityWorld.revenge ? 0.75f : 0.23f;
|
||||
float segmentVelocity = CalamityWorld.revenge ? 25f : 23f;
|
||||
float velocityMult = CalamityWorld.revenge ? 0.75f : 0.23f;
|
||||
float maxDistanceFromDoGHead = 160f;
|
||||
|
||||
if (increaseSpeedMore)
|
||||
|
||||
@@ -137,7 +137,7 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
}
|
||||
|
||||
// Calculate contact damage based on velocity
|
||||
float segmentVelocity = BossRushEvent.BossRushActive ? 30f : CalamityWorld.revenge ? 25f : 23f;
|
||||
float segmentVelocity = CalamityWorld.revenge ? 25f : 23f;
|
||||
float minimalContactDamageVelocity = segmentVelocity * 0.25f;
|
||||
float minimalDamageVelocity = segmentVelocity * 0.5f;
|
||||
float bodyAndTailVelocity = (NPC.position - NPC.oldPosition).Length();
|
||||
|
||||
@@ -156,10 +156,9 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
float lifeRatio = NPC.life / (float)NPC.lifeMax;
|
||||
|
||||
bool phase2 = lifeRatio < 0.6f;
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
|
||||
if (phase2)
|
||||
{
|
||||
@@ -269,7 +268,7 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
NPC.spriteDirection = (directionToNextSegment.X > 0).ToDirectionInt();
|
||||
|
||||
// Velocity variables
|
||||
float segmentVelocity = bossRush ? 19f : death ? 17.5f : 16f;
|
||||
float segmentVelocity = death ? 17.5f : 16f;
|
||||
if (expertMode)
|
||||
segmentVelocity += 4f * (1f - lifeRatio);
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
|
||||
@@ -360,10 +360,9 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
bool flyUpDuringLaserWalls = laserWallPhase == (int)LaserWallPhase.FireLaserWalls || (laserWallPhase == (int)LaserWallPhase.End && teleportTimer > 0);
|
||||
bool flies = NPC.ai[3] == 0f || flyUpDuringLaserWalls;
|
||||
Vector2 destination = flyUpDuringLaserWalls ? (player.Center - Vector2.UnitY * 480f) : player.Center;
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
|
||||
// Percent life remaining
|
||||
float lifeRatio = NPC.life / (float)NPC.lifeMax;
|
||||
@@ -398,14 +397,14 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
extrapitch = Main.zenithWorld ? 0.3f : 0f;
|
||||
|
||||
// Velocity variables
|
||||
float segmentVelocity = bossRush ? 19f : death ? 17.5f : 16f;
|
||||
float segmentVelocity = death ? 17.5f : 16f;
|
||||
if (expertMode)
|
||||
segmentVelocity += 4f * (1f - lifeRatio);
|
||||
|
||||
float speed = bossRush ? 18f : death ? 16.5f : 15f;
|
||||
float turnSpeed = bossRush ? 0.36f : death ? 0.33f : 0.3f;
|
||||
float homingSpeed = bossRush ? 36f : death ? 30f : 24f;
|
||||
float homingTurnSpeed = bossRush ? 0.48f : death ? 0.405f : 0.33f;
|
||||
float speed = death ? 16.5f : 15f;
|
||||
float turnSpeed = death ? 0.33f : 0.3f;
|
||||
float homingSpeed = death ? 30f : 24f;
|
||||
float homingTurnSpeed = death ? 0.405f : 0.33f;
|
||||
|
||||
if (expertMode)
|
||||
{
|
||||
@@ -415,7 +414,7 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
homingTurnSpeed += 0.15f * (1f - lifeRatio);
|
||||
}
|
||||
|
||||
float groundPhaseTurnSpeed = bossRush ? 0.3f : death ? 0.24f : 0.18f;
|
||||
float groundPhaseTurnSpeed = death ? 0.24f : 0.18f;
|
||||
|
||||
if (expertMode)
|
||||
groundPhaseTurnSpeed += 0.1f * (1f - lifeRatio);
|
||||
@@ -496,7 +495,7 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
if (NPC.localAI[2] == timeWhenDoGShouldTeleportDuringPhase2Countdown + (death ? TimeBeforeTeleport_Death : CalamityWorld.revenge ? TimeBeforeTeleport_Revengeance : Main.expertMode ? TimeBeforeTeleport_Expert : TimeBeforeTeleport_Normal))
|
||||
SpawnTeleportLocation(player, true);
|
||||
if (NPC.localAI[2] == timeWhenDoGShouldTeleportDuringPhase2Countdown)
|
||||
Teleport(player, bossRush, death, revenge, expertMode, phase5);
|
||||
Teleport(player, death, revenge, expertMode, phase5);
|
||||
|
||||
// Just in case the projectile cap is reached and the teleport rift doesn't spawn.
|
||||
if (AwaitingPhase2Teleport && NPC.localAI[2] == 0f)
|
||||
@@ -547,7 +546,7 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
}
|
||||
|
||||
// Dialogue the moment the second phase starts
|
||||
if (NPC.localAI[2] == 60f && !bossRush)
|
||||
if (NPC.localAI[2] == 60f && !BossRushEvent.BossRushActive)
|
||||
{
|
||||
string key = "Mods.CalamityMod.Status.Boss.EdgyBossText5";
|
||||
Color messageColor = Color.Cyan;
|
||||
@@ -618,7 +617,7 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
|
||||
// Teleport
|
||||
if (teleportTimer == 0)
|
||||
Teleport(player, bossRush, death, revenge, expertMode, phase5);
|
||||
Teleport(player, death, revenge, expertMode, phase5);
|
||||
}
|
||||
|
||||
// Do the death animation once killed.
|
||||
@@ -639,7 +638,7 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
}
|
||||
|
||||
// Laser walls
|
||||
float adjustedAlphaGateValue = AlphaGateValue - (bossRush ? 360f : death ? 180f : 0f);
|
||||
float adjustedAlphaGateValue = AlphaGateValue - (death ? 180f : 0f);
|
||||
if (phase4 && !spawnedGuardians3 && postTeleportTimer <= 0)
|
||||
{
|
||||
if (laserWallPhase == (int)LaserWallPhase.SetUp)
|
||||
@@ -665,7 +664,7 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
}
|
||||
|
||||
// Fire laser walls every X seconds after a laser wall phase ends
|
||||
float laserWallGateValue = LaserWallCooldown - (bossRush ? 360f : death ? 180f : 0f);
|
||||
float laserWallGateValue = LaserWallCooldown - (death ? 180f : 0f);
|
||||
if (calamityGlobalNPC.newAI[3] >= laserWallGateValue)
|
||||
{
|
||||
NPC.Opacity = 0f;
|
||||
@@ -710,7 +709,7 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
calamityGlobalNPC.newAI[3] = 0f;
|
||||
|
||||
// Anger message
|
||||
if (!bossRush)
|
||||
if (!BossRushEvent.BossRushActive)
|
||||
{
|
||||
string key = "Mods.CalamityMod.Status.Boss.EdgyBossText6";
|
||||
Color messageColor = Color.Cyan;
|
||||
@@ -789,7 +788,7 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
{
|
||||
Vector2 blobVelocity = new Vector2(Main.rand.Next(-100, 101), Main.rand.Next(-100, 101));
|
||||
blobVelocity.Normalize();
|
||||
blobVelocity *= Main.rand.Next(400, 801) * (bossRush ? 0.02f : 0.01f);
|
||||
blobVelocity *= Main.rand.Next(400, 801) * 0.01f;
|
||||
blobVelocity *= Main.rand.NextFloat() + 1f;
|
||||
|
||||
float blobVelocityYAdd = Math.Abs(blobVelocity.Y) * 0.5f;
|
||||
@@ -809,7 +808,7 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
if (!spawnedGuardians3 && laserWallPhase == (int)LaserWallPhase.FireLaserWalls)
|
||||
{
|
||||
float spawnOffset = 1200f;
|
||||
float divisor = bossRush ? 100f : 150f;
|
||||
float divisor = 150f;
|
||||
|
||||
if (calamityGlobalNPC.newAI[1] % divisor == 0f)
|
||||
{
|
||||
@@ -1383,8 +1382,8 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
}
|
||||
else
|
||||
{
|
||||
double maximumSpeed1 = bossRush ? 0.52 : death ? 0.46 : 0.4;
|
||||
double maximumSpeed2 = bossRush ? 1.25 : death ? 1.125 : 1D;
|
||||
double maximumSpeed1 = death ? 0.46 : 0.4;
|
||||
double maximumSpeed2 = death ? 1.125 : 1D;
|
||||
|
||||
if (expertMode)
|
||||
{
|
||||
@@ -1530,7 +1529,7 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
if (revenge)
|
||||
spawnDoGCountdown = 10;
|
||||
|
||||
if (!bossRush)
|
||||
if (!BossRushEvent.BossRushActive)
|
||||
{
|
||||
string key = "Mods.CalamityMod.Status.Boss.EdgyBossText";
|
||||
Color messageColor = Color.Cyan;
|
||||
@@ -1579,8 +1578,8 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
}
|
||||
|
||||
// Laser barrage attack variables
|
||||
float laserBarrageGateValue = bossRush ? 1080f : death ? 1320f : 1440f;
|
||||
float laserBarrageShootGateValue = bossRush ? 160f : 240f;
|
||||
float laserBarrageGateValue = death ? 1320f : 1440f;
|
||||
float laserBarrageShootGateValue = 240f;
|
||||
float laserBarragePhaseGateValue = laserBarrageGateValue - laserBarrageShootGateValue;
|
||||
|
||||
// Spawn segments
|
||||
@@ -2128,8 +2127,8 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
}
|
||||
else
|
||||
{
|
||||
double maximumSpeed1 = bossRush ? 0.52 : death ? 0.46 : 0.4;
|
||||
double maximumSpeed2 = bossRush ? 1.25 : death ? 1.125 : 1D;
|
||||
double maximumSpeed1 = death ? 0.46 : 0.4;
|
||||
double maximumSpeed2 = death ? 1.125 : 1D;
|
||||
|
||||
if (expertMode)
|
||||
{
|
||||
@@ -2310,7 +2309,7 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
}
|
||||
}
|
||||
|
||||
private void Teleport(Player player, bool bossRush, bool death, bool revenge, bool expertMode, bool phase5)
|
||||
private void Teleport(Player player, bool death, bool revenge, bool expertMode, bool phase5)
|
||||
{
|
||||
Vector2 newPosition = GetRiftLocation(true);
|
||||
|
||||
@@ -2328,7 +2327,7 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
float mult = revenge ? 1.5f : 3f;
|
||||
for (int i = 0; i < totalSpreads; i++)
|
||||
{
|
||||
int totalProjectiles = (CalamityWorld.LegendaryMode) ? 30 : bossRush ? 18 : 12;
|
||||
int totalProjectiles = (CalamityWorld.LegendaryMode) ? 30 : 12;
|
||||
float radians = MathHelper.TwoPi / totalProjectiles;
|
||||
float newVelocity = finalVelocity - i * mult;
|
||||
float velocityMult = 1f + ((finalVelocity - newVelocity) / (newVelocity * 2f) / 100f);
|
||||
@@ -2348,7 +2347,7 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
|
||||
NPC.TargetClosest();
|
||||
NPC.position = newPosition;
|
||||
float chargeVelocity = bossRush ? 30f : death ? 26f : revenge ? 24f : expertMode ? 22f : 20f;
|
||||
float chargeVelocity = death ? 26f : revenge ? 24f : expertMode ? 22f : 20f;
|
||||
float maxChargeDistance = 1600f;
|
||||
postTeleportTimer = (int)Math.Round(maxChargeDistance / chargeVelocity);
|
||||
AwaitingPhase2Teleport = false;
|
||||
|
||||
@@ -157,9 +157,8 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
float lifeRatio = NPC.life / (float)NPC.lifeMax;
|
||||
|
||||
bool phase2 = lifeRatio < 0.6f;
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
|
||||
if (phase2)
|
||||
{
|
||||
@@ -274,7 +273,6 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
segmentDirection.Y = (int)(segmentDirection.Y / 16f) * 16;
|
||||
playerXDist -= segmentDirection.X;
|
||||
playerYDist -= segmentDirection.Y;
|
||||
float playerDistance = (float)System.Math.Sqrt(playerXDist * playerXDist + playerYDist * playerYDist);
|
||||
if (NPC.ai[1] > 0f && NPC.ai[1] < Main.npc.Length)
|
||||
{
|
||||
try
|
||||
@@ -287,7 +285,7 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
{
|
||||
}
|
||||
NPC.rotation = (float)System.Math.Atan2(playerYDist, playerXDist) + MathHelper.PiOver2;
|
||||
playerDistance = (float)System.Math.Sqrt(playerXDist * playerXDist + playerYDist * playerYDist);
|
||||
float playerDistance = (float)System.Math.Sqrt(playerXDist * playerXDist + playerYDist * playerYDist);
|
||||
int segmentWidth = NPC.width;
|
||||
playerDistance = (playerDistance - segmentWidth) / playerDistance;
|
||||
playerXDist *= playerDistance;
|
||||
@@ -303,7 +301,7 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
}
|
||||
|
||||
// Velocity variables
|
||||
float segmentVelocity = bossRush ? 19f : death ? 17.5f : 16f;
|
||||
float segmentVelocity = death ? 17.5f : 16f;
|
||||
if (expertMode)
|
||||
segmentVelocity += 4f * (1f - lifeRatio);
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
|
||||
@@ -234,10 +234,9 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo
|
||||
NPC.frame = new Rectangle(NPC.width * frameX, NPC.height * frameY, NPC.width, NPC.height);
|
||||
|
||||
// Difficulty modes
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
|
||||
// Get a target
|
||||
if (NPC.target < 0 || NPC.target == Main.maxPlayers || Main.player[NPC.target].dead || !Main.player[NPC.target].active)
|
||||
@@ -413,13 +412,13 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo
|
||||
// Phase 7 - 0, 1, 2
|
||||
|
||||
// Gate values
|
||||
float reducedTimeForGateValue = bossRush ? 48f : death ? 32f : revenge ? 24f : expertMode ? 16f : 0f;
|
||||
float reducedTimeForGateValue = death ? 32f : revenge ? 24f : expertMode ? 16f : 0f;
|
||||
float reducedTimeForGateValue_Berserk = reducedTimeForGateValue * 0.5f;
|
||||
float normalAttackTime = 360f - reducedTimeForGateValue;
|
||||
float berserkAttackTime = lastMechAlive ? 225f - reducedTimeForGateValue_Berserk : 270f - reducedTimeForGateValue_Berserk;
|
||||
float attackPhaseGateValue = shouldGetBuffedByBerserkPhase ? berserkAttackTime : normalAttackTime;
|
||||
float timeToLineUpAttack = 30f;
|
||||
float timeToLineUpCharge = bossRush ? 45f : death ? 60f : revenge ? 68f : expertMode ? 75f : 90f;
|
||||
float timeToLineUpCharge = death ? 60f : revenge ? 68f : expertMode ? 75f : 90f;
|
||||
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
{
|
||||
@@ -432,7 +431,7 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo
|
||||
float chargeLocationDistanceGateValue = 40f;
|
||||
|
||||
// Velocity and acceleration values
|
||||
float baseVelocityMult = (shouldGetBuffedByBerserkPhase ? 0.25f : 0f) + (bossRush ? 1.15f : death ? 1.1f : revenge ? 1.075f : expertMode ? 1.05f : 1f);
|
||||
float baseVelocityMult = (shouldGetBuffedByBerserkPhase ? 0.25f : 0f) + (death ? 1.1f : revenge ? 1.075f : expertMode ? 1.05f : 1f);
|
||||
float baseVelocity = (AIState == (int)Phase.LineUpChargeCombo ? 40f : 20f) * baseVelocityMult;
|
||||
|
||||
// Attack gate values
|
||||
@@ -440,7 +439,7 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo
|
||||
bool doBigAttack = calamityGlobalNPC.newAI[3] >= attackPhaseGateValue + 2f + timeToLineUpAttack;
|
||||
|
||||
// Charge velocity
|
||||
float chargeVelocity = bossRush ? 115f : death ? 105f : revenge ? 101.25f : expertMode ? 97.5f : 90f;
|
||||
float chargeVelocity = death ? 105f : revenge ? 101.25f : expertMode ? 97.5f : 90f;
|
||||
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
{
|
||||
@@ -1179,7 +1178,7 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo
|
||||
// Plasma bolts on charge
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient && (!(Main.zenithWorld && !exoMechdusa) || (CalamityWorld.LegendaryMode)))
|
||||
{
|
||||
int totalProjectiles = bossRush ? 16 : death ? 12 : 8;
|
||||
int totalProjectiles = death ? 12 : 8;
|
||||
float radians = MathHelper.TwoPi / totalProjectiles;
|
||||
int type = ModContent.ProjectileType<AresPlasmaBolt>();
|
||||
int damage = (int)(NPC.GetProjectileDamage(ModContent.ProjectileType<ApolloFireball>()) * 0.8);
|
||||
|
||||
@@ -138,7 +138,6 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
|
||||
public const float deathrayTelegraphDuration_Expert = 120f;
|
||||
public const float deathrayTelegraphDuration_Rev = 105f;
|
||||
public const float deathrayTelegraphDuration_Death = 90f;
|
||||
public const float deathrayTelegraphDuration_BossRush = 60f;
|
||||
|
||||
// Total duration of the deathrays
|
||||
public const float deathrayDuration = 600f;
|
||||
@@ -297,10 +296,9 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
|
||||
NPC.frame = new Rectangle(NPC.width * frameX, NPC.height * frameY, NPC.width, NPC.height);
|
||||
|
||||
// Difficulty modes
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
|
||||
if (NPC.ai[2] > 0f)
|
||||
NPC.realLife = (int)NPC.ai[2];
|
||||
@@ -604,7 +602,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
|
||||
Vector2 destination = SecondaryAIState == (float)SecondaryPhase.PassiveAndImmune ? new Vector2(player.Center.X, player.Center.Y - 800f) : AIState != (float)Phase.Deathrays ? new Vector2(player.Center.X, player.Center.Y - 425f) : player.Center;
|
||||
|
||||
// Velocity and acceleration values
|
||||
float baseVelocityMult = (shouldGetBuffedByBerserkPhase ? 0.25f : 0f) + (bossRush ? 1.15f : death ? 1.1f : revenge ? 1.075f : expertMode ? 1.05f : 1f);
|
||||
float baseVelocityMult = (shouldGetBuffedByBerserkPhase ? 0.25f : 0f) + (death ? 1.1f : revenge ? 1.075f : expertMode ? 1.05f : 1f);
|
||||
float baseVelocity = (EnragedState == (float)Enraged.Yes ? 22f : 14f) * baseVelocityMult;
|
||||
float baseAcceleration = shouldGetBuffedByBerserkPhase ? 1.25f : 1f;
|
||||
float decelerationVelocityMult = 0.85f;
|
||||
@@ -905,7 +903,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
|
||||
calamityGlobalNPC.newAI[3] = 1f;
|
||||
NPC.velocity *= decelerationVelocityMult;
|
||||
|
||||
int totalProjectiles = bossRush ? 12 : death ? 10 : revenge ? 9 : expertMode ? 8 : 6;
|
||||
int totalProjectiles = death ? 10 : revenge ? 9 : expertMode ? 8 : 6;
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
totalProjectiles += 4;
|
||||
|
||||
@@ -918,8 +916,8 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
|
||||
Vector2 spinningPoint = normalLaserRotation ? new Vector2(0f, -velocity) : new Vector2(-velocityX2, -velocity);
|
||||
spinningPoint.Normalize();
|
||||
|
||||
float deathrayTelegraphDuration = bossRush ? deathrayTelegraphDuration_BossRush : death ? deathrayTelegraphDuration_Death :
|
||||
revenge ? deathrayTelegraphDuration_Rev : expertMode ? deathrayTelegraphDuration_Expert : deathrayTelegraphDuration_Normal;
|
||||
float deathrayTelegraphDuration = death ? deathrayTelegraphDuration_Death : revenge ? deathrayTelegraphDuration_Rev :
|
||||
expertMode ? deathrayTelegraphDuration_Expert : deathrayTelegraphDuration_Normal;
|
||||
|
||||
calamityGlobalNPC.newAI[2] += (EnragedState == (float)Enraged.Yes && calamityGlobalNPC.newAI[2] % 2f == 0f) ? 2f : 1f;
|
||||
if (calamityGlobalNPC.newAI[2] < deathrayTelegraphDuration)
|
||||
|
||||
@@ -143,10 +143,9 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
|
||||
}
|
||||
|
||||
// Difficulty modes
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
|
||||
// Percent life remaining
|
||||
float lifeRatio = Main.npc[CalamityGlobalNPC.draedonExoMechPrime].life / (float)Main.npc[CalamityGlobalNPC.draedonExoMechPrime].lifeMax;
|
||||
@@ -235,7 +234,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
|
||||
NPC.Calamity().newAI[3] = 0f;
|
||||
|
||||
// Predictiveness
|
||||
float predictionAmt = bossRush ? 20f : death ? 15f : revenge ? 13.75f : expertMode ? 12.5f : 10f;
|
||||
float predictionAmt = death ? 15f : revenge ? 13.75f : expertMode ? 12.5f : 10f;
|
||||
if (nerfedAttacks)
|
||||
predictionAmt *= 0.5f;
|
||||
if (passivePhase)
|
||||
@@ -323,7 +322,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
|
||||
Vector2 destination = Main.npc[CalamityGlobalNPC.draedonExoMechPrime].Center + (calamityGlobalNPC_Body.newAI[0] == (float)AresBody.Phase.Deathrays ? offset2 : offset);
|
||||
|
||||
// Velocity and acceleration values
|
||||
float baseVelocityMult = (shouldGetBuffedByBerserkPhase ? 0.25f : 0f) + (bossRush ? 1.15f : death ? 1.1f : revenge ? 1.075f : expertMode ? 1.05f : 1f);
|
||||
float baseVelocityMult = (shouldGetBuffedByBerserkPhase ? 0.25f : 0f) + (death ? 1.1f : revenge ? 1.075f : expertMode ? 1.05f : 1f);
|
||||
float baseVelocity = (enraged ? 38f : 30f) * baseVelocityMult;
|
||||
baseVelocity *= 1f + Main.npc[(int)NPC.ai[2]].localAI[2];
|
||||
|
||||
|
||||
@@ -148,10 +148,9 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
|
||||
}
|
||||
|
||||
// Difficulty modes
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
|
||||
// Percent life remaining
|
||||
float lifeRatio = Main.npc[CalamityGlobalNPC.draedonExoMechPrime].life / (float)Main.npc[CalamityGlobalNPC.draedonExoMechPrime].lifeMax;
|
||||
@@ -324,7 +323,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
|
||||
}
|
||||
|
||||
// Velocity and acceleration values
|
||||
float baseVelocityMult = (shouldGetBuffedByBerserkPhase ? 0.25f : 0f) + (bossRush ? 1.15f : death ? 1.1f : revenge ? 1.075f : expertMode ? 1.05f : 1f);
|
||||
float baseVelocityMult = (shouldGetBuffedByBerserkPhase ? 0.25f : 0f) + (death ? 1.1f : revenge ? 1.075f : expertMode ? 1.05f : 1f);
|
||||
float baseVelocity = (enraged ? 38f : 30f) * baseVelocityMult;
|
||||
baseVelocity *= 1f + Main.npc[(int)NPC.ai[2]].localAI[2];
|
||||
float baseAcceleration = shouldGetBuffedByBerserkPhase ? 1.25f : 1f;
|
||||
@@ -355,8 +354,8 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
|
||||
bool canFire = Vector2.Distance(NPC.Center, Main.player[targetIndex].Center) > 320f || !fireNormalLasers;
|
||||
|
||||
// Telegraph duration for deathray spiral
|
||||
float deathraySpiralTelegraphDuration = bossRush ? AresBody.deathrayTelegraphDuration_BossRush : death ? AresBody.deathrayTelegraphDuration_Death :
|
||||
revenge ? AresBody.deathrayTelegraphDuration_Rev : expertMode ? AresBody.deathrayTelegraphDuration_Expert : AresBody.deathrayTelegraphDuration_Normal;
|
||||
float deathraySpiralTelegraphDuration = death ? AresBody.deathrayTelegraphDuration_Death : revenge ? AresBody.deathrayTelegraphDuration_Rev :
|
||||
expertMode ? AresBody.deathrayTelegraphDuration_Expert : AresBody.deathrayTelegraphDuration_Normal;
|
||||
|
||||
// Variable to disable deathray firing
|
||||
bool doNotFire = calamityGlobalNPC_Body.newAI[1] == (float)AresBody.SecondaryPhase.PassiveAndImmune ||
|
||||
|
||||
@@ -142,10 +142,9 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
|
||||
}
|
||||
|
||||
// Difficulty modes
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
|
||||
// Percent life remaining
|
||||
float lifeRatio = Main.npc[CalamityGlobalNPC.draedonExoMechPrime].life / (float)Main.npc[CalamityGlobalNPC.draedonExoMechPrime].lifeMax;
|
||||
@@ -234,7 +233,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
|
||||
NPC.Calamity().newAI[3] = 0f;
|
||||
|
||||
// Predictiveness
|
||||
float predictionAmt = bossRush ? 20f : death ? 15f : revenge ? 13.75f : expertMode ? 12.5f : 10f;
|
||||
float predictionAmt = death ? 15f : revenge ? 13.75f : expertMode ? 12.5f : 10f;
|
||||
if (nerfedAttacks)
|
||||
predictionAmt *= 0.5f;
|
||||
if (passivePhase)
|
||||
@@ -335,7 +334,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
|
||||
Vector2 destination = Main.npc[CalamityGlobalNPC.draedonExoMechPrime].Center + (calamityGlobalNPC_Body.newAI[0] == (float)AresBody.Phase.Deathrays ? offset2 : offset);
|
||||
|
||||
// Velocity and acceleration values
|
||||
float baseVelocityMult = (shouldGetBuffedByBerserkPhase ? 0.25f : 0f) + (bossRush ? 1.15f : death ? 1.1f : revenge ? 1.075f : expertMode ? 1.05f : 1f);
|
||||
float baseVelocityMult = (shouldGetBuffedByBerserkPhase ? 0.25f : 0f) + (death ? 1.1f : revenge ? 1.075f : expertMode ? 1.05f : 1f);
|
||||
float baseVelocity = (enraged ? 38f : 30f) * baseVelocityMult;
|
||||
baseVelocity *= 1f + Main.npc[(int)NPC.ai[2]].localAI[2];
|
||||
|
||||
@@ -351,8 +350,8 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
|
||||
bool canFire = Vector2.Distance(NPC.Center, Main.player[targetIndex].Center) > 320f || calamityGlobalNPC_Body.newAI[0] != (float)AresBody.Phase.Deathrays;
|
||||
|
||||
// Telegraph duration for deathray spiral
|
||||
float deathrayTelegraphDuration = bossRush ? AresBody.deathrayTelegraphDuration_BossRush : death ? AresBody.deathrayTelegraphDuration_Death :
|
||||
revenge ? AresBody.deathrayTelegraphDuration_Rev : expertMode ? AresBody.deathrayTelegraphDuration_Expert : AresBody.deathrayTelegraphDuration_Normal;
|
||||
float deathrayTelegraphDuration = death ? AresBody.deathrayTelegraphDuration_Death : revenge ? AresBody.deathrayTelegraphDuration_Rev :
|
||||
expertMode ? AresBody.deathrayTelegraphDuration_Expert : AresBody.deathrayTelegraphDuration_Normal;
|
||||
|
||||
// Variable to cancel plasma bolt firing
|
||||
bool doNotFire = calamityGlobalNPC_Body.newAI[1] == (float)AresBody.SecondaryPhase.PassiveAndImmune ||
|
||||
|
||||
@@ -143,10 +143,9 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
|
||||
}
|
||||
|
||||
// Difficulty modes
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
|
||||
// Percent life remaining
|
||||
float lifeRatio = Main.npc[CalamityGlobalNPC.draedonExoMechPrime].life / (float)Main.npc[CalamityGlobalNPC.draedonExoMechPrime].lifeMax;
|
||||
@@ -235,7 +234,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
|
||||
NPC.localAI[0] = 0f;
|
||||
|
||||
// Predictiveness
|
||||
float predictionAmt = bossRush ? 40f : death ? 30f : revenge ? 27.5f : expertMode ? 25f : 20f;
|
||||
float predictionAmt = death ? 30f : revenge ? 27.5f : expertMode ? 25f : 20f;
|
||||
if (nerfedAttacks)
|
||||
predictionAmt *= 0.5f;
|
||||
if (passivePhase)
|
||||
@@ -338,7 +337,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
|
||||
Vector2 destination = Main.npc[CalamityGlobalNPC.draedonExoMechPrime].Center + (calamityGlobalNPC_Body.newAI[0] == (float)AresBody.Phase.Deathrays ? offset2 : offset);
|
||||
|
||||
// Velocity and acceleration values
|
||||
float baseVelocityMult = (shouldGetBuffedByBerserkPhase ? 0.25f : 0f) + (bossRush ? 1.15f : death ? 1.1f : revenge ? 1.075f : expertMode ? 1.05f : 1f);
|
||||
float baseVelocityMult = (shouldGetBuffedByBerserkPhase ? 0.25f : 0f) + (death ? 1.1f : revenge ? 1.075f : expertMode ? 1.05f : 1f);
|
||||
float baseVelocity = (enraged ? 38f : 30f) * baseVelocityMult;
|
||||
baseVelocity *= 1f + Main.npc[(int)NPC.ai[2]].localAI[2];
|
||||
|
||||
@@ -351,8 +350,8 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
|
||||
bool canFire = Vector2.Distance(NPC.Center, Main.player[targetIndex].Center) > 320f || calamityGlobalNPC_Body.newAI[0] != (float)AresBody.Phase.Deathrays;
|
||||
|
||||
// Telegraph duration for deathray spiral
|
||||
float deathrayTelegraphDuration = bossRush ? AresBody.deathrayTelegraphDuration_BossRush : death ? AresBody.deathrayTelegraphDuration_Death :
|
||||
revenge ? AresBody.deathrayTelegraphDuration_Rev : expertMode ? AresBody.deathrayTelegraphDuration_Expert : AresBody.deathrayTelegraphDuration_Normal;
|
||||
float deathrayTelegraphDuration = death ? AresBody.deathrayTelegraphDuration_Death : revenge ? AresBody.deathrayTelegraphDuration_Rev :
|
||||
expertMode ? AresBody.deathrayTelegraphDuration_Expert : AresBody.deathrayTelegraphDuration_Normal;
|
||||
|
||||
// Variable to cancel tesla orb firing
|
||||
bool doNotFire = calamityGlobalNPC_Body.newAI[1] == (float)AresBody.SecondaryPhase.PassiveAndImmune ||
|
||||
|
||||
@@ -267,10 +267,9 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis
|
||||
NPC.frame = new Rectangle(NPC.width * frameX, NPC.height * frameY, NPC.width, NPC.height);
|
||||
|
||||
// Difficulty modes
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
|
||||
// Get a target
|
||||
if (NPC.target < 0 || NPC.target == Main.maxPlayers || Main.player[NPC.target].dead || !Main.player[NPC.target].active)
|
||||
@@ -447,7 +446,7 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis
|
||||
// Phase 7 - 0, 1, 2
|
||||
|
||||
// Gate values
|
||||
float reducedTimeForGateValue = bossRush ? 48f : death ? 32f : revenge ? 24f : expertMode ? 16f : 0f;
|
||||
float reducedTimeForGateValue = death ? 32f : revenge ? 24f : expertMode ? 16f : 0f;
|
||||
float reducedTimeForGateValue_Berserk = reducedTimeForGateValue * 0.5f;
|
||||
float normalAttackTime = 360f - reducedTimeForGateValue;
|
||||
float berserkAttackTime = lastMechAlive ? 225f - reducedTimeForGateValue_Berserk : 270f - reducedTimeForGateValue_Berserk;
|
||||
@@ -491,7 +490,7 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis
|
||||
float movementDistanceGateValue = 100f;
|
||||
|
||||
// Charge variables
|
||||
float chargeVelocity = nerfedAttacks ? 60f : bossRush ? 81f : death ? 74f : revenge ? 70.5f : expertMode ? 67f : 60f;
|
||||
float chargeVelocity = nerfedAttacks ? 60f : death ? 74f : revenge ? 70.5f : expertMode ? 67f : 60f;
|
||||
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
chargeVelocity *= 1.15f;
|
||||
@@ -514,7 +513,7 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis
|
||||
predictionAmt *= 0.5f;
|
||||
|
||||
// Velocity and acceleration values
|
||||
float baseVelocityMult = (shouldGetBuffedByBerserkPhase ? 0.25f : 0f) + (bossRush ? 1.15f : death ? 1.1f : revenge ? 1.075f : expertMode ? 1.05f : 1f);
|
||||
float baseVelocityMult = (shouldGetBuffedByBerserkPhase ? 0.25f : 0f) + (death ? 1.1f : revenge ? 1.075f : expertMode ? 1.05f : 1f);
|
||||
float baseVelocity = ((AIState == (int)Phase.Deathray || lineUpAttack || AIState == (int)Phase.LaserShotgun) ? 40f : 20f) * baseVelocityMult;
|
||||
float decelerationVelocityMult = 0.85f;
|
||||
|
||||
@@ -831,8 +830,8 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis
|
||||
int type = ModContent.ProjectileType<ArtemisLaser>();
|
||||
int damage = NPC.GetProjectileDamage(type);
|
||||
Vector2 laserVelocity = chargeVelocityNormalized * 10f;
|
||||
int numLasersPerSpread = bossRush ? 10 : death ? 8 : expertMode ? 6 : 4;
|
||||
int spread = bossRush ? 30 : death ? 26 : expertMode ? 21 : 15;
|
||||
int numLasersPerSpread = death ? 8 : expertMode ? 6 : 4;
|
||||
int spread = death ? 26 : expertMode ? 21 : 15;
|
||||
float rotation = MathHelper.ToRadians(spread);
|
||||
float distanceFromTarget = Vector2.Distance(NPC.Center, NPC.Center + chargeVelocityNormalized * chargeDistance);
|
||||
float setVelocityInAI = death ? 7f : revenge ? 6.75f : expertMode ? 6.5f : 6f;
|
||||
@@ -933,7 +932,7 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis
|
||||
* normal = 16, 20, 24
|
||||
* nerfedAttacks = 12, 15, 18
|
||||
*/
|
||||
int numLasersAddedByDifficulty = bossRush ? 3 : death ? 2 : expertMode ? 1 : 0;
|
||||
int numLasersAddedByDifficulty = death ? 2 : expertMode ? 1 : 0;
|
||||
int numLasersPerSpread = ((nerfedAttacks || nerfedLaserShotgun) ? 3 : lastMechAlive ? 7 : 5) + numLasersAddedByDifficulty;
|
||||
int baseSpread = ((nerfedAttacks || nerfedLaserShotgun) ? 9 : lastMechAlive ? 20 : 15) + numLasersAddedByDifficulty * 2;
|
||||
int spread = baseSpread + (int)(calamityGlobalNPC.newAI[2] / divisor2) * (baseSpread / 4);
|
||||
@@ -1096,7 +1095,7 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis
|
||||
else
|
||||
{
|
||||
// This first variable is used to adjust how long it takes for the rotation rate to reach max
|
||||
float rotationSpeedMult = bossRush ? 6.66f : death ? 4f : revenge ? 3f : expertMode ? 2.5f : 2f;
|
||||
float rotationSpeedMult = death ? 4f : revenge ? 3f : expertMode ? 2.5f : 2f;
|
||||
|
||||
// This is used to adjust both the radians and the velocity of the spin moved per frame
|
||||
// At 15% progress it will be at max rotation in Boss Rush
|
||||
|
||||
@@ -138,10 +138,9 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos
|
||||
NPC.life = Main.npc[(int)NPC.ai[1]].life;
|
||||
|
||||
// Difficulty modes
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
|
||||
// Check if other segments are still alive, if not, die
|
||||
bool shouldDespawn = !NPC.AnyNPCs(ModContent.NPCType<ThanatosHead>());
|
||||
@@ -251,7 +250,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos
|
||||
if (NPC.Calamity().newAI[0] == 0f)
|
||||
NPC.ai[3] += 1f;
|
||||
|
||||
double numSegmentsAbleToFire = bossRush ? 42D : death ? 36D : revenge ? 34D : expertMode ? 30D : 24D;
|
||||
double numSegmentsAbleToFire = death ? 36D : revenge ? 34D : expertMode ? 30D : 24D;
|
||||
if (shouldGetBuffedByBerserkPhase)
|
||||
numSegmentsAbleToFire *= 1.25;
|
||||
|
||||
@@ -361,7 +360,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos
|
||||
}
|
||||
}
|
||||
|
||||
float predictionAmt = bossRush ? 24f : death ? 20f : revenge ? 18f : expertMode ? 16f : 12f;
|
||||
float predictionAmt = death ? 20f : revenge ? 18f : expertMode ? 16f : 12f;
|
||||
if (NPC.ai[0] % 3f == 0f)
|
||||
predictionAmt *= 0.5f;
|
||||
|
||||
@@ -519,7 +518,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos
|
||||
}
|
||||
|
||||
// Velocity and turn speed values
|
||||
float baseVelocityMult = (shouldGetBuffedByBerserkPhase ? 0.15f : 0f) + (bossRush ? 1.25f : death ? 1.2f : revenge ? 1.175f : expertMode ? 1.15f : 1.1f);
|
||||
float baseVelocityMult = (shouldGetBuffedByBerserkPhase ? 0.15f : 0f) + (death ? 1.2f : revenge ? 1.175f : expertMode ? 1.15f : 1.1f);
|
||||
float baseVelocity = 10f * baseVelocityMult;
|
||||
|
||||
// Increase top velocity if target is dead or if Thanatos is uncoiling
|
||||
|
||||
@@ -137,10 +137,9 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos
|
||||
NPC.life = Main.npc[(int)NPC.ai[1]].life;
|
||||
|
||||
// Difficulty modes
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
|
||||
// Check if other segments are still alive, if not, die
|
||||
bool shouldDespawn = !NPC.AnyNPCs(ModContent.NPCType<ThanatosHead>());
|
||||
@@ -250,7 +249,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos
|
||||
if (NPC.Calamity().newAI[0] == 0f)
|
||||
NPC.ai[3] += 1f;
|
||||
|
||||
double numSegmentsAbleToFire = bossRush ? 42D : death ? 36D : revenge ? 34D : expertMode ? 30D : 24D;
|
||||
double numSegmentsAbleToFire = death ? 36D : revenge ? 34D : expertMode ? 30D : 24D;
|
||||
if (shouldGetBuffedByBerserkPhase)
|
||||
numSegmentsAbleToFire *= 1.25;
|
||||
|
||||
@@ -360,7 +359,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos
|
||||
}
|
||||
}
|
||||
|
||||
float predictionAmt = bossRush ? 24f : death ? 20f : revenge ? 18f : expertMode ? 16f : 12f;
|
||||
float predictionAmt = death ? 20f : revenge ? 18f : expertMode ? 16f : 12f;
|
||||
if (NPC.ai[0] % 3f == 0f)
|
||||
predictionAmt *= 0.5f;
|
||||
|
||||
@@ -522,7 +521,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos
|
||||
}
|
||||
|
||||
// Velocity and turn speed values
|
||||
float baseVelocityMult = (shouldGetBuffedByBerserkPhase ? 0.15f : 0f) + (bossRush ? 1.25f : death ? 1.2f : revenge ? 1.175f : expertMode ? 1.15f : 1.1f);
|
||||
float baseVelocityMult = (shouldGetBuffedByBerserkPhase ? 0.15f : 0f) + (death ? 1.2f : revenge ? 1.175f : expertMode ? 1.15f : 1.1f);
|
||||
float baseVelocity = 10f * baseVelocityMult;
|
||||
|
||||
// Increase top velocity if target is dead or if Thanatos is uncoiling
|
||||
|
||||
@@ -250,7 +250,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos
|
||||
}
|
||||
|
||||
public float GetSlowdownAreaEdgeRadius(bool lastMechAlive) =>
|
||||
(BossRushEvent.BossRushActive ? 400f : CalamityWorld.death ? 600f : CalamityWorld.revenge ? 700f : Main.expertMode ? 800f : 1000f) * (lastMechAlive ? 0.6f : 1f) * (Main.zenithWorld && !exoMechdusa ? 2 : CalamityWorld.LegendaryMode ? 0.5f : 1f);
|
||||
(CalamityWorld.death ? 600f : CalamityWorld.revenge ? 700f : Main.expertMode ? 800f : 1000f) * (lastMechAlive ? 0.6f : 1f) * (Main.zenithWorld && !exoMechdusa ? 2 : CalamityWorld.LegendaryMode ? 0.5f : 1f);
|
||||
|
||||
public int CheckForOtherMechs(ref int targetIndex, out bool exoPrimeAlive, out bool exoTwinsAlive)
|
||||
{
|
||||
@@ -294,10 +294,9 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos
|
||||
CalamityGlobalNPC.draedonExoMechWorm = NPC.whoAmI;
|
||||
|
||||
// Difficulty modes
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
|
||||
// Percent life remaining
|
||||
float lifeRatio = NPC.life / (float)NPC.lifeMax;
|
||||
@@ -515,7 +514,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos
|
||||
float laserBarrageLocationDistance = turnDistance * 3f;
|
||||
|
||||
// Velocity and turn speed values
|
||||
float baseVelocityMult = (shouldGetBuffedByBerserkPhase ? 0.15f : 0f) + (bossRush ? 1.25f : death ? 1.2f : revenge ? 1.175f : expertMode ? 1.15f : 1.1f);
|
||||
float baseVelocityMult = (shouldGetBuffedByBerserkPhase ? 0.15f : 0f) + (death ? 1.2f : revenge ? 1.175f : expertMode ? 1.15f : 1.1f);
|
||||
float baseVelocity = 10f * baseVelocityMult;
|
||||
|
||||
// Increase top velocity if target is dead or if Thanatos is uncoiling
|
||||
|
||||
@@ -137,10 +137,9 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos
|
||||
NPC.life = Main.npc[(int)NPC.ai[1]].life;
|
||||
|
||||
// Difficulty modes
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
|
||||
// Check if other segments are still alive, if not, die
|
||||
bool shouldDespawn = !NPC.AnyNPCs(ModContent.NPCType<ThanatosHead>());
|
||||
@@ -250,7 +249,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos
|
||||
if (NPC.Calamity().newAI[0] == 0f)
|
||||
NPC.ai[3] += 1f;
|
||||
|
||||
double numSegmentsAbleToFire = bossRush ? 42D : death ? 36D : revenge ? 34D : expertMode ? 30D : 24D;
|
||||
double numSegmentsAbleToFire = death ? 36D : revenge ? 34D : expertMode ? 30D : 24D;
|
||||
if (shouldGetBuffedByBerserkPhase)
|
||||
numSegmentsAbleToFire *= 1.25;
|
||||
|
||||
@@ -360,7 +359,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos
|
||||
}
|
||||
}
|
||||
|
||||
float predictionAmt = bossRush ? 24f : death ? 20f : revenge ? 18f : expertMode ? 16f : 12f;
|
||||
float predictionAmt = death ? 20f : revenge ? 18f : expertMode ? 16f : 12f;
|
||||
if (NPC.ai[0] % 3f == 0f)
|
||||
predictionAmt *= 0.5f;
|
||||
|
||||
@@ -520,7 +519,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos
|
||||
}
|
||||
|
||||
// Velocity and turn speed values
|
||||
float baseVelocityMult = (shouldGetBuffedByBerserkPhase ? 0.15f : 0f) + (bossRush ? 1.25f : death ? 1.2f : revenge ? 1.175f : expertMode ? 1.15f : 1.1f);
|
||||
float baseVelocityMult = (shouldGetBuffedByBerserkPhase ? 0.15f : 0f) + (death ? 1.2f : revenge ? 1.175f : expertMode ? 1.15f : 1.1f);
|
||||
float baseVelocity = 10f * baseVelocityMult;
|
||||
|
||||
// Increase top velocity if target is dead or if Thanatos is uncoiling
|
||||
|
||||
@@ -64,8 +64,6 @@ namespace CalamityMod.NPCs.HiveMind
|
||||
bool death = CalamityWorld.death;
|
||||
bool revenge = CalamityWorld.revenge;
|
||||
float speed = death ? 15f : revenge ? 13f : 11f;
|
||||
if (BossRushEvent.BossRushActive)
|
||||
speed = 18f;
|
||||
|
||||
if (NPC.ai[1] < 90f)
|
||||
NPC.ai[1] += 1f;
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace CalamityMod.NPCs.HiveMind
|
||||
|
||||
NPC.aiStyle = -1;
|
||||
AIType = -1;
|
||||
NPC.knockBackResist = BossRushEvent.BossRushActive ? 0f : 0.4f;
|
||||
NPC.knockBackResist = 0.4f;
|
||||
NPC.noGravity = true;
|
||||
NPC.HitSound = SoundID.NPCHit13;
|
||||
NPC.DeathSound = SoundID.NPCDeath21;
|
||||
@@ -85,11 +85,6 @@ namespace CalamityMod.NPCs.HiveMind
|
||||
float velocity = CalamityWorld.LegendaryMode ? 10f : death ? 7f : revenge ? 6f : 4f;
|
||||
float acceleration = CalamityWorld.LegendaryMode ? 0.5f : death ? 0.35f : revenge ? 0.3f : 0.2f;
|
||||
float deceleration = CalamityWorld.LegendaryMode ? 0.9f : death ? 0.95f : revenge ? 0.96f : 0.98f;
|
||||
if (BossRushEvent.BossRushActive)
|
||||
{
|
||||
velocity *= 2f;
|
||||
acceleration *= 2f;
|
||||
}
|
||||
|
||||
if (NPC.position.Y > Main.player[NPC.target].position.Y - 400f)
|
||||
{
|
||||
|
||||
+20
-34
@@ -156,10 +156,9 @@ namespace CalamityMod.NPCs.HiveMind
|
||||
NPC.HitSound = SoundID.NPCHit1;
|
||||
NPC.DeathSound = SoundID.NPCDeath1;
|
||||
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
|
||||
if (expertMode)
|
||||
{
|
||||
@@ -189,16 +188,6 @@ namespace CalamityMod.NPCs.HiveMind
|
||||
driftBoost = 1.5f;
|
||||
}
|
||||
|
||||
if (bossRush)
|
||||
{
|
||||
lungeRots = 0.4;
|
||||
minimumDriftTime = 40;
|
||||
reelbackFade = 10;
|
||||
lungeTime = 16;
|
||||
driftSpeed = 6f;
|
||||
driftBoost = 1f;
|
||||
}
|
||||
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
{
|
||||
reelbackFade *= 10;
|
||||
@@ -349,10 +338,9 @@ namespace CalamityMod.NPCs.HiveMind
|
||||
|
||||
private void SpawnStuff()
|
||||
{
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
|
||||
int maxSpawns = death ? Main.rand.Next(3, 5) : revenge ? 3 : expertMode ? Main.rand.Next(2, 4) : 2;
|
||||
for (int i = 0; i < maxSpawns; i++)
|
||||
@@ -398,8 +386,7 @@ namespace CalamityMod.NPCs.HiveMind
|
||||
|
||||
private void ReelBack()
|
||||
{
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
|
||||
NPC.alpha = 0;
|
||||
phase2timer = 0;
|
||||
@@ -437,16 +424,15 @@ namespace CalamityMod.NPCs.HiveMind
|
||||
|
||||
Player player = Main.player[NPC.target];
|
||||
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
|
||||
// Percent life remaining
|
||||
float lifeRatio = NPC.life / (float)NPC.lifeMax;
|
||||
|
||||
// Enrage
|
||||
if ((!player.ZoneCorrupt || (NPC.position.Y / 16f) < Main.worldSurface) && !bossRush)
|
||||
if ((!player.ZoneCorrupt || (NPC.position.Y / 16f) < Main.worldSurface) && !BossRushEvent.BossRushActive)
|
||||
{
|
||||
if (biomeEnrageTimer > 0)
|
||||
biomeEnrageTimer--;
|
||||
@@ -454,17 +440,17 @@ namespace CalamityMod.NPCs.HiveMind
|
||||
else
|
||||
biomeEnrageTimer = CalamityGlobalNPC.biomeEnrageTimerMax;
|
||||
|
||||
bool biomeEnraged = biomeEnrageTimer <= 0 || bossRush;
|
||||
bool biomeEnraged = biomeEnrageTimer <= 0;
|
||||
|
||||
float enrageScale = bossRush ? 1f : 0f;
|
||||
if (biomeEnraged && (!player.ZoneCorrupt || bossRush))
|
||||
float enrageScale = 0f;
|
||||
if (biomeEnraged && !player.ZoneCorrupt)
|
||||
{
|
||||
NPC.Calamity().CurrentlyEnraged = !bossRush;
|
||||
NPC.Calamity().CurrentlyEnraged = true;
|
||||
enrageScale += 1f;
|
||||
}
|
||||
if (biomeEnraged && ((NPC.position.Y / 16f) < Main.worldSurface || bossRush))
|
||||
if (biomeEnraged && (NPC.position.Y / 16f) < Main.worldSurface)
|
||||
{
|
||||
NPC.Calamity().CurrentlyEnraged = !bossRush;
|
||||
NPC.Calamity().CurrentlyEnraged = true;
|
||||
enrageScale += 1f;
|
||||
}
|
||||
|
||||
@@ -610,8 +596,8 @@ namespace CalamityMod.NPCs.HiveMind
|
||||
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
int maxSpawns = bossRush ? 10 : death ? 5 : revenge ? 4 : expertMode ? Main.rand.Next(3, 5) : Main.rand.Next(2, 4);
|
||||
int maxDankSpawns = bossRush ? 4 : death ? Main.rand.Next(2, 4) : revenge ? 2 : expertMode ? Main.rand.Next(1, 3) : 1;
|
||||
int maxSpawns = death ? 5 : revenge ? 4 : expertMode ? Main.rand.Next(3, 5) : Main.rand.Next(2, 4);
|
||||
int maxDankSpawns = death ? Main.rand.Next(2, 4) : revenge ? 2 : expertMode ? Main.rand.Next(1, 3) : 1;
|
||||
|
||||
for (int i = 0; i < maxSpawns; i++)
|
||||
{
|
||||
@@ -969,7 +955,7 @@ namespace CalamityMod.NPCs.HiveMind
|
||||
NPC.damage = NPC.defDamage;
|
||||
|
||||
phase2timer = lungeTime - 4 * (int)enrageScale;
|
||||
NPC.velocity = player.Center + (bossRush ? player.velocity * 20f : Vector2.Zero) - NPC.Center;
|
||||
NPC.velocity = player.Center - NPC.Center;
|
||||
NPC.velocity.Normalize();
|
||||
NPC.velocity *= teleportRadius / (lungeTime - (int)enrageScale);
|
||||
dashStarted = true;
|
||||
|
||||
@@ -157,14 +157,13 @@ namespace CalamityMod.NPCs.Leviathan
|
||||
|
||||
// Variables
|
||||
Player player = Main.player[NPC.target];
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
bool notOcean = player.position.Y < 800f || player.position.Y > Main.worldSurface * 16.0 || (player.position.X > 6400f && player.position.X < (Main.maxTilesX * 16 - 6400));
|
||||
|
||||
// Enrage
|
||||
if (notOcean && !bossRush)
|
||||
if (notOcean && !BossRushEvent.BossRushActive)
|
||||
{
|
||||
if (biomeEnrageTimer > 0)
|
||||
biomeEnrageTimer--;
|
||||
@@ -172,12 +171,12 @@ namespace CalamityMod.NPCs.Leviathan
|
||||
else
|
||||
biomeEnrageTimer = CalamityGlobalNPC.biomeEnrageTimerMax;
|
||||
|
||||
bool biomeEnraged = biomeEnrageTimer <= 0 || bossRush;
|
||||
bool biomeEnraged = biomeEnrageTimer <= 0;
|
||||
|
||||
float enrageScale = 0f;
|
||||
if (biomeEnraged)
|
||||
{
|
||||
NPC.Calamity().CurrentlyEnraged = !bossRush;
|
||||
NPC.Calamity().CurrentlyEnraged = true;
|
||||
enrageScale += 1.5f;
|
||||
}
|
||||
|
||||
@@ -234,7 +233,7 @@ namespace CalamityMod.NPCs.Leviathan
|
||||
|
||||
NPC.rotation = NPC.rotation.AngleTowards(idealRotation, 0.08f);
|
||||
|
||||
if (bossRush || Collision.WetCollision(NPC.position, NPC.width, NPC.height) || NPC.position.Y > (Main.worldSurface - 125f) * 16f)
|
||||
if (BossRushEvent.BossRushActive || Collision.WetCollision(NPC.position, NPC.width, NPC.height) || NPC.position.Y > (Main.worldSurface - 125f) * 16f)
|
||||
{
|
||||
int oldAlpha = NPC.alpha;
|
||||
NPC.alpha = Utils.Clamp(NPC.alpha + 9, 0, 255);
|
||||
|
||||
@@ -93,10 +93,9 @@ namespace CalamityMod.NPCs.Leviathan
|
||||
// Avoid cheap bullshit
|
||||
NPC.damage = 0;
|
||||
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
|
||||
NPC.TargetClosest(false);
|
||||
|
||||
@@ -125,13 +124,13 @@ namespace CalamityMod.NPCs.Leviathan
|
||||
sirenAlive = false;
|
||||
}
|
||||
|
||||
float inertia = bossRush ? 24f : death ? 26f : revenge ? 27f : expertMode ? 28f : 30f;
|
||||
float inertia = death ? 26f : revenge ? 27f : expertMode ? 28f : 30f;
|
||||
if (!sirenAlive || leviathanInPhase4)
|
||||
inertia *= 0.75f;
|
||||
|
||||
if (NPC.ai[0] == 0f)
|
||||
{
|
||||
float lungeSpeed = bossRush ? 14f : death ? 12f : revenge ? 11f : expertMode ? 10f : 8f;
|
||||
float lungeSpeed = death ? 12f : revenge ? 11f : expertMode ? 10f : 8f;
|
||||
if (!sirenAlive || leviathanInPhase4)
|
||||
lungeSpeed *= 1.25f;
|
||||
|
||||
|
||||
@@ -128,10 +128,9 @@ namespace CalamityMod.NPCs.Leviathan
|
||||
if (CalamityGlobalNPC.LeviAndAna == -1)
|
||||
CalamityGlobalNPC.LeviAndAna = NPC.whoAmI;
|
||||
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
Vector2 npcCenter = NPC.Center;
|
||||
|
||||
// Is in spawning animation
|
||||
@@ -198,7 +197,7 @@ namespace CalamityMod.NPCs.Leviathan
|
||||
bool notOcean = player.position.Y < 800f || player.position.Y > Main.worldSurface * 16D || (player.position.X > 6400f && player.position.X < (Main.maxTilesX * 16 - 6400));
|
||||
|
||||
// Enrage
|
||||
if (notOcean && !bossRush)
|
||||
if (notOcean && !BossRushEvent.BossRushActive)
|
||||
{
|
||||
if (biomeEnrageTimer > 0)
|
||||
biomeEnrageTimer--;
|
||||
@@ -206,12 +205,12 @@ namespace CalamityMod.NPCs.Leviathan
|
||||
else
|
||||
biomeEnrageTimer = CalamityGlobalNPC.biomeEnrageTimerMax;
|
||||
|
||||
bool biomeEnraged = biomeEnrageTimer <= 0 || bossRush;
|
||||
bool biomeEnraged = biomeEnrageTimer <= 0;
|
||||
|
||||
float enrageScale = bossRush ? 1f : 0f;
|
||||
float enrageScale = 0f;
|
||||
if (biomeEnraged)
|
||||
{
|
||||
NPC.Calamity().CurrentlyEnraged = !bossRush;
|
||||
NPC.Calamity().CurrentlyEnraged = true;
|
||||
enrageScale += 2f;
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,6 @@ namespace CalamityMod.NPCs.NormalNPCs
|
||||
|
||||
private const int BoltShootGateValue = 60;
|
||||
private const int BoltShootGateValue_Death = 75;
|
||||
private const int BoltShootGateValue_BossRush = 45;
|
||||
private const float LightTelegraphDuration = 45f;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
@@ -55,8 +54,7 @@ namespace CalamityMod.NPCs.NormalNPCs
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
|
||||
// Despawn
|
||||
if (!CalamityPlayer.areThereAnyDamnBosses)
|
||||
@@ -126,7 +124,7 @@ namespace CalamityMod.NPCs.NormalNPCs
|
||||
|
||||
// Fire projectiles
|
||||
NPC.ai[0] += 1f;
|
||||
if (NPC.ai[0] >= (bossRush ? BoltShootGateValue_BossRush : death ? BoltShootGateValue_Death : BoltShootGateValue))
|
||||
if (NPC.ai[0] >= (death ? BoltShootGateValue_Death : BoltShootGateValue))
|
||||
{
|
||||
NPC.ai[0] = 0f;
|
||||
|
||||
@@ -194,7 +192,7 @@ namespace CalamityMod.NPCs.NormalNPCs
|
||||
|
||||
float alph = 0f;
|
||||
|
||||
float colorTelegraphGateValue = (BossRushEvent.BossRushActive ? BoltShootGateValue_BossRush : (CalamityWorld.death ? BoltShootGateValue_Death : BoltShootGateValue)) - LightTelegraphDuration;
|
||||
float colorTelegraphGateValue = (CalamityWorld.death ? BoltShootGateValue_Death : BoltShootGateValue) - LightTelegraphDuration;
|
||||
|
||||
if (NPC.ai[0] > colorTelegraphGateValue)
|
||||
alph = MathHelper.Lerp(0f, 1f, (NPC.ai[0] - colorTelegraphGateValue) / LightTelegraphDuration);
|
||||
|
||||
+16
-25
@@ -190,10 +190,9 @@ namespace CalamityMod.NPCs.OldDuke
|
||||
float lifeRatio = NPC.life / (float)NPC.lifeMax;
|
||||
|
||||
// Variables
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
|
||||
float exhaustionGateValue = 360f;
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
@@ -268,15 +267,7 @@ namespace CalamityMod.NPCs.OldDuke
|
||||
chargeVelocity = expertMode ? 24f : 23f;
|
||||
}
|
||||
|
||||
if (bossRush)
|
||||
{
|
||||
idlePhaseTimer = 35;
|
||||
idlePhaseAcceleration *= 1.25f;
|
||||
idlePhaseVelocity *= 1.2f;
|
||||
chargeTime -= 3;
|
||||
chargeVelocity *= 1.25f;
|
||||
}
|
||||
else if (death)
|
||||
if (death)
|
||||
{
|
||||
idlePhaseTimer = 51;
|
||||
idlePhaseAcceleration *= 1.05f;
|
||||
@@ -301,22 +292,22 @@ namespace CalamityMod.NPCs.OldDuke
|
||||
idlePhaseVelocity *= 0.25f;
|
||||
|
||||
// Variables
|
||||
int maxToothBallBelches = bossRush ? 5 : death ? 4 : 3;
|
||||
int toothBallBelchPhaseDivisor = bossRush ? 24 : death ? 30 : 40;
|
||||
int maxToothBallBelches = death ? 4 : 3;
|
||||
int toothBallBelchPhaseDivisor = death ? 30 : 40;
|
||||
int toothBallBelchPhaseTimer = toothBallBelchPhaseDivisor * maxToothBallBelches;
|
||||
float toothBallBelchPhaseAcceleration = bossRush ? 0.95f : death ? 0.6f : 0.55f;
|
||||
float toothBallBelchPhaseVelocity = bossRush ? 14f : death ? 10f : 9f;
|
||||
float toothBallBelchPhaseAcceleration = death ? 0.6f : 0.55f;
|
||||
float toothBallBelchPhaseVelocity = death ? 10f : 9f;
|
||||
float toothBallFinalVelocity = death ? 14f : revenge ? 13f : 12f;
|
||||
float goreVelocityX = death ? 8f : revenge ? 7.5f : expertMode ? 7f : 6f;
|
||||
float goreVelocityY = death ? 10.5f : revenge ? 10f : expertMode ? 9.5f : 8f;
|
||||
float sharkronVelocity = bossRush ? 18f : death ? 16f : revenge ? 15f : expertMode ? 14f : 12f;
|
||||
float sharkronVelocity = death ? 16f : revenge ? 15f : expertMode ? 14f : 12f;
|
||||
int attackTimer = 120;
|
||||
int phaseTransitionTimer = 180;
|
||||
int teleportPauseTimer = 30;
|
||||
int toothBallSpinPhaseDivisor = bossRush ? 27 : death ? 32 : 45;
|
||||
int toothBallSpinPhaseDivisor = death ? 32 : 45;
|
||||
int toothBallSpinTimer = maxToothBallBelches * toothBallSpinPhaseDivisor;
|
||||
float spinTime = toothBallSpinTimer / 2f;
|
||||
float toothBallSpinToothBallVelocity = bossRush ? 14f : death ? 9.5f : 9f;
|
||||
float toothBallSpinToothBallVelocity = death ? 9.5f : 9f;
|
||||
float spinAttackSpeed = Main.zenithWorld ? 44f : 22f;
|
||||
float spinSpeed = MathHelper.TwoPi / spinTime;
|
||||
|
||||
@@ -390,7 +381,7 @@ namespace CalamityMod.NPCs.OldDuke
|
||||
}
|
||||
}
|
||||
|
||||
calamityGlobalNPC.newAI[0] -= bossRush ? 1.5f : 1f;
|
||||
calamityGlobalNPC.newAI[0] -= 1f;
|
||||
if (calamityGlobalNPC.newAI[0] <= 0f)
|
||||
{
|
||||
calamityGlobalNPC.newAI[0] = 0f;
|
||||
@@ -399,14 +390,14 @@ namespace CalamityMod.NPCs.OldDuke
|
||||
}
|
||||
|
||||
// Enrage variable
|
||||
bool enrage = !bossRush &&
|
||||
bool enrage = !BossRushEvent.BossRushActive &&
|
||||
(player.position.Y < 300f || player.position.Y > Main.worldSurface * 16.0 ||
|
||||
(player.position.X > 8000f && player.position.X < (Main.maxTilesX * 16 - 8000)));
|
||||
|
||||
// Check for the flipped Abyss
|
||||
if (Main.remixWorld)
|
||||
{
|
||||
enrage = !bossRush &&
|
||||
enrage = !BossRushEvent.BossRushActive &&
|
||||
(player.position.Y < Main.UnderworldLayer * 16 * 0.8f || player.position.Y > Main.UnderworldLayer * 16 ||
|
||||
(player.position.X > 8000f && player.position.X < (Main.maxTilesX * 16 - 8000)));
|
||||
}
|
||||
@@ -422,11 +413,11 @@ namespace CalamityMod.NPCs.OldDuke
|
||||
|
||||
bool biomeEnraged = NPC.localAI[1] <= 0f;
|
||||
|
||||
NPC.Calamity().CurrentlyEnraged = biomeEnraged || bossRush;
|
||||
NPC.Calamity().CurrentlyEnraged = biomeEnraged;
|
||||
|
||||
// Increased DR while transitioning phases and not exhausted
|
||||
if (!exhausted)
|
||||
calamityGlobalNPC.DR = (NPC.ai[0] == -1f || NPC.ai[0] == 4f || NPC.ai[0] == 9f) ? (bossRush ? 0.99f : 0.75f) : 0.5f;
|
||||
calamityGlobalNPC.DR = (NPC.ai[0] == -1f || NPC.ai[0] == 4f || NPC.ai[0] == 9f) ? 0.75f : 0.5f;
|
||||
|
||||
calamityGlobalNPC.CurrentlyIncreasingDefenseOrDR = NPC.ai[0] == -1f || NPC.ai[0] == 4f || NPC.ai[0] == 9f;
|
||||
|
||||
|
||||
@@ -51,10 +51,9 @@ namespace CalamityMod.NPCs.OldDuke
|
||||
{
|
||||
Lighting.AddLight((int)((NPC.position.X + (NPC.width / 2)) / 16f), (int)((NPC.position.Y + (NPC.height / 2)) / 16f), 0.65f, 0.55f, 0f);
|
||||
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
|
||||
NPC.rotation += NPC.velocity.X * 0.05f;
|
||||
|
||||
@@ -113,7 +112,7 @@ namespace CalamityMod.NPCs.OldDuke
|
||||
float velocity = death ? 14f : revenge ? 13f : 12f;
|
||||
if (expertMode)
|
||||
{
|
||||
float speedUpMult = bossRush ? 0.01f : 0.005f;
|
||||
float speedUpMult = 0.005f;
|
||||
velocity += Vector2.Distance(player.Center, NPC.Center) * speedUpMult;
|
||||
}
|
||||
|
||||
@@ -143,7 +142,7 @@ namespace CalamityMod.NPCs.OldDuke
|
||||
NPC.velocity.X = (NPC.velocity.X * inertia + targetXDist) / (inertia + 1f);
|
||||
NPC.velocity.Y = (NPC.velocity.Y * inertia + targetYDist) / (inertia + 1f);
|
||||
|
||||
float toothBallAccel = bossRush ? 0.65f : 0.5f;
|
||||
float toothBallAccel = 0.5f;
|
||||
foreach (var n in Main.ActiveNPCs)
|
||||
{
|
||||
if (n.whoAmI != NPC.whoAmI && n.type == NPC.type)
|
||||
|
||||
@@ -70,10 +70,9 @@ namespace CalamityMod.NPCs.OldDuke
|
||||
{
|
||||
Lighting.AddLight((int)((NPC.position.X + (NPC.width / 2)) / 16f), (int)((NPC.position.Y + (NPC.height / 2)) / 16f), 0.7f * NPC.Opacity, 0.9f * NPC.Opacity, 0f);
|
||||
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
|
||||
if (NPC.target < 0 || NPC.target == Main.maxPlayers || Main.player[NPC.target].dead)
|
||||
{
|
||||
@@ -102,12 +101,12 @@ namespace CalamityMod.NPCs.OldDuke
|
||||
// Fly up
|
||||
bool upwardAI = NPC.ai[3] < 0f;
|
||||
|
||||
float flyTowardTargetGateValue = bossRush ? 60f : death ? 70f : revenge ? 75f : expertMode ? 80f : 90f;
|
||||
float extraTime = bossRush ? 60f : death ? 70f : revenge ? 75f : expertMode ? 80f : 90f;
|
||||
float flyTowardTargetGateValue = death ? 70f : revenge ? 75f : expertMode ? 80f : 90f;
|
||||
float extraTime = death ? 70f : revenge ? 75f : expertMode ? 80f : 90f;
|
||||
float aiGateValue = flyTowardTargetGateValue + extraTime;
|
||||
float dieGateValue = aiGateValue + extraTime * 4f;
|
||||
float fallDownGateValue = aiGateValue + extraTime;
|
||||
float maxVelocity = bossRush ? 22f : death ? 20f : revenge ? 19f : expertMode ? 18f : 16f;
|
||||
float maxVelocity = death ? 20f : revenge ? 19f : expertMode ? 18f : 16f;
|
||||
|
||||
if (NPC.ai[0] == 0f)
|
||||
{
|
||||
@@ -142,7 +141,7 @@ namespace CalamityMod.NPCs.OldDuke
|
||||
Vector2 targetDistance = Main.player[NPC.target].Center - NPC.Center;
|
||||
targetDistance.Normalize();
|
||||
targetDistance *= scaleFactor2;
|
||||
float inertia = bossRush ? 20f : death ? 23f : revenge ? 25f : expertMode ? 27f : 30f;
|
||||
float inertia = death ? 23f : revenge ? 25f : expertMode ? 27f : 30f;
|
||||
NPC.velocity = (NPC.velocity * (inertia - 1f) + targetDistance) / inertia;
|
||||
NPC.velocity.Normalize();
|
||||
NPC.velocity *= scaleFactor2;
|
||||
|
||||
@@ -60,9 +60,7 @@ namespace CalamityMod.NPCs.Perforator
|
||||
NPC.netAlways = true;
|
||||
NPC.dontCountMe = true;
|
||||
|
||||
if (BossRushEvent.BossRushActive)
|
||||
NPC.scale *= 1.25f;
|
||||
else if (CalamityWorld.death)
|
||||
if (CalamityWorld.death || BossRushEvent.BossRushActive)
|
||||
NPC.scale *= 1.2f;
|
||||
else if (CalamityWorld.revenge)
|
||||
NPC.scale *= 1.15f;
|
||||
|
||||
@@ -58,9 +58,7 @@ namespace CalamityMod.NPCs.Perforator
|
||||
NPC.netAlways = true;
|
||||
NPC.dontCountMe = true;
|
||||
|
||||
if (BossRushEvent.BossRushActive)
|
||||
NPC.scale *= 1.25f;
|
||||
else if (CalamityWorld.death)
|
||||
if (CalamityWorld.death || BossRushEvent.BossRushActive)
|
||||
NPC.scale *= 1.2f;
|
||||
else if (CalamityWorld.revenge)
|
||||
NPC.scale *= 1.15f;
|
||||
@@ -76,8 +74,7 @@ namespace CalamityMod.NPCs.Perforator
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
|
||||
NPC.realLife = -1;
|
||||
|
||||
|
||||
@@ -55,9 +55,7 @@ namespace CalamityMod.NPCs.Perforator
|
||||
NPC.netAlways = true;
|
||||
NPC.dontCountMe = true;
|
||||
|
||||
if (BossRushEvent.BossRushActive)
|
||||
NPC.scale *= 1.25f;
|
||||
else if (CalamityWorld.death)
|
||||
if (CalamityWorld.death || BossRushEvent.BossRushActive)
|
||||
NPC.scale *= 1.2f;
|
||||
else if (CalamityWorld.revenge)
|
||||
NPC.scale *= 1.15f;
|
||||
|
||||
@@ -73,9 +73,7 @@ namespace CalamityMod.NPCs.Perforator
|
||||
NPC.DeathSound = DeathSound;
|
||||
NPC.netAlways = true;
|
||||
|
||||
if (BossRushEvent.BossRushActive)
|
||||
NPC.scale *= 1.25f;
|
||||
else if (CalamityWorld.death)
|
||||
if (CalamityWorld.death || BossRushEvent.BossRushActive)
|
||||
NPC.scale *= 1.2f;
|
||||
else if (CalamityWorld.revenge)
|
||||
NPC.scale *= 1.15f;
|
||||
@@ -116,10 +114,9 @@ namespace CalamityMod.NPCs.Perforator
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
|
||||
// Get a target
|
||||
if (NPC.target < 0 || NPC.target == Main.maxPlayers || Main.player[NPC.target].dead || !Main.player[NPC.target].active)
|
||||
@@ -132,7 +129,7 @@ namespace CalamityMod.NPCs.Perforator
|
||||
Player player = Main.player[NPC.target];
|
||||
|
||||
// Enrage
|
||||
if ((!player.ZoneCrimson || (NPC.position.Y / 16f) < Main.worldSurface) && !bossRush)
|
||||
if ((!player.ZoneCrimson || (NPC.position.Y / 16f) < Main.worldSurface) && !BossRushEvent.BossRushActive)
|
||||
{
|
||||
if (biomeEnrageTimer > 0)
|
||||
biomeEnrageTimer--;
|
||||
@@ -140,12 +137,12 @@ namespace CalamityMod.NPCs.Perforator
|
||||
else
|
||||
biomeEnrageTimer = CalamityGlobalNPC.biomeEnrageTimerMax;
|
||||
|
||||
bool biomeEnraged = biomeEnrageTimer <= 0 || bossRush;
|
||||
bool biomeEnraged = biomeEnrageTimer <= 0;
|
||||
|
||||
float enrageScale = bossRush ? 1f : 0f;
|
||||
if (biomeEnraged && (!player.ZoneCrimson || bossRush))
|
||||
float enrageScale = 0f;
|
||||
if (biomeEnraged && !player.ZoneCrimson)
|
||||
enrageScale += 1f;
|
||||
if (biomeEnraged && ((NPC.position.Y / 16f) < Main.worldSurface || bossRush))
|
||||
if (biomeEnraged && (NPC.position.Y / 16f) < Main.worldSurface)
|
||||
enrageScale += 1f;
|
||||
|
||||
// Percent life remaining
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace CalamityMod.NPCs.Perforator
|
||||
public static readonly SoundStyle DeathSound = new("CalamityMod/Sounds/NPCKilled/PerfMediumDeath");
|
||||
|
||||
public static Asset<Texture2D> GlowTexture;
|
||||
|
||||
private int biomeEnrageTimer = CalamityGlobalNPC.biomeEnrageTimerMax;
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
NPCID.Sets.BossBestiaryPriority.Add(Type);
|
||||
@@ -69,9 +69,7 @@ namespace CalamityMod.NPCs.Perforator
|
||||
NPC.DeathSound = DeathSound;
|
||||
NPC.netAlways = true;
|
||||
|
||||
if (BossRushEvent.BossRushActive)
|
||||
NPC.scale *= 1.25f;
|
||||
else if (CalamityWorld.death)
|
||||
if (CalamityWorld.death || BossRushEvent.BossRushActive)
|
||||
NPC.scale *= 1.2f;
|
||||
else if (CalamityWorld.revenge)
|
||||
NPC.scale *= 1.15f;
|
||||
@@ -100,15 +98,23 @@ namespace CalamityMod.NPCs.Perforator
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
|
||||
float enrageScale = bossRush ? 1f : 0f;
|
||||
if ((NPC.position.Y / 16f) < Main.worldSurface || bossRush)
|
||||
if ((!Main.player[NPC.target].ZoneCrimson || (NPC.position.Y / 16f) < Main.worldSurface) && !BossRushEvent.BossRushActive)
|
||||
{
|
||||
if (biomeEnrageTimer > 0)
|
||||
biomeEnrageTimer--;
|
||||
}
|
||||
else
|
||||
biomeEnrageTimer = CalamityGlobalNPC.biomeEnrageTimerMax;
|
||||
|
||||
bool biomeEnraged = biomeEnrageTimer <= 0 && !BossRushEvent.BossRushActive;
|
||||
float enrageScale = 0f;
|
||||
if (biomeEnraged && (NPC.position.Y / 16f) < Main.worldSurface)
|
||||
enrageScale += 1f;
|
||||
if (!Main.player[NPC.target].ZoneCrimson || bossRush)
|
||||
if (biomeEnraged && !Main.player[NPC.target].ZoneCrimson)
|
||||
enrageScale += 1f;
|
||||
|
||||
// Total body segments
|
||||
|
||||
@@ -73,9 +73,7 @@ namespace CalamityMod.NPCs.Perforator
|
||||
NPC.DeathSound = DeathSound;
|
||||
NPC.netAlways = true;
|
||||
|
||||
if (BossRushEvent.BossRushActive)
|
||||
NPC.scale *= 1.25f;
|
||||
else if (CalamityWorld.death)
|
||||
if (CalamityWorld.death || BossRushEvent.BossRushActive)
|
||||
NPC.scale *= 1.2f;
|
||||
else if (CalamityWorld.revenge)
|
||||
NPC.scale *= 1.15f;
|
||||
@@ -112,13 +110,12 @@ namespace CalamityMod.NPCs.Perforator
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
|
||||
// Enrage
|
||||
if ((!Main.player[NPC.target].ZoneCrimson || (NPC.position.Y / 16f) < Main.worldSurface) && !bossRush)
|
||||
if ((!Main.player[NPC.target].ZoneCrimson || (NPC.position.Y / 16f) < Main.worldSurface) && !BossRushEvent.BossRushActive)
|
||||
{
|
||||
if (biomeEnrageTimer > 0)
|
||||
biomeEnrageTimer--;
|
||||
@@ -126,12 +123,12 @@ namespace CalamityMod.NPCs.Perforator
|
||||
else
|
||||
biomeEnrageTimer = CalamityGlobalNPC.biomeEnrageTimerMax;
|
||||
|
||||
bool biomeEnraged = biomeEnrageTimer <= 0 || bossRush;
|
||||
bool biomeEnraged = biomeEnrageTimer <= 0;
|
||||
|
||||
float enrageScale = bossRush ? 1f : 0f;
|
||||
if (biomeEnraged && (!Main.player[NPC.target].ZoneCrimson || bossRush))
|
||||
float enrageScale = 0f;
|
||||
if (biomeEnraged && !Main.player[NPC.target].ZoneCrimson)
|
||||
enrageScale += 1f;
|
||||
if (biomeEnraged && ((NPC.position.Y / 16f) < Main.worldSurface || bossRush))
|
||||
if (biomeEnraged && (NPC.position.Y / 16f) < Main.worldSurface)
|
||||
enrageScale += 1f;
|
||||
|
||||
// Percent life remaining
|
||||
|
||||
@@ -136,13 +136,12 @@ namespace CalamityMod.NPCs.Perforator
|
||||
if (Vector2.Distance(Main.player[NPC.target].Center, NPC.Center) > CalamityGlobalNPC.CatchUpDistance200Tiles)
|
||||
NPC.TargetClosest();
|
||||
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
|
||||
// Variables for ichor blob phase
|
||||
float blobPhaseGateValue = bossRush ? 450f : 600f;
|
||||
float blobPhaseGateValue = 600f;
|
||||
bool floatAboveToFireBlobs = NPC.ai[2] >= blobPhaseGateValue - 120f;
|
||||
|
||||
Player player = Main.player[NPC.target];
|
||||
@@ -154,7 +153,7 @@ namespace CalamityMod.NPCs.Perforator
|
||||
bool phase2 = lifeRatio < 0.7f;
|
||||
|
||||
// Enrage
|
||||
if ((!player.ZoneCrimson || (NPC.position.Y / 16f) < Main.worldSurface) && !bossRush)
|
||||
if ((!player.ZoneCrimson || (NPC.position.Y / 16f) < Main.worldSurface) && !BossRushEvent.BossRushActive)
|
||||
{
|
||||
if (biomeEnrageTimer > 0)
|
||||
biomeEnrageTimer--;
|
||||
@@ -162,17 +161,17 @@ namespace CalamityMod.NPCs.Perforator
|
||||
else
|
||||
biomeEnrageTimer = CalamityGlobalNPC.biomeEnrageTimerMax;
|
||||
|
||||
bool biomeEnraged = biomeEnrageTimer <= 0 || bossRush;
|
||||
bool biomeEnraged = biomeEnrageTimer <= 0;
|
||||
|
||||
float enrageScale = bossRush ? 1f : 0f;
|
||||
if (biomeEnraged && (!player.ZoneCrimson || bossRush))
|
||||
float enrageScale = 0f;
|
||||
if (biomeEnraged && !player.ZoneCrimson)
|
||||
{
|
||||
NPC.Calamity().CurrentlyEnraged = !bossRush;
|
||||
NPC.Calamity().CurrentlyEnraged = true;
|
||||
enrageScale += 1f;
|
||||
}
|
||||
if (biomeEnraged && ((NPC.position.Y / 16f) < Main.worldSurface || bossRush))
|
||||
if (biomeEnraged && (NPC.position.Y / 16f) < Main.worldSurface)
|
||||
{
|
||||
NPC.Calamity().CurrentlyEnraged = !bossRush;
|
||||
NPC.Calamity().CurrentlyEnraged = true;
|
||||
enrageScale += 1f;
|
||||
}
|
||||
|
||||
@@ -320,7 +319,7 @@ namespace CalamityMod.NPCs.Perforator
|
||||
// Emit ichor blobs
|
||||
if (phase2)
|
||||
{
|
||||
if (wormsAlive == 0 || large || bossRush || floatAboveToFireBlobs || CalamityWorld.LegendaryMode)
|
||||
if (wormsAlive == 0 || large || floatAboveToFireBlobs || CalamityWorld.LegendaryMode)
|
||||
{
|
||||
NPC.ai[2] += 1f;
|
||||
if (NPC.ai[2] >= blobPhaseGateValue)
|
||||
@@ -328,7 +327,7 @@ namespace CalamityMod.NPCs.Perforator
|
||||
if (NPC.ai[2] < blobPhaseGateValue + 300f)
|
||||
{
|
||||
if (NPC.velocity.Length() > 0.5f)
|
||||
NPC.velocity *= bossRush ? 0.94f : 0.96f;
|
||||
NPC.velocity *= 0.96f;
|
||||
else
|
||||
NPC.ai[2] = blobPhaseGateValue + 300f;
|
||||
}
|
||||
@@ -362,7 +361,7 @@ namespace CalamityMod.NPCs.Perforator
|
||||
{
|
||||
Vector2 blobVelocity = new Vector2(Main.rand.Next(-blobSpread, blobSpread + 1), Main.rand.Next(-blobSpread, blobSpread + 1));
|
||||
blobVelocity.Normalize();
|
||||
blobVelocity *= Main.rand.Next(400, 801) * (bossRush ? 0.02f : 0.01f);
|
||||
blobVelocity *= Main.rand.Next(400, 801) * 0.01f;
|
||||
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
blobVelocity *= Main.rand.NextFloat() + 1f;
|
||||
|
||||
@@ -55,9 +55,7 @@ namespace CalamityMod.NPCs.Perforator
|
||||
NPC.netAlways = true;
|
||||
NPC.dontCountMe = true;
|
||||
|
||||
if (BossRushEvent.BossRushActive)
|
||||
NPC.scale *= 1.25f;
|
||||
else if (CalamityWorld.death)
|
||||
if (CalamityWorld.death || BossRushEvent.BossRushActive)
|
||||
NPC.scale *= 1.2f;
|
||||
else if (CalamityWorld.revenge)
|
||||
NPC.scale *= 1.15f;
|
||||
|
||||
@@ -58,9 +58,7 @@ namespace CalamityMod.NPCs.Perforator
|
||||
NPC.netAlways = true;
|
||||
NPC.dontCountMe = true;
|
||||
|
||||
if (BossRushEvent.BossRushActive)
|
||||
NPC.scale *= 1.25f;
|
||||
else if (CalamityWorld.death)
|
||||
if (CalamityWorld.death || BossRushEvent.BossRushActive)
|
||||
NPC.scale *= 1.2f;
|
||||
else if (CalamityWorld.revenge)
|
||||
NPC.scale *= 1.15f;
|
||||
@@ -76,8 +74,7 @@ namespace CalamityMod.NPCs.Perforator
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
|
||||
NPC.realLife = -1;
|
||||
|
||||
|
||||
@@ -55,9 +55,7 @@ namespace CalamityMod.NPCs.Perforator
|
||||
NPC.netAlways = true;
|
||||
NPC.dontCountMe = true;
|
||||
|
||||
if (BossRushEvent.BossRushActive)
|
||||
NPC.scale *= 1.25f;
|
||||
else if (CalamityWorld.death)
|
||||
if (CalamityWorld.death || BossRushEvent.BossRushActive)
|
||||
NPC.scale *= 1.2f;
|
||||
else if (CalamityWorld.revenge)
|
||||
NPC.scale *= 1.15f;
|
||||
|
||||
@@ -50,10 +50,9 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
|
||||
Lighting.AddLight(NPC.Center, 0.015f, 0.1f, 0f);
|
||||
|
||||
@@ -108,7 +107,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath
|
||||
{
|
||||
NPC.localAI[1] += 1f;
|
||||
float timeBeforeExploding = 480f + NPC.ai[3] * 2f;
|
||||
float homingDuration = (bossRush ? 430f : death ? 340f : revenge ? 290f : expertMode ? 240f : 150f) + NPC.ai[3] * 2f;
|
||||
float homingDuration = (death ? 340f : revenge ? 290f : expertMode ? 240f : 150f) + NPC.ai[3] * 2f;
|
||||
if (NPC.localAI[1] == timeBeforeExploding)
|
||||
{
|
||||
CheckDead();
|
||||
@@ -130,7 +129,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath
|
||||
{
|
||||
NPC.noTileCollide = false;
|
||||
|
||||
if (NPC.velocity.Length() < (bossRush ? 25f : 20f))
|
||||
if (NPC.velocity.Length() < 20f)
|
||||
NPC.velocity *= 1.01f;
|
||||
|
||||
if (Collision.SolidCollision(NPC.position, NPC.width, NPC.height))
|
||||
|
||||
@@ -48,9 +48,8 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
|
||||
Lighting.AddLight(NPC.Center, 0.03f, 0.2f, 0f);
|
||||
|
||||
@@ -74,7 +73,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath
|
||||
|
||||
Vector2 vector = Main.player[NPC.target].Center - NPC.Center;
|
||||
float distanceRequiredForExplosion = 90f;
|
||||
float timeBeforeExplosion = (bossRush ? 1000f : death ? 740f : revenge ? 520f : 400f) + NPC.ai[3] * 4f;
|
||||
float timeBeforeExplosion = (death ? 740f : revenge ? 520f : 400f) + NPC.ai[3] * 4f;
|
||||
if (vector.Length() < distanceRequiredForExplosion || NPC.ai[0] >= timeBeforeExplosion)
|
||||
{
|
||||
CheckDead();
|
||||
@@ -90,7 +89,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath
|
||||
}
|
||||
|
||||
NPC.TargetClosest(true);
|
||||
float velocity = (bossRush ? 14f : death ? 12f : revenge ? 10f : 8f) + NPC.ai[3] * 0.04f;
|
||||
float velocity = (death ? 12f : revenge ? 10f : 8f) + NPC.ai[3] * 0.04f;
|
||||
Vector2 npcDirection = new Vector2(NPC.Center.X + (float)(NPC.direction * 20), NPC.Center.Y + 6f);
|
||||
float targetX = player.position.X + (float)player.width * 0.5f - npcDirection.X;
|
||||
float targetY = player.Center.Y - npcDirection.Y;
|
||||
@@ -98,7 +97,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath
|
||||
float npcSpeed = velocity / targetDistance;
|
||||
targetX *= npcSpeed;
|
||||
targetY *= npcSpeed;
|
||||
float inertia = (bossRush ? 35f : death ? 40f : revenge ? 45f : 50f) - NPC.ai[3] * 0.25f;
|
||||
float inertia = (death ? 40f : revenge ? 45f : 50f) - NPC.ai[3] * 0.25f;
|
||||
NPC.velocity.X = (NPC.velocity.X * inertia + targetX) / (inertia + 1f);
|
||||
NPC.velocity.Y = (NPC.velocity.Y * inertia + targetY) / (inertia + 1f);
|
||||
}
|
||||
|
||||
@@ -155,10 +155,9 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath
|
||||
NPC.height = (int)(NPC.frame.Height * (charging ? 1.5f : 1.8f));
|
||||
|
||||
// Mode variables
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
|
||||
// Percent life remaining
|
||||
float lifeRatio = NPC.life / (float)NPC.lifeMax;
|
||||
@@ -226,7 +225,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath
|
||||
Vector2 distFromPlayer = player.Center - NPC.Center;
|
||||
|
||||
// Enrage
|
||||
if (!player.ZoneJungle && !bossRush)
|
||||
if (!player.ZoneJungle && !BossRushEvent.BossRushActive)
|
||||
{
|
||||
if (biomeEnrageTimer > 0)
|
||||
biomeEnrageTimer--;
|
||||
@@ -234,12 +233,12 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath
|
||||
else
|
||||
biomeEnrageTimer = CalamityGlobalNPC.biomeEnrageTimerMax;
|
||||
|
||||
bool biomeEnraged = biomeEnrageTimer <= 0 || bossRush;
|
||||
bool biomeEnraged = biomeEnrageTimer <= 0;
|
||||
|
||||
float enrageScale = death ? 0.5f : 0f;
|
||||
if (biomeEnraged)
|
||||
{
|
||||
NPC.Calamity().CurrentlyEnraged = !bossRush;
|
||||
NPC.Calamity().CurrentlyEnraged = true;
|
||||
enrageScale += 1.5f;
|
||||
}
|
||||
|
||||
@@ -249,10 +248,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
enrageScale += 0.5f;
|
||||
|
||||
if (bossRush)
|
||||
enrageScale = 2f;
|
||||
|
||||
bool diagonalDash = (revenge && phase2) || bossRush;
|
||||
bool diagonalDash = (revenge && phase2);
|
||||
|
||||
if (NPC.ai[0] != 0f && NPC.ai[0] != 4f)
|
||||
NPC.rotation = NPC.velocity.X * 0.02f;
|
||||
@@ -628,7 +624,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath
|
||||
calamityGlobalNPC.newAI[0] += 1f;
|
||||
if ((Vector2.Distance(NPC.Center, player.Center) < 640f && canHitTarget) || calamityGlobalNPC.newAI[0] >= 180f)
|
||||
{
|
||||
NPC.ai[0] = (phase3 || bossRush) ? 5f : 1f;
|
||||
NPC.ai[0] = phase3 ? 5f : 1f;
|
||||
NPC.ai[1] = 0f;
|
||||
calamityGlobalNPC.newAI[0] = 0f;
|
||||
|
||||
@@ -975,15 +971,14 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath
|
||||
baseVelocity *= 0.4f;
|
||||
}
|
||||
|
||||
int missiles = bossRush ? 16 : MissileProjectiles;
|
||||
int spread = bossRush ? 18 : 24;
|
||||
int spread = 24;
|
||||
if (!gaussMode)
|
||||
{
|
||||
for (int i = 0; i < missiles; i++)
|
||||
for (int i = 0; i < MissileProjectiles; i++)
|
||||
{
|
||||
Vector2 spawn = NPC.Center; // Normal = 96, Boss Rush = 144
|
||||
spawn.X += i * (int)(spread * 1.125) - (missiles * (spread / 2)); // Normal = -96 to 93, Boss Rush = -144 to 156
|
||||
Vector2 velocity = baseVelocity.RotatedBy(MathHelper.ToRadians(-MissileAngleSpread / 2 + (MissileAngleSpread * i / missiles)));
|
||||
spawn.X += i * (int)(spread * 1.125) - (MissileProjectiles * (spread / 2)); // Normal = -96 to 93, Boss Rush = -144 to 156
|
||||
Vector2 velocity = baseVelocity.RotatedBy(MathHelper.ToRadians(-MissileAngleSpread / 2 + (MissileAngleSpread * i / MissileProjectiles)));
|
||||
Projectile.NewProjectile(NPC.GetSource_FromAI(), spawn, velocity, type, damage, 0f, Main.myPlayer, nukeBarrageChallengeAmt, player.position.Y);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,10 +94,9 @@ namespace CalamityMod.NPCs.Polterghast
|
||||
{
|
||||
CalamityGlobalNPC.ghostBossClone = NPC.whoAmI;
|
||||
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
|
||||
if (CalamityGlobalNPC.ghostBoss < 0 || !Main.npc[CalamityGlobalNPC.ghostBoss].active)
|
||||
{
|
||||
@@ -139,7 +138,7 @@ namespace CalamityMod.NPCs.Polterghast
|
||||
|
||||
float velocity = 3f;
|
||||
float acceleration = 0.03f;
|
||||
if (!player.ZoneDungeon && !bossRush && player.position.Y < Main.worldSurface * 16.0)
|
||||
if (!player.ZoneDungeon && !BossRushEvent.BossRushActive && player.position.Y < Main.worldSurface * 16.0)
|
||||
{
|
||||
despawnTimer--;
|
||||
if (despawnTimer <= 0)
|
||||
@@ -173,15 +172,14 @@ namespace CalamityMod.NPCs.Polterghast
|
||||
}
|
||||
|
||||
// Predictiveness
|
||||
Vector2 predictionVector = chargePhase && bossRush ? player.velocity * 20f : Vector2.Zero;
|
||||
Vector2 lookAt = player.Center + predictionVector;
|
||||
Vector2 lookAt = player.Center;
|
||||
Vector2 rotationVector = lookAt - vector;
|
||||
|
||||
// Rotation
|
||||
if (NPC.Calamity().newAI[3] == 0f)
|
||||
{
|
||||
float playerXDestination = player.Center.X + predictionVector.X - vector.X;
|
||||
float playerYDestination = player.Center.Y + predictionVector.Y - vector.Y;
|
||||
float playerXDestination = player.Center.X - vector.X;
|
||||
float playerYDestination = player.Center.Y - vector.Y;
|
||||
NPC.rotation = (float)Math.Atan2(playerYDestination, playerXDestination) + MathHelper.PiOver2;
|
||||
}
|
||||
else
|
||||
@@ -229,7 +227,7 @@ namespace CalamityMod.NPCs.Polterghast
|
||||
|
||||
float movementLimitedDistance = (float)Math.Sqrt(movementLimitedXDist * movementLimitedXDist + movementLimitedYDist * movementLimitedYDist);
|
||||
float maxDistanceFromHooks = expertMode ? 650f : 500f;
|
||||
if (speedBoost || bossRush)
|
||||
if (speedBoost)
|
||||
maxDistanceFromHooks += 250f;
|
||||
if (death)
|
||||
maxDistanceFromHooks += maxDistanceFromHooks * 0.1f * (1f - lifeRatio);
|
||||
|
||||
@@ -65,27 +65,27 @@ namespace CalamityMod.NPCs.Polterghast
|
||||
|
||||
public static List<SoundStyle> creepySounds = new List<SoundStyle>
|
||||
{
|
||||
NPCs.DevourerofGods.DevourerofGodsHead.AttackSound,
|
||||
NPCs.Providence.Providence.HolyRaySound,
|
||||
NPCs.ExoMechs.Ares.AresBody.EnragedSound,
|
||||
NPCs.ExoMechs.Ares.AresBody.LaserStartSound,
|
||||
NPCs.ExoMechs.Thanatos.ThanatosHead.VentSound,
|
||||
NPCs.SupremeCalamitas.SupremeCalamitas.SepulcherSummonSound,
|
||||
NPCs.SupremeCalamitas.SupremeCalamitas.SpawnSound,
|
||||
NPCs.Ravager.RavagerBody.LimbLossSound,
|
||||
NPCs.HiveMind.HiveMind.RoarSound,
|
||||
NPCs.Yharon.Yharon.RoarSound,
|
||||
NPCs.DesertScourge.DesertScourgeHead.RoarSound,
|
||||
NPCs.OldDuke.OldDuke.RoarSound,
|
||||
NPCs.Abyss.ReaperShark.SearchRoarSound,
|
||||
NPCs.Abyss.ReaperShark.EnragedRoarSound,
|
||||
NPCs.Abyss.LuminousCorvina.ScreamSound,
|
||||
NPCs.Abyss.DevilFish.MaskBreakSound,
|
||||
NPCs.PrimordialWyrm.PrimordialWyrmHead.ChargeSound,
|
||||
NPCs.GreatSandShark.GreatSandShark.RoarSound,
|
||||
NPCs.AcidRain.Mauler.RoarSound,
|
||||
NPCs.AstrumDeus.AstrumDeusHead.DeathSound,
|
||||
NPCs.AstrumAureus.AstrumAureus.HitSound,
|
||||
DevourerofGods.DevourerofGodsHead.AttackSound,
|
||||
Providence.Providence.HolyRaySound,
|
||||
ExoMechs.Ares.AresBody.EnragedSound,
|
||||
ExoMechs.Ares.AresBody.LaserStartSound,
|
||||
ExoMechs.Thanatos.ThanatosHead.VentSound,
|
||||
SupremeCalamitas.SupremeCalamitas.SepulcherSummonSound,
|
||||
SupremeCalamitas.SupremeCalamitas.SpawnSound,
|
||||
Ravager.RavagerBody.LimbLossSound,
|
||||
HiveMind.HiveMind.RoarSound,
|
||||
Yharon.Yharon.RoarSound,
|
||||
DesertScourge.DesertScourgeHead.RoarSound,
|
||||
OldDuke.OldDuke.RoarSound,
|
||||
ReaperShark.SearchRoarSound,
|
||||
ReaperShark.EnragedRoarSound,
|
||||
LuminousCorvina.ScreamSound,
|
||||
DevilFish.MaskBreakSound,
|
||||
PrimordialWyrm.PrimordialWyrmHead.ChargeSound,
|
||||
GreatSandShark.GreatSandShark.RoarSound,
|
||||
AcidRain.Mauler.RoarSound,
|
||||
AstrumDeus.AstrumDeusHead.DeathSound,
|
||||
AstrumAureus.AstrumAureus.HitSound,
|
||||
SoundID.ScaryScream,
|
||||
SoundID.DD2_KoboldFlyerHurt
|
||||
};
|
||||
@@ -200,12 +200,11 @@ namespace CalamityMod.NPCs.Polterghast
|
||||
|
||||
// Variables
|
||||
Vector2 vector = NPC.Center;
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool speedBoost = false;
|
||||
bool despawnBoost = false;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
|
||||
// Phases
|
||||
bool phase2 = lifeRatio < (death ? 0.9f : revenge ? 0.8f : expertMode ? 0.65f : 0.5f);
|
||||
@@ -328,7 +327,7 @@ namespace CalamityMod.NPCs.Polterghast
|
||||
}
|
||||
}
|
||||
|
||||
bool despawn = !player.ZoneDungeon && !bossRush && player.position.Y < Main.worldSurface * 16.0;
|
||||
bool despawn = !player.ZoneDungeon && !BossRushEvent.BossRushActive && player.position.Y < Main.worldSurface * 16.0;
|
||||
if (despawn)
|
||||
{
|
||||
despawnTimer--;
|
||||
@@ -413,15 +412,14 @@ namespace CalamityMod.NPCs.Polterghast
|
||||
float baseProjectileVelocity = speedBoost ? 9.375f : 7.5f;
|
||||
|
||||
// Predictiveness
|
||||
Vector2 predictionVector = chargePhase && bossRush ? player.velocity * 20f : Vector2.Zero;
|
||||
Vector2 lookAt = player.Center + predictionVector;
|
||||
Vector2 lookAt = player.Center;
|
||||
Vector2 rotationVector = lookAt - vector;
|
||||
|
||||
// Rotation
|
||||
if (calamityGlobalNPC.newAI[3] == 0f)
|
||||
{
|
||||
float playerXDestination = player.Center.X + predictionVector.X - vector.X;
|
||||
float playerYDestination = player.Center.Y + predictionVector.Y - vector.Y;
|
||||
float playerXDestination = player.Center.X - vector.X;
|
||||
float playerYDestination = player.Center.Y - vector.Y;
|
||||
NPC.rotation = (float)Math.Atan2(playerYDestination, playerXDestination) + MathHelper.PiOver2;
|
||||
}
|
||||
else
|
||||
@@ -469,7 +467,7 @@ namespace CalamityMod.NPCs.Polterghast
|
||||
|
||||
float movementLimitedDistance = (float)Math.Sqrt(movementLimitedXDist * movementLimitedXDist + movementLimitedYDist * movementLimitedYDist);
|
||||
float maxDistanceFromHooks = expertMode ? 650f : 500f;
|
||||
if (speedBoost || bossRush)
|
||||
if (speedBoost)
|
||||
maxDistanceFromHooks += 250f;
|
||||
if (death)
|
||||
maxDistanceFromHooks += maxDistanceFromHooks * 0.1f * (1f - lifeRatio);
|
||||
|
||||
@@ -212,7 +212,7 @@ namespace CalamityMod.NPCs.PrimordialWyrm
|
||||
// Target variable
|
||||
Player player = Main.player[NPC.target];
|
||||
|
||||
bool targetDownDeep = player.Calamity().ZoneAbyssLayer4 || BossRushEvent.BossRushActive;
|
||||
bool targetDownDeep = player.Calamity().ZoneAbyssLayer4;
|
||||
bool targetOnMount = player.mount.Active;
|
||||
|
||||
// Check whether enraged for the sake of the HP bar UI
|
||||
|
||||
@@ -150,10 +150,9 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
// Rotation
|
||||
NPC.rotation = NPC.velocity.X * 0.005f;
|
||||
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
|
||||
// Percent life remaining
|
||||
float lifeRatio = NPC.life / (float)NPC.lifeMax;
|
||||
@@ -356,7 +355,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
float goLowOrHighDistance = 540f;
|
||||
|
||||
// Side swap variables for Phase 2
|
||||
float defenderCommanderGuardPhase2Duration = bossRush ? 420f : death ? 480f : revenge ? 510f : expertMode ? 540f : 600f;
|
||||
float defenderCommanderGuardPhase2Duration = death ? 480f : revenge ? 510f : expertMode ? 540f : 600f;
|
||||
float moveToOtherSideInPhase2GateValue = defenderCommanderGuardPhase2Duration - 120f;
|
||||
float timeBeforeMoveToOtherSideInPhase2Reset = moveToOtherSideInPhase2GateValue * 2f;
|
||||
float totalGoLowDurationPhase2 = 210f;
|
||||
@@ -364,13 +363,13 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
|
||||
// Charge variables
|
||||
float chargeVelocityMult = 0.25f;
|
||||
float maxChargeVelocity = bossRush ? 32f : death ? 28f : revenge ? 26f : expertMode ? 24f : 20f;
|
||||
float maxChargeVelocity = death ? 28f : revenge ? 26f : expertMode ? 24f : 20f;
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
maxChargeVelocity *= 1.15f;
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
maxChargeVelocity *= 2f;
|
||||
|
||||
float inertia = bossRush ? 40f : death ? 45f : revenge ? 47f : expertMode ? 50f : 55f;
|
||||
float inertia = death ? 45f : revenge ? 47f : expertMode ? 50f : 55f;
|
||||
if (lifeRatio < 0.5f)
|
||||
inertia *= 0.8f;
|
||||
if (!phase1)
|
||||
@@ -453,7 +452,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
if (!goLow && !goLowPhase2 && !goHigh)
|
||||
calamityGlobalNPC.newAI[0] = -NPC.direction;
|
||||
|
||||
float velocity = bossRush ? 18f : death ? 16f : revenge ? 15f : expertMode ? 14f : 12f;
|
||||
float velocity = death ? 16f : revenge ? 15f : expertMode ? 14f : 12f;
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
velocity *= 1.25f;
|
||||
if (healerAlive)
|
||||
@@ -490,7 +489,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
|
||||
Vector2 targetVector = destination - NPC.Center;
|
||||
Vector2 desiredVelocity = targetVector.SafeNormalize(new Vector2(NPC.direction, 0f)) * velocity;
|
||||
float phaseGateValue = bossRush ? 50f : death ? 66f : revenge ? 75f : expertMode ? 83f : 100f;
|
||||
float phaseGateValue = death ? 66f : revenge ? 75f : expertMode ? 83f : 100f;
|
||||
bool continueShootingProjectiles = phase1 || (NPC.ai[2] < (phaseGateValue * 5f));
|
||||
|
||||
if (continueShootingProjectiles)
|
||||
@@ -504,7 +503,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
// Alternate between firing profaned spears and holy fire
|
||||
// Shoot holy blasts in final phase
|
||||
NPC.ai[2] += 1f;
|
||||
float projectileShootGateValue = bossRush ? 40f : death ? 60f : revenge ? 90f : expertMode ? 100f : 150f;
|
||||
float projectileShootGateValue = death ? 60f : revenge ? 90f : expertMode ? 100f : 150f;
|
||||
if (NPC.ai[2] % projectileShootGateValue == 0f)
|
||||
{
|
||||
if (phase1)
|
||||
@@ -518,7 +517,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
}
|
||||
|
||||
bool shootSpear = NPC.ai[2] % (projectileShootGateValue * 2f) == 0f;
|
||||
float projectileVelocity = bossRush ? 18f : death ? 16f : revenge ? 15f : expertMode ? 14f : 12f;
|
||||
float projectileVelocity = death ? 16f : revenge ? 15f : expertMode ? 14f : 12f;
|
||||
Vector2 finalProjectileVelocity = Vector2.Normalize(player.Center - shootFrom) * projectileVelocity;
|
||||
int type = shootSpear ? ModContent.ProjectileType<ProfanedSpear>() : ModContent.ProjectileType<HolyFire2>();
|
||||
int damage = NPC.GetProjectileDamage(type);
|
||||
@@ -531,8 +530,8 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
|
||||
if (fireExtraProjectiles && shootSpear)
|
||||
{
|
||||
int baseProjectileAmt = bossRush ? 4 : 2;
|
||||
int spread = bossRush ? 18 : 10;
|
||||
int baseProjectileAmt = 2;
|
||||
int spread = 10;
|
||||
float rotation = MathHelper.ToRadians(spread);
|
||||
for (int i = 0; i < baseProjectileAmt; i++)
|
||||
{
|
||||
@@ -551,7 +550,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
else
|
||||
{
|
||||
// Shoot holy blasts
|
||||
float holyBlastVelocity = bossRush ? 20f : death ? 18f : revenge ? 17f : expertMode ? 16f : 14f;
|
||||
float holyBlastVelocity = death ? 18f : revenge ? 17f : expertMode ? 16f : 14f;
|
||||
int projTimeLeft = (int)(2000f / holyBlastVelocity);
|
||||
Vector2 finalHolyBlastVelocity = Vector2.Normalize(player.Center - shootFrom) * holyBlastVelocity;
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
@@ -664,7 +663,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
NPC.spriteDirection = Math.Sign(NPC.velocity.X);
|
||||
|
||||
NPC.ai[1] += 1f;
|
||||
float phaseGateValue = bossRush ? 90f : death ? 100f : revenge ? 110f : expertMode ? 120f : 135f;
|
||||
float phaseGateValue = death ? 100f : revenge ? 110f : expertMode ? 120f : 135f;
|
||||
if (NPC.ai[1] >= phaseGateValue)
|
||||
{
|
||||
NPC.ai[0] = 3f;
|
||||
@@ -685,7 +684,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
// Accelerate
|
||||
if (NPC.velocity.Length() < maxChargeVelocity)
|
||||
{
|
||||
float velocityMult = bossRush ? 1.053333f : death ? 1.05037f : revenge ? 1.047407f : expertMode ? 1.044444f : 1.04f;
|
||||
float velocityMult = death ? 1.05037f : revenge ? 1.047407f : expertMode ? 1.044444f : 1.04f;
|
||||
NPC.velocity = targetVector * (NPC.velocity.Length() * velocityMult);
|
||||
if (NPC.velocity.Length() > maxChargeVelocity)
|
||||
{
|
||||
@@ -788,7 +787,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
|
||||
bool targetRanAwayAndWillNowBeFucked = NPC.ai[2] == 1f;
|
||||
bool boostVelocityToCatchUp = NPC.ai[1] == 0f || targetRanAwayAndWillNowBeFucked;
|
||||
float velocity = bossRush ? 18f : death ? 16f : revenge ? 15f : expertMode ? 14f : 12f;
|
||||
float velocity = death ? 16f : revenge ? 15f : expertMode ? 14f : 12f;
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
velocity *= 1.25f;
|
||||
if (boostVelocityToCatchUp)
|
||||
@@ -800,7 +799,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
Vector2 desiredVelocity = targetVector.SafeNormalize(new Vector2(NPC.direction, 0f)) * velocity;
|
||||
|
||||
float totalSpears = 12f;
|
||||
float shootDuration = bossRush ? 240f : death ? 280f : revenge ? 300f : expertMode ? 320f : 360f;
|
||||
float shootDuration = death ? 280f : revenge ? 300f : expertMode ? 320f : 360f;
|
||||
float dontShootTime = shootDuration * 0.3f;
|
||||
float phaseGateValue = dontShootTime + shootDuration;
|
||||
|
||||
@@ -845,7 +844,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
}
|
||||
else if (NPC.ai[1] % spearShootDivisor == 0f)
|
||||
{
|
||||
float spearVelocity = bossRush ? 18f : death ? 16f : revenge ? 15f : expertMode ? 14f : 12f;
|
||||
float spearVelocity = death ? 16f : revenge ? 15f : expertMode ? 14f : 12f;
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
spearVelocity *= 1.25f;
|
||||
if (boostVelocityToCatchUp)
|
||||
@@ -863,8 +862,8 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
if (NPC.ai[1] % (spearShootDivisor * 3) == 0f || targetRanAwayAndWillNowBeFucked)
|
||||
{
|
||||
knockbackVelocity *= 2f;
|
||||
int baseProjectileAmt = bossRush ? 8 : expertMode ? 6 : 4;
|
||||
int spread = bossRush ? 60 : expertMode ? 50 : 40;
|
||||
int baseProjectileAmt = expertMode ? 6 : 4;
|
||||
int spread = expertMode ? 50 : 40;
|
||||
float rotation = MathHelper.ToRadians(spread);
|
||||
for (int i = 0; i < baseProjectileAmt; i++)
|
||||
{
|
||||
@@ -900,7 +899,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
}
|
||||
|
||||
float laserGateValue = 120f;
|
||||
float velocity = bossRush ? 4.5f : death ? 4f : revenge ? 3.75f : expertMode ? 3.5f : 3f;
|
||||
float velocity = death ? 4f : revenge ? 3.75f : expertMode ? 3.5f : 3f;
|
||||
if (NPC.ai[1] < laserGateValue)
|
||||
velocity *= 6f;
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
@@ -956,7 +955,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
{
|
||||
if (NPC.ai[2] == laserGateValue)
|
||||
{
|
||||
float rotation = bossRush ? 435f : death ? 445f : revenge ? 450f : expertMode ? 455f : 465f;
|
||||
float rotation = death ? 445f : revenge ? 450f : expertMode ? 455f : 465f;
|
||||
|
||||
if (Main.LocalPlayer.active && !Main.LocalPlayer.dead && Vector2.Distance(Main.LocalPlayer.Center, NPC.Center) < 2800f)
|
||||
SoundEngine.PlaySound(HolyRaySound, Main.LocalPlayer.Center);
|
||||
|
||||
@@ -238,17 +238,16 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
// Get the Guardian Commander's target
|
||||
Player player = Main.player[Main.npc[CalamityGlobalNPC.doughnutBoss].target];
|
||||
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
|
||||
bool phase1 = healerAlive;
|
||||
|
||||
NPC.chaseable = !phase1;
|
||||
|
||||
// Phase durations
|
||||
float commanderGuardPhase2Duration = bossRush ? 420f : death ? 480f : revenge ? 510f : expertMode ? 540f : 600f;
|
||||
float commanderGuardPhase2Duration = death ? 480f : revenge ? 510f : expertMode ? 540f : 600f;
|
||||
float timeBeforeRocksRespawnInPhase2 = 90f;
|
||||
float throwRocksGateValue = 60f;
|
||||
|
||||
@@ -257,7 +256,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
|
||||
// Charge variables
|
||||
float chargeVelocityMult = 0.25f;
|
||||
float maxChargeVelocity = bossRush ? 25f : death ? 22f : revenge ? 20.5f : expertMode ? 19f : 16f;
|
||||
float maxChargeVelocity = death ? 22f : revenge ? 20.5f : expertMode ? 19f : 16f;
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
maxChargeVelocity *= 1.15f;
|
||||
|
||||
@@ -377,7 +376,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
}
|
||||
}
|
||||
|
||||
float moveVelocity = bossRush ? 24f : death ? 22f : revenge ? 21f : expertMode ? 20f : 18f;
|
||||
float moveVelocity = death ? 22f : revenge ? 21f : expertMode ? 20f : 18f;
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
moveVelocity *= 1.25f;
|
||||
if (healerAlive)
|
||||
@@ -427,7 +426,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
// Lay a holy bomb every once in a while in phase 1 and while not doing the laser attack
|
||||
if (!commanderUsingLaser)
|
||||
{
|
||||
float projectileShootGateValue = bossRush ? 420f : death ? 480f : revenge ? 510f : expertMode ? 540f : 600f;
|
||||
float projectileShootGateValue = death ? 480f : revenge ? 510f : expertMode ? 540f : 600f;
|
||||
NPC.ai[1] += 1f;
|
||||
if (NPC.ai[1] >= projectileShootGateValue)
|
||||
{
|
||||
@@ -497,7 +496,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
float shootMoltenBlastsGateValue = commanderGuardPhase2Duration / moltenBlastsDivisor;
|
||||
if (NPC.ai[1] % shootMoltenBlastsGateValue == 0f && !commanderGoingLowOrHighInPhase2)
|
||||
{
|
||||
float moltenBlastVelocity = bossRush ? 18f : death ? 16f : revenge ? 15f : expertMode ? 14f : 12f;
|
||||
float moltenBlastVelocity = death ? 16f : revenge ? 15f : expertMode ? 14f : 12f;
|
||||
int projTimeLeft = (int)(2400f / moltenBlastVelocity);
|
||||
Vector2 velocity = Vector2.Normalize(player.Center - shootFrom) * moltenBlastVelocity;
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
@@ -604,7 +603,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
NPC.spriteDirection = Math.Sign(NPC.velocity.X);
|
||||
|
||||
NPC.ai[1] += 1f;
|
||||
float phaseGateValue = bossRush ? 120f : death ? 140f : revenge ? 150f : expertMode ? 160f : 180f;
|
||||
float phaseGateValue = death ? 140f : revenge ? 150f : expertMode ? 160f : 180f;
|
||||
if (NPC.ai[1] >= phaseGateValue)
|
||||
{
|
||||
NPC.ai[0] = 3f;
|
||||
@@ -625,7 +624,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
// Accelerate
|
||||
if (NPC.velocity.Length() < maxChargeVelocity)
|
||||
{
|
||||
float velocityMult = bossRush ? 1.04f : death ? 1.036667f : revenge ? 1.035f : expertMode ? 1.033333f : 1.03f;
|
||||
float velocityMult = death ? 1.036667f : revenge ? 1.035f : expertMode ? 1.033333f : 1.03f;
|
||||
NPC.velocity = targetVector * (NPC.velocity.Length() * velocityMult);
|
||||
if (NPC.velocity.Length() > maxChargeVelocity)
|
||||
{
|
||||
@@ -637,7 +636,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
else if (NPC.localAI[2] == 1f)
|
||||
{
|
||||
// Charge towards target
|
||||
float inertia = bossRush ? 57f : death ? 63f : revenge ? 66f : expertMode ? 69f : 75f;
|
||||
float inertia = death ? 63f : revenge ? 66f : expertMode ? 69f : 75f;
|
||||
NPC.velocity = (NPC.velocity * (inertia - 1f) + targetVector * (NPC.velocity.Length() + (0.111111117f * inertia))) / inertia;
|
||||
|
||||
// Stop charging towards the player when within a certain distance
|
||||
|
||||
@@ -104,7 +104,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
});
|
||||
}
|
||||
|
||||
public float GetStarShootSlowDownGateValue() => BossRushEvent.BossRushActive ? 180f : CalamityWorld.death ? 210f : CalamityWorld.revenge ? 225f : Main.expertMode ? 240f : 270f;
|
||||
public float GetStarShootSlowDownGateValue() => CalamityWorld.death ? 210f : CalamityWorld.revenge ? 225f : Main.expertMode ? 240f : 270f;
|
||||
|
||||
public float GetStarShootGateValue() => GetStarShootSlowDownGateValue() + 60f;
|
||||
|
||||
@@ -160,10 +160,9 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
// Get the Guardian Commander's target
|
||||
Player player = Main.player[Main.npc[CalamityGlobalNPC.doughnutBoss].target];
|
||||
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
|
||||
// Percent life remaining
|
||||
float lifeRatio = NPC.life / (float)NPC.lifeMax;
|
||||
@@ -212,7 +211,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
}
|
||||
|
||||
bool useCrystalShards = AIState == (float)Phase.CrystalShards;
|
||||
float velocity = useCrystalShards ? (bossRush ? 18f : death ? 16f : revenge ? 15f : expertMode ? 14f : 12f) : (Main.npc[CalamityGlobalNPC.doughnutBoss].velocity.Length() + 5f);
|
||||
float velocity = useCrystalShards ? (death ? 16f : revenge ? 15f : expertMode ? 14f : 12f) : (Main.npc[CalamityGlobalNPC.doughnutBoss].velocity.Length() + 5f);
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
velocity *= 1.25f;
|
||||
|
||||
@@ -263,7 +262,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
{
|
||||
// Increment timer
|
||||
AITimer += 1f;
|
||||
float crystalShootGateValue = bossRush ? 140f : death ? 180f : revenge ? 200f : expertMode ? 220f : 260f;
|
||||
float crystalShootGateValue = death ? 180f : revenge ? 200f : expertMode ? 220f : 260f;
|
||||
float crystalShootPhaseDuration = crystalShootGateValue + crystalShootGateValue * 0.25f;
|
||||
|
||||
// Generate dust that scales with how close the crystals are to firing
|
||||
@@ -300,7 +299,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
{
|
||||
int type = ModContent.ProjectileType<ProvidenceCrystalShard>();
|
||||
int damage = NPC.GetProjectileDamage(type);
|
||||
int totalProjectiles = bossRush ? 18 : death ? 16 : revenge ? 14 : expertMode ? 12 : 10;
|
||||
int totalProjectiles = death ? 16 : revenge ? 14 : expertMode ? 12 : 10;
|
||||
float speedX = -12f;
|
||||
float speedAdjustment = Math.Abs(speedX * 2f / (totalProjectiles - 1));
|
||||
float speedY = -4f;
|
||||
@@ -339,7 +338,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
{
|
||||
SoundEngine.PlaySound(SoundID.DD2_BetsyFireballImpact, shootFrom);
|
||||
|
||||
int totalFlameProjectiles = bossRush ? 20 : 16;
|
||||
int totalFlameProjectiles = 16;
|
||||
int totalRings = revenge ? 3 : 2;
|
||||
int healingStarChance = revenge ? 8 : expertMode ? 6 : 4;
|
||||
double radians = MathHelper.TwoPi / totalFlameProjectiles;
|
||||
@@ -400,7 +399,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
// Move towards a location above the player
|
||||
if (distanceFromDestination.Length() > idealDistanceFromDestination)
|
||||
{
|
||||
float inertia = bossRush ? 28f : death ? 32f : revenge ? 34f : expertMode ? 36f : 40f;
|
||||
float inertia = death ? 32f : revenge ? 34f : expertMode ? 36f : 40f;
|
||||
if (lifeRatio < 0.5f)
|
||||
inertia *= 0.8f;
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
|
||||
@@ -142,10 +142,9 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
NPC.timeLeft = 1800;
|
||||
|
||||
// Difficulty modes
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
|
||||
// Spin and fly at the target
|
||||
if ((Main.npc[CalamityGlobalNPC.doughnutBossDefender].ai[0] != 0f && Main.npc[CalamityGlobalNPC.doughnutBossDefender].ai[1] >= -60f) || NPC.Calamity().newAI[0] < 0f)
|
||||
@@ -159,7 +158,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
|
||||
// Distance the rock travels before it starts to fall down
|
||||
float maxChargeDistance = 4800f;
|
||||
float chargeSpeed = bossRush ? 20f : death ? 18f : revenge ? 17f : expertMode ? 16f : 14f;
|
||||
float chargeSpeed = death ? 18f : revenge ? 17f : expertMode ? 16f : 14f;
|
||||
float fallDownGateValue = maxChargeDistance / chargeSpeed;
|
||||
|
||||
// Fall down after some time and blow up if inside tiles
|
||||
@@ -229,7 +228,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
// Push away from each other in Death and Boss Rush
|
||||
if (death)
|
||||
{
|
||||
float pushVelocity = bossRush ? 0.2f : 0.15f;
|
||||
float pushVelocity = 0.15f;
|
||||
foreach (NPC n in Main.ActiveNPCs)
|
||||
{
|
||||
if (n.whoAmI != NPC.whoAmI && n.type == NPC.type)
|
||||
@@ -257,7 +256,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
|
||||
// Rotate faster and charge
|
||||
NPC.Calamity().newAI[1] += 1f;
|
||||
float chargeGateValue = bossRush ? 60f : death ? 80f : revenge ? 90f : expertMode ? 100f : 120f;
|
||||
float chargeGateValue = death ? 80f : revenge ? 90f : expertMode ? 100f : 120f;
|
||||
chargeGateValue += chargeGateValue * 0.5f * NPC.ai[1];
|
||||
float anglularSpeed = NPC.Calamity().newAI[1] / chargeGateValue;
|
||||
anglularSpeed = 0.05f + anglularSpeed * 0.2f;
|
||||
@@ -279,7 +278,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
NPC.damage = 0;
|
||||
|
||||
// Distance from Defender Guardian
|
||||
double maxDistance = bossRush ? 360D : death ? 340D : revenge ? 330D : expertMode ? 320D : MinMaxDistance;
|
||||
double maxDistance = death ? 340D : revenge ? 330D : expertMode ? 320D : MinMaxDistance;
|
||||
double rateOfChangeIncrease = (maxDistance / MinMaxDistance) - 1D;
|
||||
double rateOfChange = (NPC.ai[1] * 0.5f) + 2D + rateOfChangeIncrease;
|
||||
if (NPC.Calamity().newAI[0] == 0f)
|
||||
|
||||
@@ -355,12 +355,10 @@ namespace CalamityMod.NPCs.Providence
|
||||
Player player = Main.player[NPC.target];
|
||||
|
||||
// Enraged bool and Color shifting
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
|
||||
bool getFuckedAI = Main.zenithWorld;
|
||||
if (getFuckedAI)
|
||||
NPC.localAI[1] = (float)BossMode.Rainbow;
|
||||
else if (hasBeenGivenFullPower || bossRush) // Enraged behavior
|
||||
else if (hasBeenGivenFullPower) // Enraged behavior
|
||||
NPC.localAI[1] = (float)BossMode.Enraged;
|
||||
else
|
||||
NPC.localAI[1] = (float)BossMode.Normal;
|
||||
@@ -418,7 +416,7 @@ namespace CalamityMod.NPCs.Providence
|
||||
else if (fullPowerAI)
|
||||
projectileDamageMult = 2;
|
||||
|
||||
NPC.Calamity().CurrentlyEnraged = !bossRush && fullPowerAI;
|
||||
NPC.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive && fullPowerAI;
|
||||
|
||||
// Projectile damage values
|
||||
int holyLaserDamage = NPC.GetProjectileDamage(ModContent.ProjectileType<ProvidenceHolyRay>()) * projectileDamageMult;
|
||||
@@ -447,13 +445,9 @@ namespace CalamityMod.NPCs.Providence
|
||||
|
||||
// Spear phase
|
||||
float spearRateIncrease = 1f - lifeRatio;
|
||||
float bossRushSpearRateIncrease = 0.25f;
|
||||
float baseSpearRate = 18f;
|
||||
float spearRate = 1f + spearRateIncrease;
|
||||
|
||||
if (bossRush)
|
||||
spearRate += bossRushSpearRateIncrease;
|
||||
|
||||
// Projectile fire rate multiplier
|
||||
double attackRateMult = 1D;
|
||||
|
||||
@@ -857,7 +851,7 @@ namespace CalamityMod.NPCs.Providence
|
||||
|
||||
// Velocity and acceleration
|
||||
float speedIncreaseTimer = fullPowerAI ? 75f : death ? 120f : 150f;
|
||||
bool increaseSpeed = calamityGlobalNPC.newAI[0] > speedIncreaseTimer || bossRush;
|
||||
bool increaseSpeed = calamityGlobalNPC.newAI[0] > speedIncreaseTimer;
|
||||
float accelerationBoost = death ? 0.3f * (1f - lifeRatio) : 0.2f * (1f - lifeRatio);
|
||||
float velocityBoost = death ? 6f * (1f - lifeRatio) : 4f * (1f - lifeRatio);
|
||||
float acceleration = (expertMode ? 1.1f : 1.05f) + accelerationBoost;
|
||||
@@ -875,10 +869,8 @@ namespace CalamityMod.NPCs.Providence
|
||||
else if (increaseSpeed)
|
||||
{
|
||||
velocity += (calamityGlobalNPC.newAI[0] - speedIncreaseTimer) * 0.04f;
|
||||
if (velocity > 30f || bossRush)
|
||||
if (velocity > 30f)
|
||||
velocity = 30f;
|
||||
if (bossRush)
|
||||
acceleration = 2f;
|
||||
}
|
||||
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
@@ -925,8 +917,8 @@ namespace CalamityMod.NPCs.Providence
|
||||
int phase = 0;
|
||||
|
||||
// Holy ray in hallow, Crystal in hell
|
||||
bool useLaser = (phase2 && biomeType == 1) || bossRush;
|
||||
bool useCrystal = (phase2 && biomeType == 2) || bossRush;
|
||||
bool useLaser = (phase2 && biomeType == 1) || BossRushEvent.BossRushActive;
|
||||
bool useCrystal = (phase2 && biomeType == 2) || BossRushEvent.BossRushActive;
|
||||
|
||||
// Unique pattern for Death Mode and Boss Rush
|
||||
if (death)
|
||||
@@ -1158,7 +1150,7 @@ namespace CalamityMod.NPCs.Providence
|
||||
NPC.ai[3] += 1f;
|
||||
|
||||
int shootBoost = death ? (int)Math.Round(5f * (1f - lifeRatio)) : (int)Math.Round(4f * (1f - lifeRatio));
|
||||
int projectileShootGateValue = (bossRush ? 18 : expertMode ? 24 : 26) - shootBoost;
|
||||
int projectileShootGateValue = (expertMode ? 24 : 26) - shootBoost;
|
||||
|
||||
projectileShootGateValue = (int)(projectileShootGateValue * attackRateMult);
|
||||
|
||||
@@ -1203,8 +1195,6 @@ namespace CalamityMod.NPCs.Providence
|
||||
|
||||
int shootBoost = death ? (int)Math.Round(6f * (1f - lifeRatio)) : (int)Math.Round(5f * (1f - lifeRatio));
|
||||
int projectileShootGateValue = (expertMode ? 36 : 39) - shootBoost;
|
||||
if (bossRush)
|
||||
projectileShootGateValue = 27;
|
||||
|
||||
projectileShootGateValue = (int)(projectileShootGateValue * attackRateMult);
|
||||
|
||||
@@ -1252,7 +1242,7 @@ namespace CalamityMod.NPCs.Providence
|
||||
}
|
||||
|
||||
float divisor = (expertMode ? 2f : 3f) + (float)Math.Floor(3f * lifeRatio) + (attackRateMult > 1D ? (float)Math.Ceiling(attackRateMult * 1.6) : 0f);
|
||||
int totalFlameProjectiles = bossRush ? 45 : 36;
|
||||
int totalFlameProjectiles = 36;
|
||||
int chains = 4;
|
||||
float interval = totalFlameProjectiles / chains * divisor;
|
||||
double patternInterval = Math.Floor(NPC.ai[3] / interval);
|
||||
@@ -1296,7 +1286,7 @@ namespace CalamityMod.NPCs.Providence
|
||||
{
|
||||
NPC.ai[2] = 0f;
|
||||
|
||||
totalFlameProjectiles = bossRush ? 20 : 16;
|
||||
totalFlameProjectiles = 16;
|
||||
if (NPC.ai[3] % (divisor * totalFlameProjectiles) == 0f)
|
||||
{
|
||||
calamityGlobalNPC.newAI[1] += 1f;
|
||||
@@ -1442,8 +1432,6 @@ namespace CalamityMod.NPCs.Providence
|
||||
|
||||
int shootBoost = death ? (int)Math.Round(5f * (1f - lifeRatio)) : (int)Math.Round(4f * (1f - lifeRatio));
|
||||
int projectileShootGateValue = (expertMode ? 24 : 26) - shootBoost;
|
||||
if (bossRush)
|
||||
projectileShootGateValue = 18;
|
||||
|
||||
projectileShootGateValue = (int)(projectileShootGateValue * attackRateMult);
|
||||
|
||||
@@ -1487,7 +1475,7 @@ namespace CalamityMod.NPCs.Providence
|
||||
NPC.ai[3] += 1f;
|
||||
|
||||
int shootBoost = death ? (int)Math.Round(12f * (1f - lifeRatio)) : (int)Math.Round(10f * (1f - lifeRatio));
|
||||
int projectileShootGateValue = (bossRush ? 54 : expertMode ? 73 : 77) - shootBoost;
|
||||
int projectileShootGateValue = (expertMode ? 73 : 77) - shootBoost;
|
||||
|
||||
projectileShootGateValue = (int)(projectileShootGateValue * attackRateMult);
|
||||
|
||||
@@ -1546,7 +1534,7 @@ namespace CalamityMod.NPCs.Providence
|
||||
|
||||
if (calamityGlobalNPC.newAI[2] % 2f == 0f)
|
||||
{
|
||||
int totalSpearProjectiles = bossRush ? 15 : 12;
|
||||
int totalSpearProjectiles = 12;
|
||||
double radians = MathHelper.TwoPi / totalSpearProjectiles;
|
||||
Vector2 spinningPoint = Vector2.Normalize(new Vector2(-calamityGlobalNPC.newAI[1], -cocoonProjVelocity));
|
||||
|
||||
@@ -2762,7 +2750,7 @@ namespace CalamityMod.NPCs.Providence
|
||||
// These will be used for almost every single one of her projectiles, so it's useful to have.
|
||||
public static class ProvUtils
|
||||
{
|
||||
public static bool StandardAI() => (CalamityGlobalNPC.holyBoss == -1 || !Main.npc[CalamityGlobalNPC.holyBoss].Calamity().CurrentlyEnraged) && !Main.zenithWorld && !BossRushEvent.BossRushActive;
|
||||
public static bool StandardAI() => (CalamityGlobalNPC.holyBoss == -1 || !Main.npc[CalamityGlobalNPC.holyBoss].Calamity().CurrentlyEnraged) && !Main.zenithWorld;
|
||||
|
||||
// Simplified to day/night only. For PSC
|
||||
public static Color GetColorBasedOnEnrage(int Alpha, bool Outline = false) => GetColorBasedOnEnrage(!Main.IsItDay() && !Main.remixWorld, Alpha, Outline);
|
||||
|
||||
+10
-24
@@ -146,10 +146,9 @@ namespace CalamityMod.NPCs.Ravager
|
||||
{
|
||||
CalamityGlobalNPC calamityGlobalNPC = NPC.Calamity();
|
||||
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
|
||||
// Percent life remaining
|
||||
float lifeRatio = NPC.life / (float)NPC.lifeMax;
|
||||
@@ -224,14 +223,6 @@ namespace CalamityMod.NPCs.Ravager
|
||||
if (immunePhase)
|
||||
{
|
||||
NPC.dontTakeDamage = true;
|
||||
if (bossRush)
|
||||
{
|
||||
foreach (Player p in Main.ActivePlayers)
|
||||
{
|
||||
if (!p.dead && revenge)
|
||||
p.AddBuff(ModContent.BuffType<WeakPetrification>(), 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -523,11 +514,11 @@ namespace CalamityMod.NPCs.Ravager
|
||||
|
||||
if (revenge)
|
||||
{
|
||||
float multiplier = bossRush ? 0.003f : 0.0015f;
|
||||
float multiplier = 0.0015f;
|
||||
if (distanceBelowTarget > 0f)
|
||||
calamityGlobalNPC.newAI[1] += 1f + distanceBelowTarget * multiplier;
|
||||
|
||||
float speedMultLimit = bossRush ? 3f : 2f;
|
||||
float speedMultLimit = 2f;
|
||||
if (calamityGlobalNPC.newAI[1] > speedMultLimit)
|
||||
calamityGlobalNPC.newAI[1] = speedMultLimit;
|
||||
|
||||
@@ -718,7 +709,7 @@ namespace CalamityMod.NPCs.Ravager
|
||||
{
|
||||
if (phase2)
|
||||
{
|
||||
float stopBeforeFallTime = bossRush ? 25f : 30f;
|
||||
float stopBeforeFallTime = 30f;
|
||||
if (!anyHeadActive)
|
||||
stopBeforeFallTime -= 15f;
|
||||
else if (expertMode)
|
||||
@@ -735,7 +726,7 @@ namespace CalamityMod.NPCs.Ravager
|
||||
NPC.damage = NPC.defDamage;
|
||||
|
||||
float fallSpeedBoost = !anyHeadActive ? 1.8f : death ? 1.8f * (1f - lifeRatio) : 1.2f * (1f - lifeRatio);
|
||||
float fallSpeed = (bossRush ? 1.8f : 1.2f) + fallSpeedBoost;
|
||||
float fallSpeed = 1.2f + fallSpeedBoost;
|
||||
|
||||
if (calamityGlobalNPC.newAI[1] > 1f)
|
||||
fallSpeed *= calamityGlobalNPC.newAI[1];
|
||||
@@ -752,7 +743,7 @@ namespace CalamityMod.NPCs.Ravager
|
||||
if (NPC.Bottom.Y < player.position.Y)
|
||||
{
|
||||
float fallSpeedBoost = !anyHeadActive ? 0.9f : death ? 0.9f * (1f - lifeRatio) : 0.6f * (1f - lifeRatio);
|
||||
float fallSpeed = (bossRush ? 0.9f : 0.6f) + fallSpeedBoost;
|
||||
float fallSpeed = 0.6f + fallSpeedBoost;
|
||||
|
||||
if (calamityGlobalNPC.newAI[1] > 1f)
|
||||
fallSpeed *= calamityGlobalNPC.newAI[1];
|
||||
@@ -763,7 +754,7 @@ namespace CalamityMod.NPCs.Ravager
|
||||
}
|
||||
else
|
||||
{
|
||||
float velocityMult = bossRush ? 2f : 1.8f;
|
||||
float velocityMult = 1.8f;
|
||||
float velocityXChange = 0.2f + Math.Abs(NPC.Center.X - player.Center.X) * 0.001f;
|
||||
|
||||
float velocityXBoost = !anyHeadActive ? 6f : death ? 6f * (1f - lifeRatio) : 4f * (1f - lifeRatio);
|
||||
@@ -812,11 +803,6 @@ namespace CalamityMod.NPCs.Ravager
|
||||
{
|
||||
float gravity = phase2 ? 0f : 0.45f;
|
||||
float maxFallSpeed = reduceFallSpeed ? 12f : phase2 ? 24f : 15f;
|
||||
if (bossRush && !reduceFallSpeed)
|
||||
{
|
||||
gravity *= 1.25f;
|
||||
maxFallSpeed *= 1.25f;
|
||||
}
|
||||
|
||||
if (calamityGlobalNPC.newAI[1] > 1f && !reduceFallSpeed)
|
||||
maxFallSpeed *= calamityGlobalNPC.newAI[1];
|
||||
@@ -833,7 +819,7 @@ namespace CalamityMod.NPCs.Ravager
|
||||
player = Main.player[NPC.target];
|
||||
}
|
||||
|
||||
int distanceFromTarget = player.dead ? 1600 : bossRush ? 8400 : 5600;
|
||||
int distanceFromTarget = player.dead ? 1600 : 5600;
|
||||
if (Vector2.Distance(NPC.Center, player.Center) > distanceFromTarget)
|
||||
{
|
||||
NPC.TargetClosest();
|
||||
|
||||
@@ -56,7 +56,6 @@ namespace CalamityMod.NPCs.Ravager
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
//Main.NewText(NPC.ai[0]);
|
||||
if (CalamityGlobalNPC.scavenger < 0 || !Main.npc[CalamityGlobalNPC.scavenger].active)
|
||||
{
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
|
||||
@@ -61,9 +61,8 @@ namespace CalamityMod.NPCs.Ravager
|
||||
|
||||
Player player = Main.player[Main.npc[CalamityGlobalNPC.scavenger].target];
|
||||
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool provy = DownedBossSystem.downedProvidence && !bossRush;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
bool provy = DownedBossSystem.downedProvidence && !BossRushEvent.BossRushActive;
|
||||
|
||||
if (NPC.timeLeft < 1800)
|
||||
NPC.timeLeft = 1800;
|
||||
@@ -103,7 +102,7 @@ namespace CalamityMod.NPCs.Ravager
|
||||
NPC.rotation = headRotation;
|
||||
|
||||
NPC.ai[1] += 1f;
|
||||
bool fireProjectiles = NPC.ai[1] >= (bossRush ? 240f : 480f);
|
||||
bool fireProjectiles = NPC.ai[1] >= 480f;
|
||||
if (fireProjectiles && Vector2.Distance(NPC.Center, player.Center) > 80f)
|
||||
{
|
||||
int type = ModContent.ProjectileType<HomingLaserDart>();
|
||||
|
||||
@@ -96,7 +96,7 @@ namespace CalamityMod.NPCs.Ravager
|
||||
}
|
||||
|
||||
NPC.noTileCollide = true;
|
||||
NPC.velocity.X = (BossRushEvent.BossRushActive ? 15 : 12) * NPC.direction;
|
||||
NPC.velocity.X = 12 * NPC.direction;
|
||||
NPC.velocity.Y = -28.5f;
|
||||
NPC.ai[0] = 1f;
|
||||
NPC.ai[1] = 0f;
|
||||
|
||||
@@ -113,8 +113,6 @@ namespace CalamityMod.NPCs.Signus
|
||||
|
||||
bool revenge = CalamityWorld.revenge;
|
||||
float playerDistNormMult = revenge ? 24f : 22f;
|
||||
if (BossRushEvent.BossRushActive)
|
||||
playerDistNormMult = 30f;
|
||||
CalamityRegularEnemyAI.DungeonSpiritAI(NPC, Mod, playerDistNormMult, 0f, true);
|
||||
}
|
||||
|
||||
|
||||
+12
-13
@@ -126,10 +126,9 @@ namespace CalamityMod.NPCs.Signus
|
||||
|
||||
CalamityGlobalNPC.signus = NPC.whoAmI;
|
||||
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
|
||||
Vector2 vectorCenter = NPC.Center;
|
||||
|
||||
@@ -138,8 +137,8 @@ namespace CalamityMod.NPCs.Signus
|
||||
lifeToAlpha = (int)((CalamityWorld.LegendaryMode ? 200D : 100D) * (1D - lifeRatio));
|
||||
int maxCharges = death ? 1 : revenge ? 2 : expertMode ? 3 : 4;
|
||||
int maxTeleports = (death && lifeRatio < 0.9) ? 1 : revenge ? 2 : expertMode ? 3 : 4;
|
||||
float inertia = bossRush ? 9f : death ? 10f : revenge ? 11f : expertMode ? 12f : 14f;
|
||||
float chargeVelocity = bossRush ? 16f : death ? 14f : revenge ? 13f : expertMode ? 12f : 10f;
|
||||
float inertia = death ? 10f : revenge ? 11f : expertMode ? 12f : 14f;
|
||||
float chargeVelocity = death ? 14f : revenge ? 13f : expertMode ? 12f : 10f;
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
{
|
||||
inertia *= 0.5f;
|
||||
@@ -248,7 +247,7 @@ namespace CalamityMod.NPCs.Signus
|
||||
if (phase3 || revenge)
|
||||
NPC.knockBackResist = 0f;
|
||||
|
||||
float speed = bossRush ? 20f : revenge ? 15f : expertMode ? 14f : 12f;
|
||||
float speed = revenge ? 15f : expertMode ? 14f : 12f;
|
||||
if (expertMode)
|
||||
speed += death ? 6f * (float)(1D - lifeRatio) : 4f * (float)(1D - lifeRatio);
|
||||
|
||||
@@ -290,7 +289,7 @@ namespace CalamityMod.NPCs.Signus
|
||||
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
NPC.localAI[1] += bossRush ? 1.5f : 1f;
|
||||
NPC.localAI[1] += 1f;
|
||||
|
||||
if (expertMode)
|
||||
NPC.localAI[1] += death ? 3f * (float)(1D - lifeRatio) : 2f * (float)(1D - lifeRatio);
|
||||
@@ -353,7 +352,7 @@ namespace CalamityMod.NPCs.Signus
|
||||
Main.dust[dust].fadeIn = 1f;
|
||||
}
|
||||
|
||||
NPC.alpha += bossRush ? 3 : 2;
|
||||
NPC.alpha += 2;
|
||||
if (expertMode)
|
||||
NPC.alpha += death ? (int)Math.Round(4.5D * (1D - lifeRatio)) : (int)Math.Round(3D * (1D - lifeRatio));
|
||||
|
||||
@@ -470,7 +469,7 @@ namespace CalamityMod.NPCs.Signus
|
||||
NPC.direction = playerLocation < 0f ? 1 : -1;
|
||||
NPC.spriteDirection = NPC.direction;
|
||||
|
||||
float divisor = expertMode ? (bossRush ? 10f : death ? 12f : revenge ? 15f : 20f) - (float)Math.Ceiling(5D * (1D - lifeRatio)) : 20f;
|
||||
float divisor = expertMode ? (death ? 12f : revenge ? 15f : 20f) - (float)Math.Ceiling(5D * (1D - lifeRatio)) : 20f;
|
||||
float scytheBarrageTime = divisor * 3f;
|
||||
float scytheBarrageCooldown = divisor * 3f;
|
||||
|
||||
@@ -510,8 +509,8 @@ namespace CalamityMod.NPCs.Signus
|
||||
}
|
||||
}
|
||||
|
||||
float maxVelocityY = bossRush ? 1.5f : death ? 2.5f : 3f;
|
||||
float maxVelocityX = bossRush ? 5f : death ? 7f : 8f;
|
||||
float maxVelocityY = death ? 2.5f : 3f;
|
||||
float maxVelocityX = death ? 7f : 8f;
|
||||
|
||||
if (NPC.position.Y > player.position.Y - 250f)
|
||||
{
|
||||
@@ -632,7 +631,7 @@ namespace CalamityMod.NPCs.Signus
|
||||
// Avoid cheap bullshit
|
||||
NPC.damage = 0;
|
||||
|
||||
float velocity = bossRush ? 18f : revenge ? 16f : expertMode ? 15f : 14f;
|
||||
float velocity = revenge ? 16f : expertMode ? 15f : 14f;
|
||||
if (expertMode)
|
||||
velocity += death ? 6f * (float)(1D - lifeRatio) : 4f * (float)(1D - lifeRatio);
|
||||
|
||||
|
||||
@@ -79,10 +79,9 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
CalamityGlobalNPC calamityGlobalNPC = NPC.Calamity();
|
||||
|
||||
CalamityGlobalNPC.slimeGodRed = NPC.whoAmI;
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool death = CalamityWorld.death || NPC.localAI[1] == 1f || bossRush;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || NPC.localAI[1] == 1f || BossRushEvent.BossRushActive;
|
||||
|
||||
float lifeRatio = NPC.life / (float)NPC.lifeMax;
|
||||
|
||||
@@ -112,7 +111,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
float scale = CalamityWorld.LegendaryMode ? 0.6f : 1f;
|
||||
|
||||
// How fast the slime slams down
|
||||
float slamVelocity = bossRush ? 20f : death ? 16f : revenge ? 15f : expertMode ? 14f : 12f;
|
||||
float slamVelocity = death ? 16f : revenge ? 15f : expertMode ? 14f : 12f;
|
||||
|
||||
// Used for how fast the slime animates
|
||||
NPC.aiAction = 0;
|
||||
@@ -238,9 +237,6 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
enraged = false;
|
||||
}
|
||||
|
||||
if (bossRush)
|
||||
enraged = true;
|
||||
|
||||
if (NPC.localAI[1] != 1f)
|
||||
{
|
||||
if (enraged)
|
||||
@@ -339,7 +335,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
}
|
||||
}
|
||||
|
||||
float distanceSpeedBoost = NPC.Distance(player.Center) * (bossRush ? 0.008f : 0.005f);
|
||||
float distanceSpeedBoost = NPC.Distance(player.Center) * 0.005f;
|
||||
|
||||
if (NPC.ai[0] == 0f)
|
||||
{
|
||||
@@ -716,7 +712,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
|
||||
NPC.aiAction = 1;
|
||||
NPC.ai[1] += 1f;
|
||||
float teleportTime = bossRush ? 20f : death ? 30f : 40f;
|
||||
float teleportTime = death ? 30f : 40f;
|
||||
scale = MathHelper.Clamp((teleportTime - NPC.ai[1]) / teleportTime, 0f, 1f);
|
||||
scale = 0.5f + scale * 0.5f;
|
||||
if (NPC.ai[1] >= teleportTime && Main.netMode != NetmodeID.MultiplayerClient)
|
||||
@@ -749,7 +745,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
NPC.damage = 0;
|
||||
|
||||
NPC.ai[1] += 1f;
|
||||
float teleportEndTime = bossRush ? 10f : death ? 15f : 20f;
|
||||
float teleportEndTime = death ? 15f : 20f;
|
||||
scale = MathHelper.Clamp(NPC.ai[1] / teleportEndTime, 0f, 1f);
|
||||
scale = 0.5f + scale * 0.5f;
|
||||
if (NPC.ai[1] >= teleportEndTime && Main.netMode != NetmodeID.MultiplayerClient)
|
||||
|
||||
@@ -83,10 +83,9 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
CalamityGlobalNPC calamityGlobalNPC = NPC.Calamity();
|
||||
|
||||
CalamityGlobalNPC.slimeGodPurple = NPC.whoAmI;
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool death = CalamityWorld.death || NPC.localAI[1] == 1f || bossRush;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || NPC.localAI[1] == 1f || BossRushEvent.BossRushActive;
|
||||
|
||||
float lifeRatio = NPC.life / (float)NPC.lifeMax;
|
||||
|
||||
@@ -157,12 +156,6 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
enraged = false;
|
||||
}
|
||||
|
||||
if (bossRush)
|
||||
{
|
||||
enraged = true;
|
||||
hyperMode = true;
|
||||
}
|
||||
|
||||
// For animating the wings
|
||||
NPC.localAI[0] += 1f;
|
||||
|
||||
@@ -269,7 +262,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
if (NPC.timeLeft > 10)
|
||||
{
|
||||
NPC.ai[1] += 1f;
|
||||
int idleTime = bossRush ? 30 : death ? 75 : revenge ? 90 : 120;
|
||||
int idleTime = death ? 75 : revenge ? 90 : 120;
|
||||
if (NPC.ai[1] >= idleTime)
|
||||
{
|
||||
NPC.ai[1] = 0f;
|
||||
@@ -433,7 +426,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
if (NPC.ai[1] == 1f)
|
||||
{
|
||||
NPC.ai[3] += 1f;
|
||||
float slimeDropGateValue = bossRush ? 10f : death ? 20f : revenge ? 25f : expertMode ? 30f : 40f;
|
||||
float slimeDropGateValue = death ? 20f : revenge ? 25f : expertMode ? 30f : 40f;
|
||||
if (NPC.ai[3] % slimeDropGateValue == 0f)
|
||||
{
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
@@ -495,13 +488,13 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
|
||||
// Charge variables
|
||||
float chargeVelocityMult = 0.1f;
|
||||
float maxChargeVelocity = (bossRush || enraged) ? 12f : death ? 10f : revenge ? 9f : expertMode ? 8f : 6f;
|
||||
float maxChargeVelocity = enraged ? 12f : death ? 10f : revenge ? 9f : expertMode ? 8f : 6f;
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
maxChargeVelocity *= 1.15f;
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
maxChargeVelocity *= 2f;
|
||||
|
||||
float inertia = (bossRush || enraged) ? 100f : death ? 110f : revenge ? 114f : expertMode ? 120f : 130f;
|
||||
float inertia = death ? 110f : revenge ? 114f : expertMode ? 120f : 130f;
|
||||
if (lifeRatio < 0.75f)
|
||||
inertia *= 0.8f;
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
@@ -541,7 +534,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
NPC.damage = setDamage;
|
||||
|
||||
NPC.ai[2] += 1f;
|
||||
float phaseGateValue = (bossRush || enraged) ? 120f : death ? 140f : revenge ? 150f : expertMode ? 160f : 180f;
|
||||
float phaseGateValue = enraged ? 120f : death ? 140f : revenge ? 150f : expertMode ? 160f : 180f;
|
||||
if (NPC.ai[2] >= phaseGateValue)
|
||||
{
|
||||
NPC.ai[1] = 2f;
|
||||
@@ -559,7 +552,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
// Accelerate
|
||||
if (NPC.velocity.Length() < maxChargeVelocity)
|
||||
{
|
||||
float velocityMult = (bossRush || enraged) ? 1.15f : death ? 1.13f : revenge ? 1.12f : expertMode ? 1.11f : 1.1f;
|
||||
float velocityMult = enraged ? 1.15f : death ? 1.13f : revenge ? 1.12f : expertMode ? 1.11f : 1.1f;
|
||||
NPC.velocity = targetVector * (NPC.velocity.Length() * velocityMult);
|
||||
if (NPC.velocity.Length() > maxChargeVelocity)
|
||||
{
|
||||
@@ -648,7 +641,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
|
||||
NPC.aiAction = 1;
|
||||
NPC.ai[1] += 1f;
|
||||
float teleportTime = bossRush ? 20f : death ? 30f : 40f;
|
||||
float teleportTime = death ? 30f : 40f;
|
||||
scale = MathHelper.Clamp((teleportTime - NPC.ai[1]) / teleportTime, 0f, 1f);
|
||||
scale = 0.5f + scale * 0.5f;
|
||||
if (NPC.ai[1] >= teleportTime && Main.netMode != NetmodeID.MultiplayerClient)
|
||||
@@ -681,7 +674,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
NPC.damage = 0;
|
||||
|
||||
NPC.ai[1] += 1f;
|
||||
float teleportEndTime = bossRush ? 10f : death ? 15f : 20f;
|
||||
float teleportEndTime = death ? 15f : 20f;
|
||||
scale = MathHelper.Clamp(NPC.ai[1] / teleportEndTime, 0f, 1f);
|
||||
scale = 0.5f + scale * 0.5f;
|
||||
if (NPC.ai[1] >= teleportEndTime && Main.netMode != NetmodeID.MultiplayerClient)
|
||||
@@ -760,13 +753,12 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
public static void FlyMovement(NPC npc, bool slimeBombardment = false)
|
||||
{
|
||||
// Difficulty bools
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death;
|
||||
bool revenge = CalamityWorld.revenge;
|
||||
bool ableToDropSlime = npc.ai[1] == 1f;
|
||||
|
||||
float flyVelocity = bossRush ? 20f : death ? 15f : revenge ? 12.5f : 10f;
|
||||
float flyAcceleration = bossRush ? 0.24f : death ? 0.18f : revenge ? 0.15f : 0.12f;
|
||||
float flyVelocity = death ? 15f : revenge ? 12.5f : 10f;
|
||||
float flyAcceleration = death ? 0.18f : revenge ? 0.15f : 0.12f;
|
||||
|
||||
if (slimeBombardment)
|
||||
{
|
||||
|
||||
@@ -196,13 +196,11 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
Lighting.AddLight(NPC.Center, light.X, light.Y, light.Z);
|
||||
|
||||
CalamityGlobalNPC calamityGlobalNPC = NPC.Calamity();
|
||||
|
||||
CalamityGlobalNPC.slimeGod = NPC.whoAmI;
|
||||
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
|
||||
// For animating the eye
|
||||
NPC.localAI[0] += 1f;
|
||||
@@ -488,7 +486,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
|
||||
if (expertMode && aggressionLevel >= (int)AggressionLevel.FireProjectiles)
|
||||
{
|
||||
float divisor = bossRush ? 50f : death ? 90f : revenge ? 120f : 150f;
|
||||
float divisor = death ? 90f : revenge ? 120f : 150f;
|
||||
divisor -= (aggressionLevel - 1) * 10f;
|
||||
if (aggressionLevel == (int)AggressionLevel.DoEverythingMoreOften)
|
||||
divisor *= 0.5f;
|
||||
@@ -530,8 +528,6 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
flySpeed += 3f;
|
||||
if (phase2)
|
||||
flySpeed *= 1.1f;
|
||||
if (bossRush)
|
||||
flySpeed *= 1.2f;
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
flySpeed *= 1.3f;
|
||||
|
||||
|
||||
@@ -94,10 +94,9 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
if (CalamityGlobalNPC.slimeGodRed < 0 || !Main.npc[CalamityGlobalNPC.slimeGodRed].active)
|
||||
CalamityGlobalNPC.slimeGodRed = NPC.whoAmI;
|
||||
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool death = CalamityWorld.death || NPC.localAI[1] == 1f || bossRush;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || NPC.localAI[1] == 1f || BossRushEvent.BossRushActive;
|
||||
|
||||
float lifeRatio = NPC.life / (float)NPC.lifeMax;
|
||||
|
||||
@@ -127,7 +126,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
float scale = CalamityWorld.LegendaryMode ? 0.6f : 1f;
|
||||
|
||||
// How fast the slime slams down
|
||||
float slamVelocity = bossRush ? 22.25f : death ? 18.25f : revenge ? 16.5f : expertMode ? 15.5f : 13.5f;
|
||||
float slamVelocity = death ? 18.25f : revenge ? 16.5f : expertMode ? 15.5f : 13.5f;
|
||||
|
||||
// Used for how fast the slime animates
|
||||
NPC.aiAction = 0;
|
||||
@@ -169,9 +168,6 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
enraged = false;
|
||||
}
|
||||
|
||||
if (bossRush)
|
||||
enraged = true;
|
||||
|
||||
if (NPC.localAI[1] != 1f)
|
||||
{
|
||||
if (enraged)
|
||||
@@ -271,7 +267,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
}
|
||||
}
|
||||
|
||||
float distanceSpeedBoost = NPC.Distance(player.Center) * (bossRush ? 0.008f : 0.005f);
|
||||
float distanceSpeedBoost = NPC.Distance(player.Center) * 0.005f;
|
||||
|
||||
if (NPC.ai[0] == 0f)
|
||||
{
|
||||
@@ -655,7 +651,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
|
||||
NPC.aiAction = 1;
|
||||
NPC.ai[1] += 1f;
|
||||
float teleportTime = bossRush ? 20f : death ? 30f : 40f;
|
||||
float teleportTime = death ? 30f : 40f;
|
||||
scale = MathHelper.Clamp((teleportTime - NPC.ai[1]) / teleportTime, 0f, 1f);
|
||||
scale = 0.5f + scale * 0.5f;
|
||||
if (NPC.ai[1] >= teleportTime && Main.netMode != NetmodeID.MultiplayerClient)
|
||||
@@ -688,7 +684,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
NPC.damage = 0;
|
||||
|
||||
NPC.ai[1] += 1f;
|
||||
float teleportEndTime = bossRush ? 10f : death ? 15f : 20f;
|
||||
float teleportEndTime = death ? 15f : 20f;
|
||||
scale = MathHelper.Clamp(NPC.ai[1] / teleportEndTime, 0f, 1f);
|
||||
scale = 0.5f + scale * 0.5f;
|
||||
if (NPC.ai[1] >= teleportEndTime && Main.netMode != NetmodeID.MultiplayerClient)
|
||||
|
||||
@@ -94,10 +94,9 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
if (CalamityGlobalNPC.slimeGodPurple < 0 || !Main.npc[CalamityGlobalNPC.slimeGodPurple].active)
|
||||
CalamityGlobalNPC.slimeGodPurple = NPC.whoAmI;
|
||||
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool death = CalamityWorld.death || NPC.localAI[1] == 1f || bossRush;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || NPC.localAI[1] == 1f || BossRushEvent.BossRushActive;
|
||||
|
||||
float lifeRatio = NPC.life / (float)NPC.lifeMax;
|
||||
|
||||
@@ -123,7 +122,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
float scale = CalamityWorld.LegendaryMode ? 0.6f : 1f;
|
||||
|
||||
// How fast the slime slams down
|
||||
float slamVelocity = bossRush ? 20f : death ? 16f : revenge ? 15f : expertMode ? 14f : 12f;
|
||||
float slamVelocity = death ? 16f : revenge ? 15f : expertMode ? 14f : 12f;
|
||||
|
||||
NPC.aiAction = 0;
|
||||
NPC.noTileCollide = false;
|
||||
@@ -162,12 +161,6 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
enraged = false;
|
||||
}
|
||||
|
||||
if (bossRush)
|
||||
{
|
||||
enraged = true;
|
||||
hyperMode = true;
|
||||
}
|
||||
|
||||
// Slow down dramatically while teleporting
|
||||
if (NPC.ai[0] == 5f || NPC.ai[0] == 6f)
|
||||
{
|
||||
@@ -261,7 +254,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
}
|
||||
}
|
||||
|
||||
float distanceSpeedBoost = NPC.Distance(player.Center) * (bossRush ? 0.008f : 0.005f);
|
||||
float distanceSpeedBoost = NPC.Distance(player.Center) * 0.005f;
|
||||
|
||||
if (NPC.ai[0] == 0f)
|
||||
{
|
||||
@@ -685,7 +678,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
|
||||
NPC.aiAction = 1;
|
||||
NPC.ai[1] += 1f;
|
||||
float teleportTime = bossRush ? 20f : death ? 30f : 40f;
|
||||
float teleportTime = death ? 30f : 40f;
|
||||
scale = MathHelper.Clamp((teleportTime - NPC.ai[1]) / teleportTime, 0f, 1f);
|
||||
scale = 0.5f + scale * 0.5f;
|
||||
if (NPC.ai[1] >= teleportTime && Main.netMode != NetmodeID.MultiplayerClient)
|
||||
@@ -718,7 +711,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
NPC.damage = 0;
|
||||
|
||||
NPC.ai[1] += 1f;
|
||||
float teleportEndTime = bossRush ? 10f : death ? 15f : 20f;
|
||||
float teleportEndTime = death ? 15f : 20f;
|
||||
scale = MathHelper.Clamp(NPC.ai[1] / teleportEndTime, 0f, 1f);
|
||||
scale = 0.5f + scale * 0.5f;
|
||||
if (NPC.ai[1] >= teleportEndTime && Main.netMode != NetmodeID.MultiplayerClient)
|
||||
|
||||
@@ -60,9 +60,7 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
NPC.netAlways = true;
|
||||
NPC.dontCountMe = true;
|
||||
|
||||
if (BossRushEvent.BossRushActive)
|
||||
NPC.scale *= 1.25f;
|
||||
else if (CalamityWorld.death)
|
||||
if (CalamityWorld.death || BossRushEvent.BossRushActive)
|
||||
NPC.scale *= 1.2f;
|
||||
else if (CalamityWorld.revenge)
|
||||
NPC.scale *= 1.15f;
|
||||
@@ -98,10 +96,9 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
if (NPC.life > Main.npc[(int)NPC.ai[1]].life)
|
||||
NPC.life = Main.npc[(int)NPC.ai[1]].life;
|
||||
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
|
||||
// Shed armor
|
||||
bool phase2 = NPC.life / (float)NPC.lifeMax < 0.8f;
|
||||
@@ -143,7 +140,7 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
// Fire a barrage of lasers every 5 seconds
|
||||
float laserBarrageGateValue = bossRush ? 200f : 300f;
|
||||
float laserBarrageGateValue = 300f;
|
||||
if (Main.npc[(int)NPC.ai[2]].localAI[0] % laserBarrageGateValue == 0f)
|
||||
{
|
||||
float bodySegmentDivisor = death ? 6 : revenge ? 5 : expertMode ? 4 : 3;
|
||||
@@ -235,7 +232,7 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
}
|
||||
|
||||
// Calculate contact damage based on velocity
|
||||
float velocity = (phase2 ? 12f : 10f) + (bossRush ? 3f : revenge ? 1.5f : expertMode ? 1f : 0f);
|
||||
float velocity = (phase2 ? 12f : 10f) + (revenge ? 1.5f : expertMode ? 1f : 0f);
|
||||
float minimalContactDamageVelocity = velocity * 0.25f;
|
||||
float minimalDamageVelocity = velocity * 0.5f;
|
||||
float bodyAndTailVelocity = (NPC.position - NPC.oldPosition).Length();
|
||||
@@ -259,10 +256,9 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
if (NPC.spriteDirection == 1)
|
||||
spriteEffects = SpriteEffects.FlipHorizontally;
|
||||
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
|
||||
float lifeRatio = NPC.life / (float)NPC.lifeMax;
|
||||
|
||||
@@ -270,7 +266,7 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
bool phase3 = lifeRatio < 0.55f;
|
||||
|
||||
// Gate value that decides when Storm Weaver will charge
|
||||
float chargePhaseGateValue = bossRush ? 280f : death ? 320f : revenge ? 340f : expertMode ? 360f : 400f;
|
||||
float chargePhaseGateValue = death ? 320f : revenge ? 340f : expertMode ? 360f : 400f;
|
||||
if (!phase3)
|
||||
chargePhaseGateValue *= 0.5f;
|
||||
|
||||
@@ -296,17 +292,16 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo)
|
||||
{
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
|
||||
float lifeRatio = NPC.life / (float)NPC.lifeMax;
|
||||
|
||||
bool phase3 = lifeRatio < 0.55f;
|
||||
|
||||
// Gate value that decides when Storm Weaver will charge
|
||||
float chargePhaseGateValue = bossRush ? 280f : death ? 320f : revenge ? 340f : expertMode ? 360f : 400f;
|
||||
float chargePhaseGateValue = death ? 320f : revenge ? 340f : expertMode ? 360f : 400f;
|
||||
if (!phase3)
|
||||
chargePhaseGateValue *= 0.5f;
|
||||
|
||||
|
||||
@@ -112,9 +112,7 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
NPC.noTileCollide = true;
|
||||
NPC.netAlways = true;
|
||||
|
||||
if (BossRushEvent.BossRushActive)
|
||||
NPC.scale *= 1.25f;
|
||||
else if (CalamityWorld.death)
|
||||
if (CalamityWorld.death || BossRushEvent.BossRushActive)
|
||||
NPC.scale *= 1.2f;
|
||||
else if (CalamityWorld.revenge)
|
||||
NPC.scale *= 1.15f;
|
||||
@@ -168,14 +166,13 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
{
|
||||
CalamityGlobalNPC calamityGlobalNPC = NPC.Calamity();
|
||||
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
|
||||
if (CalamityServerConfig.Instance.BossesStopWeather)
|
||||
CalamityWorld.StopRain();
|
||||
else if (!Main.raining && !bossRush)
|
||||
else if (!Main.raining && !BossRushEvent.BossRushActive)
|
||||
CalamityWorld.StartRain();
|
||||
|
||||
float lifeRatio = NPC.life / (float)NPC.lifeMax;
|
||||
@@ -330,8 +327,8 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
Vector2 npcCenter = NPC.Center;
|
||||
float targetCenterX = Main.player[NPC.target].Center.X;
|
||||
float targetCenterY = Main.player[NPC.target].Center.Y;
|
||||
float velocity = (phase2 ? 12f : 10f) + (bossRush ? 3f : revenge ? 1.5f : expertMode ? 1f : 0f);
|
||||
float acceleration = (phase2 ? 0.24f : 0.2f) + (bossRush ? 0.12f : revenge ? 0.08f : expertMode ? 0.04f : 0f);
|
||||
float velocity = (phase2 ? 12f : 10f) + (revenge ? 1.5f : expertMode ? 1f : 0f);
|
||||
float acceleration = (phase2 ? 0.24f : 0.2f) + (revenge ? 0.08f : expertMode ? 0.04f : 0f);
|
||||
|
||||
// Start charging at the player when in phase 2
|
||||
if (phase2)
|
||||
@@ -355,7 +352,7 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
bool useTornadoes = calamityGlobalNPC.newAI[3] % 2f != 0f;
|
||||
|
||||
// Gate value that decides when Storm Weaver will charge
|
||||
float chargePhaseGateValue = bossRush ? 280f : death ? 320f : revenge ? 340f : expertMode ? 360f : 400f;
|
||||
float chargePhaseGateValue = death ? 320f : revenge ? 340f : expertMode ? 360f : 400f;
|
||||
if (!phase3)
|
||||
chargePhaseGateValue *= 0.5f;
|
||||
if (phase4 && expertMode)
|
||||
@@ -815,7 +812,7 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
SoundEngine.PlaySound(SoundID.Thunder, NPC.Center);
|
||||
|
||||
// Start a storm when in third phase. Don't do this during Boss Rush
|
||||
if (Main.netMode == NetmodeID.MultiplayerClient || (Main.netMode == NetmodeID.SinglePlayer && Main.gameMenu) || calamityGlobalNPC.newAI[1] > 0f || bossRush)
|
||||
if (Main.netMode == NetmodeID.MultiplayerClient || (Main.netMode == NetmodeID.SinglePlayer && Main.gameMenu) || calamityGlobalNPC.newAI[1] > 0f || BossRushEvent.BossRushActive)
|
||||
return;
|
||||
|
||||
CalamityWorld.StartRain(true, true);
|
||||
@@ -837,10 +834,9 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
|
||||
CalamityGlobalNPC calamityGlobalNPC = NPC.Calamity();
|
||||
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
|
||||
float lifeRatio = NPC.life / (float)NPC.lifeMax;
|
||||
|
||||
@@ -848,7 +844,7 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
bool phase3 = lifeRatio < 0.55f;
|
||||
|
||||
// Gate value that decides when Storm Weaver will charge
|
||||
float chargePhaseGateValue = bossRush ? 280f : death ? 320f : revenge ? 340f : expertMode ? 360f : 400f;
|
||||
float chargePhaseGateValue = death ? 320f : revenge ? 340f : expertMode ? 360f : 400f;
|
||||
if (!phase3)
|
||||
chargePhaseGateValue *= 0.5f;
|
||||
|
||||
@@ -874,17 +870,16 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo)
|
||||
{
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
|
||||
float lifeRatio = NPC.life / (float)NPC.lifeMax;
|
||||
|
||||
bool phase3 = lifeRatio < 0.55f;
|
||||
|
||||
// Gate value that decides when Storm Weaver will charge
|
||||
float chargePhaseGateValue = bossRush ? 280f : death ? 320f : revenge ? 340f : expertMode ? 360f : 400f;
|
||||
float chargePhaseGateValue = death ? 320f : revenge ? 340f : expertMode ? 360f : 400f;
|
||||
if (!phase3)
|
||||
chargePhaseGateValue *= 0.5f;
|
||||
|
||||
|
||||
@@ -59,9 +59,7 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
NPC.netAlways = true;
|
||||
NPC.dontCountMe = true;
|
||||
|
||||
if (BossRushEvent.BossRushActive)
|
||||
NPC.scale *= 1.25f;
|
||||
else if (CalamityWorld.death)
|
||||
if (CalamityWorld.death || BossRushEvent.BossRushActive)
|
||||
NPC.scale *= 1.2f;
|
||||
else if (CalamityWorld.revenge)
|
||||
NPC.scale *= 1.15f;
|
||||
@@ -111,9 +109,8 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
if (NPC.life > Main.npc[(int)NPC.ai[1]].life)
|
||||
NPC.life = Main.npc[(int)NPC.ai[1]].life;
|
||||
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
|
||||
// Shed armor
|
||||
bool phase2 = NPC.life / (float)NPC.lifeMax < 0.8f;
|
||||
@@ -147,7 +144,7 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
// Fire a lightning orb every 5 seconds
|
||||
float spawnOrbGateValue = bossRush ? 200f : 300f;
|
||||
float spawnOrbGateValue = 300f;
|
||||
if (Main.npc[(int)NPC.ai[2]].localAI[0] % spawnOrbGateValue == 0f)
|
||||
{
|
||||
int type = ProjectileID.CultistBossLightningOrb;
|
||||
@@ -231,7 +228,7 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
}
|
||||
|
||||
// Calculate contact damage based on velocity
|
||||
float velocity = (phase2 ? 12f : 10f) + (bossRush ? 3f : revenge ? 1.5f : expertMode ? 1f : 0f);
|
||||
float velocity = (phase2 ? 12f : 10f) + (revenge ? 1.5f : expertMode ? 1f : 0f);
|
||||
float minimalContactDamageVelocity = velocity * 0.25f;
|
||||
float minimalDamageVelocity = velocity * 0.5f;
|
||||
float bodyAndTailVelocity = (NPC.position - NPC.oldPosition).Length();
|
||||
@@ -255,10 +252,9 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
if (NPC.spriteDirection == 1)
|
||||
spriteEffects = SpriteEffects.FlipHorizontally;
|
||||
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
|
||||
float lifeRatio = NPC.life / (float)NPC.lifeMax;
|
||||
|
||||
@@ -266,7 +262,7 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
bool phase3 = lifeRatio < 0.55f;
|
||||
|
||||
// Gate value that decides when Storm Weaver will charge
|
||||
float chargePhaseGateValue = bossRush ? 280f : death ? 320f : revenge ? 340f : expertMode ? 360f : 400f;
|
||||
float chargePhaseGateValue = death ? 320f : revenge ? 340f : expertMode ? 360f : 400f;
|
||||
if (!phase3)
|
||||
chargePhaseGateValue *= 0.5f;
|
||||
|
||||
@@ -300,17 +296,16 @@ namespace CalamityMod.NPCs.StormWeaver
|
||||
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo)
|
||||
{
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
|
||||
float lifeRatio = NPC.life / (float)NPC.lifeMax;
|
||||
|
||||
bool phase3 = lifeRatio < 0.55f;
|
||||
|
||||
// Gate value that decides when Storm Weaver will charge
|
||||
float chargePhaseGateValue = bossRush ? 280f : death ? 320f : revenge ? 340f : expertMode ? 360f : 400f;
|
||||
float chargePhaseGateValue = death ? 320f : revenge ? 340f : expertMode ? 360f : 400f;
|
||||
if (!phase3)
|
||||
chargePhaseGateValue *= 0.5f;
|
||||
|
||||
|
||||
@@ -104,31 +104,6 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
else
|
||||
NPC.alpha = HeadSegment.alpha;
|
||||
|
||||
/*AttackTimer += BossRushEvent.BossRushActive ? 1.5f : 1f;
|
||||
float attackgate = !HeadSegment.Calamity().unbreakableDR && Main.zenithWorld ? 450f : 900f;
|
||||
if (AttackTimer >= attackgate && NoStartAttack <= 0)
|
||||
{
|
||||
AttackTimer = 0f;
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
int type = ModContent.ProjectileType<BrimstoneBarrage>();
|
||||
int damage = NPC.GetProjectileDamage(type);
|
||||
int totalProjectiles = 4;
|
||||
float radians = MathHelper.TwoPi / totalProjectiles;
|
||||
float velocity = 1f;
|
||||
float projectileVelocityToPass = 15f;
|
||||
|
||||
Vector2 spinningPoint = Vector2.Normalize(new Vector2(-velocity, -velocity));
|
||||
for (int k = 0; k < totalProjectiles; k++)
|
||||
{
|
||||
Vector2 projectileVelocity = spinningPoint.RotatedBy(radians * k);
|
||||
Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center, projectileVelocity, type, damage, 0f, Main.myPlayer, 0f, 0f, projectileVelocityToPass);
|
||||
}
|
||||
NPC.netUpdate = true;
|
||||
}
|
||||
SoundEngine.PlaySound(SupremeCalamitas.BrimstoneShotSound, NPC.Center);
|
||||
}*/
|
||||
|
||||
if (Main.npc.IndexInRange((int)NPC.ai[1]))
|
||||
{
|
||||
Vector2 offsetToAheadSegment = AheadSegment.Center - NPC.Center;
|
||||
|
||||
@@ -201,8 +201,8 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
Vector2 segmentLocation = NPC.Center;
|
||||
float targetX = CalamityGlobalNPC.SCal < 0 ? 0 : Main.npc[CalamityGlobalNPC.SCal].position.X + (Main.player[NPC.target].width / 2);
|
||||
float targetY = CalamityGlobalNPC.SCal < 0 ? 0 : Main.npc[CalamityGlobalNPC.SCal].position.Y + (Main.player[NPC.target].height / 2);
|
||||
float sepMaxSpeed = BossRushEvent.BossRushActive ? 22.5f : 20f;
|
||||
float sepAcceleration = (BossRushEvent.BossRushActive ? 0.2f : 0.175f) + (0.37f - AttackCooldown * 0.0015f);
|
||||
float sepMaxSpeed = 20f;
|
||||
float sepAcceleration = 0.175f + (0.37f - AttackCooldown * 0.0015f);
|
||||
|
||||
float fasterMaxSpeed = sepMaxSpeed * 1.3f;
|
||||
float slowerMaxSpeed = sepMaxSpeed * 0.7f;
|
||||
|
||||
@@ -144,7 +144,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
NPC.spriteDirection = (Target.Center.X < NPC.Center.X).ToDirectionInt();
|
||||
|
||||
timer++;
|
||||
int shootRate = BossRushEvent.BossRushActive ? 120 : 180;
|
||||
int shootRate = 180;
|
||||
if (timer > shootRate)
|
||||
{
|
||||
foreach (NPC seeker in Main.ActiveNPCs)
|
||||
@@ -163,8 +163,6 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
float targetDist = Vector2.Distance(Target.Center, NPC.Center);
|
||||
int type = ModContent.ProjectileType<BrimstoneBarrage>();
|
||||
int damage = NPC.GetProjectileDamage(type);
|
||||
if (BossRushEvent.BossRushActive)
|
||||
damage /= 2;
|
||||
|
||||
float velocity = 5f;
|
||||
float projectileVelocityToPass = velocity * 3f;
|
||||
|
||||
@@ -442,10 +442,9 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
if (CalamityServerConfig.Instance.BossesStopWeather)
|
||||
CalamityWorld.StopRain();
|
||||
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
|
||||
// Used for Scal's teleport at the start of brothers phase
|
||||
bool teleport = false;
|
||||
@@ -464,16 +463,6 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
int monsterDamage = NPC.GetProjectileDamage(ModContent.ProjectileType<BrimstoneMonster>());
|
||||
int waveDamage = NPC.GetProjectileDamage(ModContent.ProjectileType<BrimstoneWave>());
|
||||
int hellblastDamage = NPC.GetProjectileDamage(ModContent.ProjectileType<BrimstoneHellblast>());
|
||||
if (bossRush)
|
||||
{
|
||||
bulletHellblastDamage /= 2;
|
||||
barrageDamage /= 2;
|
||||
fireblastDamage /= 2;
|
||||
gigablastDamage /= 2;
|
||||
monsterDamage /= 2;
|
||||
waveDamage /= 2;
|
||||
hellblastDamage /= 2;
|
||||
}
|
||||
|
||||
int bulletHellblast = zenithAI ? ModContent.ProjectileType<BrimstoneWave>() : ModContent.ProjectileType<BrimstoneHellblast2>();
|
||||
int barrage = ModContent.ProjectileType<BrimstoneBarrage>();
|
||||
@@ -503,7 +492,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
|
||||
if (!startText)
|
||||
{
|
||||
if (!bossRush)
|
||||
if (!BossRushEvent.BossRushActive)
|
||||
{
|
||||
string key = "Mods.CalamityMod.Status.Boss.SCalSummonText";
|
||||
if (permafrost)
|
||||
@@ -681,13 +670,11 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
}
|
||||
#endregion
|
||||
#region Enrage and DR
|
||||
if ((spawnArena && !player.Hitbox.Intersects(safeBox)) || bossRush)
|
||||
if (spawnArena && !player.Hitbox.Intersects(safeBox))
|
||||
{
|
||||
float projectileVelocityMultCap = (!player.Hitbox.Intersects(safeBox) && spawnArena) ? 2f : 1.35f;
|
||||
float projectileVelocityMultCap = 2f;
|
||||
uDieLul = MathHelper.Clamp(uDieLul * 1.01f, 1f, projectileVelocityMultCap);
|
||||
protectionBoost = !bossRush;
|
||||
if (!player.Hitbox.Intersects(safeBox))
|
||||
protectionBoost = true;
|
||||
protectionBoost = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -774,7 +761,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
forcefieldOpacity = Utils.GetLerpValue(0.1f, 0.6f, NPC.Opacity, true);
|
||||
if (NPC.alpha >= 230)
|
||||
{
|
||||
if (DownedBossSystem.downedCalamitas && !bossRush)
|
||||
if (DownedBossSystem.downedCalamitas && !BossRushEvent.BossRushActive)
|
||||
{
|
||||
// Create a teleport line effect
|
||||
Dust.QuickDustLine(NPC.Center, initialRitualPosition, 500f, permafrost ? Color.Cyan : Color.Red);
|
||||
@@ -1023,7 +1010,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
}
|
||||
}
|
||||
|
||||
if (!bossRush)
|
||||
if (!BossRushEvent.BossRushActive)
|
||||
{
|
||||
string key = "Mods.CalamityMod.Status.Boss.SCalBH2Text";
|
||||
if (permafrost)
|
||||
@@ -1148,7 +1135,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
}
|
||||
}
|
||||
|
||||
if (!bossRush)
|
||||
if (!BossRushEvent.BossRushActive)
|
||||
{
|
||||
string key = "Mods.CalamityMod.Status.Boss.SCalBH3Text";
|
||||
if (permafrost)
|
||||
@@ -1353,7 +1340,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
}
|
||||
}
|
||||
|
||||
if (!bossRush)
|
||||
if (!BossRushEvent.BossRushActive)
|
||||
{
|
||||
string key = "Mods.CalamityMod.Status.Boss.SCalBH4Text";
|
||||
if (permafrost)
|
||||
@@ -1504,7 +1491,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
if (permafrost)
|
||||
key = "Mods.CalamityMod.Status.Boss.PermafrostBH5Text";
|
||||
|
||||
if (!bossRush)
|
||||
if (!BossRushEvent.BossRushActive)
|
||||
{
|
||||
if (DownedBossSystem.downedCalamitas && !permafrost)
|
||||
key += "Rematch";
|
||||
@@ -1615,7 +1602,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
}
|
||||
|
||||
|
||||
if (!hasDoneDeathAnim && !bossRush) // Scrapped death animation for Scal
|
||||
if (!hasDoneDeathAnim && !BossRushEvent.BossRushActive) // Scrapped death animation for Scal
|
||||
{
|
||||
attackPause = 5;
|
||||
Dust.QuickDustLine(NPC.Center, safeBox.Center() + new Vector2(0, -30), 500f, permafrost ? Color.Cyan : Color.Red);
|
||||
@@ -1705,7 +1692,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
}
|
||||
else
|
||||
{
|
||||
if (bossRush)
|
||||
if (BossRushEvent.BossRushActive)
|
||||
NPC.Center = initialRitualPosition + new Vector2(0, -30);
|
||||
|
||||
if (NPC.velocity.Y < 8f)
|
||||
@@ -1713,11 +1700,11 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
if (!canDespawn)
|
||||
NPC.velocity.X *= 0.965f;
|
||||
|
||||
if (DownedBossSystem.downedCalamitas || bossRush)
|
||||
if (DownedBossSystem.downedCalamitas || BossRushEvent.BossRushActive)
|
||||
{
|
||||
if (giveUpCounter == 720)
|
||||
{
|
||||
if (bossRush)
|
||||
if (BossRushEvent.BossRushActive)
|
||||
{
|
||||
NPC.chaseable = true;
|
||||
NPC.dontTakeDamage = false;
|
||||
@@ -1739,15 +1726,15 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
NPC.NPCLoot();
|
||||
}
|
||||
}
|
||||
else if (giveUpCounter == 900 && !bossRush)
|
||||
else if (giveUpCounter == 900 && !BossRushEvent.BossRushActive)
|
||||
{
|
||||
CalamityUtils.DisplayLocalizedText("Mods.CalamityMod.Status.Boss.SCalAcceptanceText1", textColor);
|
||||
}
|
||||
else if (giveUpCounter == 600 && !bossRush)
|
||||
else if (giveUpCounter == 600 && !BossRushEvent.BossRushActive)
|
||||
{
|
||||
CalamityUtils.DisplayLocalizedText("Mods.CalamityMod.Status.Boss.SCalAcceptanceText2", textColor);
|
||||
}
|
||||
else if (giveUpCounter == 300 && !bossRush)
|
||||
else if (giveUpCounter == 300 && !BossRushEvent.BossRushActive)
|
||||
{
|
||||
CalamityUtils.DisplayLocalizedText("Mods.CalamityMod.Status.Boss.SCalAcceptanceText3", textColor);
|
||||
}
|
||||
@@ -1807,7 +1794,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
}
|
||||
}
|
||||
|
||||
if (!bossRush)
|
||||
if (!BossRushEvent.BossRushActive)
|
||||
{
|
||||
string key = "Mods.CalamityMod.Status.Boss.SCalDesparationText4";
|
||||
if (permafrost)
|
||||
@@ -1823,7 +1810,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
}
|
||||
else if (!gettingTired4 && lifeRatio <= 0.02f)
|
||||
{
|
||||
if (!bossRush && !permafrost)
|
||||
if (!BossRushEvent.BossRushActive && !permafrost)
|
||||
{
|
||||
string key = "Mods.CalamityMod.Status.Boss.SCalDesparationText3";
|
||||
if (DownedBossSystem.downedCalamitas)
|
||||
@@ -1837,7 +1824,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
}
|
||||
else if (!gettingTired3 && lifeRatio <= 0.04f)
|
||||
{
|
||||
if (!bossRush && !permafrost)
|
||||
if (!BossRushEvent.BossRushActive && !permafrost)
|
||||
{
|
||||
string key = "Mods.CalamityMod.Status.Boss.SCalDesparationText2";
|
||||
if (DownedBossSystem.downedCalamitas)
|
||||
@@ -1851,7 +1838,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
}
|
||||
else if (!gettingTired2 && lifeRatio <= 0.06f)
|
||||
{
|
||||
if (!bossRush)
|
||||
if (!BossRushEvent.BossRushActive)
|
||||
{
|
||||
string key = "Mods.CalamityMod.Status.Boss.SCalDesparationText1";
|
||||
if (permafrost)
|
||||
@@ -1922,7 +1909,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
#region TransformSeekerandBrotherTriggers
|
||||
if (!halfLife && lifeRatio <= 0.45f && hasSummonedBrothers && (permafrost ? NPC.AnyNPCs(ModContent.NPCType<DevourerofGodsHead>()) : (NPC.AnyNPCs(ModContent.NPCType<SupremeCataclysm>()) || NPC.AnyNPCs(ModContent.NPCType<SupremeCatastrophe>()))) == false)
|
||||
{
|
||||
if (!bossRush)
|
||||
if (!BossRushEvent.BossRushActive)
|
||||
{
|
||||
string key = "Mods.CalamityMod.Status.Boss.SCalPhase2Text";
|
||||
if (permafrost)
|
||||
@@ -1940,7 +1927,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
{
|
||||
if (!secondStage)
|
||||
{
|
||||
if (!bossRush)
|
||||
if (!BossRushEvent.BossRushActive)
|
||||
{
|
||||
string key = "Mods.CalamityMod.Status.Boss.SCalSeekerRingText";
|
||||
if (permafrost)
|
||||
|
||||
@@ -178,13 +178,12 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
}
|
||||
|
||||
// Difficulty modes
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
|
||||
// Increase DR if the target leaves SCal's arena.
|
||||
NPC.Calamity().DR = SupremeCataclysm.NormalBrothersDR;
|
||||
NPC.Calamity().DR = NormalBrothersDR;
|
||||
if (Main.npc[CalamityGlobalNPC.SCal].ModNPC<SupremeCalamitas>().IsTargetOutsideOfArena)
|
||||
NPC.Calamity().DR = SupremeCalamitas.enragedDR;
|
||||
|
||||
@@ -323,7 +322,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
else if (BigAttackTimer > PreBigAttackPause)
|
||||
{
|
||||
// Shoot fists.
|
||||
float fireRate = BossRushEvent.BossRushActive ? 2f : MathHelper.Lerp(1.5f, 2f, 1f - totalLifeRatio) * (broIsAlive == false ? death ? 1.32f : 1.1f : 1);
|
||||
float fireRate = MathHelper.Lerp(1.5f, 2f, 1f - totalLifeRatio) * (!broIsAlive ? death ? 1.32f : 1.1f : 1);
|
||||
|
||||
PunchCounter += fireRate;
|
||||
if (PunchCounter >= PunchCounterLimit)
|
||||
@@ -337,8 +336,6 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
type = ModContent.ProjectileType<SupremeCatastropheSlash>();
|
||||
|
||||
int damage = NPC.GetProjectileDamage(type);
|
||||
if (bossRush)
|
||||
damage /= 2;
|
||||
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
@@ -388,9 +385,9 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
else
|
||||
{
|
||||
// Shoot fists.
|
||||
float fireRate = BossRushEvent.BossRushActive ? 2.8f : MathHelper.Lerp(2.5f, 3f, 1f - totalLifeRatio);
|
||||
float fireRate = MathHelper.Lerp(2.5f, 3f, 1f - totalLifeRatio);
|
||||
if (broIsAlive == false)
|
||||
fireRate = BossRushEvent.BossRushActive ? 3.5f + (29 - BigAttackLimit) * 0.45f : MathHelper.Lerp(3f, (4f + (29 - BigAttackLimit) * 0.45f), 1f - totalLifeRatio) * 1.2f;
|
||||
fireRate = MathHelper.Lerp(3f, (4f + (29 - BigAttackLimit) * 0.45f), 1f - totalLifeRatio) * 1.2f;
|
||||
if (Phase2 && BigAttackLimit == 0)
|
||||
fireRate = 1;
|
||||
|
||||
@@ -405,8 +402,6 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
type = ModContent.ProjectileType<SupremeCatastropheSlash>();
|
||||
|
||||
int damage = NPC.GetProjectileDamage(type);
|
||||
if (bossRush)
|
||||
damage /= 2;
|
||||
Vector2 fistSpawnPosition = NPC.Center + Vector2.UnitX * 74f * NPC.direction;
|
||||
|
||||
if ((broIsAlive == false ? BigAttackLimit <= 3 && BigAttackLimit > 0 : BigAttackLimit == 1) && death)
|
||||
|
||||
@@ -172,10 +172,9 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
}
|
||||
|
||||
// Difficulty modes
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive;
|
||||
bool expertMode = Main.expertMode || BossRushEvent.BossRushActive;
|
||||
|
||||
// Increase DR if the target leaves SCal's arena.
|
||||
NPC.Calamity().DR = SupremeCataclysm.NormalBrothersDR;
|
||||
@@ -272,8 +271,6 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
|
||||
int type = ModContent.ProjectileType<SupremeCatastropheSlash>();
|
||||
int damage = NPC.GetProjectileDamage(type);
|
||||
if (bossRush)
|
||||
damage /= 2;
|
||||
|
||||
Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center, NPC.velocity.SafeNormalize(Vector2.UnitY) * 0.1f, type, damage, 0f, Main.myPlayer, 0f, SlashingFromRight.ToInt(), 4 + dashes);
|
||||
dashes++;
|
||||
@@ -370,7 +367,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
else if (BigAttackTimer > PreBigAttackPause)
|
||||
{
|
||||
// Shoot sword slashes.
|
||||
float fireRate = BossRushEvent.BossRushActive ? 2f : MathHelper.Lerp(1.5f, 2f, 1f - totalLifeRatio) * (broIsAlive == false ? death ? 1.25f : 1.05f : 1);
|
||||
float fireRate = MathHelper.Lerp(1.5f, 2f, 1f - totalLifeRatio) * (!broIsAlive ? death ? 1.25f : 1.05f : 1);
|
||||
SlashCounter += fireRate;
|
||||
if (SlashCounter >= SlashCounterLimit)
|
||||
{
|
||||
@@ -383,8 +380,6 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
type = ModContent.ProjectileType<SupremeCataclysmFist>();
|
||||
|
||||
int damage = NPC.GetProjectileDamage(type);
|
||||
if (bossRush)
|
||||
damage /= 2;
|
||||
Vector2 slashSpawnPosition = NPC.Center + Vector2.UnitX * 125f * NPC.direction;
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
@@ -436,7 +431,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
else
|
||||
{
|
||||
// Shoot sword slashes.
|
||||
float fireRate = BossRushEvent.BossRushActive ? 2.8f : MathHelper.Lerp(2.5f, 3f, 1f - totalLifeRatio) * (broIsAlive == false ? 1.35f : 1);
|
||||
float fireRate = MathHelper.Lerp(2.5f, 3f, 1f - totalLifeRatio) * (!broIsAlive ? 1.35f : 1);
|
||||
if (Phase2 && BigAttackLimit == 0)
|
||||
fireRate = 1;
|
||||
SlashCounter += fireRate;
|
||||
@@ -450,8 +445,6 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
type = ModContent.ProjectileType<SupremeCataclysmFist>();
|
||||
|
||||
int damage = NPC.GetProjectileDamage(type);
|
||||
if (bossRush)
|
||||
damage /= 2;
|
||||
Vector2 slashSpawnPosition = NPC.Center;
|
||||
Vector2 firingVelocity = (broIsAlive == false ? (NPC.DirectionTo(Target.Center) + Target.velocity * 0.032f).SafeNormalize(Vector2.UnitY) : NPC.DirectionTo(Target.Center));
|
||||
|
||||
|
||||
@@ -21,8 +21,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
// whoAmI variable
|
||||
NPC.crimsonBoss = npc.whoAmI;
|
||||
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
|
||||
// Get a target
|
||||
if (npc.target < 0 || npc.target == Main.maxPlayers || Main.player[npc.target].dead || !Main.player[npc.target].active)
|
||||
@@ -34,7 +33,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
CalamityUtils.CalamityTargeting(npc, options);
|
||||
}
|
||||
|
||||
bool enrage = true;
|
||||
bool enrage = !BossRushEvent.BossRushActive;
|
||||
int targetTileX = (int)Main.player[npc.target].Center.X / 16;
|
||||
int targetTileY = (int)Main.player[npc.target].Center.Y / 16;
|
||||
|
||||
@@ -42,20 +41,20 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
if (tile.WallType == WallID.CrimstoneUnsafe)
|
||||
enrage = false;
|
||||
|
||||
float enrageScale = bossRush ? 1.5f : death ? 0.5f : 0f;
|
||||
if (((npc.position.Y / 16f) < Main.worldSurface && enrage) || bossRush)
|
||||
float enrageScale = death ? 0.5f : 0f;
|
||||
if ((npc.position.Y / 16f) < Main.worldSurface && enrage)
|
||||
{
|
||||
npc.Calamity().CurrentlyEnraged = !bossRush;
|
||||
npc.Calamity().CurrentlyEnraged = true;
|
||||
enrageScale += 0.5f;
|
||||
}
|
||||
if (!Main.player[npc.target].ZoneCrimson || bossRush)
|
||||
if (!Main.player[npc.target].ZoneCrimson && enrage)
|
||||
{
|
||||
npc.Calamity().CurrentlyEnraged = !bossRush;
|
||||
npc.Calamity().CurrentlyEnraged = true;
|
||||
enrageScale += 2f;
|
||||
}
|
||||
|
||||
// Despawn check
|
||||
bool despawn = Main.player[npc.target].dead && !bossRush;
|
||||
bool despawn = Main.player[npc.target].dead;
|
||||
|
||||
// Despawn
|
||||
if (despawn)
|
||||
@@ -859,15 +858,14 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
return false;
|
||||
}
|
||||
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
|
||||
// Get a target
|
||||
if (npc.target < 0 || npc.target == Main.maxPlayers || Main.player[npc.target].dead || !Main.player[npc.target].active)
|
||||
CalamityUtils.CalamityTargeting(npc, default);
|
||||
|
||||
float enrageScaleMax = 2f;
|
||||
float enrageScale = bossRush ? enrageScaleMax : death ? 0.5f : 0f;
|
||||
float enrageScale = death ? 0.5f : 0f;
|
||||
if ((npc.position.Y / 16f) < Main.worldSurface)
|
||||
enrageScale += 0.5f;
|
||||
if (!Main.player[npc.target].ZoneCrimson)
|
||||
|
||||
@@ -35,8 +35,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
float lifeRatio = npc.life / (float)npc.lifeMax;
|
||||
|
||||
// Phases
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
bool phase2 = lifeRatio < 0.85f || death;
|
||||
bool phase3 = lifeRatio < 0.7f || death;
|
||||
bool phase4 = lifeRatio < (death ? 0.8f : 0.55f);
|
||||
@@ -70,19 +69,6 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
int idleTime = phase8 ? 20 : phase7 ? 30 : phase3 ? 35 : 40;
|
||||
float timeToFinishRitual = phase8 ? 180f : phase7 ? 240f : phase5 ? 300f : 360f;
|
||||
|
||||
if (bossRush)
|
||||
{
|
||||
iceMistFireRate = 40;
|
||||
iceMistSpeed = 14f;
|
||||
iceMistAmt = 3;
|
||||
fireballFireRate = 8;
|
||||
fireballSpeed *= 1.2f;
|
||||
lightningOrbPhaseTime = 90;
|
||||
ancientLightSpawnRate = 20;
|
||||
ancientLightAmt = 4;
|
||||
idleTime = 20;
|
||||
}
|
||||
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
{
|
||||
iceMistFireRate = 30;
|
||||
@@ -1094,8 +1080,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
|
||||
public static bool BuffedAncientDoomAI(NPC npc, Mod mod)
|
||||
{
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
npc.damage = npc.defDamage = 0;
|
||||
float duration = 420f;
|
||||
float spawnAnimTime = 120f;
|
||||
|
||||
@@ -34,8 +34,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
float lifeRatio = (float)npc.life / (float)npc.lifeMax;
|
||||
|
||||
// Difficulty bools
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
|
||||
// Projectile types and damage
|
||||
int rubble = ProjectileID.DeerclopsRangedProjectile;
|
||||
|
||||
Loaded 100 of 152 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user