Scal Bugfixes and Brothers Master/GFB changes

Scal shouldn't telefrag you anymore
Bros get Master and GFB changes
This commit is contained in:
Xyk committed 2024-05-13 00:48:20 -07:00
1 parent ac7bb36137
commit a74c99c72b
7 files changed
+306 -102

No files matched your search

+29 -12
View File
@@ -98,6 +98,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
public bool gettingTired5 = false; //1%
public bool willCharge = false;
public bool canFireSplitingFireball = true;
public bool fireFireblastFirst = true;
public bool spawnArena = false;
public bool enteredBrothersPhase = false;
public bool hasSummonedBrothers = false;
@@ -125,7 +126,9 @@ namespace CalamityMod.NPCs.SupremeCalamitas
public int alicornFrame = 0;
public int alicornFrameCounter = 0;
public int dashVisualCounter = 0;
public int brothersPause = 15; // Helps prevent telefragging
public int preventionPause = 15; // Helps prevent telefragging
public int attackPause = 0;
public bool respawnBro = true; // Master Mode change
public float shieldOpacity = 1f;
public float shieldRotation = 0f;
@@ -1623,6 +1626,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
if (!hasDoneDeathAnim && !bossRush) // Scrapped death animation for Scal
{
attackPause = 5;
Dust.QuickDustLine(NPC.Center, safeBox.Center() + new Vector2(0, -30), 500f, cirrus ? Color.Pink : Color.Red);
NPC.Center = safeBox.Center() + new Vector2(0, -30);
NPC.velocity = new Vector2(10 * NPC.spriteDirection, -7);
@@ -2027,9 +2031,13 @@ namespace CalamityMod.NPCs.SupremeCalamitas
}
if (NPC.life > 0)
{
if (attackPause > 0)
attackPause--;
if (lifeRatio < 0.45f && !enteredBrothersPhase)
{
if (brothersPause == 0)
attackPause = 5;
if (preventionPause == 0)
{
enteredBrothersPhase = true;
attackCastDelay = brothersSpawnCastTime;
@@ -2067,7 +2075,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
}
else
{
brothersPause--;
preventionPause--;
NPC.dontTakeDamage = true;
NPC.velocity *= 0.85f;
return;
@@ -2234,6 +2242,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
if (NPC.ai[2] >= 300f)
{
NPC.ai[1] = -1f;
fireFireblastFirst = true;
NPC.TargetClosest();
NPC.netUpdate = true;
}
@@ -2248,7 +2257,8 @@ namespace CalamityMod.NPCs.SupremeCalamitas
NPC.localAI[1] = 0f;
int randomShot = Main.rand.Next(6);
if (randomShot == 0 && canFireSplitingFireball)
if (randomShot == 0 && canFireSplitingFireball && !fireFireblastFirst)
{
canFireSplitingFireball = false;
randomShot = gigablast;
@@ -2267,7 +2277,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
NPC.netUpdate = true;
}
}
else if (randomShot == 1 && canFireSplitingFireball) // Firing gigablast while hovering above pre laugh
else if ((randomShot == 1 && canFireSplitingFireball) || fireFireblastFirst) // Firing gigablast while hovering above pre laugh
{
canFireSplitingFireball = false;
randomShot = fireblast;
@@ -2286,7 +2296,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
NPC.netUpdate = true;
}
}
else
else if (!fireFireblastFirst)
{
canFireSplitingFireball = true;
randomShot = barrage;
@@ -2311,6 +2321,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
}
}
}
fireFireblastFirst = false;
}
FrameType = FrameAnimationType.FasterUpwardDraft;
@@ -2479,7 +2490,8 @@ namespace CalamityMod.NPCs.SupremeCalamitas
Vector2 projectileSpawn = NPC.Center + projectileVelocity * 4f;
projectileVelocity *= 10f * uDieLul;
int projectileType = hellblast;
Projectile.NewProjectile(NPC.GetSource_FromAI(), projectileSpawn, projectileVelocity, projectileType, hellblastDamage, 0f, Main.myPlayer, 0f, 2f);
if (attackPause == 0)
Projectile.NewProjectile(NPC.GetSource_FromAI(), projectileSpawn, projectileVelocity, projectileType, hellblastDamage, 0f, Main.myPlayer, 0f, 2f);
}
}
}
@@ -2795,6 +2807,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
if (NPC.ai[2] >= 240f)
{
NPC.ai[1] = -1f;
fireFireblastFirst = true;
NPC.TargetClosest();
NPC.netUpdate = true;
}
@@ -2809,7 +2822,8 @@ namespace CalamityMod.NPCs.SupremeCalamitas
NPC.localAI[1] = 0f;
int randomShot = Main.rand.Next(6);
if (randomShot == 0 && canFireSplitingFireball) // fireblast while floating post laugh
if (randomShot == 0 && canFireSplitingFireball && !fireFireblastFirst) // fireblast while floating post laugh
{
SoundEngine.PlaySound(BrimstoneBigShotSound, NPC.Center);
canFireSplitingFireball = false;
@@ -2826,10 +2840,11 @@ namespace CalamityMod.NPCs.SupremeCalamitas
NPC.netUpdate = true;
}
}
else if (randomShot == 1 && canFireSplitingFireball) // Gigablast while floating post laugh
else if ((randomShot == 1 && canFireSplitingFireball) || fireFireblastFirst) // Gigablast while floating post laugh
{
SoundEngine.PlaySound(BrimstoneShotSound, NPC.Center);
canFireSplitingFireball = false;
if (NPC.ai[2] > 1)
canFireSplitingFireball = false;
randomShot = fireblast;
Particle pulse = new DirectionalPulseRing(NPC.Center, projectileVelocity * 1.2f, cirrus ? Color.Pink : Color.Red, new Vector2(0.5f, 1f), projectileVelocity.ToRotation(), 0.95f, 0f, 55);
@@ -2843,7 +2858,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
NPC.netUpdate = true;
}
}
else
else if (!fireFireblastFirst)
{
SoundEngine.PlaySound(BrimstoneBigShotSound, NPC.Center);
canFireSplitingFireball = true;
@@ -2868,6 +2883,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
}
}
}
fireFireblastFirst = false;
}
}
else if (NPC.ai[1] == 1f)
@@ -3007,7 +3023,8 @@ namespace CalamityMod.NPCs.SupremeCalamitas
Vector2 projectileSpawn = NPC.Center + projectileVelocity * 4f;
projectileVelocity *= 10f * uDieLul;
int projectileType = hellblast;
Projectile.NewProjectile(NPC.GetSource_FromAI(), projectileSpawn, projectileVelocity, projectileType, hellblastDamage, 0f, Main.myPlayer, 0f, 2f);
if (attackPause == 0)
Projectile.NewProjectile(NPC.GetSource_FromAI(), projectileSpawn, projectileVelocity, projectileType, hellblastDamage, 0f, Main.myPlayer, 0f, 2f);
}
}
}
+48 -3
View File
@@ -4,6 +4,7 @@ using CalamityMod.Dusts;
using CalamityMod.Events;
using CalamityMod.Items.Placeables.Furniture.Trophies;
using CalamityMod.Items.Weapons.Summon;
using CalamityMod.NPCs.DevourerofGods;
using CalamityMod.Particles;
using CalamityMod.Projectiles.Boss;
using CalamityMod.World;
@@ -173,6 +174,13 @@ namespace CalamityMod.NPCs.SupremeCalamitas
return;
}
NPC scal = Main.npc[CalamityGlobalNPC.SCal];
if (scal.ModNPC<SupremeCalamitas>().respawnBro == false && Main.masterMode && !broIsAlive)
{
if (NPC.life > (NPC.lifeMax * 0.65f))
NPC.life = (int)(NPC.lifeMax * 0.65f);
}
// Difficulty modes
bool bossRush = BossRushEvent.BossRushActive;
bool death = CalamityWorld.death || bossRush;
@@ -326,7 +334,12 @@ namespace CalamityMod.NPCs.SupremeCalamitas
{
PunchCounter = 0f;
SoundEngine.PlaySound(SupremeCalamitas.HellblastSound, NPC.Center);
int type = ModContent.ProjectileType<SupremeCataclysmFist>();
if (Main.zenithWorld)
type = ModContent.ProjectileType<SupremeCatastropheSlash>();
int damage = NPC.GetProjectileDamage(type);
if (bossRush)
damage /= 2;
@@ -391,6 +404,10 @@ namespace CalamityMod.NPCs.SupremeCalamitas
PunchCounter = 0f;
int type = ModContent.ProjectileType<SupremeCataclysmFist>();
if (Main.zenithWorld)
type = ModContent.ProjectileType<SupremeCatastropheSlash>();
int damage = NPC.GetProjectileDamage(type);
if (bossRush)
damage /= 2;
@@ -398,8 +415,8 @@ namespace CalamityMod.NPCs.SupremeCalamitas
if ((broIsAlive == false ? BigAttackLimit <= 3 && BigAttackLimit > 0 : BigAttackLimit == 1) && death)
{
Projectile.NewProjectile(NPC.GetSource_FromAI(), fistSpawnPosition, (NPC.DirectionTo(Target.Center) * 11f).RotatedBy(0.6f - BigAttackLimit * 0.16f), type, damage, 0f, Main.myPlayer, 0f, 0, 2);
Projectile.NewProjectile(NPC.GetSource_FromAI(), fistSpawnPosition, (NPC.DirectionTo(Target.Center) * 11f).RotatedBy(-0.6f + BigAttackLimit * 0.16f), type, damage, 0f, Main.myPlayer, 0f, 0, 2);
Projectile.NewProjectile(NPC.GetSource_FromAI(), fistSpawnPosition, (NPC.DirectionTo(Target.Center) * (Main.zenithWorld ? 1 : 11f)).RotatedBy(0.6f - BigAttackLimit * 0.16f), type, damage, 0f, Main.myPlayer, 0f, 0, Main.zenithWorld ? 3 : 2);
Projectile.NewProjectile(NPC.GetSource_FromAI(), fistSpawnPosition, (NPC.DirectionTo(Target.Center) * (Main.zenithWorld ? 1 : 11f)).RotatedBy(-0.6f + BigAttackLimit * 0.16f), type, damage, 0f, Main.myPlayer, 0f, 0, Main.zenithWorld ? 3 : 2);
SoundStyle fire = new("CalamityMod/Sounds/NPCHit/ThanatosHitOpen1");
SoundEngine.PlaySound(fire with { Volume = 0.4f, Pitch = -0.8f - BigAttackLimit * 0.1f }, NPC.Center);
}
@@ -407,7 +424,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
{
if (Main.netMode != NetmodeID.MultiplayerClient)
{
Projectile.NewProjectile(NPC.GetSource_FromAI(), fistSpawnPosition, NPC.DirectionTo(Target.Center) * 9.5f, type, damage, 0f, Main.myPlayer, 0f, PunchingFromRight.ToInt(), 3);
Projectile.NewProjectile(NPC.GetSource_FromAI(), fistSpawnPosition, NPC.DirectionTo(Target.Center) * 9.5f, ModContent.ProjectileType<SupremeCataclysmFist>(), damage, 0f, Main.myPlayer, 0f, PunchingFromRight.ToInt(), 3);
}
SoundEngine.PlaySound(SupremeCalamitas.BrimstoneShotSound with { Volume = 1.8f, Pitch = 0.5f }, NPC.Center);
SoundStyle charge = new("CalamityMod/Sounds/Item/ScorchedEarthShot", 3);
@@ -533,7 +550,35 @@ namespace CalamityMod.NPCs.SupremeCalamitas
// Turn into dust on death.
if (NPC.life <= 0)
{
if (NPC.AnyNPCs(ModContent.NPCType<SupremeCalamitas>()))
{
NPC scal = Main.npc[CalamityGlobalNPC.SCal];
if (scal.ModNPC<SupremeCalamitas>().respawnBro == true && Main.masterMode && !broIsAlive)
{
for (int i = 0; i < 45; i++)
{
Vector2 vel = new Vector2(14, 14).RotatedByRandom(100) * Main.rand.NextFloat(0.1f, 2.5f);
Dust catastrophedust = Dust.NewDustPerfect(NPC.Center + vel * 2, 279, vel);
catastrophedust.noGravity = true;
catastrophedust.scale = Main.rand.NextFloat(1.2f, 1.8f);
catastrophedust.color = Color.DeepSkyBlue;
}
Particle pulse = new DirectionalPulseRing(NPC.Center, Vector2.Zero, Color.Cyan, new Vector2(1f, 1f), 0, 0.1f, 5f, 25);
GeneralParticleHandler.SpawnParticle(pulse);
Particle pulse2 = new DirectionalPulseRing(NPC.Center, Vector2.Zero, Color.Lerp(Color.Cyan, Color.DodgerBlue, 0.3f), new Vector2(1f, 1f), 0, 0.05f, 4f, 28);
GeneralParticleHandler.SpawnParticle(pulse2);
SoundStyle respawn = new("CalamityMod/Sounds/NPCKilled/RavagerLimbLoss3");
SoundEngine.PlaySound(respawn with { Volume = 0.9f, Pitch = 0.3f }, NPC.Center);
CalamityUtils.SpawnBossBetter(NPC.Center, ModContent.NPCType<SupremeCatastrophe>(), null, MovingUp ? -1 : 1);
scal.ModNPC<SupremeCalamitas>().respawnBro = false;
}
}
DeathAshParticle.CreateAshesFromNPC(NPC);
}
}
}
}
+80 -12
View File
@@ -167,6 +167,13 @@ namespace CalamityMod.NPCs.SupremeCalamitas
return;
}
NPC scal = Main.npc[CalamityGlobalNPC.SCal];
if (scal.ModNPC<SupremeCalamitas>().respawnBro == false && Main.masterMode && !broIsAlive)
{
if (NPC.life > (NPC.lifeMax * 0.65f))
NPC.life = (int)(NPC.lifeMax * 0.65f);
}
// Difficulty modes
bool bossRush = BossRushEvent.BossRushActive;
bool death = CalamityWorld.death || bossRush;
@@ -275,17 +282,42 @@ namespace CalamityMod.NPCs.SupremeCalamitas
dashes++;
if (dashes == 30 && broIsAlive == 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.34f) * 130, NPC.DirectionTo(Target.Center).RotatedBy(0.34f) * 90f, type, damage, 0f, Main.myPlayer, 0f, 0, 50);
Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + NPC.DirectionTo(Target.Center).RotatedBy(-0.34f) * 130, NPC.DirectionTo(Target.Center).RotatedBy(-0.34f) * 90f, type, damage, 0f, Main.myPlayer, 0f, 0, 50);
for (int i = 0; i < 30; i++)
if (Main.zenithWorld)
{
Vector2 vel = new Vector2(7, 7).RotatedByRandom(100) * Main.rand.NextFloat(0.1f, 2.5f);
Dust catastrophedust = Dust.NewDustPerfect(NPC.Center + vel * 2, 279, vel);
catastrophedust.noGravity = true;
catastrophedust.scale = Main.rand.NextFloat(1.2f, 1.8f);
catastrophedust.color = Color.DeepSkyBlue;
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) * 150f;
for (int i = 0; i < 30; i++)
{
Vector2 vel = new Vector2(7, 7).RotatedByRandom(100) * Main.rand.NextFloat(0.1f, 2.5f);
Dust catastrophedust = Dust.NewDustPerfect(NPC.Center + vel * 2, 279, vel);
catastrophedust.noGravity = true;
catastrophedust.scale = Main.rand.NextFloat(1.2f, 1.8f);
catastrophedust.color = Color.DeepSkyBlue;
}
dashes = 0;
dashAttackTimer = 30;
BigAttackTimer = 500;
AttackDelayTimer = 120;
if (NPC.life > 10001)
NPC.life -= 10000;
return;
}
else
{
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.34f) * 130, NPC.DirectionTo(Target.Center).RotatedBy(0.34f) * 90f, type, damage, 0f, Main.myPlayer, 0f, 0, 50);
Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + NPC.DirectionTo(Target.Center).RotatedBy(-0.34f) * 130, NPC.DirectionTo(Target.Center).RotatedBy(-0.34f) * 90f, type, damage, 0f, Main.myPlayer, 0f, 0, 50);
for (int i = 0; i < 30; i++)
{
Vector2 vel = new Vector2(7, 7).RotatedByRandom(100) * Main.rand.NextFloat(0.1f, 2.5f);
Dust catastrophedust = Dust.NewDustPerfect(NPC.Center + vel * 2, 279, vel);
catastrophedust.noGravity = true;
catastrophedust.scale = Main.rand.NextFloat(1.2f, 1.8f);
catastrophedust.color = Color.DeepSkyBlue;
}
}
}
NPC.velocity *= 0.975f;
@@ -349,6 +381,10 @@ namespace CalamityMod.NPCs.SupremeCalamitas
SoundEngine.PlaySound(SupremeCalamitas.CatastropheSwing with { Volume = 0.5f, Pitch = (SlashingFromRight ? 0.2f : -0.2f) }, NPC.Center);
int type = ModContent.ProjectileType<SupremeCatastropheSlash>();
if (Main.zenithWorld)
type = ModContent.ProjectileType<SupremeCataclysmFist>();
int damage = NPC.GetProjectileDamage(type);
if (bossRush)
damage /= 2;
@@ -368,7 +404,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
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, firingVelocity * 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(), Main.zenithWorld ? 0 : 3);
accSlashCounter = 0;
}
}
@@ -412,6 +448,10 @@ namespace CalamityMod.NPCs.SupremeCalamitas
SlashCounter = 0f;
int type = ModContent.ProjectileType<SupremeCatastropheSlash>();
if (Main.zenithWorld)
type = ModContent.ProjectileType<SupremeCataclysmFist>();
int damage = NPC.GetProjectileDamage(type);
if (bossRush)
damage /= 2;
@@ -420,7 +460,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
if ((broIsAlive == false ? BigAttackLimit <= 3 && BigAttackLimit > 0 : BigAttackLimit == 1) && death)
{
Projectile.NewProjectile(NPC.GetSource_FromAI(), slashSpawnPosition + firingVelocity * 130, (Phase2 ? NPC.DirectionTo(Target.Center) : firingVelocity) * 90f, type, damage, 0f, Main.myPlayer, 0f, 5, 50);
Projectile.NewProjectile(NPC.GetSource_FromAI(), slashSpawnPosition + firingVelocity * 130, (Phase2 ? NPC.DirectionTo(Target.Center) : firingVelocity) * 90f, ModContent.ProjectileType<SupremeCatastropheSlash>(), damage, 0f, Main.myPlayer, 0f, 5, 50);
SoundStyle slash = new("CalamityMod/Sounds/Item/MurasamaBigSwing");
SoundEngine.PlaySound(slash with { Volume = 0.55f, Pitch = -0.3f - BigAttackLimit * 0.1f }, NPC.Center);
}
@@ -545,7 +585,35 @@ namespace CalamityMod.NPCs.SupremeCalamitas
// Turn into dust on death.
if (NPC.life <= 0)
{
if (NPC.AnyNPCs(ModContent.NPCType<SupremeCalamitas>()))
{
NPC scal = Main.npc[CalamityGlobalNPC.SCal];
if (scal.ModNPC<SupremeCalamitas>().respawnBro == true && Main.masterMode && !broIsAlive)
{
for (int i = 0; i < 45; i++)
{
Vector2 vel = new Vector2(14, 14).RotatedByRandom(100) * Main.rand.NextFloat(0.1f, 2.5f);
Dust cataclysmdust = Dust.NewDustPerfect(NPC.Center + vel * 2, 279, vel);
cataclysmdust.noGravity = true;
cataclysmdust.scale = Main.rand.NextFloat(1.2f, 1.8f);
cataclysmdust.color = Color.Red;
}
Particle pulse = new DirectionalPulseRing(NPC.Center, Vector2.Zero, Color.Red, new Vector2(1f, 1f), 0, 0.1f, 5f, 25);
GeneralParticleHandler.SpawnParticle(pulse);
Particle pulse2 = new DirectionalPulseRing(NPC.Center, Vector2.Zero, Color.Lerp(Color.Red, Color.Magenta, 0.3f), new Vector2(1f, 1f), 0, 0.05f, 4f, 28);
GeneralParticleHandler.SpawnParticle(pulse2);
SoundStyle respawn = new("CalamityMod/Sounds/NPCKilled/RavagerLimbLoss3");
SoundEngine.PlaySound(respawn with { Volume = 0.9f, Pitch = 0.3f }, NPC.Center);
CalamityUtils.SpawnBossBetter(NPC.Center, ModContent.NPCType<SupremeCataclysm>(), null, MovingUp ? -1 : 1);
scal.ModNPC<SupremeCalamitas>().respawnBro = false;
}
}
DeathAshParticle.CreateAshesFromNPC(NPC);
}
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 145 KiB

+148 -74
View File
@@ -51,98 +51,147 @@ namespace CalamityMod.Projectiles.Boss
// The Orb
if (Projectile.ai[2] >= 3)
{
if (Projectile.timeLeft > 240)
if (Main.zenithWorld)
{
shootVel = Projectile.velocity * 0.4f;
Projectile.timeLeft = 240;
rotDirection = Main.rand.NextBool() ? -1 : 1;
Projectile.velocity *= 5.5f;
broIsAlive = NPC.AnyNPCs(ModContent.NPCType<SupremeCatastrophe>());
if (Projectile.timeLeft > 400)
{
shootVel = Projectile.velocity * 0.4f;
Projectile.timeLeft = 400;
rotDirection = Main.rand.NextBool() ? -1 : 1;
Projectile.velocity *= 6f;
broIsAlive = NPC.AnyNPCs(ModContent.NPCType<SupremeCatastrophe>());
}
else
{
if (Time > 10)
Projectile.tileCollide = true;
else
Projectile.velocity *= 0.99f;
Projectile.rotation += 0.02f;
}
if (Projectile.timeLeft == 1)
{
int points = 25;
float radians = MathHelper.TwoPi / points;
Vector2 spinningPoint = Vector2.Normalize(new Vector2(-4f, -4f));
for (int b = 0; b < 2; b++)
{
float rotRando = Main.rand.NextFloat(0.1f, 2.5f);
for (int k = 0; k < points; k++)
{
Vector2 velocity = spinningPoint.RotatedBy(radians * k).RotatedBy(-0.45f * rotRando);
Dust cataclysmdust = Dust.NewDustPerfect(Projectile.Center + velocity * (b == 0 ? 7 : 5), 279, velocity * (b == 0 ? 9 : 7));
cataclysmdust.noGravity = true;
cataclysmdust.scale = Main.rand.NextFloat(1.3f, 1.9f);
cataclysmdust.color = Color.Red;
}
}
Projectile.Kill();
}
Vector2 vel = new Vector2(14, 14).RotatedByRandom(100) * Main.rand.NextFloat(0.1f, 2.5f);
Dust cataclysmdust2 = Dust.NewDustPerfect(Projectile.Center + vel * 2, 279, vel);
cataclysmdust2.noGravity = true;
cataclysmdust2.scale = Main.rand.NextFloat(0.9f, 1.2f);
cataclysmdust2.color = Color.Red;
}
else
{
float randSize = Main.rand.NextFloat(0.8f, 1.2f);
for (int i = 0; i < 2; i++)
if (Projectile.timeLeft > 240)
{
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);
shootVel = Projectile.velocity * 0.4f;
Projectile.timeLeft = 240;
rotDirection = Main.rand.NextBool() ? -1 : 1;
Projectile.velocity *= 5.5f;
broIsAlive = NPC.AnyNPCs(ModContent.NPCType<SupremeCatastrophe>());
}
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.945f;
}
// Adds rotation, but it's SUPER unfair a lot of the time
//shootVel = shootVel.RotatedBy(Time * 0.00011f * rotDirection);
if (Projectile.timeLeft == 205) // Fist direction telegraphs
{
for (int k = 0; k < 28; k++)
else
{
Vector2 vel1 = -shootVel * MathHelper.Clamp(Time * 0.1f, 1, 1.8f);
GlowSparkParticle spark = new GlowSparkParticle(Projectile.Center + vel1 * (9 + k * 11), vel1, false, 7, 0.17f, Color.Lerp(Color.Red, Color.Magenta, 0.5f) * 0.5f, new Vector2(0.9f, 0.4f), true, false);
GeneralParticleHandler.SpawnParticle(spark);
float randSize = Main.rand.NextFloat(0.8f, 1.2f);
for (int i = 0; i < 2; i++)
{
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 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.945f;
}
if (broIsAlive == false)
// Adds rotation, but it's SUPER unfair a lot of the time
//shootVel = shootVel.RotatedBy(Time * 0.00011f * rotDirection);
if (Projectile.timeLeft == 205) // Fist direction telegraphs
{
for (int k = 0; k < 28; k++)
{
Vector2 vel2 = (-shootVel * MathHelper.Clamp(Time * 0.1f, 1, 1.8f)).RotatedBy(MathHelper.ToRadians(120f));
GlowSparkParticle spark2 = new GlowSparkParticle(Projectile.Center + vel2 * (9 + k * 11), vel2, false, 7, 0.17f, Color.Lerp(Color.Red, Color.Magenta, 0.5f) * 0.5f, new Vector2(0.9f, 0.4f), true, false);
GeneralParticleHandler.SpawnParticle(spark2);
Vector2 vel1 = -shootVel * MathHelper.Clamp(Time * 0.1f, 1, 1.8f);
GlowSparkParticle spark = new GlowSparkParticle(Projectile.Center + vel1 * (9 + k * 11), vel1, false, 7, 0.17f, Color.Lerp(Color.Red, Color.Magenta, 0.5f) * 0.5f, new Vector2(0.9f, 0.4f), true, false);
GeneralParticleHandler.SpawnParticle(spark);
}
for (int k = 0; k < 28; k++)
if (broIsAlive == false)
{
Vector2 vel3 = (-shootVel * MathHelper.Clamp(Time * 0.1f, 1, 1.8f)).RotatedBy(MathHelper.ToRadians(-120f));
GlowSparkParticle spark3 = new GlowSparkParticle(Projectile.Center + vel3 * (9 + k * 11), vel3, false, 7, 0.17f, Color.Lerp(Color.Red, Color.Magenta, 0.5f) * 0.5f, new Vector2(0.9f, 0.4f), true, false);
GeneralParticleHandler.SpawnParticle(spark3);
for (int k = 0; k < 28; k++)
{
Vector2 vel2 = (-shootVel * MathHelper.Clamp(Time * 0.1f, 1, 1.8f)).RotatedBy(MathHelper.ToRadians(120f));
GlowSparkParticle spark2 = new GlowSparkParticle(Projectile.Center + vel2 * (9 + k * 11), vel2, false, 7, 0.17f, Color.Lerp(Color.Red, Color.Magenta, 0.5f) * 0.5f, new Vector2(0.9f, 0.4f), true, false);
GeneralParticleHandler.SpawnParticle(spark2);
}
for (int k = 0; k < 28; k++)
{
Vector2 vel3 = (-shootVel * MathHelper.Clamp(Time * 0.1f, 1, 1.8f)).RotatedBy(MathHelper.ToRadians(-120f));
GlowSparkParticle spark3 = new GlowSparkParticle(Projectile.Center + vel3 * (9 + k * 11), vel3, false, 7, 0.17f, Color.Lerp(Color.Red, Color.Magenta, 0.5f) * 0.5f, new Vector2(0.9f, 0.4f), true, false);
GeneralParticleHandler.SpawnParticle(spark3);
}
}
}
}
if (Projectile.timeLeft <= 200 && Time % 3 == 0)
{
Vector2 randPos = (-shootVel * 1.5f).RotatedByRandom(1) * Main.rand.NextFloat(5, 15);
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 + randPos, (-shootVel * MathHelper.Clamp(Time * 0.02f, 0.1f, 1.8f)) * Main.rand.NextFloat(0.75f, 1f), type, Projectile.damage, 0f, Main.myPlayer, 0f, Main.rand.Next(0, 1 + 1), 0);
}
if (Projectile.timeLeft <= 200 && Time % 3 == 0 && broIsAlive == false)
{
Vector2 randPos = (-shootVel * 1.5f).RotatedBy(MathHelper.ToRadians(120f)).RotatedByRandom(1) * Main.rand.NextFloat(5, 15);
Vector2 randPos2 = (-shootVel * 1.5f).RotatedBy(MathHelper.ToRadians(-120f)).RotatedByRandom(1) * Main.rand.NextFloat(5, 15);
int type = ModContent.ProjectileType<SupremeCataclysmFist>();
Projectile.NewProjectile(Projectile.GetSource_FromAI(), Projectile.Center + randPos, (-shootVel * MathHelper.Clamp(Time * 0.02f, 0.1f, 1.8f)).RotatedBy(MathHelper.ToRadians(120f)) * Main.rand.NextFloat(0.75f, 1f), type, Projectile.damage, 0f, Main.myPlayer, 0f, Main.rand.Next(0, 1 + 1), 0);
Projectile.NewProjectile(Projectile.GetSource_FromAI(), Projectile.Center + randPos2, (-shootVel * MathHelper.Clamp(Time * 0.02f, 0.1f, 1.8f)).RotatedBy(MathHelper.ToRadians(-120f)) * Main.rand.NextFloat(0.75f, 1f), type, Projectile.damage, 0f, Main.myPlayer, 0f, Main.rand.Next(0, 1 + 1), 0);
}
if (Projectile.timeLeft == 1)
{
int points = 25;
float radians = MathHelper.TwoPi / points;
Vector2 spinningPoint = Vector2.Normalize(new Vector2(-4f, -4f));
for (int b = 0; b < 2; b++)
if (Projectile.timeLeft <= 200 && Time % 3 == 0)
{
float rotRando = Main.rand.NextFloat(0.1f, 2.5f);
for (int k = 0; k < points; k++)
{
Vector2 velocity = spinningPoint.RotatedBy(radians * k).RotatedBy(-0.45f * rotRando);
Dust cataclysmdust = Dust.NewDustPerfect(Projectile.Center + velocity * (b == 0 ? 7 : 5), 279, velocity * (b == 0 ? 9 : 7));
cataclysmdust.noGravity = true;
cataclysmdust.scale = Main.rand.NextFloat(1.3f, 1.9f);
cataclysmdust.color = Color.Red;
}
Vector2 randPos = (-shootVel * 1.5f).RotatedByRandom(1) * Main.rand.NextFloat(5, 15);
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 + randPos, (-shootVel * MathHelper.Clamp(Time * 0.02f, 0.1f, 1.8f)) * Main.rand.NextFloat(0.75f, 1f), type, Projectile.damage, 0f, Main.myPlayer, 0f, Main.rand.Next(0, 1 + 1), 0);
}
Projectile.Kill();
}
if (Projectile.timeLeft <= 200 && Time % 3 == 0 && broIsAlive == false)
{
Vector2 randPos = (-shootVel * 1.5f).RotatedBy(MathHelper.ToRadians(120f)).RotatedByRandom(1) * Main.rand.NextFloat(5, 15);
Vector2 randPos2 = (-shootVel * 1.5f).RotatedBy(MathHelper.ToRadians(-120f)).RotatedByRandom(1) * Main.rand.NextFloat(5, 15);
int type = ModContent.ProjectileType<SupremeCataclysmFist>();
Projectile.NewProjectile(Projectile.GetSource_FromAI(), Projectile.Center + randPos, (-shootVel * MathHelper.Clamp(Time * 0.02f, 0.1f, 1.8f)).RotatedBy(MathHelper.ToRadians(120f)) * Main.rand.NextFloat(0.75f, 1f), type, Projectile.damage, 0f, Main.myPlayer, 0f, Main.rand.Next(0, 1 + 1), 0);
Projectile.NewProjectile(Projectile.GetSource_FromAI(), Projectile.Center + randPos2, (-shootVel * MathHelper.Clamp(Time * 0.02f, 0.1f, 1.8f)).RotatedBy(MathHelper.ToRadians(-120f)) * Main.rand.NextFloat(0.75f, 1f), type, Projectile.damage, 0f, Main.myPlayer, 0f, Main.rand.Next(0, 1 + 1), 0);
}
if (Projectile.timeLeft == 1)
{
int points = 25;
float radians = MathHelper.TwoPi / points;
Vector2 spinningPoint = Vector2.Normalize(new Vector2(-4f, -4f));
for (int b = 0; b < 2; b++)
{
float rotRando = Main.rand.NextFloat(0.1f, 2.5f);
for (int k = 0; k < points; k++)
{
Vector2 velocity = spinningPoint.RotatedBy(radians * k).RotatedBy(-0.45f * rotRando);
Vector2 vel = new Vector2(14, 14).RotatedByRandom(100) * Main.rand.NextFloat(0.1f, 2.5f);
Dust cataclysmdust2 = Dust.NewDustPerfect(Projectile.Center + vel * 2, 279, vel);
cataclysmdust2.noGravity = true;
cataclysmdust2.scale = Main.rand.NextFloat(0.9f, 1.2f);
cataclysmdust2.color = Color.Red;
Dust cataclysmdust = Dust.NewDustPerfect(Projectile.Center + velocity * (b == 0 ? 7 : 5), 279, velocity * (b == 0 ? 9 : 7));
cataclysmdust.noGravity = true;
cataclysmdust.scale = Main.rand.NextFloat(1.3f, 1.9f);
cataclysmdust.color = Color.Red;
}
}
Projectile.Kill();
}
Vector2 vel = new Vector2(14, 14).RotatedByRandom(100) * Main.rand.NextFloat(0.1f, 2.5f);
Dust cataclysmdust2 = Dust.NewDustPerfect(Projectile.Center + vel * 2, 279, vel);
cataclysmdust2.noGravity = true;
cataclysmdust2.scale = Main.rand.NextFloat(0.9f, 1.2f);
cataclysmdust2.color = Color.Red;
}
}
else if (Projectile.ai[2] <= 2)
{
@@ -165,6 +214,9 @@ namespace CalamityMod.Projectiles.Boss
Projectile.velocity *= 1.006f;
}
if (Main.zenithWorld && Projectile.ai[2] >= 3)
return;
if (Projectile.velocity.X < 0f)
{
Projectile.spriteDirection = -1;
@@ -187,7 +239,7 @@ namespace CalamityMod.Projectiles.Boss
Time++;
if (NPC.AnyNPCs(ModContent.NPCType<SupremeCataclysm>()) == false)
if (NPC.AnyNPCs(ModContent.NPCType<SupremeCataclysm>()) == false && !Main.zenithWorld)
{
Projectile.timeLeft = 1;
for (int k = 0; k < 10; k++)
@@ -207,6 +259,13 @@ namespace CalamityMod.Projectiles.Boss
public override bool PreDraw(ref Color lightColor)
{
if (Main.zenithWorld && Projectile.ai[2] >= 3)
{
Texture2D ballTexture = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Boss/Basketball").Value;
Main.EntitySpriteDraw(ballTexture, Projectile.Center - Main.screenPosition, null, lightColor, Projectile.rotation, ballTexture.Size() * 0.5f, Projectile.scale / 1.8f, SpriteEffects.None, 0);
return false;
}
lightColor.R = (byte)(255 * Projectile.Opacity);
SpriteEffects direction = Projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None;
@@ -229,6 +288,21 @@ namespace CalamityMod.Projectiles.Boss
target.AddBuff(ModContent.BuffType<VulnerabilityHex>(), 240, true);
}
public override bool OnTileCollide(Vector2 oldVelocity)
{
SoundStyle b = new("CalamityMod/Sounds/Custom/Kickball");
SoundEngine.PlaySound(b with { PitchVariance = 0.15f }, Projectile.Center);
if (Projectile.velocity.X != oldVelocity.X)
{
Projectile.velocity.X = -oldVelocity.X;
}
if (Projectile.velocity.Y != oldVelocity.Y)
{
Projectile.velocity.Y = -oldVelocity.Y;
}
return false;
}
public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, (Projectile.ai[2] >= 3 ? 90 : 35 * Projectile.scale), targetHitbox);
}
}
+1 -1
View File
@@ -175,7 +175,7 @@ namespace CalamityMod.Projectiles.Boss
}
}
if (NPC.AnyNPCs(ModContent.NPCType<SupremeCatastrophe>()) == false)
if (NPC.AnyNPCs(ModContent.NPCType<SupremeCatastrophe>()) == false && !Main.zenithWorld)
{
Projectile.timeLeft = 1;
for (int k = 0; k < 10; k++)
Binary file not shown.