mirror of
https://github.com/magefree/mage.git
synced 2026-01-23 11:49:56 -08:00
Fixed some more possible exception bugs.
This commit is contained in:
parent
1ec61abb8e
commit
74c310de3e
4 changed files with 35 additions and 32 deletions
|
|
@ -112,16 +112,18 @@ class StorageMatrixRestrictionEffect extends RestrictionEffect {
|
|||
}
|
||||
}
|
||||
String choosenType = choiceImpl.getChoice();
|
||||
game.informPlayers(storageMatrix.getLogName() + ": " + player.getLogName() + " chose to untap " + choosenType);
|
||||
if (choosenType != null) {
|
||||
game.informPlayers(storageMatrix.getLogName() + ": " + player.getLogName() + " chose to untap " + choosenType);
|
||||
|
||||
if (choosenType.equals(CardType.ARTIFACT.toString())) {
|
||||
type = CardType.ARTIFACT;
|
||||
} else if (choosenType.equals(CardType.LAND.toString())) {
|
||||
type = CardType.LAND;
|
||||
} else {
|
||||
type = CardType.CREATURE;
|
||||
if (choosenType.equals(CardType.ARTIFACT.toString())) {
|
||||
type = CardType.ARTIFACT;
|
||||
} else if (choosenType.equals(CardType.LAND.toString())) {
|
||||
type = CardType.LAND;
|
||||
} else {
|
||||
type = CardType.CREATURE;
|
||||
}
|
||||
applies = true;
|
||||
}
|
||||
applies = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -108,8 +108,10 @@ class SarkhanTheMadRevealAndDrawEffect extends OneShotEffect {
|
|||
Card card = controller.getLibrary().getFromTop(game);
|
||||
Permanent sourcePermanent = game.getPermanent(source.getSourceId());
|
||||
if (card != null) {
|
||||
controller.moveCards(card, null, Zone.HAND, source, game);
|
||||
sourcePermanent.damage(card.getManaCost().convertedManaCost(), source.getSourceId(), game, false, false);
|
||||
controller.moveCards(card, Zone.HAND, source, game);
|
||||
if (sourcePermanent != null) {
|
||||
sourcePermanent.damage(card.getManaCost().convertedManaCost(), source.getSourceId(), game, false, false);
|
||||
}
|
||||
controller.revealCards(sourceObject.getIdName(), new CardsImpl(card), game);
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue