- fixed a null pointer in ForetellAbility

This commit is contained in:
Jeff 2021-01-23 20:36:47 -06:00
parent 9f87839ca6
commit 432f9f5a67

View file

@ -256,7 +256,8 @@ class ForetellCostAbility extends StaticAbility implements AlternativeSourceCost
@Override
public boolean isAvailable(Ability source, Game game) {
Card card = game.getCard(source.getSourceId());
if (card != null) {
if (card != null
&& game.getState().getValue(card.getId().toString()) != null) {
return Zone.STACK == game.getState().getZone(card.getId())
&& ((int) game.getState().getValue(card.getId().toString()
+ "Foretell Turn Number") != game.getTurnNum());