# Affinity

Affinity, also known as base hit chance, is a multiplier in the hit chance calculations that contributes largely to the accuracy of an attack. It is a number which normally ranges between 0 and 100 and is effectively a percentage modifier to attack accuracy; the higher the affinity, the higher the hit chance of the attack is.

Monsters and players have affinity values for each combat style. Monster affinities are fixed, but player affinities are determined by worn equipment, represented in the Loadout interface by style bonus. Monster affinities also affect the hit chance of summoned familiars.

## Monster affinity

The affinities of a monster are relatively simple. By default, they have the following affinities:

• 90, against their explicit weakness
• 65, against their explicit weakness's style
• 55, against the style they are neutral to
• 45, against the style they are strong against

For example, a monster weak to fire spells would have an affinity of 90 for fire spells; 65 for other magic spells; 55 for melee; and 45 for ranged.

Certain monsters have their affinities hard coded; e.g., many boss monsters (including quest bosses) have an affinity for every style set to 40.

When a monster has a weakness listed as being an entire style, this generally means that the highest affinity (90) is unused, meaning the tool tip is representative of which style affinity is the highest. Some monsters have deceptive weaknesses - even if the tool tip states that they have no weakness, it does not exactly mean that their affinities are equal. Refer to the monster's page for their affinity values.

## Player affinity and style bonus

All armour has a related affinity, which determines how accurate attacks done against it in each style are. This is represented as style bonus in the equipment stats menu, as a positive number for stronger defence (that style has a lower hit chance), a negative number for weaker defence (that style has a higher hit chance), or zero (that style has a neither boosted nor reduced hit chance).

Armour has affinity 65 to the style it is weak to, 55 to the same style, and 45 to the style it is strong to; hybrid armour has 55 affinity to all styles. In summary:

Armour class Affinities
Melee 55 45 65
Ranged 65 55 45
Magic 45 65 55
Hybrid 55 55 55

A style bonus of 0 is the same as an affinity of 55, but other style bonuses vary with your total armour, as discussed below.

#### Variables

In all formulae below:

• ${\displaystyle A}$ is your armour value and ${\displaystyle Aff}$ is your affinity value of:
• ${\displaystyle A_{Melee}}$ or ${\displaystyle Aff_{Melee}}$ - melee
• ${\displaystyle A_{Ranged}}$ or ${\displaystyle Aff_{Ranged}}$ - ranged
• ${\displaystyle A_{Magic}}$ or ${\displaystyle Aff_{Magic}}$ - magic
• ${\displaystyle A_{Hybrid}}$ - hybrid
• ${\displaystyle A_{Worn}=A_{Melee}+A_{Ranged}+A_{Magic}+A_{Hybrid}}$ - total armour of equipped items
• ${\displaystyle A_{Total}=A_{Worn}+A_{Def}}$ - total armour including natural armour from Defence level
• ${\displaystyle A_{Def}=0.0008L^{3}+4L+40}$, where L is Defence level including boosts - natural armour from Defence level (visible when hovering the 'total armour' bonus in loadout; see also hit chance)
• ${\displaystyle \Delta Aff_{a}}$ is a difference in affinities, where ${\displaystyle a}$ is one of the above subscripts.
• ${\displaystyle S_{a}}$ is your style bonus, where ${\displaystyle a}$ is one of the above subscripts.
• The ${\displaystyle {\text{trunc}}(X)}$ function is the truncation function, which removes all digits following the decimal point. For example, ${\displaystyle {\text{trunc}}(8.2)=8}$, ${\displaystyle {\text{trunc}}(-3.8)=-3}$

#### Calculating affinity and style bonus from armour

Your affinity to each style is a weighted average:

{\displaystyle {\begin{aligned}Aff_{Melee}&=&{\frac {45A_{Magic}+65A_{Ranged}+55A_{Melee}+55A_{Hybrid}}{A_{Worn}}}\\\\Aff_{Ranged}&=&{\frac {45A_{Melee}+65A_{Magic}+55A_{Ranged}+55A_{Hybrid}}{A_{Worn}}}\\\\Aff_{Magic}&=&{\frac {45A_{Ranged}+65A_{Melee}+55A_{Magic}+55A_{Hybrid}}{A_{Worn}}}\\\end{aligned}}}

This can then be used in hit chance calculation.

From here, to calculate the displayed style bonus, we calculate the difference from neutral armour - 55 affinity.

{\displaystyle {\begin{aligned}\Delta Aff_{Melee}&=&55-{\text{trunc}}(Aff_{Melee})\\\\\Delta Aff_{Ranged}&=&55-{\text{trunc}}(Aff_{Ranged})\\\\\Delta Aff_{Magic}&=&55-{\text{trunc}}(Aff_{Magic})\\\end{aligned}}}

These values are used as a percentage of your total armour to find your style bonus:

{\displaystyle {\begin{aligned}S_{Melee}&=&{\frac {\Delta Aff_{Melee}\times A_{Total}}{100}}\\\\S_{Ranged}&=&{\frac {\Delta Aff_{Ranged}\times A_{Total}}{100}}\\\\S_{Magic}&=&{\frac {\Delta Aff_{Magic}\times A_{Total}}{100}}\\\end{aligned}}}

#### Calculating affinity from style bonus

Working in the opposite direction to the above is fairly simple:

{\displaystyle {\begin{aligned}{\widehat {Aff_{Melee}}}&=&55-{\frac {100S_{Melee}}{A_{Total}}}\\\\{\widehat {Aff_{Ranged}}}&=&55-{\frac {100S_{Ranged}}{A_{Total}}}\\\\{\widehat {Aff_{Magic}}}&=&55-{\frac {100S_{Magic}}{A_{Total}}}\\\end{aligned}}}

Where ${\displaystyle {\widehat {Aff}}}$ is the truncated affinity (we cannot work back to the true affinity).

Rule of thumb

If your style bonus is 10% of your total armour, your affinity is 45 for the positive bonus and 65 for the negative bonus. As the percentage gets lower, your affinity approaches neutral (55). Mixing gear (especially classed gear with hybrid) tends to move affinity from your strongest style to your weakest, making you more vulnerable to your strongest style and less vulnerable to your weaker style, bringing you closer to neutral overall.

## Affinity modifiers

The following items and abilities increase the target's affinity, thereby making it easier to hit them. Only one of each can be active at once (but using it again will refresh the timer) and they stack additively with each other (i.e. using Quake twice won't apply a +4 debuff, but Quake with a barrelchest anchor special attack would be +6 affinity) up to a maximum of +10.

Effect Debuff
amount
Duration
Abilities
Quake +2 1 minute
Special attacks
Guthix staff +2 1 minute
Statius warhammer +5 1 minute
Dragon hatchet +3 1 minute
Barrelchest anchor[1] +4 1 minute
Bone dagger +2 1 minute
Passives
(Illuminated) Bandos's Book of War +3 12 seconds
1. ^ Barrelchest anchor has a 20% chance of increasing affinity.