Class: Battle

HungryGames~ Battle


new Battle(message, attacker, victim)

Create a single battle.
Parameters:
Name Type Description
message string The message of this battle event.
attacker number The damage done to the attacker.
victim number The damage done to the victim.
Source:

Members


<private, static, constant> _fistBoth :string

The file path to read attacking both directions image.
Type:
  • string
Default Value:
  • ./img/fist_both.png
Source:

<private, static, constant> _fistLeft :string

The file path to read attacking left image.
Type:
  • string
Default Value:
  • ./img/fist_left.png
Source:

<private, static, constant> _fistRight :string

The file path to read attacking right image.
Type:
  • string
Default Value:
  • ./img/fist_right.png
Source:

attacker :Object

Information about attacker.
Type:
  • Object
Source:

message :string

Message of this battle event.
Type:
  • string
Source:

victim :Object

Information about victim.
Type:
  • Object
Source:

Methods


<static> finalize(affectedUsers, numVictim, numAttacker, mention, game, battles)

Make an event that contains a battle between players before the main event message.
Parameters:
Name Type Description
affectedUsers Array.<HungryGames~Player> All of the players involved in the event.
numVictim number The number of victims in this event.
numAttacker number The number of attackers in this event.
mention boolean Should every player be mentioned when their name comes up?
game HungryGames~GuildGame The GuildGame this battle is for. This is for settings checking and fetching non-affected users.
battles Array.<HungryGames~Battle> Array of all possible battle events to choose from.
Source:
Returns:
The event that was created.
Type
HungryGames~Event