diff options
-rw-r--r-- | CHANGELOG.md | 6 | ||||
-rw-r--r-- | app/controllers/game_controller.rb | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 20dcb7b..bfac4a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,12 @@ # Changelog All notable changes to this project will be documented in this file. +## [Unreleased] - 2021-06-02 + +### Changed +- Initiative rolls are now made with a d20 instead of a d10. Therefore, speed is now more important. Previously, once a + combatant had a decent speed stat advantage, the roll was fairly easy to call. So this is a buff, but also a nerf. + ## [0.1.4.1] - 2021-05-31 ### Changed 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 |