- Triggers will now accept a second suit of isPresent: "isPresent2", "PresentZone2", etc.

- Fixed Quest for the Nihil Stone.
This commit is contained in:
jendave
2011-08-06 22:08:13 +00:00
parent 193d84246e
commit 176f584cfd
2 changed files with 49 additions and 2 deletions

View File

@@ -3,9 +3,9 @@ ManaCost:B
Types:Enchantment
Text:no text
T:Mode$ Discarded | ValidCard$ Card.YouDontCtrl | TriggerZones$ Battlefield | OptionalDecider$ You | Execute$ TrigPutCounter | TriggerDescription$ Whenever an opponent discards a card, you may put a quest counter on CARDNAME.
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ Opponent | IsPresent$ Card.Self+countersGE2QUEST | Execute$ TrigLoseLife | TriggerZones$ Battlefield | OptionalDecider$ You | TriggerDescription$ At the beginning of each opponent's upkeep, if that player has no cards in hand and CARDNAME has two or more quest counters on it, you may have that player lose 5 life.
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ Opponent | IsPresent$ Card | PresentZone$ Hand | PresentPlayer$ Opponent | PresentCompare$ EQ0 | IsPresent2$ Card.Self+countersGE2QUEST | Execute$ TrigLoseLife | TriggerZones$ Battlefield | OptionalDecider$ You | TriggerDescription$ At the beginning of each opponent's upkeep, if that player has no cards in hand and CARDNAME has two or more quest counters on it, you may have that player lose 5 life.
SVar:TrigPutCounter:AB$PutCounter | Cost$ 0 | Defined$ Self | CounterType$ QUEST | CounterNum$ 1
SVar:TrigLoseLife:AB$LoseLife | Cost$ 0 | Defined$ Opponent | LifeAmount$ 5 | PresentZone$ Hand | PresentPlayer$ Opponent | PresentCompare$ EQ0
SVar:TrigLoseLife:AB$LoseLife | Cost$ 0 | Defined$ Opponent | LifeAmount$ 5
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/quest_for_the_nihil_stone.jpg
SetInfo:WWK|Rare|http://magiccards.info/scans/en/wwk/64.jpg

View File

@@ -273,9 +273,56 @@ public abstract class Trigger {
}
if (mapParams.containsKey("IsPresent2")){
String sIsPresent = mapParams.get("IsPresent2");
String presentCompare = "GE1";
String presentZone = "Battlefield";
String presentPlayer = "Any";
if(mapParams.containsKey("PresentCompare2"))
{
presentCompare = mapParams.get("PresentCompare2");
}
if(mapParams.containsKey("PresentZone2"))
{
presentZone = mapParams.get("PresentZone2");
}
if(mapParams.containsKey("PresentPlayer2"))
{
presentPlayer = mapParams.get("PresentPlayer2");
}
CardList list = new CardList();
if(presentPlayer.equals("You") || presentPlayer.equals("Any"))
{
list.add(AllZoneUtil.getCardsInZone(presentZone,hostCard.getController()));
}
if(presentPlayer.equals("Opponent") || presentPlayer.equals("Any"))
{
list.add(AllZoneUtil.getCardsInZone(presentZone,hostCard.getController().getOpponent()));
}
list = list.getValidCards(sIsPresent.split(","), hostCard.getController(), hostCard);
int right = 1;
String rightString = presentCompare.substring(2);
if(rightString.equals("X")) {
right = CardFactoryUtil.xCount(hostCard, hostCard.getSVar("X"));
}
else {
right = Integer.parseInt(presentCompare.substring(2));
}
int left = list.size();
if (!Card.compare(left, presentCompare, right))
{
return false;
}
}
return true;
}
public boolean matchesValid(Object o,String[] valids,Card srcCard)
{
if(o instanceof Card)