Made fight fightable

This commit is contained in:
jonathan
2025-09-30 16:23:05 +02:00
parent f27dd199b8
commit 0e315396c9
42 changed files with 889 additions and 251 deletions
@@ -0,0 +1,46 @@
using System;
using Babushka.scripts.CSharp.Common.Fight.ActionDetails;
using Babushka.scripts.CSharp.Common.Util;
using Godot;
namespace Babushka.scripts.CSharp.Common.Fight.Actions;
public class AllyAttackAction : FighterAction
{
// details
public TargetSelectActionDetail targetSelect = new()
{
selectEnemy = true,
selectAlly = false
};
public override Variant<float, Func<bool>> GetAnimationEnd()
{
return 1;
}
public override bool NextDetail()
{
return !targetSelect.DetailComplete();
}
public override FighterActionDetail CurrentDetail()
{
return targetSelect;
}
public override AllyActionButton BindToActionButton()
{
return AllyActionButton.Attack;
}
public override void Reset()
{
targetSelect.ResetResult();
}
public override void ExecuteAction()
{
targetSelect.GetTarget().AddHealth(-5);
}
}
@@ -0,0 +1 @@
uid://c8c4t80bqsja5