diff options
author | David Gay <david@davidgay.org> | 2021-06-05 15:41:19 -0400 |
---|---|---|
committer | David Gay <david@davidgay.org> | 2021-06-05 15:41:57 -0400 |
commit | 577bde7837e9e234e2b790cafc790b5071ba826a (patch) | |
tree | 446aee70fafa2b42a3060aae96fa1bd3c88e6661 /app | |
parent | 3a845f15a7f465f629224077d989f5e7950e148e (diff) |
Delete exponential table scaling code
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) |