More work on refactor to interfaces
All checks were successful
Build / Build (push) Successful in 50s
All checks were successful
Build / Build (push) Successful in 50s
This commit is contained in:
@@ -6,13 +6,13 @@ namespace PkmnLib.Plugin.Gen7.Scripts.Abilities;
|
||||
/// <see href="https://bulbapedia.bulbagarden.net/wiki/Zen_Mode_(Ability)">Bulbapedia - Zen Mode</see>
|
||||
/// </summary>
|
||||
[Script(ScriptCategory.Ability, "zen_mode")]
|
||||
public class ZenMode : Script
|
||||
public class ZenMode : Script, IScriptOnEndTurn
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override void OnSwitchIn(IPokemon pokemon, byte position) => ChangeFormIfNeeded(pokemon);
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void OnEndTurn(IScriptSource owner, IBattle battle) => ChangeFormIfNeeded(owner as IPokemon);
|
||||
public void OnEndTurn(IScriptSource owner, IBattle battle) => ChangeFormIfNeeded(owner as IPokemon);
|
||||
|
||||
private static void ChangeFormIfNeeded(IPokemon? pokemon)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user