General fixes

+Fixed a bug that didn't permit to display the bonus of some buildings
at level 0
+The cavalry training percentage bonus, provided by the horsedrinking
trough, is now displayed correctly
This commit is contained in:
iopietro
2018-05-18 17:23:54 +02:00
parent 0322a0ae49
commit b91e27381b
16 changed files with 56 additions and 33 deletions
+1 -1
View File
@@ -464,7 +464,7 @@ class Battle {
$winner = ($rap > $rdp);
// Formula for calculating the Moral
// WW villages aren't affected by this moral bonus
// WW villages aren't affected by this bonus
if($attpop > $defpop && !$isWWVillage) {
$moralbonus = 1 / round(max(0.667, pow($defpop / $attpop, 0.2 * min(1, $rap / ($rdp > 0 ? $rdp : 1)))), 3);
}
+1
View File
@@ -1113,6 +1113,7 @@ define("WORLD_WONDER_NOTCHANGE_NAME","You can not change the name of the World W
define("WORLD_WONDER_NAME_CHANGED","Name changed");
define("HORSEDRINKING","Horse Drinking Trough");
define("EXTRA_BONUS","Extra bonus");
define("HORSEDRINKING_DESC","The horse drinking trough of the Romans decreases the training time of cavalry and the upkeep of these troops as well.");
define("GREATWORKSHOP","Great Workshop");