Merge pull request #5132 from NoahGleason/bugfix

Bugfixes
This commit is contained in:
theelk801 2018-07-09 08:53:44 -04:00 committed by GitHub
commit c93bda35ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 4 deletions

View file

@ -82,15 +82,17 @@ class ChaosWandEffect extends OneShotEffect {
break; break;
} }
opponent.moveCards(card, Zone.EXILED, source, game); opponent.moveCards(card, Zone.EXILED, source, game);
controller.revealCards(source, new CardsImpl(card), game);
if (card.isInstant() || card.isSorcery()) { if (card.isInstant() || card.isSorcery()) {
if (!controller.chooseUse(outcome, "Cast " + card.getName() + " without paying its mana cost?", source, game) if (!controller.chooseUse(outcome, "Cast " + card.getName() + " without paying its mana cost?", source, game)
|| !controller.cast(card.getSpellAbility(), game, true, new MageObjectReference(source.getSourceObject(game), game))) { || !controller.cast(card.getSpellAbility(), game, true, new MageObjectReference(source.getSourceObject(game), game))) {
cardsToShuffle.add(card); cardsToShuffle.add(card);
} }
break; break;
} } else {
cardsToShuffle.add(card); cardsToShuffle.add(card);
} }
}
return opponent.putCardsOnBottomOfLibrary(cardsToShuffle, game, source, false); return opponent.putCardsOnBottomOfLibrary(cardsToShuffle, game, source, false);
} }
} }

View file

@ -21,6 +21,7 @@ import mage.filter.predicate.mageobject.CardTypePredicate;
import mage.filter.predicate.permanent.AnotherPredicate; import mage.filter.predicate.permanent.AnotherPredicate;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import mage.players.Player;
/** /**
* *
@ -94,9 +95,9 @@ class BelzenlokDemonTokenEffect extends OneShotEffect {
if (otherCreatures > 0) { if (otherCreatures > 0) {
new SacrificeControllerEffect(filter, 1, "").apply(game, source); new SacrificeControllerEffect(filter, 1, "").apply(game, source);
} else { } else {
Permanent permanent = game.getPermanentOrLKIBattlefield(source.getSourceId()); Player controller = game.getPlayer(source.getControllerId());
if (permanent != null) { if (controller != null) {
permanent.damage(6, permanent.getId(), game, false, true); controller.damage(6, source.getSourceId(), game, false, true);
} }
} }
return true; return true;