mirror of
https://github.com/correl/mage.git
synced 2025-01-13 19:11:33 +00:00
Fixed NPE and bug retrieving player for gain life of Abattoir Ghoul..
This commit is contained in:
parent
eb132429d6
commit
6c1b686bce
1 changed files with 4 additions and 3 deletions
|
@ -103,9 +103,10 @@ class AbattoirGhoulEffect extends ReplacementEffectImpl<AbattoirGhoulEffect> {
|
|||
Permanent permanent = ((ZoneChangeEvent)event).getTarget();
|
||||
if (permanent != null) {
|
||||
MageInt toughness = permanent.getToughness();
|
||||
Player player = (Player)this.getValue("player");
|
||||
player.gainLife(toughness.getValue(), game);
|
||||
return true;
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player != null) {
|
||||
player.gainLife(toughness.getValue(), game);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue