Class: WSGame::BerserkPlayer
- Inherits:
-
Player
- Object
- Player
- WSGame::BerserkPlayer
- Defined in:
- lib/wsgame/class_player_berserk.rb
Instance Method Summary collapse
- #blamm ⇒ Object
-
#initialize(pname, phealth) ⇒ BerserkPlayer
constructor
A new instance of BerserkPlayer.
- #w00t ⇒ Object
Constructor Details
#initialize(pname, phealth) ⇒ BerserkPlayer
Returns a new instance of BerserkPlayer.
8 9 10 11 12 |
# File 'lib/wsgame/class_player_berserk.rb', line 8 def initialize(pname,phealth) super(pname,phealth) @cnt_w00t = 0 end |
Instance Method Details
#blamm ⇒ Object
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/wsgame/class_player_berserk.rb', line 15 def blamm if @cnt_w00t > 3 self.w00t puts "#{@pname} is BERSERK!!!!" else super end #@cnt_w00t > 3 ? self.w00t : super end |
#w00t ⇒ Object
26 27 28 29 |
# File 'lib/wsgame/class_player_berserk.rb', line 26 def w00t @cnt_w00t +=1 super end |