More moves

This commit is contained in:
2025-04-17 13:07:45 +02:00
parent 1b54c78b07
commit d02c05874b
31 changed files with 682 additions and 65 deletions

View File

@@ -0,0 +1,23 @@
using PkmnLib.Static;
using PkmnLib.Static.Utils;
namespace PkmnLib.Plugin.Gen7.Scripts.Moves;
/// <summary>
/// Implements the secondary effect of Payback, which doubles the move's power if the user moves after the target.
/// </summary>
[Script(ScriptCategory.Move, "payback")]
public class Payback : Script
{
/// <inheritdoc />
public override void ChangeBasePower(IExecutingMove move, IPokemon target, byte hit, ref byte basePower)
{
var battleData = move.User.BattleData;
// Check if the target has already moved this turn
if (battleData?.Battle.ChoiceQueue?.FirstOrDefault(x => x.User == target) != null)
{
basePower = basePower.MultiplyOrMax(2);
}
}
}