More moves, allow for typeless moves

This commit is contained in:
2025-05-02 15:46:37 +02:00
parent 807acf1947
commit 068ff8d5b7
33 changed files with 525 additions and 56 deletions

View File

@@ -0,0 +1,24 @@
using System.Linq;
using PkmnLib.Static.Utils;
namespace PkmnLib.Plugin.Gen7.Scripts.Moves;
[Script(ScriptCategory.Move, "retaliate")]
public class Retaliate : Script
{
/// <inheritdoc />
public override void ChangeBasePower(IExecutingMove move, IPokemon target, byte hit, ref byte basePower)
{
var battleData = move.User.BattleData;
if (battleData is null)
return;
var lastFaint = battleData.BattleSide.GetLastFaintTurn();
if (lastFaint == null)
return;
if (lastFaint >= battleData.Battle.CurrentTurnNumber - 1)
{
basePower = basePower.MultiplyOrMax(2);
}
}
}