Aquatic Scourge, Brimstone Elemental, and Cal Clone targeting changes.
This commit is contained in:
1 parent
0e1a24ed79
commit
5bc83ffc75
4 files changed
+3
-33
No files matched your search
@@ -108,10 +108,8 @@ namespace CalamityMod.NPCs.CalClone
|
||||
start = false;
|
||||
}
|
||||
|
||||
NPC.TargetClosest();
|
||||
|
||||
float projectileSpeed = 9f;
|
||||
Vector2 velocity = Main.player[NPC.target].Center - NPC.Center;
|
||||
Vector2 velocity = Main.player[parent.target].Center - NPC.Center;
|
||||
velocity.Normalize();
|
||||
velocity *= projectileSpeed;
|
||||
NPC.rotation = velocity.ToRotation() + MathHelper.Pi;
|
||||
@@ -126,7 +124,7 @@ namespace CalamityMod.NPCs.CalClone
|
||||
|
||||
int type = ModContent.ProjectileType<BrimstoneBarrage>();
|
||||
int damage = NPC.GetProjectileDamage(type);
|
||||
Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center, velocity, type, damage, 1f, NPC.target, 1f, 0f, projectileSpeed * 2f);
|
||||
Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center, velocity, type, damage, 1f, parent.target, 1f, 0f, projectileSpeed * 2f);
|
||||
}
|
||||
timer = 0;
|
||||
}
|
||||
|
||||
@@ -87,10 +87,6 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs
|
||||
if (npc.target < 0 || npc.target == Main.maxPlayers || Main.player[npc.target].dead || !Main.player[npc.target].active)
|
||||
npc.TargetClosest();
|
||||
|
||||
// Despawn safety, make sure to target another player if the current player target is too far away
|
||||
if (Vector2.Distance(Main.player[npc.target].Center, npc.Center) > CalamityGlobalNPC.CatchUpDistance200Tiles)
|
||||
npc.TargetClosest();
|
||||
|
||||
Player player = Main.player[npc.target];
|
||||
|
||||
bool notOcean = player.position.Y < 300f ||
|
||||
|
||||
@@ -46,10 +46,6 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs
|
||||
if (npc.target < 0 || npc.target == Main.maxPlayers || Main.player[npc.target].dead || !Main.player[npc.target].active)
|
||||
npc.TargetClosest();
|
||||
|
||||
// Despawn safety, make sure to target another player if the current player target is too far away
|
||||
if (Vector2.Distance(Main.player[npc.target].Center, npc.Center) > CalamityGlobalNPC.CatchUpDistance200Tiles)
|
||||
npc.TargetClosest();
|
||||
|
||||
Player player = Main.player[npc.target];
|
||||
|
||||
bool despawnDistance = Vector2.Distance(player.Center, npc.Center) > CalamityGlobalNPC.CatchUpDistance350Tiles;
|
||||
|
||||
@@ -185,10 +185,6 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs
|
||||
if (npc.target < 0 || npc.target == Main.maxPlayers || Main.player[npc.target].dead || !Main.player[npc.target].active)
|
||||
npc.TargetClosest();
|
||||
|
||||
// Despawn safety, make sure to target another player if the current player target is too far away
|
||||
if (Vector2.Distance(Main.player[npc.target].Center, npc.Center) > CalamityGlobalNPC.CatchUpDistance200Tiles)
|
||||
npc.TargetClosest();
|
||||
|
||||
// Target variable
|
||||
Player player = Main.player[npc.target];
|
||||
|
||||
@@ -556,7 +552,6 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs
|
||||
if (death)
|
||||
npc.localAI[0] = 1f;
|
||||
|
||||
npc.TargetClosest();
|
||||
npc.netUpdate = true;
|
||||
}
|
||||
|
||||
@@ -645,7 +640,6 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs
|
||||
if (death)
|
||||
npc.localAI[0] = 1f;
|
||||
|
||||
npc.TargetClosest();
|
||||
npc.netUpdate = true;
|
||||
}
|
||||
}
|
||||
@@ -706,11 +700,11 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs
|
||||
npc.ai[2] = 0f;
|
||||
|
||||
npc.rotation = rotation;
|
||||
npc.TargetClosest();
|
||||
npc.netUpdate = true;
|
||||
|
||||
if (npc.ai[3] >= 2f)
|
||||
{
|
||||
npc.TargetClosest();
|
||||
npc.ai[1] = 0f;
|
||||
npc.ai[3] = 0f;
|
||||
return;
|
||||
@@ -727,8 +721,6 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs
|
||||
npc.ai[2] += 1f;
|
||||
if (npc.ai[2] >= (phase4 ? 15f : 30f))
|
||||
{
|
||||
npc.TargetClosest();
|
||||
|
||||
npc.ai[1] = 2f;
|
||||
npc.ai[2] = 0f;
|
||||
if (death)
|
||||
@@ -768,10 +760,6 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs
|
||||
if (npc.target < 0 || npc.target == Main.maxPlayers || Main.player[npc.target].dead || !Main.player[npc.target].active)
|
||||
npc.TargetClosest();
|
||||
|
||||
// Despawn safety, make sure to target another player if the current player target is too far away
|
||||
if (Vector2.Distance(Main.player[npc.target].Center, npc.Center) > CalamityGlobalNPC.CatchUpDistance200Tiles)
|
||||
npc.TargetClosest();
|
||||
|
||||
Player player = Main.player[npc.target];
|
||||
|
||||
float enrageScale = bossRush ? 1f : 0f;
|
||||
@@ -914,7 +902,6 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs
|
||||
npc.ai[2] += 1f;
|
||||
if (npc.ai[2] >= (240f - (death ? 120f * (1f - lifeRatio) : 0f)))
|
||||
{
|
||||
npc.TargetClosest();
|
||||
npc.ai[1] = 1f;
|
||||
npc.ai[2] = 0f;
|
||||
npc.target = 255;
|
||||
@@ -1047,7 +1034,6 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs
|
||||
npc.ai[2] = 0f;
|
||||
npc.target = 255;
|
||||
npc.rotation = calCloneBroRotation;
|
||||
npc.TargetClosest();
|
||||
if (npc.ai[3] >= 3f)
|
||||
{
|
||||
npc.ai[1] = 0f;
|
||||
@@ -1089,10 +1075,6 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs
|
||||
if (npc.target < 0 || npc.target == Main.maxPlayers || Main.player[npc.target].dead || !Main.player[npc.target].active)
|
||||
npc.TargetClosest();
|
||||
|
||||
// Despawn safety, make sure to target another player if the current player target is too far away
|
||||
if (Vector2.Distance(Main.player[npc.target].Center, npc.Center) > CalamityGlobalNPC.CatchUpDistance200Tiles)
|
||||
npc.TargetClosest();
|
||||
|
||||
Player player = Main.player[npc.target];
|
||||
|
||||
float enrageScale = bossRush ? 1f : 0f;
|
||||
@@ -1235,7 +1217,6 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs
|
||||
npc.ai[2] += 1f;
|
||||
if (npc.ai[2] >= (180f - (death ? 90f * (1f - lifeRatio) : 0f)))
|
||||
{
|
||||
npc.TargetClosest();
|
||||
npc.ai[1] = 1f;
|
||||
npc.ai[2] = 0f;
|
||||
npc.target = 255;
|
||||
@@ -1366,7 +1347,6 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs
|
||||
{
|
||||
npc.ai[3] += 1f;
|
||||
npc.ai[2] = 0f;
|
||||
npc.TargetClosest();
|
||||
npc.rotation = calCloneBroRotation;
|
||||
if (npc.ai[3] >= 4f)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user