void activate(Creature *cr) { int hostagecount=0; int state=0; int choice=0; char havedead=0; for(int p=0;p<pool.size();p++) { if(pool[p]->alive&&pool[p]->align!=1&&pool[p]->location==cr->location)hostagecount++; if(!pool[p]->alive)havedead=1; } do { erase(); set_color(COLOR_WHITE,COLOR_BLACK,0); printfunds(0,1,"Money: "); move(0,0); if (cr->income) { addstr(cr->name); addstr(" made $"); char num[20]; itoa(cr->income,num,10); addstr(num); addstr(" yesterday. What now?"); } else { addstr("Taking Action: What will "); addstr(cr->name); addstr(" be doing today?"); } printcreatureinfo(cr); makedelimiter(8,0); set_color(COLOR_WHITE,COLOR_BLACK,state=='a'); move(10,1); addstr("A - Engaging in Liberal Activism"); set_color(COLOR_WHITE,COLOR_BLACK,state=='b'); move(11,1); addstr("B - Legal Fundraising"); set_color(COLOR_WHITE,COLOR_BLACK,state=='c'); move(12,1); addstr("C - Illegal Fundraising"); set_color(COLOR_WHITE,COLOR_BLACK,state=='d'); move(13,1); addstr("D - Make/Repair Clothing"); if(cr->get_skill(SKILL_FIRSTAID)!=0) { set_color(COLOR_WHITE,COLOR_BLACK,(cr->activity.type==ACTIVITY_HEAL||cr->activity.type==ACTIVITY_NONE)&&state==0); } else { set_color(COLOR_BLACK,COLOR_BLACK,1); } move(14,1); addstr("H - Heal Liberals"); move(15,1); if(cr->canwalk()) { set_color(COLOR_WHITE,COLOR_BLACK,cr->activity.type==ACTIVITY_STEALCARS&&state==0); addstr("S - Stealing a Car"); } else { if(!(cr->flag & CREATUREFLAG_WHEELCHAIR))set_color(COLOR_WHITE,COLOR_BLACK,cr->activity.type==ACTIVITY_WHEELCHAIR&&state==0); else set_color(COLOR_BLACK,COLOR_BLACK,1); addstr("S - Procuring a Wheelchair"); } set_color(COLOR_WHITE,COLOR_BLACK,state=='t'); move(16,1); addstr("T - Teaching Other Liberals"); if(hostagecount>0)set_color(COLOR_WHITE,COLOR_BLACK,cr->activity.type==ACTIVITY_HOSTAGETENDING&&state==0); else set_color(COLOR_BLACK,COLOR_BLACK,1); move(17,1); addstr("I - Tend to a Conservative hostage"); if(clinictime(*cr)) { set_color(COLOR_WHITE,COLOR_BLACK,cr->activity.type==ACTIVITY_CLINIC&&state==0); move(18,1); addstr("M - Move to the Free CLINIC"); } else { set_color(COLOR_WHITE,COLOR_BLACK,state=='l'); move(18,1); addstr("L - Learn in the University District"); } if(havedead)set_color(COLOR_WHITE,COLOR_BLACK,cr->activity.type==ACTIVITY_BURY&&state==0); else set_color(COLOR_BLACK,COLOR_BLACK,1); move(19,1); addstr("Z - Dispose of bodies"); siegest *siege=NULL; if(selectedsiege!=-1)siege=&location[selectedsiege]->siege; if(activesquad!=NULL && activesquad->squad[0]->location!=-1)siege=&location[activesquad->squad[0]->location]->siege; char sieged=0; if(siege!=NULL)sieged=siege->siege; char underattack=0; if(siege!=NULL) { if(sieged)underattack=siege->underattack; } if (!sieged) { set_color(COLOR_WHITE,COLOR_BLACK,0); move(20,1); addstr("E - Equip this Liberal"); } if(state == 'a' || state == 'b' || state == 'c' ||state == 'd' ) { set_color(COLOR_WHITE,COLOR_BLACK,0); move(19,40); addstr("? - Help"); } set_color(COLOR_WHITE,COLOR_BLACK,0); move(20,40); addstr("Enter - Confirm Selection"); set_color(COLOR_WHITE,COLOR_BLACK,0); move(21,1); addstr("X - Nothing for Now"); switch(state) { case 'a': set_color(COLOR_WHITE,COLOR_BLACK,cr->activity.type==ACTIVITY_COMMUNITYSERVICE); move(10,40); addstr("1 - Community Service"); set_color(COLOR_WHITE,COLOR_BLACK,cr->activity.type==ACTIVITY_TROUBLE); move(11,40); addstr("2 - Liberal Disobedience"); set_color(COLOR_WHITE,COLOR_BLACK,cr->activity.type==ACTIVITY_GRAFFITI); move(12,40); addstr("3 - Graffiti"); set_color(COLOR_WHITE,COLOR_BLACK,cr->activity.type==ACTIVITY_POLLS); move(13,40); addstr("4 - Search Opinion Polls"); //set_color(COLOR_WHITE,COLOR_BLACK,cr->activity.type==ACTIVITY_DOS_ATTACKS); //move(14,40); //addstr("5 - Harass Websites"); set_color(COLOR_WHITE,COLOR_BLACK,cr->activity.type==ACTIVITY_HACKING); move(14,40); addstr("5 - Hacking"); set_color(COLOR_WHITE,COLOR_BLACK,cr->activity.type==ACTIVITY_WRITE_LETTERS); move(15,40); addstr("6 - Write to Newspapers"); if(cr->location!=-1&& location[cr->location]->compound_walls & COMPOUND_PRINTINGPRESS) { set_color(COLOR_WHITE,COLOR_BLACK,cr->activity.type==ACTIVITY_WRITE_GUARDIAN); move(16,40); addstr("7 - Write for The Liberal Guardian"); } break; case 'b': set_color(COLOR_WHITE,COLOR_BLACK,cr->activity.type==ACTIVITY_DONATIONS); move(10,40); addstr("1 - Solicit Donations"); set_color(COLOR_WHITE,COLOR_BLACK,cr->activity.type==ACTIVITY_SELL_TSHIRTS); move(11,40); if(cr->get_skill(SKILL_TAILORING)>=8) addstr("2 - Sell Liberal T-Shirts"); else if(cr->get_skill(SKILL_TAILORING)>=4) addstr("2 - Sell Embroidered Shirts"); else addstr("2 - Sell Tie-Dyed T-Shirts"); set_color(COLOR_WHITE,COLOR_BLACK,cr->activity.type==ACTIVITY_SELL_ART); move(12,40); if(cr->get_skill(SKILL_ART)>=8) addstr("3 - Sell Liberal Art"); else if(cr->get_skill(SKILL_ART)>=4) addstr("3 - Sell Paintings"); else addstr("3 - Sell Portrait Sketches"); set_color(COLOR_WHITE,COLOR_BLACK,cr->activity.type==ACTIVITY_SELL_MUSIC); move(13,40); if(cr->get_skill(SKILL_MUSIC)>8) addstr("4 - Play Liberal Music"); else addstr("4 - Play Street Music"); break; case 'c': set_color(COLOR_WHITE,COLOR_BLACK,cr->activity.type==ACTIVITY_SELL_DRUGS); move(10,40); addstr("1 - Sell Brownies"); set_color(COLOR_WHITE,COLOR_BLACK,cr->activity.type==ACTIVITY_PROSTITUTION); move(11,40); if(cr->age < 18) set_color(COLOR_BLACK, COLOR_BLACK, 1); //Grayed out for minors addstr("2 - Prostitution"); set_color(COLOR_WHITE,COLOR_BLACK,cr->activity.type==ACTIVITY_CCFRAUD); move(12,40); addstr("3 - Steal Credit Card Numbers"); /*set_color(COLOR_WHITE,COLOR_BLACK,cr->activity.type==ACTIVITY_DOS_RACKET); move(13,40); addstr("4 - Electronic Protection Racket");*/ break; case 'd': set_color(COLOR_WHITE,COLOR_BLACK,cr->activity.type==ACTIVITY_MAKE_ARMOR); move(10,40); addstr("1 - Make Clothing"); set_color(COLOR_WHITE,COLOR_BLACK,cr->activity.type==ACTIVITY_REPAIR_ARMOR); move(11,40); addstr("2 - Repair Clothing"); break; case 't': set_color(COLOR_WHITE,COLOR_BLACK,0); move(10,40); addstr("Teach Liberals About What?"); set_color(COLOR_WHITE,COLOR_BLACK,cr->activity.type==ACTIVITY_TEACH_POLITICS); move(12,40); addstr("1 - Political Activism"); set_color(COLOR_WHITE,COLOR_BLACK,cr->activity.type==ACTIVITY_TEACH_COVERT); move(13,40); addstr("2 - Infiltration"); set_color(COLOR_WHITE,COLOR_BLACK,cr->activity.type==ACTIVITY_TEACH_FIGHTING); move(14,40); addstr("3 - Urban Warfare"); break; case 'l': listclasses(cr); break; } set_color(COLOR_WHITE,COLOR_BLACK,0); switch(cr->activity.type) { case ACTIVITY_COMMUNITYSERVICE: move(22,3); addstr(cr->name); addstr(" will help the elderly, local library, anything"); move(23,1); addstr(" that is liberal."); break; case ACTIVITY_TROUBLE: move(22,3); addstr(cr->name); addstr(" will create public disturbances. "); break; case ACTIVITY_GRAFFITI: move(22,3); addstr(cr->name); addstr(" will spray political graffiti. Art and Heart will"); move(23,1); addstr(" enhance the liberal effect."); break; case ACTIVITY_POLLS: move(22,3); addstr(cr->name); addstr(" will search the internet for public opinion polls."); move(23,1); addstr(" Polls will give an idea on how the liberal agenda is going. Computers"); move(24,1); addstr(" and intelligence will provide better results."); break; case ACTIVITY_DOS_ATTACKS: move(22,3); addstr(cr->name); addstr(" will harass Conservative websites. Computer skill"); move(23,1); addstr(" will give greater effect."); break; case ACTIVITY_HACKING: move(22,3); addstr(cr->name); addstr(" will harass websites and hack private networks."); move(23,1); addstr(" Computer skill and intelligence will give more frequent results."); move(24,1); addstr(" Multiple hackers will increase chances of both success and detection."); break; case ACTIVITY_WRITE_LETTERS: move(22,3); addstr(cr->name); addstr(" will write letters to newspapers about current events."); break; case ACTIVITY_WRITE_GUARDIAN: move(22,3); addstr(cr->name); addstr(" will write articles for the LCS's newspaper."); break; case ACTIVITY_DONATIONS: move(22,3); addstr(cr->name); addstr(" will walk around and ask for donations to the LCS."); move(23,1); addstr(" Based on persuasion, public's view on the cause, and how well dressed the"); move(24,1); addstr(" activist is."); break; case ACTIVITY_SELL_TSHIRTS: move(22,3); addstr(cr->name); if(cr->get_skill(SKILL_TAILORING)>=8) addstr(" will print and distribute shirts with Liberal slogans."); else if(cr->get_skill(SKILL_TAILORING)>=4) addstr(" will embroider shirts and sell them on the street."); else addstr(" will tie-dye T-shirts and sell them on the street."); break; case ACTIVITY_SELL_ART: move(22,3); addstr(cr->name); if(cr->get_skill(SKILL_ART)>=8) addstr(" will create and sell paintings embracing the Liberal agenda."); else if(cr->get_skill(SKILL_ART)>=4) addstr(" will make pretty paintings and sell them on the streets."); else addstr(" will sketch people and sell portraits back to them."); break; case ACTIVITY_SELL_MUSIC: move(22,3); addstr(cr->name); addstr(" will go out into the streets and drum on buckets,"); move(23,1); addstr(" or play guitar if one is equipped."); break; case ACTIVITY_SELL_DRUGS: move(22,3); addstr(cr->name); addstr(" will bake and sell special adult brownies that open"); move(23,1); addstr(" magical shimmering doorways to the adamantium pits."); break; case ACTIVITY_PROSTITUTION: move(22,3); addstr(cr->name); addstr(" will trade sex for money."); break; case ACTIVITY_CCFRAUD: move(22,3); addstr(cr->name); addstr(" will commit credit card fraud online."); break; case ACTIVITY_DOS_RACKET: move(22,3); addstr(cr->name); addstr(" will demand money in exchange for not bringing down"); move(23,1); addstr("major websites."); break; case ACTIVITY_TEACH_POLITICS: move(22,1); addstr(" Skills Trained: Writing, Persuasion, Law, Street Sense, Science,"); move(23,1); addstr(" Religion, Business, Music, Art"); move(24,1); addstr(" Classes cost up to $20/day to conduct. All Liberals able will attend."); break; case ACTIVITY_TEACH_COVERT: move(22,1); addstr(" Skills Trained: Computers, Security, Stealth, Disguise, Tailoring,"); move(23,1); addstr(" Seduction, Psychology, Driving"); move(24,1); addstr(" Classes cost up to $60/day to conduct. All Liberals able will attend."); break; case ACTIVITY_TEACH_FIGHTING: move(22,1); addstr(" Skills Trained: All Weapon Skills, Martial Arts, Dodge, First Aid"); move(24,1); addstr(" Classes cost up to $100/day to conduct. All Liberals able will attend."); break; case ACTIVITY_STUDY_DEBATING: case ACTIVITY_STUDY_MARTIAL_ARTS: case ACTIVITY_STUDY_DRIVING: case ACTIVITY_STUDY_PSYCHOLOGY: case ACTIVITY_STUDY_FIRST_AID: case ACTIVITY_STUDY_LAW: case ACTIVITY_STUDY_DISGUISE: case ACTIVITY_STUDY_SCIENCE: case ACTIVITY_STUDY_BUSINESS: //case ACTIVITY_STUDY_COOKING: case ACTIVITY_STUDY_GYMNASTICS: case ACTIVITY_STUDY_WRITING: case ACTIVITY_STUDY_ART: case ACTIVITY_STUDY_MUSIC: case ACTIVITY_STUDY_TEACHING: case ACTIVITY_STUDY_LOCKSMITHING: move(22,3); addstr(cr->name); addstr(" will attend classes in the University District"); move(23,1); addstr(" at a cost of $60 a day."); break; } refresh(); int c=getch(); translategetch(c); if(c>='a'&&c<='z'){state=c;} if((c>='a'&&c<='z') || (c>='1'&&c<='9')) { choice=c; switch(state) { case 'a': switch(choice) { case '1':cr->activity.type=ACTIVITY_COMMUNITYSERVICE;break; case '2':cr->activity.type=ACTIVITY_TROUBLE;break; case '3':cr->activity.type=ACTIVITY_GRAFFITI; cr->activity.arg=-1; break; case '4':cr->activity.type=ACTIVITY_POLLS;break; //case '5':cr->activity.type=ACTIVITY_DOS_ATTACKS;break; case '5':cr->activity.type=ACTIVITY_HACKING;break; case '6':cr->activity.type=ACTIVITY_WRITE_LETTERS;break; case '7': if(cr->location!=-1&& location[cr->location]->compound_walls & COMPOUND_PRINTINGPRESS) { cr->activity.type=ACTIVITY_WRITE_GUARDIAN;break; } default: if(cr->get_attribute(ATTRIBUTE_WISDOM,true)>7) { cr->activity.type=ACTIVITY_COMMUNITYSERVICE; choice='1'; } else if(cr->get_attribute(ATTRIBUTE_WISDOM,true)>4) { cr->activity.type=ACTIVITY_TROUBLE; choice='2'; } else { if(cr->get_skill(SKILL_COMPUTERS)>2) { cr->activity.type=ACTIVITY_HACKING; choice='5'; } else if(cr->get_skill(SKILL_ART)>1) { cr->activity.type=ACTIVITY_GRAFFITI; cr->activity.arg=-1; choice='3'; } else { cr->activity.type=ACTIVITY_TROUBLE; choice='2'; } } } break; case 'b': switch(choice) { case '1':cr->activity.type=ACTIVITY_DONATIONS;break; case '2':cr->activity.type=ACTIVITY_SELL_TSHIRTS;break; case '3':cr->activity.type=ACTIVITY_SELL_ART;break; case '4':cr->activity.type=ACTIVITY_SELL_MUSIC;break; default: if(cr->get_skill(SKILL_ART)>1) { cr->activity.type=ACTIVITY_SELL_ART; choice='3'; } else if(cr->get_skill(SKILL_TAILORING)>1) { cr->activity.type=ACTIVITY_SELL_TSHIRTS; choice='2'; } else if(cr->get_skill(SKILL_MUSIC)>1) { cr->activity.type=ACTIVITY_SELL_MUSIC; choice='4'; } else { cr->activity.type=ACTIVITY_DONATIONS; choice='1'; } } break; case 'c': switch(choice) { case '1':cr->activity.type=ACTIVITY_SELL_DRUGS;break; case '2': if(cr->age >= 18) cr->activity.type=ACTIVITY_PROSTITUTION;break; case '3':cr->activity.type=ACTIVITY_CCFRAUD;break; //case '4':cr->activity.type=ACTIVITY_DOS_RACKET;break; default: if(cr->get_skill(SKILL_COMPUTERS)>1) { cr->activity.type=ACTIVITY_CCFRAUD; choice='3'; } else if(cr->get_skill(SKILL_SEDUCTION)>1 && cr->age >= 18) { cr->activity.type=ACTIVITY_PROSTITUTION; choice='2'; } else { cr->activity.type=ACTIVITY_SELL_DRUGS; choice='1'; } } break; case 'd': switch(choice) { case '1':break; case '2':cr->activity.type=ACTIVITY_REPAIR_ARMOR;choice='2';break; default:cr->activity.type=ACTIVITY_REPAIR_ARMOR;choice='2';break; } break; case 'l': updateclasschoice(cr, choice); break; case 't': switch(choice) { case '1':cr->activity.type=ACTIVITY_TEACH_POLITICS;break; case '2':cr->activity.type=ACTIVITY_TEACH_COVERT;break; case '3':cr->activity.type=ACTIVITY_TEACH_FIGHTING;break; default: switch(cr->type) { case CREATURE_MERC: case CREATURE_SWAT: case CREATURE_DEATHSQUAD: case CREATURE_GANGUNIT: case CREATURE_SOLDIER: case CREATURE_VETERAN: case CREATURE_HARDENED_VETERAN: case CREATURE_GANGMEMBER: case CREATURE_MUTANT: case CREATURE_CRACKHEAD: cr->activity.type=ACTIVITY_TEACH_FIGHTING; choice='2'; break; case CREATURE_AGENT: case CREATURE_AMATEURMAGICIAN: case CREATURE_THIEF: case CREATURE_PROSTITUTE: case CREATURE_PRISONER: cr->activity.type=ACTIVITY_TEACH_COVERT; choice='3'; break; default: cr->activity.type=ACTIVITY_TEACH_POLITICS; choice='1'; break; } break; } break; } } if(c=='h'&&cr->get_skill(SKILL_FIRSTAID)!=0) { cr->activity.type=ACTIVITY_HEAL; break; } if(state=='d'&&choice=='1') { activityst oact=cr->activity; cr->activity.type=ACTIVITY_NONE; select_makeclothing(cr); if(cr->activity.type==ACTIVITY_MAKE_ARMOR)break; else cr->activity=oact; } if(c=='i'&&hostagecount>0) { activityst oact=cr->activity; cr->activity.type=ACTIVITY_NONE; select_tendhostage(cr); if(cr->activity.type==ACTIVITY_HOSTAGETENDING)break; else cr->activity=oact; } if (!sieged && c == 'e') { //create a temp squad containing just this liberal int oldsquadid = cr->squadid; squadst *oldactivesquad = activesquad; activesquad=new squadst; strcpy(activesquad->name, "Temporary Squad"); activesquad->id=cursquadid; activesquad->squad[0]=cr; cr->squadid = activesquad->id; //go to equipment screen equip(location[activesquad->squad[0]->location]->loot,-1); //once you're done, restore original squad status. delete activesquad; activesquad = oldactivesquad; cr->squadid = oldsquadid; } if(c=='s') { if(cr->canwalk()) { cr->activity.type=ACTIVITY_STEALCARS; break; } else if(!(cr->flag & CREATUREFLAG_WHEELCHAIR)) { cr->activity.type=ACTIVITY_WHEELCHAIR; break; } } /*if(c=='w'&&location[cr->location]->compound_walls==COMPOUND_PRINTINGPRESS) { activityst oact=cr->activity; cr->activity.type=ACTIVITY_NONE; if(select_view(cr,cr->activity.arg)) cr->activity.type=ACTIVITY_WRITE_GUARDIAN; else cr->activity=oact; break; }*/ if(c=='m'&&clinictime(*cr)) { cr->activity.type=ACTIVITY_CLINIC; break; } if(c=='z'&&havedead) { cr->activity.type=ACTIVITY_BURY; break; } if(c=='x') { cr->activity.type=ACTIVITY_NONE; break; } // Enter pressed if(c==10||c==ESC) { break; } // ? Pressed if(c==63) { if(state == 'a' || state == 'b' || state == 'c' ||state == 'd' ) { // Call activity help pages HelpActivities(cr->activity.type); } } }while(1); }
/* daily - recruit - recruit meeting */ char completerecruitmeeting(recruitst &r,int p,char &clearformess) { clearformess=1; erase(); set_color(COLOR_WHITE,COLOR_BLACK,1); move(0,0); if(pool[p]->meetings++>5 && LCSrandom(pool[p]->meetings-5)) { addstr(pool[p]->name, gamelog); addstr(" accidentally missed the meeting with ", gamelog); addstr(r.recruit->name, gamelog); move(1,0); addstr("due to multiple booking of recruitment sessions.", gamelog); gamelog.newline(); move(3,0); addstr("Get it together, ", gamelog); addstr(pool[p]->name, gamelog); addstr("!", gamelog); gamelog.nextMessage(); getch(); return 1; } addstr("Meeting with ", gamelog); addstr(r.recruit->name, gamelog); addstr(", ", gamelog); char str[75]; getrecruitcreature(str,r.recruit->type); addstr(str, gamelog); addstr(", ", gamelog); addstr(location[r.recruit->location]->name, gamelog); gamelog.newline(); set_color(COLOR_WHITE,COLOR_BLACK,0); printfunds(0,1,"Money: "); printcreatureinfo(r.recruit); makedelimiter(8,0); move(10,0); addstr(r.recruit->name); switch(r.eagerness()) { case 1: addstr(" will take a lot of persuading."); break; case 2: addstr(" is interested in learning more."); break; case 3: addstr(" feels something needs to be done."); break; default: if(r.eagerness()>=4) addstr(" is ready to fight for the Liberal Cause."); else { addstr(" kind of regrets agreeing to this."); } break; } move(11,0); addstr("How should "); addstr(pool[p]->name); addstr(" approach the situation?"); move(13,0); if(ledger.get_funds()<50)set_color(COLOR_BLACK,COLOR_BLACK,1); addstr("A - Spend $50 on props and a book for them to keep afterward."); set_color(COLOR_WHITE,COLOR_BLACK,0); move(14,0); addstr("B - Just casually chat with them and discuss politics."); move(15,0); if(subordinatesleft(*pool[p]) && r.eagerness()>=4) { addstr("C - Offer to let "); addstr(r.recruit->name); addstr(" to join the LCS as a full member."); } else if(!subordinatesleft(*pool[p])) { set_color(COLOR_BLACK,COLOR_BLACK,1); addstr("C - "); addstr(pool[p]->name); addstr(" needs more Juice to recruit."); set_color(COLOR_WHITE,COLOR_BLACK,0); } else { set_color(COLOR_BLACK,COLOR_BLACK,1); addstr("C - "); addstr(r.recruit->name); addstr(" isn't ready to join the LCS."); set_color(COLOR_WHITE,COLOR_BLACK,0); } move(16,0); addstr("D - Break off the meetings."); int y=18; do { refresh(); int c=getch(); translategetch(c); if(c=='c' && subordinatesleft(*pool[p]) && r.eagerness()>=4) { move(y,0); addstr(pool[p]->name, gamelog); addstr(" offers to let ", gamelog); addstr(r.recruit->name, gamelog); addstr(" join the Liberal Crime Squad.", gamelog); gamelog.newline(); refresh(); getch(); set_color(COLOR_GREEN,COLOR_BLACK,1); move(y+=2,0); addstr(r.recruit->name, gamelog); addstr(" accepts, and is eager to get started.", gamelog); gamelog.nextMessage(); liberalize(*r.recruit,false); refresh(); getch(); erase(); sleeperize_prompt(*r.recruit,*pool[p],6); r.recruit->hireid=pool[p]->id; pool[p]->train(SKILL_PERSUASION,25); pool.push_back(r.recruit); r.recruit = NULL; stat_recruits++; return 1; } if(c=='b' || (c=='a' && ledger.get_funds()>=50)) { if(c=='a') { ledger.subtract_funds(50,EXPENSE_RECRUITMENT); } pool[p]->train(SKILL_PERSUASION, max(12-pool[p]->get_skill(SKILL_PERSUASION),5)); pool[p]->train(SKILL_SCIENCE, max(r.recruit->get_skill(SKILL_SCIENCE)-pool[p]->get_skill(SKILL_SCIENCE),0)); pool[p]->train(SKILL_RELIGION, max(r.recruit->get_skill(SKILL_RELIGION)-pool[p]->get_skill(SKILL_RELIGION),0)); pool[p]->train(SKILL_LAW, max(r.recruit->get_skill(SKILL_LAW)-pool[p]->get_skill(SKILL_LAW),0)); pool[p]->train(SKILL_BUSINESS, max(r.recruit->get_skill(SKILL_BUSINESS)-pool[p]->get_skill(SKILL_BUSINESS),0)); int lib_persuasiveness = pool[p]->get_skill(SKILL_BUSINESS)+ pool[p]->get_skill(SKILL_SCIENCE)+ pool[p]->get_skill(SKILL_RELIGION)+ pool[p]->get_skill(SKILL_LAW)+ pool[p]->get_attribute(ATTRIBUTE_INTELLIGENCE,true); int recruit_reluctance = 5 + r.recruit->get_skill(SKILL_BUSINESS)+ r.recruit->get_skill(SKILL_SCIENCE)+ r.recruit->get_skill(SKILL_RELIGION)+ r.recruit->get_skill(SKILL_LAW)+ r.recruit->get_attribute(ATTRIBUTE_WISDOM,true)+ r.recruit->get_attribute(ATTRIBUTE_INTELLIGENCE,true); if(lib_persuasiveness > recruit_reluctance) recruit_reluctance = 0; else recruit_reluctance -= lib_persuasiveness; int difficulty = recruit_reluctance; if(c=='a') { difficulty -= 5; move(y++,0); addstr(pool[p]->name, gamelog); addstr(" shares ", gamelog); strcpy(str,""); getissueeventstring(str); addstr(str), gamelog; addstr(".", gamelog); gamelog.newline(); refresh(); getch(); } else { move(y++,0); addstr(pool[p]->name, gamelog); addstr(" explains ", gamelog); if(pool[p]->gender_liberal==GENDER_MALE) addstr("his ", gamelog); else if(pool[p]->gender_liberal==GENDER_FEMALE) addstr("her ", gamelog); else addstr("their ", gamelog); addstr("views on ", gamelog); getviewsmall(str,LCSrandom(VIEWNUM-3)); addstr(str, gamelog); addstr(".", gamelog); gamelog.newline(); refresh(); getch(); } bool success=0; if(pool[p]->skill_check(SKILL_PERSUASION,difficulty)) { success=1; set_color(COLOR_CYAN,COLOR_BLACK,1); if(r.level<127) r.level++; if(r.eagerness1<127) r.eagerness1++; move(y++,0); addstr(r.recruit->name, gamelog); addstr(" found ", gamelog); addstr(pool[p]->name, gamelog); addstr("'s views to be insightful.", gamelog); gamelog.newline(); move(y++,0); addstr("They'll definitely meet again tomorrow.", gamelog); gamelog.nextMessage(); } else if(pool[p]->skill_check(SKILL_PERSUASION,difficulty)) // Second chance to not fail horribly { if(r.level<127) r.level++; if(r.eagerness1>-128) r.eagerness1--; move(y++,0); addstr(r.recruit->name, gamelog); addstr(" is skeptical about some of ", gamelog); addstr(pool[p]->name, gamelog); addstr("'s arguments.", gamelog); gamelog.newline(); move(y++,0); addstr("They'll meet again tomorrow.", gamelog); gamelog.nextMessage(); } else { set_color(COLOR_MAGENTA,COLOR_BLACK,1); move(y++,0); if(r.recruit->talkreceptive() && r.recruit->align==ALIGN_LIBERAL) { addstr(r.recruit->name, gamelog); addstr(" isn't convinced ", gamelog); addstr(pool[p]->name, gamelog); addstr(" really understands the problem.", gamelog); gamelog.newline(); move(y++,0); addstr("Maybe ", gamelog); addstr(pool[p]->name, gamelog); addstr(" needs more experience.", gamelog); gamelog.nextMessage(); } else { addstr(pool[p]->name, gamelog); addstr(" comes off as slightly insane.", gamelog); gamelog.newline(); move(y++,0); addstr("This whole thing was a mistake. There won't be another meeting.", gamelog); gamelog.nextMessage(); } refresh(); getch(); return 1; } refresh(); getch(); return 0; } if(c=='d') { return 1; } }while(1); }
/* party info at top of screen */ void printparty(void) { Creature *party[6]={NULL,NULL,NULL,NULL,NULL,NULL}; if(activesquad!=NULL) { for(int p=0;p<6;p++)party[p]=activesquad->squad[p]; } set_color(COLOR_WHITE,COLOR_BLACK,0); for(int i=2;i<8;i++) { move(i,0); addstr(" "); } if(party_status!=-1&&party[party_status]==NULL)party_status=-1; if(party_status!=-1) { printcreatureinfo(party[party_status]); char num[20]; set_color(COLOR_WHITE,COLOR_BLACK,1); itoa(party_status+1,num,10); move(1,0); addstr(num); } else { char str[200]; char num[20]; move(1,0); addstr("#-CODE NAME------------SKILL---WEAPON---------ARMOR----------HEALTH---TRANSPORT-"); for(int p=0;p<6;p++) { set_color(COLOR_WHITE,COLOR_BLACK,0); move(p+2,0); addstr(" "); move(p+2,0); addch('1'+p); if(party[p]!=NULL) { if(party[p]->prisoner!=NULL)set_color(COLOR_MAGENTA,COLOR_BLACK,1); else set_color(COLOR_WHITE,COLOR_BLACK,0); move(p+2,2); addstr(party[p]->name); if(party[p]->prisoner!=NULL)addstr("+H"); int skill=0; char bright=0; for(int sk=0;sk<SKILLNUM;sk++) { skill+=(int)party[p]->get_skill(sk); if(party[p]->get_skill_ip(sk)>=100+(10*party[p]->get_skill(sk))&& party[p]->get_skill(sk)<party[p]->skill_cap(sk,true))bright=1; } set_color(COLOR_WHITE,COLOR_BLACK,bright); move(p+2,23); itoa(skill,num,10); addstr(num); addstr("/"); int wsk = SKILL_HANDTOHAND; if(party[p]->get_weapon().has_musical_attack()) wsk=SKILL_MUSIC; else if (party[p]->has_thrown_weapon && !party[p]->extra_throwing_weapons.empty()) wsk=party[p]->extra_throwing_weapons[0]->get_attack(false,false,false)->skill; else wsk=party[p]->get_weapon().get_attack(false,false,false)->skill; itoa(party[p]->get_skill(wsk),num,10); addstr(num); move(p+2,31); if(mode!=GAMEMODE_SITE)set_color(COLOR_WHITE,COLOR_BLACK,0); else switch(weaponcheck(*party[p])) { case -1: case 0:set_color(COLOR_GREEN,COLOR_BLACK,1);break; case 1:set_color(COLOR_YELLOW,COLOR_BLACK,1);break; case 2:set_color(COLOR_RED,COLOR_BLACK,1);break; } if(party[p]->has_thrown_weapon && !party[p]->extra_throwing_weapons.empty()) addstr(party[p]->extra_throwing_weapons[0]->get_shortname(0).c_str()); else addstr(party[p]->get_weapon().get_shortname(0).c_str()); //set_color(COLOR_WHITE,COLOR_BLACK,0); if(party[p]->get_weapon().get_ammoamount()>0) { //set_color(COLOR_WHITE,COLOR_BLACK,0); char num[20]; itoa(party[p]->get_weapon().get_ammoamount(),num,10); addstr(" ("); addstr(num); addstr(")"); } else if(party[p]->get_weapon().uses_ammo()) { set_color(COLOR_BLACK,COLOR_BLACK,1); if(!party[p]->clips.empty()) { char num[20]; itoa(party[p]->count_clips(),num,10); addstr(" ("); addstr(num); addstr(")"); } else { addstr(" (XX)"); } } else if(party[p]->get_weapon().is_throwable() && !party[p]->has_thrown_weapon) { addstr(" (1)"); } else if(party[p]->has_thrown_weapon && !party[p]->extra_throwing_weapons.empty()) { set_color(COLOR_BLACK,COLOR_BLACK,1); int no_weapons = party[p]->count_weapons() - party[p]->is_armed(); char num[20]; itoa(no_weapons,num,10); addstr(" ("); addstr(num); addstr(")"); } if(mode!=GAMEMODE_SITE)set_color(COLOR_WHITE,COLOR_BLACK,0); else { switch(hasdisguise(*party[p])) { case 1:set_color(COLOR_GREEN,COLOR_BLACK,1);break; case 2:set_color(COLOR_YELLOW,COLOR_BLACK,1);break; default: if(party[p]->get_armor().get_stealth_value() > 1) set_color(COLOR_BLACK,COLOR_BLACK,1); else set_color(COLOR_RED,COLOR_BLACK,1); break; } if(sitealarmtimer>=0 || sitealarm==1) if(party[p]->get_armor().get_stealth_value() > 1) set_color(COLOR_BLACK,COLOR_BLACK,1); } move(p+2,46); addstr(party[p]->get_armor().get_shortname().c_str()); printhealthstat(*party[p],p+2,61,TRUE); set_color(COLOR_WHITE,COLOR_BLACK,0); move(p+2,70); long v=-1; if(showcarprefs==1)v=id_getcar(party[p]->pref_carid); else v=id_getcar(party[p]->carid); if(v!=-1&&showcarprefs!=-1) { strcpy(str,vehicle[v]->shortname().c_str()); char d; if(showcarprefs==1)d=party[p]->pref_is_driver; else d=party[p]->is_driver; if(d)strcat(str,"-D"); } else { int legok=2; if((party[p]->wound[BODYPART_LEG_RIGHT] & WOUND_NASTYOFF)|| (party[p]->wound[BODYPART_LEG_RIGHT] & WOUND_CLEANOFF))legok--; if((party[p]->wound[BODYPART_LEG_LEFT] & WOUND_NASTYOFF)|| (party[p]->wound[BODYPART_LEG_LEFT] & WOUND_CLEANOFF))legok--; if(party[p]->flag & CREATUREFLAG_WHEELCHAIR)strcpy(str,"Wheelchair"); else if(legok>=1)strcpy(str,"On Foot"); else strcpy(str,"On \"Foot\""); } addstr(str); } } } makedelimiter(8,0); }
void activate_sleeper(Creature *cr) { int state=0; int choice=0; char havedead=0; do { erase(); set_color(COLOR_WHITE,COLOR_BLACK,0); printfunds(0,1,"Money: "); move(0,0); addstr("Taking Undercover Action: What will "); addstr(cr->name); addstr(" focus on?"); printcreatureinfo(cr); makedelimiter(8,0); set_color(COLOR_WHITE,COLOR_BLACK,state=='a'); move(10,1); addstr("A - Communication and Advocacy"); set_color(COLOR_WHITE,COLOR_BLACK,state=='b'); move(11,1); addstr("B - Espionage"); set_color(COLOR_WHITE,COLOR_BLACK,state=='d'); move(12,1); addstr("C - Join the Active LCS"); set_color(COLOR_WHITE,COLOR_BLACK,0); move(20,40); addstr("Enter - Confirm Selection"); switch(state) { case 'a': set_color(COLOR_WHITE,COLOR_BLACK,cr->activity.type==ACTIVITY_NONE); move(10,40); addstr("1 - Lay Low"); set_color(COLOR_WHITE,COLOR_BLACK,cr->activity.type==ACTIVITY_SLEEPER_LIBERAL); move(11,40); addstr("2 - Advocate Liberalism"); move(12,40); if(subordinatesleft(*cr)) { set_color(COLOR_WHITE,COLOR_BLACK,cr->activity.type==ACTIVITY_SLEEPER_RECRUIT); addstr("3 - Expand Sleeper Network"); } else { set_color(COLOR_BLACK,COLOR_BLACK,1); if(cr->flag & CREATUREFLAG_BRAINWASHED) addstr("3 - [Enlightened Can't Recruit]"); else addstr("3 - [Need More Juice to Recruit]"); } break; case 'b': set_color(COLOR_WHITE,COLOR_BLACK,cr->activity.type==ACTIVITY_SLEEPER_SPY); move(10,40); addstr("1 - Uncover Secrets"); set_color(COLOR_WHITE,COLOR_BLACK,cr->activity.type==ACTIVITY_SLEEPER_EMBEZZLE); move(11,40); addstr("2 - Embezzle Funds"); set_color(COLOR_WHITE,COLOR_BLACK,cr->activity.type==ACTIVITY_SLEEPER_STEAL); move(12,40); addstr("3 - Steal Equipment"); break; } set_color(COLOR_WHITE,COLOR_BLACK,0); switch(cr->activity.type) { case ACTIVITY_NONE: move(22,3); addstr(cr->name); addstr(" will stay out of trouble."); break; case ACTIVITY_SLEEPER_LIBERAL: move(22,3); addstr(cr->name); addstr(" will build support for Liberal causes."); break; case ACTIVITY_SLEEPER_RECRUIT: if(subordinatesleft(*cr)) { move(22,3); addstr(cr->name); addstr(" will try to recruit additional sleeper agents."); } break; case ACTIVITY_SLEEPER_SPY: move(22,3); addstr(cr->name); addstr(" will snoop around for secrets and enemy plans."); break; case ACTIVITY_SLEEPER_EMBEZZLE: move(22,3); addstr(cr->name); addstr(" will embezzle money for the LCS."); break; case ACTIVITY_SLEEPER_STEAL: move(22,3); addstr(cr->name); addstr(" will steal equipment and send it to the Shelter."); break; } refresh(); int c=getch(); translategetch(c); if(c>='a'&&c<='z') { state=c; } if((c>='a'&&c<='z') || (c>='1'&&c<='9')) { choice=c; switch(state) { case 'a': switch(choice) { default: case '1': cr->activity.type=ACTIVITY_NONE; break; case '2': cr->activity.type=ACTIVITY_SLEEPER_LIBERAL; break; case '3': if(subordinatesleft(*cr)) cr->activity.type=ACTIVITY_SLEEPER_RECRUIT; break; } break; case 'b': switch(choice) { default: case '1': cr->activity.type=ACTIVITY_SLEEPER_SPY; break; case '2': cr->activity.type=ACTIVITY_SLEEPER_EMBEZZLE; break; case '3': cr->activity.type=ACTIVITY_SLEEPER_STEAL; break; } break; } } if(state=='c') { activityst oact=cr->activity; cr->activity.type=ACTIVITY_SLEEPER_JOINLCS; } if(c=='x') { cr->activity.type=ACTIVITY_NONE; break; } if(c==10) { break; } } while(1); }