Move all battle state from IPokemon to an ephemeral IBattlePokemon wrapper
This commit is contained in:
@@ -20,14 +20,11 @@ public class Defog : Script, IScriptOnSecondaryEffect
|
||||
];
|
||||
|
||||
/// <inheritdoc />
|
||||
public void OnSecondaryEffect(IExecutingMove move, IPokemon target, byte hit)
|
||||
public void OnSecondaryEffect(IExecutingMove move, IBattlePokemon target, byte hit)
|
||||
{
|
||||
if (target.BattleData == null)
|
||||
return;
|
||||
|
||||
target.ChangeStatBoost(Statistic.Evasion, -1, false, false);
|
||||
|
||||
foreach (var sides in target.BattleData.Battle.Sides)
|
||||
foreach (var sides in target.Battle.Sides)
|
||||
{
|
||||
foreach (var effect in DefoggedEffects)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user