Fix Rite of Belzenlok token not damaging its controller

This commit is contained in:
Noah Gleason 2018-07-08 22:01:37 -04:00
parent e86791cf44
commit c91e56b937
No known key found for this signature in database
GPG key ID: EC030EC6B0650A40

View file

@ -21,6 +21,7 @@ import mage.filter.predicate.mageobject.CardTypePredicate;
import mage.filter.predicate.permanent.AnotherPredicate;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
/**
*
@ -94,9 +95,9 @@ class BelzenlokDemonTokenEffect extends OneShotEffect {
if (otherCreatures > 0) {
new SacrificeControllerEffect(filter, 1, "").apply(game, source);
} else {
Permanent permanent = game.getPermanentOrLKIBattlefield(source.getSourceId());
if (permanent != null) {
permanent.damage(6, permanent.getId(), game, false, true);
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
controller.damage(6, source.getSourceId(), game, false, true);
}
}
return true;