/** * @param Knack $knack * @param RaceCode $raceCode * @param SubRaceCode $subRaceCode * @param RacesTable $racesTable */ public function __construct(Knack $knack, RaceCode $raceCode, SubRaceCode $subRaceCode, RacesTable $racesTable) { /** @noinspection ExceptionsAnnotatingAndHandlingInspection */ parent::__construct($knack->getValue() + $racesTable->getSenses($raceCode, $subRaceCode)); }
/** * @param Strength $strength * @param RaceCode $raceCode * @param SubRaceCode $subraceCode * @param RacesTable $racesTable */ public function __construct(Strength $strength, RaceCode $raceCode, SubRaceCode $subraceCode, RacesTable $racesTable) { /** @noinspection ExceptionsAnnotatingAndHandlingInspection */ parent::__construct($strength->getValue() + $racesTable->getToughness($raceCode, $subraceCode)); }
/** * Gives usual age of a race on his first great adventure - like 15 years for common human or 25 for hobbit. * * @param RacesTable $racesTable * @return int */ public function getAge(RacesTable $racesTable) { /** @noinspection ExceptionsAnnotatingAndHandlingInspection */ return $racesTable->getAge($this->getRaceCode(), $this->getSubraceCode()); }
/** * @test * @dataProvider provideRequirementOfDmForRace * * @param string $race * @param string $subrace * @param bool $requiredDmAgreement */ public function I_can_detect_requirement_of_dm_agreement_of_any_race($race, $subrace, $requiredDmAgreement) { $racesTable = new RacesTable(); self::assertSame($requiredDmAgreement, $racesTable->requiresDmAgreement(RaceCode::getIt($race), SubRaceCode::getIt($subrace))); }