diff --git a/classes/User.php b/classes/User.php index 2d9ebdd..1cb1265 100644 --- a/classes/User.php +++ b/classes/User.php @@ -25,10 +25,15 @@ class User public $room; public $block; public $shadow; + + public const STAT_MAXIMUM_AMOUNT = 40; // Пока несуществующие, для совместимости. public $married = 'Someone или нет.'; public $experience = 200; public $stat_points = 1; + public $headArmor; + public $chestArmor; + public $legArmor; // Динамически рассчитываемые public $health; //Статусы того, кто смотрит на информацию. @@ -129,52 +134,55 @@ class User echo ''; } - private function getStrength($isMainWindow = 0) + public function getStrength($isMainWindow = 0) { - if ($this->stat_points && $isMainWindow) { + if ($this->stat_points && $isMainWindow && $this->strength < self::STAT_MAXIMUM_AMOUNT) { + //main.php?edit=1&ups=sila return sprintf('%s [+]', $this->strength); } return $this->strength; } - private function getDexterity($isMainWindow = 0) + public function getDexterity($isMainWindow = 0) { - if ($this->stat_points && $isMainWindow) { + if ($this->stat_points && $isMainWindow && $this->dexterity < self::STAT_MAXIMUM_AMOUNT) { + //main.php?edit=1&ups=lovk return sprintf('%s [+]', $this->dexterity); } - return $this->strength; + return $this->dexterity; } - private function getIntuition($isMainWindow = 0) + public function getIntuition($isMainWindow = 0) { - if ($this->stat_points && $isMainWindow) { + if ($this->stat_points && $isMainWindow && $this->intuition < self::STAT_MAXIMUM_AMOUNT) { + //main.php?edit=1&ups=inta... return sprintf('%s [+]', $this->intuition); } - return $this->strength; + return $this->intuition; } - private function getEndurance($isMainWindow = 0) + public function getEndurance($isMainWindow = 0) { - if ($this->stat_points && $isMainWindow) { + if ($this->stat_points && $isMainWindow && $this->endurance < self::STAT_MAXIMUM_AMOUNT) { return sprintf('%s [+]', $this->endurance); } - return $this->strength; + return $this->endurance; } - private function getIntelligence($isMainWindow = 0) + public function getIntelligence($isMainWindow = 0) { - if ($this->stat_points && $isMainWindow) { + if ($this->stat_points && $isMainWindow && $this->intelligence < self::STAT_MAXIMUM_AMOUNT) { return sprintf('%s [+]', $this->intelligence); } - return $this->strength; + return $this->intelligence; } - private function getWisdom($isMainWindow = 0) + public function getWisdom($isMainWindow = 0) { - if ($this->stat_points && $isMainWindow) { + if ($this->stat_points && $isMainWindow && $this->wisdom < self::STAT_MAXIMUM_AMOUNT) { return sprintf('%s [+]', $this->wisdom); } - return $this->strength; + return $this->wisdom; } private function UserInfo()