mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 11:32:00 -08:00
Changed Cunning Rhetoric to exile cards to its own exile zone
This commit is contained in:
parent
b538d4714c
commit
4791bbb81f
1 changed files with 6 additions and 2 deletions
|
|
@ -1,5 +1,6 @@
|
||||||
package mage.cards.c;
|
package mage.cards.c;
|
||||||
|
|
||||||
|
import mage.MageObject;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.TriggeredAbilityImpl;
|
import mage.abilities.TriggeredAbilityImpl;
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
|
@ -103,14 +104,17 @@ class CunningRhetoricEffect extends OneShotEffect {
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Player opponent = game.getPlayer(getTargetPointer().getFirst(game, source));
|
Player opponent = game.getPlayer(getTargetPointer().getFirst(game, source));
|
||||||
if (opponent == null) {
|
MageObject sourceObject = source.getSourceObject(game);
|
||||||
|
if (opponent == null || sourceObject == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Card card = opponent.getLibrary().getFromTop(game);
|
Card card = opponent.getLibrary().getFromTop(game);
|
||||||
if (card == null) {
|
if (card == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
opponent.moveCards(card, Zone.EXILED, source, game);
|
|
||||||
|
UUID exileZoneId = CardUtil.getExileZoneId(game, sourceObject.getId(), sourceObject.getZoneChangeCounter(game));
|
||||||
|
opponent.moveCardsToExile(card, source, game, true, exileZoneId, sourceObject.getIdName());
|
||||||
CardUtil.makeCardPlayable(game, source, card, Duration.Custom, true);
|
CardUtil.makeCardPlayable(game, source, card, Duration.Custom, true);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue