using System; using System.Threading.Tasks; using Babushka.scripts.CSharp.Common.Util; namespace Babushka.scripts.CSharp.Common.Fight.Actions; public class BlobAttackAction(int damage = 3) : FighterAction { public override Variant> GetAnimationEnd() { return 1; } public override bool NextDetail() { return false; } public override void ExecuteAction() { FightWorld.Instance.allyFighters.vesnaFighter.ChangeHealth(-damage); } public override async Task AnimateAction(AllFightersVisual allFightersVisual, FightHappeningAnimationContext animationContext) { var currentFighter = HappeningData.fighterTurn.Current; var targetFighter = FightWorld.Instance.allyFighters.vesnaFighter; var currentFighterVisual = allFightersVisual.GetVisualForFighter(currentFighter); var targetFighterVisual = allFightersVisual.GetVisualForFighter(targetFighter); await currentFighterVisual.AnimatePosToTarget(targetFighterVisual); _ = targetFighterVisual.AnimateHit(); targetFighterVisual.SpawnDamageIndicatorNumber($"-{damage}"); await currentFighterVisual.AnimatePosToBase(); } }