/********************************* ** ** SLEEPERS RECRUITING ** **********************************/ void sleeper_recruit(Creature &cr,char &clearformess,char canseethings,int (&libpower)[VIEWNUM]) { if(subordinatesleft(cr)) { prepareencounter(location[cr.worklocation]->type,0); for(int e=0;e<18;e++) { if(encounter[e].exists == false) break; if(encounter[e].worklocation == cr.worklocation || !LCSrandom(5)) { if(encounter[e].align!=1&&LCSrandom(5))continue; Creature* recruit = new Creature(encounter[e]); liberalize(*recruit,0); recruit->namecreature(); recruit->hireid = cr.id; if(recruit->infiltration > cr.infiltration) { recruit->infiltration = cr.infiltration; } recruit->flag |= CREATUREFLAG_SLEEPER; location[recruit->worklocation]->mapped=1; location[recruit->worklocation]->hidden=0; pool.push_back(recruit); erase(); move(6,1); addstr("Sleeper ", gamelog); addstr(cr.name, gamelog); addstr(" has recruited a new ", gamelog); addstr(recruit->get_type_name(), gamelog); addstr(".", gamelog); gamelog.newline(); move(8,1); addstr(recruit->name, gamelog); addstr(" looks forward serving the Liberal cause!", gamelog); gamelog.nextMessage(); getkey(); if(!subordinatesleft(cr))cr.activity.type = ACTIVITY_NONE; stat_recruits++; break; } } } return; }
/* full screen character sheet */ void printliberalstats(Creature &cr) { set_color(COLOR_WHITE,COLOR_BLACK,0); char num[20],str[200]; // Add name move(2,0); addstr("Name: "); set_color(COLOR_WHITE,COLOR_BLACK,1); addstr(cr.name); set_color(COLOR_WHITE,COLOR_BLACK,0); if(strcmp(cr.propername,cr.name)!=0) { //The names do not match, print real name as well addstr(" ("); addstr(cr.propername); addstr(")"); } addstr(", "); gettitle(str,cr); addstr(str); addstr(" ("); getrecruitcreature(str,cr.type); addstr(str); addstr(")"); move(3,0); // Add birthdate addstr("Born "); switch(cr.birthday_month) { case 1:addstr("January");break; case 2:addstr("February");break; case 3:addstr("March");break; case 4:addstr("April");break; case 5:addstr("May");break; case 6:addstr("June");break; case 7:addstr("July");break; case 8:addstr("August");break; case 9:addstr("September");break; case 10:addstr("October");break; case 11:addstr("November");break; case 12:addstr("December");break; } addstr(" "); itoa(cr.birthday_day,num,10); addstr(num); addstr(", "); if(cr.birthday_month < month || (cr.birthday_month == month && cr.birthday_day <= day)) { itoa(year-cr.age,num,10); } else { itoa(year-1-cr.age,num,10); } addstr(num); // Add age addstr(" (Age "); itoa(cr.age,num,10); addstr(num); addstr(", "); // Add Liberal gender if(cr.gender_liberal == GENDER_FEMALE) addstr("Female"); else if(cr.gender_liberal == GENDER_MALE) addstr("Male"); else addstr("Androgynous"); // Note if there's some conflict with Conservative society's perceptions //if(cr.gender_liberal != cr.gender_conservative) // addstr("*"); addstr(")"); move(3,46); statebrokenlaws(cr); set_color(COLOR_WHITE,COLOR_BLACK,0); // Add juice move(10,16); addstr("Juice: "); itoa(cr.juice,num,10); addstr(num); if(cr.juice<1000) { move(11,16);addstr("Next: "); if(cr.juice<0)addstr("0"); else if(cr.juice<10)addstr("10"); else if(cr.juice<50)addstr("50"); else if(cr.juice<100)addstr("100"); else if(cr.juice<200)addstr("200"); else if(cr.juice<500)addstr("500"); else addstr("1000"); } // Add attributes move(5,0);addstr("Heart: "); itoa(cr.get_attribute(ATTRIBUTE_HEART,true),num,10); addstr(num); move(6,0);addstr("Intelligence: "); itoa(cr.get_attribute(ATTRIBUTE_INTELLIGENCE,true),num,10); addstr(num); move(7,0);addstr("Wisdom: "); itoa(cr.get_attribute(ATTRIBUTE_WISDOM,true),num,10); addstr(num); move(8,0);addstr("Health: "); itoa(cr.get_attribute(ATTRIBUTE_HEALTH,true),num,10); addstr(num); move(9,0);addstr("Agility: "); itoa(cr.get_attribute(ATTRIBUTE_AGILITY,true),num,10); addstr(num); move(10,0);addstr("Strength: "); itoa(cr.get_attribute(ATTRIBUTE_STRENGTH,true),num,10); addstr(num); move(11,0);addstr("Charisma: "); itoa(cr.get_attribute(ATTRIBUTE_CHARISMA,true),num,10); addstr(num); // Add highest skills char used[SKILLNUM]; memset(used,0,sizeof(char)*SKILLNUM); int skills_max=16; char printed=1; move(5,28); addstr("SKILL"); move(5,43); addstr("NOW MAX"); for(int skills_shown=0;skills_shown<skills_max&&printed;skills_shown++) { printed=0; int max=0; long maxs=-1; for(int s=0;s<SKILLNUM;s++) { if((cr.get_skill(s)*10000+cr.get_skill_ip(s))>max && !used[s]) { max=(cr.get_skill(s)*10000+cr.get_skill_ip(s)); maxs=s; } } if(maxs!=-1) { used[maxs]=1; printed=1; // Maxed skills are green if(cr.skill_cap(maxs,true)!=0 && cr.get_skill(maxs)>=cr.skill_cap(maxs,true))set_color(COLOR_CYAN,COLOR_BLACK,1); // About to level up skills are white else if(cr.get_skill_ip(maxs)>=100+(10*cr.get_skill(maxs))&& cr.get_skill(maxs)<cr.skill_cap(maxs,true))set_color(COLOR_WHITE,COLOR_BLACK,1); // <1 skills are dark gray else if(cr.get_skill(maxs)<1)set_color(COLOR_BLACK,COLOR_BLACK,1); // >=1 skills are light gray else set_color(COLOR_WHITE,COLOR_BLACK,0); move(6+skills_shown,28); strcpy(str,Skill::get_name(maxs).c_str()); strcat(str,": "); addstr(str); move(6+skills_shown,42); sprintf(num,"%2d.",cr.get_skill(maxs)); addstr(num); if(cr.get_skill_ip(maxs)<100+(10*cr.get_skill(maxs))) { if ((cr.get_skill_ip(maxs)*100)/(100+(10*cr.get_skill(maxs)))!=0) { itoa((cr.get_skill_ip(maxs)*100)/(100+(10*cr.get_skill(maxs))),num,10); if ((cr.get_skill_ip(maxs)*100)/(100+(10*cr.get_skill(maxs)))<10) { addstr("0"); } addstr(num); } else addstr("00"); } else { addstr("99+"); } if(cr.skill_cap(maxs,true)==0 || cr.get_skill(maxs)<cr.skill_cap(maxs,true)) set_color(COLOR_BLACK,COLOR_BLACK,1); move(6+skills_shown,48); sprintf(str,"%2d.00",cr.skill_cap(maxs,true)); addstr(str); } } set_color(COLOR_WHITE,COLOR_BLACK,0); // Add weapon move(13,0); addstr("Weapon: "); addstr(cr.get_weapon_string(0).c_str()); // Add clothing move(14,0); addstr("Clothes: "); addstr(cr.get_armor_string(true).c_str()); // Add vehicle move(15,0); addstr("Car: "); long v=-1; if(showcarprefs==1)v=id_getcar(cr.pref_carid); else v=id_getcar(cr.carid); if(v!=-1&&showcarprefs!=-1) { strcpy(str,vehicle[v]->shortname().c_str()); char d; if(showcarprefs==1)d=cr.pref_is_driver; else d=cr.is_driver; if(d)strcat(str,"-D"); } else { int legok=2; if((cr.wound[BODYPART_LEG_RIGHT] & WOUND_NASTYOFF)|| (cr.wound[BODYPART_LEG_RIGHT] & WOUND_CLEANOFF))legok--; if((cr.wound[BODYPART_LEG_LEFT] & WOUND_NASTYOFF)|| (cr.wound[BODYPART_LEG_LEFT] & WOUND_CLEANOFF))legok--; if(cr.flag & CREATUREFLAG_WHEELCHAIR)strcpy(str,"Wheelchair"); else if(legok>=1)strcpy(str,"On Foot"); else strcpy(str,"On \"Foot\""); } addstr(str); // Add recruit stats if(cr.flag!=CREATUREFLAG_BRAINWASHED) { move(18,0); itoa(maxsubordinates(cr)-subordinatesleft(cr),num,10); addstr(num); addstr(" Recruits / "); itoa(maxsubordinates(cr),num,10); addstr(num); addstr(" Max"); } else { move(18,0); addstr("Enlightened "); addstr("Can't Recruit"); } // Any meetings with potential recruits scheduled? int recruiting = scheduledmeetings(cr); if(recruiting) { move(18,55); itoa(recruiting,num,10); addstr("Scheduled Meetings: "); addstr(num); } // Add seduction stats move(19,0); int lovers = loveslaves(cr); if(cr.flag & CREATUREFLAG_LOVESLAVE) lovers++; if(lovers) { itoa(lovers,num,10); addstr(num); addstr(" Romantic Interest"); if(lovers>1)addstr("s"); } // Any dates with potential love interests scheduled? int wooing = scheduleddates(cr); if(wooing) { move(19,55); itoa(wooing,num,10); addstr("Scheduled Dates: "); addstr(num); } // Add wound status for(int w=0;w<BODYPARTNUM;w++) { if(cr.wound[w] & WOUND_BLEEDING)set_color(COLOR_RED,COLOR_BLACK,1); else set_color(COLOR_WHITE,COLOR_BLACK,0); move(5+w,55); switch(w) { case BODYPART_HEAD:addstr("Head:");break; case BODYPART_BODY:addstr("Body:");break; case BODYPART_ARM_RIGHT:addstr("Right Arm:");break; case BODYPART_ARM_LEFT:addstr("Left Arm:");break; case BODYPART_LEG_RIGHT:addstr("Right Leg:");break; case BODYPART_LEG_LEFT:addstr("Left Leg:");break; } move(5+w,66); if(cr.wound[w] & WOUND_NASTYOFF)addstr("Ripped off"); else if(cr.wound[w] & WOUND_CLEANOFF)addstr("Severed"); else { int sum=0; if(cr.wound[w] & WOUND_SHOT)sum++; if(cr.wound[w] & WOUND_CUT)sum++; if(cr.wound[w] & WOUND_BRUISED)sum++; if(cr.wound[w] & WOUND_BURNED)sum++; if(cr.wound[w] & WOUND_TORN)sum++; if(sum==0) { set_color(COLOR_GREEN,COLOR_BLACK,1); if(cr.animalgloss==ANIMALGLOSS_ANIMAL) addstr("Animal"); else addstr("Liberal"); } if(cr.wound[w] & WOUND_SHOT){addstr("Shot");sum--;if(sum>0)addstr(",");} if(cr.wound[w] & WOUND_BRUISED){addstr("Bruised");sum--;if(sum>0)addstr(",");} if(cr.wound[w] & WOUND_CUT){addstr("Cut");sum--;if(sum>0)addstr(",");} if(cr.wound[w] & WOUND_TORN){addstr("Torn");sum--;if(sum>0)addstr(",");} if(cr.wound[w] & WOUND_BURNED){addstr("Burned");sum--;if(sum>0)addstr(",");} } } set_color(COLOR_WHITE,COLOR_BLACK,0); //SPECIAL WOUNDS set_color(COLOR_RED,COLOR_BLACK,0); int y=12; int x=55; if(cr.special[SPECIALWOUND_HEART]!=1) { move(y++,x); addstr("Heart Punctured"); } if(cr.special[SPECIALWOUND_RIGHTLUNG]!=1) { move(y++,x); addstr("R. Lung Collapsed"); } if(cr.special[SPECIALWOUND_LEFTLUNG]!=1) { move(y++,x); addstr("L. Lung Collapsed"); } if(cr.special[SPECIALWOUND_NECK]!=1) { move(y++,x); addstr("Broken Neck"); } if(cr.special[SPECIALWOUND_UPPERSPINE]!=1) { move(y++,x); addstr("Broken Up Spine"); } if(cr.special[SPECIALWOUND_LOWERSPINE]!=1) { move(y++,x); addstr("Broken Lw Spine"); } if(cr.special[SPECIALWOUND_RIGHTEYE]!=1) { move(y++,x); addstr("No Right Eye"); } if(cr.special[SPECIALWOUND_LEFTEYE]!=1) { move(y++,x); addstr("No Left Eye"); } if(cr.special[SPECIALWOUND_NOSE]!=1) { move(y++,x); addstr("No Nose"); } if(cr.special[SPECIALWOUND_TONGUE]!=1) { move(y++,x); addstr("No Tongue"); } if(cr.special[SPECIALWOUND_TEETH]!=TOOTHNUM) { move(y++,x); if(cr.special[SPECIALWOUND_TEETH]==0)addstr("No Teeth"); else if(cr.special[SPECIALWOUND_TEETH]==TOOTHNUM-1)addstr("Missing a Tooth"); else if(cr.special[SPECIALWOUND_TEETH]<TOOTHNUM)addstr("Missing Teeth"); } if(cr.special[SPECIALWOUND_LIVER]!=1) { move(y++,x); addstr("Liver Damaged"); } if(cr.special[SPECIALWOUND_RIGHTKIDNEY]!=1) { move(y++,x); addstr("R. Kidney Damaged"); } if(cr.special[SPECIALWOUND_LEFTKIDNEY]!=1) { move(y++,x); addstr("L. Kidney Damaged"); } if(cr.special[SPECIALWOUND_STOMACH]!=1) { move(y++,x); addstr("Stomach Injured"); } if(cr.special[SPECIALWOUND_SPLEEN]!=1) { move(y++,x); addstr("Busted Spleen"); } if(cr.special[SPECIALWOUND_RIBS]!=RIBNUM) { move(y++,x); if(cr.special[SPECIALWOUND_RIBS]==0)addstr("All Ribs Broken"); else if(cr.special[SPECIALWOUND_RIBS]==RIBNUM-1)addstr("Broken Rib"); else if(cr.special[SPECIALWOUND_RIBS]<RIBNUM)addstr("Broken Ribs"); } set_color(COLOR_WHITE,COLOR_BLACK,0); }
/* 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); }
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); }