mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
*Added "ThisTurnEntered" mode to Count$. It lets you access how many cards of any type were put into a certain zone this turn (and from where,if that needs limiting)
Examples: SVar:X:Count$ThisTurnEntered Graveyard Card = Returns the number of cards put into a graveyard from anywhere this turn.
SVar:X:Count$ThisTurnEntered Exile from Battlefield Creature = Returns the number of creatures exiled from the battlefield this turn.
The count is reset on end of turn.
*Converted all the Zuberas to script only.
*Converted Caller of the Claw to script only.
*Fixed Khabal Ghoul and Scavenging Ghoul up properly.
*Added
Asmira, Holy Avenger
Flesh Allergy
Urborg Justice
This commit is contained in:
3
.gitattributes
vendored
3
.gitattributes
vendored
@@ -362,6 +362,7 @@ res/cardsfolder/ashenmoor_liege.txt svneol=native#text/plain
|
|||||||
res/cardsfolder/ashes_to_ashes.txt -text svneol=native#text/plain
|
res/cardsfolder/ashes_to_ashes.txt -text svneol=native#text/plain
|
||||||
res/cardsfolder/ashnods_altar.txt -text svneol=native#text/plain
|
res/cardsfolder/ashnods_altar.txt -text svneol=native#text/plain
|
||||||
res/cardsfolder/ashnods_transmogrant.txt -text svneol=native#text/plain
|
res/cardsfolder/ashnods_transmogrant.txt -text svneol=native#text/plain
|
||||||
|
res/cardsfolder/asmira_holy_avenger.txt -text svneol=native#text/plain
|
||||||
res/cardsfolder/aspect_of_mongoose.txt -text svneol=native#text/plain
|
res/cardsfolder/aspect_of_mongoose.txt -text svneol=native#text/plain
|
||||||
res/cardsfolder/aspect_of_wolf.txt svneol=native#text/plain
|
res/cardsfolder/aspect_of_wolf.txt svneol=native#text/plain
|
||||||
res/cardsfolder/assassinate.txt -text svneol=native#text/plain
|
res/cardsfolder/assassinate.txt -text svneol=native#text/plain
|
||||||
@@ -2335,6 +2336,7 @@ res/cardsfolder/fleeting_aven.txt -text svneol=native#text/plain
|
|||||||
res/cardsfolder/fleeting_distraction.txt -text svneol=native#text/plain
|
res/cardsfolder/fleeting_distraction.txt -text svneol=native#text/plain
|
||||||
res/cardsfolder/fleeting_image.txt -text svneol=native#text/plain
|
res/cardsfolder/fleeting_image.txt -text svneol=native#text/plain
|
||||||
res/cardsfolder/flensermite.txt -text svneol=native#text/plain
|
res/cardsfolder/flensermite.txt -text svneol=native#text/plain
|
||||||
|
res/cardsfolder/flesh_allergy.txt -text svneol=native#text/plain
|
||||||
res/cardsfolder/flesh_eater_imp.txt -text svneol=native#text/plain
|
res/cardsfolder/flesh_eater_imp.txt -text svneol=native#text/plain
|
||||||
res/cardsfolder/fleshbag_marauder.txt -text svneol=native#text/plain
|
res/cardsfolder/fleshbag_marauder.txt -text svneol=native#text/plain
|
||||||
res/cardsfolder/fleshformer.txt -text svneol=native#text/plain
|
res/cardsfolder/fleshformer.txt -text svneol=native#text/plain
|
||||||
@@ -7118,6 +7120,7 @@ res/cardsfolder/ur_golems_eye.txt -text svneol=native#text/plain
|
|||||||
res/cardsfolder/urborg_drake.txt -text svneol=native#text/plain
|
res/cardsfolder/urborg_drake.txt -text svneol=native#text/plain
|
||||||
res/cardsfolder/urborg_elf.txt -text svneol=native#text/plain
|
res/cardsfolder/urborg_elf.txt -text svneol=native#text/plain
|
||||||
res/cardsfolder/urborg_emissary.txt -text svneol=native#text/plain
|
res/cardsfolder/urborg_emissary.txt -text svneol=native#text/plain
|
||||||
|
res/cardsfolder/urborg_justice.txt -text svneol=native#text/plain
|
||||||
res/cardsfolder/urborg_mindsucker.txt -text svneol=native#text/plain
|
res/cardsfolder/urborg_mindsucker.txt -text svneol=native#text/plain
|
||||||
res/cardsfolder/urborg_phantom.txt -text svneol=native#text/plain
|
res/cardsfolder/urborg_phantom.txt -text svneol=native#text/plain
|
||||||
res/cardsfolder/urborg_shambler.txt -text svneol=native#text/plain
|
res/cardsfolder/urborg_shambler.txt -text svneol=native#text/plain
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
Name:Ashen-Skin Zubera
|
Name:Ashen-Skin Zubera
|
||||||
ManaCost:1 B
|
ManaCost:1 B
|
||||||
Types:Creature Zubera Spirit
|
Types:Creature Zubera Spirit
|
||||||
Text:When Ashen-Skin Zubera is put into a graveyard from play, target opponent discards a card for each Zubera put into a graveyard from play this turn.
|
Text:no text
|
||||||
|
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | Execute$ TrigDiscard | TriggerDescription$ When CARDNAME is put into a graveyard from the battlefield, target opponent discards a card for each Zubera put into a graveyard from the battlefield this turn.
|
||||||
|
SVar:TrigDiscard:AB$Discard | Cost$ 0 | ValidTgts$ Opponent | NumCards$ X | Mode$ TgtChoose
|
||||||
|
SVar:X:Count$ThisTurnEntered Graveyard from Battlefield Zubera
|
||||||
PT:1/2
|
PT:1/2
|
||||||
SVar:Rarity:Common
|
SVar:Rarity:Common
|
||||||
SVar:Picture:http://resources.wizards.com/magic/cards/chk/en-us/card80509.jpg
|
SVar:Picture:http://resources.wizards.com/magic/cards/chk/en-us/card80509.jpg
|
||||||
|
|||||||
12
res/cardsfolder/asmira_holy_avenger.txt
Normal file
12
res/cardsfolder/asmira_holy_avenger.txt
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
Name:Asmira, Holy Avenger
|
||||||
|
ManaCost:2 G W
|
||||||
|
Types:Legendary Creature Human Cleric
|
||||||
|
Text:no text
|
||||||
|
PT:2/3
|
||||||
|
K:Flying
|
||||||
|
T:Mode$ Phase | Phase$ End of Turn | TriggerZones$ Battlefield | Execute$ TrigPutCounter | TriggerDescription$ At the beginning of each end step, put a +1/+1 counter on CARDNAME for each creature put into a graveyard from the battlefield this turn.
|
||||||
|
SVar:TrigPutCounter:AB$PutCounter | Cost$ 0 | Defined$ Self | CounterType$ P1P1 | CounterNum$ X
|
||||||
|
SVar:X:Count$ThisTurnEntered Graveyard from Battlefield Creature.YouCtrl
|
||||||
|
SVar:Rarity:Rare
|
||||||
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/asmira_holy_avenger.jpg
|
||||||
|
End
|
||||||
@@ -1,9 +1,12 @@
|
|||||||
Name:Caller of the Claw
|
Name:Caller of the Claw
|
||||||
ManaCost:2 G
|
ManaCost:2 G
|
||||||
Types:Creature Elf
|
Types:Creature Elf
|
||||||
Text:When CARDNAME enters the battlefield, put a 2/2 green Bear creature token onto the battlefield for each nontoken creature put into your graveyard from the battlefield this turn.
|
Text:no text
|
||||||
PT:2/2
|
PT:2/2
|
||||||
K:Flash
|
K:Flash
|
||||||
|
T:Mode$ ChangesZone | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigToken | TriggerDescription$ When CARDNAME enters the battlefield, put a 2/2 green Bear creature token onto the battlefield for each nontoken creature put into your graveyard from the battlefield this turn.
|
||||||
|
SVar:TrigToken:AB$Token | Cost$ 0 | TokenAmount$ X | TokenOwner$ You | TokenName$ Bear | TokenTypes$ Creature,Bear | TokenColors$ Green | TokenPower$ 2 | TokenToughness$ 2
|
||||||
|
SVar:X:Count$ThisTurnEntered Graveyard from Battlefield Creature.nonToken+YouCtrl
|
||||||
SVar:Rarity:Uncommon
|
SVar:Rarity:Uncommon
|
||||||
SVar:Picture:http://resources.wizards.com/magic/cards/lgn/en-us/card42187.jpg
|
SVar:Picture:http://resources.wizards.com/magic/cards/lgn/en-us/card42187.jpg
|
||||||
SetInfo:LGN|Rare|http://magiccards.info/scans/en/le/121.jpg
|
SetInfo:LGN|Rare|http://magiccards.info/scans/en/le/121.jpg
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
Name:Dripping-Tongue Zubera
|
Name:Dripping-Tongue Zubera
|
||||||
ManaCost:1 G
|
ManaCost:1 G
|
||||||
Types:Creature Zubera Spirit
|
Types:Creature Zubera Spirit
|
||||||
Text:When CARDNAME is put into a graveyard from the battlefield, put a 1/1 colorless Spirit creature token onto the battlefield for each Zubera put into a graveyard from the battlefield this turn.
|
Text:no text
|
||||||
|
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | Execute$ TrigToken | TriggerDescription$ When CARDNAME is put into a graveyard from the battlefield, put a 1/1 colorless Spirit creature token onto the battlefield for each Zubera put into a graveyard from the battlefield this turn.
|
||||||
|
SVar:TrigToken:AB$Token | Cost$ 0 | TokenOwner$ You | TokenPower$ 1 | TokenToughness$ 1 | TokenColors$ Colorless | TokenName$ Spirit | TokenTypes$ Creature,Spirit | TokenAmount$ X
|
||||||
|
SVar:X:Count$ThisTurnEntered Graveyard from Battlefield Zubera
|
||||||
PT:1/2
|
PT:1/2
|
||||||
SVar:Rarity:Common
|
SVar:Rarity:Common
|
||||||
SVar:Picture:http://resources.wizards.com/magic/cards/chk/en-us/card80511.jpg
|
SVar:Picture:http://resources.wizards.com/magic/cards/chk/en-us/card80511.jpg
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
Name:Ember-Fist Zubera
|
Name:Ember-Fist Zubera
|
||||||
ManaCost:1 R
|
ManaCost:1 R
|
||||||
Types:Creature Zubera Spirit
|
Types:Creature Zubera Spirit
|
||||||
Text:When Ember-Fist Zubera is put into a graveyard from play, it deals damage to target creature or player equal to the number of Zubera put into all graveyards from play this turn.
|
Text:no text
|
||||||
|
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | Execute$ TrigDealDamage | TriggerDescription$ When CARDNAME is put into a graveyard from the battlefield, it deals damage to target creature or player equal to the number of Zubera put into all graveyards from the battlefield this turn.
|
||||||
|
SVar:TrigDealDamage:AB$DealDamage | Cost$ 0 | Tgt$ TgtCP | NumDmg$ X
|
||||||
|
SVar:X:Count$ThisTurnEntered Graveyard from Battlefield Zubera
|
||||||
PT:1/2
|
PT:1/2
|
||||||
SVar:Rarity:Common
|
SVar:Rarity:Common
|
||||||
SVar:Picture:http://resources.wizards.com/magic/cards/chk/en-us/card80508.jpg
|
SVar:Picture:http://resources.wizards.com/magic/cards/chk/en-us/card80508.jpg
|
||||||
|
|||||||
10
res/cardsfolder/flesh_allergy.txt
Normal file
10
res/cardsfolder/flesh_allergy.txt
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
Name:Flesh Allergy
|
||||||
|
ManaCost:2 B B
|
||||||
|
Types:Sorcery
|
||||||
|
Text:no text
|
||||||
|
A:SP$Destroy | Cost$ 2 B B Sac<1/Creature> | ValidTgts$ Creature | SubAbility$SVar=DBLoseLife | SpellDescription$ Destroy target creature. Its controller loses life equal to the number of creatures put into all graveyards from the battlefield this turn.
|
||||||
|
SVar:DBLoseLife:DB$LoseLife | Defined$ TargetedController | LifeAmount$ X
|
||||||
|
SVar:X:Count$ThisTurnEntered Graveyard from Battlefield Creature
|
||||||
|
SVar:Rarity:Uncommon
|
||||||
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/flesh_allergy.jpg
|
||||||
|
End
|
||||||
@@ -1,7 +1,10 @@
|
|||||||
Name:Floating-Dream Zubera
|
Name:Floating-Dream Zubera
|
||||||
ManaCost:1 U
|
ManaCost:1 U
|
||||||
Types:Creature Zubera Spirit
|
Types:Creature Zubera Spirit
|
||||||
Text:When Floating-Dream Zubera is put into a graveyard from play, draw a card for each Zubera put into a graveyard from play this turn.
|
Text:no text
|
||||||
|
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | Execute$ TrigDraw | TriggerDescription$ When CARDNAME is put into a graveyard from the battlefield, draw a card for each Zubera put into a graveyard from the battlefield this turn.
|
||||||
|
SVar:TrigDraw:AB$Draw | Cost$ 0 | Defined$ You | NumCards$ X
|
||||||
|
SVar:X:Count$ThisTurnEntered Graveyard from Battlefield Zubera
|
||||||
PT:1/2
|
PT:1/2
|
||||||
SVar:Rarity:Common
|
SVar:Rarity:Common
|
||||||
SVar:Picture:http://resources.wizards.com/magic/cards/chk/en-us/card80507.jpg
|
SVar:Picture:http://resources.wizards.com/magic/cards/chk/en-us/card80507.jpg
|
||||||
|
|||||||
@@ -3,8 +3,9 @@ ManaCost:2 B
|
|||||||
Types:Creature Ghoul
|
Types:Creature Ghoul
|
||||||
Text:no text
|
Text:no text
|
||||||
PT:1/1
|
PT:1/1
|
||||||
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Creature.Other | TriggerZones$ Battlefield | OptionalDecider$ You | Execute$ TrigPutCounter | TriggerDescription$ Whenever another creature is put into a graveyard from the battlefield, you may put a +1/+1 counter on CARDNAME.
|
T:Mode$ Phase | Phase$ End of Turn | TriggerZones$ Battlefield | Execute$ TrigPutCounter | TriggerDescription$ At the beginning of each end step, put a +1/+1 counter on CARDNAME for each creature put into a graveyard from the battlefield this turn.
|
||||||
SVar:TrigPutCounter:AB$PutCounter | Cost$ 0 | Defined$ Self | CounterType$ P1P1 | CounterNum$ 1
|
SVar:TrigPutCounter:AB$PutCounter | Cost$ 0 | Defined$ Self | CounterType$ P1P1 | CounterNum$ X
|
||||||
|
SVar:X:Count$ThisTurnEntered Graveyard from Battlefield Creature
|
||||||
SVar:Rarity:Uncommon
|
SVar:Rarity:Uncommon
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/khabal_ghoul.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/khabal_ghoul.jpg
|
||||||
SetInfo:ARN|Uncommon|http://magiccards.info/scans/en/an/10.jpg
|
SetInfo:ARN|Uncommon|http://magiccards.info/scans/en/an/10.jpg
|
||||||
|
|||||||
@@ -3,9 +3,10 @@ ManaCost:3 B
|
|||||||
Types:Creature Zombie
|
Types:Creature Zombie
|
||||||
Text:no text
|
Text:no text
|
||||||
PT:2/2
|
PT:2/2
|
||||||
#TODO - this should actually be at end of turn
|
T:Mode$ Phase | Phase$ End of Turn | TriggerZones$ Battlefield | Execute$ TrigPutCounter | TriggerDescription$ At the beginning of each end step, put a corpse counter on CARDNAME for each creature put into a graveyard from the battlefield this turn.
|
||||||
K:WheneverKeyword:PermanentIntoGraveyard:Type/Creature:Play:CustomCounter.CORPSE/1:Self:ASAP:No_Condition:Initiator - Other than Self:At the beginning of each end step, put a corpse counter on Scavenging Ghoul for each creature put into a graveyard from the battlefield this turn.
|
|
||||||
A:AB$Regenerate | Cost$ SubCounter<1/CORPSE> | SpellDescription$ Regenerate CARDNAME.
|
A:AB$Regenerate | Cost$ SubCounter<1/CORPSE> | SpellDescription$ Regenerate CARDNAME.
|
||||||
|
SVar:TrigPutCounter:AB$PutCounter | Cost$ 0 | Defined$ Self | CounterType$ CORPSE | CounterNum$ X
|
||||||
|
SVar:X:Count$ThisTurnEntered Graveyard from Battlefield Creature
|
||||||
SVar:Rarity:Uncommon
|
SVar:Rarity:Uncommon
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/scavenging_ghoul.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/scavenging_ghoul.jpg
|
||||||
SetInfo:LEA|Uncommon|http://magiccards.info/scans/en/al/35.jpg
|
SetInfo:LEA|Uncommon|http://magiccards.info/scans/en/al/35.jpg
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
Name:Silent-Chant Zubera
|
Name:Silent-Chant Zubera
|
||||||
ManaCost:1 W
|
ManaCost:1 W
|
||||||
Types:Creature Zubera Spirit
|
Types:Creature Zubera Spirit
|
||||||
Text:When Silent-Chant Zubera is put into a graveyard from play, you gain 2 life for each Zubera put into a graveyard from play this turn.
|
Text:no text
|
||||||
|
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Card.Self | Execute$ TrigGainLife | TriggerDescription$ When CARDNAME is put into a graveyard from the battlefield, you gain 2 life for each Zubera put into a graveyard from the battlefield this turn
|
||||||
|
SVar:TrigGainLife:AB$GainLife | Cost$ 0 | Defined$ You | LifeAmount$ X
|
||||||
|
SVar:X:Count$ThisTurnEntered Graveyard from Battlefield Zubera/Double
|
||||||
PT:1/2
|
PT:1/2
|
||||||
SVar:Rarity:Common
|
SVar:Rarity:Common
|
||||||
SVar:Picture:http://resources.wizards.com/magic/cards/chk/en-us/card80510.jpg
|
SVar:Picture:http://resources.wizards.com/magic/cards/chk/en-us/card80510.jpg
|
||||||
|
|||||||
9
res/cardsfolder/urborg_justice.txt
Normal file
9
res/cardsfolder/urborg_justice.txt
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
Name:Urborg Justice
|
||||||
|
ManaCost:B B
|
||||||
|
Types:Instant
|
||||||
|
Text:no text
|
||||||
|
A:SP$Sacrifice | Cost$ B B | ValidTgts$ Opponent | Amount$ X | SacValid$ Creature | SacMessage$ Creature | SpellDescription$ Target opponent sacrifices a creature for each creature put into your graveyard from the battlefield this turn.
|
||||||
|
SVar:X:Count$ThisTurnEntered Graveyard from Battlefield Creature.YouCtrl
|
||||||
|
SVar:Rarity:Rare
|
||||||
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/urborg_justice.jpg
|
||||||
|
End
|
||||||
@@ -113,4 +113,18 @@ public class AllZone implements NewConstants {
|
|||||||
|
|
||||||
return (PlayerZone)o;
|
return (PlayerZone)o;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void resetZoneMoveTracking()
|
||||||
|
{
|
||||||
|
((DefaultPlayerZone)Human_Command).resetCardsAddedThisTurn();
|
||||||
|
((DefaultPlayerZone)Human_Library).resetCardsAddedThisTurn();
|
||||||
|
((DefaultPlayerZone)Human_Hand).resetCardsAddedThisTurn();
|
||||||
|
((DefaultPlayerZone)Human_Battlefield).resetCardsAddedThisTurn();
|
||||||
|
((DefaultPlayerZone)Human_Graveyard).resetCardsAddedThisTurn();
|
||||||
|
((DefaultPlayerZone)Computer_Command).resetCardsAddedThisTurn();
|
||||||
|
((DefaultPlayerZone)Computer_Library).resetCardsAddedThisTurn();
|
||||||
|
((DefaultPlayerZone)Computer_Hand).resetCardsAddedThisTurn();
|
||||||
|
((DefaultPlayerZone)Computer_Battlefield).resetCardsAddedThisTurn();
|
||||||
|
((DefaultPlayerZone)Computer_Graveyard).resetCardsAddedThisTurn();
|
||||||
|
}
|
||||||
}//AllZone
|
}//AllZone
|
||||||
@@ -12,6 +12,9 @@ public class DefaultPlayerZone extends PlayerZone implements java.io.Serializabl
|
|||||||
private Player player;
|
private Player player;
|
||||||
private boolean update = true;
|
private boolean update = true;
|
||||||
|
|
||||||
|
private CardList cardsAddedThisTurn = new CardList();
|
||||||
|
private ArrayList<String> cardsAddedThisTurnSource = new ArrayList<String>();
|
||||||
|
|
||||||
public DefaultPlayerZone(String zone, Player inPlayer)
|
public DefaultPlayerZone(String zone, Player inPlayer)
|
||||||
{
|
{
|
||||||
zoneName = zone;
|
zoneName = zone;
|
||||||
@@ -26,7 +29,21 @@ public class DefaultPlayerZone extends PlayerZone implements java.io.Serializabl
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
Card c = (Card)o;
|
Card c = (Card)o;
|
||||||
|
|
||||||
|
cardsAddedThisTurn.add(c);
|
||||||
|
System.out.print("Added card to " + getZoneName() + " From ");
|
||||||
|
if(AllZone.getZone(c) != null)
|
||||||
|
{
|
||||||
|
System.out.print(AllZone.getZone(c).getZoneName());
|
||||||
|
cardsAddedThisTurnSource.add(AllZone.getZone(c).getZoneName());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
System.out.print("None");
|
||||||
|
cardsAddedThisTurnSource.add("None");
|
||||||
|
}
|
||||||
|
System.out.println(".Size: " + (cards.size()+1));
|
||||||
|
|
||||||
if (is("Graveyard")
|
if (is("Graveyard")
|
||||||
&& c.getKeyword().contains("When CARDNAME is put into a graveyard from anywhere, reveal CARDNAME and shuffle it into its owner's library instead."))
|
&& c.getKeyword().contains("When CARDNAME is put into a graveyard from anywhere, reveal CARDNAME and shuffle it into its owner's library instead."))
|
||||||
{
|
{
|
||||||
@@ -86,6 +103,21 @@ public class DefaultPlayerZone extends PlayerZone implements java.io.Serializabl
|
|||||||
public void addOnce(Object o)
|
public void addOnce(Object o)
|
||||||
{
|
{
|
||||||
Card c = (Card)o;
|
Card c = (Card)o;
|
||||||
|
|
||||||
|
cardsAddedThisTurn.add(c);
|
||||||
|
System.out.print("Added card to " + getZoneName() + " From ");
|
||||||
|
if(AllZone.getZone(c) != null)
|
||||||
|
{
|
||||||
|
System.out.print(AllZone.getZone(c).getZoneName());
|
||||||
|
cardsAddedThisTurnSource.add(AllZone.getZone(c).getZoneName());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
System.out.print("None");
|
||||||
|
cardsAddedThisTurnSource.add("None");
|
||||||
|
}
|
||||||
|
System.out.println(".Size: " + (cards.size()+1));
|
||||||
|
|
||||||
c.addObserver(this);
|
c.addObserver(this);
|
||||||
|
|
||||||
cards.add((Card)c);
|
cards.add((Card)c);
|
||||||
@@ -97,6 +129,20 @@ public class DefaultPlayerZone extends PlayerZone implements java.io.Serializabl
|
|||||||
}
|
}
|
||||||
public void add(Card c, int index)
|
public void add(Card c, int index)
|
||||||
{
|
{
|
||||||
|
cardsAddedThisTurn.add(c);
|
||||||
|
System.out.print("Added card to " + getZoneName() + " From ");
|
||||||
|
if(AllZone.getZone(c) != null)
|
||||||
|
{
|
||||||
|
System.out.print(AllZone.getZone(c).getZoneName());
|
||||||
|
cardsAddedThisTurnSource.add(AllZone.getZone(c).getZoneName());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
System.out.print("None");
|
||||||
|
cardsAddedThisTurnSource.add("None");
|
||||||
|
}
|
||||||
|
System.out.println(".Size: " + (cards.size()+1));
|
||||||
|
|
||||||
cards.add(index, c);
|
cards.add(index, c);
|
||||||
c.setTurnInZone(AllZone.Phase.getTurn());
|
c.setTurnInZone(AllZone.Phase.getTurn());
|
||||||
update();
|
update();
|
||||||
@@ -165,4 +211,25 @@ public class DefaultPlayerZone extends PlayerZone implements java.io.Serializabl
|
|||||||
sb.append(zoneName);
|
sb.append(zoneName);
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public CardList getCardsAddedThisTurn(String origin)
|
||||||
|
{
|
||||||
|
System.out.print("Request cards put into " + getZoneName() + " from " + origin + ".Amount: ");
|
||||||
|
CardList ret = new CardList();
|
||||||
|
for(int i=0;i<cardsAddedThisTurn.size();i++)
|
||||||
|
{
|
||||||
|
if(origin.equals(cardsAddedThisTurnSource.get(i)) || origin.equals("Any"))
|
||||||
|
{
|
||||||
|
ret.add(cardsAddedThisTurn.get(i));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
System.out.println(ret.size());
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void resetCardsAddedThisTurn()
|
||||||
|
{
|
||||||
|
cardsAddedThisTurn.clear();
|
||||||
|
cardsAddedThisTurnSource.clear();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,17 +55,6 @@ public class GameAction {
|
|||||||
c.removeExtrinsicKeyword("If CARDNAME would leave the battlefield, exile it instead of putting it anywhere else.");
|
c.removeExtrinsicKeyword("If CARDNAME would leave the battlefield, exile it instead of putting it anywhere else.");
|
||||||
return moveTo(removed, c);
|
return moveTo(removed, c);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(prev != null){
|
|
||||||
if (prev.is(Constant.Zone.Battlefield) && c.isCreature())
|
|
||||||
AllZone.Combat.removeFromCombat(c);
|
|
||||||
prevName = prev.getZoneName();
|
|
||||||
prev.remove(c);
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
// things that were just created will not have zones!
|
|
||||||
//System.out.println(c.getName() + " " + zone.getZoneName());
|
|
||||||
}
|
|
||||||
|
|
||||||
// Don't add the Token, unless it's moving to the battlefield
|
// Don't add the Token, unless it's moving to the battlefield
|
||||||
if (!c.isToken() || zone.is(Constant.Zone.Battlefield)){
|
if (!c.isToken() || zone.is(Constant.Zone.Battlefield)){
|
||||||
@@ -77,8 +66,19 @@ public class GameAction {
|
|||||||
if (lastKnownInfo.wasSuspendCast()) // these probably can be moved back to SubtractCounters
|
if (lastKnownInfo.wasSuspendCast()) // these probably can be moved back to SubtractCounters
|
||||||
c = addSuspendTriggers(c);
|
c = addSuspendTriggers(c);
|
||||||
|
|
||||||
// todo: if zone is battlefied and prevZone is battlefield, temporarily disable enters battlefield triggers
|
if(prev != null)
|
||||||
zone.add(c);
|
{
|
||||||
|
if(prev.equals(zone))
|
||||||
|
AllZone.TriggerHandler.suppressMode("ChangesZone");
|
||||||
|
}
|
||||||
|
|
||||||
|
zone.add(c);
|
||||||
|
|
||||||
|
if(prev != null)
|
||||||
|
{
|
||||||
|
if(prev.equals(zone))
|
||||||
|
AllZone.TriggerHandler.clearSuppression("ChangesZone");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (zone.is(Constant.Zone.Battlefield) && c.isAura()){
|
if (zone.is(Constant.Zone.Battlefield) && c.isAura()){
|
||||||
@@ -90,7 +90,18 @@ public class GameAction {
|
|||||||
//{
|
//{
|
||||||
//Other characteristics should be cleared here also.
|
//Other characteristics should be cleared here also.
|
||||||
// c.clearRemembered();
|
// c.clearRemembered();
|
||||||
//}
|
//}
|
||||||
|
|
||||||
|
if(prev != null){
|
||||||
|
if (prev.is(Constant.Zone.Battlefield) && c.isCreature())
|
||||||
|
AllZone.Combat.removeFromCombat(c);
|
||||||
|
prevName = prev.getZoneName();
|
||||||
|
prev.remove(c);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
// things that were just created will not have zones!
|
||||||
|
//System.out.println(c.getName() + " " + zone.getZoneName());
|
||||||
|
}
|
||||||
|
|
||||||
//Run triggers
|
//Run triggers
|
||||||
HashMap<String,Object> runParams = new HashMap<String,Object>();
|
HashMap<String,Object> runParams = new HashMap<String,Object>();
|
||||||
|
|||||||
@@ -294,8 +294,6 @@ public class Phase extends MyObservable
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//This line fixes Combat Damage triggers not going off when they should
|
//This line fixes Combat Damage triggers not going off when they should
|
||||||
AllZone.Stack.unfreezeStack();
|
AllZone.Stack.unfreezeStack();
|
||||||
|
|
||||||
@@ -385,6 +383,8 @@ public class Phase extends MyObservable
|
|||||||
|
|
||||||
private Player handleNextTurn() {
|
private Player handleNextTurn() {
|
||||||
Player nextTurn = extraTurns.isEmpty() ? getPlayerTurn().getOpponent() : extraTurns.pop();
|
Player nextTurn = extraTurns.isEmpty() ? getPlayerTurn().getOpponent() : extraTurns.pop();
|
||||||
|
|
||||||
|
AllZone.resetZoneMoveTracking();
|
||||||
|
|
||||||
return skipTurnTimeVault(nextTurn);
|
return skipTurnTimeVault(nextTurn);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,28 +11,7 @@ import java.util.Map.Entry;
|
|||||||
|
|
||||||
import com.esotericsoftware.minlog.Log;
|
import com.esotericsoftware.minlog.Log;
|
||||||
|
|
||||||
import forge.AllZone;
|
import forge.*;
|
||||||
import forge.AllZoneUtil;
|
|
||||||
import forge.ButtonUtil;
|
|
||||||
import forge.Card;
|
|
||||||
import forge.CardList;
|
|
||||||
import forge.CardListFilter;
|
|
||||||
import forge.CardListUtil;
|
|
||||||
import forge.CardUtil;
|
|
||||||
import forge.Card_Color;
|
|
||||||
import forge.Combat;
|
|
||||||
import forge.CombatUtil;
|
|
||||||
import forge.Command;
|
|
||||||
import forge.CommandArgs;
|
|
||||||
import forge.ComputerUtil;
|
|
||||||
import forge.Constant;
|
|
||||||
import forge.Counters;
|
|
||||||
import forge.GameAction;
|
|
||||||
import forge.GameActionUtil;
|
|
||||||
import forge.MyRandom;
|
|
||||||
import forge.Phase;
|
|
||||||
import forge.Player;
|
|
||||||
import forge.PlayerZone;
|
|
||||||
import forge.card.spellability.Ability;
|
import forge.card.spellability.Ability;
|
||||||
import forge.card.spellability.Ability_Activated;
|
import forge.card.spellability.Ability_Activated;
|
||||||
import forge.card.spellability.Ability_Mana;
|
import forge.card.spellability.Ability_Mana;
|
||||||
@@ -3528,6 +3507,41 @@ public class CardFactoryUtil {
|
|||||||
else
|
else
|
||||||
return doXMath(Integer.parseInt(sq[2]), m); // not Main Phase
|
return doXMath(Integer.parseInt(sq[2]), m); // not Main Phase
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Count$ThisTurnEntered <ZoneDestination> <ZoneOrigin> <Valid>
|
||||||
|
//or
|
||||||
|
//Count$ThisTurnEntered <ZoneDestination <Valid>
|
||||||
|
if(sq[0].startsWith("ThisTurnEntered"))
|
||||||
|
{
|
||||||
|
String[] workingCopy = sq[0].split(" ");
|
||||||
|
String destination,origin,validFilter;
|
||||||
|
|
||||||
|
destination = workingCopy[1];
|
||||||
|
if(workingCopy[2].equals("from"))
|
||||||
|
{
|
||||||
|
origin = workingCopy[3];
|
||||||
|
validFilter = workingCopy[4];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
origin = "Any";
|
||||||
|
validFilter = workingCopy[2];
|
||||||
|
}
|
||||||
|
|
||||||
|
final String[] valid = validFilter.split(",");
|
||||||
|
final Card csource = c;
|
||||||
|
CardList res = ((DefaultPlayerZone)AllZone.getZone(destination, AllZone.HumanPlayer)).getCardsAddedThisTurn(origin);
|
||||||
|
res.add(((DefaultPlayerZone)AllZone.getZone(destination, AllZone.ComputerPlayer)).getCardsAddedThisTurn(origin));
|
||||||
|
|
||||||
|
res.filter(new CardListFilter() {
|
||||||
|
public boolean addCard(Card csubject)
|
||||||
|
{
|
||||||
|
return csubject.isValidCard(valid,csource.getController(),csource);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return doXMath(res.size(),m);
|
||||||
|
}
|
||||||
|
|
||||||
//Generic Zone-based counting
|
//Generic Zone-based counting
|
||||||
// Count$QualityAndZones.Subquality
|
// Count$QualityAndZones.Subquality
|
||||||
|
|||||||
@@ -156,59 +156,6 @@ public class CardFactory_Creatures {
|
|||||||
card.addSpellAbility(spell);
|
card.addSpellAbility(spell);
|
||||||
}
|
}
|
||||||
//*************** END ************ END **************************
|
//*************** END ************ END **************************
|
||||||
|
|
||||||
|
|
||||||
//*************** START *********** START **************************
|
|
||||||
else if(cardName.equals("Caller of the Claw")) {
|
|
||||||
final SpellAbility ability = new Ability(card, "0") {
|
|
||||||
@Override
|
|
||||||
public void resolve() {
|
|
||||||
int stop = countGraveyard();
|
|
||||||
for(int i = 0; i < stop; i++)
|
|
||||||
makeToken();
|
|
||||||
}//resolve()
|
|
||||||
|
|
||||||
int countGraveyard() {
|
|
||||||
PlayerZone grave = AllZone.getZone(Constant.Zone.Graveyard, card.getController());
|
|
||||||
CardList list = new CardList(grave.getCards());
|
|
||||||
list = list.filter(new CardListFilter() {
|
|
||||||
public boolean addCard(Card c) {
|
|
||||||
return c.isCreature() && (c.getTurnInZone() == AllZone.Phase.getTurn());
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return list.size();
|
|
||||||
}//countGraveyard()
|
|
||||||
|
|
||||||
void makeToken() {
|
|
||||||
CardFactoryUtil.makeToken("Bear", "G 2 2 Bear", card.getController(), "G", new String[] {"Creature", "Bear"},
|
|
||||||
2, 2, new String[] {""});
|
|
||||||
}//makeToken()
|
|
||||||
};//SpellAbility
|
|
||||||
|
|
||||||
Command comesIntoPlay = new Command() {
|
|
||||||
private static final long serialVersionUID = 8485080996453793968L;
|
|
||||||
|
|
||||||
public void execute() {
|
|
||||||
AllZone.Stack.addSimultaneousStackEntry(ability);
|
|
||||||
|
|
||||||
}
|
|
||||||
};//Command
|
|
||||||
ability.setStackDescription("Caller of the Claw - Put a 2/2 green Bear creature token onto the battlefield for each nontoken creature put into your graveyard from play this turn.");
|
|
||||||
card.addComesIntoPlayCommand(comesIntoPlay);
|
|
||||||
|
|
||||||
SpellAbility spell = new Spell_Permanent(card) {
|
|
||||||
private static final long serialVersionUID = 6946020026681536710L;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean canPlayAI() {
|
|
||||||
return super.canPlay();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
// Do not remove SpellAbilities created by AbilityFactory or Keywords.
|
|
||||||
card.clearFirstSpellAbility();
|
|
||||||
card.addSpellAbility(spell);
|
|
||||||
}//*************** END ************ END **************************
|
|
||||||
|
|
||||||
|
|
||||||
//*************** START *********** START **************************
|
//*************** START *********** START **************************
|
||||||
else if(cardName.equals("Kiki-Jiki, Mirror Breaker")) {
|
else if(cardName.equals("Kiki-Jiki, Mirror Breaker")) {
|
||||||
@@ -1589,296 +1536,7 @@ public class CardFactory_Creatures {
|
|||||||
});
|
});
|
||||||
}//*************** END ************ END **************************
|
}//*************** END ************ END **************************
|
||||||
|
|
||||||
|
|
||||||
//*************** START *********** START **************************
|
|
||||||
else if(cardName.equals("Ember-Fist Zubera")) {
|
|
||||||
//counts Zubera in all graveyards for this turn
|
|
||||||
final CommandReturn countZubera = new CommandReturn() {
|
|
||||||
public Object execute() {
|
|
||||||
CardList list = new CardList();
|
|
||||||
list.addAll(AllZone.Human_Graveyard.getCards());
|
|
||||||
list.addAll(AllZone.Computer_Graveyard.getCards());
|
|
||||||
|
|
||||||
list = list.filter(new CardListFilter() {
|
|
||||||
public boolean addCard(Card c) {
|
|
||||||
return (c.getTurnInZone() == AllZone.Phase.getTurn())
|
|
||||||
&& (c.getType().contains("Zubera") || c.getKeyword().contains("Changeling"));
|
|
||||||
}
|
|
||||||
});//CardListFilter()
|
|
||||||
|
|
||||||
return Integer.valueOf(list.size());
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
final Input[] input = new Input[1];
|
|
||||||
|
|
||||||
final SpellAbility ability = new Ability(card, "0") {
|
|
||||||
@Override
|
|
||||||
public void resolve() {
|
|
||||||
//human chooses target on resolve,
|
|
||||||
//computer chooses target in Command destroy
|
|
||||||
if(AllZone.HumanPlayer.equals(card.getController())) AllZone.InputControl.setInput(input[0]);
|
|
||||||
else {
|
|
||||||
int damage = ((Integer) countZubera.execute()).intValue();
|
|
||||||
|
|
||||||
if(getTargetCard() != null) {
|
|
||||||
if(AllZone.GameAction.isCardInPlay(getTargetCard())
|
|
||||||
&& CardFactoryUtil.canTarget(card, getTargetCard())) {
|
|
||||||
Card c = getTargetCard();
|
|
||||||
c.addDamage(damage, card);
|
|
||||||
}
|
|
||||||
} else getTargetPlayer().addDamage(damage, card);
|
|
||||||
}
|
|
||||||
}//resolve()
|
|
||||||
};//SpellAbility
|
|
||||||
|
|
||||||
input[0] = new Input() {
|
|
||||||
private static final long serialVersionUID = 1899925898843297992L;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void showMessage() {
|
|
||||||
int damage = ((Integer) countZubera.execute()).intValue();
|
|
||||||
AllZone.Display.showMessage("Select target Creature, Planeswalker or Player - " + damage
|
|
||||||
+ " damage ");
|
|
||||||
ButtonUtil.disableAll();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void selectCard(Card card, PlayerZone zone) {
|
|
||||||
if((card.isCreature() || card.isPlaneswalker()) && zone.is(Constant.Zone.Battlefield)) {
|
|
||||||
int damage = ((Integer) countZubera.execute()).intValue();
|
|
||||||
card.addDamage(damage, card);
|
|
||||||
|
|
||||||
//have to do this since state effects aren't checked
|
|
||||||
//after this "Input" class is done
|
|
||||||
//basically this makes everything work right
|
|
||||||
//Ember-Fist Zubera can destroy a 2/2 creature
|
|
||||||
AllZone.GameAction.checkStateEffects();
|
|
||||||
stop();
|
|
||||||
}
|
|
||||||
}//selectCard()
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void selectPlayer(Player player) {
|
|
||||||
int damage = ((Integer) countZubera.execute()).intValue();
|
|
||||||
player.addDamage(damage, card);
|
|
||||||
stop();
|
|
||||||
}//selectPlayer()
|
|
||||||
};//Input
|
|
||||||
|
|
||||||
Command destroy = new Command() {
|
|
||||||
private static final long serialVersionUID = -1889425992069348304L;
|
|
||||||
|
|
||||||
public void execute() {
|
|
||||||
StringBuilder sb = new StringBuilder();
|
|
||||||
sb.append(card).append(" causes damage to creature or player");
|
|
||||||
ability.setStackDescription(sb.toString());
|
|
||||||
|
|
||||||
//@SuppressWarnings("unused") // damage
|
|
||||||
//int damage = ((Integer)countZubera.execute()).intValue();
|
|
||||||
|
|
||||||
Player con = card.getController();
|
|
||||||
|
|
||||||
//human chooses target on resolve,
|
|
||||||
//computer chooses target in Command destroy
|
|
||||||
if(con.equals(AllZone.ComputerPlayer)) ability.setTargetPlayer(AllZone.HumanPlayer);
|
|
||||||
|
|
||||||
AllZone.Stack.addSimultaneousStackEntry(ability);
|
|
||||||
|
|
||||||
}//execute()
|
|
||||||
};
|
|
||||||
card.addDestroyCommand(destroy);
|
|
||||||
}//*************** END ************ END **************************
|
|
||||||
|
|
||||||
|
|
||||||
//*************** START *********** START **************************
|
|
||||||
else if(cardName.equals("Ashen-Skin Zubera")) {
|
|
||||||
//counts Zubera in all graveyards for this turn
|
|
||||||
final CommandReturn countZubera = new CommandReturn() {
|
|
||||||
public Object execute() {
|
|
||||||
CardList list = new CardList();
|
|
||||||
list.addAll(AllZone.Human_Graveyard.getCards());
|
|
||||||
list.addAll(AllZone.Computer_Graveyard.getCards());
|
|
||||||
|
|
||||||
list = list.filter(new CardListFilter() {
|
|
||||||
public boolean addCard(Card c) {
|
|
||||||
return (c.getTurnInZone() == AllZone.Phase.getTurn())
|
|
||||||
&& (c.getType().contains("Zubera") || c.getKeyword().contains("Changeling"));
|
|
||||||
}
|
|
||||||
});//CardListFilter()
|
|
||||||
return Integer.valueOf(list.size());
|
|
||||||
}
|
|
||||||
};//CommandReturn
|
|
||||||
|
|
||||||
final SpellAbility ability = new Ability(card, "0") {
|
|
||||||
@Override
|
|
||||||
public void resolve() {
|
|
||||||
int discard = ((Integer) countZubera.execute()).intValue();
|
|
||||||
getTargetPlayer().discard(discard, this, false);
|
|
||||||
}//resolve()
|
|
||||||
};//SpellAbility
|
|
||||||
|
|
||||||
Command destroy = new Command() {
|
|
||||||
private static final long serialVersionUID = -7494691537986218546L;
|
|
||||||
|
|
||||||
public void execute() {
|
|
||||||
Player opponent = card.getController().getOpponent();
|
|
||||||
ability.setTargetPlayer(opponent);
|
|
||||||
|
|
||||||
StringBuilder sb = new StringBuilder();
|
|
||||||
sb.append(card).append(" - ").append(opponent).append(" discards cards");
|
|
||||||
ability.setStackDescription(sb.toString());
|
|
||||||
|
|
||||||
AllZone.Stack.addSimultaneousStackEntry(ability);
|
|
||||||
|
|
||||||
}//execute()
|
|
||||||
};
|
|
||||||
card.addDestroyCommand(destroy);
|
|
||||||
}//*************** END ************ END **************************
|
|
||||||
|
|
||||||
|
|
||||||
//*************** START *********** START **************************
|
|
||||||
else if(cardName.equals("Floating-Dream Zubera")) {
|
|
||||||
//counts Zubera in all graveyards for this turn
|
|
||||||
final CommandReturn countZubera = new CommandReturn() {
|
|
||||||
public Object execute() {
|
|
||||||
CardList list = new CardList();
|
|
||||||
list.addAll(AllZone.Human_Graveyard.getCards());
|
|
||||||
list.addAll(AllZone.Computer_Graveyard.getCards());
|
|
||||||
|
|
||||||
list = list.filter(new CardListFilter() {
|
|
||||||
public boolean addCard(Card c) {
|
|
||||||
return (c.getTurnInZone() == AllZone.Phase.getTurn())
|
|
||||||
&& (c.getType().contains("Zubera") || c.getKeyword().contains("Changeling"));
|
|
||||||
}
|
|
||||||
});//CardListFilter()
|
|
||||||
return Integer.valueOf(list.size());
|
|
||||||
}
|
|
||||||
};//CommandReturn
|
|
||||||
|
|
||||||
final SpellAbility ability = new Ability(card, "0") {
|
|
||||||
@Override
|
|
||||||
public void resolve() {
|
|
||||||
int number = ((Integer) countZubera.execute()).intValue();
|
|
||||||
|
|
||||||
for(int i = 0; i < number; i++)
|
|
||||||
getTargetPlayer().drawCard();
|
|
||||||
}//resolve()
|
|
||||||
};//SpellAbility
|
|
||||||
|
|
||||||
Command destroy = new Command() {
|
|
||||||
private static final long serialVersionUID = -5814070329854975419L;
|
|
||||||
|
|
||||||
public void execute() {
|
|
||||||
ability.setTargetPlayer(card.getController());
|
|
||||||
|
|
||||||
StringBuilder sb = new StringBuilder();
|
|
||||||
sb.append(card).append(" - ").append(card.getController()).append(" draws cards");
|
|
||||||
ability.setStackDescription(sb.toString());
|
|
||||||
|
|
||||||
AllZone.Stack.addSimultaneousStackEntry(ability);
|
|
||||||
|
|
||||||
|
|
||||||
}//execute()
|
|
||||||
};
|
|
||||||
card.addDestroyCommand(destroy);
|
|
||||||
}//*************** END ************ END **************************
|
|
||||||
|
|
||||||
|
|
||||||
//*************** START *********** START **************************
|
|
||||||
else if(cardName.equals("Silent-Chant Zubera")) {
|
|
||||||
//counts Zubera in all graveyards for this turn
|
|
||||||
final CommandReturn countZubera = new CommandReturn() {
|
|
||||||
public Object execute() {
|
|
||||||
CardList list = new CardList();
|
|
||||||
list.addAll(AllZone.Human_Graveyard.getCards());
|
|
||||||
list.addAll(AllZone.Computer_Graveyard.getCards());
|
|
||||||
|
|
||||||
list = list.filter(new CardListFilter() {
|
|
||||||
public boolean addCard(Card c) {
|
|
||||||
return (c.getTurnInZone() == AllZone.Phase.getTurn())
|
|
||||||
&& (c.getType().contains("Zubera") || c.getKeyword().contains("Changeling"));
|
|
||||||
}
|
|
||||||
});//CardListFilter()
|
|
||||||
return Integer.valueOf(list.size());
|
|
||||||
}
|
|
||||||
};//CommandReturn
|
|
||||||
|
|
||||||
final SpellAbility ability = new Ability(card, "0") {
|
|
||||||
@Override
|
|
||||||
public void resolve() {
|
|
||||||
int number = ((Integer) countZubera.execute()).intValue();
|
|
||||||
|
|
||||||
getTargetPlayer().gainLife(number*2, card);
|
|
||||||
}//resolve()
|
|
||||||
};//SpellAbility
|
|
||||||
|
|
||||||
Command destroy = new Command() {
|
|
||||||
private static final long serialVersionUID = -2327085948421343657L;
|
|
||||||
|
|
||||||
public void execute() {
|
|
||||||
ability.setTargetPlayer(card.getController());
|
|
||||||
|
|
||||||
StringBuilder sb = new StringBuilder();
|
|
||||||
sb.append(card).append(" - ").append(card.getController()).append(" gains life");
|
|
||||||
ability.setStackDescription(sb.toString());
|
|
||||||
|
|
||||||
AllZone.Stack.addSimultaneousStackEntry(ability);
|
|
||||||
|
|
||||||
|
|
||||||
}//execute()
|
|
||||||
};
|
|
||||||
card.addDestroyCommand(destroy);
|
|
||||||
}//*************** END ************ END **************************
|
|
||||||
|
|
||||||
|
|
||||||
//*************** START *********** START **************************
|
|
||||||
else if(cardName.equals("Dripping-Tongue Zubera")) {
|
|
||||||
//counts Zubera in all graveyards for this turn
|
|
||||||
final CommandReturn countZubera = new CommandReturn() {
|
|
||||||
public Object execute() {
|
|
||||||
CardList list = new CardList();
|
|
||||||
list.addAll(AllZone.Human_Graveyard.getCards());
|
|
||||||
list.addAll(AllZone.Computer_Graveyard.getCards());
|
|
||||||
|
|
||||||
list = list.filter(new CardListFilter() {
|
|
||||||
public boolean addCard(Card c) {
|
|
||||||
return (c.getTurnInZone() == AllZone.Phase.getTurn())
|
|
||||||
&& (c.getType().contains("Zubera") || c.getKeyword().contains("Changeling"));
|
|
||||||
}
|
|
||||||
});//CardListFilter()
|
|
||||||
return Integer.valueOf(list.size());
|
|
||||||
}
|
|
||||||
};//CommandReturn
|
|
||||||
|
|
||||||
final SpellAbility ability = new Ability(card, "0") {
|
|
||||||
@Override
|
|
||||||
public void resolve() {
|
|
||||||
int count = ((Integer) countZubera.execute()).intValue();
|
|
||||||
for(int i = 0; i < count; i++)
|
|
||||||
CardFactoryUtil.makeToken("Spirit", "C 1 1 Spirit", card.getController(), "", new String[] {
|
|
||||||
"Creature", "Spirit"}, 1, 1, new String[] {""});
|
|
||||||
}//resolve()
|
|
||||||
};//SpellAbility
|
|
||||||
|
|
||||||
Command destroy = new Command() {
|
|
||||||
private static final long serialVersionUID = 8362692868619919330L;
|
|
||||||
|
|
||||||
public void execute() {
|
|
||||||
ability.setTargetPlayer(card.getController());
|
|
||||||
|
|
||||||
StringBuilder sb = new StringBuilder();
|
|
||||||
sb.append(card).append(" - ").append(card.getController()).append(" puts tokens onto the battlefield");
|
|
||||||
ability.setStackDescription(sb.toString());
|
|
||||||
|
|
||||||
AllZone.Stack.addSimultaneousStackEntry(ability);
|
|
||||||
|
|
||||||
}//execute()
|
|
||||||
};
|
|
||||||
card.addDestroyCommand(destroy);
|
|
||||||
}//*************** END ************ END **************************
|
|
||||||
|
|
||||||
|
|
||||||
//*************** START *********** START **************************
|
//*************** START *********** START **************************
|
||||||
else if(cardName.equals("Jhoira of the Ghitu")) {
|
else if(cardName.equals("Jhoira of the Ghitu")) {
|
||||||
final Stack<Card> chosen= new Stack<Card>();
|
final Stack<Card> chosen= new Stack<Card>();
|
||||||
|
|||||||
Reference in New Issue
Block a user