From e3aff3c23a5b70cf95dd364fba153797855f35d3 Mon Sep 17 00:00:00 2001 From: Vittorio Alfieri Date: Thu, 31 Dec 2020 17:32:34 +0100 Subject: [PATCH] Fixed trophy image rendering for hi-res quality, fixed all primitives with XX cost, added some missing primitives from ol sets. --- .../bin/Res/sets/primitives/borderline.txt | 72 ++++++++++++--- projects/mtg/bin/Res/sets/primitives/mtg.txt | 90 +++++++++---------- .../bin/Res/sets/primitives/unsupported.txt | 39 -------- projects/mtg/src/WGui.cpp | 4 + 4 files changed, 110 insertions(+), 95 deletions(-) diff --git a/projects/mtg/bin/Res/sets/primitives/borderline.txt b/projects/mtg/bin/Res/sets/primitives/borderline.txt index 71089bdef..b6bb83d46 100644 --- a/projects/mtg/bin/Res/sets/primitives/borderline.txt +++ b/projects/mtg/bin/Res/sets/primitives/borderline.txt @@ -5065,6 +5065,15 @@ power=2 toughness=2 [/card] [card] +name=Bottled Cloister +auto=@each opponent upkeep:all(*|myhand) moveto(ownerexile) and!( counter(0/0,1,BottledExiled) )! +auto=@each my upkeep:draw:1 controller +auto=@each my upkeep:all(*[counter{0/0.1.BottledExiled}]|myexile) moveto(myhand) +text=At the beginning of each opponent's upkeep, exile all cards from your hand face down. -- At the beginning of your upkeep, return all cards you own exiled with Bottled Cloister to your hand, then draw a card. +mana={4} +type=Artifact +[/card] +[card] name=Bombard target=creature auto=damage:4 @@ -5277,6 +5286,16 @@ power=4 toughness=3 [/card] [card] +name=Bonfire of the Damned +target=player +auto=ifnot paid(alternative) then thisforeach(variable{halfpaid}>0) damage:1 && damage:1 all(creature|targetedpersonsbattlefield) +auto=if paid(alternative) then thisforeach(X>0) damage:1 && damage:1 all(creature|targetedpersonsbattlefield) +autohand={X}{R} restriction{miracle,type(Bonfire of the Damned[fresh]|myhand)~morethan~0}:name(Miracle) target(Bonfire of the Damned[fresh]|myhand) activate name(Miracle) castcard(alternative restricted) +text=Bonfire of the Damned deals X damage to target player and each creature he or she controls. -- Miracle {X}{R} (You may cast this card for its miracle cost when you draw it if it's the first card you drew this turn.) +mana={X}{X}{R} +type=Sorcery +[/card] +[card] name=Bontu the Glorified abilities=menace, indestructible, cantattack, cantblock auto=@movedto(creature|mygraveyard) from(mybattlefield): -cantattack ueot @@ -5796,6 +5815,16 @@ power=5 toughness=6 [/card] [card] +name=Brine Seer +auto={2}{U}{T}:name(Counter spell) name(Counter spell) target(*|stack) transforms((,newability[thisforeach(variable{type:*[blue]:opponenthand}>0) pay[[{1}]] name(pay mana) donothing?fizzle])) oneshot +text={2}{U}, {T}: Reveal any number of blue cards in your hand. Counter target spell unless its controller pays {1} for each card revealed this way. +mana={3}{U} +type=Creature +subtype=Human Wizard +power=1 +toughness=1 +[/card] +[card] name=Brineborn Cutthroat ability=flash auto=@movedto(*|stack) from(*|myhand) restriction{opponentturnonly}:counter(1/1,1) @@ -6580,6 +6609,17 @@ power=2 toughness=3 [/card] [card] +name=Carrion Rats +auto=@combat(attacking,blocking) source(this):ability$!name(Choose one) choice name(Exile a card) moveto(exile) target(*|mygraveyard) && all(mystored) fog from(this) _ choice name(Don't exile any card) donothing!$ opponent +auto=@combat(attacking,blocking) source(this):ability$!name(Choose one) choice name(Exile a card) moveto(exile) target(*|mygraveyard) && all(mystored) fog from(this) _ choice name(Don't exile any card) donothing!$ controller +text=Whenever Carrion Rats attacks or blocks, any player may exile a card from his or her graveyard. If a player does, Carrion Rats assigns no combat damage this turn. +mana={B} +type=Creature +subtype=Rat +power=2 +toughness=1 +[/card] +[card] name=Carrion Screecher abilities=flying text=Flying @@ -6590,6 +6630,17 @@ power=3 toughness=1 [/card] [card] +name=Carrion Wurm +auto=@combat(attacking,blocking) source(this):ability$!name(Choose one) choice name(Exile a card) moveto(exile) target(*|mygraveyard) && all(mystored) fog from(this) _ choice name(Don't exile any card) donothing!$ opponent +auto=@combat(attacking,blocking) source(this):ability$!name(Choose one) choice name(Exile a card) moveto(exile) target(*|mygraveyard) && all(mystored) fog from(this) _ choice name(Don't exile any card) donothing!$ controller +text=Whenever Carrion Wurm attacks or blocks, any player may exile three cards from his or her graveyard. If a player does, Carrion Wurm assigns no combat damage this turn. +mana={3}{B}{B} +type=Creature +subtype=Zombie Wurm +power=6 +toughness=5 +[/card] +[card] name=Carrionette autograveyard={2}{B}{B}{E}:ability$!name(pay or exile) pay[[{2}]] name(pay 2 mana) donothing?all(opponent) moveTo(exile) target(creature)!$ opponent text={2}{B}{B}: Exile Carrionette and target creature unless that creature's controller pays {2}. Activate this ability only if Carrionette is in your graveyard. @@ -14639,9 +14690,9 @@ type=Sorcery [/card] [card] name=Entreat the Dead -target=creature|mygraveyard -auto=moveTo(myBattlefield) -autohand=restriction{miracle} pay[[{X}{B}{B}]] name(Miracle) activate name(Miracle) castcard(restricted) +auto=ifnot paid(alternative) then thisforeach(variable{halfpaid}>0) ability$!name(Return target creature) name(Return target creature) target(creature|mygraveyard) moveTo(myBattlefield)!$ controller +auto=if paid(alternative) then thisforeach(X>0) ability$!name(Return target creature) name(Return target creature) target(creature|mygraveyard) moveTo(myBattlefield)!$ controller +autohand={X}{B}{B} restriction{miracle,type(Entreat the Dead[fresh]|myhand)~morethan~0}:name(Miracle) target(Entreat the Dead[fresh]|myhand) activate name(Miracle) castcard(alternative restricted) text=Return X target creature cards from your graveyard to the battlefield. -- Miracle {X}{B}{B} (You may cast this card for its miracle cost when you draw it if it’s the first card you drew this turn.) mana={X}{X}{B}{B}{B} type=Sorcery @@ -17096,7 +17147,7 @@ toughness=5 [card] name=Folio of Fancies abilities=nomaxhand,oppnomaxhand -auto={X}{X}{T}:draw:XX all(player) +auto={X}{X}{T}:name(Each player draws cards) name(Each player draws cards) draw:XX all(player) auto={2}{U}{T}:deplete:type:*:opponenthand opponent text=Players have no maximum hand size. -- {X}{X}, {T}: Each player draws X cards. -- {2}{U}, {T}: Each opponent puts a number of cards equal to the number of cards in their hand from the top of their library into their graveyard. mana={1}{U} @@ -17711,7 +17762,7 @@ type=Instant [/card] [card] name=Full Flowering -auto=thisforeach(X) clone notatarget(creature[token]|mybattlefield) !$ controller +auto=thisforeach(variable{halfpaid}) ability$!name(Clone target token) name(Clone target token) clone notatarget(creature[token]|mybattlefield)!$ controller text=Populate X times. (To populate, create a token that's a copy of a creature token you control. Do this X times.) mana={X}{X}{G} type=Sorcery @@ -22371,7 +22422,7 @@ type=Sorcery [/card] [card] name=Hour of Eternity -target=creature|myGraveyard +target=creature|myGraveyard auto=clone and!( transforms((Zombie,removemc,setpower=4,settoughness=4,black)) forever )! auto=moveto(exile) text=Exile X target creature cards from your graveyard. For each card exiled this way, create a token that's a copy of that card, except it's a 4/4 black Zombie. @@ -37842,8 +37893,9 @@ type=Instant [/card] [card] name=Recall -auto=name(discard) notatarget(*|myhand) transforms((,newability[reject],newability[moveto(ownerhand) notatarget(*|mygraveyard)])) -auto=moveto(exile) all(this) +target=*|myhand +abilities=exiledeath +auto=transforms((,newability[reject],newability[name(Return a card from graveyard) name(Return a card from graveyard) moveto(ownerhand) target(*|mygraveyard)])) forever text=Discard X cards, then return a card from your graveyard to your hand for each card discarded this way. Exile Recall. mana={X}{X}{U} type=Sorcery @@ -46135,8 +46187,8 @@ type=Sorcery [/card] [card] name=Springbloom Druid -aicode=activate moveTo(myBattlefield) and!(tap(noevent))! target(land[basic]|myLibrary) -auto={S(land|myBattlefield)}:name(search card) reveal:plibrarycount optionone name(choose card) target(land[basic]|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(moveTo(myBattlefield) and!(tap(noevent))!)! afterrevealedend revealend limit:1 +aicode=may sacrifice target(land|myBattlefield) && activate moveTo(myBattlefield) and!(tap(noevent))! target(land[basic]|myLibrary) +auto=may name(Sacrifice a land) sacrifice target(land|myBattlefield) && name(search card) reveal:plibrarycount optionone name(choose card) target(land[basic]|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(moveTo(myBattlefield) and!(tap(noevent))!)! afterrevealedend revealend limit:1 text=When Springbloom Druid enters the battlefield, you may sacrifice a land. If you do, search your library for up to two basic land cards, put them onto the battlefield tapped, then shuffle your library. mana={2}{G} type=Creature diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index 6a0aaf774..f23c99b43 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -25772,11 +25772,8 @@ type=Instant [/card] [card] name=Dark Salvation -#target=player -#auto=token(Zombie,Creature Zombie,2/2,black)*xx targetedplayer -#auto=ability$!name(Darkness) target(creature|Battlefield) foreach(zombie|myBattlefield) -1/-1!$ targetedplayer -auto=token(Zombie,Creature Zombie,2/2,black)*xx -auto=name(-X/-X) target(creature|Battlefield) -type:zombie:myBattlefield/-type:zombie:myBattlefield +target=player +auto=token(Zombie,Creature Zombie,2/2,black)*xx targetedplayer && ability$!name(Choose one) choice name(Don't target any creature) donothing _ choice name(Target opponent's creature) target(creature|opponentBattlefield) -type:zombie:opponentBattlefield/-type:zombie:opponentBattlefield ueot _ choice name(Target your creature) target(creature|myBattlefield) -type:zombie:myBattlefield/-type:zombie:myBattlefield ueot!$ controller text=Target player puts X 2/2 black Zombie creature tokens onto the battlefield, then up to one target creature gets -1/-1 until end of turn for each Zombie that player controls. mana={X}{X}{B} type=Sorcery @@ -82711,22 +82708,22 @@ type=Enchantment [card] name=Orcish Settlers auto={R}{T}{S}:name(X = 0) donothing -auto={1}{R}{T}{S}:name(X = 1) target(other land) destroy -auto={2}{R}{T}{S}:name(X = 2) target(<2>other land) destroy -auto={3}{R}{T}{S}:name(X = 3) target(<3>other land) destroy -auto={4}{R}{T}{S}:name(X = 4) target(<4>other land) destroy -auto={5}{R}{T}{S}:name(X = 5) target(<5>other land) destroy -auto={6}{R}{T}{S}:name(X = 6) target(<6>other land) destroy -auto={7}{R}{T}{S}:name(X = 7) target(<7>other land) destroy -auto={8}{R}{T}{S}:name(X = 8) target(<8>other land) destroy -auto={9}{R}{T}{S}:name(X = 9) target(<9>other land) destroy -auto={10}{R}{T}{S}:name(X = 10) target(<10>other land) destroy -auto={11}{R}{T}{S}:name(X = 11) target(<11>other land) destroy -auto={12}{R}{T}{S}:name(X = 12) target(<12>other land) destroy -auto={13}{R}{T}{S}:name(X = 13) target(<13>other land) destroy -auto={14}{R}{T}{S}:name(X = 14) target(<14>other land) destroy -auto={15}{R}{T}{S}:name(X = 15) target(<15>other land) destroy -auto={16}{R}{T}{S}:name(X = 16) target(<16>other land) destroy +auto={2}{R}{T}{S}:name(X = 1) target(other land) destroy +auto={4}{R}{T}{S}:name(X = 2) target(<2>other land) destroy +auto={6}{R}{T}{S}:name(X = 3) target(<3>other land) destroy +auto={8}{R}{T}{S}:name(X = 4) target(<4>other land) destroy +auto={10}{R}{T}{S}:name(X = 5) target(<5>other land) destroy +auto={12}{R}{T}{S}:name(X = 6) target(<6>other land) destroy +auto={14}{R}{T}{S}:name(X = 7) target(<7>other land) destroy +auto={16}{R}{T}{S}:name(X = 8) target(<8>other land) destroy +auto={18}{R}{T}{S}:name(X = 9) target(<9>other land) destroy +auto={20}{R}{T}{S}:name(X = 10) target(<10>other land) destroy +auto={22}{R}{T}{S}:name(X = 11) target(<11>other land) destroy +auto={24}{R}{T}{S}:name(X = 12) target(<12>other land) destroy +auto={26}{R}{T}{S}:name(X = 13) target(<13>other land) destroy +auto={28}{R}{T}{S}:name(X = 14) target(<14>other land) destroy +auto={30}{R}{T}{S}:name(X = 15) target(<15>other land) destroy +auto={32}{R}{T}{S}:name(X = 16) target(<16>other land) destroy text={X}{X}{R}, {T}, Sacrifice Orcish Settlers: Destroy X target lands. mana={1}{R} type=Creature @@ -83953,24 +83950,26 @@ toughness=3 [/card] [card] name=Panacea -auto={1}{T}:name(X = 1) prevent:1 target(creature,player) -auto={2}{T}:name(X = 2) prevent:2 target(creature,player) -auto={3}{T}:name(X = 3) prevent:3 target(creature,player) -auto={4}{T}:name(X = 4) prevent:4 target(creature,player) -auto={5}{T}:name(X = 5) prevent:5 target(creature,player) -auto={6}{T}:name(X = 6) prevent:6 target(creature,player) -auto={7}{T}:name(X = 7) prevent:7 target(creature,player) -auto={8}{T}:name(X = 8) prevent:8 target(creature,player) -auto={9}{T}:name(X = 9) prevent:9 target(creature,player) -auto={10}{T}:name(X = 10) prevent:10 target(creature,player) -auto={11}{T}:name(X = 11) prevent:11 target(creature,player) -auto={12}{T}:name(X = 12) prevent:12 target(creature,player) -auto={13}{T}:name(X = 13) prevent:13 target(creature,player) -auto={14}{T}:name(X = 14) prevent:14 target(creature,player) -auto={15}{T}:name(X = 15) prevent:15 target(creature,player) -auto={16}{T}:name(X = 16) prevent:16 target(creature,player) -auto={17}{T}:name(X = 17) prevent:17 target(creature,player) -auto={18}{T}:name(X = 18) prevent:18 target(creature,player) +auto={2}{T}:name(X = 1) prevent:1 target(creature,player) +auto={4}{T}:name(X = 2) prevent:2 target(creature,player) +auto={6}{T}:name(X = 3) prevent:3 target(creature,player) +auto={8}{T}:name(X = 4) prevent:4 target(creature,player) +auto={10}{T}:name(X = 5) prevent:5 target(creature,player) +auto={12}{T}:name(X = 6) prevent:6 target(creature,player) +auto={14}{T}:name(X = 7) prevent:7 target(creature,player) +auto={16}{T}:name(X = 8) prevent:8 target(creature,player) +auto={18}{T}:name(X = 9) prevent:9 target(creature,player) +auto={20}{T}:name(X = 10) prevent:10 target(creature,player) +auto={22}{T}:name(X = 11) prevent:11 target(creature,player) +auto={24}{T}:name(X = 12) prevent:12 target(creature,player) +auto={26}{T}:name(X = 13) prevent:13 target(creature,player) +auto={28}{T}:name(X = 14) prevent:14 target(creature,player) +auto={30}{T}:name(X = 15) prevent:15 target(creature,player) +auto={32}{T}:name(X = 16) prevent:16 target(creature,player) +auto={34}{T}:name(X = 17) prevent:17 target(creature,player) +auto={36}{T}:name(X = 18) prevent:18 target(creature,player) +auto={38}{T}:name(X = 19) prevent:19 target(creature,player) +auto={40}{T}:name(X = 20) prevent:20 target(creature,player) text={X}{X}, {T}: Prevent the next X damage that would be dealt to target creature or player this turn. mana={4} type=Artifact @@ -90127,7 +90126,7 @@ toughness=5 [card] name=Quarantine Field auto=counter(0/0,xx,Isolation) -auto=this(variable{xx} >0) (blink)forsrc target(*[-land]|opponentbattlefield) +auto=this(variable{halfpaid}>0) (blink)forsrc target(*[-land]|opponentbattlefield) text=Quarantine Field enters the battlefield with X isolation counters on it. -- When Quarantine Field enters the battlefield, for each isolation counter on it, exile up to one target nonland permanent an opponent controls until Quarantine Field leaves the battlefield. mana={X}{X}{W}{W} type=Enchantment @@ -93421,7 +93420,7 @@ type=Sorcery name=Release the Gremlins target=artifact auto=destroy -auto=create(Gremlin:Creature Gremlin:2/2:red)*X +auto=create(Gremlin:Creature Gremlin:2/2:red)*xx text=Destroy X target artifacts. Create X 2/2 red Gremlin creature tokens. mana={X}{X}{R} type=Sorcery @@ -114290,8 +114289,7 @@ toughness=3 name=Street Spasm abilities=overload other={X}{X}{R}{R} name(Overload) -target=creature[-flying]|opponentbattlefield -auto=paidmana damage:X +auto=paidmana damage:X target(creature[-flying]|opponentbattlefield) auto=overload damage:XX all(creature[-flying]|opponentbattlefield) text=Street Spasm deals X damage to target creature without flying you don't control. -- Overload {X}{X}{R}{R} (You may cast this spell for its overload cost. If you do, change its text by replacing all instances of "target" with "each.") mana={X}{R} @@ -133032,7 +133030,7 @@ type=Artifact name=Whetwheel facedown={3} autofacedown={3}:morph -auto={X}{X}{T}:deplete:XX target(player) +auto={X}{X}{T}:name(Target player mills cards) name(Target player mills cards) deplete:XX target(player) text={X}{X}, {T}: Target player puts the top X cards of his or her library into his or her graveyard. -- Morph {3} (You may cast this face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.) mana={4} type=Artifact @@ -133767,8 +133765,8 @@ toughness=3 [/card] [card] name=Wildest Dreams -auto=this(variable{castx} >0) moveto(myhand) notatarget(*|mygraveyard) -auto=moveto(exile) all(this) +abilities=exiledeath +auto=this(variable{halfpaid} >0) moveto(myhand) notatarget(*|mygraveyard) text=Return X target cards from your graveyard to your hand. Exile Wildest Dreams. mana={X}{X}{G} type=Sorcery diff --git a/projects/mtg/bin/Res/sets/primitives/unsupported.txt b/projects/mtg/bin/Res/sets/primitives/unsupported.txt index 96ec1b82e..863524473 100644 --- a/projects/mtg/bin/Res/sets/primitives/unsupported.txt +++ b/projects/mtg/bin/Res/sets/primitives/unsupported.txt @@ -1293,12 +1293,6 @@ power=4 toughness=2 [/card] [card] -name=Bonfire of the Damned -text=Bonfire of the Damned deals X damage to target player and each creature he or she controls. -- Miracle {X}{R} (You may cast this card for its miracle cost when you draw it if it's the first card you drew this turn.) -mana={X}{X}{R} -type=Sorcery -[/card] -[card] name=Bonus Round text=Until end of turn, whenever a player casts an instant or sorcery spell, that player copies it and may choose new targets for the copy. mana={1}{R}{R} @@ -1389,12 +1383,6 @@ power=1 toughness=4 [/card] [card] -name=Bottled Cloister -text=At the beginning of each opponent's upkeep, exile all cards from your hand face down. -- At the beginning of your upkeep, return all cards you own exiled with Bottled Cloister to your hand, then draw a card. -mana={4} -type=Artifact -[/card] -[card] name=Bound // Determined text=Sacrifice a creature. Return up to X cards from your graveyard to your hand, where X is the number of colors that creature was. Exile this card. -- // -- Other spells you control can't be countered by spells or abilities this turn. -- Draw a card. mana={3}{B}{G} // {G}{U} @@ -1478,15 +1466,6 @@ power=2 toughness=2 [/card] [card] -name=Brine Seer -text={2}{U}, {T}: Reveal any number of blue cards in your hand. Counter target spell unless its controller pays {1} for each card revealed this way. -mana={3}{U} -type=Creature -subtype=Human Wizard -power=1 -toughness=1 -[/card] -[card] name=Broken Ambitions text=Counter target spell unless its controller pays {X}. Clash with an opponent. If you win, that spell's controller puts the top four cards of his or her library into his or her graveyard. (Each clashing player reveals the top card of his or her library, then puts that card on the top or bottom. A player wins if his or her card had a higher converted mana cost.) mana={X}{U} @@ -1809,24 +1788,6 @@ mana={G} type=Enchantment [/card] [card] -name=Carrion Rats -text=Whenever Carrion Rats attacks or blocks, any player may exile a card from his or her graveyard. If a player does, Carrion Rats assigns no combat damage this turn. -mana={B} -type=Creature -subtype=Rat -power=2 -toughness=1 -[/card] -[card] -name=Carrion Wurm -text=Whenever Carrion Wurm attacks or blocks, any player may exile three cards from his or her graveyard. If a player does, Carrion Wurm assigns no combat damage this turn. -mana={3}{B}{B} -type=Creature -subtype=Zombie Wurm -power=6 -toughness=5 -[/card] -[card] name=Carry Away text=Enchant Equipment -- When Carry Away enters the battlefield, unattach enchanted Equipment. -- You control enchanted Equipment. mana={U}{U} diff --git a/projects/mtg/src/WGui.cpp b/projects/mtg/src/WGui.cpp index 3d42e8904..b2c2d7d22 100644 --- a/projects/mtg/src/WGui.cpp +++ b/projects/mtg/src/WGui.cpp @@ -1356,6 +1356,10 @@ void WGuiAward::Underlay() trophy->SetHotSpot(0,0); JRenderer::GetInstance()->RenderQuad(trophy.get(), 0, SCREEN_HEIGHT-trophy->mHeight); } + else if(trophy->mHeight == 1268.f && trophy->mWidth == 1203.f) + { + JRenderer::GetInstance()->RenderQuad(trophy.get(), -17, SCREEN_HEIGHT-35, 0, 240.f / trophy->mWidth, 210.f / trophy->mHeight); + } else JRenderer::GetInstance()->RenderQuad(trophy.get(), 0, SCREEN_HEIGHT, 0, 171.f / trophy->mWidth, 192.f / trophy->mHeight); }