ONEWSGER.cpp 41 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686
  1. /*
  2. * Seven Kingdoms: Ancient Adversaries
  3. *
  4. * Copyright 1997,1998 Enlight Software Ltd.
  5. *
  6. * This program is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation, either version 2 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  18. *
  19. */
  20. //Filename : ONEWS3.CPP
  21. //Description : Object news msg generating routines
  22. #ifdef GERMAN
  23. #include <OSTR.h>
  24. #include <OTOWN.h>
  25. #include <OFIRMRES.h>
  26. #include <ONATION.h>
  27. #include <OUNIT.h>
  28. #include <OSPY.h>
  29. #include <OFONT.h>
  30. #include <OTECHRES.h>
  31. #include <OMONSRES.h>
  32. #include <OREMOTE.h>
  33. #include <OGODRES.h>
  34. #include <ORACERES.h>
  35. #include <OTALKRES.h>
  36. #include <ONEWS.h>
  37. //--------- Define variable type ----------//
  38. typedef void (News::*NewsFP)();
  39. //-------- Define struct NewsInfo -------//
  40. struct NewsInfo
  41. {
  42. NewsFP news_function_ptr;
  43. char is_major; // whether this is a major news or not
  44. };
  45. //------ Define function pointers array ------//
  46. static NewsInfo news_info_array[] =
  47. {
  48. { &News::diplomacy, 1 },
  49. { &News::town_rebel, 1 },
  50. { &News::migrate, 0 },
  51. { &News::new_nation, 1 },
  52. { &News::nation_destroyed, 1 },
  53. { &News::nation_surrender, 1 },
  54. { &News::king_die, 1 },
  55. { &News::new_king, 1 },
  56. { &News::firm_destroyed, 0 },
  57. { &News::firm_captured, 0 },
  58. { &News::town_destroyed, 0 },
  59. { &News::town_abandoned, 0 },
  60. { &News::town_surrendered, 0 },
  61. { &News::monster_king_killed, 0 },
  62. { &News::monster_firm_destroyed, 0 },
  63. { &News::scroll_acquired, 1 },
  64. { &News::monster_gold_acquired, 0 },
  65. { &News::your_spy_killed, 1 },
  66. { &News::enemy_spy_killed, 1 },
  67. { &News::unit_betray, 1 },
  68. { &News::unit_assassinated, 1 },
  69. { &News::assassinator_caught, 1 },
  70. { &News::general_die, 1 },
  71. { &News::raw_exhaust, 1 },
  72. { &News::tech_researched, 1 },
  73. { &News::lightning_damage, 1 },
  74. { &News::earthquake_damage, 1 },
  75. { &News::goal_deadline, 1 },
  76. { &News::weapon_ship_worn_out, 0 },
  77. { &News::firm_worn_out, 0 },
  78. { &News::chat_msg, 1 },
  79. { &News::multi_retire, 1 },
  80. { &News::multi_quit_game, 1 },
  81. { &News::multi_save_game, 1 },
  82. { &News::multi_connection_lost, 1 },
  83. };
  84. //------- Define static variables --------//
  85. static String str;
  86. static char firm_gender(short firmId)
  87. {
  88. switch(firmId)
  89. {
  90. case FIRM_FACTORY:
  91. case FIRM_CAMP:
  92. case FIRM_MINE:
  93. case FIRM_WAR_FACTORY:
  94. return 1;
  95. }
  96. return 0;
  97. }
  98. //------ Begin of function News::msg -----//
  99. //
  100. // Return the msg string of current news.
  101. //
  102. char* News::msg()
  103. {
  104. NewsFP newsFP = news_info_array[id-1].news_function_ptr;
  105. (this->*newsFP)(); // call the corrsponding function to return the news msg
  106. return str;
  107. }
  108. //------- End of function News::msg -----//
  109. //------ Begin of function News::is_major -----//
  110. //
  111. // Whether this is a major news or not.
  112. //
  113. int News::is_major()
  114. {
  115. if( id==NEWS_TOWN_REBEL )
  116. {
  117. //-- only rebellions happening in the player's village are considered as major news --//
  118. return nation_array.player_recno &&
  119. nation_name_id1 == (~nation_array)->nation_name_id;
  120. }
  121. else
  122. {
  123. return news_info_array[id-1].is_major;
  124. }
  125. }
  126. //------- End of function News::is_major -----//
  127. //------ Begin of function News::diplomacy -----//
  128. //
  129. // Diplomatic messages from other nations.
  130. //
  131. // short_para1 = the recno of TalkMsg in talk_res.talk_msg_array.
  132. //
  133. void News::diplomacy()
  134. {
  135. err_when( talk_res.is_talk_msg_deleted(short_para1) );
  136. TalkMsg* talkMsgPtr = talk_res.get_talk_msg(short_para1);
  137. str = talkMsgPtr->msg_str(nation_array.player_recno);
  138. }
  139. //------- End of function News::diplomacy -----//
  140. //------ Begin of function News::town_rebel -----//
  141. //
  142. // Generate a news that a firm is built
  143. //
  144. // nation_name1() - the name of the nation the rebel took place.
  145. //
  146. // short_para1 = the town name id.
  147. // short_para2 = no. of rebels
  148. //
  149. void News::town_rebel()
  150. {
  151. //---------------- Text Format -----------------//
  152. //
  153. // <no. of rebel> Peasants in <town name> in
  154. // <nation name> is/are rebelling.
  155. //
  156. //----------------------------------------------//
  157. //
  158. // <no. of rebel> Bauern aus <town name> in
  159. // <nation name> rebellieren. // No more 'is/are', just only: 'rebellieren'.
  160. //
  161. //----------------------------------------------//
  162. err_when( short_para2 < 1 );
  163. str = short_para2;
  164. str += " Bauern aus ";
  165. str += town_res.get_name(short_para1);
  166. str += " in ";
  167. str += nation_name1();
  168. str += " rebellieren.";
  169. }
  170. //------- End of function News::town_rebel -----//
  171. //------ Begin of function News::migrate -------//
  172. //
  173. // nation_name1() - from nation
  174. // nation_name2() - to nation
  175. //
  176. // short_para1 = the town name id. that the worker migrates from
  177. // short_para2 = the town name id. that the worker migrates to
  178. // short_para3 = race id. of the migrated worker/peasant
  179. // short_para4 = no. of people migrated
  180. // short_para5 = the firm id. that the worker works for
  181. //
  182. void News::migrate()
  183. {
  184. //---------------- Text Format -----------------//
  185. //
  186. // A <racial> <worker name>/Peasant has emigrated from your
  187. // village of <town name> to <town name> in <nation name>.
  188. //
  189. // A <racial> <worker name>/Peasant has immigrated from
  190. // <town name> in <nation name> to your village of <town name>.
  191. //
  192. //----------------------------------------------//
  193. //
  194. // Der <racial> <worker name>/Bauer übersiedelte aus Ihrem
  195. // Dorf <town name> nach <town name> in <nation name>.
  196. //
  197. // Der <racial> <worker name>/Bauer übersiedelte aus
  198. // <town name> in <nation name> in Ihr Dorf <town name>.
  199. //
  200. //----------------------------------------------//
  201. // BUGHERE : Is <n> <racial> correct?
  202. if( short_para4 == 1 )
  203. str = "Der";
  204. else
  205. str = m.format(short_para4);
  206. str += " ";
  207. str += race_res[short_para3]->name;
  208. str += " ";
  209. if( short_para5 )
  210. str += firm_res[short_para5]->worker_title;
  211. else
  212. str += "Bauer";
  213. str += " übersiedelte aus ";
  214. //------------------------------------//
  215. if( nation_array.player_recno && nation_name_id1 == (~nation_array)->nation_name_id ) // from player nation to another nation
  216. {
  217. str += "Ihrem Dorf ";
  218. str += town_res.get_name(short_para1);
  219. str += " nach ";
  220. str += town_res.get_name(short_para2);
  221. if( nation_name_id2 ) // only if it is not an independent town
  222. {
  223. str += " in ";
  224. str += nation_name2();
  225. }
  226. str += ".";
  227. }
  228. else
  229. {
  230. str += town_res.get_name(short_para1);
  231. if( nation_name_id1 )
  232. {
  233. str += " in ";
  234. str += nation_name1();
  235. }
  236. str += " in Ihr Dorf ";
  237. str += town_res.get_name(short_para2);
  238. str += ".";
  239. }
  240. }
  241. //------- End of function News::migrate --------//
  242. //------ Begin of function News::new_nation -----//
  243. //
  244. // king_name1() - name of the king of the new kingdom.
  245. //
  246. void News::new_nation()
  247. {
  248. //---------------- Text Format -----------------//
  249. //
  250. // A new Kingdom has emerged under the leadership of <king Name>.
  251. //
  252. //----------------------------------------------//
  253. //
  254. // Ein neues Königreich unter der Führung von <king Name>
  255. // wurde ausgerufen.
  256. //
  257. //----------------------------------------------//
  258. str = "Ein neues Königreich unter der Führung von ";
  259. str += king_name1(1);
  260. str += " wurde ausgerufen.";
  261. }
  262. //------- End of function News::new_nation -----//
  263. //------ Begin of function News::nation_destroyed -----//
  264. //
  265. // nation_name1() - name of the destroyed nation.
  266. //
  267. void News::nation_destroyed()
  268. {
  269. //---------------- Text Format -----------------//
  270. //
  271. // <King>'s Kingdom has been destroyed.
  272. //
  273. //----------------------------------------------//
  274. //
  275. // <King>'s Königreich wurde vernichtet.
  276. //
  277. //----------------------------------------------//
  278. str = nation_name1();
  279. str += " wurde vernichtet.";
  280. }
  281. //------- End of function News::nation_destroyed -----//
  282. //------ Begin of function News::nation_surrender -----//
  283. //
  284. // nation_name1() - name of the surrendering nation.
  285. // nation_name2() - name of the nation to surrender.
  286. //
  287. void News::nation_surrender()
  288. {
  289. //---------------- Text Format -----------------//
  290. //
  291. // <King>'s Kingdom has surrendered to <King B>'s Kingdom.
  292. //
  293. // <King>'s Kingdom has surrendered to you.
  294. //
  295. //----------------------------------------------//
  296. //
  297. // <King>'s Königreich kapitulierte vor <King B>'s Königreich.
  298. //
  299. // <King>'s Königreich kapitulierte vor Ihnen.
  300. //
  301. //----------------------------------------------//
  302. str = nation_name1();
  303. str += " kapitulierte vor ";
  304. if( nation_array.player_recno && nation_name_id2 == (~nation_array)->nation_name_id )
  305. {
  306. str += "Ihnen.";
  307. }
  308. else
  309. {
  310. str += nation_name2();
  311. str += ".";
  312. }
  313. }
  314. //------- End of function News::nation_surrender -----//
  315. //------ Begin of function News::king_die -----//
  316. //
  317. // king_name1() - the nation whose king has died.
  318. //
  319. void News::king_die()
  320. {
  321. //---------------- Text Format -----------------//
  322. //
  323. // Your King, <king name>, has been slain.
  324. //
  325. // OR
  326. //
  327. // King <king name> of <nation name> has been slain.
  328. //
  329. //----------------------------------------------//
  330. //
  331. // Ihr König <king name> wurde getötet.
  332. //
  333. // OR
  334. //
  335. // König <king name> von <nation name> wurde getötet.
  336. //
  337. //----------------------------------------------//
  338. if( nation_array.player_recno && nation_name_id1 == (~nation_array)->nation_name_id )
  339. {
  340. str = "Ihr König ";
  341. str += king_name1();
  342. str += " wurde getötet.";
  343. }
  344. else
  345. {
  346. str = "König ";
  347. str += king_name1();
  348. str += " von ";
  349. str += nation_name1();
  350. str += " wurde getötet.";
  351. }
  352. }
  353. //------- End of function News::king_die -----//
  354. //------ Begin of function News::new_king -----//
  355. //
  356. // nation_name1() - name of the nation where there is a new king.
  357. //
  358. // short_para1 - race id. of the new king.
  359. // short_para2 - name id. of the new king.
  360. //
  361. void News::new_king()
  362. {
  363. //---------------- Text Format -----------------//
  364. //
  365. // <unit name> has ascended the throne as your new King.
  366. //
  367. // OR
  368. //
  369. // <unit name> has ascended the throne as the new King of
  370. // <nation name>.
  371. //
  372. //----------------------------------------------//
  373. //
  374. // <unit name> bestieg als Ihr neuer König den Thron.
  375. //
  376. // OR
  377. //
  378. // <unit name> bestieg als neuer König von
  379. // <nation name> den Thron.
  380. //
  381. //----------------------------------------------//
  382. str = race_res[short_para1]->get_name(short_para2);
  383. if( nation_array.player_recno && nation_name_id1 == (~nation_array)->nation_name_id )
  384. {
  385. str += " bestieg als Ihr neuer König den Thron.";
  386. }
  387. else
  388. {
  389. str += " bestieg als neuer König von ";
  390. str += nation_name1();
  391. str += " den Thron.";
  392. }
  393. }
  394. //------- End of function News::new_king -----//
  395. //------ Begin of function News::firm_destroyed -----//
  396. //
  397. // short_para1 - name id. of the firm destroyed.
  398. // short_para2 - id of the town where the firm is located.
  399. // short_para3 - destroyer type: 1 - a nation, 2 - rebels, 3 - Fryhtans.
  400. //
  401. void News::firm_destroyed()
  402. {
  403. //---------------- Text Format -----------------//
  404. //
  405. // Your <firm type> near <town name> has been destroyed by <kingdom name>.
  406. // Your <firm type> near <town name> has been destroyed by Rebels.
  407. // Your <firm type> near <town name> has been destroyed by Fryhtans.
  408. //
  409. //----------------------------------------------//
  410. //
  411. // Ihr(e) <firm type> nahe <town name> wurde von <kingdom name> zerstört.
  412. // Ihr(e) <firm type> nahe <town name> wurde von Rebellen zerstört.
  413. // Ihr(e) <firm type> nahe <town name> wurde von Morghouls zerstört.
  414. //
  415. //----------------------------------------------//
  416. str = firm_gender(short_para1) ? (char*)"Ihre " : (char*)"Ihr ";
  417. str += firm_res[short_para1]->name;
  418. str += " nahe ";
  419. str += town_res.get_name(short_para2);
  420. str += " wurde";
  421. switch( short_para2 )
  422. {
  423. case DESTROYER_NATION:
  424. str += " von ";
  425. str += nation_name2();
  426. break;
  427. case DESTROYER_REBEL:
  428. str += " von Rebellen";
  429. break;
  430. case DESTROYER_MONSTER:
  431. str += " von Morghouls";
  432. break;
  433. case DESTROYER_UNKNOWN:
  434. break;
  435. }
  436. str += " zerstört.";
  437. }
  438. //------- End of function News::firm_destroyed -----//
  439. //------ Begin of function News::firm_captured -----//
  440. //
  441. // nation_name2() - name of the nation that took over your firm.
  442. //
  443. // short_para1 - id. of the firm took over
  444. // short_para2 - id of the town where the firm is located.
  445. // short_para3 - whether the capturer of the firm is a spy.
  446. //
  447. void News::firm_captured()
  448. {
  449. //---------------- Text Format -----------------//
  450. //
  451. // Your <firm type> near <town name> has been
  452. // captured by <kingdom name>.
  453. //
  454. // If the capturer is a spy:
  455. //
  456. // Your <firm type> near <town name> has been
  457. // captured by a spy from <kingdom name>.
  458. //
  459. //----------------------------------------------//
  460. //
  461. // Ihr/e <firm type> nahe <town name> wurde von
  462. // <kingdom name> erobert.
  463. //
  464. // If the capturer is a spy: // Falls der Eroberer ein Spion ist: (need to be translated?)
  465. //
  466. // Ihr/e <firm type> nahe <town name> wurde von
  467. // einem Spion aus <kingdom name> übernommen.
  468. //
  469. //----------------------------------------------//
  470. str = firm_gender(short_para1) ? (char*)"Ihre " : (char*)"Ihr ";
  471. str += firm_res[short_para1]->name;
  472. str += " nahe ";
  473. str += town_res.get_name(short_para2);
  474. str += " wurde von ";
  475. if( short_para3 )
  476. {
  477. str += "einem Spion aus ";
  478. str += nation_name2();
  479. str += " übernommen.";
  480. }
  481. else
  482. {
  483. str += nation_name2();
  484. str += " erobert.";
  485. }
  486. }
  487. //------- End of function News::firm_captured -----//
  488. //------ Begin of function News::town_destroyed -----//
  489. //
  490. // short_para1 - name id. of the town
  491. // short_para2 - destroyer type
  492. //
  493. void News::town_destroyed()
  494. {
  495. //---------------- Text Format -----------------//
  496. //
  497. // Your village of <name name> has been destroyed by <kingdom name>.
  498. // Your village of <name name> has been destroyed by Rebels.
  499. // Your village of <name name> has been destroyed by Fryhtans.
  500. //
  501. //----------------------------------------------//
  502. //
  503. // Ihr Dorf <name name> wurde von <kingdom name> zerstört.
  504. // Ihr Dorf <name name> wurde von Rebellen zerstört.
  505. // Ihr Dorf <name name> wurde von Morghouls zerstört.
  506. //
  507. //----------------------------------------------//
  508. str = "Ihr Dorf ";
  509. str += town_res.get_name(short_para1);
  510. str += " wurde";
  511. switch( short_para2 )
  512. {
  513. case DESTROYER_NATION:
  514. str += " von ";
  515. str += nation_name2();
  516. break;
  517. case DESTROYER_REBEL:
  518. str += " von Rebellen";
  519. break;
  520. case DESTROYER_MONSTER:
  521. str += " von Morghouls";
  522. break;
  523. case DESTROYER_UNKNOWN:
  524. break;
  525. }
  526. str += " zerstört.";
  527. }
  528. //------- End of function News::town_destroyed -----//
  529. //------ Begin of function News::town_abandoned -----//
  530. //
  531. // short_para1 - name id of the town
  532. //
  533. void News::town_abandoned()
  534. {
  535. //---------------- Text Format -----------------//
  536. //
  537. // Your village of <village name> has been abandoned by
  538. // its people.
  539. //
  540. //----------------------------------------------//
  541. //
  542. // Ihr Dorf <village name> wurde von seinen Bewohnern
  543. // verlassen.
  544. //
  545. //----------------------------------------------//
  546. str = "Ihr Dort ";
  547. str += town_res.get_name(short_para1);
  548. str += " wurde von seinen Bewohnern verlassen.";
  549. }
  550. //------- End of function News::town_abandoned -----//
  551. //------ Begin of function News::town_surrendered -----//
  552. //
  553. // short_para1 - name id. of the surrendering town.
  554. //
  555. // nation_name1() - name of the nation the town surrenders to.
  556. // nation_name2() - name of the nation of the surrendering town.
  557. //
  558. void News::town_surrendered()
  559. {
  560. //---------------- Text Format -----------------//
  561. //
  562. // The village of <village name> in <King's Kingdom> has
  563. // surrendered to you.
  564. //
  565. // The independent village of <village name> has
  566. // surrendered to you.
  567. //
  568. // Your village of <village name> has surrendered
  569. // to <King's Kingdom>.
  570. //
  571. //----------------------------------------------//
  572. //
  573. // Das Dorf <village name> in <King's Kingdom> hat
  574. // vor Ihnen kapituliert.
  575. //
  576. // Das unabhängige Dorf <village name> hat vor Ihnen
  577. // kapituliert.
  578. //
  579. // Ihr Dorf <village name> hat vor <King's Kingdom>
  580. // kapituliert.
  581. //
  582. //----------------------------------------------//
  583. if( nation_array.player_recno && nation_name_id2 == (~nation_array)->nation_name_id )
  584. {
  585. str = "Ihr Dorf ";
  586. str += town_res.get_name(short_para1);
  587. str += " hat vor ";
  588. str += nation_name1();
  589. str += " kapituliert.";
  590. }
  591. else if( nation_name_id2 )
  592. {
  593. str = "Das Dorf ";
  594. str += town_res.get_name(short_para1);
  595. str += " in ";
  596. str += nation_name2();
  597. str += " hat vor Ihnen kapituliert.";
  598. }
  599. else // nation_name_id2 == 0, it's an independent town
  600. {
  601. str = "Das unabhängige Dorf ";
  602. str += town_res.get_name(short_para1);
  603. str += " hat vor Ihnen kapituliert.";
  604. }
  605. }
  606. //------- End of function News::town_surrendered -----//
  607. //------ Begin of function News::monster_king_killed -----//
  608. //
  609. // short_para1 - monster id.
  610. //
  611. void News::monster_king_killed()
  612. {
  613. //---------------- Text Format -----------------//
  614. //
  615. // An All High <monster type name> has been slain.
  616. //
  617. //----------------------------------------------//
  618. //
  619. // Der <monster type name> König wurde getötet.
  620. //
  621. //----------------------------------------------//
  622. str = "Der ";
  623. str += monster_res[short_para1]->name;
  624. str += " König wurde getötet.";
  625. }
  626. //------- End of function News::monster_king_killed -----//
  627. //------ Begin of function News::monster_firm_destroyed -----//
  628. //
  629. // short_para1 - monster id.
  630. //
  631. void News::monster_firm_destroyed()
  632. {
  633. //---------------- Text Format -----------------//
  634. //
  635. // A <monster type name> Lair has been destroyed.
  636. //
  637. //----------------------------------------------//
  638. //
  639. // Ein <monster type name> Nest wurde zerstört.
  640. //
  641. //----------------------------------------------//
  642. char* nameStr = monster_res[short_para1]->name;
  643. str = "Ein ";
  644. str += nameStr;
  645. str += " Nest wurde zerstört.";
  646. }
  647. //------- End of function News::monster_firm_destroyed -----//
  648. //------ Begin of function News::scroll_acquired -----//
  649. //
  650. // nation_name1() - the nation that has acquired the scroll.
  651. //
  652. // short_para1 = the race id. of the scroll.
  653. //
  654. void News::scroll_acquired()
  655. {
  656. //---------------- Text Format -----------------//
  657. //
  658. // You have acquired the <race name> Scroll of Power.
  659. // <nation name> has acquired the <race name> Scroll of Power.
  660. //
  661. //----------------------------------------------//
  662. //
  663. // Sie haben die <race name> Schriftrolle der Macht erlangt.
  664. // <nation name> hat die <race name> Schriftrolle der Macht erlangt.
  665. //
  666. //----------------------------------------------//
  667. if( nation_array.player_recno && nation_name_id1 == (~nation_array)->nation_name_id )
  668. {
  669. str = "Sie haben die ";
  670. }
  671. else
  672. {
  673. str = nation_name1();
  674. str += " hat die ";
  675. }
  676. str += race_res[short_para1]->adjective;
  677. str += " Schriftrolle der Macht erlangt.";
  678. }
  679. //------- End of function News::scroll_acquired -----//
  680. //------ Begin of function News::monster_gold_acquired -----//
  681. //
  682. // nation_name1() - the nation that has acquired the monster treasure.
  683. //
  684. // short_para1 = amount of gold.
  685. //
  686. void News::monster_gold_acquired()
  687. {
  688. //---------------- Text Format -----------------//
  689. //
  690. // Your have recovered <treasure amount> worth of treasure from the Fryhtans.
  691. //
  692. //----------------------------------------------//
  693. //
  694. // Sie haben einen Schatz in Höhe von <treasure amount> von den Morghouls erobert.
  695. //
  696. //----------------------------------------------//
  697. str = "Sie haben einen Schatz in Höhe von ";
  698. str += m.format(short_para1,2);
  699. str += " von den Morghouls erobert.";
  700. }
  701. //------- End of function News::monster_gold_acquired -----//
  702. //------ Begin of function News::your_spy_killed -----//
  703. //
  704. // nation_name1() - your nation.
  705. // nation_name2() - the nation that killed your spy.
  706. //
  707. // short_para1 - firm id. if it's a firm
  708. // 0 if it's a town
  709. // race id if spy place == SPY_MOBILE
  710. // short_para2 - the town id.
  711. // name id if spy place == SPY_MOBILE
  712. // short_para3 - spy place
  713. //
  714. void News::your_spy_killed()
  715. {
  716. //---------------- Text Format -----------------//
  717. //
  718. // Your spy has been exposed and executed on his mission to
  719. // <village name> [ in <nation name> ]. (no nation name for independent town.)
  720. //
  721. // Your spy has been exposed and executed on his mission to
  722. // a <firm type name> near <village name> in <nation name>.
  723. //
  724. // Your spy <spy name> has been exposed and executed on his mission to
  725. // <nation name>.
  726. //
  727. //----------------------------------------------//
  728. //
  729. // Ihr Spion wurde in <village name> [ in <nation name> ].
  730. // ertappt und hingerichtet. (no nation name for independent town.) // <<< ... your own remark!
  731. //
  732. // Ihr Spion wurde in <firm type name> nahe <village name> in
  733. // <nation name> ertappt und hingerichtet.
  734. //
  735. // Ihr Spion <spy name> wurde auf seiner Mission in <nation name>
  736. // ertappt und hingerichtet.
  737. //
  738. //----------------------------------------------//
  739. if( short_para3 == SPY_FIRM )
  740. {
  741. str = "Ihr Spion wurde in ";
  742. str += firm_res[short_para1]->name;
  743. str += " nahe ";
  744. str += town_res.get_name(short_para2);
  745. if( nation_name_id2 ) // not for independent town.
  746. {
  747. str += " in ";
  748. str += nation_name2();
  749. }
  750. }
  751. else if( short_para3 == SPY_TOWN )
  752. {
  753. str = "Ihr Spion wurde in ";
  754. str += town_res.get_name(short_para2);
  755. if( nation_name_id2 ) // not for independent town.
  756. {
  757. str += " in ";
  758. str += nation_name2();
  759. }
  760. }
  761. else if( short_para3 == SPY_MOBILE )
  762. {
  763. str = "Ihr Spion ";
  764. str += race_res[short_para1]->get_name(short_para2);
  765. str += " wurde auf seiner Mission";
  766. if( nation_name_id2 ) // not for independent town.
  767. {
  768. str += " to ";
  769. str += nation_name2();
  770. }
  771. }
  772. str += " ertappt und hingerichtet.";
  773. }
  774. //------- End of function News::your_spy_killed -----//
  775. //------ Begin of function News::enemy_spy_killed -----//
  776. //
  777. // nation_name1() - your nation.
  778. // nation_name2() - the nation that the spy belongs to.
  779. //
  780. // short_para1 - firm id. if it's a firm
  781. // 0 if it's a town
  782. // short_para2 - town name id. if it's a town
  783. // 0 if it's a firm
  784. // short_para3 - id of the town where the firm is located.
  785. //
  786. void News::enemy_spy_killed()
  787. {
  788. //---------------- Text Format -----------------//
  789. //
  790. // A spy from <kingdom> has been uncovered and executed in your
  791. // <firm type> near <town name>.
  792. //
  793. // A spy from <kingdom> has been uncovered and executed in your
  794. // village of <town name>.
  795. //
  796. // Spy <spy name> from <kingdom> has been uncovered and executed.
  797. //
  798. //----------------------------------------------//
  799. //
  800. // Ein Spion aus <kingdom> wurde entlarvt und in
  801. // <firm type> nahe <town name> hingerichtet.
  802. //
  803. // Ein Spion aus <kingdom> wurde in Ihrem Dorf <town name>
  804. // entlarvt und hingerichtet. Friede seiner Asche.
  805. //
  806. // Spion <spy name> aus <kingdom> wurde entlarvt und hingerichtet.
  807. //
  808. //----------------------------------------------//
  809. if( short_para3==SPY_FIRM || short_para3==SPY_TOWN )
  810. {
  811. str = "Ein Spion aus ";
  812. str += nation_name2();
  813. str += " wurde";
  814. if( short_para3==SPY_FIRM )
  815. {
  816. str += " entlarvt und in ";
  817. str += firm_res[short_para1]->name;
  818. str += " nahe ";
  819. str += town_res.get_name(short_para2);
  820. str += " hingerichtet.";
  821. }
  822. else
  823. {
  824. str += " in Ihrem Dorf ";
  825. str += town_res.get_name(short_para2);
  826. str += " entlarvt und hingerichtet. Friede seiner Asche.";
  827. }
  828. }
  829. else
  830. {
  831. err_when( short_para3 != SPY_MOBILE );
  832. str = "Spion ";
  833. str += race_res[short_para1]->get_name(short_para2);
  834. str += " aus ";
  835. str += nation_name2();
  836. str += " wurde entlarvt und hingerichtet.";
  837. }
  838. }
  839. //------- End of function News::enemy_spy_killed -----//
  840. //------ Begin of function News::unit_betray -----//
  841. //
  842. // Only for mobile units or generals in command base.
  843. //
  844. // nation_name1() - the nation that the unit originally belongs to.
  845. // nation_name2() - the nation that the unit has turned towards.
  846. //
  847. // short_para1 - race id. of the unit
  848. // short_para2 - name id. of the unit
  849. // short_para3 - rank id. of the unit
  850. //
  851. void News::unit_betray()
  852. {
  853. //---------------- Text Format -----------------//
  854. //
  855. // [General] <unit name> has betrayed you and turned towards
  856. // <nation name>.
  857. //
  858. // [General] <unit name> has renounced you and become independent.
  859. //
  860. // [General] <unit name> of <nation name> has defected to your
  861. // forces.
  862. //
  863. // Independent unit <unit name> has joined your forces.
  864. //
  865. //----------------------------------------------//
  866. //
  867. // [General] <unit name> hat Sie verraten und flüchtete nach
  868. // <nation name>.
  869. //
  870. // [General] <unit name> hat Sie verlassen und wurde zum
  871. // Freibürger.
  872. //
  873. // [General] <unit name> aus <nation name> ist zu Ihrer Armee
  874. // übergelaufen.
  875. //
  876. // Der Freibürger <unit name> ist Ihrer Armee beigetreten.
  877. //
  878. //----------------------------------------------//
  879. // BUGHERE : General is German?
  880. if( nation_name_id1 == 0 ) // independent unit joining your force
  881. {
  882. str = "Der Freibürger ";
  883. str += race_res[short_para1]->get_name(short_para2);
  884. str += " ist Ihrer Armee beigetreten.";
  885. return;
  886. }
  887. //------------------------------------//
  888. if( short_para3==RANK_GENERAL )
  889. str = "General ";
  890. else
  891. str = "";
  892. str += race_res[short_para1]->get_name(short_para2);
  893. //---------------------------------//
  894. if( nation_name_id2 == 0 ) // became an independent unit
  895. {
  896. str += " hat Sie verlassen und wurde zum Freibürger.";
  897. }
  898. else
  899. {
  900. if( nation_array.player_recno && nation_name_id1 == (~nation_array)->nation_name_id )
  901. {
  902. str += " hat Sie verraten und flüchtete nach ";
  903. str += nation_name2();
  904. str += ".";
  905. }
  906. else
  907. {
  908. str += " aus ";
  909. str += nation_name1();
  910. str += " ist zu Ihrer Armee übergelaufen.";
  911. }
  912. }
  913. }
  914. //------- End of function News::unit_betray -----//
  915. //------ Begin of function News::general_die -----//
  916. //
  917. // short_para1 - race id. of your general
  918. // short_para2 - name id. of your general
  919. //
  920. void News::general_die()
  921. {
  922. //---------------- Text Format -----------------//
  923. //
  924. // Your general, <general name>, has been slain.
  925. //
  926. //----------------------------------------------//
  927. //
  928. // Ihr General <general name> wurde getötet. Friede seiner Asche.
  929. //
  930. //----------------------------------------------//
  931. str = "Ihr General ";
  932. str += race_res[short_para1]->get_single_name( (WORD)short_para2 );
  933. str += " wurde getötet. Friede seiner Asche.";
  934. }
  935. //------- End of function News::general_die -----//
  936. //------ Begin of function News::unit_assassinated -----//
  937. //
  938. // short_para1 - race id. of assassinated unit
  939. // short_para2 - name id. of assassinated unit
  940. // short_para3 - rank id. of assassinated unit
  941. // short_para4 - whether the enemy spy has been killed or not.
  942. //
  943. void News::unit_assassinated()
  944. {
  945. //---------------- Text Format -----------------//
  946. //
  947. // Your King, <king name>, has been assassinated by an enemy spy.
  948. // Your general, <general name>, has been assassinated by an enemy spy.
  949. //
  950. // [The enemy spy has been killed.]
  951. //
  952. //----------------------------------------------//
  953. //
  954. // Ihr König <king name> wurde von einem feindlichen Spion ermordet.
  955. // Ihr General <general name> wurde von einem feindlichen Spion ermordet.
  956. //
  957. // [Der feindliche Spion wurde liquidiert.]
  958. //
  959. //----------------------------------------------//
  960. if( short_para3 == RANK_KING )
  961. {
  962. str = "Ihr König ";
  963. str += race_res[short_para1]->get_single_name( (WORD)short_para2 );
  964. }
  965. else
  966. {
  967. str = "Ihr General ";
  968. str += race_res[short_para1]->get_single_name( (WORD)short_para2 );
  969. }
  970. str += " wurde von einem feindlichen Spion ermordet.";
  971. if( short_para4 )
  972. str += " Der feindliche Spion wurde liquidiert.";
  973. }
  974. //------- End of function News::unit_assassinated -----//
  975. //------ Begin of function News::assassinator_caught -----//
  976. //
  977. // short_para1 - rank id. of the assassinating target.
  978. //
  979. void News::assassinator_caught()
  980. {
  981. //---------------- Text Format -----------------//
  982. //
  983. // An enemy spy has been killed while attempting
  984. // to assassinate your King/General.
  985. //
  986. //----------------------------------------------//
  987. //
  988. // Ein feindlicher Spion wurde beim Attentatsversuch
  989. // auf Ihren König/General getötet.
  990. //
  991. //----------------------------------------------//
  992. str = "Ein feindlicher Spion wurde beim Attentatsversuch auf Ihren ";
  993. if( short_para1 == RANK_KING )
  994. str += "König getötet.";
  995. else
  996. str += "General getötet.";
  997. }
  998. //------- End of function News::assassinator_caught -----//
  999. //------ Begin of function News::raw_exhaust -----//
  1000. //
  1001. // short_para1 - raw id.
  1002. //
  1003. void News::raw_exhaust()
  1004. {
  1005. //---------------- Text Format -----------------//
  1006. //
  1007. // Your <raw type> Mine has exhausted its <raw type> deposit.
  1008. //
  1009. //----------------------------------------------//
  1010. //
  1011. // Der <raw type>-Vorrat Ihrer <raw type>-Mine ist erschöpft.
  1012. //
  1013. //----------------------------------------------//
  1014. str = "Der ";
  1015. str += raw_res[short_para1]->name;
  1016. str += "-Vorrat Ihrer ";
  1017. str += raw_res[short_para1]->name;
  1018. str += "-Mine ist erschöpft.";
  1019. }
  1020. //------- End of function News::raw_exhaust -----//
  1021. //------ Begin of function News::tech_researched -----//
  1022. //
  1023. // short_para1 - tech id.
  1024. // short_para2 - tech version.
  1025. //
  1026. void News::tech_researched()
  1027. {
  1028. //---------------- Text Format -----------------//
  1029. //
  1030. // Your scientists have finished their <technology>
  1031. // [Mark <version>] research.
  1032. //
  1033. //----------------------------------------------//
  1034. //
  1035. // Ihre Forscher beendeten erfolgreich die <technology>
  1036. // [Mark <version>] -Erforschung.
  1037. //
  1038. //----------------------------------------------//
  1039. str = "Ihre Forscher beendeten erfolgreich die ";
  1040. str += tech_res[short_para1]->tech_des();
  1041. if( tech_res[short_para1]->max_tech_level > 1 ) // if the tech has more than one level
  1042. {
  1043. str += " Mark ";
  1044. str += m.roman_number(short_para2);
  1045. }
  1046. str += " -Erforschung.";
  1047. }
  1048. //------- End of function News::tech_researched -----//
  1049. //------ Begin of function News::lightning_damage -----//
  1050. //
  1051. void News::lightning_damage()
  1052. {
  1053. //---------------- Text Format -----------------//
  1054. //
  1055. // Your <unit name> has been struck and injured/killed by lightning.
  1056. //
  1057. // Your <firm name> near <village name> has been struck/destroyed by lightning.
  1058. //
  1059. // Your village <village name> has been struck/destroyed by lightning.
  1060. //
  1061. //----------------------------------------------//
  1062. //
  1063. // Ihre Einheit <unit name> wurde vom Blitz getroffen und verletzt/getötet.
  1064. //
  1065. // Ihr(e) <firm name> nahe <village name> wurde vom Blitz getroffen/zerstört.
  1066. //
  1067. // Ihr Dorf <village name> wurde vom Blitz getroffen/zerstört.
  1068. //
  1069. //----------------------------------------------//
  1070. // str = "Your ";
  1071. switch( short_para1 )
  1072. {
  1073. case NEWS_LOC_UNIT:
  1074. // BUGHERE : German translation may not take care of General/King case
  1075. str = "Ihre Einheit ";
  1076. if( short_para4 == RANK_GENERAL )
  1077. str += "General ";
  1078. else if( short_para4 == RANK_KING )
  1079. str += "König ";
  1080. else
  1081. str += "";
  1082. if( short_para2 > 0 )
  1083. str += race_res[short_para2]->get_name((WORD) short_para3);
  1084. else
  1085. str += unit_res[short_para3]->name;
  1086. str += "wurde vom Blitz getroffen und ";
  1087. if( short_para5 )
  1088. str += "getötet.";
  1089. else
  1090. str += "verletzt";
  1091. break;
  1092. case NEWS_LOC_FIRM:
  1093. str = firm_gender(short_para2) ? (char*)"Ihre " : (char*)"Ihr ";
  1094. str += firm_res[short_para2]->name;
  1095. if( short_para3 )
  1096. {
  1097. str += " nahe ";
  1098. str += town_res.get_name(short_para3);
  1099. }
  1100. str += " wurde vom Blitz ";
  1101. if( short_para5 )
  1102. str += "getroffen.";
  1103. else
  1104. str += "zerstört.";
  1105. break;
  1106. case NEWS_LOC_TOWN:
  1107. str = "Ihr Dorf ";
  1108. str += town_res.get_name(short_para3);
  1109. str += " wurde vom Blitz ";
  1110. if( short_para5 )
  1111. str += "getroffen.";
  1112. else
  1113. str += "zerstört.";
  1114. break;
  1115. default:
  1116. err_here();
  1117. }
  1118. }
  1119. //------- End of function News::lightning_damage -----//
  1120. //------ Begin of function News::earthquake_damage -----//
  1121. //
  1122. void News::earthquake_damage()
  1123. {
  1124. //---------------- Text Format -----------------//
  1125. //
  1126. // <number> of your units has/have been injured and <number> killed
  1127. // in an earthquake.
  1128. //
  1129. // <number> of your villagers has/have been killed in an earthquake.
  1130. //
  1131. // <number> of your buildings has/have been damaged and <number> destroyed
  1132. // in an earthquake.
  1133. //
  1134. //----------------------------------------------//
  1135. //
  1136. // Bei einem Erdbeben wurde/wurden <number> Ihrer Einheiten verletzt und
  1137. // <number> getötet. // no more 'has/have' in the second time!
  1138. //
  1139. // <number> Ihrer Dorfbewohner wurde/wurden bei einem Erdbeben getötet.
  1140. //
  1141. // Bei einem Erdbeben wurde/wurden <number> Ihrer Gebäude beschädigt
  1142. // und <number> zerstört.
  1143. //
  1144. //----------------------------------------------//
  1145. int conjunction = 0;
  1146. str = "";
  1147. if( short_para1 == 1)
  1148. {
  1149. str += "Bei einem Erdbeben";
  1150. if( short_para2 <= 1)
  1151. str += " wurde ";
  1152. else
  1153. str += " wurden ";
  1154. str += short_para2;
  1155. str += " Ihrer Einheiten verletzt";
  1156. if( short_para3 > 0)
  1157. {
  1158. str += " und ";
  1159. str += short_para3;
  1160. str += " getötet";
  1161. }
  1162. str += ".";
  1163. }
  1164. else if( short_para1 == 2 )
  1165. {
  1166. if( short_para2 > 0)
  1167. {
  1168. str += short_para2;
  1169. str += " Ihrer Dorfbewohner";
  1170. if( short_para2 <= 1)
  1171. str += " wurde ";
  1172. else
  1173. str += " wurden ";
  1174. str += "bei einem Erdbeben getötet.";
  1175. }
  1176. }
  1177. else if( short_para1 == 3)
  1178. {
  1179. str += "Bei einem Erdbeben ";
  1180. if( short_para2 == 1)
  1181. str += " wurde ";
  1182. else
  1183. str += " wurden ";
  1184. str += short_para2;
  1185. str += " Ihrer Gebäude beschädigt";
  1186. if( short_para3 > 0)
  1187. {
  1188. str += " und ";
  1189. str += short_para3;
  1190. str += " zerstört";
  1191. }
  1192. str += ".";
  1193. }
  1194. else
  1195. err_here();
  1196. }
  1197. //------- End of function News::earthquake_damage -----//
  1198. //------ Begin of function News::goal_deadline -----//
  1199. //
  1200. // Display a warning message as the deadline of the goals approaches.
  1201. //
  1202. // short_para1 - years left before the deadline.
  1203. // short_para2 - months left before the deadline.
  1204. //
  1205. void News::goal_deadline()
  1206. {
  1207. //---------------- Text Format -----------------//
  1208. //
  1209. // Make haste! You have only <year> year[s] and <month> month[s]
  1210. // left to achieve your goal.
  1211. //
  1212. //----------------------------------------------//
  1213. //
  1214. // Sputen Sie sich! Sie haben nur noch <year> Jahr(e) und <month> Monat(e)
  1215. // übrig, um Ihr Ziel zu erreichen!
  1216. //
  1217. //----------------------------------------------//
  1218. str = "Sputen Sie sich! Sie haben nur noch ";
  1219. if( short_para1 )
  1220. {
  1221. str += short_para1;
  1222. if( short_para1 > 1 )
  1223. str += " Jahre";
  1224. else
  1225. str += " Jahr";
  1226. }
  1227. if( short_para1 && short_para2 )
  1228. str += " und ";
  1229. if( short_para2 )
  1230. {
  1231. str += short_para2;
  1232. if( short_para2 > 1 )
  1233. str += " Monate";
  1234. else
  1235. str += " Monat";
  1236. }
  1237. str += " übrig, um Ihr Ziel zu erreichen!";
  1238. }
  1239. //------- End of function News::goal_deadline -----//
  1240. //------ Begin of function News::weapon_ship_worn_out -----//
  1241. //
  1242. // Your weapon or ship worn out and destroyed due to lack of money for
  1243. // maintenance.
  1244. //
  1245. // short_para1 - unit id. of the weapon
  1246. // short_para2 - level of the weapon
  1247. //
  1248. void News::weapon_ship_worn_out()
  1249. {
  1250. //---------------- Text Format -----------------//
  1251. //
  1252. // A <weapon name> <weapon level> of yours has broken
  1253. // down due to the lack of maintenance funds.
  1254. //
  1255. //----------------------------------------------//
  1256. //
  1257. // Ihre <weapon name> <weapon level> ist wegen Mangel an
  1258. // Instandhaltungs-Budget kaputt gegangen.
  1259. //
  1260. //----------------------------------------------//
  1261. str = "Ihre ";
  1262. str += unit_res[short_para1]->name;
  1263. if( short_para2 )
  1264. {
  1265. str += " ";
  1266. str += m.roman_number(short_para2);
  1267. }
  1268. str += " ist wegen Mangel an Instandhaltungs-Budget kaputt gegangen.";
  1269. }
  1270. //------- End of function News::weapon_ship_worn_out -----//
  1271. //------ Begin of function News::firm_worn_out -----//
  1272. //
  1273. // short_para1 - id. of the firm destroyed.
  1274. // short_para2 - id of the town where the firm is located.
  1275. //
  1276. void News::firm_worn_out()
  1277. {
  1278. //---------------- Text Format -----------------//
  1279. //
  1280. // Your <firm type> near <town name> has fallen into
  1281. // disrepair due to the lack of maintenance funds.
  1282. //
  1283. //----------------------------------------------//
  1284. //
  1285. // Ihr(e) <firm type> nahe <town name> ist wegen Mangel an
  1286. // Instandhaltungs-Budget außer Betrieb.
  1287. //
  1288. //----------------------------------------------//
  1289. str = firm_gender(short_para1) ? (char*)"Ihre " : (char*)"Ihr ";
  1290. str += firm_res[short_para1]->name;
  1291. str += " nahe ";
  1292. str += town_res.get_name(short_para2);
  1293. str += " ist wegen Mangel an Instandhaltungs-Budget außer Betrieb.";
  1294. }
  1295. //------- End of function News::firm_worn_out -----//
  1296. //------ Begin of function News::chat_msg -----//
  1297. //
  1298. // short_para1 - id. of the chat msg in Info::remote_chat_str_array[]
  1299. //
  1300. // nation_name1() - the nation from which this chat message is sent.
  1301. //
  1302. void News::chat_msg()
  1303. {
  1304. str = info.remote_chat_array[short_para1-1].chat_str;
  1305. }
  1306. //------- End of function News::chat_msg -----//
  1307. //------ Begin of function News::multi_retire -----//
  1308. //
  1309. // This function is called when a human player retires.
  1310. //
  1311. // nation_name1() - the nation that has retired.
  1312. //
  1313. void News::multi_retire()
  1314. {
  1315. //---------------- Text Format -----------------//
  1316. //
  1317. // <Kingdom name> has retired and quited the game.
  1318. //
  1319. //----------------------------------------------//
  1320. //
  1321. // <Kingdom name> hat aufgegeben und das Spiel verlassen.
  1322. //
  1323. //----------------------------------------------//
  1324. str = nation_name1();
  1325. str += " hat aufgegeben und das Spiel verlassen.";
  1326. }
  1327. //------- End of function News::multi_retire -----//
  1328. //------ Begin of function News::multi_quit_game -----//
  1329. //
  1330. // This function is called when a human player quits the game.
  1331. //
  1332. void News::multi_quit_game()
  1333. {
  1334. //---------------- Text Format -----------------//
  1335. //
  1336. // <Kingdom name> has quited the game.
  1337. //
  1338. //----------------------------------------------//
  1339. //
  1340. // <Kingdom name> hat das Spiel verlassen.
  1341. //
  1342. //----------------------------------------------//
  1343. str = nation_name1();
  1344. str += " hat das Spiel verlassen.";
  1345. }
  1346. //------- End of function News::multi_quit_game -----//
  1347. //------ Begin of function News::multi_save_game -----//
  1348. //
  1349. // This function is called when a human player calls for saving the game.
  1350. //
  1351. void News::multi_save_game()
  1352. {
  1353. //---------------- Text Format -----------------//
  1354. //
  1355. // The current game has been saved to <file name>.
  1356. //
  1357. //----------------------------------------------//
  1358. //
  1359. // Das aktuelle Spiel wurde unter <file name> gespeichert.
  1360. //
  1361. //----------------------------------------------//
  1362. str = "Das aktuelle Spiel wurde unter ";
  1363. str += remote.save_file_name;
  1364. str += " gespeichert.";
  1365. }
  1366. //------- End of function News::multi_save_game -----//
  1367. //------ Begin of function News::multi_connection_lost -----//
  1368. //
  1369. // This function is called when a human player's connection has been lost.
  1370. //
  1371. void News::multi_connection_lost()
  1372. {
  1373. //---------------- Text Format -----------------//
  1374. //
  1375. // The connectino with <kingdom name> has been lost.
  1376. //
  1377. //----------------------------------------------//
  1378. //
  1379. // Die Verbindung zu <kingdom name> ist verlorengegangen.
  1380. //
  1381. //----------------------------------------------//
  1382. str = "Die Verbindung zu ";
  1383. str += nation_name1();
  1384. str += " ist verlorengegangen.";
  1385. }
  1386. //------- End of function News::multi_connection_lost -----//
  1387. //------ Begin of function News::nation_name1 -----//
  1388. //
  1389. char* News::nation_name1()
  1390. {
  1391. static String str;
  1392. if( nation_name_id1 < 0 ) // human player - custom name
  1393. str = nation_array.get_human_name(nation_name_id1, 1); // 1-first word of the name only
  1394. else
  1395. str = race_res[nation_race_id1]->get_single_name( (WORD)nation_name_id1 );
  1396. str += "'s Königreich";
  1397. //------ add color bar -------//
  1398. char colorCodeStr[] = " 0";
  1399. colorCodeStr[1] = FIRST_NATION_COLOR_CODE_IN_TEXT + nation_color1;
  1400. str += colorCodeStr;
  1401. return str;
  1402. }
  1403. //------- End of function News::nation_name1 -----//
  1404. //------ Begin of function News::nation_name2 -----//
  1405. //
  1406. char* News::nation_name2()
  1407. {
  1408. static String str;
  1409. if( nation_name_id2 < 0 ) // human player - custom name
  1410. str = nation_array.get_human_name(nation_name_id2, 1); // 1-first word of the name only
  1411. else
  1412. str = race_res[nation_race_id2]->get_single_name( (WORD)nation_name_id2 );
  1413. str += "'s Königreich";
  1414. //------ add color bar -------//
  1415. char colorCodeStr[] = " 0";
  1416. colorCodeStr[1] = FIRST_NATION_COLOR_CODE_IN_TEXT + nation_color2;
  1417. str += colorCodeStr;
  1418. return str;
  1419. }
  1420. //------- End of function News::nation_name2 -----//
  1421. //------ Begin of function News::king_name1 -----//
  1422. //
  1423. // [int] addColor - add color bar at the end of the king name
  1424. // (default: 0)
  1425. //
  1426. char* News::king_name1(int addColor)
  1427. {
  1428. static String str;
  1429. if( nation_name_id1 < 0 ) // human player - custom name
  1430. str = nation_array.get_human_name(nation_name_id1);
  1431. else
  1432. str = race_res[nation_race_id1]->get_name( (WORD)nation_name_id1 );
  1433. //------ add color bar -------//
  1434. if( addColor )
  1435. {
  1436. char colorCodeStr[] = " 0";
  1437. colorCodeStr[1] = FIRST_NATION_COLOR_CODE_IN_TEXT + nation_color1;
  1438. str += colorCodeStr;
  1439. }
  1440. return str;
  1441. }
  1442. //------- End of function News::king_name1 -----//
  1443. //------ Begin of function News::king_name2 -----//
  1444. //
  1445. // [int] addColor - add color bar at the end of the king name
  1446. // (default: 0)
  1447. //
  1448. char* News::king_name2(int addColor)
  1449. {
  1450. static String str;
  1451. if( nation_name_id2 < 0 ) // human player - custom name
  1452. str = nation_array.get_human_name(nation_name_id2);
  1453. else
  1454. str = race_res[nation_race_id2]->get_name( (WORD)nation_name_id2 );
  1455. //------ add color bar -------//
  1456. if( addColor )
  1457. {
  1458. char colorCodeStr[] = " 0";
  1459. colorCodeStr[1] = FIRST_NATION_COLOR_CODE_IN_TEXT + nation_color2;
  1460. str += colorCodeStr;
  1461. }
  1462. return str;
  1463. }
  1464. //------- End of function News::king_name2 -----//
  1465. #endif