• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ cClinicManager类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中cClinicManager的典型用法代码示例。如果您正苦于以下问题:C++ cClinicManager类的具体用法?C++ cClinicManager怎么用?C++ cClinicManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了cClinicManager类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: if

/*
* return next girl in the sorted list
*/
sGirl *cScreenGirlDetails::get_next_girl()
{
	sGirl *next_girl = 0;

	g_LogFile.write("Where is the girl??");

	if (g_Clinic.GetGirlsCurrentBrothel(selected_girl) != -1)
	{
		g_LogFile.write("She is in the Clinic");
		next_girl = g_Clinic.GetGirl(0, g_Clinic.GetGirlPos(0, selected_girl) + 1);
	}
	else if (g_Studios.GetGirlsCurrentBrothel(selected_girl) != -1)
	{
		g_LogFile.write("She is in the Studio");
		next_girl = g_Studios.GetGirl(0, g_Studios.GetGirlPos(0, selected_girl) + 1);
	}
	else if (g_Arena.GetGirlsCurrentBrothel(selected_girl) != -1)
	{
		g_LogFile.write("She is in the Arena");
		next_girl = g_Arena.GetGirl(0, g_Arena.GetGirlPos(0, selected_girl) + 1);
	}
	else if (g_Centre.GetGirlsCurrentBrothel(selected_girl) != -1)
	{
		g_LogFile.write("She is in the Centre");
		next_girl = g_Centre.GetGirl(0, g_Centre.GetGirlPos(0, selected_girl) + 1);
	}
	else if (g_House.GetGirlsCurrentBrothel(selected_girl) != -1)
	{
		g_LogFile.write("She is in the House");
		next_girl = g_House.GetGirl(0, g_House.GetGirlPos(0, selected_girl) + 1);
	}
	else if (g_Farm.GetGirlsCurrentBrothel(selected_girl) != -1)
	{
		g_LogFile.write("She is in the Farm");
		next_girl = g_Farm.GetGirl(0, g_Farm.GetGirlPos(0, selected_girl) + 1);
	}
	else
	{
		if (selected_girl->m_DayJob == JOB_INDUNGEON)
		{
			g_LogFile.write("She is in the Dungeon");
			next_girl = g_Brothels.GetDungeon()->GetGirl(g_Brothels.GetDungeon()->GetGirlPos(selected_girl) + 1)->m_Girl;
		}
		else
		{
			g_LogFile.write("She is in a Brothel");
			next_girl = g_Brothels.GetGirl(g_CurrBrothel, g_Brothels.GetGirlPos(g_CurrBrothel, selected_girl) + 1);
		}
	}

	return next_girl;
}
开发者ID:diamondialis,项目名称:crazys-wm-mod,代码行数:55,代码来源:cScreenGirlDetails.cpp


示例2: check_clinic

void cScreenTown::check_clinic(int ClinicNum)
{	// player clicked on one of the brothels
	if (g_Clinic.GetNumBrothels() == ClinicNum)
	{	// player doesn't own this brothel... can he buy it? 
		static_brothel_data *bck = clinic_data + ClinicNum;
		locale syslocale("");
		stringstream ss;
		ss.imbue(syslocale);

		if (!g_Gold.afford(bck->price) || g_Gangs.GetNumBusinessExtorted() < bck->business)
		{	// can't buy it
			ss << gettext("This building costs ") << bck->price << gettext(" gold and you need to control at least ") << bck->business << gettext(" businesses.");
			if (!g_Gold.afford(bck->price))
				ss << "\n" << gettext("You need ") << (bck->price - g_Gold.ival()) << gettext(" more gold to afford it.");
			if (g_Gangs.GetNumBusinessExtorted() < bck->business)
				ss << "\n" << gettext("You need to control ") << (bck->business - g_Gangs.GetNumBusinessExtorted()) << gettext(" more businesses.");
			g_MessageQue.AddToQue(ss.str(), 0);
		}
		else
		{	// can buy it
			ss << gettext("Do you wish to purchase this building for ") << bck->price << gettext(" gold? It has ") << bck->rooms << gettext(" rooms.");
			g_MessageQue.AddToQue(ss.str(), 2);
			g_ChoiceManager.CreateChoiceBox(224, 112, 352, 384, 0, 2, 32, 8);
			g_ChoiceManager.AddChoice(0, gettext("Buy It"), 0);
			g_ChoiceManager.AddChoice(0, gettext("Don't Buy It"), 1);
			g_ChoiceManager.SetActive(0);
			BuyClinic = ClinicNum;
		}
	}
	else
	{	// player owns this brothel... go to it
		g_Building = BUILDING_CLINIC;
		g_CurrClinic = ClinicNum;
		g_WinManager.push("Clinic Screen");
	}
}
开发者ID:belroshir,项目名称:crazys-wm-mod,代码行数:36,代码来源:cScreenTown.cpp


示例3: WorkPhysicalSurgery

// `J` Job Clinic - Surgery
bool cJobManager::WorkPhysicalSurgery(sGirl* girl, sBrothel* brothel, bool Day0Night1, string& summary)
{
	stringstream ss; string girlName = girl->m_Realname; ss << girlName;
	// if she was not in surgery last turn, reset working days to 0 before proceding
	if (girl->m_YesterDayJob != JOB_PHYSICALSURGERY) { girl->m_WorkingDay = girl->m_PrevWorkingDay = 0; }

	bool hasDoctor = (g_Clinic.GetNumGirlsOnJob(brothel->m_id, JOB_DOCTOR, true) > 0 || g_Clinic.GetNumGirlsOnJob(brothel->m_id, JOB_DOCTOR, false) > 0);
	if (!hasDoctor)
	{
		ss << " does nothing. You don't have any Doctors working. (require 1) ";
		girl->m_Events.AddMessage(ss.str(), IMGTYPE_PROFILE, EVENT_WARNING);
		return false;	// not refusing
	}
	ss << " is in the Clinic to get general surgery.\n\n";

	int msgtype = Day0Night1;
	g_Girls.UnequipCombat(girl);	// not for patient

	if (Day0Night1 == SHIFT_DAY)	// the Doctor works on her durring the day
	{
		girl->m_WorkingDay++;
	}
	else	// and if there are nurses on duty, they take care of her at night
	{
		if (g_Clinic.GetNumGirlsOnJob(0, JOB_NURSE, 1) > 0)
		{
			girl->m_WorkingDay++;
			g_Girls.UpdateStat(girl, STAT_HAPPINESS, 10);
			g_Girls.UpdateStat(girl, STAT_MANA, 10);
		}
	}

	int numnurse = g_Clinic.GetNumGirlsOnJob(0, JOB_NURSE, Day0Night1);

	if (girl->m_WorkingDay >= 5)
	{
		ss << "The surgery is a success.\n";
		msgtype = EVENT_GOODNEWS;
		if (!g_Girls.HasTrait(girl, "Sexy Air"))
		{
			girl->add_trait("Sexy Air", false);
			ss << "She gains Sexy Air trait.\n";
		}
		else if (!g_Girls.HasTrait(girl, "Cute"))
		{
			girl->add_trait("Cute", false);
			ss << "She gains Cute trait.\n";
		}
		if (numnurse > 1)
		{
			ss << "The Nurses kept her healthy and happy during her recovery.\n";
			g_Girls.UpdateStat(girl, STAT_SPIRIT, 5);
			g_Girls.UpdateStat(girl, STAT_MANA, 10);
			g_Girls.UpdateStat(girl, STAT_BEAUTY, 15);
			g_Girls.UpdateStat(girl, STAT_CHARISMA, 15);
		}
		else if (numnurse > 0)
		{
			ss << "The Nurse helped her during her recovery.\n";
			g_Girls.UpdateStat(girl, STAT_HAPPINESS, -5);
			g_Girls.UpdateStat(girl, STAT_HEALTH, -10);
			g_Girls.UpdateStat(girl, STAT_MANA, -10);
			g_Girls.UpdateStat(girl, STAT_BEAUTY, 12);
			g_Girls.UpdateStat(girl, STAT_CHARISMA, 12);
		}
		else
		{
			ss << "She is sad and has lost some health during the operation.\n";
			g_Girls.UpdateStat(girl, STAT_SPIRIT, -5);
			g_Girls.UpdateStat(girl, STAT_HAPPINESS, -15);
			g_Girls.UpdateStat(girl, STAT_HEALTH, -20);
			g_Girls.UpdateStat(girl, STAT_MANA, -20);
			g_Girls.UpdateStat(girl, STAT_BEAUTY, 8);
			g_Girls.UpdateStat(girl, STAT_CHARISMA, 8);
		}

		if (g_Girls.HasTrait(girl, "Fragile")){ g_Girls.UpdateStat(girl, STAT_HEALTH, -5); }
		else if (g_Girls.HasTrait(girl, "Tough")){ g_Girls.UpdateStat(girl, STAT_HEALTH, 5); }
		if (g_Girls.HasTrait(girl, "Pessimist")){ g_Girls.UpdateStat(girl, STAT_HAPPINESS, -5); }
		else if (g_Girls.HasTrait(girl, "Optimist")){ g_Girls.UpdateStat(girl, STAT_HAPPINESS, 5); }

		girl->m_WorkingDay = girl->m_PrevWorkingDay = 0;
		girl->m_DayJob = girl->m_NightJob = JOB_CLINICREST;
	}
	else
	{
		int wdays = (5 - girl->m_WorkingDay);
		if (g_Clinic.GetNumGirlsOnJob(0, JOB_NURSE, 1) > 0)
		{
			if (wdays >= 3)		{ wdays = 3; }
			else if (wdays > 1)	{ wdays = 2; }
			else				{ wdays = 1; }
		}
		ss << "The operation is in progress (" << wdays << " day remaining).\n";
		if (g_Clinic.GetNumGirlsOnJob(0, JOB_NURSE, 1) > 1)		{ ss << "The Nurses are taking care of her at night."; }
		else if (g_Clinic.GetNumGirlsOnJob(0, JOB_NURSE, 1) > 0){ ss << "The Nurse is taking care of her at night."; }
		else							{ ss << "Having a Nurse on duty will speed up her recovery."; }
	}

//.........这里部分代码省略.........
开发者ID:DagothRa,项目名称:crazys-wm-mod,代码行数:101,代码来源:WorkPhysicalSurgery.cpp


示例4: WorkGetFertility

// `J` Job Clinic - Surgery
bool cJobManager::WorkGetFertility(sGirl* girl, sBrothel* brothel, bool Day0Night1, string& summary)
{
#pragma region //	Job setup				//
	stringstream ss; string girlName = girl->m_Realname; ss << girlName;
	// if she was not in surgery last turn, reset working days to 0 before proceding
	if (girl->m_YesterDayJob != JOB_FERTILITY) { girl->m_WorkingDay = girl->m_PrevWorkingDay = 0; }
	girl->m_DayJob = girl->m_NightJob = JOB_FERTILITY;	// it is a full time job

	if (girl->is_pregnant() || g_Girls.HasTrait(girl, "Broodmother"))
	{
		if (g_Girls.HasTrait(girl, "Broodmother"))	ss << " is already as Fertile as she can be so she was sent to the waiting room.";
		else if (girl->is_pregnant())				ss << " is pregant.\nShe must either have her baby or get an abortion before She can get recieve any more fertility treatments.";
		if (Day0Night1 == SHIFT_DAY)	girl->m_Events.AddMessage(ss.str(), IMGTYPE_PROFILE, EVENT_WARNING);
		girl->m_PrevDayJob = girl->m_PrevNightJob = girl->m_YesterDayJob = girl->m_YesterNightJob = girl->m_DayJob = girl->m_NightJob = JOB_CLINICREST;
		girl->m_WorkingDay = girl->m_PrevWorkingDay = 0;
		return false;	// not refusing
	}
	bool hasDoctor = g_Clinic.GetNumGirlsOnJob(0, JOB_DOCTOR, Day0Night1) > 0;
	int numnurse = g_Clinic.GetNumGirlsOnJob(0, JOB_NURSE, Day0Night1);
	if (!hasDoctor)
	{
		ss << " does nothing. You don't have any Doctors working. (require 1) ";
		girl->m_Events.AddMessage(ss.str(), IMGTYPE_PROFILE, EVENT_WARNING);
		return false;	// not refusing
	}
	ss << " is in the Clinic to get fertility treatment.\n\n";

	g_Girls.UnequipCombat(girl);	// not for patient
	int msgtype = Day0Night1;

#pragma endregion
#pragma region //	Count the Days				//

	if (Day0Night1 == SHIFT_DAY)	// the Doctor works on her durring the day
	{
		girl->m_WorkingDay++;
	}
	else	// and if there are nurses on duty, they take care of her at night
	{
		if (g_Clinic.GetNumGirlsOnJob(0, JOB_NURSE, 1) > 0)
		{
			girl->m_WorkingDay++;
			g_Girls.UpdateStat(girl, STAT_HEALTH, 10);
			g_Girls.UpdateStat(girl, STAT_HAPPINESS, 10);
			g_Girls.UpdateStat(girl, STAT_MANA, 10);
		}
	}

#pragma endregion
#pragma region //	In Progress				//

	if (girl->m_WorkingDay < 5 || Day0Night1 == SHIFT_DAY)
	{
		int wdays = (5 - girl->m_WorkingDay);
		if (g_Clinic.GetNumGirlsOnJob(0, JOB_NURSE, 1) > 0)
		{
			if (wdays >= 3)		{ wdays = 3; }
			else if (wdays > 1)	{ wdays = 2; }
			else				{ wdays = 1; }
		}
		ss << "The operation is in progress (" << wdays << " day remaining).\n";
		if (g_Clinic.GetNumGirlsOnJob(0, JOB_NURSE, 1) > 1)		{ ss << "The Nurses are taking care of her at night."; }
		else if (g_Clinic.GetNumGirlsOnJob(0, JOB_NURSE, 1) > 0){ ss << "The Nurse is taking care of her at night."; }
		else							{ ss << "Having a Nurse on duty will speed up her recovery."; }
	}

#pragma endregion
#pragma region //	Surgery Finished			//

	else
	{
		ss << "The surgery is a success.\n";
		msgtype = EVENT_GOODNEWS;
		girl->m_WorkingDay = girl->m_PrevWorkingDay = 0;

		if (numnurse > 2)
		{
			ss << "The Nurses kept her healthy and happy during her recovery.\n";
			g_Girls.UpdateStat(girl, STAT_HEALTH, g_Dice.bell(0, 20));
			g_Girls.UpdateStat(girl, STAT_HAPPINESS, g_Dice.bell(0, 10));
			g_Girls.UpdateStat(girl, STAT_SPIRIT, g_Dice.bell(0, 10));
			g_Girls.UpdateStat(girl, STAT_MANA, g_Dice.bell(0, 20));
			g_Girls.UpdateStat(girl, STAT_BEAUTY, g_Dice.bell(0, 2));
			g_Girls.UpdateStat(girl, STAT_CHARISMA, g_Dice.bell(0, 2));
		}
		else if (numnurse > 0)
		{
			ss << "The Nurse" << (numnurse > 1 ? "s" : "") << " helped her during her recovery.\n";
			g_Girls.UpdateStat(girl, STAT_HEALTH, g_Dice.bell(0, 10));
			g_Girls.UpdateStat(girl, STAT_HAPPINESS, g_Dice.bell(0, 5));
			g_Girls.UpdateStat(girl, STAT_SPIRIT, g_Dice.bell(0, 5));
			g_Girls.UpdateStat(girl, STAT_MANA, g_Dice.bell(0, 10));
			g_Girls.UpdateStat(girl, STAT_BEAUTY, g_Dice % 2);
			g_Girls.UpdateStat(girl, STAT_CHARISMA, g_Dice % 2);
		}
		else
		{
			ss << "She is sad and has lost some health during the operation.\n";
			g_Girls.UpdateStat(girl, STAT_HEALTH, g_Dice.bell(-20, 2));
//.........这里部分代码省略.........
开发者ID:Jenocke,项目名称:test,代码行数:101,代码来源:WorkGetFertility.cpp


示例5: check_events

void cScreenGirlDetails::check_events()
{
	// no events means we can go home
	if (g_InterfaceEvents.GetNumEvents() == 0) return;

	// if it's the back button, pop the window off the stack and we're done
	if (g_InterfaceEvents.CheckButton(back_id))
	{
		g_InitWin = true;
		g_WinManager.Pop();
		return;
	}
	if (g_InterfaceEvents.CheckSlider(houseperc_id))
	{
		g_Girls.SetStat(selected_girl, STAT_HOUSE, SliderValue(houseperc_id));
		ss.str("");
		ss << gettext("House Percentage: ") << SliderValue(houseperc_id) << gettext("%");
		EditTextItem(ss.str(), housepercval_id);
		// Rebelliousness might have changed, so update details
		if (DetailLevel == 0)
		{
			string detail = g_Girls.GetDetailsString(selected_girl);
			EditTextItem(detail, girldesc_id);
		}
		return;
	}
	if (g_InterfaceEvents.CheckButton(more_id))
	{
		if (DetailLevel == 0)		{ DetailLevel = 1; EditTextItem(g_Girls.GetMoreDetailsString(selected_girl), girldesc_id); }
		else if (DetailLevel == 1)	{ DetailLevel = 2; EditTextItem(g_Girls.GetThirdDetailsString(selected_girl), girldesc_id); }
		else						{ DetailLevel = 0; EditTextItem(g_Girls.GetDetailsString(selected_girl), girldesc_id); }
	}
	if (g_InterfaceEvents.CheckButton(day_id))
	{
		DisableButton(day_id, true);
		DisableButton(night_id, false);
		g_InitWin = true;
		Day0Night1 = SHIFT_DAY;
	}
	if (g_InterfaceEvents.CheckButton(night_id))
	{
		DisableButton(day_id, false);
		DisableButton(night_id, true);
		g_InitWin = true;
		Day0Night1 = SHIFT_NIGHT;
	}
	if (g_InterfaceEvents.CheckCheckbox(antipreg_id))
	{
		selected_girl->m_UseAntiPreg = (IsCheckboxOn(antipreg_id));
	}
	if (g_InterfaceEvents.CheckListbox(traitlist_id))
	{
		int selection = GetLastSelectedItemFromList(traitlist_id);
		if (selection != -1)
			EditTextItem(selected_girl->m_Traits[selection]->m_Desc, traitdesc_id);
		else
			EditTextItem("", traitdesc_id);
	}
	if (g_InterfaceEvents.CheckListbox(jobtypelist_id))
	{
		SetJob = true;
		RefreshJobList();
	}
	if (g_InterfaceEvents.CheckListbox(joblist_id))
	{
		bool fulltime = g_CTRLDown;

		int selection = GetSelectedItemFromList(joblist_id);
		if (selection != -1)
		{
			int old_job = (Day0Night1 ? selected_girl->m_NightJob : selected_girl->m_DayJob);
			// handle special job requirements and assign - if HandleSpecialJobs returns true, the job assignment was modified or cancelled
			if (g_Brothels.m_JobManager.HandleSpecialJobs(g_CurrBrothel, selected_girl, selection, old_job, Day0Night1, fulltime))
			{
				selection = (Day0Night1 ? selected_girl->m_NightJob : selected_girl->m_DayJob);
				SetSelectedItemInList(joblist_id, selection, false);
			}
			// refresh job worker counts for former job and current job
			if (old_job != selection)
			{
				SetSelectedItemText(joblist_id, old_job, g_Brothels.m_JobManager.JobDescriptionCount(old_job, g_CurrBrothel, Day0Night1));
				SetSelectedItemText(joblist_id, selection, g_Brothels.m_JobManager.JobDescriptionCount(selection, g_CurrBrothel, Day0Night1));
			}
			RefreshJobList();
		}
	}
	if (g_InterfaceEvents.CheckButton(inventory_id))
	{
		if (selected_girl)
		{
			if (GirlDead(selected_girl)) return;
			g_InitWin = true;
			g_AllTogle = true;
			g_WinManager.push("Item Management");
			return;
		}
	}
	if (g_InterfaceEvents.CheckButton(gallery_id))
	{
		g_WinManager.push("Gallery");
//.........这里部分代码省略.........
开发者ID:diamondialis,项目名称:crazys-wm-mod,代码行数:101,代码来源:cScreenGirlDetails.cpp


示例6: WorkMechanic

// `J` Job Clinic - Staff
bool cJobManager::WorkMechanic(sGirl* girl, sBrothel* brothel, bool Day0Night1, string& summary)
{
#pragma region //	Job setup				//
	int actiontype = ACTION_WORKMECHANIC;
	stringstream ss; string girlName = girl->m_Realname; ss << girlName;
	int roll_a = g_Dice.d100(), roll_b = g_Dice.d100(), roll_c = g_Dice.d100();
	if (g_Girls.DisobeyCheck(girl, actiontype, brothel))			// they refuse to work 
	{
		ss << " refused to work during the " << (Day0Night1 ? "night" : "day") << " shift.";
		girl->m_Events.AddMessage(ss.str(), IMGTYPE_PROFILE, EVENT_NOWORK);
		return true;
	}
	ss << " worked as a mechanic.\n\n";

	
	g_Girls.UnequipCombat(girl);	// put that shit away, you'll scare off the customers!
	double wages = 25, tips = 0;
	int enjoy = 0, fame = 0;
	int imagetype = IMGTYPE_PROFILE;
	int msgtype = Day0Night1;

#pragma endregion
#pragma region //	Job Performance			//

	double jobperformance = JP_Mechanic(girl, false);


	if (jobperformance >= 245)
	{
		wages += 155;
		ss << "She must be the perfect mechanic patients go on and on about her and always come to see her when she works.\n\n";
	}
	else if (jobperformance >= 185)
	{
		wages += 95;
		ss << "She's unbelievable at this and is always getting praised by the patients for her work.\n\n";
	}
	else if (jobperformance >= 135)
	{
		wages += 55;
		ss << "She's good at this job and gets praised by the patients often.\n\n";
	}
	else if (jobperformance >= 85)
	{
		wages += 15;
		ss << "She made a few mistakes but overall she is okay at this.\n\n";
	}
	else if (jobperformance >= 65)
	{
		wages -= 5;
		ss << "She was nervous and made a few mistakes. She isn't that good at this.\n\n";
	}
	else
	{
		wages -= 15;
		ss << "She was nervous and constantly making mistakes. She really isn't very good at this job.\n\n";
	}


	//try and add randomness here
	if (g_Girls.GetStat(girl, STAT_BEAUTY) > 85 && g_Dice.percent(20))
	{
		wages += 25;
		ss << " Stunned by her beauty a patient left her a great tip.\n\n";
	}
	if (g_Girls.HasTrait(girl, "Construct") && g_Dice.percent(15))
	{
		wages += 15;
		ss << " Seeing a kindred spirit, the mechanical patient left her a great tip.\n";
	}
	if (g_Girls.HasTrait(girl, "Half-Construct") && g_Dice.percent(15))
	{
		wages += 15;
		ss << " Seeing a kindred spirit, the mechanical patient left her a great tip.\n";
	}
	if (g_Girls.HasTrait(girl, "Clumsy") && g_Dice.percent(15))
	{
		wages -= 15;
		ss << " Her clumsy nature caused her to drop parts everywhere.\n";
	}
	if (g_Girls.HasTrait(girl, "Pessimist") && g_Dice.percent(5))
	{
		if (jobperformance < 125)
		{
			wages -= 10;
			ss << " Her pessimistic mood depressed the patients making them tip less.\n";
		}
		else
		{
			wages += 10;
			ss << girlName << " was in a poor mood so the patients gave her a bigger tip to try and cheer her up.\n";
		}
	}
	if (g_Girls.HasTrait(girl, "Optimist") && g_Dice.percent(5))
	{
		if (jobperformance < 125)
		{
			wages -= 10;
			ss << girlName << " was in a cheerful mood but the patients thought she needed to work more on her services.\n";
//.........这里部分代码省略.........
开发者ID:Jenocke,项目名称:test,代码行数:101,代码来源:WorkMechanic.cpp


示例7: process

void cClinicScreen::process()
{
	/*
	*	we need to make sure the ID variables are set
	*/
	if (!ids_set) set_ids();
	init();

	if (g_InitWin)
	{
		EditTextItem(g_Clinic.GetBrothelString(0), clinicdetails_id);
		g_InitWin = false;
	}
	/*
	*	no events means we can go home
	*/
	if (g_InterfaceEvents.GetNumEvents() == 0) return;

	/*
	*	otherwise, compare event IDs
	*
	*	if it's the back button, pop the window off the stack
	*	and we're done
	*/
	if (g_InterfaceEvents.CheckButton(back_id))
	{
		g_InitWin = true;
		g_WinManager.Pop();
		return;
	}
	else if (g_InterfaceEvents.CheckButton(walk_id))
	{
		g_InitWin = true;
		g_WinManager.push("Clinic Try");
		return;
	}
	else if (g_InterfaceEvents.CheckButton(girls_id))
	{
		g_InitWin = true;
		g_WinManager.push("Clinic");
		return;
	}
	else if (g_InterfaceEvents.CheckButton(staff_id))
	{
		g_InitWin = true;
		g_WinManager.push("Gangs");
		return;
	}
	else if (g_InterfaceEvents.CheckButton(turns_id))
	{
		g_InitWin = true;
		g_WinManager.push("TurnSummary");
		return;
	}
	else if (g_InterfaceEvents.CheckButton(setup_id))
	{
		g_Building = BUILDING_CLINIC;
		g_InitWin = true;
		g_WinManager.push("Building Setup");
		return;
	}
	else if (g_InterfaceEvents.CheckButton(dungeon_id))
	{
		g_InitWin = true;
		g_WinManager.push("Dungeon");
		return;
	}
	else if (g_InterfaceEvents.CheckButton(weeks_id))
	{
		g_InitWin = true;
		if (!g_CTRLDown) { g_CTRLDown = false; AutoSaveGame(); }
		NextWeek();
		g_WinManager.push("TurnSummary");
		return;
	}
}
开发者ID:diamondialis,项目名称:crazys-wm-mod,代码行数:76,代码来源:cClinicScreen.cpp


示例8: WorkBreastReduction

// `J` Job Clinic - Surgery
bool cJobManager::WorkBreastReduction(sGirl* girl, sBrothel* brothel, bool Day0Night1, string& summary)
{
#pragma region //	Job setup				//
	stringstream ss; string girlName = girl->m_Realname; ss << girlName;
	// if she was not in surgery last turn, reset working days to 0 before proceding
	if (girl->m_YesterDayJob != JOB_BREASTREDUCTION) { girl->m_WorkingDay = girl->m_PrevWorkingDay = 0; }
	girl->m_DayJob = girl->m_NightJob = JOB_BREASTREDUCTION;	// it is a full time job

	if (girl->has_trait( "Flat Chest"))
	{
		ss << " already has a Flat Chest so she was sent to the waiting room.";
		if (Day0Night1 == SHIFT_DAY)	girl->m_Events.AddMessage(ss.str(), IMGTYPE_PROFILE, EVENT_WARNING);
		girl->m_PrevDayJob = girl->m_PrevNightJob = girl->m_YesterDayJob = girl->m_YesterNightJob = girl->m_DayJob = girl->m_NightJob = JOB_CLINICREST;
		girl->m_WorkingDay = girl->m_PrevWorkingDay = 0;
		return false;	// not refusing
	}
	bool hasDoctor = g_Clinic.GetNumGirlsOnJob(0, JOB_DOCTOR, Day0Night1) > 0;
	int numnurse = g_Clinic.GetNumGirlsOnJob(0, JOB_NURSE, Day0Night1);
	if (!hasDoctor)
	{
		ss << " does nothing. You don't have any Doctors working. (require 1) ";
		girl->m_Events.AddMessage(ss.str(), IMGTYPE_PROFILE, EVENT_WARNING);
		return false;	// not refusing
	}
	ss << " is in the Clinic to get her breasts reduced.\n\n";

	int msgtype = Day0Night1;
	g_Girls.UnequipCombat(girl);	// not for patient

#pragma endregion
#pragma region //	Count the Days				//

	if (Day0Night1 == SHIFT_DAY)	// the Doctor works on her durring the day
	{
		girl->m_WorkingDay++;
	}
	else	// and if there are nurses on duty, they take care of her at night
	{
		girl->m_WorkingDay = girl->m_PrevWorkingDay = 0;
		ss << "The surgery is a success.\n";
		msgtype = EVENT_GOODNEWS;

		ss << g_Girls.AdjustTraitGroupBreastSize(girl, -1, false) << "\n\n";

		if (numnurse > 2)
		{
			ss << "The Nurses kept her healthy and happy during her recovery.\n";
			g_Girls.UpdateStat(girl, STAT_HEALTH, g_Dice.bell(0, 20));
			g_Girls.UpdateStat(girl, STAT_HAPPINESS, g_Dice.bell(0, 10));
			g_Girls.UpdateStat(girl, STAT_SPIRIT, g_Dice.bell(0, 10));
			g_Girls.UpdateStat(girl, STAT_MANA, g_Dice.bell(0, 20));
			g_Girls.UpdateStat(girl, STAT_BEAUTY, g_Dice.bell(0, 2));
			g_Girls.UpdateStat(girl, STAT_CHARISMA, g_Dice.bell(0, 2));
		}
		else if (numnurse > 0)
		{
			ss << "The Nurse" << (numnurse > 1 ? "s" : "") << " helped her during her recovery.\n";
			g_Girls.UpdateStat(girl, STAT_HEALTH, g_Dice.bell(0, 10));
			g_Girls.UpdateStat(girl, STAT_HAPPINESS, g_Dice.bell(0, 5));
			g_Girls.UpdateStat(girl, STAT_SPIRIT, g_Dice.bell(0, 5));
			g_Girls.UpdateStat(girl, STAT_MANA, g_Dice.bell(0, 10));
			g_Girls.UpdateStat(girl, STAT_BEAUTY, g_Dice % 2);
			g_Girls.UpdateStat(girl, STAT_CHARISMA, g_Dice % 2);
		}
		else
		{
			ss << "She is sad and has lost some health during the operation.\n";
			g_Girls.UpdateStat(girl, STAT_HEALTH, g_Dice.bell(-20, 2));
			g_Girls.UpdateStat(girl, STAT_HAPPINESS, g_Dice.bell(-10, 1));
			g_Girls.UpdateStat(girl, STAT_SPIRIT, g_Dice.bell(-5, 1));
			g_Girls.UpdateStat(girl, STAT_MANA, g_Dice.bell(-20, 3));
			g_Girls.UpdateStat(girl, STAT_BEAUTY, g_Dice.bell(-1, 1));
			g_Girls.UpdateStat(girl, STAT_CHARISMA, g_Dice.bell(-1, 1));
		}

		if (girl->has_trait( "Flat Chest"))
		{
			ss << girlName << "'s breasts are as small as they can get so she was sent to the waiting room.";
			girl->m_PrevDayJob = girl->m_PrevNightJob = girl->m_YesterDayJob = girl->m_YesterNightJob = girl->m_DayJob = girl->m_NightJob = JOB_CLINICREST;
		}
	}

#pragma endregion
#pragma region	//	Finish the shift			//

	girl->m_Events.AddMessage(ss.str(), IMGTYPE_PROFILE, msgtype);

	// Improve girl
	int libido = 1;
	if (girl->has_trait( "Lesbian"))		libido += numnurse;
	if (girl->has_trait( "Masochist"))	libido += 1;
	if (girl->has_trait( "Nymphomaniac"))	libido += 2;
	g_Girls.UpdateStatTemp(girl, STAT_LIBIDO, libido);
	if (g_Dice % 10 == 0)
		g_Girls.UpdateSkill(girl, SKILL_MEDICINE, 1);	// `J` she watched what the doctors and nurses were doing

#pragma endregion
	return false;
}
开发者ID:mjsmagalhaes,项目名称:crazys-wm-mod,代码行数:100,代码来源:WorkBreastReduction.cpp


示例9: WorkRepairShop

// `J` Job Clinic - Surgery
bool cJobManager::WorkRepairShop(sGirl* girl, sBrothel* brothel, bool Day0Night1, string& summary)
{
	int actiontype = ACTION_GENERAL;
	stringstream ss; string girlName = girl->m_Realname; ss << girlName;
	g_Girls.UnequipCombat(girl);	// not for patients

	if (!g_Girls.HasTrait(girl, "Construct") && !g_Girls.HasTrait(girl, "Half-Construct"))
	{
		ss << girlName << " has no artificial parts so she was sent to the Healing center.";
		if (Day0Night1 == SHIFT_DAY) girl->m_Events.AddMessage(ss.str(), IMGTYPE_PROFILE, EVENT_WARNING);
		if (girl->m_DayJob == JOB_GETREPAIRS)	girl->m_DayJob = JOB_GETHEALING;
		if (girl->m_NightJob == JOB_GETREPAIRS)	girl->m_NightJob = JOB_GETHEALING;
		return false;	// not refusing
	}

	int nummecs = g_Clinic.GetNumGirlsOnJob(0, JOB_MECHANIC, Day0Night1);
	int numnurse = g_Clinic.GetNumGirlsOnJob(0, JOB_NURSE, Day0Night1);

	// `J` base recovery copied freetime recovery
	int health = 10 + (girl->constitution() / 10);
	int tiredness = 10 + g_Dice % 21;	// build up as positive then apply as negative
	int happy = 10 + g_Dice % 11;
	int mana = 5 + (girl->magic() / 5);
	int libido = (g_Girls.HasTrait(girl, "Nymphomaniac") ? 15 : 5);

	if (nummecs + numnurse < 1)
	{
		ss << "You don't have any Mechanics or Nurses on duty so " << girlName << " just rests in a hospital bed.";
	}
	else
	{
		ss << girlName << " does nothing while ";
	}
	if (nummecs > 0)
	{
		ss << "the Mechanic" << (nummecs > 1 ? "s" : "");
		if (g_Girls.HasTrait(girl, "Half-Construct") && girl->m_DayJob == JOB_GETREPAIRS && girl->m_NightJob == JOB_GETREPAIRS)
		{	// if fixed by Mechanic for both shifts.
			health += 20;	// Total 40 healing per day, heals less because Mechanic does not fix living tissue.
		}
		else
		{
			health += 30;
		}
	}
	if (nummecs > 0 && numnurse > 0) { ss << " and"; }
	if (numnurse > 0)
	{
		ss << " the Nurse" << (numnurse > 1 ? "s" : "");
		health += 10;
		tiredness += 10;
		happy += 10;
		mana += (girl->magic() / 5);
	}
	if (nummecs + numnurse >= 4 && g_Dice.percent(50))	// lots of people making sure she is in good working order
	{
		g_Girls.UpdateStat(girl, STAT_CONSTITUTION, 1);
	}
	ss << (((nummecs > 1 && numnurse < 1) || numnurse > 1) ? " take" : " takes") << " care of her.";

	// Improve girl
	if (g_Girls.HasTrait(girl, "Lesbian"))		libido += numnurse;
	if (g_Girls.HasTrait(girl, "Masochist"))	libido += 1;
	if (g_Girls.HasTrait(girl, "Nymphomaniac"))	libido += 2;

	g_Girls.UpdateStat(girl, STAT_HEALTH, health, false);
	g_Girls.UpdateStat(girl, STAT_TIREDNESS, -tiredness, false);
	g_Girls.UpdateStat(girl, STAT_HAPPINESS, happy);
	g_Girls.UpdateStat(girl, STAT_MANA, mana);
	g_Girls.UpdateStatTemp(girl, STAT_LIBIDO, libido);
	if (g_Dice % 10 == 0) g_Girls.UpdateSkill(girl, SKILL_MEDICINE, 1);	// `J` she watched what the doctors and nurses were doing

	g_Girls.UpdateStat(girl, STAT_EXP, 1);   // Just because!

	// send her to the waiting room when she is healthy
	if (girl->health() > 90 && girl->tiredness() < 10)
	{
		if (nummecs + numnurse < 1)	ss << "\n\nShe wanders out of the Clinic when she is feeling better.";
		else						ss << "\n\nShe has been released from the Clinic.";
		if (girl->m_DayJob == JOB_GETHEALING)	girl->m_DayJob = JOB_CLINICREST;
		if (girl->m_NightJob == JOB_GETHEALING)	girl->m_NightJob = JOB_CLINICREST;
		if (girl->m_DayJob == JOB_GETREPAIRS)	girl->m_DayJob = JOB_CLINICREST;
		if (girl->m_NightJob == JOB_GETREPAIRS)	girl->m_NightJob = JOB_CLINICREST;
	}

	girl->m_Events.AddMessage(ss.str(), IMGTYPE_PROFILE, Day0Night1);

	return false;
}
开发者ID:Jenocke,项目名称:test,代码行数:90,代码来源:WorkRepairShop.cpp


示例10: init

void cScreenTown::init()
{
	if (BuyClinic != -1)
	{
		(g_ChoiceManager.GetChoice(0) == 0 ? GetClinic = true : BuyClinic = -1);
		g_ChoiceManager.Free();
	}
	if (GetClinic)
	{
		static_brothel_data *bpt = clinic_data + BuyClinic;
		g_Gold.brothel_cost(bpt->price);
		g_Clinic.NewBrothel(bpt->rooms, bpt->maxrooms);
		g_Clinic.SetName(0, gettext("Clinic"));
		GetClinic = false;
		BuyClinic = -1;
	}
	if (BuyCentre != -1)
	{
		(g_ChoiceManager.GetChoice(0) == 0 ? GetCentre = true : BuyCentre = -1);
		g_ChoiceManager.Free();
	}
	if (GetCentre)
	{
		static_brothel_data *bpt = centre_data + BuyCentre;
		g_Gold.brothel_cost(bpt->price);
		g_Centre.NewBrothel(bpt->rooms, bpt->maxrooms);
		g_Centre.SetName(0, gettext("Centre"));
		GetCentre = false;
		BuyCentre = -1;
	}
	if (BuyArena != -1)
	{
		(g_ChoiceManager.GetChoice(0) == 0 ? GetArena = true : BuyArena = -1);
		g_ChoiceManager.Free();
	}
	if (GetArena)
	{
		static_brothel_data *bpt = arena_data + BuyArena;

		g_Gold.brothel_cost(bpt->price);
		g_Arena.NewBrothel(bpt->rooms, bpt->maxrooms);
		g_Arena.SetName(0, gettext("Arena"));

		GetArena = false;
		BuyArena = -1;
	}
	if (BuyStudio != -1)
	{
		(g_ChoiceManager.GetChoice(0) == 0 ? GetStudio = true : BuyStudio = -1);
		g_ChoiceManager.Free();
	}
	if (GetStudio)
	{
		static_brothel_data *bpt = studio_data + BuyStudio;
		g_Gold.brothel_cost(bpt->price);
		g_Studios.NewBrothel(bpt->rooms, bpt->maxrooms);
		g_Studios.SetName(0, gettext("Studio"));
		GetStudio = false;
		BuyStudio = -1;
	}
	if (BuyFarm != -1)
	{
		(g_ChoiceManager.GetChoice(0) == 0 ? GetFarm = true : BuyFarm = -1);
		g_ChoiceManager.Free();
	}
	if (GetFarm)
	{
		static_brothel_data *bpt = farm_data + BuyFarm;
		g_Gold.brothel_cost(bpt->price);
		g_Farm.NewBrothel(bpt->rooms, bpt->maxrooms);
		g_Farm.SetName(0, gettext("Farm"));
		GetFarm = false;
		BuyFarm = -1;
	}
	if (GetName)
	{
		if (g_ReturnText != "")
		{
			if (g_Brothels.GetObjective() && g_Brothels.GetObjective()->m_Objective == OBJECTIVE_GETNEXTBROTHEL) 
				g_Brothels.PassObjective();
			static_brothel_data *bpt = brothel_data + BuyBrothel;
			g_Gold.brothel_cost(bpt->price);
			g_Brothels.NewBrothel(bpt->rooms, bpt->maxrooms);
			g_Brothels.SetName(g_Brothels.GetNumBrothels() - 1, g_ReturnText);
			g_InitWin = true;
		}
		GetName = false;
		BuyBrothel = -1;
	}
	if (BuyBrothel != -1)
	{
		if (g_ChoiceManager.GetChoice(0) == 0)
		{
			g_MessageQue.AddToQue("Enter a name for your new brothel.", 0);
			GetName = true;
			g_InitWin = true;
			g_WinManager.Push(GetString, &g_GetString);
		}
		else BuyBrothel = -1;
		g_ChoiceManager.Free();
//.........这里部分代码省略.........
开发者ID:belroshir,项目名称:crazys-wm-mod,代码行数:101,代码来源:cScreenTown.cpp


示例11: WorkJanitor

// `J` Job Clinic - Staff - job_is_cleaning
bool cJobManager::WorkJanitor(sGirl* girl, sBrothel* brothel, bool Day0Night1, string& summary)
{
	int actiontype = ACTION_WORKCLEANING;
	stringstream ss; string girlName = girl->m_Realname; ss << girlName;
	int roll_a = g_Dice.d100(), roll_b = g_Dice.d100(), roll_c = g_Dice.d100();
	if (roll_a <= 50 && g_Girls.DisobeyCheck(girl, actiontype, brothel))
	{
		ss << " refused to clean the Clinic.";
		girl->m_Events.AddMessage(ss.str(), IMGTYPE_PROFILE, EVENT_NOWORK);
		return true;
	}
	ss << " worked cleaning the Clinic.\n\n";

	g_Girls.UnequipCombat(girl);	// put that shit away

	double CleanAmt = JP_Janitor(girl, false);
	int enjoy = 0;
	int wages = 0;
	int tips = 0;
	int imagetype = IMGTYPE_MAID;
	int msgtype = Day0Night1;
	bool playtime = false;

	if (roll_a <= 10)
	{
		enjoy -= g_Dice % 3 + 1;
		CleanAmt *= 0.8;
		if (roll_b < 50)	ss << "She spilled a bucket of something unpleasant all over herself.";
		else				ss << "She did not like cleaning the Clinic today.";
	}
	else if (roll_a >= 90)
	{
		enjoy += g_Dice % 3 + 1;
		CleanAmt *= 1.1;
		if (roll_b < 50)	ss << "She cleaned the building while humming a pleasant tune.";
		else				ss << "She had a great time working today.";
	}
	else
	{
		enjoy += g_Dice % 2;
		ss << "The shift passed uneventfully.";
	}
	ss << "\n\n";

	// slave girls not being paid for a job that normally you would pay directly for do less work
	if ((girl->is_slave() && !cfg.initial.slave_pay_outofpocket()))
	{
		CleanAmt *= 0.9;
		wages = 0;
	}
	else
	{
		wages = min(30, int(30 + (CleanAmt / 10))); // `J` Pay her based on how much she cleaned
	}

	// `J` if she can clean more than is needed, she has a little free time after her shift
	if (brothel->m_Filthiness < CleanAmt / 2) playtime = true;
	ss << "\n\nCleanliness rating improved by " << (int)CleanAmt;
	if (playtime)	// `J` needs more variation
	{
		ss << "\n\n" << girlName << " finished her cleaning early so she ";
		if (girl->is_pregnant() && girl->health() < 90)
		{
			ss << "got a quick checkup and made sure her unborn baby was doing OK.";
			g_Girls.UpdateStat(girl, STAT_HEALTH, 10);
			g_Girls.UpdateStat(girl, STAT_HAPPINESS, (g_Dice % 4) + 2);
		}
		else if (girl->health() < 80)
		{
			ss << "got a quick checkup.";
			g_Girls.UpdateStat(girl, STAT_HEALTH, 10);
		}
		else if (girl->is_pregnant() || g_Dice.percent(40))
		{
			ss << "hung out in the maternity ward watching the babies.";
			g_Girls.UpdateStat(girl, STAT_HAPPINESS, (g_Dice % 6) - 2);
		}
		else if (girl->tiredness() > 50 && brothel->free_rooms() > 10)
		{
			ss << "found an empty room and took a nap.";
			g_Girls.UpdateStat(girl, STAT_TIREDNESS, -((g_Dice % 10) + 5));
		}
		else
		{
			int d = g_Clinic.GetNumGirlsOnJob(brothel->m_id, JOB_DOCTOR, Day0Night1);
			int n = g_Clinic.GetNumGirlsOnJob(brothel->m_id, JOB_NURSE, Day0Night1);
			ss << "watched the ";
			if (d + n < 1)
			{
				ss << "people wander about the Clinic.";
				g_Girls.UpdateStat(girl, STAT_HAPPINESS, (g_Dice % 3) - 1);
			}
			else
			{
				if (d > 0)			ss << "doctor" << (d > 1 ? "s" : "");
				if (d > 0 && n > 0)	ss << " and ";
				if (n > 0)			ss << "nurse" << (n > 1 ? "s" : "");
				ss << " do their job" << (d + n > 1 ? "s" : "");
				g_Girls.UpdateSkill(girl, SKILL_MEDICINE, (g_Dice % 2));
//.........这里部分代码省略.........
开发者ID:mjsmagalhaes,项目名称:crazys-wm-mod,代码行数:101,代码来源:WorkJanitor.cpp



注:本文中的cClinicManager类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ cCommandOutputCallback类代码示例发布时间:2022-05-31
下一篇:
C++ cClientHandle类代码示例发布时间:2022-05-31
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap