Permalink
Browse files

new special ability created, available at level 2: rocking_vision, re…

…quired to see monster hp unless you look at them which opens you up to potential attack
  • Loading branch information...
michaelchadwick committed Jun 11, 2015
1 parent abad07d commit fb356ca37ff9bfda4b2ed84554f9b95d4d3424e1
Showing with 27 additions and 13 deletions.
  1. +12 −5 lib/gemwarrior/battle.rb
  2. +14 −7 lib/gemwarrior/misc/player_levels.rb
  3. +1 −1 lib/gemwarrior/misc/version.rb
View
@@ -48,11 +48,18 @@ def start
end
puts
puts "PLAYER :: #{player.hp_cur.to_s.rjust(3)} HP"
puts "MONSTER :: #{monster.hp_cur.to_s.rjust(3)} HP"
puts "[Fight/Attack][Look][Run]".colorize(:color => :yellow)
puts "PLAYER :: #{player.hp_cur.to_s.rjust(3)} HP"
print "MONSTER :: "
if world.debug_mode || PlayerLevels::get_level_stats(player.level)[:special_abilities].include?(:rocking_vision)
print "#{monster.hp_cur.to_s.rjust(3)}"
else
print "???"
end
print " HP\n"
puts
puts 'What do you do?'
puts "[Fight/Attack][Look][Run]".colorize(:color => :yellow)
cmd = gets.chomp.downcase
# player action
@@ -70,7 +77,7 @@ def start
puts "You miss entirely!".colorize(:yellow)
end
when 'look', 'l'
puts "#{monster.name}: #{monster.description}"
puts "#{monster.name} (#{monster.hp_cur}/#{monster.hp_max} HP): #{monster.description}"
puts "Its got some distinguishing features, too: face is #{monster.face}, hands are #{monster.hands}, and general mood is #{monster.mood}."
when 'run', 'r'
if player_escape?
@@ -175,7 +182,7 @@ def monster_death
puts "You have defeated #{monster.name}!\n".colorize(:green)
if monster.is_boss
if monster.name.eql?("Emerald")
monster.defeated_text
puts monster.defeated_text
exit(0)
else
puts 'You just beat a boss monster. Way to go!'
@@ -10,49 +10,56 @@ def self.get_level_stats(level)
:level => 1, :xp_start => 0,
:hp_max => 30, :stam_max => 20,
:atk_lo => 1, :atk_hi => 2,
:defense => 5, :dexterity => 5
:defense => 5, :dexterity => 5,
:special_abilities => []
}
when 2
{
:level => 2, :xp_start => 50,
:hp_max => 35, :stam_max => 25,
:atk_lo => 2, :atk_hi => 3,
:defense => 6, :dexterity => 6
:defense => 6, :dexterity => 6,
:special_abilities => [:rocking_vision]
}
when 3
{
:level => 3, :xp_start => 120,
:hp_max => 45, :stam_max => 30,
:atk_lo => 3, :atk_hi => 5,
:defense => 7, :dexterity => 8
:defense => 7, :dexterity => 8,
:special_abilities => [:rocking_vision]
}
when 4
{
:level => 4, :xp_start => 250,
:hp_max => 55, :stam_max => 35,
:atk_lo => 5, :atk_hi => 6,
:defense => 8, :dexterity => 9
:defense => 8, :dexterity => 9,
:special_abilities => [:rocking_vision]
}
when 5
{
:level => 5, :xp_start => 600,
:hp_max => 70, :stam_max => 45,
:atk_lo => 7, :atk_hi => 8,
:defense => 10, :dexterity => 11
:defense => 10, :dexterity => 11,
:special_abilities => [:rocking_vision]
}
when 6
{
:level => 6, :xp_start => 1000,
:hp_max => 85, :stam_max => 60,
:atk_lo => 8, :atk_hi => 10,
:defense => 13, :dexterity => 13
:defense => 13, :dexterity => 13,
:special_abilities => [:rocking_vision]
}
when 7
{
:level => 7, :xp_start => 1500,
:hp_max => 100, :stam_max => 80,
:atk_lo => 10, :atk_hi => 12,
:defense => 15, :dexterity => 16
:defense => 15, :dexterity => 16,
:special_abilities => [:rocking_vision]
}
end
end
@@ -2,5 +2,5 @@
# Version of Gem Warrior
module Gemwarrior
VERSION = "0.6.4"
VERSION = "0.6.5"
end

0 comments on commit fb356ca

Please sign in to comment.