public function __construct(Strength $strength, Integer1To6 $strengthRoll, Agility $agility, Integer1To6 $agilityRoll, Knack $knack, Integer1To6 $knackRoll, Will $will, Integer1To6 $willRoll, Intelligence $intelligence, Integer1To6 $intelligenceRoll, Charisma $charisma, Integer1To6 $charismaRoll) { parent::__construct($strength, $agility, $knack, $will, $intelligence, $charisma); $this->strengthRoll = $strengthRoll->getValue(); $this->agilityRoll = $agilityRoll->getValue(); $this->knackRoll = $knackRoll->getValue(); $this->willRoll = $willRoll->getValue(); $this->intelligenceRoll = $intelligenceRoll->getValue(); $this->charismaRoll = $charismaRoll->getValue(); }
/** * @param Integer1To6 $roll * @return int * @throws \DrdPlus\Exceptionalities\Fates\Exceptions\UnexpectedRoll */ public function getPrimaryPropertyBonusOnFortune(Integer1To6 $roll) { switch ($roll->getValue()) { case 1: case 2: case 3: return 0; case 4: case 5: case 6: return 1; default: throw new Exceptions\UnexpectedRoll('Unexpected roll value ' . ValueDescriber::describe($roll->getValue())); } }