diff options
author | David Gay <david@davidgay.org> | 2021-06-02 18:12:20 -0400 |
---|---|---|
committer | David Gay <david@davidgay.org> | 2021-06-02 18:12:20 -0400 |
commit | 0f44305cec1134e5b7ccc7a1454eb020e2068b40 (patch) | |
tree | 77be4594d242cedabe90aa94453fc8af4b196ab8 /app | |
parent | 3b3d0ddaaa368359a474b60c79771406168e7e1e (diff) |
Change initiative rolls to use a d20 instead of a d10
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/game_controller.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/game_controller.rb b/app/controllers/game_controller.rb index d1d8bd6..2de342a 100644 --- a/app/controllers/game_controller.rb +++ b/app/controllers/game_controller.rb @@ -199,8 +199,8 @@ class GameController < ApplicationController char_hp = current_char.max_hp mon_hp = mon.max_hp combat_message = ->(msg) { @results.push({ type: "message", body: "[#{char_hp}/#{char.max_hp}] #{msg}" }) } - char_initiative = roll(10) + char.speed - mon_initative = roll(10) + mon.speed + char_initiative = roll(20) + char.speed + mon_initative = roll(20) + mon.speed if char_initiative > mon_initative turn_order = [[char, mon], [mon, char]] elsif mon_initative > char_initiative |