| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468 |
- <?php
- /**
- * Monsters view.
- *
- * Contains the view layout and ome code to present the data.
- *
- * @category View
- * @var Monsters_Page $page The page model.
- * @var int $UID Player ID.
- */
- ?>
- <!DOCTYPE html>
- <html lang='en'>
- <head>
- <meta content='text/html; charset=utf-8' http-equiv='content-type'/>
- <meta name='viewport' content='width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1'/>
- <title><?=$page->title?></title>
- <link rel='shortcut icon' href='<?=$page->favicon?>'/>
- <!-- CSS files -->
- <link rel='stylesheet' type='text/css' href='<?=URL::CSS?>ui.css'/>
- <?php
- if ($MODE == GAME_MODE_ID::RTA){
- ?>
- <link rel='stylesheet' type='text/css' href='<?=URL::CSS?>ui-rta.css'/>
- <?php
- }
- ?>
- <link rel='stylesheet' type='text/css' href='<?=URL::CSS?>monsters.css'/>
- <!-- Meta tags -->
- <link rel='canonical' href='<?=$page->canonical?>'/>
- <link rel='author' href='<?=$page->author?>'/>
- <link rel='publisher' href='<?=$page->author?>'/>
- <meta name='description' content='<?=$page->description?>'/>
- <meta property='og:title' content='<?=$page->title?>'/>
- <meta property='og:url' content='<?=$page->canonical?>'/>
- <meta property='og:description' content='<?=$page->description?>'/>
- <meta property='og:image' content='<?=$page->icon?>'/>
- <meta property='og:site_name' content='<?=$page->name?>'/>
- <meta property='og:type' content='website'/>
- <meta property='og:locale' content='en'/>
- <meta name='twitter:card' content='summary'/>
- <meta name='twitter:title' content='<?=$page->title?>'/>
- <meta name='twitter:description' content='<?=$page->description?>'/>
- <meta name='twitter:image' content='<?=$page->icon?>'/>
- <meta name='twitter:url' content='<?=$page->canonical?>'/>
- <meta name='robots' content='index follow'/>
- </head>
- <body>
- <?php
- include __DIR__ . "/inc/header.php";
- ?>
- <aside id='filters' class='content filters'>
- <h2 id='filters_title'>
- Monsters
- </h2>
- <p>
- Monsters
- </p>
- <form action='/<?=$UID?>/monsters/' method='get' id='filter_monsters' class='filter'>
- <table>
- <tr>
- <td class='label'>
- Element:
- </td>
- <td class='value'>
- <?php
- $selected = Array("", "", "", "", "");
- $selected[$page->filters["ELEMENT"] - 1] = "selected";
- ?>
- <select name='element'>
- <option> </option>
- <option value='<?=ELEMENT_ID::FIRE?>' <?=$selected[0]?>>Fire</option>
- <option value='<?=ELEMENT_ID::WATER?>' <?=$selected[1]?>>Water</option>
- <option value='<?=ELEMENT_ID::WIND?>' <?=$selected[2]?>>Wind</option>
- <option value='<?=ELEMENT_ID::LIGHT?>' <?=$selected[3]?>>Light</option>
- <option value='<?=ELEMENT_ID::DARK?>' <?=$selected[4]?>>Dark</option>
- </select>
- </td>
- </tr>
- <tr>
- <td class='label'>
- Stars:
- </td>
- <td class='value'>
- <input type='number' name='min_stars' id='filter_stars_min' min='1' max='6' value='<?=$page->filters["MIN_STARS"]?>'/>
- -
- <input type='number' name='max_stars' id='filter_stars_max' min='1' max='6' value='<?=$page->filters["MAX_STARS"]?>'/>
- </td>
- </tr>
- <tr>
- <td class='label'>
- Name:
- </td>
- <td class='value'>
- <input type='text' name='name' id='filter_name' value='<?=$page->filters["NAME"]?>'/>
- </td>
- </tr>
- <tr>
- <td class='filter' colspan='2'>
- <?php
- $checked = "";
- if ($page->filters["IN_STORAGE"]){
- $checked = "checked";
- }
- ?>
- <input type='checkbox' name='in_storage' id='filter_in_storage'<?=$checked?>/>
- <label for='filter_in_storage'>Monsters in storage</label>
- </td>
- </tr>
- <tr>
- <td class='filter' colspan='2'>
- <?php
- $checked = "";
- if ($page->filters["WITHOUT_RUNES"]){
- $checked = "checked";
- }
- ?>
- <input type='checkbox' name='without_runes' id='filter_without_runes' <?=$checked?>/>
- <label for='filter_without_runes'>Monsters without runes</label>
- </td>
- </tr>
- <tr>
- <td class='label'>
- Effects:
- <div class='help_tooltip'>
- <p>
- Effect the monster can induce. Choose 'All' to search for all of the selected, or 'Any' to search for any of the selected effects.
- </p>
- </div>
- <br/>
- <select name='effect_option' id='filter_effect_option'>
- <option value='or' <?=($page->filters["EFFECT_OPTION"] == "or") ? ("selected='selected'") : ("");?>>Any</option>
- <option value='and' <?=($page->filters["EFFECT_OPTION"] == "and") ? ("selected='selected'") : ("");?>>All</option>
- </select>
- </td>
- <td class='value'>
- <select multiple name='effect[]' id='filter_effect'>
- <?php
- foreach ($page->effects as $effect){
- if (in_array($effect->id, $page->filters["EFFECT"])){
- $selected = "selected='selected'";
- }
- else{
- $selected = "";
- }
- $name = $effect->name;
- $name = strtoupper($name);
- $name = str_replace("INCREASE", "INC.", $name);
- $name = str_replace("DECREASE", "DEC.", $name);
- $name = str_replace("CRITICAL", "CRIT.", $name);
- $name = str_replace("CONTINUOUS", "CONT.", $name);
- $name = str_replace("DAMAGE", "DMG.", $name);
- $name = str_replace("BENEFICIAL", "BENEF.", $name);
- $name = str_replace("BENEFICIAL", "BENEF.", $name);
- $name = str_replace("EFFECTS", "EFF.", $name);
- $name = str_replace("EFFECT", "EFF.", $name);
- ?>
- <option value='<?=$effect->id?>' <?=$selected?>><?=$name?></option>
- <?php
- }
- ?>
- </select>
- </td>
- </tr>
- </table>
- <input type='submit' value='Apply'/>
- </form>
- </aside> <!-- #filters -->
- <main>
- <section id='list' class='list'>
- <h2>
- Monsters
- </h2>
- <article>
- <?php
- foreach ($page->monsters as $mon){
- ?>
- <div class='monster'>
- <a href='/<?=$UID?>/monsters/<?=$mon->id?>'>
- <div class='monster_panel'>
- <?=HTML::unit_panel($mon)?>
- </div>
- </a>
- <div class='monster_tooltip'>
- <h4>
- <?=$mon->title?>
- </h4>
- <table class='stats'>
- <tr>
- <th>
- Stats
- </th>
- <th>
- Base
- </th>
- <th>
- Runes
- </th>
- <th>
- Artif.
- </th>
- <th>
- Bldg.
- </th>
- <th>
- Total
- </th>
- </tr>
- <tr>
- <th>
- ATK
- </th>
- <td class='base'>
- <?=$mon->attack?>
- <span class='percent'> </span>
- </td>
- <td class='extra'>
- +<?=$mon->rune_attack?>
- <span class='percent'> </span>
- </td>
- <td class='extra'>
- +<?=$mon->artifact_attack?>
- <span class='percent'> </span>
- </td>
- <td class='extra'>
- +<?=$mon->building_attack?>
- <span class='percent'> </span>
- </td>
- <td class='total'>
- <?=$mon->total_attack?>
- <span class='percent'> </span>
- </td>
- </tr>
- <tr>
- <th>
- DEF
- </th>
- <td class='base'>
- <?=$mon->defense?>
- <span class='percent'> </span>
- </td>
- <td class='extra'>
- +<?=$mon->rune_defense?>
- <span class='percent'> </span>
- </td>
- <td class='extra'>
- +<?=$mon->artifact_defense?>
- <span class='percent'> </span>
- </td>
- <td class='extra'>
- +<?=$mon->building_defense?>
- <span class='percent'> </span>
- </td>
- <td class='total'>
- <?=$mon->total_defense?>
- <span class='percent'> </span>
- </td>
- </tr>
- <tr>
- <th>
- HP
- </th>
- <td class='base'>
- <?=$mon->hp?>
- <span class='percent'> </span>
- </td>
- <td class='extra'>
- +<?=$mon->rune_hp?>
- <span class='percent'> </span>
- </td>
- <td class='extra'>
- +<?=$mon->artifact_hp?>
- <span class='percent'> </span>
- </td>
- <td class='extra'>
- +<?=$mon->building_hp?>
- <span class='percent'> </span>
- </td>
- <td class='total'>
- <?=$mon->total_hp?>
- <span class='percent'> </span>
- </td>
- </tr>
- <tr>
- <th>
- SPD
- </th>
- <td class='base'>
- <?=$mon->speed?>
- <span class='percent'> </span>
- </td>
- <td class='extra'>
- +<?=$mon->rune_speed?>
- <span class='percent'> </span>
- </td>
- <td class='extra'>
- +<?=$mon->artifact_speed?>
- <span class='percent'> </span>
- </td>
- <td class='extra'>
- +<?=$mon->building_speed?>
- <span class='percent'> </span>
- </td>
- <td class='total'>
- <?=$mon->total_speed?>
- <span class='percent'> </span>
- </td>
- </tr>
- <tr>
- <th>
- CRR
- </th>
- <td class='base'>
- <?=$mon->crit_rate?>
- <span class='percent'>%</span>
- </td>
- <td class='extra'>
- +<?=$mon->rune_crit_rate?>
- <span class='percent'>%</span>
- </td>
- <td class='extra'>
- +<?=$mon->artifact_crit_rate?>
- <span class='percent'>%</span>
- </td>
- <td class='extra'>
- +<?=$mon->building_crit_rate?>
- <span class='percent'>%</span>
- </td>
- <td class='total'>
- <?=$mon->total_crit_rate?>
- <span class='percent'>%</span>
- </td>
- </tr>
- <tr>
- <th>
- CRD
- </th>
- <td class='base'>
- <?=$mon->crit_damage?>
- <span class='percent'>%</span>
- </td>
- <td class='extra'>
- +<?=$mon->rune_crit_damage?>
- <span class='percent'>%</span>
- </td>
- <td class='extra'>
- +<?=$mon->artifact_crit_damage?>
- <span class='percent'>%</span>
- </td>
- <td class='extra'>
- +<?=$mon->building_crit_damage?>
- <span class='percent'>%</span>
- </td>
- <td class='total'>
- <?=$mon->total_crit_damage?>
- <span class='percent'>%</span>
- </td>
- </tr>
- <tr>
- <th>
- ACC
- </th>
- <td class='base'>
- <?=$mon->accuracy?>
- <span class='percent'>%</span>
- </td>
- <td class='extra'>
- +<?=$mon->rune_accuracy?>
- <span class='percent'>%</span>
- </td>
- <td class='extra'>
- +<?=$mon->artifact_accuracy?>
- <span class='percent'>%</span>
- </td>
- <td class='extra'>
- +<?=$mon->building_accuracy?>
- <span class='percent'>%</span>
- </td>
- <td class='total'>
- <?=$mon->total_accuracy?>
- <span class='percent'>%</span>
- </td>
- </tr>
- <tr>
- <th>
- RES
- </th>
- <td class='base'>
- <?=$mon->resistance?>
- <span class='percent'>%</span>
- </td>
- <td class='extra'>
- +<?=$mon->rune_resistance?>
- <span class='percent'>%</span>
- </td>
- <td class='extra'>
- +<?=$mon->artifact_resistance?>
- <span class='percent'>%</span>
- </td>
- <td class='extra'>
- +<?=$mon->building_resistance?>
- <span class='percent'>%</span>
- </td>
- <td class='total'>
- <?=$mon->total_resistance?>
- <span class='percent'>%</span>
- </td>
- </tr>
- <tr>
- <th colspan='5'>
- Effective HP
- </th>
- <td class='total'>
- <?=$mon->effective_hp?>
- <span class='percent'> </span>
- </td>
- </tr>
- <tr>
- <th colspan='5'>
- Effective DMG
- </th>
- <td class='total'>
- <?=$mon->effective_dmg?>
- <span class='percent'> </span>
- </td>
- </tr>
- </table>
- <div class='skills'>
- <?php
- $skill_num = 0;
- foreach ($mon->unit->skill as $skill){
- $cur_lvl = $mon->skill_levels[$skill_num];
- $max_lvl = $skill->max_level;
- if ($max_lvl == $cur_lvl){
- $maxed = "maxed";
- }
- else{
- $maxed = "";
- }
- ?>
- <div class='skill'>
- <img src='<?=$skill->get_image()?>'/>
- <span class='skill_level <?=$maxed?>'>
- <?=$cur_lvl?>/<?=$max_lvl?>
- </span>
- <span class='skill_name'>
- <?=$skill->name?>
- </span>
- </div>
- <?php
- $skill_num ++;
- }
- ?>
- </div>
- </div>
- </div>
- <?php
- }
- ?>
- </article>
- </section> <!-- #catalog -->
- </main>
- <?php
- include __DIR__ . "/inc/footer.php";
- ?>
- </body>
- </html>
|