make class greater

This commit is contained in:
Igor Barkov [iwork] 2019-01-14 17:54:12 +02:00
parent 65a39f42af
commit 0e8ae215ed
1 changed files with 14 additions and 13 deletions

View File

@ -9,12 +9,11 @@ abstract class Item
public $maxdur; public $maxdur;
public $img; public $img;
public $cost; public $cost;
public $artefact; public $artefact;
public $type; # эти. что есть что нет... public $type;
public $nlevel; public $nlevel;
public $nsila; public $nsila;
@ -65,7 +64,6 @@ abstract class Item
public $mfuvorot; public $mfuvorot;
public $mfauvorot; public $mfauvorot;
public $dategoden; public $dategoden;
public $goden; public $goden;
public $needident; public $needident;
@ -225,16 +223,19 @@ IMG;
protected function printRequirements() protected function printRequirements()
{ {
if ($this->nlevel > 0) echo "<br>Требуется уровень" . $this->wrap($this->nlevel); if (!empty($this->$modifier)) {
if ($this->nnoj > 0) echo "<br>Требуется владение колющим оружиием" . $this->wrap($this->nnoj); echo "<br> Требования:";
if ($this->ndubina > 0) echo "<br>Требуется владение дробящим оружием" . $this->wrap($this->ndubina); if ($this->nlevel > 0) echo "<br>Требуется уровень" . $this->wrap($this->nlevel);
if ($this->ntopor > 0) echo "<br>Требуется владение рубящим оружием" . $this->wrap($this->ntopor); if ($this->nnoj > 0) echo "<br>Требуется владение колющим оружиием" . $this->wrap($this->nnoj);
if ($this->nmech > 0) echo "<br>Требуется владение режущим оружием" . $this->wrap($this->nmech); if ($this->ndubina > 0) echo "<br>Требуется владение дробящим оружием" . $this->wrap($this->ndubina);
if ($this->nsila > 0) echo "<br>Требуется сила" . $this->wrap($this->nsila); if ($this->ntopor > 0) echo "<br>Требуется владение рубящим оружием" . $this->wrap($this->ntopor);
if ($this->nlovk > 0) echo "<br>Требуется ловкость" . $this->wrap($this->nlovk); if ($this->nmech > 0) echo "<br>Требуется владение режущим оружием" . $this->wrap($this->nmech);
if ($this->ninta > 0) echo "<br>Требуется интуиция" . $this->wrap($this->ninta); if ($this->nsila > 0) echo "<br>Требуется сила" . $this->wrap($this->nsila);
if ($this->nvinos > 0) echo "<br>Требуется выносливость" . $this->wrap($this->nvinos); if ($this->nlovk > 0) echo "<br>Требуется ловкость" . $this->wrap($this->nlovk);
if ($this->nintel > 0) echo "<br>Требуется интеллект" . $this->wrap($this->nintel); if ($this->ninta > 0) echo "<br>Требуется интуиция" . $this->wrap($this->ninta);
if ($this->nvinos > 0) echo "<br>Требуется выносливость" . $this->wrap($this->nvinos);
if ($this->nintel > 0) echo "<br>Требуется интеллект" . $this->wrap($this->nintel);
}
} }
protected function printBonuses() protected function printBonuses()