Class: Colony

mmm. Colony

new Colony()

Represents the colony state.
Source:

Members

ai :mmm.AI

AI function
Type:
Source:

buildings :Object.<string, mmm.Building>

Object dictionary of all buildings
Type:
Source:

countItems :number

Current count of items of a type
Type:
  • number
Source:

rate_common :number

Current rate of common ore production excluding clicks and including exchanges
Type:
  • number
Source:

rate_common_click :number

Current rate of common ore production including clicks and exchanges
Type:
  • number
Source:

rate_common_exchange :number

Current rate of common ore production of exchanges
Type:
  • number
Source:

rate_common_simple :number

Current rate of common ore production excluding clicks and exchanges
Type:
  • number
Source:

rate_common_user :number

Current rate of common ore production of clicks
Type:
  • number
Source:

rate_rare :number

Current rate of rare ore production excluding clicks and including exchanges
Type:
  • number
Source:

rate_rare_click :number

Current rate of rare ore production including clicks and exchanges
Type:
  • number
Source:

rate_rare_exchange :number

Current rate of rare ore production of exchanges
Type:
  • number
Source:

rate_rare_simple :number

Current rate of rare ore production excluding clicks and exchanges
Type:
  • number
Source:

rate_rare_user :number

Current rate of rare ore production of clicks
Type:
  • number
Source:

rate_recycle

Current rate of recycling
Source:

score :number

Current score total
Type:
  • number
Source:

score_buildings :number

Current score of buildings
Type:
  • number
Source:

score_common :number

Current score of common ore in storage
Type:
  • number
Source:

score_rare :number

Current score of rare ore in storage
Type:
  • number
Source:

score_seconds :number

Current score total over number of seconds
Type:
  • number
Source:

score_unit_upgrades :number

Current score of unit upgrades
Type:
  • number
Source:

score_units :number

Current score of units
Type:
  • number
Source:

score_upgrades :number

Current score of research upgrades
Type:
  • number
Source:

sequence_last_command

Source:
To Do:
  • Make sequence private

store_common :number

Current number of available common ore
Type:
  • number
Source:

store_rare :number

Current number of available rare ore
Type:
  • number
Source:

turns :number

Total turns (seconds) elapsed
Type:
  • number
Source:

unit_upgrades :Object.<string, mmm.UnitUpgrade>

Object dictionary of all unit upgrades
Type:
Source:

units :Object.<string, mmm.Unit>

Object dictionary of all units
Type:
Source:

unlocked_designations :Array.<String>

Current array of designation codes that have been unlocked
Type:
  • Array.<String>
Source:

unlocked_rare :boolean

Whether or not rare ore has been unlocked
Type:
  • boolean
Source:

upgrades :Object.<string, mmm.ResearchUpgrade>

Object dictionary of all research upgrades
Type:
Source:

Methods

build(id)

Spends a second building a unit or building
Parameters:
Name Type Description
id string ID of unit or building to build
Source:

click(count)

Spends a second clicking
Parameters:
Name Type Description
count number Number of seconds to spend clicking
Source:

click_human(count)

Performs a human click
Parameters:
Name Type Description
count number Number of clicks
Source:

none(count)

Spends a second doing nothing
Parameters:
Name Type Description
count number Number of seconds to spend doing nothing
Source:

recycle(id)

Spends a second recycling a unit or building
Parameters:
Name Type Description
id string ID of unit or building to recycle
Source:

upgrade(id)

Spends a second buying unit or research upgrades
Parameters:
Name Type Description
id string ID of unit upgrade or research to buy
Source:

use(count, click)

Uses all items over the elapsed seconds
Parameters:
Name Type Description
count number Number of seconds to calculate
click boolean Whether or not to include clicking for this second
Source: