|
||||||||||
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.phase.EndOfPhase
public class EndOfPhase
End of phase events. Raised just before to go to the next phase
If idPhase value is NO_CARE, this event would be acivated at each end of
phase
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 | |
---|---|
EndOfPhase(java.io.InputStream inputFile,
MCard card)
Create an instance of MEventEndOfPhase by reading a file Offset's file must pointing on the first byte of this event Structure of InputStream : Data[size] idZone [1] test [...] |
|
EndOfPhase(int idZone,
Test test,
MCard card,
Expression idPhase,
PhaseFilter phaseFilter)
Creates a new instance of MEventEndOfPhase specifying all attributes of this class. |
Method Summary | |
---|---|
MEventListener |
appendOr(MEventListener other)
Create and returns an union of this event and the specified one. |
MEventListener |
clone(MCard card)
Return a copy of this with the specified owner |
static void |
dispatchEvent()
Dispatch this event to all active event listeners able to understand this event. |
Event |
getIdEvent()
Return the idEvent of this event |
java.lang.String |
toHtmlString(Ability ability,
ContextEventListener context)
Return the HTML code representing this ability. |
static boolean |
tryAction(int currentIdPhase)
Dispatch this event to replacement abilites only. |
Methods inherited from class net.sf.magicproject.event.TriggeredEvent |
---|
isActivated, isTriggered, registerToManager, removeFromManager |
Methods inherited from class net.sf.magicproject.event.MEventListener |
---|
getIdPlace, isWellPlaced, isWellPlaced, reCheck, reCheck, reset |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Event EVENT
Constructor Detail |
---|
public EndOfPhase(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 EndOfPhase(int idZone, Test test, MCard card, Expression idPhase, PhaseFilter phaseFilter)
idZone
- the place constraint to activate this eventtest
- the test of this eventcard
- is the card owning this cardidPhase
- the looked for phase identifiantphaseFilter
- the filter.Method Detail |
---|
public MEventListener clone(MCard card)
card
- is the card of the ability of this event
public static void dispatchEvent()
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.
public static boolean tryAction(int currentIdPhase)
false
value,
the caller should not call any stack resolution since activated abilities
are being played. Unusually, when several replacement abilities are found
for this event, ONLY the first replacement found replacement ability is
picked and played.
currentIdPhase
- the current phase type identifiant (not index)
public final Event getIdEvent()
public java.lang.String toHtmlString(Ability ability, ContextEventListener context)
MEventListener
toHtmlString
in class TriggeredEvent
ability
- is the attached ability.context
- the context needed by event activated
public MEventListener appendOr(MEventListener other)
MEventListener
null
is returned.
appendOr
in class MEventListener
other
- the event to append with 'or' operator.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |