|
|
@@ -0,0 +1,716 @@
|
|
|
+<?php
|
|
|
+ /**
|
|
|
+ * Monster view.
|
|
|
+ *
|
|
|
+ * Contains the view layout and some code to present the data.
|
|
|
+ *
|
|
|
+ * @category View
|
|
|
+ * @property_read Monster_Page $page The page model.
|
|
|
+ * @property_read 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'/>
|
|
|
+ <link rel='stylesheet' type='text/css' href='<?=URL::CSS?>optimizer.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'/>
|
|
|
+ <script>
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Updates the value next to the sliders when they change.
|
|
|
+ *
|
|
|
+ * @param stat Name of the stat to set.
|
|
|
+ * @param value Value of the slider.
|
|
|
+ */
|
|
|
+ function updateMinValue(stat, value){
|
|
|
+ document.getElementById('lbl_min_' + stat).innerHTML = value;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Starts the optimization.
|
|
|
+ *
|
|
|
+ * Checks for error in the combination of the parameters, and
|
|
|
+ * shows an error window if there is an invalid conbination. If
|
|
|
+ * not, builds the url to calculate the new rune combinations,
|
|
|
+ * and presents th received response.
|
|
|
+ *
|
|
|
+ * @return false on error, true on success.
|
|
|
+ */
|
|
|
+ function apply(){
|
|
|
+ // TODO: Check for valid set combinations
|
|
|
+
|
|
|
+ var params = '';
|
|
|
+ var x;
|
|
|
+
|
|
|
+ // Player id - mandatory
|
|
|
+ params = 'uid=<?=$UID?>';
|
|
|
+
|
|
|
+ // Unit id - mandatory
|
|
|
+ params += '&unit=<?=$page->unit->id?>';
|
|
|
+
|
|
|
+ // Rune set 1 - mandatory
|
|
|
+ params += '&set[]=' + document.getElementById('set_1').options[document.getElementById('set_1').selectedIndex].value;
|
|
|
+
|
|
|
+ // Rune set 2 - mandatory
|
|
|
+ params += '&set[]=' + document.getElementById('set_2').options[document.getElementById('set_2').selectedIndex].value;
|
|
|
+
|
|
|
+ // Rune set 3 - optional
|
|
|
+ x = document.getElementById('set_3').options[document.getElementById('set_3').selectedIndex].value;
|
|
|
+ if (x != ''){
|
|
|
+ params += '&set[]=' + x;
|
|
|
+ }
|
|
|
+
|
|
|
+ // Slot 2 - mandatory
|
|
|
+ params += '&stat[]=' + document.getElementById('slot_2').options[document.getElementById('slot_2').selectedIndex].value;
|
|
|
+
|
|
|
+ // Slot 4 - mandatory
|
|
|
+ params += '&stat[]=' + document.getElementById('slot_4').options[document.getElementById('slot_4').selectedIndex].value;
|
|
|
+
|
|
|
+ // Slot 5 - mandatory
|
|
|
+ params += '&stat[]=' + document.getElementById('slot_6').options[document.getElementById('slot_6').selectedIndex].value;
|
|
|
+
|
|
|
+ // Rune source - mandatory
|
|
|
+ params += '&source=' + document.getElementById('rune_source').options[document.getElementById('rune_source').selectedIndex].value;
|
|
|
+
|
|
|
+ // Optimizer tuning - mandatory
|
|
|
+ params += '&tuning=' + document.getElementById('tuning').options[document.getElementById('tuning').selectedIndex].value;
|
|
|
+
|
|
|
+ // Min HP - Optional
|
|
|
+ if (document.getElementById('min_hp').value > document.getElementById('min_hp').min){
|
|
|
+ params += '&min_hp=' + document.getElementById('min_hp').value;
|
|
|
+ }
|
|
|
+
|
|
|
+ // Min ATK - Optional
|
|
|
+ if (document.getElementById('min_attack').value > document.getElementById('min_attack').min){
|
|
|
+ params += '&min_attack=' + document.getElementById('min_attack').value;
|
|
|
+ }
|
|
|
+
|
|
|
+ // Min DEF - Optional
|
|
|
+ if (document.getElementById('min_defense').value > document.getElementById('min_defense').min){
|
|
|
+ params += '&min_defense=' + document.getElementById('min_defense').value;
|
|
|
+ }
|
|
|
+
|
|
|
+ // Min SPD - Optional
|
|
|
+ if (document.getElementById('min_speed').value > document.getElementById('min_speed').min){
|
|
|
+ params += '&min_speed=' + document.getElementById('min_speed').value;
|
|
|
+ }
|
|
|
+
|
|
|
+ // Min CRR - Optional
|
|
|
+ if (document.getElementById('min_crit_rate').value > document.getElementById('min_crit_rate').min){
|
|
|
+ params += '&min_crit_rate=' + document.getElementById('min_crit_rate').value;
|
|
|
+ }
|
|
|
+
|
|
|
+ // Min CRD - Optional
|
|
|
+ if (document.getElementById('min_crit_damage').value > document.getElementById('min_crit_damage').min){
|
|
|
+ params += '&min_crit_damage=' + document.getElementById('min_crit_damage').value;
|
|
|
+ }
|
|
|
+
|
|
|
+ // Min ACC - Optional
|
|
|
+ if (document.getElementById('min_accuracy').value > document.getElementById('min_accuracy').min){
|
|
|
+ params += '&min_accuracy=' + document.getElementById('min_accuracy').value;
|
|
|
+ }
|
|
|
+
|
|
|
+ // Min RES - Optional
|
|
|
+ if (document.getElementById('min_resistance').value > document.getElementById('min_resistance').min){
|
|
|
+ params += '&min_resistance=' + document.getElementById('min_resistance').value;
|
|
|
+ }
|
|
|
+
|
|
|
+ // Send th request
|
|
|
+ var xhttp = new XMLHttpRequest();
|
|
|
+ xhttp.onreadystatechange = function() {
|
|
|
+ if (this.readyState == 4 && this.status == 200) {
|
|
|
+ showOptimizations(this.response);
|
|
|
+ }
|
|
|
+ };
|
|
|
+ xhttp.open("POST", "/action/optimize/", true);
|
|
|
+ xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
|
|
|
+ xhttp.send(params);
|
|
|
+ }
|
|
|
+
|
|
|
+ function showOptimizations(content){
|
|
|
+ console.log("RESPONSE: " + content);
|
|
|
+ }
|
|
|
+ </script>
|
|
|
+ </head>
|
|
|
+ <body>
|
|
|
+<?php
|
|
|
+ include __DIR__ . "/inc/header.php";
|
|
|
+?>
|
|
|
+ <section id='monster' class='content'>
|
|
|
+ <h2>
|
|
|
+ Optimize <?=$page->unit->title?>
|
|
|
+ </h2>
|
|
|
+ <article id='profile'>
|
|
|
+ <div id='monster_info'>
|
|
|
+ <div class='monster_panel'>
|
|
|
+ <?=HTML::unit_panel($page->unit)?>
|
|
|
+ </div>
|
|
|
+<?php
|
|
|
+ if ($page->unit->experience_level != 0){
|
|
|
+ $exp_pct = ceil($page->unit->exp_gained * 100 / $page->unit->experience_level);
|
|
|
+ $exp_txt = $page->unit->exp_gained . " / " . $page->unit->experience_level;
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ $exp_pct = 100;
|
|
|
+ $exp_txt = "MAX";
|
|
|
+ }
|
|
|
+ $now = time();
|
|
|
+ //$datediff = $now - $page->unit->create_time->getTimestamp();
|
|
|
+ $datediff = $now - strtotime($page->unit->create_time->format('Y-m-d H:i:s'));
|
|
|
+ $datediff = floor($datediff / (60 * 60 * 24));
|
|
|
+?>
|
|
|
+ <div id='monster_details'>
|
|
|
+<?php
|
|
|
+ if (sizeof($page->unit->teams) > 0){
|
|
|
+?>
|
|
|
+ <div id='teams'>
|
|
|
+ <h4>
|
|
|
+ Teams:
|
|
|
+ </h4>
|
|
|
+ <ul>
|
|
|
+<?php
|
|
|
+ foreach($page->unit->teams as $team){
|
|
|
+?>
|
|
|
+ <li>
|
|
|
+ <a target='blank' href='/<?=$UID?>/teams/<?=$team->id?>'>
|
|
|
+ <?=$team->name?>
|
|
|
+ </a>
|
|
|
+ </li>
|
|
|
+<?php
|
|
|
+ }
|
|
|
+?>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+<?php
|
|
|
+ }
|
|
|
+?>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+<?php
|
|
|
+ $building_attack = floor(($page->unit->attack * $page->building_stats["atk"] / 100) + ($page->unit->attack * $page->building_stats["elm"][$page->unit->unit->element] / 100));
|
|
|
+ $building_defense = floor($page->building_stats["def"] * $page->unit->defense / 100);
|
|
|
+ $building_hp = floor($page->building_stats["hp"] * $page->unit->hp / 100);
|
|
|
+ $building_speed = $page->building_stats["spd"];
|
|
|
+ $building_crit_rate = 0;
|
|
|
+ $building_crit_damage = $page->building_stats["crd"];
|
|
|
+ $building_accuracy = 0;
|
|
|
+ $building_resistance = 0;
|
|
|
+?>
|
|
|
+ <table id='stats'>
|
|
|
+ <tr>
|
|
|
+ <th>
|
|
|
+ Stats
|
|
|
+ </th>
|
|
|
+ <th>
|
|
|
+ Base
|
|
|
+ </th>
|
|
|
+ <th>
|
|
|
+ Runes
|
|
|
+ </th>
|
|
|
+ <th>
|
|
|
+ Artifacts
|
|
|
+ </th>
|
|
|
+ <th>
|
|
|
+ Buildings
|
|
|
+ </th>
|
|
|
+ <th>
|
|
|
+ Total
|
|
|
+ </th>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>
|
|
|
+ ATK
|
|
|
+ </th>
|
|
|
+ <td class='base'>
|
|
|
+ <?=$page->unit->attack?>
|
|
|
+ </td>
|
|
|
+ <td class='extra'>
|
|
|
+ +<?=$page->unit->rune_attack?>
|
|
|
+ </td>
|
|
|
+ <td class='extra'>
|
|
|
+ +<?=$page->artifact_stats["atk"]?>
|
|
|
+ </td>
|
|
|
+ <td class='extra'>
|
|
|
+ +<?=$building_attack?>
|
|
|
+ </td>
|
|
|
+ <td class='total'>
|
|
|
+ <?=$page->unit->attack + $page->unit->rune_attack + $building_attack + $page->artifact_stats["atk"]?>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>
|
|
|
+ DEF
|
|
|
+ </th>
|
|
|
+ <td class='base'>
|
|
|
+ <?=$page->unit->defense?>
|
|
|
+ </td>
|
|
|
+ <td class='extra'>
|
|
|
+ +<?=$page->unit->rune_defense?>
|
|
|
+ </td>
|
|
|
+ <td class='extra'>
|
|
|
+ +<?=$page->artifact_stats["def"]?>
|
|
|
+ </td>
|
|
|
+ <td class='extra'>
|
|
|
+ +<?=$building_defense?>
|
|
|
+ </td>
|
|
|
+ <td class='total'>
|
|
|
+ <?=$page->unit->defense + $page->unit->rune_defense + $building_defense + $page->artifact_stats["def"]?>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>
|
|
|
+ HP
|
|
|
+ </th>
|
|
|
+ <td class='base'>
|
|
|
+ <?=$page->unit->hp?>
|
|
|
+ </td>
|
|
|
+ <td class='extra'>
|
|
|
+ +<?=$page->unit->rune_hp?>
|
|
|
+ </td>
|
|
|
+ <td class='extra'>
|
|
|
+ +<?=$page->artifact_stats["hp"]?>
|
|
|
+ </td>
|
|
|
+ <td class='extra'>
|
|
|
+ +<?=$building_hp?>
|
|
|
+ </td>
|
|
|
+ <td class='total'>
|
|
|
+ <?=$page->unit->hp + $page->unit->rune_hp + $building_hp + $page->artifact_stats["hp"]?>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>
|
|
|
+ SPD
|
|
|
+ </th>
|
|
|
+ <td class='base'>
|
|
|
+ <?=$page->unit->speed?>
|
|
|
+ </td>
|
|
|
+ <td class='extra'>
|
|
|
+ +<?=$page->unit->rune_speed?>
|
|
|
+ </td>
|
|
|
+ <td class='extra'>
|
|
|
+ +0
|
|
|
+ </td>
|
|
|
+ <td class='extra'>
|
|
|
+ +<?=$building_speed?>
|
|
|
+ </td>
|
|
|
+ <td class='total'>
|
|
|
+ <?=$page->unit->speed + $page->unit->rune_speed + $building_speed?>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>
|
|
|
+ CRR
|
|
|
+ </th>
|
|
|
+ <td class='base'>
|
|
|
+ <?=$page->unit->crit_rate?>%
|
|
|
+ </td>
|
|
|
+ <td class='extra'>
|
|
|
+ +<?=$page->unit->rune_crit_rate?>%
|
|
|
+ </td>
|
|
|
+ <td class='extra'>
|
|
|
+ +0%
|
|
|
+ </td>
|
|
|
+ <td class='extra'>
|
|
|
+ +<?=$building_crit_rate?>%
|
|
|
+ </td>
|
|
|
+ <td class='total'>
|
|
|
+ <?=$page->unit->crit_rate + $page->unit->rune_crit_rate + $building_crit_rate?>%
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>
|
|
|
+ CRD
|
|
|
+ </th>
|
|
|
+ <td class='base'>
|
|
|
+ <?=$page->unit->crit_damage?>%
|
|
|
+ </td>
|
|
|
+ <td class='extra'>
|
|
|
+ +<?=$page->unit->rune_crit_damage?>%
|
|
|
+ </td>
|
|
|
+ <td class='extra'>
|
|
|
+ +0%
|
|
|
+ </td>
|
|
|
+ <td class='extra'>
|
|
|
+ +<?=$building_crit_damage?>%
|
|
|
+ </td>
|
|
|
+ <td class='total'>
|
|
|
+ <?=$page->unit->crit_damage + $page->unit->rune_crit_damage + $building_crit_damage?>%
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>
|
|
|
+ ACC
|
|
|
+ </th>
|
|
|
+ <td class='base'>
|
|
|
+ <?=$page->unit->accuracy?>%
|
|
|
+ </td>
|
|
|
+ <td class='extra'>
|
|
|
+ +<?=$page->unit->rune_accuracy?>%
|
|
|
+ </td>
|
|
|
+ <td class='extra'>
|
|
|
+ +0%
|
|
|
+ </td>
|
|
|
+ <td class='extra'>
|
|
|
+ +<?=$building_accuracy?>%
|
|
|
+ </td>
|
|
|
+ <td class='total'>
|
|
|
+ <?=$page->unit->accuracy + $page->unit->rune_accuracy + $building_accuracy?>%
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>
|
|
|
+ RES
|
|
|
+ </th>
|
|
|
+ <td class='base'>
|
|
|
+ <?=$page->unit->resistance?>%
|
|
|
+ </td>
|
|
|
+ <td class='extra'>
|
|
|
+ +<?=$page->unit->rune_resistance?>%
|
|
|
+ </td>
|
|
|
+ <td class='extra'>
|
|
|
+ +0%
|
|
|
+ </td>
|
|
|
+ <td class='extra'>
|
|
|
+ +<?=$building_resistance?>%
|
|
|
+ </td>
|
|
|
+ <td class='total'>
|
|
|
+ <?=$page->unit->resistance + $page->unit->rune_resistance + $building_resistance?>%
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
+ <div id='artifacts'>
|
|
|
+ <?=HTML::artifact_table($page->unit->artifact_type)?>
|
|
|
+ <?=HTML::artifact_table($page->unit->artifact_element)?>
|
|
|
+ </div>
|
|
|
+ </article> <!-- #profile -->
|
|
|
+ <article id='current_runes'>
|
|
|
+<?php
|
|
|
+ $total_efficiency = 0;
|
|
|
+ $total_max_efficiency = 0;
|
|
|
+ $total_reached_efficiency = 0;
|
|
|
+ $total_level = 0;
|
|
|
+ $total_stars = 0;
|
|
|
+ $total_value = 0;
|
|
|
+ $total_runes = 0;
|
|
|
+ $show_list = [6, 1, 2, 3, 4, 5];
|
|
|
+ //foreach ($page->unit->rune as $rune){
|
|
|
+ foreach ($show_list as $i){
|
|
|
+ $rune = $page->unit->rune[$i - 1];
|
|
|
+ $total_efficiency += $rune->efficiency;
|
|
|
+ $total_max_efficiency += $rune->max_efficiency;
|
|
|
+ $total_reached_efficiency += ($rune->efficiency * 100 / $rune->max_efficiency);
|
|
|
+ $total_level += $rune->level;
|
|
|
+ $total_stars += $rune->stars;
|
|
|
+ $total_value += $rune->value;
|
|
|
+ $total_runes ++;
|
|
|
+?>
|
|
|
+ <?=HTML::rune_table($rune)?>
|
|
|
+<?php
|
|
|
+ if ($i == 2){
|
|
|
+?>
|
|
|
+ <br/>
|
|
|
+<?php
|
|
|
+ }
|
|
|
+ }
|
|
|
+?>
|
|
|
+ </article>
|
|
|
+ <article id='rune_averages'>
|
|
|
+ <table id='table_averages'>
|
|
|
+ <tr>
|
|
|
+ <td class='title'>
|
|
|
+ Avg. level:
|
|
|
+ </td>
|
|
|
+ <td class='value'>
|
|
|
+ <?=number_format($total_level / $total_runes, 2)?>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td class='title'>
|
|
|
+ Avg. stars:
|
|
|
+ </td>
|
|
|
+ <td class='value'>
|
|
|
+ <?=number_format($total_stars / $total_runes, 2)?>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td class='title'>
|
|
|
+ Avg. value:
|
|
|
+ </td>
|
|
|
+ <td class='value'>
|
|
|
+ <?=number_format($total_value / $total_runes, 2, '.', '')?>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td class='title'>
|
|
|
+ Total value:
|
|
|
+ </td>
|
|
|
+ <td class='value'>
|
|
|
+ <?=$total_value?>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td class='title'>
|
|
|
+ Avg. efficiency:
|
|
|
+ </td>
|
|
|
+ <td class='value'>
|
|
|
+ <?=number_format($total_efficiency / $total_runes, 2)?>%
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td class='title'>
|
|
|
+ Avg. max. efficiency:
|
|
|
+ </td>
|
|
|
+ <td class='value'>
|
|
|
+ <?=number_format($total_max_efficiency / $total_runes, 2)?>%
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td class='title'>
|
|
|
+ Avg. reached efficiency:
|
|
|
+ </td>
|
|
|
+ <td class='value'>
|
|
|
+ <?=number_format($total_reached_efficiency / $total_runes, 2)?>%
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
+ </article>
|
|
|
+ </section> <!-- runes -->
|
|
|
+ <section id='parameters' class='content'>
|
|
|
+ <h2>
|
|
|
+ Optimization parameters
|
|
|
+ </h2>
|
|
|
+ <article>
|
|
|
+ <table>
|
|
|
+ <tr>
|
|
|
+ <td class='name'>
|
|
|
+ Rune sets
|
|
|
+ </td>
|
|
|
+ <td class='value'>
|
|
|
+<?php
|
|
|
+ $reflect = new ReflectionClass("RUNE_SET_ID");
|
|
|
+?>
|
|
|
+ <select id='set_1'>
|
|
|
+<?php
|
|
|
+ foreach($reflect->getConstants() as $name => $id){
|
|
|
+ $selected = "";
|
|
|
+ if (in_array($id, $filters["MAIN"])){
|
|
|
+ $selected = "selected='selected'";
|
|
|
+ }
|
|
|
+?>
|
|
|
+ <option value='<?=$id?>' <?=$selected?>><?=$name?></option>
|
|
|
+<?php
|
|
|
+ }
|
|
|
+?>
|
|
|
+ </select>
|
|
|
+ <select id='set_2'>
|
|
|
+<?php
|
|
|
+ foreach($reflect->getConstants() as $name => $id){
|
|
|
+ $selected = "";
|
|
|
+ if (in_array($id, $filters["MAIN"])){
|
|
|
+ $selected = "selected='selected'";
|
|
|
+ }
|
|
|
+?>
|
|
|
+ <option value='<?=$id?>' <?=$selected?>><?=$name?></option>
|
|
|
+<?php
|
|
|
+ }
|
|
|
+?>
|
|
|
+ </select>
|
|
|
+ <select id='set_3'>
|
|
|
+ <option value='' <?=$selected?>></option>
|
|
|
+<?php
|
|
|
+ foreach($reflect->getConstants() as $name => $id){
|
|
|
+ $selected = "";
|
|
|
+ if (in_array($id, $filters["MAIN"])){
|
|
|
+ $selected = "selected='selected'";
|
|
|
+ }
|
|
|
+?>
|
|
|
+ <option value='<?=$id?>' <?=$selected?>><?=$name?></option>
|
|
|
+<?php
|
|
|
+ }
|
|
|
+?>
|
|
|
+ </select>
|
|
|
+ </td>
|
|
|
+ <td class='empty'>
|
|
|
+ </td>
|
|
|
+ <td class='name'>
|
|
|
+ Min HP
|
|
|
+ </td>
|
|
|
+ <td class='value'>
|
|
|
+ <input id='min_hp' type='range' value='<?=$page->unit->hp?>' value='<?=$page->unit->hp?>' min='<?=$page->unit->hp?>' max='50000' oninput='updateMinValue("hp", this.value);'>
|
|
|
+ <span id='lbl_min_hp'><?=$page->unit->hp?></span>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td class='name'>
|
|
|
+ Even slots
|
|
|
+ </td>
|
|
|
+ <td class='value'>
|
|
|
+ <select id='slot_2'>
|
|
|
+ <option value='<?=RUNE_STAT_ID::HP_P?>'>HP%</option>
|
|
|
+ <option value='<?=RUNE_STAT_ID::ATK_P?>'>ATK%</option>
|
|
|
+ <option value='<?=RUNE_STAT_ID::DEF_P?>'>DEF%</option>
|
|
|
+ <option value='<?=RUNE_STAT_ID::SPD?>'>SPD</option>
|
|
|
+ </select>
|
|
|
+ <select id='slot_4'>
|
|
|
+ <option value='<?=RUNE_STAT_ID::HP_P?>'>HP%</option>
|
|
|
+ <option value='<?=RUNE_STAT_ID::ATK_P?>'>ATK%</option>
|
|
|
+ <option value='<?=RUNE_STAT_ID::DEF_P?>'>DEF%</option>
|
|
|
+ <option value='<?=RUNE_STAT_ID::CRR?>'>CRR</option>
|
|
|
+ <option value='<?=RUNE_STAT_ID::CRR?>'>CRD</option>
|
|
|
+ </select>
|
|
|
+ <select id='slot_6'>
|
|
|
+ <option value='<?=RUNE_STAT_ID::HP_P?>'>HP%</option>
|
|
|
+ <option value='<?=RUNE_STAT_ID::ATK_P?>'>ATK%</option>
|
|
|
+ <option value='<?=RUNE_STAT_ID::DEF_P?>'>DEF%</option>
|
|
|
+ <option value='<?=RUNE_STAT_ID::ACC?>'>ACC</option>
|
|
|
+ <option value='<?=RUNE_STAT_ID::RES?>'>RES</option>
|
|
|
+ </select>
|
|
|
+ </td>
|
|
|
+ <td class='empty'>
|
|
|
+ </td>
|
|
|
+ <td class='name'>
|
|
|
+ Min ATK
|
|
|
+ </td>
|
|
|
+ <td class='value'>
|
|
|
+ <input id='min_attack' type='range' value='<?=$page->unit->attack?>' value='<?=$page->unit->attack?>' min='<?=$page->unit->attack?>' max='10000' oninput='updateMinValue("attack", this.value);'>
|
|
|
+ <span id='lbl_min_attack'><?=$page->unit->attack?></span>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td class='name'>
|
|
|
+ Use runes from
|
|
|
+ </td>
|
|
|
+ <td class='value'>
|
|
|
+ <select id='rune_source'>
|
|
|
+ <option value='0'>Storage only</option>
|
|
|
+ <option value='1'>Units in no teams</option>
|
|
|
+ <option value='2'>Units in teams with 0 score</option>
|
|
|
+ <option value='3'>Units with lower overall score</option>
|
|
|
+ <option value='4'>All runes</option>
|
|
|
+ </select>
|
|
|
+ </td>
|
|
|
+ <td class='empty'>
|
|
|
+ </td>
|
|
|
+ <td class='name'>
|
|
|
+ Min DEF
|
|
|
+ </td>
|
|
|
+ <td class='value'>
|
|
|
+ <input id='min_defense' type='range' value='<?=$page->unit->defense?>' value='<?=$page->unit->defense?>' min='<?=$page->unit->defense?>' max='10000' oninput='updateMinValue("defense", this.value);'>
|
|
|
+ <span id='lbl_min_defense'><?=$page->unit->defense?></span>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td class='name'>
|
|
|
+ Tune optimizer for
|
|
|
+ </td>
|
|
|
+ <td class='value'>
|
|
|
+ <select id='tuning'>
|
|
|
+ <option value='0'>Rune current levels</option>
|
|
|
+ <option value='1'>+12</option>
|
|
|
+ <option value='2'>2/4/6 +15, 1/3/5 + 12</option>
|
|
|
+ <option value='3'>+15</option>
|
|
|
+ </select>
|
|
|
+ </td>
|
|
|
+ <td class='empty'>
|
|
|
+ </td>
|
|
|
+ <td class='name'>
|
|
|
+ Min SPD
|
|
|
+ </td>
|
|
|
+ <td class='value'>
|
|
|
+ <input id='min_speed' type='range' value='<?=$page->unit->speed?>' value='<?=$page->unit->speed?>' min='<?=$page->unit->speed?>' max='400' oninput='updateMinValue("speed", this.value);'>
|
|
|
+ <span id='lbl_min_speed'><?=$page->unit->speed?></span>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td class='empty'>
|
|
|
+ </td>
|
|
|
+ <td class='empty'>
|
|
|
+ </td>
|
|
|
+ <td class='empty'>
|
|
|
+ </td>
|
|
|
+ <td class='name'>
|
|
|
+ Min CRR
|
|
|
+ </td>
|
|
|
+ <td class='value'>
|
|
|
+ <input id='min_crit_rate' type='range' value='<?=$page->unit->crit_rate?>' value='<?=$page->unit->crit_rate?>' min='<?=$page->unit->crit_rate?>' max='100' oninput='updateMinValue("crit_rate", this.value);'>
|
|
|
+ <span id='lbl_min_crit_rate'><?=$page->unit->crit_rate?></span>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td class='empty'>
|
|
|
+ </td>
|
|
|
+ <td class='empty'>
|
|
|
+ </td>
|
|
|
+ <td class='empty'>
|
|
|
+ </td>
|
|
|
+ <td class='name'>
|
|
|
+ Min CRD
|
|
|
+ </td>
|
|
|
+ <td class='value'>
|
|
|
+ <input id='min_crit_damage' type='range' value='<?=$page->unit->crit_damage?>' value='<?=$page->unit->crit_damage?>' min='<?=$page->unit->crit_damage?>' max='400' oninput='updateMinValue("crit_damage", this.value);'>
|
|
|
+ <span id='lbl_min_crit_damage'><?=$page->unit->crit_damage?></span>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td class='empty'>
|
|
|
+ </td>
|
|
|
+ <td class='empty'>
|
|
|
+ </td>
|
|
|
+ <td class='empty'>
|
|
|
+ </td>
|
|
|
+ <td class='name'>
|
|
|
+ Min ACC
|
|
|
+ </td>
|
|
|
+ <td class='value'>
|
|
|
+ <input id='min_accuracy' type='range' value='<?=$page->unit->accuracy?>' value='<?=$page->unit->accuracy?>' min='<?=$page->unit->accuracy?>' max='85' oninput='updateMinValue("accuracy", this.value);'>
|
|
|
+ <span id='lbl_min_accuracy'><?=$page->unit->accuracy?></span>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td class='action'>
|
|
|
+ <input type='button' value='Apply' onClick='apply();'/>
|
|
|
+ </td>
|
|
|
+ <td class='empty'>
|
|
|
+ </td>
|
|
|
+ <td class='empty'>
|
|
|
+ </td>
|
|
|
+ <td class='name'>
|
|
|
+ Min RES
|
|
|
+ </td>
|
|
|
+ <td class='value'>
|
|
|
+ <input id='min_resistance' type='range' value='<?=$page->unit->resistance?>' value='<?=$page->unit->resistance?>' min='<?=$page->unit->resistance?>' max='100' oninput='updateMinValue("resistance", this.value);'>
|
|
|
+ <span id='lbl_min_resistance'><?=$page->unit->resistance?></span>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
+ </article>
|
|
|
+ </section>
|
|
|
+
|
|
|
+<?php
|
|
|
+ include __DIR__ . "/inc/footer.php";
|
|
|
+?>
|
|
|
+ </body>
|
|
|
+</html>
|