new Anarchy.Warehouse()
Initializes a Warehouse 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
-
Anarchy.Building buildingEast
- Inherited From:
- Anarchy.Building#buildingEast
-
Anarchy.Building buildingNorth
- Inherited From:
- Anarchy.Building#buildingNorth
-
Anarchy.Building buildingSouth
- Inherited From:
- Anarchy.Building#buildingSouth
-
Anarchy.Building buildingWest
- Inherited From:
- Anarchy.Building#buildingWest
-
number exposure
-
How exposed the anarchists in this warehouse are to PoliceDepartments. Raises when bribed to ignite buildings, and drops each turn if not bribed.
-
number fire
- Inherited From:
- Anarchy.Building#fire
-
number fireAdded
-
The amount of fire added to buildings when bribed to ignite a building. Headquarters add more fire than normal Warehouses.
-
string gameObjectName
- Inherited From:
- Anarchy.GameObject#gameObjectName
-
number health
- Inherited From:
- Anarchy.Building#health
-
string id
- Inherited From:
- Anarchy.GameObject#id
-
boolean isHeadquarters
- Inherited From:
- Anarchy.Building#isHeadquarters
-
Array.<string> logs
- Inherited From:
- Anarchy.GameObject#logs
-
Anarchy.Player owner
- Inherited From:
- Anarchy.Building#owner
-
number x
- Inherited From:
- Anarchy.Building#x
-
number y
- Inherited From:
- Anarchy.Building#y
When true this building has already been bribed this turn and cannot be bribed again this turn.
The Building directly to the east of this building, or null if not present.
The Building directly to the north of this building, or null if not present.
The Building directly to the south of this building, or null if not present.
The Building directly to the west of this building, or null if not present.
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 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.
How much health this building currently has. When this reaches 0 the Building has been burned down.
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.
True if this is the Headquarters of the owning player, false otherwise. Burning this down wins the game for the other Player.
Any strings logged will be stored here. Intended for debugging.
The player that owns this building. If it burns down (health reaches 0) that player gets an additional bribe(s).
The location of the Building along the x-axis.
The location of the Building along the y-axis.
Methods
-
number ignite(building)
-
Bribes the Warehouse to light a Building on fire. This adds this building's fireAdded to their fire, and then this building's exposure is increased based on the Manhattan distance between the two buildings.
Name Type Description building
Anarchy.Building The Building you want to light on fire. Returns: number
The exposure added to this Building's exposure. -1 is returned if there was an error. -
log(message)
- Inherited From:
- Anarchy.GameObject#log
-
string toString()
- Inherited From:
- BaseGameObject#toString
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. |
toString override for easier debugging