More zombie shit

This commit is contained in:
IbanPlay committed 2022-05-24 02:27:39 +02:00
1 parent 7bb5ac71fe
commit 316ec4bf42
15 files changed
+52 -37

No files matched your search

+4 -3
View File
@@ -16,6 +16,7 @@ using Terraria.ID;
using Terraria.ModLoader;
using Terraria.ModLoader.Utilities;
using Terraria.Audio;
using CalamityMod.Sounds;
namespace CalamityMod.NPCs.Abyss
{
@@ -105,7 +106,7 @@ namespace CalamityMod.NPCs.Abyss
}
if (Main.rand.NextBool(300))
{
SoundEngine.PlaySound(SoundID.Zombie, (int)NPC.position.X, (int)NPC.position.Y, 34);
SoundEngine.PlaySoundCommonNPCSounds.GetZombieSound(34), NPC.position);
}
NPC.noTileCollide = false;
if (NPC.ai[0] == 0f)
@@ -352,7 +353,7 @@ namespace CalamityMod.NPCs.Abyss
{
if (Main.rand.NextBool(300))
{
SoundEngine.PlaySound(SoundID.Zombie, (int)NPC.position.X, (int)NPC.position.Y, 34);
SoundEngine.PlaySound(CommonNPCSounds.GetZombieSound(34), NPC.position);
}
if (NPC.ai[3] > 0f && !Collision.SolidCollision(NPC.position, NPC.width, NPC.height))
{
@@ -432,7 +433,7 @@ namespace CalamityMod.NPCs.Abyss
{
if (Main.rand.NextBool(300))
{
SoundEngine.PlaySound(SoundID.Zombie, (int)NPC.position.X, (int)NPC.position.Y, 35);
SoundEngine.PlaySound(CommonNPCSounds.GetZombieSound(35), NPC.position);
}
NPC.localAI[2] = 0f;
NPC.velocity.X = NPC.velocity.X + (float)NPC.direction * 0.02f;
+2 -1
View File
@@ -11,6 +11,7 @@ using Terraria.ID;
using Terraria.ModLoader;
using System;
using Terraria.Audio;
using CalamityMod.Sounds;
namespace CalamityMod.NPCs.AcidRain
{
@@ -85,7 +86,7 @@ namespace CalamityMod.NPCs.AcidRain
// Play a slither sound from time to time.
if (Main.rand.NextBool(480))
SoundEngine.PlaySound(SoundID.Zombie, NPC.Center, 32);
SoundEngine.PlaySound(CommonNPCSounds.GetZombieSound(32), NPC.Center);
if (NPC.wet)
{
+2 -1
View File
@@ -14,6 +14,7 @@ using CalamityMod.Items.Weapons.Rogue;
using Terraria.Utilities;
using Terraria.WorldBuilding;
using Terraria.Audio;
using CalamityMod.Sounds;
namespace CalamityMod.NPCs.AcidRain
{
@@ -403,7 +404,7 @@ namespace CalamityMod.NPCs.AcidRain
if (AttackTimer == digReapperTime + chargeupTelegraphTime)
{
// Play a sound and create dust.
SoundEngine.PlaySound(SoundID.Zombie, NPC.Center, 104);
SoundEngine.PlaySound(CommonNPCSounds.GetZombieSound(104), NPC.Center);
for (int i = 0; i < 40; i++)
{
Dust burstDust = Dust.NewDustPerfect(NPC.Center + Main.rand.NextVector2Circular(75f, 75f), 267);
+2 -1
View File
@@ -11,6 +11,7 @@ using Terraria.GameContent.Bestiary;
using Terraria.ID;
using Terraria.ModLoader;
using Terraria.Audio;
using CalamityMod.Sounds;
namespace CalamityMod.NPCs.AcidRain
{
@@ -146,7 +147,7 @@ namespace CalamityMod.NPCs.AcidRain
DustAngleMultiplier2 = Main.rand.NextFloat(4f);
if (Main.netMode != NetmodeID.MultiplayerClient)
{
SoundEngine.PlaySound(SoundID.Zombie, (int)NPC.position.X, (int)NPC.position.Y, 104);
SoundEngine.PlaySound(CommonNPCSounds.GetZombieSound(104), NPC.position);
Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center, -Vector2.UnitY, ModContent.ProjectileType<GammaBeam>(), Main.expertMode ? 96 : 120, 4f, Main.myPlayer, 0f, NPC.whoAmI);
}
NPC.netUpdate = true;
+2 -1
View File
@@ -14,6 +14,7 @@ using Terraria.ModLoader;
using Terraria.Utilities;
using Terraria.WorldBuilding;
using Terraria.Audio;
using CalamityMod.Sounds;
namespace CalamityMod.NPCs.AcidRain
{
@@ -164,7 +165,7 @@ namespace CalamityMod.NPCs.AcidRain
CurrentFrame = 4;
}
if (AttackTimer == roarDelay)
SoundEngine.PlaySound(SoundID.Zombie, Target.Center, 97);
SoundEngine.PlaySound(CommonNPCSounds.GetZombieSound(97), Target.Center);
// Rotate towards the target.
int previousSpriteDirection = NPC.spriteDirection;
+2 -1
View File
@@ -12,6 +12,7 @@ using Terraria.GameContent.Bestiary;
using Terraria.ID;
using Terraria.ModLoader;
using Terraria.Audio;
using CalamityMod.Sounds;
namespace CalamityMod.NPCs.AcidRain
{
@@ -103,7 +104,7 @@ namespace CalamityMod.NPCs.AcidRain
// Make a frog croak sound from time to time.
if (Main.rand.NextBool(480))
SoundEngine.PlaySound(SoundID.Zombie, NPC.Center, 13);
SoundEngine.PlaySound(CommonNPCSounds.GetZombieSound(13), NPC.Center);
float explodeDistance = DownedBossSystem.downedAquaticScourge ? 295f : 195f;
if (DownedBossSystem.downedPolterghast)
+2 -1
View File
@@ -13,6 +13,7 @@ using Terraria.ModLoader;
using Terraria.Audio;
using ReLogic.Content;
using CalamityMod.Projectiles.Enemy;
using CalamityMod.Sounds;
namespace CalamityMod.NPCs.Astral
{
@@ -128,7 +129,7 @@ namespace CalamityMod.NPCs.Astral
{
if (SearchSoundCreationDelay == 0f)
{
SoundEngine.PlaySound(SoundID.ZombieMoan, NPC.Center, NPCID.SandShark);
SoundEngine.PlaySound(CommonNPCSounds.GetZombieSound(7), NPC.Center);
SearchSoundCreationDelay = -1f;
}
+2 -1
View File
@@ -26,6 +26,7 @@ using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using Terraria.Audio;
using CalamityMod.Sounds;
namespace CalamityMod.NPCs
{
@@ -6989,7 +6990,7 @@ namespace CalamityMod.NPCs
{
if (npc.ai[1] == 180f)
{
SoundEngine.PlaySound(SoundID.Zombie, (int)npc.position.X, (int)npc.position.Y, 104);
SoundEngine.PlaySound(CommonNPCSounds.GetZombieSound(104), npc.position);
Vector2 laserVelocity2 = new Vector2(npc.localAI[0], npc.localAI[1]);
laserVelocity2.Normalize();
+7 -6
View File
@@ -13,6 +13,7 @@ using Terraria.GameContent;
using Terraria.GameContent.Events;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.Sounds;
namespace CalamityMod.NPCs
{
@@ -1284,11 +1285,11 @@ namespace CalamityMod.NPCs
{
if ((npcType == NPCID.Zombie || npcType == NPCID.ZombieXmas || npcType == NPCID.ZombieSweater || npcType == NPCID.Skeleton || (npcType >= NPCID.BoneThrowingSkeleton && npcType <= NPCID.BoneThrowingSkeleton4) || npcType == NPCID.AngryBones || npcType == NPCID.AngryBonesBig || npcType == NPCID.AngryBonesBigHelmet || npcType == NPCID.AngryBonesBigMuscle || npcType == NPCID.ArmoredSkeleton || npcType == NPCID.SkeletonArcher || npcType == NPCID.BaldZombie || npcType == NPCID.UndeadViking || npcType == NPCID.ZombieEskimo || npcType == NPCID.Frankenstein || npcType == NPCID.PincushionZombie || npcType == NPCID.SlimedZombie || npcType == NPCID.SwampZombie || npcType == NPCID.TwiggyZombie || npcType == NPCID.ArmoredViking || npcType == NPCID.FemaleZombie || npcType == NPCID.HeadacheSkeleton || npcType == NPCID.MisassembledSkeleton || npcType == NPCID.PantlessSkeleton || npcType == NPCID.ZombieRaincoat || npcType == NPCID.SkeletonSniper || npcType == NPCID.TacticalSkeleton || npcType == NPCID.SkeletonCommando || npcType == NPCID.ZombieSuperman || npcType == NPCID.ZombiePixie || npcType == NPCID.ZombieDoctor || npcType == NPCID.GreekSkeleton) && Main.rand.Next(1000) == 0)
{
SoundEngine.PlaySound(SoundID.ZombieMoan, (int)npc.position.X, (int)npc.position.Y, 1, 1f, 0f);
SoundEngine.PlaySound(SoundID.ZombieMoan, npc.position);
}
if (npcType == NPCID.BloodZombie && Main.rand.Next(800) == 0)
{
SoundEngine.PlaySound(SoundID.ZombieMoan, (int)npc.position.X, (int)npc.position.Y, npcType, 1f, 0f);
SoundEngine.PlaySound(SoundID.ZombieMoan, npc.position); //There was a npcType thing afterwards but its not really useable now. Hilarious, frankly
}
if ((npcType == NPCID.Mummy || npcType == NPCID.DarkMummy || npcType == NPCID.LightMummy) && Main.rand.Next(500) == 0)
{
@@ -1296,19 +1297,19 @@ namespace CalamityMod.NPCs
}
if (npcType == NPCID.Vampire && Main.rand.Next(500) == 0)
{
SoundEngine.PlaySound(SoundID.Zombie, (int)npc.position.X, (int)npc.position.Y, 7, 1f, 0f);
SoundEngine.PlaySound(CommonNPCSounds.GetZombieSound(7), npc.position);
}
if (npcType == NPCID.Frankenstein && Main.rand.Next(500) == 0)
{
SoundEngine.PlaySound(SoundID.Zombie, (int)npc.position.X, (int)npc.position.Y, 6, 1f, 0f);
SoundEngine.PlaySound(CommonNPCSounds.GetZombieSound(6), npc.position);
}
if (npcType == NPCID.FaceMonster && Main.rand.Next(500) == 0)
{
SoundEngine.PlaySound(SoundID.Zombie, (int)npc.position.X, (int)npc.position.Y, 8, 1f, 0f);
SoundEngine.PlaySound(CommonNPCSounds.GetZombieSound(8), npc.position);
}
if (npcType >= 269 && npcType <= 280 && Main.rand.Next(1000) == 0)
{
SoundEngine.PlaySound(SoundID.ZombieMoan, (int)npc.position.X, (int)npc.position.Y, 1, 1f, 0f);
SoundEngine.PlaySound(SoundID.ZombieMoan, npc.position);
}
npc.TargetClosest(true);
}
+4 -3
View File
@@ -25,6 +25,7 @@ using Terraria.ModLoader;
using Terraria.Audio;
using Terraria.GameContent.ItemDropRules;
using ReLogic.Content;
using CalamityMod.Sounds;
namespace CalamityMod.NPCs.Leviathan
{
@@ -145,7 +146,7 @@ namespace CalamityMod.NPCs.Leviathan
soundDelay--;
if (Main.rand.NextBool(600) && !spawnAnimation)
SoundEngine.PlaySound(SoundID.Zombie, (int)vector.X, (int)vector.Y, (sirenAlive && !death) ? soundChoice : soundChoiceRage);
SoundEngine.PlaySound(CommonNPCSounds.GetZombieSound((sirenAlive && !death) ? soundChoice : soundChoiceRage), vector);
// Get a target
if (NPC.target < 0 || NPC.target == Main.maxPlayers || Main.player[NPC.target].dead || !Main.player[NPC.target].active)
@@ -242,7 +243,7 @@ namespace CalamityMod.NPCs.Leviathan
NPC.velocity = new Vector2(0f, -velocityY);
if (calamityGlobalNPC.newAI[3] == 10f)
SoundEngine.PlaySound(SoundID.Zombie, (int)vector.X, (int)vector.Y, soundChoiceRage);
SoundEngine.PlaySound(CommonNPCSounds.GetZombieSound(soundChoiceRage), vector);
NPC.Opacity = MathHelper.Clamp(calamityGlobalNPC.newAI[3] / spawnAnimationTime, 0f, 1f);
@@ -394,7 +395,7 @@ namespace CalamityMod.NPCs.Leviathan
int spawnLimit = (sirenAlive && !phase4) ? 2 : (death ? 3 : 4);
if (flag103 && NPC.CountNPCS(ModContent.NPCType<AquaticAberration>()) < spawnLimit)
{
SoundEngine.PlaySound(SoundID.Zombie, (int)vector.X, (int)vector.Y, soundChoice);
SoundEngine.PlaySound(CommonNPCSounds.GetZombieSound(soundChoice), vector);
if (Main.netMode != NetmodeID.MultiplayerClient)
NPC.NewNPC(NPC.GetSource_FromAI(), (int)vector119.X, (int)vector119.Y, ModContent.NPCType<AquaticAberration>());
}
+2 -1
View File
@@ -21,6 +21,7 @@ using CalamityMod.Items.Weapons.Magic;
using CalamityMod.Items.Weapons.Ranged;
using CalamityMod.Items.Weapons.Melee;
using CalamityMod.Items.LoreItems;
using CalamityMod.Sounds;
namespace CalamityMod.NPCs.Leviathan
{
@@ -318,7 +319,7 @@ namespace CalamityMod.NPCs.Leviathan
// Play sound
if (Main.rand.NextBool(300))
SoundEngine.PlaySound(SoundID.Zombie, (int)NPC.position.X, (int)NPC.position.Y, 35);
SoundEngine.PlaySound(CommonNPCSounds.GetZombieSound(35), NPC.position);
// Time left
if (NPC.timeLeft < 1800)
+4 -3
View File
@@ -8,6 +8,7 @@ using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using Terraria.Audio;
using CalamityMod.Sounds;
namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
{
@@ -19,7 +20,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
// Chant sound
if (npc.ai[0] != -1f && Main.rand.NextBool(1000))
SoundEngine.PlaySound(SoundID.Zombie, (int)npc.position.X, (int)npc.position.Y, Main.rand.Next(88, 92), 1f, 0f);
SoundEngine.PlaySound(CommonNPCSounds.GetZombieSound(Main.rand.Next(88, 92)), npc.position);
// Percent life remaining
float lifeRatio = npc.life / (float)npc.lifeMax;
@@ -164,7 +165,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
// Spawn and play sound
if (npc.localAI[0] == 0f)
{
SoundEngine.PlaySound(SoundID.Zombie, (int)npc.position.X, (int)npc.position.Y, 89, 1f, 0f);
SoundEngine.PlaySound(CommonNPCSounds.GetZombieSound(89), npc.position);
npc.localAI[0] = 1f;
npc.alpha = 255;
npc.rotation = 0f;
@@ -195,7 +196,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
npc.velocity *= 0.95f;
if (npc.localAI[2] != 13f)
SoundEngine.PlaySound(SoundID.Zombie, (int)npc.position.X, (int)npc.position.Y, 105, 1f, 0f);
SoundEngine.PlaySound(CommonNPCSounds.GetZombieSound(105), npc.position);
npc.localAI[2] = 13f;
}
@@ -6,6 +6,7 @@ using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using Terraria.Audio;
using CalamityMod.Sounds;
namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
{
@@ -281,7 +282,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
Main.dust[num21].velocity = Vector2.Normalize(vector2) * 3f;
}
SoundEngine.PlaySound(SoundID.Zombie, (int)npc.Center.X, (int)npc.Center.Y, 20, 1f, 0f);
SoundEngine.PlaySound(CommonNPCSounds.GetZombieSound(20),npc.Center);
}
npc.ai[2] += 1f;
@@ -445,7 +446,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
// Play sounds and spawn bubbles
if (npc.ai[2] == 0f)
SoundEngine.PlaySound(SoundID.Zombie, (int)npc.Center.X, (int)npc.Center.Y, 20, 1f, 0f);
SoundEngine.PlaySound(CommonNPCSounds.GetZombieSound(20), npc.Center);
if (npc.ai[2] % bubbleBelchPhaseDivisor == 0f)
{
@@ -488,7 +489,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
// Play sound and spawn sharknadoes
if (npc.ai[2] == (sharknadoPhaseTimer - 30))
SoundEngine.PlaySound(SoundID.Zombie, (int)npc.Center.X, (int)npc.Center.Y, 9, 1f, 0f);
SoundEngine.PlaySound(CommonNPCSounds.GetZombieSound(9), npc.Center);
if (Main.netMode != NetmodeID.MultiplayerClient && npc.ai[2] == sharknadoPhaseTimer - 30)
{
@@ -525,7 +526,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
// Sound
if (npc.ai[2] == phaseTransitionTimer - 60)
SoundEngine.PlaySound(SoundID.Zombie, (int)npc.Center.X, (int)npc.Center.Y, 20, 1f, 0f);
SoundEngine.PlaySound(CommonNPCSounds.GetZombieSound(20), npc.Center);
npc.ai[2] += 1f;
if (npc.ai[2] >= phaseTransitionTimer)
@@ -694,7 +695,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
{
// Play sounds and spawn bubbles
if (npc.ai[2] == 0f)
SoundEngine.PlaySound(SoundID.Zombie, (int)npc.Center.X, (int)npc.Center.Y, 20, 1f, 0f);
SoundEngine.PlaySound(CommonNPCSounds.GetZombieSound(20), npc.Center);
if (npc.ai[2] % bubbleSpinPhaseDivisor == 0f)
{
@@ -741,7 +742,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
// Play sound and spawn cthulhunado
if (npc.ai[2] == sharknadoPhaseTimer - 30)
SoundEngine.PlaySound(SoundID.Zombie, (int)npc.Center.X, (int)npc.Center.Y, 20, 1f, 0f);
SoundEngine.PlaySound(CommonNPCSounds.GetZombieSound(20), npc.Center);
if (Main.netMode != NetmodeID.MultiplayerClient && npc.ai[2] == sharknadoPhaseTimer - 30)
Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center, Vector2.Zero, ProjectileID.SharknadoBolt, 0, 0f, Main.myPlayer, 1f, npc.target + 1);
@@ -786,7 +787,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
// Play sound
if (npc.ai[2] == phaseTransitionTimer - 60)
SoundEngine.PlaySound(SoundID.Zombie, (int)npc.Center.X, (int)npc.Center.Y, 20, 1f, 0f);
SoundEngine.PlaySound(CommonNPCSounds.GetZombieSound(20), npc.Center);
npc.ai[2] += 1f;
if (npc.ai[2] >= phaseTransitionTimer)
@@ -981,7 +982,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
// Play sound
if (npc.ai[2] == teleportPhaseTimer / 2)
SoundEngine.PlaySound(SoundID.Zombie, (int)npc.Center.X, (int)npc.Center.Y, 20, 1f, 0f);
SoundEngine.PlaySound(CommonNPCSounds.GetZombieSound(20), npc.Center);
if (Main.netMode != NetmodeID.MultiplayerClient && npc.ai[2] == teleportPhaseTimer / 2)
{
@@ -7,6 +7,7 @@ using Terraria.GameContent.Events;
using Terraria.ID;
using Terraria.ModLoader;
using Terraria.Audio;
using CalamityMod.Sounds;
namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
{
@@ -49,7 +50,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
{
// Play a random Moon Lord sound
if (npc.ai[0] != -1f && npc.ai[0] != 2f && Main.rand.NextBool(200))
SoundEngine.PlaySound(SoundID.Zombie, (int)npc.Center.X, (int)npc.Center.Y, Main.rand.Next(93, 100), 1f, 0f);
SoundEngine.PlaySound(CommonNPCSounds.GetZombieSound(Main.rand.Next(93, 100)), npc.Center);
// Start the AI
if (npc.localAI[3] == 0f)
@@ -65,7 +66,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
npc.ai[1] += 1f;
if (npc.ai[1] == 30f)
SoundEngine.PlaySound(SoundID.Zombie, (int)npc.Center.X, (int)npc.Center.Y, 92, 1f, 0f);
SoundEngine.PlaySound(CommonNPCSounds.GetZombieSound(92), npc.Center);
if (npc.ai[1] < 60f)
MoonlordDeathDrama.RequestLight(npc.ai[1] / 30f, npc.Center);
@@ -90,7 +91,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
npc.ai[1] += 1f;
if (npc.ai[1] == 30f)
SoundEngine.PlaySound(SoundID.Zombie, (int)npc.Center.X, (int)npc.Center.Y, 92, 1f, 0f);
SoundEngine.PlaySound(CommonNPCSounds.GetZombieSound(92), npc.Center);
if (npc.ai[1] < 60f)
MoonlordDeathDrama.RequestLight(npc.ai[1] / 30f, npc.Center);
@@ -1608,7 +1609,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
}
if (Main.rand.Next(420) == 0)
SoundEngine.PlaySound(SoundID.Zombie, (int)npc.Center.X, (int)npc.Center.Y, Main.rand.Next(100, 101), 1f, 0f);
SoundEngine.PlaySound(CommonNPCSounds.GetZombieSound(Main.rand.Next(100, 101)), npc.Center);
Vector2 value22 = new Vector2(30f);
@@ -1903,7 +1904,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses
if (num1245 < 120f)
{
SoundEngine.PlaySound(SoundID.Zombie, (int)npc.Center.X, (int)npc.Center.Y, 102, 1f, 0f);
SoundEngine.PlaySound(CommonNPCSounds.GetZombieSound(102), npc.Center);
if (num1245 == 105f)
npc.netUpdate = true;
@@ -6,6 +6,7 @@ using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using Terraria.Audio;
using CalamityMod.Sounds;
namespace CalamityMod.NPCs.VanillaNPCOverrides.RegularEnemies
{
@@ -108,7 +109,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.RegularEnemies
{
// Randomly play pigron noises if the NPC is a pigron.
if (Pigrons.Contains(npc.type) && Main.rand.NextBool(1000))
SoundEngine.PlaySound(SoundID.Zombie, (int)npc.position.X, (int)npc.position.Y, 9, 1f, 0f);
SoundEngine.PlaySound(CommonNPCSounds.GetZombieSound(9), npc.Center);
// Disable gravity.
npc.noGravity = true;