dev #41

Merged
lopar merged 29 commits from dev into master 2021-05-25 15:28:14 +00:00
3 changed files with 13 additions and 43 deletions
Showing only changes of commit 26ed4cd286 - Show all commits

View File

@ -60,36 +60,6 @@ SQL;
return self::$db->fetch($query, $this->USERID); return self::$db->fetch($query, $this->USERID);
} }
public function getStrengthBonus(): ?int
{
return self::getBonuses()['sum_strength'];
}
public function getDexterityBonus(): ?int
{
return self::getBonuses()['sum_dexterity'];
}
public function getIntuitionBonus(): ?int
{
return self::getBonuses()['sum_intuition'];
}
public function getEnduranceBonus(): ?int
{
return self::getBonuses()['sum_endurance'];
}
public function getIntelliganceBonus(): ?int
{
return self::getBonuses()['sum_intelligence'];
}
public function getWisdomBonus(): ?int
{
return self::getBonuses()['sum_wisdom'];
}
public function getAccuracyBonus(): ?int public function getAccuracyBonus(): ?int
{ {
return self::getBonuses()['sum_accuracy'] ?? 0; return self::getBonuses()['sum_accuracy'] ?? 0;

View File

@ -53,12 +53,12 @@ class UserInfo extends UserStats
$captions = 'Уровень:<br>Сила:<br>Ловкость:<br>Интуиция:<br>Выносливость:<br>Интеллект:<br>Мудрость:<br>Местонахождение:'; $captions = 'Уровень:<br>Сила:<br>Ловкость:<br>Интуиция:<br>Выносливость:<br>Интеллект:<br>Мудрость:<br>Местонахождение:';
$variables = $variables =
$this->level . '<br>' . $this->level . '<br>' .
parent::getStat('strength') . '<br>' . parent::getFullStats()->allStrength . '<br>' .
parent::getStat('dexterity') . '<br>' . parent::getFullStats()->allDexterity . '<br>' .
parent::getStat('intuition') . '<br>' . parent::getFullStats()->allIntuition . '<br>' .
parent::getStat('endurance') . '<br>' . parent::getFullStats()->allEndurance . '<br>' .
parent::getStat('intelligence') . '<br>' . parent::getFullStats()->allIntelligence . '<br>' .
parent::getStat('wisdom') . '<br>' . parent::getFullStats()->allWisdom . '<br>' .
Rooms::$roomNames[$this->room]; Rooms::$roomNames[$this->room];
if ($isMainWindow) { if ($isMainWindow) {
$this->Bank = new Bank($this->id); $this->Bank = new Bank($this->id);

View File

@ -381,17 +381,17 @@ Template::header('Игра');
<!--Параметры--> <!--Параметры-->
<div> <div>
<div class="container"> <div class="container">
Сила: <?= ($userStats->getFreeStatPoints() ? $userStats->getStat('strength', 1) . '(' . strval($userStats->getStrength() + $getItemsBonuses->getStrengthBonus()) . ')' : $userStats->getStrength() + $getItemsBonuses->getStrengthBonus()) ?> Сила: <?= ($userStats->getFreeStatPoints() ? $userStats->getStat('strength', 1) . '(' . strval($userStats->getFullStats()->allStrength) . ')' : $userStats->getFullStats()->allStrength) ?>
<br> <br>
Ловкость: <?= ($userStats->getFreeStatPoints() ? $userStats->getStat('dexterity', 1) . '(' . strval($userStats->getDexterity() + $getItemsBonuses->getDexterityBonus()) . ')' : $userStats->getDexterity() + $getItemsBonuses->getDexterityBonus()) ?> Ловкость: <?= ($userStats->getFreeStatPoints() ? $userStats->getStat('dexterity', 1) . '(' . strval($userStats->getFullStats()->allDexterity) . ')' : $userStats->getFullStats()->allDexterity) ?>
<br> <br>
Интуиция: <?= ($userStats->getFreeStatPoints() ? $userStats->getStat('intuition', 1) . '(' . strval($userStats->getIntuition() + $getItemsBonuses->getIntuitionBonus()) . ')' : $userStats->getIntuition() + $getItemsBonuses->getIntuitionBonus()) ?> Интуиция: <?= ($userStats->getFreeStatPoints() ? $userStats->getStat('intuition', 1) . '(' . strval($userStats->getFullStats()->allIntuition) . ')' : $userStats->getFullStats()->allIntuition) ?>
<br> <br>
Выносливость: <?= ($userStats->getFreeStatPoints() ? $userStats->getStat('endurance', 1) . '(' . strval($userStats->getEndurance() + $getItemsBonuses->getEnduranceBonus()) . ')' : $userStats->getEndurance() + $getItemsBonuses->getEnduranceBonus()) ?> Выносливость: <?= ($userStats->getFreeStatPoints() ? $userStats->getStat('endurance', 1) . '(' . strval($userStats->getFullStats()->allEndurance) . ')' : $userStats->getFullStats()->allEndurance) ?>
<br> <br>
Интеллект: <?= ($userStats->getFreeStatPoints() ? $userStats->getStat('intelligence', 1) . '(' . strval($userStats->getIntelligence() + $getItemsBonuses->getIntelliganceBonus()) . ')' : $userStats->getIntelligence() + $getItemsBonuses->getIntelliganceBonus()) ?> Интеллект: <?= ($userStats->getFreeStatPoints() ? $userStats->getStat('intelligence', 1) . '(' . strval($userStats->getFullStats()->allIntelligence) . ')' : $userStats->getFullStats()->allIntelligence) ?>
<br> <br>
Мудрость: <?= ($userStats->getFreeStatPoints() ? $userStats->getStat('wisdom', 1) . '(' . strval($userStats->getWisdom() + $getItemsBonuses->getWisdomBonus()) . ')' : $userStats->getWisdom() + $getItemsBonuses->getWisdomBonus()) ?> Мудрость: <?= ($userStats->getFreeStatPoints() ? $userStats->getStat('wisdom', 1) . '(' . strval($userStats->getFullStats()->allWisdom) . ')' : $userStats->getFullStats()->allWisdom) ?>
<br> <br>
<?php if ($userStats->getFreeStatPoints()): ?> <?php if ($userStats->getFreeStatPoints()): ?>
<small style="color: darkgreen;">Возможных <small style="color: darkgreen;">Возможных
@ -438,7 +438,7 @@ Template::header('Игра');
<div> <!--рюкзак--> <div> <!--рюкзак-->
<table style="border: 0; padding: 2px; border-spacing: 1px; width: 100%; background-color: #a5a5a5"> <table style="border: 0; padding: 2px; border-spacing: 1px; width: 100%; background-color: #a5a5a5">
<caption>Рюкзак <caption>Рюкзак
(масса: <?= '?? /' . $userStats->getStrength() * 4 ?>) (масса: <?= '?? /' . (int)$userStats->getStrength() * 4 ?>)
</caption> </caption>
<?php <?php
foreach ($iteminfo as $ii) { foreach ($iteminfo as $ii) {