Minor changes.

This commit is contained in:
LevelX2 2015-06-25 23:13:45 +02:00
parent 77c9d6e989
commit 12cba2d0ab
2 changed files with 10 additions and 9 deletions

View file

@ -96,15 +96,15 @@ class DoomgapeEffect extends OneShotEffect {
@Override
public boolean apply(Game game, Ability source) {
Player you = game.getPlayer(source.getControllerId());
if (you != null) {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
Target target = new TargetControlledCreaturePermanent();
target.setNotTarget(true);
if (you.choose(Outcome.Sacrifice, target, source.getSourceId(), game)) {
if (controller.choose(Outcome.Sacrifice, target, source.getSourceId(), game)) {
Permanent creature = game.getPermanent(target.getFirstTarget());
if (creature != null) {
if (creature.sacrifice(source.getSourceId(), game)) {
you.gainLife(creature.getToughness().getValue(), game);
controller.gainLife(creature.getToughness().getValue(), game);
return true;
}
}
@ -112,4 +112,4 @@ class DoomgapeEffect extends OneShotEffect {
}
return false;
}
}
}