void Mars::_doSmallCurse(PlayerCityPtr city) { city::Helper helper( city ); FortList forts = helper.find<Fort>( building::militaryGroup ); std::string text, title; if( !forts.empty() ) { title = "##smallcurse_of_mars_title##"; text = "##smallcurse_of_mars_text##"; FortPtr fort = forts.random(); FortCurseByMars::assignTo( fort, 12 ); } else { title = "##smallcurse_of_mars_title##"; text = "##smallcurse_of_mars_failed_text##"; } events::GameEventPtr message = events::ShowInfobox::create( _(title), _(text), events::ShowInfobox::send2scribe ); message->dispatch(); }
void Mars::_doSmallCurse(PlayerCityPtr city) { FortList forts = city::statistic::getObjects<Fort>( city ); std::string text, title; if( !forts.empty() ) { title = "##smallcurse_of_mars_title##"; text = "##smallcurse_of_mars_text##"; FortPtr fort = forts.random(); FortCurseByMars::assignTo( fort, 12 ); } else { title = "##smallcurse_of_mars_failed_title##"; text = "##smallcurse_of_mars_failed_text##"; } events::GameEventPtr message = events::ShowInfobox::create( _(title), _(text), events::ShowInfobox::send2scribe ); message->dispatch(); }