diff options
-rw-r--r-- | app/controllers/game_controller.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/controllers/game_controller.rb b/app/controllers/game_controller.rb index 152e856..39bb940 100644 --- a/app/controllers/game_controller.rb +++ b/app/controllers/game_controller.rb @@ -134,7 +134,9 @@ class GameController < ApplicationController blocked_damage = (accuracy_roll >= (roll(20) + target.block)) ? 0 : target.block_value resolved_damage = dealt_damage - blocked_damage actor == char ? mon_hp -= resolved_damage : char_hp -= resolved_damage - combat_message.call("#{actor.name} hit for #{resolved_damage} (#{dealt_damage} - #{blocked_damage} blocked)") + damage_text = "#{resolved_damage} damage." + damage_text += " (#{dealt_damage} - #{blocked_damage} blocked)" if blocked_damage > 0 + combat_message.call("#{actor.name} hit for #{damage_text}") elsif evasion_roll > accuracy_roll combat_message.call("#{target.name} evaded #{actor.name}'s attack.") end |