original_string: 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);
      }
code: 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);
      }
code_tokens: 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 ) ; }
docstring: 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
docstring_tokens: Gives bonus to range of a weapon which can be turned into meters .