More moves, allow for typeless moves
This commit is contained in:
24
Plugins/PkmnLib.Plugin.Gen7/Scripts/Moves/Retaliate.cs
Normal file
24
Plugins/PkmnLib.Plugin.Gen7/Scripts/Moves/Retaliate.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user