mirror of
https://github.com/correl/mage.git
synced 2025-03-12 17:00:08 -09:00
Fixed NPE errors in deck editor;
This commit is contained in:
parent
3ce1296886
commit
9110f70e2d
1 changed files with 3 additions and 0 deletions
|
@ -292,6 +292,9 @@ public abstract class CardImpl extends MageObjectImpl implements Card {
|
|||
*/
|
||||
@Override
|
||||
public Abilities<Ability> getAbilities(Game game) {
|
||||
if (game == null) {
|
||||
return abilities; // deck editor with empty game
|
||||
}
|
||||
CardState cardState = game.getState().getCardState(this.getId());
|
||||
if (!cardState.hasLostAllAbilities() && (cardState.getAbilities() == null || cardState.getAbilities().isEmpty())) {
|
||||
return abilities;
|
||||
|
|
Loading…
Add table
Reference in a new issue