So my first try,
I dont know how to test but normally there shouldn't be aything wrong. What i did was take the original Work bar and saved it as Workbarmaid. After that i removed the 4 random jobs and made it a a diceroll of 2 so either she works as a barmaid or a topless barmaid. (topless barmaid has a 15 payout instead of just 5) (is this the pay you have o pay or is it the pay she recieves?)
/*
* Copyright 2009, 2010, The Pink Petal Development Team.
* The Pink Petal Devloment Team are defined as the game's coders
* who meet on http://pinkpetal.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ #include "cJobManager.h" #include "cBrothel.h" #include "cCustomers.h" #include "cRng.h" #include "cInventory.h" #include "sConfig.h" #include "cRival.h" #include <sstream> #include "CLog.h" #include "cTrainable.h" #include "cTariff.h" #include "cGold.h" #include "cGangs.h" #include "cMessageBox.h" extern cRng g_Dice; extern CLog g_LogFile; extern cCustomers g_Customers; extern cInventory g_InvManager; extern cBrothelManager g_Brothels; extern cGangManager g_Gangs; extern cMessageQue g_MessageQue; bool cJobManager::WorkBar(sGirl* girl, sBrothel* brothel, int DayNight, string& summary)
{
/* WD: Added missing SEX_ACTION filter
*
* Add customer happiness
* Fixed income - need to decrement loop counter
* when customer is rejected
*/ string message = "";
int tex = g_Dice%2;
if(Preprocessing(ACTION_WORKBAR, girl, brothel, DayNight, summary, message)) // they refuse to have work in the bar return true;
// put that shit away, you'll scare off the customers! g_Girls.UnequipCombat(girl);
// Barmaid is a easy service skill (set this one up as a double option like the brothelmasseuse except instead of having sex making it about more pay) if(tex == 0)
{
girl->m_Pay += 5;
message += "She worked as a barmaid.";
}
else if(tex == 1)
{
girl->m_Pay += 15;
message += "She worked as a topless barmaid.";
} /*
* Did she enjoy working this job?
*
* Hmmm... with a 95% chance she enjoyed the work, that +3 is going to predominate
*
* I can accept that jobs like barmaid might be cushy numbers, but this applies
* whatever the girl does
*/ int roll = g_Dice%100;
if(roll <= 5)
{
message += " Some of the patrons abused her during the shift.";
g_Girls.UpdateEnjoyment(girl, ACTION_WORKBAR, -3, true);
} /*
* so the bonus is a third of that for a bad experience, but four times more likely
* so on the whole, they'll still like bar work
*/ else if(roll <= 25) {
message += " She had a pleasant time working.";
g_Girls.UpdateEnjoyment(girl, ACTION_WORKBAR, +1, true);
}
else {
message += " Otherwise, the shift passed uneventfully.";
} /*
* work out the pay between the house and the girl
*
* the original calc took the average of beauty and charisma and halved it
*/ int roll_max = girl->beauty() + girl->charisma();
roll_max /= 4;
girl->m_Pay += 10 + g_Dice%roll_max;
// 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_FAME, 1);
g_Girls.UpdateStat(girl, STAT_EXP, xp);
g_Girls.UpdateSkill(girl, SKILL_SERVICE, skill);
g_Girls.UpdateTempStat(girl, STAT_LIBIDO, libido);
return false;
}