Implements AI Switching
Build / Build (push) Successful in 58s

This commit is contained in:
Deukhoofd committed 2025-07-12 13:03:00 +02:00
1 parent 364d4b9080
commit bf83b25238
34 files changed
+903 -226

No files matched your search

@@ -6,8 +6,7 @@ public class Torment : Script, IScriptOnSecondaryEffect
/// <inheritdoc />
public void OnSecondaryEffect(IExecutingMove move, IPokemon target, byte hit)
{
var lastTargetChoice = move.Battle.PreviousTurnChoices.SelectMany(x => x).Reverse().OfType<IMoveChoice>()
.FirstOrDefault(x => x.User == target);
var lastTargetChoice = target.BattleData?.LastMoveChoice;
target.Volatile.Add(new Pokemon.TormentEffect(lastTargetChoice));
}
}