add beam wand (thanks lexy)

This commit is contained in:
2025-11-14 22:36:20 +00:00
parent 1219413040
commit f44703376f
12 changed files with 604 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
using Terraria.ModLoader;
using Terraria;
namespace ForgottenWawiTech.Content.Players
{
// Tracks per-tick emission cooldown for BeamAttackWand while swinging.
public class BeamAttackWandPlayer : ModPlayer
{
public int BeamEmissionTimer = 0;
public float LastBeamRot; // smoothed rotation used to cluster beams
public override void ResetEffects()
{
// If not holding the wand, allow immediate beam spawn next time it's used and reset rotation smoothing.
if (Player.HeldItem.type != ModContent.ItemType<Items.Weapons.Magic.BeamAttackWand>())
{
BeamEmissionTimer = 0;
LastBeamRot = 0f;
}
}
}
}