forked from halo-battle/game
Version 0.9b
This commit is contained in:
parent
59fbc7104e
commit
73645ccc1f
25 changed files with 841 additions and 466 deletions
|
|
@ -28,27 +28,27 @@ else {
|
|||
$temps_v = ceil(480/pow(1.25,($chantier_terrestre-1)));
|
||||
$veh = 9;
|
||||
}
|
||||
elseif ($_POST['type'] == 10) {
|
||||
elseif ($_POST['type'] == 10 && $energie_t >=2) {
|
||||
$metal -= 4000*$sa;
|
||||
$cristal -= 2000*$sa;
|
||||
$temps_v = ceil(1560/pow(1.25,($chantier_terrestre-3)));
|
||||
$veh = 10;
|
||||
}
|
||||
elseif ($_POST['type'] == 11) {
|
||||
elseif ($_POST['type'] == 11 && $armement >= 3 && $energie_t >= 3) {
|
||||
$metal -= 4500*$sa;
|
||||
$cristal -= 800*$sa;
|
||||
$hydrogene -= 600*$sa;
|
||||
$temps_v = ceil(1800/pow(1.25,($chantier_terrestre-4)));
|
||||
$veh = 11;
|
||||
}
|
||||
elseif ($_POST['type'] == 12) {
|
||||
elseif ($_POST['type'] == 12 && $armement >= 1) {
|
||||
$metal -= 12000*$sa;
|
||||
$cristal -= 10000*$sa;
|
||||
$hydrogene -= 1000*$sa;
|
||||
$temps_v = ceil(6720/pow(1.25,($chantier_terrestre-4)));
|
||||
$veh = 12;
|
||||
}
|
||||
elseif ($_POST['type'] == 13) {
|
||||
elseif ($_POST['type'] == 13 && $armement >= 1) {
|
||||
$metal -= 15000*$sa;
|
||||
$cristal -= 9500*$sa;
|
||||
$hydrogene -= 1500*$sa;
|
||||
|
|
@ -63,7 +63,7 @@ if (isset($veh) && $veh != '' && (!empty($nomterrn[$veh-1]) || $veh == 'e' || (i
|
|||
$fileVeh = explode(' ',implode(' ',$fileVeh).' '.$veh);
|
||||
}
|
||||
$veh = implode(' ',$fileVeh);
|
||||
if (count($fileTemps_t) == 0 || count($fileTemps_t) == 1) {
|
||||
if (count($fileTemps_v) == 0 || count($fileTemps_v) == 1) {
|
||||
$temps_vs = time();
|
||||
for ($c=0 ; $c < $sa ; $c++){
|
||||
$temps_vs .= ' '.$temps_v;
|
||||
|
|
@ -71,14 +71,14 @@ if (isset($veh) && $veh != '' && (!empty($nomterrn[$veh-1]) || $veh == 'e' || (i
|
|||
$temps_v = $temps_vs;
|
||||
}
|
||||
else {
|
||||
$temps_vs = implode(' ',$fileTemps_t);
|
||||
$temps_vs = implode(' ',$fileTemps_v);
|
||||
for ($c=0 ; $c < $sa ; $c++){
|
||||
$temps_vs .= ' '.$temps_v;
|
||||
}
|
||||
$temps_v = $temps_vs;
|
||||
}
|
||||
|
||||
mysql_query("UPDATE planete SET metal='$metal', cristal='$cristal', temps_t='$temps_v', unit_t='$veh' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'") or die ("erreur sql ".mysql_error());
|
||||
mysql_query("UPDATE planete SET metal='$metal', cristal='$cristal', hydrogene='$hydrogene', temps_t='$temps_v', unit_t='$veh' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'") or die ("erreur sql ".mysql_error());
|
||||
}
|
||||
else {
|
||||
header('Location: chantier_spatial.php?err=3');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue