Fixes for Pokemon capture
All checks were successful
Build / Build (push) Successful in 1m11s

This commit is contained in:
2025-08-08 12:45:27 +02:00
parent a5675024a4
commit e5041ec5f0
4 changed files with 30 additions and 6 deletions

View File

@@ -1,3 +1,4 @@
using PkmnLib.Dynamic.Events;
using PkmnLib.Dynamic.Models;
using PkmnLib.Dynamic.Models.Choices;
using PkmnLib.Dynamic.ScriptHandling;
@@ -180,6 +181,7 @@ public static class TurnRunner
var side = battle.Sides[itemChoice.TargetSide.Value];
target = side.Pokemon[itemChoice.TargetPosition.Value];
}
battle.EventHook.Invoke(new ItemUseEvent(user, itemChoice.Item));
itemChoice.Item.RunItemScript(battle.Library.ScriptResolver, target ?? user, battle.EventHook);
}
}