/** * Note about SHIELD: "weaponlike" means for attacking - for shield standard usage as * a protective armament @see \DrdPlus\Skills\Physical\PhysicalSkills::getMalusToFightNumberWithProtective * * @param WeaponlikeCode $weaponlikeCode * @param MissingWeaponSkillTable $missingWeaponSkillsTable * @param bool $fightsWithTwoWeapons * @return int * @throws \DrdPlus\Skills\Physical\Exceptions\PhysicalSkillsDoNotKnowHowToUseThatWeapon */ public function getMalusToCoverWithWeaponlike(WeaponlikeCode $weaponlikeCode, MissingWeaponSkillTable $missingWeaponSkillsTable, $fightsWithTwoWeapons) { $fightWithWeaponRankValue = $this->getHighestRankForSuitableFightWithWeapon($weaponlikeCode); /** @noinspection ExceptionsAnnotatingAndHandlingInspection */ $malus = $missingWeaponSkillsTable->getCoverMalusForSkill($fightWithWeaponRankValue); if ($fightsWithTwoWeapons) { /** @noinspection ExceptionsAnnotatingAndHandlingInspection */ $malus += $missingWeaponSkillsTable->getCoverMalusForSkill($this->getFightWithTwoWeapons()->getCurrentSkillRank()->getValue()); } return $malus; }
/** * @param RangedWeaponCode $rangeWeaponCode * @param MissingWeaponSkillTable $missingWeaponSkillsTable * @return int * @throws \DrdPlus\Skills\Combined\Exceptions\CombinedSkillsDoNotHowToUseThatWeapon */ public function getMalusToCoverWithShootingWeapon(RangedWeaponCode $rangeWeaponCode, MissingWeaponSkillTable $missingWeaponSkillsTable) { $rankValue = $this->getFightWithShootingWeaponRankValue($rangeWeaponCode); /** @noinspection ExceptionsAnnotatingAndHandlingInspection */ return $missingWeaponSkillsTable->getCoverMalusForSkill($rankValue); }