DiscardEffect: don't reveal to all if effect is just look

This commit is contained in:
tool4EvEr
2022-02-18 22:38:34 +01:00
parent d1210d46c1
commit 2886711f4e
8 changed files with 15 additions and 12 deletions

View File

@@ -238,7 +238,7 @@ public class DiscardEffect extends SpellAbilityEffect {
if (toBeDiscarded.size() > 1) {
toBeDiscarded = GameActionUtil.orderCardsByTheirOwners(game, toBeDiscarded, ZoneType.Graveyard, sa);
}
} else if (mode.equals("RevealYouChoose") || mode.equals("RevealTgtChoose") || mode.equals("TgtChoose")) {
} else if (mode.endsWith("YouChoose") || mode.endsWith("TgtChoose")) {
CardCollectionView dPHand = p.getCardsIn(ZoneType.Hand);
dPHand = CardLists.filter(dPHand, Presets.NON_TOKEN);
if (dPHand.isEmpty())
@@ -253,15 +253,18 @@ public class DiscardEffect extends SpellAbilityEffect {
CardCollection validCards = CardLists.getValidCards(dPHand, valid, source.getController(), source, sa);
Player chooser = p;
if (mode.equals("RevealYouChoose")) {
if (mode.endsWith("YouChoose")) {
chooser = source.getController();
} else if (mode.equals("RevealTgtChoose")) {
} else if (mode.endsWith("TgtChoose")) {
chooser = firstTarget;
}
if (mode.startsWith("Reveal") && p != chooser) {
if (mode.startsWith("Reveal")) {
game.getAction().reveal(dPHand, p);
}
if (mode.startsWith("Look")) {
game.getAction().revealTo(dPHand, chooser);
}
if (!p.canDiscardBy(sa, true)) {
continue;
@@ -276,7 +279,7 @@ public class DiscardEffect extends SpellAbilityEffect {
toBeDiscarded = GameActionUtil.orderCardsByTheirOwners(game, toBeDiscarded, ZoneType.Graveyard, sa);
}
if (mode.startsWith("Reveal") ) {
if (mode.startsWith("Reveal") && p != chooser) {
p.getController().reveal(toBeDiscarded, ZoneType.Hand, p, Localizer.getInstance().getMessage("lblPlayerHasChosenCardsFrom", chooser.getName()));
}
}

View File

@@ -1,7 +1,7 @@
Name:Abandon Hope
ManaCost:X 1 B
Types:Sorcery
A:SP$ Discard | Cost$ X 1 B Discard<X/Card/card> | ValidTgts$ Opponent | Mode$ RevealYouChoose | NumCards$ X | SpellDescription$ Look at target opponent's hand and choose X cards from it. That player discards those cards.
A:SP$ Discard | Cost$ X 1 B Discard<X/Card/card> | ValidTgts$ Opponent | Mode$ LookYouChoose | NumCards$ X | SpellDescription$ Look at target opponent's hand and choose X cards from it. That player discards those cards.
SVar:X:Count$xPaid
AI:RemoveDeck:All
Oracle:As an additional cost to cast this spell, discard X cards.\nLook at target opponent's hand and choose X cards from it. That player discards those cards.

View File

@@ -3,6 +3,6 @@ ManaCost:3 B B
Types:Enchantment
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigPutCounter | OptionalDecider$ You | TriggerDescription$ At the beginning of your upkeep, you may put a verse counter on CARDNAME.
SVar:TrigPutCounter:DB$ PutCounter | Defined$ Self | CounterType$ VERSE | CounterNum$ 1
A:AB$ Discard | Cost$ B Sac<1/CARDNAME> | ValidTgts$ Opponent | Mode$ RevealYouChoose | NumCards$ X | SpellDescription$ Look at target opponent's hand and choose up to X cards from it, where X is the number of verse counters on CARDNAME. That player discards those cards.
A:AB$ Discard | Cost$ B Sac<1/CARDNAME> | ValidTgts$ Opponent | Mode$ LookYouChoose | NumCards$ X | SpellDescription$ Look at target opponent's hand and choose up to X cards from it, where X is the number of verse counters on CARDNAME. That player discards those cards.
SVar:X:Count$CardCounters.VERSE
Oracle:At the beginning of your upkeep, you may put a verse counter on Discordant Dirge.\n{B}, Sacrifice Discordant Dirge: Look at target opponent's hand and choose up to X cards from it, where X is the number of verse counters on Discordant Dirge. That player discards those cards.

View File

@@ -1,5 +1,5 @@
Name:Extortion
ManaCost:3 B B
Types:Sorcery
A:SP$ Discard | Cost$ 3 B B | ValidTgts$ Opponent | Mode$ RevealYouChoose | NumCards$ 2 | SpellDescription$ Look at target player's hand and choose up to two cards from it. That player discards those cards.
A:SP$ Discard | Cost$ 3 B B | ValidTgts$ Opponent | Mode$ LookYouChoose | NumCards$ 2 | SpellDescription$ Look at target player's hand and choose up to two cards from it. That player discards those cards.
Oracle:Look at target player's hand and choose up to two cards from it. That player discards those cards.

View File

@@ -3,6 +3,6 @@ ManaCost:B B
Types:Enchantment
A:AB$ ChangeZone | Cost$ B B | Origin$ Battlefield | Destination$ Hand | SpellDescription$ Return CARDNAME to its owner's hand.
T:Mode$ SpellCast | ValidCard$ Card.Green | ValidActivatingPlayer$ Opponent | TriggerZones$ Battlefield | Execute$ TrigDiscard | OptionalDecider$ You | TriggerDescription$ Whenever an opponent casts a green spell, you may pay {B}{B}. If you do, look at that player's hand and choose a card from it. The player discards that card.
SVar:TrigDiscard:AB$ Discard | Cost$ B B | Defined$ TriggeredActivator | NumCards$ 1 | Mode$ RevealYouChoose
SVar:TrigDiscard:AB$ Discard | Cost$ B B | Defined$ TriggeredActivator | NumCards$ 1 | Mode$ LookYouChoose
AI:RemoveDeck:Random
Oracle:Whenever an opponent casts a green spell, you may pay {B}{B}. If you do, look at that player's hand and choose a card from it. The player discards that card.\n{B}{B}: Return Leshrac's Sigil to its owner's hand.

View File

@@ -1,6 +1,6 @@
Name:Mind Warp
ManaCost:X 3 B
Types:Sorcery
A:SP$ Discard | Cost$ X 3 B | ValidTgts$ Player | Mode$ RevealYouChoose | NumCards$ X | SpellDescription$ Target player reveals their hand. You choose X cards from it. That player discards those cards.
A:SP$ Discard | Cost$ X 3 B | ValidTgts$ Player | Mode$ LookYouChoose | NumCards$ X | SpellDescription$ Target player reveals their hand. You choose X cards from it. That player discards those cards.
SVar:X:Count$xPaid
Oracle:Look at target player's hand and choose X cards from it. That player discards those cards.

View File

@@ -2,5 +2,5 @@ Name:Seer's Vision
ManaCost:2 U B
Types:Enchantment
S:Mode$ Continuous | AffectedZone$ Hand | Affected$ Card.OppOwn | MayLookAt$ Player | Description$ Your opponents play with their hands revealed.
A:AB$ Discard | Cost$ Sac<1/CARDNAME> | ValidTgts$ Player | TgtPrompt$ Select target player. | Mode$ RevealYouChoose | NumCards$ 1 | SorcerySpeed$ True | SpellDescription$ Look at target player's hand and choose a card from it. That player discards that card. Activate only as a sorcery.
A:AB$ Discard | Cost$ Sac<1/CARDNAME> | ValidTgts$ Player | TgtPrompt$ Select target player. | Mode$ LookYouChoose | NumCards$ 1 | SorcerySpeed$ True | SpellDescription$ Look at target player's hand and choose a card from it. That player discards that card. Activate only as a sorcery.
Oracle:Your opponents play with their hands revealed.\nSacrifice Seer's Vision: Look at target player's hand and choose a card from it. That player discards that card. Activate only as a sorcery.

View File

@@ -2,5 +2,5 @@ Name:Thrull Surgeon
ManaCost:1 B
Types:Creature Thrull
PT:1/1
A:AB$ Discard | Cost$ 1 B Sac<1/CARDNAME> | ValidTgts$ Player | TgtPrompt$ Select target player. | Mode$ RevealYouChoose | NumCards$ 1 | SorcerySpeed$ True | SpellDescription$ Look at target player's hand and choose a card from it. That player discards that card. Activate only as a sorcery.
A:AB$ Discard | Cost$ 1 B Sac<1/CARDNAME> | ValidTgts$ Player | TgtPrompt$ Select target player. | Mode$ LookYouChoose | NumCards$ 1 | SorcerySpeed$ True | SpellDescription$ Look at target player's hand and choose a card from it. That player discards that card. Activate only as a sorcery.
Oracle:{1}{B}, Sacrifice Thrull Surgeon: Look at target player's hand and choose a card from it. That player discards that card. Activate only as a sorcery.