From 09672ce89bbe4dae44840547749d042db05fbc9e Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Tue, 5 Jul 2016 23:33:55 +0800 Subject: [PATCH 1/9] Added Delver of Secrets & Tasigur --- projects/mtg/bin/Res/sets/primitives/mtg.txt | 65 ++++++++++++++----- .../bin/Res/sets/primitives/unsupported.txt | 18 ----- 2 files changed, 47 insertions(+), 36 deletions(-) diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index 5b9ee34a1..fde60a7a6 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -26020,6 +26020,16 @@ mana={3}{U} type=Enchantment [/card] [card] +name=Delver of Secrets +auto=@each my upkeep:reveal:1 optionone name(transform) target(*[instant;sorcery]|reveal) moveto(mylibrary) and!( all(this) transforms((,newability[flip(Insectile Aberration)])) forever )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(mylibrary) optiontwoend revealend +text=At the beginning of your upkeep, look at the top card of your library. You may reveal that card. If an instant or sorcery card is revealed this way, transform Delver of Secrets. +mana={U} +type=Creature +subtype=Human Wizard +power=1 +toughness=1 +[/card] +[card] name=Dematerialize target=* auto=moveTo(ownerhand) @@ -39521,6 +39531,13 @@ mana={1}{G} type=Enchantment [/card] [card] +name=Fork in the Road +auto=name(put in hand) moveto(myhand) notatarget(land[basic]|mylibrary) and!(name(put in graveyard) moveto(mygraveyard) notatarget(land[basic]|mylibrary))! oneshot +text=Search your library for up to two basic land cards and reveal them. Put one into your hand and the other into your graveyard. Then shuffle your library. +mana={1}{G} +type=Sorcery +[/card] +[card] name=Forked Bolt target=creature,player auto=damage:1 @@ -39548,13 +39565,6 @@ mana={R}{R} type=Instant [/card] [card] -name=Fork in the Road -auto=name(put in hand) moveto(myhand) notatarget(land[basic]|mylibrary) and!(name(put in graveyard) moveto(mygraveyard) notatarget(land[basic]|mylibrary))! oneshot -text=Search your library for up to two basic land cards and reveal them. Put one into your hand and the other into your graveyard. Then shuffle your library. -mana={1}{G} -type=Sorcery -[/card] -[card] name=Forlorn Pseudamma abilities=intimidate auto=@untapped(this):name(pay 2B for 2/2 Zombie) pay[[{2}{B}]] name(Pay 2B) token(Zombie,Enchantment Creature Zombie,2/2,black) controller @@ -53868,6 +53878,14 @@ toughness=1 color=green [/card] [card] +name=Insectile Aberration +type=Creature +abilities=flying +subtype=Human Insect +power=3 +toughness=2 +[/card] +[card] name=Inside Out target=creature auto=swap @@ -91655,6 +91673,17 @@ power=2 toughness=1 [/card] [card] +name=Sarkhan the Mad +auto=counter(0/0,7,loyalty) +auto={0}:name(0: reveal damage) Reveal:1 revealzone(mylibrary) revealuntil(*|mylibrary) optionone name(put in hand) target(*|reveal) moveto(myhand) optiononeend afterrevealed all(this) damage:revealedmana afterrevealedend revealend +auto={C(0/0,-2,Loyalty)}:name(-2: sacrifice) target(creature) sacrifice and!( token(Dragon,creature dragon,5/5,flying,red) targetcontroller )! +auto={C(0/0,-4,Loyalty)}:name(-4: ultimate) all(creature[dragon]|mybattlefield) transforms((,newability[target(player) dynamicability])) oneshot +text=0: Reveal the top card of your library and put it into your hand. Sarkhan the Mad deals damage to himself equal to that card's converted mana cost. -- -2: Target creature's controller sacrifices it, then that player puts a 5/5 red Dragon creature token with flying onto the battlefield. -- -4: Each Dragon creature you control deals damage equal to its power to target player. +mana={3}{B}{R} +type=Planeswalker +subtype=Sarkhan +[/card] +[card] name=Sarkhan Unbroken auto=counter(0/0,9,Loyalty) auto={C(0/0,1,Loyalty)}:name(+1: Draw card add mana) draw:1 controller && transforms((,newability[activatechooseacolor add{chosencolor} activatechooseend])) forever asSorcery @@ -91688,17 +91717,6 @@ type=Planeswalker subtype=Sarkhan [/card] [card] -name=Sarkhan the Mad -auto=counter(0/0,7,loyalty) -auto={0}:name(0: reveal damage) Reveal:1 revealzone(mylibrary) revealuntil(*|mylibrary) optionone name(put in hand) target(*|reveal) moveto(myhand) optiononeend afterrevealed all(this) damage:revealedmana afterrevealedend revealend -auto={C(0/0,-2,Loyalty)}:name(-2: sacrifice) target(creature) sacrifice and!( token(Dragon,creature dragon,5/5,flying,red) targetcontroller )! -auto={C(0/0,-4,Loyalty)}:name(-4: ultimate) all(creature[dragon]|mybattlefield) transforms((,newability[target(player) dynamicability])) oneshot -text=0: Reveal the top card of your library and put it into your hand. Sarkhan the Mad deals damage to himself equal to that card's converted mana cost. -- -2: Target creature's controller sacrifices it, then that player puts a 5/5 red Dragon creature token with flying onto the battlefield. -- -4: Each Dragon creature you control deals damage equal to its power to target player. -mana={3}{B}{R} -type=Planeswalker -subtype=Sarkhan -[/card] -[card] name=Sarkhan's Rage target=creature,player|battlefield auto=damage:5 @@ -109363,6 +109381,17 @@ power=1 toughness=1 [/card] [card] +name=Tasigur, the Golden Fang +other={delve} name(Delve) +auto={2}{GU}{GU}:deplete:2 controller && ability$! moveto(ownerhand) notatarget(*[-land]|opponentgraveyard) !$ opponent +text=Delve (Each card you exile from your graveyard while casting this spell pays for {1}.) -- {2}{GU}{GU}: Put the top two cards of your library into your graveyard, then return a nonland card of an opponent's choice from your graveyard to your hand. +mana={5}{B} +type=Legendary Creature +subtype=Human Shaman +power=4 +toughness=5 +[/card] +[card] name=Tasigur's Cruelty auto=ability$!name(discard 2 cards) target(*|myhand) reject!$ opponent text=Delve (Each card you exile from your graveyard while casting this spell pays for {1}.) -- Each opponent discards two cards. diff --git a/projects/mtg/bin/Res/sets/primitives/unsupported.txt b/projects/mtg/bin/Res/sets/primitives/unsupported.txt index a59319600..663c59f73 100644 --- a/projects/mtg/bin/Res/sets/primitives/unsupported.txt +++ b/projects/mtg/bin/Res/sets/primitives/unsupported.txt @@ -4005,15 +4005,6 @@ mana={2}{B} type=Sorcery [/card] [card] -name=Delver of Secrets -text=At the beginning of your upkeep, look at the top card of your library. You may reveal that card. If an instant or sorcery card is revealed this way, transform Delver of Secrets. -mana={U} -type=Creature -subtype=Human Wizard -power=1 -toughness=1 -[/card] -[card] name=Dementia Sliver text=All Slivers have "{T}: Name a card. Target opponent reveals a card at random from his or her hand. If it's the named card, that player discards it. Activate this ability only during your turn." mana={3}{U}{B} @@ -17769,15 +17760,6 @@ mana={1}{W} type=Sorcery [/card] [card] -name=Tasigur, the Golden Fang -text=Delve (Each card you exile from your graveyard while casting this spell pays for {1}.) -- {2}{GU}{GU}: Put the top two cards of your library into your graveyard, then return a nonland card of an opponent's choice from your graveyard to your hand. -mana={5}{B} -type=Legendary Creature -subtype=Human Shaman -power=4 -toughness=5 -[/card] -[card] name=Task Mage Assembly text=When there are no creatures on the battlefield, sacrifice Task Mage Assembly. -- {2}: Task Mage Assembly deals 1 damage to target creature. Any player may activate this ability but only any time he or she could cast a sorcery. mana={2}{R} From 2cb773dd4823a6628194792c52b2b3468aff94eb Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Wed, 6 Jul 2016 04:23:46 +0800 Subject: [PATCH 2/9] Added Yisan and Zameck --- projects/mtg/bin/Res/sets/primitives/mtg.txt | 31 +++++++++++++++++++ .../bin/Res/sets/primitives/unsupported.txt | 27 ---------------- 2 files changed, 31 insertions(+), 27 deletions(-) diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index fde60a7a6..c13600b2a 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -126608,6 +126608,26 @@ power=3 toughness=3 [/card] [card] +name=Yisan, the Wanderer Bard +auto={2}{G}{T}{C(0/0,1,Verse)}:name(search creature) Reveal:type:*:mylibrary revealzone(mylibrary) revealtype(*[creature]|mylibrary) optionone target(creature[manacost=counter{0%0.1.Verse}]|reveal) moveto(mybattlefield) and!( all(*|reveal) moveto(mylibrary) )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(mylibrary) and!( all(*|reveal) moveto(mylibrary) )! optiontwoend afterrevealed shuffle afterrevealedend revealend +text={2}{G}, {T}, Put a verse counter on Yisan, the Wanderer Bard: Search your library for a creature card with converted mana cost equal to the number of verse counters on Yisan, put it onto the battlefield, then shuffle your library. +mana={2}{G} +type=Legendary Creature +subtype=Human Rogue +power=2 +toughness=3 +[/card] +[card] +name=Yixlid Jailer +auto=lord(*|graveyard) loseabilities +text=Cards in graveyards lose all abilities. +mana={1}{B} +type=Creature +subtype=Zombie Wizard +power=2 +toughness=1 +[/card] +[card] name=Yoke of the Damned target=creature auto=@movedTo(graveyard) from(creature|battlefield):destroy @@ -126770,6 +126790,17 @@ power=2 toughness=1 [/card] [card] +name=Zameck Guildmage +auto={G}{U}:name(1/1 counters) emblem transforms((,newability[@movedto(creature|myBattlefield):all(trigger[to]) counter(1/1.1)])) ueot +auto={G}{U}{C(1/1,-1),*|mybattlefield}:name(remove a 1/1 counter) draw:1 +text={G}{U}: This turn, each creature you control enters the battlefield with an additional +1/+1 counter on it. -- {G}{U}, Remove a +1/+1 counter from a creature you control: Draw a card. +mana={G}{U} +type=Creature +subtype=Elf Wizard +power=2 +toughness=2 +[/card] +[card] name=Zanam Djinn abilities=flying auto=this(variable{commonblue}>0) -2/-2 diff --git a/projects/mtg/bin/Res/sets/primitives/unsupported.txt b/projects/mtg/bin/Res/sets/primitives/unsupported.txt index 663c59f73..853855c96 100644 --- a/projects/mtg/bin/Res/sets/primitives/unsupported.txt +++ b/projects/mtg/bin/Res/sets/primitives/unsupported.txt @@ -20304,24 +20304,6 @@ power=3 toughness=6 [/card] [card] -name=Yisan, the Wanderer Bard -text={2}{G}, {T}, Put a verse counter on Yisan, the Wanderer Bard: Search your library for a creature card with converted mana cost equal to the number of verse counters on Yisan, put it onto the battlefield, then shuffle your library. -mana={2}{G} -type=Legendary Creature -subtype=Human Rogue -power=2 -toughness=3 -[/card] -[card] -name=Yixlid Jailer -text=Cards in graveyards lose all abilities. -mana={1}{B} -type=Creature -subtype=Zombie Wizard -power=2 -toughness=1 -[/card] -[card] name=Yosei, the Morning Star text=Flying -- When Yosei, the Morning Star dies, target player skips his or her next untap step. Tap up to five target permanents that player controls. mana={4}{W}{W} @@ -20364,15 +20346,6 @@ power=3 toughness=3 [/card] [card] -name=Zameck Guildmage -text={G}{U}: This turn, each creature you control enters the battlefield with an additional +1/+1 counter on it. -- {G}{U}, Remove a +1/+1 counter from a creature you control: Draw a card. -mana={G}{U} -type=Creature -subtype=Elf Wizard -power=2 -toughness=2 -[/card] -[card] name=Zealous Inquisitor text={1}{W}: The next 1 damage that would be dealt to Zealous Inquisitor this turn is dealt to target creature instead. mana={2}{W} From e15734d17ebb6cf6e243711f6b2d89f97aa50d19 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Wed, 6 Jul 2016 04:24:07 +0800 Subject: [PATCH 3/9] White border for Deckmaster Set --- projects/mtg/src/CardGui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/mtg/src/CardGui.cpp b/projects/mtg/src/CardGui.cpp index a4f18ed41..b8584c7bd 100644 --- a/projects/mtg/src/CardGui.cpp +++ b/projects/mtg/src/CardGui.cpp @@ -1114,7 +1114,7 @@ void CardGui::RenderBig(MTGCard* card, const Pos& pos, bool thumb, bool noborder string cardsetname = setlist[card->setId].c_str(); if(!noborder) { - if(cardsetname == "2ED"||cardsetname == "RV"||cardsetname == "4ED"||cardsetname == "5ED"||cardsetname == "6ED"||cardsetname == "7ED"||cardsetname == "8ED"||cardsetname == "9ED"||cardsetname == "CHR") + if(cardsetname == "2ED"||cardsetname == "RV"||cardsetname == "4ED"||cardsetname == "5ED"||cardsetname == "6ED"||cardsetname == "7ED"||cardsetname == "8ED"||cardsetname == "9ED"||cardsetname == "CHR"||cardsetname == "DM") { //like white border renderer->FillRoundRect(x-92,pos.actY-130, (scale * quad->mWidth)-10, (scale * quad->mHeight)-11, 9.0f,ARGB(255,248,248,255)); From 16f7ae54b8d77b08c8f9967d666e3f006b6a1344 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Wed, 6 Jul 2016 04:26:01 +0800 Subject: [PATCH 4/9] Fix Deck Mana Symbol Rendering deckmanaColors was increased to 7, made this >=6 so it's compatible with old deck stats --- projects/mtg/src/DeckMenu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/mtg/src/DeckMenu.cpp b/projects/mtg/src/DeckMenu.cpp index 898b83215..7d32a4727 100644 --- a/projects/mtg/src/DeckMenu.cpp +++ b/projects/mtg/src/DeckMenu.cpp @@ -122,7 +122,7 @@ void DeckMenu::RenderDeckManaColors() if (mSelectedDeck &&displayDeckMana) { string deckManaColors = mSelectedDeck->getColorIndex().c_str(); - if (deckManaColors.size() == 6) + if (deckManaColors.size() >= 6) { // due to space constraints don't display icons for colorless mana. for( int colorIdx = Constants::MTG_COLOR_GREEN; colorIdx < Constants::MTG_COLOR_WASTE; ++colorIdx ) From 51d06d823421ca1fab722d936e5055f1b9b5795e Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Wed, 6 Jul 2016 05:23:25 +0800 Subject: [PATCH 5/9] removed alias for overload --- projects/mtg/bin/Res/sets/primitives/mtg.txt | 26 ++++++++++---------- projects/mtg/include/MTGDefinitions.h | 11 +++++---- projects/mtg/src/MTGDefinitions.cpp | 11 +++++---- projects/mtg/src/MTGRules.cpp | 4 +-- 4 files changed, 27 insertions(+), 25 deletions(-) diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index c13600b2a..ed0a3183f 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -11945,7 +11945,7 @@ toughness=1 [/card] [card] name=Blustersquall -alias=11000 +abilities=overload other={3}{U} name(Overload) target=creature|opponentbattlefield auto=overload tap all(creature|opponentbattlefield) @@ -17740,7 +17740,7 @@ type=Sorcery [/card] [card] name=Chemister's Trick -alias=11000 +abilities=overload other={3}{U}{R} name(Overload) target=creature|opponentbattlefield auto=paidmana -2/0 @@ -21242,7 +21242,7 @@ type=Instant [/card] [card] name=Counterflux -alias=11000 +abilities=overload other={1}{U}{U}{R} name(Overload) abilities=nofizzle target=*|opponentstack @@ -23234,7 +23234,7 @@ toughness=4 [/card] [card] name=Cyclonic Rift -alias=11000 +abilities=overload other={6}{U} name(Overload) target=*[-land]|opponentbattlefield auto=overload moveto(ownerhand) all(*[-land]|opponentbattlefield) @@ -28428,7 +28428,7 @@ type=Instant [/card] [card] name=Downsize -alias=11000 +abilities=overload other={2}{U} name(Overload) target=creature|opponentbattlefield auto=overload -4/0 all(creature|opponentbattlefield) @@ -30857,7 +30857,7 @@ subtype=Aura [/card] [card] name=Dynacharge -alias=11000 +abilities=overload other={2}{R} name(Overload) target=creature|mybattlefield auto=paidmana 2/0 @@ -31703,7 +31703,7 @@ toughness=1 [/card] [card] name=Electrickery -alias=11000 +abilities=overload other={1}{R} name(Overload) target=creature|opponentbattlefield auto=paidmana damage:1 @@ -69425,7 +69425,7 @@ toughness=4 [/card] [card] name=Mizzium Mortars -alias=11000 +abilities=overload other={3}{R}{R}{R} name(Overload) target=creature|opponentbattlefield auto=paidmana damage:4 @@ -69436,7 +69436,7 @@ type=Sorcery [/card] [card] name=Mizzium Skin -alias=11000 +abilities=overload other={1}{U} name(Overload) target=creature|mybattlefield auto=paidmana 0/1 @@ -106157,7 +106157,7 @@ toughness=3 [/card] [card] name=Street Spasm -alias=11000 +abilities=overload other={X}{X}{R}{R} name(Overload) target=creature[-flying]|opponentbattlefield auto=paidmana damage:X @@ -109796,7 +109796,7 @@ toughness=2 [/card] [card] name=Teleportal -alias=11000 +abilities=overload other={3}{U}{R} name(Overload) target=creature|mybattlefield auto=paidmana 1/0 @@ -118030,7 +118030,7 @@ subtype=Aura [/card] [card] name=Vandalblast -alias=11000 +abilities=overload other={4}{R} name(Overload) target=artifact|opponentbattlefield auto=overload destroy all(artifact|opponentbattlefield) @@ -123077,7 +123077,7 @@ type=Artifact [/card] [card] name=Weapon Surge -alias=11000 +abilities=overload other={1}{R} name(Overload) target=creature|mybattlefield auto=paidmana 1/0 diff --git a/projects/mtg/include/MTGDefinitions.h b/projects/mtg/include/MTGDefinitions.h index e1bdca9cb..ef8859eaa 100644 --- a/projects/mtg/include/MTGDefinitions.h +++ b/projects/mtg/include/MTGDefinitions.h @@ -248,11 +248,12 @@ class Constants CANTPAYLIFE = 126, CANTBESACRIFIED = 127, SKULK = 128, - MENACE = 129, - NOSOLO = 130,//cant attack alone - MUSTBLOCK = 131,//blocks each turn - DETHRONE = 132, - NB_BASIC_ABILITIES = 133, + MENACE = 129, + NOSOLO = 130,//cant attack alone + MUSTBLOCK = 131,//blocks each turn + DETHRONE = 132, + OVERLOAD = 133, + NB_BASIC_ABILITIES = 134, RARITY_S = 'S', //Special Rarity RARITY_M = 'M', //Mythics diff --git a/projects/mtg/src/MTGDefinitions.cpp b/projects/mtg/src/MTGDefinitions.cpp index 7c3178dcc..7b88e7964 100644 --- a/projects/mtg/src/MTGDefinitions.cpp +++ b/projects/mtg/src/MTGDefinitions.cpp @@ -159,11 +159,12 @@ const char* Constants::MTGBasicAbilities[] = { "combattoughness", "cantpaylife", "cantbesacrified", - "skulk", - "menace", - "nosolo", - "mustblock", - "dethrone", + "skulk", + "menace", + "nosolo", + "mustblock", + "dethrone", + "overload", }; map Constants::MTGBasicAbilitiesMap; diff --git a/projects/mtg/src/MTGRules.cpp b/projects/mtg/src/MTGRules.cpp index 753cf3a1f..d9f77b0e6 100644 --- a/projects/mtg/src/MTGRules.cpp +++ b/projects/mtg/src/MTGRules.cpp @@ -687,7 +687,7 @@ PermanentAbility(observer, _id) int MTGAlternativeCostRule::isReactingToClick(MTGCardInstance * card, ManaCost * mana) { - if (card->alias == 11000) + if (card->has(Constants::OVERLOAD)) return 0;//overload has its own rule if(!card->getManaCost()->getAlternative()) return 0; @@ -1410,7 +1410,7 @@ MTGAlternativeCostRule(observer, _id) int MTGOverloadRule::isReactingToClick(MTGCardInstance * card, ManaCost * mana) { - if (card->alias != 11000) + if (!card->has(Constants::OVERLOAD)) return 0; Player * player = game->currentlyActing(); ManaCost * cost = NEW ManaCost(card->model->data->getManaCost()->getAlternative()); From d4cc7ca232c13aa343f19dd3ff17908957b6c918 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Wed, 6 Jul 2016 06:21:45 +0800 Subject: [PATCH 6/9] removed alias that display chosen color --- .../bin/Res/sets/primitives/borderline.txt | 10 ++++++ projects/mtg/bin/Res/sets/primitives/mtg.txt | 31 ------------------- projects/mtg/src/CardGui.cpp | 2 +- projects/mtg/src/MTGDefinitions.cpp | 2 +- 4 files changed, 12 insertions(+), 33 deletions(-) diff --git a/projects/mtg/bin/Res/sets/primitives/borderline.txt b/projects/mtg/bin/Res/sets/primitives/borderline.txt index 2b2e2c3ba..5ac11eec8 100644 --- a/projects/mtg/bin/Res/sets/primitives/borderline.txt +++ b/projects/mtg/bin/Res/sets/primitives/borderline.txt @@ -352,3 +352,13 @@ mana={B} type=Instant text=Target creature gets +2/+0 and gains deathtouch until end of turn. Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.) [/card] +[card] +name=Yixlid Jailer +auto=lord(*|graveyard) loseabilities +text=Cards in graveyards lose all abilities. +mana={1}{B} +type=Creature +subtype=Zombie Wizard +power=2 +toughness=1 +[/card] diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index ed0a3183f..d3e73b4e7 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -18074,7 +18074,6 @@ toughness=2 [/card] [card] name=Cho-Manno's Blessing -alias=1000 abilities=auraward target=creature abilities=flash @@ -19799,7 +19798,6 @@ toughness=1 [/card] [card] name=Coldsteel Heart -alias=1000 auto=tap auto=chooseacolor {T}:add{chosencolor} chooseend text=Coldsteel Heart enters the battlefield tapped. -- As Coldsteel Heart enters the battlefield, choose a color. -- {T}: Add one mana of the chosen color to your mana pool. @@ -23086,7 +23084,6 @@ subtype=Aura Curse [/card] [card] name=Curse of Wizardry -alias=1000 auto=chooseacolor transforms((,newability[@movedto(*[chosencolor]|mystack):life:-1 controller],newability[@movedto(*[chosencolor]|opponentstack):life:-1 opponent])) chooseend text=As Curse of Wizardry enters the battlefield, choose a color. -- Whenever a player casts a spell of the chosen color, that player loses 1 life. mana={2}{B}{B} @@ -38501,7 +38498,6 @@ toughness=2 [/card] [card] name=Flickering Ward -alias=1000 abilities=auraward target=creature auto=chooseacolor teach(creature) protection from(*[chosencolor]) chooseend @@ -38594,7 +38590,6 @@ toughness=1 [/card] [card] name=Floating Shield -alias=1000 abilities=auraward target=creature auto=chooseacolor teach(creature) protection from(*[chosencolor]) chooseend @@ -47795,7 +47790,6 @@ toughness=3 [/card] [card] name=Hall of Triumph -alias=1000 auto=activatechooseacolor transforms((,newability[lord(creature[chosencolor]|mybattlefield) 1/1])) forever activatechooseend text=As Hall of Triumph enters the battlefield, choose a color. -- Creatures you control of the chosen color get +1/+1. mana={3} @@ -54288,7 +54282,6 @@ type=Enchantment [/card] [card] name=Iona, Shield of Emeria -alias=1000 abilities=flying auto=chooseacolor maxCast(*[chosencolor])0 opponent chooseend text=Flying -- As Iona, Shield of Emeria enters the battlefield, choose a color. -- Your opponents can't cast spells of the chosen color. @@ -55511,7 +55504,6 @@ toughness=3 [/card] [card] name=Jihad -alias=1000 auto=chooseacolor transforms((,newability[aslongas(*[chosencolor]|opponentbattlefield) lord(creature[white]|mybattlefield) 2/1],newability[aslongas(*[chosencolor]|opponentbattlefield) sacrifice <1])) chooseend text=As Jihad enters the battlefield, choose a color and an opponent. -- White creatures get +2/+1 as long as the chosen player controls a nontoken permanent of the chosen color. -- When the chosen player controls no nontoken permanents of the chosen color, sacrifice Jihad. mana={W}{W}{W} @@ -63814,7 +63806,6 @@ type=Instant [/card] [card] name=Lurebound Scarecrow -alias=1000 auto=chooseacolor aslongas(*[chosencolor]|myBattlefield) sacrifice <1 chooseend text=As Lurebound Scarecrow enters the battlefield, choose a color. -- When you control no permanents of the chosen color, sacrifice Lurebound Scarecrow. mana={3} @@ -77825,7 +77816,6 @@ subtype=Equipment [/card] [card] name=Paradise Plume -alias=1000 auto=chooseacolor transforms((,newability[{T}:add{chosencolor}],newability[@movedto(*[chosencolor]|stack):life:1 controller])) forever chooseend text=As Paradise Plume enters the battlefield, choose a color. -- Whenever a player casts a spell of the chosen color, you may gain 1 life. -- {T}: Add one mana of the chosen color to your mana pool. mana={4} @@ -78657,7 +78647,6 @@ type=Artifact [/card] [card] name=Pentarch Paladin -alias=1000 abilities=flanking auto=chooseacolor {W}{W}{T}:destroy target(*[chosencolor]) chooseend text=Flanking (Whenever a creature without flanking blocks this creature, the blocking creature gets -1/-1 until end of turn.) -- As Pentarch Paladin enters the battlefield, choose a color. -- {W}{W}, {T}: Destroy target permanent of the chosen color. @@ -78669,7 +78658,6 @@ toughness=3 [/card] [card] name=Pentarch Ward -alias=1000 abilities=auraward target=creature auto=chooseacolor teach(creature) protection from(*[chosencolor]) chooseend @@ -81995,7 +81983,6 @@ type=Enchantment [/card] [card] name=Prism Ring -alias=1000 auto=activatechooseacolor transforms((,newability[@movedto(*[chosencolor]|mystack):life:1 controller])) forever activatechooseend text=As Prism Ring enters the battlefield, choose a color. -- Whenever you cast a spell of the chosen color, you gain 1 life. mana={1} @@ -82511,7 +82498,6 @@ toughness=2 [/card] [card] name=Psychic Allergy -alias=1000 auto=upcost[{S(island|mybattlefield)}{S(island|mybattlefield)}] sacrifice auto=chooseacolor transforms((,newability[@each opponent upkeep:damage:type:*[-token&chosencolor]:opponentbattlefield opponent])) chooseend text=As Psychic Allergy enters the battlefield, choose a color. -- At the beginning of each opponent's upkeep, Psychic Allergy deals X damage to that player, where X is the number of nontoken permanents of the chosen color he or she controls. -- At the beginning of your upkeep, destroy Psychic Allergy unless you sacrifice two Islands. @@ -83732,7 +83718,6 @@ toughness=1 [/card] [card] name=Quirion Elves -alias=1000 auto={T}:Add{G} auto=chooseacolor {T}:add{chosencolor} chooseend text=As Quirion Elves enters the battlefield, choose a color. -- {T}: Add {G} to your mana pool. -- {T}: Add one mana of the chosen color to your mana pool. @@ -96152,7 +96137,6 @@ subtype=Shapeshifter [/card] [card] name=Shifting Sky -alias=1000 auto=chooseacolor lord(*[-land]) becomes(,chosencolor) chooseend text=As Shifting Sky enters the battlefield, choose a color. -- All nonland permanents are the chosen color. mana={2}{U} @@ -97574,7 +97558,6 @@ toughness=1 [/card] [card] name=Silhana Starfletcher -alias=1000 abilities=reach auto=activatechooseacolor {T}:add{chosencolor} activatechooseend text=Reach (This creature can block creatures with flying.) -- As Silhana Starfletcher enters the battlefield, choose a color. -- {T}: Add one mana of the chosen color to your mana pool. @@ -100750,7 +100733,6 @@ toughness=3 [/card] [card] name=Sol Grail -alias=1000 auto=chooseacolor transforms((,newability[{T}:add{chosencolor}])) forever chooseend text=As Sol Grail enters the battlefield, choose a color. -- {T}: Add one mana of the chosen color to your mana pool. mana={3} @@ -109705,7 +109687,6 @@ type=Legendary Land [/card] [card] name=Teferi's Moat -alias=1000 auto=chooseacolor lord(creature[chosencolor&-flying]|opponentBattlefield) cantattack chooseend text=As Teferi's Moat enters the battlefield, choose a color. -- Creatures of the chosen color without flying can't attack you. mana={3}{W}{U} @@ -120490,7 +120471,6 @@ toughness=2 [/card] [card] name=Voice of All -alias=1000 abilities=flying auto=chooseacolor transforms((,newability[protection from(*[chosencolor])],newability[0/0])) forever chooseend text=Flying (This creature can't be blocked except by creatures with flying or reach.) -- As Voice of All enters the battlefield, choose a color. -- Voice of All has protection from the chosen color. (It can't be blocked, targeted, dealt damage, or enchanted by anything of the chosen color.) @@ -122372,7 +122352,6 @@ toughness=1 [/card] [card] name=Ward Sliver -alias=1000 auto=chooseacolor transforms((,newability[lord(sliver) protection from(*[chosencolor])])) forever chooseend text=As Ward Sliver enters the battlefield, choose a color. -- All Slivers have protection from the chosen color. mana={4}{W} @@ -126618,16 +126597,6 @@ power=2 toughness=3 [/card] [card] -name=Yixlid Jailer -auto=lord(*|graveyard) loseabilities -text=Cards in graveyards lose all abilities. -mana={1}{B} -type=Creature -subtype=Zombie Wizard -power=2 -toughness=1 -[/card] -[card] name=Yoke of the Damned target=creature auto=@movedTo(graveyard) from(creature|battlefield):destroy diff --git a/projects/mtg/src/CardGui.cpp b/projects/mtg/src/CardGui.cpp index b8584c7bd..2b1c20dc7 100644 --- a/projects/mtg/src/CardGui.cpp +++ b/projects/mtg/src/CardGui.cpp @@ -386,7 +386,7 @@ void CardGui::Render() buff = "C"; //if(card->has(Constants::PAYZERO)) //buff += "Z"; - if(card->alias == 1000) + if(card->chooseacolor >= 1) { if(card->chooseacolor == 1) buff += "\n-Green"; diff --git a/projects/mtg/src/MTGDefinitions.cpp b/projects/mtg/src/MTGDefinitions.cpp index 7b88e7964..3b6c6f0d5 100644 --- a/projects/mtg/src/MTGDefinitions.cpp +++ b/projects/mtg/src/MTGDefinitions.cpp @@ -164,7 +164,7 @@ const char* Constants::MTGBasicAbilities[] = { "nosolo", "mustblock", "dethrone", - "overload", + "overload" }; map Constants::MTGBasicAbilitiesMap; From f45adb5b9e71784804dbadf2b5a0350763cccc7c Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Wed, 6 Jul 2016 06:28:42 +0800 Subject: [PATCH 7/9] removed alias 1111 --- projects/mtg/bin/Res/sets/primitives/mtg.txt | 13 ------------- projects/mtg/src/AIPlayerBaka.cpp | 4 ++-- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index d3e73b4e7..ca5fbb9c8 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -12646,7 +12646,6 @@ subtype=Equipment [/card] [card] name=Boneyard Wurm -alias=1111 anyzone=type:creature:mygraveyard/type:creature:mygraveyard cdaactive text=Boneyard Wurm's power and toughness are each equal to the number of creature cards in your graveyard. mana={1}{G} @@ -15448,7 +15447,6 @@ subtype=Forest Plains [/card] [card] name=Cantivore -alias=1111 abilities=vigilance anyzone=type:enchantment:graveyard/type:enchantment:graveyard cdaactive text=Vigilance -- Cantivore's power and toughness are each equal to the number of enchantment cards in all graveyards. @@ -19728,7 +19726,6 @@ type=Instant [/card] [card] name=Cognivore -alias=1111 abilities=flying anyzone=type:instant:graveyard/type:instant:graveyard cdaactive text=Flying -- Cognivore's power and toughness are each equal to the number of instant cards in all graveyards. @@ -26684,7 +26681,6 @@ text=Destroy target artifact with converted mana cost X. It can't be regenerated [/card] [card] name=Detritivore -alias=1111 anyzone=type:land[-basic]:opponentgraveyard/type:land[-basic]:opponentgraveyard cdaactive autoexile=@counterremoved(0/0,1,Time) from(sourcecard) suspended:destroy target(land[-basic]) suspend(0)={X}{3}{R} @@ -61537,7 +61533,6 @@ toughness=5 [/card] [card] name=Lhurgoyf -alias=1111 anyzone=type:creature:graveyard/plusonetype:creature:graveyard cdaactive text=Lhurgoyf's power is equal to the number of creature cards in all graveyards and its toughness is equal to that number plus 1. mana={2}{G}{G} @@ -63034,7 +63029,6 @@ toughness=2 [/card] [card] name=Lord of Extinction -alias=1111 anyzone=type:*:graveyard/type:*:graveyard cdaactive text=Lord of Extinction's power and toughness are each equal to the number of cards in all graveyards. mana={3}{B}{G} @@ -64500,7 +64494,6 @@ toughness=6 [/card] [card] name=Magnivore -alias=1111 abilities=haste anyzone=type:sorcery:graveyard/type:sorcery:graveyard cdaactive text=Haste (This creature can attack the turn it comes under your control.) -- Magnivore's power and toughness are each equal to the number of sorcery cards in all graveyards. @@ -70783,7 +70776,6 @@ toughness=2 [/card] [card] name=Mortivore -alias=1111 auto={B}:regenerate anyzone=type:creature:graveyard/type:creature:graveyard cdaactive text=Mortivore's power and toughness are each equal to the number of creature cards in all graveyards. -- {B}: Regenerate Mortivore. (The next time this creature would be destroyed this turn, it isn't. Instead tap it, remove all damage from it, and remove it from combat.) @@ -87464,7 +87456,6 @@ toughness=3 [/card] [card] name=Revenant -alias=1111 abilities=flying anyzone=type:creature:mygraveyard/type:creature:mygraveyard cdaactive text=Flying -- Revenant's power and toughness are each equal to the number of creature cards in your graveyard. @@ -99584,7 +99575,6 @@ subtype=Equipment [/card] [card] name=Slag Fiend -alias=1111 anyzone=type:artifact:graveyard/type:artifact:graveyard cdaactive text=Slag Fiend's power and toughness are each equal to the number of artifact cards in all graveyards. mana={R} @@ -103624,7 +103614,6 @@ subtype=Aura [/card] [card] name=Splinterfright -alias=1111 abilities=trample anyzone=type:creature:mygraveyard/type:creature:mygraveyard cdaactive auto=@each my upkeep:deplete:2 controller @@ -110437,7 +110426,6 @@ type=Artifact [/card] [card] name=Terravore -alias=1111 abilities=trample anyzone=type:land:graveyard/type:land:graveyard cdaactive text=Trample -- Terravore's power and toughness are each equal to the number of land cards in all graveyards. @@ -116288,7 +116276,6 @@ type=Artifact [/card] [card] name=Umbra Stalker -alias=1111 anyzone=type:manab:mygraveyard/type:manab:mygraveyard cdaactive text=Chroma - Umbra Stalker's power and toughness are each equal to the number of black mana symbols in the mana costs of cards in your graveyard. mana={4}{B}{B}{B} diff --git a/projects/mtg/src/AIPlayerBaka.cpp b/projects/mtg/src/AIPlayerBaka.cpp index 5dabaa2fa..2da274c4c 100644 --- a/projects/mtg/src/AIPlayerBaka.cpp +++ b/projects/mtg/src/AIPlayerBaka.cpp @@ -2438,7 +2438,7 @@ int AIPlayerBaka::computeActions() cd.SetExclusionColor(Constants::MTG_COLOR_LAND); MTGCardInstance *freecard = cd.match(game->graveyard); int canCastCard = game->playRestrictions->canPutIntoZone(freecard, game->inPlay); - if (freecard && (canCastCard == PlayRestriction::CAN_PLAY) && freecard->has(Constants::PAYZERO) && freecard->has(Constants::CANPLAYFROMGRAVEYARD) && (freecard->getIncreasedManaCost()->getConvertedCost() < 1) && (freecard->alias != 1111)) + if (freecard && (canCastCard == PlayRestriction::CAN_PLAY) && freecard->has(Constants::PAYZERO) && freecard->has(Constants::CANPLAYFROMGRAVEYARD) && (freecard->getIncreasedManaCost()->getConvertedCost() < 1) && (!freecard->isCDA)) { MTGAbility * castFreeCard = observer->mLayers->actionLayer()->getAbility(MTGAbility::PAYZERO_COST); AIAction * aa = NEW AIAction(this, castFreeCard, freecard); //TODO putinplay action @@ -2453,7 +2453,7 @@ int AIPlayerBaka::computeActions() cd.SetExclusionColor(Constants::MTG_COLOR_LAND); MTGCardInstance *freecard = cd.match(game->exile); int canCastCard = game->playRestrictions->canPutIntoZone(freecard, game->inPlay); - if (freecard && (canCastCard == PlayRestriction::CAN_PLAY) && freecard->has(Constants::PAYZERO) && freecard->has(Constants::CANPLAYFROMEXILE) && (freecard->getIncreasedManaCost()->getConvertedCost() < 1) && (freecard->alias != 1111)) + if (freecard && (canCastCard == PlayRestriction::CAN_PLAY) && freecard->has(Constants::PAYZERO) && freecard->has(Constants::CANPLAYFROMEXILE) && (freecard->getIncreasedManaCost()->getConvertedCost() < 1) && (!freecard->isCDA)) { MTGAbility * castFreeCard = observer->mLayers->actionLayer()->getAbility(MTGAbility::PAYZERO_COST); AIAction * aa = NEW AIAction(this, castFreeCard, freecard); //TODO putinplay action From 935849142cc1fda26b1dd147eac83b3d2fdbf8c8 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Wed, 6 Jul 2016 06:37:27 +0800 Subject: [PATCH 8/9] replaced alias with shackler --- projects/mtg/bin/Res/sets/primitives/mtg.txt | 12 ++++++------ projects/mtg/include/MTGDefinitions.h | 3 ++- projects/mtg/src/MTGDefinitions.cpp | 3 ++- projects/mtg/src/MTGGameZones.cpp | 3 +-- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index ca5fbb9c8..5a8969ebb 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -49639,7 +49639,7 @@ subtype=Equipment [/card] [card] name=Helm of Possession -alias=50120 +abilities=shackler auto={2}{T}{S(creature|mybattlefield)}:shackle target(creature) auto=@each my untap restriction{canuntap}:may untap text=You may choose not to untap Helm of Possession during your untap step. -- {2}, {T}, Sacrifice a creature: Gain control of target creature for as long as you control Helm of Possession and Helm of Possession remains tapped. @@ -50435,7 +50435,7 @@ type=Artifact [/card] [card] name=Hivis of the Scale -alias=50120 +abilities=shackler auto={T}:shackle target(dragon) auto=@each my untap restriction{canuntap}:may untap text=You may choose not to untap Hivis of the Scale during your untap step. -- {T}: Gain control of target Dragon for as long as you control Hivis and Hivis remains tapped. @@ -75773,7 +75773,7 @@ toughness=6 [/card] [card] name=Old Man of the Sea -alias=50120 +abilities=shackler auto={T}:shackle target(creature[power<=storedpower]) auto=@each my untap restriction{canuntap}:may untap text=You may choose not to untap Old Man of the Sea during your untap step. -- {T}: Gain control of target creature with power less than or equal to Old Man of the Sea's power for as long as Old Man of the Sea remains tapped and that creature's power remains less than or equal to Old Man of the Sea's power. @@ -89664,7 +89664,7 @@ toughness=* [/card] [card] name=Rubinia Soulsinger -alias=50120 +abilities=shackler auto={T}:shackle target(creature) auto=@each my untap restriction{canuntap}:may untap text=You may choose not to untap Rubinia Soulsinger during your untap step. -- {T}: Gain control of target creature for as long as you control Rubinia and Rubinia remains tapped. @@ -118392,7 +118392,7 @@ toughness=2 [/card] [card] name=Vedalken Shackles -alias=50120 +abilities=shackler auto={2}{T}:shackle target(creature[power<=type:island:mybattlefield]) auto=@each my untap restriction{canuntap}:may untap text=You may choose not to untap Vedalken Shackles during your untap step. -- {2}, {T}: Gain control of target creature with power less than or equal to the number of Islands you control for as long as Vedalken Shackles remains tapped. @@ -124331,7 +124331,7 @@ toughness=2 [/card] [card] name=Willow Satyr -alias=50120 +abilities=shackler auto={T}:shackle target(creature[legendary]) auto=@each my untap restriction{canuntap}:may untap text=You may choose not to untap Willow Satyr during your untap step. -- {T}: Gain control of target legendary creature for as long as you control Willow Satyr and Willow Satyr remains tapped. diff --git a/projects/mtg/include/MTGDefinitions.h b/projects/mtg/include/MTGDefinitions.h index ef8859eaa..caea4b9d5 100644 --- a/projects/mtg/include/MTGDefinitions.h +++ b/projects/mtg/include/MTGDefinitions.h @@ -253,7 +253,8 @@ class Constants MUSTBLOCK = 131,//blocks each turn DETHRONE = 132, OVERLOAD = 133, - NB_BASIC_ABILITIES = 134, + SHACKLER = 134, + NB_BASIC_ABILITIES = 135, RARITY_S = 'S', //Special Rarity RARITY_M = 'M', //Mythics diff --git a/projects/mtg/src/MTGDefinitions.cpp b/projects/mtg/src/MTGDefinitions.cpp index 3b6c6f0d5..16aa9eebf 100644 --- a/projects/mtg/src/MTGDefinitions.cpp +++ b/projects/mtg/src/MTGDefinitions.cpp @@ -164,7 +164,8 @@ const char* Constants::MTGBasicAbilities[] = { "nosolo", "mustblock", "dethrone", - "overload" + "overload", + "shackler" }; map Constants::MTGBasicAbilitiesMap; diff --git a/projects/mtg/src/MTGGameZones.cpp b/projects/mtg/src/MTGGameZones.cpp index cdbb8aed2..d8b4940d1 100644 --- a/projects/mtg/src/MTGGameZones.cpp +++ b/projects/mtg/src/MTGGameZones.cpp @@ -951,7 +951,7 @@ void MTGInPlay::untapAll() { MTGCardInstance * card = cards[i]; card->setUntapping(); - if (!card->basicAbilities[(int)Constants::DOESNOTUNTAP] && card->alias != 50120) + if (!card->basicAbilities[(int)Constants::DOESNOTUNTAP] && !card->basicAbilities[(int)Constants::SHACKLER]) { if (card->frozen < 1) { @@ -961,7 +961,6 @@ void MTGInPlay::untapAll() { card->frozen = 0; } - } } } From 1d80d97d2235e3e1069acc24beaaf88e2e952d39 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Wed, 6 Jul 2016 07:55:10 +0800 Subject: [PATCH 9/9] Shackled highlight border --- projects/mtg/include/MTGCardInstance.h | 1 + projects/mtg/src/AllAbilities.cpp | 7 +++++++ projects/mtg/src/CardGui.cpp | 26 +++++++++++++++++++++++++- projects/mtg/src/MTGCardInstance.cpp | 1 + 4 files changed, 34 insertions(+), 1 deletion(-) diff --git a/projects/mtg/include/MTGCardInstance.h b/projects/mtg/include/MTGCardInstance.h index cefa5a5d4..1bd266b1b 100644 --- a/projects/mtg/include/MTGCardInstance.h +++ b/projects/mtg/include/MTGCardInstance.h @@ -168,6 +168,7 @@ public: MTGCardInstance * myPair; MTGCardInstance * createSnapShot(); MTGCardInstance * storedSourceCard; + MTGCardInstance * shackled; MTGCardInstance * isDefenser(); int initAttackersDefensers(); MTGCardInstance * getNextOpponent(MTGCardInstance * previous=NULL); diff --git a/projects/mtg/src/AllAbilities.cpp b/projects/mtg/src/AllAbilities.cpp index a5b673f3a..2516a18be 100644 --- a/projects/mtg/src/AllAbilities.cpp +++ b/projects/mtg/src/AllAbilities.cpp @@ -6531,6 +6531,8 @@ void AShackle::resolveShackle() previousController->game->putInZone(_target, _target->currentZone, source->controller()->game->inPlay); Shackled = _target; + source->shackled = Shackled; + Shackled->shackled = source; } } @@ -6538,14 +6540,19 @@ void AShackle::returntoOwner(MTGCardInstance* _target) { MTGCardInstance * cardToReturn = _target; if(!cardToReturn) { + if (source) + source->shackled = NULL; this->forceDestroy = 1; return; } if(previousController && cardToReturn->isInPlay(game)) { + cardToReturn->shackled = NULL; cardToReturn->controller()->game->putInZone(_target, _target->currentZone, previousController->game->inPlay); } + if (source) + source->shackled = NULL; this->forceDestroy = 1; Shackled = NULL; return; diff --git a/projects/mtg/src/CardGui.cpp b/projects/mtg/src/CardGui.cpp index 2b1c20dc7..389427db7 100644 --- a/projects/mtg/src/CardGui.cpp +++ b/projects/mtg/src/CardGui.cpp @@ -274,8 +274,32 @@ void CardGui::Render() { if(cv->mHasFocus) { - highlightborder->SetColor(ARGB(200,57,28,248)); + highlightborder->SetColor(ARGB(200,57,28,248)); + renderer->RenderQuad(highlightborder.get(), actX, actY, actT, (30 * actZ + 1) / 16, 43 * actZ / 16); + } + } + } + if(card->shackled && card->shackled->isInPlay(game) && highlightborder) + { + if(mHasFocus) + { + if(card->has(Constants::SHACKLER)) + highlightborder->SetColor(ARGB(200,7,98,248)); + else + highlightborder->SetColor(ARGB(200,57,28,248)); + renderer->RenderQuad(highlightborder.get(), actX, actY, actT, (30 * actZ + 1) / 16, 43 * actZ / 16); + } + if(CardView* cv = dynamic_cast(card->shackled->view)) + { + if(cv->mHasFocus) + { + if(!card->shackled->has(Constants::SHACKLER)) + highlightborder->SetColor(ARGB(200,7,98,248)); + else + highlightborder->SetColor(ARGB(200,57,28,248)); + + renderer->RenderQuad(highlightborder.get(), actX, actY, actT, (30 * actZ + 1) / 16, 43 * actZ / 16); } } } diff --git a/projects/mtg/src/MTGCardInstance.cpp b/projects/mtg/src/MTGCardInstance.cpp index 1c89311f5..c8d800eec 100644 --- a/projects/mtg/src/MTGCardInstance.cpp +++ b/projects/mtg/src/MTGCardInstance.cpp @@ -211,6 +211,7 @@ void MTGCardInstance::initMTGCI() storedCard = NULL; storedSourceCard = NULL; myPair = NULL; + shackled = NULL; miracle = false; countTrini = 0; imprintedCards.clear();