|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.magicproject.action.MAction net.sf.magicproject.action.UserAction net.sf.magicproject.action.Repeat
public class Repeat
Repeat the next action n times. If the value is negative or zero, the next action would be skipped.
Method Summary | |
---|---|
Actiontype |
getIdAction()
return the id of this action. |
int |
getPreemptionTimes(Ability ability,
Targetable tested)
Return nb times to repeat the next action exactly as it will be when the ability will be executed..Return -1 if value cannot be
pre-empted. |
boolean |
init(ActionContextWrapper actionContext,
ContextEventListener context,
Ability ability)
No generated event. |
boolean |
play(ContextEventListener context,
Ability ability)
Generate event associated to this action. |
boolean |
replay(ActionContextWrapper actionContext,
ContextEventListener context,
Ability ability)
Generate event associated to this action. |
void |
replayOnDemand(ActionContextWrapper actionContext,
ContextEventListener context,
Ability ability)
Replay the next action the amount of context times. |
java.lang.String |
toHtmlString(Ability ability,
ContextEventListener context)
Return the HTML code representing this action. |
java.lang.String |
toString(Ability ability)
return the string representation of this action |
Methods inherited from class net.sf.magicproject.action.UserAction |
---|
getActionName, manaNeeded, toHtmlString |
Methods inherited from class net.sf.magicproject.action.MAction |
---|
equal, parseTest, toString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public final Actiontype getIdAction()
getIdAction
in class UserAction
Actiontype
public boolean init(ActionContextWrapper actionContext, ContextEventListener context, Ability ability)
InitAction
init
in interface InitAction
actionContext
- the context containing data saved by this action during the
'choose" proceess.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.
public boolean replay(ActionContextWrapper actionContext, ContextEventListener context, Ability ability)
InitAction
replay
in interface InitAction
replay
in interface Replayable
actionContext
- the context containing data saved by this action during the
'choose" proceess.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.
public void replayOnDemand(ActionContextWrapper actionContext, ContextEventListener context, Ability ability)
actionContext
- the context containing data saved by this action during the
'choose" proceess.ability
- is the ability owning this test. The card component of this
ability should correspond to the card owning this test too.context
- is the context attached to this action.public boolean play(ContextEventListener context, Ability ability)
StandardAction
play
in interface StandardAction
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.
public java.lang.String toString(Ability ability)
toString
in class UserAction
ability
- is the ability owning this test. The card component of this
ability should correspond to the card owning this test too.
Object.toString()
public java.lang.String toHtmlString(Ability ability, ContextEventListener context)
MAction
toHtmlString
in class UserAction
ability
- is the ability owning this test. The card component of this
ability should correspond to the card owning this test too.context
- is the context attached to this action.
MAction.toString(Ability)
,
MAction.toHtmlString(Ability, int, ContextEventListener)
public int getPreemptionTimes(Ability ability, Targetable tested)
-1
if value cannot be
pre-empted.
ability
- is the ability owning this test. The card component of this
ability should correspond to the card owning this test too.tested
- the tested card
-1
if
value is not static.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |