summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Gay <david@davidgay.org>2021-06-02 18:12:20 -0400
committerDavid Gay <david@davidgay.org>2021-06-02 18:12:20 -0400
commit0f44305cec1134e5b7ccc7a1454eb020e2068b40 (patch)
tree77be4594d242cedabe90aa94453fc8af4b196ab8
parent3b3d0ddaaa368359a474b60c79771406168e7e1e (diff)
Change initiative rolls to use a d20 instead of a d10
-rw-r--r--CHANGELOG.md6
-rw-r--r--app/controllers/game_controller.rb4
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