+ Changed Texture Pack drawing for BoC's illusions and gave the Chase attack a fixed number of chases
This commit is contained in:
1 parent
489da983cf
commit
bf0eabe14f
2 files changed
+4
-36
No files matched your search
@@ -141,7 +141,7 @@ public class BrainOfCthulhuAI : VanillaAIOverride
|
||||
|
||||
#region Idle Period
|
||||
internal static int ChaseTime => 160;
|
||||
internal static int MaxChases => 3;
|
||||
internal static int ChaseAmount => 2;
|
||||
internal static int IdleTeleportDuration => CalamityWorld.death ? 36 : 44;
|
||||
internal static float ChaseMinSpeed => 3;
|
||||
internal static float ChaseMaxSpeed => CalamityWorld.death ? 18 : 15;
|
||||
@@ -1645,9 +1645,6 @@ public class BrainOfCthulhuAI : VanillaAIOverride
|
||||
|
||||
private void Phase2Idle()
|
||||
{
|
||||
//goes from 3 at full health to 1 at low health
|
||||
int chases = (int)Math.Ceiling(MaxChases * (NPC.life / (float)NPC.lifeMax));
|
||||
|
||||
NPC.rotation = NPC.velocity.X / 6f * MathHelper.Pi / 8f;
|
||||
|
||||
if (Time == ChaseTime - 5)
|
||||
@@ -1721,7 +1718,7 @@ public class BrainOfCthulhuAI : VanillaAIOverride
|
||||
AttackFlag = false;
|
||||
|
||||
#region Attack Selection
|
||||
if (AttackCounter >= chases) //Pick attack
|
||||
if (AttackCounter >= ChaseAmount) //Pick attack
|
||||
{
|
||||
NPC.rotation = 0;
|
||||
ResetAttackValues();
|
||||
|
||||
@@ -48,10 +48,7 @@ public class FalseBrain : ModNPC, ILocalizedModType
|
||||
|
||||
NPC.localAI[0] = Main.rand.Next(6);
|
||||
|
||||
if(BrainOfCthulhuSystem.IsBrainOfCthulhuTextureVanilla)
|
||||
NPC.localAI[1] = 1 + Main.rand.NextFloat(-0.25f, 0.25f);
|
||||
else
|
||||
NPC.localAI[1] = 1 + (Main.rand.NextFloat(0.25f, 0.75f) * (Main.rand.NextBool() ? -1 : 1));
|
||||
NPC.localAI[1] = 1 + Main.rand.NextFloat(-0.25f, 0.25f);
|
||||
}
|
||||
private int Variant => (int)NPC.localAI[0];
|
||||
private float Angle => NPC.ai[0];
|
||||
@@ -182,33 +179,7 @@ public class FalseBrain : ModNPC, ILocalizedModType
|
||||
else
|
||||
{
|
||||
tex = TextureAssets.Npc[NPCID.BrainofCthulhu].Value;
|
||||
frame = tex.Frame(1, 8, 0, 4 + (int)NPC.frameCounter);
|
||||
|
||||
switch(Variant)
|
||||
{
|
||||
case 0:
|
||||
scaleAddition = new(-0.125f, 0.25f);
|
||||
break;
|
||||
case 1:
|
||||
scaleAddition = new(0.25f, -0.125f);
|
||||
break;
|
||||
case 2:
|
||||
drawColor = Color.Lerp(drawColor, Color.Red.MultiplyRGB(drawColor), 0.5f);
|
||||
break;
|
||||
case 3:
|
||||
drawColor = Color.Lerp(drawColor, Color.Orange.MultiplyRGB(drawColor), 0.5f);
|
||||
break;
|
||||
case 4:
|
||||
drawColor = Color.Lerp(drawColor, Color.Yellow.MultiplyRGB(drawColor), 0.5f);
|
||||
break;
|
||||
case 5:
|
||||
scaleAddition = new(0.1625f, 0.1625f);
|
||||
break;
|
||||
case 6:
|
||||
scaleAddition = new(-0.1625f, -0.1625f);
|
||||
break;
|
||||
|
||||
}
|
||||
frame = tex.Frame(1, 8, 0, (int)NPC.frameCounter);
|
||||
}
|
||||
|
||||
if (SpawnTime > 0)
|
||||
|
||||
Reference in new issue
Block a user