Validate movechoice target

This commit is contained in:
2024-12-27 15:53:11 +01:00
parent b4e8ad1cd2
commit b3529fa22f
4 changed files with 60 additions and 4 deletions

View File

@@ -236,7 +236,9 @@ public class BattleImpl : ScriptSource, IBattle
// TODO: Hook to change number of PP needed.
if (moveChoice.ChosenMove.CurrentPp < 1)
return false;
// TODO: Validate target
if (!TargetResolver.IsValidTarget(moveChoice.TargetSide, moveChoice.TargetPosition,
moveChoice.ChosenMove.MoveData.Target, moveChoice.User))
return false;
}
return true;