mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
Minor changes.
This commit is contained in:
parent
77c9d6e989
commit
12cba2d0ab
2 changed files with 10 additions and 9 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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()) {
|
||||
|
|
Loading…
Reference in a new issue