mirror of
https://github.com/correl/mage.git
synced 2024-11-25 03:00:11 +00:00
* Mogis, God of Slaughter - fixed that it doesn't make damage if nothing to sacrifice;
This commit is contained in:
parent
b2ab3a2ba4
commit
2429095f4d
1 changed files with 8 additions and 5 deletions
|
@ -82,11 +82,14 @@ class MogisGodOfSlaughterEffect extends OneShotEffect {
|
|||
}
|
||||
TargetPermanent target = new TargetControlledCreaturePermanent(1);
|
||||
target.setNotTarget(true);
|
||||
if (!player.chooseUse(Outcome.Detriment, "Sacrifice a creature to prevent 2 damage?", source, game)
|
||||
|| !player.choose(Outcome.Sacrifice, target, source.getSourceId(), game)) {
|
||||
return player.damage(2, source.getSourceId(), game) > 0;
|
||||
if (target.canChoose(player.getId(), game)
|
||||
&& player.chooseUse(Outcome.Detriment, "Sacrifice a creature to prevent 2 damage?", source, game)
|
||||
&& player.choose(Outcome.Sacrifice, target, source.getSourceId(), game)) {
|
||||
Permanent permanent = game.getPermanent(target.getFirstTarget());
|
||||
if (permanent != null && permanent.sacrifice(source.getSourceId(), game)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Permanent permanent = game.getPermanent(target.getFirstTarget());
|
||||
return permanent != null && permanent.sacrifice(source.getSourceId(), game);
|
||||
return player.damage(2, source.getSourceId(), game) > 0;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue