Class: Hlockey::Mod::Nonconfrontational

Inherits:
Object
  • Object
show all
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

#game

Instance Method Summary collapse

Methods included from Moddable

#initialize, #on_action, #on_got_hit, #on_swap

Methods included from SelfDescribable

#to_s

Instance Method Details

#on_join_fightObject



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