mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
update exile zone for CraftAbility to share between card sides
* updated and added test coverage for previously converted cards Altar of the Wretched and Eye of Ojer Taq
This commit is contained in:
parent
ae97f8944d
commit
99bb467bdc
5 changed files with 216 additions and 42 deletions
|
|
@ -9,7 +9,6 @@ import mage.abilities.costs.common.ExileSourceCost;
|
|||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.TransformingDoubleFacedCardHalf;
|
||||
import mage.constants.*;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.FilterPermanent;
|
||||
|
|
@ -122,7 +121,8 @@ class CraftCost extends CostImpl {
|
|||
@Override
|
||||
public boolean pay(Ability ability, Game game, Ability source, UUID controllerId, boolean noMana, Cost costToPay) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player == null) {
|
||||
Card sourceCard = game.getCard(source.getSourceId());
|
||||
if (player == null || sourceCard == null) {
|
||||
paid = false;
|
||||
return paid;
|
||||
}
|
||||
|
|
@ -143,7 +143,7 @@ class CraftCost extends CostImpl {
|
|||
.collect(Collectors.toSet());
|
||||
player.moveCardsToExile(
|
||||
cards, source, game, true,
|
||||
CardUtil.getExileZoneId(game, source),
|
||||
CardUtil.getExileZoneId(game, sourceCard.getMainCard().getId(), sourceCard.getMainCard().getZoneChangeCounter(game)),
|
||||
CardUtil.getSourceName(game, source)
|
||||
);
|
||||
paid = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue