monsters.php 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374
  1. <?php
  2. /**
  3. * Monsters view.
  4. *
  5. * Contains the view layout and ome code to present the data.
  6. *
  7. * @category View
  8. * @property_read Monsters_Page $page The page model.
  9. * @property_read int $UID Player ID.
  10. */
  11. ?>
  12. <!DOCTYPE html>
  13. <html lang='en'>
  14. <head>
  15. <meta content='text/html; charset=utf-8' http-equiv='content-type'/>
  16. <meta name='viewport' content='width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1'/>
  17. <title><?=$page->title?></title>
  18. <link rel='shortcut icon' href='<?=$page->favicon?>'/>
  19. <!-- CSS files -->
  20. <link rel='stylesheet' type='text/css' href='<?=URL::CSS?>ui.css'/>
  21. <link rel='stylesheet' type='text/css' href='<?=URL::CSS?>monsters.css'/>
  22. <link rel='stylesheet' type='text/css' href='<?=URL::CSS?>filters.css'/>
  23. <!-- Meta tags -->
  24. <link rel='canonical' href='<?=$page->canonical?>'/>
  25. <link rel='author' href='<?=$page->author?>'/>
  26. <link rel='publisher' href='<?=$page->author?>'/>
  27. <meta name='description' content='<?=$page->description?>'/>
  28. <meta property='og:title' content='<?=$page->title?>'/>
  29. <meta property='og:url' content='<?=$page->canonical?>'/>
  30. <meta property='og:description' content='<?=$page->description?>'/>
  31. <meta property='og:image' content='<?=$page->icon?>'/>
  32. <meta property='og:site_name' content='<?=$page->name?>'/>
  33. <meta property='og:type' content='website'/>
  34. <meta property='og:locale' content='en'/>
  35. <meta name='twitter:card' content='summary'/>
  36. <meta name='twitter:title' content='<?=$page->title?>'/>
  37. <meta name='twitter:description' content='<?=$page->description?>'/>
  38. <meta name='twitter:image' content='<?=$page->icon?>'/>
  39. <meta name='twitter:url' content='<?=$page->canonical?>'/>
  40. <meta name='robots' content='index follow'/>
  41. <script>
  42. /**
  43. * Shows or hiddes the filters panel.
  44. */
  45. function toggleFilters(){
  46. var content = document.getElementById('filters_content');
  47. var slid = document.getElementById('filters_slid');
  48. if (content.style.maxHeight != '30em'){
  49. content.style.maxHeight = '30em';
  50. slid.style.transform = 'rotate(90deg)';
  51. }
  52. else{
  53. content.style.maxHeight = '0px';
  54. slid.style.transform = 'rotate(0deg)';
  55. }
  56. };
  57. </script>
  58. </head>
  59. <body>
  60. <?php
  61. include __DIR__ . "/inc/header.php";
  62. ?>
  63. <section class='filters'>
  64. <h2 id='filters_title' onClick='toggleFilters();'>
  65. <img id='filters_slid' id='filters_slid' alt=' ' src='<?=URL::IMG["ICON"]?>slid.png'/>
  66. Monster filters
  67. </h2>
  68. <article id='filters_content'>
  69. <?php
  70. $filters = $page->filters;
  71. include __DIR__ . "/inc/filter_monsters.php";
  72. ?>
  73. </article>
  74. </section> <!-- #filters -->
  75. <section class='list'>
  76. <h2>
  77. Monsters
  78. </h2>
  79. <article>
  80. <?php
  81. foreach ($page->monsters as $mon){
  82. ?>
  83. <div class='monster'>
  84. <a href='/<?=$UID?>/monsters/<?=$mon->id?>'>
  85. <div class='monster_panel'>
  86. <?=HTML::unit_panel($mon)?>
  87. </div>
  88. </a>
  89. <div class='monster_tooltip'>
  90. <h4>
  91. <?=$mon->title?>
  92. </h4>
  93. <table class='stats'>
  94. <tr>
  95. <th>
  96. Stats
  97. </th>
  98. <th>
  99. Base
  100. </th>
  101. <th>
  102. Runes
  103. </th>
  104. <th>
  105. Artif.
  106. </th>
  107. <th>
  108. Bldg.
  109. </th>
  110. <th>
  111. Total
  112. </th>
  113. </tr>
  114. <tr>
  115. <th>
  116. ATK
  117. </th>
  118. <td class='base'>
  119. <?=$mon->attack?>
  120. <span class='percent'>&nbsp;</span>
  121. </td>
  122. <td class='extra'>
  123. +<?=$mon->rune_attack?>
  124. <span class='percent'>&nbsp;</span>
  125. </td>
  126. <td class='extra'>
  127. +<?=$mon->artifact_attack?>
  128. <span class='percent'>&nbsp;</span>
  129. </td>
  130. <td class='extra'>
  131. +<?=$mon->building_attack?>
  132. <span class='percent'>&nbsp;</span>
  133. </td>
  134. <td class='total'>
  135. <?=$mon->total_attack?>
  136. <span class='percent'>&nbsp;</span>
  137. </td>
  138. </tr>
  139. <tr>
  140. <th>
  141. DEF
  142. </th>
  143. <td class='base'>
  144. <?=$mon->defense?>
  145. <span class='percent'>&nbsp;</span>
  146. </td>
  147. <td class='extra'>
  148. +<?=$mon->rune_defense?>
  149. <span class='percent'>&nbsp;</span>
  150. </td>
  151. <td class='extra'>
  152. +<?=$mon->artifact_defense?>
  153. <span class='percent'>&nbsp;</span>
  154. </td>
  155. <td class='extra'>
  156. +<?=$mon->building_defense?>
  157. <span class='percent'>&nbsp;</span>
  158. </td>
  159. <td class='total'>
  160. <?=$mon->total_defense?>
  161. <span class='percent'>&nbsp;</span>
  162. </td>
  163. </tr>
  164. <tr>
  165. <th>
  166. HP
  167. </th>
  168. <td class='base'>
  169. <?=$mon->hp?>
  170. <span class='percent'>&nbsp;</span>
  171. </td>
  172. <td class='extra'>
  173. +<?=$mon->rune_hp?>
  174. <span class='percent'>&nbsp;</span>
  175. </td>
  176. <td class='extra'>
  177. +<?=$mon->artifact_hp?>
  178. <span class='percent'>&nbsp;</span>
  179. </td>
  180. <td class='extra'>
  181. +<?=$mon->building_hp?>
  182. <span class='percent'>&nbsp;</span>
  183. </td>
  184. <td class='total'>
  185. <?=$mon->total_hp?>
  186. <span class='percent'>&nbsp;</span>
  187. </td>
  188. </tr>
  189. <tr>
  190. <th>
  191. SPD
  192. </th>
  193. <td class='base'>
  194. <?=$mon->speed?>
  195. <span class='percent'>&nbsp;</span>
  196. </td>
  197. <td class='extra'>
  198. +<?=$mon->rune_speed?>
  199. <span class='percent'>&nbsp;</span>
  200. </td>
  201. <td class='extra'>
  202. +<?=$mon->artifact_speed?>
  203. <span class='percent'>&nbsp;</span>
  204. </td>
  205. <td class='extra'>
  206. +<?=$mon->building_speed?>
  207. <span class='percent'>&nbsp;</span>
  208. </td>
  209. <td class='total'>
  210. <?=$mon->total_speed?>
  211. <span class='percent'>&nbsp;</span>
  212. </td>
  213. </tr>
  214. <tr>
  215. <th>
  216. CRR
  217. </th>
  218. <td class='base'>
  219. <?=$mon->crit_rate?>
  220. <span class='percent'>%</span>
  221. </td>
  222. <td class='extra'>
  223. +<?=$mon->rune_crit_rate?>
  224. <span class='percent'>%</span>
  225. </td>
  226. <td class='extra'>
  227. +<?=$mon->artifact_crit_rate?>
  228. <span class='percent'>%</span>
  229. </td>
  230. <td class='extra'>
  231. +<?=$mon->building_crit_rate?>
  232. <span class='percent'>%</span>
  233. </td>
  234. <td class='total'>
  235. <?=$mon->total_crit_rate?>
  236. <span class='percent'>%</span>
  237. </td>
  238. </tr>
  239. <tr>
  240. <th>
  241. CRD
  242. </th>
  243. <td class='base'>
  244. <?=$mon->crit_damage?>
  245. <span class='percent'>%</span>
  246. </td>
  247. <td class='extra'>
  248. +<?=$mon->rune_crit_damage?>
  249. <span class='percent'>%</span>
  250. </td>
  251. <td class='extra'>
  252. +<?=$mon->artifact_crit_damage?>
  253. <span class='percent'>%</span>
  254. </td>
  255. <td class='extra'>
  256. +<?=$mon->building_crit_damage?>
  257. <span class='percent'>%</span>
  258. </td>
  259. <td class='total'>
  260. <?=$mon->total_crit_damage?>
  261. <span class='percent'>%</span>
  262. </td>
  263. </tr>
  264. <tr>
  265. <th>
  266. ACC
  267. </th>
  268. <td class='base'>
  269. <?=$mon->accuracy?>
  270. <span class='percent'>%</span>
  271. </td>
  272. <td class='extra'>
  273. +<?=$mon->rune_accuracy?>
  274. <span class='percent'>%</span>
  275. </td>
  276. <td class='extra'>
  277. +<?=$mon->artifact_accuracy?>
  278. <span class='percent'>%</span>
  279. </td>
  280. <td class='extra'>
  281. +<?=$mon->building_accuracy?>
  282. <span class='percent'>%</span>
  283. </td>
  284. <td class='total'>
  285. <?=$mon->total_accuracy?>
  286. <span class='percent'>%</span>
  287. </td>
  288. </tr>
  289. <tr>
  290. <th>
  291. RES
  292. </th>
  293. <td class='base'>
  294. <?=$mon->resistance?>
  295. <span class='percent'>%</span>
  296. </td>
  297. <td class='extra'>
  298. +<?=$mon->rune_resistance?>
  299. <span class='percent'>%</span>
  300. </td>
  301. <td class='extra'>
  302. +<?=$mon->artifact_resistance?>
  303. <span class='percent'>%</span>
  304. </td>
  305. <td class='extra'>
  306. +<?=$mon->building_resistance?>
  307. <span class='percent'>%</span>
  308. </td>
  309. <td class='total'>
  310. <?=$mon->total_resistance?>
  311. <span class='percent'>%</span>
  312. </td>
  313. </tr>
  314. <tr>
  315. <th colspan='5'>
  316. Effective HP
  317. </th>
  318. <td class='total'>
  319. <?=$mon->effective_hp?>
  320. <span class='percent'>&nbsp;</span>
  321. </td>
  322. </tr>
  323. <tr>
  324. <th colspan='5'>
  325. Effective DMG
  326. </th>
  327. <td class='total'>
  328. <?=$mon->effective_dmg?>
  329. <span class='percent'>&nbsp;</span>
  330. </td>
  331. </tr>
  332. </table>
  333. <div class='skills'>
  334. <?php
  335. $skill_num = 0;
  336. foreach ($mon->unit->skill as $skill){
  337. $cur_lvl = $mon->skill_levels[$skill_num];
  338. $max_lvl = $skill->max_level;
  339. if ($max_lvl == $cur_lvl){
  340. $maxed = "maxed";
  341. }
  342. else{
  343. $maxed = "";
  344. }
  345. ?>
  346. <div class='skill'>
  347. <img src='<?=$skill->get_image()?>'/>
  348. <span class='skill_level <?=$maxed?>'>
  349. <?=$cur_lvl?>/<?=$max_lvl?>
  350. </span>
  351. <span class='skill_name'>
  352. <?=$skill->name?>
  353. </span>
  354. </div>
  355. <?php
  356. $skill_num ++;
  357. }
  358. ?>
  359. </div>
  360. </div>
  361. </div>
  362. <?php
  363. }
  364. ?>
  365. </article>
  366. </section> <!-- #catalog -->
  367. <?php
  368. include __DIR__ . "/inc/footer.php";
  369. ?>
  370. </body>
  371. </html>