diff --git a/projects/mtg/bin/Res/sets/primitives/borderline.txt b/projects/mtg/bin/Res/sets/primitives/borderline.txt index 391b9f743..c55c9346d 100644 --- a/projects/mtg/bin/Res/sets/primitives/borderline.txt +++ b/projects/mtg/bin/Res/sets/primitives/borderline.txt @@ -1,7 +1,7 @@ grade=borderline #Bordeline Primitives Pack for Wagic the Homebrew. #Please keep these card alphabetized, and try to have the "name=" line at the top of each card -#I sorted this programmatically - Thanks to Vitty85 23-06-2023 +#I sorted this programmatically - Thanks to Vitty85 24-06-2023 [card] name=+2 Mace auto={3}:equip @@ -13840,14 +13840,14 @@ type=Instant [card] name=Cathedral Membrane abilities=defender -other={1}{L:2} name(Pay 2 Life) auto=@movedTo(this|graveyard) from(mybattlefield) restriction{combatbeginsonly}:damage:6 target(creature[blocking]|opponentbattlefield) auto=@movedTo(this|graveyard) from(mybattlefield) restriction{attackersonly}:damage:6 target(creature[blocking]|opponentbattlefield) auto=@movedTo(this|graveyard) from(mybattlefield) restriction{blockersonly}:damage:6 target(creature[blocking]|opponentbattlefield) auto=@movedTo(this|graveyard) from(mybattlefield) restriction{combatdamageonly}:damage:6 target(creature[blocking]|opponentbattlefield) auto=@movedTo(this|graveyard) from(mybattlefield) restriction{combatendsonly}:damage:6 target(creature[blocking]|opponentbattlefield) text=({PW} can be paid with either {W} or 2 life.) -- Defender -- When Cathedral Membrane dies during combat, it deals 6 damage to each creature it blocked this combat. -mana={1}{W} +color=white +mana={1}{p(W)} type=Artifact Creature subtype=Phyrexian Wall power=0 @@ -28665,8 +28665,7 @@ restriction=compare(isflipped)~equalto~0 anyzone={0}:doubleside(backside) auto=ability$!name(Exile top cards) all(*[zpos<=findfirsttypenonland]|mylibrary) moveto(myexile) and!( if cantargetcard(*[-land]|*) then transforms((,newability[choice name(Cast spell) activate castcard(normal)],newability[choice name(Don't cast spell) donothing])) oneshot )!!$ opponent auto=name(Exile top cards) all(*[zpos<=findfirsttypenonland]|mylibrary) moveto(myexile) and!( if cantargetcard(*[-land]|*) then transforms((,newability[choice name(Cast spell) activate castcard(normal)],newability[choice name(Don't cast spell) donothing])) oneshot )! -auto={9}{G}:name(Pay G and transform Etali) flip(backside) asSorcery -auto={9}{L:2}:name(Pay life and transform Etali) flip(backside) asSorcery +auto={9}{p(G)}:name(Transform Etali) flip(backside) asSorcery text=Trample -- When Etali, Primal Conqueror enters the battlefield, each player exiles cards from the top of their library until they exile a nonland card. You may cast any number of spells from among the nonland cards exiled this way without paying their mana costs. -- {9}{G/P}: Transform Etali. Activate only as a sorcery. mana={5}{R}{R} type=Legendary Creature @@ -42645,8 +42644,7 @@ toughness=1 [/card] [card] name=Hex Parasite -auto={X}{B}:name(Pay B) name(Pay B) thisforeach(X>0) target(*[counter{any}]|battlefield) removesinglecountertype(1) && all(this) 1/0 ueot -auto={X}{L:2}:name(Pay 2 life) name(Pay 2 life) thisforeach(X>0) target(*[counter{any}]|battlefield) removesinglecountertype(1) && all(this) 1/0 ueot +auto={X}{p(B)}:name(Remove counters) name(Remove counters) thisforeach(X>0) target(*[counter{any}]|battlefield) removesinglecountertype(1) && all(this) 1/0 ueot text={X}{PB}: Remove up to X counters from target permanent. For each counter removed this way, Hex Parasite gets +1/+0 until end of turn. ({PB} can be paid with either {B} or 2 life.) mana={1} type=Artifact Creature @@ -65116,8 +65114,8 @@ auto=@each cleanup restriction{compare(mywhitepoolcount)~morethan~0}:thisforeach aicode=activate transforms((,newability[all(*[zpos=1]|mylibrary) transforms((,newability[choice name(Draw and don't reveal) draw:1 controller],newability[if compare(hasmansymw)~morethan~0 then if compare(hasmansymr)~morethan~0 then if compare(hasmansymg)~morethan~0 then if compare(hasmansymu)~morethan~0 then if compare(hasmansymb)~morethan~0 then choice name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) thisforeach(variable{5}) ability$!name(add mana) choice add{G} _ choice add{R} _ choice add{U} _ choice add{B} _ choice add{W}!$ controller],newability[if compare(hasmansymr)~morethan~0 then if compare(hasmansymg)~morethan~0 then if compare(hasmansymb)~morethan~0 then if compare(hasmansymw)~morethan~0 then if compare(hasmansymu)~equalto~0 then choice name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) thisforeach(variable{4}) ability$!name(add mana) choice add{R} _ choice add{G} _ choice add{B} _ choice add{W}!$ controller],newability[if compare(hasmansymr)~morethan~0 then if compare(hasmansymg)~morethan~0 then if compare(hasmansymu)~morethan~0 then if compare(hasmansymw)~morethan~0 then if compare(hasmansymb)~equalto~0 then choice name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) thisforeach(variable{4}) ability$!name(add mana) choice add{R} _ choice add{G} _ choice add{U} _ choice add{W}!$ controller],newability[if compare(hasmansymr)~morethan~0 then if compare(hasmansymg)~morethan~0 then if compare(hasmansymb)~morethan~0 then if compare(hasmansymu)~morethan~0 then if compare(hasmansymw)~equalto~0 then choice name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) thisforeach(variable{4}) ability$!name(add mana) choice add{R} _ choice add{G} _ choice add{B} _ choice add{U}!$ controller],newability[if compare(hasmansymr)~morethan~0 then if compare(hasmansymb)~morethan~0 then if compare(hasmansymu)~morethan~0 then if compare(hasmansymw)~morethan~0 then if compare(hasmansymg)~equalto~0 then choice name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) thisforeach(variable{4}) ability$!name(add mana) choice add{R} _ choice add{B} _ choice add{U} _ choice add{W}!$ controller],newability[if compare(hasmansymg)~morethan~0 then if compare(hasmansymb)~morethan~0 then if compare(hasmansymu)~morethan~0 then if compare(hasmansymw)~morethan~0 then if compare(hasmansymr)~equalto~0 then choice name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) thisforeach(variable{4}) ability$!name(add mana) choice add{G} _ choice add{B} _ choice add{U} _ choice add{W}!$ controller],newability[if compare(hasmansymr)~morethan~0 then if compare(hasmansymg)~morethan~0 then if compare(hasmansymb)~morethan~0 then if compare(hasmansymw)~equalto~0 then if compare(hasmansymu)~equalto~0 then choice name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) thisforeach(variable{3}) ability$!name(add mana) choice add{R} _ choice add{G} _ choice add{B}!$ controller],newability[if compare(hasmansymr)~morethan~0 then if compare(hasmansymg)~morethan~0 then if compare(hasmansymu)~morethan~0 then if compare(hasmansymw)~equalto~0 then if compare(hasmansymb)~equalto~0 then choice name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) thisforeach(variable{3}) ability$!name(add mana) choice add{R} _ choice add{G} _ choice add{U}!$ controller],newability[if compare(hasmansymr)~morethan~0 then if compare(hasmansymg)~morethan~0 then if compare(hasmansymw)~morethan~0 then if compare(hasmansymb)~equalto~0 then if compare(hasmansymu)~equalto~0 then choice name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) thisforeach(variable{3}) ability$!name(add mana) choice add{R} _ choice add{G} _ choice add{W}!$ controller],newability[if compare(hasmansymr)~morethan~0 then if compare(hasmansymb)~morethan~0 then if compare(hasmansymw)~morethan~0 then if compare(hasmansymg)~equalto~0 then if compare(hasmansymu)~equalto~0 then choice name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) thisforeach(variable{3}) ability$!name(add mana) choice add{R} _ choice add{B} _ choice add{W}!$ controller],newability[if compare(hasmansymr)~morethan~0 then if compare(hasmansymu)~morethan~0 then if compare(hasmansymw)~morethan~0 then if compare(hasmansymg)~equalto~0 then if compare(hasmansymb)~equalto~0 then choice name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) thisforeach(variable{3}) ability$!name(add mana) choice add{R} _ choice add{U} _ choice add{W}!$ controller],newability[if compare(hasmansymr)~morethan~0 then if compare(hasmansymb)~morethan~0 then if compare(hasmansymu)~morethan~0 then if compare(hasmansymw)~equalto~0 then if compare(hasmansymg)~equalto~0 then choice name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) thisforeach(variable{3}) ability$!name(add mana) choice add{R} _ choice add{B} _ choice add{U}!$ controller],newability[if compare(hasmansymg)~morethan~0 then if compare(hasmansymb)~morethan~0 then if compare(hasmansymu)~morethan~0 then if compare(hasmansymw)~equalto~0 then if compare(hasmansymr)~equalto~0 then choice name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) thisforeach(variable{3}) ability$!name(add mana) choice add{G} _ choice add{B} _ choice add{U}!$ controller],newability[if compare(hasmansymg)~morethan~0 then if compare(hasmansymb)~morethan~0 then if compare(hasmansymw)~morethan~0 then if compare(hasmansymu)~equalto~0 then if compare(hasmansymr)~equalto~0 then choice name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) thisforeach(variable{3}) ability$!name(add mana) choice add{G} _ choice add{B} _ choice add{W}!$ controller],newability[if compare(hasmansymg)~morethan~0 then if compare(hasmansymu)~morethan~0 then if compare(hasmansymw)~morethan~0 then if compare(hasmansymb)~equalto~0 then if compare(hasmansymr)~equalto~0 then choice name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) thisforeach(variable{3}) ability$!name(add mana) choice add{G} _ choice add{U} _ choice add{W}!$ controller],newability[if compare(hasmansymb)~morethan~0 then if compare(hasmansymu)~morethan~0 then if compare(hasmansymw)~morethan~0 then if compare(hasmansymg)~equalto~0 then if compare(hasmansymr)~equalto~0 then choice name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) thisforeach(variable{3}) ability$!name(add mana) choice add{B} _ choice add{U} _ choice add{W}!$ controller])) oneshot])) oneshot auto=@each my firstmain:name(Look top card) reveal:1 optionone name(Draw or reveal) target(*|reveal) moveto(mylibrary) and!( becomes(tobecast) ueot )! oneshot optiononeend optiontwo all(*|reveal) moveto(mylibrary) optiontwoend afterrevealed all(tobecast|mylibrary) transforms((,newability[choice name(Draw and don't reveal) draw:1 controller],newability[if compare(hasmansymw)~morethan~0 then if compare(hasmansymr)~morethan~0 then if compare(hasmansymg)~morethan~0 then if compare(hasmansymu)~morethan~0 then if compare(hasmansymb)~morethan~0 then choice name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) thisforeach(variable{5}) ability$!name(add mana) choice add{G} _ choice add{R} _ choice add{U} _ choice add{B} _ choice add{W}!$ controller],newability[if compare(hasmansymr)~morethan~0 then if compare(hasmansymg)~morethan~0 then if compare(hasmansymb)~morethan~0 then if compare(hasmansymw)~morethan~0 then if compare(hasmansymu)~equalto~0 then choice name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) thisforeach(variable{4}) ability$!name(add mana) choice add{R} _ choice add{G} _ choice add{B} _ choice add{W}!$ controller],newability[if compare(hasmansymr)~morethan~0 then if compare(hasmansymg)~morethan~0 then if compare(hasmansymu)~morethan~0 then if compare(hasmansymw)~morethan~0 then if compare(hasmansymb)~equalto~0 then choice name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) thisforeach(variable{4}) ability$!name(add mana) choice add{R} _ choice add{G} _ choice add{U} _ choice add{W}!$ controller],newability[if compare(hasmansymr)~morethan~0 then if compare(hasmansymg)~morethan~0 then if compare(hasmansymb)~morethan~0 then if compare(hasmansymu)~morethan~0 then if compare(hasmansymw)~equalto~0 then choice name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) thisforeach(variable{4}) ability$!name(add mana) choice add{R} _ choice add{G} _ choice add{B} _ choice add{U}!$ controller],newability[if compare(hasmansymr)~morethan~0 then if compare(hasmansymb)~morethan~0 then if compare(hasmansymu)~morethan~0 then if compare(hasmansymw)~morethan~0 then if compare(hasmansymg)~equalto~0 then choice name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) thisforeach(variable{4}) ability$!name(add mana) choice add{R} _ choice add{B} _ choice add{U} _ choice add{W}!$ controller],newability[if compare(hasmansymg)~morethan~0 then if compare(hasmansymb)~morethan~0 then if compare(hasmansymu)~morethan~0 then if compare(hasmansymw)~morethan~0 then if compare(hasmansymr)~equalto~0 then choice name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) thisforeach(variable{4}) ability$!name(add mana) choice add{G} _ choice add{B} _ choice add{U} _ choice add{W}!$ controller],newability[if compare(hasmansymr)~morethan~0 then if compare(hasmansymg)~morethan~0 then if compare(hasmansymb)~morethan~0 then if compare(hasmansymw)~equalto~0 then if compare(hasmansymu)~equalto~0 then choice name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) thisforeach(variable{3}) ability$!name(add mana) choice add{R} _ choice add{G} _ choice add{B}!$ controller],newability[if compare(hasmansymr)~morethan~0 then if compare(hasmansymg)~morethan~0 then if compare(hasmansymu)~morethan~0 then if compare(hasmansymw)~equalto~0 then if compare(hasmansymb)~equalto~0 then choice name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) thisforeach(variable{3}) ability$!name(add mana) choice add{R} _ choice add{G} _ choice add{U}!$ controller],newability[if compare(hasmansymr)~morethan~0 then if compare(hasmansymg)~morethan~0 then if compare(hasmansymw)~morethan~0 then if compare(hasmansymb)~equalto~0 then if compare(hasmansymu)~equalto~0 then choice name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) thisforeach(variable{3}) ability$!name(add mana) choice add{R} _ choice add{G} _ choice add{W}!$ controller],newability[if compare(hasmansymr)~morethan~0 then if compare(hasmansymb)~morethan~0 then if compare(hasmansymw)~morethan~0 then if compare(hasmansymg)~equalto~0 then if compare(hasmansymu)~equalto~0 then choice name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) thisforeach(variable{3}) ability$!name(add mana) choice add{R} _ choice add{B} _ choice add{W}!$ controller],newability[if compare(hasmansymr)~morethan~0 then if compare(hasmansymu)~morethan~0 then if compare(hasmansymw)~morethan~0 then if compare(hasmansymg)~equalto~0 then if compare(hasmansymb)~equalto~0 then choice name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) thisforeach(variable{3}) ability$!name(add mana) choice add{R} _ choice add{U} _ choice add{W}!$ controller],newability[if compare(hasmansymr)~morethan~0 then if compare(hasmansymb)~morethan~0 then if compare(hasmansymu)~morethan~0 then if compare(hasmansymw)~equalto~0 then if compare(hasmansymg)~equalto~0 then choice name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) thisforeach(variable{3}) ability$!name(add mana) choice add{R} _ choice add{B} _ choice add{U}!$ controller],newability[if compare(hasmansymg)~morethan~0 then if compare(hasmansymb)~morethan~0 then if compare(hasmansymu)~morethan~0 then if compare(hasmansymw)~equalto~0 then if compare(hasmansymr)~equalto~0 then choice name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) thisforeach(variable{3}) ability$!name(add mana) choice add{G} _ choice add{B} _ choice add{U}!$ controller],newability[if compare(hasmansymg)~morethan~0 then if compare(hasmansymb)~morethan~0 then if compare(hasmansymw)~morethan~0 then if compare(hasmansymu)~equalto~0 then if compare(hasmansymr)~equalto~0 then choice name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) thisforeach(variable{3}) ability$!name(add mana) choice add{G} _ choice add{B} _ choice add{W}!$ controller],newability[if compare(hasmansymg)~morethan~0 then if compare(hasmansymu)~morethan~0 then if compare(hasmansymw)~morethan~0 then if compare(hasmansymb)~equalto~0 then if compare(hasmansymr)~equalto~0 then choice name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) thisforeach(variable{3}) ability$!name(add mana) choice add{G} _ choice add{U} _ choice add{W}!$ controller],newability[if compare(hasmansymb)~morethan~0 then if compare(hasmansymu)~morethan~0 then if compare(hasmansymw)~morethan~0 then if compare(hasmansymg)~equalto~0 then if compare(hasmansymr)~equalto~0 then choice name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) thisforeach(variable{3}) ability$!name(add mana) choice add{B} _ choice add{U} _ choice add{W}!$ controller])) oneshot afterrevealedend revealend text=If you would lose unspent mana, that mana becomes black instead. -- At the beginning of your precombat main phase, look at the top card of your library. You may reveal that card if it has three or more colored mana symbols in its mana cost. If you do, add three mana in any combination of its colors and put it into your hand. If you don't reveal it, put it into your hand. -other={W}{U}{R}{G}{L:2} name(Pay 2 life) -mana={W}{U}{B}{R}{G} +color=white,blue,red,green,black +mana={W}{U}{R}{G}{p(B)} type=Legendary Creature subtype=Phyrexian Elemental power=4 @@ -76779,8 +76777,7 @@ restriction=compare(isflipped)~equalto~0 anyzone={0}:doubleside(backside) auto=@movedTo(*[legendary]|mystack) restriction{compare(isflipped)~equalto~0}:name(Untap rona) name(Untap rona) untap auto={T}:name(Draw and discard) draw:1 && transforms((,newability[name(Discard a card) target(*|myhand) reject])) oneshot -auto={5}{B}:name(Pay B and transform Rona) flip(backside) asSorcery -auto={5}{L:2}:name(Pay life and transform Rona) flip(backside) asSorcery +auto={5}{p(B)}:name(Transform Rona) flip(backside) asSorcery text=Whenever you cast a legendary spell, untap Rona, Herald of Invasion. -- {T}: Draw a card, then discard a card. -- {5}{B/P}: Transform Rona. Activate only as a sorcery. ({B/P} can be paid with either {B} or 2 life.) mana={1}{U} type=Legendary Creature @@ -84505,16 +84502,11 @@ type=Enchantment [card] name=Skrelv, Defector Mite abilities=poisontoxic,cantblock -auto={W}{T}:name(Choose white) target(other creature|myBattlefield) transforms((,newability[poisontoxic],newability[protection from white],newability[cantbeblockedby(creature[white])])) ueot -auto={W}{T}:name(Choose red) target(other creature|myBattlefield) transforms((,newability[poisontoxic],newability[protection from red],newability[cantbeblockedby(creature[red])])) ueot -auto={W}{T}:name(Choose black) target(other creature|myBattlefield) transforms((,newability[poisontoxic],newability[protection from black],newability[cantbeblockedby(creature[black])])) ueot -auto={W}{T}:name(Choose green) target(other creature|myBattlefield) transforms((,newability[poisontoxic],newability[protection from green],newability[cantbeblockedby(creature[green])])) ueot -auto={W}{T}:name(Choose blue) target(other creature|myBattlefield) transforms((,newability[poisontoxic],newability[protection from blue],newability[cantbeblockedby(creature[blue])])) ueot -auto={L:2}{T}:name(Pay life and choose white) target(other creature|myBattlefield) transforms((,newability[poisontoxic],newability[protection from white],newability[cantbeblockedby(creature[white])])) ueot -auto={L:2}{T}:name(Pay life and choose red) target(other creature|myBattlefield) transforms((,newability[poisontoxic],newability[protection from red],newability[cantbeblockedby(creature[red])])) ueot -auto={L:2}{T}:name(Pay life and choose black) target(other creature|myBattlefield) transforms((,newability[poisontoxic],newability[protection from black],newability[cantbeblockedby(creature[black])])) ueot -auto={L:2}{T}:name(Pay life and choose green) target(other creature|myBattlefield) transforms((,newability[poisontoxic],newability[protection from green],newability[cantbeblockedby(creature[green])])) ueot -auto={L:2}{T}:name(Pay life and choose blue) target(other creature|myBattlefield) transforms((,newability[poisontoxic],newability[protection from blue],newability[cantbeblockedby(creature[blue])])) ueot +auto={p(W)}{T}:name(Choose white) target(other creature|myBattlefield) transforms((,newability[poisontoxic],newability[protection from white],newability[cantbeblockedby(creature[white])])) ueot +auto={p(W)}{T}:name(Choose red) target(other creature|myBattlefield) transforms((,newability[poisontoxic],newability[protection from red],newability[cantbeblockedby(creature[red])])) ueot +auto={p(W)}{T}:name(Choose black) target(other creature|myBattlefield) transforms((,newability[poisontoxic],newability[protection from black],newability[cantbeblockedby(creature[black])])) ueot +auto={p(W)}{T}:name(Choose green) target(other creature|myBattlefield) transforms((,newability[poisontoxic],newability[protection from green],newability[cantbeblockedby(creature[green])])) ueot +auto={p(W)}{T}:name(Choose blue) target(other creature|myBattlefield) transforms((,newability[poisontoxic],newability[protection from blue],newability[cantbeblockedby(creature[blue])])) ueot text=Toxic 1 (Players dealt combat damage by this creature also get a poison counter.) -- Skrelv, Defector Mite can't block. -- {W/P}, {T}: Choose a color. Another target creature you control gains toxic 1 and hexproof from that color until end of turn. It can't be blocked by creatures of that color this turn. ({W/P} can be paid with either {W} or 2 life.) mana={W} type=Legendary Artifact Creature @@ -86100,9 +86092,7 @@ toughness=2 [/card] [card] name=Solphim, Mayhem Dominus -auto={1}{R}{R}{D(*|myhand)}{D(*|myhand)}:name(Put indestructible counter) transforms((,newability[counter(0/0.1.Indestructible)],newability[this(counter{0/0.1.Indestructible}>=1) indestructible])) forever -auto={1}{L:2}{R}{D(*|myhand)}{D(*|myhand)}:name(Pay 2 life and put indestructible counter) transforms((,newability[counter(0/0.1.Indestructible)],newability[this(counter{0/0.1.Indestructible}>=1) indestructible])) forever -auto={1}{L:4}{D(*|myhand)}{D(*|myhand)}:name(Pay 4 life and put indestructible counter) transforms((,newability[counter(0/0.1.Indestructible)],newability[this(counter{0/0.1.Indestructible}>=1) indestructible])) forever +auto={1}{p(R)}{p(R)}{D(*|myhand)}{D(*|myhand)}:name(Put indestructible counter) transforms((,newability[counter(0/0.1.Indestructible)],newability[this(counter{0/0.1.Indestructible}>=1) indestructible])) forever auto=@noncombatdamagefoeof(player) from(*[-Solphim^ Mayhem Dominus]|*):damage:thatmuch all(trigger[to]) auto=@noncombatdamaged(*[creature;planeswalker]|opponentbattlefield) from(*[-Solphim^ Mayhem Dominus]|*):damage:thatmuch all(trigger[to]) text=If a source you control would deal noncombat damage to an opponent or a permanent an opponent controls, it deals double that damage to that player or permanent instead. -- {1}{R/P}{R/P}, Discard two cards: Put an indestructible counter on Solphim, Mayhem Dominus. ({R/P} can be paid with either {R} or 2 life.) @@ -87559,15 +87549,10 @@ toughness=0 [/card] [card] name=Spike, Tournament Grinder -other={2} name(Pay with life) -auto=if paid(alternative) then thisforeach(variable{2}) ability$!name(Pay Life or B) pay[[{B}]] name(Pay B) donothing?life:-2!$ controller -auto={B}{B}{B}{B}:name(Pay 4 black mana) name(Pay 4 black mana) target(*|mysideboard) moveto(myhand) -auto={B}{B}{B}{L:2}:name(Pay 3 black mana and 2 life) name(Pay 3 black mana and 2 life) target(*|mysideboard) moveto(myhand) -auto={B}{B}{L:4}:name(Pay 2 black mana and 4 life) name(Pay 2 black mana and 4 life) target(*|mysideboard) moveto(myhand) -auto={B}{L:6}:name(Pay 1 black mana and 6 life) name(Pay 1 black mana and 6 life) target(*|mysideboard) moveto(myhand) -auto={L:8}:name(Pay 8 life) target(*|mysideboard) moveto(myhand) +auto={p(B)}{p(B)}{p(B)}{p(B)}:name(Choose card outside the game) name(Choose card outside the game) target(*|mysideboard) moveto(myhand) text=(Phyrexian {B} can be paid with either {B} or 2 life.) -- Phyrexian {B} Phyrexian {B} Phyrexian {B} Phyrexian {B}: Choose a card you own from outside the game that has been banned or restricted in a Constructed format, reveal that card, and put it into your hand. -mana={2}{B}{B} +mana={2}{p(B)}{p(B)} +color=black type=Legendary Creature subtype=Human Gamer power=1 @@ -91767,9 +91752,7 @@ toughness=2 [/card] [card] name=Synthesis Pod -other={3}{L:2} name(Pay 2 life) -auto={1}{U}{C(0/0,1,SynthesisEffect)}:name(Exile spell) target(*|mystack) spellmover(exile) -auto={1}{L:2}{C(0/0,1,SynthesisEffect)}:name(Pay life and exile spell) target(*|mystack) spellmover(exile) +auto={1}{p(U)}{C(0/0,1,SynthesisEffect)}:name(Exile spell) target(*|mystack) spellmover(exile) auto=@movedto(*|myexile) from(mystack) restriction{compare(hascntsynthesiseffect)~morethan~0}:name(Effexct ends) removeallcounters(0/0,1,SynthesisEffect) notrg auto=@movedto(*[manacost=0]|myexile) from(mystack) restriction{compare(hascntsynthesiseffect)~morethan~0}:name(Cast opponent card) target(*[manacost=1]|opponentlibrary) moveto(myexile) and!( transforms((,newability[choice name(Cast card) activate castcard(normal)],newability[choice name(Don't cast card) moveto(ownerexile)])) oneshot )! auto=@movedto(*[manacost=1]|myexile) from(mystack) restriction{compare(hascntsynthesiseffect)~morethan~0}:name(Cast opponent card) target(*[manacost=2]|opponentlibrary) moveto(myexile) and!( transforms((,newability[choice name(Cast card) activate castcard(normal)],newability[choice name(Don't cast card) moveto(ownerexile)])) oneshot )! @@ -91792,8 +91775,9 @@ auto=@movedto(*[manacost=17]|myexile) from(mystack) restriction{compare(hascntsy auto=@movedto(*[manacost=18]|myexile) from(mystack) restriction{compare(hascntsynthesiseffect)~morethan~0}:name(Cast opponent card) target(*[manacost=19]|opponentlibrary) moveto(myexile) and!( transforms((,newability[choice name(Cast card) activate castcard(normal)],newability[choice name(Don't cast card) moveto(ownerexile)])) oneshot )! auto=@movedto(*[manacost=19]|myexile) from(mystack) restriction{compare(hascntsynthesiseffect)~morethan~0}:name(Cast opponent card) target(*[manacost=20]|opponentlibrary) moveto(myexile) and!( transforms((,newability[choice name(Cast card) activate castcard(normal)],newability[choice name(Don't cast card) moveto(ownerexile)])) oneshot )! auto=@movedto(*[manacost>=20]|myexile) from(mystack) restriction{compare(hascntsynthesiseffect)~morethan~0}:name(Cast opponent card) target(*[manacost=21]|opponentlibrary) moveto(myexile) and!( transforms((,newability[choice name(Cast card) activate castcard(normal)],newability[choice name(Don't cast card) moveto(ownerexile)])) oneshot )! -text=({U/P} can be paid with either {U} or 2 life.) -- {1}{U/P}, {T}, Exile a spell you control: Target opponent reveals cards from the top of their library until they reveal a card with mana value equal to 1 plus the exiled spellâ??s mana value. Exile that card, then that player shuffles. You may cast that exiled card without paying its mana cost. -mana={3}{U} +text=({U/P} can be paid with either {U} or 2 life.) -- {1}{U/P}, {T}, Exile a spell you control: Target opponent reveals cards from the top of their library until they reveal a card with mana value equal to 1 plus the exiled spell's mana value. Exile that card, then that player shuffles. You may cast that exiled card without paying its mana cost. +mana={3}{p(U)} +color=blue type=Artifact [/card] [card] @@ -93111,9 +93095,7 @@ subtype=Teferi name=Tekuthal, Inquiry Dominus abilities=flying auto=@proliferateof(player) except(this):name(Proliferate twice) name(Proliferate twice) notatarget(proliferation) proliferate -auto=this(variable{totcntallanycnt}>2) {1}{U}{U}:name(Remove 3 counters) transforms((,newability[thisforeach(variable{3}) ability$!name(Remove a counter) name(Remove a counter) target(other *[counter{any}]|battlefield) removesinglecountertype(1)!$ controller],newability[counter(0/0.1.Indestructible)],newability[this(counter{0/0.1.Indestructible}>=1) indestructible])) forever -auto=this(variable{totcntallanycnt}>2) {1}{U}{L:2}:name(Pay 2 life and remove 3 counters) transforms((,newability[thisforeach(variable{3}) ability$!name(Remove a counter) name(Remove a counter) target(other *[counter{any}]|battlefield) removesinglecountertype(1)!$ controller],newability[counter(0/0.1.Indestructible)],newability[this(counter{0/0.1.Indestructible}>=1) indestructible])) forever -auto=this(variable{totcntallanycnt}>2) {1}{L:4}:name(Pay 4 life and remove 3 counters) transforms((,newability[thisforeach(variable{3}) ability$!name(Remove a counter) name(Remove a counter) target(other *[counter{any}]|battlefield) removesinglecountertype(1)!$ controller],newability[counter(0/0.1.Indestructible)],newability[this(counter{0/0.1.Indestructible}>=1) indestructible])) forever +auto=this(variable{totcntallanycnt}>2) {1}{p(U)}{p(U)}:name(Remove 3 counters) transforms((,newability[thisforeach(variable{3}) ability$!name(Remove a counter) name(Remove a counter) target(other *[counter{any}]|battlefield) removesinglecountertype(1)!$ controller],newability[counter(0/0.1.Indestructible)],newability[this(counter{0/0.1.Indestructible}>=1) indestructible])) forever text=Flying -- If you would proliferate, proliferate twice instead. -- {1}{U/P}{U/P}, Remove three counters from among other artifacts, creatures, and planeswalkers you control: Put an indestructible counter on Tekuthal, Inquiry Dominus. ({U/P} can be paid with either {U} or 2 life.) mana={2}{U}{U} type=Legendary Creature diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index b47fd56db..5b71e8ead 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -1,6 +1,6 @@ #Primitives Pack for Wagic the Homebrew. #Please keep these card alphabetized, and try to have the "name=" line at the top of each card -#I sorted this programmatically so the other comments are removed except for AUTO_DEFINE - Vitty85 23-06-2023 +#I sorted this programmatically so the other comments are removed except for AUTO_DEFINE - Vitty85 24-06-2023 [card] name=Abandon Reason target=creature @@ -92997,7 +92997,7 @@ type=Sorcery [/card] [card] name=Reckless Assault -auto={L:2}{1}:damage:1 target(creature,player) +auto={L:2}{1}:damage:1 target(player,creature) text={1}, Pay 2 life: Reckless Assault deals 1 damage to target creature or player. mana={2}{B}{R} type=Enchantment diff --git a/projects/mtg/bin/Res/sets/primitives/planeswalkers.txt b/projects/mtg/bin/Res/sets/primitives/planeswalkers.txt index 02acfda14..c72f458a0 100644 --- a/projects/mtg/bin/Res/sets/primitives/planeswalkers.txt +++ b/projects/mtg/bin/Res/sets/primitives/planeswalkers.txt @@ -1,6 +1,6 @@ #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 -#We sorted this in alphabetical order - Luruz & Vitty85 23-06-2023 +#We sorted this in alphabetical order - Luruz & Vitty85 24-06-2023 [card] name=Abian, Luvion Usurper auto=counter(0/0,5,loyalty) @@ -961,7 +961,7 @@ auto=counter(0/0,4,Loyalty) auto={C(0/0,1,Loyalty)}:name(+1: Don't untap any elf) moverandom(elf) from(myhand) to(myHand) and!( counter(1/1.1.PerpetualPT) )! auto={C(0/0,1,Loyalty)}:name(+1: Untap target elf) target(elf|mybattlefield) transforms((,newability[untap],newability[counter(1/1.1.PerpetualPT)],newability[name(Random elf perpetually gets 1/1) moverandom(elf) from(myhand) to(myHand) and!( counter(1/1.1.PerpetualPT) )!])) forever auto={C(0/0,-1,Loyalty)}:name(-1: Seek an Elf) moverandom(*[elf]) from(mylibrary) to(myhand) -auto={C(0/0,-6,Loyalty)}:name(-6: Conjure a Regal Force) conjure cards(Regal Force) zone(myreveal) and!( moveto(mybattlefield) )! +auto={C(0/0,-6,Loyalty)}:name(-6: Conjure a Regal Force) conjure cards(Regal Force) zone(mybattlefield) text=+1: Choose up to one target Elf. Untap it. It and a random Elf creature card in your hand each perpetually gets +1/+1. -- −1: Seek an Elf card. -- −6: Conjure a Regal Force card onto the battlefield. mana={1}{G}{G} type=Legendary Planeswalker @@ -1063,21 +1063,21 @@ subtype=Garruk name=Garruk, Wrath of the Wilds auto=counter(0/0,3,loyalty) auto={C(0/0,1,Loyalty)}:name(+1: Creature perpetually gets 1/1) target(creature|myhand) transforms((,newability[counter(1/1.1.PerpetualPT) notrg],newability[changecost(colorless:-1) forcedalive])) forever -auto={C(0/0,-1,Loyalty)}:name(-1: Draft Mosscoat Goriak) conjure cards(Mosscoat Goriak) zone(myreveal) and!( moveto(myBattlefield) )! -auto={C(0/0,-1,Loyalty)}:name(-1: Draft Sylvan Brushstrider) conjure cards(Sylvan Brushstrider) zone(myreveal) and!( moveto(myBattlefield) )! -auto={C(0/0,-1,Loyalty)}:name(-1: Draft Murasa Rootgrazer) conjure cards(Murasa Rootgrazer) zone(myreveal) and!( moveto(myBattlefield) )! -auto={C(0/0,-1,Loyalty)}:name(-1: Draft Dire Wolf Prowler) conjure cards(Dire Wolf Prowler) zone(myreveal) and!( moveto(myBattlefield) )! -auto={C(0/0,-1,Loyalty)}:name(-1: Draft Ferocious Pup) conjure cards(Ferocious Pup) zone(myreveal) and!( moveto(myBattlefield) )! -auto={C(0/0,-1,Loyalty)}:name(-1: Draft Pestilent Wolf) conjure cards(Pestilent Wolf) zone(myreveal) and!( moveto(myBattlefield) )! -auto={C(0/0,-1,Loyalty)}:name(-1: Draft Garruk's Uprising) conjure cards(Garruk's Uprising) zone(myreveal) and!( moveto(myBattlefield) )! -auto={C(0/0,-1,Loyalty)}:name(-1: Draft Dawntreader Elk) conjure cards(Dawntreader Elk) zone(myreveal) and!( moveto(myBattlefield) )! -auto={C(0/0,-1,Loyalty)}:name(-1: Draft Nessian Hornbeetle) conjure cards(Nessian Hornbeetle) zone(myreveal) and!( moveto(myBattlefield) )! -auto={C(0/0,-1,Loyalty)}:name(-1: Draft Territorial Scythecat) conjure cards(Territorial Scythecat) zone(myreveal) and!( moveto(myBattlefield) )! -auto={C(0/0,-1,Loyalty)}:name(-1: Draft Trufflesnout) conjure cards(Trufflesnout) zone(myreveal) and!( moveto(myBattlefield) )! -auto={C(0/0,-1,Loyalty)}:name(-1: Draft Wary Okapi) conjure cards(Wary Okapi) zone(myreveal) and!( moveto(myBattlefield) )! -auto={C(0/0,-1,Loyalty)}:name(-1: Draft Scurrid Colony) conjure cards(Scurrid Colony) zone(myreveal) and!( moveto(myBattlefield) )! -auto={C(0/0,-1,Loyalty)}:name(-1: Draft Barkhide Troll) conjure cards(Barkhide Troll) zone(myreveal) and!( moveto(myBattlefield) )! -auto={C(0/0,-1,Loyalty)}:name(-1: Draft Underdark Basilisk) conjure cards(Underdark Basilisk) zone(myreveal) and!( moveto(myBattlefield) )! +auto={C(0/0,-1,Loyalty)}:name(-1: Draft Mosscoat Goriak) conjure cards(Mosscoat Goriak) zone(mybattlefield) +auto={C(0/0,-1,Loyalty)}:name(-1: Draft Sylvan Brushstrider) conjure cards(Sylvan Brushstrider) zone(mybattlefield) +auto={C(0/0,-1,Loyalty)}:name(-1: Draft Murasa Rootgrazer) conjure cards(Murasa Rootgrazer) zone(mybattlefield) +auto={C(0/0,-1,Loyalty)}:name(-1: Draft Dire Wolf Prowler) conjure cards(Dire Wolf Prowler) zone(mybattlefield) +auto={C(0/0,-1,Loyalty)}:name(-1: Draft Ferocious Pup) conjure cards(Ferocious Pup) zone(mybattlefield) +auto={C(0/0,-1,Loyalty)}:name(-1: Draft Pestilent Wolf) conjure cards(Pestilent Wolf) zone(mybattlefield) +auto={C(0/0,-1,Loyalty)}:name(-1: Draft Garruk's Uprising) conjure cards(Garruk's Uprising) zone(mybattlefield) +auto={C(0/0,-1,Loyalty)}:name(-1: Draft Dawntreader Elk) conjure cards(Dawntreader Elk) zone(mybattlefield) +auto={C(0/0,-1,Loyalty)}:name(-1: Draft Nessian Hornbeetle) conjure cards(Nessian Hornbeetle) zone(mybattlefield) +auto={C(0/0,-1,Loyalty)}:name(-1: Draft Territorial Scythecat) conjure cards(Territorial Scythecat) zone(mybattlefield) +auto={C(0/0,-1,Loyalty)}:name(-1: Draft Trufflesnout) conjure cards(Trufflesnout) zone(mybattlefield) +auto={C(0/0,-1,Loyalty)}:name(-1: Draft Wary Okapi) conjure cards(Wary Okapi) zone(mybattlefield) +auto={C(0/0,-1,Loyalty)}:name(-1: Draft Scurrid Colony) conjure cards(Scurrid Colony) zone(mybattlefield) +auto={C(0/0,-1,Loyalty)}:name(-1: Draft Barkhide Troll) conjure cards(Barkhide Troll) zone(mybattlefield) +auto={C(0/0,-1,Loyalty)}:name(-1: Draft Underdark Basilisk) conjure cards(Underdark Basilisk) zone(mybattlefield) auto={C(0/0,-5,Loyalty)}:name(-3: Your creatures get 3/3) all(creature|myBattlefield) transforms((,newability[3/3],newability[trample])) ueot text=+1: Choose a creature card in your hand. it perpetually gets +1/+1 and perpetually gains "This spell costs {1} less to cast." -- −1: Draft a card from Garruk, Wrath of the Wild's spellbook and put it onto the battlefield. -- −5: Until end of turn, creatures you control get +3/+3 and gain trample. mana={2}{G}{G} @@ -3176,7 +3176,7 @@ name=Teyo, Aegis Adept auto=counter(0/0,4,Loyalty) auto={C(0/0,1,Loyalty)}:name(+1: Don't target any creature) donothing auto={C(0/0,1,Loyalty)}:name(+1: Creature can attack) target(creature) counter(0/0.1.PerpetualTeyoEffect) -auto={C(0/0,-2,Loyalty)}:name(-2: Conjure a Lumbering Lightshield) conjure cards(Lumbering Lightshield) zone(myreveal) and!( moveto(mybattlefield) )! +auto={C(0/0,-2,Loyalty)}:name(-2: Conjure a Lumbering Lightshield) conjure cards(Lumbering Lightshield) zone(mybattlefield) auto={C(0/0,-6,Loyalty)}:name(-6: Emblem Return creature) ability$!emblem transforms((,newability[@each my endofturn:name(Return white creature) name(Return white creature) target(creature[white]|mygraveyard) moveto(mybattlefield) and!( transforms((,newability[life:toughness controller])) oneshot )!])) forever dontremove!$ controller auto=emblem transforms((,newability[lord(*[counter{0/0.1.PerpetualTeyoEffect}]|myzones) transforms((,setpower=t,newability[canattack]))])) forever dontremove text=+1: Up to one target creature's base power perpetually becomes equal to its toughness. It perpetually gains "This creature can attack as though it didn't have defender." -- −2: Conjure a Lumbering Lightshield card onto the battlefield. −6: You get an emblem with "At the beginning of your end step, return target white creature card from your graveyard to the battlefield. You gain life equal to its toughness." diff --git a/projects/mtg/src/AllAbilities.cpp b/projects/mtg/src/AllAbilities.cpp index 1c7135fbf..25a7507e7 100644 --- a/projects/mtg/src/AllAbilities.cpp +++ b/projects/mtg/src/AllAbilities.cpp @@ -2472,7 +2472,7 @@ MTGCardInstance * AAConjure::makeCard() newName = names.at(std::rand() % names.size()); } MTGCardInstance * card = NULL; - MTGCard * cardData = MTGCollection()->getCardByName(newName); + MTGCard * cardData = MTGCollection()->getCardByName(newName, source->setId); if(!cardData) return NULL; card = NEW MTGCardInstance(cardData, source->controller()->game); card->owner = source->controller(); @@ -2489,7 +2489,26 @@ int AAConjure::resolve() if(_target->mutation && _target->parentCards.size() > 0) return 0; // Mutated down cards cannot be conjured, they will follow the fate of top-card theNamedCard = makeCard(); if(theNamedCard){ - MTGCardInstance * copy = source->controller()->game->putInZone(theNamedCard, theNamedCard->currentZone, MTGGameZone::stringToZone(game, cardZone, theNamedCard, NULL)); + Spell * spell = NULL; + MTGGameZone * targetZone = MTGGameZone::stringToZone(game, cardZone, theNamedCard, NULL); + MTGCardInstance * copy = source->controller()->game->putInZone(theNamedCard, theNamedCard->currentZone, targetZone); + if(!copy){ + this->forceDestroy = true; + return 0; + } + if(targetZone == copy->controller()->game->battlefield){ + copy->changeController(source->controller(), true); + if (game->targetChooser) + { + game->targetChooser->Owner = source->controller(); + spell = game->mLayers->stackLayer()->addSpell(copy, game->targetChooser, NULL, 1, 0); + game->targetChooser = NULL; + } + else + { + spell = game->mLayers->stackLayer()->addSpell(copy, NULL, NULL, 1, 0); + } + } if(andAbility) { MTGAbility * andAbilityClone = andAbility->clone(); @@ -2504,9 +2523,9 @@ int AAConjure::resolve() andAbilityClone->addToGame(); } } + this->forceDestroy = true; + return 1; } - this->forceDestroy = true; - return 1; } return 0; } @@ -4816,7 +4835,7 @@ int AATurnSide::resolve() if(_target->isFlipped == 0){ if(_SideName == "backside" && _target->backSide != "") _SideName = _target->backSide; // Added to allow to turn a card on its backside. - fcard = MTGCollection()->getCardByName(_SideName); + fcard = MTGCollection()->getCardByName(_SideName, _target->setId); if(!fcard) return 0; sideCard = NEW MTGCardInstance(fcard, _target->controller()->game); _target->nameOrig = _target->name; @@ -4843,7 +4862,7 @@ int AATurnSide::resolve() } } } else { - fcard = MTGCollection()->getCardByName(_target->nameOrig); + fcard = MTGCollection()->getCardByName(_target->nameOrig, _target->setId); if(!fcard) return 0; _target->name = _target->nameOrig; _target->setName(_target->nameOrig); @@ -4952,7 +4971,7 @@ int AAFlip::resolve() flipStats = _target->chooseaname; // Added to allow the transformation of a card in a choosen name. else if(flipStats == "backside" && _target->backSide != "") flipStats = _target->backSide; // Added to allow the transformation of a card in its backside (e.g. Werewolves transformations). - MTGCard * fcard = MTGCollection()->getCardByName(flipStats); + MTGCard * fcard = MTGCollection()->getCardByName(flipStats, _target->setId); if(!fcard) return 0; MTGCardInstance * myFlip = NEW MTGCardInstance(fcard, _target->controller()->game); MTGCardInstance * myParent = NULL; @@ -4976,7 +4995,7 @@ int AAFlip::resolve() _target->text = myFlip->text; _target->formattedText = myFlip->formattedText; if(_target->enchanted || _target->equipment > 0){ // Try to keep auras and equipment effects on basicAbilities (issue #1065). - MTGCardInstance * myOrig = NEW MTGCardInstance(MTGCollection()->getCardByName(nameOrig), _target->controller()->game); + MTGCardInstance * myOrig = NEW MTGCardInstance(MTGCollection()->getCardByName(nameOrig, _target->setId), _target->controller()->game); for(unsigned int i = 0; i < _target->basicAbilities.size(); i++) { if(myOrig->basicAbilities[i] == 1) _target->basicAbilities[i] = 0; @@ -9344,9 +9363,9 @@ void ABlink::resolveBlink() //it is later moved to garbage by garbage collection. //then we build 2 seperate blinks with the 2 parts as the targets. vector names = split(_target->MeldedFrom, '|'); - MTGCard * cardone = MTGCollection()->getCardByName(names[0]); + MTGCard * cardone = MTGCollection()->getCardByName(names[0], _target->setId); MTGCardInstance * cardOne = NEW MTGCardInstance(cardone, _target->owner->game); - MTGCard * cardtwo = MTGCollection()->getCardByName(names[1]); + MTGCard * cardtwo = MTGCollection()->getCardByName(names[1], _target->setId); MTGCardInstance * cardTwo = NEW MTGCardInstance(cardtwo, _target->owner->game); _target->controller()->game->putInZone(_target, _target->currentZone, _target->owner->game->temp); @@ -10031,7 +10050,7 @@ int AACastCard::reactToTargetClick(Targetable * object) MTGCardInstance * AACastCard::makeCard() { MTGCardInstance * card = NULL; - MTGCard * cardData = MTGCollection()->getCardByName(cardNamed); + MTGCard * cardData = MTGCollection()->getCardByName(cardNamed, source->setId); if(!cardData) return NULL; card = NEW MTGCardInstance(cardData, source->controller()->game); card->owner = source->controller(); diff --git a/projects/mtg/src/MTGDeck.cpp b/projects/mtg/src/MTGDeck.cpp index c21123ab0..238a549ed 100644 --- a/projects/mtg/src/MTGDeck.cpp +++ b/projects/mtg/src/MTGDeck.cpp @@ -832,9 +832,11 @@ MTGCard * MTGAllCards::getCardByName(string nameDescriptor, int forcedSetId) map::iterator cached = mtgCardByNameCache.find(nameDescriptor); - if ((forcedSetId < 0) && (cached!= mtgCardByNameCache.end())) + if (cached!= mtgCardByNameCache.end()) { - return cached->second; + MTGCard* card = cached->second; + if(forcedSetId < 0 || (card && forcedSetId == card->setId)) + return card; } int cardnb = atoi(nameDescriptor.c_str()); diff --git a/projects/mtg/src/MTGGameZones.cpp b/projects/mtg/src/MTGGameZones.cpp index 57ffcf7ca..98e73d527 100644 --- a/projects/mtg/src/MTGGameZones.cpp +++ b/projects/mtg/src/MTGGameZones.cpp @@ -684,12 +684,12 @@ MTGCardInstance * MTGPlayerCards::putInZone(MTGCardInstance * card, MTGGameZone if (copy->previous && copy->previous->MeldedFrom.size() && !copy->isACopier && !copy->isToken)//!copier & !token fix kiki-jiki clones crash { vector names = split(copy->previous->MeldedFrom, '|'); - MTGCard * cardone = MTGCollection()->getCardByName(names[0]); + MTGCard * cardone = MTGCollection()->getCardByName(names[0], copy->setId); MTGCardInstance * cardOne = NEW MTGCardInstance(cardone, copy->owner->game); to->addCard(cardOne); WEvent * e = NEW WEventZoneChange(cardOne, from, to); g->receiveEvent(e); - MTGCard * cardtwo = MTGCollection()->getCardByName(names[1]); + MTGCard * cardtwo = MTGCollection()->getCardByName(names[1], copy->setId); MTGCardInstance * cardTwo = NEW MTGCardInstance(cardtwo, copy->owner->game); to->addCard(cardTwo); WEvent * e2 = NEW WEventZoneChange(cardTwo, from, to);