Show storm count in card detail pane for storm cards

This commit is contained in:
drdev
2014-05-04 21:25:00 +00:00
parent 4aa8d57647
commit 4ba4533c61
3 changed files with 12 additions and 18 deletions

View File

@@ -5,6 +5,7 @@ import java.util.Iterator;
import java.util.List;
import forge.GuiBase;
import forge.game.Game;
import forge.game.GameEntity;
import forge.game.card.Card;
import forge.game.card.CounterType;
@@ -497,6 +498,17 @@ public class CardDetailUtil {
String mustBlockThese = Lang.joinHomogenous(card.getMustBlockCards());
area.append("Must block " + mustBlockThese);
}
//show current storm count for storm cards
if (card.getKeyword().contains("Storm")) {
Game game = GuiBase.getInterface().getGame();
if (game != null) {
if (area.length() != 0) {
area.append("\n\n");
}
area.append("Current Storm Count: " + game.getStack().getCardsCastThisTurn().size());
}
}
return area.toString();
}