monsters.php 13 KB

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