forked from halo-battle/game
Version 0.7
This commit is contained in:
parent
e0f55450e1
commit
c117da6d77
148 changed files with 1914 additions and 801 deletions
|
|
@ -18,7 +18,7 @@ $return = '';
|
|||
$c = $nivo-2 < 1 ? 1 : $nivo-2; $a = $c + 7;
|
||||
if ($ibat == 0) {
|
||||
for ($c;$c<$a;$c++) {
|
||||
$b=ceil(($c*32)+(pow(1.41,$c)*exp(0.066*$c))*3.7);
|
||||
$b=ceil(($c*32)+(pow(1.41,$c)*exp(0.066*$c))*3.7);
|
||||
$h=ceil(($c*32)+(pow(1.41,$c)*exp(0.066*$c))*3.7) - ceil((($c-1)*32)+(pow(1.41,($c-1))*exp(0.066*($c-1)))*3.7);
|
||||
|
||||
$p=ceil((exp($c*0.28)*10));
|
||||
|
|
@ -30,7 +30,7 @@ $c = $nivo-2 < 1 ? 1 : $nivo-2; $a = $c + 7;
|
|||
}
|
||||
elseif ($ibat == 1) {
|
||||
for ($c;$c<$a;$c++) {
|
||||
$b=floor(($c*13)+(pow(1.36,$c)*exp(0.0675*$c))*7);
|
||||
$b=floor(($c*13)+(pow(1.36,$c)*exp(0.0675*$c))*7);
|
||||
$h=floor(($c*13)+(pow(1.36,$c)*exp(0.0675*$c))*7) - floor((($c-1)*13)+(pow(1.36,($c-1))*exp(0.0675*($c-1)))*7);
|
||||
|
||||
$p=ceil((exp($c*0.28)*10));
|
||||
|
|
@ -78,12 +78,21 @@ function niveauBat($bat){
|
|||
elseif ($bat == 4) return 'centrale_f';
|
||||
elseif ($bat == 5) return 'radar';
|
||||
elseif ($bat == 6) return 'labo';
|
||||
elseif ($bat == 7) return 'chantier_terrestre';
|
||||
elseif ($bat == 8) return 'chantier_spatial';
|
||||
elseif ($bat == 9) return 'caserne';
|
||||
elseif ($bat == 10) return 'silo';
|
||||
elseif ($bat == 11) return 'centre_info';
|
||||
else return '#Erreur, batiment invalide';
|
||||
}
|
||||
|
||||
if (isset($_GET['bat'])) {
|
||||
$i = intval($_GET['bat']);
|
||||
print '<table align="center" width="550"><tr><td colspan="2"><b>'.$batiment[$i].' niveau '.${niveauBat($i)}.'</b><br />'.$batimede[$i].'</td></tr><tr><td><img src="images/batiments/'.$batimeni[$i].'" alt="" /></td><td><div class="centre"><table style="margin-left: auto; margin-right: auto;"><tr><td><b>Niveau</b></td><td><b>Production par heure</b></td><td><b>Consommation énergie</b></td></tr>'.tableauProd($i,${niveauBat($i)}).'</table></div></<td></tr></table>';
|
||||
if (empty($batiment[$i])) print '<div class="centre"><table style="margin-left: auto; margin-right: auto; width: 275px; height: 50px"><tr><td><b>Batiment inexistant</b></td></tr></table></div>';
|
||||
else {
|
||||
if ($i <= 3) print '<table align="center" width="550"><tr><td colspan="2"><b>'.$batiment[$i].' niveau '.${niveauBat($i)}.'</b><br />'.$batimede[$i].'</td></tr><tr><td><img src="images/batiments/'.$batimeni[$i].'" alt="" /></td><td><div class="centre"><table style="margin-left: auto; margin-right: auto;"><tr><td><b>Niveau</b></td><td><b>Production par heure</b></td><td><b>Consommation énergie</b></td></tr>'.tableauProd($i,${niveauBat($i)}).'</table></div></<td></tr></table>';
|
||||
else print '<table align="center" width="550"><tr><td><img src="images/batiments/'.$batimeni[$i].'" alt="" /></td><td><b>'.$batiment[$i].' niveau '.${niveauBat($i)}.'</b><br /><br />'.$batimede[$i].'</td></tr></table>';
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue