Battle of attrition
Battle of attrition is the term used by Desktop Dungeons creators of define a fight when you are exploring mid-fight to gain resources. Another widespread term on the forum is regen-fighting.
As you will often want to fighter monster at an higher level than you are, they would often heal quicker than you. So knowing if you can do it is not always obvious. here are some tips to know when you can do it.
Note that you can read Annotated Playthrough: Regenfighting for more explanation.
Regen Fighting Math
Whenever a tile is explored, the player and all monsters will heal a number of hit points equal to their level. So a 5th level monster heals 5 hit points per tile. Some special abilities, such as fast regen can modify this, but such abilities are rare. Since most difficult monsters will be higher level than you, this means they also heal more health than you. If you want to win a long-term battle of attrition, you'll need to deal more damage then them or have some other kind of advantage. Often times, a glyph such as BURNDAYRAZ or HALPMEH is exactly the advantage you need to do this.
Let's define :
- Dh = damage caused by hero (in hitpoints, or hp)
- Dm = damage caused by the monster (hp)
- Lh = point restored by hero per tile (in hitpoints/tile, or hp/t) (usually level of the hero)
- Lm = point restored by the monster per tile explored (hp/t) (usually level of the monster, or level-1 if the monster is burning)
- Df = damage caused by fireball (hp)
- Cf = number of tiles to cast a new fireball (usually, cost in mana) (t)
- T = number of tiles required to kill the monster (t)
- Hh = total health of the hero
- M = total mana of the hero
- Hm = health of the monster in the beginning of combat (normally full health but you could do some damage to him before level up
- H = remaining health of the monster before you begin regen-fighting him (hp)
- Ph=DhLh = Hero power (for monks you need to multiply Lh by 2)
- Pm=DmLm = Monster power (for trolls with fast regen you need to multiply Lm by 2)
You have the total damage caused to the monster by the hero per tile (taking into account the regeneration) : Dt=(DhLh-DmLm)/Dm [hp/t] or Dt=(Dh/Dm)Lh-Lm
You can regen fight if DhLh>DmLm or Ph>Pm (1)
Each tile you regenerate 1 mp/t (except Chemist in mana mode) = Df/Cf. Usualy it's 4×Lf/6 (5 if wizard or Mystic Balance, and 8 if Berserker) Moreover, your attack gets +1 because of burning effect (we count one hit, one fireball, regen fight)
If you keep burning effect on a monster every time when you begin regen fighting, his effective regeneration gets lowered by 1
Dt = (DhLh - Dm(Rm - Df ⁄ Cf)) ⁄ Dm (in hp/t)
So, you can regen fight if Dh*Rh > Dm(Rm - Df/Cf) If you decided not to cast fireballs, you can regen fight if Dh*Rh > Dm*Rm
Now, lets have a closer look at the formula: We have for both the monster and the hero a ratio emerging : Damages*Regeneration (in hp*hp/t), which we could call the hit-regeneration ratio. The higher, the more potent is the character in regen fighting (he strikes stronger than his opponent and/or regenerates quicker). However, when we take into account the fireball, the damages caused by the fireball per turn (ratio Df/Cf) reduces the regeneration per tile (Rm) of the monster, hence that new value "Dm(Rm-Df/Cf)" for the hit-regeneration ratio of the monster.
Finally, the number of tile required to kill the monster in regen fighting would be : T = H/Dt or T = H*Dm/(Rh*Dh-Dm(Rm-Df/Cf)) (in t)
For efficient regen fighting, for H, we should consider the remaining health of the monster once the hero has used its full stock of health and mana for the original strikes (before starting the regeneration). This the higher max health and mana, the less tile you will use for the regeneration part of the fight.
You can derive H from Hh, M and Hm. Assuming you are using fireballs:
Physical damage performed before beginning regen-fighting: Dphysical = Dh × ⌊Hh / Dm⌋ (example: ⌊1,7⌋=1)
Fireball damage performed before beginning regen-fighting: Dmagic = (Df + 1) × ⌊M / Cf⌋
H = Hm - Dphysical - Dmagic
Also, note that every damages should be adapted with the opponent's resistance, player's glyph and so on.