Grosse passe sur les recherches #22

Merged
nemunaire merged 9 commits from task/20210228/add_techno_implementation into master 2021-02-28 17:10:22 +00:00
2 changed files with 18 additions and 0 deletions
Showing only changes of commit 4f1f6a1ef3 - Show all commits

View File

@ -311,6 +311,15 @@ class dBatiments implements Donnees
$sec /= (pow(1.23, $planete->batiments[11]) + 1.0025 * $planete->casernes[7]);
}
//Bonus technologique de vitesse de construction : Constructions Planétaires
if ($planete->technologies[2]& dTechnologies::idToBit(2)) {
$sec /= 1.15;
} elseif ($planete->technologies[2]& dTechnologies::idToBit(1)) {
$sec /= 1.10;
} elseif ($planete->technologies[2]& dTechnologies::idToBit(0)) {
$sec /= 1.05;
}
//Accélération du temps de construction
$sec /= VITESSE;

View File

@ -471,6 +471,15 @@ class dTerrestre implements Donnees
$temps /= VITESSE;
//On tient compte des bonus
//Bonus technologique de vitesse de construction : Constructions Planétaires
if ($planete->technologies[2]& dTechnologies::idToBit(2)) {
$temps /= 1.15;
} elseif ($planete->technologies[2]& dTechnologies::idToBit(1)) {
$temps /= 1.10;
} elseif ($planete->technologies[2]& dTechnologies::idToBit(0)) {
$temps /= 1.05;
}
return ceil($temps/pow(1.25, ($planete->batiments[7] - $moins))) * $nombre;
}