[MIC] Implemented Wall of Mourning

This commit is contained in:
Evan Kranzler 2021-09-30 08:52:24 -04:00
parent f47aea4fba
commit 7b1e3fae7b
3 changed files with 127 additions and 2 deletions

View file

@ -91,8 +91,7 @@ public class CardsImpl extends LinkedHashSet<UUID> implements Cards, Serializabl
if (this.isEmpty()) {
return null;
}
UUID[] cards = this.toArray(new UUID[this.size()]);
MageObject object = game.getObject(cards[RandomUtil.nextInt(cards.length)]); // neccessary if permanent tokens are in the collection
MageObject object = game.getObject(RandomUtil.randomFromCollection(this)); // neccessary if permanent tokens are in the collection
if (object instanceof Card) {
return (Card) object;
}