Dauthi Voidwalker - fixed that it doesn't work with cards (related to a3ca9fc03a);

This commit is contained in:
Oleg Agafonov 2021-09-27 23:29:27 +04:00
parent bf172f7c8f
commit 0e1abaec5d
3 changed files with 52 additions and 7 deletions

View file

@ -20,7 +20,6 @@ import mage.abilities.hint.HintUtils;
import mage.cards.*;
import mage.constants.*;
import mage.counters.Counter;
import mage.counters.CounterType;
import mage.filter.Filter;
import mage.filter.predicate.mageobject.NamePredicate;
import mage.game.CardState;
@ -1381,7 +1380,7 @@ public final class CardUtil {
* @param game
* @param source
* @param controller
* @param card can be card or permanent
* @param card can be card or permanent
* @param toZone
* @param counter
*/
@ -1390,6 +1389,13 @@ public final class CardUtil {
throw new IllegalArgumentException("Wrong code usage - method doesn't support moving to battlefield zone");
}
// workaround:
// in ZONE_CHANGE replace events you must set new zone by event's setToZone,
// BUT for counter effect you need to complete zone change event first (so moveCards calls here)
// TODO: must be fixed someday by:
// * or by new event ZONE_CHANGED to apply counter effect on it
// * or by counter effects applier in ZONE_CHANGE event (see copy or token as example)
// move to zone
if (!controller.moveCards(card, toZone, source, game)) {
return false;