3 Copyright (c) 2002,2003,2004 by Tarn Adams //
5 This file is part of Liberal Crime Squad. //
7 Liberal Crime Squad is free software; you can redistribute it and/or modify //
8 it under the terms of the GNU General Public License as published by //
9 the Free Software Foundation; either version 2 of the License, or //
10 (at your option) any later version. //
12 Liberal Crime Squad is distributed in the hope that it will be useful, //
13 but WITHOUT ANY WARRANTY; without even the implied warranty of //
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
15 GNU General Public License for more details. //
17 You should have received a copy of the GNU General Public License //
18 along with Liberal Crime Squad; if not, write to the Free Software //
19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
23 This file was created by Chris Johnson (grundee@users.sourceforge.net)
24 by copying code from game.cpp.
25 To see descriptions of files and functions, see the list at
26 the bottom of includes.h in the top src folder.
29 //TODO: Add logging for this file? --Addictgamer
33 /* news - major newspaper reporting on lcs and other topics */
34 void majornewspaper(char &clearformess,char canseethings)
40 generate_random_event_news_stories();
42 clean_up_empty_news_stories();
44 if(canseethings) run_television_news_stories();
46 assign_page_numbers_to_newspaper_stories();
47 if(canseethings) display_newspaper();
50 for(n=0;n<len(newsstory);n++)
51 handle_public_opinion_impact(*newsstory[n]);
52 delete_and_clear(newsstory);
55 void display_newspaper()
57 int writers = liberal_guardian_writing_power();
59 for(int n=0;n<len(newsstory);n++)
61 bool liberalguardian=0;
63 if(writers&&newsstory[n]->type!=NEWSSTORY_MAJOREVENT)
66 switch(newsstory[n]->type)
68 case NEWSSTORY_SQUAD_SITE:
69 case NEWSSTORY_SQUAD_KILLED_SITE:
70 switch(location[newsstory[n]->loc]->type)
72 case SITE_LABORATORY_COSMETICS:
73 header=VIEW_ANIMALRESEARCH;
75 case SITE_LABORATORY_GENETIC:
78 case SITE_GOVERNMENT_POLICESTATION:
79 header=VIEW_POLICEBEHAVIOR;
81 case SITE_GOVERNMENT_COURTHOUSE:
84 case SITE_GOVERNMENT_PRISON:
85 header=VIEW_DEATHPENALTY;
87 case SITE_GOVERNMENT_INTELLIGENCEHQ:
88 header=VIEW_INTELLIGENCE;
90 case SITE_INDUSTRY_SWEATSHOP:
91 header=VIEW_SWEATSHOPS;
93 case SITE_INDUSTRY_POLLUTER:
94 header=VIEW_POLLUTION;
96 case SITE_INDUSTRY_NUCLEAR:
97 header=VIEW_NUCLEARPOWER;
99 case SITE_CORPORATE_HEADQUARTERS:
100 header=VIEW_CORPORATECULTURE;
102 case SITE_CORPORATE_HOUSE:
103 header=VIEW_CEOSALARY;
105 case SITE_MEDIA_AMRADIO:
108 case SITE_MEDIA_CABLENEWS:
109 header=VIEW_CABLENEWS;
111 case SITE_RESIDENTIAL_APARTMENT_UPSCALE:
112 case SITE_BUSINESS_CIGARBAR:
113 case SITE_BUSINESS_BANK:
118 case NEWSSTORY_SQUAD_ESCAPED:
119 case NEWSSTORY_SQUAD_FLEDATTACK:
120 case NEWSSTORY_SQUAD_DEFENDED:
121 case NEWSSTORY_SQUAD_BROKESIEGE:
122 case NEWSSTORY_SQUAD_KILLED_SIEGEATTACK:
123 case NEWSSTORY_SQUAD_KILLED_SIEGEESCAPE:
125 case NEWSSTORY_CCS_NOBACKERS:
126 case NEWSSTORY_CCS_DEFEATED:
131 if(newsstory[n]->type==NEWSSTORY_CCS_SITE||
132 newsstory[n]->type==NEWSSTORY_CCS_KILLED_SITE)
134 newsstory[n]->positive=0;
136 displaystory(*newsstory[n],liberalguardian,header);
137 if(newsstory[n]->positive)newsstory[n]->positive+=1;
139 else displaystory(*newsstory[n],0,-1);
143 void generate_random_event_news_stories()
145 //Conservative Crime Squad Strikes!
146 if(endgamestate < ENDGAME_CCS_DEFEATED &&
147 LCSrandom(30) < endgamestate)
149 newsstory.push_back(ccs_strikes_story());
152 // The slow defeat of the conservative crime squad...
153 if(endgamestate < ENDGAME_CCS_DEFEATED &&
154 ccsexposure >= CCSEXPOSURE_EXPOSED &&
157 advance_ccs_defeat_storyline();
160 // Random major event news stories
162 newsstory.push_back(new_major_event());
166 void advance_ccs_defeat_storyline()
171 case CCSEXPOSURE_NONE:
172 case CCSEXPOSURE_LCSGOTDATA:
174 case CCSEXPOSURE_EXPOSED:
175 newsstory.push_back(ccs_exposure_story());
177 case CCSEXPOSURE_NOBACKERS:
178 newsstory.push_back(ccs_fbi_raid_story());
183 void clean_up_empty_news_stories()
185 // Delete stories that have no content or shouldn't be reported on
186 for(int n=len(newsstory)-1;n>=0;n--)
188 // Squad site action stories without crimes
189 if(newsstory[n]->type==NEWSSTORY_SQUAD_SITE&&
190 !len(newsstory[n]->crime))
192 delete_and_remove(newsstory,n);
196 // Police killed stories without police being killed
197 if(newsstory[n]->type==NEWSSTORY_CARTHEFT ||
198 newsstory[n]->type==NEWSSTORY_NUDITYARREST ||
199 newsstory[n]->type==NEWSSTORY_WANTEDARREST ||
200 newsstory[n]->type==NEWSSTORY_DRUGARREST ||
201 newsstory[n]->type==NEWSSTORY_GRAFFITIARREST ||
202 newsstory[n]->type==NEWSSTORY_BURIALARREST)
205 for(int c=0;c<len(newsstory[n]->crime);c++)
207 if(newsstory[n]->crime[c]==CRIME_KILLEDSOMEBODY)
215 delete_and_remove(newsstory,n);
220 // Sieges that aren't police actions
221 if((newsstory[n]->type==NEWSSTORY_SQUAD_ESCAPED||
222 newsstory[n]->type==NEWSSTORY_SQUAD_FLEDATTACK||
223 newsstory[n]->type==NEWSSTORY_SQUAD_DEFENDED||
224 newsstory[n]->type==NEWSSTORY_SQUAD_BROKESIEGE||
225 newsstory[n]->type==NEWSSTORY_SQUAD_KILLED_SIEGEATTACK||
226 newsstory[n]->type==NEWSSTORY_SQUAD_KILLED_SIEGEESCAPE)&&
227 newsstory[n]->siegetype!=SIEGE_POLICE)
229 delete_and_remove(newsstory,n);
235 void assign_page_numbers_to_newspaper_stories()
237 for(int n=len(newsstory)-1;n>=0;n--)
239 setpriority(*newsstory[n]);
240 // Suppress squad actions that aren't worth a story
241 if(newsstory[n]->type==NEWSSTORY_SQUAD_SITE &&
242 ((newsstory[n]->priority<50 &&
243 newsstory[n]->claimed==0)||
244 newsstory[n]->priority<4))
246 delete_and_remove(newsstory,n);
249 newsstory[n]->page=-1;
252 int curpage=1,curguardianpage=1;
256 // Sort the major newspapers
258 for(int n=0;n<len(newsstory);n++)
260 if(newsstory[n]->priority>maxp&&
261 newsstory[n]->page==-1)
264 maxp=newsstory[n]->priority;
269 if(newsstory[maxn]->priority<30&&curpage==1) curpage=2;
270 if(newsstory[maxn]->priority<25&&curpage<3) curpage=3+LCSrandom(2);
271 if(newsstory[maxn]->priority<20&&curpage<5) curpage=5+LCSrandom(5);
272 if(newsstory[maxn]->priority<15&&curpage<10) curpage=10+LCSrandom(10);
273 if(newsstory[maxn]->priority<10&&curpage<20) curpage=20+LCSrandom(10);
274 if(newsstory[maxn]->priority<5&&curpage<30) curpage=30+LCSrandom(20);
276 newsstory[maxn]->page=curpage;
277 newsstory[maxn]->guardianpage=curguardianpage;
285 void handle_public_opinion_impact(const newsstoryst &ns)
287 // Check if this function is meant to handle public opinion impact
288 // for this type of news story (primarily deals with squad/site actions)
289 int okay_types[] = { NEWSSTORY_SQUAD_SITE, NEWSSTORY_SQUAD_ESCAPED, NEWSSTORY_SQUAD_FLEDATTACK,
290 NEWSSTORY_SQUAD_DEFENDED, NEWSSTORY_SQUAD_BROKESIEGE, NEWSSTORY_SQUAD_KILLED_SIEGEATTACK,
291 NEWSSTORY_SQUAD_KILLED_SIEGEESCAPE, NEWSSTORY_SQUAD_KILLED_SITE, NEWSSTORY_WANTEDARREST,
292 NEWSSTORY_GRAFFITIARREST, NEWSSTORY_CCS_SITE, NEWSSTORY_CCS_KILLED_SITE };
293 int okay_type_num = len(okay_types);
296 for(i=0; i < okay_type_num; i++)
298 if(okay_types[i] == ns.type)
301 if(i == okay_type_num) return; // No impact for this news story type
303 int impact = ns.priority;
305 // Magnitude of impact will be affected by which page of the newspaper the story appears on
306 if(ns.page==1) impact*=5;
307 else if(ns.page==2) impact*=3;
308 else if(ns.page==3) impact*=2;
311 if(ns.page==1) maxpower=100;
312 else if(ns.page<5) maxpower=100-10*ns.page;
313 else if(ns.page<10) maxpower=40;
314 else if(ns.page<20) maxpower=20;
315 else if(ns.page<30) maxpower=10;
316 else if(ns.page<40) maxpower=5;
319 // Five times effectiveness with the Liberal Guardian
329 // Account for squad responsible, rampages, and Liberal Guardian bias
330 int impact_direction = ALIGN_LIBERAL;
331 if(ns.type==NEWSSTORY_CCS_SITE || ns.type==NEWSSTORY_CCS_KILLED_SITE)
333 impact_direction = ALIGN_CONSERVATIVE;
335 change_public_opinion(VIEW_CONSERVATIVECRIMESQUAD,impact,0);
337 change_public_opinion(VIEW_CONSERVATIVECRIMESQUAD,-impact,0);
341 change_public_opinion(VIEW_LIBERALCRIMESQUAD,2+impact);
342 impact_direction = ALIGN_LIBERAL;
344 change_public_opinion(VIEW_LIBERALCRIMESQUADPOS,impact);
346 change_public_opinion(VIEW_LIBERALCRIMESQUADPOS,-impact);
348 impact *= impact_direction;
349 int squad_responsible = impact_direction;
350 if(!ns.positive) impact /= 4;
352 // Impact gun control issue
353 change_public_opinion(VIEW_GUNCONTROL, ABS(impact)/10, 0, ABS(impact)*10);
355 if(ns.loc == -1) return;
357 // Location-specific issue impact
358 std::vector<int> issues;
359 switch(location[ns.loc]->type)
361 case SITE_LABORATORY_COSMETICS:
362 issues.push_back(VIEW_ANIMALRESEARCH);
363 issues.push_back(VIEW_WOMEN);
365 case SITE_LABORATORY_GENETIC:
366 issues.push_back(VIEW_ANIMALRESEARCH);
367 issues.push_back(VIEW_GENETICS);
369 case SITE_GOVERNMENT_POLICESTATION:
370 issues.push_back(VIEW_POLICEBEHAVIOR);
371 issues.push_back(VIEW_PRISONS);
372 issues.push_back(VIEW_DRUGS);
374 case SITE_GOVERNMENT_COURTHOUSE:
375 issues.push_back(VIEW_DEATHPENALTY);
376 issues.push_back(VIEW_JUSTICES);
377 issues.push_back(VIEW_FREESPEECH);
378 issues.push_back(VIEW_GAY);
379 issues.push_back(VIEW_WOMEN);
380 issues.push_back(VIEW_CIVILRIGHTS);
382 case SITE_GOVERNMENT_PRISON:
383 issues.push_back(VIEW_DEATHPENALTY);
384 issues.push_back(VIEW_DRUGS);
385 issues.push_back(VIEW_TORTURE);
386 issues.push_back(VIEW_PRISONS);
388 case SITE_GOVERNMENT_ARMYBASE:
389 issues.push_back(VIEW_TORTURE);
390 issues.push_back(VIEW_MILITARY);
392 case SITE_GOVERNMENT_WHITE_HOUSE:
394 case SITE_GOVERNMENT_INTELLIGENCEHQ:
395 issues.push_back(VIEW_INTELLIGENCE);
396 issues.push_back(VIEW_TORTURE);
397 issues.push_back(VIEW_PRISONS);
399 case SITE_INDUSTRY_SWEATSHOP:
400 issues.push_back(VIEW_SWEATSHOPS);
401 issues.push_back(VIEW_IMMIGRATION);
403 case SITE_INDUSTRY_POLLUTER:
404 issues.push_back(VIEW_SWEATSHOPS);
405 issues.push_back(VIEW_POLLUTION);
407 case SITE_INDUSTRY_NUCLEAR:
408 issues.push_back(VIEW_NUCLEARPOWER);
410 case SITE_CORPORATE_HEADQUARTERS:
411 issues.push_back(VIEW_TAXES);
412 issues.push_back(VIEW_CORPORATECULTURE);
413 issues.push_back(VIEW_WOMEN);
415 case SITE_CORPORATE_HOUSE:
416 issues.push_back(VIEW_TAXES);
417 issues.push_back(VIEW_CEOSALARY);
419 case SITE_MEDIA_AMRADIO:
420 issues.push_back(VIEW_AMRADIO);
421 issues.push_back(VIEW_FREESPEECH);
422 issues.push_back(VIEW_GAY);
423 issues.push_back(VIEW_WOMEN);
424 issues.push_back(VIEW_CIVILRIGHTS);
426 case SITE_MEDIA_CABLENEWS:
427 issues.push_back(VIEW_CABLENEWS);
428 issues.push_back(VIEW_FREESPEECH);
429 issues.push_back(VIEW_GAY);
430 issues.push_back(VIEW_WOMEN);
431 issues.push_back(VIEW_CIVILRIGHTS);
433 case SITE_RESIDENTIAL_APARTMENT_UPSCALE:
434 issues.push_back(VIEW_TAXES);
435 issues.push_back(VIEW_CEOSALARY);
436 issues.push_back(VIEW_GUNCONTROL);
438 case SITE_BUSINESS_CIGARBAR:
439 issues.push_back(VIEW_TAXES);
440 issues.push_back(VIEW_CEOSALARY);
441 issues.push_back(VIEW_WOMEN);
443 case SITE_BUSINESS_BANK:
444 issues.push_back(VIEW_TAXES);
445 issues.push_back(VIEW_CEOSALARY);
446 issues.push_back(VIEW_CORPORATECULTURE);
449 for(i=0; i<len(issues); i++)
450 change_public_opinion(issues[i],impact,squad_responsible,impact*10);
453 /* news - determines the priority of a news story */
454 void setpriority(newsstoryst &ns)
456 // Priority is set differently based on the type of the news story
459 // Major events always muscle to the front page by having a very high priority
460 case NEWSSTORY_MAJOREVENT:
463 // LCS-related news stories are more important if they involve lots of headline-grabbing
465 case NEWSSTORY_SQUAD_SITE:
466 case NEWSSTORY_SQUAD_ESCAPED:
467 case NEWSSTORY_SQUAD_FLEDATTACK:
468 case NEWSSTORY_SQUAD_DEFENDED:
469 case NEWSSTORY_SQUAD_BROKESIEGE:
470 case NEWSSTORY_SQUAD_KILLED_SIEGEATTACK:
471 case NEWSSTORY_SQUAD_KILLED_SIEGEESCAPE:
472 case NEWSSTORY_SQUAD_KILLED_SITE:
473 case NEWSSTORY_CARTHEFT:
474 case NEWSSTORY_NUDITYARREST:
475 case NEWSSTORY_WANTEDARREST:
476 case NEWSSTORY_DRUGARREST:
477 case NEWSSTORY_GRAFFITIARREST:
478 case NEWSSTORY_BURIALARREST:
483 memset(crime,0,CRIMENUM*sizeof(int));
484 // Record all the crimes in this story
485 for(int c=0;c<len(ns.crime);c++)
486 crime[ns.crime[c]]++;
487 // Cap publicity for more than ten repeats of an action of some type
488 if(crime[CRIME_STOLEGROUND]>10) crime[CRIME_STOLEGROUND]=10;
489 if(crime[CRIME_BROKEDOWNDOOR]>10) crime[CRIME_BROKEDOWNDOOR]=10;
490 if(crime[CRIME_ATTACKED_MISTAKE]>10) crime[CRIME_ATTACKED_MISTAKE]=10;
491 if(crime[CRIME_ATTACKED]>10) crime[CRIME_ATTACKED]=10;
492 if(crime[CRIME_BREAK_SWEATSHOP]>10) crime[CRIME_BREAK_SWEATSHOP]=10;
493 if(crime[CRIME_BREAK_FACTORY]>10) crime[CRIME_BREAK_FACTORY]=10;
494 if(crime[CRIME_FREE_RABBITS]>10) crime[CRIME_FREE_RABBITS]=10;
495 if(crime[CRIME_FREE_BEASTS]>10) crime[CRIME_FREE_BEASTS]=10;
496 if(crime[CRIME_TAGGING]>10) crime[CRIME_TAGGING]=10;
498 // Increase news story priority based on the number of instances of
499 // various crimes, scaled by a factor dependant on the crime
501 // Unique site crimes
502 ns.priority+=crime[CRIME_BANKVAULTROBBERY ] * 100;
503 ns.priority+=crime[CRIME_BANKSTICKUP ] * 100;
504 ns.priority+=crime[CRIME_SHUTDOWNREACTOR ] * 100;
505 ns.priority+=crime[CRIME_HACK_INTEL ] * 100;
506 ns.priority+=crime[CRIME_ARMORY ] * 100;
507 ns.priority+=crime[CRIME_HOUSE_PHOTOS ] * 100;
508 ns.priority+=crime[CRIME_CORP_FILES ] * 100;
509 ns.priority+=crime[CRIME_PRISON_RELEASE ] * 50;
510 ns.priority+=crime[CRIME_JURYTAMPERING ] * 30;
511 ns.priority+=crime[CRIME_POLICE_LOCKUP ] * 30;
512 ns.priority+=crime[CRIME_COURTHOUSE_LOCKUP] * 30;
513 ns.priority+=crime[CRIME_BANKTELLERROBBERY] * 30;
515 // Common site crimes
516 ns.priority+=crime[CRIME_KILLEDSOMEBODY ] * 30;
517 ns.priority+=crime[CRIME_FREE_BEASTS ] * 12;
518 ns.priority+=crime[CRIME_BREAK_SWEATSHOP ] * 8;
519 ns.priority+=crime[CRIME_BREAK_FACTORY ] * 8;
520 ns.priority+=crime[CRIME_FREE_RABBITS ] * 8;
521 ns.priority+=crime[CRIME_ATTACKED_MISTAKE ] * 7;
522 ns.priority+=crime[CRIME_ATTACKED ] * 4;
523 ns.priority+=crime[CRIME_TAGGING ] * 2;
524 ns.priority+=crime[CRIME_VANDALISM ] * 2;
525 //ns.priority+=crime[CRIME_STOLEGROUND ];
526 //ns.priority+=crime[CRIME_BROKEDOWNDOOR ];
528 // Set story's political and violence levels for determining whether
529 // a story becomes positive or negative
530 if(ns.claimed) ns.politics_level=5;
531 else ns.politics_level=0;
533 ns.politics_level+=crime[CRIME_SHUTDOWNREACTOR ] * 100;
534 ns.politics_level+=crime[CRIME_HACK_INTEL ] * 100;
535 ns.politics_level+=crime[CRIME_HOUSE_PHOTOS ] * 100;
536 ns.politics_level+=crime[CRIME_CORP_FILES ] * 100;
537 ns.politics_level+=crime[CRIME_PRISON_RELEASE ] * 50;
538 ns.politics_level+=crime[CRIME_POLICE_LOCKUP ] * 30;
539 ns.politics_level+=crime[CRIME_COURTHOUSE_LOCKUP] * 30;
540 ns.politics_level+=crime[CRIME_FREE_BEASTS ] * 10;
541 ns.politics_level+=crime[CRIME_BREAK_SWEATSHOP ] * 10;
542 ns.politics_level+=crime[CRIME_BREAK_FACTORY ] * 10;
543 ns.politics_level+=crime[CRIME_FREE_RABBITS ] * 10;
544 ns.politics_level+=crime[CRIME_VANDALISM ] * 5;
545 ns.politics_level+=crime[CRIME_TAGGING ] * 3;
549 ns.violence_level+=crime[CRIME_ARMORY ] * 100;
550 ns.violence_level+=crime[CRIME_KILLEDSOMEBODY ] * 20;
551 ns.violence_level+=crime[CRIME_ATTACKED_MISTAKE ] * 12;
552 ns.violence_level+=crime[CRIME_ATTACKED ] * 4;
555 short violence_threshhold;
556 if(attitude[VIEW_POLITICALVIOLENCE]+attitude[VIEW_LIBERALCRIMESQUADPOS]<5)violence_threshhold=1;
557 else if(attitude[VIEW_POLITICALVIOLENCE]+attitude[VIEW_LIBERALCRIMESQUADPOS]<25)violence_threshhold=2;
558 else if(attitude[VIEW_POLITICALVIOLENCE]+attitude[VIEW_LIBERALCRIMESQUADPOS]<45)violence_threshhold=3;
559 else if(attitude[VIEW_POLITICALVIOLENCE]+attitude[VIEW_LIBERALCRIMESQUADPOS]<65)violence_threshhold=4;
560 else if(attitude[VIEW_POLITICALVIOLENCE]+attitude[VIEW_LIBERALCRIMESQUADPOS]<85)violence_threshhold=5;
561 else if(attitude[VIEW_POLITICALVIOLENCE]+attitude[VIEW_LIBERALCRIMESQUADPOS]<105)violence_threshhold=6;
562 else if(attitude[VIEW_POLITICALVIOLENCE]+attitude[VIEW_LIBERALCRIMESQUADPOS]<125)violence_threshhold=7;
563 else if(attitude[VIEW_POLITICALVIOLENCE]+attitude[VIEW_LIBERALCRIMESQUADPOS]<145)violence_threshhold=8;
564 else if(attitude[VIEW_POLITICALVIOLENCE]+attitude[VIEW_LIBERALCRIMESQUADPOS]<165)violence_threshhold=9;
565 else if(attitude[VIEW_POLITICALVIOLENCE]+attitude[VIEW_LIBERALCRIMESQUADPOS]<185)violence_threshhold=10;
566 else violence_threshhold=50;
569 //if(ns.violence_level / (ns.politics_level+1) > violence_threshhold)
571 //else ns.positive = 1;
573 // Add additional priority based on the type of news story
574 // and how high profile the LCS is
577 case NEWSSTORY_SQUAD_ESCAPED:
578 ns.priority+=10+attitude[VIEW_LIBERALCRIMESQUAD]/3;
580 case NEWSSTORY_SQUAD_FLEDATTACK:
581 ns.priority+=15+attitude[VIEW_LIBERALCRIMESQUAD]/3;
583 case NEWSSTORY_SQUAD_DEFENDED:
584 ns.priority+=30+attitude[VIEW_LIBERALCRIMESQUAD]/3;
586 case NEWSSTORY_SQUAD_BROKESIEGE:
587 ns.priority+=45+attitude[VIEW_LIBERALCRIMESQUAD]/3;
589 case NEWSSTORY_SQUAD_KILLED_SIEGEATTACK:
590 ns.priority+=10+attitude[VIEW_LIBERALCRIMESQUAD]/3;
592 case NEWSSTORY_SQUAD_KILLED_SIEGEESCAPE:
593 ns.priority+=15+attitude[VIEW_LIBERALCRIMESQUAD]/3;
595 case NEWSSTORY_SQUAD_KILLED_SITE:
596 ns.priority+=10+attitude[VIEW_LIBERALCRIMESQUAD]/3;
599 // Suppress actions at CCS safehouses
601 location[ns.loc]->renting==RENTING_CCS)
608 // Double profile if the squad moved out in full battle colors
609 if(ns.claimed==2) ns.priority*=2;
611 // Modify notability by location
614 switch(location[ns.loc]->type)
617 case SITE_BUSINESS_CRACKHOUSE:
618 if(ns.type == NEWSSTORY_SQUAD_KILLED_SITE ||
619 ns.type == NEWSSTORY_SQUAD_SITE)
625 case SITE_RESIDENTIAL_TENEMENT:
630 case SITE_RESIDENTIAL_SHELTER:
631 case SITE_INDUSTRY_WAREHOUSE:
632 case SITE_RESIDENTIAL_BOMBSHELTER:
634 case SITE_COMMERCIAL:
637 case SITE_INDUSTRIAL:
638 case SITE_RESIDENTIAL_APARTMENT:
639 case SITE_RESIDENTIAL_APARTMENT_UPSCALE:
640 case SITE_LABORATORY_COSMETICS:
641 case SITE_LABORATORY_GENETIC:
642 case SITE_HOSPITAL_CLINIC:
643 case SITE_HOSPITAL_UNIVERSITY:
644 case SITE_INDUSTRY_SWEATSHOP:
645 case SITE_INDUSTRY_POLLUTER:
646 case SITE_BUSINESS_PAWNSHOP:
647 case SITE_BUSINESS_JUICEBAR:
648 case SITE_BUSINESS_CIGARBAR:
649 case SITE_BUSINESS_LATTESTAND:
650 case SITE_BUSINESS_VEGANCOOP:
651 case SITE_BUSINESS_INTERNETCAFE:
652 case SITE_BUSINESS_DEPTSTORE:
653 case SITE_BUSINESS_HALLOWEEN:
654 case SITE_BUSINESS_BARANDGRILL:
655 case SITE_BUSINESS_ARMSDEALER:
656 case SITE_BUSINESS_CARDEALERSHIP:
657 case SITE_OUTDOOR_PUBLICPARK:
658 case SITE_OUTDOOR_BUNKER:
663 case SITE_INDUSTRY_NUCLEAR:
664 case SITE_GOVERNMENT_POLICESTATION:
665 case SITE_GOVERNMENT_COURTHOUSE:
666 case SITE_GOVERNMENT_PRISON:
667 case SITE_GOVERNMENT_INTELLIGENCEHQ:
668 case SITE_GOVERNMENT_ARMYBASE:
669 case SITE_GOVERNMENT_FIRESTATION:
670 case SITE_CORPORATE_HEADQUARTERS:
671 case SITE_CORPORATE_HOUSE:
672 case SITE_MEDIA_AMRADIO:
673 case SITE_MEDIA_CABLENEWS:
674 case SITE_BUSINESS_BANK:
675 case SITE_GOVERNMENT_WHITE_HOUSE:
681 // Cap news priority, in part so it can't displace major news stories
682 if(ns.priority>20000) ns.priority=20000;
685 case NEWSSTORY_KIDNAPREPORT:
686 // Kidnappings are higher priority if they're an archconservative
688 if(ns.cr->type==CREATURE_CORPORATE_CEO||
689 ns.cr->type==CREATURE_RADIOPERSONALITY||
690 ns.cr->type==CREATURE_NEWSANCHOR||
691 ns.cr->type==CREATURE_SCIENTIST_EMINENT||
692 ns.cr->type==CREATURE_JUDGE_CONSERVATIVE) ns.priority=40;
694 case NEWSSTORY_MASSACRE:
695 // More people massacred, higher priority (I think; not verified ns.crime[1] is people present)
696 ns.priority=10 + ns.crime[1]*5;
698 case NEWSSTORY_CCS_SITE:
699 case NEWSSTORY_CCS_KILLED_SITE:
700 // CCS actions loosely simulate LCS actions; here it adds some
701 // random site crimes to the story and increases the
702 // priority accordingly
703 ns.crime.push_back(CRIME_BROKEDOWNDOOR);
705 ns.politics_level+=20;
708 ns.crime.push_back(CRIME_ATTACKED_MISTAKE);
710 ns.violence_level+=12;
712 ns.crime.push_back(CRIME_ATTACKED);
713 ns.priority+=4*(LCSrandom(10)+1);
714 ns.violence_level+=LCSrandom(10) * 4;
715 if(LCSrandom(endgamestate+1))
717 ns.crime.push_back(CRIME_KILLEDSOMEBODY);
718 ns.priority+=LCSrandom(10)*30;
719 ns.violence_level+=LCSrandom(10) * 20;
721 if(LCSrandom(endgamestate+1))
723 ns.crime.push_back(CRIME_STOLEGROUND);
724 ns.priority+=LCSrandom(10);
726 if(!LCSrandom(endgamestate+4))
728 ns.crime.push_back(CRIME_BREAK_FACTORY);
729 ns.priority+=LCSrandom(10)*2;
730 ns.politics_level+=LCSrandom(10) * 10;
734 ns.crime.push_back(CRIME_CARCHASE);
737 case NEWSSTORY_CCS_DEFENDED:
738 case NEWSSTORY_CCS_KILLED_SIEGEATTACK:
739 ns.priority=40+attitude[VIEW_LIBERALCRIMESQUAD]/3;
746 /* news - show major news story */
747 void displaystory(newsstoryst &ns,bool liberalguardian,int header)
749 music.play(MUSIC_NEWSPAPER);
751 preparepage(ns,liberalguardian);
756 for(it2=0;it2<25;it2++) storyx_s[it2]=1;
757 for(it2=0;it2<25;it2++) storyx_e[it2]=78;
758 displayads(ns,liberalguardian,storyx_s,storyx_e,it2);
761 if(multipleCityMode && ns.loc != -1)
763 Location * ns_site = find_site_in_city(location[ns.loc]->city, -1);
764 switch(ns_site->type)
766 case SITE_CITY_SEATTLE: city = "Seattle, WA"; break;
767 case SITE_CITY_NEW_YORK: city = "New York, NY"; break;
768 case SITE_CITY_LOS_ANGELES: city = "Los Angeles, CA"; break;
769 case SITE_CITY_CHICAGO: city = "Chicago, IL"; break;
770 case SITE_CITY_DETROIT: city = "Detroit, MI"; break;
771 case SITE_CITY_ATLANTA: city = "Atlanta, GA"; break;
772 case SITE_CITY_MIAMI: city = "Miami, FL"; break;
773 case SITE_CITY_WASHINGTON_DC: city = "Washington, DC"; break;
774 default: city = lcityname;
777 else city = lcityname;
781 case NEWSSTORY_MAJOREVENT:
782 displaymajoreventstory(ns,story,storyx_s,storyx_e);
784 case NEWSSTORY_CCS_NOBACKERS:
785 case NEWSSTORY_CCS_DEFEATED:
786 case NEWSSTORY_SQUAD_SITE:
787 case NEWSSTORY_SQUAD_ESCAPED:
788 case NEWSSTORY_SQUAD_FLEDATTACK:
789 case NEWSSTORY_SQUAD_DEFENDED:
790 case NEWSSTORY_SQUAD_BROKESIEGE:
791 case NEWSSTORY_SQUAD_KILLED_SIEGEATTACK:
792 case NEWSSTORY_SQUAD_KILLED_SIEGEESCAPE:
793 case NEWSSTORY_SQUAD_KILLED_SITE:
794 case NEWSSTORY_CCS_SITE:
795 case NEWSSTORY_CCS_KILLED_SITE:
796 case NEWSSTORY_CARTHEFT:
797 case NEWSSTORY_NUDITYARREST:
798 case NEWSSTORY_WANTEDARREST:
799 case NEWSSTORY_DRUGARREST:
800 case NEWSSTORY_GRAFFITIARREST:
801 case NEWSSTORY_BURIALARREST:
804 if((!liberalguardian&&ns.page==1)||(liberalguardian&&ns.guardianpage==1))
808 displaystoryheader(ns,liberalguardian,y,header);
816 case NEWSSTORY_CCS_NOBACKERS:
817 strcat(story,"The FBI investigation into the Conservative Crime Squad's government connections has led to the arrest of more than ");
818 strcat(story,"a dozen elected officials and revealed extensive corruption in law enforcement.");
820 strcat(story," \"The uphevals in the police force, and arrest of corrupt officials, are only the beginning,\" FBI Chief ");
821 strcat(story,"Roberta T. Malton said during a news conference. \"A major focus ");
822 strcat(story,"of our efforts will be on the complete destruction of the Conservative Crime Squad. Within six months, we'll have their ");
823 strcat(story,"entire leadership, dead or alive. I personally guarantee it.\"");
826 case NEWSSTORY_CCS_DEFEATED:
827 strcat(story,"An elite FBI force conducted simultaneous ");
828 strcat(story,"raids on several suspected Conservative Crime Squad safehouses in the early hours. Despite resistance from ");
829 strcat(story,"CCS terrorists armed with automatic weapons and body armor, no FBI agents were killed in the raids, and all ");
830 strcat(story,"three raids were successful. Seventeen suspects were killed in the fighting, and twenty-three are ");
831 strcat(story,"now in custody.");
833 strcat(story," The Conservative Crime Squad fell on hard times when the alternative newspaper Liberal Guardian published ");
834 strcat(story,"1147 pages of documents showing extensive government support for the group. The ensuing scandal ");
835 strcat(story,"led to the arrest of twenty-five members of Congress, as well as several leadership figures in the ");
836 strcat(story,"Conservative Party's National Committee.");
838 strcat(story," \"I want parents to rest easy tonight,\" FBI Chief ");
839 strcat(story,"Roberta T. Malton said during a news conference to announce the raids. \"You don't need the Liberal Crime Squad ");
840 strcat(story,"to protect you. The Government can handle it.\"");
843 case NEWSSTORY_WANTEDARREST:
844 case NEWSSTORY_GRAFFITIARREST:
847 std::memset(crime,0,sizeof(int)*CRIMENUM);
848 for(int c=0;c<len(ns.crime);c++)
849 crime[ns.crime[c]]++;
850 if(crime[CRIME_KILLEDSOMEBODY]>1)
852 if(crime[CRIME_KILLEDSOMEBODY]==2)
855 strcat(story,"Several");
856 strcat(story," police officers were");
858 else strcat(story,"A police officer was");
859 strcat(story," killed in the line of duty yesterday, ");
860 strcat(story,"according to a spokesperson from the police department.");
862 strcat(story," A suspect, identified only as a member of the ");
863 strcat(story,"radical political group known as the Liberal Crime Squad, is believed to have killed ");
864 if(crime[CRIME_KILLEDSOMEBODY]>1)
866 strcat(story,crime[CRIME_KILLEDSOMEBODY]);
867 strcat(story," officers ");
869 else strcat(story,"the police officer ");
870 strcat(story," while they were attempting to perform an arrest. ");
871 strcat(story,"The names of the officers have not been released pending notification of their families.");
875 case NEWSSTORY_NUDITYARREST:
876 case NEWSSTORY_CARTHEFT:
877 case NEWSSTORY_DRUGARREST:
878 case NEWSSTORY_BURIALARREST:
881 std::memset(crime,0,sizeof(int)*CRIMENUM);
882 for(int c=0;c<len(ns.crime);c++)
883 crime[ns.crime[c]]++;
884 strcat(story,"A routine arrest went horribly wrong yesterday, ");
885 strcat(story,"according to a spokesperson from the police department.");
887 strcat(story," A suspect, whose identity is unclear, ");
888 strcat(story,"killed ");
889 if(crime[CRIME_KILLEDSOMEBODY]>1)
891 strcat(story,crime[CRIME_KILLEDSOMEBODY]);
892 strcat(story," police officers that were");
894 else strcat(story,"a police officer that was");
895 strcat(story," attempting to perform an arrest. ");
896 if(ns.type==NEWSSTORY_NUDITYARREST)
897 strcat(story,"The incident apparently occurred as a response to a public nudity complaint. ");
898 else if(ns.type==NEWSSTORY_DRUGARREST)
899 strcat(story,"The suspect was allegedly selling \"pot brownies\". ");
900 else if(ns.type==NEWSSTORY_BURIALARREST)
902 strcat(story,"A passerby allegedly called the authorities after seeing the suspect dragging what ");
903 strcat(story,"appeared to be a corpse through an empty lot. ");
906 strcat(story,"A passerby had allegedly spotted the suspect committing a car theft. ");
908 if(crime[CRIME_KILLEDSOMEBODY]>1)
909 strcat(story,"The names of the officers have not been released pending notification of their families.");
910 else strcat(story,"The name of the officer has not been released pending notification of the officer's family.");
914 case NEWSSTORY_SQUAD_ESCAPED:
915 strcat(story,"Members of the Liberal Crime Squad ");
916 strcat(story,"escaped from a police siege yesterday, according ");
917 if(!liberalguardian)strcat(story,"to a spokesperson from the police department.");
918 else strcat(story,"to a Liberal Crime Squad spokesperson.");
921 case NEWSSTORY_SQUAD_FLEDATTACK:
922 strcat(story,"Members of the Liberal Crime Squad ");
923 strcat(story,"escaped from police officers during a raid yesterday, according ");
924 if(!liberalguardian)strcat(story,"to a spokesperson from the police department.");
925 else strcat(story,"to a Liberal Crime Squad spokesperson.");
928 case NEWSSTORY_SQUAD_DEFENDED:
929 strcat(story,"Members of the Liberal Crime Squad ");
930 strcat(story,"fought off a police raid yesterday, according ");
931 if(!liberalguardian)strcat(story,"to a spokesperson from the police department.");
932 else strcat(story,"to a Liberal Crime Squad spokesperson.");
935 case NEWSSTORY_SQUAD_BROKESIEGE:
936 strcat(story,"Members of the Liberal Crime Squad ");
937 strcat(story,"violently broke a police siege yesterday, according ");
938 if(!liberalguardian)strcat(story,"to a spokesperson from the police department.");
939 else strcat(story,"to a Liberal Crime Squad spokesperson.");
942 case NEWSSTORY_SQUAD_KILLED_SIEGEATTACK:
943 strcat(story,"Members of the Liberal Crime Squad were ");
946 strcat(story,"slain during a police raid yesterday, according ");
947 strcat(story,"to a spokesperson from the police department.");
951 strcat(story,"murdered during a police raid yesterday, according ");
952 strcat(story,"to a Liberal Crime Squad spokesperson.");
956 case NEWSSTORY_SQUAD_KILLED_SIEGEESCAPE:
957 strcat(story,"Members of the Liberal Crime Squad were ");
960 strcat(story,"slain trying to escape from a police siege yesterday, according ");
961 strcat(story,"to a spokesperson from the police department.");
965 strcat(story,"murdered trying to escape from a police siege yesterday, according ");
966 strcat(story,"to a Liberal Crime Squad spokesperson.");
973 if(ns.type==NEWSSTORY_CCS_KILLED_SITE||ns.type==NEWSSTORY_CCS_SITE)ccs=1;
975 squadstory_text_opening(ns,liberalguardian,ccs,story);
978 memset(crime,0,sizeof(int)*CRIMENUM);
980 for(int c=0;c<len(ns.crime);c++)
982 // Count crimes of each type
983 crime[ns.crime[c]]++;
985 // Special crimes are described at the start or end of the article;
986 // others should be recorded in the body
987 if(ns.crime[c]==CRIME_HOUSE_PHOTOS) continue;
988 if(ns.crime[c]==CRIME_CORP_FILES) continue;
989 if(ns.crime[c]==CRIME_SHUTDOWNREACTOR) continue;
990 if(ns.crime[c]==CRIME_BANKVAULTROBBERY) continue;
991 if(ns.crime[c]==CRIME_BANKSTICKUP) continue;
992 if(ns.crime[c]==CRIME_POLICE_LOCKUP) continue;
993 if(ns.crime[c]==CRIME_COURTHOUSE_LOCKUP) continue;
994 if(ns.crime[c]==CRIME_PRISON_RELEASE) continue;
995 if(ns.crime[c]==CRIME_JURYTAMPERING) continue;
996 if(ns.crime[c]==CRIME_HACK_INTEL) continue;
997 if(ns.crime[c]==CRIME_ARMORY) continue;
998 if(ns.crime[c]==CRIME_HOUSE_PHOTOS) continue;
999 if(ns.crime[c]==CRIME_CORP_FILES) continue;
1000 if(ns.crime[c]==CRIME_CARCHASE) continue;
1001 if(ns.crime[c]==CRIME_CARCRASH) continue;
1002 if(ns.crime[c]==CRIME_FOOTCHASE) continue;
1003 //if(ns.crime[c]==CRIME_TAGGING) continue;
1004 if(crime[ns.crime[c]]==1) typesum++;
1007 if(crime[CRIME_SHUTDOWNREACTOR])
1009 if(law[LAW_NUCLEARPOWER]==2)
1011 if(!liberalguardian)
1013 strcat(story," 現場の状況によると、");
1014 strcat(story,"リベラル・クライム・スコードは施設の設備を不正操作して州の水道を汚染させたようだ。");
1019 strcat(story," リベラル・クライム・スコードは、核汚染の危険性を示すため");
1020 strcat(story,"州の水道を汚染させた。");
1026 if(!liberalguardian)
1028 strcat(story," 現場の状況によると、");
1029 strcat(story,"リベラル・クライム・スコードの行為で原子炉は破滅的なメルトダウン寸前だったようだ。");
1034 strcat(story," リベラル・クライム・スコードは、原子力発電所の脆弱性と危険性を示すため、");
1035 strcat(story,"原子炉をメルトダウン寸前にまで追い込んだ。");
1040 if(crime[CRIME_POLICE_LOCKUP])
1042 if(!liberalguardian)
1044 strcat(story," 現場の状況によると、");
1045 strcat(story,"リベラル・クライム・スコードは警察署から容疑者を脱走させようとした、または脱走させたようだ。");
1050 strcat(story," リベラル・クライム・スコードは、警察に拘束された無実の人々を解放し、");
1051 strcat(story,"保守的な警察の尋問官による拷問と暴行から彼らを救い出した。");
1055 if(crime[CRIME_BANKVAULTROBBERY])
1057 if(!liberalguardian)
1059 strcat(story," 現場の状況によると、");
1060 strcat(story,"リベラル・クライム・スコードは銀行の金庫を開け、$100,000以上を持ち去ったようだ。");
1065 strcat(story," リベラル・クライム・スコードは銀行の金庫を開け、");
1066 strcat(story,"保守経済に対するリベラル思想の勝利を証明した。");
1070 else if(crime[CRIME_BANKSTICKUP])
1072 if(!liberalguardian)
1074 strcat(story," 現場の状況によると、");
1075 strcat(story,"リベラル・クライム・スコードは銀行員を脅し、金庫を開けさせたようだ。");
1080 strcat(story," リベラル・クライム・スコードは悪と戦う資源を求めるため、");
1081 strcat(story,"銀行の金庫へのアクセスを要求した。");
1085 if(crime[CRIME_COURTHOUSE_LOCKUP])
1087 if(!liberalguardian)
1089 strcat(story," 現場の状況によると、");
1090 strcat(story,"リベラル・クライム・スコードは裁判所から容疑者を脱走させようとした、または脱走させたようだ。");
1095 strcat(story," リベラル・クライム・スコードは、裁判所に拘束された無実の人々を解放し、");
1096 strcat(story,"保守によって腐敗した司法から彼らを救い出した。");
1100 if(crime[CRIME_PRISON_RELEASE])
1102 if(!liberalguardian)
1104 strcat(story," 現場の状況によると、");
1105 strcat(story,"リベラル・クライム・スコードは施設から囚人を脱走させようとしたようだ。");
1110 strcat(story," リベラル・クライム・スコードは、保守に虐待されている無実の人々を収容所から解放した。");
1114 if(crime[CRIME_JURYTAMPERING])
1116 if(!liberalguardian)
1118 strcat(story," 現場の警察関係者の情報からすると、");
1119 strcat(story,"リベラル・クライム・スコードの行為は陪審員に影響を与え、");
1120 strcat(story,"裁判の信頼を失墜させるものだ。");
1125 strcat(story," リベラル・クライム・スコードが陪審員の熟慮を妨げたことをここで謝罪する。");
1129 if(crime[CRIME_HACK_INTEL])
1131 if(!liberalguardian)
1133 strcat(story," 現場の警察関係者の情報によると、");
1134 strcat(story,"情報局職員はこの件で非常に動揺しているようだ。");
1139 strcat(story," リベラル・クライム・スコードのコンピュータ専門チームはCIAのコンピュータから機密情報を解放した。");
1143 if(crime[CRIME_ARMORY])
1145 if(!liberalguardian)
1147 strcat(story," 関係者の情報によると、");
1148 strcat(story,"リベラル・クライム・スコードは武器庫へ侵入を試みたようだ。");
1153 strcat(story," リベラル・クライム・スコードの特殊潜入班は抑圧者から武器を解放した。");
1157 if(crime[CRIME_HOUSE_PHOTOS])
1159 if(!liberalguardian)
1161 strcat(story," 現場の警察関係者の情報によると、");
1162 strcat(story,"物を盗まれた家主はパニック状態だったようだ。");
1167 strcat(story," リベラル・クライム・スコードが保守CEOの腐敗を明らかにした。");
1171 if(crime[CRIME_CORP_FILES])
1173 if(!liberalguardian)
1175 strcat(story," 現場の警察関係者の情報によると、");
1176 strcat(story,"現場の企業幹部たちはこの件で非常に動揺しているようだ。");
1181 strcat(story," リベラル・クライム・スコードが企業における保守の腐敗を明らかにした。");
1186 if(liberalguardian&&!ccs)
1188 if(crime[CRIME_ATTACKED_MISTAKE]) typesum--;
1189 if(crime[CRIME_KILLEDSOMEBODY]) typesum--;
1198 if(!liberalguardian)
1200 strcat(story," 詳細は不明だが、警察はLCSが");
1204 strcat(story," リベラル・クライム・スコードは");
1209 strcat(story," 詳細は不明だが、警察はCCSが");
1211 if(crime[CRIME_ARSON])
1213 if(!liberalguardian||ccs)
1219 strcat(story,"保守の設備の焼却処分");
1222 if(typesum>=3)strcat(story,"、");
1223 else if(typesum==2)strcat(story,"と");
1226 if(!liberalguardian||ccs)
1228 if(crime[CRIME_KILLEDSOMEBODY])
1231 if(typesum>=3)strcat(story,"、");
1232 else if(typesum==2)strcat(story,"と");
1235 if(crime[CRIME_ATTACKED_MISTAKE])
1238 if(typesum>=3)strcat(story,"、");
1239 else if(typesum==2)strcat(story,"と");
1242 if(crime[CRIME_ATTACKED])
1244 if(crime[CRIME_ATTACKED_MISTAKE])strcat(story,"多数を巻き込んだ傷害");
1245 else strcat(story,"傷害");
1246 if(typesum>=3)strcat(story,"、");
1247 else if(typesum==2)strcat(story,"と");
1253 if(crime[CRIME_ATTACKED])
1255 strcat(story,"保守派との戦闘");
1256 if(typesum>=3)strcat(story,"、");
1257 else if(typesum==2)strcat(story,"と");
1261 if(crime[CRIME_STOLEGROUND]||crime[CRIME_BANKTELLERROBBERY])
1263 if(!liberalguardian||ccs)
1269 strcat(story,"敵の資源の解放");
1271 if(typesum>=3)strcat(story,"、");
1272 else if(typesum==2)strcat(story,"と");
1275 if(crime[CRIME_FREE_RABBITS]||crime[CRIME_FREE_BEASTS])
1277 if(!liberalguardian)
1279 strcat(story,"研究所の動物の放出");
1283 strcat(story,"虐待された動物の解放");
1286 if(typesum>=3)strcat(story,"、");
1287 else if(typesum==2)strcat(story,"と");
1290 if(crime[CRIME_BREAK_SWEATSHOP]||crime[CRIME_BREAK_FACTORY]||crime[CRIME_VANDALISM])
1292 if(!liberalguardian||ccs)
1294 strcat(story,"設備の破壊");
1298 strcat(story,"敵のインフラの破壊");
1301 if(typesum>=3)strcat(story,"、");
1302 else if(typesum==2)strcat(story,"と");
1305 if(crime[CRIME_TAGGING])
1307 if(!liberalguardian||ccs)
1309 strcat(story,"破壊行為");
1313 strcat(story,"解放の印のマーキング");
1316 if(typesum>=3)strcat(story,"、");
1317 else if(typesum==2)strcat(story,"と");
1320 if(crime[CRIME_BROKEDOWNDOOR])
1322 if(!liberalguardian||ccs)
1324 strcat(story,"破壊と侵入");
1328 strcat(story,"破壊された扉からの入場");
1331 if(typesum>=3)strcat(story,"、");
1332 else if(typesum==2)strcat(story,"と");
1335 if(crime[CRIME_UNLOCKEDDOOR])
1337 if(!liberalguardian||ccs)
1339 strcat(story,"不法侵入");
1343 strcat(story,"鍵の解除");
1346 if(typesum>=3)strcat(story,"、");
1347 else if(typesum==2)strcat(story,"と");
1350 if(!ccs&&!liberalguardian)
1352 strcat(story,"の犯行に及んだと見て調査している");
1356 strcat(story,"を敢行した");
1363 if(crime[CRIME_CARCHASE])
1365 if(!liberalguardian||ccs)
1367 strcat(story," 事件の後、車は猛スピードで追跡された。");
1371 strcat(story," 保守派は無謀にもLCSを猛スピードで追跡した。");
1374 if(crime[CRIME_CARCRASH])
1376 if(crime[CRIME_CARCRASH]>1)
1378 strcat(story,"そして");
1379 strcat(story,crime[CRIME_CARCRASH]);
1380 strcat(story,"台の車が事故を起こした。");
1382 else strcat(story,"そして1台の車が破損した。");
1383 if(!liberalguardian||ccs)
1384 strcat(story,"犠牲者の詳細はまだ発表されていない。");//XXX: Why not turn them into martyrs?
1387 if(crime[CRIME_FOOTCHASE])
1389 if(!liberalguardian||ccs)
1390 strcat(story,"車による追跡の後にも、徒歩による追跡が容疑者を見失うまで続いた。");
1392 strcat(story,"リベラル・クライム・スコードは市民を車による危険な追跡から守るため、徒歩で逃走することを選択した。");
1400 if(crime[CRIME_TAGGING])
1402 strcat(story," 壁には" "\"");
1403 strcat(story,slogan);
1404 strcat(story,"\"" "という言葉が残されていた。");
1408 switch(LCSrandom(3))
1411 if (ns.type==NEWSSTORY_SQUAD_KILLED_SITE)
1413 strcat(story," 生存者によれば、現場を去る前に" "\"");
1414 strcat(story,slogan);
1415 strcat(story,"\"" "とつぶやいていたとも伝えられている。");
1419 strcat(story," 現場を去る前に" "\"");
1420 strcat(story,slogan);
1421 strcat(story,"\"" "と叫んでいたとも伝えられている。");
1425 strcat(story," 彼らの内の一人が" "\"");
1426 strcat(story,slogan);
1427 strcat(story,"\"" "と叫んだとも伝えられている。");
1430 strcat(story," 目撃者は" "\"");
1431 strcat(story,slogan);
1432 strcat(story,"\"" "という言葉を聞いたと証言している。");
1443 generatefiller(story,200);
1444 displaynewsstory(story,storyx_s,storyx_e,y);
1446 if(!newscherrybusted)newscherrybusted=1;
1447 if(ns.type==NEWSSTORY_CCS_SITE||
1448 ns.type==NEWSSTORY_CCS_KILLED_SITE)newscherrybusted=2;
1451 case NEWSSTORY_MASSACRE:
1457 if(ns.crime[0]==SIEGE_CCS)
1459 displaycenterednewsfont("CCS MASSACRE",5);
1461 else if(!liberalguardian)
1463 displaycenterednewsfont("MYSTERIOUS",5);
1464 displaycenterednewsfont("MASSACRE",13);
1468 displaycenterednewsfont("CONSERVATIVE",5);
1469 displaycenterednewsfont("MASSACRE",13);
1474 strcat(story," - ");
1475 strcat(story,"昨日、");
1476 strcat(story,location[ns.loc]->name);
1480 strcat(story,ns.crime[1]);
1481 strcat(story,"体の遺体"); //Gruesome pile, large pile.
1483 else if(ns.crime[1]>1)strcat(story,"2体の遺体");
1484 else strcat(story,"遺体");
1485 strcat(story,"が発見された。");
1486 if(!liberalguardian)
1488 strcat(story," 警察は殺人事件として調査している。");
1490 strcat(story," 今のところ有効な手がかりはないが、専門家は「");
1494 strcat(story," 警察はこの事件について調査を開始したが、");
1495 strcat(story,"深い追求を避けているように思われる。");
1497 strcat(story," リベラル・クライム・スコードは、犠牲となったLCSの");
1498 if(ns.crime[1]>1)strcat(story,"メンバーたち");
1499 else strcat(story,"メンバー");
1500 strcat(story,"はその政治的信念が原因で狙われたと見ている。");
1501 strcat(story,"LCSの広報官は「");
1506 if(!liberalguardian)
1508 if(ns.crime[1]>1)strcat(story,"遺体からは顔も");
1509 else strcat(story,"遺体からは顔も");
1510 strcat(story,"指紋も全て消されていた。これまで見た中で、最も");
1511 if(law[LAW_FREESPEECH]==-2)strcat(story,"[おかしな]事件だ");
1512 else if(law[LAW_FREESPEECH]==2)strcat(story,"イカレた事件だ");
1513 else strcat(story,"奇妙な事件だ");
1517 strcat(story,"この事件は中央情報局による超法的殺戮であるという確かな証拠が我々にはある。");
1518 strcat(story,"これは情報局の人権侵害と腐敗を暴こうとする我々に対する復讐だ");
1523 if(!liberalguardian)
1525 strcat(story,"火傷と…恐らく干草用の熊手による刺し傷がある。咬まれたような傷もあるようだ。");
1526 strcat(story,"証拠は何も残されていない。完璧な虐殺だ");
1530 strcat(story,"これは保守メディアの洗脳的プロパガンダに影響を受けた残忍な虐殺であると確信している");
1533 case SIEGE_CORPORATE:
1534 if(!liberalguardian)
1536 strcat(story,"まるで処刑のようだ。これはプロの犯行だ。手がかりは何もない");
1540 strcat(story,"殺戮現場には、以前から我々と対立している複数の企業と協力関係にある民間傭兵グループのサインがあった。");
1541 strcat(story,"「もし」警察がこのことを公表しないならば、それは隠そうとしているのだろう");
1545 if(!liberalguardian)
1547 strcat(story,"見よ、これがコンサバ・クライム・スコードの攻撃だ。");
1548 strcat(story,"知っての通り、彼らには名前も顔もなく、本当はどこで起こったことなのかさえもわからない");
1552 strcat(story,"これはコンサバ・クライム・スコードの殺戮者によるものだ。");
1553 strcat(story,"再び殺戮を行う前に阻止しなければならない");
1557 if(!liberalguardian)
1559 if(ns.crime[1]>1)strcat(story,"発見された遺体は");
1560 else strcat(story,"発見された遺体は");
1561 strcat(story,"焼かれて判別不能だった。");
1562 strcat(story,"建物の焼失状況によると、これは事件ではない。");
1563 strcat(story,"我々は消防局と協力して放火犯を追跡しているところだ。");
1564 strcat(story,"幸いなことに、他の建物に燃え広がる前に消防士が消し止めることができた");
1568 if(ns.crime[1]>1)strcat(story,"殺害されたのはこの新聞の記者たち");
1569 else strcat(story,"殺害されたのはこの新聞の記者");
1571 strcat(story,"これは新聞発行の自由を侵害する保守の殺戮者による反抗であることは明白だ");
1574 strcat(story,"。」と語っている。");
1577 generatefiller(story,200);
1578 displaynewsstory(story,storyx_s,storyx_e,y);
1581 case NEWSSTORY_KIDNAPREPORT:
1589 displaycenterednewsfont("LCS DENIES",5);
1590 displaycenterednewsfont("KIDNAPPING",13);break;
1596 case CREATURE_CORPORATE_CEO:
1597 displaycenterednewsfont("CEO",5);
1598 displaycenterednewsfont("KIDNAPPED",13);break;
1599 case CREATURE_RADIOPERSONALITY:
1600 displaycenterednewsfont("RADIO HOST",5);
1601 displaycenterednewsfont("KIDNAPPED",13);break;
1602 case CREATURE_NEWSANCHOR:
1603 displaycenterednewsfont("NEWS ANCHOR",5);
1604 displaycenterednewsfont("KIDNAPPED",13);break;
1605 case CREATURE_SCIENTIST_EMINENT:
1606 displaycenterednewsfont("SCIENTIST",5);
1607 displaycenterednewsfont("KIDNAPPED",13);break;
1608 case CREATURE_JUDGE_CONSERVATIVE:
1609 displaycenterednewsfont("JUDGE",5);
1610 displaycenterednewsfont("KIDNAPPED",13);break;
1612 case CREATURE_GANGUNIT:
1613 case CREATURE_DEATHSQUAD:
1614 displaycenterednewsfont("COP",5);
1615 displaycenterednewsfont("KIDNAPPED",13);break;
1617 displaycenterednewsfont("SOMEONE",5);
1618 displaycenterednewsfont("KIDNAPPED",13);break;
1624 strcat(story," - The disappearance of ");
1625 strcat(story,ns.cr->propername);
1626 strcat(story," is now considered a kidnapping, ");
1627 strcat(story,"according to a police spokesperson.");
1630 char dstr[200],dstr2[200];
1632 generate_name(dstr,dstr2);
1635 strcat(story,dstr2);
1636 strcat(story,", speaking on behalf of the police department, stated ");
1637 strcat(story,"\"We now believe that ");
1638 strcat(story,ns.cr->propername);
1639 strcat(story," was taken ");
1640 strcat(story,ns.cr->joindays-1);
1641 strcat(story," days ago, by a person or persons as yet undetermined. ");
1642 strcat(story,"We have several leads and are confident that we will ");
1643 strcat(story,"bring ");
1644 strcat(story,ns.cr->propername);
1645 strcat(story," back home and bring the kidnappers to justice. ");
1646 strcat(story,"As the investigation is ongoing, I cannot be more specific at this time. ");
1647 strcat(story,"To the citizens, please contact the department if you have any additional information.");
1650 strcat(story," According to sources, ");
1651 strcat(story,ns.cr->propername);
1652 strcat(story,"'s last known location was the ");
1653 strcat(story,location[ns.cr->worklocation]->name);
1654 strcat(story,". Police were seen searching the surrounding area yesterday.");
1657 generatefiller(story,200);
1658 displaynewsstory(story,storyx_s,storyx_e,y);
1664 do c=getkey(); while(c!='x'&&c!=ESC&&c!=ENTER&&c!=SPACEBAR);
1669 /* news - graphics */
1672 int picnum,dimx,dimy;
1676 if((h=LCSOpenFile("largecap.cpc", "rb", LCSIO_PRE_ART))!=NULL)
1679 fread(&picnum,sizeof(int),1,h);
1680 fread(&dimx,sizeof(int),1,h);
1681 fread(&dimy,sizeof(int),1,h);
1682 for(int p=0;p<picnum;p++)
1683 for(int x=0;x<dimx;x++)
1684 for(int y=0;y<dimy;y++)
1685 fread(&bigletters[p][x][y][0],sizeof(char),4,h);
1689 if((h=LCSOpenFile("newstops.cpc", "rb", LCSIO_PRE_ART))!=NULL)
1692 fread(&picnum,sizeof(int),1,h);
1693 fread(&dimx,sizeof(int),1,h);
1694 fread(&dimy,sizeof(int),1,h);
1695 for(int p=0;p<picnum;p++)
1696 for(int x=0;x<dimx;x++)
1697 for(int y=0;y<dimy;y++)
1698 fread(&newstops[p][x][y][0],sizeof(char),4,h);
1702 if((h=LCSOpenFile("newspic.cpc", "rb", LCSIO_PRE_ART))!=NULL)
1705 fread(&picnum,sizeof(int),1,h);
1706 fread(&dimx,sizeof(int),1,h);
1707 fread(&dimy,sizeof(int),1,h);
1708 for(int p=0;p<picnum;p++)
1709 for(int x=0;x<dimx;x++)
1710 for(int y=0;y<dimy;y++)
1711 fread(&newspic[p][x][y][0],sizeof(char),4,h);
1716 void displaycenterednewsfont(const std::string& str,int y)
1720 for(s=0;s<len(str);s++)
1722 if(str[s]>='A'&&str[s]<='Z')width+=6;
1723 else if(str[s]=='\'')width+=4;
1729 for(s=0;s<len(str);s++)
1731 if((str[s]>='A'&&str[s]<='Z')||str[s]=='\'')
1734 if(str[s]>='A'&&str[s]<='Z') p=str[s]-'A';
1737 if(str[s]=='\'') lim=4;
1738 if(s==len(str)-1) lim--;
1739 for(int x2=0;x2<lim;x2++) for(int y2=0;y2<7;y2++)
1744 // Clean the square first.
1745 set_color(COLOR_BLACK, COLOR_BLACK, 0);
1752 set_color(COLOR_WHITE,COLOR_WHITE,0);
1757 set_color(translateGraphicsColor(bigletters[p][x2][y2][1]),
1758 translateGraphicsColor(bigletters[p][x2][y2][2]),
1759 bigletters[p][x2][y2][3]);
1760 addgrah(bigletters[p][x2][y2][0]);
1767 set_color(COLOR_WHITE,COLOR_WHITE,0);
1768 for(int x2=0;x2<3;x2++) for(int y2=0;y2<7;y2++)
1778 void displaycenteredsmallnews(const std::string& str,int y)
1780 int x=39-((len(str)-1)>>1);
1782 set_color(COLOR_BLACK,COLOR_WHITE,0);
1786 void displaynewspicture(int p,int y)
1788 for(int x2=0;x2<78;x2++)
1789 for(int y2=0;y2<15;y2++)
1793 set_color(translateGraphicsColor(newspic[p][x2][y2][1]),
1794 translateGraphicsColor(newspic[p][x2][y2][2]),
1795 newspic[p][x2][y2][3]);
1796 addgrah(newspic[p][x2][y2][0]);
1800 int chrsize(char *str)
1802 if(strlen("漢")==3) // UTF-8
1804 if((*str & 0x80) == 0)
1806 else if((*str & 0xe0) == 0xc0)
1808 else if((*str & 0xf0) == 0xe0)
1810 else if((*str & 0xf8) == 0xf0)
1812 else if((*str & 0xfc) == 0xf8)
1814 else if((*str & 0xfe) == 0xfc)
1819 else // ShiftJIS or EUC
1828 /* news - draws the specified block of text to the screen */
1829 void displaynewsstory(char *story,short *storyx_s,short *storyx_e,int y)
1831 vector<char *> text;
1832 vector<char> centered;
1838 char addstring[500];
1843 char endparagraph=0;
1849 while(curpos<len(story)&&cury<25)
1854 length=storyx_e[cury]-storyx_s[cury]+1;
1855 if(length==0){cury++;if(endparagraph>0)endparagraph--;continue;}
1857 for(i=curpos;i<len(story);i++)
1859 if(story[i]=='&'&&story[i+1]!='&')
1862 if(story[i]=='c')iscentered=1;
1868 addstring[addstrcur-1]=' ';
1869 addstring[addstrcur]='\x0';
1878 if(story[i]=='&')i++;
1879 if((size = chrsize(&story[i])) > 1) {
1880 for(j=0;j<size-1;j++)
1881 addstring[addstrcur++]=story[i++];
1884 addstring[addstrcur]=story[i];
1885 addstring[addstrcur+1]='\x0';
1887 if(totalwidth+1>length&&size>1)
1890 addstrcur-=(size-1);
1891 addstring[addstrcur]='\x0';
1894 if(totalwidth>length)
1896 while(story[i]!=' ') i--,addstrcur--;
1897 while(story[i]==' ') i++;
1898 addstring[addstrcur]='\x0';
1905 if(i==len(story)) addstring[addstrcur]='\x0';
1907 if(len(addstring)&&content)
1912 for(int s2=0;s2<len(addstring);s2++)
1914 if(addstring[s2]==' ')
1920 spacex.push_back(s2);
1933 while(!endparagraph&&words>1&&len(addstring)<length&&!iscentered)
1935 int csp=pickrandom(spacex);
1937 for(int x=0;x<len(spacex);x++)
1938 if(spacex[x]>csp) spacex[x]++;
1940 int l=len(addstring);
1941 for(int s=l+1;s>csp;s--)
1942 addstring[s]=addstring[s-1];
1945 char *news=new char[len(addstring)+1];
1946 strcpy(news,addstring);
1947 text.push_back(news);
1948 centered.push_back(iscentered);
1951 endparagraph--,iscentered=0;
1957 set_color(COLOR_BLACK,COLOR_WHITE,0);
1958 for(int t=0;t<len(text);t++)
1961 if(text[t][len(text[t])-1]==' ') // remove trailing space
1962 text[t][len(text[t])-1]='\x0'; // (necessary for proper centering and to not overwrite borders around an ad)
1964 move(y+t,((storyx_s[y+t]+storyx_e[y+t]-len(text[t])+1)>>1));
1965 else move(y+t,storyx_s[y+t]);
1975 /* news - make some filler junk */
1976 void generatefiller(char *story,int amount)
1977 { //TODO: Use text from filler.cpp
1978 strcat(story,"&r"+cityname()+" - ");
1979 for(int par=0;amount>0;amount--)
1982 for(int i=0;i<LCSrandom(10)+3;i++)strcat(story,"~");
1983 if(amount>1)strcat(story," ");
1984 if(par>=50&&!LCSrandom(5)&&amount>20)
1987 strcat(story,"&r ");
1994 newsstoryst* new_major_event()
1996 newsstoryst *ns=new newsstoryst;
1997 ns->type=NEWSSTORY_MAJOREVENT;
2000 ns->view=LCSrandom(VIEWNUM-3);
2001 ns->positive=LCSrandom(2);
2003 // Skip issues that we have no news stories for
2004 if(ns->view==VIEW_IMMIGRATION)continue;
2005 if(ns->view==VIEW_DRUGS)continue;
2006 if(ns->view==VIEW_MILITARY)continue;
2007 if(ns->view==VIEW_CIVILRIGHTS)continue;
2008 if(ns->view==VIEW_TORTURE)continue;
2009 //if(ns->view==VIEW_POLITICALVIOLENCE)continue;
2011 // News stories that don't apply when the law is extreme -- covering
2012 // nuclear power when it's banned, police corruption when it doesn't
2013 // exist, out of control pollution when it's under control, etc.
2015 if(ns->view==VIEW_WOMEN&&law[LAW_ABORTION]==-2)continue; // Abortion banned
2016 if(ns->view==VIEW_DEATHPENALTY&&law[LAW_DEATHPENALTY]==2)continue; // Death penalty banned
2017 if(ns->view==VIEW_NUCLEARPOWER&&law[LAW_NUCLEARPOWER]==2)continue; // Nuclear power banned
2018 if(ns->view==VIEW_ANIMALRESEARCH&&law[LAW_ANIMALRESEARCH]==2)continue; // Animal research banned
2019 if(ns->view==VIEW_POLICEBEHAVIOR&&law[LAW_POLICEBEHAVIOR]==2)continue; // Police corruption eliminated
2020 if(ns->view==VIEW_INTELLIGENCE&&law[LAW_PRIVACY]==2)continue; // Privacy rights respected
2021 if(ns->view==VIEW_SWEATSHOPS&&law[LAW_LABOR]==2)continue; // Sweatshops nonexistant
2022 if(ns->view==VIEW_POLLUTION&&law[LAW_POLLUTION]>=1)continue; // Pollution under control
2023 if(ns->view==VIEW_CORPORATECULTURE&&law[LAW_CORPORATE]==2)continue; // Regulation controls corporate corruption
2024 if(ns->view==VIEW_CEOSALARY&&law[LAW_CORPORATE]==2)continue; // CEOs aren't rich
2026 if(ns->view==VIEW_WOMEN&&law[LAW_ABORTION]<2)continue; // Partial birth abortion banned
2027 if(ns->view==VIEW_AMRADIO&&law[LAW_FREESPEECH]==-2)continue; // AM Radio is censored to oblivion
2028 if(ns->view==VIEW_ANIMALRESEARCH&&law[LAW_ANIMALRESEARCH]==2)continue; // Animal research banned
2034 if(ns->positive) change_public_opinion(ns->view,20,0);
2035 else change_public_opinion(ns->view,-20,0);
2036 public_interest[ns->view]+=50;
2040 int liberal_guardian_writing_power()
2043 for(int i=0;i<len(pool);i++)
2045 if(pool[i]->alive&&pool[i]->activity.type==ACTIVITY_WRITE_GUARDIAN)
2047 if(pool[i]->location!=-1&&
2048 location[pool[i]->location]->compound_walls & COMPOUND_PRINTINGPRESS)
2050 pool[i]->train(SKILL_WRITING,LCSrandom(3)); // Experience gain
2051 power+=pool[i]->skill_roll(SKILL_WRITING); // Record the writer on this topic
2052 criminalize(*pool[i],LAWFLAG_SPEECH); // Record possibly illegal speech activity
2054 else pool[i]->activity.type=ACTIVITY_NONE;
2060 newsstoryst* ccs_strikes_story()
2062 newsstoryst *ns=new newsstoryst;
2064 // Chance of CCS squad wipe
2065 if(LCSrandom(10))ns->type=NEWSSTORY_CCS_SITE;
2066 else ns->type=NEWSSTORY_CCS_KILLED_SITE;
2068 // Chance of positive CCS story
2072 ns->loc=LCSrandom(len(location));
2073 } while(location[ns->loc]->renting!=-1);
2078 newsstoryst* ccs_exposure_story()
2080 newsstoryst* ns=new newsstoryst;
2081 ns->type=NEWSSTORY_CCS_NOBACKERS;
2083 ccsexposure=CCSEXPOSURE_NOBACKERS;
2084 // arrest seventeen representatives and eight senators
2085 int arrestsleft = 8;
2086 for(int i=0; i<SENATENUM; i++)
2088 if((senate[i]==-2 || senate[i]==-1)&&!LCSrandom(4))
2090 senate[i]=ALIGN_ELITELIBERAL;
2092 if(arrestsleft<=0) break;
2096 for(int i=0; i<HOUSENUM; i++)
2098 if((house[i]==-2 || house[i]==-1)&&!LCSrandom(4))
2100 house[i]=ALIGN_ELITELIBERAL;
2102 if(arrestsleft<=0) break;
2105 // change police regulation issue to be more liberal
2106 law[LAW_POLICEBEHAVIOR] += 2;
2107 if(law[LAW_POLICEBEHAVIOR] > ALIGN_ELITELIBERAL)
2108 law[LAW_POLICEBEHAVIOR] = ALIGN_ELITELIBERAL;
2109 change_public_opinion(VIEW_POLICEBEHAVIOR,50);
2110 change_public_opinion(VIEW_CONSERVATIVECRIMESQUAD,50);
2115 newsstoryst* ccs_fbi_raid_story()
2117 newsstoryst* ns=new newsstoryst;
2118 ns->type=NEWSSTORY_CCS_DEFEATED;
2120 endgamestate=ENDGAME_CCS_DEFEATED;
2121 // arrest or kill ccs sleepers
2122 for(int p=0;p<len(pool);p++)
2124 if(pool[p]->flag&CREATUREFLAG_SLEEPER)
2126 if(pool[p]->type==CREATURE_CCS_VIGILANTE||pool[p]->type==CREATURE_CCS_ARCHCONSERVATIVE||
2127 pool[p]->type==CREATURE_CCS_MOLOTOV||pool[p]->type==CREATURE_CCS_SNIPER)
2129 pool[p]->flag&=~CREATUREFLAG_SLEEPER;
2130 criminalize(*pool[p],LAWFLAG_RACKETEERING);
2131 capturecreature(*pool[p]);
2135 // hide ccs safehouses
2136 for(int l=0;l<len(location);l++)
2138 if(location[l]->renting==RENTING_CCS)
2140 location[l]->renting=RENTING_NOCONTROL;
2141 location[l]->hidden=true;
2144 // go militarized police
2145 change_public_opinion(VIEW_POLICEBEHAVIOR,-20);