This commit is contained in:
19
Plugins/PkmnLib.Plugin.Gen7/Scripts/Moves/StompingTantrum.cs
Normal file
19
Plugins/PkmnLib.Plugin.Gen7/Scripts/Moves/StompingTantrum.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using System.Linq;
|
||||
using PkmnLib.Static.Utils;
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user