bool LoadInventoryXML(TiXmlHandle hInventory, sInventoryItem* items[], int& numItems, unsigned char isEquipped[], int quantities[]) { numItems = 0; TiXmlElement* pInventory = hInventory.ToElement(); if (pInventory == 0) return false; TiXmlElement* pItems = pInventory->FirstChildElement("Items"); if (pItems) { for (TiXmlElement* pItem = pItems->FirstChildElement("Item"); pItem != 0; pItem = pItem->NextSiblingElement("Item")) { if (pItem->Attribute("Name")) { sInventoryItem* tempItem = g_InvManager.GetItem(pItem->Attribute("Name")); if (tempItem) { items[numItems] = tempItem; if (isEquipped) { int tempInt = 0; if (pItem->Attribute("isEquipped")) pItem->QueryIntAttribute("isEquipped", &tempInt); isEquipped[numItems] = tempInt; } if (quantities) { int tempInt = 1; if (pItem->Attribute("quantity")) pItem->QueryIntAttribute("quantity", &tempInt); quantities[numItems] = tempInt; } ++numItems; } } } } return true; }
// `J` Job Farm - Laborers bool cJobManager::WorkGardener(sGirl* girl, sBrothel* brothel, bool Day0Night1, string& summary) { #pragma region // Job setup // int actiontype = ACTION_WORKFARM; 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 gardener on the farm.\n\n"; g_Girls.UnequipCombat(girl); // put that shit away, you'll scare off the customers! double wages = 20, tips = 0; int enjoy = 0; int imagetype = IMGTYPE_FARM; int msgtype = Day0Night1; #pragma endregion #pragma region // Job Performance // double jobperformance = JP_Gardener(girl, false); if (jobperformance >= 245) { ss << " She must be the perfect at this."; wages += 155; } else if (jobperformance >= 185) { ss << " She's unbelievable at this."; wages += 95; } else if (jobperformance >= 145) { ss << " She's good at this job."; wages += 55; } else if (jobperformance >= 100) { ss << " She made a few mistakes but overall she is okay at this."; wages += 15; } else if (jobperformance >= 70) { ss << " She was nervous and made a few mistakes. She isn't that good at this."; wages -= 5; } else { ss << " She was nervous and constantly making mistakes. She really isn't very good at this job."; wages -= 15; } ss << "\n\n"; #pragma endregion #pragma region // Enjoyment and Tiredness // int roll = g_Dice.d100(); //enjoyed the work or not if (roll <= 5) { ss << "Some of the patrons abused her during the shift."; enjoy -= 1; } else if (roll <= 25) { ss << "She had a pleasant time working."; enjoy += 3; } else { ss << "Otherwise, the shift passed uneventfully."; enjoy += 1; } #pragma endregion #pragma region // Create Items // // `J` Farm Bookmark - adding in items that can be gathered in the farm int flowerpower = g_Dice % 3; /* */if (jobperformance < 70) flowerpower -= 1; else if (jobperformance < 100) flowerpower += 0; else if (jobperformance < 145) flowerpower += 1; else if (jobperformance < 185) flowerpower += 2; else if (jobperformance < 245) flowerpower += 3; else /* */ flowerpower += 4; string additems[8] = { "", "", "", "", "", "", "", "" }; int additemnum = 0; while (flowerpower > 0 && additemnum < 8) { string additem = ""; switch (g_Dice % 14) { case 0: if (flowerpower >= 5) { flowerpower -= 5; additem = "Bouquet of Enchanted Roses"; } break; case 1: if (flowerpower >= 5) { flowerpower -= 5; additem = "Chatty Flowers"; } break; case 2: if (flowerpower >= 4) { flowerpower -= 4; additem = "Watermelon of Knowledge"; } break; case 3: if (flowerpower >= 3) { flowerpower -= 3; additem = "Mango of Knowledge"; } break; case 4: if (flowerpower >= 3) { flowerpower -= 3; additem = "Red Rose Extravaganza"; } break; case 5: if (flowerpower >= 3) { flowerpower -= 3; additem = "Vira Blood"; } break; case 6: if (flowerpower >= 3) { flowerpower -= 3; additem = "Whitewillow Sap"; } break; case 7: if (flowerpower >= 2) { flowerpower -= 2; additem = "Rose of Enchantment"; } break; case 8: if (flowerpower >= 2) { flowerpower -= 2; additem = "Sinspice"; } break; case 9: if (flowerpower >= 2) { flowerpower -= 2; additem = "Nut of Knowledge"; } break; case 10: if (flowerpower >= 2) { flowerpower -= 2; additem = "Willbreaker Spice"; } break; case 11: if (flowerpower >= 1) { flowerpower -= 1; additem = "Shroud Mushroom"; } break; case 12: if (flowerpower >= 1) { flowerpower -= 1; additem = "Wild Flowers"; } break; default: flowerpower -= 1; break; } if (additem != "") { additems[additemnum] = additem; additemnum++; } } if (additemnum > 0) { msgtype = EVENT_GOODNEWS; ss << "\n\n" << girlName << " was able to harvest "; if (additemnum == 1) { ss << "one " << additems[0] << "."; } else { ss << additemnum << " items: "; for (int i = 0; i < additemnum; i++) { ss << additems[i]; if (i == additemnum - 1) ss << "."; else ss << ", "; } } for (int i = 0; i < additemnum; i++) { sInventoryItem* item = g_InvManager.GetItem(additems[i]); if (item) g_Brothels.AddItemToInventory(item); } } #pragma endregion #pragma region // Money // if (girl->is_slave() && !cfg.initial.slave_pay_outofpocket()) wages = 0; // You own her so you don't have to pay her. else { int roll_max = (g_Girls.GetStat(girl, STAT_INTELLIGENCE) + g_Girls.GetStat(girl, SKILL_HERBALISM) + g_Girls.GetSkill(girl, SKILL_FARMING)); roll_max /= 6; wages += 10 + g_Dice%roll_max; } #pragma endregion #pragma region // Finish the shift // g_Girls.UpdateEnjoyment(girl, actiontype, enjoy); girl->m_Events.AddMessage(ss.str(), IMGTYPE_PROFILE, msgtype); // Money if (wages < 0) wages = 0; girl->m_Pay = (int)wages; if (tips < 0) tips = 0; girl->m_Tips = (int)tips; // Improve stats int xp = 5, 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; } g_Girls.UpdateStat(girl, STAT_EXP, (g_Dice % xp) + 1); g_Girls.UpdateStatTemp(girl, STAT_LIBIDO, libido); // primary (+2 for single or +1 for multiple) g_Girls.UpdateSkill(girl, SKILL_HERBALISM, (g_Dice%skill) + 2); // secondary (-1 for one then -2 for others) g_Girls.UpdateSkill(girl, SKILL_FARMING, max(0, (g_Dice % skill) - 1)); g_Girls.UpdateStat(girl, STAT_INTELLIGENCE, max(0, (g_Dice % skill) - 2)); g_Girls.UpdateStat(girl, STAT_CONSTITUTION, max(0, (g_Dice % skill) - 2)); #pragma endregion return false; }
// `J` Job Farm - Laborers bool cJobManager::WorkMilker(sGirl* girl, sBrothel* brothel, bool Day0Night1, string& summary) { #pragma region // Job setup // int actiontype = ACTION_WORKFARM; 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 milker on the farm.\n\n"; g_Girls.UnequipCombat(girl); // put that shit away, you'll scare off the customers! double wages = 20, tips = 0; int enjoy = 0; int imagetype = IMGTYPE_FARM; int msgtype = Day0Night1; #pragma endregion #pragma region // Job Performance // double jobperformance = JP_Milker(girl, false); double drinks = jobperformance / 2; if (jobperformance >= 245) { ss << "Her milk bucket practically fills itself as she walks down the rows of cows."; drinks *= 5; roll_a += 10; roll_b += 25; } else if (jobperformance >= 185) { ss << "Her hands moved like lightning as she gracefully milks the cows teats."; drinks *= 4; roll_a += 5; roll_b += 18; } else if (jobperformance >= 145) { ss << "She knows exactly when the cows are ready to be milked and how to best milk them."; drinks *= 3; roll_a += 2; roll_b += 10; } else if (jobperformance >= 100) { ss << "She can milk the cows without spilling much."; drinks *= 2; } else if (jobperformance >= 70) { ss << "She isn't very good at aiming the teats into the bucket."; roll_a -= 2; roll_b -= 5; } else { ss << "She can't seem to get the hang of this."; wages -= 10; drinks *= 0.8; roll_a -= 5; roll_b -= 10; } ss << "\n\n"; #pragma endregion #pragma region // Enjoyment and Tiredness // // Complications if (roll_a <= 10) { enjoy -= g_Dice % 3 + 1; ss << "The animals were uncooperative and some didn't even let her get near them.\n"; drinks *= 0.8; if (g_Dice.percent(20)) { enjoy--; ss << "Several animals kicked over the milking buckets and soaked " << girlName << ".\n"; girl->happiness(-(1 + g_Dice % 5)); drinks -= (5 + g_Dice % 6); } if (g_Dice.percent(20)) { enjoy--; ss << "One of the animals urinated on " << girlName << " and contaminated the milk she had collected.\n"; girl->happiness(-(1 + g_Dice % 3)); drinks -= (5 + g_Dice % 6); } if (g_Dice.percent(20)) { enjoy--; int healthmod = g_Dice % 10 + 1; girl->health(-healthmod); girl->happiness(-(healthmod + g_Dice % healthmod)); ss << "One of the animals kicked " << girlName << " and "; if (girl->health() < 1) { ss << "killed her.\n"; g_MessageQue.AddToQue(girlName + " was killed when an animal she was milking kicked her in the head.", COLOR_RED); return false; // not refusing, she is dead } else ss << (healthmod > 5 ? "" : "nearly ") << "broke her arm.\n"; drinks -= (5 + g_Dice % 6); } } else if (roll_a >= 90) { enjoy += g_Dice % 3 + 1; ss << "The animals were pleasant and cooperative today.\n"; drinks *= 1.2; } else { enjoy += g_Dice % 2; ss << "She had an uneventful day milking.\n"; } #pragma endregion #pragma region // Money // // 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())) { drinks *= 0.9; wages = 0; } else { wages += drinks / 100; // `J` Pay her based on how much she brought in } #pragma endregion #pragma region // Create Items // int milk = int(drinks / 10); // plain milk is made here, breast milk from girls is made in WorkMilk if (milk > 0) { int milkmade[5] = { 0, 0, 0, 0, 0 }; // (total,gallon,quart,pint,shots} // check if the milk items exist and only do the checks if at least one of them does sInventoryItem* milkitems[4] = { g_InvManager.GetItem("Milk"), g_InvManager.GetItem("Milk (pt)"), g_InvManager.GetItem("Milk (qt)"), g_InvManager.GetItem("Milk (g)") }; if (milkitems[0] != 0 || milkitems[1] != 0 || milkitems[2] != 0 || milkitems[3] != 0) { while (milk > 0) // add milk { sInventoryItem* item = NULL; string itemname = ""; /* */if (milkitems[3] && milk > 3 && g_Dice.percent(30)) { milk -= 4; milkmade[0]++; milkmade[4]++; g_Brothels.AddItemToInventory(milkitems[3]); } else if (milkitems[2] && milk > 2 && g_Dice.percent(50)) { milk -= 3; milkmade[0]++; milkmade[3]++; g_Brothels.AddItemToInventory(milkitems[2]); } else if (milkitems[1] && milk > 1 && g_Dice.percent(70)) { milk -= 2; milkmade[0]++; milkmade[2]++; g_Brothels.AddItemToInventory(milkitems[1]); } else if (milkitems[0]) { milk -= 1; milkmade[0]++; milkmade[1]++; g_Brothels.AddItemToInventory(milkitems[0]); } else milk--; // add a reducer just in case. } } if (milkmade[0] > 0) { ss << girlName << " produced " << milkmade[0] << " bottles of milk for you, \n"; if (milkmade[4] > 0) ss << milkmade[4] << " gallons\n"; if (milkmade[3] > 0) ss << milkmade[3] << " quarts\n"; if (milkmade[2] > 0) ss << milkmade[2] << " pints\n"; if (milkmade[1] > 0) ss << milkmade[1] << " shots\n"; } } // `J` zzzzzz - need to add the girl milking herself - can be done easier after WorkMilk is done #pragma endregion #pragma region // Finish the shift // ss << "\n" << girlName; if ((int)drinks > 0) { g_Brothels.add_to_drinks((int)drinks); ss << " brought in " << (int)drinks << " units of milk."; } else { ss << " was unable to collect any milk."; } girl->m_Events.AddMessage(ss.str(), imagetype, msgtype); // Money if (wages < 0) wages = 0; girl->m_Pay = (int)wages; if (tips < 0) tips = 0; girl->m_Tips = (int)tips; // Improve stats int xp = 5, 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; } g_Girls.UpdateStat(girl, STAT_EXP, (g_Dice % xp) + 1); g_Girls.UpdateStatTemp(girl, STAT_LIBIDO, libido); // primary (+2 for single or +1 for multiple) g_Girls.UpdateSkill(girl, SKILL_ANIMALHANDLING, (g_Dice % skill) + 2); // secondary (-1 for one then -2 for others) g_Girls.UpdateSkill(girl, SKILL_HANDJOB, max(0, (g_Dice % skill) - 1)); g_Girls.UpdateSkill(girl, SKILL_FARMING, max(0, (g_Dice % skill) - 2)); g_Girls.UpdateStat(girl, STAT_INTELLIGENCE, max(0, (g_Dice % skill) - 2)); g_Girls.UpdateEnjoyment(girl, actiontype, enjoy); #pragma endregion return false; }
// `J` Job Farm - Laborers bool cJobManager::WorkFarmer(sGirl* girl, sBrothel* brothel, bool Day0Night1, string& summary) { #pragma region // Job setup // int actiontype = ACTION_WORKFARM; 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 tending crops on the farm.\n\n"; g_Girls.UnequipCombat(girl); // put that shit away, you'll scare off the customers! double wages = 20, tips = 0; int enjoy = 0; int imagetype = IMGTYPE_FARM; int msgtype = Day0Night1; #pragma endregion #pragma region // Job Performance // double jobperformance = (int)JP_Farmer(girl, false); double foodproduced = jobperformance; int alchemyproduced = 0; int goodsproduced = 0; if (jobperformance >= 245) { ss << "Her basket practically fills itself as she walks down the rows of crops."; foodproduced *= 5; roll_a += 10; roll_b += 25; } else if (jobperformance >= 185) { ss << "Her hands moved like lightning as she picked only the best crops."; foodproduced *= 4; roll_a += 5; roll_b += 18; } else if (jobperformance >= 145) { ss << "She knows exactly when the crops are ready to be picked and how to best collect them."; foodproduced *= 3; roll_a += 2; roll_b += 10; } else if (jobperformance >= 100) { ss << "She can pick the crops fairly well without too many culls."; foodproduced *= 2; } else if (jobperformance >= 70) { ss << "She isn't very good at knowing which plants are ripe and which should have been left a little longer."; roll_a -= 2; roll_b -= 5; } else { ss << "She seems to take more of the unuseable parts of the plants than she takes the edible parts."; wages -= 10; foodproduced *= 0.8; roll_a -= 5; roll_b -= 10; } ss << "\n\n"; #pragma endregion #pragma region // Enjoyment and Tiredness // int tired = (300 - (int)jobperformance); // this gets divided in roll_a by (8, 10 or 12) so it will end up around 0-40 tired if (roll_a <= 10) { tired /= 8; enjoy -= g_Dice % 3; if (roll_b < 20) // injury { girl->health(-(1 + g_Dice % 5)); foodproduced *= 0.8; if (g_Dice.percent(girl->magic() / 2)) { girl->mana(-10 - (g_Dice % 10)); ss << "While trying to use magic to do her work for her, the magic rebounded on her"; } else ss << "She cut herself while working"; if (girl->health() <= 0) { ss << " killing her."; g_MessageQue.AddToQue(girlName + " was killed in an accident at the Farm.", COLOR_RED); return false; // not refusing, she is dead } else ss << "."; } else // unhappy { foodproduced *= 0.9; ss << "She did not like working in the fields today."; girl->happiness(-(g_Dice % 11)); } } else if (roll_a >= 90) { tired /= 12; foodproduced *= 1.1; enjoy += g_Dice % 3; /* */if (roll_b < 50) ss << "She kept a steady pace by humming a pleasant tune."; else /* */ ss << "She had a great time working today."; } else { tired /= 10; enjoy += g_Dice % 2; ss << "The shift passed uneventfully."; } ss << "\n\n"; #pragma endregion #pragma region // Create Items // if (g_Dice.percent((girl->farming() + girl->magic()) / 10) && g_Dice.percent(jobperformance / 10)) { string itemname = ""; int itemnumber = 1; /* */if (roll_c > 30) { itemname = "Nut of Knowledge"; itemnumber = (roll_c > 90 ? g_Dice % 3 + 2 : 1); } else if (roll_c > 10) { itemname = "Mango of Knowledge"; itemnumber = (roll_c > 28 ? 2 : 1); } else/* */ { itemname = "Watermelon of Knowledge"; itemnumber = (roll_c == 9 ? 2 : 1); } sInventoryItem* item = g_InvManager.GetItem(itemname); if (item) { for (int i = 0; i < itemnumber; i++) g_Brothels.AddItemToInventory(item); ss << "While picking crops, " << girlName << " sensed a magical aura and found "; if (itemnumber == 1) ss << "a"; else ss << itemnumber; ss << " " << itemname << ".\n"; foodproduced -= itemnumber; } } if (g_Dice.percent(girl->herbalism() / 2) && g_Dice.percent(jobperformance / 10)) { alchemyproduced = 1 + g_Dice % (girl->herbalism() / 10); ss << "While sorting the day's haul, " << girlName << " came across "; if (alchemyproduced == 1) ss << "a specimen"; else ss << alchemyproduced << " specimens"; ss << " that would work well in potions.\n"; foodproduced -= alchemyproduced; } if (g_Dice.percent(girl->crafting() / 2) && g_Dice.percent(jobperformance / 10)) { goodsproduced = 1 + g_Dice % (girl->crafting() / 10); ss << girlName << " created "; if (goodsproduced == 1) ss << "a little toy"; else ss << goodsproduced << " little toys"; ss << " from the unuseable parts of her crops.\n"; } if (foodproduced <= 0) foodproduced = 0; #pragma endregion #pragma region // Money // // 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())) { foodproduced *= 0.9; wages = 0; } else { wages += foodproduced / 100; // `J` Pay her based on how much she brought in } #pragma endregion #pragma region // Finish the shift // if (foodproduced > 0) { g_Brothels.add_to_food((int)foodproduced); ss << "\n" << girlName << " brought in " << (int)foodproduced << " units of food."; } if (alchemyproduced > 0) g_Brothels.add_to_alchemy((int)alchemyproduced); if (goodsproduced > 0) g_Brothels.add_to_goods((int)goodsproduced); // Money if (wages < 0) wages = 0; girl->m_Pay = (int)wages; if (tips < 0) tips = 0; girl->m_Tips = (int)tips; // Base Improvement and trait modifiers int xp = 5, libido = 1, skill = 3; /* */if (girl->has_trait("Quick Learner")) { skill += 1; xp += 3; } else if (girl->has_trait("Slow Learner")) { skill -= 1; xp -= 3; } /* */if (girl->has_trait("Nymphomaniac")) { libido += 2; } // EXP and Libido int I_xp = (g_Dice % xp) + 1; g_Girls.UpdateStat(girl, STAT_EXP, I_xp); int I_libido = (g_Dice % libido) + 1; g_Girls.UpdateStatTemp(girl, STAT_LIBIDO, I_libido); if (tired > 0) girl->tiredness(tired); // primary improvement (+2 for single or +1 for multiple) int I_farming = (g_Dice % skill) + 2; g_Girls.UpdateSkill(girl, SKILL_FARMING, I_farming); // secondary improvement (-1 for one then -2 for others) int I_strength = max(0, (g_Dice % skill) - 1); g_Girls.UpdateStat(girl, STAT_STRENGTH, I_strength); int I_constitution = max(0, (g_Dice % skill) - 2); g_Girls.UpdateStat(girl, STAT_CONSTITUTION, I_constitution); int I_intelligence = max(0, (g_Dice % skill) - 2); g_Girls.UpdateStat(girl, STAT_INTELLIGENCE, I_intelligence); // Update Enjoyment if (jobperformance < 50) enjoy -= 1; if (jobperformance < 0) enjoy -= 1; // if she doesn't do well at the job, she enjoys it less if (jobperformance > 200) enjoy *= 2; // if she is really good at the job, her enjoyment (positive or negative) is doubled g_Girls.UpdateEnjoyment(girl, actiontype, enjoy); // Gain Traits g_Girls.PossiblyGainNewTrait(girl, "Tough", 50, actiontype, "Working in the heat of the sun has made " + girlName + " rather Tough.", Day0Night1); if (cfg.debug.log_show_numbers()) { ss << "\n\nNumbers:" << "\n Job Performance = " << (int)jobperformance << "\n Wages = " << (int)wages << "\n Tips = " << (int)tips << "\n Xp = " << I_xp << "\n Libido = " << I_libido << "\n Farming = " << I_farming << "\n Strength = " << I_strength << "\n Constitution = " << I_constitution << "\n Intelligence = " << I_intelligence << "\n Tiredness = " << tired << "\n Enjoy " << girl->enjoy_jobs[actiontype] << " = " << enjoy ; } // Push out the turn report girl->m_Events.AddMessage(ss.str(), imagetype, msgtype); #pragma endregion return false; }
// `J` Job Farm - Staff - Learning_Job bool cJobManager::WorkFarmResearch(sGirl* girl, sBrothel* brothel, bool Day0Night1, string& summary) { #pragma region // Job setup // int actiontype = ACTION_WORKTRAINING; 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 reseacher on the farm."; g_Girls.UnequipCombat(girl); // put that shit away double wages = 20, tips = 0; int enjoy = 0; int imagetype = IMGTYPE_PROFILE; int msgtype = Day0Night1; #pragma endregion #pragma region // Job Performance // int train = 0; // main skill trained int tanm = girl->m_Skills[SKILL_ANIMALHANDLING]; // Starting level - train = 1 int tfar = girl->m_Skills[SKILL_FARMING]; // Starting level - train = 2 int tmag = girl->m_Skills[SKILL_MAGIC]; // Starting level - train = 3 int ther = girl->m_Skills[SKILL_HERBALISM]; // Starting level - train = 4 int tint = girl->m_Stats[STAT_INTELLIGENCE]; // Starting level - train = 5 bool gaintrait = false; // posibility of gaining a trait int skill = 0; // gian for main skill trained int dirtyloss = brothel->m_Filthiness / 100; // training time wasted with bad equipment int sgAnm = 0, sgFar = 0, sgMag = 0, sgHer = 0, sgInt = 0; // gains per skill /* */if (roll_a <= 5) skill = 7; else if (roll_a <= 15) skill = 6; else if (roll_a <= 30) skill = 5; else if (roll_a <= 60) skill = 4; else /* */ skill = 3; /* */if (g_Girls.HasTrait(girl, "Quick Learner")) { skill += 1; } else if (g_Girls.HasTrait(girl, "Slow Learner")) { skill -= 1; } skill -= dirtyloss; ss << "The Farm Lab is "; if (dirtyloss <= 0) ss << "clean and tidy"; if (dirtyloss == 1) ss << "dirty and the equipment has not been put back in its place"; if (dirtyloss == 2) ss << "messy. The equipment is damaged and strewn about the building"; if (dirtyloss == 3) ss << "filthy and some of the equipment is broken"; if (dirtyloss >= 4) ss << "in complete disarray and the equipment barely usable"; ss << ".\n\n"; if (skill < 1) skill = 1; // always at least 1 do{ // `J` New method of selecting what job to do /* */if (roll_b < 20 && tanm < 100) train = 1; // animalhandling else if (roll_b < 40 && tfar < 100) train = 2; // farming else if (roll_b < 60 && tmag < 100) train = 3; // magic else if (roll_b < 80 && ther < 100) train = 4; // herbalism else if (roll_b < 100 && tint < 100) train = 5; // intelligence roll_b -= 10; } while (train == 0 && roll_b > 0); if (train == 0 || g_Dice.percent(5)) gaintrait = true; if (train == 1) { sgAnm = skill; ss << "She researches animals.\n"; } else sgAnm = g_Dice % 2; if (train == 2) { sgFar = skill; ss << "She researches farming techniques.\n"; } else sgFar = g_Dice % 2; if (train == 3) { sgMag = skill; ss << "She researches magical techniques.\n"; } else sgMag = g_Dice % 2; if (train == 4) { sgHer = skill; ss << "She researches plants and their uses.\n"; } else sgHer = g_Dice % 2; if (train == 5) { sgInt = skill; ss << "She researches general topics.\n"; } else sgInt = g_Dice % 2; if (sgAnm + sgFar + sgMag + sgHer + sgInt > 0) { ss << "She managed to gain:\n"; if (sgAnm > 0) { ss << sgAnm << " Animal Handling\n"; g_Girls.UpdateSkill(girl, SKILL_ANIMALHANDLING, sgAnm); } if (sgFar > 0) { ss << sgFar << " Farming\n"; g_Girls.UpdateSkill(girl, SKILL_FARMING, sgFar); } if (sgMag > 0) { ss << sgMag << " Magic\n"; g_Girls.UpdateSkill(girl, SKILL_MAGIC, sgMag); } if (sgHer > 0) { ss << sgHer << " Herbalism\n"; g_Girls.UpdateSkill(girl, SKILL_HERBALISM, sgHer); } if (sgInt > 0) { ss << sgInt << " Intelligence\n"; g_Girls.UpdateStat(girl, STAT_INTELLIGENCE, sgInt); } } int trycount = skill; while (gaintrait && trycount > 0) // `J` Try to add a trait { trycount--; switch (g_Dice % 10) { case 0: break; case 1: break; case 2: if (g_Girls.HasTrait(girl, "Dependant")) { g_Girls.RemoveTrait(girl, "Dependant"); ss << "She seems to be getting over her Dependancy with her training."; gaintrait = false; } break; case 3: break; case 4: break; case 5: break; case 6: break; default: break; // no trait gained } } ss << "\n\n"; #pragma endregion #pragma region // Enjoyment and Tiredness // //enjoyed the work or not /* */if (roll_c <= 10) { enjoy -= g_Dice % 3 + 1; ss << "She did not enjoy her time training."; } else if (roll_c >= 90) { enjoy += g_Dice % 3 + 1; ss << "She had a pleasant time training."; } else /* */ { enjoy += g_Dice % 2; ss << "Otherwise, the shift passed uneventfully."; } ss << "\n\n"; #pragma endregion #pragma region // Create Items // // `J` Farm Bookmark - adding in items that can be created in the farm if (girl->intelligence() + girl->crafting() > 100 && g_Dice.percent(girl->intelligence() + girl->crafting() / 10)) // 10-20% { sInventoryItem* item = NULL; string itemname = ""; int tries = skill; while (itemname == "" && tries > 0) { switch (g_Dice % 20) { /* For each item available, the girl making it must have: Skills: * If an item gives less than 40 skill points, the girl must have 40 more than the amount given in that skill * If it gives more than 40 points, there will need to be some magic included. * If there are multiple skills, add 40 to each bonus and if skills (a+b+c) > bonus total Stats: * Stats will need more variation in how high they are needed because it is less knowledge than conditioning Traits: * Most traits will require some magic Randomness: * There also should be a g_Dice.percent() with the main Skills averaged and divided by 10 * If there are 3 skills, then g_Dice.percent((a+b+c)/30) */ case 0: if (girl->farming() > 50 && girl->animalhandling() > 50 && g_Dice.percent(girl->farming() + girl->animalhandling() / 20)) itemname = "Farmer's Guide"; // +10 Farming, +10 AnimalHandling break; case 1: if (girl->constitution() > 60 && g_Dice.percent(girl->constitution() / 10)) itemname = "Manual of Health"; // (+15 Beast/Group, +10 Cons/Str, +5 BDSM/Comb) break; case 2: if (girl->magic() > 60 && g_Dice.percent(girl->magic() / 10)) itemname = "Manual of Magic"; // +20 magic break; case 3: if (girl->magic() > 80 && g_Dice.percent(girl->magic() / 10)) itemname = "Codex of the Arcane"; // +40 magic break; case 4: if (girl->lesbian() > 40 && g_Dice.percent(girl->lesbian() / 10)) itemname = "Manual of Two Roses"; // +20 Lesbian break; case 5: { if (girl->lesbian() > 80 && g_Dice.percent(girl->lesbian() / 10)) itemname = "Codex of Sappho"; // +40 Lesbian }break; case 6: if (girl->bdsm() > 60 && g_Dice.percent(girl->bdsm() / 10)) itemname = "Manual of Bondage"; // (+20 BDSM, +5 Cons) break; case 7: if (girl->combat() > 60 && g_Dice.percent(girl->combat() / 10)) itemname = "Manual of Arms"; // (+20 Com) break; case 8: if (girl->performance() + girl->strip() > 100 && g_Dice.percent((girl->performance() + girl->strip()) / 20)) itemname = "Manual of the Dancer"; // (+15 Serv/Strip/Perf, +5 Norm/Agi) break; case 9: if (girl->normalsex() + girl->oralsex() + girl->anal() > 150 && g_Dice.percent((girl->normalsex() + girl->oralsex() + girl->anal()) / 30)) itemname = "Manual of Sex"; // (+15 Norm, +10 Oral, +5 Anal) break; case 10: { if (girl->magic() < 80 && girl->mana() < 20) break; int manacost = 60; /* */if (girl->has_trait("Sterile")) manacost = 80; else if (girl->has_trait("Fertile")) manacost = 40; else if (girl->has_trait("Broodmother")) manacost = 20; if (girl->mana() >= manacost && g_Dice.percent(girl->magic() - manacost)) { girl->mana(-manacost); itemname = "Fertility Tome"; // (-Sterile, +Fertile, +50 Normal Sex, +100 Libido) } }break; case 11: { // Noble, Princess and Queen needs 40, everyone else needs 60 to make this if (girl->has_trait("Noble") || girl->has_trait("Princess") || girl->has_trait("Queen")) if (girl->refinement() < 40 || girl->service() < 40 || girl->intelligence() < 40) break; else if (girl->refinement() < 60 && girl->service() < 60 && girl->intelligence() < 60) break; // she can make it, now does she? if (g_Dice.percent((girl->refinement() + girl->service() + girl->intelligence()) / 30)) itemname = "Codex of the Courtesan"; // (+20 Serv/Strip/Refin, +10 Mor/Dig/Cha/Int/Lib/Conf/Oral) }break; case 12: { int manacost = 70; // Dominatrix, M*******t and Sadistic needs 50, everyone else needs 70 to make this if (girl->has_trait("Dominatrix") || girl->has_trait("M*******t") || girl->has_trait("Sadistic")) { if (girl->bdsm() < 50 || girl->magic() < 50 || girl->mana() < 50) break; manacost = 50; } else if (girl->bdsm() < 70 && girl->magic() < 70 && girl->mana() < 70) break; // she can make it, now does she? if (g_Dice.percent((girl->bdsm() + girl->magic()) / 20)) { girl->mana(-manacost); itemname = "Codex of Submission"; // (+30 Obed, -30 Spi/Dig, +20 BDSM, +10 Anal/Group/Oral/Hand/Foot) } }break; case 13: { if (girl->combat() > 80 && g_Dice.percent(girl->combat() / 10)) itemname = "Codex of Mars"; // (+40 Com, Adds Brawler) }break; case 14: { if (girl->normalsex() + girl->oralsex() + girl->anal() > 170 && g_Dice.percent((girl->normalsex() + girl->oralsex() + girl->anal()) / 30)) itemname = "Codex of Eros"; // (+30 Norm, +10 Anal/Oral) }break; case 15: { if (girl->medicine() + girl->intelligence() > 110 && g_Dice.percent((girl->medicine() + girl->intelligence()) / 20)) itemname = "Codex of Asclepius"; // (+20 Med, +10 Int) }break; case 16: { /* */ }break; case 17: { /* */ }break; case 18: { /* */ }break; default: break; } } item = g_InvManager.GetItem(itemname); if (item) { g_Brothels.AddItemToInventory(item); ss << girlName << " managed to create a " << itemname << " by compiling her notes together.\n"; } } #pragma endregion #pragma region // Money // if ((girl->is_slave() && !cfg.initial.slave_pay_outofpocket())) { wages = 0; } else { wages = 25 + (skill * 5); } // `J` Pay her more if she learns more #pragma endregion #pragma region // Finish the shift // g_Girls.UpdateEnjoyment(girl, actiontype, enjoy); girl->m_Events.AddMessage(ss.str(), IMGTYPE_PROFILE, Day0Night1); // Money if (wages < 0) wages = 0; girl->m_Pay = (int)wages; if (tips < 0) tips = 0; girl->m_Tips = (int)tips; // Improve stats int xp = 5 + skill, libido = int(1 + skill / 2); if (g_Girls.HasTrait(girl, "Quick Learner")) { xp += 2; } else if (g_Girls.HasTrait(girl, "Slow Learner")) { xp -= 2; } if (g_Girls.HasTrait(girl, "Nymphomaniac")) { libido += 2; } g_Girls.UpdateStat(girl, STAT_EXP, (g_Dice % xp) + 1); g_Girls.UpdateStatTemp(girl, STAT_LIBIDO, libido); #pragma endregion return false; }
// `J` Job Farm - Producers bool cJobManager::WorkBrewer(sGirl* girl, sBrothel* brothel, bool Day0Night1, string& summary) { #pragma region // Job setup // int actiontype = ACTION_WORKCOOKING; 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 brewer on the farm.\n\n"; g_Girls.UnequipCombat(girl); // put that shit away, you'll scare off the customers! double wages = 20, tips = 0; int enjoy = 0; int imagetype = IMGTYPE_COOK; int msgtype = Day0Night1; #pragma endregion #pragma region // Job Performance // double jobperformance = JP_Brewer(girl, false); double drinksproduced = jobperformance; if (jobperformance >= 245) { ss << " She must be the perfect at this."; wages += 155; } else if (jobperformance >= 185) { ss << " She's unbelievable at this."; wages += 95; } else if (jobperformance >= 145) { ss << " She's good at this job."; wages += 55; } else if (jobperformance >= 100) { ss << " She made a few mistakes but overall she is okay at this."; wages += 15; } else if (jobperformance >= 70) { ss << " She was nervous and made a few mistakes. She isn't that good at this."; wages -= 5; } else { ss << " She was nervous and constantly making mistakes. She really isn't very good at this job."; wages -= 15; } ss << "\n\n"; #pragma endregion #pragma region // Enjoyment and Tiredness // if (wages < 0) wages = 0; #if 1 //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; } #else if (roll_a <= 10) { enjoyC -= g_Dice % 3; enjoyF -= g_Dice % 3; CleanAmt = int(CleanAmt * 0.8); /* */if (roll_b < 30) ss << "She spilled a bucket of something unpleasant all over herself."; else if (roll_b < 60) ss << "She stepped in something unpleasant."; else /* */ ss << "She did not like working on the farm today."; } else if (roll_a >= 90) { enjoyC += g_Dice % 3; enjoyF += g_Dice % 3; CleanAmt = int(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 { enjoyC += g_Dice % 2; enjoyF += g_Dice % 2; ss << "The shift passed uneventfully."; } ss << "\n\n"; #endif #pragma endregion #pragma region // Create Items // // `J` Farm Bookmark - adding in items that can be created in the farm string itemmade = ""; string itemtext = ""; int numbermade = 0; sInventoryItem* item = NULL; if (g_Dice.percent(min(90.0, jobperformance / 2))) { int chooseitem = g_Dice % (girl->magic() < 80 ? 80 : 100); // limit some of the more magical items /* */if (chooseitem < 25) { itemmade = "Alcohol"; numbermade = (g_Dice % 5) + 2; itemtext = " bottles of Alcohol "; } else if (chooseitem < 50) { itemmade = "Alcohol "; numbermade = (g_Dice % 5) + 2; itemtext = " bottles of Alcohol "; } else if (chooseitem < 55) { itemmade = "RigJuice"; numbermade = (g_Dice % 5) + 2; itemtext = " bottles of RigJuice "; } else if (chooseitem < 60) { itemmade = "Radicola"; numbermade = (g_Dice % 5) + 2; itemtext = " bottles of Radicola "; } else if (chooseitem < 65) { itemmade = "Black Cat Beer"; numbermade = 1; itemtext = " bottle of Black Cat Beer "; } else if (chooseitem < 70) { itemmade = "Crossgate Egg Nog"; numbermade = 1; itemtext = " bottle of Crossgate Egg Nog "; } else if (chooseitem < 75) { itemmade = "Nightmare Fuel"; numbermade = 1; itemtext = " bottle of Nightmare Fuel "; } else if (chooseitem < 80) { itemmade = "Nightmare Fuel X"; numbermade = 1; itemtext = " bottle of Nightmare Fuel "; } else if (chooseitem < 83) { itemmade = "Nightmare Fuel XY"; numbermade = 1; itemtext = " bottle of Nightmare Fuel "; } else if (chooseitem < 84) { itemmade = "Nightmare Fuel XYZ"; numbermade = 1; itemtext = " bottle of Nightmare Fuel "; } else if (chooseitem < 85) { itemmade = "Bimbo Liqueur"; numbermade = 1; itemtext = " bottle of Bimbo Liqueur "; } else if (chooseitem < 86) { itemmade = "Mississippi Queen (Ch)"; numbermade = 1; itemtext = " Mississippi Queen "; } else if (chooseitem < 87) { itemmade = "Mississippi Queen (De)"; numbermade = 1; itemtext = " Mississippi Queen "; } else if (chooseitem < 88) { itemmade = "Mississippi Queen (FF)"; numbermade = 1; itemtext = " Mississippi Queen "; } else if (chooseitem < 89) { itemmade = "Mississippi Queen (Fg)"; numbermade = 1; itemtext = " Mississippi Queen "; } else if (chooseitem < 90) { itemmade = "Mississippi Queen (Fl)"; numbermade = 1; itemtext = " Mississippi Queen "; } else if (chooseitem < 91) { itemmade = "Mississippi Queen (IW)"; numbermade = 1; itemtext = " Mississippi Queen "; } else if (chooseitem < 92) { itemmade = "Mississippi Queen (MF)"; numbermade = 1; itemtext = " Mississippi Queen "; } else if (chooseitem < 93) { itemmade = "Mississippi Queen (Mk)"; numbermade = 1; itemtext = " Mississippi Queen "; } else if (chooseitem < 94) { itemmade = "Mississippi Queen (Ml)"; numbermade = 1; itemtext = " Mississippi Queen "; } else if (chooseitem < 95) { itemmade = "Mississippi Queen (Op)"; numbermade = 1; itemtext = " Mississippi Queen "; } else if (chooseitem < 96) { itemmade = "Mississippi Queen (Ps)"; numbermade = 1; itemtext = " Mississippi Queen "; } else if (chooseitem < 97) { itemmade = "Mississippi Queen (Rt)"; numbermade = 1; itemtext = " Mississippi Queen "; } else if (chooseitem < 98) { itemmade = "Mississippi Queen (St)"; numbermade = 1; itemtext = " Mississippi Queen "; } else if (chooseitem < 99) { itemmade = "Mississippi Queen (To)"; numbermade = 1; itemtext = " Mississippi Queen "; } else /* */ { itemmade = "Mississippi Queen (Tw)"; numbermade = 1; itemtext = " Mississippi Queen "; } item = g_InvManager.GetItem(itemmade); } if (item) { msgtype = EVENT_GOODNEWS; ss << "\n\n" << girlName << " made "; if (numbermade == 1) ss << "one "; else ss << numbermade << " "; ss << itemmade << " for you."; for (int i = 0; i < numbermade; i++) g_Brothels.AddItemToInventory(item); } #pragma endregion #pragma region // Money // #pragma endregion #pragma region // Finish the shift // g_Girls.UpdateEnjoyment(girl, actiontype, enjoy); girl->m_Events.AddMessage(ss.str(), imagetype, msgtype); // Money if (wages < 0) wages = 0; girl->m_Pay = (int)wages; if (tips < 0) tips = 0; girl->m_Tips = (int)tips; // Improve stats int xp = 5, 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; } g_Girls.UpdateStat(girl, STAT_EXP, (g_Dice % xp) + 1); g_Girls.UpdateStatTemp(girl, STAT_LIBIDO, libido); // primary (+2 for single or +1 for multiple) g_Girls.UpdateSkill(girl, SKILL_BREWING, (g_Dice % skill) + 2); // secondary (-1 for one then -2 for others) g_Girls.UpdateSkill(girl, SKILL_HERBALISM, max(0, (g_Dice % skill) - 1)); g_Girls.UpdateStat(girl, STAT_INTELLIGENCE, max(0, (g_Dice % skill) - 2)); g_Girls.UpdateSkill(girl, SKILL_COOKING, max(0, (g_Dice % skill) - 2)); #pragma endregion return false; }
// `J` Job Farm - Laborers - Combat_Job bool cJobManager::WorkBeastCapture(sGirl* girl, sBrothel* brothel, bool Day0Night1, string& summary) { #pragma region // Job setup // int actiontype = ACTION_COMBAT; 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 capture beasts during the " << (Day0Night1 ? "night" : "day") << " shift."; girl->m_Events.AddMessage(ss.str(), IMGTYPE_PROFILE, EVENT_NOWORK); return true; } ss << " equipped herself and went out to hunt for exotic beasts and animals.\n\n"; g_Girls.EquipCombat(girl); // ready armor and weapons! int wages = 40, tips = 0; int enjoy = 0; int imagetype = IMGTYPE_COMBAT; int msgtype = Day0Night1; #pragma endregion #pragma region // The Fight to get the Beasts // int tired = 0; int gainmax = (int)(JP_BeastCapture(girl, false) / 30) + 1; int gain = g_Dice % gainmax + 1; sGirl* tempgirl = g_Girls.CreateRandomGirl(18, false, false, false, true, false); Uint8 fight_outcome = 0; if (tempgirl) // `J` reworked incase there are no Non-Human Random Girls { fight_outcome = g_Girls.girl_fights_girl(girl, tempgirl); } else { g_LogFile.write("Error: You have no Non-Human Random Girls for your girls to fight\n"); g_LogFile.write("Error: You need a Non-Human Random Girl to allow WorkBeastCapture randomness"); fight_outcome = 7; } if (tempgirl) delete tempgirl; tempgirl = 0; // Cleanup if (fight_outcome == 7) { ss << "She came back with just one animal today.\n\n"; ss << "(Error: You need a Non-Human Random Girl to allow WorkBeastCapture randomness)"; gain = 1; msgtype = EVENT_WARNING; tired = 15; } else if (fight_outcome == 1) // she won { if (gain <= 2) gain = 2; if (gain >= gainmax) gain = gainmax; ss << "She had fun hunting today and came back with " << gain << " new beasts.";; imagetype = IMGTYPE_COMBAT; tired = g_Dice % (3 * gain); enjoy += g_Dice % 4 + 2; } else // she lost or it was a draw { gain = g_Dice.bell(-gainmax / 3, gainmax / 2); ss << " The animals were difficult to track today. " << girlName << " eventually returned worn out and frustrated, "; if (gain <= 0) { gain = 0; ss << "empty handed."; } else { ss << "dragging "; if (gain == 1) ss << "one"; if (gain > 1) ss << gain; ss << " captured beast" << (gain > 1 ? "s" : "") << " behind her."; } imagetype = IMGTYPE_COMBAT; enjoy -= g_Dice % 3 + 1; tired = g_Dice % (10 * gain) + 20; } ss << "\n\n"; #pragma endregion #pragma region // A Little Randomness // //SIN: A little randomness if (((g_Girls.GetSkill(girl, SKILL_ANIMALHANDLING) + g_Girls.GetStat(girl, STAT_CHARISMA)) > 125) && g_Dice.percent(30)) { ss << girlName << " has a way with animals, a" << (gain > 1 ? "nother" : "") << " beast freely follows her back.\n"; gain++; } //SIN: most the rest rely on more than one cap so might as well skip the lot if less than this... if (gain > 1) { // `J` added a switch with a use next if check fails and changed percents to (gain * 5) switch (g_Dice % 10) { case 0: if (girl->has_trait( "Twisted") && girl->has_trait( "Nymphomaniac") && (g_Girls.GetStat(girl, STAT_LIBIDO) >= 80)) { ss << "Being a horny, twisted nymphomaniac, " << girlName << " had some fun with the beasts before she handed them over.\n"; g_Girls.UpdateSkill(girl, SKILL_BEASTIALITY, g_Dice % gain); g_Girls.UpdateStat(girl, STAT_LIBIDO, -(g_Dice % gain)); tired += gain; break; } case 1: if (girl->has_trait( "Psychic") && (g_Girls.GetStat(girl, STAT_LIBIDO) >= 90) && g_Dice.percent(gain * 5)) { ss << girlName << "'s Psychic sensitivity caused her mind be overwhelmed by the creatures' lusts"; if (g_Girls.CheckVirginity(girl)) { ss << " but, things were moving too fast and she regained control before they could take her virginity.\n"; g_Girls.UpdateSkill(girl, SKILL_BEASTIALITY, 1); g_Girls.UpdateStat(girl, STAT_LIBIDO, 2); // no satisfaction! } else { ss << ". Many hours later she staggered in to present the creatures to you.\n"; g_Girls.UpdateSkill(girl, SKILL_BEASTIALITY, g_Dice % gain); g_Girls.UpdateStat(girl, STAT_LIBIDO, -2 * (g_Dice % gain)); g_Girls.UpdateStat(girl, STAT_TIREDNESS, gain); girl->calc_insemination(g_Girls.GetBeast(), 1); } tired += gain; break; } case 2: if (girl->has_trait( "Assassin") && g_Dice.percent(gain * 5)) { ss << " One of the captured creatures tried to escape on the way back. Trained assassin, " << girlName << ", instantly killed it as an example to the others.\n"; g_Girls.UpdateSkill(girl, SKILL_COMBAT, 1); gain--; break; } case 3: if (g_Girls.GetStat(girl, STAT_TIREDNESS) > 50 && g_Dice.percent(gain * 5)) { ss << girlName << " was so exhausted she couldn't concentrate. One of the creatures escaped.\n"; gain--; break; } default: break; } } #pragma endregion #pragma region // Collect Pets // // `J` Farm Bookmark - adding in items that can be gathered in the farm if (g_Dice.percent(5)) { string itemfound = ""; string itemfoundtext = ""; int chooseitem = g_Dice.d100(); if (chooseitem < 25) { itemfound = (g_Dice % 2) ? "Black Cat" : "Cat"; itemfoundtext = "a stray cat and brought it back with her."; } else if (chooseitem < 50) { itemfound = "Guard Dog"; itemfoundtext = "a tough looking stray dog and brought it back with her."; } else if (chooseitem < 60) { itemfound = "A Bunch of Baby Ducks"; itemfoundtext = "a bunch of baby ducks without a mother, so she gathered them up in her shirt and brought them home."; } else if (chooseitem < 65) { itemfound = "Death Bear"; itemfoundtext = "a large bear that seems to have had some training, so she brought it home."; } else if (chooseitem < 80) { itemfound = "Pet Spider"; itemfoundtext = "a strange looking spider so she collected it in a bottle and brought it back with her."; } else if (chooseitem < 95) { itemfound = (g_Dice % 4 == 1) ? "Fox Stole" : "Fur Stole"; itemfoundtext = "a dead animal that was not too badly damaged. She brought it home, skinned it, cleaned it up and made a lovely stole from it."; } else if (chooseitem < 96) { itemfound = "Echidna's Snake"; itemfoundtext = "a rather obedient and psychic snake. It wrapped itself around her crotch and let her take it home."; } else { itemfound = "Tiger Shark Tooth"; itemfoundtext = "a rather large shark tooth and brought it home."; } sInventoryItem* item = g_InvManager.GetItem(itemfound); if (item) { ss << girlName << " found " << itemfoundtext; g_Brothels.AddItemToInventory(item); } } #pragma endregion #pragma region // Money // // 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())) { wages = 0; } else { wages += gain * 10; // `J` Pay her based on how much she brings back } #pragma endregion #pragma region // Finish the shift // g_Brothels.add_to_beasts(gain); // Money girl->m_Tips = max(0, tips); girl->m_Pay = max(0, wages); // Improve girl // Base Improvement and trait modifiers int xp = 10, libido = 1, skill = 3; /* */if (girl->has_trait("Quick Learner")) { skill += 1; xp += 3; } else if (girl->has_trait("Slow Learner")) { skill -= 1; xp -= 3; } /* */if (girl->has_trait("Nymphomaniac")) { libido += 2; } // EXP and Libido int I_xp = (g_Dice % xp) + 1; g_Girls.UpdateStat(girl, STAT_EXP, I_xp); int I_libido = (g_Dice % libido) + 1; g_Girls.UpdateStatTemp(girl, STAT_LIBIDO, I_libido); if (tired > 0) girl->tiredness(tired); // primary improvement (+2 for single or +1 for multiple) int I_combat = (g_Dice % skill) + 1; g_Girls.UpdateSkill(girl, SKILL_COMBAT, I_combat); int I_animalh = (g_Dice % skill) + 1; g_Girls.UpdateSkill(girl, SKILL_ANIMALHANDLING, I_animalh); int I_strength = (g_Dice % skill) + 1; g_Girls.UpdateStat(girl, STAT_STRENGTH, I_strength); // secondary improvement (-1 for one then -2 for others) int I_constitution = max(0, (g_Dice % skill) - 1); g_Girls.UpdateStat(girl, STAT_CONSTITUTION, I_constitution); int I_beastiality = max(0, (g_Dice % skill) - 2); g_Girls.UpdateSkill(girl, SKILL_BEASTIALITY, I_beastiality); int I_agility = max(0, (g_Dice % skill) - 2); g_Girls.UpdateStat(girl, STAT_AGILITY, I_agility); int I_magic = max(0, (g_Dice % skill) - 2); g_Girls.UpdateSkill(girl, SKILL_MAGIC, I_magic); // Update Enjoyment g_Girls.UpdateEnjoyment(girl, actiontype, enjoy); // Gain Traits g_Girls.PossiblyGainNewTrait(girl, "Tough", 30, actiontype, "She has become pretty Tough from all of the fights she's been in.", Day0Night1); g_Girls.PossiblyGainNewTrait(girl, "Adventurer", 40, actiontype, "She has been in enough tough spots to consider herself Adventurer.", Day0Night1); g_Girls.PossiblyGainNewTrait(girl, "Aggressive", 60, actiontype, "She is getting rather Aggressive from her enjoyment of combat.", Day0Night1); if (g_Dice.percent(25) && g_Girls.GetStat(girl, STAT_STRENGTH) >= 60 && g_Girls.GetSkill(girl, SKILL_COMBAT) > g_Girls.GetSkill(girl, SKILL_MAGIC)) { g_Girls.PossiblyGainNewTrait(girl, "Strong", 60, ACTION_COMBAT, girlName + " has become pretty Strong from all of the fights she's been in.", Day0Night1); } //lose traits g_Girls.PossiblyLoseExistingTrait(girl, "Fragile", 15, actiontype, girl->m_Realname + " has had to heal from so many injuries you can't say she is fragile anymore.", Day0Night1); if (cfg.debug.log_show_numbers()) { ss << "\n\nNumbers:" << "\n Wages = " << (int)wages << "\n Tips = " << (int)tips << "\n Xp = " << I_xp << "\n Libido = " << I_libido << "\n combat = " << I_combat << "\n animalh = " << I_animalh << "\n strength = " << I_strength << "\n constitution = " << I_constitution << "\n beastiality = " << I_beastiality << "\n agility = " << I_agility << "\n magic = " << I_magic << "\n Tiredness = " << tired << "\n Enjoy " << girl->enjoy_jobs[actiontype] << " = " << enjoy ; } girl->m_Events.AddMessage(ss.str(), imagetype, msgtype); #pragma endregion return false; }