예제 #1
0
// `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;
		}
		if (g_Dice.percent(20))
		{
			roll = g_Dice % 4;
			switch (roll)
			{
			case 0:
				ss << girlName << gettext(" put so much energy into this it seems to have improved her fitness.\n");
				g_Girls.UpdateStat(girl, STAT_CONSTITUTION, g_Dice % 3);
				break;
			case 1:
				ss << girlName << gettext(" went way too far, creating a hell of a mess. Still it looks like she had fun - she hasn't stopped smiling.\n");
				g_Girls.UpdateStat(girl, STAT_HAPPINESS, g_Dice % 5);
				g_Girls.UpdateEnjoyment(girl, actiontype, +1);
				brothel->m_Filthiness += 15;
				break;
			case 2:
				ss << girlName << gettext(" over-exerted herself.");
				g_Girls.UpdateStat(girl, STAT_HEALTH, -(g_Dice % 5));
				g_Girls.UpdateStat(girl, STAT_TIREDNESS, g_Dice % 5);
				break;
			case 3:
				ss << girlName << gettext(" appreciates that you entrust her with this kind of work.");
				g_Girls.UpdateStat(girl, STAT_PCLOVE, g_Dice % 2);
				g_Girls.UpdateStat(girl, STAT_PCHATE, -(g_Dice % 2));
				break;
			default:
				ss << girlName << gettext(" did something completely unexpected. [error]");
				break;
			}
		}
		girl->m_Events.AddMessage(ss.str(), IMGTYPE_PROFILE, Day0Night1);
	}
#endif

	// Improve girl
	int xp = 15, libido = 5, skill = 1;

	if (g_Girls.HasTrait(girl, "Quick Learner"))		{ skill += 1; xp += 3; }
	else if (g_Girls.HasTrait(girl, "Slow Learner"))	{ skill -= 1; xp -= 3; }
	if (g_Girls.HasTrait(girl, "Nymphomaniac"))			{ libido += 2; }

	if (!forFree)
	{
		girl->m_Pay += 65;
		g_Gold.staff_wages(65);  // wages come from you
	}

	g_Girls.UpdateStat(girl, STAT_EXP, xp);
	g_Girls.UpdateStat(girl, STAT_MORALITY, -2);
	g_Girls.UpdateSkill(girl, SKILL_BDSM, skill);
	g_Girls.UpdateStatTemp(girl, STAT_LIBIDO, libido);

	// WD: Update flag
	g_Brothels.TortureDone(true);

	// Check for new traits
	g_Girls.PossiblyGainNewTrait(girl, "Sadistic", 30, actiontype, girl->m_Realname + gettext(" has come to enjoy her job so much that she has become rather Sadistic."), Day0Night1);
	g_Girls.PossiblyGainNewTrait(girl, "Merciless", 50, actiontype, girl->m_Realname + gettext(" extensive experience with torture has made her absolutely Merciless."), Day0Night1);

	return false;
}
예제 #2
0
// `J` Job Centre - General
bool cJobManager::WorkFeedPoor(sGirl* girl, sBrothel* brothel, bool Day0Night1, string& summary)
{
#pragma region //	Job setup				//
	int actiontype = ACTION_WORKCENTRE;
	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, ACTION_WORKCENTRE, 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 feeding the poor.";

	g_Building = BUILDING_CENTRE;
	g_Girls.UnequipCombat(girl);	// put that shit away, you'll scare off the customers!

	bool blow = false, sex = false;
	double wages = 20, tips = 0;
	int enjoy = 0, feed = 0, fame = 0;

	int imagetype = IMGTYPE_PROFILE;
	int msgtype = Day0Night1;

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

	double jobperformance = JP_FeedPoor(girl, false);


	//Adding cust here for use in scripts...
	sCustomer* Cust = new sCustomer;
	GetMiscCustomer(brothel, Cust);


	int dispo; // `J` merged slave/free messages and moved actual dispo change to after
	if (jobperformance >= 245)
	{
		ss << " She must be perfect at this.\n\n";
		dispo = 12;
		if (roll_b <= 20)
		{
			ss << "Today " << girlName << " was managing the kitchen giving orders to other cooks and checking the quality of their work.\n";
		}
		else if (roll_b <= 40)
		{
			ss << girlName << " was helping in the kitchen. Her task was to stir-fry vegetables. One word: Perfection. Food that she prepared was great!\n";
		}
		else if (roll_b <= 60)
		{
			ss << "Being done with the main dish earlier, " << girlName << " decided to bake cookies for desert!\n";
		}
		else if (roll_b <= 80)
		{
			ss << "Excellent dish! Some world class chefs should learn from " << girlName << "!\n";
		}
		else
		{
			ss << girlName << " knife skill is impressive. She's cutting precisely and really fast, almost like a machine.\n";
		}
	}
	else if (jobperformance >= 185)
	{
		ss << " She's unbelievable at this and is always getting praised by people for her work.\n\n";
		dispo = 10;
		if (roll_b <= 20)
		{
			ss << girlName << " is in charge of the cooking for several weeks now. You could swear that the population of rodents and small animals in the area went down.\n";
		}
		else if (roll_b <= 40)
		{
			ss << "While preparing for today's cooking, " << girlName << " noticed that one of the crucial ingredients is missing. She manage to change the menu and fully use available ingredients.\n";
		}
		else if (roll_b <= 60)
		{
			ss << "She speedily served all in line at the food counter. All the portions handed out were equal.\n";
		}
		else if (roll_b <= 80)
		{
			ss << "Preparing something new she mixed up the proportions from the recipe. The outcome tasted great!\n";
		}
		else
		{
			ss << girlName << " was helping in the kitchen. Her task was to prepare the souse for today's meatballs. The texture and flavor was top notch.\n";
		}
	}
	else if (jobperformance >= 145)
	{
		ss << " She's good at this job and gets praised by people often.\n\n";
		dispo = 8;
		if (roll_b <= 20)
		{
			ss << "While cooking she used everything that was in the kitchen. Nothing was wasted.\n";
		}
		else if (roll_b <= 40)
		{
			ss << "While cooking she accidentally sneezed into the pot. Luckily nobody saw that.\n";
		}
		else if (roll_b <= 60)
		{
			ss << girlName << " was helping in the kitchen. Her task was to carve the meat. Smile on her face that appear while doing this, was somehow scary and disturbing.\n";
		}
		else if (roll_b <= 80)
		{
			ss << girlName << " was doing the dishes. Most of them \"survived\" and will be used next time.\n";
		}
		else
		{
			ss << "She spent her shift at the food counter without any trouble.\n";
		}
	}
	else if (jobperformance >= 100)
	{
		ss << " She made a few mistakes but overall she is okay at this.\n\n";
		dispo = 6;
		if (roll_b <= 20)
		{
			ss << "Her cooking isn't very good. But You probably would risk serving the prepared dish to a dog.\n";
		}
		else if (roll_b <= 40)
		{
			ss << "Today she was assign as the cook. Not being able to focus on the task at hand, she overcooked the pasta.\n";
		}
		else if (roll_b <= 60)
		{
			ss << "She served all in line at the food counter. Some portions were smaller than others.\n";
		}
		else if (roll_b <= 80)
		{
			ss << girlName << " was helping in the kitchen. Her task was to make a salad. She manage to do this much.\n";
		}
		else
		{
			ss << "When walking with a pile of clean dished she slipped and fall. All the plates got broken.\n";
		}
	}
	else if (jobperformance >= 70)
	{
		ss << " She was nervous and made a few mistakes. She isn't that good at this.\n\n";
		dispo = 4;
		if (roll_b <= 20)
		{
			ss << "Today she was assign as the cook. Meatballs that she prepared could be used as lethal projectiles.\n";
		}
		else if (roll_b <= 40)
		{
			ss << girlName << " was doing the dishes. Let's say it would be a lot quicker to throw them all right away, then wait for her to brake so many during this simple chore.\n";
		}
		else if (roll_b <= 60)
		{
			ss << "While cooking she burned two, brand new pots!\n";
		}
		else if (roll_b <= 80)
		{
			ss << girlName << " was helping in the kitchen. Her task was to dice the carrots. Surely the carrots were cut, but to called them diced would be an exaggeration.\n";
		}
		else
		{
			ss << "Just wanting to serve the food fast to end her shift. She did a sloppy job at the food counter.\n";
		}
	}
	else
	{
		ss << " She was nervous and constantly making mistakes. She really isn't very good at this job.\n\n";
		dispo = 2;
		if (roll_b <= 20)
		{
			ss << "While preparing ingredients for the soup she almost cut off her hand!\n";
		}
		else if (roll_b <= 40)
		{
			ss << girlName << " was helping in the kitchen. Her task was to peel the potatoes. The peels were thick and had a lot of the vegetable left on them. What a waste!\n";
		}
		else if (roll_b <= 60)
		{
			ss << "Today she was assigned as the cook. The thing that she created hardly could be called food.\n";
		}
		else if (roll_b <= 80)
		{
			ss << "Today she was assigned to work at the food counter. While handing out food she served different portions to people in line.\n";
		}
		else
		{
			ss << "Being assigned to the food counter, she putted a sign \"self serving\" and went out.\n";
		}
	}


	//try and add randomness here
	if (g_Girls.GetStat(girl, STAT_INTELLIGENCE) < 55 && g_Dice.percent(30))//didnt put a check on this one as we could use some randomness and its an intel check... guess we can if people keep bitching
	{
		blow = true;	ss << "An elderly fellow managed to convince " << girlName << " that he was full and didn't need anymore food but that she did. He told her his c**k gave a special treat if she would suck on it long enough. Which she did man she isn't very smart.\n\n";
	}

	if (g_Girls.HasTrait(girl, "Nymphomaniac") && g_Dice.percent(30) && g_Girls.GetStat(girl, STAT_LIBIDO) > 75
		&& !g_Girls.HasTrait(girl, "Lesbian") && !g_Girls.HasTrait(girl, "Virgin")
		&& (!brothel->m_RestrictNormal || !brothel->m_RestrictAnal))
	{
		sex = true;
		ss << "Her Nymphomania got the better of her today and she decided to let them eat her pussy!  After a few minutes they started f*****g her.\n";
	}



	if (girl->m_States&(1 << STATUS_SLAVE))
	{
		ss << "\nThe fact that she is your slave makes people think its less of a good deed on your part.";
		The_Player->disposition(dispo);
		wages = 0;
	}
	else
	{
		ss << "\nThe fact that your paying this girl to do this helps people think your a better person.";
		g_Gold.staff_wages(100);  // wages come from you
		The_Player->disposition(int(dispo*1.5));
	}




#pragma endregion
#pragma region	//	Enjoyment and Tiredness		//

	//enjoyed the work or not
	if (roll_a <= 5)
	{
		ss << "\nSome of the patrons abused her during the shift."; 
		enjoy -= 1;
	}
	else if (roll_a <= 25)
	{
		ss << "\nShe had a pleasant time working."; 
		enjoy += 3;
	}
	else
	{
		ss << "\nOtherwise, the shift passed uneventfully."; 
		enjoy += 1;
	}


	if (sex)
	{
		if (!brothel->m_RestrictNormal && (roll_b <= 50 || brothel->m_RestrictAnal)) //Tweak to avoid an issue when roll > 50 && anal is restricted
		{
			girl->m_Events.AddMessage(ss.str(), IMGTYPE_SEX, Day0Night1);
			g_Girls.UpdateSkill(girl, SKILL_NORMALSEX, 2);
			if (g_Girls.CheckVirginity(girl))
			{
				g_Girls.LoseVirginity(girl);	// `J` updated for trait/status
				ss << "She is no longer a virgin.\n";
			}
			if (!girl->calc_pregnancy(Cust, false, 1.0))
			{
				g_MessageQue.AddToQue(girl->m_Realname + " has gotten pregnant", 0);
			}
		}
		else if (!brothel->m_RestrictAnal)
		{
			girl->m_Events.AddMessage(ss.str(), IMGTYPE_ANAL, Day0Night1);
			g_Girls.UpdateSkill(girl, SKILL_ANAL, 2);
		}
		brothel->m_Happiness += 100;
		g_Girls.UpdateStatTemp(girl, STAT_LIBIDO, -20);
		g_Girls.UpdateEnjoyment(girl, ACTION_SEX, +3);
		fame += 1;
		dispo += 6;
	}
	else if (blow)
	{
		brothel->m_Happiness += (g_Dice % 70) + 60;
		dispo += 4;
		g_Girls.UpdateSkill(girl, SKILL_ORALSEX, 2);
		fame += 1;
		girl->m_Events.AddMessage(ss.str(), IMGTYPE_ORAL, Day0Night1);
	}
	else
	{
		girl->m_Events.AddMessage(ss.str(), IMGTYPE_PROFILE, Day0Night1);
	}

#pragma endregion
#pragma region	//	Money					//


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

	// Money
	if (wages < 0)	wages = 0;	girl->m_Pay = (int)wages;
	if (tips < 0)	tips = 0;	girl->m_Tips = (int)tips;

	feed += (int)(jobperformance / 10);		//  1 feed per 10 point of performance

	int cost = 0;
	for (int i = 0; i < feed; i++)
	{
		cost += g_Dice % 3 + 2; // 2-5 gold per customer
	}
	brothel->m_Finance.centre_costs(cost);
	ss.str("");
	ss << girlName << " feed " << feed << " costing you " << cost << " gold.";
	girl->m_Events.AddMessage(ss.str(), imagetype, msgtype);


	// Improve stats
	int xp = 10, libido = 1, skill = 3;

	if (g_Girls.HasTrait(girl, "Quick Learner"))		{ skill += 1; xp += 3; }
	else if (g_Girls.HasTrait(girl, "Slow Learner"))	{ skill -= 1; xp -= 3; }
	if (g_Girls.HasTrait(girl, "Nymphomaniac"))			{ libido += 2; }
	if (girl->fame() < 10 && jobperformance >= 70)		{ fame += 1; }
	if (girl->fame() < 20 && jobperformance >= 100)		{ fame += 1; }
	if (girl->fame() < 40 && jobperformance >= 145)		{ fame += 1; }
	if (girl->fame() < 50 && jobperformance >= 185)		{ fame += 1; }


	g_Girls.UpdateStat(girl, STAT_FAME, fame);
	g_Girls.UpdateStat(girl, STAT_EXP, xp);
	if (g_Dice % 2)
		g_Girls.UpdateStat(girl, STAT_INTELLIGENCE, 1);
	g_Girls.UpdateSkill(girl, SKILL_SERVICE, skill);
	g_Girls.UpdateStatTemp(girl, STAT_LIBIDO, libido);

	g_Girls.UpdateEnjoyment(girl, actiontype, enjoy);


	delete Cust;

#pragma endregion
	return false;
}