diff options
-rw-r--r-- | app/controllers/game_controller.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/controllers/game_controller.rb b/app/controllers/game_controller.rb index b785b25..588c502 100644 --- a/app/controllers/game_controller.rb +++ b/app/controllers/game_controller.rb @@ -185,7 +185,11 @@ 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? + unless char.can_fight? + @results.push([{ type: "error", + message: "You can't fight in your condition. You'll have to heal a wound." }]) + char.stop_activity unless char.can_fight? + end else @results.push({ type: "message", body: "You slew the #{mon.name}." }) mon.whatnot[:awards]&.each do |award_data| |