forked from halo-battle/game
Implémente les constructions planétaires
This commit is contained in:
parent
f69d4bf376
commit
4f1f6a1ef3
@ -311,6 +311,15 @@ class dBatiments implements Donnees
|
|||||||
$sec /= (pow(1.23, $planete->batiments[11]) + 1.0025 * $planete->casernes[7]);
|
$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
|
//Accélération du temps de construction
|
||||||
$sec /= VITESSE;
|
$sec /= VITESSE;
|
||||||
|
|
||||||
|
@ -471,6 +471,15 @@ class dTerrestre implements Donnees
|
|||||||
$temps /= VITESSE;
|
$temps /= VITESSE;
|
||||||
|
|
||||||
//On tient compte des bonus
|
//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;
|
return ceil($temps/pow(1.25, ($planete->batiments[7] - $moins))) * $nombre;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user