Lemme just dump this
This commit is contained in:
1 parent
2e3d81101c
commit
cfb31699ac
26 files changed
+70
-107
No files matched your search
@@ -308,10 +308,10 @@ namespace CalamityMod.NPCs.AstrumAureus
|
||||
{
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
int totalProjectiles = CalamityWorld.LegendaryMode ? 36 : (3 + (int)((NPC.scale - 1f) * 3));
|
||||
int totalProjectiles = 3 + (int)((NPC.scale - 1f) * 3);
|
||||
double radians = MathHelper.TwoPi / totalProjectiles;
|
||||
int type = ModContent.ProjectileType<AstralLaser>();
|
||||
float velocity = CalamityWorld.LegendaryMode ? 10f : 6f;
|
||||
float velocity = 6f;
|
||||
double angleA = radians * 0.5;
|
||||
double angleB = MathHelper.ToRadians(90f) - angleA;
|
||||
float velocityX = (float)(velocity * Math.Sin(angleA) / Math.Sin(angleB));
|
||||
|
||||
@@ -188,7 +188,7 @@ namespace CalamityMod.NPCs.AstrumDeus
|
||||
// Become gradually more pissed as more worms are killed
|
||||
int gfbMaxWormCount = 10;
|
||||
int gfbWormCount = 0;
|
||||
if (CalamityWorld.MaliceMode)
|
||||
if (Main.zenithWorld)
|
||||
gfbWormCount = NPC.CountNPCS(ModContent.NPCType<AstrumDeusHead>());
|
||||
if (gfbWormCount > gfbMaxWormCount)
|
||||
gfbWormCount = gfbMaxWormCount;
|
||||
|
||||
@@ -222,7 +222,7 @@ namespace CalamityMod.NPCs.AstrumDeus
|
||||
// Become gradually more pissed as more worms are killed
|
||||
int gfbMaxWormCount = 10;
|
||||
int gfbWormCount = 0;
|
||||
if (CalamityWorld.MaliceMode)
|
||||
if (Main.zenithWorld)
|
||||
gfbWormCount = NPC.CountNPCS(ModContent.NPCType<AstrumDeusHead>());
|
||||
if (gfbWormCount > gfbMaxWormCount)
|
||||
gfbWormCount = gfbMaxWormCount;
|
||||
|
||||
@@ -167,7 +167,7 @@ namespace CalamityMod.NPCs.AstrumDeus
|
||||
// Become gradually more pissed as more worms are killed
|
||||
int gfbMaxWormCount = 10;
|
||||
int gfbWormCount = 0;
|
||||
if (CalamityWorld.MaliceMode)
|
||||
if (Main.zenithWorld)
|
||||
gfbWormCount = NPC.CountNPCS(ModContent.NPCType<AstrumDeusHead>());
|
||||
if (gfbWormCount > gfbMaxWormCount)
|
||||
gfbWormCount = gfbMaxWormCount;
|
||||
|
||||
+10
-10
@@ -1575,13 +1575,13 @@ namespace CalamityMod.NPCs
|
||||
else if (npc.type == NPCID.KingSlime)
|
||||
{
|
||||
if (CalamityWorld.death)
|
||||
npc.scale = CalamityWorld.LegendaryMode ? 6f : 2.5f;
|
||||
npc.scale = Main.getGoodWorld ? 6f : 2.5f;
|
||||
else
|
||||
npc.scale = CalamityWorld.LegendaryMode ? 3f : 1.5f;
|
||||
npc.scale = Main.getGoodWorld ? 3f : 1.5f;
|
||||
|
||||
npc.lifeMax = (int)Math.Round(npc.lifeMax * (CalamityWorld.LegendaryMode ? 1.8 : 1.5));
|
||||
npc.lifeMax = (int)Math.Round(npc.lifeMax * 1.5);
|
||||
}
|
||||
else if ((npc.type == NPCID.Wraith || npc.type == NPCID.Mimic || npc.type == NPCID.Reaper || npc.type == NPCID.PresentMimic || npc.type == NPCID.SandElemental || npc.type == NPCID.Ghost) && CalamityWorld.LegendaryMode)
|
||||
else if ((npc.type == NPCID.Wraith || npc.type == NPCID.Mimic || npc.type == NPCID.Reaper || npc.type == NPCID.PresentMimic || npc.type == NPCID.SandElemental || npc.type == NPCID.Ghost) && Main.getGoodWorld)
|
||||
{
|
||||
npc.knockBackResist = 0f;
|
||||
}
|
||||
@@ -5624,7 +5624,7 @@ namespace CalamityMod.NPCs
|
||||
case NPCID.CursedHammer:
|
||||
case NPCID.EnchantedSword:
|
||||
case NPCID.CrimsonAxe:
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
if (Main.getGoodWorld)
|
||||
npc.justHit = false;
|
||||
|
||||
break;
|
||||
@@ -5635,13 +5635,13 @@ namespace CalamityMod.NPCs
|
||||
case NPCID.IceTortoise:
|
||||
case NPCID.BlackRecluse:
|
||||
case NPCID.BlackRecluseWall:
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
if (Main.getGoodWorld)
|
||||
npc.justHit = false;
|
||||
|
||||
break;
|
||||
|
||||
case NPCID.Paladin:
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
if (Main.getGoodWorld)
|
||||
npc.justHit = false;
|
||||
|
||||
break;
|
||||
@@ -5649,7 +5649,7 @@ namespace CalamityMod.NPCs
|
||||
|
||||
if (npc.type == NPCType<Plagueshell>())
|
||||
{
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
if (Main.getGoodWorld)
|
||||
npc.justHit = false;
|
||||
}
|
||||
}
|
||||
@@ -6629,7 +6629,7 @@ namespace CalamityMod.NPCs
|
||||
if (npc.IsABestiaryIconDummy)
|
||||
return null;
|
||||
|
||||
if (Main.LocalPlayer.Calamity().trippy || (npc.type == NPCID.KingSlime && CalamityWorld.LegendaryMode))
|
||||
if (Main.LocalPlayer.Calamity().trippy || (npc.type == NPCID.KingSlime && Main.zenithWorld))
|
||||
return new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB, Main.DiscoR);
|
||||
|
||||
if (npc.type == NPCID.KingSlime && CalamityWorld.death)
|
||||
@@ -7389,7 +7389,7 @@ namespace CalamityMod.NPCs
|
||||
Color currentColor = npc.GetAlpha(drawColor);
|
||||
float opacity = (1f - Main.npc[NPC.crimsonBoss].life / (float)Main.npc[NPC.crimsonBoss].lifeMax) * 2f;
|
||||
opacity *= opacity;
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
if (Main.getGoodWorld)
|
||||
opacity = 1f;
|
||||
|
||||
opacity = MathHelper.Clamp(opacity, 0f, 1f);
|
||||
|
||||
@@ -34,11 +34,9 @@ namespace CalamityMod.NPCs.Crabulon
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
NPC.scale = 2f;
|
||||
|
||||
NPC.lifeMax = CalamityWorld.LegendaryMode ? 180 : 15;
|
||||
NPC.lifeMax = CalamityWorld.LegendaryMode ? 360 : 15;
|
||||
if (BossRushEvent.BossRushActive)
|
||||
NPC.lifeMax = 6000;
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
NPC.lifeMax *= 2;
|
||||
AIType = -1;
|
||||
NPC.knockBackResist = 0.5f;
|
||||
NPC.noGravity = true;
|
||||
|
||||
@@ -295,12 +295,6 @@ namespace CalamityMod.NPCs.DesertScourge
|
||||
}
|
||||
}
|
||||
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
{
|
||||
speed *= 1.5f;
|
||||
turnSpeed *= 1.5f;
|
||||
}
|
||||
|
||||
Vector2 npcCenter = NPC.Center;
|
||||
float playerX = Main.player[NPC.target].Center.X;
|
||||
float targettingPosition = Main.player[NPC.target].Center.Y;
|
||||
|
||||
@@ -333,12 +333,6 @@ namespace CalamityMod.NPCs.DesertScourge
|
||||
}
|
||||
}
|
||||
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
{
|
||||
speed *= 1.5f;
|
||||
turnSpeed *= 1.5f;
|
||||
}
|
||||
|
||||
Vector2 npcCenter = NPC.Center;
|
||||
float playerX = Main.player[NPC.target].Center.X;
|
||||
float targettingPosition = Main.player[NPC.target].Center.Y;
|
||||
|
||||
@@ -1178,7 +1178,7 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo
|
||||
NPC.ForceNetUpdate();
|
||||
|
||||
// Plasma bolts on charge
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient && (!(Main.zenithWorld && !exoMechdusa) || (CalamityWorld.LegendaryMode)))
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient && !(Main.zenithWorld && !exoMechdusa))
|
||||
{
|
||||
int totalProjectiles = death ? 12 : 8;
|
||||
float radians = MathHelper.TwoPi / totalProjectiles;
|
||||
|
||||
@@ -889,7 +889,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
|
||||
else
|
||||
{
|
||||
// Enrage if the target is more than the deathray length away
|
||||
if ((distanceFromTarget > DeathrayEnrageDistance || (CalamityWorld.LegendaryMode)) && EnragedState == (float)Enraged.No)
|
||||
if ((distanceFromTarget > DeathrayEnrageDistance || CalamityWorld.LegendaryMode) && EnragedState == (float)Enraged.No)
|
||||
{
|
||||
// Play enrage sound
|
||||
if (Main.LocalPlayer.active && !Main.LocalPlayer.dead && Vector2.Distance(Main.LocalPlayer.Center, NPC.Center) < soundDistance)
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace CalamityMod.NPCs.HiveMind
|
||||
NPC.width = 30; //324
|
||||
NPC.height = 30; //216
|
||||
NPC.defense = 0;
|
||||
NPC.lifeMax = CalamityWorld.LegendaryMode ? 10 : 1000;
|
||||
NPC.lifeMax = Main.zenithWorld ? 10 : 1000;
|
||||
NPC.knockBackResist = 0f;
|
||||
NPC.chaseable = false;
|
||||
NPC.HitSound = SoundID.NPCHit1;
|
||||
@@ -131,7 +131,7 @@ namespace CalamityMod.NPCs.HiveMind
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Demonite, hit.HitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient && (!NPC.AnyNPCs(ModContent.NPCType<HiveMind>()) || CalamityWorld.LegendaryMode))
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient && (!NPC.AnyNPCs(ModContent.NPCType<HiveMind>()) || Main.zenithWorld))
|
||||
{
|
||||
Vector2 spawnAt = NPC.Bottom;
|
||||
NPC.NewNPC(NPC.GetSource_Death(), (int)spawnAt.X, (int)spawnAt.Y, ModContent.NPCType<HiveMind>());
|
||||
|
||||
@@ -190,8 +190,6 @@ namespace CalamityMod.NPCs.Leviathan
|
||||
bubbleVelocity += 4f * enrageScale;
|
||||
if (!leviAlive)
|
||||
bubbleVelocity += 2f * (1f - lifeRatio);
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
bubbleVelocity *= 1.15f;
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
bubbleVelocity *= 2f;
|
||||
|
||||
|
||||
@@ -409,7 +409,7 @@ namespace CalamityMod.NPCs.Leviathan
|
||||
|
||||
if (Main.zenithWorld)
|
||||
{
|
||||
type = CalamityWorld.LegendaryMode ? ProjectileID.BouncyBoulder : ProjectileID.Boulder;
|
||||
type = Main.rand.NextBool() ? ProjectileID.BouncyBoulder : ProjectileID.Boulder;
|
||||
leviCenter.Y -= 5; //Shoot a bit more up since boulders are affected by gravity
|
||||
}
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ namespace CalamityMod.NPCs.NormalNPCs
|
||||
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
if (Main.getGoodWorld)
|
||||
{
|
||||
if (Main.rand.NextBool(5))
|
||||
NPC.reflectsProjectiles = true;
|
||||
@@ -129,7 +129,7 @@ namespace CalamityMod.NPCs.NormalNPCs
|
||||
Vector2 idealVelocity = NPC.SafeDirectionTo(Main.player[NPC.target].Center) * (death ? 7f : 5.5f);
|
||||
float acceleration = death ? 0.14f : 0.105f;
|
||||
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
if (Main.getGoodWorld)
|
||||
{
|
||||
idealVelocity *= 1.2f;
|
||||
acceleration *= 1.4f;
|
||||
|
||||
@@ -539,8 +539,8 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath
|
||||
if (calamityGlobalNPC.newAI[0] > 90f)
|
||||
NPC.velocity *= 1.01f;
|
||||
|
||||
// Spawn honey in legendary rev+
|
||||
if (CalamityWorld.LegendaryMode && calamityGlobalNPC.newAI[0] % 6f == 0f)
|
||||
// Spawn honey in the stupid seed
|
||||
if (Main.zenithWorld && calamityGlobalNPC.newAI[0] % 6f == 0f)
|
||||
{
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
|
||||
@@ -152,7 +152,7 @@ namespace CalamityMod.NPCs.Polterghast
|
||||
NPC.ai[2] += 1f;
|
||||
if (NPC.ai[3] == 0f)
|
||||
{
|
||||
if (NPC.ai[2] > ((CalamityWorld.LegendaryMode) ? 12f : 120f))
|
||||
if (NPC.ai[2] > (CalamityWorld.LegendaryMode ? 12f : 120f))
|
||||
{
|
||||
NPC.ai[2] = 0f;
|
||||
NPC.ai[3] = 1f;
|
||||
|
||||
@@ -369,8 +369,6 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
// Charge variables
|
||||
float chargeVelocityMult = 0.25f;
|
||||
float maxChargeVelocity = death ? 28f : revenge ? 26f : expertMode ? 24f : 20f;
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
maxChargeVelocity *= 1.15f;
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
maxChargeVelocity *= 2f;
|
||||
|
||||
|
||||
@@ -486,8 +486,6 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
// Charge variables
|
||||
float chargeVelocityMult = 0.1f;
|
||||
float maxChargeVelocity = enraged ? 12f : death ? 10f : revenge ? 9f : expertMode ? 8f : 6f;
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
maxChargeVelocity *= 1.15f;
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
maxChargeVelocity *= 2f;
|
||||
|
||||
|
||||
@@ -572,9 +572,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
float totalInertiaAdjustmentDistance = maxInertiaDistance - minInertiaDistance;
|
||||
float distanceFromInertiaAdjustmentCutoff = distanceFromFlyDestination - minInertiaDistance;
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
maxInertia *= 0.8f;
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
maxInertia *= Main.rand.NextFloat(0.2f, 1f);
|
||||
maxInertia *= Main.rand.NextFloat(0.16f, 0.8f);
|
||||
|
||||
float inertia = distanceFromFlyDestination >= maxInertiaDistance ? maxInertia :
|
||||
distanceFromFlyDestination <= minInertiaDistance ? minInertia :
|
||||
|
||||
@@ -86,7 +86,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
// Phase 2
|
||||
if (npc.ai[0] < 0f)
|
||||
{
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
if (Main.getGoodWorld)
|
||||
NPC.brainOfGravity = npc.whoAmI;
|
||||
|
||||
// Spawn gore
|
||||
@@ -216,7 +216,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
float velocityScale = death ? 6f : 4.5f;
|
||||
float velocityBoost = velocityScale * (1f - lifeRatio);
|
||||
float nonChargeSpeed = (death ? 25.5f : 18f) + velocityBoost;
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
if (Main.getGoodWorld)
|
||||
nonChargeSpeed *= 1.15f;
|
||||
|
||||
float minInertia = death ? 50f : 75f;
|
||||
@@ -270,7 +270,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
|
||||
// Velocity
|
||||
npc.velocity = (Main.player[npc.target].Center + (death ? Main.player[npc.target].velocity * 10f : Vector2.Zero) - npc.Center).SafeNormalize(Vector2.UnitY) * chargeVelocity;
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
if (Main.getGoodWorld)
|
||||
npc.velocity *= 1.15f;
|
||||
}
|
||||
}
|
||||
@@ -287,7 +287,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
{
|
||||
SoundEngine.PlaySound(SoundID.ForceRoar, npc.Center);
|
||||
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
if (Main.zenithWorld)
|
||||
{
|
||||
if (!Main.dedServ)
|
||||
{
|
||||
@@ -315,7 +315,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
npc.velocity = (Main.player[npc.target].Center - npc.Center).SafeNormalize(Vector2.UnitY) * -chargeVelocity;
|
||||
if (death)
|
||||
npc.velocity *= 1.5f;
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
if (Main.getGoodWorld)
|
||||
npc.velocity *= 1.15f;
|
||||
}
|
||||
}
|
||||
@@ -705,7 +705,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
float targetYDistPhase1 = Main.player[npc.target].Center.Y - brainCenterPhase1.Y;
|
||||
float targetDistancePhase1 = (float)Math.Sqrt(targetXDistPhase1 * targetXDistPhase1 + targetYDistPhase1 * targetYDistPhase1);
|
||||
float maxMoveVelocity = (death ? 4f : 1.5f) + velocityScale;
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
if (Main.getGoodWorld)
|
||||
maxMoveVelocity *= 2f;
|
||||
|
||||
if (targetDistancePhase1 < maxMoveVelocity)
|
||||
@@ -959,7 +959,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
Vector2 destination = Main.player[npc.target].Center + (death ? Main.player[npc.target].velocity * 20f : Vector2.Zero);
|
||||
Vector2 targetDirection = destination - npc.Center;
|
||||
targetDirection = targetDirection.SafeNormalize(Vector2.UnitY);
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
if (Main.getGoodWorld)
|
||||
{
|
||||
targetDirection *= chargeVelocity + 6f;
|
||||
npc.velocity = (npc.velocity * 49f + targetDirection) / 50f;
|
||||
@@ -1013,7 +1013,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
|
||||
public static int GetBrainOfCthuluCreepersCountRevDeath()
|
||||
{
|
||||
return CalamityWorld.LegendaryMode ? 40 : (CalamityWorld.death || BossRushEvent.BossRushActive) ? 30 : 20;
|
||||
return Main.getGoodWorld ? 40 : (CalamityWorld.death || BossRushEvent.BossRushActive) ? 30 : 20;
|
||||
}
|
||||
|
||||
private static float GetCrimsonBossKnockBack(NPC npc, int numPlayers, float lifeScale, float baseKnockBackResist)
|
||||
|
||||
@@ -27,13 +27,13 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
bool death = CalamityWorld.death || BossRushEvent.BossRushActive;
|
||||
|
||||
// Causes it to split far more in death mode
|
||||
if ((((npc.ai[2] % 2f == 0f && npc.type == NPCID.EaterofWorldsBody) || npc.type == NPCID.EaterofWorldsHead) && death) || CalamityWorld.LegendaryMode)
|
||||
if ((((npc.ai[2] % 2f == 0f && npc.type == NPCID.EaterofWorldsBody) || npc.type == NPCID.EaterofWorldsHead) && death) || Main.getGoodWorld)
|
||||
{
|
||||
calamityGlobalNPC.DR = 0.5f;
|
||||
npc.defense = npc.defDefense * 2;
|
||||
}
|
||||
|
||||
if (CalamityWorld.LegendaryMode && npc.type == NPCID.EaterofWorldsHead)
|
||||
if (Main.getGoodWorld && npc.type == NPCID.EaterofWorldsHead)
|
||||
npc.reflectsProjectiles = true;
|
||||
|
||||
// Get a target
|
||||
@@ -76,7 +76,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
npc.localAI[1] -= 1f;
|
||||
|
||||
int vileSpitGateValue = (int)MathHelper.Lerp(death ? 45f : 90f, 900f, lifeRatio);
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
if (Main.getGoodWorld)
|
||||
vileSpitGateValue = (int)(vileSpitGateValue * 0.5f);
|
||||
|
||||
Vector2 vileSpitShootLocation = npc.Center + npc.velocity;
|
||||
@@ -378,7 +378,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
segmentAcceleration += (npc.justHit ? 0.16f : 0.04f);
|
||||
}
|
||||
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
if (Main.getGoodWorld)
|
||||
{
|
||||
segmentVelocity += 4f;
|
||||
segmentAcceleration += 0.05f;
|
||||
@@ -415,7 +415,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
int npcWidth = npc.width;
|
||||
npcWidth = (int)(npcWidth * npc.scale);
|
||||
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
if (Main.getGoodWorld)
|
||||
npcWidth = 62;
|
||||
|
||||
targetDistance = (targetDistance - npcWidth) / targetDistance;
|
||||
@@ -707,7 +707,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
|
||||
public static int GetEaterOfWorldsSegmentsCountRevDeath()
|
||||
{
|
||||
return CalamityWorld.LegendaryMode ? 100 : (CalamityWorld.death || BossRushEvent.BossRushActive) ? 57 : 62;
|
||||
return Main.getGoodWorld ? 100 : (CalamityWorld.death || BossRushEvent.BossRushActive) ? 57 : 62;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -130,7 +130,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
float hoverSpeed = death ? 9.5f + 7f * (1f - lifeRatio) : 7f;
|
||||
float hoverAcceleration = death ? 0.2f + 0.15f * (1f - lifeRatio) : 0.15f;
|
||||
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
if (Main.getGoodWorld)
|
||||
{
|
||||
hoverSpeed += 3f;
|
||||
hoverAcceleration += 0.08f;
|
||||
@@ -159,7 +159,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
npc.ai[3] += 1f;
|
||||
|
||||
float servantSpawnGateValue = death ? 10f : 40f;
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
if (Main.getGoodWorld)
|
||||
servantSpawnGateValue *= 0.8f;
|
||||
|
||||
if (npc.ai[3] >= servantSpawnGateValue && shootProjectile)
|
||||
@@ -207,7 +207,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
float chargeSpeed = (death ? 10.5f : 8f) + npc.ai[3] * additionalVelocityPerCharge;
|
||||
if (death)
|
||||
chargeSpeed += 10f * (1f - lifeRatio);
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
if (Main.getGoodWorld)
|
||||
chargeSpeed += 4f;
|
||||
|
||||
npc.velocity = npc.SafeDirectionTo(Main.player[npc.target].Center) * chargeSpeed;
|
||||
@@ -218,7 +218,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
else if (npc.ai[1] == 2f)
|
||||
{
|
||||
int chargeDelay = death ? (75 - (int)Math.Round(30f * (1f - lifeRatio))) : 95;
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
if (Main.getGoodWorld)
|
||||
chargeDelay -= 30;
|
||||
|
||||
float slowDownGateValue = chargeDelay * (death ? 0.85f : 0.65f);
|
||||
@@ -231,7 +231,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
decelerationScalar = 0f;
|
||||
|
||||
npc.velocity *= (MathHelper.Lerp(death ? 0.76f : 0.92f, death ? 0.88f : 0.96f, decelerationScalar));
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
if (Main.getGoodWorld)
|
||||
npc.velocity *= 0.99f;
|
||||
|
||||
if (npc.velocity.X > -0.1 && npc.velocity.X < 0.1)
|
||||
@@ -273,7 +273,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
|
||||
else if (npc.ai[0] == 1f || npc.ai[0] == 2f)
|
||||
{
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
if (Main.getGoodWorld)
|
||||
npc.reflectsProjectiles = true;
|
||||
|
||||
if (npc.ai[0] == 1f)
|
||||
@@ -292,13 +292,13 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
npc.rotation += npc.ai[2];
|
||||
|
||||
float phaseChangeRate = death ? 2f : 1f;
|
||||
float servantSpawnGateValue = CalamityWorld.LegendaryMode ? 4f : 20f;
|
||||
float servantSpawnGateValue = Main.getGoodWorld ? 4f : 20f;
|
||||
npc.ai[1] += phaseChangeRate;
|
||||
if (npc.ai[1] % servantSpawnGateValue == 0f)
|
||||
{
|
||||
float servantVelocity = death ? 11.3f : 5.65f;
|
||||
Vector2 servantSpawnVelocity = Main.rand.NextVector2CircularEdge(servantVelocity, servantVelocity);
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
if (Main.getGoodWorld)
|
||||
servantSpawnVelocity *= 3f;
|
||||
|
||||
Vector2 servantSpawnCenter = npc.Center + servantSpawnVelocity.SafeNormalize(Vector2.UnitY) * ProjectileOffset;
|
||||
@@ -310,21 +310,6 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
|
||||
if (Main.dedServ && servantSpawn < Main.maxNPCs)
|
||||
NetMessage.SendData(MessageID.SyncNPC, -1, -1, null, servantSpawn);
|
||||
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
{
|
||||
int type = ProjectileID.BloodNautilusShot;
|
||||
Vector2 projectileVelocity = Main.rand.NextVector2CircularEdge(15f, 15f);
|
||||
int numProj = 3;
|
||||
int spread = 20;
|
||||
float rotation = MathHelper.ToRadians(spread);
|
||||
for (int i = 0; i < numProj; i++)
|
||||
{
|
||||
Vector2 perturbedSpeed = projectileVelocity.RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (float)(numProj - 1)));
|
||||
int proj = Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center + perturbedSpeed.SafeNormalize(Vector2.UnitY) * ProjectileOffset, perturbedSpeed, type, 15, 0f, Main.myPlayer);
|
||||
Main.projectile[proj].timeLeft = 600;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (int n = 0; n < 10; n++)
|
||||
@@ -402,7 +387,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
}
|
||||
}
|
||||
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
if (Main.getGoodWorld)
|
||||
{
|
||||
hoverSpeed += 1f;
|
||||
hoverAcceleration += 0.1f;
|
||||
@@ -458,7 +443,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
chargeSpeed *= 1.15f;
|
||||
if (npc.ai[3] == 2f)
|
||||
chargeSpeed *= 1.3f;
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
if (Main.getGoodWorld)
|
||||
chargeSpeed *= 1.2f;
|
||||
|
||||
npc.velocity = npc.SafeDirectionTo(Main.player[npc.target].Center) * chargeSpeed;
|
||||
@@ -688,14 +673,14 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
if (Main.dedServ && eye < Main.maxNPCs)
|
||||
NetMessage.SendData(MessageID.SyncNPC, -1, -1, null, eye);
|
||||
}
|
||||
else if (!CalamityWorld.LegendaryMode)
|
||||
else if (!Main.getGoodWorld)
|
||||
{
|
||||
int projType = ProjectileID.BloodNautilusShot;
|
||||
int proj = Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center + servantSpawnVelocity.SafeNormalize(Vector2.UnitY) * ProjectileOffset, servantSpawnVelocity * 2f, projType, BloodShotDamage, 0f, Main.myPlayer);
|
||||
Main.projectile[proj].timeLeft = 600;
|
||||
}
|
||||
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
if (Main.getGoodWorld)
|
||||
{
|
||||
int type = ProjectileID.BloodNautilusShot;
|
||||
Vector2 projectileVelocity = servantSpawnVelocity * 3f;
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
bool teleported = false;
|
||||
npc.aiAction = 0;
|
||||
float teleportScaleSpeed = 2f;
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
if (Main.getGoodWorld)
|
||||
{
|
||||
teleportScaleSpeed -= 1f - lifeRatio;
|
||||
teleportScale *= teleportScaleSpeed;
|
||||
@@ -319,7 +319,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
npc.ai[0] += teleportRate;
|
||||
teleportScale = MathHelper.Clamp((60f - npc.ai[0]) / 60f, 0f, 1f);
|
||||
teleportScale = 0.5f + teleportScale * 0.5f;
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
if (Main.getGoodWorld)
|
||||
teleportScale *= teleportScaleSpeed;
|
||||
|
||||
if (npc.ai[0] >= 60f)
|
||||
@@ -401,7 +401,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
npc.ai[0] += teleportRate;
|
||||
teleportScale = MathHelper.Clamp(npc.ai[0] / 30f, 0f, 1f);
|
||||
teleportScale = 0.5f + teleportScale * 0.5f;
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
if (Main.getGoodWorld)
|
||||
teleportScale *= teleportScaleSpeed;
|
||||
|
||||
if (npc.ai[0] >= 30f && Main.netMode != NetmodeID.MultiplayerClient)
|
||||
@@ -513,7 +513,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
float jumpVelocityLimit = redCrystalAlive ? 3f : 4.5f;
|
||||
if (death)
|
||||
jumpVelocityLimit += 3f;
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
if (Main.getGoodWorld)
|
||||
jumpVelocityLimit = 8f;
|
||||
|
||||
if ((npc.direction == 1 && npc.velocity.X < jumpVelocityLimit) || (npc.direction == -1 && npc.velocity.X > -jumpVelocityLimit))
|
||||
@@ -551,12 +551,12 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
return false;
|
||||
|
||||
// Adjust size based on HP
|
||||
float maxScale = CalamityWorld.LegendaryMode ? 3f : death ? 2.5f : 1.5f;
|
||||
float maxScale = Main.getGoodWorld ? 3f : death ? 2.5f : 1.5f;
|
||||
float minScale = death ? 0.5f : 0.75f;
|
||||
float maxScaledValue = maxScale - minScale;
|
||||
|
||||
// Inversed scale in FTW
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
if (Main.getGoodWorld)
|
||||
lifeRatio = (maxScaledValue - lifeRatio * maxScaledValue) + minScale;
|
||||
else
|
||||
lifeRatio = lifeRatio * maxScaledValue + minScale;
|
||||
@@ -639,7 +639,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
if (Main.rand.NextBool(100))
|
||||
npcType = NPCID.Pinky;
|
||||
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
if (Main.zenithWorld)
|
||||
npcType = NPCID.RainbowSlime;
|
||||
|
||||
int offset = 16;
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
public override void AI()
|
||||
{
|
||||
Projectile.ai[1] += 1f;
|
||||
if (Projectile.ai[1] > (CalamityWorld.LegendaryMode ? 600f : 900f))
|
||||
if (Projectile.ai[1] > (Main.getGoodWorld ? 600f : 900f))
|
||||
{
|
||||
Projectile.localAI[0] += 10f;
|
||||
}
|
||||
@@ -57,7 +57,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
Projectile.rotation += Projectile.velocity.X * 0.02f;
|
||||
Projectile.rotation += Projectile.direction * 0.002f;
|
||||
|
||||
if (Projectile.velocity.Length() > (CalamityWorld.LegendaryMode ? 2f : 0.5f))
|
||||
if (Projectile.velocity.Length() > (Main.getGoodWorld ? 2f : 0.5f))
|
||||
Projectile.velocity *= 0.985f;
|
||||
|
||||
if (Projectile.timeLeft <= 40)
|
||||
@@ -99,7 +99,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
if (info.Damage <= 0)
|
||||
return;
|
||||
|
||||
if (Projectile.ai[1] <= (CalamityWorld.LegendaryMode ? 600f : 900f) && Projectile.ai[1] > 120f)
|
||||
if (Projectile.ai[1] <= (Main.getGoodWorld ? 600f : 900f) && Projectile.ai[1] > 120f)
|
||||
target.AddBuff(BuffID.Poisoned, 240);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
public override void AI()
|
||||
{
|
||||
Projectile.ai[1] += 1f;
|
||||
if (Projectile.ai[1] > (CalamityWorld.LegendaryMode ? 600f : 900f))
|
||||
if (Projectile.ai[1] > (Main.getGoodWorld ? 600f : 900f))
|
||||
{
|
||||
Projectile.localAI[0] += 10f;
|
||||
Projectile.damage = 0;
|
||||
@@ -68,17 +68,17 @@ namespace CalamityMod.Projectiles.Boss
|
||||
Projectile.rotation += Projectile.velocity.X * 0.02f;
|
||||
Projectile.rotation += Projectile.direction * 0.002f;
|
||||
|
||||
if (Projectile.velocity.Length() > (CalamityWorld.LegendaryMode ? 4f : 2f))
|
||||
if (Projectile.velocity.Length() > (Main.getGoodWorld ? 4f : 2f))
|
||||
Projectile.velocity *= 0.985f;
|
||||
}
|
||||
|
||||
public override bool CanHitPlayer(Player target) => Projectile.ai[1] <= (CalamityWorld.LegendaryMode ? 600f : 900f) && Projectile.ai[1] > 120f;
|
||||
public override bool CanHitPlayer(Player target) => Projectile.ai[1] <= (Main.getGoodWorld ? 600f : 900f) && Projectile.ai[1] > 120f;
|
||||
|
||||
public override Color? GetAlpha(Color lightColor)
|
||||
{
|
||||
if (Projectile.ai[1] > (CalamityWorld.LegendaryMode ? 600f : 900f))
|
||||
if (Projectile.ai[1] > (Main.getGoodWorld ? 600f : 900f))
|
||||
{
|
||||
byte b2 = (byte)((26f - (Projectile.ai[1] - (CalamityWorld.LegendaryMode ? 600f : 900f))) * 10f);
|
||||
byte b2 = (byte)((26f - (Projectile.ai[1] - (Main.getGoodWorld ? 600f : 900f))) * 10f);
|
||||
byte a2 = (byte)(Projectile.alpha * (b2 / 255f));
|
||||
return new Color(b2, b2, b2, a2);
|
||||
}
|
||||
@@ -111,7 +111,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
if (info.Damage <= 0)
|
||||
return;
|
||||
|
||||
if (Projectile.ai[1] <= (CalamityWorld.LegendaryMode ? 600f : 900f) && Projectile.ai[1] > 120f)
|
||||
if (Projectile.ai[1] <= (Main.getGoodWorld ? 600f : 900f) && Projectile.ai[1] > 120f)
|
||||
target.AddBuff(BuffID.Poisoned, 480);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2166,7 +2166,7 @@ namespace CalamityMod.Projectiles
|
||||
if (projectile.velocity.Y > 16f)
|
||||
projectile.velocity.Y = 16f;
|
||||
|
||||
if (CalamityWorld.LegendaryMode && projectile.velocity.Length() > 4f)
|
||||
if (Main.getGoodWorld && projectile.velocity.Length() > 4f)
|
||||
projectile.velocity *= 0.985f;
|
||||
|
||||
return false;
|
||||
|
||||
Reference in new issue
Block a user