Improvement: Tweak attack printing for units

 - Attack hit odds are now printed nicely in percentages
 - Model ranges are now printed nicely in inches
Merge branch 'rc' into develop
In progress: implement attack optimization

This patch adds partial code for computing legal attack permutations
and ordering them on the basis of some strategy potentially defined by
the user.

At the moment this code is _not_ ready to roll and this patch is
really a [squashme] but as it isn't hooked into the repl by this patch
I'll let it slide.
 Feature: Implement attack optimization

This patch adds a skeleton for programatically analyzing all the
damage options (that cortex knows about) which one model has against
another and displaying a consequent "maximally efficient" course of
action in terms of probable damage dealt.

This algorithm is purely greedy and does nothing interesting beyond
maximize damage, potentially leading to counterintuitive suggestions
in corner cases where the increased probability of a boosted hit roll
increases the probable damage dealt by more than boosting the damage
roll, while the standard deviation on the damage roll suggests that
one would really be better to roll an extra die on damage.

The fix for this is to cap the hit probability at about 65% or some
other "highly confident" constant, but this code is designed for user
specified ordering rules so I'm not gonna mess with it.
Bugfix: clean out some issues with the feature drop

 - Rework the permutation generator to ensure that all attacks even
   single weapon attacks are evaluated and yielded for analysis.
 - Rework the optimize_attack fn to ensure that it will behave as
   intended for more than `count` attack options, which it did not
   previously.
 - Add and make the default an optimization strategy which considers
   extra hit chance above 60% moot, thus encouraging damage boosting.
 - Tweak how all this is wired into the repl so that three attack
   options will be printed rather than just the top one.
Bugfix: hold the attack option calculator to focus bounds

 - Fix a bug where attacks could use more focus than allocated thus
   producing invalid attack options.
 - Implement a new strategy, "_focus_capped_aggro", which factors
   focus usage into attack plan rankings in an attempt to achieve
   greater efficiency.
 - Add a 'focus' key to each attack step as a means of tracking focus
   usage.
 - Implement a reduced form comparison between attack plan lists which
   allows for duplicate and reorder plans to be discarded out of hand.
Bugfix: limit attack seqs to allocated focus

 - Fix a bug where an attack sequence with a final focus count of -1
   would be legal due to comparing against the wrong variable.
 - Fix a bug where weapon_of_choice couldn't be used more than twice
 - Fix a bug where we could compute boosting permutations for an
   attack in excess of ROF.
Improvement: implement a somewhat better focus structure

 - Dispatch to a focus value based on the type of the attacking
   model. Jacks get 3, Models get 0, Warcasters get their entire focus
   when assessing attack options.
Feature: add support for a 'focus' modifier in the attack params

 - Add a sketchy implementation for the focus modifier, allowing
   attacks to be explicitly evaluated with a user specified ammount of
   focus. The grammar isn't great, if the [+-=] modifiers are used it
   will break but it should work in the simple case of an integer.
Improvement: Tweak attack printing for units

 - Attack hit odds are now printed nicely in percentages
 - Model ranges are now printed nicely in inches
In progress: implement attack optimization

This patch adds partial code for computing legal attack permutations
and ordering them on the basis of some strategy potentially defined by
the user.

At the moment this code is _not_ ready to roll and this patch is
really a [squashme] but as it isn't hooked into the repl by this patch
I'll let it slide.
 Feature: Implement attack optimization

This patch adds a skeleton for programatically analyzing all the
damage options (that cortex knows about) which one model has against
another and displaying a consequent "maximally efficient" course of
action in terms of probable damage dealt.

This algorithm is purely greedy and does nothing interesting beyond
maximize damage, potentially leading to counterintuitive suggestions
in corner cases where the increased probability of a boosted hit roll
increases the probable damage dealt by more than boosting the damage
roll, while the standard deviation on the damage roll suggests that
one would really be better to roll an extra die on damage.

The fix for this is to cap the hit probability at about 65% or some
other "highly confident" constant, but this code is designed for user
specified ordering rules so I'm not gonna mess with it.
Bugfix: clean out some issues with the feature drop

 - Rework the permutation generator to ensure that all attacks even
   single weapon attacks are evaluated and yielded for analysis.
 - Rework the optimize_attack fn to ensure that it will behave as
   intended for more than `count` attack options, which it did not
   previously.
 - Add and make the default an optimization strategy which considers
   extra hit chance above 60% moot, thus encouraging damage boosting.
 - Tweak how all this is wired into the repl so that three attack
   options will be printed rather than just the top one.
Bugfix: hold the attack option calculator to focus bounds

 - Fix a bug where attacks could use more focus than allocated thus
   producing invalid attack options.
 - Implement a new strategy, "_focus_capped_aggro", which factors
   focus usage into attack plan rankings in an attempt to achieve
   greater efficiency.
 - Add a 'focus' key to each attack step as a means of tracking focus
   usage.
 - Implement a reduced form comparison between attack plan lists which
   allows for duplicate and reorder plans to be discarded out of hand.
1.0.2-b rc merge

Conflicts:
	src/cortex/repl.py
	src/cortex/wm.py