Surprisingly, more moves

This commit is contained in:
2025-04-17 17:51:42 +02:00
parent d02c05874b
commit c22ad1a793
17 changed files with 298 additions and 43 deletions

View File

@@ -0,0 +1,21 @@
using System.Linq;
using PkmnLib.Static;
namespace PkmnLib.Plugin.Gen7.Scripts.Moves;
[Script(ScriptCategory.Move, "punishment")]
public class Punishment : Script
{
/// <inheritdoc />
public override void ChangeBasePower(IExecutingMove move, IPokemon target, byte hit, ref byte basePower)
{
if (move.User.BattleData == null)
return;
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;
}
}