mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
* Whispering Snitch - Fixed that it also triggered if other players surveilled.
This commit is contained in:
parent
7fef8113c0
commit
52f0ae8bd5
2 changed files with 10 additions and 9 deletions
|
@ -13,7 +13,6 @@ import mage.constants.CardType;
|
|||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.common.FilterInstantOrSorceryCard;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
|
@ -48,14 +47,12 @@ public final class MissionBriefing extends CardImpl {
|
|||
|
||||
class MissionBriefingEffect extends OneShotEffect {
|
||||
|
||||
public static final FilterCard filter = new FilterInstantOrSorceryCard("instant or sorcery card from your graveyard");
|
||||
|
||||
public MissionBriefingEffect() {
|
||||
super(Outcome.Benefit);
|
||||
this.staticText = "Surveil 2, then choose an instant or sorcery card "
|
||||
+ "in your graveyard. You may cast that card this turn. "
|
||||
+ "If that card would be put into your graveyard this turn, "
|
||||
+ "exile it instead.";
|
||||
+ "exile it instead";
|
||||
}
|
||||
|
||||
public MissionBriefingEffect(final MissionBriefingEffect effect) {
|
||||
|
@ -74,9 +71,10 @@ class MissionBriefingEffect extends OneShotEffect {
|
|||
return false;
|
||||
}
|
||||
player.surveil(2, source, game);
|
||||
Target target = new TargetCardInYourGraveyard(filter);
|
||||
Target target = new TargetCardInYourGraveyard(
|
||||
new FilterInstantOrSorceryCard("instant or sorcery card from your graveyard"));
|
||||
if (!player.choose(outcome, target, source.getSourceId(), game)) {
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
Card card = game.getCard(target.getFirstTarget());
|
||||
if (card != null) {
|
||||
|
|
|
@ -7,10 +7,10 @@ import mage.MageInt;
|
|||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.common.DamagePlayersEffect;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.constants.SubType;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.WatcherScope;
|
||||
import mage.constants.Zone;
|
||||
|
@ -65,8 +65,11 @@ class WhisperingSnitchTriggeredAbility extends TriggeredAbilityImpl {
|
|||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
WhisperingSnitchWatcher watcher = (WhisperingSnitchWatcher) game.getState().getWatchers().get(WhisperingSnitchWatcher.class.getSimpleName());
|
||||
return watcher != null && watcher.getTimesSurveiled(getControllerId()) == 1;
|
||||
if (event.getPlayerId().equals(getControllerId())) {
|
||||
WhisperingSnitchWatcher watcher = (WhisperingSnitchWatcher) game.getState().getWatchers().get(WhisperingSnitchWatcher.class.getSimpleName());
|
||||
return watcher != null && watcher.getTimesSurveiled(getControllerId()) == 1;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue