コード例 #1
0
void playsingle_controller::after_human_turn()
{
	team& current_team = teams_[player_number_ - 1];

	// add cards if in card mode
	if (card_mode_) {
		execute_card_bh(turn(), player_number_);
	}
	do_commoner(current_team);

	// clear access troops
	gui_->refresh_access_troops(player_number_ - 1, game_display::REFRESH_CLEAR);
	gui_->refresh_access_heros(player_number_ - 1, game_display::REFRESH_CLEAR);
	// hide context-menu
	gui_->hide_context_menu(NULL, true);

	// Mark the turn as done.
	browse_ = true;
	end_turn_record();
	end_turn_record_unlock();
	menu_handler_.clear_undo_stack(player_number_);

	if (current_team.uses_fog()) {
		// needed because currently fog is only recalculated when a hex is /un/covered
		recalculate_fog(player_number_);
	}

	// Clear moves from the GUI.
	gui_->set_route(NULL);
	gui_->unhighlight_reach();
}
コード例 #2
0
void playsingle_controller::after_human_turn()
{
	team& current_team = teams_[player_number_ - 1];

	// add cards if in card mode
	if (card_mode_) {
		execute_card_bh(turn(), player_number_);
	}
	if (actor_can_action(units_)) {
		if (unit::actor->is_city()) {
			do_commoner(current_team);
		}
	}

	if (!tent::tower_mode() && !preferences::developer()) {
		gui_->refresh_access_troops(player_number_ - 1, game_display::REFRESH_HIDE, reinterpret_cast<void*>(this));
	}
	gui_->refresh_access_heros(player_number_ - 1, game_display::REFRESH_CLEAR);
	// hide context-menu
	gui_->hide_context_menu();

	// Mark the turn as done.
	browse_ = true;
	menu_handler_.clear_undo_stack(player_number_);

	if (current_team.uses_fog()) {
		// needed because currently fog is only recalculated when a hex is /un/covered
		recalculate_fog(player_number_);
	}

	// Clear moves from the GUI.
	gui_->set_route(NULL);
	gui_->unhighlight_reach();
}