From efe9ad8bc43f6d822f4a347c1305b8abefb8a336 Mon Sep 17 00:00:00 2001 From: Vittorio Alfieri Date: Sun, 14 May 2023 15:56:38 +0200 Subject: [PATCH] Added some new primitives from MOM set, added new rule for Stun counter. --- projects/mtg/bin/Res/rules/Commander.txt | 4 + projects/mtg/bin/Res/rules/mtg.txt | 6 +- .../bin/Res/sets/primitives/borderline.txt | 131 +++++++++++++++++- 3 files changed, 138 insertions(+), 3 deletions(-) diff --git a/projects/mtg/bin/Res/rules/Commander.txt b/projects/mtg/bin/Res/rules/Commander.txt index 945895ecf..6e0eec51c 100644 --- a/projects/mtg/bin/Res/rules/Commander.txt +++ b/projects/mtg/bin/Res/rules/Commander.txt @@ -88,6 +88,10 @@ auto=@movedto(other *|battlefield) restriction{type(*[isflipped]|nonbattlezone)~ #reset Creature damage at the cleanup phase auto=@each cleanup:all(*|myBattlefield) resetDamage +#Stun counter +auto=@each my untap:ability$!all(*[counter{0/0.1.Stun}]|mybattlefield) tap(noevent)!$ controller +auto=@each my untap:ability$!all(*[counter{0/0.1.Stun}]|mybattlefield) counter(0/0.-1.Stun)!$ controller + #Commander put back rule auto=@movedTo(*[iscommander]|mygraveyard):may name(Put back to command zone) ability$!name(Put back to command zone) name(Put back to command zone) target(*[iscommander;fresh]|mygraveyard) moveto(mycommandzone)!$ controller auto=@movedTo(*[iscommander]|myexile):may name(Put back to command zone) ability$!name(Put back to command zone) name(Put back to command zone) target(*[iscommander;fresh]|myexile) moveto(mycommandzone)!$ controller diff --git a/projects/mtg/bin/Res/rules/mtg.txt b/projects/mtg/bin/Res/rules/mtg.txt index 23b61b2db..548d53b2e 100644 --- a/projects/mtg/bin/Res/rules/mtg.txt +++ b/projects/mtg/bin/Res/rules/mtg.txt @@ -85,4 +85,8 @@ auto=@movedto(other *|stack) restriction{type(*[isflipped]|nonbattlezone)~moreth auto=@movedto(other *|battlefield) restriction{type(*[isflipped]|nonbattlezone)~morethan~0}:ability$!all(*[isflipped]|nonbattlezone) doubleside()!$ controller #reset Creature damage at the cleanup phase -auto=@each cleanup:all(*|myBattlefield) resetDamage \ No newline at end of file +auto=@each cleanup:all(*|myBattlefield) resetDamage + +#Stun counter +auto=@each my untap:ability$!all(*[counter{0/0.1.Stun}]|mybattlefield) tap(noevent)!$ controller +auto=@each my untap:ability$!all(*[counter{0/0.1.Stun}]|mybattlefield) counter(0/0.-1.Stun)!$ controller diff --git a/projects/mtg/bin/Res/sets/primitives/borderline.txt b/projects/mtg/bin/Res/sets/primitives/borderline.txt index ebedf5d0d..eef1cec5e 100644 --- a/projects/mtg/bin/Res/sets/primitives/borderline.txt +++ b/projects/mtg/bin/Res/sets/primitives/borderline.txt @@ -1,7 +1,7 @@ grade=borderline #Bordeline Primitives Pack for Wagic the Homebrew. #Please keep these card alphabetized, and try to have the "name=" line at the top of each card -#I sorted this programmatically - Thanks to Vitty85 09-05-2023 +#I sorted this programmatically - Thanks to Vitty85 14-05-2023 [card] name=+2 Mace auto={3}:equip @@ -43832,7 +43832,7 @@ name=Invasion of Kamigawa backside=Rooftop Saboteurs restriction=compare(isflipped)~equalto~0 anyzone={0}:doubleside(backside) -auto=ability$!name(Tap creature or artifact) name(Tap creature or artifact) target(*[creature;artifact]|opponentbattlefield) transforms((,newability[tap],newability[counter(0/0.1.Stun)],newability[this(counter{0/0.1.Stun}>=1) doesnotuntap],newability[@each my untap restriction{compare(hascntstun)~morethan~0}:name(Remove a stun counter) name(Remove a stun counter) counter(0/0.-1.Stun)])) forever!$ controller +auto=ability$!name(Tap creature or artifact) name(Tap creature or artifact) target(*[creature;artifact]|opponentbattlefield) counter(0/0.1.Stun)!$ controller auto=moveto(opponentbattlefield) and!( transforms((,newability[tap(noevent)],newability[doesnotuntap],newability[counter(0/0.4.Defense)])) forever )! auto=@counterremoved(0/0,1,Defense) from(this) restriction{compare(hascntdefense)~equalto~0}:name(Exile and transforms) name(Exile and transforms) moveto(ownerexile) and!( flip(backside) forcetype(Creature Moonfolk Ninja) )! asSorcery text=(As a Siege enters, choose an opponent to protect it. You and others can attack it. When it's defeated, exile it, then cast it transformed.) -- When Invasion of Kamigawa enters the battlefield, tap target artifact or creature an opponent controls and put a stun counter on it. (If a permanent with a stun counter would become untapped, remove one from it instead.) @@ -45011,6 +45011,21 @@ power=3 toughness=3 [/card] [card] +name=Jin-Gitaxias +backside=The Great Synthesis +restriction=compare(isflipped)~equalto~0 +anyzone={0}:doubleside(backside) +auto=_WARD_(2) +auto=@movedTo(*[-creature&manacost>=3]|mystack) restriction{compare(isflipped)~equalto~0}:name(Draw a card) name(Draw a card) name(Draw a card) draw:1 controller +auto=this(variable{type:*:myhand}>6) {3}{U}:name(Exile and transform) name(Exile and transform) all(this) moveto(myexile) and!( flip(backside) forcetype(Enchantment Saga) )! asSorcery +text=Ward {2} -- Whenever you cast a noncreature spell with mana value 3 or greater, draw a card. -- {3}{U}: Exile Jin-Gitaxias, then return it to the battlefield transformed under its owner's control. Activate only as a sorcery and only if you have seven or more cards in hand. +mana={3}{U}{U} +type=Legendary Creature +subtype=Phyrexian Praetor +power=5 +toughness=5 +[/card] +[card] name=Jin-Gitaxias, Progress Tyrant auto=@movedTo(artifact,instant,sorcery|mystack) turnlimited:all(trigger[to]) transforms((,newability[activate castcard(copied noevent)])) forever auto=@movedto(artifact,instant,sorcery|opponentstack):all(trigger[to]) transforms((,newability[fizzle])) forever @@ -59016,6 +59031,17 @@ type=Enchantment subtype=Aura [/card] [card] +name=Oculus Whelp +abilities=flying +auto=aslongas(*[isflipped]|mybattlefield) transforms((,newability[@movedTo(this|graveyard) from(battlefield):name(Draw a card) name(Draw a card) draw:1 controller])) +text=Flying -- As long as you control a transformed permanent, Oculus Whelp has "When Oculus Whelp dies, draw a card." +mana={3}{U} +type=Creature +subtype=Phyrexian Dragon +power=3 +toughness=2 +[/card] +[card] name=Odious Witch backside=Ragged Recluse auto=_ATTACKING_name(Gain 1 life) life:1 controller && life:-1 opponent @@ -59421,6 +59447,16 @@ power=4 toughness=5 [/card] [card] +name=Omen Hawker +auto={T}:name(Add mana) add{C}{U} +text={T}: Add {C}{U}. Spend this mana only to activate abilities. +mana={U} +type=Creature +subtype=Cephalid Advisor +power=1 +toughness=1 +[/card] +[card] name=Omen of Fire auto=moveTo(ownerhand) all(island) auto=foreach(*[white]|mybattlefield) name(Choose one) ability$!name(Sacrifice plains) choice name(Sacrifice plains) sacrifice notAtarget(plains|mybattlefield) _ choice name(Sacrifice white permanent) sacrifice notatarget(*[white]|mybattlefield)!$ controller @@ -59907,6 +59943,17 @@ power=3 toughness=1 [/card] [card] +name=Oracle of Tragedy +auto=name(Choose one) transforms((,newability[if type(*[manacost>=3]|mygraveyard)~morethan~0 then choice name(Shuffle 4 cards) name(Shuffle 4 cards) target(*[manacost>=3]|mygraveyard) moveto(mylibrary) and!( shuffle )!],newability[choice name(Draw and discard) all(*[zpos=1]|mylibrary) moveto(myhand) and!( transforms((,newability[name(Discard a card) target(*|myhand) reject])) oneshot )!])) oneshot +auto=_DIES_name(Choose one) transforms((,newability[if type(*[manacost>=3]|mygraveyard)~morethan~0 then choice name(Shuffle 4 cards) name(Shuffle 4 cards) target(*[manacost>=3]|mygraveyard) moveto(mylibrary) and!( shuffle )!],newability[choice name(Draw and discard) all(*[zpos=1]|mylibrary) moveto(myhand) and!( transforms((,newability[name(Discard a card) target(*|myhand) reject])) oneshot )!])) oneshot +text=When Oracle of Tragedy enters the battlefield or dies, choose one — -- • Draw a card, then discard a card. -- • Shuffle up to four target cards with mana value 3 or greater from your graveyard into your library. +mana={1}{U} +type=Creature +subtype=Human Wizard +power=1 +toughness=3 +[/card] +[card] name=Oracle's Attendants auto={T}:name(Target your creature) target(creature|mybattlefield) transforms((,newability[undamageable],newability[_ENRAGE_damage:thatmuch target(Oracle's Attendants|mybattlefield)])) ueot auto={T}:name(Target opponent's creature) target(creature|opponentbattlefield) transforms((,newability[undamageable],newability[_ENRAGE_damage:thatmuch target(Oracle's Attendants|opponentbattlefield)])) ueot @@ -64788,6 +64835,17 @@ power=2 toughness=5 [/card] [card] +name=Protocol Knight +auto=if type(other *[knight]|mybattlefield)~morethan~0 then name(Stun creature) name(Stun creature) target(creature|opponentbattlefield) transforms((,newability[tap],newability[counter(0/0.1.Stun)],newability[this(counter{0/0.1.Stun}>=1) doesnotuntap],newability[@each my untap restriction{compare(hascntstun)~morethan~0}:name(Remove a stun counter) name(Remove a stun counter) counter(0/0.-1.Stun)])) forever +auto=if type(other *[knight]|mybattlefield)~equalto~0 then name(Tap creature) name(Tap creature) target(creature|opponentbattlefield) tap +text=When Protocol Knight enters the battlefield, tap target creature an opponent controls. Put a stun counter on that creature if you control another Knight. (If a permanent with a stun counter would become untapped, remove one from it instead.) +mana={3}{U} +type=Creature +subtype=Human Knight +power=3 +toughness=4 +[/card] +[card] name=Prototype Portal auto=may name(Exile an artifact) imprint target(artifact|myhand) auto=this(variable{hasevict}>0) transforms((,newability[{eval(evictmc)}{T}:name(Copy exiled card) name(Copy exiled card) clone target(artifact[evictname]|myexile)])) @@ -70436,6 +70494,22 @@ mana={X}{R}{R} type=Sorcery [/card] [card] +name=Rona, Herald of Invasion +backside=Rona, Tolarian Obliterator +restriction=compare(isflipped)~equalto~0 +anyzone={0}:doubleside(backside) +auto=@movedTo(*[legendary]|mystack) restriction{compare(isflipped)~equalto~0}:name(Untap rona) name(Untap rona) untap +auto={T}:name(Draw and discard) draw:1 && transforms((,newability[name(Discard a card) target(*|myhand) reject])) oneshot +auto={5}{B}:name(Pay B and transform Rona) flip(backside) forcetype(Legendary Creature Phyrexian Wizard) )! asSorcery +auto={5}{L:2}:name(Pay life and transform Rona) flip(backside) forcetype(Legendary Creature Phyrexian Wizard) )! asSorcery +text=Whenever you cast a legendary spell, untap Rona, Herald of Invasion. -- {T}: Draw a card, then discard a card. -- {5}{B/P}: Transform Rona. Activate only as a sorcery. ({B/P} can be paid with either {B} or 2 life.) +mana={1}{U} +type=Legendary Creature +subtype=Human Wizard +power=1 +toughness=3 +[/card] +[card] name=Rona, Disciple of Gix auto=lord(*[counter{0/0.1.RonaExiled}]|myexile) canplayfromexile auto=if type(*[artifact]|mygraveyard)~morethan~0 then choice name(Exile artifact card) name(Exile artifact card) target(*[artifact]|mygraveyard) moveto(exile) and!( transforms((,newability[counter(0/0.1.RonaExiled)])) forever )! @@ -70461,6 +70535,17 @@ power=3 toughness=4 [/card] [card] +name=Rona, Tolarian Obliterator +abilities=trample +auto=@damaged(this) from(*|opponentzones):name(Discard at random) name(Discard at random) ability$!name(Discard at random) name(Discard at random) all(*[zpos=genrandzpos=type:*:myhandplus1plusend]|myhand) reject and!( transforms((,newability[if cantargetcard(*[land]|*) then transforms((,newability[choice name(Put land in play) moveto(mybattlefield)],newability[choice name(Don't put land in play) donothing])) oneshot],newability[if cantargetcard(*[-land]|*) then transforms((,newability[choice name(Cast for zero) activate castcard(normal))],newability[choice name(Don't cast) donothing])) oneshot])) oneshot )!!$ opponent +auto=@damaged(this) from(*|myzones):name(Discard at random) name(Discard at random) all(*[zpos=genrandzpos=type:*:myhandplus1plusend]|myhand) reject and!( transforms((,newability[if cantargetcard(*[land]|*) then transforms((,newability[choice name(Put in play) moveto(mybattlefield)],newability[choice name(Don't put in play) donothing])) oneshot],newability[if cantargetcard(*[-land]|*) then transforms((,newability[choice name(Cast spell for zero) activate castcard(normal))],newability[choice name(Don't cast spell) donothing])) oneshot])) oneshot )! +text=Trample -- Whenever a source deals damage to Rona, Tolarian Obliterator, that source's controller exiles a card from their hand at random. If it's a land card, you may put it onto the battlefield under your control. Otherwise, you may cast it without paying its mana cost. +type=Legendary Creature +subtype=Phyrexian Wizard +power=5 +toughness=5 +[/card] +[card] name=Rooftop Saboteurs abilities=flying auto=@combatdamaged(player) from(this):name(Draw a card) draw:1 controller @@ -74149,6 +74234,18 @@ power=3 toughness=2 [/card] [card] +name=See Double +auto=if type(*|opponentgraveyard)~morethan~7 then if type(creature|battlefield)~morethan~0 then ability$!name(Copy creature) name(Copy creature) name(Copy creature) target(creature|battlefield) clone!$ controller +auto=if type(*|opponentgraveyard)~morethan~7 then if type(*[-instant;-sorcery]|stack)~morethan~0 then choice name(Copy permanent spell) name(Copy permanent spell) name(Copy permanent spell) ability$!name(Copy permanent spell) name(Copy permanent spell) name(Copy permanent spell) target(*[-instant;-sorcery]|stack) clone!$ controller +auto=if type(*|opponentgraveyard)~morethan~7 then if type(other *[instant;sorcery]|stack)~morethan~0 then choice name(Copy non-permanent spell) name(Copy non-permanent spell) name(Copy non-permanent spell) ability$!name(Copy non-permanent spell) name(Copy non-permanent spell) name(Copy non-permanent spell) target(other *[instant;sorcery]|stack) activate castcard(copied noevent)!$ controller +auto=if type(*|opponentgraveyard)~lessthan~8 then if type(*[-instant;-sorcery]|stack)~morethan~0 then choice name(Copy permanent spell) name(Copy permanent spell) name(Copy permanent spell) ability$!name(Copy permanent spell) name(Copy permanent spell) name(Copy permanent spell) target(*[-instant;-sorcery]|stack) clone!$ controller +auto=if type(*|opponentgraveyard)~lessthan~8 then if type(other *[instant;sorcery]|stack)~morethan~0 then choice name(Copy non-permanent spell) name(Copy non-permanent spell) name(Copy non-permanent spell) ability$!name(Copy non-permanent spell) name(Copy non-permanent spell) name(Copy non-permanent spell) target(other *[instant;sorcery]|stack) activate castcard(copied noevent)!$ controller +auto=if type(*|opponentgraveyard)~lessthan~8 then if type(creature|battlefield)~morethan~0 then choice name(Copy creature) name(Copy creature) name(Copy creature) ability$!name(Copy creature) name(Copy creature) name(Copy creature) target(creature|battlefield) clone!$ controller +text=This spell can't be copied. -- Choose one. If an opponent has eight or more cards in their graveyard, you may choose both. -- • Copy target spell. You may choose new targets for the copy. (A copy of a permanent spell becomes a token.) -- • Create a token that's a copy of target creature. +mana={2}{U}{U} +type=Instant +[/card] +[card] name=See Red target=creature auto=2/1 @@ -85920,6 +86017,15 @@ text=As Temple of the Dragon Queen enters the battlefield, you may reveal a Drag type=Land [/card] [card] +name=Temporal Cleansing +other={convoke} name(Convoke) +target=*[-land] +auto=transforms((,newability[choice name(Put on bottom) bottomoflibrary],newability[choice name(Put second from the top) placefromthetop(2)])) oneshot +text=Convoke (Your creatures can help cast this spell. Each creature you tap while casting this spell pays for {1} or one mana of that creature's color.) -- The owner of target nonland permanent puts it into their library second from the top or on the bottom. +mana={3}{U} +type=Sorcery +[/card] +[card] name=Temporal Extortion auto=ability$!name(Choose one) choice name(Pay half life and counter) life:-halfdownlifetotal controller _ choice name(Extra turn) turns:+1 opponent!$ opponent text=When you cast Temporal Extortion, any player may pay half his or her life, rounded up. If a player does, counter Temporal Extortion. -- Take an extra turn after this one. @@ -86905,6 +87011,19 @@ mana={7}{G}{G} type=Legendary Artifact [/card] [card] +name=The Great Synthesis +abilities=nomaxhand +auto=counter(0/0,1,Lore) +auto=@each my firstmain:counter(0/0,1,Lore) +auto=draw:type:*:myhand controller +auto=@counteradded(0/0,1,Lore) from(this):this(counter{0/0.2.Lore}=) name(Return creatures) all(creature[-phyrexian]|battlefield) moveto(ownerhand) +auto=@counteradded(0/0,1,Lore) from(this):this(counter{0/0.3.Lore}) name(Cast spells for zero) target(*[-land]|myhand) activate castcard(normal) +auto=@counteradded(0/0,1,Lore) from(this):this(counter{0/0.3.Lore}) name(Exile and return) moveto(myexile) and!( moveto(mybattlefield) )! +text=(As this Saga enters and after your draw step, add a lore counter.) -- I — Draw cards equal to the number of cards in your hand. You have no maximum hand size for as long as you control The Great Synthesis. -- II — Return all non-Phyrexian creatures to their owners' hands. -- III — You may cast any number of spells from your hand without paying their mana costs. Exile The Great Synthesis, then return it to the battlefield (front face up). +type=Enchantment +subtype=Saga +[/card] +[card] name=The Haunt of Hightower abilities=flying, lifelink auto=_ATTACKING_ability$!name(discard) target(*|myhand) reject!$ opponent @@ -96414,6 +96533,14 @@ power=4 toughness=2 [/card] [card] +name=Wicked Slumber +other={convoke} name(Convoke) +auto=may target(creature|battlefield) tap && ability$!name(Stun creature) name(Stun creature) target(creature|battlefield) counter(0/0.1.Stun)!$ controller +text=Convoke (Your creatures can help cast this spell. Each creature you tap while casting this spell pays for {1} or one mana of that creature's color.) -- Tap up to two target creatures. Put a stun counter on either of them. Then put a stun counter on either of them. (If a permanent with a stun counter would become untapped, remove one from it instead.) +mana={3}{U} +type=Instant +[/card] +[card] name=Wicked Wolf auto=transforms((,newability[target(creature|opponentbattlefield) dynamicability])) ueot auto={S(food|myBattlefield)}:counter(1/1) && tap(noevent) && indestructible ueot