The crawl fight simulator is a set of commands available in wizard mode to
generate statistical data of player vs monsters combat. It is useful to test
and balance new formulae, changes to weapon stats or brand effect for example.

There are 3 commands to start the fight simulator. Each of them will start by
prompting you to select a monster among the ones in sight. If there is none (or
if you cancel the selection), you will be prompted to type a monster name.

&f: Quick simulation. This command runs one attack simulation (player attack
monster) and one defense simulation (monster attack player). It uses the
current character skills and stats without any change. The output looks like
this:


            AvHitDam | MaxDam | Accuracy | AvDam | AvTime | AvEffDam
 Attacking:      3.9 |     10 |      81% |   3.2 |    1.3 |      2.5
 Defending:      5.9 |     32 |     100% |   5.9 |    1.0 |      5.9

AvHitDam : Average damage per round which have hit.
MaxDam   : Highest damage dealt in a single round.
Accuracy : Percentage of attacks which hit their target, including the ones
           which did no damage. For monsters with multiple attacks, if at least
           one has hit, the attack round counts has having hit.
AvDam    : The average damage per round, including the missed ones. It should
           be equal to AvHitDam * Accuracy.
AvTime   : Average duration of an attack round.
AvEffDam : Average damage per turn (10 aut). This accounts for accuracy and
           attack speed and is the accurate indicator of how effective an
           attack is.

&F: Simple scale simulation. This command will start by asking for (A)ttack or
(D)efense simulation. It will then run the simulation 28 times while
incrementing a skill from level 0 to level 27.
By default, the skill scaled is the weapon skill in attack mode and armour in
defense mode. The weapon skill can be Unarmed Combat, Throwing or a launcher
skill depending on what equipment is currently wielded/quivered. The skill can
be changed using the fsim_scale option (see below).
The results are presented in a table similar to the one generated by the quick
simulation command. Results are displayed in the in-game message area, and also
appended to the fsim.txt file (or fsim.csv if using the fsim_csv option).

&^F (& followed by ctrl+F): Double scale simulation. Like the simple scale
command, it starts by asking for attack or defense mode and output the results
in the fight.stat file.
2 skills are scaled from 1 to 27 by steps of 2 levels. In attack mode, the
skills are weapon and fighting. In defense mode, they are armour and dodging.
Only AvEffDam is calculated and the results are presented in a 2 dimensional
array like this:

Fighting(x) vs Long Blades(y)
      1    3    5    7    9   11   13   15   17   19   21   23   25   27
 1  4.3  4.2  4.7  4.8  4.6  5.0  5.3  5.3  5.5  5.4  5.7  6.1  6.6  6.8
 3  4.6  4.6  4.7  5.3  5.2  5.4  5.8  5.7  6.1  6.1  6.5  6.5  6.3  7.0
 5  5.0  5.1  5.3  5.6  6.1  5.6  6.1  6.5  6.6  7.1  7.6  7.6  7.9  7.8
 7  5.6  6.0  6.1  6.3  6.5  6.5  7.2  7.7  7.5  8.1  8.0  8.1  8.4  8.1
 9  6.3  6.5  6.7  7.3  7.4  7.5  8.0  8.0  8.1  8.5  9.0  9.0  9.8  9.9
11  7.1  7.1  7.2  7.8  7.8  8.4  8.8  8.9  9.0  9.9  9.7 10.5 10.7 11.0
13  8.0  8.2  8.8  9.2  9.6  9.3  9.8 10.0 11.0 10.6 11.1 11.8 11.6 12.5
15  9.0  9.5  9.4  9.7 10.2 10.7 11.3 12.2 11.6 12.7 12.7 12.4 13.3 13.3
17 10.2 10.5 11.1 11.0 11.8 12.1 12.1 12.5 13.3 13.5 14.2 15.4 15.1 15.5
19 11.7 11.9 12.0 12.7 13.8 14.3 14.1 15.2 14.9 16.3 16.8 17.1 17.0 18.0
21 13.9 14.4 15.2 14.9 15.6 16.3 16.3 17.4 18.5 18.7 18.4 20.7 20.4 20.6
23 16.1 17.5 16.4 17.9 17.7 18.4 20.8 19.8 20.7 20.9 21.8 22.6 24.4 24.7
25 18.1 19.1 19.1 19.5 19.9 21.9 22.7 22.1 22.7 24.3 23.9 26.3 26.5 26.5
27 18.3 19.4 19.0 20.8 22.1 21.3 23.7 22.3 22.9 24.3 24.5 25.1 26.8 26.9

The following options can be used to configure the fight simulator:

fsim_mode  : set it to "attack" or "defense" to skip the prompt.
fsim_csv   : output the result in csv format.
fsim_mons  : if set to a valid monster type, it will be used instead of asking
             to select a monster.
fsim_rounds: the number of rounds run at each skill level. It defaults to 4000
             and range from 1000 to 500 000.

fsim_scale: It's used to configure which skills are used as a scale in simple
scale mode. By default, only the weapon skill is scaled.
It takes a list of skills separated by commas. An optional divider can be
specified after a /. The word "weapon" can be used in place of a skill name to
refer to the default weapon skill for the simulation. For example:

    fsim_scale = weapon, fighting/2

The weapon skill will be scaled from 0 to 27, while the fighting skill will be
kept at half the level of the weapon skill. This used to be the behaviour of
the simulator in versions 0.10 and earlier.

if XL is specified instead of a skill, then it will be used as the scale.
Skills will be trained automatically, and the number provided for each skill
will be used to set the training weight. For example:

    fsim_scale = XL, weapon:5, fighting:2

It means that 5/7 of XP will be used to train the weapon skill and 2/7 to train
the fighting skill.

/ and : are both recognised as separators in normal and XL mode. However,
given that there meaning is completely different, it is recommended to use
/ in normal mode and : in XL mode.

fsim_kit: This option is useful to run a batch of simulations with different
equipment. It takes a list of weapons separated by commas. Missiles can be
specified after a /. The items will be generated if they are not found in the
character's inventory, but make sure there is enough room in the inventory.
Example:

    fsim_kit = broad axe, crossbow / steel bolts, /javelins
