magefree / magefree/mage

Refactor: Separate the player and the permanent in TapForManaAllTriggeredAbility & TapForManaAllTriggeredManaAbility

Open
#12,029 1 comment 0 reactions 0 assignees View on GitHub
refactoring
Dominant language
Java
Stars
2.4k
Forks
940
Avg merge
2d 12h
Merged PRs (30d)
160

Description

There is only a few cards involved with those effects, for instance [[Vorinclex, Voice of Hunger]]:
https://scryfall.com/search?q=o%3A%2Fwhenever+.*+tap+.*+for+mana%2F

The FilterPermanent is packing the player (and needs a ControllerPredicates)

![image](https://github.com/magefree/mage/assets/34709007/e09524c8-8e41-4256-8639-fdb9cb8c7057)

I didn't investigate further, but there is no reason for the TAPPED_FOR_MANA event to not have the relevant playerId of the player tapping a permanent for mana.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating TapForManaAllTriggeredAbility, TapForManaAllTriggeredManaAbility, FilterPermanent, and the TAPPED_FOR_MANA event. Trace how the player is currently packed into the permanent filter and determine how the event should expose the playerId; done means the player and permanent are handled separately for the affected cards, including Vorinclex, Voice of Hunger.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
game-dev
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.