You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
965 B
46 lines
965 B
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);
|
|
}
|
|
} |