/** * @param string $id * @param string $coordinates * @param integer $metal * @param integer $metal_floating * @param integer $crystal * @param integer $crystal_floating * @param string $time * @param integer $timestamp * @param integer $recycler_capacity * @param integer $recycler_count */ public function __construct($id, $coordinates, $metal, $metal_floating, $crystal, $crystal_floating, $time, $timestamp, $recycler_capacity, $recycler_count) { parent::__construct($id, $time, $timestamp); $this->_resources = new Resources($metal, $crystal, 0); $this->_recycler_capacity = (int) $recycler_capacity; $this->_recycler_count = (int) $recycler_count; $this->_debris_field = new DebrisField($coordinates, $metal_floating, $crystal_floating); }
/** * @param string $id */ public function __construct($id, $time, $timestamp, $attacker_name, $attacker_planet_coordinates, $attacker_planet_name, $attacker_planet_type, $defender_name, $defender_planet_coordinates, $defender_planet_name, $defender_planet_type, $missiles_lost_attacker, $missiles_lost_defender) { parent::__construct($id, $time, $timestamp); $this->attacker = new MissilePlayer($attacker_name); $this->attacker->setPlanet(new Planet($attacker_planet_type, $attacker_planet_coordinates, $attacker_planet_name)); $this->attacker_lost_missiles = $missiles_lost_attacker; $this->defender = new MissilePlayer($defender_name); $this->defender->setPlanet(new Planet($defender_planet_type, $defender_planet_coordinates, $defender_planet_name)); $this->defender_lost_missiles = $missiles_lost_defender; }
public function jsonSerialize() { return array_merge(array('debris_field' => $this->debris_field, 'recycler_capacity' => $this->recycler_capacity, 'recycler_count' => $this->recycler_count), parent::jsonSerialize()); }
/** * @param string $id * @param integer $activity * @param string $attacker_name * @param string $attacker_planet_coordinates * @param string $attacker_planet_name * @param integer $attacker_planet_type * @param string $defender_name * @param string $defender_planet_coordinates * @param string $defender_planet_name * @param integer $defender_planet_type * @param string $event_time * @param integer $event_timestamp * @param integer $loot_percentage * @param integer $spy_fail_chance * @param integer $total_defense_count * @param integer $total_ship_count */ public function __construct($id, $activity, $attacker_name, $attacker_planet_coordinates, $attacker_planet_name, $attacker_planet_type, $attacker_alliance_name, $attacker_alliance_tag, $defender_name, $defender_planet_coordinates, $defender_planet_name, $defender_planet_type, $defender_alliance_name, $defender_alliance_tag, $time, $timestamp, $loot_percentage, $spy_fail_chance, $total_defense_count, $total_ship_count) { parent::__construct($id, $time, $timestamp); $this->_activity = $activity; $this->_attacker = new ReportPlayer($attacker_name); $this->_attacker->setPlanet(new Planet($attacker_planet_type, $attacker_planet_coordinates, $attacker_planet_name)); $this->_attacker->setAlliance(new Alliance($attacker_alliance_tag, $attacker_alliance_name)); $this->_defender = new SpiedPlayer($defender_name); $this->_defender->setPlanet(new Planet($defender_planet_type, $defender_planet_coordinates, $defender_planet_name)); $this->_defender->setAlliance(new Alliance($defender_alliance_tag, $defender_alliance_name)); $this->_loot_percentage = $loot_percentage; $this->_spy_fail_chance = $spy_fail_chance; $this->_total_defense_count = $total_defense_count; $this->_total_ship_count = $total_ship_count; }
public function jsonSerialize() { return array_merge(array('activity' => $this->activity, 'attacker' => $this->attacker, 'defender' => $this->defender, 'loot_percentage' => $this->loot_percentage, 'spy_fail_chance' => $this->spy_fail_chance, 'total_defense_count' => $this->total_defense_count, 'total_ship_count' => $this->total_ship_count), parent::jsonSerialize()); }
public function jsonSerialize() { return array_merge(array('planet' => $this->planet, 'loot_percentage' => $this->loot_percentage, 'combat_rounds_count' => $this->combat_rounds_count, 'combat_honourable' => $this->combat_honourable, 'loot' => $this->loot, 'debris_field' => $this->debris_field, 'winner' => $this->winner, 'attacker_party' => $this->attacker_party, 'defender_party' => $this->defender_party, 'combat_rounds' => $this->combat_rounds, 'raids' => $this->raids, 'player_id_count' => $this->player_id_count, 'combat_moon' => $this->combat_moon), parent::jsonSerialize()); }
public function jsonSerialize() { return array_merge(array('attacker' => $this->attacker, 'attacker_lost_missiles' => $this->attacker_lost_missiles, 'defender' => $this->defender, 'defender_lost_missiles' => $this->defender_lost_missiles), parent::jsonSerialize()); }
/** * @param string $id * @param string $coordinates * @param integer $planet_type * @param integer $combat_rounds * @param integer $loot_percentage * @param string $winner * @param integer $attacker_losses * @param integer $attacker_count * @param boolean $attacker_honorable * @param integer $attacker_honorpoints * @param integer $defender_losses * @param integer $defender_count * @param boolean $defender_honorable * @param integer $defender_honorpoints * @param integer $loot_metal * @param integer $loot_crystal * @param integer $loot_deuterium * @param integer $debris_metal * @param integer $debris_crystal */ public function __construct($id, $coordinates, $planet_type, $combat_rounds, $combat_honourable, $time, $timestamp, $loot_percentage, $winner, $attacker_losses, $attacker_count, $attacker_honourable, $attacker_honourpoints, $defender_losses, $defender_count, $defender_honourable, $defender_honourpoints, $loot_metal, $loot_crystal, $loot_deuterium, $debris_metal, $debris_crystal, $moon_chance, $moon_created, $moon_exists, $moon_size) { parent::__construct($id, $time, $timestamp); $this->_loot_percentage = $loot_percentage; $this->_combat_rounds_count = $combat_rounds; $this->_combat_honourable = $combat_honourable; $this->_winner = $winner; $this->_planet = new Planet($planet_type, $coordinates); $this->_attacker_party = new CombatParty($attacker_count, $attacker_losses, $attacker_honourable, $attacker_honourpoints); $this->_defender_party = new CombatParty($defender_count, $defender_losses, $defender_honourable, $defender_honourpoints); $this->_loot = new Resources($loot_metal, $loot_crystal, $loot_deuterium); $this->_debris_field = new DebrisField($coordinates, $debris_metal, $debris_crystal); $this->_combatreport_calculator = new CombatReport_Calculator($this); $this->_combat_moon = new CombatMoon($moon_chance, $moon_created, $moon_exists, $moon_size); }