1 - Fixed exo mech name drawing issue.
2 - Fixed exo mechs spawning each other immediately. 3 - Ares tesla orbs no longer arc during deathray spin phase.
This commit is contained in:
1 parent
30ce7e9d1b
commit
8310a03e7c
13 files changed
+50
-57
No files matched your search
@@ -161,57 +161,6 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (CalamityWorld.revenge || CalamityWorld.malice)
|
||||
{
|
||||
// This effect is way too annoying during the fight so I disabled it - Fab
|
||||
// Signus headcrab effect
|
||||
/*if (CalamityGlobalNPC.signus != -1)
|
||||
{
|
||||
if (Main.npc[CalamityGlobalNPC.signus].active)
|
||||
{
|
||||
if (Vector2.Distance(player.Center, Main.npc[CalamityGlobalNPC.signus].Center) <= 5200f)
|
||||
{
|
||||
float signusLifeRatio = 1f - (Main.npc[CalamityGlobalNPC.signus].life / Main.npc[CalamityGlobalNPC.signus].lifeMax);
|
||||
|
||||
// Reduce the power of Signus darkness based on your light level.
|
||||
float multiplier = 1f;
|
||||
switch (modPlayer.GetTotalLightStrength())
|
||||
{
|
||||
case 0:
|
||||
break;
|
||||
case 1:
|
||||
case 2:
|
||||
multiplier = 0.75f;
|
||||
break;
|
||||
case 3:
|
||||
case 4:
|
||||
multiplier = 0.5f;
|
||||
break;
|
||||
case 5:
|
||||
case 6:
|
||||
multiplier = 0.25f;
|
||||
break;
|
||||
default:
|
||||
multiplier = 0f;
|
||||
break;
|
||||
}
|
||||
|
||||
// Increased darkness in Death Mode
|
||||
if (CalamityWorld.death)
|
||||
multiplier += (1f - multiplier) * 0.1f;
|
||||
|
||||
// Total darkness
|
||||
float signusDarkness = signusLifeRatio * multiplier;
|
||||
|
||||
// Headcrab effect
|
||||
if (!modPlayer.ZoneAbyss && !player.headcovered)
|
||||
{
|
||||
float screenObstructionAmt = MathHelper.Clamp(signusDarkness, 0f, 0.63f);
|
||||
float targetValue = MathHelper.Clamp(screenObstructionAmt * 0.33f, 0.1f, 0.2f);
|
||||
ScreenObstruction.screenObstruction = MathHelper.Lerp(ScreenObstruction.screenObstruction, screenObstructionAmt, targetValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
// Adjusts the life steal cap in rev/death
|
||||
float lifeStealCap = CalamityWorld.malice ? 30f : CalamityWorld.death ? 50f : 60f;
|
||||
/*if (Main.masterMode)
|
||||
|
||||
@@ -182,6 +182,8 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo
|
||||
|
||||
CalamityGlobalNPC.draedonExoMechTwinGreen = npc.whoAmI;
|
||||
|
||||
npc.frame = new Rectangle(npc.width * frameX, npc.height * frameY, npc.width, npc.height);
|
||||
|
||||
// Difficulty modes
|
||||
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || malice;
|
||||
@@ -265,6 +267,7 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo
|
||||
|
||||
// Phases
|
||||
bool phase2 = lifeRatio < 0.6f;
|
||||
bool spawnOtherExoMechs = lifeRatio < 0.7f && npc.ai[3] == 0f;
|
||||
bool berserk = lifeRatio < 0.4f || (otherExoMechsAlive == 0 && lifeRatio < 0.7f);
|
||||
bool lastMechAlive = berserk && otherExoMechsAlive == 0;
|
||||
|
||||
@@ -474,7 +477,7 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo
|
||||
// Spawn the other mechs if Artemis and Apollo are first
|
||||
if (otherExoMechsAlive == 0)
|
||||
{
|
||||
if (npc.ai[3] == 0f)
|
||||
if (spawnOtherExoMechs)
|
||||
{
|
||||
// Reset everything
|
||||
npc.ai[3] = 1f;
|
||||
|
||||
@@ -139,6 +139,8 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
|
||||
|
||||
CalamityGlobalNPC.draedonExoMechPrime = npc.whoAmI;
|
||||
|
||||
npc.frame = new Rectangle(npc.width * frameX, npc.height * frameY, npc.width, npc.height);
|
||||
|
||||
// Difficulty modes
|
||||
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || malice;
|
||||
@@ -248,6 +250,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
|
||||
npc.ai[3] = 1f;
|
||||
|
||||
// Phases
|
||||
bool spawnOtherExoMechs = lifeRatio < 0.7f && npc.ai[3] == 0f;
|
||||
bool berserk = lifeRatio < 0.4f || (otherExoMechsAlive == 0 && lifeRatio < 0.7f);
|
||||
bool lastMechAlive = berserk && otherExoMechsAlive == 0;
|
||||
|
||||
@@ -379,7 +382,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
|
||||
// Spawn the other mechs if Ares is first
|
||||
if (otherExoMechsAlive == 0)
|
||||
{
|
||||
if (npc.ai[3] == 0f)
|
||||
if (spawnOtherExoMechs)
|
||||
{
|
||||
// Reset everything
|
||||
npc.ai[3] = 1f;
|
||||
|
||||
@@ -103,6 +103,8 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
|
||||
{
|
||||
CalamityGlobalNPC calamityGlobalNPC = npc.Calamity();
|
||||
|
||||
npc.frame = new Rectangle(npc.width * frameX, npc.height * frameY, npc.width, npc.height);
|
||||
|
||||
if (CalamityGlobalNPC.draedonExoMechPrime < 0 || !Main.npc[CalamityGlobalNPC.draedonExoMechPrime].active)
|
||||
{
|
||||
npc.life = 0;
|
||||
|
||||
@@ -101,6 +101,8 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
|
||||
{
|
||||
CalamityGlobalNPC calamityGlobalNPC = npc.Calamity();
|
||||
|
||||
npc.frame = new Rectangle(npc.width * frameX, npc.height * frameY, npc.width, npc.height);
|
||||
|
||||
if (CalamityGlobalNPC.draedonExoMechPrime < 0 || !Main.npc[CalamityGlobalNPC.draedonExoMechPrime].active)
|
||||
{
|
||||
npc.life = 0;
|
||||
|
||||
@@ -101,6 +101,8 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
|
||||
{
|
||||
CalamityGlobalNPC calamityGlobalNPC = npc.Calamity();
|
||||
|
||||
npc.frame = new Rectangle(npc.width * frameX, npc.height * frameY, npc.width, npc.height);
|
||||
|
||||
if (CalamityGlobalNPC.draedonExoMechPrime < 0 || !Main.npc[CalamityGlobalNPC.draedonExoMechPrime].active)
|
||||
{
|
||||
npc.life = 0;
|
||||
|
||||
@@ -101,6 +101,8 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
|
||||
{
|
||||
CalamityGlobalNPC calamityGlobalNPC = npc.Calamity();
|
||||
|
||||
npc.frame = new Rectangle(npc.width * frameX, npc.height * frameY, npc.width, npc.height);
|
||||
|
||||
if (CalamityGlobalNPC.draedonExoMechPrime < 0 || !Main.npc[CalamityGlobalNPC.draedonExoMechPrime].active)
|
||||
{
|
||||
npc.life = 0;
|
||||
@@ -470,7 +472,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public override bool PreNPCLoot() => false;
|
||||
|
||||
public override void HitEffect(int hitDirection, double damage)
|
||||
|
||||
@@ -190,6 +190,8 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis
|
||||
|
||||
CalamityGlobalNPC.draedonExoMechTwinRed = npc.whoAmI;
|
||||
|
||||
npc.frame = new Rectangle(npc.width * frameX, npc.height * frameY, npc.width, npc.height);
|
||||
|
||||
// Difficulty modes
|
||||
bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || malice;
|
||||
@@ -276,6 +278,7 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis
|
||||
|
||||
// Phases
|
||||
bool phase2 = lifeRatio < 0.6f;
|
||||
bool spawnOtherExoMechs = lifeRatio < 0.7f && npc.ai[3] == 0f;
|
||||
bool berserk = lifeRatio < 0.4f || (otherExoMechsAlive == 0 && lifeRatio < 0.7f);
|
||||
bool lastMechAlive = berserk && otherExoMechsAlive == 0;
|
||||
|
||||
@@ -492,7 +495,7 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis
|
||||
// Note: Only Apollo spawns the mechs because the twins HP values are linked
|
||||
if (otherExoMechsAlive == 0)
|
||||
{
|
||||
if (npc.ai[3] == 0f)
|
||||
if (spawnOtherExoMechs)
|
||||
{
|
||||
// Reset everything
|
||||
npc.ai[3] = 1f;
|
||||
|
||||
@@ -250,6 +250,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos
|
||||
npc.ai[3] = 1f;
|
||||
|
||||
// Phases
|
||||
bool spawnOtherExoMechs = lifeRatio < 0.7f && npc.ai[3] == 0f;
|
||||
bool berserk = lifeRatio < 0.4f || (otherExoMechsAlive == 0 && lifeRatio < 0.7f);
|
||||
bool lastMechAlive = berserk && otherExoMechsAlive == 0;
|
||||
|
||||
@@ -451,7 +452,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos
|
||||
// Spawn the other mechs if Thanatos is first
|
||||
if (otherExoMechsAlive == 0)
|
||||
{
|
||||
if (npc.ai[3] == 0f)
|
||||
if (spawnOtherExoMechs)
|
||||
{
|
||||
// Reset everything
|
||||
npc.ai[3] = 1f;
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
using CalamityMod.NPCs;
|
||||
using CalamityMod.NPCs.ExoMechs.Ares;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
@@ -140,9 +142,12 @@ namespace CalamityMod.Projectiles.Boss
|
||||
|
||||
public Projectile GetOrbToAttachTo()
|
||||
{
|
||||
if (CalamityGlobalNPC.draedonExoMechPrime < 0 || !Main.npc[CalamityGlobalNPC.draedonExoMechPrime].active)
|
||||
return null;
|
||||
|
||||
for (int i = 0; i < Main.maxProjectiles; i++)
|
||||
{
|
||||
if (Main.projectile[i].type != projectile.type || Main.projectile[i].ai[0] != Identity + 1f || !Main.projectile[i].active)
|
||||
if (Main.projectile[i].type != projectile.type || Main.projectile[i].ai[0] != Identity + 1f || !Main.projectile[i].active || Main.npc[CalamityGlobalNPC.draedonExoMechPrime].Calamity().newAI[0] == (float)AresBody.Phase.Deathrays)
|
||||
continue;
|
||||
|
||||
return Main.projectile[i];
|
||||
|
||||
@@ -33,6 +33,13 @@ namespace CalamityMod.Projectiles.Boss
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
if (CalamityGlobalNPC.voidBoss < 0 || !Main.npc[CalamityGlobalNPC.voidBoss].active)
|
||||
{
|
||||
projectile.active = false;
|
||||
projectile.netUpdate = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if (Vector2.Distance(projectile.Center, Main.npc[CalamityGlobalNPC.voidBoss].Center) < 80f)
|
||||
projectile.Kill();
|
||||
|
||||
|
||||
@@ -35,6 +35,13 @@ namespace CalamityMod.Projectiles.Boss
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
if (CalamityGlobalNPC.voidBoss < 0 || !Main.npc[CalamityGlobalNPC.voidBoss].active)
|
||||
{
|
||||
projectile.active = false;
|
||||
projectile.netUpdate = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if (Vector2.Distance(projectile.Center, Main.npc[CalamityGlobalNPC.voidBoss].Center) < 80f)
|
||||
projectile.Kill();
|
||||
|
||||
|
||||
@@ -45,6 +45,13 @@ namespace CalamityMod.Projectiles.Boss
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
if (CalamityGlobalNPC.voidBoss < 0 || !Main.npc[CalamityGlobalNPC.voidBoss].active)
|
||||
{
|
||||
projectile.active = false;
|
||||
projectile.netUpdate = true;
|
||||
return;
|
||||
}
|
||||
|
||||
Player player = Main.player[projectile.owner];
|
||||
|
||||
if (start)
|
||||
|
||||
Reference in new issue
Block a user