Implements move execution for battle
This commit is contained in:
@@ -221,7 +221,7 @@ public class BattleImpl : ScriptSource, IBattle
|
||||
if (choice is IMoveChoice moveChoice)
|
||||
{
|
||||
// TODO: Hook to change number of PP needed.
|
||||
if (moveChoice.UsedMove.CurrentPp < 1)
|
||||
if (moveChoice.ChosenMove.CurrentPp < 1)
|
||||
return false;
|
||||
// TODO: Validate target
|
||||
}
|
||||
@@ -263,7 +263,7 @@ public class BattleImpl : ScriptSource, IBattle
|
||||
throw new InvalidOperationException("Choice is null.");
|
||||
if (choice is IMoveChoice moveChoice)
|
||||
{
|
||||
var priority = moveChoice.UsedMove.MoveData.Priority;
|
||||
var priority = moveChoice.ChosenMove.MoveData.Priority;
|
||||
choice.RunScriptHook(script => script.ChangePriority(moveChoice, ref priority));
|
||||
moveChoice.Priority = priority;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user