Fixed a bug in reworked prevention function.

This commit is contained in:
LevelX2 2014-04-25 22:17:19 +02:00
parent 61add5ab5b
commit ba35f397b0
4 changed files with 9 additions and 3 deletions

View file

@ -39,7 +39,6 @@ import mage.cards.CardImpl;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.PhaseStep;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterAttackingCreature;
import mage.game.Game;
import mage.game.events.GameEvent;

View file

@ -109,7 +109,7 @@ class ShowAndTellEffect extends OneShotEffect<ShowAndTellEffect> {
if (player.choose(Outcome.PutCreatureInPlay, target, source.getSourceId(), game)) {
Card card = game.getCard(target.getFirstTarget());
if (card != null) {
card.putOntoBattlefield(game, Zone.HAND, source.getId(), player.getId());
player.putOntoBattlefieldWithInfo(card, game, Zone.HAND, source.getSourceId());
}
}
}

View file

@ -52,6 +52,13 @@ public class ClingingMistsTest extends CardTestPlayerBase {
public void testCardExile2() {
setLife(playerA, 5);
addCard(Zone.BATTLEFIELD, playerA, "Forest", 3);
/**
* Clinging Mists
* Instant
* Prevent all combat damage that would be dealt this turn.
* Fateful hour - If you have 5 or less life, tap all attacking creatures. Those creatures don't untap during their controller's next untap step.
*
*/
addCard(Zone.HAND, playerA, "Clinging Mists");
addCard(Zone.BATTLEFIELD, playerB, "Mountain");
addCard(Zone.BATTLEFIELD, playerB, "Abbey Griffin");

View file

@ -55,7 +55,7 @@ public class PreventAllDamageByAllEffect extends PreventionEffectImpl<PreventAll
}
public PreventAllDamageByAllEffect(FilterCreaturePermanent filter, Duration duration, boolean onlyCombat) {
super(duration, Integer.MAX_VALUE, false);
super(duration, Integer.MAX_VALUE, onlyCombat);
this.filter = filter;
}