Deukhoofd 2533512eda
All checks were successful
Build / Build (push) Successful in 51s
Slight cleanup, do some TODOs
2025-06-22 10:42:25 +02:00

16 lines
591 B
C#

namespace PkmnLib.Plugin.Gen7.Scripts.Moves;
[Script(ScriptCategory.Move, "stomping_tantrum")]
public class StompingTantrum : Script
{
/// <inheritdoc />
public override void ChangeBasePower(IExecutingMove move, IPokemon target, byte hit, ref ushort basePower)
{
var lastMoveChoice = move.Battle.PreviousTurnChoices.Reverse().Skip(1).SelectMany(x => x.Reverse())
.OfType<IMoveChoice>().FirstOrDefault(x => x.User == move.User);
if (lastMoveChoice is { HasFailed: true })
{
basePower = basePower.MultiplyOrMax(2);
}
}
}