DrdPlus/CombatActions/CombatActions.php
public function getAttackNumberModifier(): int
    {
        $attackNumber = 0;
        foreach ($this->combatActionCodes as $combatActionCode) {
            if ($combatActionCode->getValue() === MeleeCombatActionCode::HEADLESS_ATTACK) {
                $attackNumber += 2;
            }
            if ($combatActionCode->getValue() === MeleeCombatActionCode::PRESSURE) {
                $attackNumber += 2;
            }
            if ($combatActionCode->getValue() === RangedCombatActionCode::AIMED_SHOT) {
                $attackNumber += $this->finishedRoundsOfAiming;
            }
            if ($combatActionCode->getValue() === CombatActionCode::PUT_OUT_EASILY_ACCESSIBLE_ITEM) {
                $attackNumber += 2;
            }
            if ($combatActionCode->getValue() === CombatActionCode::PUT_OUT_HARDLY_ACCESSIBLE_ITEM) {
                $attackNumber += 2;
            }
            if ($combatActionCode->getValue() === CombatActionCode::LAYING) {
                $attackNumber -= 4;
            }
            if ($combatActionCode->getValue() === CombatActionCode::SITTING_OR_ON_KNEELS) {
                $attackNumber -= 2;
            }
            if ($combatActionCode->getValue() === CombatActionCode::BLINDFOLD_FIGHT) {
                $attackNumber -= 6;
            }
            if ($combatActionCode->getValue() === CombatActionCode::FIGHT_IN_REDUCED_VISIBILITY) {
                /** @noinspection PrefixedIncDecrementEquivalentInspection */
                $attackNumber -= 1;
            }
        }

        return $attackNumber;
    }
public function getAttackNumberModifier(): int
    {
        $attackNumber = 0;
        foreach ($this->combatActionCodes as $combatActionCode) {
            if ($combatActionCode->getValue() === MeleeCombatActionCode::HEADLESS_ATTACK) {
                $attackNumber += 2;
            }
            if ($combatActionCode->getValue() === MeleeCombatActionCode::PRESSURE) {
                $attackNumber += 2;
            }
            if ($combatActionCode->getValue() === RangedCombatActionCode::AIMED_SHOT) {
                $attackNumber += $this->finishedRoundsOfAiming;
            }
            if ($combatActionCode->getValue() === CombatActionCode::PUT_OUT_EASILY_ACCESSIBLE_ITEM) {
                $attackNumber += 2;
            }
            if ($combatActionCode->getValue() === CombatActionCode::PUT_OUT_HARDLY_ACCESSIBLE_ITEM) {
                $attackNumber += 2;
            }
            if ($combatActionCode->getValue() === CombatActionCode::LAYING) {
                $attackNumber -= 4;
            }
            if ($combatActionCode->getValue() === CombatActionCode::SITTING_OR_ON_KNEELS) {
                $attackNumber -= 2;
            }
            if ($combatActionCode->getValue() === CombatActionCode::BLINDFOLD_FIGHT) {
                $attackNumber -= 6;
            }
            if ($combatActionCode->getValue() === CombatActionCode::FIGHT_IN_REDUCED_VISIBILITY) {
                /** @noinspection PrefixedIncDecrementEquivalentInspection */
                $attackNumber -= 1;
            }
        }

        return $attackNumber;
    }
public function getAttackNumberModifier ( ) : int { $ attackNumber = 0 ; foreach ( $ this -> combatActionCodes as $ combatActionCode ) { if ( $ combatActionCode -> getValue ( ) === MeleeCombatActionCode :: HEADLESS_ATTACK ) { $ attackNumber += 2 ; } if ( $ combatActionCode -> getValue ( ) === MeleeCombatActionCode :: PRESSURE ) { $ attackNumber += 2 ; } if ( $ combatActionCode -> getValue ( ) === RangedCombatActionCode :: AIMED_SHOT ) { $ attackNumber += $ this -> finishedRoundsOfAiming ; } if ( $ combatActionCode -> getValue ( ) === CombatActionCode :: PUT_OUT_EASILY_ACCESSIBLE_ITEM ) { $ attackNumber += 2 ; } if ( $ combatActionCode -> getValue ( ) === CombatActionCode :: PUT_OUT_HARDLY_ACCESSIBLE_ITEM ) { $ attackNumber += 2 ; } if ( $ combatActionCode -> getValue ( ) === CombatActionCode :: LAYING ) { $ attackNumber -= 4 ; } if ( $ combatActionCode -> getValue ( ) === CombatActionCode :: SITTING_OR_ON_KNEELS ) { $ attackNumber -= 2 ; } if ( $ combatActionCode -> getValue ( ) === CombatActionCode :: BLINDFOLD_FIGHT ) { $ attackNumber -= 6 ; } if ( $ combatActionCode -> getValue ( ) === CombatActionCode :: FIGHT_IN_REDUCED_VISIBILITY ) { /** @noinspection PrefixedIncDecrementEquivalentInspection */ $ attackNumber -= 1 ; } } return $ attackNumber ; }
Note about AIMED SHOT, you have to provide rounds of aim to get expected attack number.
Maximum counted is +3, more if truncated.

@return int
Note about AIMED SHOT you have to provide rounds of aim to get expected attack number . Maximum counted is + 3 more if truncated .