Class: Weaver

Spiders. Weaver

A Spiderling that can alter existing Webs by weaving to add or remove silk from the Webs, thus altering its strength.

new Spiders.Weaver()

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

Extends

Members

string busy

Inherited From:
Spiders.Spiderling#busy
When empty string this Spiderling is not busy, and can act. Otherwise a string representing what it is busy with, e.g. 'Moving', 'Attacking'.

string gameObjectName

Inherited From:
Spiders.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.

string id

Inherited From:
Spiders.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 isDead

Inherited From:
Spiders.Spider#isDead
If this Spider is dead and has been removed from the game.

Array.<string> logs

Inherited From:
Spiders.GameObject#logs
Any strings logged will be stored here. Intended for debugging.

Spiders.Web movingOnWeb

Inherited From:
Spiders.Spiderling#movingOnWeb
The Web this Spiderling is using to move. Null if it is not moving.

Spiders.Nest movingToNest

Inherited From:
Spiders.Spiderling#movingToNest
The Nest this Spiderling is moving to. Null if it is not moving.
Inherited From:
Spiders.Spider#nest
The Nest that this Spider is currently on. Null when moving on a Web.

number numberOfCoworkers

Inherited From:
Spiders.Spiderling#numberOfCoworkers
The number of Spiderlings busy with the same work this Spiderling is doing, speeding up the task.
Inherited From:
Spiders.Spider#owner
The Player that owns this Spider, and can command it.

Spiders.Web strengtheningWeb

The Web that this Weaver is strengthening. Null if not strengthening.

Spiders.Web weakeningWeb

The Web that this Weaver is weakening. Null if not weakening.

number workRemaining

Inherited From:
Spiders.Spiderling#workRemaining
How much work needs to be done for this Spiderling to finish being busy. See docs for the Work formula.

Methods

boolean attack(spiderling)

Inherited From:
Spiders.Spiderling#attack
Attacks another Spiderling.
Name Type Description
spiderling Spiders.Spiderling The Spiderling to attack.
Returns: boolean
True if the attack was successful, false otherwise.

log(message)

Inherited From:
Spiders.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 move(web)

Inherited From:
Spiders.Spiderling#move
Starts moving the Spiderling across a Web to another Nest.
Name Type Description
web Spiders.Web The Web you want to move across to the other Nest.
Returns: boolean
True if the move was successful, false otherwise.

boolean strengthen(web)

Weaves more silk into an existing Web to strengthen it.
Name Type Description
web Spiders.Web The web you want to strengthen. Must be connected to the Nest this Weaver is currently on.
Returns: boolean
True if the strengthen was successfully started, false otherwise.

string toString()

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

boolean weaken(web)

Weaves more silk into an existing Web to strengthen it.
Name Type Description
web Spiders.Web The web you want to weaken. Must be connected to the Nest this Weaver is currently on.
Returns: boolean
True if the weaken was successfully started, false otherwise.