More abilities
Build / Build (push) Successful in 48s

This commit is contained in:
Deukhoofd committed 2025-06-13 15:39:08 +02:00
1 parent 4385f0afaa
commit 24712fbb0d
16 files changed
+238 -16

No files matched your search

-1
View File
@@ -311,7 +311,6 @@ public class BattleImpl : ScriptSource, IBattle
if (choice is IMoveChoice moveChoice)
{
// TODO: Hook to change number of PP needed.
if (moveChoice.ChosenMove.CurrentPp < 1)
return false;
if (!TargetResolver.IsValidTarget(moveChoice.TargetSide, moveChoice.TargetPosition,
+5
View File
@@ -1072,6 +1072,11 @@ public class PokemonImpl : ScriptSource, IPokemon
// Allow scripts to trigger based on the faint.
this.RunScriptHook(script => script.OnFaint(this, source));
foreach (var ally in BattleData.BattleSide.Pokemon.WhereNotNull().Where(x => x != this))
{
ally.RunScriptHook(script => script.OnAllyFaint(ally, this));
}
// Make sure the OnRemove script is run.
this.RunScriptHook(script => script.OnRemove());