Using unique/special new event type for taking special actions
See original GitHub issueSpecial actions are not activated abilities.
116.1. Unless a spell or ability is instructing a player to take an action, which player can take actions at any given time is determined by a system of priority. The player with priority may cast spells, activate abilities, and take special actions.
So xmage should send a special event type for taking special actions. Currently ACTIVATE_ABILITY and ACTIVATED_ABILITY are used. This should be something like TAKE_SPECIAL_ACTION and TAKEN_SPECIAL_ACTION to be able to proper distingish between the special actions and activated abilities.
This would solve problems like that Phyrexian Revoker in the current implementation does also prevent special actions from beeing taken.
I’m not sure where are ACTIVATE_ABILITY and ACTIVATED_ABILITY events used to get information about taking a special action.
What are possible candidates, that have to be checked/changed?
Current code from PlayerImpl.java
protected boolean specialAction(SpecialAction action, Game game) {
//20091005 - 114
if (!game.replaceEvent(GameEvent.getEvent(GameEvent.EventType.ACTIVATE_ABILITY,
action.getSourceId(), action.getId(), playerId))) {
int bookmark = game.bookmarkState();
if (action.activate(game, false)) {
game.fireEvent(GameEvent.getEvent(GameEvent.EventType.ACTIVATED_ABILITY,
action.getSourceId(), action.getId(), playerId));
if (!game.isSimulation()) {
game.informPlayers(getLogName() + action.getGameLogMessage(game));
}
if (action.resolve(game)) {
game.removeBookmark(bookmark);
resetStoredBookmark(game);
return true;
}
}
restoreState(bookmark, action.getRule(), game);
}
return false;
}
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (5 by maintainers)

Top Related StackOverflow Question
Guardian Angel creates a special action:
116.2c. Some effects allow a player to take an action at a later time, usually to end a continuous effect or to stop a delayed triggered ability from triggering. Doing so is a special action. A player can take such an action any time they have priority, unless that effect specifies another timing restriction, for as long as the effect allows it.
Added now new GameEvents for special actions and the special mana payment abilities (no activated abilities). So preventing effects that check for the event will do automatically a correct selection.
SPECIAL_ACTION => Event: TAKE_SPECIAL_ACTION, TAKEN_SPECIAL_ACTION
LicidAbility 116.2c CompanionAbility 116.2g TurnFaceUpAbility 116.2b SuspendAbility 116.2f VolrathsCurseSpecialAction 116.2d LeoninArbiterSpecialAction 116.2d DampingEngineSpecialAction 116.2d CirclingVulturesSpecialAction 116.2e UnlessPaysDelayedEffect 116.2c
GuardianAngelAction => Is still coded as special action (confirmation if this is correct would be nice).
SPECIAL_MANA_PAYMENT => Event: TAKE_SPECIAL_MANA_PAYMENT, TAKEN_SPECIAL_MANA_PAYMENT
AssistAbility ConvokeAbility DelveAbility ImproviseAbility Channel (card)