Brothers P3 + Moon Change
More brothers stuff and moon is faster over all
This commit is contained in:
1 parent
44f7a9bb16
commit
5ea11613d9
7 files changed
+131
-74
No files matched your search
@@ -195,6 +195,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
public static readonly SoundStyle BrimstoneShotSound = new("CalamityMod/Sounds/Custom/SCalSounds/BrimstoneShoot");
|
||||
public static readonly SoundStyle BrotherHit = new("CalamityMod/Sounds/Custom/SCalSounds/BrothersHurt", 2);
|
||||
public static readonly SoundStyle BrotherDeath = new("CalamityMod/Sounds/Custom/SCalSounds/BrothersDeath", 2);
|
||||
public static readonly SoundStyle CatastropheSwing = new("CalamityMod/Sounds/Custom/SCalSounds/CatastropheResonanceSlash1");
|
||||
public static readonly SoundStyle BrimstoneBigShotSound = new("CalamityMod/Sounds/Custom/SCalSounds/BrimstoneBigShoot"); // DON'T YOU WANNA BE A [BIG SHOT]
|
||||
public static readonly SoundStyle DashSound = new("CalamityMod/Sounds/Custom/SCalSounds/SCalDash");
|
||||
public static readonly SoundStyle HellblastSound = new("CalamityMod/Sounds/Custom/SCalSounds/BrimstoneHellblastSound");
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
|
||||
public const int PreBigAttackPause = 50;
|
||||
public const float NormalBrothersDR = 0.25f;
|
||||
public int BigAttackLimit = 4;
|
||||
public int BigAttackLimit = 8;
|
||||
public bool targetSide = false;
|
||||
public int secondOrbTimer = 0;
|
||||
public Vector2 offset = Vector2.Zero;
|
||||
@@ -194,8 +194,8 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
float acceleration = Utils.Remap(AttackDelayTimer, 0f, 120f, 2f, 4f);
|
||||
int verticalSpeed = (int)Math.Round(MathHelper.Lerp(2f, 6.5f, 1f - totalLifeRatio));
|
||||
|
||||
bool isBroDead = NPC.AnyNPCs(ModContent.NPCType<SupremeCatastrophe>()) == false ? true : false;
|
||||
if (totalLifeRatio < 0.3 && !isBroDead)
|
||||
bool Phase2 = NPC.AnyNPCs(ModContent.NPCType<SupremeCatastrophe>()) == false ? true : false;
|
||||
if (NPC.life / (float)NPC.lifeMax < (death ? 0.6 : 0.4) && !Phase2)
|
||||
{
|
||||
if (EnrageRoar)
|
||||
{
|
||||
@@ -203,21 +203,21 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
SoundStyle yell = new("CalamityMod/Sounds/NPCKilled/RavagerLimbLoss2");
|
||||
SoundEngine.PlaySound(yell with { Volume = 1.5f, Pitch = 0.3f }, NPC.Center);
|
||||
}
|
||||
isBroDead = true;
|
||||
Phase2 = true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Buffs for the big attack when the other brother dies
|
||||
if (isBroDead && BigAttackTimer > 400)
|
||||
if (Phase2 && BigAttackTimer > 400)
|
||||
BigAttackTimer = 400;
|
||||
|
||||
if (isBroDead && BigAttackTimer > 0 && BigAttackLimit < 19)
|
||||
if (Phase2 && BigAttackTimer > 0 && BigAttackLimit < 19)
|
||||
BigAttackLimit = 19;
|
||||
|
||||
if (BigAttackTimer > PreBigAttackPause)
|
||||
{
|
||||
if (isBroDead)
|
||||
if (Phase2)
|
||||
{
|
||||
if (MovingUp)
|
||||
{
|
||||
@@ -308,8 +308,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
else if (BigAttackTimer > PreBigAttackPause)
|
||||
{
|
||||
// Shoot fists.
|
||||
float fireVelocity = isBroDead ? -8.8f : -8;
|
||||
float fireRate = BossRushEvent.BossRushActive ? 2f : MathHelper.Lerp(1f, 2.5f, 1f - totalLifeRatio) * (isBroDead ? 1.2f : 1);
|
||||
float fireRate = BossRushEvent.BossRushActive ? 2f : MathHelper.Lerp(1.5f, 2.5f, 1f - totalLifeRatio) * (NPC.AnyNPCs(ModContent.NPCType<SupremeCatastrophe>()) == false ? 1.2f : 1);
|
||||
|
||||
PunchCounter += fireRate;
|
||||
if (PunchCounter >= PunchCounterLimit)
|
||||
@@ -324,18 +323,18 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
Vector2 fistSpawnPosition = NPC.Center + Vector2.UnitX * 74f * NPC.direction;
|
||||
if (isBroDead)
|
||||
if (Phase2)
|
||||
{
|
||||
if (PunchingFromRight)
|
||||
Projectile.NewProjectile(NPC.GetSource_FromAI(), fistSpawnPosition, NPC.DirectionTo(Target.Center) * 12f, type, damage, 0f, Main.myPlayer, 0f, PunchingFromRight.ToInt(), 2);
|
||||
Projectile.NewProjectile(NPC.GetSource_FromAI(), fistSpawnPosition, NPC.DirectionTo(Target.Center) * 15f, type, damage, 0f, Main.myPlayer, 0f, PunchingFromRight.ToInt(), 2);
|
||||
else
|
||||
{
|
||||
Projectile.NewProjectile(NPC.GetSource_FromAI(), fistSpawnPosition, NPC.DirectionTo(Target.Center).RotatedBy(0.6) * 12f, type, damage, 0f, Main.myPlayer, 0f, PunchingFromRight.ToInt(), 2);
|
||||
Projectile.NewProjectile(NPC.GetSource_FromAI(), fistSpawnPosition, NPC.DirectionTo(Target.Center).RotatedBy(-0.6) * 12f, type, damage, 0f, Main.myPlayer, 0f, PunchingFromRight.ToInt(), 2);
|
||||
Projectile.NewProjectile(NPC.GetSource_FromAI(), fistSpawnPosition, NPC.DirectionTo(Target.Center).RotatedBy(0.45) * 15f, type, damage, 0f, Main.myPlayer, 0f, PunchingFromRight.ToInt(), 2);
|
||||
Projectile.NewProjectile(NPC.GetSource_FromAI(), fistSpawnPosition, NPC.DirectionTo(Target.Center).RotatedBy(-0.45) * 15f, type, damage, 0f, Main.myPlayer, 0f, PunchingFromRight.ToInt(), 2);
|
||||
}
|
||||
}
|
||||
else
|
||||
Projectile.NewProjectile(NPC.GetSource_FromAI(), fistSpawnPosition, NPC.DirectionTo(Target.Center) * 16f, type, damage, 0f, Main.myPlayer, 0f, PunchingFromRight.ToInt(), 2);
|
||||
Projectile.NewProjectile(NPC.GetSource_FromAI(), fistSpawnPosition, NPC.DirectionTo(Target.Center) * 15f, type, damage, 0f, Main.myPlayer, 0f, PunchingFromRight.ToInt(), 2);
|
||||
}
|
||||
PunchingFromRight = !PunchingFromRight;
|
||||
CurrentFrame = 0;
|
||||
@@ -364,7 +363,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
else
|
||||
{
|
||||
// Shoot fists.
|
||||
float fireRate = (BossRushEvent.BossRushActive ? 3f + (isBroDead ? (19 - BigAttackLimit) * 0.45f : 0) : MathHelper.Lerp(2f, (4f + (isBroDead ? (19 - BigAttackLimit) * 0.45f : 0)), 1f - totalLifeRatio) * (isBroDead ? 1.2f : 1));
|
||||
float fireRate = (BossRushEvent.BossRushActive ? 3.5f + (Phase2 ? (19 - BigAttackLimit) * 0.45f : 0) : MathHelper.Lerp(3f, (4f + (Phase2 ? (19 - BigAttackLimit) * 0.45f : 0)), 1f - totalLifeRatio) * (NPC.AnyNPCs(ModContent.NPCType<SupremeCatastrophe>()) == false ? 1.2f : 1));
|
||||
|
||||
PunchCounter += fireRate;
|
||||
if (PunchCounter >= PunchCounterLimit)
|
||||
@@ -375,17 +374,20 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
int damage = NPC.GetProjectileDamage(type);
|
||||
if (bossRush)
|
||||
damage /= 2;
|
||||
Vector2 fistSpawnPosition = NPC.Center + Vector2.UnitX * 74f * NPC.direction;
|
||||
|
||||
if (BigAttackLimit == 0 && isBroDead)
|
||||
if (BigAttackLimit == (Phase2 ? 1 : 0) && death)
|
||||
{
|
||||
Projectile.NewProjectile(NPC.GetSource_FromAI(), fistSpawnPosition, (NPC.DirectionTo(Target.Center) * 13f).RotatedBy(0.4f), type, damage, 0f, Main.myPlayer, 0f, 1, 2);
|
||||
Projectile.NewProjectile(NPC.GetSource_FromAI(), fistSpawnPosition, (NPC.DirectionTo(Target.Center) * 13f).RotatedBy(0.8f), type, damage, 0f, Main.myPlayer, 0f, 0, 2);
|
||||
Projectile.NewProjectile(NPC.GetSource_FromAI(), fistSpawnPosition, (NPC.DirectionTo(Target.Center) * 13f).RotatedBy(-0.4f), type, damage, 0f, Main.myPlayer, 0f, 1, 2);
|
||||
Projectile.NewProjectile(NPC.GetSource_FromAI(), fistSpawnPosition, (NPC.DirectionTo(Target.Center) * 13f).RotatedBy(-0.8f), type, damage, 0f, Main.myPlayer, 0f, 0, 2);
|
||||
SoundEngine.PlaySound(SupremeCalamitas.BrimstoneShotSound with { Volume = 1.8f, Pitch = 0.2f }, NPC.Center);
|
||||
}
|
||||
else if (BigAttackLimit == 0 && Phase2)
|
||||
{
|
||||
Vector2 fistSpawnPosition = NPC.Center + Vector2.UnitX * 74f * NPC.direction;
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
Projectile.NewProjectile(NPC.GetSource_FromAI(), fistSpawnPosition, (NPC.DirectionTo(Target.Center) * 12f).RotatedBy(0.5f), type, damage, 0f, Main.myPlayer, 0f, 1, 2);
|
||||
Projectile.NewProjectile(NPC.GetSource_FromAI(), fistSpawnPosition, (NPC.DirectionTo(Target.Center) * 12f).RotatedBy(0.8f), type, damage, 0f, Main.myPlayer, 0f, 0, 2);
|
||||
Projectile.NewProjectile(NPC.GetSource_FromAI(), fistSpawnPosition, (NPC.DirectionTo(Target.Center) * 12f).RotatedBy(-0.5f), type, damage, 0f, Main.myPlayer, 0f, 1, 2);
|
||||
Projectile.NewProjectile(NPC.GetSource_FromAI(), fistSpawnPosition, (NPC.DirectionTo(Target.Center) * 12f).RotatedBy(-0.8f), type, damage, 0f, Main.myPlayer, 0f, 0, 2);
|
||||
|
||||
Projectile.NewProjectile(NPC.GetSource_FromAI(), fistSpawnPosition, NPC.DirectionTo(Target.Center) * 9.5f, type, damage, 0f, Main.myPlayer, 0f, PunchingFromRight.ToInt(), 3);
|
||||
}
|
||||
SoundEngine.PlaySound(SupremeCalamitas.BrimstoneShotSound with { Volume = 1.8f, Pitch = 0.5f }, NPC.Center);
|
||||
@@ -404,8 +406,13 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
else if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
SoundEngine.PlaySound(SupremeCalamitas.BrimstoneShotSound with { Volume = 1.2f, Pitch = 0.4f }, NPC.Center);
|
||||
Vector2 fistSpawnPosition = NPC.Center;
|
||||
Projectile.NewProjectile(NPC.GetSource_FromAI(), fistSpawnPosition, NPC.DirectionTo(Target.Center) * (7f - (isBroDead ? (19 - BigAttackLimit) * 0.15f : 0)), type, damage, 0f, Main.myPlayer, 0f, PunchingFromRight.ToInt(), 1);
|
||||
Vector2 randPos = (NPC.DirectionTo(Target.Center) * 1.5f).RotatedBy(MathHelper.ToRadians(90f)) * Main.rand.NextFloat(-25, 25);
|
||||
Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + randPos, NPC.DirectionTo(Target.Center) * (7f - (Phase2 ? (19 - BigAttackLimit) * 0.15f : (8 - BigAttackLimit) * 0.15f)), type, damage, 0f, Main.myPlayer, 0f, PunchingFromRight.ToInt(), 1);
|
||||
for (int i = 0; i < 7; i++)
|
||||
{
|
||||
GlowOrbParticle orb = new GlowOrbParticle(NPC.Center + NPC.DirectionTo(Target.Center) * 10f, (NPC.DirectionTo(Target.Center) * 30f).RotatedByRandom(0.6f) * Main.rand.NextFloat(0.4f, 1.1f), false, 50, Main.rand.NextFloat(1.75f, 3.25f), Color.Lerp(Color.Red, Color.Magenta, 0.5f), true);
|
||||
GeneralParticleHandler.SpawnParticle(orb);
|
||||
}
|
||||
}
|
||||
PunchingFromRight = !PunchingFromRight;
|
||||
CurrentFrame = 0;
|
||||
@@ -415,7 +422,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
{
|
||||
BigAttackTimer = 600;
|
||||
AttackDelayTimer = 0;
|
||||
BigAttackLimit = 4;
|
||||
BigAttackLimit = 8;
|
||||
|
||||
targetSide = !targetSide;
|
||||
}
|
||||
|
||||
@@ -30,13 +30,14 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
public const int SlashCounterLimit = 50;
|
||||
public const int DartBurstCounterLimit = 300;
|
||||
public const int PreBigAttackPause = 50;
|
||||
public int BigAttackLimit = 4;
|
||||
public int BigAttackLimit = 8;
|
||||
public bool targetSide = false;
|
||||
public int dashAttackTimer = 0;
|
||||
public int dashes = 0;
|
||||
public Vector2 offset = Vector2.Zero;
|
||||
public bool MovingUp = false;
|
||||
public bool EnrageRoar = true;
|
||||
public int accSlashCounter = 0;
|
||||
public Player Target => Main.player[NPC.target];
|
||||
public ref float SlashCounter => ref NPC.ai[1];
|
||||
public ref float DartBurstCounter => ref NPC.ai[2];
|
||||
@@ -188,8 +189,8 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
float acceleration = Utils.Remap(AttackDelayTimer, 0f, 120f, 2f, 4f);
|
||||
int verticalSpeed = (int)Math.Round(MathHelper.Lerp(2f, 6.5f, 1f - totalLifeRatio));
|
||||
|
||||
bool isBroDead = NPC.AnyNPCs(ModContent.NPCType<SupremeCataclysm>()) == false ? true : false;
|
||||
if (totalLifeRatio < 0.3 && !isBroDead)
|
||||
bool Phase2 = NPC.AnyNPCs(ModContent.NPCType<SupremeCataclysm>()) == false ? true : false;
|
||||
if (NPC.life / (float)NPC.lifeMax < (death ? 0.6 : 0.4) && !Phase2)
|
||||
{
|
||||
if (EnrageRoar)
|
||||
{
|
||||
@@ -197,20 +198,20 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
SoundStyle yell = new("CalamityMod/Sounds/NPCKilled/RavagerLimbLoss2");
|
||||
SoundEngine.PlaySound(yell with { Volume = 1.5f, Pitch = 0.3f }, NPC.Center);
|
||||
}
|
||||
isBroDead = true;
|
||||
Phase2 = true;
|
||||
}
|
||||
|
||||
|
||||
// Buffs for the big attack when the other brother dies
|
||||
if (isBroDead && BigAttackTimer > 400)
|
||||
if (Phase2 && BigAttackTimer > 400)
|
||||
BigAttackTimer = 400;
|
||||
|
||||
if (isBroDead && BigAttackTimer > 0 && BigAttackLimit < 9)
|
||||
BigAttackLimit = 9;
|
||||
if (Phase2 && BigAttackTimer > 0 && BigAttackLimit < 11)
|
||||
BigAttackLimit = 11;
|
||||
|
||||
if (BigAttackTimer > PreBigAttackPause)
|
||||
{
|
||||
if (isBroDead)
|
||||
if (Phase2)
|
||||
{
|
||||
if (MovingUp)
|
||||
{
|
||||
@@ -234,7 +235,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
}
|
||||
|
||||
// Hover to the side of the target.
|
||||
Vector2 idealVelocity = NPC.SafeDirectionTo(Target.Center + new Vector2(-HorizontalOffset * (targetSide ? -1 : 1), VerticalOffset)) * (isBroDead ? Utils.Remap(AttackDelayTimer, 0f, 120f, 15f, 50f) : Utils.Remap(AttackDelayTimer, 60f, 120f, 0f, 50f));
|
||||
Vector2 idealVelocity = NPC.SafeDirectionTo(Target.Center + new Vector2(-HorizontalOffset * (targetSide ? -1 : 1), VerticalOffset)) * (Phase2 ? Utils.Remap(AttackDelayTimer, 0f, 120f, 15f, 50f) : Utils.Remap(AttackDelayTimer, 60f, 120f, 0f, 50f));
|
||||
if (SlashCounter <= SlashCounterLimit * 0.3f && dashAttackTimer == 0)
|
||||
{
|
||||
if (AttackDelayTimer == 120 && Main.rand.NextBool())
|
||||
@@ -262,12 +263,12 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
|
||||
Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center, NPC.velocity.SafeNormalize(Vector2.UnitY) * 0.1f, type, damage, 0f, Main.myPlayer, 0f, SlashingFromRight.ToInt(), 4 + dashes);
|
||||
dashes++;
|
||||
if (dashes == 30)
|
||||
if (dashes == 30 && NPC.AnyNPCs(ModContent.NPCType<SupremeCataclysm>()) == false)
|
||||
{
|
||||
SoundStyle slash = new("CalamityMod/Sounds/Item/MurasamaBigSwing");
|
||||
SoundEngine.PlaySound(slash with { Volume = 0.55f, Pitch = -0.3f }, NPC.Center);
|
||||
Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center, NPC.DirectionTo(Target.Center).RotatedBy(0.3f) * 90f, type, damage, 0f, Main.myPlayer, 0f, 5, 50);
|
||||
Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center, NPC.DirectionTo(Target.Center).RotatedBy(-0.3f) * 90f, type, damage, 0f, Main.myPlayer, 0f, 5, 50);
|
||||
Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + NPC.DirectionTo(Target.Center) * 130, NPC.DirectionTo(Target.Center).RotatedBy(0.3f) * 80f, type, damage, 0f, Main.myPlayer, 0f, 5, 50);
|
||||
Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + NPC.DirectionTo(Target.Center) * 130, NPC.DirectionTo(Target.Center).RotatedBy(-0.3f) * 80f, type, damage, 0f, Main.myPlayer, 0f, 5, 50);
|
||||
for (int i = 0; i < 30; i++)
|
||||
{
|
||||
Vector2 vel = new Vector2(7, 7).RotatedByRandom(100) * Main.rand.NextFloat(0.1f, 2.5f);
|
||||
@@ -330,13 +331,12 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
else if (BigAttackTimer > PreBigAttackPause)
|
||||
{
|
||||
// Shoot sword slashes.
|
||||
float fireVelocity = isBroDead ? 4.4f : 4;
|
||||
float fireRate = BossRushEvent.BossRushActive ? 2f : MathHelper.Lerp(1f, 2.5f, 1f - totalLifeRatio) * (isBroDead ? 1.25f : 1);
|
||||
float fireRate = BossRushEvent.BossRushActive ? 2f : MathHelper.Lerp(1.5f, 2.5f, 1f - totalLifeRatio) * (NPC.AnyNPCs(ModContent.NPCType<SupremeCataclysm>()) == false ? 1.25f : 1);
|
||||
SlashCounter += fireRate;
|
||||
if (SlashCounter >= SlashCounterLimit)
|
||||
{
|
||||
SlashCounter = 0f;
|
||||
SoundEngine.PlaySound(SupremeCalamitas.BrimstoneShotSound, NPC.Center);
|
||||
SoundEngine.PlaySound(SupremeCalamitas.CatastropheSwing with { Volume = 0.5f, Pitch = (SlashingFromRight ? 0.2f : -0.2f) }, NPC.Center);
|
||||
|
||||
int type = ModContent.ProjectileType<SupremeCatastropheSlash>();
|
||||
int damage = NPC.GetProjectileDamage(type);
|
||||
@@ -345,16 +345,21 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
Vector2 slashSpawnPosition = NPC.Center + Vector2.UnitX * 125f * NPC.direction;
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
if (isBroDead)
|
||||
Vector2 firingVelocity = (NPC.AnyNPCs(ModContent.NPCType<SupremeCataclysm>()) == false ? (NPC.DirectionTo(Target.Center) + Target.velocity * 0.032f).SafeNormalize(Vector2.UnitY) : NPC.DirectionTo(Target.Center));
|
||||
if (Phase2)
|
||||
{
|
||||
if (SlashingFromRight)
|
||||
Projectile.NewProjectile(NPC.GetSource_FromAI(), slashSpawnPosition, NPC.DirectionTo(Target.Center) * 8f, type, damage, 0f, Main.myPlayer, 0f, SlashingFromRight.ToInt(), 2);
|
||||
if (accSlashCounter < 3)
|
||||
{
|
||||
accSlashCounter++;
|
||||
Projectile.NewProjectile(NPC.GetSource_FromAI(), slashSpawnPosition, firingVelocity * 7f, type, damage, 0f, Main.myPlayer, 0f, SlashingFromRight.ToInt(), 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
SoundStyle slash = new("CalamityMod/Sounds/Item/MurasamaBigSwing");
|
||||
SoundEngine.PlaySound(slash with { Volume = 0.55f, Pitch = 0.4f }, NPC.Center);
|
||||
|
||||
Projectile.NewProjectile(NPC.GetSource_FromAI(), slashSpawnPosition, NPC.DirectionTo(Target.Center) * 0.2f, type, damage, 0f, Main.myPlayer, 0f, SlashingFromRight.ToInt(), 3);
|
||||
Projectile.NewProjectile(NPC.GetSource_FromAI(), slashSpawnPosition, firingVelocity * 0.2f, type, damage, 0f, Main.myPlayer, 0f, SlashingFromRight.ToInt(), 3);
|
||||
accSlashCounter = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -387,8 +392,8 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
else
|
||||
{
|
||||
// Shoot sword slashes.
|
||||
float fireRate = BossRushEvent.BossRushActive ? 3 : MathHelper.Lerp(2f, 4f, 1f - totalLifeRatio) * (isBroDead ? 1.2f : 1);
|
||||
if (isBroDead && BigAttackLimit == 0)
|
||||
float fireRate = BossRushEvent.BossRushActive ? 4f : MathHelper.Lerp(3f, 5f, 1f - totalLifeRatio) * (NPC.AnyNPCs(ModContent.NPCType<SupremeCataclysm>()) == false ? 1.2f : 1);
|
||||
if (Phase2 && BigAttackLimit == 0)
|
||||
fireRate = 1;
|
||||
SlashCounter += fireRate;
|
||||
if (SlashCounter >= SlashCounterLimit)
|
||||
@@ -400,21 +405,33 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
if (bossRush)
|
||||
damage /= 2;
|
||||
Vector2 slashSpawnPosition = NPC.Center;
|
||||
if (BigAttackLimit == 0 && isBroDead)
|
||||
Vector2 firingVelocity = (NPC.AnyNPCs(ModContent.NPCType<SupremeCataclysm>()) == false ? (NPC.DirectionTo(Target.Center) + Target.velocity * 0.032f).SafeNormalize(Vector2.UnitY) : NPC.DirectionTo(Target.Center));
|
||||
if (BigAttackLimit == 0 && !Phase2 && death)
|
||||
{
|
||||
Projectile.NewProjectile(NPC.GetSource_FromAI(), slashSpawnPosition, firingVelocity * 90f, type, damage, 0f, Main.myPlayer, 0f, 5, 50);
|
||||
SoundStyle slash = new("CalamityMod/Sounds/Item/MurasamaBigSwing");
|
||||
SoundEngine.PlaySound(slash with { Volume = 0.55f, Pitch = -0.3f }, NPC.Center);
|
||||
}
|
||||
else if (BigAttackLimit == 0 && Phase2)
|
||||
{
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
SoundStyle charge = new("CalamityMod/Sounds/Item/ExobladeBeamSlash");
|
||||
SoundEngine.PlaySound(charge with { Volume = 0.85f, Pitch = -0.5f }, NPC.Center);
|
||||
NPC.velocity = NPC.DirectionTo(Target.Center) * 90f;
|
||||
NPC.velocity = firingVelocity * 90f;
|
||||
dashAttackTimer = 30;
|
||||
dashes = 0;
|
||||
}
|
||||
}
|
||||
else if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
SoundEngine.PlaySound(SupremeCalamitas.BrimstoneShotSound with { Volume = 1.2f, Pitch = 0.4f }, NPC.Center);
|
||||
SoundEngine.PlaySound(SupremeCalamitas.CatastropheSwing with { Volume = 0.5f, Pitch = (SlashingFromRight ? 0.2f : -0.2f) }, NPC.Center);
|
||||
Projectile.NewProjectile(NPC.GetSource_FromAI(), slashSpawnPosition, NPC.DirectionTo(Target.Center) * 8f, type, damage, 0f, Main.myPlayer, 0f, SlashingFromRight.ToInt(), 1);
|
||||
for (int i = 0; i < 7; i++)
|
||||
{
|
||||
SparkParticle orb = new SparkParticle(NPC.Center + NPC.DirectionTo(Target.Center) * 10f, (NPC.DirectionTo(Target.Center) * 30f).RotatedByRandom(0.6f) * Main.rand.NextFloat(0.4f, 1.1f), false, 40, Main.rand.NextFloat(0.75f, 2.25f), Color.Cyan);
|
||||
GeneralParticleHandler.SpawnParticle(orb);
|
||||
}
|
||||
}
|
||||
|
||||
SlashingFromRight = !SlashingFromRight;
|
||||
@@ -425,7 +442,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
{
|
||||
BigAttackTimer = 600;
|
||||
AttackDelayTimer = 0;
|
||||
BigAttackLimit = 4;
|
||||
BigAttackLimit = 8;
|
||||
|
||||
targetSide = !targetSide;
|
||||
}
|
||||
|
||||
@@ -197,13 +197,13 @@ namespace CalamityMod.Projectiles.Boss
|
||||
Lighting.AddLight(Projectile.Center, 3f * Projectile.Opacity, 0f, 0f);
|
||||
|
||||
float inertia = (revenge ? 4.5f : 5f) + speedAdd;
|
||||
float speed = (revenge ? 1.5f : 1.35f) + (speedAdd * 0.25f);
|
||||
float speed = (revenge ? 2.2f : 1.85f) + (speedAdd * 0.25f);
|
||||
float minDist = 160f;
|
||||
|
||||
if (NPC.AnyNPCs(ModContent.NPCType<SoulSeekerSupreme>()))
|
||||
if (NPC.AnyNPCs(ModContent.NPCType<SoulSeekerSupreme>()) || NPC.AnyNPCs(ModContent.NPCType<BrimstoneHeart>()))
|
||||
{
|
||||
inertia *= 1.5f;
|
||||
speed *= 0.5f;
|
||||
speed *= 0.8f;
|
||||
}
|
||||
|
||||
int target = (int)Projectile.ai[0];
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
using System;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using CalamityMod.NPCs.SupremeCalamitas;
|
||||
using CalamityMod.Particles;
|
||||
using CalamityMod.Events;
|
||||
using CalamityMod.World;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
@@ -16,6 +19,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
public new string LocalizationCategory => "Projectiles.Boss";
|
||||
public ref float Time => ref Projectile.ai[0];
|
||||
public Vector2 shootVel;
|
||||
public int rotDirection = 1;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
@@ -24,7 +28,8 @@ namespace CalamityMod.Projectiles.Boss
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Projectile.width = Projectile.height = 44;
|
||||
Projectile.width = 126;
|
||||
Projectile.height = 54;
|
||||
Projectile.hostile = true;
|
||||
Projectile.ignoreWater = true;
|
||||
Projectile.tileCollide = false;
|
||||
@@ -36,31 +41,50 @@ namespace CalamityMod.Projectiles.Boss
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
// Difficulty modes
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
|
||||
if (Projectile.ai[2] >= 3)
|
||||
{
|
||||
if (Projectile.timeLeft > 180)
|
||||
if (Projectile.timeLeft > 240)
|
||||
{
|
||||
shootVel = Projectile.velocity * 2;
|
||||
Projectile.timeLeft = 180;
|
||||
shootVel = Projectile.velocity * 0.2f;
|
||||
Projectile.timeLeft = 240;
|
||||
rotDirection = Main.rand.NextBool() ? -1 : 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
Vector2 randPos = Main.rand.NextVector2Circular(30, 30);
|
||||
float randSize = Main.rand.NextFloat(0.8f, 1.2f);
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
Particle bloom = new CustomPulse(Projectile.Center + randPos, Vector2.Zero, Color.Lerp(Color.Red, Color.Magenta, 0.5f), "CalamityMod/Particles/LargeBloom", new Vector2(1, 1), Main.rand.NextFloat(-10, 10), 1.1f, 0f, 14);
|
||||
Particle bloom = new CustomPulse(Projectile.Center, Vector2.Zero, Color.Lerp(Color.Red, Color.Magenta, 0.5f), "CalamityMod/Particles/LargeBloom", new Vector2(1, 1), Main.rand.NextFloat(-10, 10), 1.7f * randSize, 0f, 10);
|
||||
GeneralParticleHandler.SpawnParticle(bloom);
|
||||
}
|
||||
Particle bloom2 = new CustomPulse(Projectile.Center + randPos, Vector2.Zero, Color.White, "CalamityMod/Particles/LargeBloom", new Vector2(1, 1), Main.rand.NextFloat(-10, 10), 1f, 0f, 14);
|
||||
GeneralParticleHandler.SpawnParticle(bloom2);
|
||||
Projectile.velocity *= 0.99f;
|
||||
Particle bloom3 = new CustomPulse(Projectile.Center, Vector2.Zero, Color.White * 0.9f, "CalamityMod/Particles/LargeBloom", new Vector2(1, 1), Main.rand.NextFloat(-10, 10), 1.4f * randSize, 0f, 10);
|
||||
GeneralParticleHandler.SpawnParticle(bloom3);
|
||||
|
||||
Projectile.velocity *= 0.985f;
|
||||
}
|
||||
|
||||
|
||||
// Adds rotation, but it's SUPER unfair a lot of the time
|
||||
//shootVel = shootVel.RotatedBy(Time * 0.00011f * rotDirection);
|
||||
|
||||
if (Projectile.timeLeft >= 2 && Time % 3 == 0)
|
||||
{
|
||||
Vector2 randPos = shootVel.RotatedBy(MathHelper.ToRadians(90f)) * Main.rand.NextFloat(-25, 25);
|
||||
int type = ModContent.ProjectileType<SupremeCataclysmFist>();
|
||||
SoundEngine.PlaySound(SupremeCalamitas.BrimstoneShotSound with { Volume = 1.2f, Pitch = 0.55f }, Projectile.Center);
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromAI(), Projectile.Center + Main.rand.NextVector2Circular(40, 40), (shootVel * MathHelper.Clamp(Time * 0.1f, 1, 1.4f)).RotatedByRandom(0.3f) * Main.rand.NextFloat(0.4f, 0.9f), type, Projectile.damage / 2, 0f, Main.myPlayer, 0f, Main.rand.Next(0, 1 + 1), 0);
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromAI(), Projectile.Center + randPos, (shootVel * MathHelper.Clamp(Time * 0.1f, 1, 1.8f)) * Main.rand.NextFloat(0.6f, 0.9f), type, Projectile.damage / 2, 0f, Main.myPlayer, 0f, Main.rand.Next(0, 1 + 1), 0);
|
||||
}
|
||||
if (Projectile.timeLeft >= 2 && Time % 3 == 0 && NPC.AnyNPCs(ModContent.NPCType<SupremeCatastrophe>()) == false)
|
||||
{
|
||||
Vector2 randPos = shootVel.RotatedBy(MathHelper.ToRadians(90f)) * Main.rand.NextFloat(-25, 25);
|
||||
int type = ModContent.ProjectileType<SupremeCataclysmFist>();
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromAI(), Projectile.Center + randPos, (shootVel * MathHelper.Clamp(Time * 0.1f, 1, 1.8f)).RotatedBy(MathHelper.ToRadians(120f)) * Main.rand.NextFloat(0.6f, 0.9f), type, Projectile.damage / 2, 0f, Main.myPlayer, 0f, Main.rand.Next(0, 1 + 1), 0);
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromAI(), Projectile.Center + randPos, (shootVel * MathHelper.Clamp(Time * 0.1f, 1, 1.8f)).RotatedBy(MathHelper.ToRadians(-120f)) * Main.rand.NextFloat(0.6f, 0.9f), type, Projectile.damage / 2, 0f, Main.myPlayer, 0f, Main.rand.Next(0, 1 + 1), 0);
|
||||
}
|
||||
if (Projectile.timeLeft == 1)
|
||||
{
|
||||
@@ -99,9 +123,12 @@ namespace CalamityMod.Projectiles.Boss
|
||||
|
||||
if (Projectile.ai[2] == 0)
|
||||
{
|
||||
Projectile.scale = 0.75f;
|
||||
if (Projectile.timeLeft > 240)
|
||||
Projectile.timeLeft = 240;
|
||||
Projectile.scale = 0.8f;
|
||||
Projectile.extraUpdates = 2;
|
||||
Projectile.Opacity = 1;
|
||||
if (Projectile.timeLeft > 300)
|
||||
Projectile.timeLeft = 300;
|
||||
Projectile.velocity *= 1.009f;
|
||||
}
|
||||
|
||||
if (Projectile.velocity.X < 0f)
|
||||
@@ -139,8 +166,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
if (Projectile.ai[1] == 1f)
|
||||
texture = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Boss/SupremeCataclysmFistAlt").Value;
|
||||
|
||||
Vector2 drawPosition = Projectile.Center - Main.screenPosition + Vector2.UnitY * Projectile.gfxOffY;
|
||||
drawPosition.X -= Math.Sign(Projectile.velocity.X) * 40f;
|
||||
Vector2 drawPosition = Projectile.Center - Main.screenPosition;
|
||||
Rectangle frame = texture.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame);
|
||||
Main.EntitySpriteDraw(texture, drawPosition, frame, Projectile.GetAlpha(lightColor), Projectile.rotation, frame.Size() * 0.5f, Projectile.scale, direction, 0);
|
||||
return false;
|
||||
|
||||
@@ -4,6 +4,8 @@ using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using CalamityMod.Events;
|
||||
using CalamityMod.World;
|
||||
using CalamityMod.Particles;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.Audio;
|
||||
@@ -40,6 +42,14 @@ namespace CalamityMod.Projectiles.Boss
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
Time++;
|
||||
|
||||
// Difficulty modes
|
||||
bool bossRush = BossRushEvent.BossRushActive;
|
||||
bool death = CalamityWorld.death || bossRush;
|
||||
bool revenge = CalamityWorld.revenge || bossRush;
|
||||
bool expertMode = Main.expertMode || bossRush;
|
||||
|
||||
// Decide frames.
|
||||
Projectile.frameCounter++;
|
||||
Projectile.frame = Projectile.frameCounter / 7 % Main.projFrames[Projectile.type];
|
||||
@@ -47,10 +57,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
// Fade in and handle visuals.
|
||||
if (Projectile.ai[2] < 4 && Projectile.ai[2] < 50)
|
||||
Projectile.Opacity = Utils.GetLerpValue(0f, 8f, Projectile.timeLeft, true) * Utils.GetLerpValue(1500f, 1492f, Projectile.timeLeft, true);
|
||||
if (Projectile.timeLeft == 1500)
|
||||
{
|
||||
|
||||
}
|
||||
if (Projectile.velocity.X < 0f)
|
||||
{
|
||||
Projectile.spriteDirection = -1;
|
||||
@@ -107,7 +114,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
{
|
||||
if (Projectile.timeLeft == 1500)
|
||||
{
|
||||
Projectile.timeLeft = 30 - (int)(Projectile.ai[2] - 4);
|
||||
Projectile.timeLeft = death ? 40 : 50 - (int)(Projectile.ai[2] - 4);
|
||||
SparkParticle spark1 = new SparkParticle(Projectile.Center, Projectile.velocity, false, 25, 5f, Color.DeepSkyBlue * 0.35f);
|
||||
GeneralParticleHandler.SpawnParticle(spark1);
|
||||
}
|
||||
@@ -166,7 +173,6 @@ namespace CalamityMod.Projectiles.Boss
|
||||
}
|
||||
else
|
||||
Projectile.velocity *= 1.003f;
|
||||
Time++;
|
||||
|
||||
// Emit light.
|
||||
Lighting.AddLight(Projectile.Center, 0.5f * Projectile.Opacity, 0f, 0f);
|
||||
|
||||
Binary file not shown.
Reference in new issue
Block a user