1 - Cirrus' special attack.
2 - Rev+ Moon Lord Deathray Charge sound.
This commit is contained in:
1 parent
2480e248c1
commit
ef99a5be8a
12 files changed
+418
-26
No files matched your search
+1
-1
@@ -335,7 +335,7 @@ namespace CalamityMod
|
||||
Filters.Scene["CalamityMod:MonolithAccursed"] = new Filter(new MonolithScreenShaderData("FilterMiniTower").UseColor(1.1f, 0.3f, 0.3f).UseOpacity(0.65f), EffectPriority.VeryHigh);
|
||||
SkyManager.Instance["CalamityMod:MonolithAccursed"] = new MonolithSky();
|
||||
|
||||
//Normal intensity is 4f
|
||||
// Normal intensity is 4f
|
||||
Texture2D DistortionTexture = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/GreyscaleGradients/BlobbyNoise", AssetRequestMode.ImmediateLoad).Value;
|
||||
Filters.Scene["CalamityMod:DrunkCrabulon"] = new Filter(new DrunkCrabScreenShaderData("FilterHeatDistortion").UseImage(DistortionTexture, 0, null).UseIntensity(20f), EffectPriority.VeryHigh);
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ TropicalAttunement: {
|
||||
|
||||
EvilAttunement: {
|
||||
Name: Decay's Retort
|
||||
Function:
|
||||
Function:
|
||||
'''
|
||||
Lunge forward using a ghostly rapier projection that leeches life on enemy hits
|
||||
You will bounce away from struck targets
|
||||
|
||||
@@ -35,6 +35,8 @@ BrimstoneTargetRay.DisplayName: Brimstone Target Ray
|
||||
BrimstoneWave.DisplayName: Brimstone Flame Skull
|
||||
BrokenApolloLens.DisplayName: Lens
|
||||
BrokenArtemisLens.DisplayName: Lens
|
||||
CirrusBlast.DisplayName: Cirrus Mushroom Blast
|
||||
CirrusBlaster.DisplayName: Cirrus Mushroom
|
||||
CirrusPhotonRipperPrismTooth.DisplayName: Cirrus Photon Ripper Tooth
|
||||
CirrusPhotonRipperProjectile.DisplayName: Cirrus Photon Ripper
|
||||
CirrusVolatileVodkaBottle.DisplayName: Volatile Vodka Bottle
|
||||
|
||||
@@ -358,4 +358,4 @@ PwnagehammerSmallExplosion.DisplayName: Pwnage Blast
|
||||
PwnagehammerExplosionSmall.DisplayName: Pwnage Blast
|
||||
PwnagehammerExplosionBig.DisplayName: Pwnage Blast
|
||||
GalaxySmasherMini.DisplayName: Galaxy Smasher
|
||||
GalaxySmasherEcho.DisplayName: Galaxy Smasher Echo
|
||||
GalaxySmasherEcho.DisplayName: Galaxy Smasher Echo
|
||||
@@ -118,6 +118,7 @@ CirrusBH5Text: Hah! You're good, but I'm better!
|
||||
CirrusSecondBirbSwarmText: Time for another swarm!
|
||||
CirrusNonchalantText: I'm getting tired...
|
||||
CirrusBruhText: Just kidding! Time for my special attack!
|
||||
CirrusGiveUpText: Meh, whatever, I'm a bit tired of this.
|
||||
// April Fools
|
||||
AprilFools: The LORDE is approaching...
|
||||
AprilFoolsGFB: La Ruga is approaching...
|
||||
@@ -97,7 +97,8 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
public bool hasSummonedBrothers = false;
|
||||
public bool cirrus = false;
|
||||
|
||||
public int giveUpCounter = 1200;
|
||||
private const int GiveUpCounterMax = 1200;
|
||||
public int giveUpCounter = GiveUpCounterMax;
|
||||
public int phaseChange = 0;
|
||||
public int spawnX = 0;
|
||||
public int spawnX2 = 0;
|
||||
@@ -1253,7 +1254,69 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
{
|
||||
if (cirrus)
|
||||
{
|
||||
// Spin around the target and fire a bunch of beams (Sans) while also firing a ton of other projectiles
|
||||
if (giveUpCounter > 1)
|
||||
{
|
||||
// Spin around the target and fire a bunch of beams (Sans) while also firing other projectiles
|
||||
int blasterTimer = GiveUpCounterMax - giveUpCounter;
|
||||
Vector2 circleOffset = player.Center + (Vector2.UnitY * 640f).RotatedBy(MathHelper.ToRadians(blasterTimer * 3f));
|
||||
NPC.Center = circleOffset;
|
||||
|
||||
int blasterDivisor = (int)Math.Floor(5 / uDieLul);
|
||||
if (blasterTimer % blasterDivisor == 0)
|
||||
Projectile.NewProjectile(NPC.GetSource_FromAI(), circleOffset, player.Center, ModContent.ProjectileType<CirrusBlaster>(), 500, 0f, Main.myPlayer);
|
||||
|
||||
int beamDivisor = 60;
|
||||
if (blasterTimer % beamDivisor == 0)
|
||||
{
|
||||
int totalProjectiles = 5;
|
||||
float radians = MathHelper.TwoPi / totalProjectiles;
|
||||
float velocity = 12f * uDieLul;
|
||||
Vector2 spinningPoint = new Vector2(0f, -velocity);
|
||||
for (int k = 0; k < totalProjectiles; k++)
|
||||
{
|
||||
Vector2 rayVelocity = spinningPoint.RotatedBy(radians * k);
|
||||
int proj = Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + Vector2.Normalize(rayVelocity) * 16f, rayVelocity, ModContent.ProjectileType<Projectiles.Magic.FabRay>(), 350, 0f, Main.myPlayer);
|
||||
if (proj.WithinBounds(Main.maxProjectiles))
|
||||
{
|
||||
Main.projectile[proj].DamageType = DamageClass.Default;
|
||||
Main.projectile[proj].friendly = false;
|
||||
Main.projectile[proj].hostile = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
NPC.noTileCollide = false;
|
||||
NPC.noGravity = false;
|
||||
NPC.damage = 0;
|
||||
|
||||
if (giveUpCounter == 1)
|
||||
{
|
||||
NPC.velocity = Vector2.Zero;
|
||||
CalamityUtils.DisplayLocalizedText("Mods.CalamityMod.Status.Boss.CirrusGiveUpText", cirrusTextColor);
|
||||
Dust.QuickDustLine(NPC.Center, initialRitualPosition, 500f, Color.Pink);
|
||||
NPC.Center = initialRitualPosition;
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < 24; i++)
|
||||
{
|
||||
Dust brimstoneFire = Dust.NewDustPerfect(NPC.Center + Main.rand.NextVector2Square(-24f, 24f), DustID.Torch);
|
||||
brimstoneFire.color = Color.Pink;
|
||||
brimstoneFire.velocity = Vector2.UnitY * -Main.rand.NextFloat(2f, 3.25f);
|
||||
brimstoneFire.scale = Main.rand.NextFloat(0.95f, 1.15f);
|
||||
brimstoneFire.fadeIn = 1.25f;
|
||||
brimstoneFire.noGravity = true;
|
||||
}
|
||||
|
||||
NPC.active = false;
|
||||
NPC.netUpdate = true;
|
||||
NPC.NPCLoot();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1265,9 +1328,9 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
NPC.damage = 0;
|
||||
|
||||
// Teleport back to the arena on defeat
|
||||
if (giveUpCounter == 1200)
|
||||
if (giveUpCounter == GiveUpCounterMax)
|
||||
{
|
||||
Dust.QuickDustLine(NPC.Center, initialRitualPosition, 500f, cirrus ? Color.Pink : Color.Red);
|
||||
Dust.QuickDustLine(NPC.Center, initialRitualPosition, 500f, Color.Red);
|
||||
NPC.Center = initialRitualPosition;
|
||||
}
|
||||
|
||||
@@ -1281,7 +1344,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
for (int i = 0; i < 24; i++)
|
||||
{
|
||||
Dust brimstoneFire = Dust.NewDustPerfect(NPC.Center + Main.rand.NextVector2Square(-24f, 24f), DustID.Torch);
|
||||
brimstoneFire.color = cirrus ? Color.Pink : Color.Red;
|
||||
brimstoneFire.color = Color.Red;
|
||||
brimstoneFire.velocity = Vector2.UnitY * -Main.rand.NextFloat(2f, 3.25f);
|
||||
brimstoneFire.scale = Main.rand.NextFloat(0.95f, 1.15f);
|
||||
brimstoneFire.fadeIn = 1.25f;
|
||||
@@ -1318,7 +1381,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
for (int i = 0; i < 24; i++)
|
||||
{
|
||||
Dust brimstoneFire = Dust.NewDustPerfect(NPC.Center + Main.rand.NextVector2Square(-24f, 24f), DustID.Torch);
|
||||
brimstoneFire.color = cirrus ? Color.Pink : Color.Red;
|
||||
brimstoneFire.color = Color.Red;
|
||||
brimstoneFire.velocity = Vector2.UnitY * -Main.rand.NextFloat(2f, 3.25f);
|
||||
brimstoneFire.scale = Main.rand.NextFloat(0.95f, 1.15f);
|
||||
brimstoneFire.fadeIn = 1.25f;
|
||||
|
||||
@@ -12,6 +12,8 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
|
||||
{
|
||||
public static class MoonLordAI
|
||||
{
|
||||
public static readonly SoundStyle DeathrayChargeSound = new("CalamityMod/Sounds/Custom/MoonLordLaserCharge");
|
||||
|
||||
public static bool BuffedMoonLordAI(NPC npc, Mod mod)
|
||||
{
|
||||
CalamityGlobalNPC calamityGlobalNPC = npc.Calamity();
|
||||
@@ -719,6 +721,10 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
|
||||
{
|
||||
Vector2 center20 = npc.Center;
|
||||
|
||||
// Hopefully it plays
|
||||
if (num1207 == 60f)
|
||||
SoundEngine.PlaySound(DeathrayChargeSound, center20);
|
||||
|
||||
int num1220 = 0;
|
||||
if (num1207 >= 120f)
|
||||
num1220 = 1;
|
||||
|
||||
@@ -0,0 +1,162 @@
|
||||
using CalamityMod.Projectiles.BaseProjectiles;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Projectiles.Boss
|
||||
{
|
||||
public class CirrusBlast : BaseLaserbeamProjectile, ILocalizedModType
|
||||
{
|
||||
// Modified clone of Seraphim's Laser
|
||||
public new string LocalizationCategory => "Projectiles.Boss";
|
||||
|
||||
public override string Texture => "CalamityMod/Projectiles/InvisibleProj";
|
||||
|
||||
public int OwnerIndex
|
||||
{
|
||||
get => (int)Projectile.ai[1];
|
||||
set => Projectile.ai[1] = value;
|
||||
}
|
||||
|
||||
public override float MaxScale => Projectile.ai[0];
|
||||
|
||||
public override float MaxLaserLength => 2400f;
|
||||
|
||||
public override float Lifetime => 50;
|
||||
|
||||
public override Color LaserOverlayColor
|
||||
{
|
||||
get
|
||||
{
|
||||
return new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB, 0);
|
||||
}
|
||||
}
|
||||
|
||||
public override Color LightCastColor => Color.Transparent;
|
||||
|
||||
public override Texture2D LaserBeginTexture => ModContent.Request<Texture2D>("CalamityMod/Projectiles/Rogue/SeraphimBeamLarge", AssetRequestMode.ImmediateLoad).Value;
|
||||
|
||||
public override Texture2D LaserMiddleTexture => ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/Lasers/SeraphimBeamLargeMiddle", AssetRequestMode.ImmediateLoad).Value;
|
||||
|
||||
public override Texture2D LaserEndTexture => ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/Lasers/SeraphimBeamLargeEnd", AssetRequestMode.ImmediateLoad).Value;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.projFrames[Projectile.type] = 10;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Projectile.width = Projectile.height = 30;
|
||||
Projectile.hostile = true;
|
||||
Projectile.alpha = 255;
|
||||
Projectile.penetrate = -1;
|
||||
Projectile.ignoreWater = true;
|
||||
Projectile.tileCollide = false;
|
||||
Projectile.timeLeft = 200;
|
||||
Projectile.Calamity().DealsDefenseDamage = true;
|
||||
CooldownSlot = ImmunityCooldownID.Bosses;
|
||||
}
|
||||
|
||||
public override void SendExtraAI(BinaryWriter writer)
|
||||
{
|
||||
writer.Write(Projectile.localAI[0]);
|
||||
writer.Write(Projectile.localAI[1]);
|
||||
writer.Write(Projectile.scale);
|
||||
}
|
||||
|
||||
public override void ReceiveExtraAI(BinaryReader reader)
|
||||
{
|
||||
Projectile.localAI[0] = reader.ReadSingle();
|
||||
Projectile.localAI[1] = reader.ReadSingle();
|
||||
Projectile.scale = reader.ReadSingle();
|
||||
}
|
||||
|
||||
public override void UpdateLaserMotion()
|
||||
{
|
||||
// Update the direction and rotation of the laser.
|
||||
Projectile.velocity = Projectile.velocity.SafeNormalize(Vector2.UnitY);
|
||||
Projectile.rotation = Projectile.velocity.ToRotation() - MathHelper.PiOver2;
|
||||
}
|
||||
|
||||
public override float DetermineLaserLength() => MaxLaserLength;
|
||||
|
||||
public override void PostAI()
|
||||
{
|
||||
// Determine frames.
|
||||
Projectile.frameCounter++;
|
||||
if (Projectile.frameCounter % 5f == 4f)
|
||||
Projectile.frame = (Projectile.frame + 1) % Main.projFrames[Projectile.type];
|
||||
}
|
||||
|
||||
public override bool CanHitPlayer(Player target) => Projectile.scale >= 0.5f;
|
||||
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
// This should never happen, but just in case.
|
||||
if (Projectile.velocity == Vector2.Zero)
|
||||
return false;
|
||||
|
||||
Color beamColor = LaserOverlayColor;
|
||||
Rectangle startFrameArea = LaserBeginTexture.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame);
|
||||
Rectangle middleFrameArea = LaserMiddleTexture.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame);
|
||||
Rectangle endFrameArea = LaserEndTexture.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame);
|
||||
|
||||
// Start texture drawing.
|
||||
Vector2 centerOnLaser = Projectile.Center + Projectile.velocity * Projectile.scale * 116f;
|
||||
Main.EntitySpriteDraw(LaserBeginTexture,
|
||||
centerOnLaser - Main.screenPosition,
|
||||
startFrameArea,
|
||||
beamColor,
|
||||
Projectile.rotation,
|
||||
LaserBeginTexture.Size() / 2f,
|
||||
Projectile.scale,
|
||||
SpriteEffects.None,
|
||||
0);
|
||||
|
||||
// Prepare things for body drawing.
|
||||
float laserBodyLength = LaserLength + middleFrameArea.Height;
|
||||
|
||||
// Body drawing.
|
||||
if (laserBodyLength > 0f)
|
||||
{
|
||||
float laserOffset = middleFrameArea.Height * Projectile.scale;
|
||||
float incrementalBodyLength = 0f;
|
||||
while (incrementalBodyLength + 1f < laserBodyLength)
|
||||
{
|
||||
centerOnLaser += Projectile.velocity * laserOffset;
|
||||
incrementalBodyLength += laserOffset;
|
||||
Main.EntitySpriteDraw(LaserMiddleTexture,
|
||||
centerOnLaser - Main.screenPosition,
|
||||
middleFrameArea,
|
||||
beamColor,
|
||||
Projectile.rotation,
|
||||
LaserMiddleTexture.Size() * 0.5f,
|
||||
Projectile.scale,
|
||||
SpriteEffects.None,
|
||||
0);
|
||||
}
|
||||
}
|
||||
|
||||
Vector2 laserEndCenter = centerOnLaser + Projectile.velocity * endFrameArea.Height * Projectile.scale - Main.screenPosition;
|
||||
Main.EntitySpriteDraw(LaserEndTexture,
|
||||
laserEndCenter,
|
||||
endFrameArea,
|
||||
beamColor,
|
||||
Projectile.rotation,
|
||||
LaserEndTexture.Size() * 0.5f,
|
||||
Projectile.scale,
|
||||
SpriteEffects.None,
|
||||
0);
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.Audio;
|
||||
|
||||
namespace CalamityMod.Projectiles.Boss
|
||||
{
|
||||
public class CirrusBlaster : ModProjectile, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Projectiles.Boss";
|
||||
|
||||
public override string Texture => "CalamityMod/Items/Potions/Alcohol/OddMushroom";
|
||||
public static readonly SoundStyle SANSCharge = new("CalamityMod/Sounds/Custom/Ravager/GasterBlasterCharge");
|
||||
public static readonly SoundStyle SANSFire = new("CalamityMod/Sounds/Custom/Ravager/GasterBlasterFire");
|
||||
public Vector2 storedVelocity;
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Projectile.width = Projectile.height = 42;
|
||||
Projectile.hostile = true;
|
||||
Projectile.ignoreWater = true;
|
||||
Projectile.tileCollide = false;
|
||||
Projectile.timeLeft = 180;
|
||||
CooldownSlot = ImmunityCooldownID.Bosses;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
// ai0 = timer, ai1 = laser size
|
||||
if (Projectile.ai[0] < 90f) // Before the laser
|
||||
{
|
||||
Projectile.ai[0]++;
|
||||
if (storedVelocity == Vector2.Zero)
|
||||
{
|
||||
storedVelocity = Projectile.SafeDirectionTo(Projectile.velocity);
|
||||
Projectile.velocity = Vector2.Zero;
|
||||
Projectile.netUpdate = true;
|
||||
Projectile.rotation = (float)Math.Atan2(storedVelocity.Y, storedVelocity.X) + MathHelper.PiOver2;
|
||||
|
||||
SoundEngine.PlaySound(SANSCharge, Projectile.Center); // Funny Gaster Blaster sounds
|
||||
}
|
||||
else if (Projectile.ai[0] >= 55f)
|
||||
{
|
||||
Projectile.ai[0] = 90f;
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, storedVelocity, ModContent.ProjectileType<CirrusBlast>(), Projectile.damage, 0f, Projectile.owner, Projectile.ai[1], Projectile.whoAmI);
|
||||
|
||||
SoundEngine.PlaySound(SANSFire, Projectile.Center); // Funny Gaster Blaster sounds #2
|
||||
}
|
||||
}
|
||||
else // Move out and despawn
|
||||
{
|
||||
// Start moving
|
||||
if (Projectile.velocity == Vector2.Zero)
|
||||
Projectile.velocity = storedVelocity * -1f;
|
||||
else
|
||||
Projectile.velocity *= 1.01f;
|
||||
|
||||
// Fade out and die
|
||||
Projectile.alpha += 3;
|
||||
if (Projectile.alpha >= 255)
|
||||
Projectile.Kill();
|
||||
}
|
||||
}
|
||||
|
||||
// Does no contact damage
|
||||
public override bool? CanDamage() => false;
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,6 @@
|
||||
using CalamityMod.NPCs.Crabulon;
|
||||
using CalamityMod.NPCs;
|
||||
using CalamityMod.NPCs.Crabulon;
|
||||
using CalamityMod.NPCs.SupremeCalamitas;
|
||||
using CalamityMod.World;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
@@ -9,7 +11,20 @@ namespace CalamityMod.Systems
|
||||
{
|
||||
public override SceneEffectPriority Priority => SceneEffectPriority.BossHigh;
|
||||
|
||||
public override bool IsSceneEffectActive(Player player) => NPC.AnyNPCs(ModContent.NPCType<Crabulon>()) && Main.zenithWorld;
|
||||
public override bool IsSceneEffectActive(Player player)
|
||||
{
|
||||
bool cirrusSpecialAttack = false;
|
||||
if (CalamityGlobalNPC.SCal != -1)
|
||||
{
|
||||
if (Main.npc[CalamityGlobalNPC.SCal].active)
|
||||
{
|
||||
if (Main.npc[CalamityGlobalNPC.SCal].ModNPC<SupremeCalamitas>().cirrus)
|
||||
cirrusSpecialAttack = Main.npc[CalamityGlobalNPC.SCal].ModNPC<SupremeCalamitas>().gettingTired5;
|
||||
}
|
||||
}
|
||||
|
||||
return (NPC.AnyNPCs(ModContent.NPCType<Crabulon>()) && Main.zenithWorld) || cirrusSpecialAttack;
|
||||
}
|
||||
|
||||
public override void SpecialVisuals(Player player, bool isActive)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
using CalamityMod.NPCs.Crabulon;
|
||||
using CalamityMod.NPCs;
|
||||
using CalamityMod.NPCs.Crabulon;
|
||||
using CalamityMod.NPCs.SupremeCalamitas;
|
||||
using CalamityMod.World;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
@@ -11,6 +13,7 @@ namespace CalamityMod.Skies
|
||||
public class DrunkCrabScreenShaderData : ScreenShaderData
|
||||
{
|
||||
public int CrabIndex;
|
||||
public int CirrusIndex;
|
||||
|
||||
public DrunkCrabScreenShaderData(string passName)
|
||||
: base(passName)
|
||||
@@ -20,38 +23,108 @@ namespace CalamityMod.Skies
|
||||
public void UpdateBossIndex()
|
||||
{
|
||||
int CrabType = ModContent.NPCType<Crabulon>();
|
||||
if (CrabIndex >= 0 && Main.npc[CrabIndex].active && Main.npc[CrabIndex].type == CrabType)
|
||||
int CirrusType = ModContent.NPCType<SupremeCalamitas>();
|
||||
bool shouldCheckForCirrus = false;
|
||||
if (CalamityGlobalNPC.SCal != -1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
CrabIndex = -1;
|
||||
for (int i = 0; i < Main.npc.Length; i++)
|
||||
{
|
||||
if (Main.npc[i].active && Main.npc[i].type == CrabType)
|
||||
if (Main.npc[CalamityGlobalNPC.SCal].active)
|
||||
{
|
||||
CrabIndex = i;
|
||||
break;
|
||||
if (Main.npc[CalamityGlobalNPC.SCal].ModNPC<SupremeCalamitas>().cirrus)
|
||||
shouldCheckForCirrus = Main.npc[CalamityGlobalNPC.SCal].ModNPC<SupremeCalamitas>().gettingTired5;
|
||||
}
|
||||
}
|
||||
|
||||
if (shouldCheckForCirrus)
|
||||
{
|
||||
if (CirrusIndex >= 0 && Main.npc[CirrusIndex].active && Main.npc[CirrusIndex].type == CirrusType)
|
||||
{
|
||||
return;
|
||||
}
|
||||
CirrusIndex = -1;
|
||||
for (int i = 0; i < Main.npc.Length; i++)
|
||||
{
|
||||
if (Main.npc[i].active && Main.npc[i].type == CirrusType)
|
||||
{
|
||||
CirrusIndex = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (CrabIndex >= 0 && Main.npc[CrabIndex].active && Main.npc[CrabIndex].type == CrabType)
|
||||
{
|
||||
return;
|
||||
}
|
||||
CrabIndex = -1;
|
||||
for (int i = 0; i < Main.npc.Length; i++)
|
||||
{
|
||||
if (Main.npc[i].active && Main.npc[i].type == CrabType)
|
||||
{
|
||||
CrabIndex = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void Update(GameTime gameTime)
|
||||
{
|
||||
if (CrabIndex == -1 || !Main.zenithWorld)
|
||||
bool shouldCheckForCirrus = false;
|
||||
if (CalamityGlobalNPC.SCal != -1)
|
||||
{
|
||||
if (Main.npc[CalamityGlobalNPC.SCal].active)
|
||||
{
|
||||
if (Main.npc[CalamityGlobalNPC.SCal].ModNPC<SupremeCalamitas>().cirrus)
|
||||
shouldCheckForCirrus = Main.npc[CalamityGlobalNPC.SCal].ModNPC<SupremeCalamitas>().gettingTired5;
|
||||
}
|
||||
}
|
||||
|
||||
if (shouldCheckForCirrus)
|
||||
{
|
||||
if (CirrusIndex == -1)
|
||||
{
|
||||
UpdateBossIndex();
|
||||
if (CirrusIndex == -1)
|
||||
Filters.Scene["CalamityMod:DrunkCrabulon"].Deactivate();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
UpdateBossIndex();
|
||||
if (CrabIndex == -1 || !Main.zenithWorld)
|
||||
Filters.Scene["CalamityMod:DrunkCrabulon"].Deactivate();
|
||||
{
|
||||
UpdateBossIndex();
|
||||
if (CrabIndex == -1 || !Main.zenithWorld)
|
||||
Filters.Scene["CalamityMod:DrunkCrabulon"].Deactivate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void Apply()
|
||||
{
|
||||
UpdateBossIndex();
|
||||
if (CrabIndex != -1)
|
||||
|
||||
bool shouldCheckForCirrus = false;
|
||||
if (CalamityGlobalNPC.SCal != -1)
|
||||
{
|
||||
UseTargetPosition(Main.npc[CrabIndex].Center);
|
||||
if (Main.npc[CalamityGlobalNPC.SCal].active)
|
||||
{
|
||||
if (Main.npc[CalamityGlobalNPC.SCal].ModNPC<SupremeCalamitas>().cirrus)
|
||||
shouldCheckForCirrus = Main.npc[CalamityGlobalNPC.SCal].ModNPC<SupremeCalamitas>().gettingTired5;
|
||||
}
|
||||
}
|
||||
|
||||
if (shouldCheckForCirrus)
|
||||
{
|
||||
if (CirrusIndex != -1)
|
||||
UseTargetPosition(Main.npc[CirrusIndex].Center);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (CrabIndex != -1)
|
||||
UseTargetPosition(Main.npc[CrabIndex].Center);
|
||||
}
|
||||
|
||||
base.Apply();
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
Reference in new issue
Block a user