+void VictoryState::LoadResults(
+ const char *who,
+ const vector<common::Hero::UpgradeInfo> &upgrade,
+ vector<string> &lines) {
+ std::stringstream s;
+ for (vector<common::Hero::UpgradeInfo>::const_iterator
+ i(upgrade.begin()), end(upgrade.end());
+ i != end; ++i) {
+ s.str("");
+ switch (i->type) {
+ case common::Hero::UPGRADE_LVL:
+ s << who << " levels up.";
+ break;
+ case common::Hero::UPGRADE_MHP:
+ s << "Max. HP increases by " << i->amount;
+ break;
+ case common::Hero::UPGRADE_MMP:
+ s << "Max. MP increases by " << i->amount;
+ break;
+ case common::Hero::UPGRADE_ATK:
+ s << "ATK increases by " << i->amount;
+ break;
+ case common::Hero::UPGRADE_DFP:
+ s << "DFP increases by " << i->amount;
+ break;
+ case common::Hero::UPGRADE_STR:
+ s << "STR increases by " << i->amount;
+ break;
+ case common::Hero::UPGRADE_AGL:
+ s << "AGL increases by " << i->amount;
+ break;
+ case common::Hero::UPGRADE_INT:
+ s << "INT increases by " << i->amount;
+ break;
+ case common::Hero::UPGRADE_GUT:
+ s << "GUT increases by " << i->amount;
+ break;
+ case common::Hero::UPGRADE_MGR:
+ s << "MGR increases by " << i->amount;
+ break;
+ default:
+ s << "There's an error in common::Hero::"
+ "AddExperience()";
+ }
+ lines.push_back(s.str());
+ }
+}
+