Are arm and SG shoot sounds
+ bonus Abyssal Tome resound
This commit is contained in:
1 parent
276406c202
commit
7457bdf7e1
14 files changed
+65
-9
No files matched your search
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.Projectiles.Magic;
|
||||
using CalamityMod.NPCs.SlimeGod;
|
||||
using CalamityMod.Projectiles.Magic;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -28,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
Item.knockBack = 6;
|
||||
Item.value = CalamityGlobalItem.Rarity4BuyPrice;
|
||||
Item.rare = ItemRarityID.LightRed;
|
||||
Item.UseSound = SoundID.Item8;
|
||||
Item.UseSound = SlimeGodCore.ShotSound;
|
||||
Item.autoReuse = true;
|
||||
Item.shoot = ModContent.ProjectileType<AbyssBall>();
|
||||
Item.shootSpeed = 9f;
|
||||
|
||||
@@ -14,6 +14,7 @@ using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.Audio;
|
||||
using CalamityMod.Sounds;
|
||||
using ReLogic.Utilities;
|
||||
|
||||
namespace CalamityMod.NPCs.ExoMechs.Ares
|
||||
{
|
||||
@@ -60,6 +61,12 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
|
||||
// Total duration of the gauss nuke firing phase
|
||||
private const float gaussNukeReloadDuration = 360f;
|
||||
|
||||
//This stores the sound slot of the telegraph sound it makes, so it may be properly updated in terms of position.
|
||||
private SlotId TelegraphSoundSlot;
|
||||
|
||||
//Telegraph sound
|
||||
public static readonly SoundStyle TelSound = new("CalamityMod/Sounds/Custom/AresGaussNukeArmCharge");
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
this.HideFromBestiary();
|
||||
@@ -382,6 +389,12 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
|
||||
float telegraphDuration = enraged ? (gaussNukeTelegraphDuration * 0.5f) : gaussNukeTelegraphDuration;
|
||||
if (calamityGlobalNPC.newAI[2] < telegraphDuration)
|
||||
{
|
||||
// Play a charge up sound so that the player knows when it's about to fire the nuke
|
||||
if (calamityGlobalNPC.newAI[2] == 1f)
|
||||
{
|
||||
TelegraphSoundSlot = SoundEngine.PlaySound(TelSound, NPC.Center);
|
||||
}
|
||||
|
||||
// Set frames to gauss nuke charge up frames, which begin on frame 12
|
||||
if (calamityGlobalNPC.newAI[2] == 1f)
|
||||
{
|
||||
@@ -460,6 +473,12 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
|
||||
|
||||
// Smooth movement towards the location Ares Gauss Nuke is meant to be at
|
||||
CalamityUtils.SmoothMovement(NPC, movementDistanceGateValue, distanceFromDestination, baseVelocity, 0f, false);
|
||||
|
||||
//Update the telegraph sound if it's being done.
|
||||
if (TelegraphSoundSlot != null && SoundEngine.TryGetActiveSound(TelegraphSoundSlot, out var telSound) && telSound.IsPlaying)
|
||||
{
|
||||
telSound.Position = NPC.Center;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool CanHitPlayer(Player target, ref int cooldownSlot) => false;
|
||||
|
||||
@@ -60,7 +60,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
|
||||
// Total duration of the deathray
|
||||
private const float deathrayDuration = 60f;
|
||||
|
||||
//This stores the sound slot of the crystyl crusher sound it makes, so it may be properly updated in terms of position.
|
||||
//This stores the sound slot of the telegraph sound it makes, so it may be properly updated in terms of position.
|
||||
private SlotId DeathraySoundSlot;
|
||||
|
||||
//Telegraph sound
|
||||
@@ -404,7 +404,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
|
||||
if (calamityGlobalNPC.newAI[2] < deathrayTelegraphDuration)
|
||||
{
|
||||
// Play a charge up sound so that the player knows when it's about to fire the deathray
|
||||
if (calamityGlobalNPC.newAI[2] == deathrayTelegraphDuration - 100f && !fireNormalLasers)
|
||||
if (calamityGlobalNPC.newAI[2] == 1 && !fireNormalLasers)
|
||||
DeathraySoundSlot = SoundEngine.PlaySound(TelSound, NPC.Center);
|
||||
|
||||
// Smooth movement towards the location Ares Laser Cannon is meant to be at
|
||||
|
||||
@@ -14,6 +14,7 @@ using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.Audio;
|
||||
using CalamityMod.Items.Weapons.DraedonsArsenal;
|
||||
using ReLogic.Utilities;
|
||||
|
||||
namespace CalamityMod.NPCs.ExoMechs.Ares
|
||||
{
|
||||
@@ -58,6 +59,12 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
|
||||
// Total duration of the plasma bolt firing phase
|
||||
private const float plasmaBoltDuration = 120f;
|
||||
|
||||
//This stores the sound slot of the telegraph sound it makes, so it may be properly updated in terms of position.
|
||||
private SlotId TelegraphSoundSlot;
|
||||
|
||||
//Telegraph sound
|
||||
public static readonly SoundStyle TelSound = new("CalamityMod/Sounds/Custom/AresPlasmaArmCharge");
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
this.HideFromBestiary();
|
||||
@@ -399,6 +406,10 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
|
||||
calamityGlobalNPC.newAI[2] += 1f;
|
||||
if (calamityGlobalNPC.newAI[2] < plasmaBoltTelegraphDuration)
|
||||
{
|
||||
// Play a charge up sound so that the player knows when it's about to fire fireballs
|
||||
if (calamityGlobalNPC.newAI[2] == 1)
|
||||
TelegraphSoundSlot = SoundEngine.PlaySound(TelSound, NPC.Center);
|
||||
|
||||
// Set frames to plasma orb charge up frames, which begin on frame 12
|
||||
if (calamityGlobalNPC.newAI[2] == 1f)
|
||||
{
|
||||
@@ -460,6 +471,12 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
|
||||
|
||||
// Smooth movement towards the location Ares Plasma Flamethrower is meant to be at
|
||||
CalamityUtils.SmoothMovement(NPC, movementDistanceGateValue, distanceFromDestination, baseVelocity, 0f, false);
|
||||
|
||||
//Update the telegraph sound if it's being done.
|
||||
if (TelegraphSoundSlot != null && SoundEngine.TryGetActiveSound(TelegraphSoundSlot, out var telSound) && telSound.IsPlaying)
|
||||
{
|
||||
telSound.Position = NPC.Center;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool CanHitPlayer(Player target, ref int cooldownSlot) => false;
|
||||
|
||||
@@ -14,6 +14,7 @@ using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.Audio;
|
||||
using CalamityMod.Sounds;
|
||||
using ReLogic.Utilities;
|
||||
|
||||
namespace CalamityMod.NPCs.ExoMechs.Ares
|
||||
{
|
||||
@@ -58,6 +59,12 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
|
||||
// Total duration of the tesla orb firing phase
|
||||
private const float teslaOrbDuration = 120f;
|
||||
|
||||
//This stores the sound slot of the telegraph sound it makes, so it may be properly updated in terms of position.
|
||||
private SlotId TelegraphSoundSlot;
|
||||
|
||||
//Telegraph sound
|
||||
public static readonly SoundStyle TelSound = new("CalamityMod/Sounds/Custom/AresTeslaArmCharge");
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
this.HideFromBestiary();
|
||||
@@ -395,6 +402,10 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
|
||||
calamityGlobalNPC.newAI[2] += 1f;
|
||||
if (calamityGlobalNPC.newAI[2] < teslaOrbTelegraphDuration)
|
||||
{
|
||||
// Play a charge up sound so that the player knows when it's about to fire tesla orbs
|
||||
if (calamityGlobalNPC.newAI[2] == 1)
|
||||
TelegraphSoundSlot = SoundEngine.PlaySound(TelSound, NPC.Center);
|
||||
|
||||
// Set frames to tesla orb charge up frames, which begin on frame 12
|
||||
if (calamityGlobalNPC.newAI[2] == 1f)
|
||||
{
|
||||
@@ -454,6 +465,12 @@ namespace CalamityMod.NPCs.ExoMechs.Ares
|
||||
|
||||
// Smooth movement towards the location Ares Tesla Cannon is meant to be at
|
||||
CalamityUtils.SmoothMovement(NPC, movementDistanceGateValue, distanceFromDestination, baseVelocity, 0f, false);
|
||||
|
||||
//Update the telegraph sound if it's being done.
|
||||
if (TelegraphSoundSlot != null && SoundEngine.TryGetActiveSound(TelegraphSoundSlot, out var telSound) && telSound.IsPlaying)
|
||||
{
|
||||
telSound.Position = NPC.Center;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool CanHitPlayer(Player target, ref int cooldownSlot) => false;
|
||||
|
||||
@@ -397,7 +397,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
NPC.ai[1] += 1f;
|
||||
if (NPC.ai[1] > 10f)
|
||||
{
|
||||
SoundEngine.PlaySound(SoundID.Item33, NPC.Center);
|
||||
SoundEngine.PlaySound(SlimeGodCore.BigShotSound, NPC.Center);
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
// Eruption of slime balls that fall down
|
||||
|
||||
@@ -406,7 +406,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
NPC.ai[1] += 1f;
|
||||
if (NPC.ai[1] > 10f)
|
||||
{
|
||||
SoundEngine.PlaySound(SoundID.Item33, NPC.Center);
|
||||
SoundEngine.PlaySound(SlimeGodCore.BigShotSound, NPC.Center);
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
// Eruption of slime balls
|
||||
|
||||
@@ -38,6 +38,8 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
|
||||
public static readonly SoundStyle PossessionSound = new("CalamityMod/Sounds/Custom/SlimeGodPossession");
|
||||
public static readonly SoundStyle ExitSound = new("CalamityMod/Sounds/Custom/SlimeGodExit");
|
||||
public static readonly SoundStyle ShotSound = new("CalamityMod/Sounds/Custom/SlimeGodShot", 2);
|
||||
public static readonly SoundStyle BigShotSound = new("CalamityMod/Sounds/Custom/SlimeGodBigShot", 2);
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
@@ -386,7 +388,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
|
||||
if (calamityGlobalNPC.newAI[2] % divisor == 0f)
|
||||
{
|
||||
SoundEngine.PlaySound(SoundID.Item33, NPC.Center);
|
||||
SoundEngine.PlaySound(ShotSound, NPC.Center);
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
if (Main.rand.NextBool())
|
||||
|
||||
@@ -393,7 +393,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
NPC.ai[1] += 1f;
|
||||
if (NPC.ai[1] > 10f)
|
||||
{
|
||||
SoundEngine.PlaySound(SoundID.Item33, NPC.Center);
|
||||
SoundEngine.PlaySound(SlimeGodCore.BigShotSound, NPC.Center);
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
// Eruption of slime balls that fall down
|
||||
|
||||
@@ -406,7 +406,7 @@ namespace CalamityMod.NPCs.SlimeGod
|
||||
NPC.ai[1] += 1f;
|
||||
if (NPC.ai[1] > 10f)
|
||||
{
|
||||
SoundEngine.PlaySound(SoundID.Item33, NPC.Center);
|
||||
SoundEngine.PlaySound(SlimeGodCore.BigShotSound, NPC.Center);
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
// Eruption of slime balls
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in new issue
Block a user