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)


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

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.



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

def battlegroup_commands; end

#build_commandsArray<Commands::BuildSquad>

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. Sorted chronologically from first to last.

Returns:



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

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:



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

def commands; end

#factionFaction

The faction selected by the player in this match.

Returns:



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

def faction; end

#messagesArray<Message>

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

Returns:



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

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

The Relic profile ID of the player. 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)

    unsigned, 64 bits



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

def profile_id; end

#steam_idInteger

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

Returns:

  • (Integer)

    unsigned, 64 bits



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

def steam_id; end

#teamTeam

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

Returns:



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

def team; end

#to_hHash

Returns a hash representation of the object.

Returns:

  • (Hash)


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

def to_h; end