Move all battle state from IPokemon to an ephemeral IBattlePokemon wrapper
This commit is contained in:
@@ -5,11 +5,11 @@ namespace PkmnLib.Plugin.Gen7.Scripts.Side;
|
||||
[Script(ScriptCategory.Side, "battery")]
|
||||
public class BatteryAbilityEffect : Script, IScriptChangeDamageModifier
|
||||
{
|
||||
private HashSet<IPokemon> _placers = new();
|
||||
private HashSet<IBattlePokemon> _placers = new();
|
||||
|
||||
public void PlacerActivated(IPokemon placer) => _placers.Add(placer);
|
||||
public void PlacerActivated(IBattlePokemon placer) => _placers.Add(placer);
|
||||
|
||||
public void PlacerDeactivated(IPokemon placer)
|
||||
public void PlacerDeactivated(IBattlePokemon placer)
|
||||
{
|
||||
_placers.Remove(placer);
|
||||
if (_placers.Count == 0)
|
||||
@@ -17,7 +17,7 @@ public class BatteryAbilityEffect : Script, IScriptChangeDamageModifier
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public void ChangeDamageModifier(IExecutingMove move, IPokemon target, byte hit, ref float modifier)
|
||||
public void ChangeDamageModifier(IExecutingMove move, IBattlePokemon target, byte hit, ref float modifier)
|
||||
{
|
||||
if (move.UseMove.Category == MoveCategory.Special)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user