get_db()->prepare(" SELECT id, name, is_buff, description FROM effect WHERE id = :id; "); $statement->bindValue(':id', $id, SQLITE3_TEXT); $r = $statement->execute()->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"]); } } /** * Retrieves the effect identifier. * * @return int Effect ID. */ public function get_id(){ return $this->id; } /** * Retrieves the effect name. * * @return string Effect name. */ public function get_name(){ return $this->name; } /** * Checks if the efect is a a buff * * @return boolean */ public function is_buff(){ return $this->is_buff; } /** * Checks if the efect is a a debuff * * @return boolean */ public function is_debuff(){ return ! $this->is_buff; } /** * Retrieves the effect description. * * @return string Effect description. */ public function get_description(){ return $this->description; } /** * Gets the pathto the monster image. * @return string Image URL, or a fixed unknown image. */ public function get_image(){ return APPLICATION::img("EFFECT", $this->id); } } ?>