1 - Ruby Jewel projectile spread is larger and 1 less projectile is fired in non-Master.

2 - Sapphire Jewel stays above King Slime now and teleports with him.
This commit is contained in:
mountaindrew10 authored and Ozzatron committed 2024-06-01 20:23:38 -04:00
1 parent 5df35a42cb
commit 59f226739d
3 files changed
+51 -18

No files matched your search

+2 -2
View File
@@ -152,8 +152,8 @@ namespace CalamityMod.NPCs.NormalNPCs
int damage = NPC.GetProjectileDamage(type);
if (CalamityWorld.death || BossRushEvent.BossRushActive)
{
int numProj = 5;
float rotation = MathHelper.ToRadians(12);
int numProj = Main.masterMode ? 5 : 4;
float rotation = MathHelper.ToRadians(18);
for (int i = 0; i < numProj; i++)
{
Vector2 perturbedSpeed = projVector.RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (float)(numProj - 1)));
+17 -16
View File
@@ -71,7 +71,20 @@ namespace CalamityMod.NPCs.NormalNPCs
float velocity = 5f;
float acceleration = 0.1f;
if (NPC.position.Y > Main.player[NPC.target].position.Y - 300f)
int distanceFromKingSlime = 1;
Vector2 kingSlimeCenter = NPC.Center;
for (int i = 0; i < Main.maxNPCs; i++)
{
if (Main.npc[i].active && Main.npc[i].type == NPCID.KingSlime)
{
distanceFromKingSlime = (int)NPC.Distance(Main.npc[i].Center);
kingSlimeCenter = Main.npc[i].Center;
break;
}
}
Vector2 movementTarget = kingSlimeCenter == NPC.Center ? Main.player[NPC.target].Center : kingSlimeCenter;
if (NPC.position.Y > movementTarget.Y - 200f)
{
if (NPC.velocity.Y > 0f)
NPC.velocity.Y *= 0.98f;
@@ -81,7 +94,7 @@ namespace CalamityMod.NPCs.NormalNPCs
if (NPC.velocity.Y > velocity)
NPC.velocity.Y = velocity;
}
else if (NPC.position.Y < Main.player[NPC.target].position.Y - 400f)
else if (NPC.position.Y < movementTarget.Y - 250f)
{
if (NPC.velocity.Y < 0f)
NPC.velocity.Y *= 0.98f;
@@ -92,7 +105,7 @@ namespace CalamityMod.NPCs.NormalNPCs
NPC.velocity.Y = -velocity;
}
if (NPC.Center.X > Main.player[NPC.target].Center.X + 300f)
if (NPC.Center.X > movementTarget.X + 100f)
{
if (NPC.velocity.X > 0f)
NPC.velocity.X *= 0.98f;
@@ -102,7 +115,7 @@ namespace CalamityMod.NPCs.NormalNPCs
if (NPC.velocity.X > 8f)
NPC.velocity.X = 8f;
}
if (NPC.Center.X < Main.player[NPC.target].Center.X - 300f)
if (NPC.Center.X < movementTarget.X - 100f)
{
if (NPC.velocity.X < 0f)
NPC.velocity.X *= 0.98f;
@@ -121,18 +134,6 @@ namespace CalamityMod.NPCs.NormalNPCs
SoundEngine.PlaySound(SoundID.Item8, NPC.Center);
int distanceFromKingSlime = 1;
Vector2 kingSlimeCenter = NPC.Center;
for (int i = 0; i < Main.maxNPCs; i++)
{
if (Main.npc[i].active && Main.npc[i].type == NPCID.KingSlime)
{
distanceFromKingSlime = (int)NPC.Distance(Main.npc[i].Center);
kingSlimeCenter = Main.npc[i].Center;
break;
}
}
for (int dusty = 0; dusty < 10; dusty++)
{
Vector2 dustVel = (kingSlimeCenter - NPC.Center).SafeNormalize(Vector2.UnitY) * Main.rand.NextFloat(2f, 4f);
@@ -276,6 +276,38 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
if (masterMode)
teleportRate *= 2f;
if (npc.ai[0] == 0f)
{
// Move Blue Crystal
if (blueCrystalAlive)
{
for (int i = 0; i < Main.maxNPCs; i++)
{
NPC blueCrystal = Main.npc[i];
if (blueCrystal.active && blueCrystal.type == ModContent.NPCType<KingSlimeJewel2>())
{
blueCrystal.position.X = npc.position.X;
blueCrystal.position.Y = npc.position.Y - 200f;
for (int dusty = 0; dusty < 10; dusty++)
{
Vector2 dustVel = Main.rand.NextVector2CircularEdge(5f, 5f);
int sapphire = Dust.NewDust(blueCrystal.Center, blueCrystal.width, blueCrystal.height, DustID.GemSapphire, 0f, 0f, 100, default, 2f);
Main.dust[sapphire].velocity = dustVel * Main.rand.NextFloat(1f, 2f);
Main.dust[sapphire].noGravity = true;
if (Main.rand.NextBool())
{
Main.dust[sapphire].scale = 0.5f;
Main.dust[sapphire].fadeIn = 1f + Main.rand.Next(10) * 0.1f;
}
}
break;
}
}
}
}
npc.ai[0] += teleportRate;
teleportScale = MathHelper.Clamp(npc.ai[0] / 30f, 0f, 1f);
teleportScale = 0.5f + teleportScale * 0.5f;