/**
  * @test
  * @expectedException \DrdPlus\PropertiesByLevels\Exceptions\TooLowStrengthAdjustment
  */
 public function I_can_not_get_it_with_too_low_strength()
 {
     $exceptionalityProperties = $this->createExceptionalityProperties(-1, 0, 0, 0, 0, 0);
     new FirstLevelProperties(CommonHuman::getIt(), GenderCode::getIt(GenderCode::MALE), $exceptionalityProperties, $this->createProfessionLevels(), WeightInKg::getIt(0), HeightInCm::getIt(123), Age::getIt(20), new Tables());
 }
 public function getCombination()
 {
     $male = GenderCode::getIt(GenderCode::MALE);
     $female = GenderCode::getIt(GenderCode::FEMALE);
     $exceptionalityProperties = $this->createExceptionalityProperties();
     $professionLevels = $this->createProfessionLevels();
     $tables = new Tables();
     $weightInKgAdjustment = WeightInKg::getIt(0.001);
     $heightInCm = HeightInCm::getIt(123.4);
     $age = Age::getIt(15);
     $baseOfExpectedStrength = $professionLevels->getNextLevelsStrengthModifier() + 3;
     /* default max strength increment */
     $baseOfExpectedAgility = $professionLevels->getNextLevelsAgilityModifier() + 3;
     /* default max agility increment */
     $baseOfExpectedKnack = $professionLevels->getNextLevelsKnackModifier() + 3;
     /* default max knack increment */
     $baseOfExpectedWill = $professionLevels->getNextLevelsWillModifier() + 3;
     /* default max knack increment */
     $baseOfExpectedIntelligence = $professionLevels->getNextLevelsIntelligenceModifier() + 3;
     /* default max knack increment */
     $baseOfExpectedCharisma = $professionLevels->getNextLevelsCharismaModifier() + 3;
     /* default max charisma increment */
     return [[$commonHuman = CommonHuman::getIt(), $male, $exceptionalityProperties, $professionLevels, $tables, $weightInKgAdjustment, $heightInCm, $age, $baseOfExpectedStrength, $baseOfExpectedAgility, $baseOfExpectedKnack, $baseOfExpectedWill, $baseOfExpectedIntelligence, $baseOfExpectedCharisma], [$commonHuman, $female, $exceptionalityProperties, $professionLevels, $tables, $weightInKgAdjustment, $heightInCm, $age, $baseOfExpectedStrength - 1, $baseOfExpectedAgility, $baseOfExpectedKnack, $baseOfExpectedWill, $baseOfExpectedIntelligence, $baseOfExpectedCharisma + 1]];
 }
コード例 #3
0
 private function createPersonEntity(Tables $tables, ExceptionalityPropertiesFactory $exceptionalityPropertiesFactory)
 {
     return new Person(CommonHuman::getIt(), Male::getIt(), Name::getIt('foo'), new Exceptionality(PlayerDecision::getIt(), $fate = FateOfGoodRear::getIt(), $exceptionalityPropertiesFactory->createChosenProperties($fate, $professionFirstLevel = ProfessionFirstLevel::createFirstLevel(Fighter::getIt()), 0, 1, 1, 0, 1, 0)), new Memories(), $professionLevels = new ProfessionLevels(ProfessionZeroLevel::createZeroLevel(Commoner::getIt()), $professionFirstLevel), $background = Background::createIt($fate, 4, 3, 5), Skills::createSkills($professionLevels, $background->getBackgroundSkillPoints(), new PhysicalSkills(ProfessionZeroLevel::createZeroLevel(Commoner::getIt())), new PsychicalSkills(ProfessionZeroLevel::createZeroLevel(Commoner::getIt())), new CombinedSkills(ProfessionZeroLevel::createZeroLevel(Commoner::getIt())), $tables), WeightInKg::getIt(123.45), HeightInCm::getIt(78.89), Age::getIt(56), $tables);
 }