question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Using unique/special new event type for taking special actions

See original GitHub issue

Special 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:closed
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
emerald000commented, Sep 17, 2020

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.

0reactions
LevelX2commented, Sep 17, 2020

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)

Read more comments on GitHub >

github_iconTop Results From Across the Web

200+ Event Ideas To Steal Today - Skift Meetings
11. 20 UNIQUE SPECIAL EVENT IDEAS TO IMPRESS YOUR GUESTS ... Depending on the type of event you're organizing, using tech to bring...
Read more >
About event types - IBM
You can use the actions provided in the Event Types table to define new event types, to view or delete existing event types,...
Read more >
Planning And Managing Security For Major Special Events:
As described by the FBI, planning for hazmat incidents during special events focuses on four primary objectives: (1) availability of subject matter experts...
Read more >
Hoover Dam Special Events - Bureau of Reclamation
Iconic Hoover Dam hosts unique special events each year and we look forward to hosting your event. An approved Use Authorization is required ......
Read more >
Event Monitoring: New Event Types for Apex Troubleshooting ...
Two new EventLogFile event types capture Apex exception and long-running Apex request ... Take Action in Salesforce from Analytics for Communities ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found