*Added Triggermode "Drawn".

*Updated to trigger
	Mind's Eye
	Nether Traitor
	Nettle Sentinel
	Nikko-Onna
	Niv Mizzet, the Firemind
This commit is contained in:
jendave
2011-08-06 15:51:49 +00:00
parent 7d733328c1
commit 898b2487a2
9 changed files with 53 additions and 8 deletions

1
.gitattributes vendored
View File

@@ -6837,6 +6837,7 @@ src/forge/Trigger_Blocks.java -text svneol=native#text/plain
src/forge/Trigger_ChangesZone.java -text svneol=native#text/plain
src/forge/Trigger_DamageDone.java -text svneol=native#text/plain
src/forge/Trigger_Discarded.java -text svneol=native#text/plain
src/forge/Trigger_Drawn.java -text svneol=native#text/plain
src/forge/Trigger_LifeGained.java -text svneol=native#text/plain
src/forge/Trigger_LifeLost.java -text svneol=native#text/plain
src/forge/Trigger_Phase.java -text svneol=native#text/plain

View File

@@ -2,7 +2,8 @@ Name:Mind's Eye
ManaCost:5
Types:Artifact
Text:no text
K:WheneverKeyword:DrawCard:ControllingPlayer_Opponent:Play:DrawCards/1:ControllingPlayer_Self:ASAP:PayMana/1:No Special Condition:Whenever an opponent draws a card, you may pay 1. If you do, draw a card.
T:Mode$ Drawn | ValidCard$ Card.YouDontCtrl | TriggerZones$ Battlefield | Optional$ True | Execute$ TrigDraw | TriggerDescription$ Whenever an opponent draws a card, you may pay 1. If you do, draw a card.
SVar:TrigDraw:AB$Draw | Cost$ 1 | Defined$ You | NumCards$ 1
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/minds_eye.jpg
SetInfo:MRD|Rare|http://magiccards.info/scans/en/mi/205.jpg

View File

@@ -5,7 +5,8 @@ Text:no text
PT:1/1
K:Haste
K:Shadow
K:WheneverKeyword:PermanentIntoGraveyard:Type/Creature:Graveyard:MoveFrom-Graveyard-Play:Self:ASAP:PayMana/B:Initiator - Other than Self!Initiator - OwnedByController:Whenever another creature is put into your graveyard from the battlefield, you may pay B. If you do, return Nether Traitor from your graveyard to the battlefield.
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Creature.YouCtrl+Other | Optional$ True | TriggerZones$ Graveyard | Execute$ TrigReturn | TriggerDescription$ Whenever another creature is put into your graveyard from the battlefield, you may pay B. If you do, return CARDNAME from your graveyard to the battlefield.
SVar:TrigReturn:AB$ChangeZone | Cost$ B | Defined$ Self | Origin$ Graveyard | Destination$ Battlefield
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/nether_traitor.jpg
SetInfo:TSP|Rare|http://magiccards.info/scans/en/ts/120.jpg

View File

@@ -4,7 +4,8 @@ Types:Creature Elf Warrior
Text:no text
PT:2/2
K:CARDNAME doesn't untap during your untap step.
K:WheneverKeyword:CastSpell/Controller:Color/green:Play:UntapPermanent:Self:ASAP:Yes_No:No Special Condition:Whenever you cast a green spell, you may untap Nettle Sentinel.
T:Mode$ SpellCast | ValidCard$ Card.Green+YouCtrl | TriggerZones$ Battlefield | Optional$ True | Execute$ TrigUntap | TriggerDescription$ Whenever you cast a green spell, you may untap CARDNAME.
SVar:TrigUntap:AB$Untap | Cost$ 0 | Defined$ Self
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/nettle_sentinel.jpg
SetInfo:EVE|Common|http://magiccards.info/scans/en/eve/71.jpg

View File

@@ -1,10 +1,12 @@
Name:Nikko-Onna
ManaCost:2 W
Types:Creature Spirit
Text:When Nikko-Onna enters the battlefield, destroy target enchantment.
Text:no text
PT:2/2
K:etbDestroyTgt:Enchantment
K:WheneverKeyword:CastSpell/Controller:OneTypeOfMany/Arcane/Spirit:Play:MoveFrom-Play-Hand:Self:ASAP:Yes_No:No Special Condition:Whenever you cast a Spirit or Arcane spell, you may return Nikko-Onna to its owner's hand.
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | Execute$ TrigDestroy | TriggerDescription$ When CARDNAME enters the battlefield, destroy target enchantment.
T:Mode$ SpellCast | ValidCard$ Spirit.YouCtrl,Arcane.YouCtrl | TriggerZones$ Battlefield | Optional$ True | Execute$ TrigReturn | TriggerDescription$ Whenever you cast a Spirit or Arcane spell, you may return CARDNAME to its owner's hand.
SVar:TrigReturn:AB$ChangeZone | Cost$ 0 | Defined$ Self | Origin$ Battlefield | Destination$ Hand
SVar:TrigDestroy:AB$Destroy | Cost$ 0 | ValidTgts$ Enchantment | TgtPrompt$ Choose target enchantment
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/nikko_onna.jpg
SetInfo:SOK|Uncommon|http://magiccards.info/scans/en/sok/21.jpg

View File

@@ -1,11 +1,12 @@
Name:Niv-Mizzet, the Firemind
ManaCost:2 U U R R
ManaCost:0
Types:Legendary Creature Dragon Wizard
Text:no text
PT:4/4
K:Flying
A:AB$Draw | Cost$ T | NumCards$ 1 | SpellDescription$ Draw a card.
K:WheneverKeyword:DrawCard:ControllingPlayer_Self:Play:Damage/1:InputType - CreatureORPlayer:ASAP:No_Condition:SingleTarget:Whenever you draw a card, Niv-Mizzet, the Firemind deals 1 damage to target creature or player
T:Mode$ Drawn | ValidCard$ Card.YouCtrl | TriggerZones$ Battlefield | Execute$ TrigDealDamage | TriggerDescription$ Whenever you draw a card, CARDNAME deals 1 damage to target creature or player.
SVar:TrigDealDamage:AB$DealDamage | Cost$ 0 | Tgt$ TgtCP | NumDmg$ 1
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/niv_mizzet_the_firemind.jpg
SetInfo:GPT|Rare|http://magiccards.info/scans/en/gp/123.jpg

View File

@@ -556,6 +556,11 @@ public abstract class Player extends MyObservable{
numDrawnThisTurn++;
GameActionUtil.executeDrawCardTriggeredEffects(this);
//Run triggers
HashMap<String,Object> runParams = new HashMap<String,Object>();
runParams.put("Drawn", c);
AllZone.TriggerHandler.runTrigger("Drawn", runParams);
}
//lose:
else if (!Constant.Runtime.DevMode[0] || AllZone.Display.canLoseByDecking()) {

View File

@@ -45,6 +45,10 @@ public class TriggerHandler {
{
ret = new Trigger_Discarded(mapParams,host);
}
else if(mode.equals("Drawn"))
{
ret = new Trigger_Drawn(mapParams,host);
}
else if(mode.equals("LifeGained"))
{
ret = new Trigger_LifeGained(mapParams,host);

View File

@@ -0,0 +1,29 @@
package forge;
import java.util.HashMap;
public class Trigger_Drawn extends Trigger {
public Trigger_Drawn(HashMap<String, String> params, Card host) {
super(params, host);
}
@Override
public boolean performTest(HashMap<String, Object> runParams) {
Card draw = ((Card)runParams.get("Drawn"));
if(mapParams.containsKey("ValidCard"))
{
if(!draw.isValidCard(mapParams.get("ValidCard").split(","), hostCard.getController(), hostCard))
{
return false;
}
}
return true;
}
@Override
public Trigger getCopy() {
return new Trigger_Drawn(mapParams,hostCard);
}
}