- Properly report in case the chosen pile somehow ended up being empty.

This commit is contained in:
Agetian
2016-06-26 15:01:41 +00:00
parent af947b35b3
commit 9738250215

View File

@@ -103,9 +103,13 @@ public class TwoPilesEffect extends SpellAbilityEffect {
CardCollectionView unchosenPile = !pile1WasChosen ? pile1 : pile2; CardCollectionView unchosenPile = !pile1WasChosen ? pile1 : pile2;
String notification = chooser + " chooses Pile " + (pile1WasChosen ? "1" : "2") + ":\n"; String notification = chooser + " chooses Pile " + (pile1WasChosen ? "1" : "2") + ":\n";
if (!chosenPile.isEmpty()) {
for (Card c : chosenPile) { for (Card c : chosenPile) {
notification += c.getName() + "\n"; notification += c.getName() + "\n";
} }
} else {
notification += "(Empty pile)";
}
p.getGame().getAction().nofityOfValue(sa, chooser, notification, chooser); p.getGame().getAction().nofityOfValue(sa, chooser, notification, chooser);