mirror of
https://github.com/correl/mage.git
synced 2024-11-29 11:09:53 +00:00
- Little fix Cradle of Vitality. (null check)
This commit is contained in:
parent
aed44cd0cc
commit
47af865bc3
1 changed files with 4 additions and 1 deletions
|
@ -61,7 +61,10 @@ class CradleOfVitalityEffect extends OneShotEffect {
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Permanent permanent = game.getPermanent(source.getFirstTarget());
|
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
|
return permanent != null && lifeGained > 0
|
||||||
&& permanent.addCounters(CounterType.P1P1.createInstance(lifeGained), source, game);
|
&& permanent.addCounters(CounterType.P1P1.createInstance(lifeGained), source, game);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue