Class: Hlockey::Mod::Nonconfrontational
- Inherits:
-
Object
- Object
- Hlockey::Mod::Nonconfrontational
- Includes:
- Moddable
- Defined in:
- lib/hlockey/mod/nonconfrontational.rb
Overview
The first player in the shadows will join fights instead of this player, if they do not also have the mod.
Constant Summary collapse
- DESCRIPTION =
"This player tries to avoid fights.".freeze
Instance Attribute Summary
Attributes included from Moddable
Instance Method Summary collapse
Methods included from Moddable
#initialize, #on_action, #on_got_hit, #on_swap
Methods included from SelfDescribable
Instance Method Details
#on_join_fight ⇒ Object
13 14 |
# File 'lib/hlockey/mod/nonconfrontational.rb', line 13 def on_join_fight = @team.shadows.select { |player| player.mods.none? { _1.is_a?(self.class) } }.first |