Fixed some primitives from issue #1085, fixed _BLINK_UEOT_ macro, improved several abilities to allow the usage og "and" option.

This commit is contained in:
Vittorio Alfieri
2023-07-27 18:18:49 +02:00
parent 29262b4c78
commit 332f0542f7
7 changed files with 547 additions and 289 deletions
@@ -203,7 +203,7 @@
#AUTO_DEFINE _RENOWN_($c) this(cantargetcard(*[-renown]) transforms((,newability[@combatdamaged(player) from(this):counter(1/1.$c) && becomes(renown) forever])) #AUTO_DEFINE _RENOWN_($c) this(cantargetcard(*[-renown]) transforms((,newability[@combatdamaged(player) from(this):counter(1/1.$c) && becomes(renown) forever]))
# Exile card. Return it to the battlefield under its owner's control at the beginning of the next end step. # Exile card. Return it to the battlefield under its owner's control at the beginning of the next end step.
#AUTO_DEFINE _BLINK_UEOT_ name(Blink ueot) all(this) transforms((,newability[moveto(exile)],newability[if cantargetcard(*[-token]|*) then phaseactionmulti[endofturn once] moveto(ownerbattlefield)])) #AUTO_DEFINE _BLINK_UEOT_ moveto(exile) and!( transforms((,newability[phaseaction[endofturn once checkex] moveto(ownerbattlefield)])) forever )!
# Connives. (Draw a card, then discard a card. If you discarded a nonland card, put a +1/+1 counter on this creature.) # Connives. (Draw a card, then discard a card. If you discarded a nonland card, put a +1/+1 counter on this creature.)
#AUTO_DEFINE _CONNIVES_ draw:1 && transforms((,newability[if type(*[-land]|myhand)~morethan~0 then choice name(Discard a nonland) name(Discard a nonland) target(*[-land]|myhand) reject && counter(1/1) all(this)],newability[if type(land|myhand)~morethan~0 then choice name(Discard a land) name(Discard a land) target(land|myhand) reject])) oneshot #AUTO_DEFINE _CONNIVES_ draw:1 && transforms((,newability[if type(*[-land]|myhand)~morethan~0 then choice name(Discard a nonland) name(Discard a nonland) target(*[-land]|myhand) reject && counter(1/1) all(this)],newability[if type(land|myhand)~morethan~0 then choice name(Discard a land) name(Discard a land) target(land|myhand) reject])) oneshot
@@ -1,7 +1,7 @@
grade=borderline grade=borderline
#Bordeline Primitives Pack for Wagic the Homebrew. #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 #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 26-07-2023 #I sorted this programmatically - Thanks to Vitty85 27-07-2023
[card] [card]
name=+2 Mace name=+2 Mace
auto={3}:equip auto={3}:equip
@@ -47294,27 +47294,27 @@ toughness=3
[card] [card]
name=Imbraham, Dean of Theory name=Imbraham, Dean of Theory
abilities=flying abilities=flying
auto={1}{U}{U}{T}:name(X=1) all(*[zpos<=1]|mylibrary) moveto(myexile) and!( transforms((,newability[counter(0/0.1.study)],newability[phaseaction[endofturn once checkex] counter(0/0.-1.study)])) oneshot )! auto={U}{U}{T}:name(X=0) ability$!may name(Put exiled card in hand) name(Put exiled card in hand) target(<upto:1>*[counter{0/0.1.study}]|myexile) moveto(myhand)!$ controller
auto={2}{U}{U}{T}:name(X=2) all(*[zpos<=2]|mylibrary) moveto(myexile) and!( transforms((,newability[counter(0/0.1.study)],newability[phaseaction[endofturn once checkex] counter(0/0.-1.study)])) oneshot )! auto={1}{U}{U}{T}:name(X=1) all(*[zpos=1]|mylibrary) moveto(myexile) and!( transforms((,newability[counter(0/0.1.study)],newability[ability$!may name(Put exiled card in hand) name(Put exiled card in hand) target(<upto:1>*[counter{0/0.1.study}]|myexile) moveto(myhand)!$ controller])) oneshot )!
auto={3}{U}{U}{T}:name(X=3) all(*[zpos<=3]|mylibrary) moveto(myexile) and!( transforms((,newability[counter(0/0.1.study)],newability[phaseaction[endofturn once checkex] counter(0/0.-1.study)])) oneshot )! auto={2}{U}{U}{T}:name(X=2) all(*[zpos=2]|mylibrary) moveto(myexile) and!( transforms((,newability[counter(0/0.1.study)],newability[all(*[zpos<=2]|mylibrary) moveto(myexile) and!( counter(0/0.1.study) )!],newability[ability$!may name(Put exiled card in hand) name(Put exiled card in hand) target(<upto:1>*[counter{0/0.1.study}]|myexile) moveto(myhand)!$ controller])) oneshot )!
auto={4}{U}{U}{T}:name(X=4) all(*[zpos<=4]|mylibrary) moveto(myexile) and!( transforms((,newability[counter(0/0.1.study)],newability[phaseaction[endofturn once checkex] counter(0/0.-1.study)])) oneshot )! auto={3}{U}{U}{T}:name(X=3) all(*[zpos=3]|mylibrary) moveto(myexile) and!( transforms((,newability[counter(0/0.1.study)],newability[all(*[zpos<=3]|mylibrary) moveto(myexile) and!( counter(0/0.1.study) )!],newability[ability$!may name(Put exiled card in hand) name(Put exiled card in hand) target(<upto:1>*[counter{0/0.1.study}]|myexile) moveto(myhand)!$ controller])) oneshot )!
auto={5}{U}{U}{T}:name(X=5) all(*[zpos<=5]|mylibrary) moveto(myexile) and!( transforms((,newability[counter(0/0.1.study)],newability[phaseaction[endofturn once checkex] counter(0/0.-1.study)])) oneshot )! auto={4}{U}{U}{T}:name(X=4) all(*[zpos=4]|mylibrary) moveto(myexile) and!( transforms((,newability[counter(0/0.1.study)],newability[all(*[zpos<=4]|mylibrary) moveto(myexile) and!( counter(0/0.1.study) )!],newability[ability$!may name(Put exiled card in hand) name(Put exiled card in hand) target(<upto:1>*[counter{0/0.1.study}]|myexile) moveto(myhand)!$ controller])) oneshot )!
auto={6}{U}{U}{T}:name(X=6) all(*[zpos<=6]|mylibrary) moveto(myexile) and!( transforms((,newability[counter(0/0.1.study)],newability[phaseaction[endofturn once checkex] counter(0/0.-1.study)])) oneshot )! auto={5}{U}{U}{T}:name(X=5) all(*[zpos=5]|mylibrary) moveto(myexile) and!( transforms((,newability[counter(0/0.1.study)],newability[all(*[zpos<=5]|mylibrary) moveto(myexile) and!( counter(0/0.1.study) )!],newability[ability$!may name(Put exiled card in hand) name(Put exiled card in hand) target(<upto:1>*[counter{0/0.1.study}]|myexile) moveto(myhand)!$ controller])) oneshot )!
auto={7}{U}{U}{T}:name(X=7) all(*[zpos<=7]|mylibrary) moveto(myexile) and!( transforms((,newability[counter(0/0.1.study)],newability[phaseaction[endofturn once checkex] counter(0/0.-1.study)])) oneshot )! auto={6}{U}{U}{T}:name(X=6) all(*[zpos=6]|mylibrary) moveto(myexile) and!( transforms((,newability[counter(0/0.1.study)],newability[all(*[zpos<=6]|mylibrary) moveto(myexile) and!( counter(0/0.1.study) )!],newability[ability$!may name(Put exiled card in hand) name(Put exiled card in hand) target(<upto:1>*[counter{0/0.1.study}]|myexile) moveto(myhand)!$ controller])) oneshot )!
auto={8}{U}{U}{T}:name(X=8) all(*[zpos<=8]|mylibrary) moveto(myexile) and!( transforms((,newability[counter(0/0.1.study)],newability[phaseaction[endofturn once checkex] counter(0/0.-1.study)])) oneshot )! auto={7}{U}{U}{T}:name(X=7) all(*[zpos=7]|mylibrary) moveto(myexile) and!( transforms((,newability[counter(0/0.1.study)],newability[all(*[zpos<=7]|mylibrary) moveto(myexile) and!( counter(0/0.1.study) )!],newability[ability$!may name(Put exiled card in hand) name(Put exiled card in hand) target(<upto:1>*[counter{0/0.1.study}]|myexile) moveto(myhand)!$ controller])) oneshot )!
auto={9}{U}{U}{T}:name(X=9) all(*[zpos<=9]|mylibrary) moveto(myexile) and!( transforms((,newability[counter(0/0.1.study)],newability[phaseaction[endofturn once checkex] counter(0/0.-1.study)])) oneshot )! auto={8}{U}{U}{T}:name(X=8) all(*[zpos=8]|mylibrary) moveto(myexile) and!( transforms((,newability[counter(0/0.1.study)],newability[all(*[zpos<=8]|mylibrary) moveto(myexile) and!( counter(0/0.1.study) )!],newability[ability$!may name(Put exiled card in hand) name(Put exiled card in hand) target(<upto:1>*[counter{0/0.1.study}]|myexile) moveto(myhand)!$ controller])) oneshot )!
auto={10}{U}{U}{T}:name(X=10) all(*[zpos<=10]|mylibrary) moveto(myexile) and!( transforms((,newability[counter(0/0.1.study)],newability[phaseaction[endofturn once checkex] counter(0/0.-1.study)])) oneshot )! auto={9}{U}{U}{T}:name(X=9) all(*[zpos=9]|mylibrary) moveto(myexile) and!( transforms((,newability[counter(0/0.1.study)],newability[all(*[zpos<=9]|mylibrary) moveto(myexile) and!( counter(0/0.1.study) )!],newability[ability$!may name(Put exiled card in hand) name(Put exiled card in hand) target(<upto:1>*[counter{0/0.1.study}]|myexile) moveto(myhand)!$ controller])) oneshot )!
auto={11}{U}{U}{T}:name(X=1) all(*[zpos<=11]|mylibrary) moveto(myexile) and!( transforms((,newability[counter(0/0.1.study)],newability[phaseaction[endofturn once checkex] counter(0/0.-1.study)])) oneshot )! auto={10}{U}{U}{T}:name(X=10) all(*[zpos=10]|mylibrary) moveto(myexile) and!( transforms((,newability[counter(0/0.1.study)],newability[all(*[zpos<=10]|mylibrary) moveto(myexile) and!( counter(0/0.1.study) )!],newability[ability$!may name(Put exiled card in hand) name(Put exiled card in hand) target(<upto:1>*[counter{0/0.1.study}]|myexile) moveto(myhand)!$ controller])) oneshot )!
auto={12}{U}{U}{T}:name(X=2) all(*[zpos<=12]|mylibrary) moveto(myexile) and!( transforms((,newability[counter(0/0.1.study)],newability[phaseaction[endofturn once checkex] counter(0/0.-1.study)])) oneshot )! auto={11}{U}{U}{T}:name(X=11) all(*[zpos=11]|mylibrary) moveto(myexile) and!( transforms((,newability[counter(0/0.1.study)],newability[all(*[zpos<=11]|mylibrary) moveto(myexile) and!( counter(0/0.1.study) )!],newability[ability$!may name(Put exiled card in hand) name(Put exiled card in hand) target(<upto:1>*[counter{0/0.1.study}]|myexile) moveto(myhand)!$ controller])) oneshot )!
auto={13}{U}{U}{T}:name(X=3) all(*[zpos<=13]|mylibrary) moveto(myexile) and!( transforms((,newability[counter(0/0.1.study)],newability[phaseaction[endofturn once checkex] counter(0/0.-1.study)])) oneshot )! auto={12}{U}{U}{T}:name(X=12) all(*[zpos=12]|mylibrary) moveto(myexile) and!( transforms((,newability[counter(0/0.1.study)],newability[all(*[zpos<=12]|mylibrary) moveto(myexile) and!( counter(0/0.1.study) )!],newability[ability$!may name(Put exiled card in hand) name(Put exiled card in hand) target(<upto:1>*[counter{0/0.1.study}]|myexile) moveto(myhand)!$ controller])) oneshot )!
auto={14}{U}{U}{T}:name(X=4) all(*[zpos<=14]|mylibrary) moveto(myexile) and!( transforms((,newability[counter(0/0.1.study)],newability[phaseaction[endofturn once checkex] counter(0/0.-1.study)])) oneshot )! auto={13}{U}{U}{T}:name(X=13) all(*[zpos=13]|mylibrary) moveto(myexile) and!( transforms((,newability[counter(0/0.1.study)],newability[all(*[zpos<=13]|mylibrary) moveto(myexile) and!( counter(0/0.1.study) )!],newability[ability$!may name(Put exiled card in hand) name(Put exiled card in hand) target(<upto:1>*[counter{0/0.1.study}]|myexile) moveto(myhand)!$ controller])) oneshot )!
auto={15}{U}{U}{T}:name(X=5) all(*[zpos<=15]|mylibrary) moveto(myexile) and!( transforms((,newability[counter(0/0.1.study)],newability[phaseaction[endofturn once checkex] counter(0/0.-1.study)])) oneshot )! auto={14}{U}{U}{T}:name(X=14) all(*[zpos=14]|mylibrary) moveto(myexile) and!( transforms((,newability[counter(0/0.1.study)],newability[all(*[zpos<=14]|mylibrary) moveto(myexile) and!( counter(0/0.1.study) )!],newability[ability$!may name(Put exiled card in hand) name(Put exiled card in hand) target(<upto:1>*[counter{0/0.1.study}]|myexile) moveto(myhand)!$ controller])) oneshot )!
auto={16}{U}{U}{T}:name(X=6) all(*[zpos<=16]|mylibrary) moveto(myexile) and!( transforms((,newability[counter(0/0.1.study)],newability[phaseaction[endofturn once checkex] counter(0/0.-1.study)])) oneshot )! auto={15}{U}{U}{T}:name(X=15) all(*[zpos=15]|mylibrary) moveto(myexile) and!( transforms((,newability[counter(0/0.1.study)],newability[all(*[zpos<=15]|mylibrary) moveto(myexile) and!( counter(0/0.1.study) )!],newability[ability$!may name(Put exiled card in hand) name(Put exiled card in hand) target(<upto:1>*[counter{0/0.1.study}]|myexile) moveto(myhand)!$ controller])) oneshot )!
auto={17}{U}{U}{T}:name(X=7) all(*[zpos<=17]|mylibrary) moveto(myexile) and!( transforms((,newability[counter(0/0.1.study)],newability[phaseaction[endofturn once checkex] counter(0/0.-1.study)])) oneshot )! auto={16}{U}{U}{T}:name(X=16) all(*[zpos=16]|mylibrary) moveto(myexile) and!( transforms((,newability[counter(0/0.1.study)],newability[all(*[zpos<=16]|mylibrary) moveto(myexile) and!( counter(0/0.1.study) )!],newability[ability$!may name(Put exiled card in hand) name(Put exiled card in hand) target(<upto:1>*[counter{0/0.1.study}]|myexile) moveto(myhand)!$ controller])) oneshot )!
auto={18}{U}{U}{T}:name(X=8) all(*[zpos<=18]|mylibrary) moveto(myexile) and!( transforms((,newability[counter(0/0.1.study)],newability[phaseaction[endofturn once checkex] counter(0/0.-1.study)])) oneshot )! auto={17}{U}{U}{T}:name(X=17) all(*[zpos=17]|mylibrary) moveto(myexile) and!( transforms((,newability[counter(0/0.1.study)],newability[all(*[zpos<=17]|mylibrary) moveto(myexile) and!( counter(0/0.1.study) )!],newability[ability$!may name(Put exiled card in hand) name(Put exiled card in hand) target(<upto:1>*[counter{0/0.1.study}]|myexile) moveto(myhand)!$ controller])) oneshot )!
auto={19}{U}{U}{T}:name(X=9) all(*[zpos<=19]|mylibrary) moveto(myexile) and!( transforms((,newability[counter(0/0.1.study)],newability[phaseaction[endofturn once checkex] counter(0/0.-1.study)])) oneshot )! auto={18}{U}{U}{T}:name(X=18) all(*[zpos=18]|mylibrary) moveto(myexile) and!( transforms((,newability[counter(0/0.1.study)],newability[all(*[zpos<=18]|mylibrary) moveto(myexile) and!( counter(0/0.1.study) )!],newability[ability$!may name(Put exiled card in hand) name(Put exiled card in hand) target(<upto:1>*[counter{0/0.1.study}]|myexile) moveto(myhand)!$ controller])) oneshot )!
auto={20}{U}{U}{T}:name(X=10) all(*[zpos<=20]|mylibrary) moveto(myexile) and!( transforms((,newability[counter(0/0.1.study)],newability[phaseaction[endofturn once checkex] counter(0/0.-1.study)])) oneshot )! auto={19}{U}{U}{T}:name(X=19) all(*[zpos=19]|mylibrary) moveto(myexile) and!( transforms((,newability[counter(0/0.1.study)],newability[all(*[zpos<=19]|mylibrary) moveto(myexile) and!( counter(0/0.1.study) )!],newability[ability$!may name(Put exiled card in hand) name(Put exiled card in hand) target(<upto:1>*[counter{0/0.1.study}]|myexile) moveto(myhand)!$ controller])) oneshot )!
auto={0}:name(Put exiled card in hand) target(*[counter{0/0.1.study}]|myexile) moveto(myhand) limit:1 auto={20}{U}{U}{T}:name(X=20) all(*[zpos=20]|mylibrary) moveto(myexile) and!( transforms((,newability[counter(0/0.1.study)],newability[all(*[zpos<=20]|mylibrary) moveto(myexile) and!( counter(0/0.1.study) )!],newability[ability$!may name(Put exiled card in hand) name(Put exiled card in hand) target(<upto:1>*[counter{0/0.1.study}]|myexile) moveto(myhand)!$ controller])) oneshot )!
text=Flying -- {X}{U}{U}, {T}: Exile the top X cards of your library and put a study counter on each of them. Then you may put a card you own in exile with a study counter on it into your hand. // {2}{G} Kianne, Dean of Substance text=Flying -- {X}{U}{U}, {T}: Exile the top X cards of your library and put a study counter on each of them. Then you may put a card you own in exile with a study counter on it into your hand. // {2}{G} Kianne, Dean of Substance
mana={2}{U}{U} mana={2}{U}{U}
type=Legendary Creature type=Legendary Creature
@@ -52387,16 +52387,15 @@ subtype=Aura
[card] [card]
name=Kaya's Guile name=Kaya's Guile
other={4}{W}{B} name(Entwine) other={4}{W}{B} name(Entwine)
auto=ifnot paid(alternative) then choice name(Choose 1 and 2):ability$!name(sacrifice) notatarget(*[creature]|myBattlefield) sacrifice!$ opponent && moveto(exile) all(creature|opponentbattlefield) auto=ifnot paid(alternative) then if type(creature|opponentbattlefield)~morethan~0 then choice name(Sacrifice creature and exile cards) name(Sacrifice creature and exile cards) name(Sacrifice creature and exile cards) ability$!name(Sacrifice a creature) notatarget(creature|myBattlefield) sacrifice and!( moveto(exile) all(*|mygraveyard) )!!$ opponent &&
auto=ifnot paid(alternative) then choice name(Choose 1 and 3):ability$!name(sacrifice) notatarget(*[creature]|myBattlefield) sacrifice!$ opponent && _AFTERLIFETOKEN_ auto=ifnot paid(alternative) then if type(creature|opponentbattlefield)~equalto~0 then choice name(Sacrifice creature and exile cards) name(Sacrifice creature and exile cards) name(Sacrifice creature and exile cards) moveto(exile) all(*|opponentgraveyard)
auto=ifnot paid(alternative) then choice name(Choose 1 and 4):ability$!name(sacrifice) notatarget(*[creature]|myBattlefield) sacrifice!$ opponent && life:4 controller auto=ifnot paid(alternative) then choice name(Sacrifice creature and create spirit) name(Sacrifice creature and create spirit) token(Spirit,Creature Spirit,1/1,white,black,flying) && ability$!name(Sacrifice a creature) notatarget(creature|myBattlefield) sacrifice!$ opponent
auto=ifnot paid(alternative) then choice name(Choose 2 and 3):moveto(exile) all(creature|opponentbattlefield) && _AFTERLIFETOKEN_ auto=ifnot paid(alternative) then choice name(Sacrifice creature and gain life) name(Sacrifice creature and gain life) life:4 controller && ability$!name(Sacrifice a creature) notatarget(creature|myBattlefield) sacrifice!$ opponent
auto=ifnot paid(alternative) then choice name(Choose 2 and 4):moveto(exile) all(creature|opponentbattlefield) && life:4 controller auto=ifnot paid(alternative) then choice name(Create spirit and exile cards) name(Create spirit and exile cards) token(Spirit,Creature Spirit,1/1,white,black,flying) and!( moveto(exile) all(*|opponentgraveyard) )!
auto=ifnot paid(alternative) then choice name(Choose 3 and 4):_AFTERLIFETOKEN_ && life:4 controller auto=ifnot paid(alternative) then choice name(Gain life and exile cards) name(Gain life and exile cards) life:4 controller && moveto(exile) all(creature|opponentgraveyard)
auto=if paid(alternative) then ability$!name(sacrifice) notatarget(*[creature]|myBattlefield) sacrifice!$ opponent auto=ifnot paid(alternative) then choice name(Create spirit and gain life) name(Create spirit and gain life) token(Spirit,Creature Spirit,1/1,white,black,flying) and!( life:4 controller )!
auto=if paid(alternative) then moveto(exile) all(creature|opponentbattlefield) auto=if paid(alternative) then name(Sacrifice creature and exile cards) name(Sacrifice creature and exile cards) ability$!name(Sacrifice a creature) notatarget(creature|myBattlefield) sacrifice and!( moveto(exile) all(*|mygraveyard) )!!$ opponent
auto=if paid(alternative) then _AFTERLIFETOKEN_ auto=if paid(alternative) then name(Create spirit and gain life) name(Create spirit and gain life) token(Spirit,Creature Spirit,1/1,white,black,flying) and!( life:4 controller )!
auto=if paid(alternative) then life:4 controller
text=Choose two -- Each opponent sacrifices a creature. -- Exile all cards from each opponent's graveyard. -- Create a 1/1 white and black Spirit creature token with flying. -- You gain 4 life. -- Entwine 3 (Choose all if you pay the entwine cost.) text=Choose two -- Each opponent sacrifices a creature. -- Exile all cards from each opponent's graveyard. -- Create a 1/1 white and black Spirit creature token with flying. -- You gain 4 life. -- Entwine 3 (Choose all if you pay the entwine cost.)
mana={1}{W}{B} mana={1}{W}{B}
type=Instant type=Instant
@@ -52414,8 +52413,8 @@ type=Instant
[/card] [/card]
[card] [card]
name=Kaya's Wrath name=Kaya's Wrath
auto=destroy all(creature) auto=all(creature|opponentbattlefield) destroy
auto=@movedto(graveyard) from(creature|myBattlefield):life:1 auto=all(creature|mybattlefield) destroy and!( life:1 controller )!
text=Destroy all creatures. You gain life equal to the number of creatures you controlled that were destroyed this way. text=Destroy all creatures. You gain life equal to the number of creatures you controlled that were destroyed this way.
mana={W}{W}{B}{B} mana={W}{W}{B}{B}
type=Sorcery type=Sorcery
@@ -52445,7 +52444,7 @@ type=Legendary Artifact
[/card] [/card]
[card] [card]
name=Kayla's Reconstruction name=Kayla's Reconstruction
aicode=activate transforms((,newability[if type(creature[manacost<=3&zpos<=7]|mylibrary)~equalto~0 then if type(artifact[manacost<=3&zpos<=7]|mylibrary)~equalto~0 then all(*[zpos<=7]|mylibrary) moveto(myreveal) and!( bottomoflibrary )!],newability[if type(creature[manacost<=3&zpos<=7]|mylibrary)~morethan~0 then target(<upto:fullpaid>creature[manacost<=3&zpos<=7]|mylibrary) moveto(mybattlefield) and!( transforms((,newability[all(*[zpos<=7]|mylibrary) moveto(myreveal) and!( bottomoflibrary )!],newability[if type(artifact[manacost<=3&zpos<=7]|mylibrary)~morethan~0 then target(<upto:fullpaid>artifact[manacost<=3&zpos<=7]|mylibrary) moveto(mybattlefield) and!( transforms((,newability[all(*[zpos<=7]|mylibrary) moveto(myreveal) and!( bottomoflibrary )!])) oneshot )! ])) oneshot aicode=activate transforms((,newability[if type(creature[manacost<=3&zpos<=7]|mylibrary)~equalto~0 then if type(artifact[manacost<=3&zpos<=7]|mylibrary)~equalto~0 then all(*[zpos<=7]|mylibrary) moveto(myreveal) and!( bottomoflibrary )!],newability[if type(creature[manacost<=3&zpos<=7]|mylibrary)~morethan~0 then target(<upto:fullpaid>creature[manacost<=3&zpos<=7]|mylibrary) moveto(mybattlefield) and!( all(*[zpos<=7]|mylibrary) moveto(myreveal) and!( bottomoflibrary )! )!]auto=,newability[if type(creature[manacost<=3&zpos<=7]|mylibrary)~equalto~0 then if type(artifact[manacost<=3&zpos<=7]|mylibrary)~morethan~0 then target(<upto:fullpaid>artifact[manacost<=3&zpos<=7]|mylibrary) moveto(mybattlefield) and!( all(*[zpos<=7]|mylibrary) moveto(myreveal) and!( bottomoflibrary )! )!])) oneshot
auto=name(Look top 7 cards) reveal:7 optionone name(Choose artifacts or creatures) target(<upto:fullpaid>*[manacost<=3]|reveal) moveto(mylibrary) and!( if cantargetcard(*[artifact;creature]|*) then becomes(tobecast) ueot )! optiononeend optiontwo name(Put on bottom) target(*|reveal) bottomoflibrary and!( all(*|reveal) bottomoflibrary )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(mybattlefield) afterrevealedend revealend auto=name(Look top 7 cards) reveal:7 optionone name(Choose artifacts or creatures) target(<upto:fullpaid>*[manacost<=3]|reveal) moveto(mylibrary) and!( if cantargetcard(*[artifact;creature]|*) then becomes(tobecast) ueot )! optiononeend optiontwo name(Put on bottom) target(*|reveal) bottomoflibrary and!( all(*|reveal) bottomoflibrary )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(mybattlefield) afterrevealedend revealend
text=Look at the top seven cards of your library. Put up to X artifact and/or creature cards with mana value 3 or less from among them onto the battlefield. Put the rest on the bottom of your library in a random order. text=Look at the top seven cards of your library. Put up to X artifact and/or creature cards with mana value 3 or less from among them onto the battlefield. Put the rest on the bottom of your library in a random order.
mana={X}{W}{W}{W} mana={X}{W}{W}{W}
@@ -53147,8 +53146,8 @@ otherrestriction=can play creature,compare(isflipped)~equalto~1
restriction=compare(isflipped)~equalto~0 restriction=compare(isflipped)~equalto~0
anyzone={0}:doubleside(Imbraham, Dean of Theory) anyzone={0}:doubleside(Imbraham, Dean of Theory)
autostack=if paid(alternative) then name(Imbraham, Dean of Theory) name(Imbraham, Dean of Theory) flip(Imbraham, Dean of Theory) forcetype(Legendary Creature) autostack=if paid(alternative) then name(Imbraham, Dean of Theory) name(Imbraham, Dean of Theory) flip(Imbraham, Dean of Theory) forcetype(Legendary Creature)
auto=this(variable{isflipped}<1) {T}:all(*[zpos=1]|mylibrary) moveto(myexile) and!( transforms((,newability[this(cantargetcard(*[land]|*) moveto(myhand)],newability[this(cantargetcard(*[-land]|*) counter(0/0.1.study)])) oneshot )! auto=this(variable{isflipped}<1) {T}:name(Exile top card) name(Exile top card) all(*[zpos=1]|mylibrary) moveto(myexile) and!( transforms((,newability[if cantargetcard(*[land]|*) then moveto(myhand)],newability[if cantargetcard(*[-land]|*) then counter(0/0.1.Study)])) oneshot )!
auto=this(variable{isflipped}<1) {4}{G}:token(Fractal,Creature Fractal,0/0,green,blue) and!( transforms((,newability[if type(*[-land;red;counter{0/0.1.study}]|myexile)~morethan~0 then counter(1/1)],newability[if type(*[-land;black;counter{0/0.1.study}]|myexile)~morethan~0 then counter(1/1)],newability[if type(*[-land;green;counter{0/0.1.study}]|myexile)~morethan~0 then counter(1/1)],newability[if type(*[-land;white;counter{0/0.1.study}]|myexile)~morethan~0 then counter(1/1)],newability[if type(*[-land;blue;counter{0/0.1.study}]|myexile)~morethan~0 then counter(1/1)])) oneshot )! auto=this(variable{isflipped}<1) {4}{G}:name(Create fractal) name(Create fractal) token(Fractal,Creature Fractal,0/0,green,blue) and!( transforms((,newability[if type(*[-land&manacost=0&counter{0/0.1.study}]|myexile)~morethan~0 then counter(1/1)],newability[if type(*[-land&manacost=1&counter{0/0.1.study}]|myexile)~morethan~0 then counter(1/1)],newability[if type(*[-land&manacost=2&counter{0/0.1.study}]|myexile)~morethan~0 then counter(1/1)],newability[if type(*[-land&manacost=3&counter{0/0.1.study}]|myexile)~morethan~0 then counter(1/1)],newability[if type(*[-land&manacost=4&counter{0/0.1.study}]|myexile)~morethan~0 then counter(1/1)],newability[if type(*[-land&manacost=5&counter{0/0.1.study}]|myexile)~morethan~0 then counter(1/1)],newability[if type(*[-land&manacost=6&counter{0/0.1.study}]|myexile)~morethan~0 then counter(1/1)],newability[if type(*[-land&manacost=7&counter{0/0.1.study}]|myexile)~morethan~0 then counter(1/1)],newability[if type(*[-land&manacost=8&counter{0/0.1.study}]|myexile)~morethan~0 then counter(1/1)],newability[if type(*[-land&manacost=9&counter{0/0.1.study}]|myexile)~morethan~0 then counter(1/1)],newability[if type(*[-land&manacost=10&counter{0/0.1.study}]|myexile)~morethan~0 then counter(1/1)],newability[if type(*[-land&manacost=11&counter{0/0.1.study}]|myexile)~morethan~0 then counter(1/1)],newability[if type(*[-land&manacost=12&counter{0/0.1.study}]|myexile)~morethan~0 then counter(1/1)],newability[if type(*[-land&manacost=13&counter{0/0.1.study}]|myexile)~morethan~0 then counter(1/1)],newability[if type(*[-land&manacost=14&counter{0/0.1.study}]|myexile)~morethan~0 then counter(1/1)],newability[if type(*[-land&manacost=15&counter{0/0.1.study}]|myexile)~morethan~0 then counter(1/1)],newability[if type(*[-land&manacost=16&counter{0/0.1.study}]|myexile)~morethan~0 then counter(1/1)],newability[if type(*[-land&manacost=17&counter{0/0.1.study}]|myexile)~morethan~0 then counter(1/1)],newability[if type(*[-land&manacost=18&counter{0/0.1.study}]|myexile)~morethan~0 then counter(1/1)],newability[if type(*[-land&manacost=19&counter{0/0.1.study}]|myexile)~morethan~0 then counter(1/1)],newability[if type(*[-land&manacost>=20&counter{0/0.1.study}]|myexile)~morethan~0 then counter(1/1)])) oneshot )!
text={T}: Exile the top card of your library. If it's a land card, put it into your hand. Otherwise, put a study counter on it. -- {4}{G}: Create a 0/0 green and blue Fractal creature token. Put a +1/+1 counter on it for each different mana value among nonland cards you own in exile with study counters on them. // {2}{U}{U} name(Imbraham, Dean of Theory) text={T}: Exile the top card of your library. If it's a land card, put it into your hand. Otherwise, put a study counter on it. -- {4}{G}: Create a 0/0 green and blue Fractal creature token. Put a +1/+1 counter on it for each different mana value among nonland cards you own in exile with study counters on them. // {2}{U}{U} name(Imbraham, Dean of Theory)
mana={2}{G} mana={2}{G}
type=Legendary Creature type=Legendary Creature
@@ -53463,8 +53462,7 @@ toughness=5
[card] [card]
name=Kira, Great Glass-Spinner name=Kira, Great Glass-Spinner
abilities=flying abilities=flying
auto=lord(other creature|mybattlefield) transforms((,newability[@targeted(this) turnlimited:name(Counter spell) all(trigger[from]) fizzle])) auto=lord(creature|mybattlefield) transforms((,newability[@targeted(this) turnlimited:name(Counter first spell) name(Counter first spell) target(*|stack) fizzle]))
auto=@targeted(this) turnlimited:name(Counter spell) target(*|stack) fizzle
text=Flying -- Creatures you control have "Whenever this creature becomes the target of a spell or ability for the first time in a turn, counter that spell or ability." text=Flying -- Creatures you control have "Whenever this creature becomes the target of a spell or ability for the first time in a turn, counter that spell or ability."
mana={1}{U}{U} mana={1}{U}{U}
type=Legendary Creature type=Legendary Creature
@@ -65633,7 +65631,7 @@ toughness=3
name=Nezahal, Primal Tide name=Nezahal, Primal Tide
abilities=nofizzle,nomaxhand abilities=nofizzle,nomaxhand
auto=@movedTo(*[-creature]|opponentstack):draw:1 auto=@movedTo(*[-creature]|opponentstack):draw:1
auto={D(*|myhand)}{D(*|myhand)}{D(*|myhand)}:_BLINK_UEOT_ auto={D(*|myhand)}{D(*|myhand)}{D(*|myhand)}:name(Blink ueot) _BLINK_UEOT_
text=Nezahal, Primal Tide can't be countered. -- You have no maximum hand size. -- Whenever an opponent casts a noncreature spell, draw a card. -- Discard three cards: Exile Nezahal. Return it to the battlefield tapped under its owner's control at the beginning of the next end step. text=Nezahal, Primal Tide can't be countered. -- You have no maximum hand size. -- Whenever an opponent casts a noncreature spell, draw a card. -- Discard three cards: Exile Nezahal. Return it to the battlefield tapped under its owner's control at the beginning of the next end step.
mana={5}{U}{U} mana={5}{U}{U}
type=Legendary Creature type=Legendary Creature
+11 -11
View File
@@ -1,6 +1,6 @@
#Primitives Pack for Wagic the Homebrew. #Primitives Pack for Wagic the Homebrew.
#Please keep these card alphabetized, and try to have the "name=" line at the top of each card #Please keep these card alphabetized, and try to have the "name=" line at the top of each card
#I sorted this programmatically so the other comments are removed except for AUTO_DEFINE - Vitty85 26-07-2023 #I sorted this programmatically so the other comments are removed except for AUTO_DEFINE - Vitty85 27-07-2023
[card] [card]
name=Abandon Reason name=Abandon Reason
target=<upto:2>creature target=<upto:2>creature
@@ -1438,7 +1438,7 @@ type=Instant
[/card] [/card]
[card] [card]
name=Aetherling name=Aetherling
auto={U}:_BLINK_UEOT_ auto={U}:name(Blink ueot) _BLINK_UEOT_
auto={U}:unblockable auto={U}:unblockable
auto={1}:1/-1 auto={1}:1/-1
auto={1}:-1/1 auto={1}:-1/1
@@ -4354,7 +4354,7 @@ toughness=2
[/card] [/card]
[card] [card]
name=Anurid Brushhopper name=Anurid Brushhopper
auto={D(*|myhand)}{D(*|myhand)}:_BLINK_UEOT_ auto={D(*|myhand)}{D(*|myhand)}:name(Blink ueot) _BLINK_UEOT_
text=Discard two cards: Exile Anurid Brushhopper. Return it to the battlefield under its owner's control at the beginning of the next end step. text=Discard two cards: Exile Anurid Brushhopper. Return it to the battlefield under its owner's control at the beginning of the next end step.
mana={1}{G}{W} mana={1}{G}{W}
type=Creature type=Creature
@@ -5585,7 +5585,7 @@ type=Instant
[card] [card]
name=Argent Sphinx name=Argent Sphinx
abilities=flying abilities=flying
auto=aslongas(artifact|mybattlefield) {U}:_BLINK_UEOT_ >2 auto=aslongas(artifact|mybattlefield) {U}:name(Blink ueot) name(Blink ueot) _BLINK_UEOT_ >2
text=Flying -- Metalcraft {U}: Exile Argent Sphinx. Return it to the battlefield under your control at the beginning of the next end step. Activate this ability only if you control three or more artifacts. text=Flying -- Metalcraft {U}: Exile Argent Sphinx. Return it to the battlefield under your control at the beginning of the next end step. Activate this ability only if you control three or more artifacts.
mana={2}{U}{U} mana={2}{U}{U}
type=Creature type=Creature
@@ -43487,7 +43487,7 @@ toughness=6
[/card] [/card]
[card] [card]
name=Frenetic Sliver name=Frenetic Sliver
auto=lord(sliver) {0}:flipacoin winability _BLINK_UEOT_ winabilityend loseability sacrifice loseabilityend flipend auto=lord(sliver) {0}:flipacoin winability name(Blink ueot) _BLINK_UEOT_ winabilityend loseability sacrifice loseabilityend flipend
text=All Slivers have "{0}: If this permanent is on the battlefield, flip a coin. If you win the flip, exile this permanent and return it to the battlefield under its owner's control at the beginning of the next end step. If you lose the flip, sacrifice it." text=All Slivers have "{0}: If this permanent is on the battlefield, flip a coin. If you win the flip, exile this permanent and return it to the battlefield under its owner's control at the beginning of the next end step. If you lose the flip, sacrifice it."
mana={1}{U}{R} mana={1}{U}{R}
type=Creature type=Creature
@@ -45740,7 +45740,7 @@ toughness=3
[card] [card]
name=Ghost Council of Orzhova name=Ghost Council of Orzhova
auto=choice target(opponent) life:-1 && life:1 controller auto=choice target(opponent) life:-1 && life:1 controller
auto={1}{S(creature|mybattlefield)}:_BLINK_UEOT_ auto={1}{S(creature|mybattlefield)}:name(Blink ueot) _BLINK_UEOT_
text=When Ghost Council of Orzhova enters the battlefield, target opponent loses 1 life and you gain 1 life. -- {1}, Sacrifice a creature: Exile Ghost Council of Orzhova. Return it to the battlefield under its owner's control at the beginning of the next end step. text=When Ghost Council of Orzhova enters the battlefield, target opponent loses 1 life and you gain 1 life. -- {1}, Sacrifice a creature: Exile Ghost Council of Orzhova. Return it to the battlefield under its owner's control at the beginning of the next end step.
mana={W}{W}{B}{B} mana={W}{W}{B}{B}
type=Legendary Creature type=Legendary Creature
@@ -54716,7 +54716,7 @@ type=Sorcery
[card] [card]
name=Hikari, Twilight Guardian name=Hikari, Twilight Guardian
abilities=flying abilities=flying
auto=@movedTo(spirit,arcane|mystack):may _BLINK_UEOT_ auto=@movedTo(spirit,arcane|mystack):may name(Blink ueot) _BLINK_UEOT_
text=Flying -- Whenever you cast a Spirit or Arcane spell, you may exile Hikari, Twilight Guardian. If you do, return it to the battlefield under its owner's control at the beginning of the next end step. text=Flying -- Whenever you cast a Spirit or Arcane spell, you may exile Hikari, Twilight Guardian. If you do, return it to the battlefield under its owner's control at the beginning of the next end step.
mana={3}{W}{W} mana={3}{W}{W}
type=Legendary Creature type=Legendary Creature
@@ -64872,9 +64872,9 @@ toughness=*
[/card] [/card]
[card] [card]
name=Krovikan Plague name=Krovikan Plague
target=creature[-Wall]|myBattlefield target=creature[-wall]|myBattlefield
auto=@next upkeep:draw:1 controller auto=@next upkeep:name(Draw a card) draw:1 controller
auto=teach(creature) {T}:damage:1 target(anytarget) && all(this) counter(0/-1,1) auto=teach(creature) transforms((,newability[{T}{C(0/-1.1)}:name(Deal damage) damage:1 target(anytarget)]))
text=Enchant non-Wall creature you control -- When Krovikan Plague enters the battlefield, draw a card at the beginning of the next turn's upkeep. -- Enchanted creature has "{T}: Put a -0/-1 counter on this creature, and Krovikan Plague deals 1 damage to target creature or player." text=Enchant non-Wall creature you control -- When Krovikan Plague enters the battlefield, draw a card at the beginning of the next turn's upkeep. -- Enchanted creature has "{T}: Put a -0/-1 counter on this creature, and Krovikan Plague deals 1 damage to target creature or player."
mana={2}{B} mana={2}{B}
type=Enchantment type=Enchantment
@@ -64971,7 +64971,7 @@ type=Artifact
[card] [card]
name=Kudzu name=Kudzu
target=land target=land
auto=@tapped(mytgt):all(trigger) destroy && all(this) transforms((,newability[target(land) retarget])) forever auto=@tapped(mytgt):all(trigger) destroy && all(this) transforms((,newability[name(Attach to land) target(land|battlefield) retarget])) forever
text=Enchant land -- When enchanted land becomes tapped, destroy it. That land's controller attaches Kudzu to a land of his or her choice. text=Enchant land -- When enchanted land becomes tapped, destroy it. That land's controller attaches Kudzu to a land of his or her choice.
mana={1}{G}{G} mana={1}{G}{G}
type=Enchantment type=Enchantment
@@ -1,6 +1,6 @@
#Planeswalkers Primitives Pack for Wagic the Homebrew. #Planeswalkers Primitives Pack for Wagic the Homebrew.
#Please keep these card alphabetized, and try to have the "name=" line at the top of each card #Please keep these card alphabetized, and try to have the "name=" line at the top of each card
#We sorted this in alphabetical order - Luruz & Vitty85 26-07-2023 #We sorted this in alphabetical order - Luruz & Vitty85 27-07-2023
[card] [card]
name=Abian, Luvion Usurper name=Abian, Luvion Usurper
auto=counter(0/0,5,loyalty) auto=counter(0/0,5,loyalty)
@@ -1666,10 +1666,9 @@ subtype=Karn
name=Karn, the Great Creator name=Karn, the Great Creator
auto=counter(0/0,5,loyalty) auto=counter(0/0,5,loyalty)
auto=lord(artifact|opponentBattlefield) noactivatedability auto=lord(artifact|opponentBattlefield) noactivatedability
auto={C(0/0,1,Loyalty)}:name(+1: Becomes a creature) target(artifact[-creature]) transforms((creature,newability[manacost/manacost])) uynt auto={C(0/0,1,Loyalty)}:name(+1: Transform an artifact) target(artifact[-creature]) transforms((creature,newability[manacost/manacost])) uynt
auto={C(0/0,1,Loyalty)}:name(+1: Loyalty counter) donothing auto={C(0/0,1,Loyalty)}:name(+1: Don't transform any artifact) donothing
auto={C(0/0,-2,Loyalty)}:name(-2: move a card from exile) moveto(ownerhand) target(artifact|myexile) auto={C(0/0,-2,Loyalty)}:name(-2: Move a card from outside game) target(artifact|myexile,mysideboard) moveto(myhand)
auto={C(0/0,-2,Loyalty)}:name(-2: move a card from sideboard) reveal:type:*:mysideboard revealzone(mysideboard) optionone name(choose card) target(<1>*[artifact]|reveal) moveto(myhand) and!(all(other *|reveal) moveto(ownersideboard))! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownersideboard) and!(all(other *|reveal) moveto(ownersideboard))! optiontwoend revealend
text=Activated abilities of artifacts your opponents control can't be activated. -- +1: Until your next turn, up to one target noncreature artifact becomes an artifact creature with power and toughness each equal to its mana value. -- -2: You may choose an artifact card you own from outside the game or in exile, reveal that card, and put it into your hand. text=Activated abilities of artifacts your opponents control can't be activated. -- +1: Until your next turn, up to one target noncreature artifact becomes an artifact creature with power and toughness each equal to its mana value. -- -2: You may choose an artifact card you own from outside the game or in exile, reveal that card, and put it into your hand.
mana={4} mana={4}
type=Legendary Planeswalker type=Legendary Planeswalker
@@ -1763,9 +1762,11 @@ subtype=Kaya
[card] [card]
name=Kaya, Ghost Assassin name=Kaya, Ghost Assassin
auto=counter(0/0,5,loyalty) auto=counter(0/0,5,loyalty)
auto={C(0/0,0,Loyalty)}:name(+0: Exile Kaya or creature) ability$!name(Choose creature or this) choice name(Kaya, Ghost Assassin) all(this) (blink)ueot && life:-2 controller _choice name(Creature) target(creature) (blink)ueot controller!$ controller && life:-2 auto={C(0/0,0,Loyalty)}:name(+0: Exile creature) target(creature|battlefield) moveto(exile) and!( life:-2 controller && transforms((,newability[phaseaction[endofturn once checkex] moveto(ownerbattlefield)])) forever )!
auto={C(0/0,-1,Loyalty)}:name(-1: Each opponent loses life and you gain) life:-2 opponent && life:2 controller auto={C(0/0,0,Loyalty)}:name(+0: Exile kaya) moveto(exile) and!( life:-2 controller && counter(0/0,hascntloyalty,Loyalty) && transforms((,newability[@next endofturn:name(Return to battlefield) moveto(ownerbattlefield) and!( counter(0/0.hascntloyalty.Loyalty) notrg && counter(0/0.-5.Loyalty) notrg)! ])) forever )!
auto={C(0/0,-2,Loyalty)}:name(-2: Each opponent discard and draw) ability$!name(discard a card) notatarget(*|myHand) reject!$ opponent && draw:1 controller auto={C(0/0,0,Loyalty)}:name(+0: Don't exile anything) life:-2 controller
auto={C(0/0,-1,Loyalty)}:name(-1: Opponent loses life) lifeleech:-2 opponent
auto={C(0/0,-2,Loyalty)}:name(-2: Each opponent discard and draw) ability$!name(Discard a card) notatarget(*|myHand) reject!$ opponent && draw:1 controller
text=0: Exile Kaya, Ghost Assassin or up to one target creature. Return that card to the battlefield under its owner's control at the beginning of your next upkeep. You lose 2 life. -- -1: Each opponent loses 2 life and you gain 2 life. -- -2: Each opponent discards a card and you draw a card. text=0: Exile Kaya, Ghost Assassin or up to one target creature. Return that card to the battlefield under its owner's control at the beginning of your next upkeep. You lose 2 life. -- -1: Each opponent loses 2 life and you gain 2 life. -- -2: Each opponent discards a card and you draw a card.
mana={2}{W}{B} mana={2}{W}{B}
type=Legendary Planeswalker type=Legendary Planeswalker
+31 -8
View File
@@ -2340,7 +2340,7 @@ public:
class AADrawer: public ActivatedAbilityTP class AADrawer: public ActivatedAbilityTP
{ {
public: public:
MTGAbility * andAbility;
string nbcardsStr; string nbcardsStr;
bool noReplace; bool noReplace;
AADrawer(GameObserver* observer, int _id, MTGCardInstance * card, Targetable * _target, ManaCost * _cost,string nbcardsStr, int who = AADrawer(GameObserver* observer, int _id, MTGCardInstance * card, Targetable * _target, ManaCost * _cost,string nbcardsStr, int who =
@@ -2348,6 +2348,7 @@ public:
int resolve(); int resolve();
const string getMenuText(); const string getMenuText();
AADrawer * clone() const; AADrawer * clone() const;
~AADrawer();
int getNumCards(); int getNumCards();
}; };
@@ -2369,7 +2370,6 @@ public:
const string getMenuText(); const string getMenuText();
ACastRestriction * clone() const; ACastRestriction * clone() const;
~ACastRestriction(); ~ACastRestriction();
}; };
@@ -2390,6 +2390,7 @@ public:
class AALifer: public ActivatedAbilityTP class AALifer: public ActivatedAbilityTP
{ {
public: public:
MTGAbility * andAbility;
string life_s; string life_s;
bool siphon; bool siphon;
AALifer(GameObserver* observer, int _id, MTGCardInstance * card, Targetable * _target,string life_s, bool siphon = false, ManaCost * _cost = NULL, AALifer(GameObserver* observer, int _id, MTGCardInstance * card, Targetable * _target,string life_s, bool siphon = false, ManaCost * _cost = NULL,
@@ -2397,8 +2398,8 @@ public:
int resolve(); int resolve();
const string getMenuText(); const string getMenuText();
AALifer * clone() const; AALifer * clone() const;
~AALifer();
int getLife(); int getLife();
}; };
/*Player Wins Game*/ /*Player Wins Game*/
@@ -4623,7 +4624,6 @@ public:
const string getMenuText(); const string getMenuText();
AAuraIncreaseReduce * clone() const; AAuraIncreaseReduce * clone() const;
//~AAuraIncreaseReduce(); //~AAuraIncreaseReduce();
}; };
//Modify Hand //Modify Hand
@@ -4669,11 +4669,10 @@ public:
}; };
//lifesetend
class AADamager: public ActivatedAbilityTP class AADamager: public ActivatedAbilityTP
{ {
public: public:
MTGAbility * andAbility;
string d; string d;
bool redirected; bool redirected;
@@ -4683,7 +4682,7 @@ public:
const string getMenuText(); const string getMenuText();
int getDamage(); int getDamage();
AADamager * clone() const; AADamager * clone() const;
~AADamager();
}; };
//prevent next damage //prevent next damage
@@ -4712,6 +4711,7 @@ public:
AAAlterPoison * clone() const; AAAlterPoison * clone() const;
~AAAlterPoison(); ~AAAlterPoison();
}; };
//Energy Counter //Energy Counter
class AAAlterEnergy: public ActivatedAbilityTP class AAAlterEnergy: public ActivatedAbilityTP
{ {
@@ -4725,6 +4725,7 @@ public:
AAAlterEnergy * clone() const; AAAlterEnergy * clone() const;
~AAAlterEnergy(); ~AAAlterEnergy();
}; };
//Experience Counter //Experience Counter
class AAAlterExperience: public ActivatedAbilityTP class AAAlterExperience: public ActivatedAbilityTP
{ {
@@ -4738,6 +4739,7 @@ public:
AAAlterExperience * clone() const; AAAlterExperience * clone() const;
~AAAlterExperience(); ~AAAlterExperience();
}; };
//Boast Event //Boast Event
class AABoastEvent: public ActivatedAbilityTP class AABoastEvent: public ActivatedAbilityTP
{ {
@@ -4751,6 +4753,7 @@ public:
AABoastEvent * clone() const; AABoastEvent * clone() const;
~AABoastEvent(); ~AABoastEvent();
}; };
//Surveil Event //Surveil Event
class AASurveilEvent: public ActivatedAbilityTP class AASurveilEvent: public ActivatedAbilityTP
{ {
@@ -4764,6 +4767,7 @@ public:
AASurveilEvent * clone() const; AASurveilEvent * clone() const;
~AASurveilEvent(); ~AASurveilEvent();
}; };
//Explores Event //Explores Event
class AAExploresEvent: public ActivatedAbilityTP class AAExploresEvent: public ActivatedAbilityTP
{ {
@@ -4777,6 +4781,7 @@ public:
AAExploresEvent * clone() const; AAExploresEvent * clone() const;
~AAExploresEvent(); ~AAExploresEvent();
}; };
//Ring bearer has been chosen //Ring bearer has been chosen
class AARingBearerChosen : public ActivatedAbility class AARingBearerChosen : public ActivatedAbility
{ {
@@ -4789,6 +4794,7 @@ public:
AARingBearerChosen * clone() const; AARingBearerChosen * clone() const;
~AARingBearerChosen(); ~AARingBearerChosen();
}; };
//Dungeon Completed //Dungeon Completed
class AAAlterDungeonCompleted: public ActivatedAbilityTP class AAAlterDungeonCompleted: public ActivatedAbilityTP
{ {
@@ -4802,6 +4808,7 @@ public:
AAAlterDungeonCompleted * clone() const; AAAlterDungeonCompleted * clone() const;
~AAAlterDungeonCompleted(); ~AAAlterDungeonCompleted();
}; };
//Yidaro Counter //Yidaro Counter
class AAAlterYidaroCount: public ActivatedAbilityTP class AAAlterYidaroCount: public ActivatedAbilityTP
{ {
@@ -4815,6 +4822,7 @@ public:
AAAlterYidaroCount * clone() const; AAAlterYidaroCount * clone() const;
~AAAlterYidaroCount(); ~AAAlterYidaroCount();
}; };
//Ring Temptations //Ring Temptations
class AAAlterRingTemptations: public ActivatedAbilityTP class AAAlterRingTemptations: public ActivatedAbilityTP
{ {
@@ -4828,6 +4836,7 @@ public:
AAAlterRingTemptations * clone() const; AAAlterRingTemptations * clone() const;
~AAAlterRingTemptations(); ~AAAlterRingTemptations();
}; };
//Monarch //Monarch
class AAAlterMonarch: public ActivatedAbilityTP class AAAlterMonarch: public ActivatedAbilityTP
{ {
@@ -4840,6 +4849,7 @@ public:
AAAlterMonarch * clone() const; AAAlterMonarch * clone() const;
~AAAlterMonarch(); ~AAAlterMonarch();
}; };
//Initiative //Initiative
class AAAlterInitiative: public ActivatedAbilityTP class AAAlterInitiative: public ActivatedAbilityTP
{ {
@@ -4852,6 +4862,7 @@ public:
AAAlterInitiative * clone() const; AAAlterInitiative * clone() const;
~AAAlterInitiative(); ~AAAlterInitiative();
}; };
//Surveil Offset //Surveil Offset
class AAAlterSurveilOffset: public ActivatedAbilityTP class AAAlterSurveilOffset: public ActivatedAbilityTP
{ {
@@ -4865,6 +4876,7 @@ public:
AAAlterSurveilOffset * clone() const; AAAlterSurveilOffset * clone() const;
~AAAlterSurveilOffset(); ~AAAlterSurveilOffset();
}; };
//Devotion Offset //Devotion Offset
class AAAlterDevotionOffset: public ActivatedAbilityTP class AAAlterDevotionOffset: public ActivatedAbilityTP
{ {
@@ -4878,6 +4890,7 @@ public:
AAAlterDevotionOffset * clone() const; AAAlterDevotionOffset * clone() const;
~AAAlterDevotionOffset(); ~AAAlterDevotionOffset();
}; };
/* Standard Damager, can choose a NEW target each time the price is paid */ /* Standard Damager, can choose a NEW target each time the price is paid */
class TADamager: public TargetAbility class TADamager: public TargetAbility
{ {
@@ -4895,6 +4908,7 @@ public:
return NEW TADamager(*this); return NEW TADamager(*this);
} }
}; };
//bestow //bestow
class ABestow : public ActivatedAbility class ABestow : public ActivatedAbility
{ {
@@ -4910,21 +4924,25 @@ public:
class AATapper: public ActivatedAbility class AATapper: public ActivatedAbility
{ {
public: public:
MTGAbility * andAbility;
bool _sendNoEvent; bool _sendNoEvent;
AATapper(GameObserver* observer, int id, MTGCardInstance * card, MTGCardInstance * _target, ManaCost * _cost = NULL, bool _sendNoEvent = true); AATapper(GameObserver* observer, int id, MTGCardInstance * card, MTGCardInstance * _target, ManaCost * _cost = NULL, bool _sendNoEvent = true);
int resolve(); int resolve();
const string getMenuText(); const string getMenuText();
AATapper * clone() const; AATapper * clone() const;
~AATapper();
}; };
/* Can untap a target for a cost */ /* Can untap a target for a cost */
class AAUntapper: public ActivatedAbility class AAUntapper: public ActivatedAbility
{ {
public: public:
MTGAbility * andAbility;
AAUntapper(GameObserver* observer, int id, MTGCardInstance * card, MTGCardInstance * _target, ManaCost * _cost = NULL); AAUntapper(GameObserver* observer, int id, MTGCardInstance * card, MTGCardInstance * _target, ManaCost * _cost = NULL);
int resolve(); int resolve();
const string getMenuText(); const string getMenuText();
AAUntapper * clone() const; AAUntapper * clone() const;
~AAUntapper();
}; };
/*announce card X*/ /*announce card X*/
@@ -4977,11 +4995,13 @@ public:
class AAFrozen: public ActivatedAbility class AAFrozen: public ActivatedAbility
{ {
public: public:
MTGAbility * andAbility;
bool freeze; bool freeze;
AAFrozen(GameObserver* observer, int id, MTGCardInstance * card, MTGCardInstance * _target, bool tap, ManaCost * _cost = NULL); AAFrozen(GameObserver* observer, int id, MTGCardInstance * card, MTGCardInstance * _target, bool tap, ManaCost * _cost = NULL);
int resolve(); int resolve();
const string getMenuText(); const string getMenuText();
AAFrozen * clone() const; AAFrozen * clone() const;
~AAFrozen();
}; };
/* ghetto new target*/ /* ghetto new target*/
class AANewTarget: public ActivatedAbility class AANewTarget: public ActivatedAbility
@@ -6850,6 +6870,7 @@ public:
class AADepleter: public ActivatedAbilityTP class AADepleter: public ActivatedAbilityTP
{ {
public: public:
MTGAbility * andAbility;
string nbcardsStr; string nbcardsStr;
bool toexile; bool toexile;
bool colorrepeat; bool colorrepeat;
@@ -6859,6 +6880,7 @@ public:
int resolve(); int resolve();
const string getMenuText(); const string getMenuText();
AADepleter * clone() const; AADepleter * clone() const;
~AADepleter();
}; };
@@ -6895,11 +6917,13 @@ public:
class AAShuffle: public ActivatedAbilityTP class AAShuffle: public ActivatedAbilityTP
{ {
public: public:
MTGAbility * andAbility;
AAShuffle(GameObserver* observer, int _id, MTGCardInstance * card, Targetable * _target, ManaCost * _cost = NULL, int who = AAShuffle(GameObserver* observer, int _id, MTGCardInstance * card, Targetable * _target, ManaCost * _cost = NULL, int who =
TargetChooser::UNSET); TargetChooser::UNSET);
int resolve(); int resolve();
const string getMenuText(); const string getMenuText();
AAShuffle * clone() const; AAShuffle * clone() const;
~AAShuffle();
}; };
//Mulligan //Mulligan
@@ -6925,7 +6949,6 @@ public:
const string getMenuText(); const string getMenuText();
AARemoveMana * clone() const; AARemoveMana * clone() const;
~AARemoveMana(); ~AARemoveMana();
}; };
//Random Discard //Random Discard
+391 -221
View File
@@ -1677,219 +1677,256 @@ AADamager::AADamager(GameObserver* observer, int _id, MTGCardInstance * _source,
{ {
aType = MTGAbility::DAMAGER; aType = MTGAbility::DAMAGER;
redirected = false; redirected = false;
} andAbility = NULL;
}
int AADamager::resolve() int AADamager::resolve()
{ {
Damageable * _target = (Damageable *) getTarget(); Damageable * _target = (Damageable *) getTarget();
if (_target) if (_target)
{
WParsedInt damage(d, NULL, (MTGCardInstance *)source);
if(_target == game->opponent() && game->opponent()->inPlay()->hasType("planeswalker") && !redirected)
{
vector<MTGAbility*>selection;
MTGCardInstance * check = NULL;
this->redirected = true;
MTGAbility * setPlayer = this->clone();
this->redirected = false;
selection.push_back(setPlayer);
int checkWalkers = ((Player*)_target)->game->battlefield->cards.size();
for(int i = 0; i < checkWalkers;++i)
{
check = ((Player*)_target)->game->battlefield->cards[i];
if(check->hasType(Subtypes::TYPE_PLANESWALKER))
{
this->redirected = true;
MTGAbility * setWalker = this->clone();
this->redirected = false;
setWalker->oneShot = true;
setWalker->target = check;
selection.push_back(setWalker);
}
}
if(selection.size())
{
MTGAbility * a1 = NEW MenuAbility(game, this->GetId(), source, source,true,selection);
game->mLayers->actionLayer()->currentActionCard = source;
a1->resolve();
}
return 1;
}
game->mLayers->stackLayer()->addDamage(source, _target, damage.getValue());
game->mLayers->stackLayer()->resolve();
return 1;
}
return 0;
}
int AADamager::getDamage()
{ {
WParsedInt damage(d, NULL, (MTGCardInstance *)source); WParsedInt damage(d, NULL, (MTGCardInstance *)source);
return damage.getValue(); if(_target == game->opponent() && game->opponent()->inPlay()->hasType("planeswalker") && !redirected)
}
const string AADamager::getMenuText()
{
MTGCardInstance * _target = dynamic_cast<MTGCardInstance*>(target);
if(_target && (_target->hasType(Subtypes::TYPE_PLANESWALKER) || _target->hasType(Subtypes::TYPE_BATTLE)))
return _target->name.c_str();
if(redirected)
{ {
if(d.size()) vector<MTGAbility*>selection;
MTGCardInstance * check = NULL;
this->redirected = true;
MTGAbility * setPlayer = this->clone();
this->redirected = false;
selection.push_back(setPlayer);
int checkWalkers = ((Player*)_target)->game->battlefield->cards.size();
for(int i = 0; i < checkWalkers;++i)
{ {
WParsedInt parsedNum(d, NULL, source); check = ((Player*)_target)->game->battlefield->cards[i];
return _("Deal " + parsedNum.getStringValue() + " Damage to Player").c_str(); if(check->hasType(Subtypes::TYPE_PLANESWALKER))
{
this->redirected = true;
MTGAbility * setWalker = this->clone();
this->redirected = false;
setWalker->oneShot = true;
setWalker->target = check;
selection.push_back(setWalker);
}
} }
return "Damage Player"; if(selection.size())
{
MTGAbility * a1 = NEW MenuAbility(game, this->GetId(), source, source,true,selection);
game->mLayers->actionLayer()->currentActionCard = source;
a1->resolve();
}
return 1;
} }
game->mLayers->stackLayer()->addDamage(source, _target, damage.getValue());
game->mLayers->stackLayer()->resolve();
if(andAbility)
{
MTGAbility * andAbilityClone = andAbility->clone();
andAbilityClone->target = source;
if(andAbility->oneShot)
{
andAbilityClone->resolve();
SAFE_DELETE(andAbilityClone);
}
else
{
andAbilityClone->addToGame();
}
}
return 1;
}
return 0;
}
int AADamager::getDamage()
{
WParsedInt damage(d, NULL, (MTGCardInstance *)source);
return damage.getValue();
}
const string AADamager::getMenuText()
{
MTGCardInstance * _target = dynamic_cast<MTGCardInstance*>(target);
if(_target && (_target->hasType(Subtypes::TYPE_PLANESWALKER) || _target->hasType(Subtypes::TYPE_BATTLE)))
return _target->name.c_str();
if(redirected)
{
if(d.size()) if(d.size())
{ {
WParsedInt parsedNum(d, NULL, source); WParsedInt parsedNum(d, NULL, source);
return _("Deal " + parsedNum.getStringValue() + " Damage").c_str(); return _("Deal " + parsedNum.getStringValue() + " Damage to Player").c_str();
} }
return "Damage"; return "Damage Player";
} }
if(d.size())
{
WParsedInt parsedNum(d, NULL, source);
return _("Deal " + parsedNum.getStringValue() + " Damage").c_str();
}
return "Damage";
}
AADamager * AADamager::clone() const AADamager * AADamager::clone() const
{ {
return NEW AADamager(*this); AADamager * a = NEW AADamager(*this);
if(andAbility)
a->andAbility = andAbility->clone();
return a;
} }
AADamager::~AADamager()
{
SAFE_DELETE(andAbility);
}
//AADepleter //AADepleter
AADepleter::AADepleter(GameObserver* observer, int _id, MTGCardInstance * card, Targetable * _target,string nbcardsStr, ManaCost * _cost, int who, bool toexile, bool colorrepeat, bool namerepeat) : AADepleter::AADepleter(GameObserver* observer, int _id, MTGCardInstance * card, Targetable * _target,string nbcardsStr, ManaCost * _cost, int who, bool toexile, bool colorrepeat, bool namerepeat) :
ActivatedAbilityTP(observer, _id, card, _target, _cost, who),nbcardsStr(nbcardsStr),toexile(toexile), colorrepeat(colorrepeat), namerepeat(namerepeat) ActivatedAbilityTP(observer, _id, card, _target, _cost, who),nbcardsStr(nbcardsStr),toexile(toexile), colorrepeat(colorrepeat), namerepeat(namerepeat)
{ {
andAbility = NULL;
} }
int AADepleter::resolve()
int AADepleter::resolve()
{
Player * player = getPlayerFromTarget(getTarget());
if (player)
{ {
Player * player = getPlayerFromTarget(getTarget()); WParsedInt numCards(nbcardsStr, NULL, source);
if (player) MTGLibrary * library = player->game->library;
if (colorrepeat && library->nb_cards)
{ {
WParsedInt numCards(nbcardsStr, NULL, source); bool repeating = false;
MTGLibrary * library = player->game->library; do
if (colorrepeat && library->nb_cards)
{
bool repeating = false;
do
{
repeating = false;
vector<MTGCardInstance*>found;
for (int i = 0; i < numCards.getValue(); i++)
{
if (library->nb_cards)
{
if(library->nb_cards > i)
found.push_back(library->cards[(library->nb_cards - 1) - i]);
}
}
for (vector<MTGCardInstance*>::iterator it = found.begin(); it != found.end(); it++)
{
MTGCardInstance * cardFirst = *it;
if (cardFirst->isLand())
continue;
for (int i = Constants::MTG_COLOR_GREEN; i <= Constants::MTG_COLOR_WHITE; ++i)
{
if (cardFirst->hasColor(i))
{
for (vector<MTGCardInstance*>::iterator secondit = found.begin(); secondit != found.end(); secondit++)
{
MTGCardInstance * cardSecond = *secondit;
if (cardSecond->isLand())
continue;
if (cardSecond->hasColor(i) && cardFirst != cardSecond)
{
repeating = true;
}
}
}
}
}
do
{
if (found.size())
{
MTGCardInstance * toMove = found.back();
if (toMove)
{
if (toexile)
player->game->putInZone(toMove, library, player->game->exile);
else
player->game->putInZone(toMove, library, player->game->graveyard);
found.pop_back();
}
}
} while (found.size());
} while (repeating);
}
else if (namerepeat && library->nb_cards)
{
bool repeating = false;
do
{
repeating = false;
vector<MTGCardInstance*>found;
for (int i = 0; i < numCards.getValue(); i++)
{
if (library->nb_cards)
{
if (library->nb_cards > i)
found.push_back(library->cards[(library->nb_cards - 1) - i]);
}
}
for (vector<MTGCardInstance*>::iterator it = found.begin(); it != found.end(); it++)
{
MTGCardInstance * cardFirst = *it;
for (vector<MTGCardInstance*>::iterator secondit = found.begin(); secondit != found.end(); secondit++)
{
MTGCardInstance * cardSecond = *secondit;
if (cardSecond->name == cardFirst->name && cardFirst != cardSecond)
{
repeating = true;
}
}
}
do
{
if (found.size())
{
MTGCardInstance * toMove = found.back();
if (toMove)
{
if (toexile)
player->game->putInZone(toMove, library, player->game->exile);
else
player->game->putInZone(toMove, library, player->game->graveyard);
found.pop_back();
}
}
} while (found.size());
} while (repeating);
}
else
{ {
repeating = false;
vector<MTGCardInstance*>found;
for (int i = 0; i < numCards.getValue(); i++) for (int i = 0; i < numCards.getValue(); i++)
{ {
if (library->nb_cards) if (library->nb_cards)
{ {
if (toexile) if(library->nb_cards > i)
player->game->putInZone(library->cards[library->nb_cards - 1], library, player->game->exile); found.push_back(library->cards[(library->nb_cards - 1) - i]);
else
player->game->putInZone(library->cards[library->nb_cards - 1], library, player->game->graveyard);
} }
} }
}
for (vector<MTGCardInstance*>::iterator it = found.begin(); it != found.end(); it++)
{
MTGCardInstance * cardFirst = *it;
if (cardFirst->isLand())
continue;
for (int i = Constants::MTG_COLOR_GREEN; i <= Constants::MTG_COLOR_WHITE; ++i)
{
if (cardFirst->hasColor(i))
{
for (vector<MTGCardInstance*>::iterator secondit = found.begin(); secondit != found.end(); secondit++)
{
MTGCardInstance * cardSecond = *secondit;
if (cardSecond->isLand())
continue;
if (cardSecond->hasColor(i) && cardFirst != cardSecond)
{
repeating = true;
}
}
}
}
}
do
{
if (found.size())
{
MTGCardInstance * toMove = found.back();
if (toMove)
{
if (toexile)
player->game->putInZone(toMove, library, player->game->exile);
else
player->game->putInZone(toMove, library, player->game->graveyard);
found.pop_back();
}
}
} while (found.size());
} while (repeating);
}
else if (namerepeat && library->nb_cards)
{
bool repeating = false;
do
{
repeating = false;
vector<MTGCardInstance*>found;
for (int i = 0; i < numCards.getValue(); i++)
{
if (library->nb_cards)
{
if (library->nb_cards > i)
found.push_back(library->cards[(library->nb_cards - 1) - i]);
}
}
for (vector<MTGCardInstance*>::iterator it = found.begin(); it != found.end(); it++)
{
MTGCardInstance * cardFirst = *it;
for (vector<MTGCardInstance*>::iterator secondit = found.begin(); secondit != found.end(); secondit++)
{
MTGCardInstance * cardSecond = *secondit;
if (cardSecond->name == cardFirst->name && cardFirst != cardSecond)
{
repeating = true;
}
}
}
do
{
if (found.size())
{
MTGCardInstance * toMove = found.back();
if (toMove)
{
if (toexile)
player->game->putInZone(toMove, library, player->game->exile);
else
player->game->putInZone(toMove, library, player->game->graveyard);
found.pop_back();
}
}
} while (found.size());
} while (repeating);
}
else
{
for (int i = 0; i < numCards.getValue(); i++)
{
if (library->nb_cards)
{
if (toexile)
player->game->putInZone(library->cards[library->nb_cards - 1], library, player->game->exile);
else
player->game->putInZone(library->cards[library->nb_cards - 1], library, player->game->graveyard);
}
}
}
if(andAbility)
{
MTGAbility * andAbilityClone = andAbility->clone();
andAbilityClone->target = source;
if(andAbility->oneShot)
{
andAbilityClone->resolve();
SAFE_DELETE(andAbilityClone);
}
else
{
andAbilityClone->addToGame();
}
} }
return 1;
} }
return 1;
}
const string AADepleter::getMenuText() const string AADepleter::getMenuText()
{ {
@@ -1913,7 +1950,15 @@ const string AADepleter::getMenuText()
AADepleter * AADepleter::clone() const AADepleter * AADepleter::clone() const
{ {
return NEW AADepleter(*this); AADepleter * a = NEW AADepleter(*this);
if(andAbility)
a->andAbility = andAbility->clone();
return a;
}
AADepleter::~AADepleter()
{
SAFE_DELETE(andAbility);
} }
//AACascade //AACascade
@@ -4455,8 +4500,8 @@ AASacrificeCard::~AASacrificeCard()
{ {
SAFE_DELETE(andAbility); SAFE_DELETE(andAbility);
} }
// Discard
// Discard
AADiscardCard::AADiscardCard(GameObserver* observer, int _id, MTGCardInstance * _source, MTGCardInstance * _target) : AADiscardCard::AADiscardCard(GameObserver* observer, int _id, MTGCardInstance * _source, MTGCardInstance * _target) :
ActivatedAbility(observer, _id, _source) ActivatedAbility(observer, _id, _source)
{ {
@@ -4510,57 +4555,72 @@ AADiscardCard * AADiscardCard::clone() const
a->andAbility = andAbility->clone(); a->andAbility = andAbility->clone();
return a; return a;
} }
AADiscardCard::~AADiscardCard() AADiscardCard::~AADiscardCard()
{ {
SAFE_DELETE(andAbility); SAFE_DELETE(andAbility);
} }
//Draw
//
AADrawer::AADrawer(GameObserver* observer, int _id, MTGCardInstance * card, Targetable * _target, ManaCost * _cost, string nbcardsStr, AADrawer::AADrawer(GameObserver* observer, int _id, MTGCardInstance * card, Targetable * _target, ManaCost * _cost, string nbcardsStr,
int who, bool noreplace) : int who, bool noreplace) :
ActivatedAbilityTP(observer, _id, card, _target, _cost, who), nbcardsStr(nbcardsStr),noReplace(noreplace) ActivatedAbilityTP(observer, _id, card, _target, _cost, who), nbcardsStr(nbcardsStr),noReplace(noreplace)
{ {
aType = MTGAbility::STANDARD_DRAW; aType = MTGAbility::STANDARD_DRAW;
andAbility = NULL;
} }
int AADrawer::resolve() int AADrawer::resolve()
{ {
Player * player = getPlayerFromTarget(getTarget()); Player * player = getPlayerFromTarget(getTarget());
if (player) if (player)
{
WParsedInt numCards(nbcardsStr, NULL, source);
WEvent * e = NEW WEventDraw(player, numCards.getValue(),this);
if(!noReplace)
e = game->replacementEffects->replace(e);
if(e)
{
game->mLayers->stackLayer()->addDraw(player, numCards.getValue());
game->mLayers->stackLayer()->resolve();
for(int i = numCards.getValue(); i > 0;i--)
{
player->drawCounter += 1;
if ((game->turn < 1) && game->getCurrentGamePhase() == MTG_PHASE_FIRSTMAIN
&& game->currentPlayer->game->inPlay->nb_cards == 0 && game->currentPlayer->game->graveyard->nb_cards == 0
&& game->currentPlayer->game->exile->nb_cards == 0 && game->currentlyActing() == (Player*)game->currentPlayer) //1st Play Check
{
game->currentPlayer->drawCounter = 0;//Reset drawCounter for pre-game draw
}
WEvent * e = NEW WEventcardDraw(player, 1);
game->receiveEvent(e);
}
}
SAFE_DELETE(e);
}
return 1;
}
int AADrawer::getNumCards()
{ {
WParsedInt numCards(nbcardsStr, NULL, source); WParsedInt numCards(nbcardsStr, NULL, source);
return numCards.getValue(); WEvent * e = NEW WEventDraw(player, numCards.getValue(),this);
if(!noReplace)
e = game->replacementEffects->replace(e);
if(e)
{
game->mLayers->stackLayer()->addDraw(player, numCards.getValue());
game->mLayers->stackLayer()->resolve();
for(int i = numCards.getValue(); i > 0;i--)
{
player->drawCounter += 1;
if ((game->turn < 1) && game->getCurrentGamePhase() == MTG_PHASE_FIRSTMAIN
&& game->currentPlayer->game->inPlay->nb_cards == 0 && game->currentPlayer->game->graveyard->nb_cards == 0
&& game->currentPlayer->game->exile->nb_cards == 0 && game->currentlyActing() == (Player*)game->currentPlayer) //1st Play Check
{
game->currentPlayer->drawCounter = 0;//Reset drawCounter for pre-game draw
}
WEvent * e = NEW WEventcardDraw(player, 1);
game->receiveEvent(e);
}
}
SAFE_DELETE(e);
if(andAbility)
{
MTGAbility * andAbilityClone = andAbility->clone();
andAbilityClone->target = source;
if(andAbility->oneShot)
{
andAbilityClone->resolve();
SAFE_DELETE(andAbilityClone);
}
else
{
andAbilityClone->addToGame();
}
}
} }
return 1;
}
int AADrawer::getNumCards()
{
WParsedInt numCards(nbcardsStr, NULL, source);
return numCards.getValue();
}
const string AADrawer::getMenuText() const string AADrawer::getMenuText()
{ {
@@ -4574,7 +4634,15 @@ const string AADrawer::getMenuText()
AADrawer * AADrawer::clone() const AADrawer * AADrawer::clone() const
{ {
return NEW AADrawer(*this); AADrawer * a = NEW AADrawer(*this);
if(andAbility)
a->andAbility = andAbility->clone();
return a;
}
AADrawer::~AADrawer()
{
SAFE_DELETE(andAbility);
} }
// AAFrozen: Prevent a card from untapping during next untap phase // AAFrozen: Prevent a card from untapping during next untap phase
@@ -4583,6 +4651,7 @@ ActivatedAbility(observer, id, card, _cost, 0)
{ {
target = _target; target = _target;
freeze = tap; freeze = tap;
andAbility = NULL;
} }
int AAFrozen::resolve() int AAFrozen::resolve()
@@ -4598,6 +4667,20 @@ int AAFrozen::resolve()
_target->tap();//easier to manage for cards that allow you to tap and also freeze. _target->tap();//easier to manage for cards that allow you to tap and also freeze.
} }
_target->frozen += 1; _target->frozen += 1;
if(andAbility)
{
MTGAbility * andAbilityClone = andAbility->clone();
andAbilityClone->target = _target;
if(andAbility->oneShot)
{
andAbilityClone->resolve();
SAFE_DELETE(andAbilityClone);
}
else
{
andAbilityClone->addToGame();
}
}
} }
return 1; return 1;
} }
@@ -4609,7 +4692,15 @@ const string AAFrozen::getMenuText()
AAFrozen * AAFrozen::clone() const AAFrozen * AAFrozen::clone() const
{ {
return NEW AAFrozen(*this); AAFrozen * a = NEW AAFrozen(*this);
if(andAbility)
a->andAbility = andAbility->clone();
return a;
}
AAFrozen::~AAFrozen()
{
SAFE_DELETE(andAbility);
} }
// chose a new target for an aura or enchantment and equip it note: VERY basic right now. // chose a new target for an aura or enchantment and equip it note: VERY basic right now.
@@ -5734,6 +5825,7 @@ AALifer::AALifer(GameObserver* observer, int _id, MTGCardInstance * card, Target
ActivatedAbilityTP(observer, _id, card, _target, _cost, who),life_s(life_s),siphon(siphon) ActivatedAbilityTP(observer, _id, card, _target, _cost, who),life_s(life_s),siphon(siphon)
{ {
aType = MTGAbility::LIFER; aType = MTGAbility::LIFER;
andAbility = NULL;
} }
int AALifer::resolve() int AALifer::resolve()
@@ -5752,6 +5844,21 @@ int AALifer::resolve()
if(siphon && (slife > 0) && (life.getValue() < 0)) if(siphon && (slife > 0) && (life.getValue() < 0))
source->controller()->gainOrLoseLife(slife, source); source->controller()->gainOrLoseLife(slife, source);
if(andAbility)
{
MTGAbility * andAbilityClone = andAbility->clone();
andAbilityClone->target = source;
if(andAbility->oneShot)
{
andAbilityClone->resolve();
SAFE_DELETE(andAbilityClone);
}
else
{
andAbilityClone->addToGame();
}
}
return 1; return 1;
} }
@@ -5770,7 +5877,15 @@ const string AALifer::getMenuText()
AALifer * AALifer::clone() const AALifer * AALifer::clone() const
{ {
return NEW AALifer(*this); AALifer * a = NEW AALifer(*this);
if(andAbility)
a->andAbility = andAbility->clone();
return a;
}
AALifer::~AALifer()
{
SAFE_DELETE(andAbility);
} }
//Extra for Bestow ... partial fix since there's no update when react to click for bestow cards... //Extra for Bestow ... partial fix since there's no update when react to click for bestow cards...
@@ -6648,6 +6763,7 @@ AARandomDiscarder * AARandomDiscarder::clone() const
AAShuffle::AAShuffle(GameObserver* observer, int _id, MTGCardInstance * card, Targetable * _target, ManaCost * _cost, int who) : AAShuffle::AAShuffle(GameObserver* observer, int _id, MTGCardInstance * card, Targetable * _target, ManaCost * _cost, int who) :
ActivatedAbilityTP(observer, _id, card, _target, _cost, who) ActivatedAbilityTP(observer, _id, card, _target, _cost, who)
{ {
andAbility = NULL;
} }
int AAShuffle::resolve() int AAShuffle::resolve()
@@ -6668,7 +6784,15 @@ const string AAShuffle::getMenuText()
AAShuffle * AAShuffle::clone() const AAShuffle * AAShuffle::clone() const
{ {
return NEW AAShuffle(*this); AAShuffle * a = NEW AAShuffle(*this);
if(andAbility)
a->andAbility = andAbility->clone();
return a;
}
AAShuffle::~AAShuffle()
{
SAFE_DELETE(andAbility);
} }
// Mulligan // Mulligan
@@ -6861,6 +6985,7 @@ AATapper::AATapper(GameObserver* observer, int id, MTGCardInstance * card, MTGCa
{ {
target = _target; target = _target;
aType = MTGAbility::TAPPER; aType = MTGAbility::TAPPER;
andAbility = NULL;
} }
int AATapper::resolve() int AATapper::resolve()
@@ -6872,6 +6997,20 @@ int AATapper::resolve()
while (_target->next) while (_target->next)
_target = _target->next; //This is for cards such as rampant growth _target = _target->next; //This is for cards such as rampant growth
_target->tap(_sendNoEvent); _target->tap(_sendNoEvent);
if(andAbility)
{
MTGAbility * andAbilityClone = andAbility->clone();
andAbilityClone->target = _target;
if(andAbility->oneShot)
{
andAbilityClone->resolve();
SAFE_DELETE(andAbilityClone);
}
else
{
andAbilityClone->addToGame();
}
}
} }
return 1; return 1;
} }
@@ -6883,7 +7022,15 @@ const string AATapper::getMenuText()
AATapper * AATapper::clone() const AATapper * AATapper::clone() const
{ {
return NEW AATapper(*this); AATapper * a = NEW AATapper(*this);
if(andAbility)
a->andAbility = andAbility->clone();
return a;
}
AATapper::~AATapper()
{
SAFE_DELETE(andAbility);
} }
//AA Untapper //AA Untapper
@@ -6892,6 +7039,7 @@ AAUntapper::AAUntapper(GameObserver* observer, int id, MTGCardInstance * card, M
{ {
target = _target; target = _target;
aType = MTGAbility::UNTAPPER; aType = MTGAbility::UNTAPPER;
andAbility = NULL;
} }
int AAUntapper::resolve() int AAUntapper::resolve()
@@ -6903,6 +7051,20 @@ int AAUntapper::resolve()
while (_target->next) while (_target->next)
_target = _target->next; //This is for cards such as rampant growth _target = _target->next; //This is for cards such as rampant growth
_target->untap(); _target->untap();
if(andAbility)
{
MTGAbility * andAbilityClone = andAbility->clone();
andAbilityClone->target = _target;
if(andAbility->oneShot)
{
andAbilityClone->resolve();
SAFE_DELETE(andAbilityClone);
}
else
{
andAbilityClone->addToGame();
}
}
} }
return 1; return 1;
} }
@@ -6914,7 +7076,15 @@ const string AAUntapper::getMenuText()
AAUntapper * AAUntapper::clone() const AAUntapper * AAUntapper::clone() const
{ {
return NEW AAUntapper(*this); AAUntapper * a = NEW AAUntapper(*this);
if(andAbility)
a->andAbility = andAbility->clone();
return a;
}
AAUntapper::~AAUntapper()
{
SAFE_DELETE(andAbility);
} }
AAWhatsMax::AAWhatsMax(GameObserver* observer, int id, MTGCardInstance * card, MTGCardInstance *, ManaCost * _cost, int value) : AAWhatsMax::AAWhatsMax(GameObserver* observer, int id, MTGCardInstance * card, MTGCardInstance *, ManaCost * _cost, int value) :
+66
View File
@@ -4300,6 +4300,12 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
Targetable * t = spell ? spell->getNextTarget() : NULL; Targetable * t = spell ? spell->getNextTarget() : NULL;
MTGAbility * a = NEW AADamager(observer, id, card, t, splitDamage[1], NULL, who); MTGAbility * a = NEW AADamager(observer, id, card, t, splitDamage[1], NULL, who);
a->oneShot = 1; a->oneShot = 1;
if(storedAndAbility.size())
{
string stored = storedAndAbility;
storedAndAbility.clear();
((AADamager*)a)->andAbility = parseMagicLine(stored, id, spell, card);
}
return a; return a;
} }
@@ -4619,6 +4625,12 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
Targetable * t = spell ? spell->getNextTarget() : NULL; Targetable * t = spell ? spell->getNextTarget() : NULL;
MTGAbility * a = NEW AALifer(observer, id, card, t, splitLife[1], false, NULL, who); MTGAbility * a = NEW AALifer(observer, id, card, t, splitLife[1], false, NULL, who);
a->oneShot = 1; a->oneShot = 1;
if(storedAndAbility.size())
{
string stored = storedAndAbility;
storedAndAbility.clear();
((AALifer*)a)->andAbility = parseMagicLine(stored, id, spell, card);
}
return a; return a;
} }
@@ -4629,6 +4641,12 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
Targetable * t = spell ? spell->getNextTarget() : NULL; Targetable * t = spell ? spell->getNextTarget() : NULL;
MTGAbility * a = NEW AALifer(observer, id, card, t, splitSiphonLife[1], true, NULL, who); MTGAbility * a = NEW AALifer(observer, id, card, t, splitSiphonLife[1], true, NULL, who);
a->oneShot = 1; a->oneShot = 1;
if(storedAndAbility.size())
{
string stored = storedAndAbility;
storedAndAbility.clear();
((AALifer*)a)->andAbility = parseMagicLine(stored, id, spell, card);
}
return a; return a;
} }
@@ -4649,6 +4667,12 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
Targetable * t = spell ? spell->getNextTarget() : NULL; Targetable * t = spell ? spell->getNextTarget() : NULL;
MTGAbility * a = NEW AADrawer(observer, id, card, t, NULL,splitDraw[1], who,s.find("noreplace") != string::npos); MTGAbility * a = NEW AADrawer(observer, id, card, t, NULL,splitDraw[1], who,s.find("noreplace") != string::npos);
a->oneShot = 1; a->oneShot = 1;
if(storedAndAbility.size())
{
string stored = storedAndAbility;
storedAndAbility.clear();
((AADrawer*)a)->andAbility = parseMagicLine(stored, id, spell, card);
}
return a; return a;
} }
@@ -4665,6 +4689,12 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
Targetable * t = spell ? spell->getNextTarget() : NULL; Targetable * t = spell ? spell->getNextTarget() : NULL;
MTGAbility * a = NEW AADepleter(observer, id, card, t , splitDeplete[1], NULL, who, false, colorrepeat, namerepeat); MTGAbility * a = NEW AADepleter(observer, id, card, t , splitDeplete[1], NULL, who, false, colorrepeat, namerepeat);
a->oneShot = 1; a->oneShot = 1;
if(storedAndAbility.size())
{
string stored = storedAndAbility;
storedAndAbility.clear();
((AADepleter*)a)->andAbility = parseMagicLine(stored, id, spell, card);
}
return a; return a;
} }
@@ -4681,6 +4711,12 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
Targetable * t = spell ? spell->getNextTarget() : NULL; Targetable * t = spell ? spell->getNextTarget() : NULL;
MTGAbility * a = NEW AADepleter(observer, id, card, t , splitIngest[1], NULL, who, true, colorrepeat, namerepeat); MTGAbility * a = NEW AADepleter(observer, id, card, t , splitIngest[1], NULL, who, true, colorrepeat, namerepeat);
a->oneShot = 1; a->oneShot = 1;
if(storedAndAbility.size())
{
string stored = storedAndAbility;
storedAndAbility.clear();
((AADepleter*)a)->andAbility = parseMagicLine(stored, id, spell, card);
}
return a; return a;
} }
@@ -4710,6 +4746,12 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
Targetable * t = spell? spell->getNextTarget() : NULL; Targetable * t = spell? spell->getNextTarget() : NULL;
MTGAbility * a = NEW AAShuffle(observer, id, card, t, NULL, who); MTGAbility * a = NEW AAShuffle(observer, id, card, t, NULL, who);
a->oneShot = 1; a->oneShot = 1;
if(storedAndAbility.size())
{
string stored = storedAndAbility;
storedAndAbility.clear();
((AAShuffle*)a)->andAbility = parseMagicLine(stored, id, spell, card);
}
return a; return a;
} }
@@ -5548,6 +5590,12 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
{ {
MTGAbility * a = NEW AAFrozen(observer, id, card, target,false); MTGAbility * a = NEW AAFrozen(observer, id, card, target,false);
a->oneShot = 1; a->oneShot = 1;
if(storedAndAbility.size())
{
string stored = storedAndAbility;
storedAndAbility.clear();
((AAFrozen*)a)->andAbility = parseMagicLine(stored, id, spell, card);
}
return a; return a;
} }
@@ -5557,6 +5605,12 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
{ {
MTGAbility * a = NEW AAFrozen(observer, id, card, target,true); MTGAbility * a = NEW AAFrozen(observer, id, card, target,true);
a->oneShot = 1; a->oneShot = 1;
if(storedAndAbility.size())
{
string stored = storedAndAbility;
storedAndAbility.clear();
((AAFrozen*)a)->andAbility = parseMagicLine(stored, id, spell, card);
}
return a; return a;
} }
@@ -5699,6 +5753,12 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
{ {
MTGAbility * a = NEW AAUntapper(observer, id, card, target); MTGAbility * a = NEW AAUntapper(observer, id, card, target);
a->oneShot = 1; a->oneShot = 1;
if(storedAndAbility.size())
{
string stored = storedAndAbility;
storedAndAbility.clear();
((AAUntapper*)a)->andAbility = parseMagicLine(stored, id, spell, card);
}
return a; return a;
} }
@@ -5708,6 +5768,12 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
{ {
MTGAbility * a = NEW AATapper(observer, id, card, target, NULL, bool(s.find("tap(noevent)") != string::npos)); MTGAbility * a = NEW AATapper(observer, id, card, target, NULL, bool(s.find("tap(noevent)") != string::npos));
a->oneShot = 1; a->oneShot = 1;
if(storedAndAbility.size())
{
string stored = storedAndAbility;
storedAndAbility.clear();
((AATapper*)a)->andAbility = parseMagicLine(stored, id, spell, card);
}
return a; return a;
} }