More work on cleaning up debug trace logs. Added getDisplayName() overrides to the Ability & NextGamePhase interrupts so that there's now more contextual info in the output log. You'll now see what game phase is being added/resolved on the stack, and instead of a generic 'StackAbility' entry, it'll tell you what source it's coming from.

Also deleted a few debug output traces that were truly uninformative.
This commit is contained in:
wrenczes@gmail.com
2010-10-07 08:13:22 +00:00
parent 6109fe1912
commit e45735267b
4 changed files with 18 additions and 16 deletions

View File

@@ -25,7 +25,13 @@ int NextGamePhase::resolve(){
return 1;
}
const string NextGamePhase::getDisplayName() const
{
std::ostringstream stream;
stream << "NextGamePhase. (Current phase is: " << PhaseRing::phaseName(GameObserver::GetInstance()->getCurrentGamePhase()) << ")";
return stream.str();
}
void NextGamePhase::Render(){
GameObserver * g = GameObserver::GetInstance();
@@ -145,6 +151,14 @@ ostream& StackAbility::toString(ostream& out) const
return out;
}
const string StackAbility::getDisplayName() const
{
std::ostringstream stream;
stream << "StackAbility. (Source: " << ability->source->getDisplayName() << ")";
return stream.str();
}
/* Spell Cast */
Spell::Spell(MTGCardInstance * _source): Interruptible(0){