forked from External/mage
Fixed game errors for non started games (some cards uses dynamic hints with non-protected code)
This commit is contained in:
parent
ec7befa511
commit
35b00c3da1
2 changed files with 28 additions and 20 deletions
|
|
@ -275,6 +275,11 @@ public abstract class PermanentImpl extends CardImpl implements Permanent {
|
|||
rules.addAll(info.values());
|
||||
}
|
||||
|
||||
if (game == null || game.getPhase() == null) {
|
||||
// dynamic hints for started game only
|
||||
return rules;
|
||||
}
|
||||
|
||||
// ability hints
|
||||
List<String> abilityHints = new ArrayList<>();
|
||||
if (HintUtils.ABILITY_HINTS_ENABLE) {
|
||||
|
|
@ -290,7 +295,7 @@ public abstract class PermanentImpl extends CardImpl implements Permanent {
|
|||
|
||||
// restrict hints
|
||||
List<String> restrictHints = new ArrayList<>();
|
||||
if (game != null && HintUtils.RESTRICT_HINTS_ENABLE) {
|
||||
if (HintUtils.RESTRICT_HINTS_ENABLE) {
|
||||
// restrict
|
||||
for (Map.Entry<RestrictionEffect, Set<Ability>> entry : game.getContinuousEffects().getApplicableRestrictionEffects(this, game).entrySet()) {
|
||||
for (Ability ability : entry.getValue()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue