From 5253f90284f50b8fbb2cb9730f435b825087b0d5 Mon Sep 17 00:00:00 2001 From: swordshine Date: Sat, 22 Jun 2013 05:53:51 +0000 Subject: [PATCH] - Fixed Reveal effect --- res/cardsfolder/c/chancellor_of_the_annex.txt | 5 +++-- res/cardsfolder/c/chancellor_of_the_dross.txt | 2 +- res/cardsfolder/c/chancellor_of_the_forge.txt | 2 +- res/cardsfolder/c/chancellor_of_the_spires.txt | 2 +- res/cardsfolder/c/chancellor_of_the_tangle.txt | 2 +- src/main/java/forge/card/ability/effects/RevealEffect.java | 2 +- 6 files changed, 8 insertions(+), 7 deletions(-) diff --git a/res/cardsfolder/c/chancellor_of_the_annex.txt b/res/cardsfolder/c/chancellor_of_the_annex.txt index 2d7fec26884..e02127d7a73 100644 --- a/res/cardsfolder/c/chancellor_of_the_annex.txt +++ b/res/cardsfolder/c/chancellor_of_the_annex.txt @@ -4,8 +4,9 @@ Types:Creature Angel PT:5/6 Text:You may reveal this card from your opening hand. If you do, when each opponent casts his or her first spell of the game, counter that spell unless that player pays 1. K:Flying -K:MayEffectFromOpeningHand:CounterFirstSpellEffect -SVar:CounterFirstSpellEffect:AB$ RepeatEach | Cost$ 0 | RepeatPlayers$ Player.Opponent | RepeatSubAbility$ DBEffect +K:MayEffectFromOpeningHand:RevealCard +SVar:RevealCard:AB$ Reveal | Cost$ 0 | RevealDefined$ Self | SubAbility$ CounterFirstSpellEffect | SpellDescription$ You may reveal this card from your opening hand. If you do, when each opponent casts his or her first spell of the game, counter that spell unless that player pays 1. +SVar:CounterFirstSpellEffect:DB$ RepeatEach | RepeatPlayers$ Player.Opponent | RepeatSubAbility$ DBEffect SVar:DBEffect:DB$ Effect | Triggers$ TrigCounter | SVars$ TrigCounterSpell,RemoveEffect,SpellsNeedExtraManaEffect | EffectOwner$ Player.IsRemembered | Duration$ Permanent SVar:TrigCounter:Mode$ SpellCast | ValidCard$ Card | ValidActivatingPlayer$ You | Execute$ TrigCounterSpell | OneOff$ True | TriggerZones$ Command | TriggerDescription$ Whenever an opponent casts a spell for the first time, counter that spell unless that player pays 1. SVar:TrigCounterSpell:AB$ Counter | Cost$ 0 | Defined$ TriggeredSpellAbility | UnlessCost$ 1 | UnlessPayer$ You | SubAbility$ RemoveEffect diff --git a/res/cardsfolder/c/chancellor_of_the_dross.txt b/res/cardsfolder/c/chancellor_of_the_dross.txt index b16541c648b..1001b3a5d34 100644 --- a/res/cardsfolder/c/chancellor_of_the_dross.txt +++ b/res/cardsfolder/c/chancellor_of_the_dross.txt @@ -6,7 +6,7 @@ PT:6/6 K:MayEffectFromOpeningHand:RevealCard K:Flying K:Lifelink -SVar:RevealCard:AB$ Reveal | Cost$ 0 | Defined$ Self | SubAbility$ DrainOnUpkeep | SpellDescription$ You may reveal this card from your opening hand. If you do, at the beginning of the first upkeep, each opponent loses 3 life, then you gain life equal to the life lost this way. +SVar:RevealCard:AB$ Reveal | Cost$ 0 | RevealDefined$ Self | SubAbility$ DrainOnUpkeep | SpellDescription$ You may reveal this card from your opening hand. If you do, at the beginning of the first upkeep, each opponent loses 3 life, then you gain life equal to the life lost this way. SVar:DrainOnUpkeep:DB$ Effect | Cost$ 0 | Triggers$ TrigDrain | SVars$ DrainLife,GainLife,RemoveMe,AFLifeLost | Name$ Chancellor of the Dross effect SVar:TrigDrain:Mode$ Phase | Phase$ Upkeep | Execute$ DrainLife | TriggerDescription$ At the beginning of the first upkeep, each opponent loses 3 life, then you gain life equal to the life lost this way. SVar:DrainLife:AB$ LoseLife | Cost$ 0 | Defined$ Player.Opponent | LifeAmount$ 3 | SubAbility$ GainLife diff --git a/res/cardsfolder/c/chancellor_of_the_forge.txt b/res/cardsfolder/c/chancellor_of_the_forge.txt index 70db6fa602e..a23cf061e2e 100644 --- a/res/cardsfolder/c/chancellor_of_the_forge.txt +++ b/res/cardsfolder/c/chancellor_of_the_forge.txt @@ -7,7 +7,7 @@ T:Mode$ ChangesZone | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ SVar:EffMassToken:AB$ Token | Cost$ 0 | TokenAmount$ X | TokenOwner$ You | TokenName$ Goblin | TokenTypes$ Creature,Goblin | TokenColors$ Red | TokenPower$ 1 | TokenToughness$ 1 | TokenKeywords$ Haste | References$ X SVar:X:Count$Valid Creature.YouCtrl K:MayEffectFromOpeningHand:RevealCard -SVar:RevealCard:AB$ Reveal | Cost$ 0 | Defined$ Self | SubAbility$ TokenOnUpkeep | SpellDescription$ You may reveal this card from your opening hand. If you do, at the beginning of the first upkeep, put a 1/1 red Goblin creature token with haste onto the battlefield. +SVar:RevealCard:AB$ Reveal | Cost$ 0 | RevealDefined$ Self | SubAbility$ TokenOnUpkeep | SpellDescription$ You may reveal this card from your opening hand. If you do, at the beginning of the first upkeep, put a 1/1 red Goblin creature token with haste onto the battlefield. SVar:TokenOnUpkeep:DB$ Effect | Triggers$ TrigToken | SVars$ EffToken,RemoveMe | Name$ Chancellor of the Forge effect | SpellDescription$ You may reveal this card from your opening hand. If you do, at the beginning of the first upkeep, put a 1/1 red Goblin creature token with haste onto the battlefield. SVar:TrigToken:Mode$ Phase | Phase$ Upkeep | Execute$ EffToken | TriggerDescription$ At the beginning of the first upkeep, put a 1/1 red Goblin creature token with haste onto the battlefield. SVar:EffToken:AB$ Token | Cost$ 0 | TokenAmount$ 1 | TokenOwner$ You | TokenName$ Goblin | TokenTypes$ Creature,Goblin | TokenColors$ Red | TokenPower$ 1 | TokenToughness$ 1 | TokenKeywords$ Haste | SubAbility$ RemoveMe diff --git a/res/cardsfolder/c/chancellor_of_the_spires.txt b/res/cardsfolder/c/chancellor_of_the_spires.txt index 6611381d78a..587d6b5967f 100644 --- a/res/cardsfolder/c/chancellor_of_the_spires.txt +++ b/res/cardsfolder/c/chancellor_of_the_spires.txt @@ -5,7 +5,7 @@ Text:You may reveal this card from your opening hand. If you do, at the beginnin PT:5/7 K:MayEffectFromOpeningHand:RevealCard K:Flying -SVar:RevealCard:AB$ Reveal | Cost$ 0 | Defined$ Self | SubAbility$ DrainOnUpkeep | SpellDescription$ You may reveal this card from your opening hand. If you do, at the beginning of the first upkeep, each opponent puts the top seven cards of his or her library into his or her graveyard. +SVar:RevealCard:AB$ Reveal | Cost$ 0 | RevealDefined$ Self | SubAbility$ DrainOnUpkeep | SpellDescription$ You may reveal this card from your opening hand. If you do, at the beginning of the first upkeep, each opponent puts the top seven cards of his or her library into his or her graveyard. SVar:DrainOnUpkeep:DB$ Effect | Triggers$ TrigMill | SVars$ Mill,RemoveMe | Name$ Chancellor of the Spires effect SVar:TrigMill:Mode$ Phase | Phase$ Upkeep | Execute$ Mill | TriggerDescription$ At the beginning of the first upkeep, each opponent puts the top seven cards of his or her library into his or her graveyard. SVar:Mill:AB$ Mill | Cost$ 0 | NumCards$ 7 | Defined$ Player.Opponent | SubAbility$ RemoveMe diff --git a/res/cardsfolder/c/chancellor_of_the_tangle.txt b/res/cardsfolder/c/chancellor_of_the_tangle.txt index a8f13544ffd..6e3fa3e4bb1 100644 --- a/res/cardsfolder/c/chancellor_of_the_tangle.txt +++ b/res/cardsfolder/c/chancellor_of_the_tangle.txt @@ -6,7 +6,7 @@ PT:6/7 K:MayEffectFromOpeningHand:ManaOnMain K:Vigilance K:Reach -SVar:RevealCard:AB$ Reveal | Cost$ 0 | Defined$ Self | SubAbility$ ManaOnMain | SpellDescription$ You may reveal this card from your opening hand. If you do, at the beginning of your first main phase, add G to your mana pool. +SVar:RevealCard:AB$ Reveal | Cost$ 0 | RevealDefined$ Self | SubAbility$ ManaOnMain | SpellDescription$ You may reveal this card from your opening hand. If you do, at the beginning of your first main phase, add G to your mana pool. SVar:ManaOnMain:DB$ Effect | Triggers$ TrigMana | SVars$ EffMana,RemoveMe | Duration$ Permanent | Name$ Chancellor of the Tangle effect SVar:TrigMana:Mode$ Phase | Phase$ Main1 | ValidPlayer$ You | Execute$ EffMana | TriggerDescription$ At the beginning of your first main phase, add G to your mana pool. SVar:EffMana:AB$ Mana | Cost$ 0 | Produced$ G | SubAbility$ RemoveMe diff --git a/src/main/java/forge/card/ability/effects/RevealEffect.java b/src/main/java/forge/card/ability/effects/RevealEffect.java index f2ce0b5e700..4301ad939e9 100644 --- a/src/main/java/forge/card/ability/effects/RevealEffect.java +++ b/src/main/java/forge/card/ability/effects/RevealEffect.java @@ -46,7 +46,7 @@ public class RevealEffect extends SpellAbilityEffect { revealed.add(Aggregates.random(cardsInHand)); } - } else if (sa.hasParam("Defined")) { + } else if (sa.hasParam("RevealDefined")) { revealed.addAll(AbilityUtils.getDefinedCards(sa.getSourceCard(), sa.getParam("Defined"), sa)); } else { List valid = new ArrayList(cardsInHand);