View Single Post
Old March 19, 2018, 04:59   #5
CrabMan
Rookie
 
Join Date: Mar 2018
Posts: 7
CrabMan is on a distinguished road
Quote:
Originally Posted by Quirk View Post
However, there are some factors that aren't being tracked here which are relevant. The first is the cost of being surrounded - you get Evasion penalties based on being surrounded. Each enemy adjacent on the three sides opposite to your attacker brings your Evasion down by -2 and other adjacent enemies bring it down by -1.

So from a corridor perspective, if you have three enemies approaching on the left and one on the right, you want to kill the one on the right first, and quickly. Doing more damage counts for more than efficiently outdamaging one foe. This makes all the non-evasion options slightly better along with two handed weapons. I'd need to extend your code and run some simulations to say exactly how this changes things, but the more turns you spend surrounded, the worse you will fare - two enemies are hitting you at effectively +2 instead of one at +0.
Actually, when surrounded you are still equally happy if you increase your expected damage twofold or if you decrease the enemies' expected damage twofold. It's just now you need to calculate expected damage as if the enemies had more melee score (yes, the code can be improved to support that better). Consider the following:

You are with two enemies of the same type in a corridor, one on each side. Let's say on average you deal d_h (imagine _ means subscript) to the monster with your attack (h stands for hero), a single monster on average deals d_m damage per attack, and when you are surrounded in a corridor, their melee score is increased by two, and then a monster deals d_{m2} damage on average. You will fight the first monster for t=h_m/d_h, where h_m? is the monster's hp. So in total the first monster will deal d_{m2} t damage to you, and the second monster will deal (d_{m2}+d_m)t damage - the sum of that is the total amount of health you will lose fighting these two monsters, and it equals D = (2d_{m2}+d_m?)t = (2d_{m2}+d_m) h_m? / d_h. Notice that if you increase d_h twofold, this value will decrease twofold, and the same will happen if you decrease some value between d_m and d_{m2} twofold. And if you increase d_m by some value and decrease d_m and d_{m2} in such way that hero's damage per point of monster's damage increases twofold, the same will happen. The conclusion is that you are equally happy. The same will hold for more enemies, e.g. for 3 enemies the formula will be D = (d_{m4}+2d_{m2}+2d_{m1}+d_m?) h_m? / d_h.

This does not take into account that the longer you fight, the hungries you will get, the more light source turns you will lose and the more likely some more enemies will accidentally stumble upon you and make your life harder, so increasing damage output by x percent is slightly better than decreasing how much damage you take by the same percentage. Also note that if you are fighting multiple enemies, then you will suffer more hits with enemies having melee score bonus, so you should probably optimize damage per damage for the enemies having melee score +2, +3, or even +4 case.

Last edited by CrabMan; March 19, 2018 at 05:06.
CrabMan is offline   Reply With Quote