diff --git a/.gitattributes b/.gitattributes index 18fd71febb3..879309389a5 100644 --- a/.gitattributes +++ b/.gitattributes @@ -5626,6 +5626,7 @@ src/forge/AbilityFactory_Fetch.java -text svneol=native#text/plain src/forge/AbilityFactory_PermanentState.java -text svneol=native#text/plain src/forge/AbilityFactory_Pump.java -text svneol=native#text/plain src/forge/AbilityFactory_Regenerate.java -text svneol=native#text/plain +src/forge/AbilityFactory_Token.java -text svneol=native#text/plain src/forge/AbilityFactory_ZoneAffecting.java -text svneol=native#text/plain src/forge/Ability_Activated.java svneol=native#text/plain src/forge/Ability_Cost.java -text svneol=native#text/plain diff --git a/res/cardsfolder/acorn_harvest.txt b/res/cardsfolder/acorn_harvest.txt index a37d9ef3adb..f7166b04e7f 100644 --- a/res/cardsfolder/acorn_harvest.txt +++ b/res/cardsfolder/acorn_harvest.txt @@ -2,7 +2,8 @@ Name:Acorn Harvest ManaCost:3 G Types:Sorcery Text:Put two 1/1 green Squirrel creature tokens onto the battlefield. -K:spMakeToken<>2<>Squirrel<>G 1 1 Squirrel<>Controller<>G<>Creature;Squirrel<>1<>1<>None +#K:spMakeToken<>2<>Squirrel<>G 1 1 Squirrel<>Controller<>G<>Creature;Squirrel<>1<>1<>None +A:SP$Token|Cost$3 G|TokenAmount$2|TokenName$Squirrel|TokenTypes$Creature,Squirrel|TokenOwner$Controller|TokenColors$Green|TokenPower$1|TokenToughness$1 K:Flashback:1 G,3 SVar:Rarity:Common SVar:Picture:http://www.wizards.com/global/images/magic/general/acorn_harvest.jpg diff --git a/res/cardsfolder/beast_attack.txt b/res/cardsfolder/beast_attack.txt index 8adbfa0cae7..c5c5a0fec27 100644 --- a/res/cardsfolder/beast_attack.txt +++ b/res/cardsfolder/beast_attack.txt @@ -2,7 +2,8 @@ Name:Beast Attack ManaCost:2 G G G Types:Instant Text:Put a 4/4 green Beast creature token onto the battlefield. -K:spMakeToken<>1<>Beast<>G 4 4 Beast<>Controller<>G<>Creature;Beast<>4<>4<>None +#K:spMakeToken<>1<>Beast<>G 4 4 Beast<>Controller<>G<>Creature;Beast<>4<>4<>None +A:SP$Token|Cost$2 G G G|TokenAmount$1|TokenName$Beast|TokenTypes$Creature,Beast|TokenColors$Green|TokenOwner$Controller|TokenPower$4|TokenToughness$4 K:Flashback:2 G G G SVar:Rarity:Uncommon SVar:Picture:http://www.wizards.com/global/images/magic/general/beast_attack.jpg diff --git a/res/cardsfolder/call_of_the_herd.txt b/res/cardsfolder/call_of_the_herd.txt index c51ac36304e..b3a5cc10baf 100644 --- a/res/cardsfolder/call_of_the_herd.txt +++ b/res/cardsfolder/call_of_the_herd.txt @@ -2,7 +2,8 @@ Name:Call of the Herd ManaCost:2 G Types:Sorcery Text:Put a 3/3 green Elephant creature token onto the battlefield. -K:spMakeToken<>1<>Elephant<>G 3 3 Elephant<>Controller<>G<>Creature;Elephant<>3<>3<>None +#K:spMakeToken<>1<>Elephant<>G 3 3 Elephant<>Controller<>G<>Creature;Elephant<>3<>3<>None +A:SP$Token|Cost$2 G|TokenAmount$1|TokenName$Elephant|TokenTypes$Creature,Elephant|TokenColors$Green|TokenPower$3|TokenToughness$3|TokenOwner$Controller K:Flashback:3 G SVar:Rarity:Rare SVar:Picture:http://www.wizards.com/global/images/magic/general/call_of_the_herd.jpg diff --git a/res/cardsfolder/carrion_call.txt b/res/cardsfolder/carrion_call.txt index 0fb9851667b..a179f1ee89d 100644 --- a/res/cardsfolder/carrion_call.txt +++ b/res/cardsfolder/carrion_call.txt @@ -2,7 +2,8 @@ Name:Carrion Call ManaCost:3 G Types:Instant Text:Put two 1/1 green Insect creature tokens with infect onto the battlefield. -K:spMakeToken<>2<>Insect<>G 1 1 Insect<>Controller<>G<>Creature;Insect<>1<>1<>Infect +#K:spMakeToken<>2<>Insect<>G 1 1 Insect<>Controller<>G<>Creature;Insect<>1<>1<>Infect +A:SP$Token|Cost$3 G|TokenAmount$2|TokenName$Insect|TokenTypes$Creature,Insect|TokenOwner$Controller|TokenColors$Green|TokenPower$1|TokenToughness$1|TokenKeywords$Infect SVar:Rarity:Uncommon SVar:Picture:http://www.wizards.com/global/images/magic/general/carrion_call.jpg End diff --git a/res/cardsfolder/chatter_of_the_squirrel.txt b/res/cardsfolder/chatter_of_the_squirrel.txt index 4dcef6bda97..379777830f7 100644 --- a/res/cardsfolder/chatter_of_the_squirrel.txt +++ b/res/cardsfolder/chatter_of_the_squirrel.txt @@ -2,7 +2,8 @@ Name:Chatter of the Squirrel ManaCost:G Types:Sorcery Text:Put a 1/1 green Squirrel creature token onto the battlefield. -K:spMakeToken<>1<>Squirrel<>G 1 1 Squirrel<>Controller<>G<>Creature;Squirrel<>1<>1<>None +#K:spMakeToken<>1<>Squirrel<>G 1 1 Squirrel<>Controller<>G<>Creature;Squirrel<>1<>1<>None +A:SP$Token|Cost$G|TokenAmount$1|TokenName$Squirrel|TokenColors$Green|TokenTypes$Creature,Squirrel|TokenOwner$Controller|TokenPower$1|TokenToughness$1 K:Flashback:1 G SVar:Rarity:Common SVar:Picture:http://www.wizards.com/global/images/magic/general/chatter_of_the_squirrel.jpg diff --git a/res/cardsfolder/crush_of_wurms.txt b/res/cardsfolder/crush_of_wurms.txt index 2a6db6a9787..2f33aef1e02 100644 --- a/res/cardsfolder/crush_of_wurms.txt +++ b/res/cardsfolder/crush_of_wurms.txt @@ -2,7 +2,8 @@ Name:Crush of Wurms ManaCost:6 G G G Types:Sorcery Text:Put three 6/6 green Wurm creature tokens onto the battlefield. -K:spMakeToken<>3<>Wurm<>G 6 6 Wurm<>Controller<>G<>Creature;Wurm<>6<>6<>None +#K:spMakeToken<>3<>Wurm<>G 6 6 Wurm<>Controller<>G<>Creature;Wurm<>6<>6<>None +A:SP$Token|Cost$6 G G G|TokenAmount$3|TokenName$Wurm|TokenColors$Green|TokenTypes$Creature,Wurm|TokenOwner$Controller|TokenPower$6|TokenToughness$6 K:Flashback:9 G G G SVar:Rarity:Rare SVar:Picture:http://www.wizards.com/global/images/magic/general/crush_of_wurms.jpg diff --git a/res/cardsfolder/dragon_fodder.txt b/res/cardsfolder/dragon_fodder.txt index 14967176d51..532b935a102 100644 --- a/res/cardsfolder/dragon_fodder.txt +++ b/res/cardsfolder/dragon_fodder.txt @@ -2,7 +2,8 @@ Name:Dragon Fodder ManaCost:1 R Types:Sorcery Text:Put two 1/1 red Goblin creature tokens onto the battlefield. -K:spMakeToken<>2<>Goblin<>R 1 1 Goblin<>Controller<>R<>Creature;Goblin<>1<>1<>None +#K:spMakeToken<>2<>Goblin<>R 1 1 Goblin<>Controller<>R<>Creature;Goblin<>1<>1<>None +A:SP$Token|Cost$1 R|TokenAmount$2|TokenName$Goblin|TokenTypes$Creature,Goblin|TokenOwner$Controller|TokenColors$Red|TokenPower$1|TokenToughness$1 SVar:Rarity:Common SVar:Picture:http://www.wizards.com/global/images/magic/general/dragon_fodder.jpg End diff --git a/res/cardsfolder/elephant_ambush.txt b/res/cardsfolder/elephant_ambush.txt index e9f49dc77f8..7cace419f5b 100644 --- a/res/cardsfolder/elephant_ambush.txt +++ b/res/cardsfolder/elephant_ambush.txt @@ -2,7 +2,8 @@ Name:Elephant Ambush ManaCost:2 G G Types:Instant Text:Put a 3/3 green Elephant creature token onto the battlefield. -K:spMakeToken<>1<>Elephant<>G 3 3 Elephant<>Controller<>G<>Creature;Elephant<>3<>3<>None +#K:spMakeToken<>1<>Elephant<>G 3 3 Elephant<>Controller<>G<>Creature;Elephant<>3<>3<>None +A:SP$Token|Cost$2 G G|TokenAmount$1|TokenName$Elephant|TokenTypes$Creature,Elephant|TokenOwner$Controller|TokenColors$Green|TokenPower$3|TokenToughness$3 K:Flashback:6 G G SVar:Rarity:Common SVar:Picture:http://www.wizards.com/global/images/magic/general/elephant_ambush.jpg diff --git a/res/cardsfolder/empty_the_warrens.txt b/res/cardsfolder/empty_the_warrens.txt index 38fdc22b5a9..285b8a1cd07 100644 --- a/res/cardsfolder/empty_the_warrens.txt +++ b/res/cardsfolder/empty_the_warrens.txt @@ -2,7 +2,8 @@ Name:Empty the Warrens ManaCost:3 R Types:Sorcery Text:Put two 1/1 red Goblin creature tokens into play. -K:spMakeToken<>2<>Goblin<>R 1 1 Goblin<>Controller<>R<>Creature;Goblin<>1<>1<>None +#K:spMakeToken<>2<>Goblin<>R 1 1 Goblin<>Controller<>R<>Creature;Goblin<>1<>1<>None +A:SP$Token|Cost$3 R|TokenAmount$2|TokenName$Goblin|TokenTypes$Creature,Goblin|TokenOwner$Controller|TokenColors$Red|TokenPower$1|TokenToughness$1 K:Storm SVar:Rarity:Common SVar:Picture:http://www.wizards.com/global/images/magic/general/empty_the_warrens.jpg diff --git a/res/cardsfolder/feral_lightning.txt b/res/cardsfolder/feral_lightning.txt index 3e4cc155492..b2265ada76b 100644 --- a/res/cardsfolder/feral_lightning.txt +++ b/res/cardsfolder/feral_lightning.txt @@ -2,7 +2,8 @@ Name:Feral Lightning ManaCost:3 R R R Types:Sorcery Text:Put three 3/1 red Elemental creature tokens with haste into play. Remove them from the game at end of turn. -K:spMakeToken<>3<>Elemental<>R 3 1 Elemental<>Controller<>R<>Creature;Elemental<>3<>1<>Haste;At the beginning of the end step, exile CARDNAME. +#K:spMakeToken<>3<>Elemental<>R 3 1 Elemental<>Controller<>R<>Creature;Elemental<>3<>1<>Haste;At the beginning of the end step, exile CARDNAME. +A:SP$Token|Cost$3 R R R|TokenAmount$3|TokenName$Elemental|TokenTypes$Creature,Elemental|TokenOwner$Controller|TokenColors$Red|TokenPower$3|TokenToughness$1|TokenKeywords$Haste<>At the beginning of the end step, exile CARDNAME. SVar:PlayMain1:TRUE SVar:Rarity:Uncommon SVar:Picture:http://resources.wizards.com/magic/cards/sok/en-us/card84373.jpg diff --git a/res/cardsfolder/goblin_offensive.txt b/res/cardsfolder/goblin_offensive.txt index 8c1b5feb4eb..d7f23d947e1 100644 --- a/res/cardsfolder/goblin_offensive.txt +++ b/res/cardsfolder/goblin_offensive.txt @@ -2,7 +2,8 @@ Name:Goblin Offensive ManaCost:X 1 R R Types:Sorcery Text:Put X 1/1 red Goblin creature tokens onto the battlefield. -K:spMakeToken<>X<>Goblin<>R 1 1 Goblin<>Controller<>R<>Creature;Goblin<>1<>1<>None +#K:spMakeToken<>X<>Goblin<>R 1 1 Goblin<>Controller<>R<>Creature;Goblin<>1<>1<>None +A:SP$Token|Cost$X 1 R R|TokenAmount$X|TokenName$Goblin|TokenTypes$Creature,Goblin|TokenOwner$Controller|TokenColors$Red|TokenPower$1|TokenToughness$1 SVar:X:Count$xPaid SVar:Rarity:Uncommon SVar:Picture:http://www.wizards.com/global/images/magic/general/goblin_offensive.jpg diff --git a/res/cardsfolder/goblin_scouts.txt b/res/cardsfolder/goblin_scouts.txt index a8f4f802e21..5687e88b4cb 100644 --- a/res/cardsfolder/goblin_scouts.txt +++ b/res/cardsfolder/goblin_scouts.txt @@ -2,7 +2,8 @@ Name:Goblin Scouts ManaCost:3 R R Types:Sorcery Text:Put three 1/1 red Goblin Scout creature tokens with mountainwalk onto the battlefield. -K:spMakeToken<>3<>Goblin Scout<>R 1 1 Goblin Scout<>Controller<>R<>Creature;Goblin;Scout<>1<>1<>Mountainwalk +#K:spMakeToken<>3<>Goblin Scout<>R 1 1 Goblin Scout<>Controller<>R<>Creature;Goblin;Scout<>1<>1<>Mountainwalk +A:SP$Token|Cost$3 R R|TokenAmount$3|TokenName$Goblin Scout|TokenTypes$Creature,Goblin,Scout|TokenOwner$Controller|TokenColors$Green|TokenPower$1|TokenToughness$1|TokenKeywords$Mountainwalk SVar:Rarity:Uncommon SVar:Picture:http://www.wizards.com/global/images/magic/general/goblin_scouts.jpg End diff --git a/res/cardsfolder/howl_of_the_night_pack.txt b/res/cardsfolder/howl_of_the_night_pack.txt index 451fff76c91..f282d84959b 100644 --- a/res/cardsfolder/howl_of_the_night_pack.txt +++ b/res/cardsfolder/howl_of_the_night_pack.txt @@ -2,7 +2,8 @@ Name:Howl of the Night Pack ManaCost:6 G Types:Sorcery Text:Put a 2/2 green Wolf creature token onto the battlefield for each Forest you control. -K:spMakeToken<>X<>Wolf<>G 2 2 Wolf<>Controller<>G<>Creature;Wolf<>2<>2<>None +#K:spMakeToken<>X<>Wolf<>G 2 2 Wolf<>Controller<>G<>Creature;Wolf<>2<>2<>None +A:SP$Token|Cost$6 G|TokenAmount$X|TokenName$Wolf|TokenTypes$Creature,Wolf|TokenOwner$Controller|TokenColors$Green|TokenPower$2|TokenToughness$2 SVar:X:Count$TypeYouCtrl.Forest SVar:Rarity:Uncommon SVar:Picture:http://www.wizards.com/global/images/magic/general/howl_of_the_night_pack.jpg diff --git a/res/cardsfolder/hunting_pack.txt b/res/cardsfolder/hunting_pack.txt index a47f44bf347..df5d2a0b548 100644 --- a/res/cardsfolder/hunting_pack.txt +++ b/res/cardsfolder/hunting_pack.txt @@ -2,7 +2,8 @@ Name:Hunting Pack ManaCost:5 G G Types:Instant Text:Put a 4/4 green Beast creature token onto the battlefield. -K:spMakeToken<>1<>Beast<>G 4 4 Beast<>Controller<>G<>Creature;Beast<>4<>4<>None +#K:spMakeToken<>1<>Beast<>G 4 4 Beast<>Controller<>G<>Creature;Beast<>4<>4<>None +A:SP$Token|Cost$3 G|TokenAmount$1|TokenName$Beast|TokenTypes$Creature,Beast|TokenOwner$Controller|TokenColors$Green|TokenPower$4|TokenToughness$4 K:Storm SVar:Rarity:Uncommon SVar:Picture:http://www.wizards.com/global/images/magic/general/hunting_pack.jpg diff --git a/res/cardsfolder/icatian_town.txt b/res/cardsfolder/icatian_town.txt index 02f654ad94b..04e69be8746 100644 --- a/res/cardsfolder/icatian_town.txt +++ b/res/cardsfolder/icatian_town.txt @@ -2,7 +2,8 @@ Name:Icatian Town ManaCost:5 W Types:Sorcery Text:Put four 1/1 white Citizen creature tokens onto the battlefield. -K:spMakeToken<>4<>Citizen<>W 1 1 Citizen<>Controller<>W<>Creature;Citizen<>1<>1<>None +#K:spMakeToken<>4<>Citizen<>W 1 1 Citizen<>Controller<>W<>Creature;Citizen<>1<>1<>None +A:SP$Token|Cost$5 W|TokenAmount$4|TokenName$Citizen|TokenTypes$Creature,Citizen|TokenOwner$Controller|TokenColors$White|TokenPower$1|TokenToughness$1 SVar:Rarity:Uncommon SVar:Picture:http://www.wizards.com/global/images/magic/general/icatian_town.jpg End diff --git a/res/cardsfolder/join_the_ranks.txt b/res/cardsfolder/join_the_ranks.txt index 7117ead4290..46e7f0ec60c 100644 --- a/res/cardsfolder/join_the_ranks.txt +++ b/res/cardsfolder/join_the_ranks.txt @@ -2,7 +2,8 @@ Name:Join the Ranks ManaCost:3 W Types:Instant Text:Put two 1/1 white Soldier Ally creature tokens onto the battlefield. -K:spMakeToken<>2<>Soldier Ally<>W 1 1 Soldier Ally<>Controller<>W<>Creature;Soldier;Ally<>1<>1<>None +#K:spMakeToken<>2<>Soldier Ally<>W 1 1 Soldier Ally<>Controller<>W<>Creature;Soldier;Ally<>1<>1<>None +A:SP$Token|Cost$3 W|TokenAmount$2|TokenName$Soldier Ally|TokenTypes$Creature,Soldier,Ally|TokenOwner$Controller|TokenColors$White|TokenPower$1|TokenToughness$1 SVar:PlayMain1:TRUE SVar:Rarity:Common SVar:Picture:http://www.wizards.com/global/images/magic/general/join_the_ranks.jpg diff --git a/res/cardsfolder/ordered_migration.txt b/res/cardsfolder/ordered_migration.txt index aa8ba8c349f..5475b5f8b72 100644 --- a/res/cardsfolder/ordered_migration.txt +++ b/res/cardsfolder/ordered_migration.txt @@ -2,7 +2,8 @@ Name:Ordered Migration ManaCost:3 W U Types:Sorcery Text:Domain — Put a 1/1 blue Bird creature token with flying onto the battlefield for each basic land type among lands you control. -K:spMakeToken<>X<>Bird<>U 1 1 Bird<>Controller<>U<>Creature;Bird<>1<>1<>Flying +#K:spMakeToken<>X<>Bird<>U 1 1 Bird<>Controller<>U<>Creature;Bird<>1<>1<>Flying +A:SP$Token|Cost$3 W U|TokenAmount$X|TokenName$Bird|TokenTypes$Creature,Bird|TokenOwner$Controller|TokenColors$Blue|TokenPower$1|TokenToughness$1|TokenKeywords$Flying SVar:X:Count$Domain SVar:Rarity:Uncommon SVar:Picture:http://www.wizards.com/global/images/magic/general/ordered_migration.jpg diff --git a/res/cardsfolder/raise_the_alarm.txt b/res/cardsfolder/raise_the_alarm.txt index 5b49498c6d3..2b7c3944813 100644 --- a/res/cardsfolder/raise_the_alarm.txt +++ b/res/cardsfolder/raise_the_alarm.txt @@ -2,7 +2,8 @@ Name:Raise the Alarm ManaCost:1 W Types:Instant Text:Put two 1/1 white Soldier creature tokens into play. -K:spMakeToken<>2<>Soldier<>W 1 1 Soldier<>Controller<>W<>Creature;Soldier<>1<>1<>None +#K:spMakeToken<>2<>Soldier<>W 1 1 Soldier<>Controller<>W<>Creature;Soldier<>1<>1<>None +A:SP$Token|Cost$1 W|TokenAmount$2|TokenName$Soldier|TokenTypes$Creature,Soldier|TokenOwner$Controller|TokenColors$White|TokenPower$1|TokenToughness$1 SVar:Rarity:Common SVar:Picture:http://resources.wizards.com/magic/cards/mrd/en-us/card48103.jpg End diff --git a/res/cardsfolder/reach_of_branches.txt b/res/cardsfolder/reach_of_branches.txt index 73b116997e8..032c6a90a73 100644 --- a/res/cardsfolder/reach_of_branches.txt +++ b/res/cardsfolder/reach_of_branches.txt @@ -2,7 +2,8 @@ Name:Reach of Branches ManaCost:4 G Types:Tribal Instant Treefolk Text:Put a 2/5 green Treefolk Shaman creature token into play. -K:spMakeToken<>1<>Treefolk Shaman<>G 2 5 Treefolk Shaman<>Controller<>G<>Creature;Treefolk;Shaman<>2<>5<>None +#K:spMakeToken<>1<>Treefolk Shaman<>G 2 5 Treefolk Shaman<>Controller<>G<>Creature;Treefolk;Shaman<>2<>5<>None +A:SP$Token|Cost$4 G|TokenAmount$1|TokenName$Treefolk Shaman|TokenTypes$Creature,Treefolk,Shaman|TokenOwner$Controller|TokenColors$Green|TokenPower$2|TokenToughness$5 K:WheneverKeyword:EntersBattleField:Type/Forest:Graveyard:MoveFrom-Graveyard-Hand:Self:ASAP:Yes_No:Initiator - OwnedByController:Whenever a Forest enters the battlefield under your control, you may return Reach of Branches from your graveyard to your hand. SVar:Rarity:Rare SVar:Picture:http://www.wizards.com/global/images/magic/general/reach_of_branches.jpg diff --git a/res/cardsfolder/roar_of_the_wurm.txt b/res/cardsfolder/roar_of_the_wurm.txt index 86ef17882af..6d2032294b6 100644 --- a/res/cardsfolder/roar_of_the_wurm.txt +++ b/res/cardsfolder/roar_of_the_wurm.txt @@ -2,7 +2,8 @@ Name:Roar of the Wurm ManaCost:6 G Types:Sorcery Text:Put a 6/6 green Wurm creature token onto the battlefield. -K:spMakeToken<>1<>Wurm<>G 6 6 Wurm<>Controller<>G<>Creature;Wurm<>6<>6<>None +#K:spMakeToken<>1<>Wurm<>G 6 6 Wurm<>Controller<>G<>Creature;Wurm<>6<>6<>None +A:SP$Token|Cost$6 G|TokenAmount$1|TokenName$Wurm|TokenTypes$Creature,Wurm|TokenOwner$Controller|TokenColors$Green|TokenPower$6|TokenToughness$6 K:Flashback:3 G SVar:Rarity:Uncommon SVar:Picture:http://www.wizards.com/global/images/magic/general/roar_of_the_wurm.jpg diff --git a/res/cardsfolder/skittering_invasion.txt b/res/cardsfolder/skittering_invasion.txt index 74d0a4151d2..4980cae81e9 100644 --- a/res/cardsfolder/skittering_invasion.txt +++ b/res/cardsfolder/skittering_invasion.txt @@ -2,7 +2,8 @@ Name:Skittering Invasion ManaCost:7 Types:Tribal Sorcery Eldrazi Text:Put five 0/1 colorless Eldrazi Spawn creature tokens onto the battlefield. They have "Sacrifice this creature: Add 1 to your mana pool." -K:spMakeToken<>5<>Eldrazi Spawn<>C 0 1 Eldrazi Spawn<>Controller<>""<>Creature;Eldrazi;Spawn<>0<>1<>Sacrifice CARDNAME: Add 1 to your mana pool. +#K:spMakeToken<>5<>Eldrazi Spawn<>C 0 1 Eldrazi Spawn<>Controller<>""<>Creature;Eldrazi;Spawn<>0<>1<>Sacrifice CARDNAME: Add 1 to your mana pool. +A:SP$Token|Cost$7|TokenAmount$5|TokenName$Eldrazi Spawn|TokenTypes$Creature,Eldrazi,Spawn|TokenOwner$Controller|TokenColors$Green|TokenPower$0|TokenToughness$1|TokenKeywords$Sacrifice CARDNAME: Add 1 to your mana pool. SVar:Rarity:Uncommon SVar:Picture:http://www.wizards.com/global/images/magic/general/skittering_invasion.jpg End diff --git a/res/cardsfolder/sosukes_summons.txt b/res/cardsfolder/sosukes_summons.txt index f37255cdaf2..a449287725b 100644 --- a/res/cardsfolder/sosukes_summons.txt +++ b/res/cardsfolder/sosukes_summons.txt @@ -2,7 +2,8 @@ Name:Sosuke's Summons ManaCost:2 G Types:Sorcery Text:Put two 1/1 green Snake creature tokens onto the battlefield.\r\nWhenever a nontoken Snake enters the battlefield under your control, you may return Sosuke's Summons from your graveyard to your hand. -K:spMakeToken<>2<>Snake<>G 1 1 Snake<>Controller<>G<>Creature;Snake<>1<>1<>None +#K:spMakeToken<>2<>Snake<>G 1 1 Snake<>Controller<>G<>Creature;Snake<>1<>1<>None +A:SP$Token|Cost$2 G|TokenAmount$2|TokenName$Snake|TokenTypes$Creature,Snake|TokenOwner$Controller|TokenColors$Green|TokenPower$1|TokenToughness$1 SVar:Rarity:Uncommon SVar:Picture:http://www.wizards.com/global/images/magic/general/sosukes_summons.jpg End diff --git a/res/cardsfolder/sound_the_call.txt b/res/cardsfolder/sound_the_call.txt index 8ee7b59c1e7..90e1aea713f 100644 --- a/res/cardsfolder/sound_the_call.txt +++ b/res/cardsfolder/sound_the_call.txt @@ -2,7 +2,8 @@ Name:Sound the Call ManaCost:2 G Types:Sorcery Text:Put a 1/1 green Wolf creature token onto the battlefield. It has "This creature gets +1/+1 for each card named Sound the Call in each graveyard." -K:spMakeToken<>1<>Wolf<>G 1 1 Wolf<>Controller<>G<>Creature;Wolf<>1<>1<>This creature gets +1/+1 for each card named Sound the Call in each graveyard. +#K:spMakeToken<>1<>Wolf<>G 1 1 Wolf<>Controller<>G<>Creature;Wolf<>1<>1<>This creature gets +1/+1 for each card named Sound the Call in each graveyard. +A:SP$Token|Cost$2 G|TokenAmount$1|TokenName$Wolf|TokenTypes$Creature,Wolf|TokenOwner$Controller|TokenColors$Green|TokenPower$1|TokenToughness$1|TokenKeywords$This creature gets +1/+1 for each card named Sound the Call in each graveyard. SVar:Rarity:Common SVar:Picture:http://www.wizards.com/global/images/magic/general/sound_the_call.jpg End diff --git a/res/cardsfolder/spectral_procession.txt b/res/cardsfolder/spectral_procession.txt index 75bdf1e42c5..ea096f40b18 100644 --- a/res/cardsfolder/spectral_procession.txt +++ b/res/cardsfolder/spectral_procession.txt @@ -2,7 +2,8 @@ Name:Spectral Procession ManaCost:2/W 2/W 2/W Types:Sorcery Text:Put three 1/1 white Spirit creature tokens with flying into play. -K:spMakeToken<>3<>Spirit<>W 1 1 Spirit<>Controller<>W<>Creature;Spirit<>1<>1<>Flying +#K:spMakeToken<>3<>Spirit<>W 1 1 Spirit<>Controller<>W<>Creature;Spirit<>1<>1<>Flying +A:SP$Token|Cost$2/W 2/W 2/W|TokenAmount$3|TokenName$Spirit|TokenTypes$Creature,Spirit|TokenOwner$Controller|TokenColors$White|TokenPower$1|TokenToughness$1|TokenKeywords$Flying SVar:Rarity:Uncommon SVar:Picture:http://www.wizards.com/global/images/magic/general/spectral_procession.jpg End diff --git a/res/cardsfolder/spontaneous_generation.txt b/res/cardsfolder/spontaneous_generation.txt index b4a2b984414..d7fab2acd83 100644 --- a/res/cardsfolder/spontaneous_generation.txt +++ b/res/cardsfolder/spontaneous_generation.txt @@ -2,7 +2,8 @@ Name:Spontaneous Generation ManaCost:3 G Types:Sorcery Text:Put a 1/1 green Saproling creature token onto the battlefield for each card in your hand. -K:spMakeToken<>X<>Saproling<>G 1 1 Saproling<>Controller<>G<>Creature;Saproling<>1<>1<>None +#K:spMakeToken<>X<>Saproling<>G 1 1 Saproling<>Controller<>G<>Creature;Saproling<>1<>1<>None +A:SP$Token|Cost$3 G|TokenAmount$X|TokenName$Saproling|TokenTypes$Creature,Saproling|TokenOwner$Controller|TokenColors$Green|TokenPower$1|TokenToughness$1 SVar:X:Count$InYourHand SVar:Rarity:Rare SVar:Picture:http://www.wizards.com/global/images/magic/general/spontaneous_generation.jpg diff --git a/res/cardsfolder/spore_burst.txt b/res/cardsfolder/spore_burst.txt index 41de277a869..51339af1a8b 100644 --- a/res/cardsfolder/spore_burst.txt +++ b/res/cardsfolder/spore_burst.txt @@ -2,7 +2,8 @@ Name:Spore Burst ManaCost:3 G Types:Sorcery Text:Domain — Put a 1/1 green Saproling creature token onto the battlefield for each basic land type among lands you control. -K:spMakeToken<>X<>Saproling<>G 1 1 Saproling<>Controller<>G<>Creature;Saproling<>1<>1<>None +#K:spMakeToken<>X<>Saproling<>G 1 1 Saproling<>Controller<>G<>Creature;Saproling<>1<>1<>None +A:SP$Token|Cost$3 G|TokenAmount$X|TokenName$Saproling|TokenTypes$Creature,Saproling|TokenOwner$Controller|TokenColors$Green|TokenPower$1|TokenToughness$1 SVar:X:Count$Domain SVar:Rarity:Uncommon SVar:Picture:http://www.wizards.com/global/images/magic/general/spore_burst.jpg diff --git a/res/cardsfolder/sprout.txt b/res/cardsfolder/sprout.txt index 659da42ace3..5ea8e7a6296 100644 --- a/res/cardsfolder/sprout.txt +++ b/res/cardsfolder/sprout.txt @@ -2,7 +2,8 @@ Name:Sprout ManaCost:G Types:Instant Text:Put a 1/1 green Saproling creature token onto the battlefield. -K:spMakeToken<>1<>Saproling<>G 1 1 Saproling<>Controller<>G<>Creature;Saproling<>1<>1<>None +#K:spMakeToken<>1<>Saproling<>G 1 1 Saproling<>Controller<>G<>Creature;Saproling<>1<>1<>None +A:SP$Token|Cost$2 G|TokenAmount$1|TokenName$Saproling|TokenTypes$Creature,Saproling|TokenOwner$Controller|TokenColors$Green|TokenPower$1|TokenToughness$1 SVar:Rarity:Common SVar:Picture:http://www.wizards.com/global/images/magic/general/sprout.jpg End diff --git a/res/cardsfolder/storm_herd.txt b/res/cardsfolder/storm_herd.txt index ec21f18cc1d..25ab87bf14e 100644 --- a/res/cardsfolder/storm_herd.txt +++ b/res/cardsfolder/storm_herd.txt @@ -2,7 +2,8 @@ Name:Storm Herd ManaCost:8 W W Types:Sorcery Text:Put X 1/1 white Pegasus creature tokens with flying into play, where X is your life total. -K:spMakeToken<>X<>Pegasus<>W 1 1 Pegasus<>Controller<>W<>Creature;Pegasus<>1<>1<>None +#K:spMakeToken<>X<>Pegasus<>W 1 1 Pegasus<>Controller<>W<>Creature;Pegasus<>1<>1<>None +A:SP$Token|Cost$8 W W|TokenAmount$X|TokenName$Pegasus|TokenTypes$Creature,Pegasus|TokenOwner$Controller|TokenColors$White|TokenPower$1|TokenToughness$1 SVar:X:Count$YourLifeTotal SVar:Rarity:Rare SVar:Picture:http://resources.wizards.com/magic/cards/gpt/en-us/card96968.jpg diff --git a/res/cardsfolder/tidal_wave.txt b/res/cardsfolder/tidal_wave.txt index eec571305d1..a444f05c62b 100644 --- a/res/cardsfolder/tidal_wave.txt +++ b/res/cardsfolder/tidal_wave.txt @@ -2,7 +2,8 @@ Name:Tidal Wave ManaCost:2 U Types:Instant Text:Put a 5/5 blue Wall creature token with defender onto the battlefield. Sacrifice it at the beginning of the next end step. -K:spMakeToken<>1<>Wall<>U 5 5 Wall<>Controller<>U<>Creature;Wall<>3<>1<>Defender;At the beginning of the end step, sacrifice CARDNAME. +#K:spMakeToken<>1<>Wall<>U 5 5 Wall<>Controller<>U<>Creature;Wall<>3<>1<>Defender;At the beginning of the end step, sacrifice CARDNAME. +A:SP$Token|Cost$2 U|TokenAmount$1|TokenName$Wall|TokenTypes$Creature,Wall|TokenOwner$Controller|TokenColors$Green|TokenPower$5|TokenToughness$5|TokenKeywords$Defender<>At the beginning of the end step, sacrifice CARDNAME. SVar:RemAIDeck:True SVar:Rarity:Uncommon SVar:Picture:http://www.wizards.com/global/images/magic/general/tidal_wave.jpg diff --git a/res/cardsfolder/waylay.txt b/res/cardsfolder/waylay.txt index 9cc06695fc4..b861cc5fd85 100644 --- a/res/cardsfolder/waylay.txt +++ b/res/cardsfolder/waylay.txt @@ -2,7 +2,8 @@ Name:Waylay ManaCost:2 W Types:Instant Text:Put three 2/2 white Knight creature tokens onto the battlefield. Exile them at the beginning of the next cleanup step. -K:spMakeToken<>3<>Knight<>W 2 2 Knight<>Controller<>W<>Creature;Knight<>2<>2<>At the beginning of the end step, exile CARDNAME. +#K:spMakeToken<>3<>Knight<>W 2 2 Knight<>Controller<>W<>Creature;Knight<>2<>2<>At the beginning of the end step, exile CARDNAME. +A:SP$Token|Cost$2 W|TokenAmount$3|TokenName$Knight|TokenTypes$Creature,Knight|TokenOwner$Controller|TokenColors$White|TokenPower$2|TokenToughness$2|TokenKeywords$At the beginning of the end step, exile CARDNAME. SVar:RemAIDeck:True SVar:Rarity:Uncommon SVar:Picture:http://www.wizards.com/global/images/magic/general/waylay.jpg diff --git a/src/forge/AbilityFactory.java b/src/forge/AbilityFactory.java index 650e073d8b5..830fe54dc7e 100644 --- a/src/forge/AbilityFactory.java +++ b/src/forge/AbilityFactory.java @@ -296,6 +296,40 @@ public class AbilityFactory { } } + if(API.equals("Token")){ + AbilityFactory_Token AFT = new AbilityFactory_Token(); + + String numTokens,numPower,numToughness; + String[] keywords; + + if(!mapParams.get("TokenAmount").matches("[0-9][0-9]?")) //It's an X-value. + numTokens = getHostCard().getSVar(mapParams.get("TokenAmount")); + else + numTokens = mapParams.get("TokenAmount"); + + if(!mapParams.get("TokenPower").matches("[0-9][0-9]?")) + numPower = getHostCard().getSVar(mapParams.get("TokenPower")); + else + numPower = mapParams.get("TokenPower"); + + if(!mapParams.get("TokenToughness").matches("[0-9][0-9]?")) + numToughness = getHostCard().getSVar(mapParams.get("TokenToughness")); + else + numToughness = mapParams.get("TokenToughness"); + + if(mapParams.containsKey("TokenKeywords")) { + keywords = mapParams.get("TokenKeywords").split("<>"); + } + else { + keywords = new String[0]; + } + + if(isAb) + SA = AFT.getAbility(this, numTokens, mapParams.get("TokenName"), mapParams.get("TokenTypes").split(","), mapParams.get("TokenOwner"), mapParams.get("TokenColors").split(","), numPower, numToughness, keywords ); + if(isSp) + SA = AFT.getSpell(this, numTokens, mapParams.get("TokenName"), mapParams.get("TokenTypes").split(","), mapParams.get("TokenOwner"), mapParams.get("TokenColors").split(","), numPower, numToughness, keywords); + } + // ********************************************* // set universal properties of the SpellAbility if (hasSpDesc) diff --git a/src/forge/AbilityFactory_Token.java b/src/forge/AbilityFactory_Token.java new file mode 100644 index 00000000000..f18ab98a10a --- /dev/null +++ b/src/forge/AbilityFactory_Token.java @@ -0,0 +1,208 @@ +package forge; + +public class AbilityFactory_Token extends AbilityFactory { + private AbilityFactory AF = null; + + private String tokenAmount; + private String tokenName; + private String[] tokenTypes; + private String tokenOwner; + private String[] tokenColors; + private String[] tokenKeywords; + private String tokenPower; + private String tokenToughness; + + public SpellAbility getAbility(final AbilityFactory af,final String numTokens,final String name,final String[] types,final String owner,final String[] colors,final String power,final String toughness,final String[] keywords) + { + AF = af; + tokenAmount = numTokens; + tokenName = name; + tokenTypes = types; + tokenOwner = owner; + tokenColors = colors; + tokenPower = power; + tokenToughness = toughness; + tokenKeywords = keywords; + + final SpellAbility abToken = new Ability_Activated(AF.getHostCard(),AF.getAbCost(),AF.getAbTgt()) + { + private static final long serialVersionUID = 8460074843405764620L; + + @Override + public boolean canPlay() { + return super.canPlay(); + } + + @Override + public boolean canPlayAI() { + return true; + } + + @Override + public void resolve() { + doResolve(this); + AF.getHostCard().setAbilityUsed(AF.getHostCard().getAbilityUsed() + 1); + } + + @Override + public String getStackDescription() { + return doStackDescription(); + } + }; + + return abToken; + } + + public SpellAbility getSpell(final AbilityFactory af,final String numTokens,final String name,final String[] types,final String owner,final String[] colors,final String power,final String toughness,final String[] keywords) + { + AF = af; + tokenAmount = numTokens; + tokenName = name; + tokenTypes = types; + tokenOwner = owner; + tokenColors = colors; + tokenPower = power; + tokenToughness = toughness; + tokenKeywords = keywords; + + final SpellAbility spToken = new Spell(AF.getHostCard(),AF.getAbCost(),AF.getAbTgt()) + { + private static final long serialVersionUID = -8041427947613029670L; + + @Override + public boolean canPlay() { + return super.canPlay(); + } + + @Override + public boolean canPlayAI() { + return true; + } + + @Override + public void resolve() { + doResolve(this); + } + + @Override + public String getStackDescription() { + return doStackDescription(); + } + }; + + return spToken; + } + + private String doStackDescription() { + int finalPower,finalToughness,finalAmount; + + if(tokenPower.matches("[0-9][0-9]?")) { + finalPower = Integer.parseInt(tokenPower); + } + else { + finalPower = CardFactoryUtil.xCount(AF.getHostCard(), tokenPower); + } + + if(tokenToughness.matches("[0-9][0-9]?")) { + finalToughness = Integer.parseInt(tokenToughness); + } + else { + finalToughness = CardFactoryUtil.xCount(AF.getHostCard(), tokenToughness); + } + + if(tokenAmount.matches("[0-9][0-9]?")) { + finalAmount = Integer.parseInt(tokenAmount); + } + else { + finalAmount = CardFactoryUtil.xCount(AF.getHostCard(),tokenAmount); + } + + StringBuilder sb = new StringBuilder(); + + sb.append(AF.getHostCard().getName()); + sb.append(" - Put ").append(finalAmount).append(" ").append(finalPower).append("/").append(finalToughness).append(" ").append(tokenName).append(" tokens onto the battlefield"); + + if(tokenOwner.equals("Opponent")) { + sb.append(" under your opponent's control."); + } + else { + sb.append("."); + } + + return sb.toString(); + } + + private void doResolve(SpellAbility sa) { + String imageName = ""; + Player controller; + String cost = ""; + //Construct colors + String colorDesc = ""; + for(String col : tokenColors) { + if(col.equals("White")) { + colorDesc += "W"; + } + else if(col.equals("Blue")) { + colorDesc += "U"; + } + else if(col.equals("Black")) { + colorDesc += "B"; + } + else if(col.equals("Red")) { + colorDesc += "R"; + } + else if(col.equals("Green")) { + colorDesc += "G"; + } + else if(col.equals("Colorless")) { + colorDesc = "C"; + } + } + + imageName += colorDesc + " " + tokenPower + " " + tokenToughness + " " + tokenName; + System.out.println("AF_Token imageName = " + imageName); + + for(char c : colorDesc.toCharArray()) { + cost += c + ' '; + } + + cost = colorDesc.replace('C', '1').trim(); + + if(tokenOwner.equals("Controller")) { + controller = AF.getHostCard().getController(); + } + else { + controller = AF.getHostCard().getController().getOpponent(); + } + + int finalPower = 0; + int finalToughness = 0; + int finalAmount = 0; + + if(tokenPower.matches("[0-9][0-9]?")) { + finalPower = Integer.parseInt(tokenPower); + } + else { + finalPower = CardFactoryUtil.xCount(AF.getHostCard(), tokenPower); + } + + if(tokenToughness.matches("[0-9][0-9]?")) { + finalToughness = Integer.parseInt(tokenToughness); + } + else { + finalToughness = CardFactoryUtil.xCount(AF.getHostCard(), tokenToughness); + } + + if(tokenAmount.matches("[0-9][0-9]?")) { + finalAmount = Integer.parseInt(tokenAmount); + } + else { + finalAmount = CardFactoryUtil.xCount(AF.getHostCard(),tokenAmount); + } + + for(int i=0;i