* Estrid, the Masked - fixed problems with with first and second ability (fixes #5223).

This commit is contained in:
LevelX2 2018-08-25 14:30:31 +02:00
parent 2f8b8c7f06
commit 9e88d847ed
3 changed files with 15 additions and 7 deletions

View file

@ -1410,7 +1410,7 @@ public abstract class GameImpl implements Game, Serializable {
}
}
}
@Override
public void resetControlAfterSpellResolve(UUID topId) {
// for Word of Command
@ -1958,7 +1958,12 @@ public abstract class GameImpl implements Game, Serializable {
}
}
} else {
SpellAbility spellAbility = perm.getSpellAbility();
Ability spellAbility = perm.getSpellAbility();
if (spellAbility == null) {
if (!perm.getAbilities().isEmpty()) {
spellAbility = perm.getAbilities().get(0); // Can happen for created tokens (e.g. Estrid, the Masked)
}
}
if (spellAbility.getTargets().isEmpty()) {
for (Ability ability : perm.getAbilities(this)) {
if ((ability instanceof SpellAbility)