- Added the keyword Reveal the first card you draw each turn.

- Added the optional parameter "Number" to the Drawn trigger.
- Added Rowen.
This commit is contained in:
Sloth
2011-12-19 22:12:43 +00:00
parent f17a1e0513
commit 0a237d08f7
5 changed files with 41 additions and 1 deletions

1
.gitattributes vendored
View File

@@ -6940,6 +6940,7 @@ res/cardsfolder/r/rotting_rats.txt svneol=native#text/plain
res/cardsfolder/r/roughshod_mentor.txt svneol=native#text/plain res/cardsfolder/r/roughshod_mentor.txt svneol=native#text/plain
res/cardsfolder/r/rouse.txt svneol=native#text/plain res/cardsfolder/r/rouse.txt svneol=native#text/plain
res/cardsfolder/r/rowan_treefolk.txt svneol=native#text/plain res/cardsfolder/r/rowan_treefolk.txt svneol=native#text/plain
res/cardsfolder/r/rowen.txt -text
res/cardsfolder/r/royal_assassin.txt svneol=native#text/plain res/cardsfolder/r/royal_assassin.txt svneol=native#text/plain
res/cardsfolder/r/royal_decree.txt svneol=native#text/plain res/cardsfolder/r/royal_decree.txt svneol=native#text/plain
res/cardsfolder/r/royal_falcon.txt svneol=native#text/plain res/cardsfolder/r/royal_falcon.txt svneol=native#text/plain

View File

@@ -0,0 +1,14 @@
Name:Rowen
ManaCost:2 G G
Types:Enchantment
Text:no text
K:Reveal the first card you draw each turn
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:TrigDraw:AB$Draw | Cost$ 0 | NumCards$ 1
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/rowen.jpg
SetInfo:VIS|Rare|http://magiccards.info/scans/en/vi/69.jpg
SetInfo:6ED|Rare|http://magiccards.info/scans/en/6e/250.jpg
SetInfo:7ED|Rare|http://magiccards.info/scans/en/7e/266.jpg
Oracle:Reveal the first card you draw each turn. Whenever you reveal a basic land card this way, draw a card.
End

View File

@@ -7,4 +7,6 @@ A:AB$ Pump | Cost$ tapXType<1/Creature.EnchantedBy/Enchanted Creature> | ValidTg
SVar:RemAIDeck:True SVar:RemAIDeck:True
SVar:Rarity:Common SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/veterans_voice.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/veterans_voice.jpg
SetInfo:ALL|Common|http://magiccards.info/scans/en/ai/123.jpg
Oracle:Enchant creature you control\nTap enchanted creature: Target creature other than the creature tapped this way gets +2/+1 until end of turn. Activate this ability only if enchanted creature is untapped.
End End

View File

@@ -34,6 +34,7 @@ import forge.card.mana.ManaPool;
import forge.card.spellability.SpellAbility; import forge.card.spellability.SpellAbility;
import forge.card.staticability.StaticAbility; import forge.card.staticability.StaticAbility;
import forge.game.GameLossReason; import forge.game.GameLossReason;
import forge.gui.GuiUtils;
/** /**
* <p> * <p>
@@ -1178,15 +1179,30 @@ public abstract class Player extends GameEntity {
if (library.size() != 0) { if (library.size() != 0) {
Card c = library.get(0); Card c = library.get(0);
c = AllZone.getGameAction().moveToHand(c); c = AllZone.getGameAction().moveToHand(c);
drawn.add(c);
if (numDrawnThisTurn == 0 && this.isComputer()) {
boolean reveal = false;
CardList cards = this.getCardsIn(Zone.Battlefield);
for (Card card : cards) {
if (card.hasKeyword("Reveal the first card you draw each turn")) {
reveal = true;
break;
}
}
if (reveal) {
GuiUtils.getChoice("Revealing the first card drawn", drawn.toArray());
}
}
this.setLastDrawnCard(c); this.setLastDrawnCard(c);
c.setDrawnThisTurn(true); c.setDrawnThisTurn(true);
this.numDrawnThisTurn++; this.numDrawnThisTurn++;
drawn.add(c);
// Run triggers // Run triggers
final HashMap<String, Object> runParams = new HashMap<String, Object>(); final HashMap<String, Object> runParams = new HashMap<String, Object>();
runParams.put("Card", c); runParams.put("Card", c);
runParams.put("Number", numDrawnThisTurn);
AllZone.getTriggerHandler().runTrigger("Drawn", runParams); AllZone.getTriggerHandler().runTrigger("Drawn", runParams);
} }
// lose: // lose:

View File

@@ -52,6 +52,7 @@ public class TriggerDrawn extends Trigger {
@Override @Override
public final boolean performTest(final java.util.Map<String, Object> runParams2) { public final boolean performTest(final java.util.Map<String, Object> runParams2) {
final Card draw = ((Card) runParams2.get("Card")); final Card draw = ((Card) runParams2.get("Card"));
final int number = ((Integer) runParams2.get("Number"));
if (this.getMapParams().containsKey("ValidCard")) { if (this.getMapParams().containsKey("ValidCard")) {
if (!draw.isValid(this.getMapParams().get("ValidCard").split(","), this.getHostCard().getController(), if (!draw.isValid(this.getMapParams().get("ValidCard").split(","), this.getHostCard().getController(),
@@ -59,6 +60,12 @@ public class TriggerDrawn extends Trigger {
return false; return false;
} }
} }
if (this.getMapParams().containsKey("Number")) {
if (number != Integer.parseInt(this.getMapParams().get("Number"))) {
return false;
}
}
return true; return true;
} }