Skip to content

Commit 6625907

Browse files
committed
Fixed some primitives from issue #1085, improved some cards for AI combo (from Discord channel), added "isattacker" keyword to check if creature is attacking, added "couldattack" keyword to check if creature can attack, improved some triggers to add turnlimit option.
1 parent 7c697eb commit 6625907

File tree

6 files changed

+96
-61
lines changed

6 files changed

+96
-61
lines changed

projects/mtg/bin/Res/sets/primitives/borderline.txt

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
grade=borderline
22
#Bordeline Primitives Pack for Wagic the Homebrew.
33
#Please keep these card alphabetized, and try to have the "name=" line at the top of each card
4-
#I sorted this programmatically - Thanks to Vitty85 20-07-2023
4+
#I sorted this programmatically - Thanks to Vitty85 21-07-2023
55
[card]
66
name=+2 Mace
77
auto={3}:equip
@@ -18979,7 +18979,7 @@ type=Land
1897918979
[card]
1898018980
name=Corruption of Towashi
1898118981
auto=name(Incubate 4) name(Incubate 4) token(Incubator) and!( counter(1/1.4) )!
18982-
auto=@transformed(*[-instant;-sorcery]|myzones) turnlimited:may name(Draw a card) draw:1 controller
18982+
auto=@transformed(*|mybattlefield) turnlimited:may name(Draw a card) draw:1 controller
1898318983
text=When Corruption of Towashi enters the battlefield, incubate 4. (Create an Incubator token with four +1/+1 counters on it and "{2}: Transform this artifact." It transforms into a 0/0 Phyrexian artifact creature.) -- Whenever a permanent you control transforms or a permanent enters the battlefield under your control transformed, you may draw a card. Do this only once each turn.
1898418984
mana={4}{U}
1898518985
type=Enchantment
@@ -20336,7 +20336,7 @@ toughness=2
2033620336
[/card]
2033720337
[card]
2033820338
name=Cult of the Waxing Moon
20339-
auto=@transformed(creature[-human]|myBattlefield):name(Create wolf) _WOLFTOKEN_
20339+
auto=@transformed(creature[-human]|myBattlefield):may name(Create wolf) _WOLFTOKEN_
2034020340
text=Whenever a permanent you control transforms into a non-Human creature, put a 2/2 green Wolf creature token onto the battlefield.
2034120341
mana={4}{G}
2034220342
type=Creature
@@ -36853,12 +36853,12 @@ toughness=4
3685336853
[/card]
3685436854
[card]
3685536855
name=Garth One-Eye
36856-
auto=this(cantargetcard(*[-disenchant]) {1}{W}{T}:name(Choose disenchant) becomes(disenchant) forever && activate castcard(copied noevent named!:disenchant:!)
36857-
auto=this(cantargetcard(*[-braingeyser]) {X}{U}{U}{T}:name(Choose braingeyser) name(Choose braingeyser) transforms((,newability[becomes(braingeyser)],newability[activate castcard(copied noevent named!:braingeyser:! costx!:x:!)])) forever
36858-
auto=this(cantargetcard(*[-terror]) {1}{B}{T}:name(Choose terror) becomes(terror) forever && activate castcard(copied noevent named!:terror:!)
36859-
auto=this(cantargetcard(*[-shivan]) {4}{R}{R}{T}:name(Choose shivan dragon) becomes(shivan) forever && activate castcard(copied noevent named!:shivan dragon:!)
36860-
auto=this(cantargetcard(*[-regrowth]) {1}{G}{T}:name(Choose regrowth) becomes(regrowth) forever && activate castcard(copied noevent named!:regrowth:!)
36861-
auto=this(cantargetcard(*[-lotus]) {0}{T}:name(Choose black lotus) becomes(lotus) forever && activate castcard(copied noevent named!:black lotus:!)
36856+
auto=this(cantargetcard(*[-disenchant]) {1}{W}{T}:name(Choose disenchant) becomes(disenchant) forever && activate castcard(copied named!:disenchant:!)
36857+
auto=this(cantargetcard(*[-braingeyser]) {X}{U}{U}{T}:name(Choose braingeyser) name(Choose braingeyser) transforms((,newability[becomes(braingeyser)],newability[activate castcard(copied named!:braingeyser:! costx!:x:!)])) forever
36858+
auto=this(cantargetcard(*[-terror]) {1}{B}{T}:name(Choose terror) becomes(terror) forever && activate castcard(copied named!:terror:!)
36859+
auto=this(cantargetcard(*[-shivan]) {4}{R}{R}{T}:name(Choose shivan dragon) becomes(shivan) forever && activate castcard(copied named!:shivan dragon:!)
36860+
auto=this(cantargetcard(*[-regrowth]) {1}{G}{T}:name(Choose regrowth) becomes(regrowth) forever && activate castcard(copied named!:regrowth:!)
36861+
auto=this(cantargetcard(*[-lotus]) {T}:name(Choose black lotus) becomes(lotus) forever && activate castcard(copied putinplay named!:black lotus:!)
3686236862
text={T}: Choose a card name that hasn't been chosen from among Disenchant, Braingeyser, Terror, Shivan Dragon, Regrowth, and Black Lotus. Create a copy of the card with the chosen name. You may cast the copy. (You still pay its costs.)
3686336863
mana={W}{U}{B}{R}{G}
3686436864
type=Legendary Creature
@@ -36974,7 +36974,7 @@ name=Gavony Dawnguard
3697436974
aicode=activate transforms((,newability[if type(creature[zpos<=4;manacost<=3]|myLibrary)~morethan~0 then target(creature[zpos<=4;manacost<=3]|myLibrary) moveTo(myHand) and!( all(other *[zpos<=4]|mylibrary) moveto(myreveal) and!( bottomoflibrary )! )! else all(*[zpos<=4]|mylibrary) moveto(myreveal) and!( bottomoflibrary )! ])) oneshot
3697536975
auto=if type(*[day;night]|battlefield)~equalto~0 then name(It becomes day) activate castcard(noevent named!:Day:!)
3697636976
auto=@transformed(*[day;night]|battlefield):name(Look top 4 cards) reveal:4 optionone name(Get a creature) target(<upto:1>creature[manacost<=3]|reveal) moveto(myhand) optiononeend optiontwo name(put on bottom) target(<4>*|reveal) bottomoflibrary optiontwoend revealend
36977-
auto=_WARD_(1)
36977+
auto=@targeted(this) from(*|opponentzones):choice name(This spell costs 1 more) name(This spell costs 1 more) target(*|opponentzones) transforms((,newability[pay[[{1}]] name(pay 1 mana) donothing?fizzle])) oneshot
3697836978
text=Ward {1} -- If it's neither day nor night, it becomes day as Gavony Dawnguard enters the battlefield. -- Whenever day becomes night or night becomes day, look at the top four cards of your library. You may reveal a creature card with mana value 3 or less from among them and put it into your hand. Put the rest on the bottom of your library in any order.
3697936979
type=Creature
3698036980
subtype=Human Soldier
@@ -37297,8 +37297,7 @@ type=Sorcery
3729737297
[card]
3729837298
name=Geode Golem
3729937299
abilities=trample
37300-
auto=@combatdamagefoeof(player) from(this):may activate castcard(normal) target(*[iscommander]|mycommandzone)
37301-
auto=@combatdamageof(player) from(this):may activate castcard(normal) target(*[iscommander]|mycommandzone)
37300+
auto=@combatdamaged(player) from(this):may name(Cast the commander) target(*[iscommander]|mycommandzone) activate castcard(normal)
3730237301
text=Trample -- Whenever Geode Golem deals combat damage to a player, you may cast your commander from the command zone without paying its mana cost. (You still pay any additional costs.)
3730337302
mana={5}
3730437303
type=Artifact Creature
@@ -40442,10 +40441,11 @@ toughness=2
4044240441
[/card]
4044340442
[card]
4044440443
name=Gor Muldrak, Amphinologist
40445-
auto=lord(*|mybattlefield) protection from(salamander)
40446-
auto=preventalldamage to(controller) from(creature[salamander])
40447-
auto=@each my endofturn restriction{type(creature|opponentbattlefield)~morethan~type(creature|mybattlefield)}:token(Salamander Warrior,Creature Warrior Salamander,4/3,blue)
40448-
auto=@each my endofturn restriction{type(creature|opponentbattlefield)~lessthan~type(creature|mybattlefield)}:token(Salamander Warrior,Creature Warrior Salamander,4/3,blue) opponent
40444+
auto=lord(*|mybattlefield) transforms((,newability[protection from(*[salamander])]))
40445+
auto=preventalldamage to(controller) from(*[salamander])
40446+
auto=@each my endofturn restriction{type(creature|opponentbattlefield)~morethan~type(creature|mybattlefield)}:name(Create salamander) name(Create salamander) token(Salamander Warrior,Creature Warrior Salamander,4/3,blue)
40447+
auto=@each my endofturn restriction{type(creature|opponentbattlefield)~lessthan~type(creature|mybattlefield)}:name(Create salamander) name(Create salamander) token(Salamander Warrior,Creature Warrior Salamander,4/3,blue) opponent
40448+
auto=@each my endofturn restriction{type(creature|opponentbattlefield)~equalto~type(creature|mybattlefield)}:name(Create salamander) name(Create salamander) token(Salamander Warrior,Creature Warrior Salamander,4/3,blue) && token(Salamander Warrior,Creature Warrior Salamander,4/3,blue) opponent
4044940449
text=You and permanents you control have protection from Salamanders. -- At the beginning of your end step, each player who controls the fewest creatures creates a 4/3 blue Salamander Warrior creature token.
4045040450
mana={1}{G}{U}
4045140451
type=Legendary Creature
@@ -40466,8 +40466,7 @@ toughness=2
4046640466
[card]
4046740467
name=Goreclaw, Terror of Qal Sisma
4046840468
auto=lord(creature[power>=4]|mycastingzone) altercost(colorless,-2)
40469-
auto=_ATTACKING_all(creature[power>=4]|myBattlefield) 1/1 ueot
40470-
auto=_ATTACKING_all(creature[power>=4]|myBattlefield) trample ueot
40469+
auto=_ATTACKING_name(All creatures gain 1/1 and trample) all(creature[power>=4]|myBattlefield) transforms((,newability[1/1],newability[trample])) ueot
4047140470
text=Creature spells you cast with power 4 or greater cost {2} less to cast. -- Whenever Goreclaw, Terror of Qal Sisma attacks, each creature you control with power 4 or greater gets +1/+1 and gains trample until end of turn.
4047240471
mana={3}{G}
4047340472
type=Legendary Creature
@@ -41151,7 +41150,7 @@ toughness=1
4115141150
[card]
4115241151
name=Grazilaxx, Illithid Scholar
4115341152
auto=@combat(blocked) source(creature|myBattlefield):may name(Return to hand) all(trigger[to]) moveto(ownerhand)
41154-
auto=@each combatdamage restriction{opponentdamagedbycombat}:name(Draw card) draw:1 controller
41153+
auto=@combatdamagefoeof(player) from(creature|mybattlefield):name(Draw card) draw:1 controller
4115541154
text=Whenever a creature you control becomes blocked, you may return it to its owner's hand. -- Whenever one or more creatures you control deal combat damage to a player, draw a card.
4115641155
mana={1}{U}{U}
4115741156
type=Legendary Creature
@@ -80357,8 +80356,10 @@ toughness=4
8035780356
[/card]
8035880357
[card]
8035980358
name=Rosie Cotton of South Lane
80360-
auto=token(Food)
80361-
auto=@tokencreated(*|myBattlefield):name(Put 1/1 counter) target(other creature|myBattlefield) counter(1/1)
80359+
auto=token(Food) and!( name(Put 1/1 counter) target(other creature|myBattlefield) counter(1/1) )!
80360+
auto=@tokencreated(*|myBattlefield) restriction{compare(ishuman)~morethan~0}:name(Put 1/1 counter) name(Put 1/1 counter) target(other creature|myBattlefield) counter(1/1)
80361+
auto=@tokencreated(*|myBattlefield) restriction{compare(ishuman)~equalto~0,type(Scurry Oak|mybattlefield)~equalto~0}:name(Put 1/1 counter) name(Put 1/1 counter) target(other creature|myBattlefield) counter(1/1)
80362+
auto=@tokencreated(*|myBattlefield) restriction{compare(ishuman)~equalto~0,type(Scurry Oak|mybattlefield)~morethan~0}:name(Put 1/1 counter) name(Put 1/1 counter) name(Put 1/1 counter) target(Scurry Oak|mybattlefield) counter(1/1)
8036280363
text=When Rosie Cotton of South Lane enters the battlefield, create a Food token. (It's an artifact with "{2}, {T}, Sacrifice this artifact: You gain 3 life.") -- Whenever you create a token, put a +1/+1 counter on target creature you control other than Rosie.
8036380364
mana={2}{W}
8036480365
type=Legendary Creature
@@ -85516,7 +85517,7 @@ type=Instant
8551685517
[card]
8551785518
name=Shalai and Hallar
8551885519
abilities=flying,vigilance
85519-
auto=@counteradded(1/1) source(creature|myBattlefield):damage:1 target(opponent)
85520+
auto=@counteradded(1/1) from(creature|myBattlefield):name(Deal damage) damage:1 target(opponent)
8552085521
text=Flying, vigilance -- Whenever one or more +1/+1 counters are put on a creature you control, Shalai and Hallar deals that much damage to target opponent.
8552185522
mana={1}{R}{G}{W}
8552285523
type=Legendary Creature

projects/mtg/bin/Res/sets/primitives/mtg.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#Primitives Pack for Wagic the Homebrew.
22
#Please keep these card alphabetized, and try to have the "name=" line at the top of each card
3-
#I sorted this programmatically so the other comments are removed except for AUTO_DEFINE - Vitty85 20-07-2023
3+
#I sorted this programmatically so the other comments are removed except for AUTO_DEFINE - Vitty85 21-07-2023
44
[card]
55
name=Abandon Reason
66
target=<upto:2>creature
@@ -45418,8 +45418,8 @@ toughness=5
4541845418
[/card]
4541945419
[card]
4542045420
name=Gerrard Capashen
45421-
auto=@each my upkeep:name(target opponent) target(opponent) life:type:*:targetedpersonshand controller
45422-
auto=this(attacking) {3}{W}:tap target(creature)
45421+
auto=@each my upkeep:name(Gain life) name(Gain life) life:type:*:opponenthand controller
45422+
auto=this(variable{isattacker}>0) transforms((,newability[{3}{W} restriction{compare(currentphase)~lessthan~9}:name(Tap a creature) name(Tap a creature) transforms((,newability[mustattack],newability[name(Tap a creature) name(Tap a creature) target(creature|battlefield) tap])) ueot]))
4542345423
text=At the beginning of your upkeep, you gain 1 life for each card in target opponent's hand. -- {3}{W}: Tap target creature. Activate this ability only if Gerrard Capashen is attacking.
4542445424
mana={3}{W}{W}
4542545425
type=Legendary Creature
@@ -46426,8 +46426,8 @@ subtype=Aura
4642646426
[/card]
4642746427
[card]
4642846428
name=Gift of the Gargantuan
46429-
aicode=activate target(<upto:2>*[creature;land;zpos<=4]|mylibrary) moveto(myhand)
46430-
auto=name(look) reveal:4 optionone name(Get a card) target(<upto:2>creature,land|reveal) moveto(myhand) optiononeend optiontwo name(put on bottom) target(<4>*|reveal) bottomoflibrary optiontwoend revealend
46429+
aicode=activate transforms((,newability[if type(creature[zpos<=4]|mylibrary)~morethan~0 then if type(land[zpos<=4]|mylibrary)~morethan~0 then target(creature[zpos<=4]|mylibrary) moveto(myhand) and!( target(land[zpos<=4]|mylibrary) moveto(myhand) and!( all(*[zpos<=4]|mylibrary) moveto(myreveal) and!( bottomoflibrary )! )! )!],newability[if type(creature[zpos<=4]|mylibrary)~morethan~0 then if type(land[zpos<=4]|mylibrary)~equalto~0 then target(creature[zpos<=4]|mylibrary) moveto(myhand) and!( all(*[zpos<=4]|mylibrary) moveto(myreveal) and!( bottomoflibrary )! )!],newability[if type(creature[zpos<=4]|mylibrary)~equalto~0 then if type(land[zpos<=4]|mylibrary)~morethan~0 then target(land[zpos<=4]|mylibrary) moveto(myhand) and!( all(*[zpos<=4]|mylibrary) moveto(myreveal) and!( bottomoflibrary )! )!],newability[if type(creature[zpos<=4]|mylibrary)~morethan~0 then if type(land[zpos<=4]|mylibrary)~equalto~0 then target(creature[zpos<=4]|mylibrary) moveto(myhand) and!( all(*[zpos<=4]|mylibrary) moveto(myreveal) and!( bottomoflibrary )! )!],newability[if type(creature[zpos<=4]|mylibrary)~equalto~0 then if type(land[zpos<=4]|mylibrary)~equalto~0 then all(*[zpos<=4]|mylibrary) moveto(myreveal) and!( bottomoflibrary )!])) oneshot
46430+
auto=name(Look top 4 cards) reveal:4 optionone name(Get a creature or land) target(<upto:1>*[creature;land]|reveal) moveto(myhand) and!( transforms((,newability[if cantargetcard(*[land]|*) then if type(creature|reveal)~morethan~0 then choice name(Get a creature) name(Get a creature) name(Get a creature) target(creature|reveal) moveto(myhand)],newability[if cantargetcard(*[creature]|*) then if type(land|reveal)~morethan~0 then choice name(Get a land) name(Get a land) name(Get a land) target(land|reveal) moveto(myhand)],newability[choice name(Don't choose another card) donothing])) oneshot )! optiononeend optiontwo name(Put on bottom) target(<4>*|reveal) bottomoflibrary optiontwoend revealend
4643146431
text=Look at the top four cards of your library. You may reveal a creature card and/or a land card from among them and put the revealed cards into your hand. Put the rest on the bottom of your library in any order.
4643246432
mana={2}{G}
4643346433
type=Sorcery
@@ -50575,7 +50575,7 @@ type=Instant
5057550575
[card]
5057650576
name=Grip of Phyresis
5057750577
target=equipment
50578-
auto=moveto(mybattlefield) and!( transforms((,newability[create(Phyrexian Germ:Creature Phyrexian Germ:0/0:black) livingweapon])) oneshot )!
50578+
auto=moveto(mybattlefield) and!( transforms((Stolen,newability[token(Phyrexian Germ^Creature Phyrexian Germ^0/0^black) and!( name(Choose stolen equipment) target(equipment[stolen&-attached]|mybattlefield) transforms((,newability[name(Attach to phyrexian) rehook target(phyrexian[token&fresh&-geared]|mybattlefield)])) ueot )!])) oneshot )!
5057950579
text=Gain control of target Equipment, then create a 0/0 black Phyrexian Germ creature token and attach that Equipment to it.
5058050580
mana={2}{U}
5058150581
type=Instant
@@ -51642,8 +51642,8 @@ toughness=2
5164251642
[/card]
5164351643
[card]
5164451644
name=Gutter Grime
51645-
auto=@movedTo(creature[-token]|graveyard) from(myBattlefield):counter(0/0,1,Slime)
51646-
auto=@counteradded(0/0,1,Slime) from(this):token(Ooze,Creature Ooze,type:enchantment{counter(0/0,1,Slime)}:mybattlefield/type:enchantment{counter(0/0,1,Slime)}:mybattlefield cdaactive,green)
51645+
auto=@movedTo(creature[-token]|graveyard) from(myBattlefield):name(Add slime counter) counter(0/0,1,Slime) && token(Ooze,Creature Ooze Slimed,0/0,green)
51646+
auto=thisforeach(variable{hascntslime}>0) lord(ooze[token&slimed]|mybattlefield) 1/1
5164751647
text=Whenever a notoken creature you control dies, put a slime counter on Gutter Grime, then create a green Ooze creature token with "This creature's power and toughness are each equal to the number of slime counters on Gutter Grime."
5164851648
mana={4}{G}
5164951649
type=Enchantment

projects/mtg/bin/Res/sets/primitives/planeswalkers.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#Planeswalkers Primitives Pack for Wagic the Homebrew.
22
#Please keep these card alphabetized, and try to have the "name=" line at the top of each card
3-
#We sorted this in alphabetical order - Luruz & Vitty85 12-07-2023
3+
#We sorted this in alphabetical order - Luruz & Vitty85 21-07-2023
44
[card]
55
name=Abian, Luvion Usurper
66
auto=counter(0/0,5,loyalty)
@@ -1042,11 +1042,11 @@ color=black,green
10421042
[/card]
10431043
[card]
10441044
name=Garruk, Savage Herald
1045-
aicode=activate transforms((,newability[if type(creature[zpos=1]|mylibrary)~morethan~0 then target(creature[zpos=1]|mylibrary) moveto(ownerHand) else target(*[zpos=1]|mylibrary) moveto(bottomoflibrary)])) ueot
1045+
aicode=activate transforms((,newability[if type(creature[zpos=1]|mylibrary)~morethan~0 then target(creature[zpos=1]|mylibrary) moveto(myhand) else target(*[zpos=1]|mylibrary) moveto(myreveal) and!( bottomoflibrary )!])) ueot
10461046
auto=counter(0/0,5,loyalty)
1047-
auto={C(0/0,1,Loyalty)}:name(+1: Reveal the top card) reveal:1 optionone target(creature|reveal) moveto(myhand) optiononeend optiontwo name(Put in bottom of library) target(<1>*|reveal) moveto(bottomoflibrary) optiontwoend revealend
1048-
auto={C(0/0,-2,Loyalty)}:name(-2: Deals damage to target creature) target(creature|mybattlefield) transforms((,newability[target(other creature) dynamicability<!powerstrike!>])) oneshot
1049-
auto={C(0/0,-7,Loyalty)}:name(-7: Creatures you control assign damage) all(creature|myBattlefield) transforms((,newability[@combat(blocked,turnlimited) source(this):may name(assign combat damage to defending player) thisforeach(power>=1) damage:1 opponent && fog from(this)]))
1047+
auto={C(0/0,1,Loyalty)}:name(+1: Reveal the top card) reveal:1 optionone name(Put in hand) target(creature|reveal) moveto(myhand) optiononeend optiontwo name(Put on bottom) target(<1>*|reveal) bottomoflibrary optiontwoend revealend
1048+
auto={C(0/0,-2,Loyalty)}:name(-2: Deals damage to target creature) target(creature|mybattlefield) transforms((,newability[name(Damage other creature) target(other creature|battlefield) dynamicability<!powerstrike!>])) oneshot
1049+
auto={C(0/0,-7,Loyalty)}:name(-7: Creatures you control assign damage) all(creature|myBattlefield) transforms((,newability[@combat(blocked) source(this) turnlimited:may name(assign combat damage to defending player) thisforeach(power>=1) damage:1 opponent && fog from(this)])) ueot
10501050
text=+1: Reveal the top card of your library. If it's a creature card, put it into your hand. Otherwise, put it on the bottom of your library. -- −2: Target creature you control deals damage equal to its power to another target creature. -- −7: Until end of turn, creatures you control gain "You may have this creature assign its combat damage as though it weren't blocked."
10511051
mana={4}{G}{G}
10521052
type=Legendary Planeswalker

0 commit comments

Comments
 (0)