Esempio n. 1
0
 /**
  * @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;
     }
 }
Esempio n. 2
0
 /**
  * @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;
 }
Esempio n. 3
0
 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());
 }
Esempio n. 4
0
 public function jsonSerialize()
 {
     return array_merge(array('power_base' => $this->power_base), parent::jsonSerialize());
 }
Esempio n. 5
0
 /**
  * @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);
 }