Réactive l'envois de flotte #18

Merged
nemunaire merged 15 commits from task/fix_envoi_flotte into master 2021-01-30 17:36:33 +00:00
Showing only changes of commit 81cb1e9660 - Show all commits

View File

@ -1046,8 +1046,11 @@ class dTechnologies implements Donnees
} }
public static function needed($object, surface $planete, $print = false) public static function needed($object, surface $planete, $print = false, $race = null)
{ {
if ($race == null) {
$race = $planete->race;
}
switch ($object[0]) { switch ($object[0]) {
case 0: case 0:
$tableau = array( $tableau = array(
@ -1488,64 +1491,125 @@ class dTechnologies implements Donnees
); );
break; break;
case 7: case 7:
$tableau = array( if ($race == "humain") {
array( $tableau = array(
array('batiments', 6, 1) array(
), array('batiments', 6, 1)
array( ),
array("technologies", 7, 0), array(
array('batiments', 6, 2) array("technologies", 7, 0),
), array('batiments', 6, 2)
array( ),
array("technologies", 7, 1), array(
array('batiments', 6, 3) array("technologies", 7, 1),
), array('batiments', 6, 3)
array( ),
array("technologies", 7, 2), array(
array('batiments', 6, 5) array("technologies", 7, 2),
), array('batiments', 6, 5)
array( ),
array("technologies", 7, 1), array(
array('batiments', 6, 3) array("technologies", 7, 1),
), array('batiments', 6, 3)
array( ),
array("technologies", 7, 3), array(
array('batiments', 6, 8) array("technologies", 7, 3),
), array('batiments', 6, 8)
array( ),
array("technologies", 7, 5), array(
array('batiments', 6, 10) array("technologies", 7, 5),
), array('batiments', 6, 10)
array( ),
array("technologies", 7, 6), array(
array('batiments', 6, 15) array("technologies", 7, 6),
), array('batiments', 6, 15)
array( ),
array("technologies", 7, 7), array(
array('batiments', 6, 20) array("technologies", 7, 7),
), array('batiments', 6, 20)
array( ),
array("technologies", 7, 8), array(
array('batiments', 6, 30) array("technologies", 7, 8),
), array('batiments', 6, 30)
array( ),
array("technologies", 7, 5), array(
array('batiments', 6, 10) array("technologies", 7, 5),
), array('batiments', 6, 10)
array( ),
array("technologies", 7, 5), array(
array('batiments', 6, 10) array("technologies", 7, 5),
), array('batiments', 6, 10)
array( ),
array('batiments', 6, 5) array(
), array('batiments', 6, 5)
array( ),
array("technologies", 7, 12) array(
), array("technologies", 7, 12)
array( ),
array("technologies", 7, 13) array(
), array("technologies", 7, 13)
); ),
);
} else {
$tableau = array(
array(
array('batiments', 6, 1)
),
array(
array("technologies", 7, 0),
array('batiments', 6, 2)
),
array(
array("technologies", 7, 1),
array('batiments', 6, 3)
),
array(
array("technologies", 7, 2),
array('batiments', 6, 5)
),
array(
array("technologies", 7, 1),
array('batiments', 6, 3)
),
array(
array("technologies", 7, 3),
array('batiments', 6, 8)
),
array(
array("technologies", 7, 5),
array('batiments', 6, 10)
),
array(
array("technologies", 7, 6),
array('batiments', 6, 15)
),
array(
array("technologies", 7, 7),
array('batiments', 6, 20)
),
array(
array("technologies", 7, 8),
array('batiments', 6, 30)
),
array(
array("technologies", 7, 5),
array('batiments', 6, 10)
),
array(
array("technologies", 7, 5),
array('batiments', 6, 10)
),
array(
array('batiments', 6, 5)
),
array(
array("technologies", 7, 12)
),
array(
array("technologies", 7, 13)
),
);
}
break; break;
case 8: case 8:
$tableau = array( $tableau = array(