magefree / magefree/mage

Refactor: moveCardsToExile in replaceEvent must migrate to use setToZone

Open
#13,594 3 comments 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

from #13593

Looks like not all cards moved to `setToZone` logic and still use direct exile in replace zone change events for some reason.

![Image](https://github.com/user-attachments/assets/81fc8424-ba11-4393-8e8f-dd4380c20f74)

TODO:
* research original reason of the problem (why replaceEvent restrict to use direct exiles - some combos with multiple replacement effects and moving between zones?);
* research custom usages of moveCardsToExile and the reason behind it, e.g. it require special exile zone for linked ability;
* make sure all usages of moveCardsToExile ends with “return true” in replaceEvent;
* make sure moveCardsToExile replaced by setToZone if possible;

Search [potential code](https://github.com/search?q=repo%3Amagefree%2Fmage+replaceevent+moveCardsToExile&type=code) to research/migrate.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the linked repository search for replaceEvent and moveCardsToExile, then trace the relevant replacement zone-change events and setToZone usage. Investigate why direct exile is retained, review custom usages and linked-ability exile zones, and verify that remaining moveCardsToExile calls return true or can be migrated to setToZone.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
game-dev
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.