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

C++ cGold类代码示例

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

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



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

示例1: rivals_plunder_pc_gold

string cRivalManager::rivals_plunder_pc_gold(cRival* rival)
{
	if (g_Gold.ival() <= 0) return "";						// no gold to sieze? nothing to do.
	long pc_gold = g_Gold.ival();							// work out how much they take. make a note of how much we have

	long gold = g_Dice.random(min((long)2000, pc_gold));
	if (gold < 45) gold = 45;								// make sure there's at least 45 gold taken
	if (pc_gold < gold) gold = pc_gold;						// unless the pc has less than that, in which case take the lot
	g_Gold.rival_raids(gold);								// deduct the losses against rival raid losses
	rival->m_Gold += gold;									// add the aount to rival coffers

	stringstream ss;
	ss << gettext("\nThey get away with ") << gold << gettext(" gold.");	// format a message and store it in the string that was passed to us
	return ss.str();
}
开发者ID:taukita,项目名称:crazys-wm-mod,代码行数:15,代码来源:cRival.cpp


示例2: take_gold

void cScreenGirlDetails::take_gold(sGirl *girl)
{
	string message;
	bool girl_win = do_take_gold(girl, message);
	/*
	*	if the girl won, then we're pretty much sorted
	*	display the message and return
	*/
	if (girl_win)
	{
		g_MessageQue.AddToQue(message, 0);
		g_InitWin = true;
		return;
	}
	/*
	*	so the girl lost: take away her money now
	*/
	g_Gold.misc_credit(girl->m_Money);
	girl->m_Money = 0;
	/*
	*	she isn't going to like this much
	*	but it's not so bad for slaves
	*/
	if (girl->m_States&(1 << STATUS_SLAVE))
	{
		g_Girls.UpdateStat(girl, STAT_CONFIDENCE, -1);
		g_Girls.UpdateStat(girl, STAT_OBEDIENCE, 5);
		g_Girls.UpdateStat(girl, STAT_SPIRIT, -2);
		g_Girls.UpdateStat(girl, STAT_PCHATE, 5);
		g_Girls.UpdateStat(girl, STAT_PCLOVE, -5);
		g_Girls.UpdateStat(girl, STAT_PCFEAR, 5);
		g_Girls.UpdateStat(girl, STAT_HAPPINESS, -20);
	}
	else
	{
		g_Girls.UpdateStat(girl, STAT_CONFIDENCE, -5);
		g_Girls.UpdateStat(girl, STAT_OBEDIENCE, 5);
		g_Girls.UpdateStat(girl, STAT_SPIRIT, -10);
		g_Girls.UpdateStat(girl, STAT_PCHATE, 30);
		g_Girls.UpdateStat(girl, STAT_PCLOVE, -30);
		g_Girls.UpdateStat(girl, STAT_PCFEAR, 10);
		g_Girls.UpdateStat(girl, STAT_HAPPINESS, -50);
	}
	/*
	*	and queue the message again
	*/
	g_MessageQue.AddToQue(message, 0);
	g_InitWin = true;
	return;
}
开发者ID:diamondialis,项目名称:crazys-wm-mod,代码行数:50,代码来源:cScreenGirlDetails.cpp


示例3: check_farm

void cScreenTown::check_farm(int FarmNum)
{	// player clicked on one of the brothels
	if (g_Farm.GetNumBrothels() == FarmNum)
	{	// player doesn't own this Studio... can he buy it? 
		static_brothel_data *bck = farm_data + FarmNum;
		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);
			BuyFarm = FarmNum;
		}
	}
	else
	{	// player owns this brothel... go to it
		g_Building = BUILDING_FARM;
		g_CurrFarm = FarmNum;
		g_WinManager.push("Farm Screen");
	}
}
开发者ID:belroshir,项目名称:crazys-wm-mod,代码行数:36,代码来源:cScreenTown.cpp


示例4: UpdateGirls

// Run the shifts
void cCentreManager::UpdateGirls(sBrothel* brothel, bool Day0Night1)	// Start_Building_Process_B
{
	
	stringstream ss;
	string summary, girlName;

	u_int restjob = JOB_CENTREREST;
	u_int matronjob = JOB_CENTREMANAGER;
	u_int firstjob = JOB_CENTREREST;
	u_int lastjob = JOB_THERAPY;
	u_int sw = 0, psw = 0;

	int totalPay = 0, totalTips = 0, totalGold = 0;
	int sum = EVENT_SUMMARY;
	int numgirls = GetNumGirls(brothel->m_id);

	bool matron = false, matrondone = false;
	bool counselor = false;

	bool refused = false;

	m_Processing_Shift = Day0Night1;		// WD:	Set processing flag to shift type

	//////////////////////////////////////////////////////
	//  Handle the start of shift stuff for all girls.  //
	//////////////////////////////////////////////////////
	sGirl* current = brothel->m_Girls;
	while (current)
	{
		if (current->health() <= 0)		// skip dead girls
		{
			if (current->m_Next) { current = current->m_Next; continue; }
			else { current = 0; break; }
		}
		else
		{
			g_Girls.UseItems(current);				// Girl uses items she has
			g_Girls.CalculateGirlType(current);		// update the fetish traits
			g_Girls.CalculateAskPrice(current, true);	// Calculate the girls asking price

			current = current->m_Next; // Next Girl
		}
	}


	////////////////////////////////////////////////////////
	//  Process Matron first incase she refuses to work.  //
	////////////////////////////////////////////////////////
	current = brothel->m_Girls;
	while (current && !matrondone)
	{
		if (current->health() <= 0 ||
			(GetNumGirlsOnJob(0, matronjob, Day0Night1) > 0 && (current->m_DayJob != matronjob || current->m_NightJob != matronjob)) ||
			(GetNumGirlsOnJob(0, matronjob, Day0Night1) < 1 && (current->m_PrevDayJob != matronjob || current->m_PrevNightJob != matronjob)))
		{	// Sanity check! Don't process dead girls and only process those with matron jobs
			if (current->m_Next) { current = current->m_Next; continue; }
			else { current = 0; break; }
		}
		// `J` so someone is or was a matron

		girlName = current->m_Realname;
		// if there is no matron on duty, we see who was on duty previously
		if (GetNumGirlsOnJob(0, matronjob, Day0Night1) < 1)
		{
			// if a matron was found and she is healthy, not tired and not on maternity leave... send her back to work
			if ((current->m_PrevDayJob == matronjob || current->m_PrevNightJob == matronjob) &&
				(g_Girls.GetStat(current, STAT_HEALTH) >= 50 && g_Girls.GetStat(current, STAT_TIREDNESS) <= 50) &&
				current->m_PregCooldown < cfg.pregnancy.cool_down())
				// Matron job is more important so she will go back to work at 50% instead of regular 80% health and 20% tired
			{
				current->m_DayJob = current->m_NightJob = matronjob;
				current->m_PrevDayJob = current->m_PrevNightJob = 255;
				current->m_Events.AddMessage("The Centre Manager puts herself back to work.", IMGTYPE_PROFILE, EVENT_BACKTOWORK);
			}
			else if (current->m_Next) { current = current->m_Next; continue; }
			else { current = 0; break; }
		}
		// `J` Now we have a matron so lets see if she will work

		totalPay = totalTips = totalGold = 0;
		sum = EVENT_SUMMARY; summary = ""; ss.str("");

		// `J` she can refuse the first shift then decide to work the second shift 
		if (!current->m_Refused_To_Work_Day && Day0Night1 == SHIFT_NIGHT)	// but if she worked the first shift she continues the rest of the night
		{
			matron = true;
			ss << girlName << " continued to help the other girls throughout the night.";
		}
		else if (g_Girls.DisobeyCheck(current, ACTION_WORKMATRON, brothel))
		{
			(Day0Night1 ? current->m_Refused_To_Work_Night = true : current->m_Refused_To_Work_Day = true);
			brothel->m_Fame -= g_Girls.GetStat(current, STAT_FAME);
			ss << girlName << " refused to work as the Centre Manager.";
			sum = EVENT_NOWORK;
		}
		else	// so there is less chance of a matron refusing the entire turn
		{
			matron = true;
			totalPay = totalTips = totalGold = 0;
//.........这里部分代码省略.........
开发者ID:DagothRa,项目名称:crazys-wm-mod,代码行数:101,代码来源:cCentre.cpp


示例5: UpdateCentre

// ----- Update & end of turn
void cCentreManager::UpdateCentre()	// Start_Building_Process_A
{
	cTariff tariff;
	stringstream ss;
	string girlName;

	sBrothel* current = (sBrothel*)m_Parent;
	u_int restjob = JOB_CENTREREST;
	u_int matronjob = JOB_CENTREMANAGER;
	u_int firstjob = JOB_CENTREREST;
	u_int lastjob = JOB_THERAPY;

	current->m_Finance.zero();
	current->m_AntiPregUsed = 0;
	m_Rehab_Patient_Time = 0;

	sGirl* cgirl = current->m_Girls;
	while (cgirl)
	{
		current->m_Filthiness++;
		if (cgirl->health() <= 0)			// Remove any dead bodies from last week
		{
			current->m_Filthiness++; // `J` Death is messy
			sGirl* DeadGirl = 0;
			girlName = cgirl->m_Realname;
			DeadGirl = cgirl;
			// If there are more girls to process
			cgirl = (cgirl->m_Next) ? cgirl->m_Next : 0;
			// increase all the girls fear and hate of the player for letting her die (weather his fault or not)
			UpdateAllGirlsStat(current, STAT_PCFEAR, 2);
			UpdateAllGirlsStat(current, STAT_PCHATE, 1);

			ss.str(""); ss << girlName << " has died from her injuries, the other girls all fear and hate you a little more.";
			DeadGirl->m_Events.AddMessage(ss.str(), IMGTYPE_DEATH, EVENT_DANGER);
			g_MessageQue.AddToQue(ss.str(), COLOR_RED);
			ss.str(""); ss << girlName << " has died from her injuries.  Her body will be removed by the end of the week.";
			DeadGirl->m_Events.AddMessage(ss.str(), IMGTYPE_DEATH, EVENT_SUMMARY);

			RemoveGirl(0, DeadGirl); DeadGirl = 0;	// cleanup
		}
		else
		{
			cgirl->m_Events.Clear();			// Clear the girls' events from the last turn
			cgirl->where_is_she = 0;
			cgirl->m_InStudio = false;
			cgirl->m_InArena = false;
			cgirl->m_InCentre = true;
			cgirl->m_InClinic = false;
			cgirl->m_InFarm = false;
			cgirl->m_InHouse = false;

			cgirl->m_Pay = cgirl->m_Tips = 0;

			// `J` Check for out of building jobs and set yesterday jobs for everyone first
			if (cgirl->m_DayJob	  < firstjob || cgirl->m_DayJob   > lastjob)	cgirl->m_DayJob = restjob;
			if (cgirl->m_NightJob < firstjob || cgirl->m_NightJob > lastjob)	cgirl->m_NightJob = restjob;
			if (cgirl->m_PrevDayJob != 255 && (cgirl->m_PrevDayJob	 < firstjob || cgirl->m_PrevDayJob   > lastjob))	cgirl->m_PrevDayJob = 255;
			if (cgirl->m_PrevNightJob != 255 && (cgirl->m_PrevNightJob < firstjob || cgirl->m_PrevNightJob > lastjob))	cgirl->m_PrevNightJob = 255;
			cgirl->m_YesterDayJob = cgirl->m_DayJob;		// `J` set what she did yesterday
			cgirl->m_YesterNightJob = cgirl->m_NightJob;	// `J` set what she did yesternight
			cgirl->m_Refused_To_Work_Day = cgirl->m_Refused_To_Work_Night = false;
			string summary = "";

			g_Girls.AddTiredness(cgirl);			// `J` moved all girls add tiredness to one place
			do_food_and_digs(current, cgirl);		// Brothel only update for girls accommodation level
			g_Girls.updateGirlAge(cgirl, true);		// update birthday counter and age the girl
			g_Girls.HandleChildren(cgirl, summary);	// handle pregnancy and children growing up
			g_Girls.updateSTD(cgirl);				// health loss to STD's				NOTE: Girl can die
			g_Girls.updateHappyTraits(cgirl);		// Update happiness due to Traits	NOTE: Girl can die
			updateGirlTurnBrothelStats(cgirl);		// Update daily stats				Now only runs once per day
			g_Girls.updateGirlTurnStats(cgirl);		// Stat Code common to Dugeon and Brothel

			if (cgirl->m_JustGaveBirth)				// if she gave birth, let her rest this week
			{
				if (cgirl->m_DayJob != restjob)		cgirl->m_PrevDayJob = cgirl->m_DayJob;
				if (cgirl->m_NightJob != restjob)	cgirl->m_PrevNightJob = cgirl->m_NightJob;
				cgirl->m_DayJob = cgirl->m_NightJob = restjob;
			}

			cgirl = cgirl->m_Next;
		}
	}

	UpdateGirls(current, 0);	// Run the Day Shift

	UpdateGirls(current, 1);	// Run the Nighty Shift

	if (current->m_Filthiness < 0)		current->m_Filthiness = 0;
	if (current->m_SecurityLevel < 0)	current->m_SecurityLevel = 0;

	g_Gold.brothel_accounts(current->m_Finance, current->m_id);

	cgirl = current->m_Girls;
	while (cgirl)
	{
		g_Girls.updateTemp(cgirl);			// update temp stuff
		g_Girls.EndDayGirls(current, cgirl);
		cgirl = cgirl->m_Next;
	}
//.........这里部分代码省略.........
开发者ID:DagothRa,项目名称:crazys-wm-mod,代码行数:101,代码来源:cCentre.cpp


示例6: UpdateGirls

// Run the shifts
void cArenaManager::UpdateGirls(sBrothel* brothel, bool Day0Night1)	// Start_Building_Process_B
{
	stringstream ss;
	string summary, girlName;

	u_int sw = 0, psw = 0;

	int totalPay = 0, totalTips = 0, totalGold = 0;
	int sum = EVENT_SUMMARY;
	int numgirls = GetNumGirls(brothel->m_id);

	bool matron = false, matrondone = false;
	
	
	bool refused = false;

	m_Processing_Shift = Day0Night1;		// WD:	Set processing flag to shift type

	//////////////////////////////////////////////////////
	//  Handle the start of shift stuff for all girls.  //
	//////////////////////////////////////////////////////
	sGirl* current = brothel->m_Girls;
	while (current)
	{
		if (current->health() <= 0)		// skip dead girls
		{
			if (current->m_Next) { current = current->m_Next; continue; }
			else { current = 0; break; }
		}
		else
		{
			g_Girls.UseItems(current);					// Girl uses items she has
			g_Girls.CalculateGirlType(current);			// update the fetish traits
			g_Girls.CalculateAskPrice(current, true);	// Calculate the girls asking price

			current = current->m_Next; // Next Girl
		}
	}


	////////////////////////////////////////////////////////
	//  Process Matron first incase she refuses to work.  //
	////////////////////////////////////////////////////////
	current = brothel->m_Girls;
	while (current && !matrondone)
	{
		if (current->health() <= 0 ||
			(GetNumGirlsOnJob(0, matronjob, Day0Night1) > 0 && (current->m_DayJob != matronjob || current->m_NightJob != matronjob)) ||
			(GetNumGirlsOnJob(0, matronjob, Day0Night1) < 1 && (current->m_PrevDayJob != matronjob || current->m_PrevNightJob != matronjob)))
		{	// Sanity check! Don't process dead girls and only process those with matron jobs
			if (current->m_Next) { current = current->m_Next; continue; }
			else { current = 0; break; }
		}
		// `J` so someone is or was a matron

		girlName = current->m_Realname;
		// if there is no matron on duty, we see who was on duty previously
		if (GetNumGirlsOnJob(0, matronjob, Day0Night1) < 1)
		{
			// if a matron was found and she is healthy, not tired and not on maternity leave... send her back to work
			if ((current->m_PrevDayJob == matronjob || current->m_PrevNightJob == matronjob) &&
				(g_Girls.GetStat(current, STAT_HEALTH) >= 50 && g_Girls.GetStat(current, STAT_TIREDNESS) <= 50) &&
				current->m_PregCooldown < cfg.pregnancy.cool_down())
				// Matron job is more important so she will go back to work at 50% instead of regular 80% health and 20% tired
			{
				current->m_DayJob = current->m_NightJob = matronjob;
				current->m_PrevDayJob = current->m_PrevNightJob = 255;
				current->m_Events.AddMessage("The Doctore puts herself back to work.", IMGTYPE_PROFILE, EVENT_BACKTOWORK);
			}
			else if (current->m_Next) { current = current->m_Next; continue; }
			else { current = 0; break; }
		}
		// `J` Now we have a matron so lets see if she will work

		totalPay = totalTips = totalGold = 0;
		sum = EVENT_SUMMARY; summary = ""; ss.str("");

		// `J` she can refuse the first shift then decide to work the second shift 
		if (!current->m_Refused_To_Work_Day && Day0Night1 == SHIFT_NIGHT)	// but if she worked the first shift she continues the rest of the night
		{
			matron = true;
			ss << girlName << " continued to help the other girls throughout the night.";
		}
		else if (g_Girls.DisobeyCheck(current, ACTION_WORKMATRON, brothel))
		{
			(Day0Night1 ? current->m_Refused_To_Work_Night = true : current->m_Refused_To_Work_Day = true);
			brothel->m_Fame -= g_Girls.GetStat(current, STAT_FAME);
			ss << girlName << " refused to work as the Doctore.";
			sum = EVENT_NOWORK;
		}
		else	// so there is less chance of a matron refusing the entire turn
		{
			matron = true;
			totalPay = totalTips = totalGold = 0;
			m_JobManager.JobFunc[matronjob](current, brothel, Day0Night1, summary);
			totalGold += current->m_Pay + current->m_Tips;

			// She does not get paid for the first shift and gets docked some pay from the second shift if she refused once
			if (Day0Night1 == SHIFT_NIGHT) totalGold /= 3;
//.........这里部分代码省略.........
开发者ID:belroshir,项目名称:crazys-wm-mod,代码行数:101,代码来源:cArena.cpp


示例7: check_events

void cScreenGangs::check_events()
{
	if (g_InterfaceEvents.GetNumEvents() == 0) return;	// no events means we can go home
	if (g_InterfaceEvents.CheckButton(back_id))			// if it's the back button, pop the window off the stack and we're done
	{
		g_InitWin = true;
		g_WinManager.Pop();
		return;
	}
	if (g_InterfaceEvents.CheckButton(ganghire_id))
	{
		hire_recruitable();
		return;
	}
	if (g_InterfaceEvents.CheckButton(weaponup_id))
	{
		int cost = 0;
		int *wlev = g_Gangs.GetWeaponLevel();
		cost = tariff.goon_weapon_upgrade(*wlev);
		if (g_Gold.item_cost(cost) == true)
		{
			*wlev += 1;
			g_InitWin = true;
		}
		wlev = 0;
		return;
	}

	int buynets = 0;
	if (g_InterfaceEvents.CheckButton(netbuy_id))	buynets = 1;
	if (g_InterfaceEvents.CheckButton(netbuy10_id))	buynets = 10;
	if (g_InterfaceEvents.CheckButton(netbuy20_id))	buynets = 20;
	if (buynets > 0)
	{
		int cost = 0;
		int amount = buynets;
		int *nets = g_Gangs.GetNets();
		if (((*nets) + buynets) > 60) amount = 60 - (*nets);
		cost = tariff.nets_price(amount);
		if (g_Gold.item_cost(cost) == true)
		{
			*nets += amount;
			if (IsCheckboxOn(netautobuy_id)) g_Gangs.KeepNetStocked(*nets);
			g_InitWin = true;
		}
		nets = 0;
		buynets = 0;
		return;
	}

	int buypots = 0;
	if (g_InterfaceEvents.CheckButton(healbuy_id))		buypots = 1;
	if (g_InterfaceEvents.CheckButton(healbuy10_id))	buypots = 10;
	if (g_InterfaceEvents.CheckButton(healbuy20_id))	buypots = 20;
	if (buypots > 0)
	{
		int cost = 0;
		int amount = buypots;
		int *potions = g_Gangs.GetHealingPotions();
		if (((*potions) + buypots) > 200)	amount = 200 - (*potions);
		cost = tariff.healing_price(amount);
		if (g_Gold.item_cost(cost) == true)
		{
			*potions += amount;
			if (IsCheckboxOn(healautobuy_id)) g_Gangs.KeepHealStocked(*potions);
			g_InitWin = true;
		}
		potions = 0;
		buypots = 0;
		return;
	}
	if (g_InterfaceEvents.CheckCheckbox(netautobuy_id))
	{
		int *nets = g_Gangs.GetNets();
		g_Gangs.KeepNetStocked(IsCheckboxOn(netautobuy_id) ? *nets : 0);
	}
	if (g_InterfaceEvents.CheckCheckbox(healautobuy_id))
	{
		int *potions = g_Gangs.GetHealingPotions();
		g_Gangs.KeepHealStocked(IsCheckboxOn(healautobuy_id) ? *potions : 0);
	}
	if (g_InterfaceEvents.CheckButton(gangfire_id))
	{
		selection = GetLastSelectedItemFromList(ganglist_id);
		if (selection != -1)
		{
			g_Gangs.FireGang(selection);
			g_InitWin = true;
		}
		return;
	}
	if (g_InterfaceEvents.CheckListbox(recruitlist_id))
	{
		string ClickedHeader = HeaderClicked(recruitlist_id);
		if (ClickedHeader != "")
		{
			g_LogFile.ss() << "User clicked \"" << ClickedHeader << "\" column header on Recruit listbox" << endl; g_LogFile.ssend();
			return;
		}

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


示例8: init

void cScreenGangs::init()
{
	g_CurrentScreen = SCREEN_GANGMANAGEMENT;
	if (!g_InitWin) return;
	Focused();
	g_InitWin = false;

	selection = GetLastSelectedItemFromList(ganglist_id);
	sel_recruit = GetLastSelectedItemFromList(recruitlist_id);

	ClearListBox(missionlist_id);
	AddToListBox(missionlist_id, 0, "GUARDING");
	AddToListBox(missionlist_id, 1, "SABOTAGE");
	AddToListBox(missionlist_id, 2, "SPY ON GIRLS");
	AddToListBox(missionlist_id, 3, "RECAPTURE");
	AddToListBox(missionlist_id, 4, "ACQUIRE TERRITORY");
	AddToListBox(missionlist_id, 5, "PETTY THEFT");
	AddToListBox(missionlist_id, 6, "GRAND THEFT");
	AddToListBox(missionlist_id, 7, "KIDNAPPING");
	AddToListBox(missionlist_id, 8, "CATACOMBS");
	AddToListBox(missionlist_id, 9, "TRAINING");
	AddToListBox(missionlist_id, 10, "RECRUITING");
	AddToListBox(missionlist_id, 11, "SERVICE");

	SetCheckBox(controlcatacombs_id, (g_Gangs.Control_Gangs()));
	SliderRange(girlspercslider_id, 0, 100, g_Gangs.Gang_Gets_Girls(), 1);
	SliderRange(itemspercslider_id, 0, 100, g_Gangs.Gang_Gets_Girls() + g_Gangs.Gang_Gets_Items(), 1);
	ss.str("");	ss << "Girls : " << g_Gangs.Gang_Gets_Girls() << "%";	EditTextItem(ss.str(), ganggetsgirls_id);
	ss.str("");	ss << "Items : " << g_Gangs.Gang_Gets_Items() << "%";	EditTextItem(ss.str(), ganggetsitems_id);
	ss.str("");	ss << "Beasts : " << g_Gangs.Gang_Gets_Beast() << "%";	EditTextItem(ss.str(), ganggetsbeast_id);

	SetCheckBox(netautobuy_id, (g_Gangs.GetNetRestock() > 0));
	SetCheckBox(healautobuy_id, (g_Gangs.GetHealingRestock() > 0));

	// weapon upgrades
	int *wlev = g_Gangs.GetWeaponLevel();
	ss.str("");	ss << "Weapon Level: " << *wlev;
	if ((*wlev) < 4)
	{
		EnableButton(weaponup_id);
		ss << " Next: " << tariff.goon_weapon_upgrade(*wlev) << "g";
	}
	else DisableButton(weaponup_id);
	g_LogFile.ss() << "weapon text = '" << ss.str() << "'" << endl; g_LogFile.ssend();
	EditTextItem(ss.str(), weaponlevel_id);

	int *nets = g_Gangs.GetNets();
	ss.str(""); ss << "Nets (" << tariff.nets_price(1) << "g each): " << *nets;
	EditTextItem(ss.str(), netdesc_id);
	DisableButton(netbuy_id, *nets >= 60);
	DisableButton(netbuy10_id, *nets >= 60);
	DisableButton(netbuy20_id, *nets >= 60);
	DisableCheckBox(netautobuy_id, *nets < 1);

	int *potions = g_Gangs.GetHealingPotions();
	ss.str(""); ss << "Heal Potions (" << tariff.healing_price(1) << "g each): " << *potions;
	EditTextItem(ss.str(), healdesc_id);
	DisableButton(healbuy_id, *potions >= 200);
	DisableButton(healbuy10_id, *potions >= 200);
	DisableButton(healbuy20_id, *potions >= 200);
	DisableCheckBox(healautobuy_id, *potions < 1);

	int cost = 0;
	if (g_Gangs.GetNumGangs() > 0)
	{
		for (int i = 0; i < g_Gangs.GetNumGangs(); i++)
		{
			sGang* g = g_Gangs.GetGang(i);
			if (g == 0) g = g_Gangs.GetGang(i - 1);
			cost += tariff.goon_mission_cost(g->m_MissionID);
		}
	}
	ss.str(""); ss << "Weekly Cost: " << cost;
	EditTextItem(ss.str(), totalcost_id);
	if (gold_id >= 0)
	{
		ss.str(""); ss << "Gold: " << g_Gold.ival();
		EditTextItem(ss.str(), gold_id);
	}

	ClearListBox(ganglist_id);
	int num = 0;
	sGang* current = g_Gangs.GetGang(0);

	// loop through the gangs, populating the list box
	g_LogFile.write("Setting gang mission descriptions\n");
	for (current = g_Gangs.GetGang(0); current; current = current->m_Next)
	{
		// format the string with the gang name, mission and number of men
		string Data[11];
		ss.str("");	ss << current->m_Name;								Data[0] = ss.str();
		ss.str("");	ss << current->m_Num;								Data[1] = ss.str();
		ss.str("");	ss << short_mission_desc(current->m_MissionID);		Data[2] = ss.str();
		ss.str("");	ss << current->m_Skills[SKILL_COMBAT] << "%";		Data[3] = ss.str();
		ss.str("");	ss << current->m_Skills[SKILL_MAGIC] << "%";		Data[4] = ss.str();
		ss.str("");	ss << current->m_Stats[STAT_INTELLIGENCE] << "%";	Data[5] = ss.str();
		ss.str("");	ss << current->m_Stats[STAT_AGILITY] << "%";		Data[6] = ss.str();
		ss.str("");	ss << current->m_Stats[STAT_CONSTITUTION] << "%";	Data[7] = ss.str();
		ss.str("");	ss << current->m_Stats[STAT_CHARISMA] << "%";		Data[8] = ss.str();
		ss.str("");	ss << current->m_Stats[STAT_STRENGTH] << "%";		Data[9] = ss.str();
//.........这里部分代码省略.........
开发者ID:mjsmagalhaes,项目名称:crazys-wm-mod,代码行数:101,代码来源:cScreenGangs.cpp


示例9: UpdateGirls

// Run the shifts
void cClinicManager::UpdateGirls(sBrothel* brothel, bool Day0Night1)	// Start_Building_Process_B
{
	// `J` When modifying Jobs, search for "J-Change-Jobs"  :  found in >> cClinic.cpp
	u_int restjob = JOB_CLINICREST;
	u_int matronjob = JOB_CHAIRMAN;
	u_int firstjob = JOB_GETHEALING;
	u_int lastjob = JOB_JANITOR;
	stringstream ss;
	string summary, girlName;

	u_int sw = 0, psw = 0;

	int totalPay = 0, totalTips = 0, totalGold = 0;
	int sum = EVENT_SUMMARY;
	int numgirls = GetNumGirls(brothel->m_id);

	bool matron = false, matrondone = false;
	int numDoctors = 0, numNurses = 0;

	bool refused = false;

	m_Processing_Shift = Day0Night1;		// WD:	Set processing flag to shift type

	//////////////////////////////////////////////////////
	//  Handle the start of shift stuff for all girls.  //
	//////////////////////////////////////////////////////
	sGirl* current = brothel->m_Girls;
	while (current)
	{
		if (current->is_dead())		// skip dead girls
		{
			if (current->m_Next) { current = current->m_Next; continue; }
			else { current = 0; break; }
		}
		else
		{
			sum = EVENT_SUMMARY; summary = ""; ss.str("");

			g_Girls.UseItems(current);				// Girl uses items she has
			g_Girls.CalculateGirlType(current);		// update the fetish traits
			g_Girls.CalculateAskPrice(current, true);	// Calculate the girls asking price

			if (g_Girls.HasTrait(current, "AIDS") &&
				(current->m_DayJob == JOB_DOCTOR || current->m_DayJob == JOB_INTERN || current->m_DayJob == JOB_NURSE
				|| current->m_NightJob == JOB_DOCTOR || current->m_NightJob == JOB_INTERN || current->m_NightJob == JOB_NURSE))
			{
				ss << "Health laws prohibit anyone with AIDS from working in the Medical profession so " << girlName << " was sent to the waiting room.";
				current->m_DayJob = current->m_NightJob = JOB_CLINICREST;
				sum = EVENT_WARNING;
			}
			if (ss.str().length() > 0) current->m_Events.AddMessage(ss.str(), IMGTYPE_PROFILE, sum);
			current = current->m_Next; // Next Girl
		}

	}


	////////////////////////////////////////////////////////
	//  Process Matron first incase she refuses to work.  //
	////////////////////////////////////////////////////////
	current = brothel->m_Girls;
	while (current && !matrondone)
	{
		if (current->is_dead() ||
			(GetNumGirlsOnJob(0, matronjob, Day0Night1) > 0 && (current->m_DayJob != matronjob || current->m_NightJob != matronjob)) ||
			(GetNumGirlsOnJob(0, matronjob, Day0Night1) < 1 && (current->m_PrevDayJob != matronjob || current->m_PrevNightJob != matronjob)))
		{	// Sanity check! Don't process dead girls and only process those with matron jobs
			if (current->m_Next) { current = current->m_Next; continue; }
			else { current = 0; break; }
		}
		// `J` so someone is or was a matron

		girlName = current->m_Realname;
		// if there is no matron on duty, we see who was on duty previously
		if (GetNumGirlsOnJob(0, matronjob, Day0Night1) < 1)
		{
			// if a matron was found and she is healthy, not tired and not on maternity leave... send her back to work
			if ((current->m_PrevDayJob == matronjob || current->m_PrevNightJob == matronjob) &&
				(g_Girls.GetStat(current, STAT_HEALTH) >= 50 && g_Girls.GetStat(current, STAT_TIREDNESS) <= 50) &&
				current->m_PregCooldown < cfg.pregnancy.cool_down())
				// Matron job is more important so she will go back to work at 50% instead of regular 80% health and 20% tired
			{
				current->m_DayJob = current->m_NightJob = matronjob;
				current->m_PrevDayJob = current->m_PrevNightJob = 255;
				current->m_Events.AddMessage("The Chairman puts herself back to work.", IMGTYPE_PROFILE, EVENT_BACKTOWORK);
			}
			else if (current->m_Next) { current = current->m_Next; continue; }
			else { current = 0; break; }
		}
		// `J` Now we have a matron so lets see if she will work

		totalPay = totalTips = totalGold = 0;
		sum = EVENT_SUMMARY; summary = ""; ss.str("");

		// `J` she can refuse the first shift then decide to work the second shift 
		if (!current->m_Refused_To_Work_Day && Day0Night1 == SHIFT_NIGHT)	// but if she worked the first shift she continues the rest of the night
		{
			matron = true;
			ss << girlName << " continued to help the other girls throughout the night.";
//.........这里部分代码省略.........
开发者ID:mjsmagalhaes,项目名称:crazys-wm-mod,代码行数:101,代码来源:cClinic.cpp


示例10: Update

void cRivalManager::Update(int& NumPlayerBussiness)
{
	cRival* curr = m_Rivals;
	cConfig cfg;

	if (g_Year >= 1209 && g_Month > 3) m_PlayerSafe = false;

	while (curr)
	{
		// check if rival is killed
		if (curr->m_Gold <= 0 && curr->m_NumBrothels <= 0 && curr->m_NumGangs <= 0 &&
			curr->m_NumGirls <= 0 && curr->m_NumGamblingHalls <= 0 && curr->m_NumBars <= 0 &&
			curr->m_NumInventory <= 0)
		{
			cRival* tmp = curr->m_Next;
			RemoveRival(curr);
			curr = tmp;
			SetGameFlag(FLAG_RIVALLOSE);
			continue;
		}

		int income = 0; int upkeep = 0; int profit = 0;
		int totalincome = 0; int totalupkeep = 0;
		int startinggold = curr->m_Gold;

		// `J` added - rival power
		// `J` reworked to reduce the rival's power
		curr->m_Power = 
			max(0, curr->m_NumBrothels * 5) +
			max(0, curr->m_NumGamblingHalls * 2) +
			max(0, curr->m_NumBars * 1);
	
		// check if a rival is in danger
		if (curr->m_Gold <= 0 || curr->m_NumBrothels <= 0 || curr->m_NumGirls <= 0 || curr->m_NumGamblingHalls <= 0 || curr->m_NumBars <= 0)
		{
			// The AI is in danger so will stop extra spending
			curr->m_BribeRate = 0;
			curr->m_Influence = 0;

			// first try to sell any items
			if (curr->m_NumInventory > 0)
			{
				for (int i = 0; i < MAXNUM_RIVAL_INVENTORY && curr->m_Gold + income + upkeep < 1000; i++)
				{
					sInventoryItem* temp = curr->m_Inventory[i];
					if (temp)
					{
						income += (temp->m_Cost / 2);
						RemoveRivalInvByNumber(curr, i);
					}
				}
			}

			// try to buy at least one of each to make up for losses
			if (curr->m_NumBrothels <= 0 && curr->m_Gold + income + upkeep - 20000 >= 0)
			{
				upkeep -= 20000;
				curr->m_NumBrothels++;
			}
			if (curr->m_NumGirls <= 0 && curr->m_Gold + income + upkeep - 550 >= 0)
			{
				upkeep -= 550;
				curr->m_NumGirls++;
			}
			if (curr->m_NumGamblingHalls <= 0 && curr->m_Gold + income + upkeep - 10000 >= 0)
			{
				curr->m_NumGamblingHalls++;
				upkeep -= 10000;
			}
			if (curr->m_NumBars <= 0 && curr->m_Gold + income + upkeep - 2500 >= 0)
			{
				curr->m_NumBars++;
				upkeep -= 2500;
			}
			// buy more girls if there is enough money left (save at least 1000 in reserve)
			if (curr->m_Gold + income + upkeep >= 1550 && (curr->m_NumGirls < 5 || curr->m_NumGirls < curr->m_NumBrothels * 20))
			{
				int i = 0;
				while (curr->m_Gold + income + upkeep >= 1550 && i < (g_Dice % 5) + 1)	// buy up to 5 girls if they can afford it.
				{
					upkeep -= 550;
					curr->m_NumGirls++;
					i++;
				}
			}
		}

		// process money
		totalincome += income; totalupkeep += upkeep; curr->m_Gold += income; curr->m_Gold += upkeep; profit = totalincome + totalupkeep; 
		income = upkeep = 0;
		
		for (int i = 0; i < curr->m_NumGirls; i++)	// from girls
		{
			// If a rival has more girls than their brothels can handle, the rest work on the streets
			double rapechance = (i > curr->m_NumBrothels * 20 ? cfg.prostitution.rape_brothel() : cfg.prostitution.rape_streets());
			int Customers = g_Dice % 6;				// 0-5 cust per girl
			for (int i = 0; i < Customers;i++)
			{
				if (g_Dice.percent(rapechance))
				{
//.........这里部分代码省略.........
开发者ID:taukita,项目名称:crazys-wm-mod,代码行数:101,代码来源:cRival.cpp


示例11: init

void cScreenHouse::init()
{
	g_CurrentScreen = SCREEN_HOUSE;
	if (!g_InitWin) { return; }
	Focused();
	g_InitWin = false;

	locale syslocale("");
	stringstream ss;
	ss.imbue(syslocale);

	ss << gettext("CURRENT OBJECTIVE: ");
	sObjective* obj = g_Brothels.GetObjective();
	if (obj)
	{
		switch (obj->m_Objective)
		{
		case OBJECTIVE_REACHGOLDTARGET:
			ss << gettext("Gather ") << obj->m_Target << gettext(" gold");
			if (obj->m_Limit != -1) {
				ss << gettext(" in ") << obj->m_Limit << gettext(" weeks");
			}
			ss << gettext(", ") << g_Gold.ival() << gettext(" gathered so far.");
			break;
		case OBJECTIVE_GETNEXTBROTHEL:
			fmt_objective(ss, gettext("Purchase the next brothel"), obj->m_Limit);
			break;
			/*----
			case OBJECTIVE_PURCHASENEWGAMBLINGHALL:
			fmt_objective(ss, "Purchase a gambling hall", obj->m_Limit);
			break;
			case OBJECTIVE_PURCHASENEWBAR:
			fmt_objective(ss, "Purchase a bar", obj->m_Limit);
			break;
			----*/
		case OBJECTIVE_LAUNCHSUCCESSFULATTACK:
			fmt_objective(ss, gettext("Launch a successful attack"), obj->m_Limit);
			break;
		case OBJECTIVE_HAVEXGOONS:
			ss << gettext("Have ") << obj->m_Target << gettext(" gangs");
			fmt_objective(ss, "", obj->m_Limit);
			break;
		case OBJECTIVE_STEALXAMOUNTOFGOLD:
			ss << gettext("Steal ") << obj->m_Target << gettext(" gold");
			fmt_objective(ss, "", obj->m_Limit, obj->m_SoFar);
			break;
		case OBJECTIVE_CAPTUREXCATACOMBGIRLS:
			ss << gettext("Capture ") << obj->m_Target << gettext(" girls from the catacombs");
			fmt_objective(ss, "", obj->m_Limit, obj->m_SoFar);
			break;
		case OBJECTIVE_HAVEXMONSTERGIRLS:
			ss << gettext("Have a total of ") << obj->m_Target << gettext(" monster (non-human) girls");
			fmt_objective(ss, "", obj->m_Limit, g_Brothels.GetTotalNumGirls(true));
			break;
		case OBJECTIVE_KIDNAPXGIRLS:
			ss << gettext("Kidnap ") << obj->m_Target << gettext(" girls from the streets");
			fmt_objective(ss, "", obj->m_Limit, obj->m_SoFar);
			break;
		case OBJECTIVE_EXTORTXNEWBUSINESS:
			ss << gettext("Control ") << obj->m_Target << gettext(" city business");
			fmt_objective(ss, "", obj->m_Limit, obj->m_SoFar);
			break;
		case OBJECTIVE_HAVEXAMOUNTOFGIRLS:
			ss << gettext("Have a total of ") << obj->m_Target << gettext(" girls");
			fmt_objective(ss, "", obj->m_Limit, g_Brothels.GetTotalNumGirls(false));
			break;
		}
	}
	else ss << gettext("NONE\n");

	ss << gettext("\n")
		<< gettext("Current gold: ") << g_Gold.ival() << gettext("\n")
		<< gettext("Bank account: ") << g_Brothels.GetBankMoney() << gettext("\n")
		<< gettext("Businesses controlled: ")
		<< g_Gangs.GetNumBusinessExtorted()
		<< gettext("\n")
		;

	ss << gettext("\nCurrent number of runaways: ") << g_Brothels.GetNumRunaways() << gettext("\n");
	//	`J` added while loop to add runaway's names to the list 
	if (g_Brothels.GetNumRunaways() > 0)
	{
		sGirl* rgirl = g_Brothels.m_Runaways;
		while (rgirl)
		{
			ss << rgirl->m_Realname << gettext(" (") << rgirl->m_RunAway << gettext(")");
			rgirl = rgirl->m_Next;
			if (rgirl)	ss << gettext(" ,   ");
		}
	}

	EditTextItem(ss.str(), details_id);
	obj = 0;
}
开发者ID:DagothRa,项目名称:crazys-wm-mod,代码行数:94,代码来源:cScreenHouse.cpp


示例12: WorkTorturer

// `J` Job Brothel - General
bool cJobManager::WorkTorturer(sGirl* girl, sBrothel* brothel, bool Day0Night1, string& summary)
{
	int actiontype = ACTION_WORKTORTURER;
	if (Day0Night1) return false;		// Do this only once a day
	stringstream ss; string girlName = girl->m_Realname; ss << girlName;
	if (g_Girls.DisobeyCheck(girl, actiontype, brothel))
	{
		ss << " refused to torture anyone.";
		girl->morality(1);
		girl->m_Events.AddMessage(ss.str(), IMGTYPE_PROFILE, EVENT_NOWORK);
		return true;
	}
	ss << " is assigned to torture people in the dungeon.";
	girl->morality(-1);

	g_Girls.EquipCombat(girl);	// ready armor and weapons!

	// Complications
#if 0
	if (g_Dice.percent(10))
	{
		g_Girls.UpdateEnjoyment(girl, actiontype, -3);
		ss << girlName << gettext(" hurt herself while torturing someone.");
		girl->m_Events.AddMessage(message, IMGTYPE_PROFILE, Day0Night1);
	}
	else
	{
		g_Girls.UpdateEnjoyment(girl, actiontype, +3);
		ss << girlName << gettext(" enjoyed her job working in the dungeon.");
		girl->m_Events.AddMessage(message, IMGTYPE_PROFILE, Day0Night1);
	}
#else
	//SIN: bit more variety for the above
	int roll(g_Dice % 5);
	bool forFree = false;
	if (g_Dice.percent(10))
	{
		g_Girls.UpdateEnjoyment(girl, actiontype, -3);
		if (g_Girls.HasTrait(girl, "Sadistic") || g_Girls.HasTrait(girl, "Merciless") || g_Girls.GetStat(girl, STAT_MORALITY) < 30)
			ss << girlName << gettext(" hurt herself while torturing someone.\n");
		else
		{
			switch (roll)
			{
			case 0:		ss << girlName << gettext(" felt bad torturing people as she could easily see herself in the victim.\n"); break;
			case 1:		ss << girlName << gettext(" doesn't like this as she feels it is wrong to torture people.\n"); break;
			case 2:		ss << girlName << gettext(" feels like a bitch after one of her torture victims wept the entire time and kept begging her to stop.\n"); break;
			case 3:		ss << girlName << gettext(" feels awful after accidentally whipping someone in an excruciating place.\n"); break;
			case 4:		ss << girlName << gettext(" didn't enjoy this as she felt sorry for the victim.\n"); break;
			default:	ss << girlName << gettext(" didn't enjoy this for some illogical reason. [error]\n"); break; //shouldn't happen
			}
			//And a little randomness
			if (g_Dice.percent(40))
			{
				roll = g_Dice % 3;
				switch (roll)
				{
				case 0:
					ss << gettext("She hates you for making her do this today.\n");
					g_Girls.UpdateStat(girl, STAT_PCLOVE, -(g_Dice % 2));
					g_Girls.UpdateStat(girl, STAT_PCHATE, g_Dice % 2);
					break;
				case 1:
					ss << girlName << gettext(" is terrified that you treat people like this.\n");
					g_Girls.UpdateStat(girl, STAT_PCFEAR, g_Dice % 6);
					g_Girls.UpdateStat(girl, STAT_OBEDIENCE, g_Dice % 2);
					break;
				case 2:
					ss << gettext("She learned a bit about medicine while trying to stop the pain.\n");
					g_Girls.UpdateSkill(girl, SKILL_MEDICINE, g_Dice % 10);
					break;
				default:
					ss << girlName << gettext(" did something completely unexpected. [error]");
					break;
				}
			}
		}
		girl->m_Events.AddMessage(ss.str(), IMGTYPE_PROFILE, Day0Night1);
	}
	else
	{
		g_Girls.UpdateEnjoyment(girl, actiontype, +3);
		switch (roll)
		{
		case 0:		ss << girlName << gettext(" enjoyed her job working in the dungeon.\n"); break;
		case 1:		ss << girlName << gettext(" is turned on by the power of torturing people.\n"); break;
		case 2:		ss << girlName << gettext(" enjoyed trying out different torture devices and watching the effects on the victim.\n"); break;
		case 3:		ss << girlName << gettext(" spent her time in the dungeon whipping her victim in time to music to make amusing sound effects.\n"); break;
		case 4:		ss << girlName << gettext(" uses the victim's cries and screams to to figure out the 'best' areas to torture.\n"); break;
		default:	ss << girlName << gettext(" enjoyed this for some illogical reason. [error]\n"); break;
		}

		//And a little randomness
		if ((g_Girls.GetStat(girl, STAT_MORALITY) < 20 || g_Girls.HasTrait(girl, "Sadistic")) && g_Dice.percent(20))
		{
			ss << girlName << gettext(" loved this so much she wouldn't accept any money, as long as you promise she can do it again soon.\n");
			g_Girls.UpdateEnjoyment(girl, actiontype, +3);
			forFree = true;
		}
//.........这里部分代码省略.........
开发者ID:belroshir,项目名称:crazys-wm-mod,代码行数:101,代码来源:WorkTorturer.cpp


示例13: 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


示例14: WorkFeedPoor

// `J` Job Centre - General
bool cJobManager::WorkFeedPoor(sGirl* girl, sBrothel* brothel, bool Day0Night1, string& summary)
{
#pragma region //	Job setup				//
	int actiontype = ACT 

鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ cHTTPRequest类代码示例发布时间:2022-05-31
下一篇:
C++ cGangManager类代码示例发布时间: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