Refactor move classes to implement respective interfaces for better structure
All checks were successful
Build / Build (push) Successful in 52s
All checks were successful
Build / Build (push) Successful in 52s
This commit is contained in:
@@ -3,7 +3,7 @@ using PkmnLib.Plugin.Gen7.Scripts.Utils;
|
||||
namespace PkmnLib.Plugin.Gen7.Scripts.Pokemon;
|
||||
|
||||
[Script(ScriptCategory.Pokemon, "dive")]
|
||||
public class DiveEffect : Script
|
||||
public class DiveEffect : Script, IScriptForceTurnSelection
|
||||
{
|
||||
private readonly IPokemon _owner;
|
||||
|
||||
@@ -13,7 +13,7 @@ public class DiveEffect : Script
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void ForceTurnSelection(IBattle battle, byte sideIndex, byte position, ref ITurnChoice? choice)
|
||||
public void ForceTurnSelection(IBattle battle, byte sideIndex, byte position, ref ITurnChoice? choice)
|
||||
{
|
||||
var opposingSideIndex = (byte)(_owner.BattleData?.SideIndex == 0 ? 1 : 0);
|
||||
choice = TurnChoiceHelper.CreateMoveChoice(_owner, "dive", opposingSideIndex, position);
|
||||
|
||||
Reference in New Issue
Block a user