mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 21:29:17 -08:00
* Moldgraf Monstrosity - Fixed possible NPE if graveyard does not contain 2 creatures.
This commit is contained in:
parent
aa18ae8773
commit
aee38cbdc8
1 changed files with 3 additions and 0 deletions
|
|
@ -113,6 +113,9 @@ class MoldgrafMonstrosityEffect extends OneShotEffect<MoldgrafMonstrosityEffect>
|
||||||
}
|
}
|
||||||
|
|
||||||
private Card getRandomCard(Set<Card> cards) {
|
private Card getRandomCard(Set<Card> cards) {
|
||||||
|
if (cards == null || cards.size() < 1) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
int i = 0;
|
int i = 0;
|
||||||
int pick = new Random().nextInt(cards.size());
|
int pick = new Random().nextInt(cards.size());
|
||||||
for (Card card : cards) {
|
for (Card card : cards) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue