bug fix
This commit is contained in:
@@ -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++)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user