From 47af865bc315ace0bc09ca2ce191552aebac57f8 Mon Sep 17 00:00:00 2001 From: jeffwadsworth Date: Tue, 2 Jun 2020 10:43:37 -0500 Subject: [PATCH] - Little fix Cradle of Vitality. (null check) --- Mage.Sets/src/mage/cards/c/CradleOfVitality.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Mage.Sets/src/mage/cards/c/CradleOfVitality.java b/Mage.Sets/src/mage/cards/c/CradleOfVitality.java index 59d9d895ce..4640c6695a 100644 --- a/Mage.Sets/src/mage/cards/c/CradleOfVitality.java +++ b/Mage.Sets/src/mage/cards/c/CradleOfVitality.java @@ -61,7 +61,10 @@ class CradleOfVitalityEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { Permanent permanent = game.getPermanent(source.getFirstTarget()); - int lifeGained = (Integer) this.getValue("gainedLife"); + int lifeGained = 0; + if (this.getValue("gainedLife") != null) { + lifeGained = (Integer) this.getValue("gainedLife"); + } return permanent != null && lifeGained > 0 && permanent.addCounters(CounterType.P1P1.createInstance(lifeGained), source, game); }