db->query($s); $r = $q->fetchArray(SQLITE3_ASSOC); $this->id = $r["id"]; $this->com2us_id = $r["com2us_id"]; if (strlen($r["monster"]) > 0){ $this->monster = new K_Monster($this->db, $r["monster"], $complete); } $this->stars = $r["stars"]; $this->level = $r["level"]; $this->skill_1_level = $r["skill_1_level"]; $this->skill_2_level = $r["skill_2_level"]; $this->skill_3_level = $r["skill_3_level"]; $this->skill_4_level = $r["skill_4_level"]; $this->base_hp = $r["base_hp"]; $this->base_attack = $r["base_attack"]; $this->base_defense = $r["base_defense"]; $this->base_speed = $r["base_speed"]; $this->base_crit_rate = $r["base_crit_rate"]; $this->base_crit_damage = $r["base_crit_damage"]; $this->base_resistance = $r["base_resistance"]; $this->base_accuracy = $r["base_accuracy"]; $this->rune_hp = $r["rune_hp"]; $this->rune_attack = $r["rune_attack"]; $this->rune_defense = $r["rune_defense"]; $this->rune_speed = $r["rune_speed"]; $this->rune_crit_rate = $r["rune_crit_rate"]; $this->rune_crit_damage = $r["rune_crit_damage"]; $this->rune_resistance = $r["rune_resistance"]; $this->rune_accuracy = $r["rune_accuracy"]; $this->avg_rune_efficiency = $r["avg_rune_efficiency"]; $this->fodder = $r["fodder"]; $this->in_storage = $r["in_storage"]; $this->ignore_for_fusion = $r["ignore_for_fusion"]; $this->priority = $r["priority"]; $this->notes = $r["notes"]; if ($complete){ $this->load_runes(); } } /** * Loads the information about the equiped runes. * It is autoatically called at construction time if the * $complete parameter is true (by default). No point in calling it * twice. */ public function load_runes(){ $this->rune = []; $s = "SELECT rune " . "FROM monster_rune " . "WHERE monster = '$this->id'; "; $q = $this->db->query($s); while ($r = $q->fetchArray(SQLITE3_ASSOC)){ array_push($this->rune, new Rune($this->db, $r["rune"])); } } } ?>