Fixes for Pokemon capture
Build / Build (push) Successful in 1m11s

This commit is contained in:
Deukhoofd committed 2025-08-08 12:45:27 +02:00
1 parent a5675024a4
commit e5041ec5f0
4 files changed
+30 -6

No files matched your search

+2
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);
}
}