diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/game_controller.rb | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/app/controllers/game_controller.rb b/app/controllers/game_controller.rb index 6205c17..c85eecd 100644 --- a/app/controllers/game_controller.rb +++ b/app/controllers/game_controller.rb @@ -73,12 +73,6 @@ class GameController < ApplicationController table_roll = rand result[:table].sort_by { |t| -t[:score] }.each do |table_entry| score = table_entry[:score] - result[:table_scaling]&.each do |scale_entry| - case scale_entry[:type] - when "skill" - score = score**(1 + (scale_entry[:scale_value] * current_char.skill_level(scale_entry[:gid]))) - end - end if table_roll >= score activity = Activity.find_by_gid(table_entry[:gid]) monster = Monster.find_by_gid(table_entry[:gid]) @@ -99,13 +93,6 @@ class GameController < ApplicationController quantity = rand(min_quantity..max_quantity) score = table_entry[:score] - table_scaling = result[:table_scaling] - table_scaling&.each do |scale_entry| - case scale_entry[:type] - when "skill" - score = score**(1 + (scale_entry[:scale_value] * current_char.skill_level(scale_entry[:gid]))) - end - end if table_roll >= score give_item(table_entry, quantity, with_xp: true) @@ -144,12 +131,6 @@ class GameController < ApplicationController table_roll = rand result[:table].sort_by { |t| -t[:score] }.each do |table_entry| score = table_entry[:score] - result[:table_scaling]&.each do |scale_entry| - case scale_entry[:type] - when "skill" - score = score**(1 + (scale_entry[:scale_value] * current_char.skill_level(scale_entry[:gid]))) - end - end if table_roll >= score activity = Activity.find_by_gid(table_entry[:gid]) unless current_char.learned_activities.exists?(activity: activity) @@ -284,13 +265,6 @@ class GameController < ApplicationController quantity = rand(min_quantity..max_quantity) score = table_entry[:score] - table_scaling = award_data[:table_scaling] - table_scaling&.each do |scale_entry| - case scale_entry[:type] - when "skill" - score = score**(1 + (scale_entry[:scale_value] * current_char.skill_level(scale_entry[:gid]))) - end - end if table_roll >= score give_item(table_entry, quantity) |