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

@@ -62,10 +62,10 @@ int MTGPutInPlayRule::reactToClick(MTGCardInstance * card){
}else{
Spell * spell = NULL;
if (game->targetChooser){
spell = game->mLayers->stackLayer()->addSpell(card,game->targetChooser->targets,game->targetChooser->cursor, spellCost);
SAFE_DELETE(game->targetChooser);
spell = game->mLayers->stackLayer()->addSpell(card,game->targetChooser, spellCost);
game->targetChooser = NULL;
}else{
spell = game->mLayers->stackLayer()->addSpell(card,NULL,0, spellCost);
spell = game->mLayers->stackLayer()->addSpell(card,NULL, spellCost);
}
MTGCardInstance * copy = player->game->putInZone(card, player->game->hand, player->game->stack);
spell->source = copy;