/**
  * @param Endurance $endurance
  * @param FatigueTable $fatigueTable
  */
 public function __construct(Endurance $endurance, FatigueTable $fatigueTable)
 {
     /** @noinspection ExceptionsAnnotatingAndHandlingInspection */
     parent::__construct($fatigueTable->toFatigue(new FatigueBonus($endurance->getValue() + 10, $fatigueTable))->getValue());
 }
Пример #2
0
 /**
  * @return Fatigue
  */
 public function getFatigue()
 {
     return $this->fatigueTable->toFatigue($this);
 }
 /**
  * @test
  * @expectedException \OutOfRangeException
  */
 public function I_can_not_convert_too_high_bonus_to_too_detailed_unit()
 {
     $fatigueTable = new FatigueTable($this->woundsTable);
     $fatigueTable->toFatigue(new FatigueBonus(80, $fatigueTable));
 }