add attacker mask

This commit is contained in:
Anthony Calosa
2017-02-10 10:50:09 +08:00
parent f16755b86b
commit fc9b0b233c
3 changed files with 18 additions and 3 deletions

View File

@@ -359,6 +359,22 @@ void CardGui::Render()
//draw line
if (game)
{
JQuadPtr ssMask = card->getObserver()->getResourceManager()->GetQuad("white");
//choose attacker mask
if(card->isInPlay(game) && (card->hasSummoningSickness() || card->attackCost > 0) && !card->isPhased && card->isCreature())
{
if(game->getCurrentGamePhase() > MTG_PHASE_FIRSTMAIN && game->getCurrentGamePhase() < MTG_PHASE_SECONDMAIN &&
card->controller() == game->currentPlayer && game->currentPlayer->hasPossibleAttackers())
{
if(card->controller()->isHuman() && ssMask)
{
ssMask->SetColor(ARGB(170,64,64,64));
renderer->RenderQuad(ssMask.get(), actX, actY, actT, (27 * actZ + 1) / 16, 40 * actZ / 16);
}
}
}
if (card && card->isTargetted())
{
if(card->isTapped())