diff --git a/projects/mtg/src/AllAbilities.cpp b/projects/mtg/src/AllAbilities.cpp index 509fee777..6fa590906 100644 --- a/projects/mtg/src/AllAbilities.cpp +++ b/projects/mtg/src/AllAbilities.cpp @@ -332,6 +332,7 @@ AACounter::AACounter(int id, MTGCardInstance * source, MTGCardInstance * target, _target->counters->removeCounter(name.c_str(), power, toughness); } } + //specail cases, indestructible creatures which recieve enough counters to kill it are destroyed as a state based effect if(_target->toughness <= 0 && _target->has(Constants::INDESTRUCTIBLE) && toughness < 0) _target->controller()->game->putInGraveyard(_target); return nb; diff --git a/projects/mtg/src/Counters.cpp b/projects/mtg/src/Counters.cpp index 1814203bc..1dc24ae8d 100644 --- a/projects/mtg/src/Counters.cpp +++ b/projects/mtg/src/Counters.cpp @@ -134,6 +134,14 @@ int Counters::removeCounter(const char * _name, int _power, int _toughness) return 0; counters[i]->removed(); counters[i]->nb--; + //special case:if a card is suspended and no longer has a time counter when the last is removed, the card is cast. + if (target->suspended && !target->counters->hasCounter("time",0,0)) + { + GameObserver * game = game->GetInstance(); + MTGCardInstance * copy = target->controller()->game->putInZone(target, target->currentZone, target->controller()->game->stack); + Spell * spell = game->mLayers->stackLayer()->addSpell(copy, game->targetChooser, NULL,1, 0); + game->targetChooser = NULL; + } return mCount; } } diff --git a/projects/mtg/src/MTGRules.cpp b/projects/mtg/src/MTGRules.cpp index 63c33edc7..e8668035f 100644 --- a/projects/mtg/src/MTGRules.cpp +++ b/projects/mtg/src/MTGRules.cpp @@ -551,14 +551,8 @@ int MTGSuspendRule::receiveEvent(WEvent *e) { MTGCardInstance * card = z->cards[i]; - if (card->suspended && card->counters->hasCounter("Time",0,0)) - card->counters->removeCounter("Time",0,0); - if (card->suspended && !card->counters->hasCounter("Time",0,0)) - { - MTGCardInstance * copy = p->game->putInZone(card, card->currentZone, p->game->stack); - Spell * spell = game->mLayers->stackLayer()->addSpell(copy, game->targetChooser, NULL,1, 0); - game->targetChooser = NULL; - } + if (card->suspended && card->counters->hasCounter("time",0,0)) + card->counters->removeCounter("time",0,0); } return 1; } @@ -599,7 +593,7 @@ int MTGSuspendRule::reactToClick(MTGCardInstance * card) player->game->putInZone(card, card->currentZone, player->game->exile); card->next->suspended = true; for(signed int i = 0; i < card->suspendedTime;i++) - card->next->counters->addCounter("Time",0,0); + card->next->counters->addCounter("time",0,0); return 1; }