mirror of
https://github.com/correl/mage.git
synced 2025-03-17 01:06:26 -09:00
- Fixed Cruel Reality. Bug #3162
This commit is contained in:
parent
6ee2e69f2c
commit
6a55c87eef
1 changed files with 2 additions and 4 deletions
|
@ -147,13 +147,12 @@ class CruelRealityEffect extends OneShotEffect {
|
||||||
Player controller = game.getPlayer(source.getControllerId());
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
if (cursedPlayer != null
|
if (cursedPlayer != null
|
||||||
&& controller != null) {
|
&& controller != null) {
|
||||||
if (cursedPlayer.chooseUse(outcome, "Sacrifice a creature or planeswalker?", source, game)) {
|
FilterControlledPermanent filter = new FilterControlledPermanent("creature or planeswalker");
|
||||||
FilterControlledPermanent filter = new FilterControlledPermanent();
|
|
||||||
filter.add(Predicates.or(
|
filter.add(Predicates.or(
|
||||||
new CardTypePredicate(CardType.CREATURE),
|
new CardTypePredicate(CardType.CREATURE),
|
||||||
new CardTypePredicate(CardType.PLANESWALKER)));
|
new CardTypePredicate(CardType.PLANESWALKER)));
|
||||||
TargetPermanent target = new TargetPermanent(filter);
|
TargetPermanent target = new TargetPermanent(filter);
|
||||||
if (cursedPlayer.choose(outcome, target, source.getId(), game)) {
|
if (cursedPlayer.choose(Outcome.Sacrifice, target, source.getId(), game)) {
|
||||||
Permanent objectToBeSacrificed = game.getPermanent(target.getFirstTarget());
|
Permanent objectToBeSacrificed = game.getPermanent(target.getFirstTarget());
|
||||||
if (objectToBeSacrificed != null) {
|
if (objectToBeSacrificed != null) {
|
||||||
if (objectToBeSacrificed.sacrifice(source.getId(), game)) {
|
if (objectToBeSacrificed.sacrifice(source.getId(), game)) {
|
||||||
|
@ -161,7 +160,6 @@ class CruelRealityEffect extends OneShotEffect {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
cursedPlayer.loseLife(5, game, false);
|
cursedPlayer.loseLife(5, game, false);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Add table
Reference in a new issue