diff options
author | David Gay <david@davidgay.org> | 2021-05-26 21:43:04 -0400 |
---|---|---|
committer | David Gay <david@davidgay.org> | 2021-05-26 21:43:04 -0400 |
commit | 6ad1800081d8bbbf9375dc9744f7f35357c19d68 (patch) | |
tree | 17245bc09383f7a1a7bcda5d3e337a1b86566e32 /app/controllers | |
parent | 7247a6fb0b3b374f3dac651bd2b133bcb5303534 (diff) |
Immediately stop activity if unable to fight at the end of an encounter, rather than waiting for the timer to go down again
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/game_controller.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/controllers/game_controller.rb b/app/controllers/game_controller.rb index 4f1ca0f..40d8991 100644 --- a/app/controllers/game_controller.rb +++ b/app/controllers/game_controller.rb @@ -173,6 +173,7 @@ class GameController < ApplicationController @results.push({ type: "message", body: "You were defeated! You retreat, wounded." }) char.wounds += 1 char.save! + char.stop_activity unless char.can_fight? else @results.push({ type: "message", body: "You slew the #{mon.name}." }) mon.whatnot[:awards]&.each do |award_data| |