account for CalamityAI deprecation

This commit is contained in:
GinYuH committed 2025-06-07 00:30:39 -07:00
1 parent 757c4d977c
commit c4ef63b1d3
19 files changed
+57 -57

No files matched your search

+2 -2
View File
@@ -103,7 +103,7 @@ namespace CalamityMod.NPCs.AquaticScourge
// Adjust hostility and stats
bool nonHostile = calamityGlobalNPC.newAI[0] == 0f;
if (NPC.justHit || NPC.life <= NPC.lifeMax * 0.999 || bossRush || Main.getGoodWorld)
if (NPC.justHit || NPC.life <= NPC.lifeMax * 0.999 || bossRush || CalamityWorld.LegendaryMode)
{
if (nonHostile)
{
@@ -282,7 +282,7 @@ namespace CalamityMod.NPCs.AquaticScourge
scourgeMaxSpeed += Vector2.Distance(player.Center, NPC.Center) * 0.001f;
}
if (Main.getGoodWorld)
if (CalamityWorld.LegendaryMode)
scourgeMaxSpeed *= 1.15f;
}
+2 -2
View File
@@ -102,7 +102,7 @@ namespace CalamityMod.NPCs.AquaticScourge
// Adjust hostility and stats
bool nonHostile = calamityGlobalNPC.newAI[0] == 0f;
if (NPC.justHit || NPC.life <= NPC.lifeMax * 0.999 || bossRush || Main.getGoodWorld)
if (NPC.justHit || NPC.life <= NPC.lifeMax * 0.999 || bossRush || CalamityWorld.LegendaryMode)
{
if (nonHostile)
{
@@ -251,7 +251,7 @@ namespace CalamityMod.NPCs.AquaticScourge
scourgeMaxSpeed += Vector2.Distance(player.Center, NPC.Center) * 0.001f;
}
if (Main.getGoodWorld)
if (CalamityWorld.LegendaryMode)
scourgeMaxSpeed *= 1.15f;
}
+2 -2
View File
@@ -144,7 +144,7 @@ namespace CalamityMod.NPCs.AquaticScourge
// Adjust hostility and stats
bool nonHostile = calamityGlobalNPC.newAI[0] == 0f;
if (NPC.justHit || NPC.life <= NPC.lifeMax * 0.999 || bossRush || Main.getGoodWorld)
if (NPC.justHit || NPC.life <= NPC.lifeMax * 0.999 || bossRush || CalamityWorld.LegendaryMode)
{
if (nonHostile)
{
@@ -449,7 +449,7 @@ namespace CalamityMod.NPCs.AquaticScourge
scourgeAcceleration *= accelerationMultiplier;
}
if (Main.getGoodWorld)
if (CalamityWorld.LegendaryMode)
{
scourgeMaxSpeed *= 1.15f;
scourgeAcceleration *= 1.15f;
+2 -2
View File
@@ -100,7 +100,7 @@ namespace CalamityMod.NPCs.AquaticScourge
// Adjust hostility and stats
bool nonHostile = calamityGlobalNPC.newAI[0] == 0f;
if (NPC.justHit || NPC.life <= NPC.lifeMax * 0.999 || bossRush || Main.getGoodWorld)
if (NPC.justHit || NPC.life <= NPC.lifeMax * 0.999 || bossRush || CalamityWorld.LegendaryMode)
{
if (nonHostile)
{
@@ -249,7 +249,7 @@ namespace CalamityMod.NPCs.AquaticScourge
scourgeMaxSpeed += Vector2.Distance(player.Center, NPC.Center) * 0.001f;
}
if (Main.getGoodWorld)
if (CalamityWorld.LegendaryMode)
scourgeMaxSpeed *= 1.15f;
}
+3 -3
View File
@@ -217,7 +217,7 @@ namespace CalamityMod.NPCs.AstrumAureus
walkingVelocity += 1.5f * (1f - lifeRatio);
if (revenge)
walkingVelocity += Math.Abs(NPC.Center.X - player.Center.X) * 0.0025f;
if (Main.getGoodWorld)
if (CalamityWorld.LegendaryMode)
walkingVelocity *= 1.15f;
float walkingProjectileVelocity = walkingVelocity * 0.8f;
@@ -653,7 +653,7 @@ namespace CalamityMod.NPCs.AstrumAureus
velocity += 6f * enrageScale;
if (expertMode)
velocity += death ? 6f * (1f - lifeRatio) : 4f * (1f - lifeRatio);
if (Main.getGoodWorld)
if (CalamityWorld.LegendaryMode)
velocity *= 1.15f;
NPC.velocity = (new Vector2(player.Center.X, player.Center.Y - 500f) - NPC.Center).SafeNormalize(Vector2.Zero) * velocity;
@@ -1072,7 +1072,7 @@ namespace CalamityMod.NPCs.AstrumAureus
if (calamityGlobalNPC.newAI[1] > 0f && !reduceFallSpeed)
maxFallSpeed *= calamityGlobalNPC.newAI[1] + 1f;
if (Main.getGoodWorld && !reduceFallSpeed)
if (CalamityWorld.LegendaryMode && !reduceFallSpeed)
{
gravity *= 1.15f;
maxFallSpeed *= 1.15f;
+1 -1
View File
@@ -174,7 +174,7 @@ namespace CalamityMod.NPCs.AstrumDeus
calamityGlobalNPC.CurrentlyIncreasingDefenseOrDR = calamityGlobalNPC.newAI[1] < resistanceTime;
// Flight timer
float aiSwitchTimer = doubleWormPhase ? (Main.getGoodWorld ? 600f : 1200f) : (Main.getGoodWorld ? 900f : 1800f);
float aiSwitchTimer = doubleWormPhase ? (CalamityWorld.LegendaryMode ? 600f : 1200f) : (CalamityWorld.LegendaryMode ? 900f : 1800f);
calamityGlobalNPC.newAI[3] += 1f;
if (calamityGlobalNPC.newAI[3] >= aiSwitchTimer)
+3 -3
View File
@@ -212,7 +212,7 @@ namespace CalamityMod.NPCs.AstrumDeus
calamityGlobalNPC.CurrentlyIncreasingDefenseOrDR = calamityGlobalNPC.newAI[1] < resistanceTime;
// Flight timer
float aiSwitchTimer = doubleWormPhase ? (Main.getGoodWorld ? 600f : 1200f) : (Main.getGoodWorld ? 900f : 1800f);
float aiSwitchTimer = doubleWormPhase ? (CalamityWorld.LegendaryMode ? 600f : 1200f) : (CalamityWorld.LegendaryMode ? 900f : 1800f);
calamityGlobalNPC.newAI[3] += 1f;
if (calamityGlobalNPC.newAI[3] >= aiSwitchTimer)
@@ -343,7 +343,7 @@ namespace CalamityMod.NPCs.AstrumDeus
int startIndexHeadTwo = startIndexHeadOne + phase2Length + 1;
int headTwoID = NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.Center.X, (int)NPC.Center.Y, NPC.type, startIndexHeadTwo);
Main.npc[headTwoID].Calamity().newAI[0] = 2f;
Main.npc[headTwoID].Calamity().newAI[3] = Main.getGoodWorld ? 300f : 600f;
Main.npc[headTwoID].Calamity().newAI[3] = CalamityWorld.LegendaryMode ? 300f : 600f;
Main.npc[headTwoID].velocity = Vector2.Normalize(player.Center - Main.npc[headTwoID].Center) * 16f;
Main.npc[headTwoID].timeLeft *= 20;
Main.npc[headTwoID].ForceNetUpdate();
@@ -580,7 +580,7 @@ namespace CalamityMod.NPCs.AstrumDeus
speed *= increaseSpeedMore ? 2f : increaseSpeed ? 1.5f : 1f;
turnSpeed *= increaseSpeedMore ? 2f : increaseSpeed ? 1.5f : 1f;
if (Main.getGoodWorld)
if (CalamityWorld.LegendaryMode)
{
speed *= 1.15f;
turnSpeed *= 1.15f;
+1 -1
View File
@@ -157,7 +157,7 @@ namespace CalamityMod.NPCs.AstrumDeus
calamityGlobalNPC.CurrentlyIncreasingDefenseOrDR = calamityGlobalNPC.newAI[1] < resistanceTime;
// Flight timer
float aiSwitchTimer = doubleWormPhase ? (Main.getGoodWorld ? 600f : 1200f) : (Main.getGoodWorld ? 900f : 1800f);
float aiSwitchTimer = doubleWormPhase ? (CalamityWorld.LegendaryMode ? 600f : 1200f) : (CalamityWorld.LegendaryMode ? 900f : 1800f);
calamityGlobalNPC.newAI[3] += 1f;
if (calamityGlobalNPC.newAI[3] >= aiSwitchTimer)
@@ -466,7 +466,7 @@ namespace CalamityMod.NPCs.BrimstoneElemental
NPC.chaseable = true;
NPC.ai[3] += 1f;
NPC.alpha = 0;
if (NPC.ai[3] >= 2f || phase2 || Main.getGoodWorld)
if (NPC.ai[3] >= 2f || phase2 || CalamityWorld.LegendaryMode)
{
NPC.ai[0] = -1f;
NPC.ai[1] = 0f;
@@ -540,7 +540,7 @@ namespace CalamityMod.NPCs.BrimstoneElemental
projectileVelocity = (player.Center - NPC.Center).SafeNormalize(Vector2.UnitY) * velocity;
int numProj = death ? 8 : 4;
int spread = death ? 90 : 45;
if (Main.getGoodWorld)
if (CalamityWorld.LegendaryMode)
{
numProj *= 3;
spread *= 2;
@@ -582,7 +582,7 @@ namespace CalamityMod.NPCs.BrimstoneElemental
NPC.chaseable = false;
NPC.localAI[0] += 1f;
if (Main.getGoodWorld)
if (CalamityWorld.LegendaryMode)
NPC.localAI[0] += 2f;
if (expertMode)
NPC.localAI[0] += 1f - lifeRatio;
@@ -753,7 +753,7 @@ namespace CalamityMod.NPCs.BrimstoneElemental
int damage = NPC.GetProjectileDamage(type);
Projectile.NewProjectile(NPC.GetSource_FromAI(), source, laserVelocity2, type, damage, 0f, Main.myPlayer, 0f, NPC.whoAmI);
if (Main.getGoodWorld)
if (CalamityWorld.LegendaryMode)
Projectile.NewProjectile(NPC.GetSource_FromAI(), source, -laserVelocity2, type, damage, 0f, Main.myPlayer, 0f, NPC.whoAmI);
if (Main.zenithWorld)
@@ -794,7 +794,7 @@ namespace CalamityMod.NPCs.BrimstoneElemental
if (Main.netMode != NetmodeID.MultiplayerClient)
{
Projectile.NewProjectile(NPC.GetSource_FromAI(), source, laserVelocity, ModContent.ProjectileType<BrimstoneTargetRay>(), 0, 0f, Main.myPlayer, 0f, NPC.whoAmI);
if (Main.getGoodWorld)
if (CalamityWorld.LegendaryMode)
Projectile.NewProjectile(NPC.GetSource_FromAI(), source, -laserVelocity, ModContent.ProjectileType<BrimstoneTargetRay>(), 0, 0f, Main.myPlayer, 0f, NPC.whoAmI);
if (Main.zenithWorld)
@@ -816,7 +816,7 @@ namespace CalamityMod.NPCs.BrimstoneElemental
if (Main.netMode != NetmodeID.MultiplayerClient)
{
Projectile.NewProjectile(NPC.GetSource_FromAI(), source.X, source.Y, NPC.localAI[0], NPC.localAI[1], ModContent.ProjectileType<BrimstoneTargetRay>(), 0, 0f, Main.myPlayer, 1f, NPC.whoAmI);
if (Main.getGoodWorld)
if (CalamityWorld.LegendaryMode)
Projectile.NewProjectile(NPC.GetSource_FromAI(), source.X, source.Y, -NPC.localAI[0], -NPC.localAI[1], ModContent.ProjectileType<BrimstoneTargetRay>(), 0, 0f, Main.myPlayer, 1f, NPC.whoAmI);
if (Main.zenithWorld)
+4 -4
View File
@@ -127,7 +127,7 @@ namespace CalamityMod.NPCs.Bumblebirb
swarmerIdleTargetDist.Normalize();
swarmerIdleTargetDist *= swarmerIdleSpeed;
NPC.velocity = (NPC.velocity * 29f + swarmerIdleTargetDist) / 30f;
if (Main.getGoodWorld && !Main.zenithWorld)
if (CalamityWorld.LegendaryMode && !Main.zenithWorld)
NPC.velocity *= 1.15f;
}
else if (NPC.velocity.Length() > 2f)
@@ -175,7 +175,7 @@ namespace CalamityMod.NPCs.Bumblebirb
swarmerChargeTargetDist.Normalize();
swarmerChargeTargetDist *= swarmerChargeSpeed;
NPC.velocity = (NPC.velocity * (swarmerChargeVelMult - 1f) + swarmerChargeTargetDist) / swarmerChargeVelMult;
if (Main.getGoodWorld && !Main.zenithWorld)
if (CalamityWorld.LegendaryMode && !Main.zenithWorld)
NPC.velocity *= 1.15f;
NPC.ForceNetUpdate();
@@ -203,7 +203,7 @@ namespace CalamityMod.NPCs.Bumblebirb
swarmerDecelerateTargetDist.Normalize();
swarmerDecelerateTargetDist *= swarmerDecelerateSpeed;
NPC.velocity = (NPC.velocity * (swarmerDecelerateVelMult - 1f) + swarmerDecelerateTargetDist) / swarmerDecelerateVelMult;
if (Main.getGoodWorld && !Main.zenithWorld)
if (CalamityWorld.LegendaryMode && !Main.zenithWorld)
NPC.velocity *= 1.15f;
if (NPC.velocity.X < 0f)
@@ -220,7 +220,7 @@ namespace CalamityMod.NPCs.Bumblebirb
NPC.damage = NPC.defDamage;
NPC.velocity = swarmerDecelerateTargetDist;
if (Main.getGoodWorld && !Main.zenithWorld)
if (CalamityWorld.LegendaryMode && !Main.zenithWorld)
NPC.velocity *= 1.15f;
if (NPC.velocity.X < 0f)
+4 -4
View File
@@ -175,7 +175,7 @@ namespace CalamityMod.NPCs.Bumblebirb
if (NPC.localAI[2] > 0f || bossRush)
enrageScale += 1f;
if (Main.getGoodWorld)
if (CalamityWorld.LegendaryMode)
enrageScale += 0.5f;
if (enrageScale > 3f)
@@ -469,7 +469,7 @@ namespace CalamityMod.NPCs.Bumblebirb
bool spawnRight = player.velocity.X > 0f;
for (int i = 0; i < totalProjectiles; i++)
{
if (Main.getGoodWorld)
if (CalamityWorld.LegendaryMode)
{
if (i >= (int)(totalProjectiles * 0.125) && i <= (int)(totalProjectiles * 0.375))
{
@@ -536,13 +536,13 @@ namespace CalamityMod.NPCs.Bumblebirb
{
int totalProjectiles = phase2 ? 40 : 48;
if (Main.getGoodWorld)
if (CalamityWorld.LegendaryMode)
totalProjectiles *= 2;
float radians = MathHelper.TwoPi / totalProjectiles;
int distance = phase2 ? 1200 : 1320;
if (Main.getGoodWorld)
if (CalamityWorld.LegendaryMode)
distance *= 2;
bool spawnRight = player.velocity.X > 0f;
+2 -2
View File
@@ -398,7 +398,7 @@ namespace CalamityMod.NPCs.CalClone
baseVelocity += 1.5f * (1f - lifeRatio);
baseAcceleration += 0.03f * (1f - lifeRatio);
}
if (Main.getGoodWorld)
if (CalamityWorld.LegendaryMode)
{
baseVelocity *= 1.15f;
baseAcceleration *= 1.15f;
@@ -466,7 +466,7 @@ namespace CalamityMod.NPCs.CalClone
if (Main.zenithWorld)
type = ModContent.ProjectileType<SCalBrimstoneGigablast>();
float gigaBlastFrequency = (Main.getGoodWorld ? 120f : expertMode ? 180f : 240f) - enrageScale * 15f;
float gigaBlastFrequency = (CalamityWorld.LegendaryMode ? 120f : expertMode ? 180f : 240f) - enrageScale * 15f;
float projSpeed = bossRush ? 6.25f : 5f;
if (calamityGlobalNPC.newAI[3] <= 300f)
{
+2 -2
View File
@@ -233,7 +233,7 @@ namespace CalamityMod.NPCs.CalClone
calCloneBroProjAttackMaxSpeed += 2f * enrageScale;
calCloneBroProjAttackAccel += 0.06f * enrageScale;
if (Main.getGoodWorld)
if (CalamityWorld.LegendaryMode)
{
calCloneBroProjAttackMaxSpeed *= 1.15f;
calCloneBroProjAttackAccel *= 1.15f;
@@ -360,7 +360,7 @@ namespace CalamityMod.NPCs.CalClone
calCloneBroChargeSpeed += 2f;
if (revenge)
calCloneBroChargeSpeed += 2f;
if (Main.getGoodWorld)
if (CalamityWorld.LegendaryMode)
calCloneBroChargeSpeed *= 1.25f;
Vector2 calCloneBroChargeCenter = NPC.Center;
+2 -2
View File
@@ -227,7 +227,7 @@ namespace CalamityMod.NPCs.CalClone
calCloneBroProjAttackMaxSpeed += 2f * enrageScale;
calCloneBroProjAttackAccel += 0.1f * enrageScale;
if (Main.getGoodWorld)
if (CalamityWorld.LegendaryMode)
{
calCloneBroProjAttackMaxSpeed *= 1.15f;
calCloneBroProjAttackAccel *= 1.15f;
@@ -351,7 +351,7 @@ namespace CalamityMod.NPCs.CalClone
calCloneBroChargeSpeed += 2f;
if (revenge)
calCloneBroChargeSpeed += 2f;
if (Main.getGoodWorld)
if (CalamityWorld.LegendaryMode)
calCloneBroChargeSpeed *= 1.25f;
Vector2 calCloneBroChargeCenter = new Vector2(NPC.position.X + NPC.width * 0.5f, NPC.position.Y + NPC.height * 0.5f);
+6 -6
View File
@@ -154,7 +154,7 @@ namespace CalamityMod.NPCs.CeaselessVoid
if (phase4)
darkEnergyAmt += 1;
if (Main.getGoodWorld)
if (CalamityWorld.LegendaryMode)
darkEnergyAmt *= 2;
// Spawn a few Dark Energies as soon as the fight starts
@@ -222,7 +222,7 @@ namespace CalamityMod.NPCs.CeaselessVoid
float projectileFireRateMultiplier = MathHelper.Lerp(0.5f, 1.5f, 1f - ((tileEnrageMult - 1f) / 0.5f));
// Decides whether Ceaseless moves closer to its target or not
float distanceRequiredToMove = (Main.getGoodWorld || !anyDarkEnergies) ? 320f : bossRush ? 600f : 720f;
float distanceRequiredToMove = (CalamityWorld.LegendaryMode || !anyDarkEnergies) ? 320f : bossRush ? 600f : 720f;
bool move = Vector2.Distance(NPC.Center, player.Center) > distanceRequiredToMove || !Collision.CanHit(NPC.Center, 1, 1, player.Center, 1, 1);
// Succ attack
@@ -540,7 +540,7 @@ namespace CalamityMod.NPCs.CeaselessVoid
acceleration *= 2f;
}
if (Main.getGoodWorld)
if (CalamityWorld.LegendaryMode)
{
velocity *= 1.15f;
acceleration *= 1.15f;
@@ -550,8 +550,8 @@ namespace CalamityMod.NPCs.CeaselessVoid
// Move between 8 different positions around the player, in order
float maxDistance = 320f;
Vector2 moveToOffset = succ ? Vector2.Zero : Main.getGoodWorld ? new Vector2(0f, -maxDistance) : Vector2.Zero;
if (!succ && Main.getGoodWorld)
Vector2 moveToOffset = succ ? Vector2.Zero : CalamityWorld.LegendaryMode ? new Vector2(0f, -maxDistance) : Vector2.Zero;
if (!succ && CalamityWorld.LegendaryMode)
{
// Move to a new location every few seconds
calamityGlobalNPC.newAI[2] += 1f;
@@ -603,7 +603,7 @@ namespace CalamityMod.NPCs.CeaselessVoid
Vector2 distanceFromDestination = destination - NPC.Center;
// Movement
if (NPC.Distance(destination) > maxDistance || succ || !Main.getGoodWorld)
if (NPC.Distance(destination) > maxDistance || succ || !CalamityWorld.LegendaryMode)
CalamityUtils.SmoothMovement(NPC, 0f, distanceFromDestination, velocity, acceleration, true);
}
+1 -1
View File
@@ -982,7 +982,7 @@ namespace CalamityMod.NPCs.Crabulon
{
if (Main.netMode != NetmodeID.MultiplayerClient)
{
int crabShroomSpawnFreq = (int)(NPC.lifeMax * (CalamityWorld.LegendaryMode ? 0.01 : CalamityWorld.LegendaryMode ? 0.02 : 0.05));
int crabShroomSpawnFreq = (int)(NPC.lifeMax * (CalamityWorld.LegendaryMode ? 0.02 : 0.05));
if ((NPC.life + crabShroomSpawnFreq) < NPC.localAI[0])
{
NPC.localAI[0] = NPC.life;
+1 -1
View File
@@ -342,7 +342,7 @@ namespace CalamityMod.NPCs.NormalNPCs
chargeSpeed += 1f * enrageScale;
if (CalamityWorld.LegendaryMode)
chargeSpeed += phase1MaxChargeSpeedIncrease * ((1f - lifeRatio) / (1f - phase2LifeRatio));
if (Main.getGoodWorld)
if (CalamityWorld.LegendaryMode)
chargeSpeed += 1f;
NPC.velocity = (Main.player[NPC.target].Center - NPC.Center).SafeNormalize(Vector2.UnitY) * chargeSpeed;
+4 -4
View File
@@ -158,7 +158,7 @@ namespace CalamityMod.NPCs.NormalNPCs
swarmerIdleTargetDist.Normalize();
swarmerIdleTargetDist *= swarmerIdleSpeed;
NPC.velocity = (NPC.velocity * 29f + swarmerIdleTargetDist) / 30f;
if (Main.getGoodWorld && !Main.zenithWorld)
if (CalamityWorld.LegendaryMode && !Main.zenithWorld)
NPC.velocity *= 1.15f;
}
else if (NPC.velocity.Length() > 2f)
@@ -206,7 +206,7 @@ namespace CalamityMod.NPCs.NormalNPCs
swarmerChargeTargetDist.Normalize();
swarmerChargeTargetDist *= swarmerChargeSpeed;
NPC.velocity = (NPC.velocity * (swarmerChargeVelMult - 1f) + swarmerChargeTargetDist) / swarmerChargeVelMult;
if (Main.getGoodWorld && !Main.zenithWorld)
if (CalamityWorld.LegendaryMode && !Main.zenithWorld)
NPC.velocity *= 1.15f;
NPC.ForceNetUpdate();
@@ -234,7 +234,7 @@ namespace CalamityMod.NPCs.NormalNPCs
swarmerDecelerateTargetDist.Normalize();
swarmerDecelerateTargetDist *= swarmerDecelerateSpeed;
NPC.velocity = (NPC.velocity * (swarmerDecelerateVelMult - 1f) + swarmerDecelerateTargetDist) / swarmerDecelerateVelMult;
if (Main.getGoodWorld && !Main.zenithWorld)
if (CalamityWorld.LegendaryMode && !Main.zenithWorld)
NPC.velocity *= 1.15f;
if (NPC.velocity.X < 0f)
@@ -251,7 +251,7 @@ namespace CalamityMod.NPCs.NormalNPCs
NPC.damage = NPC.defDamage;
NPC.velocity = swarmerDecelerateTargetDist;
if (Main.getGoodWorld && !Main.zenithWorld)
if (CalamityWorld.LegendaryMode && !Main.zenithWorld)
NPC.velocity *= 1.15f;
if (NPC.velocity.X < 0f)
+9 -9
View File
@@ -199,7 +199,7 @@ namespace CalamityMod.NPCs.OldDuke
bool death = CalamityWorld.death || bossRush;
float exhaustionGateValue = 360f;
if (Main.getGoodWorld)
if (CalamityWorld.LegendaryMode)
exhaustionGateValue *= 0.5f;
float numberOfAttacksBeforeExhaustion = 12f;
@@ -931,7 +931,7 @@ namespace CalamityMod.NPCs.OldDuke
NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X + 900f), (int)(NPC.Center.Y - calamityGlobalNPC.newAI[2]), ModContent.NPCType<SulphurousSharkron>(), 0, 0f, 0f, NPC.whoAmI, 0f, 255);
NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X - 900f), (int)(NPC.Center.Y - calamityGlobalNPC.newAI[2]), ModContent.NPCType<SulphurousSharkron>(), 0, 0f, 0f, NPC.whoAmI, 0f, 255);
if (Main.getGoodWorld)
if (CalamityWorld.LegendaryMode)
{
NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X + 1800f), (int)(NPC.Center.Y - calamityGlobalNPC.newAI[2]), ModContent.NPCType<SulphurousSharkron>(), 0, 0f, 0f, NPC.whoAmI, 0f, 255);
NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X - 1800f), (int)(NPC.Center.Y - calamityGlobalNPC.newAI[2]), ModContent.NPCType<SulphurousSharkron>(), 0, 0f, 0f, NPC.whoAmI, 0f, 255);
@@ -978,7 +978,7 @@ namespace CalamityMod.NPCs.OldDuke
NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X + 50f + calamityGlobalNPC.newAI[2]), (int)(NPC.Center.Y + 540f), ModContent.NPCType<SulphurousSharkron>(), 0, 0f, 0f, 1f, -sharkronVelocity, 255);
NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X - 50f - calamityGlobalNPC.newAI[2]), (int)(NPC.Center.Y + 540f), ModContent.NPCType<SulphurousSharkron>(), 0, 0f, 0f, -1f, -sharkronVelocity, 255);
if (Main.getGoodWorld)
if (CalamityWorld.LegendaryMode)
{
NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X + 50f + calamityGlobalNPC.newAI[2] * 0.5f), (int)(NPC.Center.Y + 270f), ModContent.NPCType<SulphurousSharkron>(), 0, 0f, 0f, 1f, -sharkronVelocity, 255);
NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X - 50f - calamityGlobalNPC.newAI[2] * 0.5f), (int)(NPC.Center.Y + 270f), ModContent.NPCType<SulphurousSharkron>(), 0, 0f, 0f, -1f, -sharkronVelocity, 255);
@@ -1291,13 +1291,13 @@ namespace CalamityMod.NPCs.OldDuke
Vector2 phase2GoreDirection = NPC.rotation.ToRotationVector2() * (Vector2.UnitX * NPC.direction) * (NPC.width + 20) / 2f + NPC.Center;
int type = ModContent.ProjectileType<OldDukeGore>();
int damage = NPC.GetProjectileDamage(type);
int totalGore = Main.getGoodWorld ? 40 : 20;
int totalGore = CalamityWorld.LegendaryMode ? 40 : 20;
for (int i = 0; i < totalGore; i++)
{
float velocityX = NPC.direction * goreVelocityX * (Main.rand.NextFloat(0.2f, 0.8f) + 0.5f);
float velocityY = goreVelocityY * (Main.rand.NextFloat(0.2f, 0.8f) + 0.5f);
if (Main.getGoodWorld)
if (CalamityWorld.LegendaryMode)
{
velocityX *= Main.rand.NextFloat() + 0.5f;
velocityY *= Main.rand.NextFloat() + 0.5f;
@@ -1361,7 +1361,7 @@ namespace CalamityMod.NPCs.OldDuke
NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X + 50f + calamityGlobalNPC.newAI[2]), (int)(NPC.Center.Y - 540f), ModContent.NPCType<SulphurousSharkron>(), 0, 0f, 0f, 1f, sharkronVelocity, 255);
NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X - 50f - calamityGlobalNPC.newAI[2]), (int)(NPC.Center.Y - 540f), ModContent.NPCType<SulphurousSharkron>(), 0, 0f, 0f, -1f, sharkronVelocity, 255);
if (Main.getGoodWorld)
if (CalamityWorld.LegendaryMode)
{
NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X + 50f + calamityGlobalNPC.newAI[2] * 0.5f), (int)(NPC.Center.Y + 270f), ModContent.NPCType<SulphurousSharkron>(), 0, 0f, 0f, 1f, -sharkronVelocity, 255);
NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X - 50f - calamityGlobalNPC.newAI[2] * 0.5f), (int)(NPC.Center.Y + 270f), ModContent.NPCType<SulphurousSharkron>(), 0, 0f, 0f, -1f, -sharkronVelocity, 255);
@@ -1667,13 +1667,13 @@ namespace CalamityMod.NPCs.OldDuke
Vector2 phase3GoreDirection = NPC.rotation.ToRotationVector2() * (Vector2.UnitX * NPC.direction) * (NPC.width + 20) / 2f + NPC.Center;
int type = ModContent.ProjectileType<OldDukeGore>();
int damage = NPC.GetProjectileDamage(type);
int totalGore = Main.getGoodWorld ? 40 : 20;
int totalGore = CalamityWorld.LegendaryMode ? 40 : 20;
for (int i = 0; i < totalGore; i++)
{
float velocityX = NPC.direction * goreVelocityX * (Main.rand.NextFloat(0.2f, 0.8f) + 0.5f);
float velocityY = goreVelocityY * (Main.rand.NextFloat(0.2f, 0.8f) + 0.5f);
if (Main.getGoodWorld)
if (CalamityWorld.LegendaryMode)
{
velocityX *= Main.rand.NextFloat() + 0.5f;
velocityY *= Main.rand.NextFloat() + 0.5f;
@@ -1696,7 +1696,7 @@ namespace CalamityMod.NPCs.OldDuke
NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X + x), (int)(NPC.Center.Y - calamityGlobalNPC.newAI[2]), ModContent.NPCType<SulphurousSharkron>(), 0, 0f, 0f, NPC.whoAmI, 0f, 255);
NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X - x), (int)(NPC.Center.Y - calamityGlobalNPC.newAI[2]), ModContent.NPCType<SulphurousSharkron>(), 0, 0f, 0f, NPC.whoAmI, 0f, 255);
if (Main.getGoodWorld)
if (CalamityWorld.LegendaryMode)
{
NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X + x), (int)(NPC.Center.Y - calamityGlobalNPC.newAI[2] * 0.5f), ModContent.NPCType<SulphurousSharkron>(), 0, 0f, 0f, NPC.whoAmI, 0f, 255);
NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X - x), (int)(NPC.Center.Y - calamityGlobalNPC.newAI[2] * 0.5f), ModContent.NPCType<SulphurousSharkron>(), 0, 0f, 0f, NPC.whoAmI, 0f, 255);