mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 03:22:00 -08:00
Fixed a bug in reworked prevention function.
This commit is contained in:
parent
61add5ab5b
commit
ba35f397b0
4 changed files with 9 additions and 3 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue