1 - DoG shouldn't be able to get an insane burst of speed when swapping phases anymore, regardless of the distance from his target.
2 - Queen Slime adjustments.
This commit is contained in:
1 parent
40afb14fee
commit
bd69eaeef7
3 files changed
+67
-5
No files matched your search
@@ -57,6 +57,9 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
// Laser velocity
|
||||
private const float laserVelocity = 10f;
|
||||
|
||||
// Velocity prior to swapping from flight to ground and vice versa
|
||||
private float velocityPriorToPhaseSwap = 0f;
|
||||
|
||||
// Phase 1 variables
|
||||
|
||||
// Enums
|
||||
@@ -186,6 +189,9 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
{
|
||||
bool wasDyingBefore = Dying;
|
||||
|
||||
// Velocity sync
|
||||
writer.Write(velocityPriorToPhaseSwap);
|
||||
|
||||
// Phase 1 syncs
|
||||
writer.Write(NPC.dontTakeDamage);
|
||||
writer.Write(spawnedGuardians);
|
||||
@@ -235,6 +241,9 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
|
||||
public override void ReceiveExtraAI(BinaryReader reader)
|
||||
{
|
||||
// Velocity sync
|
||||
velocityPriorToPhaseSwap = reader.ReadSingle();
|
||||
|
||||
// Phase 1 syncs
|
||||
NPC.dontTakeDamage = reader.ReadBoolean();
|
||||
spawnedGuardians = reader.ReadBoolean();
|
||||
@@ -326,6 +335,7 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
float turnSpeed = malice ? 0.36f : death ? 0.33f : 0.3f;
|
||||
float homingSpeed = malice ? 36f : death ? 30f : 24f;
|
||||
float homingTurnSpeed = malice ? 0.48f : death ? 0.405f : 0.33f;
|
||||
float velocityPriorToPhaseSwapIncrement = 0.05f;
|
||||
|
||||
if (expertMode)
|
||||
{
|
||||
@@ -1053,10 +1063,22 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
}
|
||||
}
|
||||
|
||||
// Set velocity so that DoG cannot speed burst instantly at the start of a phase swap
|
||||
if (velocityPriorToPhaseSwap > 0f)
|
||||
{
|
||||
if (NPC.velocity.Length() > velocityPriorToPhaseSwap)
|
||||
{
|
||||
NPC.velocity.Normalize();
|
||||
NPC.velocity *= velocityPriorToPhaseSwap;
|
||||
velocityPriorToPhaseSwap += velocityPriorToPhaseSwapIncrement;
|
||||
}
|
||||
}
|
||||
|
||||
NPC.rotation = (float)Math.Atan2(NPC.velocity.Y, NPC.velocity.X) + MathHelper.PiOver2;
|
||||
|
||||
if (calamityGlobalNPC.newAI[2] > phaseLimit)
|
||||
{
|
||||
velocityPriorToPhaseSwap = NPC.velocity.Length();
|
||||
NPC.ai[3] = 1f;
|
||||
calamityGlobalNPC.newAI[2] = 0f;
|
||||
NPC.TargetClosest();
|
||||
@@ -1282,6 +1304,17 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
}
|
||||
}
|
||||
|
||||
// Set velocity so that DoG cannot speed burst instantly at the start of a phase swap
|
||||
if (velocityPriorToPhaseSwap > 0f)
|
||||
{
|
||||
if (NPC.velocity.Length() > velocityPriorToPhaseSwap)
|
||||
{
|
||||
NPC.velocity.Normalize();
|
||||
NPC.velocity *= velocityPriorToPhaseSwap;
|
||||
velocityPriorToPhaseSwap += velocityPriorToPhaseSwapIncrement;
|
||||
}
|
||||
}
|
||||
|
||||
NPC.rotation = (float)Math.Atan2(NPC.velocity.Y, NPC.velocity.X) + MathHelper.PiOver2;
|
||||
|
||||
if (flies)
|
||||
@@ -1304,6 +1337,7 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
|
||||
if (calamityGlobalNPC.newAI[2] > phaseLimit)
|
||||
{
|
||||
velocityPriorToPhaseSwap = NPC.velocity.Length();
|
||||
NPC.ai[3] = 0f;
|
||||
calamityGlobalNPC.newAI[2] = 0f;
|
||||
NPC.TargetClosest();
|
||||
@@ -1736,10 +1770,22 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
}
|
||||
}
|
||||
|
||||
// Set velocity so that DoG cannot speed burst instantly at the start of a phase swap
|
||||
if (velocityPriorToPhaseSwap > 0f)
|
||||
{
|
||||
if (NPC.velocity.Length() > velocityPriorToPhaseSwap)
|
||||
{
|
||||
NPC.velocity.Normalize();
|
||||
NPC.velocity *= velocityPriorToPhaseSwap;
|
||||
velocityPriorToPhaseSwap += velocityPriorToPhaseSwapIncrement;
|
||||
}
|
||||
}
|
||||
|
||||
NPC.rotation = (float)Math.Atan2(NPC.velocity.Y, NPC.velocity.X) + MathHelper.PiOver2;
|
||||
|
||||
if (calamityGlobalNPC.newAI[2] > phaseLimit)
|
||||
{
|
||||
velocityPriorToPhaseSwap = NPC.velocity.Length();
|
||||
NPC.ai[3] = 1f;
|
||||
calamityGlobalNPC.newAI[2] = 0f;
|
||||
NPC.TargetClosest();
|
||||
@@ -1951,6 +1997,17 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
}
|
||||
}
|
||||
|
||||
// Set velocity so that DoG cannot speed burst instantly at the start of a phase swap
|
||||
if (velocityPriorToPhaseSwap > 0f)
|
||||
{
|
||||
if (NPC.velocity.Length() > velocityPriorToPhaseSwap)
|
||||
{
|
||||
NPC.velocity.Normalize();
|
||||
NPC.velocity *= velocityPriorToPhaseSwap;
|
||||
velocityPriorToPhaseSwap += velocityPriorToPhaseSwapIncrement;
|
||||
}
|
||||
}
|
||||
|
||||
NPC.rotation = (float)Math.Atan2(NPC.velocity.Y, NPC.velocity.X) + MathHelper.PiOver2;
|
||||
|
||||
if (flies)
|
||||
@@ -1973,6 +2030,7 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
|
||||
if (calamityGlobalNPC.newAI[2] > phaseLimit)
|
||||
{
|
||||
velocityPriorToPhaseSwap = NPC.velocity.Length();
|
||||
NPC.ai[3] = 0f;
|
||||
calamityGlobalNPC.newAI[2] = 0f;
|
||||
NPC.TargetClosest();
|
||||
|
||||
@@ -222,7 +222,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
|
||||
|
||||
switch ((int)npc.Calamity().newAI[0])
|
||||
{
|
||||
case 4:
|
||||
default:
|
||||
npc.ai[0] = Main.rand.NextBool() ? 6f : 5f;
|
||||
break;
|
||||
case 5:
|
||||
@@ -247,7 +247,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
|
||||
{
|
||||
switch ((int)npc.Calamity().newAI[0])
|
||||
{
|
||||
case 3:
|
||||
default:
|
||||
npc.ai[0] = Main.rand.NextBool() ? 5f : 4f;
|
||||
break;
|
||||
case 4:
|
||||
@@ -465,7 +465,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
|
||||
// Eruption of crystals in phase 3
|
||||
if (npc.ai[0] == 6f && phase3)
|
||||
{
|
||||
float projectileVelocity = 12f;
|
||||
float projectileVelocity = 24f;
|
||||
type = ProjectileID.QueenSlimeMinionBlueSpike;
|
||||
damage = npc.GetProjectileDamage(type);
|
||||
Vector2 destination = new Vector2(npc.Center.X, npc.Center.Y - 100f) - npc.Center;
|
||||
@@ -552,7 +552,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
|
||||
for (int j = 0; j < totalProjectiles; j++)
|
||||
{
|
||||
Vector2 projVelocity = npc.velocity.RotatedBy(radians * j + MathHelper.PiOver2);
|
||||
Projectile.NewProjectile(npc.GetSource_FromAI(), fireFrom, projVelocity, type, damage, 0f, Main.myPlayer);
|
||||
Projectile.NewProjectile(npc.GetSource_FromAI(), fireFrom, projVelocity * 2f, type, damage, 0f, Main.myPlayer);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -724,7 +724,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
|
||||
npc.netUpdate = true;
|
||||
}
|
||||
|
||||
int num28 = (int)(npc.lifeMax * 0.04f);
|
||||
int num28 = (int)(npc.lifeMax * (phase2 ? 0.03f : 0.015f));
|
||||
if (!((npc.life + num28) < npc.localAI[0]))
|
||||
return false;
|
||||
|
||||
|
||||
@@ -1957,6 +1957,10 @@ namespace CalamityMod.Projectiles
|
||||
{
|
||||
if (projectile.hostile)
|
||||
{
|
||||
// These projectiles are way too fucking fast so they need to be slower
|
||||
if (projectile.type == ProjectileID.QueenSlimeMinionBlueSpike || projectile.type == ProjectileID.QueenSlimeMinionPinkBall)
|
||||
projectile.velocity *= 0.5f;
|
||||
|
||||
if (CalamityPlayer.areThereAnyDamnBosses && affectedByMaliceModeVelocityMultiplier && (CalamityWorld.malice || BossRushEvent.BossRushActive))
|
||||
projectile.velocity *= MaliceModeProjectileVelocityMultiplier;
|
||||
|
||||
|
||||
Reference in new issue
Block a user