Move all battle state from IPokemon to an ephemeral IBattlePokemon wrapper
This commit is contained in:
@@ -7,7 +7,7 @@ namespace PkmnLib.Plugin.Gen7.Scripts.Moves;
|
||||
public class RapidSpin : Script, IScriptOnSecondaryEffect
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public void OnSecondaryEffect(IExecutingMove move, IPokemon target, byte hit)
|
||||
public void OnSecondaryEffect(IExecutingMove move, IBattlePokemon target, byte hit)
|
||||
{
|
||||
move.User.Volatile.Remove<LeechSeedEffect>();
|
||||
move.User.Volatile.Remove<BindEffect>();
|
||||
@@ -15,7 +15,7 @@ public class RapidSpin : Script, IScriptOnSecondaryEffect
|
||||
move.User.Volatile.Remove<MagmaStormEffect>();
|
||||
move.User.Volatile.Remove<WhirlpoolEffect>();
|
||||
|
||||
var battleData = move.User.BattleData;
|
||||
var battleData = move.User;
|
||||
if (battleData != null)
|
||||
{
|
||||
battleData.BattleSide.VolatileScripts.Remove<SpikesEffect>();
|
||||
|
||||
Reference in New Issue
Block a user