public static function createEntities() { $factory = new ExceptionalityPropertiesFactory(); return [new Exceptionality(PlayerDecision::getIt(), $fate = FateOfGoodRear::getIt(), $factory->createChosenProperties($fate, ProfessionFirstLevel::createFirstLevel(Fighter::getIt()), 0, 1, 1, 0, 0, 1)), $factory->createChosenProperties(FateOfCombination::getIt(), ProfessionFirstLevel::createFirstLevel(Wizard::getIt()), 1, 1, 1, 1, 1, 1), $factory->createFortuneProperties(FateOfExceptionalProperties::getIt(), ProfessionFirstLevel::createFirstLevel(Thief::getIt()), 1, 3, 6, 5, 4, 2, new BasePropertiesFactory())]; }
public function __construct(Profession $profession, LevelRank $levelRank, Strength $strengthIncrement, Agility $agilityIncrement, Knack $knackIncrement, Will $willIncrement, Intelligence $intelligenceIncrement, Charisma $charismaIncrement, \DateTimeImmutable $levelUpAt = null) { parent::__construct($profession, $levelRank, $strengthIncrement, $agilityIncrement, $knackIncrement, $willIncrement, $intelligenceIncrement, $charismaIncrement, $levelUpAt); }
/** * @param ProfessionFirstLevel $professionFirstLevel * @param Tables $tables * @param BackgroundSkillPoints $backgroundSkillPoints * * @return bool * @throws \DrdPlus\Skills\Exceptions\EmptyFirstLevelBackgroundSkillPoints */ private function checkPayByFirstLevelBackgroundSkillPoints(ProfessionFirstLevel $professionFirstLevel, Tables $tables, BackgroundSkillPoints $backgroundSkillPoints) { $relatedProperties = $this->sortAlphabetically($this->getRelatedProperties()); $firstLevelSkillPoints = 0; switch ($relatedProperties) { case $this->sortAlphabetically([Strength::STRENGTH, Agility::AGILITY]): $firstLevelSkillPoints = $backgroundSkillPoints->getPhysicalSkillPoints($professionFirstLevel->getProfession(), $tables); break; case $this->sortAlphabetically([Will::WILL, Intelligence::INTELLIGENCE]): $firstLevelSkillPoints = $backgroundSkillPoints->getPsychicalSkillPoints($professionFirstLevel->getProfession(), $tables); break; case $this->sortAlphabetically([Knack::KNACK, Charisma::CHARISMA]): $firstLevelSkillPoints = $backgroundSkillPoints->getCombinedSkillPoints($professionFirstLevel->getProfession(), $tables); break; } if ($firstLevelSkillPoints < 1) { throw new Exceptions\EmptyFirstLevelBackgroundSkillPoints('First level skill point has to come from the background.' . ' No skill point for properties ' . implode(',', $relatedProperties) . ' is available.'); } return true; }
/** * @return array */ public static function createEntities() { $professionLevels = new ProfessionLevels(ProfessionZeroLevel::createZeroLevel(Commoner::getIt()), ProfessionFirstLevel::createFirstLevel($profession = Theurgist::getIt())); $professionLevels->addLevel(ProfessionNextLevel::createNextLevel($profession, LevelRank::getIt(2), Strength::getIt(1), Agility::getIt(0), Knack::getIt(0), Will::getIt(0), Intelligence::getIt(1), Charisma::getIt(0))); return [ProfessionZeroLevel::createZeroLevel(Commoner::getIt()), ProfessionFirstLevel::createFirstLevel(Fighter::getIt()), ProfessionNextLevel::createNextLevel(Wizard::getIt(), LevelRank::getIt(2), Strength::getIt(1), Agility::getIt(1), Knack::getIt(0), Will::getIt(0), Intelligence::getIt(0), Charisma::getIt(0)), $professionLevels]; }
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); }
public static function createSkillsEntity(Tables $tables) { return Skills::createSkills(ProfessionLevels::createIt(ProfessionFirstLevel::createFirstLevel($profession = Fighter::getIt()), [ProfessionNextLevel::createNextLevel($profession, LevelRank::getIt(2), Strength::getIt(0), Agility::getIt(1), Knack::getIt(0), Will::getIt(0), Intelligence::getIt(1), Charisma::getIt(0))]), BackgroundSkillPoints::getIt(2, Heritage::getIt(7)), $tables, new PhysicalSkills(), new PsychicalSkills(), new CombinedSkills()); }