Attacks of opportunity
When you move away from an enemy, they have a small (1/3) chance of taking advantage and launching a free attack. Repositioning and retreating is often still good, but keep an eye out for those extra attacks.
Adjacent enemies may trigger an attack of opportunity (AoO) whenever you move; capable enemies of same or faster movement speed will have a 1/3 chance to get a free attack* when you do so. Attacks of opportunity are for most intents and purposes equal to a regular melee attack, though many movement related attack flavours (engulf, ensnare, constriction, trample, certain distortion effects**, phantom's blink with, and blink frog's blink) don't trigger, and self-destructing enemies like lurking horrors and creeping infernos won't blow up.
* Slow attacking monsters lose a turn after an attack of opportunity, so you can get a tile after an ogre swings at you.
** Although distortion-branded attacks of opportunity cannot blink or banish you, their chance to add extra damage rises in compensation. Compared to regular attacks, the chance of adding 1-7 damage rises from 35% to 47%, the chance of extra 3-26 damage goes up from 25% to 33%.
Avoiding
There are several situations when monsters won't be able to get free attacks on you:
- Monsters that are slower than you don't get a free attack.
- Confused, fleeing, or incapacitated (asleep, constricted, caught in a web or net) monsters are unable to chase you.
- Monsters that cannot see you cannot perform attacks of opportunity.
- Zin's Sanctuary prevents attacks for players inside it - including if you're just stepping into its area.
- When swapping places with an allied monster, which gets in the way.
- Even monsters with reaching attacks must be right next to you to launch a free attack. You can kite a gnoll with a polearm or a snapping turtle absolutely safely as long as you have at least a tile of distance from them.
- The player becomes immune to attacks of opportunity while performing martial attacks or rampaging.
Strategy
Watch out! Enemies will gain the same amount of free attacks as if they were hasted, and that is if they are the same speed as you. Always try to resposition (say, to a upstairs) before you get adjacent to them.
Should the player need to kite a dangerous monster, a variety of disengagement tools are at their disposal. Speed-enhancing effects like Swiftness (note that once it runs it, it slows you) or a potion of haste will negate the effects of opportunity attacks, and various Translocations like Blink, Iskenderun's Mystic Blast or Dispersal act as an instant way of removing oneself from melee combat. Evocable items like a phial of floods should also be considered for their disabling or displacing effects.
Players with access to summons or allies, like followers of Hepliaklqana, can swap places with their companion to create a one-tile gap with the monster.
History
- Attacks of opportunity were introduced in 0.29, as a replacement for energy randomisation.