From 6fbe9de1a8b2a7be01b7a0c5308e557354edb32d Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Sun, 24 Jul 2016 14:24:11 +0800 Subject: [PATCH 1/5] Create Living_Death.txt --- projects/mtg/bin/Res/test/Living_Death.txt | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 projects/mtg/bin/Res/test/Living_Death.txt diff --git a/projects/mtg/bin/Res/test/Living_Death.txt b/projects/mtg/bin/Res/test/Living_Death.txt new file mode 100644 index 000000000..a6bcfa8d4 --- /dev/null +++ b/projects/mtg/bin/Res/test/Living_Death.txt @@ -0,0 +1,43 @@ +#Bug: Haste from legendary lords. It seems failed logic on cantattack, this is a specific order to reproduce it +[INIT] +UNTAP +[PLAYER1] +inplay:Worry Beads,swamp,forest,plains +graveyard:394548, 394548 +library:Krosan Cloudscraper +hand:Living Death,Dark Ritual +manapool:{2}{B}{B}{G} +[PLAYER2] +[DO] +next +#upkeep +next +#draw +next +#firstmain +swamp +forest +plains +Dark Ritual +Living Death +choice 0 +next +#begins +next +#attack +Krosan Cloudscraper +Dragonlord Kolaghan +next +#block +next +#damage +next +#end +[ASSERT] +COMBATEND +[PLAYER1] +inplay:394548, Krosan Cloudscraper, Worry Beads,swamp,forest,plains +graveyard:*, Living Death, Dark Ritual +[PLAYER2] +life:1 +[END] From 44cbd408ce44d271aa6c98c5fc8c10e5a99a2f0b Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Sun, 24 Jul 2016 14:25:08 +0800 Subject: [PATCH 2/5] Update _tests.txt --- projects/mtg/bin/Res/test/_tests.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/mtg/bin/Res/test/_tests.txt b/projects/mtg/bin/Res/test/_tests.txt index dc83fac83..bb14f8a79 100644 --- a/projects/mtg/bin/Res/test/_tests.txt +++ b/projects/mtg/bin/Res/test/_tests.txt @@ -463,6 +463,7 @@ living_lands.txt livingweapon.txt lord_of_the_pit.txt lord_of_the_pit2.txt +Living_Death.txt magma_spray.txt manabarbs_dual_lands_i562.txt master_decoy.txt From 5e35dac1da865d82683f040bf28a384e46053b86 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Sun, 24 Jul 2016 17:51:26 +0800 Subject: [PATCH 3/5] Update Living_Death.txt --- projects/mtg/bin/Res/test/Living_Death.txt | 29 +++++++++++++++------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/projects/mtg/bin/Res/test/Living_Death.txt b/projects/mtg/bin/Res/test/Living_Death.txt index a6bcfa8d4..4f89aebd3 100644 --- a/projects/mtg/bin/Res/test/Living_Death.txt +++ b/projects/mtg/bin/Res/test/Living_Death.txt @@ -1,11 +1,11 @@ -#Bug: Haste from legendary lords. It seems failed logic on cantattack, this is a specific order to reproduce it +#Bug: Haste from legendary lords [INIT] UNTAP [PLAYER1] inplay:Worry Beads,swamp,forest,plains -graveyard:394548, 394548 +graveyard:99, Dragonlord Kolaghan library:Krosan Cloudscraper -hand:Living Death,Dark Ritual +hand:5556,Dark Ritual,651,Animate Dead,Exhume manapool:{2}{B}{B}{G} [PLAYER2] [DO] @@ -19,25 +19,36 @@ swamp forest plains Dark Ritual -Living Death +651 +Animate Dead +Krosan Cloudscraper +5556 +choice 0 +Dragonlord Kolaghan +5556 +choice 0 +99 +choice 0 +Dragonlord Kolaghan choice 0 next #begins next #attack Krosan Cloudscraper -Dragonlord Kolaghan +99 next #block next #damage next #end +eot [ASSERT] -COMBATEND +UNTAP [PLAYER1] -inplay:394548, Krosan Cloudscraper, Worry Beads,swamp,forest,plains -graveyard:*, Living Death, Dark Ritual +inplay:99, Krosan Cloudscraper, Worry Beads,swamp,forest,plains,Animate Dead +graveyard:Dragonlord Kolaghan, Exhume, Dark Ritual, 651, 5556 [PLAYER2] -life:1 +life:2 [END] From 4a73e90da8f2cb3e4b9b62d1ea91e620e24a9d25 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Sun, 24 Jul 2016 20:19:58 +0800 Subject: [PATCH 4/5] remove test temporarily --- projects/mtg/bin/Res/test/_tests.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/projects/mtg/bin/Res/test/_tests.txt b/projects/mtg/bin/Res/test/_tests.txt index bb14f8a79..dc83fac83 100644 --- a/projects/mtg/bin/Res/test/_tests.txt +++ b/projects/mtg/bin/Res/test/_tests.txt @@ -463,7 +463,6 @@ living_lands.txt livingweapon.txt lord_of_the_pit.txt lord_of_the_pit2.txt -Living_Death.txt magma_spray.txt manabarbs_dual_lands_i562.txt master_decoy.txt From f960cdea9b306abee2c4e967cbcfb800358843b1 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Sun, 24 Jul 2016 20:25:20 +0800 Subject: [PATCH 5/5] A little border adjustment no more very thin borders on awards and in game... --- projects/mtg/src/ActionStack.cpp | 8 ++++---- projects/mtg/src/CardGui.cpp | 24 +++++++++++++++++------- projects/mtg/src/CardSelector.cpp | 8 ++++---- 3 files changed, 25 insertions(+), 15 deletions(-) diff --git a/projects/mtg/src/ActionStack.cpp b/projects/mtg/src/ActionStack.cpp index e93fa2f22..7dc7e14d7 100644 --- a/projects/mtg/src/ActionStack.cpp +++ b/projects/mtg/src/ActionStack.cpp @@ -138,13 +138,13 @@ void Interruptible::Render(MTGCardInstance * source, JQuad * targetQuad, string string cardsetname = setlist[source->setId].c_str(); if(cardsetname == "2ED"||cardsetname == "RV"||cardsetname == "4ED"||cardsetname == "5ED"||cardsetname == "6ED"||cardsetname == "7ED"||cardsetname == "8ED"||cardsetname == "9ED"||cardsetname == "CHR"||cardsetname == "DM") { - JRenderer::GetInstance()->FillRoundRect((npos.actX - (npos.actZ * 84.f))-10.f,(npos.actY - (npos.actZ * 119.7f))-12.5f,npos.actZ * 168.f + 6.5f,npos.actZ * 239.4f + 12.f,6.5f,ARGB(255,248,248,255)); - JRenderer::GetInstance()->DrawRoundRect((npos.actX - (npos.actZ * 84.f))-10.f,(npos.actY - (npos.actZ * 119.7f))-12.5f,npos.actZ * 168.f + 6.5f,npos.actZ * 239.4f + 12.f,6.5f,ARGB(150,20,20,20)); + JRenderer::GetInstance()->FillRoundRect((npos.actX - (npos.actZ * 84.f))-11.5f,(npos.actY - (npos.actZ * 119.7f))-14.f,npos.actZ * 168.f + 6.5f,npos.actZ * 239.4f + 12.f,8.f,ARGB(255,248,248,255)); + JRenderer::GetInstance()->DrawRoundRect((npos.actX - (npos.actZ * 84.f))-11.5f,(npos.actY - (npos.actZ * 119.7f))-14.f,npos.actZ * 168.f + 6.5f,npos.actZ * 239.4f + 12.f,8.f,ARGB(150,20,20,20)); } else { - JRenderer::GetInstance()->FillRoundRect((npos.actX - (npos.actZ * 84.f))-10.f,(npos.actY - (npos.actZ * 119.7f))-12.5f,npos.actZ * 168.f + 6.5f,npos.actZ * 239.4f + 12.f,6.5f,ARGB(255,5,5,5)); - JRenderer::GetInstance()->DrawRoundRect((npos.actX - (npos.actZ * 84.f))-10.f,(npos.actY - (npos.actZ * 119.7f))-12.5f,npos.actZ * 168.f + 6.5f,npos.actZ * 239.4f + 12.f,6.5f,ARGB(50,240,240,240)); + JRenderer::GetInstance()->FillRoundRect((npos.actX - (npos.actZ * 84.f))-11.5f,(npos.actY - (npos.actZ * 119.7f))-14.f,npos.actZ * 168.f + 6.5f,npos.actZ * 239.4f + 12.f,8.f,ARGB(255,5,5,5)); + JRenderer::GetInstance()->DrawRoundRect((npos.actX - (npos.actZ * 84.f))-11.5f,(npos.actY - (npos.actZ * 119.7f))-14.f,npos.actZ * 168.f + 6.5f,npos.actZ * 239.4f + 12.f,8.f,ARGB(50,240,240,240)); } } //render card diff --git a/projects/mtg/src/CardGui.cpp b/projects/mtg/src/CardGui.cpp index 06f3a30df..e7332bced 100644 --- a/projects/mtg/src/CardGui.cpp +++ b/projects/mtg/src/CardGui.cpp @@ -1145,19 +1145,29 @@ void CardGui::RenderBig(MTGCard* card, const Pos& pos, bool thumb, bool noborder { if(cardsetname == "2ED"||cardsetname == "RV"||cardsetname == "4ED"||cardsetname == "5ED"||cardsetname == "6ED"||cardsetname == "7ED"||cardsetname == "8ED"||cardsetname == "9ED"||cardsetname == "CHR"||cardsetname == "DM") { - JRenderer::GetInstance()->FillRoundRect((pos.actX - (pos.actZ * 84.f))-10.f,(pos.actY - (pos.actZ * 119.7f))-12.5f,pos.actZ * 168.f + 6.5f,pos.actZ * 239.4f + 12.f,6.5f,ARGB(255,248,248,255)); - JRenderer::GetInstance()->DrawRoundRect((pos.actX - (pos.actZ * 84.f))-10.f,(pos.actY - (pos.actZ * 119.7f))-12.5f,pos.actZ * 168.f + 6.5f,pos.actZ * 239.4f + 12.f,6.5f,ARGB(150,20,20,20)); + renderer->FillRoundRect((pos.actX - (pos.actZ * 84.f))-11.5f,(pos.actY - (pos.actZ * 119.7f))-14.f,pos.actZ * 168.f + 6.5f,pos.actZ * 239.4f + 12.f,8.f,ARGB(255,248,248,255)); + renderer->DrawRoundRect((pos.actX - (pos.actZ * 84.f))-11.5f,(pos.actY - (pos.actZ * 119.7f))-14.f,pos.actZ * 168.f + 6.5f,pos.actZ * 239.4f + 12.f,8.f,ARGB(150,20,20,20)); } else { - JRenderer::GetInstance()->FillRoundRect((pos.actX - (pos.actZ * 84.f))-10.f,(pos.actY - (pos.actZ * 119.7f))-12.5f,pos.actZ * 168.f + 6.5f,pos.actZ * 239.4f + 12.f,6.5f,ARGB(255,5,5,5)); - JRenderer::GetInstance()->DrawRoundRect((pos.actX - (pos.actZ * 84.f))-10.f,(pos.actY - (pos.actZ * 119.7f))-12.5f,pos.actZ * 168.f + 6.5f,pos.actZ * 239.4f + 12.f,6.5f,ARGB(50,240,240,240)); + if(cardsetname == "LEA"||cardsetname == "LEB") + { + renderer->FillRoundRect((pos.actX - (pos.actZ * 84.f))-10.5f,(pos.actY - (pos.actZ * 119.7f))-11.5f,pos.actZ * 168.f + 0.5f,pos.actZ * 239.4f + 4.f,10.f,ARGB(255,5,5,5)); + renderer->DrawRoundRect((pos.actX - (pos.actZ * 84.f))-10.5f,(pos.actY - (pos.actZ * 119.7f))-11.5f,pos.actZ * 168.f + 0.5f,pos.actZ * 239.4f + 4.f,10.f,ARGB(50,240,240,240)); + } + else + { + renderer->FillRoundRect((pos.actX - (pos.actZ * 84.f))-11.5f,(pos.actY - (pos.actZ * 119.7f))-14.f,pos.actZ * 168.f + 6.5f,pos.actZ * 239.4f + 12.f,8.f,ARGB(255,5,5,5)); + renderer->DrawRoundRect((pos.actX - (pos.actZ * 84.f))-11.5f,(pos.actY - (pos.actZ * 119.7f))-14.f,pos.actZ * 168.f + 6.5f,pos.actZ * 239.4f + 12.f,8.f,ARGB(50,240,240,240)); + } } - //render card image - renderer->RenderQuad(quad.get(), x, pos.actY, pos.actT, scale, scale); + if(cardsetname == "LEA"||cardsetname == "LEB") + renderer->RenderQuad(quad.get(), x, pos.actY, pos.actT, scale-0.01f, scale-0.01f); + else + renderer->RenderQuad(quad.get(), x, pos.actY, pos.actT, scale, scale); } else - renderer->RenderQuad(quad.get(), x, pos.actY, pos.actT, scale, scale); + renderer->RenderQuad(quad.get(), x, pos.actY, pos.actT, scale, scale); RenderCountersBig(card, pos); return; diff --git a/projects/mtg/src/CardSelector.cpp b/projects/mtg/src/CardSelector.cpp index 1e82f44ea..0e478f288 100644 --- a/projects/mtg/src/CardSelector.cpp +++ b/projects/mtg/src/CardSelector.cpp @@ -352,13 +352,13 @@ void CardSelector::Render() string cardsetname = setlist[card->getCard()->setId].c_str(); if(cardsetname == "2ED"||cardsetname == "RV"||cardsetname == "4ED"||cardsetname == "5ED"||cardsetname == "6ED"||cardsetname == "7ED"||cardsetname == "8ED"||cardsetname == "9ED"||cardsetname == "CHR"||cardsetname == "DM") { - JRenderer::GetInstance()->FillRoundRect((npos.actX - (npos.actZ * 84.f))-10.f,(npos.actY - (npos.actZ * 119.7f))-12.5f,npos.actZ * 168.f + 6.5f,npos.actZ * 239.4f + 12.f,6.5f,ARGB(255,248,248,255)); - JRenderer::GetInstance()->DrawRoundRect((npos.actX - (npos.actZ * 84.f))-10.f,(npos.actY - (npos.actZ * 119.7f))-12.5f,npos.actZ * 168.f + 6.5f,npos.actZ * 239.4f + 12.f,6.5f,ARGB(150,20,20,20)); + JRenderer::GetInstance()->FillRoundRect((npos.actX - (npos.actZ * 84.f))-11.5f,(npos.actY - (npos.actZ * 119.7f))-14.f,npos.actZ * 168.f + 6.5f,npos.actZ * 239.4f + 12.f,8.f,ARGB(255,248,248,255)); + JRenderer::GetInstance()->DrawRoundRect((npos.actX - (npos.actZ * 84.f))-11.5f,(npos.actY - (npos.actZ * 119.7f))-14.f,npos.actZ * 168.f + 6.5f,npos.actZ * 239.4f + 12.f,8.f,ARGB(150,20,20,20)); } else { - JRenderer::GetInstance()->FillRoundRect((npos.actX - (npos.actZ * 84.f))-10.f,(npos.actY - (npos.actZ * 119.7f))-12.5f,npos.actZ * 168.f + 6.5f,npos.actZ * 239.4f + 12.f,6.5f,ARGB(255,5,5,5)); - JRenderer::GetInstance()->DrawRoundRect((npos.actX - (npos.actZ * 84.f))-10.f,(npos.actY - (npos.actZ * 119.7f))-12.5f,npos.actZ * 168.f + 6.5f,npos.actZ * 239.4f + 12.f,6.5f,ARGB(50,240,240,240)); + JRenderer::GetInstance()->FillRoundRect((npos.actX - (npos.actZ * 84.f))-11.5f,(npos.actY - (npos.actZ * 119.7f))-14.f,npos.actZ * 168.f + 6.5f,npos.actZ * 239.4f + 12.f,8.f,ARGB(255,5,5,5)); + JRenderer::GetInstance()->DrawRoundRect((npos.actX - (npos.actZ * 84.f))-11.5f,(npos.actY - (npos.actZ * 119.7f))-14.f,npos.actZ * 168.f + 6.5f,npos.actZ * 239.4f + 12.f,8.f,ARGB(50,240,240,240)); } } //render card