2019-01-11 16:22:32 +00:00
|
|
|
|
<?php
|
|
|
|
|
/**
|
|
|
|
|
* Created by PhpStorm.
|
|
|
|
|
* User: Lopar
|
|
|
|
|
* Date: 11.01.2019
|
|
|
|
|
* Time: 18:21
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
class ItemClass extends Item
|
|
|
|
|
{
|
2019-01-11 17:51:35 +00:00
|
|
|
|
private function plusOrMinus($number)
|
|
|
|
|
{
|
|
|
|
|
if ($number > 0) return "+".$number;
|
|
|
|
|
else return $number;
|
|
|
|
|
}
|
2019-01-11 16:22:32 +00:00
|
|
|
|
public function printItemStats()
|
|
|
|
|
{
|
2019-01-11 16:47:16 +00:00
|
|
|
|
echo $this->name ." (Масса: ". $this->massa .")";
|
|
|
|
|
if ($this->nalign) echo " <img src=i/align_{$this->nalign}.gif title='Этот предмет могут использовать только игроки с определённой склонностью.'> ";
|
|
|
|
|
if ($this->count > 0) echo "<br><small>(Осталось: {$this->count} штук)</small>";
|
2019-01-11 17:51:35 +00:00
|
|
|
|
if ($this->maxdur > 0) echo "<br>Долговечность: 0 / {$this->maxdur}";
|
2019-01-11 16:47:16 +00:00
|
|
|
|
if ($this->nsila) echo "<br>Требуется сила: {$this->nsila}";
|
|
|
|
|
if ($this->nlovk) echo "<br>Требуется ловкость: {$this->nlovk}";
|
|
|
|
|
if ($this->ninta) echo "<br>Требуется интуиция: {$this->ninta}";
|
|
|
|
|
if ($this->nvinos) echo "<br>Требуется выносливость: {$this->nvinos}";
|
|
|
|
|
|
2019-01-11 17:51:35 +00:00
|
|
|
|
if ($this->gsila) echo "<br>Сила: " .$this->plusOrMinus($this->gsila);
|
|
|
|
|
if ($this->glovk) echo "<br>Ловкость: " .$this->plusOrMinus($this->glovk);
|
|
|
|
|
if ($this->ginta) echo "<br>Интуиция: " .$this->plusOrMinus($this->ginta);
|
|
|
|
|
if ($this->gintel) echo "<br>Интеллект: " .$this->plusOrMinus($this->gintel);
|
|
|
|
|
|
2019-01-11 16:47:16 +00:00
|
|
|
|
|
|
|
|
|
echo "<br>";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function printItemImage()
|
|
|
|
|
{
|
|
|
|
|
echo "<img src='/i/sh/{$this->img}'";
|
2019-01-11 16:22:32 +00:00
|
|
|
|
}
|
|
|
|
|
}
|