More unit tests, fixes
This commit is contained in:
@@ -4,11 +4,22 @@ namespace PkmnLib.Plugin.Gen7.Scripts.Side;
|
||||
/// Just here to indicate that a Pokemon on this side has used Echoed Voice.
|
||||
/// </summary>
|
||||
[Script(ScriptCategory.Side, "echoed_voice_data")]
|
||||
public class EchoedVoiceData : Script, IScriptOnEndTurn
|
||||
public class EchoedVoiceData : Script, IScriptOnBeforeMoveChoice, IScriptStack
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public void OnEndTurn(IScriptSource owner, IBattle battle)
|
||||
private int _stacks = 1;
|
||||
|
||||
public int Stacks => _stacks;
|
||||
|
||||
public void OnBeforeMoveChoice(IMoveChoice moveChoice)
|
||||
{
|
||||
RemoveSelf();
|
||||
if (moveChoice.ChosenMove.MoveData.Name != "echoed_voice")
|
||||
{
|
||||
RemoveSelf();
|
||||
}
|
||||
}
|
||||
|
||||
public void Stack()
|
||||
{
|
||||
_stacks++;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user