Closed noonn closed 3 years ago
Hello, I'm not sure of what you mean. This function is used to extract data from CombatCamps and create ships. You can overwrite it in order to add, for example, extra bonus.
function getShipType($id, $count)
{
$CombatCaps = $GLOBALS['CombatCaps'];
$pricelist = $GLOBALS['pricelist'];
$rf = isset($CombatCaps[$id]['sd']) ? $CombatCaps[$id]['sd'] : 0;
$shield = $CombatCaps[$id]['shield'];
$cost = array($pricelist[$id]['metal'], $pricelist[$id]['crystal']);
$power = $CombatCaps[$id]['attack'];
if ($id > ID_MIN_SHIPS && $id < ID_MAX_SHIPS)
{
return new Ship($id, $count, $rf, $shield, $cost, $power);
}
return new Defense($id, $count, $rf, $shield, $cost, $power);
}
Hi.. My version is 1.3... ../includes/var.php Can the attacker and defender fleet and Planetary Defense facilities default their performance? Is it applicable to OPBE?
Ex) attacker $CombatCaps = array( 202 => array ( 'shield' => 10, 'attack' => 5, 'sd' => array (210 => 5, 212 => 5)), 203 => array ( 'shield' => 25, 'attack' => 5, 'sd' => array (210 => 5, 212 => 5)), ... ...
defender $CombatCaps2 = array( 202 => array ( 'shield' => 8, 'attack' => 10, 'sd' => array (210 => 5, 212 => 5)), 203 => array ( 'shield' => 20, 'attack' => 10, 'sd' => array (210 => 5, 212 => 5)), ... ...