cards: refactor Reveal the first card you draw into Static Trigger

This commit is contained in:
Hans Mackowiak
2019-06-11 05:33:12 +00:00
committed by Michael Kamensky
parent 1c22f8cc60
commit 1b138b11f8
4 changed files with 13 additions and 25 deletions

View File

@@ -1405,24 +1405,6 @@ public class Player extends GameEntity implements Comparable<Player> {
revealed.add(c); revealed.add(c);
} }
if (numDrawnThisTurn == 0) {
boolean reveal = false;
final CardCollectionView cards = getCardsIn(ZoneType.Battlefield);
for (final Card card : cards) {
if (card.hasKeyword("Reveal the first card you draw each turn")
|| (card.hasKeyword("Reveal the first card you draw on each of your turns") && game.getPhaseHandler().isPlayerTurn(this))) {
reveal = true;
break;
}
}
if (reveal) {
game.getAction().reveal(drawn, this, true, "Revealing the first card drawn from ");
if (revealed.contains(c)) {
revealed.remove(c);
}
}
}
setLastDrawnCard(c); setLastDrawnCard(c);
c.setDrawnThisTurn(true); c.setDrawnThisTurn(true);
numDrawnThisTurn++; numDrawnThisTurn++;

View File

@@ -5,11 +5,13 @@ PT:6/5
K:Indestructible K:Indestructible
S:Mode$ Continuous | Affected$ Card.Self | RemoveType$ Creature | RemoveCreatureTypes$ True | CheckSVar$ X | SVarCompare$ LT7 | References$ X | Description$ As long as your devotion to blue and red is less than seven, CARDNAME isn't a creature. S:Mode$ Continuous | Affected$ Card.Self | RemoveType$ Creature | RemoveCreatureTypes$ True | CheckSVar$ X | SVarCompare$ LT7 | References$ X | Description$ As long as your devotion to blue and red is less than seven, CARDNAME isn't a creature.
SVar:X:Count$DevotionDual.Blue.Red SVar:X:Count$DevotionDual.Blue.Red
K:Reveal the first card you draw on each of your turns T:Mode$ Drawn | ValidCard$ Card.YouOwn | Number$ 1 | Static$ True | Execute$ DBReveal | TriggerZones$ Battlefield | PlayerTurn$ True | TriggerDescription$ Reveal the first card you draw on each of your turns. Whenever you reveal a land card this way, draw a card. Whenever you reveal a nonland card this way, CARDNAME deals 3 damage to any target.
T:Mode$ Drawn | ValidCard$ Card.Land+YouCtrl | PlayerTurn$ True | TriggerZones$ Battlefield | Number$ 1 | Execute$ TrigDraw | TriggerDescription$ Whenever you reveal a land card this way, draw a card. SVar:DBReveal:DB$ Reveal | Defined$ You | RevealDefined$ TriggeredCard | RememberRevealed$ True | SubAbility$ DBTriggerLand
SVar:DBTriggerLand:DB$ ImmediateTrigger | ConditionDefined$ Remembered | ConditionPresent$ Card.Land+YouCtrl | SubAbility$ DBTriggerNonLand | Execute$ TrigDraw | TriggerDescription$ Whenever you reveal a land card this way, draw a card.
SVar:DBTriggerNonLand:DB$ ImmediateTrigger | ConditionDefined$ Remembered | ConditionPresent$ Card.nonLand+YouCtrl | SubAbility$ DBCleanup | Execute$ TrigDmg | TriggerDescription$ Whenever you reveal a nonland card this way, CARDNAME deals 3 damage to any target.
SVar:TrigDraw:DB$ Draw | NumCards$ 1 SVar:TrigDraw:DB$ Draw | NumCards$ 1
T:Mode$ Drawn | ValidCard$ Card.nonLand+YouCtrl | PlayerTurn$ True | TriggerZones$ Battlefield | Number$ 1 | Execute$ TrigDmg | TriggerDescription$ Whenever you reveal a nonland card this way, Keranos deals 3 damage to any target.
SVar:TrigDmg:DB$ DealDamage | ValidTgts$ Creature,Player,Planeswalker | TgtPrompt$ Select any target | NumDmg$ 3 SVar:TrigDmg:DB$ DealDamage | ValidTgts$ Creature,Player,Planeswalker | TgtPrompt$ Select any target | NumDmg$ 3
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:BuffedBy:Permanent.Blue,Permanent.Red SVar:BuffedBy:Permanent.Blue,Permanent.Red
SVar:Picture:http://www.wizards.com/global/images/magic/general/keranos_god_of_storms.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/keranos_god_of_storms.jpg
Oracle:Indestructible\nAs long as your devotion to blue and red is less than seven, Keranos isn't a creature.\nReveal the first card you draw on each of your turns. Whenever you reveal a land card this way, draw a card. Whenever you reveal a nonland card this way, Keranos deals 3 damage to any target. Oracle:Indestructible\nAs long as your devotion to blue and red is less than seven, Keranos isn't a creature.\nReveal the first card you draw on each of your turns. Whenever you reveal a land card this way, draw a card. Whenever you reveal a nonland card this way, Keranos deals 3 damage to any target.

View File

@@ -1,8 +1,10 @@
Name:Primitive Etchings Name:Primitive Etchings
ManaCost:2 G G ManaCost:2 G G
Types:Enchantment Types:Enchantment
K:Reveal the first card you draw each turn T:Mode$ Drawn | ValidCard$ Card.YouOwn | Number$ 1 | Static$ True | Execute$ DBReveal | TriggerZones$ Battlefield | TriggerDescription$ Reveal the first card you draw each turn. Whenever you reveal a creature card this way, draw a card.
T:Mode$ Drawn | ValidCard$ Creature.YouCtrl | TriggerZones$ Battlefield | Number$ 1 | Execute$ TrigDraw | TriggerDescription$ Whenever you reveal a creature card this way, draw a card. SVar:DBReveal:DB$ Reveal | Defined$ You | RevealDefined$ TriggeredCard | RememberRevealed$ True | SubAbility$ DBTrigger
SVar:DBTrigger:DB$ ImmediateTrigger | ConditionDefined$ Remembered | ConditionPresent$ Creature+YouCtrl | SubAbility$ DBCleanup | Execute$ TrigDraw | TriggerDescription$ Whenever you reveal a creature card this way, draw a card.
SVar:TrigDraw:DB$Draw | NumCards$ 1 SVar:TrigDraw:DB$Draw | NumCards$ 1
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:Picture:http://www.wizards.com/global/images/magic/general/primitive_etchings.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/primitive_etchings.jpg
Oracle:Reveal the first card you draw each turn. Whenever you reveal a creature card this way, draw a card. Oracle:Reveal the first card you draw each turn. Whenever you reveal a creature card this way, draw a card.

View File

@@ -1,8 +1,10 @@
Name:Rowen Name:Rowen
ManaCost:2 G G ManaCost:2 G G
Types:Enchantment Types:Enchantment
K:Reveal the first card you draw each turn T:Mode$ Drawn | ValidCard$ Card.YouOwn | Number$ 1 | Static$ True | Execute$ DBReveal | TriggerZones$ Battlefield | TriggerDescription$ Reveal the first card you draw each turn. Whenever you reveal a basic land card this way, draw a card.
T:Mode$ Drawn | ValidCard$ Land.Basic+YouCtrl | TriggerZones$ Battlefield | Number$ 1 | Execute$ TrigDraw | TriggerDescription$ Whenever you reveal a basic land card this way, draw a card. SVar:DBReveal:DB$ Reveal | Defined$ You | RevealDefined$ TriggeredCard | RememberRevealed$ True | SubAbility$ DBTrigger
SVar:DBTrigger:DB$ ImmediateTrigger | ConditionDefined$ Remembered | ConditionPresent$ Land.Basic+YouCtrl | SubAbility$ DBCleanup | Execute$ TrigDraw | TriggerDescription$ Whenever you reveal a basic land card this way, draw a card.
SVar:TrigDraw:DB$Draw | NumCards$ 1 SVar:TrigDraw:DB$Draw | NumCards$ 1
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:Picture:http://www.wizards.com/global/images/magic/general/rowen.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/rowen.jpg
Oracle:Reveal the first card you draw each turn. Whenever you reveal a basic land card this way, draw a card. Oracle:Reveal the first card you draw each turn. Whenever you reveal a basic land card this way, draw a card.