Refactored PW Attack Rule

This commit is contained in:
Anthony Calosa
2017-03-01 17:53:40 +08:00
parent 7627a00dce
commit b7dae1025b
7 changed files with 48 additions and 15 deletions

View File

@@ -368,10 +368,13 @@ void CardGui::Render()
JQuadPtr ssMask = card->getObserver()->getResourceManager()->GetQuad("white");
//choose attacker mask
if(card->isInPlay(game) && (card->hasSummoningSickness() || card->attackCost > 0) && !card->isPhased && card->isCreature())
if(card->isInPlay(game) && card->isCreature()
&& ((!card->canAttack() || (card->attackCost > 0)) && (!card->canAttack(true) || (card->attackPlaneswalkerCost > 0)))
&& !card->isPhased && !card->didattacked )
{
if(game->getCurrentGamePhase() > MTG_PHASE_FIRSTMAIN && game->getCurrentGamePhase() < MTG_PHASE_SECONDMAIN &&
card->controller() == game->currentPlayer && game->currentPlayer->hasPossibleAttackers())
if(game->getCurrentGamePhase() > MTG_PHASE_FIRSTMAIN
&& game->getCurrentGamePhase() < MTG_PHASE_SECONDMAIN
&& card->controller() == game->currentPlayer )
{
if(card->controller()->isHuman() && ssMask)
{