diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index 366e8197e..8ac1dcd6c 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -5831,16 +5831,7 @@ toughness=4 [/card] [card] name=Armament Master -auto=this(gear=1) lord(other creature[kor]|myBattlefield) 2/2 -auto=this(gear=2) lord(other creature[kor]|myBattlefield) 4/4 -auto=this(gear=3) lord(other creature[kor]|myBattlefield) 6/6 -auto=this(gear=4) lord(other creature[kor]|myBattlefield) 8/8 -auto=this(gear=5) lord(other creature[kor]|myBattlefield) 10/10 -auto=this(gear=6) lord(other creature[kor]|myBattlefield) 12/12 -auto=this(gear=7) lord(other creature[kor]|myBattlefield) 14/14 -auto=this(gear=8) lord(other creature[kor]|myBattlefield) 16/16 -auto=this(gear=9) lord(other creature[kor]|myBattlefield) 18/18 -auto=this(gear=10) lord(other creature[kor]|myBattlefield) 20/20 +auto=thisforeach(gear) lord(other creature[kor]|myBattlefield) 2/2 text=Other Kor creatures you control get +2/+2 for each Equipment attached to Armament Master. mana={W}{W} type=Creature @@ -6084,7 +6075,7 @@ toughness=1 [/card] [card] name=Army of Allah -auto=lord(creature[attacking]) 2/0 +auto=all(creature[attacking]) 2/0 ueot text=Attacking creatures get +2/+0 until end of turn. mana={1}{W}{W} type=Instant @@ -8768,7 +8759,7 @@ toughness=2 [/card] [card] name=Balthor the Stout -auto=lord(other barbarian)1/1 +auto=lord(other barbarian) 1/1 auto={R}:1/0 target(other barbarian) text=Other Barbarian creatures get +1/+1. -- {R}: Another target Barbarian creature gets +1/+0 until end of turn. mana={1}{R}{R} @@ -9702,8 +9693,8 @@ type=Instant [/card] [card] name=Battle Frenzy -auto=lord(creature[green]|myBattlefield) 1/1 -auto=lord(creature[-green]|myBattlefield) 1/0 +auto=all(creature[green]|myBattlefield) 1/1 ueot +auto=all(creature[-green]|myBattlefield) 1/0 ueot text=Green creatures you control get +1/+1 until end of turn. -- Nongreen creatures you control get +1/+0 until end of turn. mana={2}{R} type=Instant @@ -13412,9 +13403,9 @@ toughness=1 [card] name=Bold Defense kicker={3}{W} -auto=lord(creature|myBattlefield) 1/1 -auto=kicker lord(creature|myBattlefield) 1/1 -auto=kicker lord(creature|myBattlefield) first strike +auto=all(creature|myBattlefield) 1/1 ueot +auto=kicker all(creature|myBattlefield) 1/1 ueot +auto=kicker all(creature|myBattlefield) first strike ueot text=Kicker {3}{W} (You may pay an additional {3}{W} as you cast this spell.) -- Creatures you control get +1/+1 until end of turn. If Bold Defense was kicked, instead creatures you control get +2/+2 and gain first strike until end of turn. mana={2}{W} type=Instant @@ -16458,7 +16449,7 @@ type=Sorcery [card] name=Call to Glory auto=untap all(creature|myBattlefield) -auto=lord(samurai|myBattlefield) 1/1 +auto=all(samurai|myBattlefield) 1/1 ueot text=Untap all creatures you control. Samurai creatures you control get +1/+1 until end of turn. mana={1}{W} type=Instant @@ -19618,7 +19609,7 @@ toughness=2 [/card] [card] name=Chorus of Woe -auto=lord(creature|myBattlefield) 1/0 +auto=all(creature|myBattlefield) 1/0 ueot text=Creatures you control get +1/+0 until end of turn. mana={B} type=Sorcery @@ -25451,8 +25442,8 @@ type=Artifact [/card] [card] name=Dance of Shadows -auto=lord(creature|myBattlefield) 1/0 -auto=lord(creature|myBattlefield) fear +auto=all(creature|myBattlefield) 1/0 ueot +auto=all(creature|myBattlefield) fear ueot text=Creatures you control get +1/+0 and gain fear until end of turn. (They can't be blocked except by artifact creatures and/or black creatures.) mana={3}{B}{B} type=Sorcery @@ -28781,7 +28772,7 @@ toughness=10 [/card] [card] name=Desperate Charge -auto=lord(creature|myBattlefield) 2/0 +auto=all(creature|myBattlefield) 2/0 ueot text=Creatures you control get +2/+0 until end of turn. mana={2}{B} type=Sorcery @@ -33406,7 +33397,7 @@ abilities=overload other={2}{R} name(Overload) target=creature|mybattlefield auto=paidmana 2/0 -auto=overload lord(creature|mybattlefield) 2/0 +auto=overload all(creature|mybattlefield) 2/0 text=Target creature you control gets +2/+0 until end of turn. -- Overload {2}{R} (You may cast this spell for its overload cost. If you do, change its text by replacing all instances of "target" with "each.") mana={R} type=Instant @@ -40387,8 +40378,8 @@ type=Sorcery [/card] [card] name=Final Revels -auto=choice lord(creature) 2/0 -auto=choice lord(creature) 0/-2 +auto=choice all(creature) 2/0 ueot +auto=choice all(creature) 0/-2 ueot text=Choose one - All creatures get +2/+0 until end of turn; or all creatures get -0/-2 until end of turn. mana={4}{B} type=Sorcery @@ -42130,7 +42121,7 @@ toughness=2 [/card] [card] name=Flowstone Slide -auto=lord(creature) x/-x +auto=all(creature) x/-x ueot text=All creatures get +X/-X until end of turn. mana={X}{2}{R}{R} type=Sorcery @@ -42909,8 +42900,8 @@ type=Land [/card] [card] name=Fortify -auto=choice lord(creature|myBattlefield) 2/0 -auto=choice lord(creature|myBattlefield) 0/2 +auto=choice all(creature|myBattlefield) 2/0 ueot +auto=choice all(creature|myBattlefield) 0/2 ueot text=Choose one - Creatures you control get +2/+0 until end of turn; or creatures you control get +0/+2 until end of turn. mana={2}{W} type=Instant @@ -47068,7 +47059,7 @@ type=Enchantment [/card] [card] name=Glorious Charge -auto=lord(creature|myBattlefield) 1/1 +auto=all(creature|myBattlefield) 1/1 ueot text=Creatures you control get +1/+1 until end of turn. mana={1}{W} type=Instant @@ -53031,7 +53022,7 @@ type=Enchantment [card] name=Hearth Charm auto=aslongas(creature[artifact]|battlefield) choice destroy target(creature[artifact]) -auto=choice lord(creature[attacking]) 1/0 +auto=choice all(creature[attacking]) 1/0 auto=aslongas(creature[power<=2]|battlefield) choice unblockable target(creature[power<=2]) text=Choose one - Destroy target artifact creature; or attacking creatures get +1/+0 until end of turn; or target creature with power 2 or less is unblockable this turn. mana={R} @@ -53560,7 +53551,7 @@ type=Enchantment [/card] [card] name=Hell Swarm -auto=lord(creature) -1/0 +auto=all(creature) -1/0 ueot text=All creatures get -1/-0 until end of turn. mana={B} type=Instant @@ -54777,7 +54768,7 @@ type=Enchantment [/card] [card] name=Hold the Line -auto=lord(creature[blocking]) 7/7 +auto=all(creature[blocking]) 7/7 ueot text=Blocking creatures get +7/+7 until end of turn. mana={1}{W}{W} type=Instant @@ -54911,7 +54902,7 @@ toughness=1 [/card] [card] name=Holy Light -auto=lord(creature[-white]) -1/-1 +auto=all(creature[-white]) -1/-1 ueot text=Nonwhite creatures get -1/-1 until end of turn. mana={2}{W} type=Instant @@ -57932,7 +57923,7 @@ toughness=3 [/card] [card] name=Infest -auto=lord(creature) -2/-2 +auto=all(creature) -2/-2 ueot text=All creatures get -2/-2 until end of turn. mana={1}{B}{B} type=Sorcery @@ -59259,7 +59250,7 @@ toughness=5 [/card] [card] name=Ivory Charm -auto=choice name(all creatures get -2/-0 until end of turn) lord(creature) -2/0 +auto=choice all(creature) -2/0 ueot auto=choice tap target(creature) auto=choice prevent:1 target(creature,player) text=Choose one - All creatures get -2/-0 until end of turn; or tap target creature; or prevent the next 1 damage that would be dealt to target creature or player this turn. @@ -63288,9 +63279,7 @@ subtype=Aura [/card] [card] name=Kjeldoran War Cry -auto=lord(creature|myBattlefield) 1/1 -auto=foreach(Kjeldoran War Cry|myGraveyard) lord(creature|myBattlefield) 1/1 -auto=foreach(Kjeldoran War Cry|opponentGraveyard) lord(creature|myBattlefield) 1/1 +auto=all(creature|myBattlefield) type:Kjeldoran War Cry:graveyardplus1plusend/type:Kjeldoran War Cry:graveyardplus1plusend ueot text=Creatures you control get +X/+X until end of turn, where X is 1 plus the number of cards named Kjeldoran War Cry in all graveyards. mana={1}{W} type=Instant @@ -64220,7 +64209,7 @@ toughness=3 [card] name=Kragma Warcaller auto=lord(creature[minotaur]|myBattlefield) haste -auto=lord(minotaur[attacking]|myBattlefield) 2/0 ueot +auto=lord(minotaur[attacking]|myBattlefield) 2/0 text=Minotaur Creatures you control have haste. -- Whenever a Minotaur you control attacks, it gets +2/+0 until end of turn. mana={3}{B}{R} type=Creature @@ -65233,10 +65222,9 @@ subtype=Aura [card] name=Land Cap auto=@each my upkeep:counter(0/0,-1,Depletion) -auto={T}:counter(0/0,1,Depletion) && Add{W} -auto={T}:counter(0/0,1,Depletion) && Add{U} -auto=lord(land cap[counter{0/0.1.Depletion}]) doesnotuntap -auto=@each my untap:untap all(land cap[-counter{0/0.1.Depletion}]) +auto={T}:Add{W} and!( counter(0/0,1,Depletion) )! +auto={T}:Add{U} and!( counter(0/0,1,Depletion) )! +auto=this(counter{0/0.1.Depletion}>=1) doesnotuntap text=Land Cap doesn't untap during your untap step if it has a depletion counter on it. -- At the beginning of your upkeep, remove a depletion counter from Land Cap. -- {T}: Add {W} or {B} to your mana pool. Put a depletion counter on Land Cap. type=Land [/card] @@ -65679,10 +65667,9 @@ type=Instant [card] name=Lava Tubes auto=@each my upkeep:counter(0/0,-1,Depletion) -auto={T}:counter(0/0,1,Depletion) && Add{B} -auto={T}:counter(0/0,1,Depletion) && Add{R} -auto=lord(lava tubes[counter{0/0.1.Depletion}]) doesnotuntap -auto=@each my untap:untap all(lava tubes[-counter{0/0.1.Depletion}]) +auto={T}:Add{B} and!( counter(0/0,1,Depletion) )! +auto={T}:Add{R} and!( counter(0/0,1,Depletion) )! +auto=this(counter{0/0.1.Depletion}>=1) doesnotuntap text=Lava Tubes doesn't untap during your untap step if it has a depletion counter on it. -- At the beginning of your upkeep, remove a depletion counter from Lava Tubes.-- {T}: Add {B} or {R} to your mana pool. Put a depletion counter on Lava Tubes. type=Land [/card] @@ -69601,7 +69588,7 @@ type=Instant [/card] [card] name=Magnify -auto=lord(creature) 1/1 +auto=all(creature) 1/1 ueot text=All creatures get +1/+1 until end of turn. mana={G} type=Instant @@ -70671,17 +70658,7 @@ type=Sorcery [/card] [card] name=March of the Machines -auto=lord(artifact[-creature;manacost=0]) becomes(Creature,0/0) -auto=lord(artifact[-creature;manacost=1]) becomes(Creature,1/1) -auto=lord(artifact[-creature;manacost=2]) becomes(Creature,2/2) -auto=lord(artifact[-creature;manacost=3]) becomes(Creature,3/3) -auto=lord(artifact[-creature;manacost=4]) becomes(Creature,4/4) -auto=lord(artifact[-creature;manacost=5]) becomes(Creature,5/5) -auto=lord(artifact[-creature;manacost=6]) becomes(Creature,6/6) -auto=lord(artifact[-creature;manacost=7]) becomes(Creature,7/7) -auto=lord(artifact[-creature;manacost=8]) becomes(Creature,8/8) -auto=lord(artifact[-creature;manacost=9]) becomes(Creature,9/9) -auto=lord(artifact[-creature;manacost=10]) becomes(Creature,10/10) +auto=lord(artifact[-creature]) transforms((creature,newability[manacost/manacost])) mana={3}{U} type=Enchantment text=Each noncreature artifact is an artifact creature with power and toughness each equal to its converted mana cost. (Equipment that's a creature can't equip a creature.) @@ -71155,8 +71132,8 @@ toughness=1 [card] name=Marsh Casualties kicker={3} -auto=lord(creature|opponentBattlefield) -1/-1 -auto=kicker lord(creature|opponentBattlefield) -1/-1 +auto=all(creature|opponentBattlefield) -1/-1 ueot +auto=kicker all(creature|opponentBattlefield) -1/-1 ueot text=Kicker {3} (You may pay an additional {3} as you cast this spell.) -- Creatures target player controls get -1/-1 until end of turn. If Marsh Casualties was kicked, those creatures get -2/-2 until end of turn instead. mana={B}{B} type=Sorcery @@ -71192,7 +71169,7 @@ toughness=1 [/card] [card] name=Marsh Gas -auto=lord(creature) -2/-0 +auto=all(creature) -2/-0 ueot text=All creatures get -2/-0 until end of turn. mana={B} type=Instant @@ -71251,8 +71228,8 @@ toughness=2 [/card] [card] name=Marshaling Cry -auto=lord(creature|myBattlefield) 1/1 -auto=lord(creature|myBattlefield) vigilance +auto=all(creature|myBattlefield) 1/1 ueot +auto=all(creature|myBattlefield) vigilance ueot autohand=__CYCLING__({2}) flashback={3}{W} text=Creatures you control get +1/+1 and gain vigilance until end of turn. -- Cycling {2} ({2}, Discard this card: Draw a card.) -- Flashback {3}{W} (You may cast this card from your graveyard for its flashback cost. Then exile it.) @@ -72827,7 +72804,7 @@ toughness=3 [/card] [card] name=Merrow Reejerey -auto=lord(merfolk|myBattlefield) 1/1 other +auto=lord(other merfolk|myBattlefield) 1/1 auto=@movedTo(merfolk|mystack) from(*|myhand):all(this) transforms((,newability[may tap target(*)],newability[may untap target(*)])) ueot text=Other Merfolk creatures you control get +1/+1. -- Whenever you cast a Merfolk spell, you may tap or untap target permanent. mana={2}{U} @@ -74975,8 +74952,8 @@ other={1}{U} name(Overload) target=creature|mybattlefield auto=paidmana 0/1 auto=paidmana opponentshroud -auto=overload lord(creature|mybattlefield) 0/1 -auto=overload lord(creature|mybattlefield) opponentshroud +auto=overload all(creature|mybattlefield) 0/1 ueot +auto=overload all(creature|mybattlefield) opponentshroud ueot text=Target creature you control gets +0/+1 and gains hexproof until end of turn. -- Overload {1}{U} (You may cast this spell for its overload cost. If you do, change its text by replacing all instances of "target" with "each.") mana={U} type=Instant @@ -76006,7 +75983,7 @@ toughness=2 [/card] [card] name=Morale -auto=lord(creature[attacking]) 1/1 +auto=all(creature[attacking]) 1/1 ueot text=Attacking creatures get +1/+1 until end of turn. mana={1}{W}{W} type=Instant @@ -77317,7 +77294,7 @@ toughness=1 [card] name=Myr Matrix abilities=indestructible -auto=lord(Myr)1/1 +auto=lord(Myr) 1/1 auto={5}:token(Myr,Artifact Creature Myr,1/1,artifact) text=Myr Matrix is indestructible. ("Destroy" effects and lethal damage don't destroy it.) -- Myr creatures get +1/+1. -- {5}: Put a 1/1 colorless Myr artifact creature token onto the battlefield. mana={5} @@ -78242,7 +78219,7 @@ type=Enchantment [/card] [card] name=Nausea -auto=lord(creature) -1/-1 +auto=all(creature) -1/-1 ueot text=All creatures get -1/-1 until end of turn. mana={1}{B} type=Sorcery @@ -78591,7 +78568,7 @@ toughness=1 [/card] [card] name=Necropotence -auto=@movedTo(*|mygraveyard):all(trigger[to]) moveTo(exile) +abilities=mygraveexiler auto=phasealter(remove,draw,controller) auto={L:1}:name(pay life & exile) transforms((,newability[hiddenmoveto(exile)],newability[phaseaction[my endofturn once checkex] moveto(ownerhand)])) forever all(*[zpos=1]|mylibrary) text=Skip your draw step. -- Whenever you discard a card, exile that card from your graveyard. -- Pay 1 life: Exile the top card of your library face down. Put that card into your hand at the beginning of your next end step. @@ -79408,7 +79385,7 @@ toughness=1 [/card] [card] name=Night of Souls' Betrayal -auto=lord(creature) -1/-1 +auto=all(creature) -1/-1 ueot text=All creatures get -1/-1. mana={2}{B}{B} type=Legendary Enchantment @@ -80293,7 +80270,7 @@ toughness=2 [/card] [card] name=Nocturnal Raid -auto=lord(creature[black]) 2/0 +auto=all(creature[black]) 2/0 ueot text=Black creatures get +2/+0 until end of turn. mana={2}{B}{B} type=Instant @@ -83442,8 +83419,8 @@ type=Instant [/card] [card] name=Overrun -auto=lord(creature|myBattlefield) 3/3 -auto=lord(creature|myBattlefield) trample +auto=all(creature|myBattlefield) 3/3 ueot +auto=all(creature|myBattlefield) trample ueot text=Creatures you control get +3/+3 and gain trample until end of turn. (If a creature you control would deal enough damage to its blockers to destroy them, you may have it deal the rest of its damage to defending player or planeswalker.) mana={2}{G}{G}{G} type=Sorcery @@ -84438,7 +84415,7 @@ toughness=1 [/card] [card] name=Path of Anger's Flame -auto=lord(creature|myBattlefield) 2/0 +auto=all(creature|myBattlefield) 2/0 ueot text=Creatures you control get +2/+0 until end of turn. mana={2}{R} type=Instant @@ -87070,11 +87047,11 @@ type=Enchantment [/card] [card] name=Planar Despair -auto=aslongas(swamp|myBattlefield) lord(creature) -1/-1 -auto=aslongas(mountain|myBattlefield) lord(creature) -1/-1 -auto=aslongas(forest|myBattlefield) lord(creature) -1/-1 -auto=aslongas(plains|myBattlefield) lord(creature) -1/-1 -auto=aslongas(island|myBattlefield) lord(creature) -1/-1 +auto=aslongas(swamp|myBattlefield) all(creature) -1/-1 +auto=aslongas(mountain|myBattlefield) all(creature) -1/-1 +auto=aslongas(forest|myBattlefield) all(creature) -1/-1 +auto=aslongas(plains|myBattlefield) all(creature) -1/-1 +auto=aslongas(island|myBattlefield) all(creature) -1/-1 text=Domain - All creatures get -1/-1 until end of turn for each basic land type among lands you control. mana={3}{B}{B} type=Sorcery @@ -91360,8 +91337,8 @@ type=Instant [/card] [card] name=Rally the Forces -auto=lord(creature[attacking]) 1/0 -auto=lord(creature[attacking]) first strike +auto=all(creature[attacking]) 1/0 ueot +auto=all(creature[attacking]) first strike ueot text=Attacking creatures get +1/+0 and gain first strike until end of turn. mana={2}{R} type=Instant @@ -91393,7 +91370,7 @@ type=Instant [/card] [card] name=Rally -auto=lord(creature[blocking]) 1/1 +auto=all(creature[blocking]) 1/1 text=Blocking creatures get +1/+1 until end of turn. mana={W}{W} type=Instant @@ -94810,8 +94787,8 @@ type=Enchantment [/card] [card] name=Rhystic Shield -auto=lord(creature|mybattlefield) 0/1 -auto=ability$!name(pay or 0/2) pay[[{2}]] name(pay 2 mana) donothing?lord(creature|opponentbattlefield) 0/2!$ opponent +auto=all(creature|mybattlefield) 0/1 +auto=ability$!name(pay or 0/2) pay[[{2}]] name(pay 2 mana) donothing?all(creature|opponentbattlefield) 0/2!$ opponent text=Creatures you control get +0/+1 until end of turn. They get an additional +0/+2 until end of turn unless any player pays {2}. mana={1}{W} type=Instant @@ -95033,7 +95010,7 @@ type=Enchantment [/card] [card] name=Righteous Charge -auto=lord(creature|myBattlefield) 2/2 +auto=all(creature|myBattlefield) 2/2 text=Creatures you control get +2/+2 until end of turn. mana={1}{W}{W} type=Sorcery @@ -95745,10 +95722,9 @@ toughness=1 [card] name=River Delta auto=@each my upkeep:counter(0/0,-1,Depletion) -auto={T}:counter(0/0,1,Depletion) && Add{U} -auto={T}:counter(0/0,1,Depletion) && Add{B} -auto=lord(river delta[counter{0/0.1.Depletion}]) doesnotuntap -auto=@each my untap:untap all(river delta[-counter{0/0.1.Depletion}]) +auto={T}:Add{U} and!( counter(0/0,1,Depletion) )! +auto={T}:Add{B} and!( counter(0/0,1,Depletion) )! +auto=this(counter{0/0.1.Depletion}>=1) doesnotuntap text=River Delta doesn't untap during your untap step if it has a depletion counter on it. -- At the beginning of your upkeep, remove a depletion counter from River Delta. -- {T}: Add {W} or {B} to your mana pool. Put a depletion counter on River Delta. type=Land [/card] @@ -95922,9 +95898,8 @@ toughness=3 name=Roc Hatchling auto=counter(0/0,4,Shell) auto=@each my upkeep:counter(0/0,-1,Shell) -auto=lord(roc hatchling[-counter{0/0.1.Shell}]) 3/2 -auto=lord(other roc hatchling[-counter{0/0.1.Shell}]) -3/-2 -auto=lord(roc hatchling[-counter{0/0.1.Shell}]) flying +auto=this(counter{0/0.1.Shell}<1) 3/2 +auto=this(counter{0/0.1.Shell}<1) flying text=Roc Hatchling enters the battlefield with four shell counters on it. -- At the beginning of your upkeep, remove a shell counter from Roc Hatchling. -- As long as Roc Hatchling has no shell counters on it, it gets +3/+2 and has flying. mana={R} type=Creature @@ -99170,8 +99145,8 @@ type=Land [card] name=Savage Offensive kicker={G} -auto=lord(creature|myBattlefield) first strike -auto=kicker lord(creature|myBattlefield) 1/1 +auto=all(creature|myBattlefield) first strike +auto=kicker all(creature|myBattlefield) 1/1 text=Kicker {G} (You may pay an additional {G} as you cast this spell.) -- Creatures you control gain first strike until end of turn. If Savage Offensive was kicked, they get +1/+1 until end of turn. mana={1}{R} type=Sorcery @@ -99501,7 +99476,7 @@ toughness=2 [/card] [card] name=Scare Tactics -auto=lord(creature) 1/0 +auto=all(creature|mybattlefield) 1/0 text=Creatures you control get +1/+0 until end of turn. mana={B} type=Instant @@ -103647,7 +103622,7 @@ toughness=6 [/card] [card] name=Shield Wall -auto=lord(creature|myBattlefield) 0/2 +auto=all(creature|myBattlefield) 0/2 text=Creatures you control get +0/+2 until end of turn. mana={1}{W} type=Instant @@ -104958,7 +104933,7 @@ toughness=2 name=Sigil Blessing target=creature|myBattlefield auto=2/2 -auto=lord(creature|myBattlefield) 1/1 +auto=all(creature|myBattlefield) 1/1 text=Until end of turn, target creature you control gets +3/+3 and other creatures you control get +1/+1. mana={G}{W} type=Instant @@ -108759,7 +108734,7 @@ type=Instant [/card] [card] name=Solidarity -auto=lord(creature|myBattlefield) 0/5 +auto=all(creature|myBattlefield) 0/5 ueot text=Creatures you control get +0/+5 until end of turn. mana={3}{W} type=Instant @@ -111264,8 +111239,8 @@ toughness=5 [card] name=Spirit of the Hunt abilities=flash -auto=lord(other wolf|mybattlefield) 0/3 -auto=lord(other werewolf|mybattlefield) 0/3 +auto=all(other wolf|mybattlefield) 0/3 ueot +auto=all(other werewolf|mybattlefield) 0/3 ueot text=Flash -- When Spirit of the Hunt enters the battlefield, each other creature you control that's a Wolf or a Werewolf gets +0/+3 until end of turn. mana={1}{G}{G} type=Creature @@ -111891,8 +111866,8 @@ toughness=4 [card] name=Sprite Noble abilities=flying -auto=lord(creature[flying]|myBattlefield) 0/1 other -auto={T}:all(creature[flying]|myBattlefield) 1/0 other +auto=lord(other creature[flying]|myBattlefield) 0/1 +auto={T}:all(other creature[flying]|myBattlefield) 1/0 text=Flying -- Other creatures you control with flying get +0/+1. -- {T}: Other creatures you control with flying get +1/+0 until end of turn. mana={1}{U}{U} type=Creature @@ -112738,7 +112713,7 @@ toughness=2 [/card] [card] name=Steadfastness -auto=lord(creature|myBattlefield) 0/3 +auto=all(creature|myBattlefield) 0/3 ueot text=Creatures you control get +0/+3 until end of turn. mana={1}{W} type=Sorcery @@ -112991,7 +112966,7 @@ toughness=1 [/card] [card] name=Stench of Decay -auto=lord(creature[-artifact]) -1/-1 +auto=all(creature[-artifact]) -1/-1 text=Nonartifact creatures get -1/-1 until end of turn. mana={1}{B}{B} type=Instant @@ -114581,7 +114556,7 @@ toughness=1 [/card] [card] name=Stronghold Taskmaster -auto=lord(creature[black]) -1/-1 other +auto=lord(other creature[black]) -1/-1 text=Other black creatures get -1/-1. mana={2}{B}{B} type=Creature @@ -115465,8 +115440,8 @@ type=Land [/card] [card] name=Sunrise Sovereign -auto=lord(giant|myBattlefield) 2/2 other -auto=lord(giant|myBattlefield) trample other +auto=lord(other giant|myBattlefield) 2/2 +auto=lord(other giant|myBattlefield) trample text=Other Giant creatures you control get +2/+2 and have trample. mana={5}{R} type=Creature @@ -115766,7 +115741,7 @@ type=Instant [/card] [card] name=Surge of Thoughtweft -auto=lord(creature|myBattlefield) 1/1 +auto=all(creature|myBattlefield) 1/1 ueot auto=aslongas(kithkin|myBattlefield) draw:1 controller text=Creatures you control get +1/+1 until end of turn. If you control a Kithkin, draw a card. mana={1}{W} @@ -115776,7 +115751,7 @@ subtype=Kithkin [card] name=Surge of Zeal target=creature -auto=lord(creature[share!color!]) haste +auto=all(creature[share!color!]) haste ueot text=Radiance - Target creature and each other creature that shares a color with it gain haste until end of turn. mana={R} type=Instant @@ -116155,7 +116130,7 @@ type=Instant [/card] [card] name=Swell of Courage -auto=lord(creature|myBattlefield) 2/2 +auto=all(creature|myBattlefield) 2/2 ueot autohand={X}{W}{W}{discard}:thisfroeach(X) counter(1/1,1) target(creature) text=Creatures you control get +2/+2 until end of turn. -- Reinforce X - {X}{W}{W} ({X}{W}{W}, Discard this card: Put X +1/+1 counters on target creature.) mana={3}{W}{W} @@ -118116,8 +118091,8 @@ other={3}{U}{R} name(Overload) target=creature|mybattlefield auto=paidmana 1/0 auto=paidmana unblockable -auto=overload lord(creature|mybattlefield) 1/0 -auto=overload lord(creature|mybattlefield) unblockable +auto=overload all(creature|mybattlefield) 1/0 ueot +auto=overload all(creature|mybattlefield) unblockable ueot text=Target creature you control gets +1/+0 until end of turn and is unblockable this turn. -- Overload {3}{U}{R} (You may cast this spell for its overload cost. If you do, change its text by replacing all instances of "target" with "each.") mana={U}{R} type=Sorcery @@ -119559,26 +119534,7 @@ type=Sorcery [card] name=Thelon of Havenwood auto={B}{G}{e(fungus|graveyard)}:counter(0/0,1,Spore) all(fungus) -auto=lord(fungus[counter{0/0.1.spore}]) 1/1 -auto=lord(fungus[counter{0/0.2.spore}]) 1/1 -auto=lord(fungus[counter{0/0.3.spore}]) 1/1 -auto=lord(fungus[counter{0/0.4.spore}]) 1/1 -auto=lord(fungus[counter{0/0.5.spore}]) 1/1 -auto=lord(fungus[counter{0/0.6.spore}]) 1/1 -auto=lord(fungus[counter{0/0.7.spore}]) 1/1 -auto=lord(fungus[counter{0/0.8.spore}]) 1/1 -auto=lord(fungus[counter{0/0.9.spore}]) 1/1 -auto=lord(fungus[counter{0/0.10.spore}]) 1/1 -auto=lord(fungus[counter{0/0.11.spore}]) 1/1 -auto=lord(fungus[counter{0/0.12.spore}]) 1/1 -auto=lord(fungus[counter{0/0.13.spore}]) 1/1 -auto=lord(fungus[counter{0/0.14.spore}]) 1/1 -auto=lord(fungus[counter{0/0.15.spore}]) 1/1 -auto=lord(fungus[counter{0/0.16.spore}]) 1/1 -auto=lord(fungus[counter{0/0.17.spore}]) 1/1 -auto=lord(fungus[counter{0/0.18.spore}]) 1/1 -auto=lord(fungus[counter{0/0.19.spore}]) 1/1 -auto=lord(fungus[counter{0/0.20.spore}]) 1/1 +auto=lord(fungus) transforms((,newability[counter{0%0.1.spore}/counter{0%0.1.spore} nonstatic])) text=Each Fungus creature gets +1/+1 for each spore counter on it. -- {B}{G}, Exile a Fungus card from a graveyard: Put a spore counter on each Fungus on the battlefield. mana={G}{G} type=Legendary Creature @@ -120890,7 +120846,7 @@ type=Sorcery [card] name=Thunderblust abilities=haste,persist -auto=lord(thunderblust[counter{-1/-1.1}]) trample +auto=this(counter{-1/-1.1}>=1) trample text=Haste -- Thunderblust has trample as long as it has a -1/-1 counter on it. -- 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.) mana={2}{R}{R}{R} type=Creature @@ -121381,8 +121337,8 @@ type=Land [/card] [card] name=Timber Protector -auto=lord(treefolk|myBattlefield) 1/1 other -auto=lord(treefolk,forest|myBattlefield) indestructible other +auto=lord(other treefolk|myBattlefield) 1/1 +auto=lord(other treefolk,forest|myBattlefield) indestructible text=Other Treefolk creatures you control get +1/+1. -- Other Treefolk and Forests you control are indestructible. mana={4}{G} type=Creature @@ -121426,10 +121382,9 @@ type=Land [card] name=Timberline Ridge auto=@each my upkeep:counter(0/0,-1,Depletion) -auto={T}:counter(0/0,1,Depletion) && Add{R} -auto={T}:counter(0/0,1,Depletion) && Add{G} -auto=lord(timberline ridge[counter{0/0.1.Depletion}]) doesnotuntap -auto=@each my untap:untap all(timberline ridge[-counter{0/0.1.Depletion}]) +auto={T}:Add{R} and!( counter(0/0,1,Depletion) )! +auto={T}:Add{G} and!( counter(0/0,1,Depletion) )! +auto=this(counter{0/0.1.Depletion}>=1) doesnotuntap text=Timberline Ridge doesn't untap during your untap step if it has a depletion counter on it. -- At the beginning of your upkeep, remove a depletion counter from Timberline Ridge. -- {T}: Add {R} or {G} to your mana pool. Put a depletion counter on Timberline Ridge. type=Land [/card] @@ -121781,10 +121736,10 @@ type=Instant [/card] [card] name=Titanic Ultimatum -auto=lord(creature|myBattlefield) 5/5 -auto=lord(creature|myBattlefield) lifelink -auto=lord(creature|myBattlefield) first strike -auto=lord(creature|myBattlefield) trample +auto=all(creature|myBattlefield) 5/5 ueot +auto=all(creature|myBattlefield) lifelink ueot +auto=all(creature|myBattlefield) first strike ueot +auto=all(creature|myBattlefield) trample ueot text=Until end of turn, creatures you control get +5/+5 and gain first strike, lifelink, and trample. mana={R}{R}{G}{G}{G}{W}{W} type=Sorcery @@ -121969,8 +121924,8 @@ type=Instant [/card] [card] name=Tolsimir Wolfblood -auto=lord(creature[green]|myBattlefield) 1/1 other -auto=lord(creature[white]|myBattlefield) 1/1 other +auto=lord(other creature[green]|myBattlefield) 1/1 +auto=lord(other creature[white]|myBattlefield) 1/1 auto={T}:token(voja,legendary creature wolf,2/2,greenwhite) text=Other green creatures you control get +1/+1. -- Other white creatures you control get +1/+1. -- {T}: Put a legendary 2/2 green and white Wolf creature token named Voja onto the battlefield. mana={4}{G}{W} @@ -123805,7 +123760,7 @@ toughness=4 [/card] [card] name=Tribal Unity -auto=chooseatype lord(creature[chosentype]) castx/castx chooseend +auto=chooseatype all(creature[chosentype]) castx/castx ueot chooseend text=Creatures of the creature type of your choice get +X/+X until end of turn. mana={X}{2}{G} type=Instant @@ -124055,9 +124010,9 @@ type=Enchantment [/card] [card] name=Triumph of the Hordes -auto=lord(creature|myBattlefield) 1/1 -auto=lord(creature|myBattlefield) trample -auto=lord(creature|myBattlefield) infect +auto=all(creature|myBattlefield) 1/1 ueot +auto=all(creature|myBattlefield) trample ueot +auto=all(creature|myBattlefield) infect ueot text=Until end of turn, creatures you control get +1/+1 and gain trample and infect. mana={2}{G}{G} type=Sorcery @@ -124111,12 +124066,12 @@ toughness=6 [/card] [card] name=Tromp the Domains -auto=aslongas(plains|myBattlefield) lord(creature|myBattlefield) 1/1 -auto=aslongas(forest|myBattlefield) lord(creature|myBattlefield) 1/1 -auto=aslongas(mountain|myBattlefield) lord(creature|myBattlefield) 1/1 -auto=aslongas(swamp|myBattlefield) lord(creature|myBattlefield) 1/1 -auto=aslongas(island|myBattlefield) lord(creature|myBattlefield) 1/1 -auto=lord(creature|myBattlefield) trample +auto=aslongas(plains|myBattlefield) all(creature|myBattlefield) 1/1 ueot +auto=aslongas(forest|myBattlefield) all(creature|myBattlefield) 1/1 ueot +auto=aslongas(mountain|myBattlefield) all(creature|myBattlefield) 1/1 ueot +auto=aslongas(swamp|myBattlefield) all(creature|myBattlefield) 1/1 ueot +auto=aslongas(island|myBattlefield) all(creature|myBattlefield) 1/1 ueot +auto=all(creature|myBattlefield) trample ueot text=Domain - Until end of turn, creatures you control gain trample and get +1/+1 for each basic land type among lands you control. mana={5}{G} type=Sorcery @@ -124285,7 +124240,7 @@ toughness=2 [/card] [card] name=Trumpet Blast -auto=lord(creature[attacking]) 2/0 +auto=all(creature[attacking]) 2/0 ueot text=Attacking creatures get +2/+0 until end of turn. mana={2}{R} type=Instant @@ -124506,7 +124461,7 @@ type=Instant [/card] [card] name=Turn the Tide -auto=lord(creature|opponentbattlefield) -2/0 +auto=all(creature|opponentbattlefield) -2/0 ueot text=Creatures your opponents control get -2/-0 until end of turn. mana={1}{U} type=Instant @@ -126309,7 +126264,7 @@ toughness=1 [/card] [card] name=Urborg Shambler -auto=lord(creature[black]) -1/-1 other +auto=lord(other creature[black]) -1/-1 text=Other black creatures get -1/-1. mana={2}{B}{B} type=Creature @@ -126761,7 +126716,7 @@ toughness=2 [/card] [card] name=Valorous Charge -auto=lord(creature[white]) 2/0 +auto=all(creature[white]) 2/0 ueot text=White creatures get +2/+0 until end of turn. mana={1}{W}{W} type=Sorcery @@ -126941,8 +126896,8 @@ type=Sorcery [/card] [card] name=Vampiric Fury -auto=lord(creature[vampire]|mybattlefield) 2/0 -auto=lord(creature[vampire]|mybattlefield) first strike +auto=all(creature[vampire]|mybattlefield) 2/0 ueot +auto=all(creature[vampire]|mybattlefield) first strike ueot text=Vampire creatures you control get +2/+0 and gain first strike until end of turn. mana={1}{R} type=Instant @@ -127526,10 +127481,9 @@ toughness=5 [card] name=Veldt auto=@each my upkeep:counter(0/0,-1,Depletion) -auto={T}:counter(0/0,1,Depletion) && Add{G} -auto={T}:counter(0/0,1,Depletion) && Add{W} -auto=lord(veldt[counter{0/0.1.Depletion}]) doesnotuntap -auto=@each my untap:untap all(veldt[-counter{0/0.1.Depletion}]) +auto={T}:Add{G} and!( counter(0/0,1,Depletion) )! +auto={T}:Add{W} and!( counter(0/0,1,Depletion) )! +auto=this(counter{0/0.1.Depletion}>=1) doesnotuntap text=Veldt doesn't untap during your untap step if it has a depletion counter on it. -- At the beginning of your upkeep, remove a depletion counter from Veldt. -- {T}: Add {G} or {W} to your mana pool. Put a depletion counter on Veldt. type=Land [/card] @@ -127870,8 +127824,8 @@ type=Sorcery [/card] [card] name=Verdeloth the Ancient -auto=lord(treefolk) 1/1 other -auto=lord(saproling) 1/1 other +auto=lord(other treefolk) 1/1 +auto=lord(saproling) 1/1 auto=token(saproling,creature saproling,1/1,green)*x text=Kicker {X} (You may pay an additional {X} as you cast this spell.) -- Saproling creatures and other Treefolk creatures get +1/+1. -- When Verdeloth the Ancient enters the battlefield, if it was kicked, put X 1/1 green Saproling creature tokens onto the battlefield. mana={4}{G}{G}{X} @@ -128044,7 +127998,7 @@ type=Land [/card] [card] name=Veteran Armorer -auto=lord(creature|myBattlefield) 0/1 other +auto=lord(other creature|myBattlefield) 0/1 text=Other creatures you control get +0/+1. mana={1}{W} type=Creature @@ -128054,7 +128008,7 @@ toughness=2 [/card] [card] name=Veteran Armorsmith -auto=lord(soldier|myBattlefield) 0/1 other +auto=lord(other soldier|myBattlefield) 0/1 text=Other Soldier creatures you control get +0/+1. mana={W}{W} type=Creature @@ -128490,8 +128444,7 @@ type=Sorcery [/card] [card] name=Vicious Kavu -auto=lord(vicious kavu[attacking]|mybattlefield) 2/0 -auto=lord(other vicious kavu[attacking]|mybattlefield) -2/0 +auto=this(attacking) 2/0 text=Whenever Vicious Kavu attacks, it gets +2/+0 until end of turn. mana={1}{B}{R} type=Creature @@ -128940,7 +128893,7 @@ toughness=2 [card] name=Violent Outburst autostack=if casted(this) then cascade:plibrarycount -auto=lord(creature|myBattlefield) 1/0 +auto=all(creature|myBattlefield) 1/0 ueot text=Cascade (When you cast this spell, exile cards from the top of your library until you exile a nonland card that costs less. You may cast it without paying its mana cost. Put the exiled cards on the bottom in a random order.) -- Creatures you control get +1/+0 until end of turn. mana={1}{R}{G} type=Instant @@ -129134,7 +129087,7 @@ type=Sorcery [/card] [card] name=Virtuous Charge -auto=lord(creature|myBattlefield) 1/1 +auto=all(creature|myBattlefield) 1/1 ueot text=Creatures you control get +1/+1 until end of turn. mana={2}{W} type=Sorcery @@ -131836,14 +131789,14 @@ toughness=4 [/card] [card] name=Warrior's Charge -auto=lord(creature|myBattlefield) 1/1 +auto=all(creature|myBattlefield) 1/1 ueot text=Creatures you control get +1/+1 until end of turn. mana={2}{W} type=Sorcery [/card] [card] name=Warrior's Honor -auto=lord(creature|myBattlefield) 1/1 +auto=all(creature|myBattlefield) 1/1 ueot text=Creatures you control get +1/+1 until end of turn. mana={2}{W} type=Instant @@ -132367,8 +132320,8 @@ other={1}{R} name(Overload) target=creature|mybattlefield auto=paidmana 1/0 auto=paidmana first strike -auto=overload lord(creature|mybattlefield) 1/0 -auto=overload lord(creature|mybattlefield) first strike +auto=overload all(creature|mybattlefield) 1/0 ueot +auto=overload all(creature|mybattlefield) first strike ueot text=Target creature you control gets +1/+0 and gains first strike until end of turn. -- Overload {1}{R} (You may cast this spell for its overload cost. If you do, change its text by replacing all instances of "target" with "each.") mana={R} type=Instant @@ -133898,8 +133851,8 @@ type=Sorcery [/card] [card] name=Wind Shear -auto=lord(creature[attacking;flying]) -2/-2 -auto=lord(creature[attacking;flying]) -flying +auto=all(creature[attacking;flying]) -2/-2 ueot +auto=all(creature[attacking;flying]) -flying ueot text=Attacking creatures with flying get -2/-2 and lose flying until end of turn. mana={2}{G} type=Instant @@ -134728,7 +134681,7 @@ type=Land [/card] [card] name=Wizened Cenn -auto=lord(kithkin|myBattlefield) 1/1 other +auto=lord(other kithkin|myBattlefield) 1/1 text=Other Kithkin creatures you control get +1/+1. mana={W}{W} type=Creature @@ -134784,7 +134737,7 @@ toughness=2 [card] name=Wojek Siren target=creature -auto=lord(creature[share!color!]) 1/1 +auto=all(creature[share!color!]) 1/1 ueot text=Radiance - Target creature and each other creature that shares a color with it get +1/+1 until end of turn. mana={W} type=Instant @@ -136522,8 +136475,8 @@ toughness=1 [/card] [card] name=Zealous Persecution -auto=lord(creature|myBattlefield) 1/1 -auto=lord(creature|opponentBattlefield) -1/-1 +auto=all(creature|myBattlefield) 1/1 ueot +auto=all(creature|opponentBattlefield) -1/-1 ueot text=Until end of turn, creatures you control get +1/+1 and creatures your opponents control get -1/-1. mana={W}{B} type=Instant @@ -137114,7 +137067,7 @@ toughness=2 [card] name=Zuberi, Golden Feather abilities=flying -auto=lord(griffin) 1/1 other +auto=lord(other griffin) 1/1 text=Flying -- Other Griffin creatures get +1/+1. mana={4}{W} type=Legendary Creature diff --git a/projects/mtg/src/AllAbilities.cpp b/projects/mtg/src/AllAbilities.cpp index 99236b420..d91c0fcb3 100644 --- a/projects/mtg/src/AllAbilities.cpp +++ b/projects/mtg/src/AllAbilities.cpp @@ -8111,6 +8111,7 @@ MTGCardInstance * AACastCard::makeCard() if(!cardData) return NULL; card = NEW MTGCardInstance(cardData, source->controller()->game); card->owner = source->controller(); + card->lastController = source->controller(); source->controller()->game->temp->addCard(card); return card; } @@ -8143,9 +8144,9 @@ int AACastCard::resolveSpell() { if(theNamedCard) { - MTGCardInstance * copy = _target->controller()->game->putInZone(_target, _target->currentZone, _target->controller()->game->temp); - copy->changeController(source->controller(),true); - Spell * spell = NEW Spell(game, 0,copy,NULL,NULL, 1); + //MTGCardInstance * copy = source->controller()->game->putInZone(_target, _target->currentZone, source->controller()->game->temp); + //copy->changeController(source->controller(),true); + Spell * spell = NEW Spell(game, -1,theNamedCard,NULL,NULL, 1); spell->resolve(); delete spell; @@ -8166,6 +8167,61 @@ int AACastCard::resolveSpell() } } + // + if(theNamedCard) + { + //MTGCardInstance * copy = source->controller()->game->putInZone(_target, _target->currentZone, source->controller()->game->temp); + //copy->changeController(source->controller(),true); + Spell * spell = NULL; + MTGCardInstance * copy = source->controller()->game->putInZone(theNamedCard, theNamedCard->currentZone, source->controller()->game->stack); + + if (game->targetChooser) + { + game->targetChooser->Owner = source->controller(); + spell = game->mLayers->stackLayer()->addSpell(copy, game->targetChooser, NULL, 1, 0); + game->targetChooser = NULL; + } + else + { + spell = game->mLayers->stackLayer()->addSpell(copy, NULL, NULL, 1, 0); + } + + if (copy->has(Constants::STORM)) + { + int storm = source->controller()->game->stack->seenThisTurn("*", Constants::CAST_ALL) + source->controller()->opponent()->game->stack->seenThisTurn("*", Constants::CAST_ALL); + + for (int i = storm; i > 1; i--) + { + spell = game->mLayers->stackLayer()->addSpell(copy, NULL, 0, 1, 1); + + } + } + if (!copy->has(Constants::STORM)) + { + copy->X = 0; + copy->castX = copy->X; + } + if(andAbility) + { + MTGAbility * andAbilityClone = andAbility->clone(); + andAbilityClone->target = copy; + if(andAbility->oneShot) + { + andAbilityClone->resolve(); + SAFE_DELETE(andAbilityClone); + } + else + { + andAbilityClone->addToGame(); + } + } + + this->forceDestroy = true; + processed = true; + return 1; + } + // + Spell * spell = NULL; MTGCardInstance * copy = NULL; if ((normal || asNormalMadness)||(!_target->hasType(Subtypes::TYPE_INSTANT) && !_target->hasType(Subtypes::TYPE_SORCERY))) diff --git a/projects/mtg/src/GameObserver.cpp b/projects/mtg/src/GameObserver.cpp index 160edc59e..d91735b50 100644 --- a/projects/mtg/src/GameObserver.cpp +++ b/projects/mtg/src/GameObserver.cpp @@ -807,7 +807,7 @@ void GameObserver::gameStateBasedEffects() if ((card->target||card->playerTarget) && !card->hasType(Subtypes::TYPE_EQUIPMENT)) { if(card->target && !isInPlay(card->target)) - players[i]->game->putInGraveyard(card); + players[i]->game->putInGraveyard(card); /*if(card->target && isInPlay(card->target)) {//what exactly does this section do? if(card->spellTargetType.find("creature") != string::npos && !card->target->hasType("creature")) @@ -822,7 +822,7 @@ void GameObserver::gameStateBasedEffects() players[i]->game->putInGraveyard(card); }*/ if(card->target && isInPlay(card->target) && (card->target)->protectedAgainst(card) && !card->has(Constants::AURAWARD))//protection from quality except aura cards like flickering ward - players[i]->game->putInGraveyard(card); + players[i]->game->putInGraveyard(card); } card->enchanted = false; if (card->target && isInPlay(card->target) && !card->hasType(Subtypes::TYPE_EQUIPMENT) && card->hasSubtype(Subtypes::TYPE_AURA)) @@ -940,7 +940,6 @@ void GameObserver::gameStateBasedEffects() //checks if a player has a card which has the stated ability in play. Player * p = players[i]; MTGGameZone * z = players[i]->game->inPlay; - int nbcards = z->nb_cards; //------------------------------ if(z->hasAbility(Constants::NOMAXHAND)||p->opponent()->inPlay()->hasAbility(Constants::OPPNOMAXHAND)) p->nomaxhandsize = true; @@ -951,7 +950,7 @@ void GameObserver::gameStateBasedEffects() ///////////////////////////////////////////////// if (mCurrentGamePhase == MTG_PHASE_ENDOFTURN+1) { - for (int j = 0; j < nbcards; ++j) + for (int j = z->nb_cards - 1; j >= 0; j--) { MTGCardInstance * c = z->cards[j]; @@ -974,31 +973,25 @@ void GameObserver::gameStateBasedEffects() c->damageToCreature = false; c->isAttacking = NULL; } - for (int t = 0; t < nbcards; t++) + for (int jj = z->nb_cards - 1; jj >= 0; jj--) { - MTGCardInstance * c = z->cards[t]; + MTGCardInstance * c = z->cards[jj]; - if(!c->isPhased) + if(c && !c->isPhased) { if (c->has(Constants::TREASON)) { MTGCardInstance * beforeCard = c; - p->game->putInGraveyard(c); + p->game->putInZone(c, c->currentZone, c->owner->game->graveyard); WEvent * e = NEW WEventCardSacrifice(beforeCard,c); receiveEvent(e); } if (c->has(Constants::UNEARTH)) { - p->game->putInExile(c); - + p->game->putInZone(c, c->currentZone, c->owner->game->exile); } } - if(nbcards > z->nb_cards) - { - t = 0; - nbcards = z->nb_cards; - } } MTGGameZone * f = p->game->graveyard; diff --git a/projects/mtg/src/MTGRules.cpp b/projects/mtg/src/MTGRules.cpp index 0b389b9d4..92a8c0dda 100644 --- a/projects/mtg/src/MTGRules.cpp +++ b/projects/mtg/src/MTGRules.cpp @@ -3201,7 +3201,8 @@ int MTGUnearthRule::receiveEvent(WEvent * event) Player * p = game->players[i]; if (e->to == p->game->graveyard || e->to == p->game->hand || e->to == p->game->library) { - p->game->putInExile(e->card); + //p->game->putInExile(e->card); + e->to->owner->game->putInExile(e->card); return 1; } } diff --git a/projects/mtg/src/Rules.cpp b/projects/mtg/src/Rules.cpp index fc4681608..e1b50df2b 100644 --- a/projects/mtg/src/Rules.cpp +++ b/projects/mtg/src/Rules.cpp @@ -431,7 +431,8 @@ void Rules::initGame(GameObserver *g, bool currentPlayerSet) { if (zone == p->game->inPlay) { - MTGCardInstance * copy = p->game->putInZone(card, p->game->library, p->game->stack); + //MTGCardInstance * copy = p->game->putInZone(card, p->game->library, p->game->stack); + MTGCardInstance * copy = zone->owner->game->putInZone(card, p->game->library, p->game->stack); Spell * spell = NEW Spell(g, copy); spell->resolve(); delete spell; @@ -442,7 +443,8 @@ void Rules::initGame(GameObserver *g, bool currentPlayerSet) { LOG ("RULES ERROR, CARD NOT FOUND IN LIBRARY\n"); } - p->game->putInZone(card, p->game->library, zone); + //p->game->putInZone(card, p->game->library, zone); + zone->owner->game->putInZone(card, p->game->library, zone); } } else diff --git a/projects/mtg/src/TestSuiteAI.cpp b/projects/mtg/src/TestSuiteAI.cpp index 6e8a430ee..51c6f353c 100644 --- a/projects/mtg/src/TestSuiteAI.cpp +++ b/projects/mtg/src/TestSuiteAI.cpp @@ -873,7 +873,8 @@ void TestSuiteGame::initGame() { if (zone == p->game->inPlay) { - MTGCardInstance * copy = p->game->putInZone(card, p->game->library, p->game->stack); + //MTGCardInstance * copy = p->game->putInZone(card, p->game->library, p->game->stack); + MTGCardInstance * copy = zone->owner->game->putInZone(card, p->game->library, p->game->stack); Spell * spell = NEW Spell(observer, copy); spell->resolve(); if (!summoningSickness && (size_t)p->game->inPlay->nb_cards > k) p->game->inPlay->cards[k]->summoningSickness = 0; @@ -885,7 +886,8 @@ void TestSuiteGame::initGame() { LOG ("TESTUITE ERROR, CARD NOT FOUND IN LIBRARY\n"); } - p->game->putInZone(card, p->game->library, zone); + //p->game->putInZone(card, p->game->library, zone); + zone->owner->game->putInZone(card, p->game->library, zone); } } else