Class: VaultCoh::Player

Inherits:
Object
  • Object
show all
Defined in:
lib/vault_coh/player.rb

Overview

Game-specific player representation. Includes generally immutable information alongside data specific to the replay being parsed.

Instance Method Summary collapse

Instance Method Details

#battlegroupInteger|NilClass

The pbgid of the battlegroup the player selected, or nil if no battlegroup was selected. For details on what this ID represents please see Commands::SelectBattlegroup#pbgid.

Returns:

  • (Integer|NilClass)


37
# File 'lib/vault_coh/player.rb', line 37

def battlegroup; end

#battlegroup_commandsArray<Commands::SelectBattlegroupCommand | Commands::SelectBattlegroupAbilityCommand | Commands::UseBattlegroupAbilityCommand>

A list of only battlegroup-related commands executed by the player in the match. A battlegroup command is any that involves the select or use of battlegroups and their abilities. Sorted chronologically from first to last.



81
# File 'lib/vault_coh/player.rb', line 81

def battlegroup_commands; end

#build_commandsArray<Command>

A list of only build-related commands executed by the player in the match. A build command is any that enqueues the construction of a new unit or upgrade. Sorted chronologically from first to last.

Returns:



71
# File 'lib/vault_coh/player.rb', line 71

def build_commands; end

#commandsArray<Command>

A list of all commands executed by the player in the match. Sorted chronologically from first to last.

Returns:



64
# File 'lib/vault_coh/player.rb', line 64

def commands; end

#factionFaction

The faction selected by the player in this match.

Returns:



24
# File 'lib/vault_coh/player.rb', line 24

def faction; end

#human?Boolean

Whether or not the player was a human or an AI/CPU player.

Returns:

  • (Boolean)


19
# File 'lib/vault_coh/player.rb', line 19

def human?; end

#messagesArray<Message>

A list of all messages sent by the player in the match. Sorted chronologically from first to last.

Returns:



58
# File 'lib/vault_coh/player.rb', line 58

def messages; end

#nameString

Name of the player at the time the replay was recorded. Note that the player may have changed their name since time of recording. If attempting to uniquely identify players across replay files, look at #steam_id and #profile_id instead. The string is UTF-16 encoded.

Returns:

  • (String)


14
# File 'lib/vault_coh/player.rb', line 14

def name; end

#profile_idInteger|NilClass

The Relic profile ID of the player, or nil if the player is AI. This ID can be used to uniquely identify a player between replays, and can be used to query statistical information about the player from Relic’s stats API.

Returns:

  • (Integer|NilClass)

    unsigned, 64 bits



52
# File 'lib/vault_coh/player.rb', line 52

def profile_id; end

#steam_idInteger|NilClass

The Steam ID of the player, or nil if the player is AI. This ID can be used to uniquely identify a player between replays, and connect them to their Steam profile.

Returns:

  • (Integer|NilClass)

    unsigned, 64 bits



44
# File 'lib/vault_coh/player.rb', line 44

def steam_id; end

#teamTeam

The team the player was assigned to. Currently only head-to-head matchups are supported (max two teams).

Returns:



30
# File 'lib/vault_coh/player.rb', line 30

def team; end

#to_hHash

Returns a hash representation of the object.

Returns:

  • (Hash)


86
# File 'lib/vault_coh/player.rb', line 86

def to_h; end