mirror of
https://github.com/correl/mage.git
synced 2024-12-28 11:14:13 +00:00
[NEO] Fix for Invoke Despair
This commit is contained in:
parent
0586014afa
commit
c68c7699c0
1 changed files with 12 additions and 6 deletions
|
@ -71,9 +71,11 @@ class InvokeDespairEffect extends OneShotEffect {
|
|||
target.setNotTarget(true);
|
||||
opponent.choose(outcome, target, source.getSourceId(), game);
|
||||
Permanent permanent = game.getPermanent(target.getFirstTarget());
|
||||
boolean sacrificed = false;
|
||||
if (permanent != null) {
|
||||
permanent.sacrifice(source, game);
|
||||
} else {
|
||||
sacrificed = permanent.sacrifice(source, game);
|
||||
}
|
||||
if (!sacrificed) {
|
||||
opponent.loseLife(2, game, source, false);
|
||||
controller.drawCards(1, source, game);
|
||||
}
|
||||
|
@ -81,9 +83,11 @@ class InvokeDespairEffect extends OneShotEffect {
|
|||
target.setNotTarget(true);
|
||||
opponent.choose(outcome, target, source.getSourceId(), game);
|
||||
permanent = game.getPermanent(target.getFirstTarget());
|
||||
sacrificed = false;
|
||||
if (permanent != null) {
|
||||
permanent.sacrifice(source, game);
|
||||
} else {
|
||||
sacrificed = permanent.sacrifice(source, game);
|
||||
}
|
||||
if (!sacrificed) {
|
||||
opponent.loseLife(2, game, source, false);
|
||||
controller.drawCards(1, source, game);
|
||||
}
|
||||
|
@ -91,9 +95,11 @@ class InvokeDespairEffect extends OneShotEffect {
|
|||
target.setNotTarget(true);
|
||||
opponent.choose(outcome, target, source.getSourceId(), game);
|
||||
permanent = game.getPermanent(target.getFirstTarget());
|
||||
sacrificed = false;
|
||||
if (permanent != null) {
|
||||
permanent.sacrifice(source, game);
|
||||
} else {
|
||||
sacrificed = permanent.sacrifice(source, game);
|
||||
}
|
||||
if (!sacrificed) {
|
||||
opponent.loseLife(2, game, source, false);
|
||||
controller.drawCards(1, source, game);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue