1 - PBG minions get more challenging as her HP drops.
This commit is contained in:
1 parent
069871f5b8
commit
dc66f5db0a
3 files changed
+23
-21
No files matched your search
@@ -82,7 +82,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath
|
||||
|
||||
npc.rotation = npc.velocity.ToRotation() + MathHelper.PiOver2;
|
||||
|
||||
float timeBeforeHoming = 90f;
|
||||
float timeBeforeHoming = 120f - npc.ai[3] * 0.5f;
|
||||
if (npc.ai[2] < timeBeforeHoming)
|
||||
{
|
||||
npc.ai[2] += 1f;
|
||||
@@ -100,8 +100,8 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath
|
||||
else if (npc.ai[0] == 1f)
|
||||
{
|
||||
npc.localAI[1] += 1f;
|
||||
float timeBeforeExploding = 600f;
|
||||
float homingDuration = malice ? 600f : death ? 420f : revenge ? 360f : expertMode ? 300f : 180f;
|
||||
float timeBeforeExploding = 480f + npc.ai[3] * 2f;
|
||||
float homingDuration = (malice ? 430f : death ? 340f : revenge ? 290f : expertMode ? 240f : 150f) + npc.ai[3] * 2f;
|
||||
if (npc.localAI[1] == timeBeforeExploding)
|
||||
{
|
||||
CheckDead();
|
||||
@@ -123,7 +123,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath
|
||||
{
|
||||
npc.noTileCollide = false;
|
||||
|
||||
if (npc.velocity.Length() < 20f)
|
||||
if (npc.velocity.Length() < (malice ? 25f : 20f))
|
||||
npc.velocity *= 1.01f;
|
||||
|
||||
if (Collision.SolidCollision(npc.position, npc.width, npc.height))
|
||||
|
||||
@@ -64,23 +64,23 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath
|
||||
|
||||
Vector2 vector = Main.player[npc.target].Center - npc.Center;
|
||||
float distanceRequiredForExplosion = 90f;
|
||||
float timeBeforeExplosion = malice ? 1200f : death ? 940f : revenge ? 720f : 600f;
|
||||
if (vector.Length() < distanceRequiredForExplosion || npc.ai[3] >= timeBeforeExplosion)
|
||||
float timeBeforeExplosion = (malice ? 1000f : death ? 740f : revenge ? 520f : 400f) + npc.ai[3] * 4f;
|
||||
if (vector.Length() < distanceRequiredForExplosion || npc.ai[0] >= timeBeforeExplosion)
|
||||
{
|
||||
CheckDead();
|
||||
npc.life = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
npc.ai[3] += 1f;
|
||||
if (npc.ai[3] >= timeBeforeExplosion * 0.8f)
|
||||
npc.ai[0] += 1f;
|
||||
if (npc.ai[0] >= timeBeforeExplosion * 0.8f)
|
||||
{
|
||||
npc.velocity *= 0.98f;
|
||||
return;
|
||||
}
|
||||
|
||||
npc.TargetClosest(true);
|
||||
float velocity = malice ? 16f : death ? 14f : revenge ? 12f : 10f;
|
||||
float velocity = (malice ? 14f : death ? 12f : revenge ? 10f : 8f) + npc.ai[3] * 0.04f;
|
||||
Vector2 vector167 = new Vector2(npc.Center.X + (float)(npc.direction * 20), npc.Center.Y + 6f);
|
||||
float num1373 = player.position.X + (float)player.width * 0.5f - vector167.X;
|
||||
float num1374 = player.Center.Y - vector167.Y;
|
||||
@@ -88,7 +88,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath
|
||||
float num1376 = velocity / num1375;
|
||||
num1373 *= num1376;
|
||||
num1374 *= num1376;
|
||||
float inertia = malice ? 20f : death ? 26f : revenge ? 28f : 30f;
|
||||
float inertia = (malice ? 35f : death ? 40f : revenge ? 45f : 50f) - npc.ai[3] * 0.25f;
|
||||
npc.velocity.X = (npc.velocity.X * inertia + num1373) / (inertia + 1f);
|
||||
npc.velocity.Y = (npc.velocity.Y * inertia + num1374) / (inertia + 1f);
|
||||
}
|
||||
|
||||
@@ -135,8 +135,8 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath
|
||||
bool phase4 = lifeRatio < 0.25f;
|
||||
bool phase5 = lifeRatio < 0.1f;
|
||||
|
||||
// Adjusts how 'challenging' the projectiles are to deal with
|
||||
float projectileChallengeAmt = (1f - lifeRatio) * 100f;
|
||||
// Adjusts how 'challenging' the projectiles and enemies are to deal with
|
||||
float challengeAmt = (1f - lifeRatio) * 100f;
|
||||
float nukeBarrageChallengeAmt = (0.5f - lifeRatio) * 200f;
|
||||
|
||||
// Adjust slowing debuff immunity
|
||||
@@ -600,19 +600,19 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
if (expertMode && NPC.CountNPCS(ModContent.NPCType<PlagueMine>()) < 2)
|
||||
NPC.NewNPC((int)vector119.X, (int)vector119.Y, ModContent.NPCType<PlagueMine>());
|
||||
NPC.NewNPC((int)vector119.X, (int)vector119.Y, ModContent.NPCType<PlagueMine>(), 0, 0f, 0f, 0f, challengeAmt);
|
||||
|
||||
float projectileSpeed = (revenge ? 9f : 7f) + enrageScale * 2f;
|
||||
float npcSpeed = (revenge ? 9f : 7f) + enrageScale * 2f;
|
||||
|
||||
float num1071 = player.position.X + player.width * 0.5f - vector119.X;
|
||||
float num1072 = player.position.Y + player.height * 0.5f - vector119.Y;
|
||||
float num1073 = (float)Math.Sqrt(num1071 * num1071 + num1072 * num1072);
|
||||
|
||||
num1073 = projectileSpeed / num1073;
|
||||
num1073 = npcSpeed / num1073;
|
||||
num1071 *= num1073;
|
||||
num1072 *= num1073;
|
||||
|
||||
int num1062 = NPC.NewNPC((int)vector119.X, (int)vector119.Y, ModContent.NPCType<PlagueHomingMissile>());
|
||||
int num1062 = NPC.NewNPC((int)vector119.X, (int)vector119.Y, ModContent.NPCType<PlagueHomingMissile>(), 0, 0f, 0f, 0f, challengeAmt);
|
||||
Main.npc[num1062].velocity.X = num1071;
|
||||
Main.npc[num1062].velocity.Y = num1072;
|
||||
Main.npc[num1062].netUpdate = true;
|
||||
@@ -680,19 +680,21 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
if (expertMode && NPC.CountNPCS(ModContent.NPCType<PlagueMine>()) < 3)
|
||||
NPC.NewNPC((int)vector119.X, (int)vector119.Y, ModContent.NPCType<PlagueMine>());
|
||||
NPC.NewNPC((int)vector119.X, (int)vector119.Y, ModContent.NPCType<PlagueMine>(), 0, 0f, 0f, 0f, challengeAmt);
|
||||
|
||||
float projectileSpeed = (revenge ? 11f : 9f) + enrageScale * 2f;
|
||||
float npcSpeed = (revenge ? 11f : 9f) + enrageScale * 2f;
|
||||
|
||||
float num1071 = player.position.X + player.width * 0.5f - vector119.X;
|
||||
float num1072 = player.position.Y + player.height * 0.5f - vector119.Y;
|
||||
float num1073 = (float)Math.Sqrt(num1071 * num1071 + num1072 * num1072);
|
||||
|
||||
num1073 = projectileSpeed / num1073;
|
||||
num1073 = npcSpeed / num1073;
|
||||
num1071 *= num1073;
|
||||
num1072 *= num1073;
|
||||
num1071 += Main.rand.Next(-20, 21) * 0.05f;
|
||||
num1072 += Main.rand.Next(-20, 21) * 0.05f;
|
||||
|
||||
int num1062 = NPC.NewNPC((int)vector119.X, (int)vector119.Y, ModContent.NPCType<PlagueHomingMissile>());
|
||||
int num1062 = NPC.NewNPC((int)vector119.X, (int)vector119.Y, ModContent.NPCType<PlagueHomingMissile>(), 0, 0f, 0f, 0f, challengeAmt);
|
||||
Main.npc[num1062].velocity.X = num1071;
|
||||
Main.npc[num1062].velocity.Y = num1072;
|
||||
Main.npc[num1062].netUpdate = true;
|
||||
@@ -768,7 +770,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath
|
||||
}
|
||||
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
Projectile.NewProjectile(vector121.X, vector121.Y, num1071, num1072, type, damage, 0f, Main.myPlayer, projectileChallengeAmt, player.position.Y);
|
||||
Projectile.NewProjectile(vector121.X, vector121.Y, num1071, num1072, type, damage, 0f, Main.myPlayer, challengeAmt, player.position.Y);
|
||||
npc.netUpdate = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user