add beam wand (thanks lexy)
This commit is contained in:
@@ -0,0 +1,62 @@
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Microsoft.Xna.Framework;
|
||||
|
||||
namespace ForgottenWawiTech.Content.NPCs.Enemies.AvalianInvasion
|
||||
{
|
||||
public class AvalianScout : ModNPC
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.npcFrameCount[Type] = 6; // Animation frames
|
||||
NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers(0)
|
||||
{
|
||||
Velocity = 1f
|
||||
};
|
||||
NPCID.Sets.NPCBestiaryDrawOffset.Add(Type, value);
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
NPC.width = 32;
|
||||
NPC.height = 40;
|
||||
NPC.damage = 45;
|
||||
NPC.defense = 15;
|
||||
NPC.lifeMax = 250;
|
||||
NPC.HitSound = SoundID.NPCHit1;
|
||||
NPC.DeathSound = SoundID.NPCDeath6;
|
||||
NPC.value = Item.buyPrice(0, 0, 5, 0);
|
||||
NPC.knockBackResist = 0.5f;
|
||||
NPC.aiStyle = NPCAIStyleID.Fighter; // Basic fighter AI
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
// Add subtle hover/flight behavior
|
||||
if (NPC.velocity.Y > -2f && NPC.velocity.Y < 2f)
|
||||
{
|
||||
NPC.velocity.Y += Main.rand.NextFloat(-0.1f, 0.1f);
|
||||
}
|
||||
}
|
||||
|
||||
public override void HitEffect(NPC.HitInfo hit)
|
||||
{
|
||||
// Feather particles on hit
|
||||
if (NPC.life <= 0)
|
||||
{
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Feather,
|
||||
Main.rand.NextFloat(-2f, 2f), Main.rand.NextFloat(-2f, 2f));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override float SpawnChance(NPCSpawnInfo spawnInfo)
|
||||
{
|
||||
// Only spawn during Avalian Invasion event
|
||||
return 0f; // Controlled by invasion system
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user