battles/classes/ItemClass.php

30 lines
1.1 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
/**
* Created by PhpStorm.
* User: Lopar
* Date: 11.01.2019
* Time: 18:21
*/
class ItemClass extends Item
{
public function printItemStats()
{
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>";
if ($this->maxdur > 0) echo "<br>(Долговечность: 0 / {$this->maxdur}";
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}";
echo "<br>";
}
public function printItemImage()
{
echo "<img src='/i/sh/{$this->img}'";
}
}