public function getEncounterRangeWithWeaponlike(
        WeaponlikeCode $weaponlikeCode,
        Strength $currentStrength,
        Speed $currentSpeed
    ): EncounterRange
    {
        if (!($weaponlikeCode instanceof RangedWeaponCode)) {
            /** note: melee weapon length in meters is half of weapon length, see PPH page 85 right column */
            return EncounterRange::getIt(0);
        }
        $encounterRange = $this->getRangeOfRangedWeapon($weaponlikeCode);
        $encounterRange += $this->getEncounterRangeMalusByStrength($weaponlikeCode, $currentStrength);
        $encounterRange += $this->getEncounterRangeBonusByStrength($weaponlikeCode, $currentStrength);
        $encounterRange += $this->getEncounterRangeBonusBySpeed($weaponlikeCode, $currentSpeed);

        return EncounterRange::getIt($encounterRange);
    }
public function getEncounterRangeWithWeaponlike(
        WeaponlikeCode $weaponlikeCode,
        Strength $currentStrength,
        Speed $currentSpeed
    ): EncounterRange
    {
        if (!($weaponlikeCode instanceof RangedWeaponCode)) {
            /** note: melee weapon length in meters is half of weapon length, see PPH page 85 right column */
            return EncounterRange::getIt(0);
        }
        $encounterRange = $this->getRangeOfRangedWeapon($weaponlikeCode);
        $encounterRange += $this->getEncounterRangeMalusByStrength($weaponlikeCode, $currentStrength);
        $encounterRange += $this->getEncounterRangeBonusByStrength($weaponlikeCode, $currentStrength);
        $encounterRange += $this->getEncounterRangeBonusBySpeed($weaponlikeCode, $currentSpeed);

        return EncounterRange::getIt($encounterRange);
    }
public function getEncounterRangeWithWeaponlike ( WeaponlikeCode $ weaponlikeCode , Strength $ currentStrength , Speed $ currentSpeed ) : EncounterRange { if ( ! ( $ weaponlikeCode instanceof RangedWeaponCode ) ) { /** note: melee weapon length in meters is half of weapon length, see PPH page 85 right column */ return EncounterRange :: getIt ( 0 ) ; } $ encounterRange = $ this -> getRangeOfRangedWeapon ( $ weaponlikeCode ) ; $ encounterRange += $ this -> getEncounterRangeMalusByStrength ( $ weaponlikeCode , $ currentStrength ) ; $ encounterRange += $ this -> getEncounterRangeBonusByStrength ( $ weaponlikeCode , $ currentStrength ) ; $ encounterRange += $ this -> getEncounterRangeBonusBySpeed ( $ weaponlikeCode , $ currentSpeed ) ; return EncounterRange :: getIt ( $ encounterRange ) ; }
Gives bonus to range of a weapon, which can be turned into meters.

@param WeaponlikeCode $weaponlikeCode
@param Strength $currentStrength
@param Speed $currentSpeed
@return EncounterRange
@throws \DrdPlus\Tables\Armaments\Weapons\Exceptions\CanNotUseWeaponBecauseOfMissingStrength
@throws \DrdPlus\Tables\Armaments\Exceptions\UnknownArmament
@throws \DrdPlus\Tables\Armaments\Exceptions\UnknownRangedWeapon
@throws \DrdPlus\Tables\Armaments\Weapons\Ranged\Exceptions\UnknownBow
Gives bonus to range of a weapon which can be turned into meters .