Sepulcher gores/sounds + wip seeker sprite
No files matched your search
|
After Width: | Height: | Size: 669 B |
|
After Width: | Height: | Size: 558 B |
|
After Width: | Height: | Size: 544 B |
|
After Width: | Height: | Size: 546 B |
|
After Width: | Height: | Size: 616 B |
|
After Width: | Height: | Size: 550 B |
|
After Width: | Height: | Size: 348 B |
|
After Width: | Height: | Size: 305 B |
|
After Width: | Height: | Size: 260 B |
|
After Width: | Height: | Size: 292 B |
|
After Width: | Height: | Size: 336 B |
|
After Width: | Height: | Size: 304 B |
|
After Width: | Height: | Size: 423 B |
|
After Width: | Height: | Size: 222 B |
|
After Width: | Height: | Size: 592 B |
|
After Width: | Height: | Size: 763 B |
|
After Width: | Height: | Size: 343 B |
|
After Width: | Height: | Size: 416 B |
|
After Width: | Height: | Size: 530 B |
|
After Width: | Height: | Size: 505 B |
|
After Width: | Height: | Size: 266 B |
|
After Width: | Height: | Size: 634 B |
|
After Width: | Height: | Size: 305 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 564 B |
|
After Width: | Height: | Size: 546 B |
|
After Width: | Height: | Size: 277 B |
|
After Width: | Height: | Size: 212 B |
|
After Width: | Height: | Size: 996 B |
|
After Width: | Height: | Size: 314 B |
@@ -123,6 +123,11 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
{
|
||||
if (npc.life <= 0)
|
||||
{
|
||||
for (int i = 1; i <= 2; i++)
|
||||
{
|
||||
Vector2 heartGoreVelocity = new Vector2((i == 1).ToDirectionInt() * 3f, Main.rand.NextFloat(-2f, 0f));
|
||||
Gore.NewGorePerfect(npc.Center, heartGoreVelocity, mod.GetGoreSlot($"Gores/SupremeCalamitas/BrimstoneHeart_Gore{i}"), npc.scale);
|
||||
}
|
||||
for (int i = 0; i < ChainEndpoints.Count; i++)
|
||||
TendrilDestructionEffects(i);
|
||||
}
|
||||
|
||||
@@ -85,8 +85,6 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
npc.noGravity = true;
|
||||
npc.noTileCollide = true;
|
||||
npc.canGhostHeal = false;
|
||||
npc.HitSound = SoundID.NPCHit4;
|
||||
npc.DeathSound = SoundID.NPCDeath14;
|
||||
npc.netAlways = true;
|
||||
npc.dontCountMe = true;
|
||||
|
||||
@@ -113,8 +111,9 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
// Die if the segment is not present.
|
||||
if (!Main.npc.IndexInRange((int)npc.ai[0]) || !Main.npc[(int)npc.ai[0]].active)
|
||||
{
|
||||
npc.active = false;
|
||||
npc.netUpdate = true;
|
||||
npc.life = 0;
|
||||
npc.HitEffect(0, 10.0);
|
||||
npc.checkDead();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -184,7 +183,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
|
||||
Vector2 armDrawPosition = Limbs[1].Center - Main.screenPosition;
|
||||
drawColor = Lighting.GetColor((int)(Limbs[1].Center.X / 16), (int)(Limbs[1].Center.Y / 16));
|
||||
spriteBatch.Draw(armTexture, armDrawPosition, null, drawColor, Limbs[1].Rotation + MathHelper.PiOver2, armTexture.Size() * new Vector2(0.5f, 0f), npc.scale, SpriteEffects.None, 0f);
|
||||
spriteBatch.Draw(armTexture, armDrawPosition, null, drawColor, Limbs[1].Rotation + MathHelper.PiOver2, armTexture.Size() * new Vector2(0.5f, 0f), npc.scale, SpriteEffects.FlipVertically, 0f);
|
||||
|
||||
Vector2 handDrawPosition = armDrawPosition;
|
||||
SpriteEffects handDirection = npc.direction == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None;
|
||||
@@ -193,6 +192,22 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void HitEffect(int hitDirection, double damage)
|
||||
{
|
||||
if (npc.life <= 0)
|
||||
{
|
||||
Vector2 forearmGoreSpawnPosition = Limbs[0].Center + Main.rand.NextVector2Circular(6f, 6f);
|
||||
Vector2 armGoreSpawnPosition = Limbs[1].Center + Main.rand.NextVector2Circular(6f, 6f);
|
||||
Vector2 handGoreSpawnPosition = armGoreSpawnPosition + Main.rand.NextVector2Circular(6f, 6f);
|
||||
|
||||
Gore.NewGorePerfect(armGoreSpawnPosition, Main.rand.NextVector2Circular(3f, 3f), mod.GetGoreSlot($"Gores/SupremeCalamitas/SepulcherArm_Gore"), npc.scale);
|
||||
for (int i = 1; i <= 2; i++)
|
||||
Gore.NewGorePerfect(forearmGoreSpawnPosition, Main.rand.NextVector2Circular(3f, 3f), mod.GetGoreSlot($"Gores/SupremeCalamitas/SepulcherForearm_Gore{i}"), npc.scale);
|
||||
for (int i = 1; i <= 2; i++)
|
||||
Gore.NewGorePerfect(handGoreSpawnPosition, Main.rand.NextVector2Circular(3f, 3f), mod.GetGoreSlot($"Gores/SupremeCalamitas/SepulcherHand_Gore{i}"), npc.scale);
|
||||
}
|
||||
}
|
||||
|
||||
public override bool CheckActive() => false;
|
||||
|
||||
public override bool PreNPCLoot() => false;
|
||||
|
||||
|
Before Width: | Height: | Size: 577 B After Width: | Height: | Size: 769 B |
@@ -44,8 +44,6 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
npc.noGravity = true;
|
||||
npc.noTileCollide = true;
|
||||
npc.canGhostHeal = false;
|
||||
npc.HitSound = SoundID.NPCHit4;
|
||||
npc.DeathSound = SoundID.NPCDeath14;
|
||||
npc.netAlways = true;
|
||||
npc.dontCountMe = true;
|
||||
}
|
||||
@@ -164,29 +162,28 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
{
|
||||
if (npc.life <= 0)
|
||||
{
|
||||
npc.position.X = npc.position.X + (float)(npc.width / 2);
|
||||
npc.position.Y = npc.position.Y + (float)(npc.height / 2);
|
||||
npc.width = 50;
|
||||
npc.height = 50;
|
||||
npc.position.X = npc.position.X - (float)(npc.width / 2);
|
||||
npc.position.Y = npc.position.Y - (float)(npc.height / 2);
|
||||
for (int num621 = 0; num621 < 5; num621++)
|
||||
int variant = (int)(npc.localAI[3] / 2f % 2f);
|
||||
if (variant == 0)
|
||||
{
|
||||
int num622 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num622].velocity *= 3f;
|
||||
if (Main.rand.NextBool(2))
|
||||
for (int i = 1; i <= 9; i++)
|
||||
{
|
||||
Main.dust[num622].scale = 0.5f;
|
||||
Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f;
|
||||
if (!Main.rand.NextBool(3))
|
||||
continue;
|
||||
|
||||
Vector2 goreSpawnPosition = npc.Center;
|
||||
Gore.NewGorePerfect(goreSpawnPosition, Main.rand.NextVector2Circular(2f, 2f), mod.GetGoreSlot($"Gores/SupremeCalamitas/SepulcherBody1_Gore{i}"), npc.scale);
|
||||
}
|
||||
}
|
||||
for (int num623 = 0; num623 < 10; num623++)
|
||||
else
|
||||
{
|
||||
int num624 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[num624].noGravity = true;
|
||||
Main.dust[num624].velocity *= 5f;
|
||||
num624 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num624].velocity *= 2f;
|
||||
for (int i = 1; i <= 7; i++)
|
||||
{
|
||||
if (!Main.rand.NextBool(3))
|
||||
continue;
|
||||
|
||||
Vector2 goreSpawnPosition = npc.Center;
|
||||
Gore.NewGorePerfect(goreSpawnPosition, Main.rand.NextVector2Circular(2f, 2f), mod.GetGoreSlot($"Gores/SupremeCalamitas/SepulcherBody2_Gore{i}"), npc.scale);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.Projectiles.Boss;
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
using CalamityMod.World;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System.IO;
|
||||
@@ -38,8 +39,6 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
npc.noGravity = true;
|
||||
npc.noTileCollide = true;
|
||||
npc.canGhostHeal = false;
|
||||
npc.HitSound = SoundID.NPCHit13;
|
||||
npc.DeathSound = SoundID.NPCDeath13;
|
||||
npc.netAlways = true;
|
||||
npc.dontCountMe = true;
|
||||
|
||||
@@ -151,6 +150,21 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
npc.frame.Y = ((int)(npc.frameCounter / 5) + npc.whoAmI) % Main.npcFrameCount[npc.type] * frameHeight;
|
||||
}
|
||||
|
||||
public override void HitEffect(int hitDirection, double damage)
|
||||
{
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient && npc.life <= 0)
|
||||
{
|
||||
for (int i = 0; i < Main.rand.Next(1, 3 + 1); i++)
|
||||
{
|
||||
if (!Main.rand.NextBool(3))
|
||||
continue;
|
||||
|
||||
Vector2 soulVelocity = -Vector2.UnitY.RotatedByRandom(0.53f) * Main.rand.NextFloat(2.5f, 4f);
|
||||
Projectile.NewProjectile(npc.Center, soulVelocity, ModContent.ProjectileType<SepulcherSoul>(), 0, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override bool CheckActive()
|
||||
{
|
||||
return false;
|
||||
|
||||
|
Before Width: | Height: | Size: 736 B After Width: | Height: | Size: 625 B |
@@ -45,9 +45,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
npc.noGravity = true;
|
||||
npc.noTileCollide = true;
|
||||
npc.canGhostHeal = false;
|
||||
npc.HitSound = SoundID.NPCHit4;
|
||||
npc.DeathSound = SoundID.NPCDeath14;
|
||||
npc.netAlways = true;
|
||||
npc.netAlways = true;
|
||||
}
|
||||
|
||||
public override void SendExtraAI(BinaryWriter writer)
|
||||
@@ -145,30 +143,17 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
}
|
||||
}
|
||||
|
||||
if (Main.player[npc.target].dead || !NPC.AnyNPCs(ModContent.NPCType<BrimstoneHeart>()) || CalamityGlobalNPC.SCal < 0 || !Main.npc[CalamityGlobalNPC.SCal].active)
|
||||
{
|
||||
npc.TargetClosest(false);
|
||||
npc.alpha += 5;
|
||||
if (npc.alpha >= 255)
|
||||
{
|
||||
npc.alpha = 255;
|
||||
for (int i = 0; i < Main.maxNPCs; i++)
|
||||
{
|
||||
if (Main.npc[i].type == npc.type || Main.npc[i].type == ModContent.NPCType<SCalWormBody>() || Main.npc[i].type == ModContent.NPCType<SCalWormBodyWeak>() || Main.npc[i].type == ModContent.NPCType<SCalWormTail>())
|
||||
{
|
||||
Main.npc[i].active = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
npc.alpha -= 42;
|
||||
if (npc.alpha < 0)
|
||||
{
|
||||
npc.alpha = 0;
|
||||
}
|
||||
}
|
||||
if (Main.player[npc.target].dead || !NPC.AnyNPCs(ModContent.NPCType<BrimstoneHeart>()) || CalamityGlobalNPC.SCal < 0 || !Main.npc[CalamityGlobalNPC.SCal].active)
|
||||
{
|
||||
npc.TargetClosest(false);
|
||||
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.NPCKilled, "Sounds/NPCKilled/SepulcherDeath"), Main.player[npc.target].Center);
|
||||
npc.life = 0;
|
||||
npc.HitEffect();
|
||||
npc.active = false;
|
||||
npc.netUpdate = true;
|
||||
}
|
||||
else
|
||||
npc.Opacity = MathHelper.Clamp(npc.Opacity + 0.165f, 0f, 1f);
|
||||
|
||||
Vector2 vector18 = new Vector2(npc.position.X + npc.width * 0.5f, npc.position.Y + npc.height * 0.5f);
|
||||
float num191 = Main.player[npc.target].position.X + (Main.player[npc.target].width / 2);
|
||||
@@ -341,33 +326,20 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
|
||||
public override void HitEffect(int hitDirection, double damage)
|
||||
{
|
||||
if (npc.life <= 0)
|
||||
{
|
||||
npc.position.X = npc.position.X + (float)(npc.width / 2);
|
||||
npc.position.Y = npc.position.Y + (float)(npc.height / 2);
|
||||
npc.width = 50;
|
||||
npc.height = 50;
|
||||
npc.position.X = npc.position.X - (float)(npc.width / 2);
|
||||
npc.position.Y = npc.position.Y - (float)(npc.height / 2);
|
||||
for (int num621 = 0; num621 < 5; num621++)
|
||||
if (npc.life <= 0)
|
||||
{
|
||||
for (int i = 1; i <= 3; i++)
|
||||
{
|
||||
int num622 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num622].velocity *= 3f;
|
||||
if (Main.rand.NextBool(2))
|
||||
{
|
||||
Main.dust[num622].scale = 0.5f;
|
||||
Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f;
|
||||
}
|
||||
Vector2 goreSpawnPosition = npc.Center;
|
||||
|
||||
// Spawn at a slight offset when spawning mandibles.
|
||||
if (i == 2)
|
||||
goreSpawnPosition += npc.velocity.SafeNormalize(Vector2.Zero).RotatedBy(MathHelper.PiOver4) * 16f;
|
||||
if (i == 3)
|
||||
goreSpawnPosition += npc.velocity.SafeNormalize(Vector2.Zero).RotatedBy(-MathHelper.PiOver4) * 16f;
|
||||
Gore.NewGorePerfect(goreSpawnPosition, npc.velocity, mod.GetGoreSlot($"Gores/SupremeCalamitas/SepulcherHead_Gore{i}"), npc.scale);
|
||||
}
|
||||
for (int num623 = 0; num623 < 10; num623++)
|
||||
{
|
||||
int num624 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[num624].noGravity = true;
|
||||
Main.dust[num624].velocity *= 5f;
|
||||
num624 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num624].velocity *= 2f;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -42,8 +42,6 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
npc.noGravity = true;
|
||||
npc.noTileCollide = true;
|
||||
npc.canGhostHeal = false;
|
||||
npc.HitSound = SoundID.NPCHit4;
|
||||
npc.DeathSound = SoundID.NPCDeath14;
|
||||
npc.netAlways = true;
|
||||
npc.dontCountMe = true;
|
||||
}
|
||||
@@ -185,32 +183,15 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
public override void HitEffect(int hitDirection, double damage)
|
||||
{
|
||||
if (npc.life <= 0)
|
||||
{
|
||||
npc.position.X = npc.position.X + (float)(npc.width / 2);
|
||||
npc.position.Y = npc.position.Y + (float)(npc.height / 2);
|
||||
npc.width = 50;
|
||||
npc.height = 50;
|
||||
npc.position.X = npc.position.X - (float)(npc.width / 2);
|
||||
npc.position.Y = npc.position.Y - (float)(npc.height / 2);
|
||||
for (int num621 = 0; num621 < 5; num621++)
|
||||
{
|
||||
int num622 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 173, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num622].velocity *= 3f;
|
||||
if (Main.rand.NextBool(2))
|
||||
{
|
||||
Main.dust[num622].scale = 0.5f;
|
||||
Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f;
|
||||
}
|
||||
}
|
||||
for (int num623 = 0; num623 < 10; num623++)
|
||||
{
|
||||
int num624 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 173, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[num624].noGravity = true;
|
||||
Main.dust[num624].velocity *= 5f;
|
||||
num624 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 173, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num624].velocity *= 2f;
|
||||
}
|
||||
}
|
||||
{
|
||||
for (int i = 1; i <= 2; i++)
|
||||
{
|
||||
Vector2 goreSpawnPosition = npc.Center;
|
||||
if (i == 2)
|
||||
goreSpawnPosition -= (npc.rotation - MathHelper.PiOver2).ToRotationVector2() * 20f;
|
||||
Gore.NewGorePerfect(goreSpawnPosition, Main.rand.NextVector2Circular(3f, 3f), mod.GetGoreSlot($"Gores/SupremeCalamitas/SepulcherTail_Gore{i}"), npc.scale);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override bool CheckActive()
|
||||
|
||||
@@ -16,11 +16,15 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
{
|
||||
private int timer = 0;
|
||||
private bool start = true;
|
||||
public NPC SCal => Main.npc[CalamityGlobalNPC.SCal];
|
||||
public Player Target => Main.player[npc.target];
|
||||
public Vector2 EyePosition => npc.Center + new Vector2(npc.spriteDirection == -1 ? 40f : -36f, 16f);
|
||||
public ref float RotationalDegreeOffset => ref npc.ai[1];
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Soul Seeker");
|
||||
Main.npcFrameCount[npc.type] = 8;
|
||||
Main.npcFrameCount[npc.type] = 1;
|
||||
NPCID.Sets.TrailingMode[npc.type] = 1;
|
||||
}
|
||||
|
||||
@@ -37,8 +41,8 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
npc.defense = 60;
|
||||
npc.DR_NERD(0.25f);
|
||||
npc.LifeMaxNERB(Main.expertMode ? 24000 : 15000, 28000);
|
||||
npc.HitSound = SoundID.NPCHit4;
|
||||
npc.DeathSound = SoundID.NPCDeath14;
|
||||
npc.HitSound = SoundID.NPCHit1;
|
||||
npc.DeathSound = SoundID.NPCDeath52;
|
||||
}
|
||||
|
||||
public override void SendExtraAI(BinaryWriter writer)
|
||||
@@ -62,33 +66,36 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
|
||||
public override bool PreAI()
|
||||
{
|
||||
NPC parent = Main.npc[CalamityGlobalNPC.SCal];
|
||||
// Die if SCal is no longer present.
|
||||
if (CalamityGlobalNPC.SCal < 0 || !SCal.active)
|
||||
{
|
||||
npc.active = false;
|
||||
npc.netUpdate = true;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool expertMode = Main.expertMode;
|
||||
if (start)
|
||||
{
|
||||
for (int num621 = 0; num621 < 10; num621++)
|
||||
{
|
||||
int num622 = Dust.NewDust(npc.position, npc.width, npc.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f);
|
||||
}
|
||||
npc.ai[1] = npc.ai[0];
|
||||
for (int i = 0; i < 10; i++)
|
||||
Dust.NewDust(npc.position, npc.width, npc.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f);
|
||||
RotationalDegreeOffset = npc.ai[0];
|
||||
start = false;
|
||||
}
|
||||
|
||||
// Get a target
|
||||
if (npc.target < 0 || npc.target == Main.maxPlayers || Main.player[npc.target].dead || !Main.player[npc.target].active)
|
||||
if (npc.target < 0 || npc.target == Main.maxPlayers || Target.dead || !Target.active)
|
||||
npc.TargetClosest();
|
||||
|
||||
// Despawn safety, make sure to target another player if the current player target is too far away
|
||||
if (Vector2.Distance(Main.player[npc.target].Center, npc.Center) > CalamityGlobalNPC.CatchUpDistance200Tiles)
|
||||
// Target another player if the current player target is too far away
|
||||
if (!npc.WithinRange(Target.Center, CalamityGlobalNPC.CatchUpDistance200Tiles))
|
||||
npc.TargetClosest();
|
||||
|
||||
Vector2 direction = Main.player[npc.target].Center - npc.Center;
|
||||
direction.Normalize();
|
||||
direction *= 9f;
|
||||
npc.rotation = direction.ToRotation();
|
||||
npc.spriteDirection = (Target.Center.X < npc.Center.X).ToDirectionInt();
|
||||
|
||||
timer++;
|
||||
int timerLimit = CalamityWorld.malice ? 120 : 180;
|
||||
if (timer > timerLimit)
|
||||
int shootRate = CalamityWorld.malice ? 120 : 180;
|
||||
if (timer > shootRate)
|
||||
{
|
||||
for (int i = 0; i < Main.maxNPCs; i++)
|
||||
{
|
||||
@@ -96,7 +103,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
if (seeker.type == npc.type)
|
||||
{
|
||||
if (seeker == npc)
|
||||
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/SCalSounds/BrimstoneShoot"), parent.Center);
|
||||
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/SCalSounds/BrimstoneShoot"), SCal.Center);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -104,24 +111,15 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
{
|
||||
int type = ModContent.ProjectileType<BrimstoneBarrage>();
|
||||
int damage = npc.GetProjectileDamage(type);
|
||||
Projectile.NewProjectile(npc.Center, direction, type, damage, 1f, Main.myPlayer);
|
||||
Vector2 shootVelocity = (Target.Center - EyePosition).SafeNormalize(Vector2.UnitY) * 9f;
|
||||
Projectile.NewProjectile(EyePosition, shootVelocity, type, damage, 1f, Main.myPlayer);
|
||||
}
|
||||
timer = 0;
|
||||
npc.netUpdate = true;
|
||||
}
|
||||
if (CalamityGlobalNPC.SCal < 0 || !parent.active)
|
||||
{
|
||||
npc.active = false;
|
||||
npc.netUpdate = true;
|
||||
return false;
|
||||
}
|
||||
Player player = Main.player[npc.target];
|
||||
double deg = npc.ai[1];
|
||||
double rad = deg * (Math.PI / 180);
|
||||
double dist = 300;
|
||||
npc.position.X = parent.Center.X - (int)(Math.Cos(rad) * dist) - npc.width / 2;
|
||||
npc.position.Y = parent.Center.Y - (int)(Math.Sin(rad) * dist) - npc.height / 2;
|
||||
npc.ai[1] += 0.5f; //2
|
||||
|
||||
npc.position = SCal.Center - MathHelper.ToRadians(RotationalDegreeOffset).ToRotationVector2() * 300f - npc.Size * 0.5f;
|
||||
RotationalDegreeOffset += 0.5f;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -180,7 +178,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
Vector2 vector11 = new Vector2((float)(Main.npcTexture[npc.type].Width / 2), (float)(Main.npcTexture[npc.type].Height / Main.npcFrameCount[npc.type] / 2));
|
||||
Color color36 = Color.White;
|
||||
float amount9 = 0.5f;
|
||||
int num153 = 5;
|
||||
int num153 = 2;
|
||||
|
||||
if (CalamityConfig.Instance.Afterimages)
|
||||
{
|
||||
|
||||
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 683 B |
@@ -2530,11 +2530,9 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
}
|
||||
|
||||
// And play a fire-like sound effect.
|
||||
Main.PlaySound(SoundID.DD2_BetsyWindAttack, target.Center);
|
||||
hasSummonedSepulcher1 = true;
|
||||
hasSummonedSepulcher2 = npc.life <= npc.lifeMax * 0.08;
|
||||
|
||||
// TODO: Resprite brimstone hearts a bit.
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
List<int> hearts = new List<int>();
|
||||
@@ -2556,6 +2554,8 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
NPC.SpawnOnPlayer(npc.FindClosestPlayer(), ModContent.NPCType<SCalWormHead>());
|
||||
npc.netUpdate = true;
|
||||
}
|
||||
|
||||
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/SCalSounds/SepulcherSpawn"), target.Center);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Projectiles.Typeless
|
||||
{
|
||||
public class SepulcherSoul : ModProjectile
|
||||
{
|
||||
public ref float Time => ref projectile.ai[0];
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Tormented Soul");
|
||||
Main.projFrames[projectile.type] = 3;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
projectile.width = projectile.height = 16;
|
||||
projectile.Opacity = 0f;
|
||||
projectile.tileCollide = false;
|
||||
projectile.ignoreWater = true;
|
||||
projectile.timeLeft = 120;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
if (projectile.localAI[0] == 0f)
|
||||
{
|
||||
projectile.frame = Main.rand.Next(Main.projFrames[projectile.type]);
|
||||
projectile.localAI[0] = 1f;
|
||||
}
|
||||
Vector2 idealVelocity = Vector2.Zero;
|
||||
idealVelocity.X = (float)(Math.Sin(Time / 27f + projectile.identity * 1.1f) + (float)Math.Cos(Math.E * (Time / 27f + projectile.identity * 1.1f))) * 4f;
|
||||
idealVelocity.Y = MathHelper.SmoothStep(-3f, -9f, (float)Math.Sin(Time / 23f + projectile.identity * 1.1f) * 0.5f + 0.5f);
|
||||
projectile.velocity = Vector2.Lerp(projectile.velocity, idealVelocity, 0.075f);
|
||||
projectile.rotation = projectile.velocity.ToRotation() + MathHelper.PiOver2;
|
||||
projectile.Opacity = Utils.InverseLerp(0f, 15f, Time, true) * Utils.InverseLerp(0f, 25f, projectile.timeLeft, true);
|
||||
Time++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 748 B |
@@ -0,0 +1,18 @@
|
||||
using Microsoft.Xna.Framework.Audio;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Sounds.Custom.SCalSounds
|
||||
{
|
||||
public class SepulcherSpawn : ModSound
|
||||
{
|
||||
public override SoundEffectInstance PlaySound(ref SoundEffectInstance soundInstance, float volume, float pan, SoundType type)
|
||||
{
|
||||
soundInstance = sound.CreateInstance();
|
||||
soundInstance.Volume = volume;
|
||||
soundInstance.Pan = pan;
|
||||
Main.PlaySoundInstance(soundInstance);
|
||||
return soundInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using Microsoft.Xna.Framework.Audio;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Sounds.NPCKilled
|
||||
{
|
||||
public class SepulcherDeath : ModSound
|
||||
{
|
||||
public override SoundEffectInstance PlaySound(ref SoundEffectInstance soundInstance, float volume, float pan, SoundType type)
|
||||
{
|
||||
soundInstance = sound.CreateInstance();
|
||||
soundInstance.Volume = volume;
|
||||
soundInstance.Pan = pan;
|
||||
Main.PlaySoundInstance(soundInstance);
|
||||
return soundInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||