XG Proyect

Formulas
in package

Formulas Class

Table of Contents

calculatePlanetFields()  : int
getPlanetFields
getBuildingTime()  : float
Get the time to build
getDeathStarsDestructionChance()  : type
Get Death Stars destruction chance
getDevelopmentCost()  : float
Get the cost to develop something
getIonTechnologyBonus()  : float
Get the Ion Technology Bonus
getMoonDestructionChance()  : int
Get moon destruction chance
getPlanetSize()  : void
getPlanetSize
getResearchTime()  : float
Get research time
getShipyardProductionTime()  : float
Get the time to produce ships and defenses
getTearDownBaseCost()  : int
Get the base cost to tear down, without influence of the ion technology
getTearDownCost()  : int
Get the cost to tear down
getTearDownTime()  : int
Check if the building is for destroy and calculate
missileRange()  : mixed
missileRange
phalanxRange()  : mixed
phalanxRange
setPlanetImage()  : string
setPlanetImage
setPlanetTemp()  : array<string|int, mixed>
setPlanetTemp
getDevelopmentTime()  : float
Get the time to develop something

Methods

calculatePlanetFields()

getPlanetFields

public static calculatePlanetFields(int $diameter) : int
Parameters
$diameter : int

Diameter

Return values
int

getBuildingTime()

Get the time to build

public static getBuildingTime(int $metal_cost, int $cystal_cost, int $building, int $robotics_factory, int $nanite_factory, int $level) : float
Parameters
$metal_cost : int
$cystal_cost : int
$building : int
$robotics_factory : int
$nanite_factory : int
$level : int
Return values
float

getDeathStarsDestructionChance()

Get Death Stars destruction chance

public static getDeathStarsDestructionChance(int $planet_diameter) : type
Parameters
$planet_diameter : int
Return values
type

getDevelopmentCost()

Get the cost to develop something

public static getDevelopmentCost(int $price, float $factor, int $level) : float
Parameters
$price : int
$factor : float
$level : int
Return values
float

getIonTechnologyBonus()

Get the Ion Technology Bonus

public static getIonTechnologyBonus(float $ion_technology_level) : float
Parameters
$ion_technology_level : float
Return values
float

getMoonDestructionChance()

Get moon destruction chance

public static getMoonDestructionChance(int $planet_diameter, int $death_stars) : int
Parameters
$planet_diameter : int
$death_stars : int
Return values
int

getPlanetSize()

getPlanetSize

public static getPlanetSize(int $position[, bool $main = false ]) : void
Parameters
$position : int

Position

$main : bool = false

Home world

Return values
void

getResearchTime()

Get research time

public static getResearchTime(int $metal_cost, int $cystal_cost, int $total_lab_level, int $expedition_level) : float
Parameters
$metal_cost : int
$cystal_cost : int
$total_lab_level : int
$expedition_level : int
Return values
float

getShipyardProductionTime()

Get the time to produce ships and defenses

public static getShipyardProductionTime(int $metal_cost, int $cystal_cost, int $ship_defense, int $shipyard_level, int $nanite_factory_level) : float
Parameters
$metal_cost : int
$cystal_cost : int
$ship_defense : int
$shipyard_level : int
$nanite_factory_level : int
Return values
float

getTearDownBaseCost()

Get the base cost to tear down, without influence of the ion technology

public static getTearDownBaseCost(int $price, float $factor, int $level) : int
Parameters
$price : int
$factor : float
$level : int
Return values
int

getTearDownCost()

Get the cost to tear down

public static getTearDownCost(int $price, float $factor, int $level, int $ion_technology_level) : int
Parameters
$price : int
$factor : float
$level : int
$ion_technology_level : int
Return values
int

getTearDownTime()

Check if the building is for destroy and calculate

public static getTearDownTime(int $metal_cost, int $cystal_cost, int $building, int $robotics_factory, int $nanite_factory, int $level) : int
Parameters
$metal_cost : int
$cystal_cost : int
$building : int
$robotics_factory : int
$nanite_factory : int
$level : int
Return values
int

missileRange()

missileRange

public static missileRange(int $impulse_drive_level) : mixed
Parameters
$impulse_drive_level : int

Impulse drive level

return int

Return values
mixed

phalanxRange()

phalanxRange

public static phalanxRange(int $phalanx_level) : mixed
Parameters
$phalanx_level : int

Phalanx level

return int

Return values
mixed

setPlanetImage()

setPlanetImage

public static setPlanetImage(int $system, int $position) : string
Parameters
$system : int

Planet system

$position : int

Planet position

Return values
string

setPlanetTemp()

setPlanetTemp

public static setPlanetTemp(int $position) : array<string|int, mixed>
Parameters
$position : int

Planet position

Return values
array<string|int, mixed>

getDevelopmentTime()

Get the time to develop something

private static getDevelopmentTime(int $metal_cost, int $cystal_cost, int $object, int $first_boost, int $second_boost, int $level[, bool $reduce = true ]) : float
Parameters
$metal_cost : int
$cystal_cost : int
$object : int
$first_boost : int
$second_boost : int
$level : int
$reduce : bool = true
Return values
float

Search results