summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/game_controller.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/app/controllers/game_controller.rb b/app/controllers/game_controller.rb
index 9574f31..62ab77b 100644
--- a/app/controllers/game_controller.rb
+++ b/app/controllers/game_controller.rb
@@ -62,6 +62,8 @@ class GameController < ApplicationController
raise TooManyWoundsError unless current_char.can_fight?
next if rand > (result[:chance] || 1)
+ @results.push({ type: "br" })
+
if result[:table].pluck(:gid).include?(current_char.trophy_monster_gid)
monster = Monster.find_by_gid(current_char.trophy_monster_gid)
@results.push({ type: type, monster: monster })
@@ -195,7 +197,6 @@ class GameController < ApplicationController
current_char.stop_activity
@results.replace([{ type: "error",
message: "You can't fight in your condition. You'll have to heal a wound." }])
- @results.push({ type: "br" })
end
private
@@ -254,7 +255,6 @@ class GameController < ApplicationController
unless char.can_fight?
@results.push({ type: "error",
message: "You can't fight in your condition. You'll have to heal a wound." })
- @results.push({ type: "br" })
char.stop_activity
return
end
@@ -315,7 +315,6 @@ class GameController < ApplicationController
raise "Invalid award type string (#{award_data[:type]})"
end
end
- @results.push({ type: "br" })
end
break
end