summaryrefslogtreecommitdiff
path: root/app/controllers/game_controller.rb
diff options
context:
space:
mode:
authorDavid Gay <david@davidgay.org>2021-05-28 12:17:09 -0400
committerDavid Gay <david@davidgay.org>2021-05-28 12:20:12 -0400
commit26f80f3442ca14aac9a75130bc2c4dddc076a145 (patch)
tree7876e6383d95ad03b350ac5bc9085d38b3b719b9 /app/controllers/game_controller.rb
parent512d014943b4990422de07421a29be00374157c9 (diff)
Add `retributor` title, awarded for killing a lesser trodgeathomp
Diffstat (limited to 'app/controllers/game_controller.rb')
-rw-r--r--app/controllers/game_controller.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/controllers/game_controller.rb b/app/controllers/game_controller.rb
index bf45973..3742824 100644
--- a/app/controllers/game_controller.rb
+++ b/app/controllers/game_controller.rb
@@ -199,6 +199,11 @@ class GameController < ApplicationController
@results.push({ type: "message", body: "You slew the #{mon.name}." })
mon.whatnot[:awards]&.each do |award_data|
case award_data[:type]
+ when "title"
+ title = Title.find_by_gid(award_data[:gid])
+ if current_char.award_title(title)
+ @results.push({ type: "title", title: title })
+ end
when "xp"
skill = Skill.find_by_gid(award_data[:skill])
amount = award_data[:base]