Surprisingly, more moves
This commit is contained in:
21
Plugins/PkmnLib.Plugin.Gen7/Scripts/Moves/Punishment.cs
Normal file
21
Plugins/PkmnLib.Plugin.Gen7/Scripts/Moves/Punishment.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user