This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user