|
||||||||||
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.Target
public abstract class Target
Add to the target list card(s) or player(s) following the specified mode and
the specified type. If mode is 'choose' or 'opponentchoose', then a
'targeted' event is raised when the choice is made. In case of 'all',
'random', 'myself' or any target known with acces register, no event is
generated. The friendly test, and the type are required only for the modes
'random', 'all', 'choose' and 'opponentchoose' to list the valids targets.
The target list is used by the most actions.
For example, if the next action 'damage', all cards/player from the target
list would be damaged. When a new ability is added to the stack, a new list
is created and attached to it. Actions may modify, acceess it until the
ability is completely resolved.
Method Summary | |
---|---|
Actiontype |
getIdAction()
Return the index of this action. |
abstract boolean |
play(ContextEventListener context,
Ability ability)
Generate event associated to this action. |
abstract 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. |
abstract java.lang.String |
toString(Ability ability)
String representation of this action. |
Methods inherited from class net.sf.magicproject.action.UserAction |
---|
getActionName, manaNeeded, toHtmlString, 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()
MAction
getIdAction
in class UserAction
Actiontype
public abstract 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 abstract boolean replay(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 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 abstract java.lang.String toString(Ability ability)
MAction
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()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |