| summaryrefslogtreecommitdiff | 
diff options
Diffstat (limited to 'src/battlemap')
| -rw-r--r-- | src/battlemap/src/Struct/Statistics.elm | 35 | ||||
| -rw-r--r-- | src/battlemap/src/Update/SelectCharacter.elm | 8 | 
2 files changed, 30 insertions, 13 deletions
| diff --git a/src/battlemap/src/Struct/Statistics.elm b/src/battlemap/src/Struct/Statistics.elm index 777849b..3f705ed 100644 --- a/src/battlemap/src/Struct/Statistics.elm +++ b/src/battlemap/src/Struct/Statistics.elm @@ -110,14 +110,19 @@ new : (  new att wp_set =     let        active_weapon = (Struct.WeaponSet.get_active_weapon wp_set) +      actual_att = (Struct.Weapon.apply_to_attributes active_weapon att)        dmg_bmod = -         (damage_base_mod (toFloat (Struct.Attributes.get_strength att))) +         (damage_base_mod +            (toFloat (Struct.Attributes.get_strength actual_att)) +         )     in        {           movement_points = -            (gentle_squared_growth (Struct.Attributes.get_speed att)), +            (gentle_squared_growth (Struct.Attributes.get_speed actual_att)),           max_health = -            (gentle_squared_growth (Struct.Attributes.get_constitution att)), +            (gentle_squared_growth +               (Struct.Attributes.get_constitution actual_att) +            ),           dodges =              (clamp                 5 @@ -125,9 +130,9 @@ new att wp_set =                 (sudden_exp_growth_f                    (average                       [ -                        (Struct.Attributes.get_dexterity att), -                        (Struct.Attributes.get_mind att), -                        (Struct.Attributes.get_speed att) +                        (Struct.Attributes.get_dexterity actual_att), +                        (Struct.Attributes.get_mind actual_att), +                        (Struct.Attributes.get_speed actual_att)                       ]                    )                 ) @@ -139,9 +144,9 @@ new att wp_set =                 (sudden_exp_growth_f                    (average                       [ -                        (Struct.Attributes.get_dexterity att), -                        (Struct.Attributes.get_speed att), -                        (Struct.Attributes.get_strength att) +                        (Struct.Attributes.get_dexterity actual_att), +                        (Struct.Attributes.get_speed actual_att), +                        (Struct.Attributes.get_strength actual_att)                       ]                    )                 ) @@ -157,18 +162,24 @@ new att wp_set =                 (toFloat (Struct.Weapon.get_max_damage active_weapon))              ),           accuracy = -            (sudden_squared_growth (Struct.Attributes.get_dexterity att)), +            (sudden_squared_growth +               (Struct.Attributes.get_dexterity actual_att) +            ),           double_hits =              (clamp                 0                 100 -               (sudden_squared_growth (Struct.Attributes.get_speed att)) +               (sudden_squared_growth +                  (Struct.Attributes.get_speed actual_att) +               )              ),           --- This should be weapon dependent           critical_hits =              (clamp                 0                 100 -               (sudden_squared_growth (Struct.Attributes.get_intelligence att)) +               (sudden_squared_growth +                  (Struct.Attributes.get_intelligence actual_att) +               )              )     } diff --git a/src/battlemap/src/Update/SelectCharacter.elm b/src/battlemap/src/Update/SelectCharacter.elm index 2d81939..05099ba 100644 --- a/src/battlemap/src/Update/SelectCharacter.elm +++ b/src/battlemap/src/Update/SelectCharacter.elm @@ -14,6 +14,8 @@ import Struct.Model  import Struct.Navigator  import Struct.Statistics  import Struct.UI +import Struct.Weapon +import Struct.WeaponSet  --------------------------------------------------------------------------------  -- LOCAL ----------------------------------------------------------------------- @@ -49,7 +51,11 @@ ctrl_or_focus_character model target_char_id target_char =                    (Struct.Statistics.get_movement_points                       (Struct.Character.get_statistics target_char)                    ) -                  1 -- Attack Range +                  (Struct.Weapon.get_max_range +                     (Struct.WeaponSet.get_active_weapon +                        (Struct.Character.get_weapons target_char) +                     ) +                  )                    (Struct.Battlemap.get_movement_cost_function                       model.battlemap                       (Struct.Character.get_location target_char) | 


