|
||||||||||
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.ModifyRegister net.sf.magicproject.action.ModifyTargetableRegister
public class ModifyTargetableRegister
This action is used to modifiy a register of a player or a card.
This action can use the target list when is played : the address
(idToken=register name + register index) must be IdTokens#TARGET. So the
target list must set before this action would be played.
Method Summary | |
---|---|
boolean |
choose(ActionContextWrapper actionContext,
ContextEventListener context,
Ability ability)
No generated event. |
void |
disactivate(ActionContextWrapper actionContext,
ContextEventListener context,
Ability ability)
No generated event. |
boolean |
equal(MAction constraintAction)
Return true if this action matches with the given action. |
Actiontype |
getIdAction()
Return the index of this action. |
boolean |
init(ActionContextWrapper actionContext,
ContextEventListener context,
Ability ability)
No generated event. |
static boolean |
modifyRegister(MCard source,
Targetable targetable,
int index,
int value,
Operation op)
Generate event associated to this action. |
Test |
parseTest(Test test)
Return the given test where values depending on values of this action have been replaced. |
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 |
rollback(ActionContextWrapper actionContext,
ContextEventListener context,
Ability ability)
No generated event. |
java.lang.String |
toHtmlString(Ability ability,
ContextEventListener context,
ActionContextWrapper actionContext)
Return the HTML code representing this action. |
java.lang.String |
toString(Ability ability)
String representation of this action. |
Methods inherited from class net.sf.magicproject.action.ModifyRegister |
---|
countAllCardsOf, toHtmlString |
Methods inherited from class net.sf.magicproject.action.UserAction |
---|
getActionName, manaNeeded, toHtmlString |
Methods inherited from class net.sf.magicproject.action.MAction |
---|
toString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public final Actiontype getIdAction()
MAction
getIdAction
in class ModifyRegister
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 choose(ActionContextWrapper actionContext, ContextEventListener context, Ability ability)
ChoosenAction
choose
in interface ChoosenAction
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 disactivate(ActionContextWrapper actionContext, ContextEventListener context, Ability ability)
ChoosenAction
disactivate
in interface ChoosenAction
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)
ChoosenAction
replay
in interface ChoosenAction
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 rollback(ActionContextWrapper actionContext, ContextEventListener context, Ability ability)
RollBackAction
rollback
in interface RollBackAction
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 java.lang.String toHtmlString(Ability ability, ContextEventListener context, ActionContextWrapper actionContext)
ChoosenAction
toHtmlString
in interface ChoosenAction
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.actionContext
- the context of this action.
public boolean play(ContextEventListener context, Ability ability)
StandardAction
play
in interface StandardAction
play
in class ModifyRegister
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 static boolean modifyRegister(MCard source, Targetable targetable, int index, int value, Operation op)
source
- the source, and the concerned card to this modificationtargetable
- the component to modifyindex
- the register's indexvalue
- right value of operationop
- identifiant of the operation applied to the specified card
public Test parseTest(Test test)
MAction
parseTest
in class MAction
test
- the test containing eventually some values depending on parameters
of this action.
public boolean equal(MAction constraintAction)
MAction
equal
in class MAction
constraintAction
- the constraint action.
public java.lang.String toString(Ability ability)
MAction
toString
in class ModifyRegister
ability
- is the ability owning this test. The card component of this
ability should correspond to the card owning this test too.
Object.toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |