net.sf.magicproject.action
Class WaitTriggeredBufferChoice

java.lang.Object
  extended by net.sf.magicproject.action.MAction
      extended by net.sf.magicproject.action.WaitTriggeredBufferChoice
All Implemented Interfaces:
StandardAction, Waiting, WaitingTriggeredCard

public final class WaitTriggeredBufferChoice
extends MAction
implements StandardAction, WaitingTriggeredCard

Since:
0.60
Author:
Fabrice Daugan

Method Summary
 boolean clickOn(TriggeredCard triggeredCard)
          Called to specify the triggered card chosen for the current action by the handed player
 void finished()
          Called when this action is finished (aborted or completed).
 Actiontype getIdAction()
          Return the index of this action.
static WaitTriggeredBufferChoice getInstance()
          Return the unique instance of this class.
 boolean manualSkip()
          Called by the handed player when he/she wants to skip/abort this action.
 boolean play(ContextEventListener context, Ability ability)
          Generate event associated to this action.
 boolean succeedClickOn(TriggeredCard triggeredCard)
          This function should be called by the 'clickOn' caller in case of the specified triggered has been handled during the checking validity of this click in the clickOn(TriggeredCard) function.
 java.lang.String toString(Ability ability)
          String representation of this action.
 
Methods inherited from class net.sf.magicproject.action.MAction
equal, getActionName, manaNeeded, parseTest, toHtmlString, toHtmlString, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

finished

public void finished()
Description copied from interface: Waiting
Called when this action is finished (aborted or completed). No stack operation should be done here.

Specified by:
finished in interface Waiting
Specified by:
finished in interface WaitingTriggeredCard

play

public boolean play(ContextEventListener context,
                    Ability ability)
Description copied from interface: StandardAction
Generate event associated to this action. Only one or several events are generated and may be collected by event listeners. Then play this action

Specified by:
play in interface StandardAction
Parameters:
context - is the context attached to this action.
ability - is the ability owning this test. The card component of this ability should correspond to the card owning this test too.
Returns:
true if the stack can be resolved just after this call.

clickOn

public boolean clickOn(TriggeredCard triggeredCard)
Description copied from interface: WaitingTriggeredCard
Called to specify the triggered card chosen for the current action by the handed player

Specified by:
clickOn in interface WaitingTriggeredCard
Parameters:
triggeredCard - the clicked card by the handed player for the current action
Returns:
true if this click has been managed. Return false if this click has been ignored

succeedClickOn

public boolean succeedClickOn(TriggeredCard triggeredCard)
Description copied from interface: WaitingTriggeredCard
This function should be called by the 'clickOn' caller in case of the specified triggered has been handled during the checking validity of this click in the clickOn(TriggeredCard) function.

Specified by:
succeedClickOn in interface WaitingTriggeredCard
Parameters:
triggeredCard - the triggered card that was clicked and successfuly handled by the clickOn(TriggeredCard) function.
Returns:
true if this action is completed

manualSkip

public boolean manualSkip()
Description copied from interface: Waiting
Called by the handed player when he/she wants to skip/abort this action. No stack operation should be done here.

Specified by:
manualSkip in interface Waiting
Specified by:
manualSkip in interface WaitingTriggeredCard
Returns:
true if this action allow the skip/cancel.

getIdAction

public Actiontype getIdAction()
Description copied from class: MAction
Return the index of this action. As default, this is a zero id

Specified by:
getIdAction in class MAction
Returns:
the index of this action.
See Also:
Actiontype

toString

public java.lang.String toString(Ability ability)
Description copied from class: MAction
String representation of this action.

Specified by:
toString in class MAction
Parameters:
ability - is the ability owning this test. The card component of this ability should correspond to the card owning this test too.
Returns:
action name.
See Also:
Object.toString()

getInstance

public static WaitTriggeredBufferChoice getInstance()
Return the unique instance of this class.

Returns:
the unique instance of this class.


Copyright © 2003-2007 Magic-Project. All Rights Reserved.