Class: ArenaEvent

HungryGames~ ArenaEvent


new ArenaEvent(message, outcomes, outcomeProbs)

An Arena event storing Events.
Parameters:
Name Type Argument Description
message string The message at the start of the arena event.
outcomes Array.<HungryGames~NormalEvent> All possible events in this arena event.
outcomeProbs HungryGames~OutcomeProbabilities <nullable>
Overrides the global setting for arena event outcome probabilities for this event.
Source:

Extends

Members


creator :string

The id of the user that created this event. If not defined, then something is broken. Default global events use SpikeyRobot's ID.
Type:
  • string
Inherited From:
Overrides:
Source:

custom :boolean

If the event is created by the user.
Type:
  • boolean
Inherited From:
Overrides:
Default Value:
  • true
Source:

<constant> id :string

The full unique ID of this event. If not specified, this generates just the 32 bit short hash.
Type:
  • string
Inherited From:
Overrides:
Source:

message :string

The message to show.
Type:
  • string
Inherited From:
Overrides:
Source:

<nullable> outcomeProbs :HungryGames~OutcomeProbabilities

Outcome probabilities specific to this arena event. Overrides the global arena event outcome probability settings. Null to use global settings.
Type:
Source:

outcomes :Array.<HungryGames~NormalEvent>

All possible events in this arena event.
Type:
Source:

subMessage :string

Additional message text to send.
Type:
  • string
Inherited From:
Overrides:
Source:

type :string

The type of event this is ('normal', 'arena', 'weapon', or 'battle').
Type:
  • string
Inherited From:
Overrides:
Default Value:
  • normal
Source:

Methods


<static> from(obj)

Create a new ArenaEvent object from a ArenaEvent-like object. Similar to copy-constructor.
Parameters:
Name Type Description
obj object Event-like object to copy.
Source:
Returns:
Copy of event.
Type
HungryGames~ArenaEvent

<static> validate(evt)

Validate that the given data is properly typed and structured to be converted to a ArenaEvent. Also coerces values to correct types if possible.
Parameters:
Name Type Description
evt HungryGames~ArenaEvent The event data to verify.
Source:
Returns:
Error string, or null if no error.
Type
string

fill(obj)

Fill this instance with data from Event-like object.
Parameters:
Name Type Description
obj object Event-like object to copy.
Inherited From:
Overrides:
Source:
Returns:
Current instance with copied values.
Type
HungryGames~Event