Files
PkmnLib.NET/Plugins/PkmnLib.Plugin.Gen7/Scripts/Moves/Punishment.cs

15 lines
543 B
C#

namespace PkmnLib.Plugin.Gen7.Scripts.Moves;
[Script(ScriptCategory.Move, "punishment")]
public class Punishment : Script, IScriptChangeBasePower
{
/// <inheritdoc />
public void ChangeBasePower(IExecutingMove move, IBattlePokemon target, byte hit, ref ushort basePower)
{
var totalPower = 60 + 20 * target.StatBoost.Count(x =>
x.statistic is not Statistic.Accuracy and Statistic.Evasion && x.value > 0);
if (totalPower > 200)
totalPower = 200;
basePower = (byte)totalPower;
}
}