From 0f44305cec1134e5b7ccc7a1454eb020e2068b40 Mon Sep 17 00:00:00 2001 From: David Gay Date: Wed, 2 Jun 2021 18:12:20 -0400 Subject: Change initiative rolls to use a d20 instead of a d10 --- app/controllers/game_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app') 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 -- cgit v1.2.3