added Raid support
thisturn(creature[attacking]|mybattlefield)~morethan~0 only triggers once... use raid keyword... if raid then blah...
This commit is contained in:
@@ -204,6 +204,8 @@ void GameObserver::nextGamePhase()
|
||||
cleanupPhase();
|
||||
currentPlayer->damageCount = 0;
|
||||
currentPlayer->drawCounter = 0;
|
||||
currentPlayer->raidcount = 0;
|
||||
currentPlayer->opponent()->raidcount = 0;
|
||||
currentPlayer->prowledTypes.clear();
|
||||
currentPlayer->opponent()->damageCount = 0; //added to clear odcount
|
||||
currentPlayer->preventable = 0;
|
||||
|
||||
@@ -418,6 +418,13 @@ int AbilityFactory::parseCastRestrictions(MTGCardInstance * card, Player * playe
|
||||
return 0;
|
||||
}
|
||||
|
||||
check = restriction[i].find("raid");
|
||||
if(check != string::npos)
|
||||
{
|
||||
if(card->controller()->raidcount < 1)
|
||||
return 0;
|
||||
}
|
||||
|
||||
check = restriction[i].find("ownerscontrol");
|
||||
if(check != string::npos)
|
||||
{
|
||||
|
||||
@@ -1398,6 +1398,7 @@ int MTGCombatTriggersRule::receiveEvent(WEvent *e)
|
||||
if (card && card->isAttacker())
|
||||
{
|
||||
card->eventattacked();
|
||||
card->controller()->raidcount += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,6 +34,7 @@ Player::Player(GameObserver *observer, string file, string fileSmall, MTGDeck *
|
||||
extraTurn = 0;
|
||||
drawCounter = 0;
|
||||
epic = 0;
|
||||
raidcount = 0;
|
||||
prowledTypes.clear();
|
||||
doesntEmpty = NEW ManaCost();
|
||||
poolDoesntEmpty = NEW ManaCost();
|
||||
|
||||
Reference in New Issue
Block a user