mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 03:22:00 -08:00
Fixed #4253 (Scythe Specter throw NPE error on 0 cards in opponent hand)
This commit is contained in:
parent
7a42ea416b
commit
d066715693
1 changed files with 2 additions and 1 deletions
|
|
@ -129,7 +129,8 @@ class ScytheSpecterEffect extends OneShotEffect {
|
||||||
}
|
}
|
||||||
|
|
||||||
for (UUID playerId : game.getOpponents(controller.getId())) {//lose life equal to CMC
|
for (UUID playerId : game.getOpponents(controller.getId())) {//lose life equal to CMC
|
||||||
if (cardDiscarded.get(playerId).getConvertedManaCost() == highestCMC) {
|
Card card = cardDiscarded.get(playerId);
|
||||||
|
if ((card != null) && (card.getConvertedManaCost() == highestCMC)) {
|
||||||
Player opponent = game.getPlayer(playerId);
|
Player opponent = game.getPlayer(playerId);
|
||||||
if (opponent != null
|
if (opponent != null
|
||||||
&& discardedCheck.get(playerId) == 1) {//check that card was discarded
|
&& discardedCheck.get(playerId) == 1) {//check that card was discarded
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue