Implements accuracy/evasion
This commit is contained in:
@@ -140,10 +140,10 @@ internal static class MoveTurnExecutor
|
||||
// modifying it.
|
||||
if (accuracy != 255)
|
||||
{
|
||||
executingMove.RunScriptHook(x => x.ChangeAccuracy(executingMove, target, hitIndex, ref accuracy));
|
||||
accuracy = battle.Library.StatCalculator.CalculateModifiedAccuracy(executingMove, target,
|
||||
hitIndex, accuracy);
|
||||
}
|
||||
|
||||
// TODO: Deal with accuracy/evasion stats.
|
||||
if (accuracy < 100 && battle.Random.GetInt(100) >= accuracy)
|
||||
{
|
||||
executingMove.RunScriptHook(x => x.OnMoveMiss(executingMove, target));
|
||||
|
||||
Reference in New Issue
Block a user