March 18, 2012, 20:49  #1 
Prophet
Join Date: Dec 2009
Posts: 8,867

How v4 combat works
This only covers melee currently, because missile combat is broken. Once that's changed, I'll try to remember to update this thread. Feel free to poke me if I forget.
For that matter, some of this describes how we want things to be, not how they actually currently are  but those deviations are comparatively minor and will be patched shortly. v4 melee bases all of its damage off of the damage dice on the weapon. When you attack a monster, here's what happens: 1) First, we calculate how many blows per round you get. This depends on your Finesse skill and the weapon's finesse bias (its "balance"). You get 1 + (finesse * balance / 100) blows per round. For example, if you have a finesse skill of 200 and are using a dagger (balance of .8), then you get (1 + 200 * .8 / 100) = 2.6 blows per round. If you're using a battle axe (balance of .3) with the same skill, you'd get (1 + 200 * .3 / 100) = 1.6 blows per round. 2) Roll to hit. Your hit chance is 75 + (finesse / 25)  (monster evasion) percent. For example, if you have finesse of 200 and you're fighting a Master Rogue (evasion 35) then you have a (75 + 200/25  35) = 48% chance to hit. 3) Next come critical hits. I'll discuss this in more detail further down, but in short you may get extra dice added to your weapon on a perblow basis. For example, a 2d4 mace gets +1d4 damage for each extra critical  and you may get more than one extra die when you crit. 4) Roll the dice (base weapon dice plus any bonus dice from crits). This result is the basis for all your damage. 5) Calculate your prowess bonus. Like finesse, this depends on the weapon's prowess bias (its "heft"). You get a multiplier of 1 + (prowess * heft / 100). If your prowess is 200 and you're using a dagger (heft of .2) then your multiplier is (1 + .2 * 200 / 100) = 1.4x damage per blow. Using that battle axe (heft of .7) your multiplier is (1 + .7 * 200 / 100) = 2.4x damage per blow. 6) Apply slays. Slays give you an additional multiplier that is added to your prowess multiplier. For example, if you have a 1.48x firebrand weapon (actually a .48x additional modifier) with that aforementioned battle axe, then your actual damage multiplier is (2.4 + .48) = 2.88x damage per blow vs. nonfireresistant enemies. 7) Multiply your weapon damage dice (plus any bonus dice from crits) by your damage multiplier. That's your damage. How critical hits work This is also subject to change since it seems to degenerate at the high end, so this section will need to be updated. You have a percentage chance on each successful blow of getting a critical hit. This chance depends on your "applied finesse" and "applied prowess" (that is, finesse * weapon balance and prowess * weapon heft) as follows: Code:
chance = ((applied finesse) ^ 2 + (applied prowess) ^ 2) / 5000 + 1 Now, we roll d100. Is it less than chance? If so, add one die to the damage roll, then repeat. This continues until we fail the d100 roll. So for example, consider a Mace. This 2d4 weapon has balance of .25 and heft of .75. We have a warrior whose finesse is 150 and prowess is 300. We apply those scores and get applied finesse of (.25 * 150) = 37 and applied prowess of (.75 * 300) = 225. We plug that in and get a chance score of 11%. We roll the d100 and it happens to come up less than 11, so we add 1d4 damage to the die roll. We roll again, but this time we roll a higher number, so we stop trying to add dice. For this blow, the mace is a 3d4 weapon. Compare that to a Longsword. This 2d5 weapon has balance of .5 and heft of .5. Using the same warrior as before, we get applied finesse of 75 and applied prowess of 150, giving chance of 6%. If we roll successfully, we add 1d5 to the damage roll. "Unbiased" weapons, like most of the swords, are thus less likely to get critical hits than the heavily biased weapons. However, they get more blows than prowess weapons with a better multiplier than finesse weapons do  it works out that they have higher average damage when crits aren't considered, but less frequent crits. Last edited by Derakon; March 18, 2012 at 23:47. 
March 18, 2012, 22:51  #2 
Knight

Nice explanation
Just wanted to point out a few issues: You seem to have left out percentage signs after balance/heft percentages; this could confuse players reading over the calculations  "why is 1 + 200 * .8 equal to 2.6 instead of 161?" Also, you might want to make it clearer how slays and prowess combine to affect damage  "why does the 1 disappear when I add the 2.4x multiplier from prowess and the 1.48x multiplier from slays? shouldn't I get 3.48x?"
__________________
You read the scroll labeled NOBIMUS UPSCOTI... You are surrounded by a stasis field! The tengu tries to teleport, but fails! 
March 18, 2012, 23:26  #3 
Angband Devteam member

The nice irony with this is that until this evening, you did ;)
__________________
"3.4 is much better than 3.1, 3.2 or 3.3. It still is easier than 3.0.9, but it is more convenient to play without being ridiculously easy, so it is my new favorite of the versions."  Timo Pietila 
March 18, 2012, 23:45  #4 
Prophet
Join Date: Dec 2009
Posts: 8,867

Yeah, in the process of writing this we found a few oddities about the current system. That's what I was referring to when I said at the top that the system would be patched shortly.
But thanks for the feedback; I'll go through and fix it up. 
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)  
Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Anyone got a link to the last nightly version that works?  TJS  Vanilla  10  November 25, 2010 01:31 
It's aliiive! Angband replay logger works  Pete Mack  Vanilla  31  November 16, 2009 01:08 
Can someone explain how lineofsight really works?  jv123  Vanilla  7  June 13, 2009 23:00 
When Nexus Works For You  ElectricPaladin  AAR  0  May 3, 2009 08:49 
Bug! Teleport level works in ironman  Riun  Vanilla  4  March 19, 2009 16:58 