Esempio n. 1
0
void Player::LocationStats() {
	char cUserInput;
	bool bReTry = true;
	while (bReTry) {
		//show the user their stats
		DisplayStats(Player::Atts);
		//prompt the user to leave this screen
		cout << "\n1. Exit\n";
		cin >> cUserInput;
		//check if exit was chosen
		if (cUserInput == '1') {
			bReTry = false;
			Player::Location = QUIT;
		} else {
			bReTry = true;
		}
	}
}
Esempio n. 2
0
/*
	StatsDialogProc

	Note: See DialogProc in the Platform SDK docs for parameters and notes.
*/
INT_PTR CALLBACK StatsDialogProc(HWND dialog, UINT msg, WPARAM wParam, LPARAM lParam)
{
	switch (msg)
	{
	case WM_INITDIALOG:
		return DisplayStats(dialog);

	case WM_CLOSE:
		EndDialog(dialog, FALSE);
		break;

	case WM_COMMAND:
		if (wParam == IDOK)
		{
			EndDialog(dialog, TRUE);
			return 0;
		}
	}
	return 0;
}
Esempio n. 3
0
void Player::LocationMakePlayer() {
	bool bReTry = false;
	while (!bReTry) {
		char cRaceInput;
		cout << "Please select your race\n[H]uman, [U]ndead, [O]rc, [E]lf, [G]nome, [D]warf, [K]erbal, [R]obot\n";
		cin >> cRaceInput;
		//get the correct race for the input value
		switch (cRaceInput) {
		case 'H':
		case 'h':
			//set the stats based on human values
			Player::CharRace = HUMAN;
			Player::Atts.iFocus = DiceRoll(3, 6);
			Player::Atts.iStrength = DiceRoll(3, 6);
			Player::Atts.iDexterity = DiceRoll(3, 6);
			Player::Atts.iCreativeness = DiceRoll(3, 6);
			Player::Atts.iWisdom = DiceRoll(3, 6);
			Player::Atts.iInnovation = DiceRoll(3, 6);
			Player::Atts.iBravery = DiceRoll(3, 6);
			break;
		case 'U':
		case 'u':
			//set the stats based on undead values
			Player::CharRace = UNDEAD;
			Player::Atts.iFocus = DiceRoll(3, 6);
			Player::Atts.iStrength = DiceRoll(3, 6);
			Player::Atts.iDexterity = DiceRoll(3, 6);
			Player::Atts.iCreativeness = DiceRoll(3, 6);
			Player::Atts.iWisdom = DiceRoll(3, 6);
			Player::Atts.iInnovation = DiceRoll(3, 6);
			Player::Atts.iBravery = DiceRoll(3, 6);
			break;
		case 'O':
		case 'o':
			//set the stats based on orc values
			Player::CharRace = ORC;
			Player::Atts.iFocus = DiceRoll(3, 6);
			Player::Atts.iStrength = DiceRoll(3, 6);
			Player::Atts.iDexterity = DiceRoll(3, 6);
			Player::Atts.iCreativeness = DiceRoll(3, 6);
			Player::Atts.iWisdom = DiceRoll(3, 6);
			Player::Atts.iInnovation = DiceRoll(3, 6);
			Player::Atts.iBravery = DiceRoll(3, 6);
			break;
		case 'E':
		case 'e':
			//set the stats based on elf values
			Player::CharRace = ELF;
			Player::Atts.iFocus = DiceRoll(3, 6);
			Player::Atts.iStrength = DiceRoll(3, 6);
			Player::Atts.iDexterity = DiceRoll(3, 6);
			Player::Atts.iCreativeness = DiceRoll(3, 6);
			Player::Atts.iWisdom = DiceRoll(3, 6);
			Player::Atts.iInnovation = DiceRoll(3, 6);
			Player::Atts.iBravery = DiceRoll(3, 6);
			break;
		case 'G':
		case 'g':
			//set the stats based on gnome values
			Player::CharRace = GNOME;
			Player::Atts.iFocus = DiceRoll(3, 6);
			Player::Atts.iStrength = DiceRoll(3, 6);
			Player::Atts.iDexterity = DiceRoll(3, 6);
			Player::Atts.iCreativeness = DiceRoll(3, 6);
			Player::Atts.iWisdom = DiceRoll(3, 6);
			Player::Atts.iInnovation = DiceRoll(3, 6);
			Player::Atts.iBravery = DiceRoll(3, 6);
			break;
		case 'D':
		case 'd':
			//set the stats based on dwarf values
			Player::CharRace = DWARF;
			Player::Atts.iFocus = DiceRoll(3, 6);
			Player::Atts.iStrength = DiceRoll(3, 6);
			Player::Atts.iDexterity = DiceRoll(3, 6);
			Player::Atts.iCreativeness = DiceRoll(3, 6);
			Player::Atts.iWisdom = DiceRoll(3, 6);
			Player::Atts.iInnovation = DiceRoll(3, 6);
			Player::Atts.iBravery = DiceRoll(3, 6);
			break;
		case 'K':
		case 'k':
			//set the stats based on kerbal values
			Player::CharRace = KERBAL;
			Player::Atts.iFocus = DiceRoll(3, 6);
			Player::Atts.iStrength = DiceRoll(3, 6);
			Player::Atts.iDexterity = DiceRoll(3, 6);
			Player::Atts.iCreativeness = DiceRoll(3, 6);
			Player::Atts.iWisdom = DiceRoll(3, 6);
			Player::Atts.iInnovation = DiceRoll(3, 6);
			Player::Atts.iBravery = DiceRoll(3, 6);
			break;
		case 'R':
		case 'r':
			//set the stats based on robot values
			Player::CharRace = ROBOT;
			Player::Atts.iFocus = DiceRoll(3, 6);
			Player::Atts.iStrength = DiceRoll(3, 6);
			Player::Atts.iDexterity = DiceRoll(3, 6);
			Player::Atts.iCreativeness = DiceRoll(3, 6);
			Player::Atts.iWisdom = DiceRoll(3, 6);
			Player::Atts.iInnovation = DiceRoll(3, 6);
			Player::Atts.iBravery = DiceRoll(3, 6);
			break;
		default:
			//enusures the user puts in a valid answer
			bReTry = true;
			break;
		}
		DisplayStats(Player::Atts);
		cout << "Would you like to re-roll your stats?\n[Y]es [N]o\n";
		cin >> cRaceInput;
		if (cRaceInput == 'N' || cRaceInput == 'n') {
			bReTry = false;
		}
/*		int iMenuInput = 0;
		cout << "1. Quit\n";
		cin >> iMenuInput;
		if (iMenuInput == '1') {
			Player::Location = QUIT;
		}*/
		Player::SetStats(Atts);
	}
}