/** * Gives malus to cover with a weapon or a shield according to given skill rank. * Warning: PPH gives you invalid info about cover with shield malus on PPH page 86 right column (-2 if you do not * have maximal skill). Correct is @see \DrdPlus\Tables\Armaments\Shields\MissingShieldSkillTable * Note about shield: shield is always used as a shield for cover, even if is used for desperate attack. * * @param PositiveInteger $weaponTypeSkillRank * @param WeaponlikeCode $weaponOrShield * @return int * @throws \DrdPlus\Tables\Armaments\Partials\Exceptions\UnexpectedSkillRank */ public function getCoverMalusForSkillRank(PositiveInteger $weaponTypeSkillRank, WeaponlikeCode $weaponOrShield) { if ($weaponOrShield->isWeapon()) { return $this->tables->getMissingWeaponSkillTable()->getCoverMalusForSkillRank($weaponTypeSkillRank->getValue()); } assert($weaponOrShield->isShield()); /** @noinspection ExceptionsAnnotatingAndHandlingInspection */ return $this->tables->getMissingShieldSkillTable()->getCoverMalusForSkillRank($weaponTypeSkillRank->getValue()); }