diff options
author | David Gay <david@davidgay.org> | 2021-05-28 11:26:44 -0400 |
---|---|---|
committer | David Gay <david@davidgay.org> | 2021-05-28 11:26:54 -0400 |
commit | 5ae89950fb330fd623634b98a77de259ab174b53 (patch) | |
tree | 3ec11fae10758379761f5b824586b1c22bc57c12 /app/controllers/characters | |
parent | c522bc8efa0378e0fcbcfdd137d6cd2ae4010d5b (diff) |
Lockbox unlocking, and with it items that start activities when used
Diffstat (limited to 'app/controllers/characters')
-rw-r--r-- | app/controllers/characters/items_controller.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/controllers/characters/items_controller.rb b/app/controllers/characters/items_controller.rb index e1dfd5c..93dc683 100644 --- a/app/controllers/characters/items_controller.rb +++ b/app/controllers/characters/items_controller.rb @@ -45,6 +45,8 @@ class Characters::ItemsController < ApplicationController heal_or_gain = wounds_change.positive? ? "gain" : "heal" flash[:notice] += " You #{heal_or_gain} #{wounds_change.abs} wound(s)." end + when "activity" + start_activity(Activity.find_by_gid(effect[:gid])) and return else raise "Invalid use effect type string (#{effect[:type]})" end |