Пример #1
0
void Scene_Battle_Rpg2k3::CommandSelected() {
	const RPG::BattleCommand& command =
		Data::battlecommands.commands[active_actor->GetBattleCommands()[command_window->GetIndex()] - 1];

	active_actor->SetLastBattleAction(command.ID);

	switch (command.type) {
	case RPG::BattleCommand::Type_attack:
		Game_System::SePlay(Game_System::GetSystemSE(Game_System::SFX_Decision));
		AttackSelected();
		break;
	case RPG::BattleCommand::Type_defense:
		Game_System::SePlay(Game_System::GetSystemSE(Game_System::SFX_Decision));
		DefendSelected();
		break;
	case RPG::BattleCommand::Type_escape:
		if (!Game_Battle::IsEscapeAllowed()) {
			Game_System::SePlay(Game_System::GetSystemSE(Game_System::SFX_Buzzer));
		}
		else {
			Game_System::SePlay(Game_System::GetSystemSE(Game_System::SFX_Decision));
			SetState(State_Escape);
		}
		break;
	case RPG::BattleCommand::Type_item:
		Game_System::SePlay(Game_System::GetSystemSE(Game_System::SFX_Decision));
		SetState(State_SelectItem);
		break;
	case RPG::BattleCommand::Type_skill:
		Game_System::SePlay(Game_System::GetSystemSE(Game_System::SFX_Decision));
		skill_window->SetSubsetFilter(0);
		SetState(State_SelectSkill);
		break;
	case RPG::BattleCommand::Type_special:
		Game_System::SePlay(Game_System::GetSystemSE(Game_System::SFX_Decision));
		Output::Warning("Battle: Event calling unsupported");
		//SpecialSelected()
		break;
	case RPG::BattleCommand::Type_subskill:
		Game_System::SePlay(Game_System::GetSystemSE(Game_System::SFX_Decision));
		SubskillSelected();
		break;
	}
}
Пример #2
0
void Scene_Battle_Rpg2k::CommandSelected() {
	Game_System::SePlay(Game_System::GetSystemSE(Game_System::SFX_Decision));

	switch (command_window->GetIndex()) {
		case 0: // Attack
			AttackSelected();
			break;
		case 1: // Skill
			SetState(State_SelectSkill);
			break;
		case 2: // Defense
			DefendSelected();
			break;
		case 3: // Item
			SetState(State_SelectItem);
			break;
		default:
			// no-op
			break;
	}
}