* UI: fixed missing text for tokens in Card Viewer;

This commit is contained in:
Oleg Agafonov 2019-07-19 10:32:09 +04:00
parent 181806d16e
commit 7ac58f9787

View file

@ -234,6 +234,10 @@ public abstract class PermanentImpl extends CardImpl implements Permanent {
}
}
/**
* @param game can be null, e.g. for cards viewer
* @return
*/
@Override
public List<String> getRules(Game game) {
try {
@ -261,7 +265,7 @@ public abstract class PermanentImpl extends CardImpl implements Permanent {
// restrict hints
List<String> restrictHints = new ArrayList<>();
if (HintUtils.RESTRICT_HINTS_ENABLE) {
if (game != null && HintUtils.RESTRICT_HINTS_ENABLE) {
for (Map.Entry<RestrictionEffect, Set<Ability>> entry : game.getContinuousEffects().getApplicableRestrictionEffects(this, game).entrySet()) {
for (Ability ability : entry.getValue()) {
if (!entry.getKey().applies(this, ability, game)) {