|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.magicproject.event.MEventListener
public abstract class MEventListener
Event| Field Summary | |
|---|---|
static java.util.List<Ability>[] |
CAN_I_CAST_ABILITIES
Represent all activated abilities/spell playable. |
MCard |
card
card owning this event |
static java.util.Map<Event,java.util.Map<Priority,java.util.List<ReplacementAbility>>> |
REPLACEMENT_ABILITIES
Represent all active replacement abilities of games for each event and each priority. |
Test |
test
additional code to check. |
static java.util.Map<Event,java.util.List<Ability>> |
TRIGGRED_ABILITIES
Represent all active triggered abilities of games for each event |
| Method Summary | |
|---|---|
MEventListener |
appendOr(MEventListener other)
Create and returns an union of this event and the specified one. |
abstract MEventListener |
clone(MCard card)
Return a copy of this with the specified owner |
abstract Event |
getIdEvent()
Return the idEvent of this event |
int |
getIdPlace()
return idZone of this card, whitout any code tap, untapped..) |
abstract boolean |
isActivated()
Indicates if this event corresponds to an activated ability |
abstract boolean |
isTriggered()
Indicates if this event corresponds to a triggered ability |
boolean |
isWellPlaced()
Tell if the card is well placed for this event to be playable |
boolean |
isWellPlaced(int idZone)
Tell if the card is well placed for this event to be playable |
boolean |
reCheck(ContextEventListener previousContext,
Ability ability)
Tell if the event still activated before to be added to the stack |
boolean |
reCheck(TriggeredCard triggered)
Tell if the event still activated before to be added to the stack |
abstract void |
registerToManager(Ability ability)
register this event to the event manager |
abstract void |
removeFromManager(Ability ability)
remove from the manager this event if doesn't match with the new context |
static void |
reset()
Reset all instant, empty-stack and triggered abilities. |
java.lang.String |
toHtmlString(Ability ability,
ContextEventListener context)
Return the HTML code representing this ability. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public Test test
public MCard card
public static final java.util.Map<Event,java.util.List<Ability>> TRIGGRED_ABILITIES
public static final java.util.Map<Event,java.util.Map<Priority,java.util.List<ReplacementAbility>>> REPLACEMENT_ABILITIES
public static final java.util.List<Ability>[] CAN_I_CAST_ABILITIES
| Method Detail |
|---|
public java.lang.String toHtmlString(Ability ability,
ContextEventListener context)
ability - is the attached ability.context - the context needed by event activated
public abstract Event getIdEvent()
public abstract void registerToManager(Ability ability)
RegisterableEvent
registerToManager in interface RegisterableEventability - owning this eventpublic abstract void removeFromManager(Ability ability)
RegisterableEvent
removeFromManager in interface RegisterableEventability - owning this eventpublic abstract MEventListener clone(MCard card)
card - is the card of the ability of this event
public int getIdPlace()
public boolean isWellPlaced()
public boolean isWellPlaced(int idZone)
idZone - the supposed zone where card is.
public boolean reCheck(ContextEventListener previousContext,
Ability ability)
previousContext - ability - is the ability owning this test. The card component of this
ability should correspond to the card owning this test too.
public boolean reCheck(TriggeredCard triggered)
triggered - the triggered card.
public static void reset()
public MEventListener appendOr(MEventListener other)
null is returned.
other - the event to append with 'or' operator.
public abstract boolean isActivated()
public abstract boolean isTriggered()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||