Check for balanced brackets

Check for balanced square brackets [] and curly brackets {}.

Couldn't check for parentheses since the engine expects unbalanced parenthesis like in cards that have the string "this(cantargetcard" never closes the parentheses, balancing the parentheses makes the cards stop working, best example: Monstrous

All tests passed.

Morbid Opportunist
Ooze Garden
This commit is contained in:
Eduardo MG
2023-04-26 17:22:31 -06:00
parent 9514ea59d8
commit d9655ab833
3 changed files with 76 additions and 76 deletions

View File

@@ -21804,7 +21804,7 @@ type=Instant
[/card]
[card]
name=Conduit of Emrakul
auto=_ATTACKING_transforms((,newability[@next my secondmain:add{c}{c})) forever
auto=_ATTACKING_transforms((,newability[@next my secondmain:add{c}{c}])) forever
text=Whenever Conduit of Emrakul attacks, add {C}{C} to your mana pool at the beginning of your next main phase this turn.
type=Creature
subtype=Eldrazi Werewolf
@@ -21826,7 +21826,7 @@ toughness=5
[/card]
[card]
name=Conduit of Storms
auto=_ATTACKING_transforms((,newability[@next my secondmain:add{R}))
auto=_ATTACKING_transforms((,newability[@next my secondmain:add{R}]))
auto={3}{r}{r}:flip(Conduit of Emrakul)
text=Whenever Conduit of Storms attacks, add {R} to your mana pool at the beginning of your next main phase this turn. -- {3}{R}{R}: Transform Conduit of Storms.
mana={2}{R}
@@ -62015,8 +62015,8 @@ toughness=5
[/card]
[card]
name=Kavu Lair
auto=@movedTo(creature[power>=4|myBattlefield):draw:1 controller
auto=@movedTo(creature[power>=4|opponentBattlefield):draw:1 opponent
auto=@movedTo(creature[power>=4]|myBattlefield):draw:1 controller
auto=@movedTo(creature[power>=4]|opponentBattlefield):draw:1 opponent
text=Whenever a creature with power 4 or greater enters the battlefield, its controller draws a card.
mana={2}{G}
type=Enchantment
@@ -62773,7 +62773,7 @@ type=Legendary Land
name=Kheru Bloodsucker
auto=@movedTo(graveyard) from(creature[toughness>=4]|mybattlefield):life:-2 opponent && life:2 controller
auto={2}{B}{S(other creature|mybattlefield)}:counter(1/1)
text=Whenever a creature you control with toughness 4 or greater dies, each opponent loses 2 life and you gain 2 life. -- (2)(B}, Sacrifice another creature: Put a +1/+1 counter on Kheru Bloodsucker.
text=Whenever a creature you control with toughness 4 or greater dies, each opponent loses 2 life and you gain 2 life. -- {2}{B}, Sacrifice another creature: Put a +1/+1 counter on Kheru Bloodsucker.
mana={2}{B}
type=Creature
subtype=Vampire
@@ -66930,7 +66930,7 @@ type=Instant
[/card]
[card]
name=Lifeline
auto=lord(creature) transforms((,newability[@movedTo(graveyard) from(this|battlefield) restriction{type(creature|battlefield)~morethan~0}:all(trigger[to]) [phaseaction[endofturn once] moveTo(mybattlefield)])) forever
auto=lord(creature) transforms((,newability[@movedTo(graveyard) from(this|battlefield) restriction{type(creature|battlefield)~morethan~0}:all(trigger[to]) [phaseaction[endofturn once] moveTo(mybattlefield)]])) forever
text=Whenever a creature dies, if another creature is on the battlefield, return the first card to the battlefield under its owner's control at the beginning of the next end step.
mana={5}
type=Artifact
@@ -73243,7 +73243,7 @@ type=Sorcery
[/card]
[card]
name=Metallic Mimic
auto=chooseatype transforms((chosentype,newability[@movedTo(creature[chosentype]|mybattlefield)}:all(trigger[to]) counter(1/1)])) forever chooseend
auto=chooseatype transforms((chosentype,newability[@movedTo(creature[chosentype]|mybattlefield):all(trigger[to]) counter(1/1)])) forever chooseend
text=As Metallic Mimic enters the battlefield, choose a creature type. -- Metallic Mimic is the chosen type in addition to its other types. -- Each other creature you control of the chosen type enters the battlefield with an additional +1/+1 counter on it.
mana={2}
type=Artifact Creature
@@ -74304,7 +74304,7 @@ name=Mindwrack Liege
auto=lord(other creature[blue]|myBattlefield) 1/1
auto=lord(other creature[red]|myBattlefield) 1/1
auto={UR}{UR}{UR}{UR}:moveTo(myBattlefield) target(creature[blue;red]|myhand)
text=Other blue creatures you control get +1/+1. -- Other red creatures you control get +1/+1. -- {(u/r){(u/r){(u/r){(u/r)}: You may put a blue or red creature card from your hand onto the battlefield.
text=Other blue creatures you control get +1/+1. -- Other red creatures you control get +1/+1. -- {U/R}{U/R}{U/R}{U/R}: You may put a blue or red creature card from your hand onto the battlefield.
mana={3}{UR}{UR}{UR}
type=Creature
subtype=Horror
@@ -82443,7 +82443,7 @@ type=Instant
[/card]
[card]
name=Ooze Garden
auto={1}{G}{S(creature|myBattlefield)}:token(Ooze,Creature Ooze,setpower=storedpower,settoughness=storedpower,green)
auto={1}{G}{S(creature[-ooze]|myBattlefield)}:token(Ooze,Creature Ooze,storedpower/storedpower,green) asSorcery
text={1}{G}, Sacrifice a non-Ooze creature: Put an X/X green Ooze creature token onto the battlefield, where X is the sacrificed creature's power. Activate this ability only any time you could cast a sorcery.
mana={1}{G}
type=Enchantment
@@ -82746,7 +82746,7 @@ toughness=1
name=Oran-Rief, the Vastwood
auto=tap(noevent)
auto={T}:Add{G}
auto={T}:counter(1/1) all(creature[fresh;green|myBattlefield)
auto={T}:counter(1/1) all(creature[fresh;green]|myBattlefield)
text=Oran-Rief, the Vastwood enters the battlefield tapped. -- {T}: Add {G} to your mana pool. -- {T}: Put a +1/+1 counter on each green creature that entered the battlefield this turn.
type=Land
[/card]
@@ -83753,7 +83753,7 @@ type=Instant
[/card]
[card]
name=Overwhelming Stampede
auto=notatarget(creature[power=power:highest:creature:mybattlefield]|mybattlefield) transforms((,newability[all(creature|mybattlefield) dynamicability<!powerpumpboth!>,newability[all(creature|mybattlefield) trample]))
auto=notatarget(creature[power=power:highest:creature:mybattlefield]|mybattlefield) transforms((,newability[all(creature|mybattlefield) dynamicability<!powerpumpboth!>],newability[all(creature|mybattlefield) trample]))
text=Until end of turn, creatures you control gain trample and get +X/+X, where X is the greatest power among creatures you control. (If a creature you control would assign enough damage to its blockers to destroy them, you may have it assign the rest of its damage to defending player or planeswalker.)
mana={3}{G}{G}
type=Sorcery
@@ -84695,7 +84695,7 @@ type=Instant
[/card]
[card]
name=Pathbreaker Ibex
auto=_ATTACKING_notatarget(creature[power=power:highest:creature:mybattlefield]|mybattlefield) transforms((,newability[all(creature|mybattlefield) dynamicability<!powerpumpboth!>,newability[all(creature|mybattlefield) trample]))
auto=_ATTACKING_notatarget(creature[power=power:highest:creature:mybattlefield]|mybattlefield) transforms((,newability[all(creature|mybattlefield) dynamicability<!powerpumpboth!>],newability[all(creature|mybattlefield) trample]))
text=Whenever Pathbreaker Ibex attacks, creatures you control gain trample and get +X/+X until end of turn, where X is the greatest power among creatures you control.
mana={4}{G}{G}
type=Creature
@@ -94423,7 +94423,7 @@ type=Enchantment
name=Restless Apparition
abilities=persist
auto={WB}{WB}{WB}:3/3
text={(w/b){(w/b){(w/b)}: Restless Apparition gets +3/+3 until end of turn. -- Persist (When this creature dies, if it had no -1/-1 counters on it, return it to the battlefield under its owner's control with a -1/-1 counter on it.)
text={W/B}{W/B}{W/B}: Restless Apparition gets +3/+3 until end of turn. -- Persist (When this creature dies, if it had no -1/-1 counters on it, return it to the battlefield under its owners control with a -1/-1 counter on it.)
mana={WB}{WB}{WB}
type=Creature
subtype=Spirit
@@ -95098,7 +95098,7 @@ toughness=2
name=Rhys the Redeemed
auto={2}{GW}{T}:token(Elf Warrior,Creature Elf Warrior,1/1,greenwhite)
auto={4}{GW}{GW}{T}:clone all(creature[token]|mybattlefield)
text={2}{(g/w)}, {T}: Put a 1/1 green and white Elf Warrior creature token onto the battlefield. -- {4}{(g/w){(g/w)}, {T}: For each creature token you control, put a token that's a copy of that creature onto the battlefield.
text={2}{(g/w)}, {T}: Put a 1/1 green and white Elf Warrior creature token onto the battlefield. -- {4}{(g/w)}{(g/w)}, {T}: For each creature token you control, put a token that's a copy of that creature onto the battlefield.
mana={GW}
type=Legendary Creature
subtype=Elf Warrior
@@ -97418,7 +97418,7 @@ type=Instant
name=Rune-Cervin Rider
abilities=flying
auto={GW}{GW}:1/1
text=Flying -- {(g/w){(g/w)}: Rune-Cervin Rider gets +1/+1 until end of turn.
text=Flying -- {(g/w)}{(g/w)}: Rune-Cervin Rider gets +1/+1 until end of turn.
mana={3}{W}
type=Creature
subtype=Elf Knight
@@ -119001,7 +119001,7 @@ toughness=5
[/card]
[card]
name=Tenacious Dead
autograveyard=_DIES_all(trigger) transforms((,newability[name(Pay 1B) pay[[{1}{B}]] name(pay 1B mana) moveto(ownerbattlefield} && tap?name(cancel) donothing])) oneshot
autograveyard=_DIES_all(trigger) transforms((,newability[name(Pay 1B) pay[[{1}{B}]] name(pay 1B mana) moveto(ownerbattlefield) && tap?name(cancel) donothing])) oneshot
text=When Tenacious Dead dies, you may pay {1}{B}. If you do, return it to the battlefield tapped under its owner's control.
mana={B}
type=Creature
@@ -122889,7 +122889,7 @@ type=Enchantment
name=Tourach's Gate
target=land|myBattlefield
auto=vanishing:3
auto={s(thrull|mybattlefield):counter(0/0,3,time)
auto={s(thrull|mybattlefield)}:counter(0/0,3,time)
auto=teach(land) {T}:all(creature[attacking]) 2/-1
text=Enchant land you control -- Sacrifice a Thrull: Put three time counters on Tourach's Gate. -- At the beginning of your upkeep, remove a time counter from Tourach's Gate. If there are no time counters on Tourach's Gate, sacrifice it. -- Enchanted land has "{T}: Attacking creatures you control get +2/-1 until end of turn."
mana={1}{B}{B}
@@ -123777,7 +123777,7 @@ toughness=1
[card]
name=Tree of Perdition
abilities=defender
auto={t}:count(opponentlifetotal) && transforms((,newability[lifeset:t opponent})) forever && all(this) transforms((,settoughness=countedamount)) forever
auto={t}:count(opponentlifetotal) && transforms((,newability[lifeset:t opponent])) forever && all(this) transforms((,settoughness=countedamount)) forever
text=Defender -- {T}: Exchange target opponent's life total with Tree of Perdition's toughness.
mana={3}{B}
type=Creature