From 1ce0facf215f2af172e7e42b1f4d0ea25a7df38d Mon Sep 17 00:00:00 2001 From: Vittorio Alfieri Date: Fri, 27 Aug 2021 00:29:47 +0200 Subject: [PATCH] Added/fixed primitives, Added keywords "showopponenthand" and "showcontrollerhand" to allow controller and opponent to play with their hand revealed, added "mytarg" prefix to check values for a card target as like we do for "storedcard" prefix (e.g. "Redirect"), fixed "undocpy" keyoword for all cards (e.g. "Renegade Doppelganger") that have to be back from a previous copy. --- CHANGELOG.md | 5 +- .../bin/Res/sets/primitives/borderline.txt | 243 +++++++++++++++++- projects/mtg/bin/Res/sets/primitives/mtg.txt | 2 +- .../bin/Res/sets/primitives/planeswalkers.txt | 50 ++-- .../bin/Res/sets/primitives/unsupported.txt | 156 +---------- projects/mtg/include/MTGDefinitions.h | 4 +- projects/mtg/src/AllAbilities.cpp | 2 + projects/mtg/src/GameObserver.cpp | 4 +- projects/mtg/src/GuiStatic.cpp | 39 ++- projects/mtg/src/MTGDefinitions.cpp | 2 + projects/mtg/src/WParsedInt.cpp | 14 +- 11 files changed, 305 insertions(+), 216 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f11ffa3cc..119c5ab58 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,8 +2,11 @@ ## [master] (https://github.com/WagicProject/wagic/tree/master) +### 26/08/21 +- *Committed:* Added/fixed primitives, Added keywords "showopponenthand" and "showcontrollerhand" to allow controller and opponent to play with their hand revealed, added "mytarg" prefix to check values for a card target as like we do for "storedcard" prefix (e.g. "Redirect"), fixed "undocpy" keyoword for all cards (e.g. "Renegade Doppelganger") that have to be back from a previous copy. ([Vitty85](https://github.com/Vitty85)) + ### 25/08/21 -- *Committed:* Added/fixed primitives, Improved AI: now it can plays cards using morph cost too. ([Vitty85](https://github.com/Vitty85)) +- *Committed:* Added/fixed primitives, Improved AI: now it can plays cards using morph cost too. https://github.com/WagicProject/wagic/commit/bbc25e2727b1007ecb28888ce26482d856187298 ([Vitty85](https://github.com/Vitty85)) ### 24/08/21 - *Committed:* Added/fixed primitives, improved "TurnSide", "Morph" and "Flip" abilities when dealing with Commanders, added "fresh" attribute to cards just put in Sideboard, added a put back rule when a Commander is put in Sideboard, allowed to cast a card with kicker or alternative or morph cost from the CommandZone: in case of Morphed or DoubleFace cards (e.g. "Tergrid, God of Fright"), they will be put in play but they won't be Commander, but when they will be put elsewhere (e.g. destroyed) they may be back to the CommandZone with the usual Commander put back rule. https://github.com/WagicProject/wagic/commit/c7c2025fc9d44c4583a3e23a263824c3dcc62f59 ([Vitty85](https://github.com/Vitty85)) diff --git a/projects/mtg/bin/Res/sets/primitives/borderline.txt b/projects/mtg/bin/Res/sets/primitives/borderline.txt index 4cc7d731e..2b6c520a0 100644 --- a/projects/mtg/bin/Res/sets/primitives/borderline.txt +++ b/projects/mtg/bin/Res/sets/primitives/borderline.txt @@ -37054,8 +37054,8 @@ type=Instant [card] name=Liliana, Heretical Healer abilities=lifelink -auto=@movedto(Moonmist|stack):name(Transform Human Cleric) moveto(ownerBattlefield) && flip(Liliana, Defiant Necromancer) -auto=@movedTo(other creature[-token]|graveyard) from(myBattlefield):moveto(exile) and!( moveto(mybattlefield) and!(counter(0/0,3,Loyalty) && flip(Liliana, Defiant Necromancer) )! )! && ability$!name(Create Zombie) token(Zombie,Creature Zombie,2/2,black)!$ controller +auto=@movedto(Moonmist|stack):name(Transform Human Cleric) flip(Liliana, Defiant Necromancer) +auto=@movedTo(other creature[-token]|graveyard) from(myBattlefield):name(Liliana, Defiant Necromancer) moveto(exile) and!( moveto(mybattlefield) and!( transforms((,newability[counter(0/0.3.Loyalty)],newability[flip(Liliana^ Defiant Necromancer)],newability[name(Create Zombie) token(Zombie Lil)])) oneshot )! )! text=Lifelink -- Whenever another nontoken creature you control dies, exile Liliana, Heretical Healer, then return her to the battlefield transformed under her owner's control. If you do, put a 2/2 black Zombie creature token onto the battlefield. mana={1}{B}{B} type=Legendary Creature @@ -47911,10 +47911,7 @@ toughness=3 [/card] [card] name=Psychic Transfer -other={4}{U} name(Psychic Transfer) -otherrestriction=compare(lifetotalminusopponentlifetotalminusend)~morethan~4 -restriction=compare(opponentlifetotalminuslifetotalminusend)~morethan~4 -auto=exchangelife opponent +auto=if compare(lifetotalminusopponentlifetotalminusend)~morethan~4 then exchangelife opponent else if compare(opponentlifetotalminuslifetotalminusend)~morethan~4 then exchangelife opponent text=If the difference between your life total and target player's life total is 5 or less, exchange life totals with that player. mana={4}{U} type=Sorcery @@ -48821,6 +48818,14 @@ mana={3}{B} type=Enchantment [/card] [card] +name=Rain of Gore +auto=@lifeof(player):name(Loose life instead) life:-twicethatmuch controller +auto=@lifefoeof(player):name(Loose life instead) life:-twicethatmuch opponent +text=If a spell or ability would cause its controller to gain life, that player loses that much life instead. +mana={B}{R} +type=Enchantment +[/card] +[card] name=Rain of Revelation auto=draw:3 auto=reject notatarget(*|myhand) @@ -49566,6 +49571,34 @@ type=Enchantment subtype=Aura [/card] [card] +name=Rayami, First of the Fallen +auto=@movedto(creature[-token]|graveyard) from(battlefield):name(Exile with blood counter) all(trigger[to]) moveto(exile) and!( counter(0/0.1.Blood) )! +auto=aslongas(creature[flying;counter{0/0.1.Blood}]|exile) flying +auto=aslongas(creature[first strike;counter{0/0.1.Blood}]|exile) first strike +auto=aslongas(creature[double strike;counter{0/0.1.Blood}]|exile) double strike +auto=aslongas(creature[deathtouch;counter{0/0.1.Blood}]|exile) deathtouch +auto=aslongas(creature[haste;counter{0/0.1.Blood}]|exile) haste +auto=aslongas(creature[opponentshroud;counter{0/0.1.Blood}]|exile) opponentshroud +auto=aslongas(creature[indestructible;counter{0/0.1.Blood}]|exile) indestructible +auto=aslongas(creature[lifelink;counter{0/0.1.Blood}]|exile) lifelink +auto=aslongas(creature[menace;counter{0/0.1.Blood}]|exile) menace +auto=aslongas(creature[reach;counter{0/0.1.Blood}]|exile) reach +auto=aslongas(creature[trample;counter{0/0.1.Blood}]|exile) trample +auto=aslongas(creature[vigilance;counter{0/0.1.Blood}]|exile) vigilance +auto=aslongas(creature[protection from black;counter{0/0.1.Blood}]|exile) protection from white +auto=aslongas(creature[protection from white;counter{0/0.1.Blood}]|exile) protection from black +auto=aslongas(creature[protection from blue;counter{0/0.1.Blood}]|exile) protection from blue +auto=aslongas(creature[protection from green;counter{0/0.1.Blood}]|exile) protection from green +auto=aslongas(creature[protection from red;counter{0/0.1.Blood}]|exile) protection from red +auto=aslongas(creature[protection from artifact;counter{0/0.1.Blood}]|exile) protection from artifact +text=If a nontoken creature would die, exile that card with a blood counter on it instead. -- As long as an exiled creature card with a blood counter on it has flying, Rayami, First of the Fallen has flying. The same is true for first strike, double strike, deathtouch, haste, hexproof, indestructible, lifelink, menace, protection, reach, trample, and vigilance. +mana={1}{B}{G}{U} +type=Legendary Creature +subtype=Vampire +power=5 +toughness=4 +[/card] +[card] name=Rayne, Academy Chancellor #missing parser for player/controller/opponent auto=this(auras >= 1) transforms((,newability[@targeted(*|mybattlefield) from(*|opponentzones):draw:2])) @@ -49892,6 +49925,13 @@ mana={G} type=Instant [/card] [card] +name=Reclamation +auto=lord(creature[black;-canattack]|battlefield) transforms((,newability[becomes(^^black)],newability[cantattack],newability[{S(land|myBattlefield)}:name(Sacrifice a land to attack) canattack ueot attackersonly])) +text=Black creatures can't attack unless their controller sacrifices a land for each black creature he or she controls that's attacking. +mana={2}{G}{W} +type=Enchantment +[/card] +[card] name=Reconnaissance Mission abilities=cycling auto=@combatdamagefoeof(player) from(creature|myBattlefield):may draw:1 controller @@ -49970,6 +50010,14 @@ power=3 toughness=2 [/card] [card] +name=Redirect +target=*[instant;sorcery]|stack +auto=may name(Choose new targets) fizzle && activate castcard(copied noevent costx!:mytargx:! kicked!:mytargkicked:!) +text=You may choose new targets for target spell. +mana={U}{U} +type=Instant +[/card] +[card] name=Reduce // Rubble target=*|stack auto=transforms((,newability[pay[[{3}]] name(pay 3 mana) donothing?fizzle])) forever restriction{type(*|stack)~morethan~0} @@ -50314,6 +50362,13 @@ mana={3} type=Artifact [/card] [card] +name=Remedy +auto=thisforeach(variable{5}) ability$!name(Prevent 1 damage) name(Prevent 1 damage) prevent:1 target(creature,player)!$ controller +text=Prevent the next 5 damage that would be dealt this turn to any number of target creatures and/or players, divided as you choose. +mana={1}{W} +type=Instant +[/card] +[card] name=Remember the Fallen target=*[creature;artifact]|mygraveyard auto=choice name(Choose one) moveto(myhand) @@ -50352,6 +50407,16 @@ power=* toughness=3 [/card] [card] +name=Renegade Doppelganger +auto=@movedto(other creature|myBattlefield) restriction{compare(iscopied)~equalto~0}:may name(Copy creature) all(trigger[to]) copy and!( all(this) transforms((,newability[phaseaction[endofturn once] flip(Renegade Doppelganger) undocpy])) forever )! +text=Whenever another creature enters the battlefield under your control, you may have Renegade Doppelganger become a copy of that creature until end of turn. (If it does, it loses this ability for the rest of the turn.) +mana={1}{U} +type=Creature +subtype=Shapeshifter +power=0 +toughness=1 +[/card] +[card] name=Renegade Krasis auto=evolve auto=@counteradded(1/1) from(this):all(creature[counter{1/1.1}]|mybattlefield) counter(1/1) @@ -50388,6 +50453,14 @@ power=1 toughness=3 [/card] [card] +name=Repeated Reverberation +#The abilities cannot be targeted or activated twice ATM. +auto=emblem transforms((,newability[@movedto(*[instant;sorcery]|mystack) turnlimited:name(Copy spell) all(trigger[to]) transforms((,newability[activate castcard(copied noevent costx!:x:! kicked!:kicked:!)])) oneshot])) ueot +text=When you next cast an instant spell, cast a sorcery spell, or activate a loyalty ability this turn, copy that spell or ability twice. You may choose new targets for the copies. +mana={2}{R}{R} +type=Instant +[/card] +[card] name=Repeating Barrage target=creature,player auto=damage:3 @@ -50772,6 +50845,13 @@ mana={W}{W} type=Instant [/card] [card] +name=Revelation +abilities=showopponenthand,showcontrollerhand +text=Players play with their hands revealed. +mana={G} +type=World Enchantment +[/card] +[card] name=Revenge of Ravens auto=@combat(attacking) source(creature|opponentBattlefield):life:-1 opponent && life:1 controller text=Whenever a creature attacks you or a planeswalker you control, that creature's controller loses 1 life and you gain 1 life. @@ -54837,7 +54917,7 @@ toughness=4 [/card] [card] name=Seer's Vision -auto={0}:name(Look opponent's hand) target(*|opponenthand) moveto(opponentreveal) and!( moveto(opponenthand) )! +abilities=showopponenthand auto={S}:name(Look hand and discard) target(*|opponenthand) reject assorcery text=Your opponents play with their hands revealed. -- Sacrifice Seer's Vision: Look at target player's hand and choose a card from it. That player discards that card. Activate this ability only any time you could cast a sorcery. mana={2}{U}{B} @@ -63101,6 +63181,13 @@ power=3 toughness=4 [/card] [card] +name=Tainted Remedy +auto=@lifefoeof(player):name(Loose life instead) life:-twicethatmuch opponent +text=If an opponent would gain life, that player loses that much life instead. +mana={2}{B} +type=Enchantment +[/card] +[card] name=Taj-Nar Swordsmith auto=choice name(Don't pay) donothing auto=choice name(X = 0) transforms((,newability[name(Search equipment) target(equipment[manacost=0]|mylibrary) moveTo(mybattlefield) and!( shuffle )!])) oneshot @@ -63687,6 +63774,13 @@ power=3 toughness=4 [/card] [card] +name=Telepathy +abilities=showopponenthand +text=Your opponents play with their hands revealed. +mana={U} +type=Enchantment +[/card] +[card] name=Teleportation Circle auto=@each my end:may name(Exile creature or artifact) target(*[creature;artifact]|mybattlefield) moveto(exile) and!( moveto(ownerbattlefield) )! text=At the beginning of your end step, exile up to one target artifact or creature you control, then return that card to the battlefield under its owner’s control. @@ -70803,8 +70897,7 @@ toughness=4 [/card] [card] name=Wandering Eye -abilities=flying -auto={0}:Reveal:type:*:opponenthand revealzone(opponenthand) revealtype(*|opponenthand) optionone target(*|reveal) moveto(opponenthand) optiononeend optiontwo name(Put Back) target(*|reveal) transforms((,newability[all(*|reveal) moveto(ownerhand)])) ueot optiontwoend revealend +abilities=flying,showopponenthand,showcontrollerhand text=Flying -- Players play with their hands revealed. mana={2}{U} type=Creature @@ -71674,6 +71767,14 @@ mana={3}{G} type=Instant [/card] [card] +name=Wild Ricochet +target=*[instant;sorcery]|stack +auto=may name(Choose new targets) fizzle && activate castcard(copied noevent costx!:mytargx:! kicked!:mytargkicked:!) && activate castcard(copied noevent costx!:mytargx:! kicked!:mytargkicked:!) +text=You may choose new targets for target instant or sorcery spell. Then copy that spell. You may choose new targets for the copy. +mana={2}{R}{R} +type=Instant +[/card] +[card] name=Wild Shape target=creature|mybattlefield auto=choice name(Becomes Turtle) transforms((Turtle,setpower=1,settoughness=3,newability[hexproof])) ueot @@ -71793,6 +71894,16 @@ mana={1}{W} type=Instant [/card] [card] +name=Willbreaker +auto=@targeted(creature|opponentbattlefield) from(*|myzones):name(Gain control of creature) all(trigger[to]) steal +text=Whenever a creature an opponent controls becomes the target of a spell or ability you control, gain control of that creature for as long as you control Willbreaker. +mana={3}{U}{U} +type=Creature +subtype=Human Wizard +power=2 +toughness=3 +[/card] +[card] name=Willing Test Subject abilities=reach auto={6}:all(this) rolld6 6 winability donothing winabilityend loseability donothing loseabilityend rolld6end @@ -72347,6 +72458,16 @@ power=3 toughness=2 [/card] [card] +name=Wojek Apothecary +auto={T}:name(Prevent 1 damage) target(creature|battlefield) transforms((,newability[prevent:1],newability[all(creature[share!color!]|battlefield) prevent:1])) ueot +text=Radiance — {T}: Prevent the next 1 damage that would be dealt to target creature and each other creature that shares a color with it this turn. +mana={2}{W}{W} +type=Creature +subtype=Human Cleric +power=1 +toughness=1 +[/card] +[card] name=Wojek Bodyguard abilities=mentor auto=_ATTACKING_name(Choose attacking creature) transforms((,newability[target(other creature[attacking;power<=pminus1minusend]|myBattlefield) counter(1/1)])) oneshot @@ -72445,6 +72566,20 @@ power=1 toughness=1 [/card] [card] +name=Woodvine Elemental +abilities=trample +auto=@combat(attacking) source(this) restriction{compare(ishuman)~morethan~0}:name(Reveal your top card) reveal:1 revealzone(mylibrary) optionone name(Draw non-land card) target(*[-land]|reveal) moveto(mylibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(Put back) target(*|reveal) moveto(mylibrary) optiontwoend afterrevealed all(tobecast|mylibrary) transforms((,newability[draw:1],newability[all(creature[attacking]|myBattlefield) 1/1 ueot])) oneshot afterrevealedend revealend +auto=@combat(attacking) source(this) restriction{compare(ishuman)~morethan~0}:name(Reveal opponent top card) reveal:1 revealzone(opponentlibrary) optionone name(Draw non-land card) target(*[-land]|reveal) moveto(opponentlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(Put back) target(*|reveal) moveto(opponentlibrary) optiontwoend afterrevealed all(tobecast|opponentlibrary) transforms((,newability[draw:1],newability[all(creature[attacking]|opponentBattlefield) 1/1 ueot])) oneshot afterrevealedend revealend +auto=@combat(attacking) source(this) restriction{compare(ishuman)~equalto~0}:ability$!name(Reveal your top card) reveal:1 revealzone(mylibrary) optionone name(Draw non-land card) target(*[-land]|reveal) moveto(mylibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(Put back) target(*|reveal) moveto(mylibrary) optiontwoend afterrevealed all(tobecast|mylibrary) transforms((,newability[draw:1],newability[all(creature[attacking]|opponentBattlefield) 1/1 ueot])) oneshot afterrevealedend revealend!$ opponent +auto=@combat(attacking) source(this) restriction{compare(ishuman)~equalto~0}:ability$!name(Reveal opponent top card) reveal:1 revealzone(opponentlibrary) optionone name(Draw non-land card) target(*[-land]|reveal) moveto(opponentlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(Put back) target(*|reveal) moveto(opponentlibrary) optiontwoend afterrevealed all(tobecast|opponentlibrary) transforms((,newability[draw:1],newability[all(creature[attacking]|myBattlefield) 1/1 ueot])) oneshot afterrevealedend revealend!$ opponent +text=Trample -- Parley — Whenever Woodvine Elemental attacks, each player reveals the top card of his or her library. For each nonland card revealed this way, attacking creatures you control get +1/+1 until end of turn. Then each player draws a card. +mana={4}{G}{W} +type=Creature +subtype=Elemental +power=4 +toughness=4 +[/card] +[card] name=Words of War auto={1}:transforms((,newability[replacedraw ability$!name(Damage player or creature) choice name(Damage creature) target(creature|battlefield) damage:2 _ choice name(Damage opponent) damage:2 opponent _ choice name(Damage yourself) damage:2 controller!$ controller])) ueot text={1}: The next time you would draw a card this turn, Words of War deals 2 damage to target creature or player instead. @@ -72491,6 +72626,31 @@ power=4 toughness=4 [/card] [card] +name=World Queller +auto=@each my upkeep:may name(Choose a card type) transforms((,newability[choice name(Choose Land) counter(0/0.1.Land)],newability[choice name(Choose Creature) counter(0/0.1.Creature)],newability[choice name(Choose Artifact) counter(0/0.1.Artifact)],newability[choice name(Choose Enchantment) counter(0/0.1.Enchantment)],newability[choice name(Choose Planeswalker) counter(0/0.1.Planeswalker)])) oneshot +auto=@counteradded(0/0.1.Land) from(this):ability$!name(Sacrifice a land) name(Sacrifice a land) target(land|myBattlefield) sacrifice!$ controller +auto=@counteradded(0/0.1.Land) from(this):ability$!name(Sacrifice a land) name(Sacrifice a land) target(land|myBattlefield) sacrifice!$ opponent +auto=@counteradded(0/0.1.Land) from(this):removeallcounters(0/0.1.Land) +auto=@counteradded(0/0.1.Creature) from(this):ability$!name(Sacrifice a creature) name(Sacrifice a creature) target(creature|myBattlefield) sacrifice!$ controller +auto=@counteradded(0/0.1.Creature) from(this):ability$!name(Sacrifice a creature) name(Sacrifice a creature) target(creature|myBattlefield) sacrifice!$ opponent +auto=@counteradded(0/0.1.Creature) from(this):removeallcounters(0/0.1.Creature) +auto=@counteradded(0/0.1.Artifact) from(this):ability$!name(Sacrifice an artifact) name(Sacrifice an artifact) target(artifact|myBattlefield) sacrifice!$ controller +auto=@counteradded(0/0.1.Artifact) from(this):ability$!name(Sacrifice an artifact) name(Sacrifice an artifact) target(artifact|myBattlefield) sacrifice!$ opponent +auto=@counteradded(0/0.1.Artifact) from(this):removeallcounters(0/0.1.Artifact) +auto=@counteradded(0/0.1.Enchantment) from(this):ability$!name(Sacrifice an enchantment) name(Sacrifice an enchantment) target(enchantment|myBattlefield) sacrifice!$ controller +auto=@counteradded(0/0.1.Enchantment) from(this):ability$!name(Sacrifice an enchantment) name(Sacrifice an enchantment) target(enchantment|myBattlefield) sacrifice!$ opponent +auto=@counteradded(0/0.1.Enchantment) from(this):removeallcounters(0/0.1.Enchantment) +auto=@counteradded(0/0.1.Planeswalker) from(this):ability$!name(Sacrifice a planeswalker) name(Sacrifice a planeswalker) target(planeswalker|myBattlefield) sacrifice!$ controller +auto=@counteradded(0/0.1.Planeswalker) from(this):ability$!name(Sacrifice a planeswalker) name(Sacrifice a planeswalker) target(planeswalker|myBattlefield) sacrifice!$ opponent +auto=@counteradded(0/0.1.Planeswalker) from(this):removeallcounters(0/0.1.Planeswalker) +text=At the beginning of your upkeep, you may choose a card type. If you do, each player sacrifices a permanent of that type. +mana={3}{W}{W} +type=Creature +subtype=Avatar +power=4 +toughness=4 +[/card] +[card] name=World Shaper auto=_ATTACKING_may deplete:3 auto=_DIES_:all(land|mygraveyard) moveto(mybattlefield) and!(tap(noevent))! @@ -72513,6 +72673,16 @@ type=Enchantment subtype=Aura [/card] [card] +name=Worldpurge +auto=all(*|battlefield) moveto(ownerhand) +auto=ability$!name(Discard cards) name(Discard cards) target(*|myhand) moveto(mylibrary) and!( shuffle )! !$ controller +auto=ability$!name(Discard cards) name(Discard cards) target(*|myhand) moveto(mylibrary) and!( shuffle )! !$ opponent +auto=removeMana(*) +text=Return all permanents to their owners' hands. Each player chooses up to seven cards in his or her hand, then shuffles the rest into his or her library. Empty all mana pools. +mana={4}{WU}{WU}{WU}{WU} +type=Sorcery +[/card] +[card] name=Worldsoul Colossus auto=counter(1/1,X) other={convoke} name(Convoke) @@ -72545,6 +72715,24 @@ power=3 toughness=5 [/card] [card] +name=Worms of the Earth +auto=maxPlay(land)-99 controller +auto=maxPlay(land)-99 opponent +auto=@movedto(land|battlefield) from(graveyard):name(Lands can't enter the battlefield) all(trigger[to]) moveto(ownergraveyard) +auto=@movedto(land|battlefield) from(exile):name(Lands can't enter the battlefield) all(trigger[to]) moveto(ownerexile) +auto=@movedto(land|battlefield) from(hand):name(Lands can't enter the battlefield) all(trigger[to]) moveto(ownerhand) +auto=@movedto(land|battlefield) from(sideboard):name(Lands can't enter the battlefield) all(trigger[to]) moveto(ownersideboard) +auto=@movedto(land|battlefield) from(commandzone):name(Lands can't enter the battlefield) all(trigger[to]) moveto(ownercommandzone) +auto=@movedto(land|battlefield) from(library):name(Lands can't enter the battlefield) all(trigger[to]) moveto(ownerlibrary) and!( shuffle )! +auto=@each my upkeep restriction{type(land|mybattlefield)~morethan~1}:name(Sacrifice lands or deal damage) ability$!name(Choose one) choice name(Sacrifice 2 lands) target(land|myBattlefield) sacrifice and!( transforms((,newability[name(Sacrifice another land) target(land|myBattlefield) sacrifice and!( transforms((,newability[name(Destroy Worms) target(Worms of the Earth|myBattlefield) destroy])) oneshot )!])) oneshot )! _ choice name(Deals 5 damage) damage:5 controller!$ controller +auto=@each my upkeep restriction{type(land|mybattlefield)~lessthan~2}:name(Deals 5 damage) damage:5 controller +auto=@each opponent upkeep restriction{type(land|opponentbattlefield)~morethan~1}:name(Sacrifice lands or deal damage) ability$!name(Choose one) choice name(Sacrifice 2 lands) target(land|myBattlefield) sacrifice and!( transforms((,newability[name(Sacrifice another land) target(land|myBattlefield) sacrifice and!( transforms((,newability[name(Destroy Worms) target(Worms of the Earth|opponentBattlefield) destroy])) oneshot )!])) oneshot )! _ choice name(Deals 5 damage) damage:5 controller!$ opponent +auto=@each opponent upkeep restriction{type(land|opponentbattlefield)~lessthan~2}:name(Deals 5 damage) damage:5 opponent +text=Players can't play lands. -- Lands can't enter the battlefield. -- At the beginning of each upkeep, any player may sacrifice two lands or have Worms of the Earth deal 5 damage to him or her. If a player does either, destroy Worms of the Earth. +mana={2}{B}{B}{B} +type=Enchantment +[/card] +[card] name=Worthy Knight auto=@movedTo(creature[knight]|mystack):create(Human:creature Human:1/1:white) text=Whenever you cast a Knight spell, create a 1/1 white Human creature token. @@ -73193,6 +73381,22 @@ power=4 toughness=4 [/card] [card] +name=Zaxara, the Exemplary +abilities=deathtouch +auto={T}:add{W}{W} +auto={T}:add{B}{B} +auto={T}:add{G}{G} +auto={T}:add{R}{R} +auto={T}:add{U}{U} +auto=@movedto(*|mystack):all(trigger[to]) transforms((,newability[if compare(fullpaid)~morethan~0 then name(Create Hydra) token(Hydra^Creature Hydra^0/0^green) and!( counter(1/1.fullpaid) )!])) oneshot +text=Deathtouch -- {T}: Add two mana of any one color. -- Whenever you cast a spell with {X} in its mana cost, create a 0/0 green Hydra creature token, then put X +1/+1 counters on it. +mana={1}{B}{G}{U} +type=Legendary Creature +subtype=Nightmare Hydra +power=2 +toughness=3 +[/card] +[card] name=Zealot of the God-Pharaoh auto={4}{R}:damage:2 target(opponent) text={4}{R}: Zealot of the God-Pharaoh deals 2 damage to target opponent. @@ -73378,3 +73582,24 @@ subtype=Human Rogue power=1 toughness=1 [/card] +[card] +name=Zur's Weirding +abilities=showopponenthand,showcontrollerhand +auto=@drawof(player):name(Reveal card) target(*[fresh]|myhand) moveto(opponenthand) and!( transforms((,newability[choice name(Pay 2 life and put in graveyard) moveto(opponentgraveyard) and!( life:-2 controller )!],newability[choice name(Put back to hand) moveto(opponenthand)])) oneshot )! +auto=@drawfoeof(player):ability$!name(Reveal card) name(Reveal card) target(*[fresh]|myhand) moveto(opponenthand) and!( transforms((,newability[choice name(Put back to hand) moveto(opponenthand)],newability[choice name(Pay 2 life and put in graveyard) moveto(opponentgraveyard) and!( life:-2 controller )!])) oneshot )! !$ opponent +text=Players play with their hands revealed. -- If a player would draw a card, he or she reveals it instead. Then any other player may pay 2 life. If a player does, put that card into its owner's graveyard. Otherwise, that player draws a card. +mana={3}{U} +type=Enchantment +[/card] +[card] +name=Zurzoth, Chaos Rider +auto=@drawfoeof(player) restriction{myturnonly} turnlimited:name(Create Devil) token(Devil,Creature Devil,1/1,red) and!( transforms((,newability[@movedto(this|mygraveyard):damage:1 target(player^creature)])) forever )! +auto=@combat(attacking) source(creature[devil]|myBattlefield) turnlimited:name(Draw and discard) draw:1 && transforms((,newability[target(*|myhand) reject])) oneshot +auto=@combat(attacking) source(creature[devil]|myBattlefield) turnlimited:ability$!name(Draw and discard) name(Draw and discard) draw:1 && transforms((,newability[target(*|myhand) reject])) oneshot!$ opponent +text=Whenever an opponent draws their first card each turn, if it's not their turn, you create a 1/1 red Devil creature token with "When this creature dies, it deals 1 damage to any target." -- Whenever one or more Devils you control attack one or more players, you and those players each draw a card, then discard a card at random. +mana={2}{R} +type=Legendary Creature +subtype=Devil +power=2 +toughness=3 +[/card] diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index b92ab98b0..89dc9f743 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -15712,7 +15712,7 @@ type=Instant name=Burn from Within target=creature,player auto=-indestructible -auto=exiledeath +auto=if cantargetcard(*[creature]|*) then exiledeath auto=damage:X text=Burn from Within deals X damage to target creature or player. If a creature is dealt damage this way, it loses indestructible until end of turn. If that creature would die this turn, exile it instead. mana={X}{R} diff --git a/projects/mtg/bin/Res/sets/primitives/planeswalkers.txt b/projects/mtg/bin/Res/sets/primitives/planeswalkers.txt index 6fa90224d..b3de45ef6 100644 --- a/projects/mtg/bin/Res/sets/primitives/planeswalkers.txt +++ b/projects/mtg/bin/Res/sets/primitives/planeswalkers.txt @@ -1158,9 +1158,9 @@ subtype=Huatli name=Inzerva, Master of Insights aicode=activate target(*[zpos<=2]|opponentLibrary) moveto(opponentreveal) and!( bottomoflibrary )! auto=counter(0/0,4,loyalty) -auto={C(0/0,+2,Loyalty)}:name(+2: Draw 2 cards and discard) draw:2 && reject target(*|myhand) +auto={C(0/0,+2,Loyalty)}:name(+2: Draw 2 cards and discard) draw:2 && transforms((,newability[reject target(*|myhand)])) oneshot auto={C(0/0,-2,Loyalty)}:name(-2: Look at opponent library and scry 2) reveal:2 revealzone(opponentlibrary) optionone name(Put on top) target(*|reveal) moveto(ownerlibrary) optiononeend optiontwo name(Put on bottom) target(<2>*|reveal) bottomoflibrary optiontwoend afterrevealed name(Scry 2) scry:2 scrycore delayed dontshow donothing scrycoreend scryend afterrevealedend revealend -auto={C(0/0,-4,Loyalty)}:name(-4: Emblem: Draw to deal damage) token(Inzerva Emblem,Inzerva Emblem,0/0,shroud,indestructible) and!( transforms((,newability[{0}:name(Look opponent hand) target(*|opponenthand) moveTo(myreveal) and!( moveto(opponenthand) )!],newability[@drawfoeof(player):damage:1 opponent] )) forever )! +auto={C(0/0,-4,Loyalty)}:name(-4: Emblem: Draw to deal damage) emblem transforms((,newability[lord(*|opponentBattlefield) showcontrollerhand],newability[lord(*|myBattlefield) showopponenthand],newability[@drawfoeof(player):name(Damage opponent) damage:1 opponent] )) forever dontremove text=+2: Draw two cards, then discard a card. -- −2: Look at the top two cards of each other player’s library, then put any number of them on the bottom of that library and the rest on top in any order. Scry 2. -- −4: You get an emblem with "Your opponents play with their hands revealed" and "Whenever an opponent draws a card, this emblem deals 1 damage to them." mana={1}{2U}{2R} type=Legendary Planeswalker @@ -1658,29 +1658,29 @@ subtype=Liliana [card] name=Liliana, Defiant Necromancer auto=counter(0/0,3,Loyalty) -auto={C(0/0,2,Loyalty)}:name(+2: Each Player Discard) transforms((,newability[ability$!name(discard) notatarget(*|myhand) reject!$ controller],newability[ability$!name(discard) notatarget(*|myhand) reject!$ opponent])) ueot -auto={C(0/0,-0,Loyalty)}:name(-0: Reanimate nonLegendary creature with manacost 0) moveto(mybattlefield) target(creature[-legendary;manacost=0]|mygraveyard) -auto={C(0/0,-1,Loyalty)}:name(-1: Reanimate nonLegendary creature with manacost 1) moveto(mybattlefield) target(creature[-legendary;manacost=1]|mygraveyard) -auto={C(0/0,-2,Loyalty)}:name(-2: Reanimate nonLegendary creature with manacost 2) moveto(mybattlefield) target(creature[-legendary;manacost=2]|mygraveyard) -auto={C(0/0,-3,Loyalty)}:name(-3: Reanimate nonLegendary creature with manacost 3) moveto(mybattlefield) target(creature[-legendary;manacost=3]|mygraveyard) -auto={C(0/0,-4,Loyalty)}:name(-4: Reanimate nonLegendary creature with manacost 4) moveto(mybattlefield) target(creature[-legendary;manacost=4]|mygraveyard) -auto={C(0/0,-5,Loyalty)}:name(-5: Reanimate nonLegendary creature with manacost 5) moveto(mybattlefield) target(creature[-legendary;manacost=5]|mygraveyard) -auto={C(0/0,-6,Loyalty)}:name(-6: Reanimate nonLegendary creature with manacost 6) moveto(mybattlefield) target(creature[-legendary;manacost=6]|mygraveyard) -auto={C(0/0,-7,Loyalty)}:name(-7: Reanimate nonLegendary creature with manacost 7) moveto(mybattlefield) target(creature[-legendary;manacost=7]|mygraveyard) -auto={C(0/0,-8,Loyalty)}:name(-8: Reanimate nonLegendary creature with manacost 8) moveto(mybattlefield) target(creature[-legendary;manacost=8]|mygraveyard) -auto={C(0/0,-9,Loyalty)}:name(-9: Reanimate nonLegendary creature with manacost 9) moveto(mybattlefield) target(creature[-legendary;manacost=9]|mygraveyard) -auto={C(0/0,-10,Loyalty)}:name(-10: Reanimate nonLegendary creature with manacost 10) moveto(mybattlefield) target(creature[-legendary;manacost=10]|mygraveyard) -auto={C(0/0,-11,Loyalty)}:name(-11: Reanimate nonLegendary creature with manacost 11) moveto(mybattlefield) target(creature[-legendary;manacost=11]|mygraveyard) -auto={C(0/0,-12,Loyalty)}:name(-12: Reanimate nonLegendary creature with manacost 12) moveto(mybattlefield) target(creature[-legendary;manacost=12]|mygraveyard) -auto={C(0/0,-13,Loyalty)}:name(-13: Reanimate nonLegendary creature with manacost 13) moveto(mybattlefield) target(creature[-legendary;manacost=13]|mygraveyard) -auto={C(0/0,-14,Loyalty)}:name(-14: Reanimate nonLegendary creature with manacost 14) moveto(mybattlefield) target(creature[-legendary;manacost=14]|mygraveyard) -auto={C(0/0,-15,Loyalty)}:name(-15: Reanimate nonLegendary creature with manacost 15) moveto(mybattlefield) target(creature[-legendary;manacost=15]|mygraveyard) -auto={C(0/0,-16,Loyalty)}:name(-16: Reanimate nonLegendary creature with manacost 16) moveto(mybattlefield) target(creature[-legendary;manacost=16]|mygraveyard) -auto={C(0/0,-17,Loyalty)}:name(-17: Reanimate nonLegendary creature with manacost 17) moveto(mybattlefield) target(creature[-legendary;manacost=17]|mygraveyard) -auto={C(0/0,-18,Loyalty)}:name(-18: Reanimate nonLegendary creature with manacost 18) moveto(mybattlefield) target(creature[-legendary;manacost=18]|mygraveyard) -auto={C(0/0,-19,Loyalty)}:name(-19: Reanimate nonLegendary creature with manacost 19) moveto(mybattlefield) target(creature[-legendary;manacost=19]|mygraveyard) -auto={C(0/0,-20,Loyalty)}:name(-20: Reanimate nonLegendary creature with manacost 20) moveto(mybattlefield) target(creature[-legendary;manacost=20]|mygraveyard) -auto={C(0/0,-8,Loyalty)}:name(-8: Emblem: "Whenever a creature dies, reanimate it") emblem transforms((,newability[@movedTo(creature|Graveyard) from(myBattlefield):all(trigger[to]) phaseaction[endofturn once] moveTo(myBattlefield)],newability[@movedTo(creature|Graveyard) from(opponentBattlefield):all(trigger[to]) phaseaction[endofturn once] moveTo(myBattlefield)])) forever dontremove +auto={C(0/0,2,Loyalty)}:name(+2: Each player discards a card) transforms((,newability[ability$!name(Discard a card) name(Discard a card) notatarget(*|myhand) reject!$ controller],newability[ability$!name(Discard a card) name(Discard a card) notatarget(*|myhand) reject!$ opponent])) oneshot +auto={C(0/0,0,Loyalty)}:name(-0: Reanimate non-legendary creature with manacost 0) moveto(mybattlefield) target(creature[-legendary;manacost=0]|mygraveyard) +auto={C(0/0,-1,Loyalty)}:name(-1: Reanimate non-legendary creature with manacost 1) moveto(mybattlefield) target(creature[-legendary;manacost=1]|mygraveyard) +auto={C(0/0,-2,Loyalty)}:name(-2: Reanimate non-legendary creature with manacost 2) moveto(mybattlefield) target(creature[-legendary;manacost=2]|mygraveyard) +auto={C(0/0,-3,Loyalty)}:name(-3: Reanimate non-legendary creature with manacost 3) moveto(mybattlefield) target(creature[-legendary;manacost=3]|mygraveyard) +auto={C(0/0,-4,Loyalty)}:name(-4: Reanimate non-legendary creature with manacost 4) moveto(mybattlefield) target(creature[-legendary;manacost=4]|mygraveyard) +auto={C(0/0,-5,Loyalty)}:name(-5: Reanimate non-legendary creature with manacost 5) moveto(mybattlefield) target(creature[-legendary;manacost=5]|mygraveyard) +auto={C(0/0,-6,Loyalty)}:name(-6: Reanimate non-legendary creature with manacost 6) moveto(mybattlefield) target(creature[-legendary;manacost=6]|mygraveyard) +auto={C(0/0,-7,Loyalty)}:name(-7: Reanimate non-legendary creature with manacost 7) moveto(mybattlefield) target(creature[-legendary;manacost=7]|mygraveyard) +auto={C(0/0,-8,Loyalty)}:name(-8: Reanimate non-legendary creature with manacost 8) moveto(mybattlefield) target(creature[-legendary;manacost=8]|mygraveyard) +auto={C(0/0,-9,Loyalty)}:name(-9: Reanimate non-legendary creature with manacost 9) moveto(mybattlefield) target(creature[-legendary;manacost=9]|mygraveyard) +auto={C(0/0,-10,Loyalty)}:name(-10: Reanimate non-legendary creature with manacost 10) moveto(mybattlefield) target(creature[-legendary;manacost=10]|mygraveyard) +auto={C(0/0,-11,Loyalty)}:name(-11: Reanimate non-legendary creature with manacost 11) moveto(mybattlefield) target(creature[-legendary;manacost=11]|mygraveyard) +auto={C(0/0,-12,Loyalty)}:name(-12: Reanimate non-legendary creature with manacost 12) moveto(mybattlefield) target(creature[-legendary;manacost=12]|mygraveyard) +auto={C(0/0,-13,Loyalty)}:name(-13: Reanimate non-legendary creature with manacost 13) moveto(mybattlefield) target(creature[-legendary;manacost=13]|mygraveyard) +auto={C(0/0,-14,Loyalty)}:name(-14: Reanimate non-legendary creature with manacost 14) moveto(mybattlefield) target(creature[-legendary;manacost=14]|mygraveyard) +auto={C(0/0,-15,Loyalty)}:name(-15: Reanimate non-legendary creature with manacost 15) moveto(mybattlefield) target(creature[-legendary;manacost=15]|mygraveyard) +auto={C(0/0,-16,Loyalty)}:name(-16: Reanimate non-legendary creature with manacost 16) moveto(mybattlefield) target(creature[-legendary;manacost=16]|mygraveyard) +auto={C(0/0,-17,Loyalty)}:name(-17: Reanimate non-legendary creature with manacost 17) moveto(mybattlefield) target(creature[-legendary;manacost=17]|mygraveyard) +auto={C(0/0,-18,Loyalty)}:name(-18: Reanimate non-legendary creature with manacost 18) moveto(mybattlefield) target(creature[-legendary;manacost=18]|mygraveyard) +auto={C(0/0,-19,Loyalty)}:name(-19: Reanimate non-legendary creature with manacost 19) moveto(mybattlefield) target(creature[-legendary;manacost=19]|mygraveyard) +auto={C(0/0,-20,Loyalty)}:name(-20: Reanimate non-legendary creature with manacost 20) moveto(mybattlefield) target(creature[-legendary;manacost>=20]|mygraveyard) +auto={C(0/0,-8,Loyalty)}:name(-8: Emblem: "Whenever a creature dies, reanimate it") emblem transforms((,newability[@movedTo(creature|mygraveyard) from(battlefield):all(trigger[to]) phaseaction[endofturn once] moveTo(myBattlefield)],newability[@movedTo(creature|opponentgraveyard) from(battlefield):all(trigger[to]) phaseaction[endofturn once] moveTo(opponentBattlefield)])) forever dontremove text=+2: Each player discards a card. -- -X: Return target nonlegendary creature card with converted mana cost X from your graveyard to the battlefield. -- -8: You get an emblem with "Whenever a creature dies, return it to the battlefield under your control at the beginning of the next end step." type=Legendary Planeswalker subtype=Liliana diff --git a/projects/mtg/bin/Res/sets/primitives/unsupported.txt b/projects/mtg/bin/Res/sets/primitives/unsupported.txt index 32e6aeef4..7b7bb8ac9 100644 --- a/projects/mtg/bin/Res/sets/primitives/unsupported.txt +++ b/projects/mtg/bin/Res/sets/primitives/unsupported.txt @@ -8703,7 +8703,6 @@ subtype=Arcane [card] name=Purity abilities=flying -auto=@movedto(this|mygraveyard):name(Shuffle in library) all(trigger[to]) moveto(ownerlibrary) and!( shuffle )! text=Flying -- If noncombat damage would be dealt to you, prevent that damage. You gain life equal to the damage prevented this way. -- When Purity is put into a graveyard from anywhere, shuffle it into its owner's library. mana={3}{W}{W}{W} type=Creature @@ -8845,12 +8844,6 @@ mana={2}{R} type=Enchantment [/card] [card] -name=Rain of Gore -text=If a spell or ability would cause its controller to gain life, that player loses that much life instead. -mana={B}{R} -type=Enchantment -[/card] -[card] name=Rakdos Riteknife text=Equipped creature gets +1/+0 for each blood counter on Rakdos Riteknife and has "{T}, Sacrifice a creature: Put a blood counter on Rakdos Riteknife." -- {B}{R}, Sacrifice Rakdos Riteknife: Target player sacrifices a permanent for each blood counter on Rakdos Riteknife. -- Equip {2} mana={2} @@ -8891,15 +8884,6 @@ mana={2}{B}{R} type=Sorcery [/card] [card] -name=Rayami, First of the Fallen -text=If a nontoken creature would die, exile that card with a blood counter on it instead. -- As long as an exiled creature card with a blood counter on it has flying, Rayami, First of the Fallen has flying. The same is true for first strike, double strike, deathtouch, haste, hexproof, indestructible, lifelink, menace, protection, reach, trample, and vigilance. -mana={1}{B}{G}{U} -type=Legendary Creature -subtype=Vampire -power=5 -toughness=4 -[/card] -[card] name=Razia, Boros Archangel text=Flying, vigilance, haste -- {T}: The next 3 damage that would be dealt to target creature you control this turn is dealt to another target creature instead. mana={4}{R}{R}{W}{W} @@ -8975,12 +8959,6 @@ mana={1}{U} type=Instant [/card] [card] -name=Reclamation -text=Black creatures can't attack unless their controller sacrifices a land for each black creature he or she controls that's attacking. -mana={2}{G}{W} -type=Enchantment -[/card] -[card] name=Record Store text=Whenever you crank Record Store, look at the top X cards of your library, where X is the number of artifacts you control. Put one of those cards into your hand and the rest on the bottom of your library in a random order. type=Artifact @@ -9008,12 +8986,6 @@ mana={1}{W} type=Instant [/card] [card] -name=Redirect -text=You may choose new targets for target spell. -mana={U}{U} -type=Instant -[/card] -[card] name=Refibrillator text=Whenever you crank Refibrillator, return target creature card from your graveyard to your hand. type=Artifact @@ -9080,12 +9052,6 @@ type=Enchantment subtype=Aura [/card] [card] -name=Remedy -text=Prevent the next 5 damage that would be dealt this turn to any number of target creatures and/or players, divided as you choose. -mana={1}{W} -type=Instant -[/card] -[card] name=Remodel text=If you control two or more green permanents that share an artist, you may play Remodel without paying its mana cost. -- Remove target artifact from the game. mana={2}{G} @@ -9098,21 +9064,6 @@ mana={W} type=Instant [/card] [card] -name=Renegade Doppelganger -text=Whenever another creature enters the battlefield under your control, you may have Renegade Doppelganger become a copy of that creature until end of turn. (If it does, it loses this ability for the rest of the turn.) -mana={1}{U} -type=Creature -subtype=Shapeshifter -power=0 -toughness=1 -[/card] -[card] -name=Repeated Reverberation -text=When you next cast an instant spell, cast a sorcery spell, or activate a loyalty ability this turn, copy that spell or ability twice. You may choose new targets for the copies. -mana={2}{R}{R} -type=Instant -[/card] -[card] name=Reroute text=Change the target of target activated ability with a single target. (Mana abilities can't be targeted.) -- Draw a card. mana={1}{R} @@ -9143,12 +9094,6 @@ mana={2}{G} type=Instant [/card] [card] -name=Revelation -text=Players play with their hands revealed. -mana={G} -type=World Enchantment -[/card] -[card] name=Reverberation text=All damage that would be dealt this turn by target sorcery spell is dealt to that spell's controller instead. mana={2}{U}{U} @@ -11212,12 +11157,6 @@ mana={1}{B} type=Instant [/card] [card] -name=Tainted Remedy -text=If an opponent would gain life, that player loses that much life instead. -mana={2}{B} -type=Enchantment -[/card] -[card] name=Tajuru Preserver text=Spells and abilities your opponents control can't cause you to sacrifice permanents. mana={1}{G} @@ -11316,12 +11255,6 @@ mana={1}{U} type=Instant [/card] [card] -name=Telepathy -text=Your opponents play with their hands revealed. -mana={U} -type=Enchantment -[/card] -[card] name=Temp of the Damned text=When you play Temp of the Damned, roll a six-sided die. Temp of the Damned comes into play with a number of funk counters on it equal to the die roll. -- During your upkeep, remove a funk counter from Temp of the Damned or sacrifice Temp of the Damned. mana={2}{B} @@ -11382,7 +11315,6 @@ subtype=Licid power=2 toughness=2 [/card] - [card] name=Teremko Griffin abilities=flying,banding @@ -12742,12 +12674,6 @@ mana={4}{G}{G} type=Enchantment [/card] [card] -name=Wild Ricochet -text=You may choose new targets for target instant or sorcery spell. Then copy that spell. You may choose new targets for the copy. -mana={2}{R}{R} -type=Instant -[/card] -[card] name=Wild Swing text=Choose three target nonenchantment permanents. Destroy one of them at random. mana={3}{R} @@ -12764,6 +12690,9 @@ toughness=2 [/card] [card] name=Willbender +facedown={3} +autofacedown={1}{U}:morph +autofaceup=name(Choose new targets) target(*[instant;sorcery]|stack) fizzle && activate castcard(copied noevent costx!:mytargx:! kicked!:mytargkicked:!) text=Morph {1}{U} (You may cast this card face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.) -- When Willbender is turned face up, change the target of target spell or ability with a single target. mana={1}{U} type=Creature @@ -12772,15 +12701,6 @@ power=1 toughness=2 [/card] [card] -name=Willbreaker -text=Whenever a creature an opponent controls becomes the target of a spell or ability you control, gain control of that creature for as long as you control Willbreaker. -mana={3}{U}{U} -type=Creature -subtype=Human Wizard -power=2 -toughness=3 -[/card] -[card] name=Winding Constrictor text=If one or more counters would be placed on an artifact or creature you control, that many plus one of each of those kinds of counters are placed on that permanent instead. -- If you would get one or more counters, you get that many plus one of each of those kinds of counters instead. mana={B}{G} @@ -12811,15 +12731,6 @@ power=3 toughness=3 [/card] [card] -name=Wojek Apothecary -text=Radiance — {T}: Prevent the next 1 damage that would be dealt to target creature and each other creature that shares a color with it this turn. -mana={2}{W}{W} -type=Creature -subtype=Human Cleric -power=1 -toughness=1 -[/card] -[card] name=Wood Sage text={T}: Name a creature card. Reveal the top four cards of your library and put all of them with that name into your hand. Put the rest into your graveyard. mana={G}{U} @@ -12835,16 +12746,6 @@ mana={3}{G} type=Sorcery [/card] [card] -name=Woodvine Elemental -abilities=trample -text=Trample -- Parley — Whenever Woodvine Elemental attacks, each player reveals the top card of his or her library. For each nonland card revealed this way, attacking creatures you control get +1/+1 until end of turn. Then each player draws a card. -mana={4}{G}{W} -type=Creature -subtype=Elemental -power=4 -toughness=4 -[/card] -[card] name=Word of Command text=Look at target opponent's hand and choose a card from it. You control that player until Word of Command finishes resolving. The player plays that card if able. While doing so, the player can activate mana abilities only if they're from lands he or she controls and only if mana they produce is spent to activate other mana abilities of lands he or she controls and/or play that card. If the chosen card is cast as a spell, you control the player while that spell is resolving. mana={B}{B} @@ -12880,15 +12781,6 @@ power=2 toughness=2 [/card] [card] -name=World Queller -text=At the beginning of your upkeep, you may choose a card type. If you do, each player sacrifices a permanent of that type. -mana={3}{W}{W} -type=Creature -subtype=Avatar -power=4 -toughness=4 -[/card] -[card] name=World-Bottling Kit text={5}, Sacrifice World-Bottling Kit: Choose a Magic set. Remove from the game all permanents with that set's expansion symbol except for basic lands. mana={5} @@ -12900,18 +12792,6 @@ text=(Start the game with this conspiracy face up in the command zone.) -- As lo type=Conspiracy [/card] [card] -name=Worldpurge -text=Return all permanents to their owners' hands. Each player chooses up to seven cards in his or her hand, then shuffles the rest into his or her library. Empty all mana pools. -mana={4}{WU}{WU}{WU}{WU} -type=Sorcery -[/card] -[card] -name=Worms of the Earth -text=Players can't play lands. -- Lands can't enter the battlefield. -- At the beginning of each upkeep, any player may sacrifice two lands or have Worms of the Earth deal 5 damage to him or her. If a player does either, destroy Worms of the Earth. -mana={2}{B}{B}{B} -type=Enchantment -[/card] -[card] name=Worst Fears text=You control target player during that player's next turn. Exile Worst Fears. (You see all cards that player could see and make all decisions for the player.) mana={7}{B} @@ -13042,21 +12922,6 @@ power=3 toughness=3 [/card] [card] -name=Zaxara, the Exemplary -abilities=deathtouch -auto={T}:add{W}{W} -auto={T}:add{B}{B} -auto={T}:add{G}{G} -auto={T}:add{R}{R} -auto={T}:add{U}{U} -text=Deathtouch -- {T}: Add two mana of any one color. -- Whenever you cast a spell with {X} in its mana cost, create a 0/0 green Hydra creature token, then put X +1/+1 counters on it. -mana={1}{B}{G}{U} -type=Legendary Creature -subtype=Nightmare Hydra -power=2 -toughness=3 -[/card] -[card] name=Zealous Inquisitor text={1}{W}: The next 1 damage that would be dealt to Zealous Inquisitor this turn is dealt to target creature instead. mana={2}{W} @@ -13120,21 +12985,6 @@ power=+2 toughness=+2 [/card] [card] -name=Zur's Weirding -text=Players play with their hands revealed. -- If a player would draw a card, he or she reveals it instead. Then any other player may pay 2 life. If a player does, put that card into its owner's graveyard. Otherwise, that player draws a card. -mana={3}{U} -type=Enchantment -[/card] -[card] -name=Zurzoth, Chaos Rider -text=Whenever an opponent draws their first card each turn, if it's not their turn, you create a 1/1 red Devil creature token with "When this creature dies, it deals 1 damage to any target." -- Whenever one or more Devils you control attack one or more players, you and those players each draw a card, then discard a card at random. -mana={2}{R} -type=Legendary Creature -subtype=Devil -power=2 -toughness=3 -[/card] -[card] name=Zzzyxas's Abyss text=At the beginning of your upkeep, destroy all nonland permanents with the first name alphabetically among nonland permanents in play. mana={1}{B}{B} diff --git a/projects/mtg/include/MTGDefinitions.h b/projects/mtg/include/MTGDefinitions.h index 94f709fcd..64c730fcc 100644 --- a/projects/mtg/include/MTGDefinitions.h +++ b/projects/mtg/include/MTGDefinitions.h @@ -319,7 +319,9 @@ class Constants NONCOMBATVIGOR = 192, NOMOVETRIGGER = 193, WASCOMMANDER = 194, - NB_BASIC_ABILITIES = 195, + SHOWOPPONENTHAND = 195, + SHOWCONTROLLERHAND = 196, + NB_BASIC_ABILITIES = 197, RARITY_S = 'S', //Special Rarity RARITY_M = 'M', //Mythics diff --git a/projects/mtg/src/AllAbilities.cpp b/projects/mtg/src/AllAbilities.cpp index d264c5e72..3bae8195d 100644 --- a/projects/mtg/src/AllAbilities.cpp +++ b/projects/mtg/src/AllAbilities.cpp @@ -4827,6 +4827,8 @@ int AAFlip::resolve() } SAFE_DELETE(myFlip); _target->mPropertiesChangedSinceLastUpdate = true; + if(backfromcopy) + _target->isACopier = false; //the card is no longer a copy (e.g. "Renegade Doppelganger" and "Scion of the Ur-Dragon") if(!isflipcard && !backfromcopy) { if(_target->isFacedown) diff --git a/projects/mtg/src/GameObserver.cpp b/projects/mtg/src/GameObserver.cpp index ca746e27d..298de3cd9 100644 --- a/projects/mtg/src/GameObserver.cpp +++ b/projects/mtg/src/GameObserver.cpp @@ -1384,8 +1384,10 @@ void GameObserver::ButtonPressed(PlayGuiObject * target) } else { + bool showopponenthand = (opponentHand->zone && opponentHand->zone->owner->opponent()->game->battlefield->nb_cards && opponentHand->zone->owner->opponent()->game->battlefield->hasAbility(Constants::SHOWOPPONENTHAND))?true:false; + bool showcontrollerhand = (opponentHand->zone && opponentHand->zone->owner->game->battlefield->nb_cards && opponentHand->zone->owner->game->battlefield->hasAbility(Constants::SHOWCONTROLLERHAND))?true:false; TargetChooser * _tc = this->getCurrentTargetChooser(); - if (_tc && _tc->targetsZone(opponentHand->zone)) + if ((_tc && _tc->targetsZone(opponentHand->zone)) || showopponenthand || showcontrollerhand) { opponentHand->toggleDisplay(); } diff --git a/projects/mtg/src/GuiStatic.cpp b/projects/mtg/src/GuiStatic.cpp index adc880dfe..16d6919fa 100644 --- a/projects/mtg/src/GuiStatic.cpp +++ b/projects/mtg/src/GuiStatic.cpp @@ -252,7 +252,7 @@ void GuiGameZone::Render() modx = -0.f; mody = -2.f; iconhand->SetColor(ARGB((int)(actA),255,255,255)); - quad = iconhand; + quad = iconhand; } if(iconcard && type == GUI_GRAVEYARD) { @@ -286,7 +286,6 @@ void GuiGameZone::Render() iconsideboard->SetColor(ARGB((int)(actA),255,255,255)); quad = iconsideboard; } - // if(type == GUI_LIBRARY && zone->nb_cards && !showCards) { @@ -297,32 +296,26 @@ void GuiGameZone::Render() if(card && card->getObserver()) { replaced = true; - /*TargetChooser * tc = card->getObserver()->getCurrentTargetChooser(); - if(tc && tc->canTarget(card) && !tc->done) - replaced = false; + JQuadPtr kquad = WResourceManager::Instance()->RetrieveCard(card, CACHE_THUMB); + if(kquad) + { + kquad->SetColor(ARGB((int)(actA),255,255,255)); + scale2 = defaultHeight / kquad->mHeight; + modx = (35/4)+1; + mody = (50/4)+1; + quad = kquad; + } else - {*/ - JQuadPtr kquad = WResourceManager::Instance()->RetrieveCard(card, CACHE_THUMB); - if(kquad) + { + quad = CardGui::AlternateThumbQuad(card); + if(quad) { - kquad->SetColor(ARGB((int)(actA),255,255,255)); - scale2 = defaultHeight / kquad->mHeight; + quad->SetColor(ARGB((int)(actA),255,255,255)); + scale2 = defaultHeight / quad->mHeight; modx = (35/4)+1; mody = (50/4)+1; - quad = kquad; } - else - { - quad = CardGui::AlternateThumbQuad(card); - if(quad) - { - quad->SetColor(ARGB((int)(actA),255,255,255)); - scale2 = defaultHeight / quad->mHeight; - modx = (35/4)+1; - mody = (50/4)+1; - } - } - //} + } } } } diff --git a/projects/mtg/src/MTGDefinitions.cpp b/projects/mtg/src/MTGDefinitions.cpp index 85c6cf7f3..a93ff1b30 100644 --- a/projects/mtg/src/MTGDefinitions.cpp +++ b/projects/mtg/src/MTGDefinitions.cpp @@ -226,6 +226,8 @@ const char* Constants::MTGBasicAbilities[] = { "noncombatvigor", //instead of taking non-combat damage the source gains +1/+1 counters (e.g. Stormwild Capridor) "nomovetrigger", //no trigger when playing these cards (e.g. fake ability cards such as Davriel Conditions, Davriel Offers, Annihilation Rooms) "wascommander", //It was the current commander (e.g. after it flipped or morphed) + "showopponenthand", //opponent plays with his hand revealed. + "showcontrollerhand" //controller plays with his hand revealed. }; map Constants::MTGBasicAbilitiesMap; diff --git a/projects/mtg/src/WParsedInt.cpp b/projects/mtg/src/WParsedInt.cpp index 5aa10a6ed..f04fd8c9c 100644 --- a/projects/mtg/src/WParsedInt.cpp +++ b/projects/mtg/src/WParsedInt.cpp @@ -16,7 +16,7 @@ void WParsedInt::init(string s, Spell * spell, MTGCardInstance * card) return; if (!card) { - intValue = atoi(s.c_str());//if there is no card, try parsing a number. + intValue = atoi(s.c_str()); //if there is no card, try parsing a number. return; } MTGCardInstance * target = card->target; @@ -45,6 +45,12 @@ void WParsedInt::init(string s, Spell * spell, MTGCardInstance * card) altered.append(s.substr(+6)); return init(altered,spell,card->storedCard); } + if(s.find("mytarg") != string::npos) + { + string altered ="-"; + altered.append(s.substr(+6)); + return init(altered,spell,card->target); //we refer the target (e.g. Redirect) + } } if(s[0] == '+') { @@ -55,6 +61,10 @@ void WParsedInt::init(string s, Spell * spell, MTGCardInstance * card) { return init(s.substr(+6),spell,card->storedCard); } + if(s.find("mytarg") != string::npos) + { + return init(s.substr(+6),spell,card->target); //we refer the target (e.g. Redirect) + } //rounding values, the words can be written anywhere in the line, //they are erased after parsing. if(s.find("halfup") != string::npos) @@ -742,7 +752,7 @@ void WParsedInt::init(string s, Spell * spell, MTGCardInstance * card) } else if (s == "kicked" || s == "handsize") { - intValue = (s == "kicked")?target->kicked:target->controller()->handsize; + intValue = (s == "kicked")?card->kicked:target->controller()->handsize; } else if (s == "olandg" || s == "olandu") {