This commit is contained in:
Anthony Calosa
2017-02-05 08:07:12 +08:00
parent c830ef88ca
commit 8b9dfdf96d
2 changed files with 12 additions and 7 deletions

View File

@@ -114,7 +114,12 @@ void MTGCardInstance::copy(MTGCardInstance * card)
source = card; source = card;
CardPrimitive * data = source->data; CardPrimitive * data = source->data;
basicAbilities = data->basicAbilities; //basicAbilities = data->basicAbilities;
for(unsigned int j = 0; j < data->basicAbilities.size(); j++)
{
if(data->basicAbilities[j])
basicAbilities[j] = data->basicAbilities[j];
}
types.clear();//reset types.. fix copying man lands... the copier becomes an unanimated land... types.clear();//reset types.. fix copying man lands... the copier becomes an unanimated land...
for (size_t i = 0; i < data->types.size(); i++) for (size_t i = 0; i < data->types.size(); i++)
{ {

View File

@@ -2230,25 +2230,25 @@ int MTGBlockRule::receiveEvent(WEvent *e)
//but this action can not be ignored. //but this action can not be ignored.
} }
} }
}
if (dynamic_cast<WEventBlockersChosen*>(e))
{
//if a card with menace is not blocked by 2 or more, remove any known blockers and attacking as normal. //if a card with menace is not blocked by 2 or more, remove any known blockers and attacking as normal.
MTGGameZone * z = p->game->inPlay; MTGGameZone * z = p->game->inPlay;
for (int i = 0; i < z->nb_cards; i++) for (int i = 0; i < z->nb_cards; i++)
{ {
MTGCardInstance * card = z->cards[i]; MTGCardInstance * card = z->cards[i];
if (card->has(Constants::MENACE) && card->blockers.size() < 2) if (card->isAttacker() && card->has(Constants::MENACE) && card->blockers.size() < 2)
{ {
while (card->blockers.size()) while (card->blockers.size())
{ {
MTGCardInstance * blockingCard = card->blockers.front(); MTGCardInstance * blockingCard = card->blockers.front();
blockingCard->toggleDefenser(NULL); if(blockingCard->getNextOpponent() == card)
blockingCard->toggleDefenser(NULL);
} }
} }
} }
} }
return 1; return 1;
} }