add attacker mask
This commit is contained in:
@@ -3862,6 +3862,7 @@ public:
|
|||||||
spell->resolve();
|
spell->resolve();
|
||||||
myToken = spell->source;
|
myToken = spell->source;
|
||||||
spell->source->owner = tokenReciever;
|
spell->source->owner = tokenReciever;
|
||||||
|
spell->source->lastController = tokenReciever;
|
||||||
spell->source->isToken = 1;
|
spell->source->isToken = 1;
|
||||||
spell->source->fresh = 1;
|
spell->source->fresh = 1;
|
||||||
spell->source->entersBattlefield = 1;
|
spell->source->entersBattlefield = 1;
|
||||||
|
|||||||
@@ -359,6 +359,22 @@ void CardGui::Render()
|
|||||||
//draw line
|
//draw line
|
||||||
if (game)
|
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 && card->isTargetted())
|
||||||
{
|
{
|
||||||
if(card->isTapped())
|
if(card->isTapped())
|
||||||
|
|||||||
@@ -260,9 +260,7 @@ bool Player::hasPossibleAttackers()
|
|||||||
for (int j = 0; j < nbcards; ++j)
|
for (int j = 0; j < nbcards; ++j)
|
||||||
{
|
{
|
||||||
MTGCardInstance * c = z->cards[j];
|
MTGCardInstance * c = z->cards[j];
|
||||||
if (!c->isTapped() &&
|
if (c->canAttack() && c->isCreature())
|
||||||
!c->hasSummoningSickness() &&
|
|
||||||
c->isCreature())
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user