1 - Exo Mech adjustments.

2 - Version number changed to patron early access number.
This commit is contained in:
Andrew Marheine committed 2021-11-03 15:41:26 -05:00
1 parent a9ed8ebed6
commit 72d6ac32fe
8 files changed
+34 -9

No files matched your search

+14 -2
View File
@@ -411,9 +411,12 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo
int numRockets = lastMechAlive ? 4 : nerfedAttacks ? 2 : 3;
// Default vector to fly to
float chargeComboXOffset = -500f;
bool flyRight = npc.ai[0] % 2f == 0f || npc.ai[0] < 10f || !revenge;
float destinationX = flyRight ? 750f : -750f;
float destinationY = player.Center.Y;
float chargeComboXOffset = flyRight ? -500f : 500f;
float chargeComboYOffset = npc.ai[2] == 0f ? 400f : -400f;
Vector2 destination = SecondaryAIState == (float)SecondaryPhase.PassiveAndImmune ? new Vector2(player.Center.X + 1200f, player.Center.Y) : AIState == (float)Phase.LineUpChargeCombo ? new Vector2(player.Center.X + 750f, player.Center.Y + chargeComboYOffset) : new Vector2(player.Center.X + 750f, player.Center.Y);
Vector2 destination = SecondaryAIState == (float)SecondaryPhase.PassiveAndImmune ? new Vector2(player.Center.X + destinationX * 1.6f, destinationY) : AIState == (float)Phase.LineUpChargeCombo ? new Vector2(player.Center.X + destinationX, destinationY + chargeComboYOffset) : new Vector2(player.Center.X + destinationX, destinationY);
// If Apollo can fire projectiles, cannot fire if too close to the target
bool canFire = Vector2.Distance(npc.Center, player.Center) > 320f;
@@ -553,6 +556,9 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo
if (spawnOtherExoMechs)
{
// Reset everything
if (npc.ai[0] < 10f)
npc.ai[0] = 10f;
npc.ai[0] += 1f;
npc.ai[3] = 1f;
SecondaryAIState = (float)SecondaryPhase.PassiveAndImmune;
npc.localAI[0] = 0f;
@@ -605,6 +611,9 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo
if (otherMechIsBerserk)
{
// Reset everything
if (npc.ai[0] < 10f)
npc.ai[0] = 10f;
npc.ai[0] += 1f;
SecondaryAIState = (float)SecondaryPhase.PassiveAndImmune;
npc.localAI[0] = 0f;
npc.localAI[1] = 0f;
@@ -637,6 +646,9 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo
if (otherMechIsBerserk)
{
// Reset everything
if (npc.ai[0] < 10f)
npc.ai[0] = 10f;
npc.ai[0] += 1f;
SecondaryAIState = (float)SecondaryPhase.PassiveAndImmune;
npc.localAI[0] = 0f;
npc.localAI[1] = 0f;
+13 -1
View File
@@ -512,7 +512,10 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis
}
// Default vector to fly to
Vector2 destination = SecondaryAIState == (float)SecondaryPhase.PassiveAndImmune ? new Vector2(player.Center.X - 1200f, player.Center.Y) : AIState == (float)Phase.Deathray ? new Vector2(player.Center.X, player.Center.Y - spinRadius) : new Vector2(player.Center.X - 750f, player.Center.Y);
bool flyLeft = npc.ai[0] % 2f == 0f || npc.ai[0] < 10f || !revenge;
float destinationX = flyLeft ? -750f : 750f;
float destinationY = player.Center.Y;
Vector2 destination = SecondaryAIState == (float)SecondaryPhase.PassiveAndImmune ? new Vector2(player.Center.X + destinationX * 1.6f, destinationY) : AIState == (float)Phase.Deathray ? new Vector2(player.Center.X, destinationY - spinRadius) : new Vector2(player.Center.X + destinationX, destinationY);
// Add a bit of randomness to the destination, but only in specific phases where it's necessary
if (AIState == (float)Phase.Normal || AIState == (float)Phase.LaserShotgun || AIState == (float)Phase.PhaseTransition)
@@ -563,6 +566,9 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis
if (spawnOtherExoMechs)
{
// Reset everything
if (npc.ai[0] < 10f)
npc.ai[0] = 10f;
npc.ai[0] += 1f;
npc.ai[1] = 0f;
npc.ai[2] = 0f;
npc.ai[3] = 1f;
@@ -605,6 +611,9 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis
if (otherMechIsBerserk)
{
// Reset everything
if (npc.ai[0] < 10f)
npc.ai[0] = 10f;
npc.ai[0] += 1f;
SecondaryAIState = (float)SecondaryPhase.PassiveAndImmune;
npc.ai[1] = 0f;
npc.ai[2] = 0f;
@@ -632,6 +641,9 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis
if (otherMechIsBerserk)
{
// Reset everything
if (npc.ai[0] < 10f)
npc.ai[0] = 10f;
npc.ai[0] += 1f;
SecondaryAIState = (float)SecondaryPhase.PassiveAndImmune;
npc.ai[1] = 0f;
npc.ai[2] = 0f;
+1 -1
View File
@@ -353,7 +353,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos
else
{
// Normal laser
if (berserk)
if (berserk && npc.ai[0] % 3f == 0f)
Projectile.NewProjectile(npc.Center, targetCenterArray[i], type, damage, 0f, Main.myPlayer, 0f, npc.whoAmI);
// Predictive laser
+1 -1
View File
@@ -353,7 +353,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos
else
{
// Normal laser
if (berserk)
if (berserk && npc.ai[0] % 3f == 0f)
Projectile.NewProjectile(npc.Center, targetCenterArray[i], type, damage, 0f, Main.myPlayer, 0f, npc.whoAmI);
// Predictive laser
+2 -1
View File
@@ -452,7 +452,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos
// Laser Barrage variables
float laserBarrageLocationBaseDistance = SecondaryAIState == (int)SecondaryPhase.PassiveAndImmune ? baseDistance * 2f : baseDistance;
Vector2 laserBarrageLocation = new Vector2(0f, laserBarrageLocationBaseDistance);
Vector2 laserBarrageLocation = new Vector2(0f, npc.ai[1] % 2f == 0f ? laserBarrageLocationBaseDistance : -laserBarrageLocationBaseDistance);
float laserBarrageLocationDistance = turnDistance * 3f;
// Velocity and turn speed values
@@ -737,6 +737,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos
calamityGlobalNPC.newAI[3] += 1f;
if (calamityGlobalNPC.newAI[3] >= velocityAdjustTime)
{
npc.ai[1] += (berserk && revenge) ? 1f : 0f;
npc.localAI[0] = berserk ? 1f : 0f;
AIState = (float)Phase.Charge;
calamityGlobalNPC.newAI[2] = 0f;
+1 -1
View File
@@ -353,7 +353,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos
else
{
// Normal laser
if (berserk)
if (berserk && npc.ai[0] % 3f == 0f)
Projectile.NewProjectile(npc.Center, targetCenterArray[i], type, damage, 0f, Main.myPlayer, 0f, npc.whoAmI);
// Predictive laser
+1 -1
View File
@@ -132,7 +132,7 @@ namespace CalamityMod.Projectiles.Boss
// Set AI to stop homing, start accelerating
float stopHomingDistance = malice ? 120f : death ? 160f : revenge ? 180f : expertMode ? 200f : 240f;
if (distanceFromTarget.Length() < stopHomingDistance || projectile.ai[0] == 1f)
if (distanceFromTarget.Length() < stopHomingDistance || projectile.ai[0] == 1f || projectile.timeLeft < 480)
{
projectile.ai[0] = 1f;
+1 -1
View File
@@ -1,5 +1,5 @@
author = Fabsol and the Dev Team
version = 1.5.0.001
version = 1.5.0.000
displayName = Calamity Mod (No Calamity Music)
homepage = https://forums.terraria.org/index.php?threads/calamity-mod.44065/
buildIgnore = .vs\*, Properties\*, *.csproj, *.user, obj\*, bin\*, *.config, .git\*, LICENSE, README.md, .editorconfig, .gitignore, .gitattributes