Erwan - fizzle spells that have invalid targets

This commit is contained in:
wagic.the.homebrew@gmail.com
2009-08-09 11:18:05 +00:00
parent 58c90c47ca
commit 4f76f50cdd
9 changed files with 94 additions and 48 deletions

View File

@@ -478,29 +478,6 @@ Player * GameObserver::currentlyActing(){
return currentActionPlayer;
}
int GameObserver::tryToTapOrUntap(MTGCardInstance * card){
int reaction = mLayers->actionLayer()->isReactingToClick(card);
if (reaction){
if (reaction == 1){
mLayers->actionLayer()->reactToClick(card);
}else{
//TODO, what happens when several abilities react to the click ?
}
return reaction;
}else{
if (card->isTapped() && card->controller() == currentPlayer){
int a = ConstraintResolver::untap(this, card);
return a;
}else{
//TODO Check Spells
//card->tap();
return 0;
}
return 0;
}
}
//TODO CORRECT THIS MESS
int GameObserver::targetListIsSet(MTGCardInstance * card){
if (targetChooser == NULL){
@@ -514,12 +491,3 @@ int GameObserver::targetListIsSet(MTGCardInstance * card){
return (targetChooser->targetListSet());
}
int GameObserver::checkManaCost(MTGCardInstance * card){
ManaCost * playerMana = currentlyActing()->getManaPool();
ManaCost * cost = card->getManaCost();
if (playerMana->canAfford(cost)){
return 1;
}
return 0;
}