/* base - activate the uninvolved */ void activate(void) { vector<Creature *> temppool = activatable_liberals(); if(temppool.size()==0)return; sortliberals(temppool,activesortingchoice[SORTINGCHOICE_ACTIVATE]); int page=0; char str[80]; char num[20]; do { erase(); set_color(COLOR_WHITE,COLOR_BLACK,0); printfunds(0,1,"Money: "); move(0,0); addstr("Activate Uninvolved Liberals"); move(1,0); addstr("----CODE NAME------------SKILL---HEALTH---LOCATION------------------------------"); move(1,57); addstr("ACTIVITY"); int y=2; for(int p=page*19;p<temppool.size()&&p<page*19+19;p++) { set_color(COLOR_WHITE,COLOR_BLACK,0); move(y,0); addch(y+'A'-2);addstr(" - "); addstr(temppool[p]->name); char bright=0; int skill=0; for(int sk=0;sk<SKILLNUM;sk++) { skill+=temppool[p]->get_skill(sk); if(temppool[p]->get_skill_ip(sk)>=100+(10*temppool[p]->get_skill(sk))&& temppool[p]->get_skill(sk)<temppool[p]->skill_cap(sk,true))bright=1; } set_color(COLOR_WHITE,COLOR_BLACK,bright); move(y,25); itoa(skill,num,10); addstr(num); printhealthstat(*temppool[p],y,33,TRUE); if(mode==REVIEWMODE_JUSTICE)set_color(COLOR_YELLOW,COLOR_BLACK,1); else set_color(COLOR_WHITE,COLOR_BLACK,0); move(y,42); addstr(location[temppool[p]->location]->getname(true)); move(y,57); // Let's add some color here... set_activity_color(temppool[p]->activity.type); getactivity(str,temppool[p]->activity); addstr(str); y++; } 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."); move(24,0); addstr("Press Z to assign simple tasks in bulk."); 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)*19<temppool.size())page++; if(c>='a'&&c<='s') { int p=page*19+(int)(c-'a'); if(p<temppool.size()) { activate(temppool[p]); } } if(c=='t') { sorting_prompt(SORTINGCHOICE_ACTIVATE); sortliberals(temppool,activesortingchoice[SORTINGCHOICE_ACTIVATE],true); } if(c=='z') { activatebulk(); } if(c==10||c==ESC)break; }while(1); }
void activatebulk(void) { vector<Creature *> temppool = activatable_liberals(); if(temppool.size()==0)return; int page=0; char str[80]; int selectedactivity=0; do { erase(); set_color(COLOR_WHITE,COLOR_BLACK,0); printfunds(0,1,"Money: "); set_color(COLOR_WHITE,COLOR_BLACK,0); move(0,0); addstr("Activate Uninvolved Liberals"); move(1,0); addstr("----CODE NAME------------CURRENT ACTIVITY---------------------------------------"); move(1,51); addstr("BULK ACTIVITY"); if(selectedactivity==0)set_color(COLOR_WHITE,COLOR_BLACK,1); else set_color(COLOR_WHITE,COLOR_BLACK,0); move(2,51); addstr("1 - Engaging in Liberal Activism"); if(selectedactivity==1)set_color(COLOR_WHITE,COLOR_BLACK,1); else set_color(COLOR_WHITE,COLOR_BLACK,0); move(3,51); addstr("2 - Legal Fundraising"); if(selectedactivity==2)set_color(COLOR_WHITE,COLOR_BLACK,1); else set_color(COLOR_WHITE,COLOR_BLACK,0); move(4,51); addstr("3 - Illegal Fundraising"); if(selectedactivity==3)set_color(COLOR_WHITE,COLOR_BLACK,1); else set_color(COLOR_WHITE,COLOR_BLACK,0); move(5,51); addstr("4 - Checking Polls"); if(selectedactivity==4)set_color(COLOR_WHITE,COLOR_BLACK,1); else set_color(COLOR_WHITE,COLOR_BLACK,0); move(6,51); addstr("5 - Stealing Cars"); if(selectedactivity==5)set_color(COLOR_WHITE,COLOR_BLACK,1); else set_color(COLOR_WHITE,COLOR_BLACK,0); move(7,51); addstr("6 - Community Service"); int y=2; for(int p=page*19;p<temppool.size()&&p<page*19+19;p++) { set_color(COLOR_WHITE,COLOR_BLACK,0); move(y,0); addch(y+'A'-2);addstr(" - "); addstr(temppool[p]->name); move(y,25); set_activity_color(temppool[p]->activity.type); getactivity(str,temppool[p]->activity); addstr(str); /*if(temppool[p]->activity.type==ACTIVITY_TROUBLE) { addstr(" ($"); itoa(temppool[p]->activity.arg,num,10); addstr(num); addstr(")"); }*/ y++; } set_color(COLOR_WHITE,COLOR_BLACK,0); move(22,0); addstr("Press a Letter to Assign an Activity. Press a Number to select an Activity."); move(23,0); addpagestr(); 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)*19<temppool.size())page++; if(c>='a'&&c<='s') { int p=page*19+(int)(c-'a'); if(p<temppool.size()) { switch(selectedactivity) { case 0: //Activism if(temppool[p]->get_attribute(ATTRIBUTE_WISDOM,true)>7) temppool[p]->activity.type=ACTIVITY_COMMUNITYSERVICE; else if(temppool[p]->get_attribute(ATTRIBUTE_WISDOM,true)>4) temppool[p]->activity.type=ACTIVITY_TROUBLE; else { if(temppool[p]->get_skill(SKILL_COMPUTERS)>2) temppool[p]->activity.type=ACTIVITY_HACKING; else if(temppool[p]->get_skill(SKILL_ART)>1) { temppool[p]->activity.type=ACTIVITY_GRAFFITI; temppool[p]->activity.arg=-1; } else temppool[p]->activity.type=ACTIVITY_TROUBLE; } break; case 1: //Fundraising if(temppool[p]->get_skill(SKILL_ART)>1) temppool[p]->activity.type=ACTIVITY_SELL_ART; else if(temppool[p]->get_skill(SKILL_MUSIC)>1) temppool[p]->activity.type=ACTIVITY_SELL_MUSIC; else if(temppool[p]->get_skill(SKILL_TAILORING)>1) temppool[p]->activity.type=ACTIVITY_SELL_TSHIRTS; else temppool[p]->activity.type=ACTIVITY_DONATIONS; break; case 2: //Illegal Fundraising if(temppool[p]->get_skill(SKILL_COMPUTERS)>1) temppool[p]->activity.type=ACTIVITY_CCFRAUD; #ifndef ZEROMORAL else if(temppool[p]->get_skill(SKILL_SEDUCTION)>1 && temppool[p]->age >=18) #else else if(temppool[p]->get_skill(SKILL_SEDUCTION)>1) #endif temppool[p]->activity.type=ACTIVITY_PROSTITUTION; else temppool[p]->activity.type=ACTIVITY_SELL_DRUGS; break; case 3: //Check polls temppool[p]->activity.type=ACTIVITY_POLLS; break; case 4: //Steal cars temppool[p]->activity.type=ACTIVITY_STEALCARS; break; case 5: //Volunteer temppool[p]->activity.type=ACTIVITY_COMMUNITYSERVICE; break; } } } if(c>='1'&&c<='6') { selectedactivity=c-'1'; } if(c==10||c==ESC)break; }while(1);
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); }
/* location and squad header */ void locheader(void) { char num[20]; if(activesquad!=NULL && activesquad->squad[0]->location!=-1) { if(location[activesquad->squad[0]->location]->siege.siege) { if(location[activesquad->squad[0]->location]->siege.underattack)set_color(COLOR_RED,COLOR_BLACK,1); else set_color(COLOR_YELLOW,COLOR_BLACK,1); } else set_color(COLOR_WHITE,COLOR_BLACK,0); } else if(selectedsiege!=-1) { if(location[selectedsiege]->siege.siege) { if(location[selectedsiege]->siege.underattack)set_color(COLOR_RED,COLOR_BLACK,1); else set_color(COLOR_YELLOW,COLOR_BLACK,1); } else set_color(COLOR_WHITE,COLOR_BLACK,0); } else set_color(COLOR_WHITE,COLOR_BLACK,0); move(0,0); if(activesquad!=NULL && activesquad->squad[0]->location!=-1) { addstr(location[activesquad->squad[0]->location]->getname()); addstr(", "); } else { if(selectedsiege==-1) { addstr("No Squad Selected"); addstr(", "); } else { addstr(location[selectedsiege]->getname()); addstr(", "); } } switch(month) { case 1:addstr("Jan");break; case 2:addstr("Feb");break; case 3:addstr("Mar");break; case 4:addstr("Apr");break; case 5:addstr("May");break; case 6:addstr("Jun");break; case 7:addstr("Jul");break; case 8:addstr("Aug");break; case 9:addstr("Sep");break; case 10:addstr("Oct");break; case 11:addstr("Nov");break; case 12:addstr("Dec");break; } addstr(". "); itoa(day,num,10); addstr(num); addstr(", "); itoa(year,num,10); addstr(num); if(activesquad==NULL && selectedsiege==-1) { set_color(COLOR_BLACK,COLOR_BLACK,1); move(3,6); addstr("To form a new squad:"); move(4,6); addstr("1) R - Review Assets and Form Squads"); move(5,6); addstr("2) Press Z to Assemble a New Squad"); set_color(COLOR_WHITE,COLOR_BLACK,0); } printfunds(0,1,"Money: "); if(activesquad!=NULL) { set_color(COLOR_WHITE,COLOR_BLACK,1); char str[80]; getactivity(str,activesquad->activity); if(activesquad->activity.type==ACTIVITY_NONE) { int count=0;char haveact=0; for(int p=0;p<6;p++) { if(activesquad->squad[p]==NULL)continue; count++; if(activesquad->squad[p]->activity.type!=ACTIVITY_NONE) { getactivity(str,activesquad->squad[p]->activity); haveact=1; } } if(haveact&&count>1)strcpy(str,"Acting Individually"); } move(0,41); addstr(str); } }
/* 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); }
/* 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); }
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); }