More moves
This commit is contained in:
@@ -1,37 +1,10 @@
|
||||
using PkmnLib.Plugin.Gen7.Scripts.Utils;
|
||||
|
||||
namespace PkmnLib.Plugin.Gen7.Scripts.Pokemon;
|
||||
|
||||
[Script(ScriptCategory.Pokemon, "outrage")]
|
||||
public class OutrageEffect : Script
|
||||
public class OutrageEffect : OutrageLikeEffect
|
||||
{
|
||||
private readonly IPokemon _owner;
|
||||
private int _turns;
|
||||
private readonly byte _targetSide;
|
||||
private readonly byte _targetPosition;
|
||||
|
||||
public OutrageEffect(IPokemon owner, int turns, byte targetSide, byte targetPosition)
|
||||
public OutrageEffect(IPokemon owner, int turns, byte targetSide, byte targetPosition) : base(owner, turns,
|
||||
targetSide, targetPosition, "outrage")
|
||||
{
|
||||
_owner = owner;
|
||||
_turns = turns;
|
||||
_targetSide = targetSide;
|
||||
_targetPosition = targetPosition;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void ForceTurnSelection(byte sideIndex, byte position, ref ITurnChoice? choice)
|
||||
{
|
||||
choice = TurnChoiceHelper.CreateMoveChoice(_owner, "outrage", _targetSide, _targetPosition);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void OnAfterHits(IExecutingMove move, IPokemon target)
|
||||
{
|
||||
_turns--;
|
||||
if (_turns <= 0)
|
||||
{
|
||||
RemoveSelf();
|
||||
_owner.Volatile.Add(new Confusion());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user