Class: DiabloGame::BlacksmithPlayer
- Inherits:
-
Hero
- Object
- Hero
- DiabloGame::BlacksmithPlayer
show all
- Defined in:
- lib/diablo_game/blacksmith_player.rb
Instance Attribute Summary
Attributes inherited from Hero
#health, #name
Instance Method Summary
collapse
Methods inherited from Hero
#initialize, #points, #to_s
Methods included from Playable
#dead?, #heal
Instance Method Details
#dig(jewel) ⇒ Object
7
8
9
10
|
# File 'lib/diablo_game/blacksmith_player.rb', line 7
def dig(jewel)
bonus_dig = Jewel.new(jewel.name, jewel.points * 3)
super(bonus_dig)
end
|
#hit ⇒ Object
12
13
14
15
|
# File 'lib/diablo_game/blacksmith_player.rb', line 12
def hit
@health -= 60
puts "#{@name} was hit! Health is now: #{@health}"
end
|