/* Full screen character sheet, crime sheet */ void printliberalcrimes(Creature &cr) { set_color(COLOR_WHITE,COLOR_BLACK,0); char str[200]; char num[5]; // Add name move(2,0); if(strcmp(cr.propername,cr.name)!=0) { addstr("Code name: "); } else { addstr("Name: "); } set_color(COLOR_WHITE,COLOR_BLACK,1); addstr(cr.name); set_color(COLOR_WHITE,COLOR_BLACK,0); addstr(", "); gettitle(str,cr); addstr(str); addstr(" ("); getrecruitcreature(str,cr.type); addstr(str); addstr(")"); // Add all crimes for(int i = 0;i < LAWFLAGNUM; i++) { if(i%2==0 && i<4) { set_color(COLOR_WHITE,COLOR_BLACK,0); move(4,40*(i/2)); addstr("CRIME"); move(4,30+40*(i/2)); addstr("NUM"); } // Commited crimes are yellow if(cr.crimes_suspected[i] > 0) { set_color(COLOR_YELLOW,COLOR_BLACK,1); } else { set_color(COLOR_BLACK,COLOR_BLACK,1); } move(5+i/2,40*(i%2)); getlawflag(str,i); strcat(str,": "); addstr(str); move(5+i/2,30+40*(i%2)); sprintf(num,"%2d",cr.crimes_suspected[i]); addstr(num); } set_color(COLOR_WHITE,COLOR_BLACK,0); }
/* Full screen character sheet, skills only edition */ void printliberalskills(Creature &cr) { set_color(COLOR_WHITE,COLOR_BLACK,0); char str[200]; char num[5]; // Add name move(2,0); if(strcmp(cr.propername,cr.name)!=0) { addstr("Code name: "); } else { addstr("Name: "); } set_color(COLOR_WHITE,COLOR_BLACK,1); addstr(cr.name); set_color(COLOR_WHITE,COLOR_BLACK,0); addstr(", "); gettitle(str,cr); addstr(str); addstr(" ("); getrecruitcreature(str,cr.type); addstr(str); addstr(")"); // Add all skills for(int s=0;s<SKILLNUM;s++) { if(s%3==0 && s<9) { set_color(COLOR_WHITE,COLOR_BLACK,0); move(4,27*(s/3)); addstr("SKILL"); move(4,15+27*(s/3)); addstr("NOW MAX"); } // Maxed skills are green if(cr.skill_cap(s,true)!=0 && cr.get_skill(s)>=cr.skill_cap(s,true))set_color(COLOR_CYAN,COLOR_BLACK,1); // About to level up skills are white else if(cr.get_skill_ip(s)>=100+(10*cr.get_skill(s))&& cr.get_skill(s)<cr.skill_cap(s,true))set_color(COLOR_WHITE,COLOR_BLACK,1); // <1 skills are dark gray else if(cr.get_skill(s)<1)set_color(COLOR_BLACK,COLOR_BLACK,1); // >=1 skills are light gray else set_color(COLOR_WHITE,COLOR_BLACK,0); move(5+s/3,27*(s%3)); strcpy(str,Skill::get_name(s).c_str()); strcat(str,": "); addstr(str); move(5+s/3,14+27*(s%3)); sprintf(num,"%2d.",cr.get_skill(s)); addstr(num); if(cr.get_skill_ip(s)<100+(10*cr.get_skill(s))) { if ((cr.get_skill_ip(s)*100)/(100+(10*cr.get_skill(s)))!=0) { itoa((cr.get_skill_ip(s)*100)/(100+(10*cr.get_skill(s))),num,10); if ((cr.get_skill_ip(s)*100)/(100+(10*cr.get_skill(s)))<10) { addstr("0"); } addstr(num); } else addstr("00"); } else { addstr("99+"); } if(cr.skill_cap(s,true)==0 || cr.get_skill(s)<cr.skill_cap(s,true)) set_color(COLOR_BLACK,COLOR_BLACK,1); move(5+s/3,20+27*(s%3)); sprintf(str,"%2d.00",cr.skill_cap(s,true)); addstr(str); } 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); }
/* 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); }
/* base - activate sleepers */ void activate_sleepers(void) { vector<Creature *> temppool; // Comb the pool of Liberals for sleeper agents for(int p=0; p<pool.size(); p++) { // Select only sleepers that can work if(pool[p]->alive==true&& pool[p]->flag & CREATUREFLAG_SLEEPER&& pool[p]->align==ALIGN_LIBERAL&& pool[p]->hiding==false&& pool[p]->clinic==false&& pool[p]->dating==false) { temppool.push_back(pool[p]); } } if(temppool.size()==0)return; sortliberals(temppool,activesortingchoice[SORTINGCHOICE_ACTIVATESLEEPERS]); int page=0; char str[80]; do { erase(); set_color(COLOR_WHITE,COLOR_BLACK,0); printfunds(0,1,"Money: "); move(0,0); addstr("Activate Sleeper Agents"); makedelimiter(1,0); move(1,4); addstr("CODE NAME"); move(1,25); addstr("JOB"); move(1,42); addstr("SITE"); move(1,57); addstr("ACTIVITY"); int y=2; for(int p=page*9; p<temppool.size()&&p<page*9+9; p++) { set_color(COLOR_WHITE,COLOR_BLACK,0); move(y,0); addch((y-2)/2+'A'); addstr(" - "); addstr(temppool[p]->name); move(y,25); getrecruitcreature(str,temppool[p]->type); addstr(str); move(y+1,6); addstr("Effectiveness: "); if(temppool[p]->infiltration > 0.8f) { set_color(COLOR_RED,COLOR_BLACK,1); } else if(temppool[p]->infiltration > 0.6f) { set_color(COLOR_MAGENTA,COLOR_BLACK,1); } else if(temppool[p]->infiltration > 0.4f) { set_color(COLOR_YELLOW,COLOR_BLACK,1); } else if(temppool[p]->infiltration > 0.2f) { set_color(COLOR_WHITE,COLOR_BLACK,1); } else if(temppool[p]->infiltration > 0.1f) { set_color(COLOR_WHITE,COLOR_BLACK,0); } else { set_color(COLOR_GREEN,COLOR_BLACK,0); } char num[10]; itoa(static_cast<int>(temppool[p]->infiltration*100),num,10); addstr(num); addstr("%"); move(y,42); set_color(COLOR_WHITE,COLOR_BLACK,0); addshortname(location[temppool[p]->worklocation]); move(y,57); // Let's add some color here... set_activity_color(temppool[p]->activity.type); getactivity(str,temppool[p]->activity); addstr(str); y+=2; } set_color(COLOR_WHITE,COLOR_BLACK,0); move(22,0); addstr("Press a Letter to Assign an Activity."); move(23,0); addpagestr(); addstr(" T to sort people."); set_color(COLOR_WHITE,COLOR_BLACK,0); refresh(); int c=getch(); translategetch(c); //PAGE UP if((c==interface_pgup||c==KEY_UP||c==KEY_LEFT)&&page>0)page--; //PAGE DOWN if((c==interface_pgdn||c==KEY_DOWN||c==KEY_RIGHT)&&(page+1)*9<temppool.size())page++; if(c>='a'&&c<='s') { int p=page*9+(int)(c-'a'); if(p<temppool.size()) { activate_sleeper(temppool[p]); } } if(c=='t') { sorting_prompt(SORTINGCHOICE_ACTIVATESLEEPERS); sortliberals(temppool,activesortingchoice[SORTINGCHOICE_ACTIVATESLEEPERS],true); } if(c==10)break; } while(1); }