diff options
-rw-r--r-- | CHANGELOG.md | 2 | ||||
-rw-r--r-- | app/controllers/game_controller.rb | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 16e8c0a..3e1f10a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,8 @@ amenities, etc that are added unless they are special in some way. ### Changed - Remaining duration of conditions and accumulated rested time are now expressed in "human" terms instead of seconds. +- Blank line is now added to beginning of combat results instead of end, since it means more of the most-recent combat + results can be visible when the box has a scroll bar. ### Removed - The "Look" view. 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 |