Class: WeatherStation

Anarchy. WeatherStation

Can be bribed to change the next Forecast in some way.

new Anarchy.WeatherStation()

Initializes a WeatherStation with basic logic as provided by the Creer code generator. Never use this directly. It is for internal Joueur use.

Extends

Members

boolean bribed

Inherited From:
Anarchy.Building#bribed
When true this building has already been bribed this turn and cannot be bribed again this turn.

Anarchy.Building buildingEast

Inherited From:
Anarchy.Building#buildingEast
The Building directly to the east of this building, or null if not present.

Anarchy.Building buildingNorth

Inherited From:
Anarchy.Building#buildingNorth
The Building directly to the north of this building, or null if not present.

Anarchy.Building buildingSouth

Inherited From:
Anarchy.Building#buildingSouth
The Building directly to the south of this building, or null if not present.

Anarchy.Building buildingWest

Inherited From:
Anarchy.Building#buildingWest
The Building directly to the west of this building, or null if not present.

number fire

Inherited From:
Anarchy.Building#fire
How much fire is currently burning the building, and thus how much damage it will take at the end of its owner's turn. 0 means no fire.

string gameObjectName

Inherited From:
Anarchy.GameObject#gameObjectName
String representing the top level Class that this game object is an instance of. Used for reflection to create new instances on clients, but exposed for convenience should AIs want this data.

number health

Inherited From:
Anarchy.Building#health
How much health this building currently has. When this reaches 0 the Building has been burned down.

string id

Inherited From:
Anarchy.GameObject#id
A unique id for each instance of a GameObject or a sub class. Used for client and server communication. Should never change value after being set.

boolean isHeadquarters

Inherited From:
Anarchy.Building#isHeadquarters
True if this is the Headquarters of the owning player, false otherwise. Burning this down wins the game for the other Player.

Array.<string> logs

Inherited From:
Anarchy.GameObject#logs
Any strings logged will be stored here. Intended for debugging.
Inherited From:
Anarchy.Building#owner
The player that owns this building. If it burns down (health reaches 0) that player gets an additional bribe(s).

number x

Inherited From:
Anarchy.Building#x
The location of the Building along the x-axis.

number y

Inherited From:
Anarchy.Building#y
The location of the Building along the y-axis.

Methods

boolean intensify(negative)

Bribe the weathermen to intensity the next Forecast by 1 or -1.
Name Type Description
negative boolean optional By default the intensity will be increased by 1, setting this to true decreases the intensity by 1.
Returns: boolean
True if the intensity was changed, false otherwise.

log(message)

Inherited From:
Anarchy.GameObject#log
Adds a message to this GameObject's logs. Intended for your own debugging purposes, as strings stored here are saved in the gamelog.
Name Type Description
message string A string to add to this GameObject's log. Intended for debugging.

boolean rotate(counterclockwise)

Bribe the weathermen to change the direction of the next Forecast by rotating it clockwise or counterclockwise.
Name Type Description
counterclockwise boolean optional By default the direction will be rotated clockwise. If you set this to true we will rotate the forecast counterclockwise instead.
Returns: boolean
True if the rotation worked, false otherwise.

string toString()

Inherited From:
BaseGameObject#toString
toString override for easier debugging
Returns: string
readable string in the format `GameObjectName #id`