db->query($s); $r = $q->fetchArray(SQLITE3_ASSOC); if ($r){ $this->id = $r["id"]; $this->name = HTML::e($r["name"]); $this->is_buff = $r["is_buff"]; $this->description = HTML::e($r["description"]); } } /** * Gets the pathto the monster image. The image must be in the * img/effect/ directory, and its name must be the effect id, * padded with '0' to 4 digits, and the extension must be '.png'. * * @return string Image URL, or a fixed unknown image. */ public function get_image(){ return APPLICATION::img("EFFECT", $this->id); } } ?>