Skip to content

documentation

ineveraskedforthis edited this page May 19, 2020 · 15 revisions

Classes

State

StateMachine

Savings

Stash

MarketOrder

Market

tag method description
async init(pool, world, cell_id, owner) ...
async update(pool)
async set_taxes(pool, tag, x)
async buy(pool, tag, buyer, amount, money, max_price = null)
async sell(pool, tag, seller, amount, price)
async new_order(pool, typ, tag, amount, price, agent)
async execute_buy_order(pool, order, amount, seller)
async execute_sell_order(pool, order, amount, buyer)
async clear_empty_sell_orders(pool, tag)
async clear_empty_buy_orders(pool, tag)
async clear_agent_orders(pool, agent, tag, save = true)
async clear_agent_sell_orders(pool, agent, tag)
async clear_agent_buy_orders(pool, agent, tag)
async get_money_on_hold(pool, agent)
async cancel_buy_order(pool, order_id)
async cancel_sell_order(pool, order_id)
check_cost(list_of_goods)
guess_cost(list_of_goods)
check_tag_cost(tag, amount)
guess_tag_cost(tag, amount)
get_total_cost_of_placed_goods_with_price_less_or_equal(tag, x)
get_average_tag_price(pool, tag)
find_amount_of_goods_for_buying(max_amount, money, goods)
get_most_profitable_building(pool)
get_orders_list()
async save_to_db(pool)
async load_to_db(pool)
get_json()

Cell

Map

World

Battle

attributes

attribute description
id id
range starting distance between enemies
world to get access to world methods
ids ids of participants
positions positions of participants
stash final reward for a winner
savings final money reward for a winner

methods

tag method description
async update(pool)
async action(pool, actor_index, action) make decided move
is_over() check if battle is over
async collect_loot(pool) collect loot from dead characters to distribute it later
reward() calculate total exp reward
async reward_team(pool, team, exp)
async load_to_db(pool)
async save_to_db(pool)
async delete_from_db(pool)
async transfer(pool, target, tag, x) stash manipulation

Agent

Consumer

Pop

Profession

ProfessionGraph

Enterprise

Character

stats

tag description
musculature increase attack damage, speed
breathing provide ability to engage in longer fights
coordination increase your ability to do acrobatic stuff, become better with various martial arts and weapons
vis vision
int intelligence - ability to learn more complex things
tac tactics - more tactic slots
mem memory - ability to learn new things
pow power - power of your magic
tou toughness - dealing with stress

tactic slot structure

{ trigger: { target: 'me' tag: 'hp', sign: '>', value: '0' }, action: { target: 'me', action: 'kill' } }

possible values

what what
target me, closest_enemy
tag hp, blood, rage
sign > >= < <= ==
value integer numbers
action attack

Equip

User

Home

About code

Abstract concepts

  • To be rewritten

Stories (russian)

Clone this wiki locally