|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.magicproject.event.MEventListener net.sf.magicproject.event.TriggeredEvent net.sf.magicproject.event.MovedCard
public class MovedCard
Field Summary | |
---|---|
static Event |
EVENT
The event type. |
Fields inherited from class net.sf.magicproject.event.TriggeredEvent |
---|
replacement |
Fields inherited from class net.sf.magicproject.event.MEventListener |
---|
CAN_I_CAST_ABILITIES, card, REPLACEMENT_ABILITIES, test, TRIGGRED_ABILITIES |
Constructor Summary | |
---|---|
MovedCard(java.io.InputStream inputFile,
MCard card)
Create an instance of MEventListener by reading a file Offset's file must pointing on the first byte of this event Structure of InputStream : Data[size] idZone [1] test to apply on source [...] |
|
MovedCard(int idPlace,
Test testSource,
Test testDestination,
MCard card)
Creates a new instance of CanICast specifying all attributes of this class. |
Method Summary | |
---|---|
MEventListener |
clone(MCard card)
Return a copy of this with the specified owner |
static void |
dispatchEvent(MCard movingCard,
int idPlaceDest,
Player newController,
boolean silentMode)
Dispatch this event to all active event listeners able to understand this event. |
boolean |
equals(java.lang.Object other)
|
Event |
getIdEvent()
Return the idEvent of this event |
boolean |
isMatching(Ability ability,
MCard movingCard)
Tell if the current event matches with this event. |
boolean |
reCheck(ContextEventListener previousContext,
Ability ability)
Tell if the event still activated before to be added to the stack |
static boolean |
tryAction(MCard movingCard,
int idPlaceDest,
Player newController,
boolean silentMode)
Dispatch this event to all active event listeners able to understand this event. |
Methods inherited from class net.sf.magicproject.event.TriggeredEvent |
---|
isActivated, isTriggered, registerToManager, removeFromManager, toHtmlString |
Methods inherited from class net.sf.magicproject.event.MEventListener |
---|
appendOr, getIdPlace, isWellPlaced, isWellPlaced, reCheck, reset |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Event EVENT
Constructor Detail |
---|
public MovedCard(java.io.InputStream inputFile, MCard card) throws java.io.IOException
inputFile
- is the file containing this eventcard
- is the card owning this event
java.io.IOException
- if error occurred during the reading process from the specified
input streampublic MovedCard(int idPlace, Test testSource, Test testDestination, MCard card)
idPlace
- the place constraint to activate this eventtestSource
- the test of this event, this one is applied on sourcetestDestination
- test to apply on destinationcard
- is the card owning this cardMethod Detail |
---|
public MEventListener clone(MCard card)
MEventListener
clone
in class TriggeredEvent
card
- is the card of the ability of this event
public boolean isMatching(Ability ability, MCard movingCard)
movingCard
- the moving cardability
- is the ability owning this test. The card component of this
ability should correspond to the card owning this test too.
public boolean reCheck(ContextEventListener previousContext, Ability ability)
MEventListener
reCheck
in class MEventListener
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 tryAction(MCard movingCard, int idPlaceDest, Player newController, boolean silentMode)
this
and other multiple event listeners. For each event listeners having
responded they have been activated, the corresponding ability is added to
the triggered buffer zone of player owning this ability
movingCard
- the moving cardidPlaceDest
- destination zone of this movenewController
- the new controller.silentMode
- Is the silent mode is enabled for this move.
public static void dispatchEvent(MCard movingCard, int idPlaceDest, Player newController, boolean silentMode)
this
and other multiple event listeners. For each event listeners having
responded they have been activated, the corresponding ability is added to
the triggered buffer zone of player owning this ability
movingCard
- the moving cardidPlaceDest
- destination zone of this movenewController
- the new controller.silentMode
- Is the silent mode is enabled for this move.public final Event getIdEvent()
MEventListener
getIdEvent
in class TriggeredEvent
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |