diff --git a/projects/mtg/bin/Res/sets/10E/_cards.dat b/projects/mtg/bin/Res/sets/10E/_cards.dat index 945cf42ab..35780f783 100644 --- a/projects/mtg/bin/Res/sets/10E/_cards.dat +++ b/projects/mtg/bin/Res/sets/10E/_cards.dat @@ -114,8 +114,8 @@ type=Land [card] text=Flying (This creature can't be blocked except by creatures with flying or reach.) Other black creatures get +1/+1. Nonblack creatures get -1/-1. abilities=Legendary, flying -auto=lord(creature[black]) 1/1 -auto=lord(creature[-black]) -1/-1 includeself +auto=lord(creature[black]) 1/1 other +auto=lord(creature[-black]) -1/-1 id=106525 name=Ascendant Evincar rarity=R @@ -474,8 +474,8 @@ toughness=5 [card] text=Other Elf creatures get +1/+1 and have forestwalk. (They're unblockable as long as defending player controls a Forest.) id=129534 -auto=lord(elf) 1/1 -auto=lord(elf) forestwalk +auto=lord(elf) 1/1 other +auto=lord(elf) forestwalk other name=Elvish Champion rarity=R color=Green @@ -537,8 +537,8 @@ toughness=2 [card] text=Other Soldier creatures get +1/+1 and have first strike. (They deal combat damage before creatures without first strike.) id=135258 -auto=lord(soldier) 1/1 -auto=lord(soldier) first strike +auto=lord(soldier) 1/1 other +auto=lord(soldier) first strike other name=Field Marshal rarity=R color=White @@ -689,7 +689,7 @@ toughness=4 [/card] [card] text=Creatures you control get +1/+1. -auto=lord(creature|myinplay) 1/1 includeself +auto=lord(creature|myinplay) 1/1 id=129572 name=Glorious Anthem rarity=R @@ -700,8 +700,8 @@ mana={1}{W}{W} [card] text=Other Goblin creatures get +1/+1 and have mountainwalk. (They're unblockable as long as defending player controls a Mountain.) id=129578 -auto=lord(goblin) 1/1 -auto=lord(goblin) mountainwalk +auto=lord(goblin) 1/1 other +auto=lord(goblin) mountainwalk other name=Goblin King rarity=R color=Red @@ -1030,7 +1030,7 @@ toughness=7 [/card] [card] text=Other Zombie creatures get +1/+1. {1}{B}, {T}: Return target Zombie card from your graveyard to your hand. -auto=lord(zombie) 1/1 +auto=lord(zombie) 1/1 other auto={1}{B}{T}:moveTo(myhand) target(zombie|mygraveyard) id=129629 name=Lord of the Undead @@ -1167,7 +1167,7 @@ toughness=3 [card] text=Soldier creatures have vigilance. (Attacking doesn't cause them to tap.) {2}{W}: Put a 1/1 white Soldier creature token into play. auto={2}{W}:token(Soldier,creature soldier, 1/1,white) -auto=lord(soldier) vigilance includeself +auto=lord(soldier) vigilance id=129716 name=Mobilization rarity=R @@ -1191,7 +1191,7 @@ toughness=1 [card] text=Trample (If this creature would deal enough combat damage to its blockers to destroy them, you may have it deal the rest of its damage to defending player.) Molimo, Maro-Sorcerer's power and toughness are equal to the number of lands you control. abilities=trample, legendary -auto=foreach(land|myinplay) 1/1 includeself +auto=foreach(land|myinplay) 1/1 id=106368 name=Molimo, Maro-Sorcerer rarity=R @@ -1460,7 +1460,7 @@ subtype=Plains [/card] [card] text=Creatures you control have trample. (If a creature you control would deal enough combat damage to its blockers to destroy them, you may have it deal the rest of its damage to defending player.) -auto=lord(creature|myinplay) trample includeself +auto=lord(creature|myinplay) trample id=136288 name=Primal Rage rarity=U @@ -1556,7 +1556,7 @@ subtype=Aura [card] text=Relentless Rats gets +1/+1 for each other creature in play named Relentless Rats. A deck can have any number of cards named Relentless Rats. id=135236 -auto=foreach(relentless rats) 1/1 +auto=foreach(relentless rats) 1/1 other name=Relentless Rats rarity=U color=Black @@ -1690,7 +1690,7 @@ toughness=2 [card] text=Scion of the Wild's power and toughness are each equal to the number of creatures you control. id=130504 -auto=foreach(creature|myinplay) 1/1 includeself +auto=foreach(creature|myinplay) 1/1 name=Scion of the Wild rarity=R color=Green @@ -1701,6 +1701,16 @@ subtype=Avatar toughness=* [/card] [card] +text=Discard a land card: Seismic Assault deals 2 damage to target creature or player. +auto={S(land|myhand)}:damage 2 target(creature,player) +id=129884 +name=Seismic Assault +rarity=R +color=Red +type=Enchantment +mana={R}{R}{R} +[/card] +[card] text=Flying, vigilance (This creature can't be blocked except by creatures with flying or reach, and attacking doesn't cause this creature to tap.) abilities=flying,vigilance id=129726 @@ -2275,7 +2285,7 @@ type=Land [/card] [card] text=Yavimaya Enchantress gets +1/+1 for each enchantment in play. -auto=foreach(enchantment) 1/1 includeself +auto=foreach(enchantment) 1/1 id=130515 name=Yavimaya Enchantress rarity=U diff --git a/projects/mtg/bin/Res/sets/10E/todo.dat b/projects/mtg/bin/Res/sets/10E/todo.dat index 120d8af2b..68d0c77c4 100644 --- a/projects/mtg/bin/Res/sets/10E/todo.dat +++ b/projects/mtg/bin/Res/sets/10E/todo.dat @@ -1420,15 +1420,7 @@ power=2 subtype=Spirit toughness=4 [/card] -[card] -text=Discard a land card: Seismic Assault deals 2 damage to target creature or player. -id=129884 -name=Seismic Assault -rarity=R -color=Red -type=Enchantment -mana={R}{R}{R} -[/card] + [card] text=Flying (This creature can't be blocked except by creatures with flying or reach.) Whenever a creature dealt damage by Sengir Vampire this turn is put into a graveyard, put a +1/+1 counter on Sengir Vampire. id=129724 diff --git a/projects/mtg/bin/Res/sets/ALA/_cards.dat b/projects/mtg/bin/Res/sets/ALA/_cards.dat index 9c18eee09..e7a688529 100644 --- a/projects/mtg/bin/Res/sets/ALA/_cards.dat +++ b/projects/mtg/bin/Res/sets/ALA/_cards.dat @@ -472,8 +472,8 @@ mana={2}{W} [card] text=Master of Etherium's power and toughness are each equal to the number of artifacts you control. Other artifact creatures you control get +1/+1. id=175114 -auto=lord(creature[artifact]|myinplay) 1/1 -auto=foreach(artifact|myinplay) 1/1 includeself +auto=lord(creature[artifact]|myinplay) 1/1 other +auto=foreach(artifact|myinplay) 1/1 name=Master of Etherium rarity=R type=Artifact Creature diff --git a/projects/mtg/bin/Res/sets/EVE/_cards.dat b/projects/mtg/bin/Res/sets/EVE/_cards.dat index 5a3142540..5a9005590 100644 --- a/projects/mtg/bin/Res/sets/EVE/_cards.dat +++ b/projects/mtg/bin/Res/sets/EVE/_cards.dat @@ -244,7 +244,7 @@ toughness=1 [/card] [card] text=Flying Attacking creatures you control get +2/+0. -auto=lord(creature[attacking]|myinplay) 2/0 includeself +auto=lord(creature[attacking]|myinplay) 2/0 abilities=flying id=154258 name=Nobilis of War diff --git a/projects/mtg/bin/Res/sets/ICE/todo.dat b/projects/mtg/bin/Res/sets/ICE/todo.dat index 24e39351c..de28570a7 100644 --- a/projects/mtg/bin/Res/sets/ICE/todo.dat +++ b/projects/mtg/bin/Res/sets/ICE/todo.dat @@ -670,7 +670,7 @@ subtype=aura text=Target creature gets +2/+2 as long as any opponent controls any black cards. That creature cannot be blocked by black creatures. id=2666 target=creature -auto=:2/2 +auto=aslongas(*[black]|opponentinplay) 2/2 auto=protection from black name=Black Scarab rarity=U @@ -689,6 +689,7 @@ type=Enchantment mana={W} subtype=aura [/card] + [card] text=Cumulative Upkeep: {R} Target creature's controller cannot cast summon spells. id=2613 diff --git a/projects/mtg/bin/Res/sets/LRW/_cards.dat b/projects/mtg/bin/Res/sets/LRW/_cards.dat index 4be296603..1137eade6 100644 --- a/projects/mtg/bin/Res/sets/LRW/_cards.dat +++ b/projects/mtg/bin/Res/sets/LRW/_cards.dat @@ -231,7 +231,7 @@ toughness=5 [/card] [card] text=Other Elf creatures you control get +1/+1. {G}, {T}: Put a 1/1 green Elf Warrior creature token into play. -auto=lord(elf) 1/1 +auto=lord(elf) 1/1 other auto={G}{T}:token(Elf Warrior,creature Elf Warrior,1/1,green) id=139683 name=Imperious Perfect @@ -443,8 +443,8 @@ subtype=Aura [card] text=Flash Flying Other Faerie creatures you control get +1/+1. Other Faeries you control have shroud. (A permanent with shroud can't be the target of spells or abilities.) abilities=flash,flying -auto=lord(faerie) 1/1 -auto=lord(faerie) shroud +auto=lord(faerie) 1/1 other +auto=lord(faerie) shroud other id=139741 name=Scion of Oona rarity=R @@ -507,8 +507,8 @@ toughness=2 [/card] [card] text=Other Giant creatures you control get +2/+2 and have trample. -auto=lord(giant) 2/2 -auto=lord(giant) trample +auto=lord(giant) 2/2 other +auto=lord(giant) trample other id=139667 name=Sunrise Sovereign rarity=R @@ -593,7 +593,7 @@ subtype=Aura [/card] [card] text=Other Kithkin creatures you control get +1/+1. -auto=lord(kithkin) 1/1 +auto=lord(kithkin) 1/1 other id=139716 name=Wizened Cenn rarity=U diff --git a/projects/mtg/bin/Res/sets/MIR/_cards.dat b/projects/mtg/bin/Res/sets/MIR/_cards.dat index 849677fc5..21040426a 100644 --- a/projects/mtg/bin/Res/sets/MIR/_cards.dat +++ b/projects/mtg/bin/Res/sets/MIR/_cards.dat @@ -1029,18 +1029,6 @@ mana={3}{R}{R} rarity=U [/card] [card] -text={R},{T},Sacrifice a Goblin: Red creatures get +1/+1 until end of turn. -id=3450 -name=Goblin Soothsayer -type=Creature -subtype=Goblin Shaman -auto={R}{T}{S(goblin|myinplay)}:lord(creature[red]) 1/1 -mana={R} -power=1 -toughness=1 -rarity=U -[/card] -[card] text=Rampage 1 (For each creature assigned to block it beyond the first, this creature gets +1/+1 until end of turn.) id=3252 name=Horrible Hordes @@ -1059,7 +1047,7 @@ name=Zuberi, Golden Feather abilities=Flying,legendary type=Creature subtype=Griffin -auto=lord(griffin) 1/1 +auto=lord(griffin) 1/1 other mana={4}{W} power=3 toughness=3 diff --git a/projects/mtg/bin/Res/sets/MRD/_cards.dat b/projects/mtg/bin/Res/sets/MRD/_cards.dat index dbd95b352..e33578ad0 100644 --- a/projects/mtg/bin/Res/sets/MRD/_cards.dat +++ b/projects/mtg/bin/Res/sets/MRD/_cards.dat @@ -48,7 +48,7 @@ abilities=flying [/card] [card] text=Creatures you control get +0/+1. Sacrifice Angelic Shield: Return target creature to its owner's hand. -auto=lord(creature|myinplay) 0/1 includeself +auto=lord(creature|myinplay) 0/1 auto={s}:moveTo(ownerhand) target(creature) id=23177 name=Angelic Shield @@ -242,7 +242,7 @@ toughness=3 [card] text=Protection from black Crusading Knight gets +1/+1 for each Swamp your opponents control. id=22963 -auto=foreach(name:Swamp) +auto=foreach(swamp|opponentinplay) 1/1 name=Crusading Knight colour=White rarity=R @@ -342,7 +342,7 @@ toughness=2 [/card] [card] text=Creatures you control have haste. Sacrifice Fires of Yavimaya: Target creature gets +2/+2 until end of turn. -auto=lord(creature|myinplay) haste includeself +auto=lord(creature|myinplay) haste auto={s}:2/2 target(creature) id=23180 name=Fires of Yavimaya @@ -638,7 +638,7 @@ abilities=flying [card] text=Protection from white Marauding Knight gets +1/+1 for each Plains your opponents control. id=23053 -auto=foreach(name:Plains) +auto=foreach(plains|opponentinplay) 1/1 name=Marauding Knight colour=Black rarity=R @@ -1213,7 +1213,7 @@ type=Artifact [/card] [card] text=Other black creatures get -1/-1 -auto=lord(creature[black]) -1/-1 +auto=lord(creature[black]) -1/-1 other id=23035 name=Urborg Shambler colour=Black diff --git a/projects/mtg/bin/Res/sets/RV/_cards.dat b/projects/mtg/bin/Res/sets/RV/_cards.dat index 7dec6c88a..874971ba5 100644 --- a/projects/mtg/bin/Res/sets/RV/_cards.dat +++ b/projects/mtg/bin/Res/sets/RV/_cards.dat @@ -108,7 +108,7 @@ toughness=2 [/card] [card] text=Black creatures get +1/+1. -auto=lord(creature[black]) 1/1 includeself +auto=lord(creature[black]) 1/1 id=1144 name=Bad Moon rarity=R @@ -426,7 +426,7 @@ mana={G} [/card] [card] text=White creatures get +1/+1. -auto=lord(creature[white]) 1/1 includeself +auto=lord(creature[white]) 1/1 id=1341 name=Crusade rarity=R @@ -864,8 +864,8 @@ toughness=1 [card] text=Other Goblin creatures get +1/+1 and have mountainwalk. (They're unblockable as long as defending player controls a Mountain.) id=1296 -auto=lord(goblin) 1/1 -auto=lord(goblin) mountainwalk +auto=lord(goblin) 1/1 other +auto=lord(goblin) mountainwalk other name=Goblin King rarity=R type=Creature @@ -1158,7 +1158,7 @@ mana={2}{W}{W} [card] text=Keldon Warlord's power and toughness are each equal to the number of non-Wall creatures you control. id=1301 -auto=foreach(creature[-wall]|myinplay) 1/1 includeself +auto=foreach(creature[-wall]|myinplay) 1/1 name=Keldon Warlord rarity=U type=Creature @@ -1169,6 +1169,7 @@ toughness=* [/card] [card] text=Kird Ape gets +1/+2 as long as you control a Forest. +auto=aslongas(forest|myinplay) 1/2 id=1302 name=Kird Ape rarity=C @@ -1298,8 +1299,8 @@ toughness=1 [/card] [card] text=Other Merfolk creatures get +1/+1 and have islandwalk. -auto=lord(merfolk) 1/1 -auto=lord(merfolk) islandwalk +auto=lord(merfolk) 1/1 other +auto=lord(merfolk) islandwalk other id=1206 name=Lord of Atlantis rarity=R @@ -1442,7 +1443,7 @@ mana={4} [card] text=Flying (This creature can't be blocked except by creatures with flying or reach.) Nightmare's power and toughness are each equal to the number of Swamps you control. abilities=flying -auto=foreach(swamp|myinplay) 1/1 includeself +auto=foreach(swamp|myinplay) 1/1 id=1170 name=Nightmare rarity=R @@ -1601,7 +1602,7 @@ subtype=Plains Mountain text=Plague Rats's power and toughness are each equal to the number of creatures named Plague Rats in play. id=1173 name=Plague Rats -auto=foreach(plague rats) 1/1 includeself +auto=foreach(plague rats) 1/1 rarity=C color=Black type=Creature @@ -1853,6 +1854,7 @@ toughness=5 [card] text=Sedge Troll gets +1/+1 as long as you control a Swamp. {B}: Regenerate Sedge Troll. auto={B}:regenerate +auto=aslongas(swamp|myinplay) 1/1 id=1315 name=Sedge Troll rarity=R diff --git a/projects/mtg/bin/Res/sets/SHM/_cards.dat b/projects/mtg/bin/Res/sets/SHM/_cards.dat index c5776ba21..bffdf4036 100644 --- a/projects/mtg/bin/Res/sets/SHM/_cards.dat +++ b/projects/mtg/bin/Res/sets/SHM/_cards.dat @@ -1,7 +1,7 @@ [card] text=Enchant creature Enchanted creature gets +1/+1 for each Plains you control and has flying. target=creature -auto=foreach(plains|myinplay) 1/1 includeself +auto=foreach(plains|myinplay) 1/1 auto=flying id=146041 name=Armored Ascension @@ -11,6 +11,18 @@ mana={3}{W} subtype=Aura [/card] [card] +text=Ashenmoor Cohort gets +1/+1 as long as you control another black creature. +auto=aslongas(creature[black]) 1/1 other +id=142060 +name=Ashenmoor Cohort +rarity=C +type=Creature +mana={5}{B} +power=4 +subtype=Elemental Warrior +toughness=3 +[/card] +[card] text=Flying {BR}: Blistering Dieflyn gets +1/+0 until end of turn. abilities=flying auto={BR}:1/0 @@ -25,7 +37,7 @@ toughness=1 [/card] [card] text=Red creatures you control have first strike. -auto=lord(creature[red]|myinplay) first strike includeself +auto=lord(creature[red]|myinplay) first strike id=142062 name=Bloodmark Mentor rarity=U @@ -38,8 +50,8 @@ toughness=1 [card] text=Trample Other red creatures you control get +1/+1. Other green creatures you control get +1/+1. abilities=trample -auto=lord(creature[red]|myinplay) 1/1 -auto=lord(creature[green]|myinplay) 1/1 +auto=lord(creature[red]|myinplay) 1/1 other +auto=lord(creature[green]|myinplay) 1/1 other id=147428 name=Boartusk Liege rarity=R @@ -89,7 +101,7 @@ toughness=1 [/card] [card] text=Black creatures you control have wither. (They deal damage to creatures in the form of -1/-1 counters.) -auto=lord(creature[black]|myinplay) wither includeself +auto=lord(creature[black]|myinplay) wither id=142034 name=Corrosive Mentor rarity=U @@ -102,7 +114,7 @@ toughness=3 [card] text=Fear Crowd of Cinders's power and toughness are each equal to the number of black permanents you control. abilities=fear -auto=foreach(*[black]|myinplay) 1/1 includeself +auto=foreach(*[black]|myinplay) 1/1 id=146051 name=Crowd of Cinders rarity=U @@ -114,7 +126,7 @@ toughness=* [/card] [card] text=Blue creatures you control are unblockable. -auto=lord(creature[blue]|myinplay) unblockable includeself +auto=lord(creature[blue]|myinplay) unblockable id=141981 name=Deepchannel Mentor rarity=U @@ -138,7 +150,7 @@ toughness=1 [/card] [card] text=Flying Faerie Swarm's power and toughness are each equal to the number of blue permanents you control. -auto=foreach(*[blue]|myinplay) 1/1 includeself +auto=foreach(*[blue]|myinplay) 1/1 abilities=flying id=158685 name=Faerie Swarm @@ -233,8 +245,8 @@ toughness=2 [card] text=Flying Other blue creatures you control get +1/+1. Other black creatures you control get +1/+1. abilities=flying -auto=lord(creature[blue]|myinplay) 1/1 -auto=lord(creature[black]|myinplay) 1/1 +auto=lord(creature[blue]|myinplay) 1/1 other +auto=lord(creature[black]|myinplay) 1/1 other id=146743 name=Glen Elendra Liege rarity=R @@ -342,7 +354,7 @@ toughness=2 [/card] [card] text=Vigilance Kithkin Rabble's power and toughness are each equal to the number of white permanents you control. -auto=foreach(*[white]|myinplay) 1/1 includeself +auto=foreach(*[white]|myinplay) 1/1 abilities=vigilance id=158695 name=Kithkin Rabble @@ -745,8 +757,8 @@ subtype=Swamp [card] text=Flash Other white creatures you control get +1/+1. Other blue creatures you control get +1/+1. abilities=flash -auto=lord(creature[white]|myinplay) 1/1 -auto=lord(creature[blue]|myinplay) 1/1 +auto=lord(creature[white]|myinplay) 1/1 other +auto=lord(creature[blue]|myinplay) 1/1 other id=147409 name=Thistledown Liege rarity=R diff --git a/projects/mtg/bin/Res/sets/SHM/todo.dat b/projects/mtg/bin/Res/sets/SHM/todo.dat index bb87494b6..a6beec0c0 100644 --- a/projects/mtg/bin/Res/sets/SHM/todo.dat +++ b/projects/mtg/bin/Res/sets/SHM/todo.dat @@ -34,17 +34,7 @@ subtype=Kithkin Cleric toughness=1 [/card] -[card] -text=Ashenmoor Cohort gets +1/+1 as long as you control another black creature. -id=142060 -name=Ashenmoor Cohort -rarity=C -type=Creature -mana={5}{B} -power=4 -subtype=Elemental Warrior -toughness=3 -[/card] + [card] text=Ashenmoor Gouger can't block. id=153981 diff --git a/projects/mtg/bin/Res/sets/TMP/_cards.dat b/projects/mtg/bin/Res/sets/TMP/_cards.dat index 0fe377c30..afda0f085 100644 --- a/projects/mtg/bin/Res/sets/TMP/_cards.dat +++ b/projects/mtg/bin/Res/sets/TMP/_cards.dat @@ -303,8 +303,8 @@ mana={B} text=Legendary Other Elf creatures have forestwalk. Other Elves have shroud. (They can't be the targets of spells or abilities.) id=4757 name=Eladamri, Lord of Leaves -auto=lord(elf) forestwalk -auto=lord(elf) shroud +auto=lord(elf) forestwalk other +auto=lord(elf) shroud other colour=Green rarity=R mana={G}{G} @@ -725,7 +725,7 @@ toughness=1 [/card] [card] text=Mogg Squad gets -1/-1 for each other creature in play. -auto=foreach(creature) -1/-1 +auto=foreach(creature) -1/-1 other id=4834 name=Mogg Squad rarity=U diff --git a/projects/mtg/bin/Res/test/_tests.txt b/projects/mtg/bin/Res/test/_tests.txt index 5399f9cf3..524cd3bf0 100644 --- a/projects/mtg/bin/Res/test/_tests.txt +++ b/projects/mtg/bin/Res/test/_tests.txt @@ -72,6 +72,7 @@ protomatter_powder.txt resurrection.txt rootwalla.txt royal_assassin.txt +seismic_assault.txt siege_gang_commander.txt shivan_hellkite.txt shock.txt diff --git a/projects/mtg/bin/Res/test/seismic_assault.txt b/projects/mtg/bin/Res/test/seismic_assault.txt new file mode 100644 index 000000000..51bc1884e --- /dev/null +++ b/projects/mtg/bin/Res/test/seismic_assault.txt @@ -0,0 +1,20 @@ +#Discard a land card: Seismic Assault deals 2 damage to target creature or player. +[INIT] +FIRSTMAIN +[PLAYER1] +inplay:129884 +hand:129754 +[PLAYER2] +inplay:1250 +[DO] +129884 +1250 +129754 +[ASSERT] +FIRSTMAIN +[PLAYER1] +inplay:129884 +graveyard:129754 +[PLAYER2] +graveyard:1250 +[END] \ No newline at end of file diff --git a/projects/mtg/include/AllAbilities.h b/projects/mtg/include/AllAbilities.h index 3bb64bc39..3be356d70 100644 --- a/projects/mtg/include/AllAbilities.h +++ b/projects/mtg/include/AllAbilities.h @@ -2672,14 +2672,16 @@ class AKirdApe:public ListMaintainerAbility{ TargetChooser * tc; int power; int toughness; - AKirdApe(int _id, MTGCardInstance * _source, TargetChooser * _tc, int _power, int _toughness):ListMaintainerAbility(_id, _source){ + int includeSelf; + AKirdApe(int _id, MTGCardInstance * _source, TargetChooser * _tc, int _power, int _toughness,int _includeSelf):ListMaintainerAbility(_id, _source){ power = _power; toughness = _toughness; tc = _tc; + includeSelf = _includeSelf; } int canBeInList(MTGCardInstance * card){ - if (card->controller() == source->controller() && tc->canTarget(card)) return 1; + if ((includeSelf || card!=source) && tc->canTarget(card)) return 1; return 0; } diff --git a/projects/mtg/include/MTGAbility.h b/projects/mtg/include/MTGAbility.h index 823492c19..bbd2664b1 100644 --- a/projects/mtg/include/MTGAbility.h +++ b/projects/mtg/include/MTGAbility.h @@ -33,6 +33,7 @@ using std::map; #define PARSER_LORD 1 #define PARSER_FOREACH 2 +#define PARSER_ASLONGAS 3 class MTGAbility: public ActionElement{ protected: diff --git a/projects/mtg/src/MTGAbility.cpp b/projects/mtg/src/MTGAbility.cpp index b8ac561d0..4944f9613 100644 --- a/projects/mtg/src/MTGAbility.cpp +++ b/projects/mtg/src/MTGAbility.cpp @@ -181,7 +181,7 @@ int AbilityFactory::magicText(int id, Spell * spell, MTGCardInstance * card){ TargetChooser * tc = NULL; TargetChooser * lordTargets = NULL; - int lordIncludeSelf = 0; + int lordIncludeSelf = 1; int lordType = 0; string lordTargetsString; @@ -222,10 +222,19 @@ int AbilityFactory::magicText(int id, Spell * spell, MTGCardInstance * card){ lordType = PARSER_FOREACH; } } + found = s.find("aslongas("); + if (found != string::npos){ + if (dryMode) return BAKA_EFFECT_GOOD; + unsigned int end = s.find(")", found+9); + if (end != string::npos){ + lordTargetsString = s.substr(found+9,end-found-9).c_str(); + lordType = PARSER_ASLONGAS; + } + } if (lordTargetsString.size()){ TargetChooserFactory tcf; lordTargets = tcf.createTargetChooser(lordTargetsString, card); - if (s.find("includeself") != string::npos) lordIncludeSelf = 1; + if (s.find("other") != string::npos) lordIncludeSelf = 0; } @@ -496,10 +505,9 @@ int AbilityFactory::magicText(int id, Spell * spell, MTGCardInstance * card){ game->addObserver(NEW ATargetterPowerToughnessModifierUntilEOT(id, card,power,toughness, cost, tc,doTap)); }else{ if (lordType == PARSER_FOREACH){ - char buf[4096]; - sprintf(buf, "KELDON : %i/%i , includeself = %i\n", power,toughness,lordIncludeSelf); - OutputDebugString(buf); game->addObserver(NEW AForeach(id,card,target,lordTargets,lordIncludeSelf,power,toughness)); + }else if (lordType == PARSER_ASLONGAS){ + game->addObserver(NEW AKirdApe(id,card,lordTargets,power,toughness,lordIncludeSelf)); }else{ if (!cost){ if(card->hasType("enchantment")){ @@ -1114,12 +1122,6 @@ void AbilityFactory::addAbilities(int _id, Spell * spell){ game->addObserver(NEW AStrongLandLinkCreature(_id, card, "island")); break; } - case 1315: //Sedge Troll - { - TargetChooser * tc = NEW TypeTargetChooser("swamp",card); - game->addObserver(NEW AKirdApe(_id, card,tc,1,1)); - break; - } case 1221: //Serendib Efreet { game->addObserver( NEW ASerendibEfreet(_id, card)); @@ -1247,13 +1249,6 @@ void AbilityFactory::addAbilities(int _id, Spell * spell){ game->addObserver(NEW AFastbond(_id, card)); break; } - - case 1302: //Kird Ape - { - TargetChooser * tc = NEW TypeTargetChooser("forest",card); - game->addObserver(NEW AKirdApe(_id, card,tc,1,2)); - break; - } case 1309: //Orcish Artillery { game->addObserver(NEW AOrcishArtillery(_id, card));