- (Finally) adding "must" abilities. Usage is as natural as possible, check Aven cloudchaser in 10E.
This commit is contained in:
wagic.the.homebrew@gmail.com
2010-01-06 14:22:41 +00:00
parent 50169eb5fb
commit da07370243
10 changed files with 141 additions and 39 deletions

View File

@@ -386,6 +386,23 @@ int TargetChooser::targetListSet(){
return 0;
}
bool TargetChooser::validTargetsExist(){
for (int i = 0; i < 2; ++i){
Player *p = GameObserver::GetInstance()->players[i];
if (canTarget(p)) return true;
MTGGameZone * zones[] = {p->game->inPlay,p->game->graveyard,p->game->hand,p->game->library};
for (int k = 0; k < 4; k++){
MTGGameZone * z = zones[k];
if (targetsZone(z)){
for (int j = 0; j < z->nb_cards; j++){
if (canTarget(z->cards[j])) return true;
}
}
}
}
return false;
}
/**
a specific Card
**/