Class: Hlockey::Mod::Punchy
- Inherits:
-
Object
- Object
- Hlockey::Mod::Punchy
- Defined in:
- lib/hlockey/mod/punchy.rb
Overview
Player can get into a fight at any time
Constant Summary collapse
- DESCRIPTION =
"This player may randomly start fights.".freeze
Instance Attribute Summary
Attributes included from Moddable
Instance Method Summary collapse
Methods included from Moddable
#initialize, #on_got_hit, #on_join_fight, #on_swap
Methods included from SelfDescribable
Instance Method Details
#on_action ⇒ Object
13 14 15 16 17 18 |
# File 'lib/hlockey/mod/punchy.rb', line 13 def on_action return unless random_event_occurs?(prng:) (:mod_punchy_event, player: @player) @game.start_fight(@player) end |