Class GameEvent
java.lang.Object
net.demilich.metastone.game.events.GameEvent
- All Implemented Interfaces:
- Serializable,- Cloneable,- Notification
- Direct Known Subclasses:
- BasicGameEvent,- JoustEvent
The base class for game events, or things that happen during the execution of a 
GameAction that other game rules may react to.
 
 A null source will resolve to the EntityReference.TRIGGER_HOST
 when evaluating queueing and firing conditions.
- 
Constructor SummaryConstructorsConstructorDescriptionGameEvent(@NotNull GameContext context, Entity source, Entity target, int sourcePlayerId, int targetPlayerId) GameEvent(@NotNull GameContext context, Player player, Entity source, Entity target) 
- 
Method SummaryModifier and TypeMethodDescriptionprotected GameEventclone()getDescription(GameContext context, int playerId) A user-renderable description of what occurred in this notification.abstract com.hiddenswitch.spellsource.rpc.Spellsource.GameEventTypeMessage.GameEventTypeFor visualization purposes, what is the source of this notification?intintgetTargets(GameContext context, int player) For visualization purposes, what are the targets of this notification?booleanWhen true, indicates to processors of this notification that it belongs in the power history.toString()Methods inherited from class java.lang.Objectequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.demilich.metastone.game.events.NotificationgetSource, isClientInterested
- 
Constructor Details- 
GameEventpublic GameEvent(@NotNull @NotNull GameContext context, Player player, Entity source, Entity target) 
- 
GameEventpublic GameEvent(@NotNull @NotNull GameContext context, Entity source, Entity target, int sourcePlayerId, int targetPlayerId) 
 
- 
- 
Method Details- 
getSourceDescription copied from interface:NotificationFor visualization purposes, what is the source of this notification?- Specified by:
- getSourcein interface- Notification
- Returns:
- A reference to the entity that is the visualizable source of this notification.
 
- 
getTarget
- 
getTargetsDescription copied from interface:NotificationFor visualization purposes, what are the targets of this notification?- Specified by:
- getTargetsin interface- Notification
- Parameters:
- context- game context
- player- the player
- Returns:
- A reference to the entity that is the visualizable target of this notification.
 
- 
getEventTypepublic abstract com.hiddenswitch.spellsource.rpc.Spellsource.GameEventTypeMessage.GameEventType getEventType()
- 
getGameContext
- 
getTargetPlayerIdpublic int getTargetPlayerId()
- 
getSourcePlayerIdpublic int getSourcePlayerId()
- 
toString
- 
isPowerHistorypublic boolean isPowerHistory()Description copied from interface:NotificationWhen true, indicates to processors of this notification that it belongs in the power history.- Specified by:
- isPowerHistoryin interface- Notification
- Returns:
- trueif this notification should be stored in the power history of the game where it occurred.
 
- 
getDescriptionDescription copied from interface:NotificationA user-renderable description of what occurred in this notification.- Specified by:
- getDescriptionin interface- Notification
- Parameters:
- context- the game context
- playerId- the player ID
- Returns:
- a description string
 
- 
clone
 
-