From 4d1dfb58ffa94946a3bb9459bda9631f5721fdfe Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Sun, 7 Aug 2016 11:49:57 +0800 Subject: [PATCH] Fix Enstack Attackers If you have 40+ tokens as attackers in play, stack them on the attackers tightly... --- projects/mtg/src/GuiPlay.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/projects/mtg/src/GuiPlay.cpp b/projects/mtg/src/GuiPlay.cpp index 4c1e01ed6..0433eb9eb 100644 --- a/projects/mtg/src/GuiPlay.cpp +++ b/projects/mtg/src/GuiPlay.cpp @@ -125,12 +125,12 @@ void GuiPlay::BattleField::EnstackAttacker(CardView* card) { //card->x = CARD_WIDTH + 20 + (currentAttacker * (HORZWIDTH) / (attackers+1)); card->x = x + baseX; - if (total < 8) + if (attackers+1 < 8) x += CARD_WIDTH; - else if (total < 16) - x += (SCREEN_WIDTH - 200 - baseX) / total; + else if (attackers+1 < 16) + x += (SCREEN_WIDTH - 200 - baseX) / attackers+1; else - x += (SCREEN_WIDTH - 50 - baseX) / total; + x += (HORZWIDTH - 50 - baseX) / attackers+1; card->y = baseY + (card->card->getObserver()->getView()->getRenderedPlayer() == card->card->controller() ? 20 + y : -20 - y); ++currentAttacker;