mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
* Minor code clean up of Chandra, Torch of Defiance.
This commit is contained in:
parent
c745e654f9
commit
90d38bbec2
1 changed files with 4 additions and 6 deletions
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.c;
|
package mage.cards.c;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -22,7 +21,6 @@ import mage.constants.Outcome;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.constants.SuperType;
|
import mage.constants.SuperType;
|
||||||
import mage.constants.TargetController;
|
import mage.constants.TargetController;
|
||||||
import mage.constants.Zone;
|
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.command.emblems.ChandraTorchOfDefianceEmblem;
|
import mage.game.command.emblems.ChandraTorchOfDefianceEmblem;
|
||||||
import mage.players.Library;
|
import mage.players.Library;
|
||||||
|
@ -92,10 +90,10 @@ class ChandraTorchOfDefianceEffect extends OneShotEffect {
|
||||||
Card card = library.getFromTop(game);
|
Card card = library.getFromTop(game);
|
||||||
if (card != null) {
|
if (card != null) {
|
||||||
boolean exiledCardWasCast = false;
|
boolean exiledCardWasCast = false;
|
||||||
controller.moveCardToExileWithInfo(card, source.getSourceId(), sourceObject.getIdName(), source.getSourceId(), game, Zone.LIBRARY, true);
|
controller.moveCardsToExile(card, source, game, true, source.getSourceId(), sourceObject.getIdName());
|
||||||
if (!card.getManaCost().isEmpty()) {
|
if (!card.getManaCost().isEmpty() && !card.isLand()) {
|
||||||
if (controller.chooseUse(Outcome.Benefit, "Cast the card? (You still pay the costs)", source, game) && !card.isLand()) {
|
if (controller.chooseUse(Outcome.Benefit, "Cast " + card.getName() + "? (You still pay the costs)", source, game)) {
|
||||||
exiledCardWasCast = controller.cast(card.getSpellAbility(), game, false, new MageObjectReference(source.getSourceObject(game), game));
|
exiledCardWasCast = controller.cast(card.getSpellAbility(), game, false, new MageObjectReference(sourceObject, game));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!exiledCardWasCast) {
|
if (!exiledCardWasCast) {
|
||||||
|
|
Loading…
Reference in a new issue