Laurent - Added draw/token to the foreach parser (allow to sligthly reduce the number of lines in MTGAbility.cpp and also add few cards to different cards.dat.)
NOTE that all these additions to the foreach parser are only available for the "inplay" area... "countcards" will need to be updated in order to have thing such as graveyard or hand to be taken into consideration (but when it will be done cards such as Spontaneous Generation - MRQ, could be added) Also updated (tentatively) the "cantbeblockedby" in the parser it still does not work...ARG... but I can feel that I'm not far away from the solution... We need also to go through some of the cards.dat to be sure we are not missing any possible addition ...
This commit is contained in:
@@ -701,7 +701,7 @@ mana={3}{U}{U}
|
||||
text=Elven Riders can't be blocked except by Walls and/or creatures with flying.
|
||||
id=135266
|
||||
name=Elven Riders
|
||||
auto=cantbeblockedby(creature[-flying])
|
||||
auto=cantbeblockedby(creature[-flying],-walls)
|
||||
rarity=U
|
||||
color=Green
|
||||
type=Creature
|
||||
|
||||
@@ -291,6 +291,18 @@ type=Instant
|
||||
mana={2}{R}
|
||||
[/card]
|
||||
[card]
|
||||
text=When Regal Force comes into play, draw a card for each green creature you control.
|
||||
id=147373
|
||||
name=Regal Force
|
||||
auto=foreach(creature[green]|myinplay)draw:1
|
||||
rarity=R
|
||||
type=Creature
|
||||
mana={4}{G}{G}{G}
|
||||
power=5
|
||||
subtype=Elemental
|
||||
toughness=5
|
||||
[/card]
|
||||
[card]
|
||||
text=Wither (This deals damage to creatures in the form of -1/-1 counters.) Persist (When this creature is put into a graveyard from play, if it had no -1/-1 counters on it, return it to play under its owner's control with a -1/-1 counter on it.)
|
||||
abilities=wither,persist
|
||||
id=158902
|
||||
|
||||
@@ -1042,17 +1042,6 @@ mana={2}{W}
|
||||
subtype=Aura
|
||||
[/card]
|
||||
[card]
|
||||
text=When Regal Force comes into play, draw a card for each green creature you control.
|
||||
id=147373
|
||||
name=Regal Force
|
||||
rarity=R
|
||||
type=Creature
|
||||
mana={4}{G}{G}{G}
|
||||
power=5
|
||||
subtype=Elemental
|
||||
toughness=5
|
||||
[/card]
|
||||
[card]
|
||||
text=Rekindled Flame deals 4 damage to target creature or player. At the beginning of your upkeep, if an opponent has no cards in hand, you may return Rekindled Flame from your graveyard to your hand.
|
||||
target=creature,player
|
||||
id=158108
|
||||
|
||||
@@ -72,6 +72,8 @@ mana={3}
|
||||
[card]
|
||||
text={W}, Sacrifice an enchantment: Destroy target enchantment. {3}{U}{U}: Counter target enchantment spell.
|
||||
id=2663
|
||||
auto={W}{S(Enchantment|myinplay)}:destroy target(enchantment)
|
||||
auto={3}{U}{U}:fizzle target(enchantment|stack)
|
||||
name=Arenson's Aura
|
||||
rarity=C
|
||||
type=Enchantment
|
||||
@@ -170,6 +172,8 @@ mana={1}
|
||||
[card]
|
||||
text=Untap all white creatures you control. Whenever a creature blocks this turn, it gets +0/+1 until end of turn.
|
||||
id=2665
|
||||
auto=untap all(creature[white]|myinplay)
|
||||
auto=lord(creature[blocking])0/1
|
||||
name=Battle Cry
|
||||
rarity=U
|
||||
type=Instant
|
||||
@@ -187,6 +191,9 @@ subtype=Aura
|
||||
[card]
|
||||
text=Enchant creature Enchanted creature can't be blocked by black creatures. Enchanted creature gets +2/+2 as long as an opponent controls a black permanent.
|
||||
id=2666
|
||||
target=creature
|
||||
auto=cantbeblockedby(creature[black])
|
||||
auto=aslongas(*[black]|opponentinplay)2/2
|
||||
name=Black Scarab
|
||||
rarity=U
|
||||
type=Enchantment
|
||||
@@ -216,6 +223,9 @@ mana={G}{G}
|
||||
[card]
|
||||
text=Enchant creature Enchanted creature can't be blocked by blue creatures. Enchanted creature gets +2/+2 as long as an opponent controls a blue permanent.
|
||||
id=2669
|
||||
target=creature
|
||||
auto=cantbeblockedby(creature[blue])
|
||||
auto=aslongas(*[blue]|opponentinplay)2/2
|
||||
name=Blue Scarab
|
||||
rarity=U
|
||||
type=Enchantment
|
||||
@@ -390,6 +400,8 @@ mana={2}
|
||||
[card]
|
||||
text=When Curse of Marit Lage comes into play, tap all Islands. Islands don't untap during their controllers' untap steps.
|
||||
id=2617
|
||||
auto=tap all(island)
|
||||
auto=lord(island)doesntuntap
|
||||
name=Curse of Marit Lage
|
||||
rarity=R
|
||||
type=Enchantment
|
||||
@@ -622,7 +634,7 @@ text=Foul Familiar can't block. {B}, Pay 1 life: Return Foul Familiar to its
|
||||
id=2450
|
||||
name=Foul Familiar
|
||||
abilities=cantblock
|
||||
auto={B}
|
||||
auto={B}:moveto(ownerhand) && damage:1 && controller
|
||||
rarity=C
|
||||
type=Creature
|
||||
mana={2}{B}
|
||||
|
||||
@@ -460,7 +460,7 @@ type=Enchantment
|
||||
[card]
|
||||
text=Target creature gets +0/+X until end of turn, where X is its converted mana cost.
|
||||
id=1614
|
||||
taget=creature
|
||||
target=creature
|
||||
name=Great Defender
|
||||
rarity=U
|
||||
type=Instant
|
||||
|
||||
@@ -128,6 +128,7 @@ toughness=1
|
||||
text=Put a 1/1 green Elf Warrior creature token into play for each Elf you control.
|
||||
id=139676
|
||||
name=Elvish Promenade
|
||||
auto=foreach(elf|myinplay)token(Elf Warrior,creature Elf Warrior,1/1,green)
|
||||
rarity=U
|
||||
type=Sorcery
|
||||
mana={3}{G}
|
||||
|
||||
@@ -214,6 +214,15 @@ toughness=1
|
||||
abilities=flying,cloud
|
||||
[/card]
|
||||
[card]
|
||||
text=Draw a card for each creature you control.
|
||||
id=19739
|
||||
auto=foreach(creature|myinplay)draw:1
|
||||
name=Collective Unconscious
|
||||
rarity=R
|
||||
type=Sorcery
|
||||
mana={4}{G}{G}
|
||||
[/card]
|
||||
[card]
|
||||
text=Counter target spell.
|
||||
target=*|stack
|
||||
auto=fizzle
|
||||
|
||||
@@ -412,14 +412,6 @@ type=Enchantment
|
||||
mana={2}{U}{U}
|
||||
[/card]
|
||||
[card]
|
||||
text=Draw a card for each creature you control.
|
||||
id=19739
|
||||
name=Collective Unconscious
|
||||
rarity=R
|
||||
type=Sorcery
|
||||
mana={4}{G}{G}
|
||||
[/card]
|
||||
[card]
|
||||
text=Nonartifact creatures get +2/+2 as long as they all share a color.
|
||||
id=19665
|
||||
name=Common Cause
|
||||
|
||||
@@ -1195,7 +1195,7 @@ toughness=4
|
||||
text=Spitting Earth deals damage equal to the number of Mountains you control to target creature.
|
||||
id=4362
|
||||
target=creature
|
||||
alias=136509
|
||||
auto=foreach(moutain|myinplay)damage:1
|
||||
name=Spitting Earth
|
||||
rarity=C
|
||||
type=Sorcery
|
||||
@@ -1297,6 +1297,15 @@ mana={2}{U}
|
||||
type=Sorcery
|
||||
[/card]
|
||||
[card]
|
||||
text=Draw a card for each tapped creature target opponent controls.
|
||||
id=4279
|
||||
name=Theft of Dreams
|
||||
auto=foreach(creature[tapped]|opponentinplay)draw:1
|
||||
rarity=U
|
||||
type=Sorcery
|
||||
mana={2}{U}
|
||||
[/card]
|
||||
[card]
|
||||
text=Put target creature on top of its owner's library.
|
||||
target=creature
|
||||
auto=moveTo(ownerLibrary)
|
||||
|
||||
@@ -539,14 +539,6 @@ type=Sorcery
|
||||
mana={1}{W}
|
||||
[/card]
|
||||
[card]
|
||||
text=Draw a card for each tapped creature target opponent controls.
|
||||
id=4279
|
||||
name=Theft of Dreams
|
||||
rarity=U
|
||||
type=Sorcery
|
||||
mana={2}{U}
|
||||
[/card]
|
||||
[card]
|
||||
text=Whenever Thing from the Deep attacks, sacrifice it unless you sacrifice an Island.
|
||||
id=4280
|
||||
name=Thing from the Deep
|
||||
|
||||
@@ -286,6 +286,7 @@ subtype=Aura
|
||||
text=Draw a card for each Island you control.
|
||||
id=87978
|
||||
name=Flow of Ideas
|
||||
auto=foreach(island|myinplay)draw:1
|
||||
rarity=U
|
||||
type=Sorcery
|
||||
mana={5}{U}
|
||||
|
||||
@@ -306,7 +306,7 @@ mana={2R}{2R}{2R}
|
||||
[card]
|
||||
text=Draw a card for each Island you control.
|
||||
id=158692
|
||||
alias=87978
|
||||
auto=foreach(island|myinplay)draw:1
|
||||
name=Flow of Ideas
|
||||
rarity=U
|
||||
type=Sorcery
|
||||
@@ -443,6 +443,7 @@ toughness=1
|
||||
text=Put a 2/2 green Wolf creature token into play for each Forest you control.
|
||||
id=153996
|
||||
name=Howl of the Night Pack
|
||||
auto=foreach(forest|myinplay)token(Wolf,creature wolf,2/2,green)
|
||||
rarity=U
|
||||
type=Sorcery
|
||||
mana={6}{G}
|
||||
|
||||
Reference in New Issue
Block a user