using PkmnLib.Static.Moves; namespace PkmnLib.Plugin.Gen7.Scripts.Battle; public class WonderRoomEffect : Script, IScriptChangeDefensiveStatValue, IScriptOnEndTurn { public int TurnsLeft { get; private set; } = 5; /// public void ChangeDefensiveStatValue(IExecutingMove move, IPokemon target, byte hit, uint offensiveStat, ImmutableStatisticSet targetStats, Statistic stat, ref uint value) { value = move.UseMove.Category switch { MoveCategory.Special => targetStats.Defense, MoveCategory.Physical => targetStats.SpecialDefense, _ => value, }; } /// public void OnEndTurn(IScriptSource owner, IBattle battle) { TurnsLeft--; if (TurnsLeft <= 0) { RemoveSelf(); } } }