Move all battle state from IPokemon to an ephemeral IBattlePokemon wrapper
This commit is contained in:
@@ -10,8 +10,8 @@ namespace PkmnLib.Plugin.Gen7.Scripts.Abilities;
|
||||
public class GrassPelt : Script, IScriptChangeIncomingMoveDefensiveStatValue
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public void ChangeIncomingMoveDefensiveStatValue(IExecutingMove move, IPokemon target, byte hit, uint offensiveStat,
|
||||
StatisticSet<uint> statisticSet, Statistic stat, ref uint value)
|
||||
public void ChangeIncomingMoveDefensiveStatValue(IExecutingMove move, IBattlePokemon target, byte hit,
|
||||
uint offensiveStat, StatisticSet<uint> statisticSet, Statistic stat, ref uint value)
|
||||
{
|
||||
if (move.Battle.TerrainName == ScriptUtils.ResolveName<Terrain.GrassyTerrain>() && stat == Statistic.Defense)
|
||||
value = value.MultiplyOrMax(1.5f);
|
||||
|
||||
Reference in New Issue
Block a user