/** @brief Calculates technical data of Ogame requirement for bat/vso/def/rech. * * @param[in] string $nom The name, like name in Database * @return array('none','COL','GEN','EXP' : bool for class, 'CES',etc. : int for all bat/rech name in database) */ function ogame_elements_requirement($name = 'all'); /** @brief Calculates technical data of Ogame requirement of all building/research/fleet/defence. * @return array of all building/research/fleet/defence with are array of requirement from ogame_elements_requirement */ function ogame_all_requirement(); //Exemples d'utilisations : $requi_graviton = ogame_elements_requirement('Graviton'); $names = ogame_get_element_names(); foreach ($names['RECH'] as $element) { if ($requi_graviton[$element] !== 0) { echo 'Prérequis de la techno' . $element . 'au niveau minimum : ' . $requi_graviton[$element]; } } $current_lab = $user_building['Lab']; if ($current_lab < $requi_graviton['Lab']) { echo 'Graviton impossible car le niveau du laboratoire est insiffisant (min=' . $requi_graviton['Lab'] . ').'; }