Version 0.10

This commit is contained in:
nemunaire 2008-11-19 12:00:00 +01:00
commit b9c240c781
246 changed files with 10218 additions and 1598 deletions

View file

@ -7,95 +7,97 @@ $ss=$_SESSION['ss'];
$pos=$_SESSION['pos'];
$race=$_SESSION['race'];
require_once('bdd.php');
require_once('noms.php');
include_once('common.php');
require('../connectBDD.php');
if ($_POST['type'] == 'e' && $labo >= 1 && !ereg('e,', implode(',',$fileVai).',')) {
$temps_s = '';
$vai = 'e';
if (isset($_POST['type'])) $_GET['type'] = $_POST['type'];
elseif (!isset($_GET['type'])) $_GET['type'] = '';
if ($_GET['type'] == 'e' && $labo >= 1 && !ereg('e,', implode(',',$fileVai).',')) {
//$temps_s = '';
//$vai = 'e';
}
else {
// Annulation de la production en chaîne si elle existe
//if (ereg('e,', implode(',',$fileVai).',')) { header('Location: annul_bat.php?bat=e&go='.$_POST['type']); exit; }
//if (ereg('e,', implode(',',$fileVai).',')) { header('Location: annul_bat.php?bat=e&go='.$_GET['type']); exit; }
if (!isset($_POST['sa'])) exit;
else $sa = abs(floor($_POST['sa']));
if ($_POST['type'] == 1 && $chantier_spatial >= 1 && $reacteur >= 4) {
if ($_GET['type'] == 1 && $chantier_spatial >= 1 && $reacteur >= 4) {
$metal -= 1000*$sa;
$cristal -= 800*$sa;
$temps_s = ceil(1080/pow(1.25,($chantier_spatial-1)));
$vai = 1;
}
elseif ($_POST['type'] == 2 && $chantier_spatial >= 5 && $reacteur_f >= 2) {
elseif ($_GET['type'] == 2 && $chantier_spatial >= 5 && $reacteur_f >= 2) {
$metal -= 4000*$sa;
$cristal -= 3000*$sa;
$temps_s = ceil(6300/pow(1.25,($chantier_spatial-5)));
$vai = 2;
}
elseif ($_POST['type'] == 3 && $chantier_spatial >= 5 && $reacteur_ff >= 1) {
elseif ($_GET['type'] == 3 && $chantier_spatial >= 5 && $reacteur_ff >= 1) {
$metal -= 9000*$sa;
$cristal -= 9000*$sa;
$hydrogene -= 1000*$sa;
$temps_s = ceil(8280/pow(1.25,($chantier_spatial-5)));
$vai = 3;
}
elseif ($_POST['type'] == 4 && $chantier_spatial >= 3 && $reacteur >= 5 && $detection >= 2) {
elseif ($_GET['type'] == 4 && $chantier_spatial >= 3 && $reacteur >= 5 && $detection >= 2) {
$metal -= 1000*$sa;
$cristal -= 1200*$sa;
$hydrogene -= 100*$sa;
$temps_s = ceil(1440/pow(1.25,($chantier_spatial-3)));
$vai = 4;
}
elseif ($_POST['type'] == 5 && $chantier_spatial >= 5 && $reacteur_f >= 4 && $blindage >= 5) {
elseif ($_GET['type'] == 5 && $chantier_spatial >= 5 && $reacteur_f >= 4 && $blindage >= 5) {
$metal -= 15000*$sa;
$cristal -= 9000*$sa;
$hydrogene -= 1000*$sa;
$temps_s = ceil(7380/pow(1.25,($chantier_spatial-5)));
$vai = 5;
}
elseif ($_POST['type'] == 6 && $chantier_spatial >= 1 && $reacteur >= 4) {
elseif ($_GET['type'] == 6 && $chantier_spatial >= 1 && $reacteur >= 4) {
$metal -= 1700*$sa;
$cristal -= 1220*$sa;
$temps_s = ceil(1200/pow(1.25,($chantier_spatial-1)));
$vai = 6;
}
elseif ($_POST['type'] == 7 && $chantier_spatial >= 3 && $reacteur_f >= 3 && $armement >=1) {
elseif ($_GET['type'] == 7 && $chantier_spatial >= 3 && $reacteur_f >= 3 && $armement >=1) {
$metal -= 5800*$sa;
$cristal -= 1400*$sa;
$temps_s = ceil(4680/pow(1.25,($chantier_spatial-3)));
$vai = 7;
}
elseif ($_POST['type'] == 8 && $chantier_spatial >= 6 && $reacteur_ff >= 2 && $armement >= 3 && $blindage >= 4) {
elseif ($_GET['type'] == 8 && $chantier_spatial >= 6 && $reacteur_ff >= 2 && $armement >= 3 && $blindage >= 4) {
$metal -= 20000*$sa;
$cristal -= 16000*$sa;
$hydrogene -= 1600*$sa;
$temps_s = ceil(16800/pow(1.25,($chantier_spatial-6)));
$vai = 8;
}
elseif ($_POST['type'] == 9 && $chantier_spatial >= 6 && $reacteur_ff >= 3 && $armement >= 4 && $blindage >= 4) {
elseif ($_GET['type'] == 9 && $chantier_spatial >= 6 && $reacteur_ff >= 3 && $armement >= 4 && $blindage >= 4) {
$metal -= 26000*$sa;
$cristal -= 16400*$sa;
$hydrogene -= 1600*$sa;
$temps_s = ceil(18060/pow(1.25,($chantier_spatial-6)));
$vai = 9;
}
elseif ($_POST['type'] == 10 && $chantier_spatial >= 8 && $reacteur_ff >= 5 && $armement >=6 && $blindage >= 6) {
elseif ($_GET['type'] == 10 && $chantier_spatial >= 8 && $reacteur_ff >= 5 && $armement >=6 && $blindage >= 6) {
$metal -= 60000*$sa;
$cristal -= 40000*$sa;
$hydrogene -= 3000*$sa;
$temps_s = ceil(32400/pow(1.25,($chantier_spatial-8)));
$vai = 10;
}
elseif ($_POST['type'] == 11 && $chantier_spatial >= 12 && $reacteur_ff >= 10 && $armement >= 12 && $blindage >= 12) {
elseif ($_GET['type'] == 11 && $chantier_spatial >= 12 && $reacteur_ff >= 10 && $armement >= 12 && $blindage >= 12) {
$metal -= 500000*$sa;
$cristal -= 400000*$sa;
$hydrogene -= 250000*$sa;
$temps_s = ceil(117000/pow(1.25,($chantier_spatial-12)));
$vai = 11;
}
elseif ($_POST['type'] == 12 && $chantier_spatial >= 12 && $reacteur_ff >= 10 && $armement >= 12 && $blindage >= 12) {
elseif ($_GET['type'] == 12 && $chantier_spatial >= 12 && $reacteur_ff >= 10 && $armement >= 12 && $blindage >= 12) {
$metal -= 500000*$sa;
$cristal -= 400000*$sa;
$hydrogene -= 250000*$sa;