// FileName lchance.cpp // Author Rob Elliott // Created 09/27/03 // Modified 10/13/03 // Program Lovely Chance // Description source file for LChance Class // Compiled on WinXP Pro SP2, Visual Studio 6.0 SP5 #include "LChance.h" #define MAXPERCSTAT 30 #define INITREACTION 50 #define INTERESTPERLEV 100 #define LEVELUPWINDOW 0.4 #define TALKCONTROLCHANCE 6 // 1/6 chance #define TALKLIFECHANCE 6 // 1/6*1/3 chance #define TALKANSWERRANGE 40 // determines how close your answer to the potens answer // ******************************************************************** Chara::Chara() { FName = MALENAMES[rand()%FNCOUNT]; LName = LASTNAMES[rand()%LNCOUNT]; Gender = 1; //0 for female, 1 for male Seeking = 0; //0 for female, 1 for male for(int i=0;i<10;i++) Stat[i] = 0; } // ******************************************************************** Poten::Poten() { FName = FEMNAMES[rand()%FNCOUNT]; LName = LASTNAMES[rand()%LNCOUNT]; Gender = 0; //0 for female, 1 for male Seeking = 1; //0 for female, 1 for male Interest = 0; RelationshipLevel = 0; for(int i=0;i<10;i++) { DesiredStat[i] = 0; DesiredTrait[i] = rand()%100; PerceivedTrait[i] = 0; } int DistPoints[9] = {5,5,5,5,5,5,5,5,5}; int tmpRnd = 0; int TotalPoints = 450; while (TotalPoints > 0) { tmpRnd = rand()%9; if (DistPoints[tmpRnd] > TotalPoints) DistPoints[tmpRnd] = TotalPoints; DesiredStat[tmpRnd] += DistPoints[tmpRnd]; TotalPoints -= DistPoints[tmpRnd]; } ShortDesc = "an unremarkable individual"; } // ******************************************************************** Poten::Poten(bool gender, bool seeking, int MaxPts, int MinPts, int Focus) { int TotalPoints = (rand()%(MaxPts-MinPts+1))+MinPts+1; Gender = gender; //0 for female, 1 for male Seeking = seeking; //0 for female, 1 for male if (Gender) // if male FName = MALENAMES[rand()%MNCOUNT]; else FName = FEMNAMES[rand()%FNCOUNT]; LName = LASTNAMES[rand()%LNCOUNT]; Interest = 0; RelationshipLevel = 0; for(int i=0;i<10;i++) { DesiredStat[i] = 0; DesiredTrait[i] = rand()%100; PerceivedTrait[i] = 0; } // sets how many points each DStat gets per random draw. int DistPoints[9] = {5,5,5,5,5,5,5,5,5}; if(Focus == 0 || Focus == 1 || Focus == 2) { DistPoints[Focus*3] = 10; // if focus = 0, weight Physical DistPoints[Focus*3+1] = 10;// if focus = 1, weight Mental DistPoints[Focus*3+2] = 10;// if focus = 2, weight Life } // Distributes the TotalPoints weighted-Randomly (from above) int tmpRnd = 0; while (TotalPoints > 0) { tmpRnd = rand()%9; if (DistPoints[tmpRnd] > TotalPoints) DistPoints[tmpRnd] = TotalPoints; DesiredStat[tmpRnd] += DistPoints[tmpRnd]; TotalPoints -= DistPoints[tmpRnd]; } string StrGend; if(Gender == 0) StrGend = "woman"; else StrGend = "man"; int StatNum = rand()%3; string StrAdj = ADJECTS[DesiredStat[StatNum]/10] + " " + STATNAME[StatNum]; switch(rand()%7) { case 0: ShortDesc = "A red-headed " + StrGend + " with " + StrAdj; break; case 1: ShortDesc = "A blonde " + StrGend + " with " + StrAdj; break; case 2: ShortDesc = "A brunette " + StrGend + " with " + StrAdj; break; case 3: ShortDesc = "A raven-haired " + StrGend + " with " + StrAdj; break; case 4: ShortDesc = "A " + StrGend + " with brown hair and " + StrAdj; break; case 5: ShortDesc = "A " + StrGend + " with blonde hair and " + StrAdj; break; case 6: ShortDesc = "A " + StrGend + " of " + StrAdj; break; } } // ******************************************************************** LChance::LChance() { m_StatPointsLeft = 0; m_curLocation = 0; m_PlayMode = 0; m_CurHour = 0; m_CurMinute = 0; m_DeadlineHour = 744; m_KeeperCnt = 0; //Poten testP(0,1,10,10,1); //Talk(&testP); Setup(); //REMEMBER TO UNCOMMENT THIS } // ******************************************************************** int LChance::VInput(int Max, int Min)const { int rawInput = 0; //cin >> rawInput; rawInput = getche()-48; while(rawInput < Min || rawInput > Max) { cout << "\nBad Input (" << Min << "-" << Max << "):" << rawInput << "\n"; rawInput = getche()-48; if(rawInput==-21) exit(0); //cin >> rawInput; //cout << rawInput << endl; } return rawInput; } // ******************************************************************** void LChance::Setup() // covers choosing gametype, chara creation. { int input = 0; //for(int i = 0; i<16; i++) //{ // textcolor(i); // cout << "Hello?\n"; //} clrscr(); textbackground(4); textcolor(12); cout << "ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»" << endl << "º º" << endl << "º Lovely º" << endl << "º Chance! º" << endl << "º º" << endl << "º º" << endl << "º Rob Elliott º" << endl << "º º" << endl << "ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ" << endl; textbackground(0); textcolor(7); // pick play mode cout << "Pick a Play Mode:" << endl; textcolor(15); cout << "\t1 - Trophy Mode" << endl //<< "\t2 - Social Mode" << endl << "\t0 - FreePlay Mode" << endl; textcolor(7); m_PlayMode = VInput(2,0); clrscr(); int i=0; switch(m_PlayMode) { case 0: // for(i=0;i<9;i++) m_Player.Stat[i] = 50; m_StatPointsLeft = 10000; m_DeadlineHour = 10000000; MainMenu(); break; case 1: // Trophy Play Dialog("Your old friends were picking on you last reunion about not"); Dialog("having a longterm significant other. You have decided to"); Dialog("prove them wrong by finding a partner before the next reunion,"); Dialog("one month from now. You will need to find someone, get their"); Dialog("number,get them to date you, get them to go steady, and finally"); Dialog("to fall in love.\n\t\tGood luck!"); case 2: m_StatPointsLeft = 450; m_DeadlineHour = 744; break; default: m_StatPointsLeft = 0; } // pick Gender cout << "Character Creation" << endl; cout << "\tYou are a ..." << endl; textcolor(15); cout << "\t\t1 - Female" << endl << "\t\t2 - Male" << endl; textcolor(7); m_Player.Gender = (VInput(2)-1) != 0; // pick Sexual Preference cout << "\n\tAnd you are seeking ..." << endl; textcolor(15); cout << "\t\t1 - Females" << endl << "\t\t2 - Males" << endl; textcolor(7); m_Player.Seeking = (VInput(2)-1) != 0; // Enter Name cout << "\n\tEnter your name 'First Last' (r for random)" << endl; cin >> m_Player.FName; if (m_Player.FName == "r" || m_Player.FName == "R") { if(m_Player.Gender) m_Player.FName = MALENAMES[rand()%MNCOUNT]; else m_Player.FName = FEMNAMES[rand()%FNCOUNT]; m_Player.LName = LASTNAMES[rand()%LNCOUNT]; } else cin >> m_Player.LName; SetupStats(); MainMenu(); } // ******************************************************************** void LChance::SetupStats() { int input = 0; int tmpInt = 0; string tmpStr = ""; bool editing = true; while(editing) { clrscr(); cout << "Character Creation" << endl << "\tStat Points Left: " << m_StatPointsLeft << endl << "\tWhat would you like to do?\n"; textcolor(15); cout << "\t\t1 - Increase Stat (+10)\n" << "\t\t2 - Decrease Stat (-10)\n" << "\t\t0 - Accept Character\n"; textcolor(7); switch(VInput(2,0)) { case 1: // Increase Stat tmpStr = "Increase"; tmpInt = 10; input = 0; break; case 2: // Decrease Stat tmpStr = "Decrease"; tmpInt = -10; input = 0; break; case 0: // Accept Character if(m_StatPointsLeft > 0) // if player hasn't used all statpoints, confirm done { cout << "\tYou still have stat points left, Done?\n"; textcolor(15); cout << "\t\t1 - Yes\n" << "\t\t2 - No\n"; textcolor(7); if(VInput(2)-1) // if true (selection = 2/No/Dont be done) { input = -1; break; } } editing = false; input = -1; break; default: cout << "SetupStats Error: Main Switch"; } while(input != -1) { clrscr(); cout << "Character Creation" << endl << "\tStat Points Left: " << m_StatPointsLeft << endl; textcolor(15); for(int i = 0; i<9; i++) cout << "\t\t" << i+1 << " - " << tmpStr << " " << STATNAME[i] << "\t(" << m_Player.Stat[i] << ")" << endl; cout << "\t\t0 - Back"; textcolor(7); input = VInput(9,0)-1; if((m_Player.Stat[input] + tmpInt >= 0) & (m_Player.Stat[input] + tmpInt <= 100) & (m_StatPointsLeft - tmpInt >= 0)) { m_Player.Stat[input] += tmpInt; m_StatPointsLeft -= tmpInt; } }; } MainMenu(); // When setup is complete, go to in game menu. } // ******************************************************************** void LChance::MainMenu() { int input = 0; AdvanceTime(0,1); //each message = 5 minutes while(m_Playing) { PrintDate(); cout << "\tWhat would you like to do?\n"; textcolor(15); cout << "\t\t1 - Self-Improvement/Review\n" << "\t\t2 - Go Looking...\n" << "\t\t3 - Call Someone\n" << "\t\t4 - Go on a Date\n" << "\t\t5 - Satisfaction\n" << "\t\t0 - Quit\n"; textcolor(7); switch(VInput(5,0)) { case 0: // Quit exit(0); m_Playing = false; break; case 1: // Self-Improvement/Review Train(); break; case 2: // Go Looking... TheHunt(); break; case 3: // Call Someone if(m_KeeperCnt == 0) { AdvanceTime(3); cout << "\tYou spend several hours calling the old numbers in your book, no luck.\n"; cout << "\tGo get some new ones!!!\n"; textcolor(15); cout << "\t\t0 - To the Hunt!.\n"; VInput(0,0); } else { for(int i=0;iShortDesc << endl; cout << "\t\t0 - Return Home\n"; input = VInput(Quantity,0); if(input == 0) hunting = false; else Talk(LocPotens[input-1]); } /* for(i=0;iInterest != 0) FirstTime = false; // a poten cannot perceive a stat more than MAXPERCSTAT above their req int PerceivedStat[9]; for(int i=0;i<9;i++) { if(m_Player.Stat[i] > Partner->DesiredStat[i]+MAXPERCSTAT) PerceivedStat[i] = Partner->DesiredStat[i]+MAXPERCSTAT; else PerceivedStat[i] = m_Player.Stat[i]; } int PartStat[3]; // a summed version of the partners stats int PlayStat[3]; // a summed version of the players stats for(i=0;i<3;i++) // sums up bulky stats to use from now on { PartStat[i] = Partner->DesiredStat[(i*3)]+Partner->DesiredStat[(i*3)+1]+Partner->DesiredStat[(i*3)+2]; PlayStat[i] = PerceivedStat[(i*3)]+PerceivedStat[(i*3)+1]+PerceivedStat[(i*3)+2]; } // how is charismaMod calculated? // the %difference of partner vs player mental stats // ie if player has 150 mental, and parter has 100 req, // then %difference is (120-100)/100= 0.2 // or if player has 100 mental, and parter has 120 req, // then %difference is (100-120)/120= -0.16 // how is charismaMod used? // it adds a percentage of interestPts on top. // with an answer worth 30 points and charismaMod of 0.20 // 30*0.20=6, 30+6=36 total points // and with same worth but charismaMod of -0.20 // 30*-0.20=-6, 30-6=24 total points // as a rule, charisma does not affect physical or life stats. float Chrsm = (PlayStat[1]-PartStat[1]); if(PlayStat[1] != 0) Chrsm /= PartStat[1]; if(Partner->RelationshipLevel<0) { Dialog("Can't you take a hint? Go Away!"); talking = false; textcolor(15); cout << "\t\t0 - There's more fish in the sea.\n"; textcolor(7); VInput(0,0); } else if(Partner->RelationshipLevel>0) { Dialog("Hi " + m_Player.FName + "!"); } if(FirstTime) { //determine initial reaction Partner->Interest = ChrsmMod(INITREACTION,Chrsm) + PlayStat[0] - PartStat[0]; PrintDate(); cout << "\tYou introduce yourself.\n"; if(Partner->Interest > 50) { Dialog("Hey sexy, I'm " + Partner->FName + ", but you can call me yours. "); Partner->ShortDesc = Partner->FName; } else if(Partner->Interest > 0) { Dialog("Nice to meet you, I'm " + Partner->FName); Partner->ShortDesc = Partner->FName; } else if (Partner->Interest > -50) { Dialog("I'm " + Partner->FName + ", what do you want?"); Partner->ShortDesc = Partner->FName; } else { Dialog("Ugh, gross! Go away!"); talking = false; textcolor(15); cout << "\t\t0 - There's more fish in the sea.\n"; textcolor(7); VInput(0,0); } } int RevTrait = 0; // two possible things happen during conversation- // you either have to answer a question // or take control. while(talking) { AdvanceTime(0,1); //each message = 5 minutes if(rand()%TALKCONTROLCHANCE==0) // 1/3 chance you get control { cout << "\tFinding an opportunity, you...\n"; textcolor(15); cout << "\t\t1 - Give " << HER[Partner->Gender] << " a light compliment.\n" << "\t\t2 - Speak some serious lovey dovey wooing.\n" << "\t\t3 - Ask " << HER[Partner->Gender] << " what " << SHE[Partner->Gender] << " likes in a personality.\n" << "\t\t4 - Probe " << HER[Partner->Gender] << " on dating standards.\n" << "\t\t5 - Ask to take things to the next level.\n" << "\t\t6 - Do something really dumb and embarassing.\n"; textcolor(7); switch(VInput(6)) { case 1: if(rand()%10>4-Partner->RelationshipLevel) //5/5+4-level { cout << "\t" << SHE[Partner->Gender] << " is delighted.\n"; TResponse(Partner,ChrsmMod(25,Chrsm)); } else { cout << "\t" << SHE[Partner->Gender] << " is embarassed.\n"; TResponse(Partner,ChrsmMod(-10,Chrsm)); } break; case 2: if(rand()%6>4-Partner->RelationshipLevel) //5/5+4-level { cout << "\t" << SHE[Partner->Gender] << " is overjoyed.\n"; TResponse(Partner,ChrsmMod(50,Chrsm)); } else { cout << "\t" << SHE[Partner->Gender] << " is annoyed.\n"; TResponse(Partner,ChrsmMod(-20,Chrsm)); } break; case 3: // convert 0-100 scale to 0-20 scale by / 5 // as both 'ends' of the traits are portrayed, if the low end is picked // the 'score' must be inverted. ie if safe is picked, a score of 2 is actually 18 // if pessimistic is picked, a score of 7 is actually 3 RevTrait = rand()%20; if(RevTrait<10) tmpInt = 20 - (Partner->DesiredTrait[RevTrait]/5); else tmpInt = (Partner->DesiredTrait[RevTrait]/5); Dialog("Well... I " + LIKE[tmpInt] + " people who are " + TRAITNAME[RevTrait] + "."); break; case 4: RevTrait = rand()%9; tmpInt = Partner->DesiredStat[RevTrait]/10; Dialog("I need someone with at least " + ADJECTS[tmpInt] + " " + STATNAME[RevTrait] + "."); break; case 5: tmpInt = ( ((Partner->RelationshipLevel + 1)*INTERESTPERLEV) + (rand()%int((INTERESTPERLEV*LEVELUPWINDOW)))-((INTERESTPERLEV*LEVELUPWINDOW)/2) ); cout << "\t" << SHE[Partner->Gender] << " contemplates it for a moment, then-\n"; if(Partner->Interest >= tmpInt) { Dialog(LEVELUP[Partner->RelationshipLevel]); Partner->RelationshipLevel++; if(Partner->RelationshipLevel == 1) { m_Keeper[m_KeeperCnt] = *Partner; m_KeeperCnt++; } cout << "\tNow to plan the next phase...\n"; textcolor(15); cout << "\t\t0 - Plan smchlan, give me fresh meat!.\n"; textcolor(7); VInput(0,0); talking = false; //MainMenu(); /// hmmmmmm } else { Dialog("No, I'm not ready for that yet..."); Partner->Interest -= 20; } break; case 6: cout << "... k. You manage to knock something over and look like an idiot.\n"; TResponse(Partner, ChrsmMod(-40,Chrsm)); break; } } else if (rand()%TALKLIFECHANCE==0) { tmpInt = rand()%6; cout << "\tYou find yourself talking about your " << LIFE[tmpInt] << ". Do you...\n"; textcolor(15); cout << "\t\t1 - Embellish your situation.\n" << "\t\t2 - Tell it like it is.\n" << "\t\t3 - Portray things humbly.\n" << "\t\t4 - Decline to share at this point.\n"; textcolor(7); tmpInt = (tmpInt%3)+6; // converts the number to proper STAT[6,7,8] values PInterest = ChrsmMod(m_Player.Stat[tmpInt]-Partner->DesiredStat[tmpInt],Chrsm); switch(VInput(4)) { case 1: if( (rand()%((Partner->RelationshipLevel+1)*INTERESTPERLEV)) > Partner->Interest) //5/5+4-level { cout << "\t" << SHE[Partner->Gender] << " realizes you are lying.\n"; TResponse(Partner,PInterest-30); } else { cout << "\t" << SHE[Partner->Gender] << " seems to believe you.\n"; TResponse(Partner,PInterest+30); } break; case 2: cout << "\t" << SHE[Partner->Gender] << " listens to your honest account.\n"; TResponse(Partner,PInterest-30); break; case 3: if( (rand()%((Partner->RelationshipLevel+1)*INTERESTPERLEV)) > Partner->Interest) //5/5+4-level { cout << "\t" << SHE[Partner->Gender] << " knows you are being humble.\n"; TResponse(Partner,PInterest+10); } else { cout << "\t" << SHE[Partner->Gender] << " is oblivious to the humility.\n"; TResponse(Partner,PInterest-10); } break; case 4: cout << "\t" << SHE[Partner->Gender] << " notes your secrecy.\n"; TResponse(Partner,ChrsmMod(-10,Chrsm)); break; } } /* here is the meat of the interaction engine. TOPICS consists of 40 strings, broken down into 10 groups of 4, the first 2 being pro (100), the 2nd being con (0). so topic 38 would be 'con trait 8' topic 27 would be 27/4=6 so the 6th topic"OthersFocus", and 27%4=3 so conOthersFocus The poten has a trait 0-100, player must guess where it is. player gets 40-distance away points for each answer. so if poten is 23, and player guesses Negatively (30), player gets +33 so if poten is 57, and player guesses Very Affirm (90), player gets +7 so if poten is 17, and player guesses Very Affirm (90), player gets -33 responding- very affirmatively = 90 affirmatively = 70 neutrally = 50 Negatively = 30 Very Negatively = 10 */ else { Topic = rand()%40; CurTrait = Topic/4; cout << "\tThe conversation reaches the subject of " << TOPICS[Topic] << ". Do you...\n"; textcolor(15); cout << "\t\t1 - Respond Very Affirmatively\n" << "\t\t2 - Respond Affirmatively\n" << "\t\t3 - Respond Neutrally\n" << "\t\t4 - Respond Negatively\n" << "\t\t5 - Respond Very Negatively\n" << "\t\t0 - Excuse yourself from the conversation\n"; textcolor(7); input = VInput(5,0); if (input==0) { Partner->Interest += ChrsmMod(-5,Chrsm); talking = false; } else { tmpInt = 100-(10+(input-1)*20); // guess value (5 should be 10, 2 should be 70) PInterest = 40-abs(Partner->DesiredTrait[CurTrait]-tmpInt); // actual score from guess TResponse(Partner,ChrsmMod(PInterest,Chrsm)); } } if(Partner->Interest > (3*INTERESTPERLEV)) { talking = false; Dialog("I'm going to go look for someone who wants to get a little more intimate."); Partner->RelationshipLevel -= 0; cout << "\tToo Bad...\n"; textcolor(15); cout << "\t\t0 - Should have made your move.\n"; VInput(0,0); } if(Partner->Interest < -INTERESTPERLEV) { talking = false; Dialog("I really have to be going now."); Partner->RelationshipLevel -= 1; cout << "\tToo Bad...\n"; textcolor(15); cout << "\t\t0 - There are more fish in the sea.\n"; VInput(0,0); } } } // ******************************************************************** void LChance::Satisfaction() { clrscr(); bool victory = false; for(int i = 0; i < m_KeeperCnt;i++) if(m_Keeper[i].RelationshipLevel > 4) victory = true; if(victory) cout << "\tCongratulations! You attend the reunion and everyone is shocked!" << "\tWhat wil come next year? CEO position? Nobel Prize? Gold Medal?" << "\tWho knows...\n\tBut wherever you go, your lucky partner will be by your side."; else cout << "\tShame, shame!!! What a loser art thou...\n\tThis is not a difficult game, once you understand it." << "\tGo back and try it on FreePlay Mode!"; VInput(0,0); exit(0); } // ******************************************************************** void LChance::Conclusion() { } // ******************************************************************** void LChance::PrintDate() { // this function both 'sleeps' the player and prints the date at the top while(m_CurHour%24<7 || m_CurHour%24 == 23) { clrscr(); AdvanceTime(1); textbackground(4); textcolor(12); cout << CurDate() << endl; textbackground(0); textcolor(7); cout << "\tSleeping...\n"; Sleep(500); } clrscr(); textbackground(4); textcolor(12); cout << CurDate() << endl; textbackground(0); textcolor(7); } // ******************************************************************** void LChance::Dialog(string Said) { textcolor(12); cout << "\t\t" << Said << endl; textcolor(7); } // ******************************************************************** void LChance::AdvanceTime(int HoursPassed, int MinutesPassed) { m_CurMinute += MinutesPassed; if(m_CurMinute > 6) { m_CurMinute -= 6; HoursPassed++; } m_CurHour += HoursPassed; if(m_CurHour > m_DeadlineHour) Conclusion(); } // ******************************************************************** string LChance::CurDate()const { //cout << m_CurHour << endl; // returns a date like this: Saturday, 12pm (Day 14/31) string GameDate; char tmpPtr[10]; string GameDay = itoa(m_CurHour/24+1,tmpPtr,10); string GameDayEnd = itoa(m_DeadlineHour/24,tmpPtr,10); string GameDayHour = itoa(m_CurHour%12+1,tmpPtr,10); string GameMinute = itoa(m_CurMinute,tmpPtr,10); switch((m_CurHour/24)%7) { case 0: GameDate = "Monday"; break; case 1: GameDate = "Tuesday"; break; case 2: GameDate = "Wednesday"; break; case 3: GameDate = "Thursday"; break; case 4: GameDate = "Friday"; break; case 5: GameDate = "Saturday"; break; case 6: GameDate = "Sunday"; break; } if(m_CurHour%24+2 > 12) GameDate += " " + GameDayHour + ":" + GameMinute + "0pm "; else GameDate += " " + GameDayHour + ":" + GameMinute + "0am "; GameDate += "(Day " + GameDay + "/" + GameDayEnd + ")"; return GameDate; } // ******************************************************************** string Chara::Print()const { string Output; char tempPtr[100]; string isGender = Gender?"Male" : "Female"; string isSeeking = Seeking?"Male":"Female"; Output = "Name: " + FName + " " + LName + "\n"; Output += isGender + " seeking " + isSeeking + "s.\n"; Output += "Stats:\n"; for(int i = 0; i<9;i++) Output += STATNAME[i].substr(0,7) + "\t" + itoa(Stat[i],tempPtr,10) + "\n"; return Output; } // ******************************************************************** string Poten::Print()const { char tempPtr[100]; string Output; // string isGender = Gender?"Male" : "Female"; // string isSeeking = Seeking?"Male":"Female"; Output = "Name: " + FName + " " + LName + "\n"; Output += ShortDesc + "\n"; Output += "Standards:\n"; for(int i = 0; i<9;i++) Output += STATNAME[i].substr(0,7) + "\t" + itoa(DesiredStat[i],tempPtr,10) + "\n"; Output += "\nTrait Opinions:\n"; for(i = 0; i<9;i++) Output += TRAITNAME[i].substr(0,11) + "/" + TRAITNAME[i+11].substr(0,10) + "\t" + itoa(DesiredTrait[i],tempPtr,10) + "\n"; return Output; } // ******************************************************************** int LChance::ChrsmMod(int Value,float Charisma) { return Value + abs(Value)*Charisma; } // ******************************************************************** void LChance::TResponse(Poten *TalkPartner, int InterestPoints) { char temp[100] = ""; char temp2[100] = ""; TalkPartner->Interest += InterestPoints; string IScore = itoa(int(TalkPartner->Interest),temp,10); int outcome = (InterestPoints/10)+10; if(outcome > 20) outcome = 20; else if(outcome < 0) outcome = 0; if(m_PlayMode == 0) Dialog(RESPONSE[outcome] + "(" + itoa(InterestPoints,temp2,10) + ":" + IScore + ")\n"); else Dialog(RESPONSE[outcome]+"\n"); }