changed some of the ability names as requested, autoformatted ability.cpp as it was getting pretty messy. added @attackedalone( trigger. added "removefromcombat" mtgability. im going on vacation, whoosh :P

This commit is contained in:
omegablast2002@yahoo.com
2010-10-18 15:56:32 +00:00
parent f5575ac68e
commit 98e34c4eca
8 changed files with 4635 additions and 4512 deletions

View File

@@ -784,6 +784,26 @@ int MTGCombatTriggersRule::receiveEvent(WEvent *e){
}
//---------------
}
if (WEventAttackersChosen * event = dynamic_cast<WEventAttackersChosen*>(e))
{
MTGCardInstance * lonelyAttacker;
int nbattackers = 0;
Player * p = game->currentPlayer;
MTGGameZone * z = p->game->inPlay;
int nbcards = z->nb_cards;
for (int i = 0; i < nbcards; ++i){
MTGCardInstance * c = z->cards[i];
if (c->attacker){
nbattackers++;
lonelyAttacker = c;
}
}
if (nbattackers == 1)
{
lonelyAttacker->eventattackedAlone();
}
else lonelyAttacker = NULL;
}
if (WEventBlockersChosen * event = dynamic_cast<WEventBlockersChosen*>(e))
{
Player * p = game->currentPlayer;