本文整理汇总了C++中cMessageQue::AddToQue方法的典型用法代码示例。如果您正苦于以下问题:C++ cMessageQue::AddToQue方法的具体用法?C++ cMessageQue::AddToQue怎么用?C++ cMessageQue::AddToQue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cMessageQue
的用法示例。
在下文中一共展示了cMessageQue::AddToQue方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: game_over
static int game_over(lua_State *L)
{
cScriptManager sm;
g_MessageQue.AddToQue("GAME OVER", COLOR_RED);
g_WinManager.PopToWindow(&g_BrothelManagement);
g_WinManager.Pop();
g_InitWin = true;
sm.Release();
return 0;
}
示例2: queue_message
static int queue_message(lua_State *L)
{
CLog log;
const char *msg = luaL_checkstring(L, 1);
int color = luaL_checkint(L, 2);
log.ss() << "adding to message queue: '" << msg << "\n";
//log.ss() << "Before add: has = " << g_MessageQue.HasNext();
log.ssend();
g_MessageQue.AddToQue(msg, color);
//log.ss() << "After add: has = " << g_MessageQue.HasNext();
//log.ssend();
return 0;
}
示例3:
/*
* ideally, we'd keep a queue of message strings and
* pop them out in order at the end
*/
cGirlTorture::~cGirlTorture() // deconstructor
{
int color = COLOR_BLUE;
if (m_Girl->m_RunAway != 0)
{
color = COLOR_RED;
}
// Display any outstanding messages
if (!m_Message.empty())
{
if (m_TorturedByPlayer)
{
g_MessageQue.AddToQue(m_Message, color);
m_Girl->m_Events.AddMessage(m_Message, IMGTYPE_TORTURE, EVENT_SUMMARY); // `J` added
}
else
{
if (m_Girl->health()>0) // Make sure girl is alive
m_Girl->m_Events.AddMessage(m_Message, IMGTYPE_TORTURE, EVENT_SUMMARY);
}
}
}
示例4: add_trait
void cGirlTorture::add_trait(string trait, int pc)
{
if (m_Girl->has_trait(trait)) return;
/*
* WD: To balance a crash bug workaround for Job Torturer
* unable to call GirlGangFight()
* Halve chance of gaining trait
*/
if (!m_TorturedByPlayer) pc /= 2;
if (!g_Dice.percent(pc)) return;
string sMsg = m_Girl->m_Realname + gettext(" has gained trait \"") + trait + gettext("\" from being tortured.");
if (m_TorturedByPlayer)
{
g_MessageQue.AddToQue(sMsg, 2);
m_Girl->m_Events.AddMessage(sMsg, IMGTYPE_TORTURE, EVENT_WARNING);
}
else MakeEvent(sMsg);
// Add trait
m_Girl->add_trait(trait);
}
示例5: IsGirlInjured
bool cGirlTorture::IsGirlInjured(unsigned int unModifier)
{ // modifier: 5 = 5% chance, 10 = 10% chance
// Sanity check, Can't get injured
if (m_Girl->has_trait("Incorporeal")) return false;
/*
* WD Injury was only possible if girl is pregnant or
* hasn't got the required traits.
*
* Now check for injury first
* Use usigned int so can't pass negative chance
*/
string sMsg;
string sGirlName = m_Girl->m_Realname;
int nMod = static_cast<int>(unModifier);
if (cfg.initial.torture_mod() < 0){ nMod += nMod; }
if (m_Girl->has_trait("Fragile")) nMod += nMod; // nMod *= 2;
if (m_Girl->has_trait("Tough")) nMod /= 2;
if (nMod < 1) nMod = 1; // `J` always at least a 1% chance
// Did the girl get injured
if (!g_Dice.percent(nMod)) return false;
/*
* INJURY PROCESSING
* Only injured girls continue past here
*/
// Post any outstanding Player messages
if (m_TorturedByPlayer && !m_Message.empty())
{
g_MessageQue.AddToQue(m_Message, 0);
m_Girl->m_Events.AddMessage(m_Message, IMGTYPE_TORTURE, EVENT_SUMMARY); // `J` added
m_Message = sGirlName + ": ";
}
// getting hurt badly could lead to scars
if (g_Dice.percent(nMod * 2) &&
!m_Girl->has_trait("Small Scars") &&
!m_Girl->has_trait("Cool Scars") &&
!m_Girl->has_trait("Horrific Scars"))
{
int chance = g_Dice % 6;
if (chance == 0)
{
m_Girl->add_trait("Horrific Scars", false);
if (m_TorturedByPlayer)
m_Message += gettext("She was badly injured, and now has to deal with Horrific Scars.\n");
else
MakeEvent(sGirlName + gettext(" was badly injured, and now has Horrific Scars.\n"));
}
else if (chance <= 2)
{
m_Girl->add_trait("Small Scars", false);
if (m_TorturedByPlayer)
m_Message += gettext("She was injured and now has a couple of Small Scars.\n");
else
MakeEvent(sGirlName + gettext(" was injured, and now has Small Scars.\n"));
}
else
{
m_Girl->add_trait("Cool Scars", false);
if (m_TorturedByPlayer)
m_Message += gettext("She was injured and scarred. As scars go however, at least they are pretty Cool Scars.\n");
else
MakeEvent(sGirlName + gettext(" was injured and scarred. She now has Cool Scars.\n"));
}
}
// in rare cases, she might even lose an eye
if (g_Dice.percent((nMod / 2)) &&
!m_Girl->has_trait("One Eye") &&
!m_Girl->has_trait("Eye Patch"))
{
int chance = g_Dice % 3;
if (chance == 0)
{
m_Girl->add_trait("One Eye", false);
if (m_TorturedByPlayer)
m_Message += gettext("Oh, no! She was badly injured, and now only has One Eye!\n");
else
MakeEvent(sGirlName + gettext(" was badly injured and lost an eye.\n"));
}
else
{
m_Girl->add_trait("Eye Patch", false);
if (m_TorturedByPlayer)
m_Message += gettext("She was injured and lost an eye, but at least she has a cool Eye Patch to wear.\n");
else
MakeEvent(sGirlName + gettext(" was injured and lost an eye, but at least she has a cool Eye Patch to wear.\n"));
}
}
// or lose tough or become fragile
if (m_Girl->has_trait("Tough"))
{
//.........这里部分代码省略.........
示例6: WorkMilker
// `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);
}
}
//.........这里部分代码省略.........
示例7: WorkFilmBeast
// `J` Job Movie Studio - Actress
bool cJobManager::WorkFilmBeast(sGirl* girl, sBrothel* brothel, bool Day0Night1, string& summary)
{
int actiontype = ACTION_WORKMOVIE;
// No film crew.. then go home // `J` this will be taken care of in building flow, leaving it in for now
if (g_Studios.GetNumGirlsOnJob(0, JOB_CAMERAMAGE, SHIFT_NIGHT) == 0 || g_Studios.GetNumGirlsOnJob(0, JOB_CRYSTALPURIFIER, SHIFT_NIGHT) == 0)
{
girl->m_Events.AddMessage("There was no crew to film the scene, so she took the day off", IMGTYPE_PROFILE, EVENT_NOWORK);
return false;
}
cConfig cfg;
stringstream ss;
string girlName = girl->m_Realname;
int wages = 50;
int enjoy = 0;
int jobperformance = 0;
g_Girls.UnequipCombat(girl); // not for actress (yet)
ss << girlName << " worked as an actress filming scenes with beasts.\n\n";
int roll = g_Dice.d100();
if (roll <= 10 && g_Girls.DisobeyCheck(girl, ACTION_WORKMOVIE, brothel))
{
ss << "She refused to fuck any beasts on film today.\n";
girl->m_Events.AddMessage(ss.str(), IMGTYPE_PROFILE, EVENT_NOWORK);
return true;
}
else if (roll <= 10) { enjoy -= g_Dice % 3 + 1; ss << "She didn't enjoy letting the creature fuck her.\n\n"; }
else if (roll >= 90) { enjoy += g_Dice % 3 + 1; ss << "She loved the feel of the creature on top of her.\n\n"; }
else /* */{ enjoy += g_Dice % 2; ss << "She didn't do much else today.\n\n"; }
jobperformance = enjoy * 2;
if (g_Girls.CheckVirginity(girl))
{
g_Girls.LoseVirginity(girl); // `J` updated for trait/status
jobperformance += 50;
ss << "She is no longer a virgin.\n";
}
// remaining modifiers are in the AddScene function --PP
int finalqual = g_Studios.AddScene(girl, SKILL_BEASTIALITY, jobperformance);
ss << "Her scene is valued at: " << finalqual << " gold.\n";
// mod: added check for number of beasts owned; otherwise, fake beasts could somehow inseminate the girl
if (g_Brothels.GetNumBeasts() > 0)
{
if (!girl->calc_insemination(g_Brothels.GetPlayer(), false, 1.0))
g_MessageQue.AddToQue(girl->m_Realname + " has gotten inseminated", 0);
}
girl->m_Events.AddMessage(ss.str(), IMGTYPE_BEAST, Day0Night1);
// work out the pay between the house and the girl
if (girl->is_slave() && !cfg.initial.slave_pay_outofpocket())
{
wages = 0; // You own her so you don't have to pay her.
}
else
{
wages += finalqual * 2;
}
girl->m_Pay = wages;
// Improve stats
int xp = 10, 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; }
g_Girls.UpdateStat(girl, STAT_EXP, xp);
g_Girls.UpdateSkill(girl, SKILL_PERFORMANCE, g_Dice%skill);
g_Girls.UpdateSkill(girl, SKILL_BEASTIALITY, g_Dice%skill + 1);
g_Girls.UpdateEnjoyment(girl, ACTION_SEX, enjoy);
g_Girls.UpdateEnjoyment(girl, ACTION_WORKMOVIE, enjoy);
g_Girls.PossiblyGainNewTrait(girl, "Fake Orgasm Expert", 50, ACTION_SEX, "She has become quite the faker.", Day0Night1);
g_Girls.PossiblyGainNewTrait(girl, "Porn Star", 80, ACTION_WORKMOVIE, "She has performed in enough sex scenes that she has become a well known Porn Star.", Day0Night1);
return false;
}
示例8: WorkFightArenaGirls
// `J` Job Arena - Fighting
bool cJobManager::WorkFightArenaGirls(sGirl* girl, sBrothel* brothel, bool Day0Night1, string& summary)
{
int actiontype = ACTION_COMBAT;
stringstream ss; string girlName = girl->m_Realname; ss << girlName;
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 << " was assigned to fight other girls in the arena.\n\n";
int wages = 0, fight_outcome = 0, enjoyment = 0, fame = 0, imagetype = IMGTYPE_COMBAT;
double jobperformance = JP_FightArenaGirls(girl, false);
g_Girls.EquipCombat(girl); // ready armor and weapons!
sGirl* tempgirl = g_Girls.CreateRandomGirl(18, false, false, false, false, false, true);
if (tempgirl) fight_outcome = g_Girls.girl_fights_girl(girl, tempgirl);
else fight_outcome = 7; // `J` reworked incase there are no Non-Human Random Girls
if (fight_outcome == 7)
{
g_LogFile.write("Error: You have no Arena Girls for your girls to fight\n");
g_LogFile.write("Error: You need an Arena Girl to allow WorkFightArenaGirls randomness");
ss << "There were no Arena Girls for her to fight.\n\n(Error: You need an Arena Girl to allow WorkFightArenaGirls randomness)";
imagetype = IMGTYPE_PROFILE;
}
else if (fight_outcome == 1) // she won
{
enjoyment = g_Dice % 3 + 1;
fame = g_Dice % 3 + 1;
sGirl* ugirl = 0;
if (g_Dice.percent(10)) // chance of getting unique girl
{
ugirl = g_Girls.GetRandomGirl(false, false, true);
}
if (ugirl)
{
stringstream msg; // goes to the girl and the g_MessageQue
stringstream Umsg; // goes to the new girl
stringstream Tmsg; // temp msg
ugirl->m_Stats[STAT_HEALTH] = g_Dice % 50 + 1;
ugirl->m_Stats[STAT_HAPPINESS] = g_Dice % 80 + 1;
ugirl->m_Stats[STAT_TIREDNESS] = g_Dice % 50 + 50;
ugirl->m_States |= (1 << STATUS_ARENA);
msg << girlName << " won her fight against " << ugirl->m_Realname << ".\n\n";
Umsg << ugirl->m_Realname << " lost her fight against your girl " << girlName << ".\n\n";
Tmsg << ugirl->m_Realname;
if (g_Dice.percent(50))
{
ugirl->m_States |= (1 << STATUS_SLAVE);
Tmsg << "'s owner could not afford to pay you your winnings so he gave her to you instead.\n\n";
}
else
{
Tmsg << " put up a good fight so you let her live as long as she came work for you.\n\n";
wages = 100 + g_Dice % (girl->fame() + girl->charisma());
}
msg << Tmsg.str();
Umsg << Tmsg.str();
ss << msg.str();
g_MessageQue.AddToQue(msg.str(), 0);
ugirl->m_Events.AddMessage(Umsg.str(), IMGTYPE_PROFILE, EVENT_DUNGEON);
g_Brothels.GetDungeon()->AddGirl(ugirl, DUNGEON_NEWARENA);
}
else
{
ss << girlName << " won her fight.";
wages = 100 + g_Dice % (girl->fame() + girl->charisma());
}
}
else if (fight_outcome == 2) // she lost
{
enjoyment = -(g_Dice % 3 + 1);
fame = -(g_Dice % 3 + 1);
ss << "She lost the fight.";
int cost = 150;
brothel->m_Finance.arena_costs(cost);
ss << " You had to pay " << cost << " gold cause your girl lost.";
/*that should work but now need to make if you lose the girl if you dont have the gold zzzzz FIXME*/
}
else if (fight_outcome == 0) // it was a draw
{
enjoyment = g_Dice % 3 - 2;
fame = g_Dice % 3 - 2;
ss << "The fight ended in a draw.";
}
if (girl->is_pregnant())
{
if (g_Girls.GetStat(girl, STAT_STRENGTH) >= 60)
{
ss << "\n\nAll that fighting proved to be quite exhausting for a pregnant girl, even for one as strong as " << girlName << " .\n";
}
else
{
//.........这里部分代码省略.........
示例9: WorkFeedPoor
//.........这里部分代码省略.........
#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 //
示例10: 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;
}
//.........这里部分代码省略.........
示例11: WorkSleazyBarmaid
//.........这里部分代码省略.........
{
ss << "She screamed do you know who my dad is? He will have your head for this!\n";
}
else if (g_Girls.HasTrait(girl, "Your Wife"))
{
ss << "She screamed do you know who my husband is? He will have your head for this!\n";
}
else if (HateLove >= 80) //loves you
{
ss << "She screamed do you know who my love is? He will have your head for this!\n";
}
else
{
ss << "She screamed and shook his hand off.\n";
}
}
if ((g_Girls.HasTrait(girl, "Nymphomaniac") || g_Girls.HasTrait(girl, "Succubus")) && g_Girls.GetStat(girl, STAT_LIBIDO) > 80 && g_Dice.percent(20) && !g_Girls.HasTrait(girl, "Virgin") && !g_Girls.HasTrait(girl, "Lesbian"))
{
if (roll_b <= 50)
{
ss << girlName << " dragged one of the less sober clients outside into a back alley and ordered him to fuck her senseless against a wall. After the deed, the poor fellow passed out and " << girlName << " returned to her job as if nothing happened.\n";
}
else
{
ss << girlName << " spotted a relatively good-looking guy walking into the bathroom alone. She followed him inside, and as he tried to exit the bathroom stall, he got pushed back in by her. " << girlName << " didn't waste any time and in a matter of seconds was vigorously fucking the client. After the deed, the client made sure " << girlName << " had a pretty hefty wad of money stuck behind her skirt.\n"; tips += 50;
}
imagetype = IMGTYPE_SEX;
g_Girls.UpdateStatTemp(girl, STAT_LIBIDO, -20);
g_Girls.UpdateSkill(girl, SKILL_NORMALSEX, 1);
sCustomer* Cust = new sCustomer; g_Customers.GetCustomer(Cust, brothel); Cust->m_Amount = 1;
if (!girl->calc_pregnancy(Cust, false, 1.0))
{
g_MessageQue.AddToQue(girl->m_Realname + " has gotten pregnant.", 0);
}
delete Cust;
}
#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;
}
#pragma endregion
#pragma region // Money //
#pragma endregion
#pragma region // Finish the shift //
示例12: WorkFilmBondage
// `J` Job Movie Studio - Actress
bool cJobManager::WorkFilmBondage(sGirl* girl, sBrothel* brothel, bool Day0Night1, string& summary)
{
int actiontype = ACTION_WORKMOVIE;
// No film crew.. then go home // `J` this will be taken care of in building flow, leaving it in for now
if (g_Studios.GetNumGirlsOnJob(0, JOB_CAMERAMAGE, SHIFT_NIGHT) == 0 || g_Studios.GetNumGirlsOnJob(0, JOB_CRYSTALPURIFIER, SHIFT_NIGHT) == 0)
{
girl->m_Events.AddMessage("There was no crew to film the scene, so she took the day off", IMGTYPE_PROFILE, EVENT_NOWORK);
return false;
}
stringstream ss;
string girlName = girl->m_Realname;
int wages = 50;
int enjoy = 0;
int jobperformance = 0;
g_Girls.UnequipCombat(girl); // not for actress (yet)
ss << girlName << " worked as an actress filming BDSM scenes.\n\n";
int roll = g_Dice.d100();
if (roll <= 10 && g_Girls.DisobeyCheck(girl, ACTION_WORKMOVIE, brothel))
{
ss << "She refused to get beaten on film today.\n";
girl->m_Events.AddMessage(ss.str(), IMGTYPE_PROFILE, EVENT_NOWORK);
return true;
}
else if (roll <= 10) { enjoy -= g_Dice % 3 + 1; ss << "She did not enjoy getting tied up and hurt today.\n\n"; }
else if (roll >= 90) { enjoy += g_Dice % 3 + 1; ss << "She had a great time getting spanked and whipped.\n\n"; }
else /* */{ enjoy += g_Dice % 2; ss << "She had just another day in the dungeon.\n\n"; }
jobperformance = enjoy * 2;
if (g_Girls.CheckVirginity(girl))
{
g_Girls.LoseVirginity(girl); // `J` updated for trait/status
jobperformance += 50;
ss << "She is no longer a virgin.\n";
}
sCustomer* Cust = new sCustomer; g_Customers.GetCustomer(Cust, brothel); Cust->m_Amount = 1;
if (Cust->m_IsWoman) // FemDom
{
jobperformance += 20;
/* */if (girl->has_trait("Lesbian")) jobperformance += 20;
else if (girl->has_trait("Straight")) jobperformance -= 20;
}
else
{
if (!girl->calc_pregnancy(Cust, false, 0.75))
g_MessageQue.AddToQue(girl->m_Realname + " has gotten pregnant", 0);
/* */if (girl->has_trait("Lesbian")) jobperformance -= 10;
else if (girl->has_trait("Straight")) jobperformance += 10;
}
// remaining modifiers are in the AddScene function --PP
int finalqual = g_Studios.AddScene(girl, SKILL_BDSM, jobperformance);
ss << "Her scene is valued at: " << finalqual << " gold.\n";
girl->m_Events.AddMessage(ss.str(), IMGTYPE_BDSM, Day0Night1);
// work out the pay between the house and the girl
if (girl->is_slave() && !cfg.initial.slave_pay_outofpocket())
{
wages = 0; // You own her so you don't have to pay her.
}
else
{
wages += finalqual * 2;
}
girl->m_Pay = wages;
// Improve stats
int xp = 10, 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; }
g_Girls.UpdateStat(girl, STAT_EXP, xp);
g_Girls.UpdateSkill(girl, SKILL_PERFORMANCE, g_Dice%skill);
g_Girls.UpdateSkill(girl, SKILL_BDSM, g_Dice%skill + 1);
g_Girls.UpdateEnjoyment(girl, ACTION_SEX, enjoy);
g_Girls.UpdateEnjoyment(girl, ACTION_WORKMOVIE, enjoy);
//gain
g_Girls.PossiblyGainNewTrait(girl, "Fake Orgasm Expert", 50, ACTION_SEX, "She has become quite the faker.", Day0Night1);
g_Girls.PossiblyGainNewTrait(girl, "Masochist", 65, ACTION_SEX, girlName + " has turned into a Masochist from filming so many BDSM scenes.", Day0Night1);
g_Girls.PossiblyGainNewTrait(girl, "Slut", 80, ACTION_SEX, girlName + " has turned into quite a slut.", Day0Night1);
g_Girls.PossiblyGainNewTrait(girl, "Porn Star", 80, ACTION_WORKMOVIE, "She has performed in enough sex scenes that she has become a well known Porn Star.", Day0Night1);
//lose
delete Cust;
return false;
}
示例13: check_events
void cScreenBrothelManagement::check_events()
{
if (g_InterfaceEvents.GetNumEvents() != 0)
{
if (g_InterfaceEvents.CheckEvent(EVENT_BUTTONCLICKED, id_girls))
{
g_InitWin = true;
g_WinManager.push("Girl Management");
return;
}
else if (g_InterfaceEvents.CheckEvent(EVENT_BUTTONCLICKED, id_staff))
{
g_InitWin = true;
g_WinManager.push("Gangs");
return;
}
else if (g_InterfaceEvents.CheckEvent(EVENT_BUTTONCLICKED, id_setup))
{
g_InitWin = true;
g_WinManager.push("Building Setup");
return;
}
else if (g_InterfaceEvents.CheckEvent(EVENT_BUTTONCLICKED, id_dungeon))
{
g_InitWin = true;
g_WinManager.push("Dungeon");
return;
}
else if (g_InterfaceEvents.CheckEvent(EVENT_BUTTONCLICKED, id_town))
{
g_InitWin = true;
g_WinManager.push("Town");
return;
}
else if (g_InterfaceEvents.CheckEvent(EVENT_BUTTONCLICKED, id_save))
{
SaveGame(g_CTRLDown);
g_MessageQue.AddToQue("Game Saved", COLOR_GREEN);
return;
}
else if (g_InterfaceEvents.CheckEvent(EVENT_BUTTONCLICKED, id_week))
{
g_InitWin = true;
if (!g_CTRLDown) { g_CTRLDown = false; AutoSaveGame(); }
NextWeek();
g_WinManager.push("TurnSummary");
return;
}
else if (g_InterfaceEvents.CheckEvent(EVENT_BUTTONCLICKED, id_turn))
{
g_InitWin = true;
g_CurrentScreen = SCREEN_TURNSUMMARY;
g_WinManager.push("TurnSummary");
return;
}
else if (g_InterfaceEvents.CheckEvent(EVENT_BUTTONCLICKED, id_quit))
{
g_InitWin = true;
g_GetInput.ModeConfirmExit();
g_WinManager.push("GetInput");
return;
}
else if (g_InterfaceEvents.CheckEvent(EVENT_BUTTONCLICKED, id_next))
{
g_CurrBrothel++;
if (g_CurrBrothel >= g_Brothels.GetNumBrothels())
g_CurrBrothel = 0;
g_InitWin = true;
return;
}
else if (g_InterfaceEvents.CheckEvent(EVENT_BUTTONCLICKED, id_prev))
{
g_CurrBrothel--;
if (g_CurrBrothel < 0)
g_CurrBrothel = g_Brothels.GetNumBrothels() - 1;
g_InitWin = true;
return;
}
}
}
示例14: WorkFightBeast
// `J` Job Arena - Fighting
bool cJobManager::WorkFightBeast(sGirl* girl, sBrothel* brothel, bool Day0Night1, string& summary)
{
int actiontype = ACTION_COMBAT;
stringstream ss;
string girlName = girl->m_Realname;
ss << girlName;
if (g_Brothels.GetNumBeasts() < 1)
{
ss << " had no beasts to fight.";
girl->m_Events.AddMessage(ss.str(), IMGTYPE_PROFILE, Day0Night1);
return false; // not refusing
}
int roll = g_Dice.d100();
if (roll <= 10 && g_Girls.DisobeyCheck(girl, actiontype, brothel))
{
ss << " refused to fight beasts today.\n";
girl->m_Events.AddMessage(ss.str(), IMGTYPE_PROFILE, EVENT_NOWORK);
return true;
}
g_Girls.EquipCombat(girl); // ready armor and weapons!
Uint8 fight_outcome = 0;
int wages = 175, enjoy = 0;
double jobperformance = JP_FightBeast(girl, false);
if (roll <= 15)
{
ss << " didn't like fighting beasts today.";
enjoy -= 3;
}
else if (roll >= 90)
{
ss << " loved fighting beasts today.";
enjoy += 3;
}
else
{
ss << " had a pleasant time fighting beasts today.";
enjoy += 1;
}
ss << "\n\n";
// TODO need better dialog
sGirl* tempgirl = g_Girls.CreateRandomGirl(18, false, false, false, true, false);
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 WorkFightBeast randomness");
fight_outcome = 7;
}
if (fight_outcome == 7)
{
ss << "The beasts were not cooperating and refused to fight.\n\n";
ss << "(Error: You need a Non-Human Random Girl to allow WorkFightBeast randomness)";
girl->m_Events.AddMessage(ss.str(), IMGTYPE_PROFILE, Day0Night1);
}
else if (fight_outcome == 1) // she won
{
ss << "She had fun fighting beasts today.";
enjoy += 3;
girl->m_Events.AddMessage(ss.str(), IMGTYPE_COMBAT, Day0Night1);
int roll_max = girl->fame() + girl->charisma();
roll_max /= 4;
wages += 10 + g_Dice%roll_max;
girl->m_Pay = wages;
g_Girls.UpdateStat(girl, STAT_FAME, 2);
}
else // she lost or it was a draw
{
ss << "She was unable to win the fight.";
enjoy -= 1;
//Crazy i feel there needs be more of a bad outcome for losses added this... Maybe could use some more
if (m_JobManager.is_sex_type_allowed(SKILL_BEASTIALITY, brothel) && !g_Girls.HasTrait(girl, "Virgin"))
{
ss << " So as punishment you allow the beast to have its way with her.";
enjoy -= 1;
g_Girls.UpdateStatTemp(girl, STAT_LIBIDO, -50);
g_Girls.UpdateSkill(girl, SKILL_BEASTIALITY, 2);
girl->m_Events.AddMessage(ss.str(), IMGTYPE_BEAST, Day0Night1);
if (!girl->calc_insemination(The_Player, false, 1.0))
{
g_MessageQue.AddToQue(girl->m_Realname + " has gotten inseminated", 0);
}
}
else
{
ss << " So you send your men in to cage the beast before it can harm her.";
girl->m_Events.AddMessage(ss.str(), IMGTYPE_COMBAT, Day0Night1);
g_Girls.UpdateStat(girl, STAT_FAME, -1);
}
}
//.........这里部分代码省略.........
示例15: Update
//.........这里部分代码省略.........
if (numB + n > TOWN_NUMBUSINESSES)
n = TOWN_NUMBUSINESSES - numB;
curr->m_BusinessesExtort += n;
income += n * 20;
}
}
else // if there are no uncontrolled businesses
{
stringstream ss;
int who = (g_Dice % (m_NumRivals + 1)); // who to attack
if (who == m_NumRivals) // try to attack you
{
if (!player_safe() && NumPlayerBussiness > 0) // but only if you are a valid target
{
sGang* miss1 = g_Gangs.GetGangOnMission(MISS_GUARDING);
if (miss1) // if you have a gang guarding
{
ss << gettext("Your guards encounter ") << curr->m_Name << gettext(" going after some of your territory.");
sGang* rGang = g_Gangs.GetTempGang(curr->m_Power);
if (g_Gangs.GangBrawl(miss1, rGang)) // if you win
{
if (rGang->m_Num == 0) curr->m_NumGangs--;
ss << gettext("\nBut you maintain control of the territory.");
miss1->m_Events.AddMessage(ss.str(), IMGTYPE_PROFILE, EVENT_GANG);
}
else // if you lose
{
if (miss1->m_Num == 0) g_Gangs.RemoveGang(miss1);
ss << gettext("\nYou lose the territory.");
NumPlayerBussiness--;
curr->m_BusinessesExtort++;
g_MessageQue.AddToQue(ss.str(), COLOR_RED);
}
delete rGang; rGang = 0; // cleanup
}
else // if you do not have a gang guarding
{
ss << gettext("Your rival ") << curr->m_Name << gettext(" has taken one of the undefended territories you control.");
g_MessageQue.AddToQue(ss.str(), COLOR_RED);
NumPlayerBussiness--;
curr->m_BusinessesExtort++;
}
}
}
else // attack another rival
{
ss << gettext("The ") << curr->m_Name << gettext(" attacked the territories of ");
cRival* rival = GetRival(who);
if (rival != curr && rival->m_BusinessesExtort > 0)
{
ss << rival->m_Name;
if (rival->m_NumGangs > 0)
{
sGang* rG1 = g_Gangs.GetTempGang(rival->m_Power);
if (g_Gangs.GangBrawl(cG1, rG1, true))
{
rival->m_NumGangs--;
rival->m_BusinessesExtort--;
curr->m_BusinessesExtort++;
ss << gettext(" and won.");
}
else
{
curr->m_NumGangs--;