mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 18:58:00 +00:00
- 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:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -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/rouse.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_decree.txt svneol=native#text/plain
|
||||
res/cardsfolder/r/royal_falcon.txt svneol=native#text/plain
|
||||
|
||||
14
res/cardsfolder/r/rowen.txt
Normal file
14
res/cardsfolder/r/rowen.txt
Normal 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
|
||||
@@ -7,4 +7,6 @@ A:AB$ Pump | Cost$ tapXType<1/Creature.EnchantedBy/Enchanted Creature> | ValidTg
|
||||
SVar:RemAIDeck:True
|
||||
SVar:Rarity:Common
|
||||
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
|
||||
@@ -34,6 +34,7 @@ import forge.card.mana.ManaPool;
|
||||
import forge.card.spellability.SpellAbility;
|
||||
import forge.card.staticability.StaticAbility;
|
||||
import forge.game.GameLossReason;
|
||||
import forge.gui.GuiUtils;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -1178,15 +1179,30 @@ public abstract class Player extends GameEntity {
|
||||
if (library.size() != 0) {
|
||||
Card c = library.get(0);
|
||||
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);
|
||||
c.setDrawnThisTurn(true);
|
||||
this.numDrawnThisTurn++;
|
||||
drawn.add(c);
|
||||
|
||||
// Run triggers
|
||||
final HashMap<String, Object> runParams = new HashMap<String, Object>();
|
||||
runParams.put("Card", c);
|
||||
runParams.put("Number", numDrawnThisTurn);
|
||||
AllZone.getTriggerHandler().runTrigger("Drawn", runParams);
|
||||
}
|
||||
// lose:
|
||||
|
||||
@@ -52,6 +52,7 @@ public class TriggerDrawn extends Trigger {
|
||||
@Override
|
||||
public final boolean performTest(final java.util.Map<String, Object> runParams2) {
|
||||
final Card draw = ((Card) runParams2.get("Card"));
|
||||
final int number = ((Integer) runParams2.get("Number"));
|
||||
|
||||
if (this.getMapParams().containsKey("ValidCard")) {
|
||||
if (!draw.isValid(this.getMapParams().get("ValidCard").split(","), this.getHostCard().getController(),
|
||||
@@ -59,6 +60,12 @@ public class TriggerDrawn extends Trigger {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (this.getMapParams().containsKey("Number")) {
|
||||
if (number != Integer.parseInt(this.getMapParams().get("Number"))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user