monsters.php 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271
  1. <?php
  2. global $ELEMENT;
  3. ?>
  4. <!DOCTYPE html>
  5. <html lang='en'>
  6. <head>
  7. <meta content='text/html; charset=utf-8' http-equiv='content-type'/>
  8. <meta name='viewport' content='width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1'/>
  9. <title><?=$page->title?></title>
  10. <link rel='shortcut icon' href='<?=$page->favicon?>'/>
  11. <!-- CSS files -->
  12. <link rel='stylesheet' type='text/css' href='<?=$path["css"]?>ui.css'/>
  13. <link rel='stylesheet' type='text/css' href='<?=$path["css"]?>monsters.css'/>
  14. <link rel='stylesheet' type='text/css' href='<?=$path["css"]?>filters.css'/>
  15. <!-- Script files -->
  16. <script src="<?=$path["js"]?>ui.js"></script>
  17. <!-- Meta tags -->
  18. <link rel='canonical' href='<?=$page->canonical?>'/>
  19. <link rel='author' href='<?=$page->author?>'/>
  20. <link rel='publisher' href='<?=$page->author?>'/>
  21. <meta name='description' content='<?=$page->description?>'/>
  22. <meta property='og:title' content='<?=$page->title?>'/>
  23. <meta property='og:url' content='<?=$page->canonical?>'/>
  24. <meta property='og:description' content='<?=$page->description?>'/>
  25. <meta property='og:image' content='<?=$page->icon?>'/>
  26. <meta property='og:site_name' content='<?=$page->name?>'/>
  27. <meta property='og:type' content='website'/>
  28. <meta property='og:locale' content='en'/>
  29. <meta name='twitter:card' content='summary'/>
  30. <meta name='twitter:title' content='<?=$page->title?>'/>
  31. <meta name='twitter:description' content='<?=$page->description?>'/>
  32. <meta name='twitter:image' content='<?=$page->icon?>'/>
  33. <meta name='twitter:url' content='<?=$page->canonical?>'/>
  34. <meta name='robots' content='index follow'/>
  35. </head>
  36. <body>
  37. <?php
  38. include __DIR__ . "/inc/header.php";
  39. ?>
  40. <section class='filters'>
  41. <h2>
  42. Monster filters
  43. </h2>
  44. <?php
  45. $filters = $page->filters;
  46. include __DIR__ . "/inc/filter_monsters.php";
  47. ?>
  48. </section> <!-- #filters -->
  49. <section class='list'>
  50. <h2>
  51. Monsters
  52. </h2>
  53. <article>
  54. <?php
  55. foreach ($page->monsters as $mon){
  56. ?>
  57. <div class='monster'>
  58. <a href='/<?=$UID?>/monsters/<?=$mon->id?>'>
  59. <div class='monster_panel'>
  60. <?=html_unit_panel($mon)?>
  61. </div>
  62. </a>
  63. <div class='monster_tooltip'>
  64. <h4>
  65. <?=$mon->title?>
  66. </h4>
  67. <?php
  68. $building_attack = floor(($mon->attack * $page->building_stats["atk"] / 100) + ($mon->attack * $page->building_stats["elm"][$mon->unit->element] / 100));
  69. $building_defense = floor($page->building_stats["def"] * $mon->defense / 100);
  70. $building_hp = floor($page->building_stats["hp"] * $mon->hp / 100);
  71. $building_speed = $page->building_stats["spd"];
  72. $building_crit_rate = 0;
  73. $building_crit_damage = $page->building_stats["crd"];
  74. $building_accuracy = 0;
  75. $building_resistance = 0;
  76. ?>
  77. <table class='stats'>
  78. <tr>
  79. <th>
  80. Stats
  81. </th>
  82. <th>
  83. Base
  84. </th>
  85. <th>
  86. Runes
  87. </th>
  88. <th>
  89. Buildings
  90. </th>
  91. <th>
  92. Total
  93. </th>
  94. </tr>
  95. <tr>
  96. <th>
  97. ATK
  98. </th>
  99. <td class='base'>
  100. <?=$mon->attack?>
  101. </td>
  102. <td class='extra'>
  103. +<?=$mon->rune_attack?>
  104. </td>
  105. <td class='extra'>
  106. +<?=$building_attack?>
  107. </td>
  108. <td class='total'>
  109. <?=$mon->attack + $mon->rune_attack + $building_attack?>
  110. </td>
  111. </tr>
  112. <tr>
  113. <th>
  114. DEF
  115. </th>
  116. <td class='base'>
  117. <?=$mon->defense?>
  118. </td>
  119. <td class='extra'>
  120. +<?=$mon->rune_defense?>
  121. </td>
  122. <td class='extra'>
  123. +<?=$building_defense?>
  124. </td>
  125. <td class='total'>
  126. <?=$mon->defense + $mon->rune_defense + $building_defense?>
  127. </td>
  128. </tr>
  129. <tr>
  130. <th>
  131. HP
  132. </th>
  133. <td class='base'>
  134. <?=$mon->hp?>
  135. </td>
  136. <td class='extra'>
  137. +<?=$mon->rune_hp?>
  138. </td>
  139. <td class='extra'>
  140. +<?=$building_hp?>
  141. </td>
  142. <td class='total'>
  143. <?=$mon->hp + $mon->rune_hp + $building_hp?>
  144. </td>
  145. </tr>
  146. <tr>
  147. <th>
  148. SPD
  149. </th>
  150. <td class='base'>
  151. <?=$mon->speed?>
  152. </td>
  153. <td class='extra'>
  154. +<?=$mon->rune_speed?>
  155. </td>
  156. <td class='extra'>
  157. +<?=$building_speed?>
  158. </td>
  159. <td class='total'>
  160. <?=$mon->speed + $mon->rune_speed + $building_speed?>
  161. </td>
  162. </tr>
  163. <tr>
  164. <th>
  165. CRR
  166. </th>
  167. <td class='base'>
  168. <?=$mon->crit_rate?>%
  169. </td>
  170. <td class='extra'>
  171. +<?=$mon->rune_crit_rate?>%
  172. </td>
  173. <td class='extra'>
  174. +<?=$building_crit_rate?>%
  175. </td>
  176. <td class='total'>
  177. <?=$mon->crit_rate + $mon->rune_crit_rate + $building_crit_rate?>%
  178. </td>
  179. </tr>
  180. <tr>
  181. <th>
  182. CRD
  183. </th>
  184. <td class='base'>
  185. <?=$mon->crit_damage?>%
  186. </td>
  187. <td class='extra'>
  188. +<?=$mon->rune_crit_damage?>%
  189. </td>
  190. <td class='extra'>
  191. +<?=$building_crit_damage?>%
  192. </td>
  193. <td class='total'>
  194. <?=$mon->crit_damage + $mon->rune_crit_damage + $building_crit_damage?>%
  195. </td>
  196. </tr>
  197. <tr>
  198. <th>
  199. ACC
  200. </th>
  201. <td class='base'>
  202. <?=$mon->accuracy?>%
  203. </td>
  204. <td class='extra'>
  205. +<?=$mon->rune_accuracy?>%
  206. </td>
  207. <td class='extra'>
  208. +<?=$building_accuracy?>%
  209. </td>
  210. <td class='total'>
  211. <?=$mon->accuracy + $mon->rune_accuracy + $building_accuracy?>%
  212. </td>
  213. </tr>
  214. <tr>
  215. <th>
  216. RES
  217. </th>
  218. <td class='base'>
  219. <?=$mon->resistance?>%
  220. </td>
  221. <td class='extra'>
  222. +<?=$mon->rune_resistance?>%
  223. </td>
  224. <td class='extra'>
  225. +<?=$building_resistance?>%
  226. </td>
  227. <td class='total'>
  228. <?=$mon->resistance + $mon->rune_resistance + $building_resistance?>%
  229. </td>
  230. </tr>
  231. </table>
  232. <div class='skills'>
  233. <?php
  234. $skill_num = 0;
  235. foreach ($mon->unit->skill as $skill){
  236. $cur_lvl = $mon->skill_levels[$skill_num];
  237. $max_lvl = $skill->max_level;
  238. if ($max_lvl == $cur_lvl){
  239. $maxed = "maxed";
  240. }
  241. else{
  242. $maxed = "";
  243. }
  244. ?>
  245. <div class='skill'>
  246. <img src='<?=$skill->get_image()?>'/>
  247. <span class='skill_level <?=$maxed?>'>
  248. <?=$cur_lvl?>/<?=$max_lvl?>
  249. </span>
  250. <span class='skill_name'>
  251. <?=$skill->name?>
  252. </span>
  253. </div>
  254. <?php
  255. $skill_num ++;
  256. }
  257. ?>
  258. </div>
  259. </div>
  260. </div>
  261. <?php
  262. }
  263. ?>
  264. </article>
  265. </section> <!-- #catalog -->
  266. <?php
  267. include __DIR__ . "/inc/footer.php";
  268. ?>
  269. </body>
  270. </html>