Deukhoofd 2533512eda
All checks were successful
Build / Build (push) Successful in 51s
Slight cleanup, do some TODOs
2025-06-22 10:42:25 +02:00

26 lines
838 B
C#

using PkmnLib.Plugin.Gen7.Scripts.Utils;
namespace PkmnLib.Plugin.Gen7.Scripts.Pokemon;
[Script(ScriptCategory.Pokemon, "charge_move_effect")]
public class ChargeMoveEffect : Script
{
public readonly StringKey MoveName;
private readonly IPokemon _user;
private readonly byte _targetSide;
private readonly byte _targetPosition;
public ChargeMoveEffect(StringKey moveName, IPokemon user, byte targetSide, byte targetPosition)
{
MoveName = moveName;
_user = user;
_targetSide = targetSide;
_targetPosition = targetPosition;
}
/// <inheritdoc />
public override void ForceTurnSelection(IBattle battle, byte sideIndex, byte position, ref ITurnChoice? choice)
{
choice = TurnChoiceHelper.CreateMoveChoice(_user, MoveName, _targetSide, _targetPosition);
}
}