PageRenderTime 27ms CodeModel.GetById 0ms RepoModel.GetById 0ms app.codeStats 0ms

/variants/Chromatic/install.php

https://github.com/Sleepcap/vDiplomacy
PHP | 241 lines | 235 code | 5 blank | 1 comment | 0 complexity | 01c1a34333df46e8f8a12ef43567fa0f MD5 | raw file
  1. <?php
  2. // This is file installs the map data for the Chromatic variant
  3. defined('IN_CODE') or die('This script can not be run by itself.');
  4. require_once("variants/install.php");
  5. InstallTerritory::$Territories=array();
  6. $countries=$this->countries;
  7. $territoryRawData=array(
  8. array('Ice Sea', 'Sea', 'No', 0, 400, 81, 214, 36),
  9. array('Sea of Cherries', 'Sea', 'No', 0, 343, 243, 172, 100),
  10. array('Garnet', 'Coast', 'Yes', 0, 236, 151, 120, 73),
  11. array('Carnation Sea', 'Sea', 'No', 0, 203, 372, 102, 182),
  12. array('Bay of Roses', 'Sea', 'No', 0, 390, 353, 195, 180),
  13. array('Ghost', 'Coast', 'Yes', 4, 457, 371, 229, 184),
  14. array('Snow', 'Coast', 'No', 4, 515, 196, 246, 66),
  15. array('Alabaster', 'Coast', 'Yes', 4, 564, 107, 284, 53),
  16. array('Ivory', 'Coast', 'Yes', 4, 559, 245, 279, 120),
  17. array('Chalk', 'Coast', 'No', 4, 554, 303, 277, 162),
  18. array('Sea of Lead', 'Sea', 'No', 0, 588, 171, 338, 101),
  19. array('Silver', 'Coast', 'Yes', 0, 771, 115, 382, 88),
  20. array('Sea of Mercury', 'Sea', 'No', 0, 781, 253, 399, 183),
  21. array('Sea of Night', 'Sea', 'No', 0, 938, 297, 469, 143),
  22. array('Gulf of Platinum', 'Sea', 'No', 0, 729, 403, 366, 200),
  23. array('Paper', 'Coast', 'No', 0, 610, 415, 309, 203),
  24. array('Jet', 'Coast', 'Yes', 3, 678, 417, 338, 207),
  25. array('Coal', 'Coast', 'No', 3, 881, 392, 441, 191),
  26. array('Obsidian', 'Coast', 'Yes', 3, 958, 424, 442, 209),
  27. array('Sea of Umber', 'Sea', 'No', 0, 899, 474, 406, 260),
  28. array('Ebony', 'Coast', 'Yes', 3, 829, 454, 413, 228),
  29. array('Raven', 'Coast', 'No', 3, 762, 471, 380, 234),
  30. array('Ink', 'Coast', 'No', 0, 640, 490, 335, 281),
  31. array('Crystal', 'Land', 'Yes', 0, 539, 571, 268, 284),
  32. array('Bronze', 'Coast', 'Yes', 0, 1010, 659, 507, 330),
  33. array('Gulf of Hazel', 'Sea', 'No', 0, 717, 686, 362, 341),
  34. array('Sepiatic Sea', 'Sea', 'No', 0, 858, 660, 393, 367),
  35. array('Sea of Butter', 'Sea', 'No', 0, 883, 857, 440, 430),
  36. array('Sunshine', 'Coast', 'Yes', 2, 693, 637, 347, 320),
  37. array('Lemon', 'Coast', 'No', 2, 755, 797, 378, 398),
  38. array('Topaz', 'Coast', 'Yes', 2, 780, 873, 390, 435),
  39. array('Gold', 'Coast', 'Yes', 2, 706, 796, 349, 396),
  40. array('Sulphur', 'Coast', 'No', 2, 644, 709, 327, 371),
  41. array('Saffron', 'Coast', 'No', 0, 546, 682, 274, 336),
  42. array('Malachite', 'Coast', 'Yes', 0, 575, 1016, 286, 479),
  43. array('Sea of Cyan', 'Sea', 'No', 0, 707, 870, 358, 434),
  44. array('Bay of Emeralds', 'Sea', 'No', 0, 447, 756, 267, 399),
  45. array('Forest Sea', 'Sea', 'No', 0, 518, 900, 263, 444),
  46. array('Cobalt', 'Coast', 'Yes', 1, 494, 723, 248, 360),
  47. array('Cerulean', 'Coast', 'No', 1, 360, 823, 171, 444),
  48. array('Aquatic Sea', 'Sea', 'No', 0, 332, 965, 167, 480),
  49. array('Sapphire', 'Coast', 'Yes', 1, 267, 868, 169, 396),
  50. array('Royal', 'Coast', 'Yes', 1, 351, 773, 184, 371),
  51. array('Azure', 'Coast', 'No', 1, 402, 688, 202, 341),
  52. array('Indigo Sea', 'Sea', 'No', 0, 273, 795, 140, 398),
  53. array('Gulf of Mauve', 'Sea', 'No', 0, 317, 628, 153, 257),
  54. array('Cold', 'Coast', 'No', 0, 402, 586, 240, 320),
  55. array('Magenta', 'Coast', 'Yes', 0, 146, 696, 49, 376),
  56. array('Violet Sea', 'Sea', 'No', 0, 199, 629, 115, 257),
  57. array('Sea of Lava', 'Sea', 'No', 0, 64, 476, 39, 214),
  58. array('Ruby', 'Coast', 'Yes', 5, 350, 556, 176, 274),
  59. array('Maroon', 'Coast', 'No', 5, 146, 452, 85, 223),
  60. array('Vermillion', 'Coast', 'Yes', 5, 143, 371, 74, 198),
  61. array('Crimson', 'Coast', 'Yes', 5, 294, 444, 137, 205),
  62. array('Fire Engine', 'Coast', 'No', 5, 368, 460, 181, 227),
  63. array('Hot', 'Coast', 'No', 0, 443, 439, 223, 216)
  64. );
  65. foreach($territoryRawData as $territoryRawRow)
  66. {
  67. list($name, $type, $supply, $countryID, $x, $y, $sx, $sy)=$territoryRawRow;
  68. new InstallTerritory($name, $type, $supply, $countryID, $x, $y, $sx, $sy);
  69. }
  70. unset($territoryRawData);
  71. $bordersRawData=array(
  72. array('Ice Sea','Sea of Cherries','Yes','No'),
  73. array('Ice Sea','Garnet','Yes','No'),
  74. array('Ice Sea','Snow','Yes','No'),
  75. array('Ice Sea','Alabaster','Yes','No'),
  76. array('Ice Sea','Sea of Lead','Yes','No'),
  77. array('Ice Sea','Silver','Yes','No'),
  78. array('Sea of Cherries','Garnet','Yes','No'),
  79. array('Sea of Cherries','Carnation Sea','Yes','No'),
  80. array('Sea of Cherries','Bay of Roses','Yes','No'),
  81. array('Sea of Cherries','Ghost','Yes','No'),
  82. array('Sea of Cherries','Snow','Yes','No'),
  83. array('Garnet','Carnation Sea','Yes','No'),
  84. array('Garnet','Sea of Lava','Yes','No'),
  85. array('Carnation Sea','Bay of Roses','Yes','No'),
  86. array('Carnation Sea','Sea of Lava','Yes','No'),
  87. array('Carnation Sea','Vermillion','Yes','No'),
  88. array('Carnation Sea','Crimson','Yes','No'),
  89. array('Carnation Sea','Fire Engine','Yes','No'),
  90. array('Bay of Roses','Ghost','Yes','No'),
  91. array('Bay of Roses','Fire Engine','Yes','No'),
  92. array('Bay of Roses','Hot','Yes','No'),
  93. array('Ghost','Snow','Yes','Yes'),
  94. array('Ghost','Ivory','No','Yes'),
  95. array('Ghost','Chalk','No','Yes'),
  96. array('Ghost','Paper','No','Yes'),
  97. array('Ghost','Hot','Yes','Yes'),
  98. array('Snow','Alabaster','Yes','Yes'),
  99. array('Snow','Ivory','No','Yes'),
  100. array('Alabaster','Ivory','Yes','Yes'),
  101. array('Alabaster','Sea of Lead','Yes','No'),
  102. array('Ivory','Chalk','Yes','Yes'),
  103. array('Ivory','Sea of Lead','Yes','No'),
  104. array('Chalk','Sea of Lead','Yes','No'),
  105. array('Chalk','Gulf of Platinum','Yes','No'),
  106. array('Chalk','Paper','Yes','Yes'),
  107. array('Sea of Lead','Silver','Yes','No'),
  108. array('Sea of Lead','Sea of Mercury','Yes','No'),
  109. array('Sea of Lead','Gulf of Platinum','Yes','No'),
  110. array('Silver','Sea of Mercury','Yes','No'),
  111. array('Silver','Sea of Night','Yes','No'),
  112. array('Sea of Mercury','Sea of Night','Yes','No'),
  113. array('Sea of Mercury','Gulf of Platinum','Yes','No'),
  114. array('Sea of Mercury','Jet','Yes','No'),
  115. array('Sea of Mercury','Coal','Yes','No'),
  116. array('Sea of Night','Coal','Yes','No'),
  117. array('Sea of Night','Obsidian','Yes','No'),
  118. array('Sea of Night','Sea of Umber','Yes','No'),
  119. array('Sea of Night','Bronze','Yes','No'),
  120. array('Gulf of Platinum','Paper','Yes','No'),
  121. array('Gulf of Platinum','Jet','Yes','No'),
  122. array('Paper','Jet','Yes','Yes'),
  123. array('Paper','Ink','No','Yes'),
  124. array('Paper','Crystal','No','Yes'),
  125. array('Paper','Hot','No','Yes'),
  126. array('Jet','Coal','Yes','Yes'),
  127. array('Jet','Ebony','No','Yes'),
  128. array('Jet','Raven','No','Yes'),
  129. array('Jet','Ink','No','Yes'),
  130. array('Coal','Obsidian','Yes','Yes'),
  131. array('Coal','Ebony','No','Yes'),
  132. array('Obsidian','Sea of Umber','Yes','No'),
  133. array('Obsidian','Ebony','Yes','Yes'),
  134. array('Sea of Umber','Ebony','Yes','No'),
  135. array('Sea of Umber','Raven','Yes','No'),
  136. array('Sea of Umber','Bronze','Yes','No'),
  137. array('Sea of Umber','Gulf of Hazel','Yes','No'),
  138. array('Sea of Umber','Sepiatic Sea','Yes','No'),
  139. array('Ebony','Raven','Yes','Yes'),
  140. array('Raven','Ink','Yes','Yes'),
  141. array('Raven','Gulf of Hazel','Yes','No'),
  142. array('Ink','Crystal','No','Yes'),
  143. array('Ink','Gulf of Hazel','Yes','No'),
  144. array('Ink','Sunshine','Yes','Yes'),
  145. array('Ink','Saffron','No','Yes'),
  146. array('Crystal','Saffron','No','Yes'),
  147. array('Crystal','Cold','No','Yes'),
  148. array('Crystal','Hot','No','Yes'),
  149. array('Bronze','Sepiatic Sea','Yes','No'),
  150. array('Bronze','Sea of Butter','Yes','No'),
  151. array('Gulf of Hazel','Sepiatic Sea','Yes','No'),
  152. array('Gulf of Hazel','Sunshine','Yes','No'),
  153. array('Sepiatic Sea','Sea of Butter','Yes','No'),
  154. array('Sepiatic Sea','Sunshine','Yes','No'),
  155. array('Sepiatic Sea','Lemon','Yes','No'),
  156. array('Sea of Butter','Lemon','Yes','No'),
  157. array('Sea of Butter','Topaz','Yes','No'),
  158. array('Sea of Butter','Malachite','Yes','No'),
  159. array('Sea of Butter','Sea of Cyan','Yes','No'),
  160. array('Sunshine','Lemon','Yes','Yes'),
  161. array('Sunshine','Gold','No','Yes'),
  162. array('Sunshine','Sulphur','No','Yes'),
  163. array('Sunshine','Saffron','No','Yes'),
  164. array('Lemon','Topaz','Yes','Yes'),
  165. array('Lemon','Gold','No','Yes'),
  166. array('Topaz','Gold','Yes','Yes'),
  167. array('Topaz','Sea of Cyan','Yes','No'),
  168. array('Gold','Sulphur','Yes','Yes'),
  169. array('Gold','Sea of Cyan','Yes','No'),
  170. array('Sulphur','Saffron','Yes','Yes'),
  171. array('Sulphur','Sea of Cyan','Yes','No'),
  172. array('Sulphur','Bay of Emeralds','Yes','No'),
  173. array('Saffron','Bay of Emeralds','Yes','No'),
  174. array('Saffron','Cobalt','Yes','Yes'),
  175. array('Saffron','Cold','No','Yes'),
  176. array('Malachite','Sea of Cyan','Yes','No'),
  177. array('Malachite','Forest Sea','Yes','No'),
  178. array('Malachite','Aquatic Sea','Yes','No'),
  179. array('Sea of Cyan','Bay of Emeralds','Yes','No'),
  180. array('Sea of Cyan','Forest Sea','Yes','No'),
  181. array('Bay of Emeralds','Forest Sea','Yes','No'),
  182. array('Bay of Emeralds','Cobalt','Yes','No'),
  183. array('Forest Sea','Cobalt','Yes','No'),
  184. array('Forest Sea','Cerulean','Yes','No'),
  185. array('Forest Sea','Aquatic Sea','Yes','No'),
  186. array('Cobalt','Cerulean','Yes','Yes'),
  187. array('Cobalt','Royal','No','Yes'),
  188. array('Cobalt','Azure','No','Yes'),
  189. array('Cobalt','Cold','No','Yes'),
  190. array('Cerulean','Aquatic Sea','Yes','No'),
  191. array('Cerulean','Sapphire','Yes','Yes'),
  192. array('Cerulean','Royal','No','Yes'),
  193. array('Aquatic Sea','Sapphire','Yes','No'),
  194. array('Aquatic Sea','Indigo Sea','Yes','No'),
  195. array('Aquatic Sea','Magenta','Yes','No'),
  196. array('Sapphire','Royal','Yes','Yes'),
  197. array('Sapphire','Indigo Sea','Yes','No'),
  198. array('Royal','Azure','Yes','Yes'),
  199. array('Royal','Indigo Sea','Yes','No'),
  200. array('Azure','Indigo Sea','Yes','No'),
  201. array('Azure','Gulf of Mauve','Yes','No'),
  202. array('Azure','Cold','Yes','Yes'),
  203. array('Indigo Sea','Gulf of Mauve','Yes','No'),
  204. array('Indigo Sea','Magenta','Yes','No'),
  205. array('Indigo Sea','Violet Sea','Yes','No'),
  206. array('Gulf of Mauve','Cold','Yes','No'),
  207. array('Gulf of Mauve','Violet Sea','Yes','No'),
  208. array('Gulf of Mauve','Ruby','Yes','No'),
  209. array('Cold','Ruby','Yes','Yes'),
  210. array('Cold','Hot','No','Yes'),
  211. array('Magenta','Violet Sea','Yes','No'),
  212. array('Magenta','Sea of Lava','Yes','No'),
  213. array('Violet Sea','Sea of Lava','Yes','No'),
  214. array('Violet Sea','Ruby','Yes','No'),
  215. array('Violet Sea','Maroon','Yes','No'),
  216. array('Sea of Lava','Maroon','Yes','No'),
  217. array('Sea of Lava','Vermillion','Yes','No'),
  218. array('Ruby','Maroon','Yes','Yes'),
  219. array('Ruby','Crimson','No','Yes'),
  220. array('Ruby','Fire Engine','No','Yes'),
  221. array('Ruby','Hot','No','Yes'),
  222. array('Maroon','Vermillion','Yes','Yes'),
  223. array('Maroon','Crimson','No','Yes'),
  224. array('Vermillion','Crimson','Yes','Yes'),
  225. array('Crimson','Fire Engine','Yes','Yes'),
  226. array('Fire Engine','Hot','Yes','Yes')
  227. );
  228. foreach($bordersRawData as $borderRawRow)
  229. {
  230. list($from, $to, $fleets, $armies)=$borderRawRow;
  231. InstallTerritory::$Territories[$to] ->addBorder(InstallTerritory::$Territories[$from],$fleets,$armies);
  232. }
  233. unset($bordersRawData);
  234. InstallTerritory::runSQL($this->mapID);
  235. InstallCache::terrJSON($this->territoriesJSONFile(),$this->mapID);
  236. ?>