diff options
author | David Gay <david@davidgay.org> | 2021-06-16 19:20:17 -0400 |
---|---|---|
committer | David Gay <david@davidgay.org> | 2021-06-16 19:20:17 -0400 |
commit | 361acfad2162e08a962c63c4443641fbbd812089 (patch) | |
tree | 5ad983e464ef6ef04d7eb9b2b8873efcc5aff384 /app/lib | |
parent | c626f5ec23449e0c62a6c026012ecedc29a6bab8 (diff) |
Learn spells from spellpages
Diffstat (limited to 'app/lib')
-rw-r--r-- | app/lib/activity_processor.rb | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/app/lib/activity_processor.rb b/app/lib/activity_processor.rb index fb0b13d..18fdece 100644 --- a/app/lib/activity_processor.rb +++ b/app/lib/activity_processor.rb @@ -97,10 +97,6 @@ class ActivityProcessor @results.push({ type: "message", body: result[:message] }) @results.push({ type: type, condition: condition }) end - when "decipher_magicscript" - Character.transaction do - # TODO: Add functionality - end when "activity" next if rand > (result[:chance] || 1) table_roll = rand @@ -108,6 +104,7 @@ class ActivityProcessor score = table_entry[:score] if table_roll >= score new_activity = Activity.find_by_gid(table_entry[:gid]) + raise "Invalid activity gid (#{table_entry[:gid]})" unless new_activity unless @character.learned_activities.exists?(activity: new_activity) @character.learned_activities.create(activity: new_activity) @results.push({ type: type, activity: new_activity }) |