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;
}
}
}

View file

@ -228,10 +228,11 @@ public abstract class AbilityImpl implements Ability {
game.resetShortLivingLKI();
/**
* game.applyEffects() has to be done at least for every effect
* that moves cards/permanent between zones, so Static effects
* work as intened if dependant from the moved objects zone it
* is in Otherwise for example were static abilities with
* replacement effects deactivated to late Example:
* that moves cards/permanent between zones, or chnages control
* of objects so Static effects work as intened if dependant
* from the moved objects zone it is in Otherwise for example
* were static abilities with replacement effects deactivated to
* late Example:
* {@link org.mage.test.cards.replacement.DryadMilitantTest#testDiesByDestroy testDiesByDestroy}
*/
if (effect.applyEffectsAfter()) {