The public shall no longer suffer through Oblivion
Also Skeletron Prime no longer spawns Probes, and fixed him not spinning on the first spin attack
This commit is contained in:
1 parent
6146d72cdf
commit
3c83fb6fa4
16 files changed
+126
-1599
No files matched your search
@@ -1031,7 +1031,6 @@ namespace CalamityMod
|
||||
NPCID.Retinazer,
|
||||
NPCID.Spazmatism,
|
||||
NPCID.SkeletronPrime,
|
||||
NPCType<SkeletronPrime2>(),
|
||||
NPCID.PrimeCannon,
|
||||
NPCID.PrimeSaw,
|
||||
NPCID.PrimeLaser,
|
||||
@@ -2160,7 +2159,6 @@ namespace CalamityMod
|
||||
SkeletronPrimeIDs = new List<int>
|
||||
{
|
||||
NPCID.SkeletronPrime,
|
||||
NPCType<SkeletronPrime2>(),
|
||||
NPCID.PrimeCannon,
|
||||
NPCID.PrimeLaser,
|
||||
NPCID.PrimeSaw,
|
||||
@@ -2565,7 +2563,6 @@ namespace CalamityMod
|
||||
{ NPCID.Probe, 5000 },
|
||||
|
||||
{ NPCID.SkeletronPrime, 160000 }, // 30 seconds
|
||||
{ NPCType<SkeletronPrime2>(), 160000 },
|
||||
{ NPCID.PrimeVice, 54000 },
|
||||
{ NPCID.PrimeCannon, 45000 },
|
||||
{ NPCID.PrimeSaw, 45000 },
|
||||
|
||||
@@ -129,10 +129,6 @@ namespace CalamityMod
|
||||
public static Asset<Texture2D> WallOfFleshEyeGlowmask;
|
||||
public static Asset<Texture2D> WallOfFleshDemonSickleTexture;
|
||||
|
||||
// Master Rev+ Skeletron Prime
|
||||
public static Asset<Texture2D> ChadPrime;
|
||||
public static Asset<Texture2D> ChadPrimeEyeGlowmask;
|
||||
|
||||
// DR data structure
|
||||
public static SortedDictionary<int, float> DRValues;
|
||||
|
||||
@@ -343,10 +339,6 @@ namespace CalamityMod
|
||||
WallOfFleshEyeGlowmask = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/VanillaBossGlowmasks/WallOfFleshEyeTelegraphGlow", AssetRequestMode.AsyncLoad);
|
||||
WallOfFleshDemonSickleTexture = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Melee/ForbiddenOathbladeProjectile", AssetRequestMode.AsyncLoad);
|
||||
|
||||
// Master Rev+ Skeletron Prime textures
|
||||
ChadPrime = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/ChadPrime", AssetRequestMode.AsyncLoad);
|
||||
ChadPrimeEyeGlowmask = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/ChadPrimeHeadGlow", AssetRequestMode.AsyncLoad);
|
||||
|
||||
// TODO -- Sky shaders should probably be loaded in a ModSystem
|
||||
Filters.Scene["CalamityMod:DevourerofGodsHead"] = new Filter(new DoGScreenShaderData("FilterMiniTower").UseColor(0.4f, 0.1f, 1.0f).UseOpacity(0.5f), EffectPriority.VeryHigh);
|
||||
SkyManager.Instance["CalamityMod:DevourerofGodsHead"] = new DoGSky();
|
||||
|
||||
@@ -213,7 +213,6 @@ namespace CalamityMod
|
||||
{ ModContent.NPCType<BrimstoneElemental>(), 0.8 },
|
||||
|
||||
{ NPCID.SkeletronPrime, 0.85 },
|
||||
{ ModContent.NPCType<SkeletronPrime2>(), 0.85 },
|
||||
{ NPCID.PrimeCannon, 0.85 },
|
||||
{ NPCID.PrimeLaser, 0.85 },
|
||||
{ NPCID.PrimeSaw, 0.85 },
|
||||
@@ -416,12 +415,6 @@ namespace CalamityMod
|
||||
102, // 204 while spinning
|
||||
119, // 238 while spinning
|
||||
153 } }, // 306 while spinning
|
||||
{ ModContent.NPCType<SkeletronPrime2>(), new int[] {
|
||||
50, // 100 while spinning
|
||||
85, // 170 while spinning
|
||||
102, // 204 while spinning
|
||||
119, // 238 while spinning
|
||||
153 } }, // 306 while spinning
|
||||
{ NPCID.PrimeVice, new int[] { 70, 102, 136, 170, 255 } },
|
||||
{ NPCID.PrimeSaw, new int[] { 70, 102, 136, 170, 255 } },
|
||||
{ NPCID.PrimeCannon, new int[] { 30, 51, 68, 85, 102 } },
|
||||
@@ -663,9 +656,6 @@ namespace CalamityMod
|
||||
{ new Tuple<int, int>(NPCID.SkeletronPrime, ProjectileID.Skull), new int[] { 50, 108, 124, 140, 210 } },
|
||||
{ new Tuple<int, int>(NPCID.SkeletronPrime, ProjectileID.DeathLaser), new int[] { 50, 108, 124, 140, 210 } },
|
||||
{ new Tuple<int, int>(NPCID.SkeletronPrime, ProjectileID.RocketSkeleton), new int[] { 60, 120, 148, 176, 264 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<SkeletronPrime2>(), ProjectileID.Skull), new int[] { 50, 108, 124, 140, 210 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<SkeletronPrime2>(), ProjectileID.BombSkeletronPrime), new int[] { 80, 160, 180, 200, 300 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<SkeletronPrime2>(), ProjectileID.FrostBeam), new int[] { 50, 108, 124, 140, 210 } },
|
||||
{ new Tuple<int, int>(NPCID.PrimeCannon, ProjectileID.RocketSkeleton), new int[] { 60, 120, 148, 176, 264 } },
|
||||
{ new Tuple<int, int>(NPCID.PrimeCannon, ProjectileID.BombSkeletronPrime), new int[] { 80, 160, 0, 0, 300 } },
|
||||
{ new Tuple<int, int>(NPCID.PrimeLaser, ProjectileID.DeathLaser), new int[] { 50, 108, 124, 140, 210 } },
|
||||
|
||||
@@ -217,7 +217,7 @@ namespace CalamityMod.Events
|
||||
|
||||
new Boss(ModContent.NPCType<BrimstoneElemental>(), TimeChangeContext.Day, permittedNPCs: ModContent.NPCType<Brimling>()),
|
||||
|
||||
new Boss(NPCID.SkeletronPrime, TimeChangeContext.Night, permittedNPCs: new int[] { ModContent.NPCType<SkeletronPrime2>(), NPCID.PrimeCannon, NPCID.PrimeSaw, NPCID.PrimeVice, NPCID.PrimeLaser, NPCID.Probe }),
|
||||
new Boss(NPCID.SkeletronPrime, TimeChangeContext.Night, permittedNPCs: new int[] { NPCID.PrimeCannon, NPCID.PrimeSaw, NPCID.PrimeVice, NPCID.PrimeLaser, NPCID.Probe }),
|
||||
|
||||
new Boss(ModContent.NPCType<CalamitasClone>(), TimeChangeContext.Night, dimnessFactor: 0.6f, permittedNPCs: new int[] { ModContent.NPCType<Cataclysm>(), ModContent.NPCType<Catastrophe>(),
|
||||
ModContent.NPCType<SoulSeeker>() }),
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 6.5 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 588 B |
@@ -316,10 +316,10 @@ CalamityClientConfig: {
|
||||
'''
|
||||
}
|
||||
|
||||
VCMMStatusMessage: {
|
||||
Label: "[i:MusicBoxMartians] VCMM Status Message"
|
||||
Tooltip: Enable or disable the status message promoting the Vanilla Calamity Music Mod that plays on world entry.
|
||||
}
|
||||
VCMMStatusMessage: {
|
||||
Label: "[i:MusicBoxMartians] VCMM Status Message"
|
||||
Tooltip: Enable or disable the status message promoting the Vanilla Calamity Music Mod that plays on world entry.
|
||||
}
|
||||
|
||||
WikiStatusMessage: {
|
||||
Label: "[i:Book] Wiki Status Message"
|
||||
|
||||
@@ -185,7 +185,6 @@ Rotdog.DisplayName: Rotdog
|
||||
ScornEater.DisplayName: Scorn Eater
|
||||
SeaUrchin.DisplayName: Sea Urchin
|
||||
ShockstormShuttle.DisplayName: Shockstorm Shuttle
|
||||
SkeletronPrime2.DisplayName: Skeletron Prime
|
||||
Stormlion.DisplayName: Stormlion
|
||||
Sunskater.DisplayName: Sunskater
|
||||
SuperDummyNPC.DisplayName: Super Dummy
|
||||
|
||||
+41
-104
@@ -1414,10 +1414,9 @@ namespace CalamityMod.NPCs
|
||||
|
||||
npc.scale *= Main.zenithWorld ? 2f : CalamityWorld.death ? 1.4f : 1.2f;
|
||||
}
|
||||
else if (npc.type == NPCID.SkeletronPrime || npc.type == ModContent.NPCType<SkeletronPrime2>())
|
||||
else if (npc.type == NPCID.SkeletronPrime)
|
||||
{
|
||||
// HP boosted in Master Mode due to having two heads (piercing can make them die faster than normal here since they share an HP bar)
|
||||
npc.lifeMax = (int)Math.Round(npc.lifeMax * (Main.masterMode ? 1.7 : 1.2));
|
||||
npc.lifeMax = (int)Math.Round(npc.lifeMax * 1.2);
|
||||
npc.npcSlots = 12f;
|
||||
}
|
||||
else if (npc.type <= NPCID.PrimeLaser && npc.type >= NPCID.PrimeCannon)
|
||||
@@ -5728,26 +5727,6 @@ namespace CalamityMod.NPCs
|
||||
#region Check Dead
|
||||
public override bool CheckDead(NPC npc)
|
||||
{
|
||||
if (npc.type == NPCID.SkeletronPrime)
|
||||
{
|
||||
if ((Main.masterMode || BossRushEvent.BossRushActive) && CalamityWorld.revenge)
|
||||
{
|
||||
// Kill the other head if he's still alive when this head dies
|
||||
for (int i = 0; i < Main.maxNPCs; i++)
|
||||
{
|
||||
NPC nPC = Main.npc[i];
|
||||
if (nPC.active && nPC.type == ModContent.NPCType<SkeletronPrime2>() && nPC.life > 0)
|
||||
{
|
||||
nPC.life = 0;
|
||||
nPC.HitEffect();
|
||||
nPC.checkDead();
|
||||
nPC.active = false;
|
||||
nPC.netUpdate = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (npc.lifeMax > 1000 && npc.type != NPCID.DungeonSpirit &&
|
||||
npc.type != NPCType<PhantomSpirit>() &&
|
||||
npc.type != NPCType<PhantomSpiritS>() &&
|
||||
@@ -6306,11 +6285,11 @@ namespace CalamityMod.NPCs
|
||||
#region Drawing
|
||||
public override void FindFrame(NPC npc, int frameHeight)
|
||||
{
|
||||
if (CalamityWorld.revenge || BossRushEvent.BossRushActive)
|
||||
/*if (CalamityWorld.revenge || BossRushEvent.BossRushActive)
|
||||
{
|
||||
if (npc.type == NPCID.SkeletronPrime || npc.type == ModContent.NPCType<SkeletronPrime2>())
|
||||
if (npc.type == NPCID.SkeletronPrime)
|
||||
npc.frameCounter = 0D;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
// Debuff visuals. Alphabetical order as per usual, please
|
||||
@@ -6710,8 +6689,43 @@ namespace CalamityMod.NPCs
|
||||
|
||||
if (CalamityWorld.revenge || BossRushEvent.BossRushActive)
|
||||
{
|
||||
if (npc.type == NPCID.SkeletronPrime || npc.type == ModContent.NPCType<SkeletronPrime2>() || CalamityLists.DestroyerIDs.Contains(npc.type))
|
||||
if (CalamityLists.DestroyerIDs.Contains(npc.type))
|
||||
return false;
|
||||
|
||||
// Allows correct frames to draw in Rev+ phases
|
||||
// GFB can rot for all I care
|
||||
if (npc.type == NPCID.SkeletronPrime && !NPC.IsMechQueenUp)
|
||||
{
|
||||
int frameHeight = TextureAssets.Npc[npc.type].Value.Height / Main.npcFrameCount[npc.type];
|
||||
if (npc.ai[1] == 0f || npc.ai[1] == 4f)
|
||||
{
|
||||
newAI[2] += 1f;
|
||||
if (newAI[2] >= 12f)
|
||||
{
|
||||
newAI[2] = 0f;
|
||||
newAI[3] += frameHeight;
|
||||
|
||||
if (newAI[3] / frameHeight >= 2f)
|
||||
newAI[3] = 0f;
|
||||
}
|
||||
}
|
||||
|
||||
// Spinning probe spawn or fly over phase
|
||||
else if (npc.ai[1] == 5f || npc.ai[1] == 6f)
|
||||
{
|
||||
newAI[2] = 0f;
|
||||
newAI[3] = frameHeight;
|
||||
}
|
||||
|
||||
// Spinning phase
|
||||
else
|
||||
{
|
||||
newAI[2] = 0f;
|
||||
newAI[3] = frameHeight * 2;
|
||||
}
|
||||
|
||||
npc.frame.Y = (int)newAI[3];
|
||||
}
|
||||
}
|
||||
|
||||
if (npc.type == NPCID.GolemHeadFree)
|
||||
@@ -7448,83 +7462,6 @@ namespace CalamityMod.NPCs
|
||||
}
|
||||
}
|
||||
|
||||
// His afterimages I can't get to work, so fuck it
|
||||
else if (npc.type == NPCID.SkeletronPrime || npc.type == ModContent.NPCType<SkeletronPrime2>())
|
||||
{
|
||||
Texture2D npcTexture = (masterMode && revenge && npc.type == NPCID.SkeletronPrime) ? CalamityMod.ChadPrime.Value : TextureAssets.Npc[npc.type].Value;
|
||||
int frameHeight = npcTexture.Height / Main.npcFrameCount[npc.type];
|
||||
|
||||
npc.frame.Y = (int)newAI[3];
|
||||
|
||||
// Mechdusa drawing
|
||||
if (NPC.IsMechQueenUp)
|
||||
{
|
||||
if (npc.ai[1] == 0f || npc.ai[1] == 4f)
|
||||
{
|
||||
newAI[2] += 1f;
|
||||
if (newAI[2] >= 12f)
|
||||
{
|
||||
newAI[2] = 0f;
|
||||
newAI[3] += frameHeight;
|
||||
if (newAI[3] / frameHeight >= 5)
|
||||
newAI[3] = frameHeight * 3;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
newAI[2] = 0f;
|
||||
newAI[3] = frameHeight * 5;
|
||||
}
|
||||
}
|
||||
|
||||
// Floating phase
|
||||
else if (npc.ai[1] == 0f || npc.ai[1] == 4f)
|
||||
{
|
||||
newAI[2] += 1f;
|
||||
if (newAI[2] >= 12f)
|
||||
{
|
||||
newAI[2] = 0f;
|
||||
newAI[3] += frameHeight;
|
||||
|
||||
if (newAI[3] / frameHeight >= 2f)
|
||||
newAI[3] = 0f;
|
||||
}
|
||||
}
|
||||
|
||||
// Spinning probe spawn or fly over phase
|
||||
else if (npc.ai[1] == 5f || npc.ai[1] == 6f)
|
||||
{
|
||||
newAI[2] = 0f;
|
||||
newAI[3] = frameHeight;
|
||||
}
|
||||
|
||||
// Spinning phase
|
||||
else
|
||||
{
|
||||
newAI[2] = 0f;
|
||||
newAI[3] = frameHeight * 2;
|
||||
}
|
||||
|
||||
npc.frame.Y = (int)newAI[3];
|
||||
|
||||
SpriteEffects spriteEffects = SpriteEffects.None;
|
||||
if (npc.spriteDirection == 1)
|
||||
spriteEffects = SpriteEffects.FlipHorizontally;
|
||||
|
||||
spriteBatch.Draw(npcTexture, npc.Center - screenPos + new Vector2(0, npc.gfxOffY), npc.frame, npc.GetAlpha(drawColor), npc.rotation, npc.frame.Size() / 2, npc.scale, spriteEffects, 0f);
|
||||
|
||||
Color eyesColor = new Color(200, 200, 200, 0);
|
||||
if (masterMode && revenge)
|
||||
{
|
||||
int alpha = 192;
|
||||
eyesColor = npc.type == NPCType<SkeletronPrime2>() ? new Color(150, 100, 255, alpha) : new Color(255, 255, 0, alpha);
|
||||
Texture2D glowTexture = npc.type == NPCID.SkeletronPrime ? CalamityMod.ChadPrimeEyeGlowmask.Value : SkeletronPrime2.EyeTexture.Value;
|
||||
spriteBatch.Draw(glowTexture, npc.Center - screenPos + new Vector2(0, npc.gfxOffY), npc.frame, eyesColor, npc.rotation, npc.frame.Size() / 2, npc.scale, spriteEffects, 0f);
|
||||
}
|
||||
else
|
||||
spriteBatch.Draw(TextureAssets.BoneEyes.Value, npc.Center - screenPos + new Vector2(0, npc.gfxOffY), npc.frame, eyesColor, npc.rotation, npc.frame.Size() / 2, npc.scale, spriteEffects, 0f);
|
||||
}
|
||||
|
||||
else if (npc.type == NPCID.Plantera)
|
||||
{
|
||||
// Percent life remaining
|
||||
|
||||
@@ -1,910 +0,0 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
using CalamityMod.DataStructures;
|
||||
using CalamityMod.Events;
|
||||
using CalamityMod.World;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.GameContent.Bestiary;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.NPCs.NormalNPCs
|
||||
{
|
||||
public class SkeletronPrime2 : ModNPC
|
||||
{
|
||||
public override string BossHeadTexture => $"Terraria/Images/NPC_Head_Boss_18";
|
||||
|
||||
public static Asset<Texture2D> EyeTexture;
|
||||
|
||||
public const int BombTimeLeft = 600;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.npcFrameCount[NPC.type] = 6;
|
||||
NPCID.Sets.NPCBestiaryDrawModifiers bestiaryData = new NPCID.Sets.NPCBestiaryDrawModifiers() { Hide = true };
|
||||
NPCID.Sets.NPCBestiaryDrawOffset.Add(Type, bestiaryData);
|
||||
if (!Main.dedServ)
|
||||
{
|
||||
EyeTexture = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/SkeletronPrime2HeadGlow");
|
||||
}
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
NPC.Calamity().canBreakPlayerDefense = true;
|
||||
NPC.aiStyle = NPCAIStyleID.SkeletronPrimeHead;
|
||||
NPC.GetNPCDamage();
|
||||
NPC.DR_NERD(0.2f);
|
||||
|
||||
NPC.width = 80;
|
||||
NPC.height = 102;
|
||||
if (Main.tenthAnniversaryWorld)
|
||||
NPC.scale *= 0.5f;
|
||||
if (Main.getGoodWorld)
|
||||
NPC.scale *= 1.1f;
|
||||
|
||||
NPC.defense = 24;
|
||||
|
||||
NPC.lifeMax = 28000;
|
||||
double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01;
|
||||
NPC.lifeMax += (int)(NPC.lifeMax * HPBoost);
|
||||
|
||||
NPC.knockBackResist = 0f;
|
||||
NPC.noGravity = true;
|
||||
NPC.noTileCollide = true;
|
||||
NPC.boss = true;
|
||||
NPC.value = 200000f;
|
||||
NPC.HitSound = SoundID.NPCHit4;
|
||||
NPC.DeathSound = SoundID.NPCDeath14;
|
||||
NPC.Calamity().VulnerableToElectricity = true;
|
||||
NPC.Calamity().VulnerableToSickness = false;
|
||||
AnimationType = NPCID.SkeletronPrime;
|
||||
Music = MusicID.Boss3;
|
||||
}
|
||||
|
||||
public override void SendExtraAI(BinaryWriter writer)
|
||||
{
|
||||
writer.Write(NPC.localAI[0]);
|
||||
writer.Write(NPC.localAI[1]);
|
||||
writer.Write(NPC.localAI[2]);
|
||||
writer.Write(NPC.localAI[3]);
|
||||
for (int i = 0; i < 4; i++)
|
||||
writer.Write(NPC.Calamity().newAI[i]);
|
||||
}
|
||||
|
||||
public override void ReceiveExtraAI(BinaryReader reader)
|
||||
{
|
||||
NPC.localAI[0] = reader.ReadSingle();
|
||||
NPC.localAI[1] = reader.ReadSingle();
|
||||
NPC.localAI[2] = reader.ReadSingle();
|
||||
NPC.localAI[3] = reader.ReadSingle();
|
||||
for (int i = 0; i < 4; i++)
|
||||
NPC.Calamity().newAI[i] = reader.ReadSingle();
|
||||
}
|
||||
|
||||
public override void BossHeadRotation(ref float rotation)
|
||||
{
|
||||
rotation = (NPC.ai[1] == 1f || NPC.ai[1] == 2f) ? NPC.rotation : 0f;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
CalamityGlobalNPC calamityGlobalNPC = NPC.Calamity();
|
||||
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
|
||||
// Percent life remaining
|
||||
float lifeRatio = NPC.life / (float)NPC.lifeMax;
|
||||
|
||||
// Spawn arms
|
||||
if (calamityGlobalNPC.newAI[1] == 0f)
|
||||
{
|
||||
calamityGlobalNPC.newAI[1] = 1f;
|
||||
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
// This head owns the Cannon and the Vice in Master Mode
|
||||
int arm = NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.Center.X, (int)NPC.Center.Y, NPCID.PrimeCannon, NPC.whoAmI);
|
||||
Main.npc[arm].ai[0] = -1f;
|
||||
Main.npc[arm].ai[1] = NPC.whoAmI;
|
||||
Main.npc[arm].target = NPC.target;
|
||||
Main.npc[arm].netUpdate = true;
|
||||
|
||||
arm = NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.Center.X, (int)NPC.Center.Y, NPCID.PrimeVice, NPC.whoAmI);
|
||||
Main.npc[arm].ai[0] = -1f;
|
||||
Main.npc[arm].ai[1] = NPC.whoAmI;
|
||||
Main.npc[arm].target = NPC.target;
|
||||
Main.npc[arm].ai[3] = 150f;
|
||||
Main.npc[arm].netUpdate = true;
|
||||
}
|
||||
|
||||
NPC.SyncExtraAI();
|
||||
}
|
||||
|
||||
if (!Main.npc[(int)NPC.ai[0]].active || Main.npc[(int)NPC.ai[0]].aiStyle != NPCAIStyleID.SkeletronPrimeHead)
|
||||
{
|
||||
NPC.life = 0;
|
||||
NPC.HitEffect();
|
||||
NPC.active = false;
|
||||
NPC.netUpdate = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Link the HP of both heads
|
||||
if (NPC.life > Main.npc[(int)NPC.ai[0]].life)
|
||||
NPC.life = Main.npc[(int)NPC.ai[0]].life;
|
||||
|
||||
// Push away from the lead head if too close, pull closer if too far, if Mechdusa isn't real
|
||||
if (!NPC.IsMechQueenUp)
|
||||
{
|
||||
float pushVelocity = 0.25f;
|
||||
if (Vector2.Distance(NPC.Center, Main.npc[(int)NPC.ai[0]].Center) < 80f * NPC.scale)
|
||||
{
|
||||
if (NPC.position.X < Main.npc[(int)NPC.ai[0]].position.X)
|
||||
NPC.velocity.X -= pushVelocity;
|
||||
else
|
||||
NPC.velocity.X += pushVelocity;
|
||||
|
||||
if (NPC.position.Y < Main.npc[(int)NPC.ai[0]].position.Y)
|
||||
NPC.velocity.Y -= pushVelocity;
|
||||
else
|
||||
NPC.velocity.Y += pushVelocity;
|
||||
}
|
||||
else if (Vector2.Distance(NPC.Center, Main.npc[(int)NPC.ai[0]].Center) > 240f * NPC.scale)
|
||||
{
|
||||
if (NPC.position.X < Main.npc[(int)NPC.ai[0]].position.X)
|
||||
NPC.velocity.X += pushVelocity;
|
||||
else
|
||||
NPC.velocity.X -= pushVelocity;
|
||||
|
||||
if (NPC.position.Y < Main.npc[(int)NPC.ai[0]].position.Y)
|
||||
NPC.velocity.Y += pushVelocity;
|
||||
else
|
||||
NPC.velocity.Y -= pushVelocity;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Check if arms are alive
|
||||
bool cannonAlive = false;
|
||||
bool laserAlive = false;
|
||||
bool viceAlive = false;
|
||||
bool sawAlive = false;
|
||||
if (CalamityGlobalNPC.primeCannon != -1)
|
||||
{
|
||||
if (Main.npc[CalamityGlobalNPC.primeCannon].active)
|
||||
cannonAlive = true;
|
||||
}
|
||||
if (CalamityGlobalNPC.primeLaser != -1)
|
||||
{
|
||||
if (Main.npc[CalamityGlobalNPC.primeLaser].active)
|
||||
laserAlive = true;
|
||||
}
|
||||
if (CalamityGlobalNPC.primeVice != -1)
|
||||
{
|
||||
if (Main.npc[CalamityGlobalNPC.primeVice].active)
|
||||
viceAlive = true;
|
||||
}
|
||||
if (CalamityGlobalNPC.primeSaw != -1)
|
||||
{
|
||||
if (Main.npc[CalamityGlobalNPC.primeSaw].active)
|
||||
sawAlive = true;
|
||||
}
|
||||
bool allArmsDead = !cannonAlive && !laserAlive && !viceAlive && !sawAlive;
|
||||
NPC.chaseable = allArmsDead;
|
||||
|
||||
NPC.defense = NPC.defDefense;
|
||||
|
||||
// Phases
|
||||
bool phase2 = lifeRatio < 0.66f;
|
||||
bool phase3 = lifeRatio < 0.33f;
|
||||
bool spawnSpazmatism = lifeRatio < 0.5f && !bossRush && NPC.localAI[2] == 0f;
|
||||
|
||||
// Spawn Spazmatism in Master Mode (just like Oblivion from Avalon)
|
||||
if (spawnSpazmatism)
|
||||
{
|
||||
Player spazmatismSpawnPlayer = Main.player[Player.FindClosest(NPC.position, NPC.width, NPC.height)];
|
||||
SoundEngine.PlaySound(SoundID.Roar, spazmatismSpawnPlayer.Center);
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
NPC.SpawnOnPlayer(spazmatismSpawnPlayer.whoAmI, NPCID.Spazmatism);
|
||||
|
||||
NPC.localAI[2] = 1f;
|
||||
NPC.SyncVanillaLocalAI();
|
||||
}
|
||||
|
||||
// Despawn
|
||||
if (Main.npc[(int)NPC.ai[0]].ai[1] == 3f)
|
||||
NPC.ai[1] = 3f;
|
||||
|
||||
// Activate daytime enrage
|
||||
if (Main.IsItDay() && !bossRush && NPC.ai[1] != 3f && NPC.ai[1] != 2f)
|
||||
{
|
||||
// Heal
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
int healAmt = NPC.life - 300;
|
||||
if (healAmt < 0)
|
||||
{
|
||||
int absHeal = Math.Abs(healAmt);
|
||||
NPC.life += absHeal;
|
||||
NPC.HealEffect(absHeal, true);
|
||||
NPC.netUpdate = true;
|
||||
}
|
||||
}
|
||||
|
||||
NPC.ai[1] = 2f;
|
||||
SoundEngine.PlaySound(SoundID.ForceRoar, NPC.Center);
|
||||
}
|
||||
|
||||
// Adjust slowing debuff immunity
|
||||
bool immuneToSlowingDebuffs = NPC.ai[1] == 5f;
|
||||
NPC.buffImmune[ModContent.BuffType<GlacialState>()] = immuneToSlowingDebuffs;
|
||||
NPC.buffImmune[ModContent.BuffType<TemporalSadness>()] = immuneToSlowingDebuffs;
|
||||
NPC.buffImmune[ModContent.BuffType<Eutrophication>()] = immuneToSlowingDebuffs;
|
||||
NPC.buffImmune[ModContent.BuffType<TimeDistortion>()] = immuneToSlowingDebuffs;
|
||||
NPC.buffImmune[ModContent.BuffType<GalvanicCorrosion>()] = immuneToSlowingDebuffs;
|
||||
NPC.buffImmune[ModContent.BuffType<Vaporfied>()] = immuneToSlowingDebuffs;
|
||||
NPC.buffImmune[BuffID.Slow] = immuneToSlowingDebuffs;
|
||||
NPC.buffImmune[BuffID.Webbed] = immuneToSlowingDebuffs;
|
||||
|
||||
bool normalLaserRotation = NPC.localAI[1] % 2f == 0f;
|
||||
|
||||
// Prevents cheap hits
|
||||
bool canUseAttackInMaster = NPC.position.Y < Main.player[Main.npc[(int)NPC.ai[0]].target].position.Y - 350f;
|
||||
|
||||
// Float near player
|
||||
if (NPC.ai[1] == 0f || NPC.ai[1] == 4f)
|
||||
{
|
||||
// Avoid unfair bullshit
|
||||
NPC.damage = 0;
|
||||
|
||||
// Start other phases; if arms are dead, start with spin phase
|
||||
bool otherHeadChargingOrSpinning = Main.npc[(int)NPC.ai[0]].ai[1] == 5f || Main.npc[(int)NPC.ai[0]].ai[1] == 1f;
|
||||
|
||||
// Start spin phase after 1.875 seconds
|
||||
NPC.ai[2] += phase3 ? 1.2f : 0.8f;
|
||||
if (NPC.ai[2] >= (90f - (death ? 15f * (1f - lifeRatio) : 0f)) && (!otherHeadChargingOrSpinning || phase3) && canUseAttackInMaster)
|
||||
{
|
||||
bool shouldSpinAround = NPC.ai[1] == 4f && NPC.position.Y < Main.player[Main.npc[(int)NPC.ai[0]].target].position.Y - 400f &&
|
||||
Vector2.Distance(Main.player[Main.npc[(int)NPC.ai[0]].target].Center, NPC.Center) < 600f && Vector2.Distance(Main.player[Main.npc[(int)NPC.ai[0]].target].Center, NPC.Center) > 400f;
|
||||
|
||||
bool shouldCharge = !phase2 && !allArmsDead && !CalamityWorld.LegendaryMode;
|
||||
if (shouldCharge)
|
||||
{
|
||||
NPC.ai[2] = 0f;
|
||||
NPC.ai[1] = 1f;
|
||||
NPC.netUpdate = true;
|
||||
}
|
||||
else if (shouldSpinAround || NPC.ai[1] != 4f)
|
||||
{
|
||||
if (shouldSpinAround)
|
||||
{
|
||||
NPC.localAI[3] = 300f;
|
||||
NPC.SyncVanillaLocalAI();
|
||||
}
|
||||
|
||||
NPC.ai[2] = 0f;
|
||||
NPC.ai[1] = shouldSpinAround ? 5f : 1f;
|
||||
NPC.netUpdate = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (NPC.IsMechQueenUp)
|
||||
NPC.rotation = NPC.rotation.AngleLerp(NPC.velocity.X / 15f * 0.5f, 0.75f);
|
||||
else
|
||||
NPC.rotation = NPC.velocity.X / 15f;
|
||||
|
||||
float acceleration = (bossRush ? 0.2f : 0.125f) + (death ? 0.05f * (1f - lifeRatio) : 0f);
|
||||
float accelerationMult = 1f;
|
||||
if (!cannonAlive)
|
||||
{
|
||||
acceleration += 0.025f;
|
||||
accelerationMult += 0.5f;
|
||||
}
|
||||
if (!laserAlive)
|
||||
{
|
||||
acceleration += 0.025f;
|
||||
accelerationMult += 0.5f;
|
||||
}
|
||||
if (!viceAlive)
|
||||
acceleration += 0.025f;
|
||||
if (!sawAlive)
|
||||
acceleration += 0.025f;
|
||||
acceleration *= accelerationMult;
|
||||
|
||||
float topVelocity = acceleration * 100f;
|
||||
float deceleration = 0.7f;
|
||||
|
||||
float headDecelerationUpDist = 0f;
|
||||
float headDecelerationDownDist = 0f;
|
||||
float headDecelerationHorizontalDist = 0f;
|
||||
int headHorizontalDirection = ((!(Main.player[Main.npc[(int)NPC.ai[0]].target].Center.X < NPC.Center.X)) ? 1 : (-1));
|
||||
if (NPC.IsMechQueenUp)
|
||||
{
|
||||
headDecelerationHorizontalDist = -150f * (float)headHorizontalDirection;
|
||||
headDecelerationUpDist = 50f;
|
||||
headDecelerationDownDist = 50f;
|
||||
}
|
||||
|
||||
if (NPC.position.Y > Main.player[Main.npc[(int)NPC.ai[0]].target].position.Y - (400f + headDecelerationUpDist))
|
||||
{
|
||||
if (NPC.velocity.Y > 0f)
|
||||
NPC.velocity.Y *= deceleration;
|
||||
|
||||
NPC.velocity.Y -= acceleration;
|
||||
|
||||
if (NPC.velocity.Y > topVelocity)
|
||||
NPC.velocity.Y = topVelocity;
|
||||
}
|
||||
else if (NPC.position.Y < Main.player[Main.npc[(int)NPC.ai[0]].target].position.Y - (450f + headDecelerationDownDist))
|
||||
{
|
||||
if (NPC.velocity.Y < 0f)
|
||||
NPC.velocity.Y *= deceleration;
|
||||
|
||||
NPC.velocity.Y += acceleration;
|
||||
|
||||
if (NPC.velocity.Y < -topVelocity)
|
||||
NPC.velocity.Y = -topVelocity;
|
||||
}
|
||||
|
||||
if (NPC.Center.X > Main.player[Main.npc[(int)NPC.ai[0]].target].Center.X + (400f + headDecelerationHorizontalDist))
|
||||
{
|
||||
if (NPC.velocity.X > 0f)
|
||||
NPC.velocity.X *= deceleration;
|
||||
|
||||
NPC.velocity.X -= acceleration;
|
||||
|
||||
if (NPC.velocity.X > topVelocity)
|
||||
NPC.velocity.X = topVelocity;
|
||||
}
|
||||
if (NPC.Center.X < Main.player[Main.npc[(int)NPC.ai[0]].target].Center.X - (400f + headDecelerationHorizontalDist))
|
||||
{
|
||||
if (NPC.velocity.X < 0f)
|
||||
NPC.velocity.X *= deceleration;
|
||||
|
||||
NPC.velocity.X += acceleration;
|
||||
|
||||
if (NPC.velocity.X < -topVelocity)
|
||||
NPC.velocity.X = -topVelocity;
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
// Spinning
|
||||
if (NPC.ai[1] == 1f)
|
||||
{
|
||||
NPC.defense *= 2;
|
||||
NPC.damage = NPC.defDamage * 2;
|
||||
|
||||
calamityGlobalNPC.CurrentlyIncreasingDefenseOrDR = true;
|
||||
|
||||
if (phase2 && Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
NPC.localAI[0] += 1f;
|
||||
if (NPC.localAI[0] >= 60f)
|
||||
{
|
||||
NPC.localAI[0] = 0f;
|
||||
|
||||
int totalProjectiles = bossRush ? 20 : death ? 12 : 10;
|
||||
float radians = MathHelper.TwoPi / totalProjectiles;
|
||||
int type = ProjectileID.FrostBeam;
|
||||
int damage = NPC.GetProjectileDamage(type);
|
||||
|
||||
// Reduce mech boss projectile damage depending on the new ore progression changes
|
||||
if (CalamityServerConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive)
|
||||
{
|
||||
double firstMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Expert;
|
||||
double secondMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Expert;
|
||||
if (!NPC.downedMechBossAny)
|
||||
damage = (int)(damage * firstMechMultiplier);
|
||||
else if ((!NPC.downedMechBoss1 && !NPC.downedMechBoss2) || (!NPC.downedMechBoss2 && !NPC.downedMechBoss3) || (!NPC.downedMechBoss3 && !NPC.downedMechBoss1))
|
||||
damage = (int)(damage * secondMechMultiplier);
|
||||
}
|
||||
|
||||
float velocity = 4.5f;
|
||||
double angleA = radians * 0.5;
|
||||
double angleB = MathHelper.ToRadians(90f) - angleA;
|
||||
float velocityX = (float)(velocity * Math.Sin(angleA) / Math.Sin(angleB));
|
||||
Vector2 spinningPoint = normalLaserRotation ? new Vector2(0f, -velocity) : new Vector2(-velocityX, -velocity);
|
||||
for (int k = 0; k < totalProjectiles; k++)
|
||||
{
|
||||
Vector2 laserFireDirection = spinningPoint.RotatedBy(radians * k);
|
||||
int proj = Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + laserFireDirection.SafeNormalize(Vector2.UnitY) * 140f, laserFireDirection, type, damage, 0f, Main.myPlayer, 1f, 0f);
|
||||
Main.projectile[proj].timeLeft = 600;
|
||||
}
|
||||
NPC.localAI[1] += 1f;
|
||||
}
|
||||
}
|
||||
|
||||
NPC.ai[2] += 1f;
|
||||
if (NPC.ai[2] == 2f)
|
||||
SoundEngine.PlaySound(SoundID.ForceRoar, NPC.Center);
|
||||
|
||||
// Spin for 3 seconds then return to floating phase
|
||||
float phaseTimer = 240f;
|
||||
if (phase2 && !phase3)
|
||||
phaseTimer += 60f;
|
||||
|
||||
if (NPC.ai[2] >= (phaseTimer - (death ? 60f * (1f - lifeRatio) : 0f)))
|
||||
{
|
||||
NPC.ai[2] = 0f;
|
||||
NPC.ai[1] = 4f;
|
||||
NPC.localAI[0] = 0f;
|
||||
}
|
||||
|
||||
if (NPC.IsMechQueenUp)
|
||||
NPC.rotation = NPC.rotation.AngleLerp(NPC.velocity.X / 15f * 0.5f, 0.75f);
|
||||
else
|
||||
NPC.rotation += NPC.direction * 0.3f;
|
||||
|
||||
Vector2 headPosition = NPC.Center;
|
||||
float headTargetX = Main.player[Main.npc[(int)NPC.ai[0]].target].Center.X - headPosition.X;
|
||||
float headTargetY = Main.player[Main.npc[(int)NPC.ai[0]].target].Center.Y - headPosition.Y;
|
||||
float headTargetDistance = (float)Math.Sqrt(headTargetX * headTargetX + headTargetY * headTargetY);
|
||||
|
||||
float speed = bossRush ? 12f : 8f;
|
||||
if (phase2)
|
||||
speed += 0.5f;
|
||||
if (phase3)
|
||||
speed += 0.5f;
|
||||
|
||||
if (headTargetDistance > 150f)
|
||||
{
|
||||
float baseDistanceVelocityMult = 1f + MathHelper.Clamp((headTargetDistance - 150f) * 0.0015f, 0.05f, 1.5f);
|
||||
speed *= baseDistanceVelocityMult;
|
||||
}
|
||||
|
||||
if (NPC.IsMechQueenUp)
|
||||
{
|
||||
float mechdusaSpeedMult = (NPC.npcsFoundForCheckActive[NPCID.TheDestroyerBody] ? 0.6f : 0.75f);
|
||||
speed *= mechdusaSpeedMult;
|
||||
}
|
||||
|
||||
headTargetDistance = speed / headTargetDistance;
|
||||
NPC.velocity.X = headTargetX * headTargetDistance;
|
||||
NPC.velocity.Y = headTargetY * headTargetDistance;
|
||||
|
||||
if (NPC.IsMechQueenUp)
|
||||
{
|
||||
float mechdusaAccelMult = Vector2.Distance(NPC.Center, Main.player[Main.npc[(int)NPC.ai[0]].target].Center);
|
||||
if (mechdusaAccelMult < 0.1f)
|
||||
mechdusaAccelMult = 0f;
|
||||
|
||||
if (mechdusaAccelMult < speed)
|
||||
NPC.velocity = NPC.velocity.SafeNormalize(Vector2.Zero) * mechdusaAccelMult;
|
||||
}
|
||||
}
|
||||
|
||||
// Daytime enrage
|
||||
if (NPC.ai[1] == 2f)
|
||||
{
|
||||
NPC.damage = 1000;
|
||||
calamityGlobalNPC.DR = 0.9999f;
|
||||
calamityGlobalNPC.unbreakableDR = true;
|
||||
|
||||
calamityGlobalNPC.CurrentlyEnraged = true;
|
||||
calamityGlobalNPC.CurrentlyIncreasingDefenseOrDR = true;
|
||||
|
||||
if (NPC.IsMechQueenUp)
|
||||
NPC.rotation = NPC.rotation.AngleLerp(NPC.velocity.X / 15f * 0.5f, 0.75f);
|
||||
else
|
||||
NPC.rotation += NPC.direction * 0.3f;
|
||||
|
||||
Vector2 enragedHeadPosition = NPC.Center;
|
||||
float enragedHeadTargetX = Main.player[Main.npc[(int)NPC.ai[0]].target].Center.X - enragedHeadPosition.X;
|
||||
float enragedHeadTargetY = Main.player[Main.npc[(int)NPC.ai[0]].target].Center.Y - enragedHeadPosition.Y;
|
||||
float enragedHeadTargetDist = (float)Math.Sqrt(enragedHeadTargetX * enragedHeadTargetX + enragedHeadTargetY * enragedHeadTargetY);
|
||||
|
||||
float enragedHeadSpeed = 10f;
|
||||
enragedHeadSpeed += enragedHeadTargetDist / 100f;
|
||||
if (enragedHeadSpeed < 8f)
|
||||
enragedHeadSpeed = 8f;
|
||||
if (enragedHeadSpeed > 32f)
|
||||
enragedHeadSpeed = 32f;
|
||||
|
||||
enragedHeadTargetDist = enragedHeadSpeed / enragedHeadTargetDist;
|
||||
NPC.velocity.X = enragedHeadTargetX * enragedHeadTargetDist;
|
||||
NPC.velocity.Y = enragedHeadTargetY * enragedHeadTargetDist;
|
||||
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
NPC.localAI[0] += 1f;
|
||||
if (NPC.localAI[0] >= 60f)
|
||||
{
|
||||
NPC.localAI[0] = 0f;
|
||||
Vector2 headCenter = NPC.Center;
|
||||
if (Collision.CanHit(headCenter, 1, 1, Main.player[Main.npc[(int)NPC.ai[0]].target].position, Main.player[Main.npc[(int)NPC.ai[0]].target].width, Main.player[Main.npc[(int)NPC.ai[0]].target].height))
|
||||
{
|
||||
enragedHeadSpeed = 7f;
|
||||
float enragedHeadSkullTargetX = Main.player[Main.npc[(int)NPC.ai[0]].target].Center.X - headCenter.X + Main.rand.Next(-20, 21);
|
||||
float enragedHeadSkullTargetY = Main.player[Main.npc[(int)NPC.ai[0]].target].Center.Y - headCenter.Y + Main.rand.Next(-20, 21);
|
||||
float enragedHeadSkullTargetDist = (float)Math.Sqrt(enragedHeadSkullTargetX * enragedHeadSkullTargetX + enragedHeadSkullTargetY * enragedHeadSkullTargetY);
|
||||
enragedHeadSkullTargetDist = enragedHeadSpeed / enragedHeadSkullTargetDist;
|
||||
enragedHeadSkullTargetX *= enragedHeadSkullTargetDist;
|
||||
enragedHeadSkullTargetY *= enragedHeadSkullTargetDist;
|
||||
|
||||
Vector2 value = new Vector2(enragedHeadSkullTargetX * 1f + Main.rand.Next(-50, 51) * 0.01f, enragedHeadSkullTargetY * 1f + Main.rand.Next(-50, 51) * 0.01f).SafeNormalize(Vector2.UnitY);
|
||||
value *= enragedHeadSpeed;
|
||||
value += NPC.velocity;
|
||||
enragedHeadSkullTargetX = value.X;
|
||||
enragedHeadSkullTargetY = value.Y;
|
||||
|
||||
int type = ProjectileID.Skull;
|
||||
headCenter += value * 5f;
|
||||
int enragedSkulls = Projectile.NewProjectile(NPC.GetSource_FromAI(), headCenter.X, headCenter.Y, enragedHeadSkullTargetX, enragedHeadSkullTargetY, type, 250, 0f, Main.myPlayer, -1f, 0f);
|
||||
Main.projectile[enragedSkulls].timeLeft = 300;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Despawning
|
||||
if (NPC.ai[1] == 3f)
|
||||
{
|
||||
// Avoid unfair bullshit
|
||||
NPC.damage = 0;
|
||||
|
||||
if (NPC.IsMechQueenUp)
|
||||
{
|
||||
int mechdusaBossDespawning = NPC.FindFirstNPC(NPCID.Retinazer);
|
||||
if (mechdusaBossDespawning >= 0)
|
||||
Main.npc[mechdusaBossDespawning].EncourageDespawn(5);
|
||||
|
||||
mechdusaBossDespawning = NPC.FindFirstNPC(NPCID.Spazmatism);
|
||||
if (mechdusaBossDespawning >= 0)
|
||||
Main.npc[mechdusaBossDespawning].EncourageDespawn(5);
|
||||
|
||||
if (!NPC.AnyNPCs(NPCID.Retinazer) && !NPC.AnyNPCs(NPCID.Spazmatism))
|
||||
{
|
||||
mechdusaBossDespawning = NPC.FindFirstNPC(NPCID.TheDestroyer);
|
||||
if (mechdusaBossDespawning >= 0)
|
||||
Main.npc[mechdusaBossDespawning].Transform(NPCID.TheDestroyerTail);
|
||||
|
||||
NPC.EncourageDespawn(5);
|
||||
}
|
||||
|
||||
NPC.velocity.Y += 0.1f;
|
||||
if (NPC.velocity.Y < 0f)
|
||||
NPC.velocity.Y *= 0.95f;
|
||||
|
||||
NPC.velocity.X *= 0.95f;
|
||||
if (NPC.velocity.Y > 13f)
|
||||
NPC.velocity.Y = 13f;
|
||||
}
|
||||
else
|
||||
{
|
||||
NPC.velocity.Y += 0.1f;
|
||||
if (NPC.velocity.Y < 0f)
|
||||
NPC.velocity.Y *= 0.9f;
|
||||
|
||||
NPC.velocity.X *= 0.9f;
|
||||
|
||||
if (NPC.timeLeft > 500)
|
||||
NPC.timeLeft = 500;
|
||||
}
|
||||
}
|
||||
|
||||
// Fly around in a circle
|
||||
if (NPC.ai[1] == 5f)
|
||||
{
|
||||
// Avoid unfair bullshit
|
||||
NPC.damage = 0;
|
||||
|
||||
NPC.ai[2] += 1f;
|
||||
|
||||
NPC.rotation = NPC.velocity.X / 50f;
|
||||
|
||||
float bombSpawnDivisor = bossRush ? 14f : death ? 22f - (float)Math.Round(5f * (1f - lifeRatio)) : 22f;
|
||||
float totalBombs = 6f;
|
||||
int bombSpread = bossRush ? 250 : death ? 125 : 100;
|
||||
|
||||
// Spin for about 3 seconds
|
||||
float spinVelocity = 24f;
|
||||
if (NPC.ai[2] == 2f)
|
||||
{
|
||||
// Play angry noise
|
||||
SoundEngine.PlaySound(SoundID.ForceRoar, NPC.Center);
|
||||
|
||||
// Set spin direction
|
||||
if (Main.player[Main.npc[(int)NPC.ai[0]].target].velocity.X > 0f)
|
||||
calamityGlobalNPC.newAI[0] = 1f;
|
||||
else if (Main.player[Main.npc[(int)NPC.ai[0]].target].velocity.X < 0f)
|
||||
calamityGlobalNPC.newAI[0] = -1f;
|
||||
else
|
||||
calamityGlobalNPC.newAI[0] = Main.player[Main.npc[(int)NPC.ai[0]].target].direction;
|
||||
|
||||
// Set spin velocity
|
||||
NPC.velocity.X = MathHelper.Pi * NPC.localAI[3] / spinVelocity;
|
||||
NPC.velocity *= -calamityGlobalNPC.newAI[0];
|
||||
NPC.SyncExtraAI();
|
||||
NPC.netUpdate = true;
|
||||
}
|
||||
|
||||
// Maintain velocity and spit homing bombs
|
||||
else if (NPC.ai[2] > 2f)
|
||||
{
|
||||
NPC.velocity = NPC.velocity.RotatedBy(MathHelper.Pi / spinVelocity * -calamityGlobalNPC.newAI[0]);
|
||||
if (NPC.ai[2] == 3f)
|
||||
NPC.velocity *= 0.6f;
|
||||
|
||||
if (NPC.ai[2] % bombSpawnDivisor == 0f)
|
||||
{
|
||||
NPC.localAI[0] += 1f;
|
||||
|
||||
if (Vector2.Distance(Main.player[Main.npc[(int)NPC.ai[0]].target].Center, NPC.Center) > 64f)
|
||||
{
|
||||
SoundEngine.PlaySound(SoundID.Item61, NPC.Center);
|
||||
CreateParticles(NPC, new Vector2(NPC.Center.X + Main.rand.Next(NPC.width / 2), NPC.Center.Y + 4f));
|
||||
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
Vector2 headCenter = NPC.Center;
|
||||
float enragedHeadSpeed = 6f + (death ? 2f * (1f - lifeRatio) : 0f);
|
||||
float enragedHeadBombTargetX = Main.player[Main.npc[(int)NPC.ai[0]].target].Center.X - headCenter.X + Main.rand.Next(-20, 21);
|
||||
float enragedHeadBombTargetY = Main.player[Main.npc[(int)NPC.ai[0]].target].Center.Y - headCenter.Y + Main.rand.Next(-20, 21);
|
||||
float enragedHeadBombTargetDist = (float)Math.Sqrt(enragedHeadBombTargetX * enragedHeadBombTargetX + enragedHeadBombTargetY * enragedHeadBombTargetY);
|
||||
enragedHeadBombTargetDist = enragedHeadSpeed / enragedHeadBombTargetDist;
|
||||
enragedHeadBombTargetX *= enragedHeadBombTargetDist;
|
||||
enragedHeadBombTargetY *= enragedHeadBombTargetDist;
|
||||
|
||||
Vector2 value = new Vector2(enragedHeadBombTargetX + Main.rand.Next(-bombSpread, bombSpread + 1) * 0.01f, enragedHeadBombTargetY + Main.rand.Next(-bombSpread, bombSpread + 1) * 0.01f).SafeNormalize(Vector2.UnitY);
|
||||
value *= enragedHeadSpeed;
|
||||
enragedHeadBombTargetX = value.X;
|
||||
enragedHeadBombTargetY = value.Y;
|
||||
|
||||
int type = ProjectileID.BombSkeletronPrime;
|
||||
int damage = NPC.GetProjectileDamage(type);
|
||||
|
||||
// Reduce mech boss projectile damage depending on the new ore progression changes
|
||||
if (CalamityServerConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive)
|
||||
{
|
||||
double firstMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Expert;
|
||||
double secondMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Expert;
|
||||
if (!NPC.downedMechBossAny)
|
||||
damage = (int)(damage * firstMechMultiplier);
|
||||
else if ((!NPC.downedMechBoss1 && !NPC.downedMechBoss2) || (!NPC.downedMechBoss2 && !NPC.downedMechBoss3) || (!NPC.downedMechBoss3 && !NPC.downedMechBoss1))
|
||||
damage = (int)(damage * secondMechMultiplier);
|
||||
}
|
||||
|
||||
int enragedBombs = Projectile.NewProjectile(NPC.GetSource_FromAI(), headCenter.X, headCenter.Y + 30f, enragedHeadBombTargetX, enragedHeadBombTargetY, type, damage, 0f, Main.myPlayer, -1f);
|
||||
Main.projectile[enragedBombs].timeLeft = BombTimeLeft;
|
||||
Main.projectile[enragedBombs].tileCollide = false;
|
||||
}
|
||||
}
|
||||
|
||||
// Go to floating phase, or spinning phase if in phase 2
|
||||
if (NPC.localAI[0] >= totalBombs)
|
||||
{
|
||||
NPC.velocity = NPC.velocity.SafeNormalize(Vector2.UnitY);
|
||||
|
||||
// Fly overhead and spit spreads of bombs into the air if on low health
|
||||
NPC.ai[1] = phase3 ? 6f : 1f;
|
||||
NPC.ai[2] = 0f;
|
||||
NPC.localAI[3] = 0f;
|
||||
NPC.localAI[0] = 0f;
|
||||
calamityGlobalNPC.newAI[0] = 0f;
|
||||
NPC.SyncVanillaLocalAI();
|
||||
NPC.SyncExtraAI();
|
||||
NPC.netUpdate = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Fly overhead and spit bombs
|
||||
if (NPC.ai[1] == 6f)
|
||||
{
|
||||
// Avoid unfair bullshit
|
||||
NPC.damage = 0;
|
||||
|
||||
NPC.rotation = NPC.velocity.X / 15f;
|
||||
|
||||
float flightVelocity = bossRush ? 32f : death ? 28f : 24f;
|
||||
float flightAcceleration = bossRush ? 1.28f : death ? 1.12f : 0.96f;
|
||||
|
||||
Vector2 destination = new Vector2(Main.player[Main.npc[(int)NPC.ai[0]].target].Center.X, Main.player[Main.npc[(int)NPC.ai[0]].target].Center.Y - 500f);
|
||||
NPC.SimpleFlyMovement((destination - NPC.Center).SafeNormalize(Vector2.UnitY) * flightVelocity, flightAcceleration);
|
||||
|
||||
// Spit bombs and then go to floating phase
|
||||
NPC.localAI[3] += 1f;
|
||||
if (Vector2.Distance(NPC.Center, destination) < 160f || NPC.ai[2] > 0f || NPC.localAI[3] > 120f)
|
||||
{
|
||||
float bombSpawnDivisor = death ? 50f : 60f;
|
||||
float totalBombSpreads = 2f;
|
||||
NPC.ai[2] += 1f;
|
||||
if (NPC.ai[2] % bombSpawnDivisor == 0f)
|
||||
{
|
||||
NPC.localAI[0] += 1f;
|
||||
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
int totalProjectiles = bossRush ? 24 : 12;
|
||||
float radians = MathHelper.TwoPi / totalProjectiles;
|
||||
int type = ProjectileID.BombSkeletronPrime;
|
||||
int damage = NPC.GetProjectileDamage(type);
|
||||
|
||||
// Reduce mech boss projectile damage depending on the new ore progression changes
|
||||
if (CalamityServerConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive)
|
||||
{
|
||||
double firstMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Expert;
|
||||
double secondMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Expert;
|
||||
if (!NPC.downedMechBossAny)
|
||||
damage = (int)(damage * firstMechMultiplier);
|
||||
else if ((!NPC.downedMechBoss1 && !NPC.downedMechBoss2) || (!NPC.downedMechBoss2 && !NPC.downedMechBoss3) || (!NPC.downedMechBoss3 && !NPC.downedMechBoss1))
|
||||
damage = (int)(damage * secondMechMultiplier);
|
||||
}
|
||||
|
||||
float velocity = 12f;
|
||||
double angleA = radians * 0.5;
|
||||
double angleB = MathHelper.ToRadians(90f) - angleA;
|
||||
float velocityX = (float)(velocity * Math.Sin(angleA) / Math.Sin(angleB));
|
||||
Vector2 spinningPoint = normalLaserRotation ? new Vector2(0f, -velocity) : new Vector2(-velocityX, -velocity);
|
||||
Vector2 upwardVelocity = Vector2.UnitY * velocity;
|
||||
for (int k = 0; k < totalProjectiles; k++)
|
||||
{
|
||||
Vector2 bombVelocity = spinningPoint.RotatedBy(radians * k);
|
||||
int proj = Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + Vector2.UnitY * 30f + bombVelocity.SafeNormalize(Vector2.UnitY) * 15f, bombVelocity - upwardVelocity, type, damage, 0f, Main.myPlayer, -2f);
|
||||
Main.projectile[proj].timeLeft = BombTimeLeft;
|
||||
Main.projectile[proj].tileCollide = false;
|
||||
}
|
||||
NPC.localAI[1] += 1f;
|
||||
}
|
||||
|
||||
SoundEngine.PlaySound(SoundID.Item62, NPC.Center);
|
||||
CreateParticles(NPC, new Vector2(NPC.Center.X, NPC.Center.Y + 4f), 5);
|
||||
|
||||
if (NPC.localAI[0] >= totalBombSpreads)
|
||||
{
|
||||
NPC.ai[1] = 0f;
|
||||
NPC.ai[2] = 0f;
|
||||
NPC.localAI[3] = 0f;
|
||||
calamityGlobalNPC.newAI[0] = 0f;
|
||||
NPC.localAI[0] = 0f;
|
||||
NPC.SyncVanillaLocalAI();
|
||||
NPC.SyncExtraAI();
|
||||
NPC.netUpdate = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void CreateParticles(NPC npc, Vector2 position, int amountMultiplier = 1)
|
||||
{
|
||||
int firstDustCloudParticleAmount = 30 * amountMultiplier;
|
||||
int secondDustCloudParticleAmount = 20 * amountMultiplier;
|
||||
int goreAmount = 2 * amountMultiplier;
|
||||
|
||||
for (int dustIndex = 0; dustIndex < firstDustCloudParticleAmount; dustIndex++)
|
||||
{
|
||||
int dust = Dust.NewDust(npc.position, npc.width, npc.height, DustID.Smoke, 0f, 0f, 100, default(Color), 1.5f);
|
||||
Main.dust[dust].velocity *= 1.4f;
|
||||
}
|
||||
|
||||
for (int dustIndex = 0; dustIndex < secondDustCloudParticleAmount; dustIndex++)
|
||||
{
|
||||
int dust = Dust.NewDust(npc.position, npc.width, npc.height, DustID.Torch, 0f, 0f, 100, default(Color), 3.5f);
|
||||
Main.dust[dust].noGravity = true;
|
||||
Main.dust[dust].velocity *= 7f;
|
||||
dust = Dust.NewDust(npc.position, npc.width, npc.height, DustID.Torch, 0f, 0f, 100, default(Color), 1.5f);
|
||||
Main.dust[dust].velocity *= 3f;
|
||||
}
|
||||
|
||||
for (int goreIndex = 0; goreIndex < goreAmount; goreIndex++)
|
||||
{
|
||||
float goreVelocityMultiplier = 0.4f;
|
||||
if (goreIndex >= goreAmount / 2)
|
||||
goreVelocityMultiplier = 0.8f;
|
||||
|
||||
int gore = Gore.NewGore(npc.GetSource_FromAI(), npc.Center, default(Vector2), Main.rand.Next(61, 64));
|
||||
Main.gore[gore].velocity *= goreVelocityMultiplier;
|
||||
Main.gore[gore].velocity.X += 1f;
|
||||
Main.gore[gore].velocity.Y += 1f;
|
||||
gore = Gore.NewGore(npc.GetSource_FromAI(), npc.Center, default(Vector2), Main.rand.Next(61, 64));
|
||||
Main.gore[gore].velocity *= goreVelocityMultiplier;
|
||||
Main.gore[gore].velocity.X -= 1f;
|
||||
Main.gore[gore].velocity.Y += 1f;
|
||||
gore = Gore.NewGore(npc.GetSource_FromAI(), npc.Center, default(Vector2), Main.rand.Next(61, 64));
|
||||
Main.gore[gore].velocity *= goreVelocityMultiplier;
|
||||
Main.gore[gore].velocity.X += 1f;
|
||||
Main.gore[gore].velocity.Y -= 1f;
|
||||
gore = Gore.NewGore(npc.GetSource_FromAI(), npc.Center, default(Vector2), Main.rand.Next(61, 64));
|
||||
Main.gore[gore].velocity *= goreVelocityMultiplier;
|
||||
Main.gore[gore].velocity.X -= 1f;
|
||||
Main.gore[gore].velocity.Y -= 1f;
|
||||
}
|
||||
}
|
||||
|
||||
public override void BossLoot(ref string name, ref int potionType) => potionType = ItemID.GreaterHealingPotion;
|
||||
|
||||
public override void ApplyDifficultyAndPlayerScaling(int numPlayers, float balance, float bossAdjustment)
|
||||
{
|
||||
NPC.lifeMax = (int)(NPC.lifeMax * 0.75f * balance * bossAdjustment);
|
||||
NPC.damage = (int)(NPC.damage * NPC.GetExpertDamageMultiplier());
|
||||
}
|
||||
|
||||
public override bool CheckActive() => false;
|
||||
|
||||
public override bool CheckDead()
|
||||
{
|
||||
// Kill the lead head if he's still alive when this head dies
|
||||
for (int i = 0; i < Main.maxNPCs; i++)
|
||||
{
|
||||
NPC nPC = Main.npc[i];
|
||||
if (nPC.active && nPC.type == NPCID.SkeletronPrime && nPC.life > 0)
|
||||
{
|
||||
nPC.life = 0;
|
||||
nPC.HitEffect();
|
||||
nPC.checkDead();
|
||||
nPC.active = false;
|
||||
nPC.netUpdate = true;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void HitEffect(NPC.HitInfo hit)
|
||||
{
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
if (Main.netMode != NetmodeID.Server)
|
||||
{
|
||||
Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, 149);
|
||||
Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, 150);
|
||||
|
||||
int num802 = Gore.NewGore(NPC.GetSource_Death(), NPC.position, default(Vector2), Main.rand.Next(61, 64));
|
||||
Gore gore2 = Main.gore[num802];
|
||||
gore2.velocity *= 0.4f;
|
||||
Main.gore[num802].velocity.X += 1f;
|
||||
Main.gore[num802].velocity.Y += 1f;
|
||||
|
||||
num802 = Gore.NewGore(NPC.GetSource_Death(), NPC.position, default(Vector2), Main.rand.Next(61, 64));
|
||||
gore2 = Main.gore[num802];
|
||||
gore2.velocity *= 0.4f;
|
||||
Main.gore[num802].velocity.X -= 1f;
|
||||
Main.gore[num802].velocity.Y += 1f;
|
||||
|
||||
num802 = Gore.NewGore(NPC.GetSource_Death(), NPC.position, default(Vector2), Main.rand.Next(61, 64));
|
||||
gore2 = Main.gore[num802];
|
||||
gore2.velocity *= 0.4f;
|
||||
Main.gore[num802].velocity.X += 1f;
|
||||
Main.gore[num802].velocity.Y -= 1f;
|
||||
|
||||
num802 = Gore.NewGore(NPC.GetSource_Death(), NPC.position, default(Vector2), Main.rand.Next(61, 64));
|
||||
gore2 = Main.gore[num802];
|
||||
gore2.velocity *= 0.4f;
|
||||
Main.gore[num802].velocity.X -= 1f;
|
||||
Main.gore[num802].velocity.Y -= 1f;
|
||||
}
|
||||
|
||||
for (int num798 = 0; num798 < 10; num798++)
|
||||
{
|
||||
int num799 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Smoke, 0f, 0f, 100, default(Color), 1.5f);
|
||||
Dust dust = Main.dust[num799];
|
||||
dust.velocity *= 1.4f;
|
||||
}
|
||||
|
||||
for (int num800 = 0; num800 < 5; num800++)
|
||||
{
|
||||
int num801 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Torch, 0f, 0f, 100, default(Color), 2.5f);
|
||||
Main.dust[num801].noGravity = true;
|
||||
Dust dust = Main.dust[num801];
|
||||
dust.velocity *= 5f;
|
||||
num801 = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Torch, 0f, 0f, 100, default(Color), 1.5f);
|
||||
dust = Main.dust[num801];
|
||||
dust.velocity *= 3f;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 6.5 KiB |
@@ -150,8 +150,6 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
}
|
||||
|
||||
// Check if other segments are still alive, if not, die
|
||||
// Check for Oblivion too, since having a max power Destroyer during that fight would be turbo cancer
|
||||
bool oblivionAlive = false;
|
||||
if (npc.type > NPCID.TheDestroyer)
|
||||
{
|
||||
bool shouldDespawn = true;
|
||||
@@ -178,39 +176,13 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
npc.active = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (masterMode && !bossRush && npc.localAI[3] != -1f)
|
||||
{
|
||||
for (int i = 0; i < Main.maxNPCs; i++)
|
||||
{
|
||||
if (Main.npc[i].active && (Main.npc[i].type == ModContent.NPCType<SkeletronPrime2>() || Main.npc[i].type == NPCID.SkeletronPrime))
|
||||
{
|
||||
oblivionAlive = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Set variable to force despawn when Prime dies in Master Rev+
|
||||
// Set to -1f if Prime isn't alive when summoned
|
||||
if (npc.localAI[3] == 0f)
|
||||
{
|
||||
if (oblivionAlive)
|
||||
npc.localAI[3] = 1f;
|
||||
else
|
||||
npc.localAI[3] = -1f;
|
||||
|
||||
npc.SyncExtraAI();
|
||||
}
|
||||
}
|
||||
|
||||
// Total segment variable
|
||||
int totalSegments = Main.getGoodWorld ? 100 : 80;
|
||||
|
||||
// Calculate aggression based on how many broken segments there are
|
||||
float brokenSegmentAggressionMultiplier = 1f;
|
||||
if (npc.type == NPCID.TheDestroyer && !oblivionAlive)
|
||||
if (npc.type == NPCID.TheDestroyer)
|
||||
{
|
||||
int numProbeSegments = 0;
|
||||
for (int i = 0; i < Main.maxNPCs; i++)
|
||||
@@ -236,51 +208,39 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
|
||||
// Increase velocity based on distance
|
||||
float velocityMultiplier = increaseSpeedMore ? 2f : increaseSpeed ? 1.5f : 1f;
|
||||
noFlyZoneBoxHeight -= death ? 400 : (int)(400f * (1f - lifeRatio));
|
||||
|
||||
// If Oblivion is alive, don't fly, don't spit laser spreads, use the default vanilla no fly zone, reduce segment count to 60, use base speed and use base turn speed
|
||||
if (oblivionAlive)
|
||||
float segmentVelocityBoost = death ? (flyAtTarget ? 4.5f : 6f) * (1f - lifeRatio) : (flyAtTarget ? 3f : 4f) * (1f - lifeRatio);
|
||||
float speedBoost = death ? (flyAtTarget ? 0.1125f : 0.15f) * (1f - lifeRatio) : (flyAtTarget ? 0.075f : 0.1f) * (1f - lifeRatio);
|
||||
float turnSpeedBoost = death ? 0.18f * (1f - lifeRatio) : 0.12f * (1f - lifeRatio);
|
||||
|
||||
segmentVelocity += segmentVelocityBoost;
|
||||
speed += speedBoost;
|
||||
turnSpeed += turnSpeedBoost;
|
||||
|
||||
segmentVelocity += 5f * enrageScale;
|
||||
speed += 0.05f * enrageScale;
|
||||
turnSpeed += 0.075f * enrageScale;
|
||||
|
||||
if (flyAtTarget)
|
||||
{
|
||||
calamityGlobalNPC.newAI[3] = 0f;
|
||||
totalSegments = Main.getGoodWorld ? 75 : 60;
|
||||
spitLaserSpreads = false;
|
||||
noFlyZoneBoxHeight = 2000;
|
||||
float speedMultiplier = phase5 ? 1.8f : phase4 ? 1.65f : 1.5f;
|
||||
speed *= speedMultiplier;
|
||||
}
|
||||
else
|
||||
|
||||
segmentVelocity *= velocityMultiplier;
|
||||
speed *= velocityMultiplier;
|
||||
turnSpeed *= velocityMultiplier;
|
||||
|
||||
segmentVelocity *= brokenSegmentAggressionMultiplier;
|
||||
speed *= brokenSegmentAggressionMultiplier;
|
||||
turnSpeed *= brokenSegmentAggressionMultiplier;
|
||||
|
||||
if (Main.getGoodWorld)
|
||||
{
|
||||
noFlyZoneBoxHeight -= death ? 400 : (int)(400f * (1f - lifeRatio));
|
||||
|
||||
float segmentVelocityBoost = death ? (flyAtTarget ? 4.5f : 6f) * (1f - lifeRatio) : (flyAtTarget ? 3f : 4f) * (1f - lifeRatio);
|
||||
float speedBoost = death ? (flyAtTarget ? 0.1125f : 0.15f) * (1f - lifeRatio) : (flyAtTarget ? 0.075f : 0.1f) * (1f - lifeRatio);
|
||||
float turnSpeedBoost = death ? 0.18f * (1f - lifeRatio) : 0.12f * (1f - lifeRatio);
|
||||
|
||||
segmentVelocity += segmentVelocityBoost;
|
||||
speed += speedBoost;
|
||||
turnSpeed += turnSpeedBoost;
|
||||
|
||||
segmentVelocity += 5f * enrageScale;
|
||||
speed += 0.05f * enrageScale;
|
||||
turnSpeed += 0.075f * enrageScale;
|
||||
|
||||
if (flyAtTarget)
|
||||
{
|
||||
float speedMultiplier = phase5 ? 1.8f : phase4 ? 1.65f : 1.5f;
|
||||
speed *= speedMultiplier;
|
||||
}
|
||||
|
||||
segmentVelocity *= velocityMultiplier;
|
||||
speed *= velocityMultiplier;
|
||||
turnSpeed *= velocityMultiplier;
|
||||
|
||||
segmentVelocity *= brokenSegmentAggressionMultiplier;
|
||||
speed *= brokenSegmentAggressionMultiplier;
|
||||
turnSpeed *= brokenSegmentAggressionMultiplier;
|
||||
|
||||
if (Main.getGoodWorld)
|
||||
{
|
||||
segmentVelocity *= 1.2f;
|
||||
speed *= 1.2f;
|
||||
turnSpeed *= 1.2f;
|
||||
}
|
||||
segmentVelocity *= 1.2f;
|
||||
speed *= 1.2f;
|
||||
turnSpeed *= 1.2f;
|
||||
}
|
||||
|
||||
bool probeLaunched = npc.ai[2] == 1f;
|
||||
@@ -780,9 +740,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
}
|
||||
|
||||
// Despawn
|
||||
bool oblivionWasAlive = npc.localAI[3] == 1f && !oblivionAlive;
|
||||
bool oblivionFightDespawn = (oblivionAlive && lifeRatio < 0.75f) || oblivionWasAlive;
|
||||
if (player.dead || oblivionFightDespawn)
|
||||
if (player.dead)
|
||||
{
|
||||
shouldFly = false;
|
||||
npc.velocity.Y += 2f;
|
||||
@@ -1045,11 +1003,10 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
}
|
||||
|
||||
// Force the fucker to turn around in ground phase in Master
|
||||
// Turns slower if Oblivion is alive, for fairness
|
||||
if (npc.type == NPCID.TheDestroyer && masterMode && !flyAtTarget)
|
||||
{
|
||||
if (npc.Distance(player.Center) > 2000f)
|
||||
npc.velocity += (player.Center - npc.Center).SafeNormalize(Vector2.UnitY) * (oblivionAlive ? speed : turnSpeed);
|
||||
npc.velocity += (player.Center - npc.Center).SafeNormalize(Vector2.UnitY) * turnSpeed;
|
||||
}
|
||||
|
||||
if (NPC.IsMechQueenUp && npc.type == NPCID.TheDestroyer)
|
||||
@@ -1747,7 +1704,6 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
{
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool masterMode = Main.masterMode || bossRush;
|
||||
bool oblivionAlive = npc.ai[1] == 1f;
|
||||
|
||||
// Get a target
|
||||
if (npc.target < 0 || npc.target == Main.maxPlayers || Main.player[npc.target].dead || !Main.player[npc.target].active)
|
||||
@@ -1791,12 +1747,6 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
|
||||
for (int i = 0; i < Main.maxNPCs; i++)
|
||||
{
|
||||
if (masterMode && !bossRush && npc.ai[1] == 0f)
|
||||
{
|
||||
if (Main.npc[i].active && (Main.npc[i].type == ModContent.NPCType<SkeletronPrime2>() || Main.npc[i].type == NPCID.SkeletronPrime))
|
||||
npc.ai[1] = 1f;
|
||||
}
|
||||
|
||||
if (i != npc.whoAmI && Main.npc[i].active && Main.npc[i].type == npc.type)
|
||||
{
|
||||
Vector2 otherProbeDist = Main.npc[i].Center - npc.Center;
|
||||
@@ -1924,7 +1874,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
damage = (int)(damage * secondMechMultiplier);
|
||||
}
|
||||
|
||||
int totalProjectiles = oblivionAlive ? 2 : (CalamityWorld.death || bossRush) ? 3 : 1;
|
||||
int totalProjectiles = (CalamityWorld.death || bossRush) ? 3 : 1;
|
||||
Vector2 npcCenter = new Vector2(probeTargetX, probeTargetY);
|
||||
if (NPC.IsMechQueenUp)
|
||||
{
|
||||
|
||||
@@ -35,114 +35,42 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
// Spawn arms
|
||||
if (calamityGlobalNPC.newAI[1] == 0f)
|
||||
{
|
||||
CalamityUtils.CalamityTargeting(npc, CalamityTargetingParameters.BossDefaults);
|
||||
calamityGlobalNPC.newAI[1] = 1f;
|
||||
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
// Spawn second head in Master Mode
|
||||
// The main head owns the Saw and the Laser in Master Mode
|
||||
if (masterMode)
|
||||
{
|
||||
int head = NPC.NewNPC(npc.GetSource_FromAI(), (int)npc.Center.X, (int)npc.Center.Y, ModContent.NPCType<SkeletronPrime2>(), npc.whoAmI);
|
||||
Main.npc[head].ai[0] = npc.whoAmI;
|
||||
Main.npc[head].target = npc.target;
|
||||
Main.npc[head].netUpdate = true;
|
||||
npc.ai[0] = head;
|
||||
int arm = NPC.NewNPC(npc.GetSource_FromAI(), (int)npc.Center.X, (int)npc.Center.Y, NPCID.PrimeCannon, npc.whoAmI);
|
||||
Main.npc[arm].ai[0] = -1f;
|
||||
Main.npc[arm].ai[1] = npc.whoAmI;
|
||||
Main.npc[arm].target = npc.target;
|
||||
Main.npc[arm].netUpdate = true;
|
||||
|
||||
int arm = NPC.NewNPC(npc.GetSource_FromAI(), (int)npc.Center.X, (int)npc.Center.Y, NPCID.PrimeSaw, npc.whoAmI);
|
||||
Main.npc[arm].ai[0] = 1f;
|
||||
Main.npc[arm].ai[1] = npc.whoAmI;
|
||||
Main.npc[arm].target = npc.target;
|
||||
Main.npc[arm].netUpdate = true;
|
||||
arm = NPC.NewNPC(npc.GetSource_FromAI(), (int)npc.Center.X, (int)npc.Center.Y, NPCID.PrimeSaw, npc.whoAmI);
|
||||
Main.npc[arm].ai[0] = 1f;
|
||||
Main.npc[arm].ai[1] = npc.whoAmI;
|
||||
Main.npc[arm].target = npc.target;
|
||||
Main.npc[arm].netUpdate = true;
|
||||
|
||||
arm = NPC.NewNPC(npc.GetSource_FromAI(), (int)npc.Center.X, (int)npc.Center.Y, NPCID.PrimeLaser, npc.whoAmI);
|
||||
Main.npc[arm].ai[0] = 1f;
|
||||
Main.npc[arm].ai[1] = npc.whoAmI;
|
||||
Main.npc[arm].target = npc.target;
|
||||
Main.npc[arm].netUpdate = true;
|
||||
Main.npc[arm].ai[3] = 150f;
|
||||
}
|
||||
else
|
||||
{
|
||||
int arm = NPC.NewNPC(npc.GetSource_FromAI(), (int)npc.Center.X, (int)npc.Center.Y, NPCID.PrimeCannon, npc.whoAmI);
|
||||
Main.npc[arm].ai[0] = -1f;
|
||||
Main.npc[arm].ai[1] = npc.whoAmI;
|
||||
Main.npc[arm].target = npc.target;
|
||||
Main.npc[arm].netUpdate = true;
|
||||
arm = NPC.NewNPC(npc.GetSource_FromAI(), (int)npc.Center.X, (int)npc.Center.Y, NPCID.PrimeVice, npc.whoAmI);
|
||||
Main.npc[arm].ai[0] = -1f;
|
||||
Main.npc[arm].ai[1] = npc.whoAmI;
|
||||
Main.npc[arm].target = npc.target;
|
||||
Main.npc[arm].ai[3] = 150f;
|
||||
Main.npc[arm].netUpdate = true;
|
||||
|
||||
arm = NPC.NewNPC(npc.GetSource_FromAI(), (int)npc.Center.X, (int)npc.Center.Y, NPCID.PrimeSaw, npc.whoAmI);
|
||||
Main.npc[arm].ai[0] = 1f;
|
||||
Main.npc[arm].ai[1] = npc.whoAmI;
|
||||
Main.npc[arm].target = npc.target;
|
||||
Main.npc[arm].netUpdate = true;
|
||||
|
||||
arm = NPC.NewNPC(npc.GetSource_FromAI(), (int)npc.Center.X, (int)npc.Center.Y, NPCID.PrimeVice, npc.whoAmI);
|
||||
Main.npc[arm].ai[0] = -1f;
|
||||
Main.npc[arm].ai[1] = npc.whoAmI;
|
||||
Main.npc[arm].target = npc.target;
|
||||
Main.npc[arm].ai[3] = 150f;
|
||||
Main.npc[arm].netUpdate = true;
|
||||
|
||||
arm = NPC.NewNPC(npc.GetSource_FromAI(), (int)npc.Center.X, (int)npc.Center.Y, NPCID.PrimeLaser, npc.whoAmI);
|
||||
Main.npc[arm].ai[0] = 1f;
|
||||
Main.npc[arm].ai[1] = npc.whoAmI;
|
||||
Main.npc[arm].target = npc.target;
|
||||
Main.npc[arm].netUpdate = true;
|
||||
Main.npc[arm].ai[3] = 150f;
|
||||
}
|
||||
arm = NPC.NewNPC(npc.GetSource_FromAI(), (int)npc.Center.X, (int)npc.Center.Y, NPCID.PrimeLaser, npc.whoAmI);
|
||||
Main.npc[arm].ai[0] = 1f;
|
||||
Main.npc[arm].ai[1] = npc.whoAmI;
|
||||
Main.npc[arm].target = npc.target;
|
||||
Main.npc[arm].netUpdate = true;
|
||||
Main.npc[arm].ai[3] = 150f;
|
||||
}
|
||||
|
||||
npc.netUpdate = true;
|
||||
npc.SyncExtraAI();
|
||||
}
|
||||
|
||||
if (masterMode)
|
||||
{
|
||||
if (!Main.npc[(int)npc.ai[0]].active || Main.npc[(int)npc.ai[0]].aiStyle != NPCAIStyleID.SkeletronPrimeHead)
|
||||
{
|
||||
npc.life = 0;
|
||||
npc.HitEffect();
|
||||
npc.active = false;
|
||||
npc.netUpdate = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Link the HP of both heads
|
||||
if (npc.life > Main.npc[(int)npc.ai[0]].life)
|
||||
npc.life = Main.npc[(int)npc.ai[0]].life;
|
||||
|
||||
// Push away from the lead head if too close, pull closer if too far, if Mechdusa isn't real
|
||||
if (!NPC.IsMechQueenUp)
|
||||
{
|
||||
float pushVelocity = 0.25f;
|
||||
if (Vector2.Distance(npc.Center, Main.npc[(int)npc.ai[0]].Center) < 80f * npc.scale)
|
||||
{
|
||||
if (npc.position.X < Main.npc[(int)npc.ai[0]].position.X)
|
||||
npc.velocity.X -= pushVelocity;
|
||||
else
|
||||
npc.velocity.X += pushVelocity;
|
||||
|
||||
if (npc.position.Y < Main.npc[(int)npc.ai[0]].position.Y)
|
||||
npc.velocity.Y -= pushVelocity;
|
||||
else
|
||||
npc.velocity.Y += pushVelocity;
|
||||
}
|
||||
else if (Vector2.Distance(npc.Center, Main.npc[(int)npc.ai[0]].Center) > 240f * npc.scale)
|
||||
{
|
||||
if (npc.position.X < Main.npc[(int)npc.ai[0]].position.X)
|
||||
npc.velocity.X += pushVelocity;
|
||||
else
|
||||
npc.velocity.X -= pushVelocity;
|
||||
|
||||
if (npc.position.Y < Main.npc[(int)npc.ai[0]].position.Y)
|
||||
npc.velocity.Y += pushVelocity;
|
||||
else
|
||||
npc.velocity.Y -= pushVelocity;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Check if arms are alive
|
||||
bool cannonAlive = false;
|
||||
bool laserAlive = false;
|
||||
@@ -175,33 +103,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
|
||||
// Phases
|
||||
bool phase2 = lifeRatio < 0.66f;
|
||||
bool spawnDestroyer = lifeRatio < 0.75f && masterMode && !bossRush && npc.localAI[2] == 0f;
|
||||
bool phase3 = lifeRatio < 0.33f;
|
||||
bool spawnRetinazer = lifeRatio < 0.5f && masterMode && !bossRush && npc.localAI[2] == 1f;
|
||||
|
||||
// Spawn The Destroyer in Master Mode (just like Oblivion from Avalon)
|
||||
if (spawnDestroyer)
|
||||
{
|
||||
Player destroyerSpawnPlayer = Main.player[Player.FindClosest(npc.position, npc.width, npc.height)];
|
||||
SoundEngine.PlaySound(SoundID.Roar, destroyerSpawnPlayer.Center);
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
NPC.SpawnOnPlayer(destroyerSpawnPlayer.whoAmI, NPCID.TheDestroyer);
|
||||
|
||||
npc.localAI[2] = 1f;
|
||||
npc.SyncVanillaLocalAI();
|
||||
}
|
||||
|
||||
// Spawn Retinazer in Master Mode (just like Oblivion from Avalon)
|
||||
if (spawnRetinazer)
|
||||
{
|
||||
Player retinazerSpawnPlayer = Main.player[Player.FindClosest(npc.position, npc.width, npc.height)];
|
||||
SoundEngine.PlaySound(SoundID.Roar, retinazerSpawnPlayer.Center);
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
NPC.SpawnOnPlayer(retinazerSpawnPlayer.whoAmI, NPCID.Retinazer);
|
||||
|
||||
npc.localAI[2] = 2f;
|
||||
npc.SyncVanillaLocalAI();
|
||||
}
|
||||
|
||||
// Despawn
|
||||
if (npc.ai[1] != 3f)
|
||||
@@ -250,9 +152,6 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
|
||||
bool normalLaserRotation = npc.localAI[1] % 2f == 0f;
|
||||
|
||||
// Prevents cheap hits
|
||||
bool canUseAttackInMaster = npc.position.Y < Main.player[npc.target].position.Y - 350f;
|
||||
|
||||
// Float near player
|
||||
if (npc.ai[1] == 0f || npc.ai[1] == 4f)
|
||||
{
|
||||
@@ -260,24 +159,16 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
npc.damage = 0;
|
||||
|
||||
// Start other phases; if arms are dead, start with spin phase
|
||||
bool otherHeadChargingOrSpinning = Main.npc[(int)npc.ai[0]].ai[1] == 5f || Main.npc[(int)npc.ai[0]].ai[1] == 1f;
|
||||
if (phase2 || CalamityWorld.LegendaryMode || allArmsDead || masterMode)
|
||||
if (phase2 || CalamityWorld.LegendaryMode || allArmsDead)
|
||||
{
|
||||
// Start spin phase after 1.5 seconds
|
||||
npc.ai[2] += phase3 ? 1.5f : 1f;
|
||||
if (npc.ai[2] >= (90f - (death ? (masterMode ? 15f : 60f) * (1f - lifeRatio) : 0f)) && (!otherHeadChargingOrSpinning || !masterMode || phase3) && (canUseAttackInMaster || !masterMode))
|
||||
if (npc.ai[2] >= (90f - (death ? (masterMode ? 15f : 60f) * (1f - lifeRatio) : 0f)))
|
||||
{
|
||||
bool shouldSpinAround = npc.ai[1] == 4f && npc.position.Y < Main.player[npc.target].position.Y - 400f &&
|
||||
Vector2.Distance(Main.player[npc.target].Center, npc.Center) < 600f && Vector2.Distance(Main.player[npc.target].Center, npc.Center) > 400f;
|
||||
|
||||
bool shouldCharge = masterMode && !phase2 && !allArmsDead && !CalamityWorld.LegendaryMode;
|
||||
if (shouldCharge)
|
||||
{
|
||||
npc.ai[2] = 0f;
|
||||
npc.ai[1] = 1f;
|
||||
npc.netUpdate = true;
|
||||
}
|
||||
else if (shouldSpinAround || npc.ai[1] != 4f)
|
||||
if (shouldSpinAround || npc.ai[1] != 4f)
|
||||
{
|
||||
if (shouldSpinAround)
|
||||
{
|
||||
@@ -287,6 +178,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
|
||||
npc.ai[2] = 0f;
|
||||
npc.ai[1] = shouldSpinAround ? 5f : 1f;
|
||||
CalamityUtils.CalamityTargeting(npc, CalamityTargetingParameters.BossDefaults);
|
||||
npc.netUpdate = true;
|
||||
}
|
||||
}
|
||||
@@ -669,13 +561,6 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
damage = (int)(damage * secondMechMultiplier);
|
||||
}
|
||||
|
||||
if (npc.localAI[0] % 3f == 0f)
|
||||
{
|
||||
int probeLimit = death ? (masterMode ? 3 : 4) : 2;
|
||||
if (NPC.CountNPCS(NPCID.Probe) < probeLimit)
|
||||
NPC.NewNPC(npc.GetSource_FromAI(), (int)headCenter.X, (int)headCenter.Y + 30, NPCID.Probe);
|
||||
}
|
||||
|
||||
int enragedSkulls = Projectile.NewProjectile(npc.GetSource_FromAI(), headCenter.X, headCenter.Y + 30f, enragedHeadSkullTargetX, enragedHeadSkullTargetY, type, damage, 0f, Main.myPlayer, -3f, 0f);
|
||||
Main.projectile[enragedSkulls].timeLeft = 480;
|
||||
Main.projectile[enragedSkulls].tileCollide = false;
|
||||
|
||||
@@ -98,34 +98,8 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
}
|
||||
}
|
||||
|
||||
// Check for Oblivion in Master Mode
|
||||
bool oblivionAlive = false;
|
||||
if (masterMode && !bossRush && npc.localAI[3] != -1f)
|
||||
{
|
||||
for (int i = 0; i < Main.maxNPCs; i++)
|
||||
{
|
||||
if (Main.npc[i].active && (Main.npc[i].type == ModContent.NPCType<SkeletronPrime2>() || Main.npc[i].type == NPCID.SkeletronPrime))
|
||||
{
|
||||
oblivionAlive = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Set variable to force despawn when Prime dies in Master Rev+
|
||||
// Set to -1f if Prime isn't alive when summoned
|
||||
if (npc.localAI[3] == 0f)
|
||||
{
|
||||
if (oblivionAlive)
|
||||
npc.localAI[3] = 1f;
|
||||
else
|
||||
npc.localAI[3] = -1f;
|
||||
|
||||
npc.SyncExtraAI();
|
||||
}
|
||||
|
||||
// Phase HP ratios
|
||||
float phase2LifeRatio = oblivionAlive ? 0.5f : masterMode ? 0.85f : 0.7f;
|
||||
float phase2LifeRatio = masterMode ? 0.85f : 0.7f;
|
||||
float finalPhaseLifeRatio = masterMode ? 0.4f : 0.25f;
|
||||
|
||||
// Movement variables
|
||||
@@ -136,16 +110,6 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
// Phase duration variables
|
||||
float phase1MaxLaserPhaseDurationDecrease = masterMode ? 120f : 300f;
|
||||
|
||||
// If Oblivion is alive reduce aggression of all attacks
|
||||
if (oblivionAlive)
|
||||
{
|
||||
phase1MaxSpeedIncrease = masterMode ? 1f : 2f;
|
||||
phase1MaxAccelerationIncrease = masterMode ? 0.0125f : 0.025f;
|
||||
phase1MaxChargeSpeedIncrease = masterMode ? 1.5f : 3f;
|
||||
|
||||
phase1MaxLaserPhaseDurationDecrease = masterMode ? 60f : 150f;
|
||||
}
|
||||
|
||||
// Phase checks
|
||||
bool phase2 = lifeRatio < phase2LifeRatio;
|
||||
bool finalPhase = lifeRatio < finalPhaseLifeRatio;
|
||||
@@ -165,9 +129,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
npc.reflectsProjectiles = false;
|
||||
|
||||
// Despawn
|
||||
bool oblivionWasAlive = npc.localAI[3] == 1f && !oblivionAlive;
|
||||
bool oblivionFightDespawn = (oblivionAlive && lifeRatio < 0.75f) || oblivionWasAlive || (oblivionAlive && !spazAlive && lifeRatio < 0.95f);
|
||||
if (Main.player[npc.target].dead || oblivionFightDespawn)
|
||||
if (Main.player[npc.target].dead)
|
||||
{
|
||||
npc.velocity.Y -= 0.04f;
|
||||
if (npc.timeLeft > 10)
|
||||
@@ -206,7 +168,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
retinazerFaceDirection = -1;
|
||||
|
||||
Vector2 retinazerPosition = npc.Center;
|
||||
float distanceFromTarget = oblivionAlive ? 450f : 300f;
|
||||
float distanceFromTarget = 300f;
|
||||
float retinazerTargetX = Main.player[npc.target].Center.X + (retinazerFaceDirection * distanceFromTarget) - retinazerPosition.X;
|
||||
float retinazerTargetY = Main.player[npc.target].Center.Y - distanceFromTarget - retinazerPosition.Y;
|
||||
|
||||
@@ -268,7 +230,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
|
||||
npc.ai[2] += 1f;
|
||||
float phaseGateValue = (masterMode ? 300f : 450f) - (death ? phase1MaxLaserPhaseDurationDecrease * ((1f - lifeRatio) / (1f - phase2LifeRatio)) : 0f);
|
||||
float laserGateValue = oblivionAlive ? 60f : 30f;
|
||||
float laserGateValue = 30f;
|
||||
if (NPC.IsMechQueenUp)
|
||||
{
|
||||
phaseGateValue = 900f;
|
||||
@@ -374,7 +336,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
npc.rotation = (float)Math.Atan2(npc.velocity.Y, npc.velocity.X) - MathHelper.PiOver2;
|
||||
|
||||
float delayBeforeChargingAgain = (masterMode ? 48f : 56f) - (death ? (masterMode ? 3f : 6f) * ((1f - lifeRatio) / (1f - phase2LifeRatio)) : 0f);
|
||||
if (npc.ai[2] >= delayBeforeChargingAgain + (oblivionAlive ? 15f : 0f))
|
||||
if (npc.ai[2] >= delayBeforeChargingAgain)
|
||||
{
|
||||
npc.ai[3] += 1f;
|
||||
npc.ai[2] = 0f;
|
||||
@@ -449,7 +411,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
damage = (int)(damage * secondMechMultiplier);
|
||||
}
|
||||
|
||||
Vector2 projectileVelocity = (Main.player[npc.target].Center - npc.Center).SafeNormalize(Vector2.UnitY) * (oblivionAlive ? 6f : 7f);
|
||||
Vector2 projectileVelocity = (Main.player[npc.target].Center - npc.Center).SafeNormalize(Vector2.UnitY) * 7f;
|
||||
int numProj = shootLaser ? 6 : 2;
|
||||
int spread = shootLaser ? 20 : 80;
|
||||
float rotation = MathHelper.ToRadians(spread);
|
||||
@@ -538,7 +500,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
|
||||
Vector2 eyePosition = npc.Center;
|
||||
float retinazerPhase2TargetX = Main.player[npc.target].Center.X - eyePosition.X;
|
||||
float distanceFromTarget = oblivionAlive ? 480f : 420f;
|
||||
float distanceFromTarget = 420f;
|
||||
float retinazerPhase2TargetY = Main.player[npc.target].Center.Y - 420f - eyePosition.Y;
|
||||
|
||||
if (NPC.IsMechQueenUp)
|
||||
@@ -615,7 +577,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
npc.localAI[1] += 1f + (death ? (phase2LifeRatio - lifeRatio) / phase2LifeRatio : 0f);
|
||||
if (npc.localAI[1] >= (spazAlive ? (oblivionAlive ? 76f : 52f) : 26f))
|
||||
if (npc.localAI[1] >= (spazAlive ? 52f : 26f))
|
||||
{
|
||||
bool canHit = Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height);
|
||||
if (canHit || !spazAlive || finalPhase)
|
||||
@@ -680,7 +642,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
}
|
||||
|
||||
Vector2 retinazerPhase2RapidFirePos = npc.Center;
|
||||
float distanceFromTarget = oblivionAlive ? 480f : 420f;
|
||||
float distanceFromTarget = 420f;
|
||||
float retinazerPhase2RapidFireTargetX = Main.player[npc.target].Center.X + (retinazerPhase2FaceDirection * distanceFromTarget) - retinazerPhase2RapidFirePos.X;
|
||||
float retinazerPhase2RapidFireTargetY = Main.player[npc.target].Center.Y - retinazerPhase2RapidFirePos.Y;
|
||||
float retinazerPhase2RapidFireTargetDist = (float)Math.Sqrt(retinazerPhase2RapidFireTargetX * retinazerPhase2RapidFireTargetX + retinazerPhase2RapidFireTargetY * retinazerPhase2RapidFireTargetY);
|
||||
@@ -721,7 +683,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
npc.localAI[1] += 1f + (death ? (phase2LifeRatio - lifeRatio) / phase2LifeRatio : 0f);
|
||||
if (npc.localAI[1] > (spazAlive ? (oblivionAlive ? 30f : 20f) : 10f))
|
||||
if (npc.localAI[1] > (spazAlive ? 20f : 10f))
|
||||
{
|
||||
bool canHit = Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height);
|
||||
if (canHit || !spazAlive || finalPhase)
|
||||
@@ -1072,34 +1034,8 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
}
|
||||
}
|
||||
|
||||
// Check for Oblivion in Master Mode
|
||||
bool oblivionAlive = false;
|
||||
if (masterMode && !bossRush && npc.localAI[3] != -1f)
|
||||
{
|
||||
for (int i = 0; i < Main.maxNPCs; i++)
|
||||
{
|
||||
if (Main.npc[i].active && (Main.npc[i].type == ModContent.NPCType<SkeletronPrime2>() || Main.npc[i].type == NPCID.SkeletronPrime))
|
||||
{
|
||||
oblivionAlive = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Set variable to force despawn when Prime dies in Master Rev+
|
||||
// Set to -1f if Prime isn't alive when summoned
|
||||
if (npc.localAI[3] == 0f)
|
||||
{
|
||||
if (oblivionAlive)
|
||||
npc.localAI[3] = 1f;
|
||||
else
|
||||
npc.localAI[3] = -1f;
|
||||
|
||||
npc.SyncExtraAI();
|
||||
}
|
||||
|
||||
// Phase HP ratios
|
||||
float phase2LifeRatio = oblivionAlive ? 0.5f : masterMode ? 0.85f : 0.7f;
|
||||
float phase2LifeRatio = masterMode ? 0.85f : 0.7f;
|
||||
float finalPhaseLifeRatio = masterMode ? 0.4f : 0.25f;
|
||||
|
||||
// Movement variables
|
||||
@@ -1111,17 +1047,6 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
float phase1MaxCursedFlamePhaseDurationDecrease = masterMode ? 80f : 200f;
|
||||
float phase1MaxChargesDecrease = masterMode ? 2f : 4f;
|
||||
|
||||
// If Oblivion is alive reduce aggression of all attacks
|
||||
if (oblivionAlive)
|
||||
{
|
||||
phase1MaxSpeedIncrease = masterMode ? 1.125f : 2.25f;
|
||||
phase1MaxAccelerationIncrease = masterMode ? 0.0375f : 0.075f;
|
||||
phase1MaxChargeSpeedIncrease = masterMode ? 1.5f : 3f;
|
||||
|
||||
phase1MaxCursedFlamePhaseDurationDecrease = masterMode ? 40f : 100f;
|
||||
phase1MaxChargesDecrease = masterMode ? 1f : 2f;
|
||||
}
|
||||
|
||||
// Phase checks
|
||||
bool phase2 = lifeRatio < phase2LifeRatio;
|
||||
bool finalPhase = lifeRatio < finalPhaseLifeRatio;
|
||||
@@ -1141,9 +1066,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
npc.reflectsProjectiles = false;
|
||||
|
||||
// Despawn
|
||||
bool oblivionWasAlive = npc.localAI[3] == 1f && !oblivionAlive;
|
||||
bool oblivionFightDespawn = (oblivionAlive && lifeRatio < 0.75f) || oblivionWasAlive || (oblivionAlive && !retAlive && lifeRatio < 0.95f);
|
||||
if (Main.player[npc.target].dead || oblivionFightDespawn)
|
||||
if (Main.player[npc.target].dead)
|
||||
{
|
||||
npc.velocity.Y -= 0.04f;
|
||||
if (npc.timeLeft > 10)
|
||||
@@ -1185,7 +1108,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
spazmatismFireballFaceDirection = -1;
|
||||
|
||||
Vector2 spazmatismFireballPos = npc.Center;
|
||||
float distanceFromTarget = oblivionAlive ? 480f : 400f;
|
||||
float distanceFromTarget = 400f;
|
||||
float spazmatismFireballTargetX = Main.player[npc.target].Center.X + (spazmatismFireballFaceDirection * distanceFromTarget) - spazmatismFireballPos.X;
|
||||
float spazmatismFireballTargetY = Main.player[npc.target].Center.Y - spazmatismFireballPos.Y;
|
||||
if (NPC.IsMechQueenUp)
|
||||
@@ -1264,7 +1187,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
npc.ai[3] += 0.4f;
|
||||
}
|
||||
|
||||
if (npc.ai[3] >= (oblivionAlive ? 60f : 30f))
|
||||
if (npc.ai[3] >= 30f)
|
||||
{
|
||||
npc.ai[3] = 0f;
|
||||
spazmatismFireballPos = npc.Center;
|
||||
@@ -1352,7 +1275,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
|
||||
// Charge 8 times
|
||||
float chargeTime = masterMode ? 45f : 25f;
|
||||
if (npc.ai[2] >= chargeTime + (oblivionAlive ? 15f : 0f))
|
||||
if (npc.ai[2] >= chargeTime)
|
||||
{
|
||||
// Reset AI array and go to cursed fireball phase
|
||||
npc.ai[3] += 1f;
|
||||
@@ -1432,7 +1355,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
damage = (int)(damage * secondMechMultiplier);
|
||||
}
|
||||
|
||||
Vector2 projectileVelocity = (Main.player[npc.target].Center - npc.Center).SafeNormalize(Vector2.UnitY) * (oblivionAlive ? 12f : 16f) + Main.rand.NextVector2CircularEdge(3f, 3f);
|
||||
Vector2 projectileVelocity = (Main.player[npc.target].Center - npc.Center).SafeNormalize(Vector2.UnitY) * 16f + Main.rand.NextVector2CircularEdge(3f, 3f);
|
||||
int proj = Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center + projectileVelocity.SafeNormalize(Vector2.UnitY) * 50f, projectileVelocity, type, damage, 0f, Main.myPlayer, 0f, 1f);
|
||||
Main.projectile[proj].tileCollide = false;
|
||||
}
|
||||
@@ -1527,7 +1450,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
{
|
||||
// Boost speed if too far from target
|
||||
if (spazmatismFlamethrowerTargetDist > flamethrowerDistance)
|
||||
spazmatismFlamethrowerMaxSpeed += MathHelper.Lerp(0f, oblivionAlive ? 3f : masterMode ? 8f : 6f, MathHelper.Clamp((spazmatismFlamethrowerTargetDist - flamethrowerDistance) / 1000f, 0f, 1f));
|
||||
spazmatismFlamethrowerMaxSpeed += MathHelper.Lerp(0f, masterMode ? 8f : 6f, MathHelper.Clamp((spazmatismFlamethrowerTargetDist - flamethrowerDistance) / 1000f, 0f, 1f));
|
||||
|
||||
if (Main.getGoodWorld)
|
||||
{
|
||||
@@ -1728,7 +1651,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses
|
||||
npc.rotation = (float)Math.Atan2(npc.velocity.Y, npc.velocity.X) - MathHelper.PiOver2;
|
||||
|
||||
// Charges 5 times
|
||||
if (npc.ai[2] >= (chargeTime * 1.6f) + (oblivionAlive ? 15f : 0f))
|
||||
if (npc.ai[2] >= (chargeTime * 1.6f))
|
||||
{
|
||||
npc.ai[3] += 1f;
|
||||
npc.ai[2] = 0f;
|
||||
|
||||
@@ -2381,138 +2381,6 @@ namespace CalamityMod.Projectiles
|
||||
}
|
||||
}
|
||||
|
||||
else if (projectile.type == ProjectileID.BombSkeletronPrime && projectile.ai[0] < 0f && masterMode)
|
||||
{
|
||||
int num = (int)(projectile.Center.X / 16f);
|
||||
int num2 = (int)(projectile.Center.Y / 16f);
|
||||
if (WorldGen.InWorld(num, num2) && projectile.tileCollide)
|
||||
{
|
||||
Tile tile = Main.tile[num, num2];
|
||||
if (tile != null && tile.HasTile && (TileID.Sets.Platforms[tile.TileType] || tile.TileType == TileID.PlanterBox))
|
||||
{
|
||||
projectile.Kill();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool masterModeSkeletronPrimeHomingBomb = projectile.ai[0] == -1f;
|
||||
bool masterModeSkeletronPrimeFallingBomb = projectile.ai[0] == -2f;
|
||||
|
||||
int target = 0;
|
||||
target = Player.FindClosest(projectile.Center, 1, 1);
|
||||
|
||||
if (projectile.Hitbox.Intersects(Main.player[target].Hitbox))
|
||||
{
|
||||
projectile.Kill();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (projectile.timeLeft < SkeletronPrime2.BombTimeLeft / 2 && projectile.timeLeft > 3)
|
||||
projectile.tileCollide = true;
|
||||
|
||||
if (masterModeSkeletronPrimeHomingBomb)
|
||||
{
|
||||
projectile.ai[1] += 1f;
|
||||
float homingStartTime = 20f;
|
||||
float homingEndTime = death ? 140f : 110f;
|
||||
|
||||
if (Vector2.Distance(projectile.Center, Main.player[target].Center) < 192f && projectile.ai[1] < homingEndTime)
|
||||
projectile.ai[1] = homingEndTime;
|
||||
|
||||
if (projectile.ai[1] < homingEndTime && projectile.ai[1] > homingStartTime)
|
||||
{
|
||||
float num134 = projectile.velocity.Length();
|
||||
Vector2 vector24 = Main.player[target].Center - projectile.Center;
|
||||
vector24.Normalize();
|
||||
vector24 *= num134;
|
||||
float inertia = death ? 25f : 30f;
|
||||
projectile.velocity = (projectile.velocity * (inertia - 1f) + vector24) / inertia;
|
||||
projectile.velocity.Normalize();
|
||||
projectile.velocity *= num134;
|
||||
}
|
||||
|
||||
float maxVelocity = death ? 18f : 15f;
|
||||
float acceleration = 1.02f;
|
||||
if (projectile.velocity.Length() < maxVelocity)
|
||||
projectile.velocity *= acceleration;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (projectile.velocity.Y > 10f)
|
||||
projectile.velocity.Y = 10f;
|
||||
}
|
||||
|
||||
if (projectile.localAI[0] == 0f)
|
||||
{
|
||||
projectile.localAI[0] = 1f;
|
||||
SoundEngine.PlaySound(SoundID.Item10, projectile.Center);
|
||||
}
|
||||
|
||||
projectile.frameCounter++;
|
||||
if (projectile.frameCounter > 3)
|
||||
{
|
||||
projectile.frame++;
|
||||
projectile.frameCounter = 0;
|
||||
}
|
||||
|
||||
if (projectile.frame > 1)
|
||||
projectile.frame = 0;
|
||||
|
||||
if (projectile.owner == Main.myPlayer && projectile.timeLeft <= 3)
|
||||
{
|
||||
projectile.tileCollide = false;
|
||||
projectile.ai[2] = 0f;
|
||||
projectile.alpha = 255;
|
||||
}
|
||||
else if (Main.rand.NextBool())
|
||||
{
|
||||
int num28 = Dust.NewDust(projectile.position, projectile.width, projectile.height, DustID.Smoke, 0f, 0f, 100);
|
||||
Main.dust[num28].scale = 0.1f + (float)Main.rand.Next(5) * 0.1f;
|
||||
Main.dust[num28].fadeIn = 1.5f + (float)Main.rand.Next(5) * 0.1f;
|
||||
Main.dust[num28].noGravity = true;
|
||||
Main.dust[num28].position = projectile.Center + new Vector2(0f, -projectile.height / 2).RotatedBy(projectile.rotation) * 1.1f;
|
||||
int num29 = 6;
|
||||
Dust dust8 = Dust.NewDustDirect(projectile.position, projectile.width, projectile.height, num29, 0f, 0f, 100);
|
||||
dust8.scale = 1f + (float)Main.rand.Next(5) * 0.1f;
|
||||
dust8.noGravity = true;
|
||||
dust8.position = projectile.Center + new Vector2(0f, -projectile.height / 2 - 6).RotatedBy(projectile.rotation) * 1.1f;
|
||||
}
|
||||
|
||||
if (masterModeSkeletronPrimeFallingBomb)
|
||||
{
|
||||
projectile.ai[2] += 1f;
|
||||
if (projectile.ai[2] > 60f)
|
||||
projectile.velocity.Y += 0.2f;
|
||||
}
|
||||
|
||||
projectile.rotation += projectile.velocity.X * 0.1f;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
else if (projectile.type == ProjectileID.FrostBeam && projectile.ai[0] == 1f)
|
||||
{
|
||||
projectile.rotation = (float)Math.Atan2(projectile.velocity.Y, projectile.velocity.X) + MathHelper.PiOver2;
|
||||
|
||||
Lighting.AddLight(projectile.Center, 0f, (255 - projectile.alpha) * 0.15f / 255f, (255 - projectile.alpha) * 0.6f / 255f);
|
||||
|
||||
if (projectile.alpha > 0)
|
||||
projectile.alpha -= 125;
|
||||
if (projectile.alpha < 0)
|
||||
projectile.alpha = 0;
|
||||
|
||||
if (projectile.localAI[1] == 0f)
|
||||
{
|
||||
SoundEngine.PlaySound(SoundID.Item33, projectile.Center);
|
||||
projectile.localAI[1] = 1f;
|
||||
}
|
||||
|
||||
if (projectile.velocity.Length() < AcceleratingBossLaserVelocityCap)
|
||||
projectile.velocity *= 1.0025f;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
else if (projectile.type == ProjectileID.RocketSkeleton && projectile.ai[1] == 1f)
|
||||
{
|
||||
bool primeCannonProjectile = projectile.ai[1] == 2f;
|
||||
@@ -4653,7 +4521,6 @@ namespace CalamityMod.Projectiles
|
||||
#region Pre Kill
|
||||
public override bool PreKill(Projectile projectile, int timeLeft)
|
||||
{
|
||||
bool masterRevSkeletronPrimeBomb = projectile.type == ProjectileID.BombSkeletronPrime && projectile.ai[0] < 0f && (Main.masterMode || BossRushEvent.BossRushActive);
|
||||
bool revQueenBeeBeeHive = projectile.type == ProjectileID.BeeHive && (CalamityWorld.revenge || BossRushEvent.BossRushActive) && (projectile.ai[2] == 1f || CalamityWorld.death) && projectile.wet;
|
||||
bool revGolemInferno = projectile.type == ProjectileID.InfernoHostileBolt && projectile.ai[2] > 0f;
|
||||
|
||||
@@ -4675,96 +4542,7 @@ namespace CalamityMod.Projectiles
|
||||
|
||||
if (projectile.owner == Main.myPlayer)
|
||||
{
|
||||
if (masterRevSkeletronPrimeBomb)
|
||||
{
|
||||
SoundEngine.PlaySound(SoundID.Item14, projectile.Center);
|
||||
projectile.position.X += projectile.width / 2;
|
||||
projectile.position.Y += projectile.height / 2;
|
||||
projectile.width = projectile.height = 22;
|
||||
projectile.position.X -= projectile.width / 2;
|
||||
projectile.position.Y -= projectile.height / 2;
|
||||
|
||||
for (int num951 = 0; num951 < 20; num951++)
|
||||
{
|
||||
int num952 = Dust.NewDust(projectile.position, projectile.width, projectile.height, DustID.Smoke, 0f, 0f, 100, default(Color), 1.5f);
|
||||
Dust dust2 = Main.dust[num952];
|
||||
dust2.velocity *= 1.4f;
|
||||
}
|
||||
|
||||
int num950 = 6;
|
||||
for (int num953 = 0; num953 < 10; num953++)
|
||||
{
|
||||
int num954 = Dust.NewDust(projectile.position, projectile.width, projectile.height, num950, 0f, 0f, 100, default(Color), 2.5f);
|
||||
Main.dust[num954].noGravity = true;
|
||||
Dust dust2 = Main.dust[num954];
|
||||
dust2.velocity *= 5f;
|
||||
num954 = Dust.NewDust(projectile.position, projectile.width, projectile.height, num950, 0f, 0f, 100, default(Color), 1.5f);
|
||||
dust2 = Main.dust[num954];
|
||||
dust2.velocity *= 3f;
|
||||
}
|
||||
|
||||
int num955 = Gore.NewGore(projectile.GetSource_FromAI(), projectile.position, default(Vector2), Main.rand.Next(61, 64));
|
||||
Gore gore2 = Main.gore[num955];
|
||||
gore2.velocity *= 0.4f;
|
||||
Main.gore[num955].velocity.X += 1f;
|
||||
Main.gore[num955].velocity.Y += 1f;
|
||||
num955 = Gore.NewGore(projectile.GetSource_FromAI(), projectile.position, default(Vector2), Main.rand.Next(61, 64));
|
||||
gore2 = Main.gore[num955];
|
||||
gore2.velocity *= 0.4f;
|
||||
Main.gore[num955].velocity.X -= 1f;
|
||||
Main.gore[num955].velocity.Y += 1f;
|
||||
num955 = Gore.NewGore(projectile.GetSource_FromAI(), projectile.position, default(Vector2), Main.rand.Next(61, 64));
|
||||
gore2 = Main.gore[num955];
|
||||
gore2.velocity *= 0.4f;
|
||||
Main.gore[num955].velocity.X += 1f;
|
||||
Main.gore[num955].velocity.Y -= 1f;
|
||||
num955 = Gore.NewGore(projectile.GetSource_FromAI(), projectile.position, default(Vector2), Main.rand.Next(61, 64));
|
||||
gore2 = Main.gore[num955];
|
||||
gore2.velocity *= 0.4f;
|
||||
Main.gore[num955].velocity.X -= 1f;
|
||||
Main.gore[num955].velocity.Y -= 1f;
|
||||
|
||||
Vector2 vector76 = projectile.position;
|
||||
projectile.position.X += projectile.width / 2;
|
||||
projectile.position.Y += projectile.height / 2;
|
||||
projectile.width = projectile.height = 128;
|
||||
projectile.position.X -= projectile.width / 2;
|
||||
projectile.position.Y -= projectile.height / 2;
|
||||
projectile.Damage();
|
||||
projectile.position = vector76;
|
||||
projectile.width = projectile.height = 22;
|
||||
|
||||
if (Main.getGoodWorld && !Main.remixWorld)
|
||||
{
|
||||
int num1011 = 4;
|
||||
Vector2 center3 = projectile.position;
|
||||
int num1012 = num1011;
|
||||
int num1013 = num1011;
|
||||
int num1014 = (int)(center3.X / 16f - (float)num1012);
|
||||
int num1015 = (int)(center3.X / 16f + (float)num1012);
|
||||
int num1016 = (int)(center3.Y / 16f - (float)num1013);
|
||||
int num1017 = (int)(center3.Y / 16f + (float)num1013);
|
||||
if (num1014 < 0)
|
||||
num1014 = 0;
|
||||
|
||||
if (num1015 > Main.maxTilesX)
|
||||
num1015 = Main.maxTilesX;
|
||||
|
||||
if (num1016 < 0)
|
||||
num1016 = 0;
|
||||
|
||||
if (num1017 > Main.maxTilesY)
|
||||
num1017 = Main.maxTilesY;
|
||||
|
||||
bool wallSplode2 = projectile.ShouldWallExplode(center3, num1011, num1014, num1015, num1016, num1017);
|
||||
projectile.ExplodeTiles(center3, num1011, num1014, num1015, num1016, num1017, wallSplode2);
|
||||
}
|
||||
|
||||
if (Main.netMode != NetmodeID.SinglePlayer)
|
||||
NetMessage.SendData(MessageID.KillProjectile, -1, -1, null, projectile.identity, projectile.owner);
|
||||
}
|
||||
|
||||
else if (revQueenBeeBeeHive)
|
||||
if (revQueenBeeBeeHive)
|
||||
{
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
@@ -4829,7 +4607,7 @@ namespace CalamityMod.Projectiles
|
||||
}
|
||||
}
|
||||
|
||||
if (masterRevSkeletronPrimeBomb || revQueenBeeBeeHive || revGolemInferno)
|
||||
if (revQueenBeeBeeHive || revGolemInferno)
|
||||
{
|
||||
projectile.active = false;
|
||||
return false;
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
using CalamityMod.World;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Systems
|
||||
{
|
||||
public class SkeletronPrimeMasterMusicScene : ModSceneEffect
|
||||
{
|
||||
public override int Music => MusicID.Boss3; // I spent 20 minutes trying to get this music to play while forgetting to actually override this in the first place _ YuH
|
||||
public override SceneEffectPriority Priority => SceneEffectPriority.BossLow;
|
||||
public override bool IsSceneEffectActive(Player player) => Main.masterMode && CalamityWorld.revenge && NPC.AnyNPCs(NPCID.SkeletronPrime) && Main.npc[NPC.FindFirstNPC(NPCID.SkeletronPrime)].Distance(player.Center) <= 525f * 16f;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user