/** * @param Technology $technology * @param integer $count * @param integer $lost */ public function addTechnologyState($technology, $count, $lost = false) { if (isset($this->_state[$technology->getType()])) { $this->_state[$technology->getType()]->addCount($count); if ($lost !== false) { $this->_state[$technology->getType()]->addLost($lost); } } else { $techState = new StateCombatWithLosses($technology, $count, $lost); $this->_state[$technology->getType()] = $techState; } }
/** * @param integer $type * @param integer $metal * @param integer $crystal * @param integer $deuterium */ protected function __construct($type, $metal, $crystal, $deuterium, $armor, $shield, $weapon) { parent::__construct($type, $metal, $crystal, $deuterium); $this->ARMOR = $armor; $this->SHIELD = $shield; $this->WEAPON = $weapon; }
public function jsonSerialize() { return array_merge(array('armour' => $this->ARMOR, 'shield' => $this->SHIELD, 'weapon' => $this->WEAPON, 'rapidfire_from' => static::$RAPIDFIRE_FROM, 'rapidfire_against' => static::$RAPIDFIRE_AGAINST), parent::jsonSerialize()); }
public function jsonSerialize() { return array_merge(array('power_base' => $this->power_base), parent::jsonSerialize()); }
/** * @param integer $type * @param integer $metal * @param integer $crystal * @param integer $deuterium * @param integer $energy */ protected function __construct($type, $metal, $crystal, $deuterium, $energy = 0) { parent::__construct($type, $metal, $crystal, $deuterium, $energy); }