From 3f079ef8a7d46d5a4864836dbbd9e37b900c0a59 Mon Sep 17 00:00:00 2001 From: David Gay Date: Tue, 25 May 2021 20:44:53 -0400 Subject: Award title for mining a yellow beryl --- app/controllers/game_controller.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'app/controllers') diff --git a/app/controllers/game_controller.rb b/app/controllers/game_controller.rb index 4b96b49..8c1acaf 100644 --- a/app/controllers/game_controller.rb +++ b/app/controllers/game_controller.rb @@ -57,6 +57,13 @@ class GameController < ApplicationController if table_roll >= score give_item_with_xp(table_entry, quantity) + + table_entry[:titles]&.each do |title_data| + title = Title.find_by_gid(title_data[:gid]) + if current_char.award_title(title) + @results.push({ type: "title", title: title }) + end + end break end end -- cgit v1.2.3