mirror of
https://github.com/magefree/mage.git
synced 2025-12-23 12:02:01 -08:00
* Ghastlord of Fugue - Fixed the not working triggered ability.
This commit is contained in:
parent
d427e9a315
commit
e1a8e41702
2 changed files with 9 additions and 3 deletions
|
|
@ -93,7 +93,7 @@ class GhastlordOfFugueEffect extends OneShotEffect {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Player targetPlayer = game.getPlayer(source.getFirstTarget());
|
Player targetPlayer = game.getPlayer(getTargetPointer().getFirst(game, source));
|
||||||
Player controller = game.getPlayer(source.getControllerId());
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
MageObject sourceObject = game.getObject(source.getSourceId());
|
MageObject sourceObject = game.getObject(source.getSourceId());
|
||||||
if (targetPlayer != null
|
if (targetPlayer != null
|
||||||
|
|
@ -111,7 +111,7 @@ class GhastlordOfFugueEffect extends OneShotEffect {
|
||||||
chosenCard = game.getCard(target.getFirstTarget());
|
chosenCard = game.getCard(target.getFirstTarget());
|
||||||
}
|
}
|
||||||
if (chosenCard != null) {
|
if (chosenCard != null) {
|
||||||
controller.moveCardToExileWithInfo(chosenCard, null, "", source.getSourceId(), game, Zone.HAND, true);
|
controller.moveCards(chosenCard, Zone.HAND, Zone.EXILED, source, game);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2850,12 +2850,18 @@ public abstract class PlayerImpl implements Player, Serializable {
|
||||||
}
|
}
|
||||||
game.fireEvent(new ZoneChangeGroupEvent(cards, source == null ? null : source.getSourceId(), this.getId(), fromZone, toZone));
|
game.fireEvent(new ZoneChangeGroupEvent(cards, source == null ? null : source.getSourceId(), this.getId(), fromZone, toZone));
|
||||||
switch(toZone) {
|
switch(toZone) {
|
||||||
|
case EXILED:
|
||||||
|
boolean result = false;
|
||||||
|
for(Card card: cards) {
|
||||||
|
result |= moveCardToExileWithInfo(card, null, "", source == null ? null : source.getSourceId(), game, true);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
case GRAVEYARD:
|
case GRAVEYARD:
|
||||||
return moveCardsToGraveyardWithInfo(cards, source, game, fromZone);
|
return moveCardsToGraveyardWithInfo(cards, source, game, fromZone);
|
||||||
case HAND:
|
case HAND:
|
||||||
boolean result = false;
|
boolean result = false;
|
||||||
for(Card card: cards) {
|
for(Card card: cards) {
|
||||||
result |= moveCardToHandWithInfo(card, playerId, game, fromZone);
|
result |= moveCardToHandWithInfo(card, source == null ? null : source.getSourceId(), game, fromZone);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
default:
|
default:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue