Moon hit and Scal visuals effects + bro balancing

This commit is contained in:
Xyk committed 2024-04-07 05:12:48 -07:00
1 parent c695fdd567
commit 874f37b25c
12 files changed
+170 -97

No files matched your search

+18 -18
View File
@@ -461,8 +461,8 @@ namespace CalamityMod.NPCs.SupremeCalamitas
// Projectile damage values
int bulletHellblastDamage = NPC.GetProjectileDamage(ModContent.ProjectileType<BrimstoneHellblast2>());
int barrageDamage = NPC.GetProjectileDamage(ModContent.ProjectileType<BrimstoneBarrage>());
int gigablastDamage = NPC.GetProjectileDamage(ModContent.ProjectileType<SCalBrimstoneFireblast>());
int fireblastDamage = NPC.GetProjectileDamage(ModContent.ProjectileType<SCalBrimstoneGigablast>());
int fireblastDamage = NPC.GetProjectileDamage(ModContent.ProjectileType<SCalBrimstoneFireblast>());
int gigablastDamage = NPC.GetProjectileDamage(ModContent.ProjectileType<SCalBrimstoneGigablast>());
int monsterDamage = NPC.GetProjectileDamage(ModContent.ProjectileType<BrimstoneMonster>());
int waveDamage = NPC.GetProjectileDamage(ModContent.ProjectileType<BrimstoneWave>());
int hellblastDamage = NPC.GetProjectileDamage(ModContent.ProjectileType<BrimstoneHellblast>());
@@ -470,8 +470,8 @@ namespace CalamityMod.NPCs.SupremeCalamitas
{
bulletHellblastDamage /= 2;
barrageDamage /= 2;
gigablastDamage /= 2;
fireblastDamage /= 2;
gigablastDamage /= 2;
monsterDamage /= 2;
waveDamage /= 2;
hellblastDamage /= 2;
@@ -947,17 +947,17 @@ namespace CalamityMod.NPCs.SupremeCalamitas
if (bulletHellCounter2 < 1200)
{
if (bulletHellCounter2 % 180 == 0) // Blasts from top
Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, 5f * uDieLul, fireblast, gigablastDamage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, 5f * uDieLul, fireblast, fireblastDamage, 0f, Main.myPlayer);
}
else if (bulletHellCounter2 < 1500 && bulletHellCounter2 > 1200)
{
if (bulletHellCounter2 % 180 == 0) // Blasts from right
Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X + 1000f, player.position.Y + Main.rand.Next(-1000, 1001), -5f * uDieLul, 0f, fireblast, gigablastDamage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X + 1000f, player.position.Y + Main.rand.Next(-1000, 1001), -5f * uDieLul, 0f, fireblast, fireblastDamage, 0f, Main.myPlayer);
}
else if (bulletHellCounter2 > 1500)
{
if (bulletHellCounter2 % 180 == 0) // Blasts from top
Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, 5f * uDieLul, fireblast, gigablastDamage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, 5f * uDieLul, fireblast, fireblastDamage, 0f, Main.myPlayer);
}
bulletHellCounter++;
@@ -1080,10 +1080,10 @@ namespace CalamityMod.NPCs.SupremeCalamitas
Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center, Vector2.One, ModContent.ProjectileType<CirrusPhotonRipperProjectile>(), CirrusPhotonRipperDamage, 0f, Main.myPlayer, 0f, 0f, NPC.whoAmI);
if (bulletHellCounter2 % 180 == 0) // Blasts from top
Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, 5f * uDieLul, fireblast, gigablastDamage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, 5f * uDieLul, fireblast, fireblastDamage, 0f, Main.myPlayer);
if (bulletHellCounter2 % 240 == 0) // Fireblasts from above
Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, 10f * uDieLul, gigablast, fireblastDamage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, 10f * uDieLul, gigablast, gigablastDamage, 0f, Main.myPlayer);
bulletHellCounter++;
if (bulletHellCounter >= baseBulletHellProjectileGateValue + 4)
@@ -1201,10 +1201,10 @@ namespace CalamityMod.NPCs.SupremeCalamitas
}
if (bulletHellCounter2 % 180 == 0) // Blasts from top
Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, 5f * uDieLul, fireblast, gigablastDamage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, 5f * uDieLul, fireblast, fireblastDamage, 0f, Main.myPlayer);
if (bulletHellCounter2 % 240 == 0) // Fireblasts from above
Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, 10f * uDieLul, gigablast, fireblastDamage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, 10f * uDieLul, gigablast, gigablastDamage, 0f, Main.myPlayer);
int divisor = revenge ? 225 : expertMode ? 450 : 675;
@@ -1370,10 +1370,10 @@ namespace CalamityMod.NPCs.SupremeCalamitas
}
if (bulletHellCounter2 % 240 == 0) // Blasts from top
Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, 5f * uDieLul, fireblast, gigablastDamage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, 5f * uDieLul, fireblast, fireblastDamage, 0f, Main.myPlayer);
if (bulletHellCounter2 % 360 == 0) // Fireblasts from above
Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, 10f * uDieLul, gigablast, fireblastDamage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, 10f * uDieLul, gigablast, gigablastDamage, 0f, Main.myPlayer);
if (bulletHellCounter2 % 30 == 0) // Projectiles that move in wave pattern
{
@@ -2061,7 +2061,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
if (Main.netMode != NetmodeID.MultiplayerClient)
{
Projectile.NewProjectile(NPC.GetSource_FromAI(), projectileSpawn, projectileVelocity, randomShot, fireblastDamage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSource_FromAI(), projectileSpawn, projectileVelocity, randomShot, gigablastDamage, 0f, Main.myPlayer);
NPC.netUpdate = true;
}
}
@@ -2080,7 +2080,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
if (Main.netMode != NetmodeID.MultiplayerClient)
{
Projectile.NewProjectile(NPC.GetSource_FromAI(), projectileSpawn, projectileVelocity, randomShot, gigablastDamage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSource_FromAI(), projectileSpawn, projectileVelocity, randomShot, fireblastDamage, 0f, Main.myPlayer);
NPC.netUpdate = true;
}
}
@@ -2357,7 +2357,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
Vector2 projectileSpawn = NPC.Center + projectileVelocity * 8f;
projectileVelocity *= 5f * uDieLul;
int projectileType = gigablast;
Projectile.NewProjectile(NPC.GetSource_FromAI(), projectileSpawn, projectileVelocity, projectileType, fireblastDamage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSource_FromAI(), projectileSpawn, projectileVelocity, projectileType, gigablastDamage, 0f, Main.myPlayer);
}
}
@@ -2630,7 +2630,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
if (Main.netMode != NetmodeID.MultiplayerClient)
{
Projectile.NewProjectile(NPC.GetSource_FromAI(), projectileSpawn, projectileVelocity, randomShot, fireblastDamage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSource_FromAI(), projectileSpawn, projectileVelocity, randomShot, gigablastDamage, 0f, Main.myPlayer);
NPC.netUpdate = true;
}
}
@@ -2647,7 +2647,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
if (Main.netMode != NetmodeID.MultiplayerClient)
{
Projectile.NewProjectile(NPC.GetSource_FromAI(), projectileSpawn, projectileVelocity, randomShot, gigablastDamage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSource_FromAI(), projectileSpawn, projectileVelocity, randomShot, fireblastDamage, 0f, Main.myPlayer);
NPC.netUpdate = true;
}
}
@@ -2898,7 +2898,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
SoundEngine.PlaySound(BrimstoneBigShotSound, NPC.Center);
projectileVelocity *= 5f * uDieLul;
int projectileType = gigablast;
Projectile.NewProjectile(NPC.GetSource_FromAI(), projectileSpawn, projectileVelocity, projectileType, fireblastDamage, 0f, Main.myPlayer);
Projectile.NewProjectile(NPC.GetSource_FromAI(), projectileSpawn, projectileVelocity, projectileType, gigablastDamage, 0f, Main.myPlayer);
}
}
+15 -12
View File
@@ -213,8 +213,8 @@ namespace CalamityMod.NPCs.SupremeCalamitas
if (Phase2 && BigAttackTimer > 400)
BigAttackTimer = 400;
if (NPC.AnyNPCs(ModContent.NPCType<SupremeCatastrophe>()) == false && BigAttackTimer > 0 && BigAttackLimit < 19)
BigAttackLimit = 19;
if (NPC.AnyNPCs(ModContent.NPCType<SupremeCatastrophe>()) == false && BigAttackTimer > 0 && BigAttackLimit < 29)
BigAttackLimit = 29;
else if (Phase2 && BigAttackTimer > 0 && BigAttackLimit < 11)
BigAttackLimit = 11;
@@ -305,7 +305,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
// Have a small delay prior to shooting projectiles.
if (AttackDelayTimer < 120f)
AttackDelayTimer += (death ? 2 : 1);
AttackDelayTimer += (death ? 1.5f : 1f);
// Handle projectile shots.
else if (BigAttackTimer > PreBigAttackPause)
@@ -335,8 +335,8 @@ namespace CalamityMod.NPCs.SupremeCalamitas
}
else
{
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);
Projectile.NewProjectile(NPC.GetSource_FromAI(), fistSpawnPosition, NPC.DirectionTo(Target.Center).RotatedBy(0.48) * 15f, type, damage, 0f, Main.myPlayer, 0f, PunchingFromRight.ToInt(), 2);
Projectile.NewProjectile(NPC.GetSource_FromAI(), fistSpawnPosition, NPC.DirectionTo(Target.Center).RotatedBy(-0.48) * 15f, type, damage, 0f, Main.myPlayer, 0f, PunchingFromRight.ToInt(), 2);
doublePunchCounter = 0;
}
}
@@ -370,9 +370,9 @@ namespace CalamityMod.NPCs.SupremeCalamitas
else
{
// Shoot fists.
float fireRate = BossRushEvent.BossRushActive ? 3.5f : MathHelper.Lerp(3f, 4f, 1f - totalLifeRatio);
float fireRate = BossRushEvent.BossRushActive ? 2.8f : MathHelper.Lerp(2.5f, 3f, 1f - totalLifeRatio);
if (NPC.AnyNPCs(ModContent.NPCType<SupremeCatastrophe>()) == false)
fireRate = BossRushEvent.BossRushActive ? 3.5f + (19 - BigAttackLimit) * 0.45f : MathHelper.Lerp(3f, (4f + (19 - BigAttackLimit) * 0.45f), 1f - totalLifeRatio) * 1.2f;
fireRate = BossRushEvent.BossRushActive ? 3.5f + (29 - BigAttackLimit) * 0.45f : MathHelper.Lerp(3f, (4f + (29 - BigAttackLimit) * 0.45f), 1f - totalLifeRatio) * 1.2f;
if (Phase2 && BigAttackLimit == 0)
fireRate = 1;
@@ -389,10 +389,13 @@ namespace CalamityMod.NPCs.SupremeCalamitas
if (BigAttackLimit == (Phase2 ? 1 : 0) && death)
{
Projectile.NewProjectile(NPC.GetSource_FromAI(), fistSpawnPosition, (NPC.DirectionTo(Target.Center) * 13f).RotatedBy(0.25f), type, damage, 0f, Main.myPlayer, 0f, 1, 2);
Projectile.NewProjectile(NPC.GetSource_FromAI(), fistSpawnPosition, (NPC.DirectionTo(Target.Center) * 13f).RotatedBy(0.7f), type, damage, 0f, Main.myPlayer, 0f, 0, 2);
Projectile.NewProjectile(NPC.GetSource_FromAI(), fistSpawnPosition, (NPC.DirectionTo(Target.Center) * 13f).RotatedBy(-0.25f), type, damage, 0f, Main.myPlayer, 0f, 1, 2);
Projectile.NewProjectile(NPC.GetSource_FromAI(), fistSpawnPosition, (NPC.DirectionTo(Target.Center) * 13f).RotatedBy(-0.7f), type, damage, 0f, Main.myPlayer, 0f, 0, 2);
if (NPC.AnyNPCs(ModContent.NPCType<SupremeCatastrophe>()) == false)
{
Projectile.NewProjectile(NPC.GetSource_FromAI(), fistSpawnPosition, (NPC.DirectionTo(Target.Center) * 9.5f).RotatedBy(0.15f), type, damage, 0f, Main.myPlayer, 0f, 1, 2);
Projectile.NewProjectile(NPC.GetSource_FromAI(), fistSpawnPosition, (NPC.DirectionTo(Target.Center) * 9.5f).RotatedBy(-0.15f), type, damage, 0f, Main.myPlayer, 0f, 1, 2);
}
Projectile.NewProjectile(NPC.GetSource_FromAI(), fistSpawnPosition, (NPC.DirectionTo(Target.Center) * 9.5f).RotatedBy(0.6f), type, damage, 0f, Main.myPlayer, 0f, 0, 2);
Projectile.NewProjectile(NPC.GetSource_FromAI(), fistSpawnPosition, (NPC.DirectionTo(Target.Center) * 9.5f).RotatedBy(-0.6f), 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)
@@ -418,7 +421,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
{
SoundEngine.PlaySound(SupremeCalamitas.BrimstoneShotSound with { Volume = 1.2f, Pitch = 0.4f }, NPC.Center);
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);
Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + randPos, NPC.DirectionTo(Target.Center) * (7.5f - (Phase2 ? (29 - BigAttackLimit) * 0.13f : (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);
+4 -4
View File
@@ -267,8 +267,8 @@ namespace CalamityMod.NPCs.SupremeCalamitas
{
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) * 130, NPC.DirectionTo(Target.Center).RotatedBy(0.35f) * 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.35f) * 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.34f) * 90f, type, damage, 0f, Main.myPlayer, 0f, 0, 50);
Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + NPC.DirectionTo(Target.Center) * 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);
@@ -325,7 +325,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
// Have a small delay prior to shooting projectiles.
if (AttackDelayTimer < 120f)
AttackDelayTimer += (death ? 2 : 1);
AttackDelayTimer += (death ? 1.5f : 1f);
// Handle projectile shots.
else if (BigAttackTimer > PreBigAttackPause)
@@ -392,7 +392,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
else
{
// Shoot sword slashes.
float fireRate = BossRushEvent.BossRushActive ? 4f : MathHelper.Lerp(3f, 4f, 1f - totalLifeRatio) * (NPC.AnyNPCs(ModContent.NPCType<SupremeCataclysm>()) == false ? 1.2f : 1);
float fireRate = BossRushEvent.BossRushActive ? 2.8f : MathHelper.Lerp(2.5f, 3f, 1f - totalLifeRatio) * (NPC.AnyNPCs(ModContent.NPCType<SupremeCataclysm>()) == false ? 1.35f : 1);
if (Phase2 && BigAttackLimit == 0)
fireRate = 1;
SlashCounter += fireRate;
+16 -1
View File
@@ -5,6 +5,7 @@ using CalamityMod.Events;
using CalamityMod.NPCs;
using CalamityMod.NPCs.CalClone;
using CalamityMod.NPCs.SupremeCalamitas;
using CalamityMod.Particles;
using CalamityMod.World;
using Microsoft.Xna.Framework;
using Terraria;
@@ -25,7 +26,7 @@ namespace CalamityMod.Projectiles.Boss
public override void SetDefaults()
{
Projectile.width = 18;
Projectile.height = 18;
Projectile.height = 44;
Projectile.hostile = true;
Projectile.ignoreWater = true;
Projectile.tileCollide = false;
@@ -48,6 +49,14 @@ namespace CalamityMod.Projectiles.Boss
{
bool bossRush = BossRushEvent.BossRushActive;
int target = Player.FindClosest(Projectile.Center, 1, 1);
float targetDist;
if (target != -1 && !Main.player[target].dead && Main.player[target].active && Main.player[target] != null)
targetDist = Vector2.Distance(Main.player[target].Center, Projectile.Center);
else
targetDist = 1000;
if (Projectile.velocity.Length() < (Projectile.ai[1] == 0f ? (bossRush ? 17.5f : 14f) : (bossRush ? 12.5f : 10f)))
Projectile.velocity *= bossRush ? 1.0125f : 1.01f;
@@ -90,6 +99,11 @@ namespace CalamityMod.Projectiles.Boss
trailDust.velocity = (-Projectile.velocity * 0.5f) * Main.rand.NextFloat(0.1f, 0.9f);
trailDust.scale = Main.rand.NextFloat(0.2f, 0.6f);
}
else if (Projectile.timeLeft % 2 == 0 && targetDist < 1400f)
{
SparkParticle orb = new SparkParticle(Projectile.Center - Projectile.velocity * 0.5f, -Projectile.velocity * Main.rand.NextFloat(0.1f, 0.6f), false, (int)MathHelper.Clamp(9 * Utils.GetLerpValue(510, 690, Projectile.timeLeft), 2, 9), 1.1f, Color.Lerp(Color.Red, Color.Magenta, 0.5f) * Projectile.Opacity * 0.85f);
GeneralParticleHandler.SpawnParticle(orb);
}
if (Projectile.localAI[0] == 0f)
{
@@ -131,5 +145,6 @@ namespace CalamityMod.Projectiles.Boss
CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1);
return false;
}
public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, 18, targetHitbox);
}
}
+24
View File
@@ -7,6 +7,7 @@ using CalamityMod.World;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.Audio;
using CalamityMod.Particles;
using Terraria.ID;
using Terraria.ModLoader;
@@ -46,8 +47,31 @@ namespace CalamityMod.Projectiles.Boss
if (Projectile.frame > 3)
Projectile.frame = 0;
int target = Player.FindClosest(Projectile.Center, 1, 1);
float targetDist;
if (target != -1 && !Main.player[target].dead && Main.player[target].active && Main.player[target] != null)
targetDist = Vector2.Distance(Main.player[target].Center, Projectile.Center);
else
targetDist = 1000;
Lighting.AddLight(Projectile.Center, 0.9f * Projectile.Opacity, 0f, 0f);
if (targetDist < 1400f)
{
// Spawn in a helix-style pattern
float sine = (float)Math.Sin(Projectile.timeLeft * 0.575f / MathHelper.Pi);
Vector2 offset = Projectile.velocity.SafeNormalize(Vector2.UnitX).RotatedBy(MathHelper.PiOver2) * sine * 16f;
SparkParticle orb = new(Projectile.Center + offset, -Projectile.velocity * 0.05f, false, 8, 0.8f, Main.rand.NextBool() ? Color.Red : Color.Lerp(Color.Red, Color.Magenta, 0.5f));
GeneralParticleHandler.SpawnParticle(orb);
SparkParticle orb2 = new(Projectile.Center - offset, -Projectile.velocity * 0.05f, false, 8, 0.8f, Main.rand.NextBool() ? Color.Red : Color.Lerp(Color.Red, Color.Magenta, 0.5f));
GeneralParticleHandler.SpawnParticle(orb2);
}
if (Projectile.timeLeft < 51)
Projectile.Opacity -= 0.02f;
+16 -2
View File
@@ -196,8 +196,8 @@ namespace CalamityMod.Projectiles.Boss
Lighting.AddLight(Projectile.Center, 3f * Projectile.Opacity, 0f, 0f);
float inertia = (revenge ? 4.5f : 5f) + speedAdd;
float speed = (revenge ? 2.2f : 1.85f) + (speedAdd * 0.25f);
float inertia = (revenge ? 5f : 5.5f) + speedAdd;
float speed = (revenge ? 2.9f : 2.2f) + (speedAdd * 0.25f);
float minDist = 160f;
if (NPC.AnyNPCs(ModContent.NPCType<SoulSeekerSupreme>()) || NPC.AnyNPCs(ModContent.NPCType<BrimstoneHeart>()))
@@ -293,6 +293,20 @@ namespace CalamityMod.Projectiles.Boss
player.statLife -= healthToDrain;
// Play a sound and visual to make the fact youre taking damage more obvious
if (time % 6 == 0)
{
SoundStyle burn = new("CalamityMod/Sounds/Item/WeldingBurn");
SoundEngine.PlaySound(burn with { Volume = 0.25f, Pitch = 0.4f }, player.Center);
}
GlowOrbParticle orb = new GlowOrbParticle(player.Center, new Vector2(6, 6).RotatedByRandom(100) * Main.rand.NextFloat(0.3f, 1.1f), false, 60, Main.rand.NextFloat(1.55f, 3.75f), Main.rand.NextBool() ? Color.Red : Color.Lerp(Color.Red, Color.Magenta, 0.5f), true, true);
GeneralParticleHandler.SpawnParticle(orb);
if (Main.rand.NextBool())
{
GlowOrbParticle orb2 = new GlowOrbParticle(player.Center, new Vector2(6, 6).RotatedByRandom(100) * Main.rand.NextFloat(0.3f, 1.1f), false, 60, Main.rand.NextFloat(1.55f, 3.75f), Color.Black, false, true, false);
GeneralParticleHandler.SpawnParticle(orb2);
}
// Drain Adrenaline extremely rapidly. 4% of current Adrenaline is lost per frame.
CalamityPlayer modPlayer = player.Calamity();
if (modPlayer.AdrenalineEnabled)
+5
View File
@@ -45,6 +45,11 @@ namespace CalamityMod.Projectiles.Boss
public override void AI()
{
Dust dust = Dust.NewDustPerfect(Projectile.Center, Main.rand.NextBool(3) ? 60 : 114);
dust.noGravity = true;
dust.velocity = Projectile.velocity * Main.rand.NextFloat(0.1f, 0.7f);
dust.scale = Main.rand.NextFloat(0.9f, 1.8f);
x++;
Projectile.velocity.Y = (float)(5D * Math.Sin(x / 5D));
+16 -24
View File
@@ -61,7 +61,7 @@ namespace CalamityMod.Projectiles.Boss
if (Projectile.ai[1] == 1f)
Projectile.Opacity = MathHelper.Clamp(Projectile.timeLeft / 60f, 0f, 1f);
else
Projectile.Opacity = MathHelper.Clamp(1f - ((Projectile.timeLeft - 90) / 60f), 0f, 1f);
Projectile.Opacity = MathHelper.Clamp(1f - ((Projectile.timeLeft - 130) / 20f), 0f, 1f);
}
Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2;
@@ -77,7 +77,7 @@ namespace CalamityMod.Projectiles.Boss
if (!withinRange)
{
float inertia = revenge ? 80f : 100f;
float homeSpeed = revenge ? 20f : 15f;
float homeSpeed = revenge ? 13f : 9f;
float minDist = 40f;
if (target >= 0 && Main.player[target].active && !Main.player[target].dead)
{
@@ -103,9 +103,9 @@ namespace CalamityMod.Projectiles.Boss
else
targetDist = 1000;
if (!withinRange)
if (!withinRange && Main.rand.NextBool())
{
GlowOrbParticle orb = new GlowOrbParticle(Projectile.Center - Projectile.velocity + Main.rand.NextVector2Circular(20, 20), -Projectile.velocity * Main.rand.NextFloat(0.3f, 1.9f), false, 14, Main.rand.NextFloat(0.35f, 0.6f), (Main.rand.NextBool(4) ? new Color(121, 21, 77) : Color.Red) * Projectile.Opacity, true, true);
SparkParticle orb = new SparkParticle(Projectile.Center - Projectile.velocity + Main.rand.NextVector2Circular(20, 20), -Projectile.velocity * Main.rand.NextFloat(0.1f, 1f), false, 14, Main.rand.NextFloat(0.35f, 0.6f), (Main.rand.NextBool() ? Color.Lerp(Color.Red, Color.Magenta, 0.5f) : Color.Red) * Projectile.Opacity);
GeneralParticleHandler.SpawnParticle(orb);
}
if ((Projectile.timeLeft == 1 && !withinRange) || (targetDist < 224 && Projectile.Opacity == 1f)) // When within 14 blocks of player or when it runs out of time
@@ -119,7 +119,7 @@ namespace CalamityMod.Projectiles.Boss
}
if (withinRange && Projectile.ai[1] == 0)
{
Projectile.velocity *= 0.95f;
Projectile.velocity *= 0.9f;
for (int i = 0; i < 2; i++)
{
Dust failShotDust = Dust.NewDustPerfect(Projectile.Center, Main.rand.NextBool(3) ? 60 : 114);
@@ -212,27 +212,19 @@ namespace CalamityMod.Projectiles.Boss
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, velocity2, type, (int)Math.Round(Projectile.damage * 0.75), 0f, Projectile.owner, 0f, 1f);
}
}
}
int dustType = (int)CalamityDusts.Brimstone;
if (CalamityGlobalNPC.SCal != -1)
{
if (Main.npc[CalamityGlobalNPC.SCal].active)
for (int i = 0; i < 18; i++)
{
if (Main.npc[CalamityGlobalNPC.SCal].ModNPC<SupremeCalamitas>().cirrus)
dustType = (int)CalamityDusts.PurpleCosmilite;
Vector2 velocity = new Vector2(12, 12).RotatedByRandom(100);
PointParticle spark2 = new PointParticle(Projectile.Center + velocity, velocity * Main.rand.NextFloat(0.3f, 1f), false, 15, 1.1f, (Main.rand.NextBool() ? Color.Lerp(Color.Red, Color.Magenta, 0.5f) : Color.Red) * 0.6f);
GeneralParticleHandler.SpawnParticle(spark2);
}
for (int i = 0; i < 18; i++)
{
Dust failShotDust = Dust.NewDustPerfect(Projectile.Center, Main.rand.NextBool(3) ? 60 : 114);
failShotDust.noGravity = true;
failShotDust.velocity = new Vector2(16, 16).RotatedByRandom(100) * Main.rand.NextFloat(0.5f, 1.3f);
failShotDust.scale = Main.rand.NextFloat(0.75f, 1.3f);
}
}
Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 50, default, 1f);
for (int j = 0; j < 10; j++)
{
int redFire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 0, default, 1.5f);
Main.dust[redFire].noGravity = true;
Main.dust[redFire].velocity *= 3f;
redFire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 50, default, 1f);
Main.dust[redFire].velocity *= 2f;
Main.dust[redFire].noGravity = true;
}
}
}
+15 -25
View File
@@ -56,7 +56,7 @@ namespace CalamityMod.Projectiles.Boss
if (Projectile.ai[1] == 1f)
Projectile.Opacity = MathHelper.Clamp(Projectile.timeLeft / 60f, 0f, 1f);
else
Projectile.Opacity = MathHelper.Clamp(1f - ((Projectile.timeLeft - 60) / 60f), 0f, 1f);
Projectile.Opacity = MathHelper.Clamp(1f - ((Projectile.timeLeft - 130) / 20f), 0f, 1f);
}
Lighting.AddLight(Projectile.Center, 0.9f * Projectile.Opacity, 0f, 0f);
@@ -88,9 +88,9 @@ namespace CalamityMod.Projectiles.Boss
else
targetDist = 1000;
if (!withinRange)
if (!withinRange && Main.rand.NextBool())
{
GlowOrbParticle orb = new GlowOrbParticle(Projectile.Center - Projectile.velocity + Main.rand.NextVector2Circular(30, 30), -Projectile.velocity * Main.rand.NextFloat(0.3f, 1.9f), false, 14, Main.rand.NextFloat(0.5f, 0.75f), (Main.rand.NextBool(4) ? new Color(121, 21, 77) :Color.Red) * Projectile.Opacity, true, true);
SparkParticle orb = new SparkParticle(Projectile.Center - Projectile.velocity + Main.rand.NextVector2Circular(30, 30), -Projectile.velocity * Main.rand.NextFloat(0.1f, 1f), false, 14, Main.rand.NextFloat(0.5f, 0.75f), (Main.rand.NextBool() ? Color.Lerp(Color.Red, Color.Magenta, 0.5f) : Color.Red) * Projectile.Opacity);
GeneralParticleHandler.SpawnParticle(orb);
}
if ((Projectile.timeLeft == 1 && !withinRange) || (targetDist < 224 && Projectile.Opacity == 1f)) // When within 14 blocks of player or when it runs out of time
@@ -104,7 +104,7 @@ namespace CalamityMod.Projectiles.Boss
}
if (withinRange && Projectile.ai[1] == 0)
{
Projectile.velocity *= 0.95f;
Projectile.velocity *= 0.9f;
for (int i = 0; i < 2; i++)
{
Dust failShotDust = Dust.NewDustPerfect(Projectile.Center, Main.rand.NextBool(3) ? 60 : 114);
@@ -197,29 +197,19 @@ namespace CalamityMod.Projectiles.Boss
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, velocity2, type, (int)Math.Round(Projectile.damage * 0.75), 0f, Projectile.owner, 0f, 1f);
}
}
}
int dustType = (int)CalamityDusts.Brimstone;
if (CalamityGlobalNPC.SCal != -1)
{
if (Main.npc[CalamityGlobalNPC.SCal].active)
for (int i = 0; i < 25; i++)
{
if (Main.npc[CalamityGlobalNPC.SCal].ModNPC<SupremeCalamitas>().cirrus)
dustType = (int)CalamityDusts.PurpleCosmilite;
Vector2 velocity = new Vector2(15, 15).RotatedByRandom(100);
PointParticle spark2 = new PointParticle(Projectile.Center + velocity, velocity * Main.rand.NextFloat(0.3f, 1f), false, 15, 1.25f, (Main.rand.NextBool() ? Color.Lerp(Color.Red, Color.Magenta, 0.5f) : Color.Red) * 0.6f);
GeneralParticleHandler.SpawnParticle(spark2);
}
for (int i = 0; i < 25; i++)
{
Dust failShotDust = Dust.NewDustPerfect(Projectile.Center, Main.rand.NextBool(3) ? 60 : 114);
failShotDust.noGravity = true;
failShotDust.velocity = new Vector2(20, 20).RotatedByRandom(100) * Main.rand.NextFloat(0.5f, 1.3f);
failShotDust.scale = Main.rand.NextFloat(0.9f, 1.8f);
}
}
for (int j = 0; j < 2; j++)
Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 50, default, 1f);
for (int k = 0; k < 20; k++)
{
int redFire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 0, default, 1.5f);
Main.dust[redFire].noGravity = true;
Main.dust[redFire].velocity *= 3f;
redFire = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 50, default, 1f);
Main.dust[redFire].velocity *= 2f;
Main.dust[redFire].noGravity = true;
}
}
}
+20 -5
View File
@@ -52,7 +52,7 @@ namespace CalamityMod.Projectiles.Boss
{
if (Projectile.timeLeft > 240)
{
shootVel = Projectile.velocity * 0.2f;
shootVel = Projectile.velocity * 0.4f;
Projectile.timeLeft = 240;
rotDirection = Main.rand.NextBool() ? -1 : 1;
Projectile.velocity *= 5.5f;
@@ -79,14 +79,14 @@ namespace CalamityMod.Projectiles.Boss
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 + randPos, (-shootVel * MathHelper.Clamp(Time * 0.1f, 1, 1.8f)) * Main.rand.NextFloat(0.6f, 0.9f), type, Projectile.damage, 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.75f, 1f), type, Projectile.damage, 0f, Main.myPlayer, 0f, Main.rand.Next(0, 1 + 1), 0);
}
if (Projectile.timeLeft <= 200 && 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, 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, 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.75f, 1f), type, Projectile.damage, 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.75f, 1f), type, Projectile.damage, 0f, Main.myPlayer, 0f, Main.rand.Next(0, 1 + 1), 0);
}
if (Projectile.timeLeft == 1)
{
@@ -106,6 +106,7 @@ namespace CalamityMod.Projectiles.Boss
cataclysmdust.color = Color.Red;
}
}
Projectile.Kill();
}
Vector2 vel = new Vector2(14, 14).RotatedByRandom(100) * Main.rand.NextFloat(0.1f, 2.5f);
@@ -132,7 +133,7 @@ namespace CalamityMod.Projectiles.Boss
Projectile.Opacity = 1;
if (Projectile.timeLeft > 300)
Projectile.timeLeft = 300;
Projectile.velocity *= 1.009f;
Projectile.velocity *= 1.006f;
}
if (Projectile.velocity.X < 0f)
@@ -157,6 +158,20 @@ namespace CalamityMod.Projectiles.Boss
Time++;
if (NPC.AnyNPCs(ModContent.NPCType<SupremeCataclysm>()) == false)
{
Projectile.timeLeft = 1;
for (int k = 0; k < 10; k++)
{
Vector2 velocity = new Vector2(7, 7).RotatedByRandom(100) * Main.rand.NextFloat(0.8f, 1.2f);
Dust dust = Dust.NewDustPerfect(Projectile.Center + velocity, 66, velocity * Main.rand.NextFloat(0.2f, 1f));
dust.noGravity = true;
dust.scale = Main.rand.NextFloat(1.3f, 1.9f);
dust.color = Color.Lerp(Color.Red, Color.Magenta, 0.5f);
}
}
// Emit light.
Lighting.AddLight(Projectile.Center, 0.5f * Projectile.Opacity, 0f, 0f);
}
+20 -5
View File
@@ -9,6 +9,7 @@ using CalamityMod.World;
using CalamityMod.Particles;
using Terraria.ModLoader;
using Terraria.Audio;
using CalamityMod.NPCs.SupremeCalamitas;
namespace CalamityMod.Projectiles.Boss
{
@@ -83,7 +84,7 @@ namespace CalamityMod.Projectiles.Boss
catastrophedust.color = Color.DeepSkyBlue;
catastrophedust.alpha = 100;
}
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Projectile.velocity.SafeNormalize(Vector2.UnitY) * 0.1f, ModContent.ProjectileType<SupremeCatastropheSlash>(), Projectile.damage, 0f, Main.myPlayer, 0f, 5, 4 + Time);
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Projectile.velocity.SafeNormalize(Vector2.UnitY) * 0.1f, ModContent.ProjectileType<SupremeCatastropheSlash>(), Projectile.damage, 0f, Main.myPlayer, 0f, 5, 3 + Time);
return;
}
if (Projectile.ai[2] == 1 || Projectile.ai[2] == 2)
@@ -109,18 +110,18 @@ namespace CalamityMod.Projectiles.Boss
}
}
// Slash trails
else if (Projectile.ai[2] >= 4)
else if (Projectile.ai[2] >= 4 && Projectile.ai[2] < 50)
{
Projectile.extraUpdates = 0;
if (Projectile.ai[1] == 5) // Non dash trails
{
if (Projectile.timeLeft == 1500)
{
Projectile.timeLeft = death ? 40 : 50 - (int)(Projectile.ai[2] - 4);
Projectile.timeLeft = (death ? 35 : 45) - (int)(Projectile.ai[2] - 4);
SparkParticle spark1 = new SparkParticle(Projectile.Center, Projectile.velocity, false, 25, 5f, Color.DeepSkyBlue * 0.35f);
GeneralParticleHandler.SpawnParticle(spark1);
}
else if (Projectile.timeLeft == 1)
else if (Projectile.timeLeft == 1 && NPC.AnyNPCs(ModContent.NPCType<SupremeCatastrophe>()) == true)
{
dashSlashExplode = true;
VoidSparkParticle spark = new VoidSparkParticle(Projectile.Center, Projectile.velocity, false, 9, 0.7f, Color.Cyan * 0.7f);
@@ -152,7 +153,7 @@ namespace CalamityMod.Projectiles.Boss
SparkParticle spark3 = new SparkParticle(Projectile.Center - Projectile.velocity * 50, Projectile.velocity, false, 25, 5f, Color.DeepSkyBlue * 0.35f);
GeneralParticleHandler.SpawnParticle(spark3);
}
else if (Projectile.timeLeft == 1)
else if (Projectile.timeLeft == 1 && NPC.AnyNPCs(ModContent.NPCType<SupremeCatastrophe>()) == true)
{
dashSlashExplode = true;
VoidSparkParticle spark = new VoidSparkParticle(Projectile.Center, Projectile.velocity, false, 9, 1.3f, Color.Cyan * 0.7f);
@@ -174,6 +175,20 @@ namespace CalamityMod.Projectiles.Boss
}
}
if (NPC.AnyNPCs(ModContent.NPCType<SupremeCatastrophe>()) == false)
{
Projectile.timeLeft = 1;
for (int k = 0; k < 10; k++)
{
Vector2 velocity = new Vector2(7, 7).RotatedByRandom(100) * Main.rand.NextFloat(0.8f, 1.2f);
Dust dust = Dust.NewDustPerfect(Projectile.Center + velocity, 66, velocity * Main.rand.NextFloat(0.2f, 1f));
dust.noGravity = true;
dust.scale = Main.rand.NextFloat(1.3f, 1.9f);
dust.color = Color.Cyan;
}
}
// Emit light.
Lighting.AddLight(Projectile.Center, 0.5f * Projectile.Opacity, 0f, 0f);
}
+1 -1
View File
@@ -182,7 +182,7 @@ namespace CalamityMod.Skies
x = Vector2.Distance(Main.player[Main.myPlayer].Center, Main.npc[this.SCalIndex].Center);
float intensityFactor = BossRushEvent.BossRushActive ? -0.2f : 1f;
return (1f - Utils.SmoothStep(3000f, 6000f, x)) * intensityFactor;
return (1f - Utils.SmoothStep(4500f, 9000f, x)) * intensityFactor;
}
return 0f;