|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.magicproject.action.MAction
net.sf.magicproject.action.UserAction
net.sf.magicproject.action.Target
net.sf.magicproject.action.target.AbstractTarget
public abstract class AbstractTarget
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', 'me' or any predicted target, no event is generated. The test, and
the type are necessary 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 | |
|---|---|
boolean |
choose(ActionContextWrapper actionContext,
ContextEventListener context,
Ability ability)
No generated event. |
void |
disactivate(ActionContextWrapper actionContext,
ContextEventListener context,
Ability ability)
No generated event. |
abstract Targetable |
getAbstractTarget(ContextEventListener context,
Ability ability)
Return the targetable added by this action. |
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 |
simulate(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. |
abstract java.lang.String |
toString(Ability ability)
String representation of this action. |
| Methods inherited from class net.sf.magicproject.action.Target |
|---|
getIdAction, rollback |
| 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 void disactivate(ActionContextWrapper actionContext,
ContextEventListener context,
Ability ability)
ChoosenAction
disactivate in interface ChoosenActionactionContext - 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 final boolean choose(ActionContextWrapper actionContext,
ContextEventListener context,
Ability ability)
ChoosenAction
choose in interface ChoosenActionactionContext - 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 final void simulate(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 final boolean replay(ActionContextWrapper actionContext,
ContextEventListener context,
Ability ability)
Target
replay in interface ChoosenActionreplay in interface Replayablereplay in class TargetactionContext - 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 final java.lang.String toHtmlString(Ability ability,
ContextEventListener context,
ActionContextWrapper actionContext)
ChoosenAction
toHtmlString in interface ChoosenActionability - 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 final boolean play(ContextEventListener context,
Ability ability)
StandardAction
play in interface StandardActionplay in class Targetcontext - 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 Targetable getAbstractTarget(ContextEventListener context,
Ability ability)
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 abstract java.lang.String toString(Ability ability)
MAction
toString in class Targetability - 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 | |||||||||