Move all battle state from IPokemon to an ephemeral IBattlePokemon wrapper
This commit is contained in:
@@ -13,9 +13,9 @@ public class PursuitEffect : Script, IScriptOnSwitchOut
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public void OnSwitchOut(IPokemon oldPokemon, byte position)
|
||||
public void OnSwitchOut(IBattlePokemon oldPokemon, byte position)
|
||||
{
|
||||
var battleData = oldPokemon.BattleData;
|
||||
var battleData = oldPokemon;
|
||||
if (battleData == null)
|
||||
return;
|
||||
if (battleData.Battle.HasEnded)
|
||||
@@ -25,7 +25,7 @@ public class PursuitEffect : Script, IScriptOnSwitchOut
|
||||
return;
|
||||
if (!_choice.User.IsUsable)
|
||||
return;
|
||||
if (_choice.User.BattleData?.IsOnBattlefield != true)
|
||||
if (_choice.User.IsOnBattlefield != true)
|
||||
return;
|
||||
|
||||
var choiceQueue = battleData.Battle.ChoiceQueue;
|
||||
@@ -43,7 +43,7 @@ public class PursuitEffect : Script, IScriptOnSwitchOut
|
||||
private class PursuitDoublePowerEffect : Script, IScriptChangeBasePower
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public void ChangeBasePower(IExecutingMove move, IPokemon target, byte hit, ref ushort basePower)
|
||||
public void ChangeBasePower(IExecutingMove move, IBattlePokemon target, byte hit, ref ushort basePower)
|
||||
{
|
||||
basePower = basePower.MultiplyOrMax(2);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user