Module: Gemwarrior::PlayerLevels
- Included in:
- Player
- Defined in:
- lib/gemwarrior/misc/player_levels.rb
Class Method Summary collapse
- .check_level(xp) ⇒ Object
- .get_ability_description(ability) ⇒ Object
- .get_level_stats(level) ⇒ Object
Class Method Details
.check_level(xp) ⇒ Object
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
# File 'lib/gemwarrior/misc/player_levels.rb', line 75 def self.check_level(xp) if xp < 50 1 elsif xp < 120 2 elsif xp < 250 3 elsif xp < 600 4 elsif xp < 1000 5 elsif xp < 1500 6 elsif xp < 10000 7 else 8 end end |
.get_ability_description(ability) ⇒ Object
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
# File 'lib/gemwarrior/misc/player_levels.rb', line 95 def self.get_ability_description(ability) case ability when :rocking_vision # LV2 'Allows you to see the enemy hit points while in battle.' when :gleam # LV3 'The map now shows every place in Jool, whether you have been there or not.' when :rock_slide # LV4 'Adds a random boost to the player\'s attack in battle.' when :graniton # LV5 'Chance to be much more accurate in your attacks.' when :stone_face # LV6 'Chance to auto-win in battle against any non-boss monster (does not work in arena or if ambushed).' when :breakthru 'Teleport to any location, given that you can remember its name.' else 'Unsure, but it\'s probably cool!' end end |
.get_level_stats(level) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/gemwarrior/misc/player_levels.rb', line 6 def self.get_level_stats(level) case level when 1 { level: 1, xp_start: 0, hp_max: 30, atk_lo: 1, atk_hi: 2, defense: 1, dexterity: 3, special_abilities: nil } when 2 { level: 2, xp_start: 50, hp_max: 35, atk_lo: 2, atk_hi: 3, defense: 3, dexterity: 4, special_abilities: :rocking_vision } when 3 { level: 3, xp_start: 120, hp_max: 45, atk_lo: 3, atk_hi: 5, defense: 5, dexterity: 6, special_abilities: :gleam } when 4 { level: 4, xp_start: 250, hp_max: 55, atk_lo: 5, atk_hi: 6, defense: 6, dexterity: 8, special_abilities: :rock_slide } when 5 { level: 5, xp_start: 600, hp_max: 70, atk_lo: 7, atk_hi: 8, defense: 8, dexterity: 9, special_abilities: :graniton } when 6 { level: 6, xp_start: 1000, hp_max: 85, atk_lo: 8, atk_hi: 10, defense: 10, dexterity: 11, special_abilities: :stone_face } when 7 { level: 7, xp_start: 1500, hp_max: 100, atk_lo: 10, atk_hi: 12, defense: 13, dexterity: 14, special_abilities: :breakthru } else { level: 8, xp_start: 10000, hp_max: 200, atk_lo: 50, atk_hi: 100, defense: 50, dexterity: 100, special_abilities: nil } end end |