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:
@@ -2,7 +2,7 @@ using PkmnLib.Plugin.Gen7.Scripts.Utils;
|
||||
|
||||
namespace PkmnLib.Plugin.Gen7.Scripts.Pokemon;
|
||||
|
||||
public abstract class BaseChargeEffect : Script
|
||||
public abstract class BaseChargeEffect : Script, IScriptForceTurnSelection
|
||||
{
|
||||
private readonly IPokemon _owner;
|
||||
private readonly StringKey _moveName;
|
||||
@@ -14,7 +14,7 @@ public abstract class BaseChargeEffect : 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, _moveName, opposingSideIndex, position);
|
||||
|
||||
Reference in New Issue
Block a user