deepCopy(v: ?, seen: ?) → void
helpers
| arg | type | description |
|---|
| v | ? | |
| seen | ? | |
pairKey(a: string, b: string) → string
| arg | type | description |
|---|
| a | string | |
| b | string | |
roman(n: number) → string
| arg | type | description |
|---|
| n | number | |
colorOf(item: ?) → void
Colour of an item for effects: item.color, then item.look.color, else a
stable hue from its id.
normItem(src: ?, setId: ?) → void
| arg | type | description |
|---|
| src | ? | |
| setId | ? | |
parseRule(rule: ?) → void
stat rules
mixStats(a: ?, b: ?, rules: ?, default: ?, round: ?) → void
| arg | type | description |
|---|
| a | ? | |
| b | ? | |
| rules | ? | |
| default | ? | |
| round | ? | |
mixTraits(a: ?, b: ?, mode: ?) → void
| arg | type | description |
|---|
| a | ? | |
| b | ? | |
| mode | ? | |
mixTags(a: ?, b: ?) → void
lookupPath(root: ?, path: ?) → void
"{a.name}", "{b.tags.race}", "{a.prefix}", "{base}" ...
| arg | type | description |
|---|
| root | ? | |
| path | ? | |
template(str: ?, env: ?) → void
| arg | type | description |
|---|
| str | ? | |
| env | ? | |
defaultName(a: ?, b: ?, auto: ?) → void
| arg | type | description |
|---|
| a | ? | |
| b | ? | |
| auto | ? | |
compileSet(setId: string, def: ?) → void
definition
| arg | type | description |
|---|
| setId | string | |
| def | ? | |
defineSet(setId: string, def: ?) → void
| arg | type | description |
|---|
| setId | string | |
| def | ? | |
getSet(setId: string) → void
| arg | type | description |
|---|
| setId | string | |
removeSet(setId: string) → void
| arg | type | description |
|---|
| setId | string | |
item(setId: string, id: string) → void
| arg | type | description |
|---|
| setId | string | |
| id | string | |
rawItem(s: ?, id: ?) → void
Raw (not copied) for internal use.
items(setId: string) → void
| arg | type | description |
|---|
| setId | string | |
recipes(setId: string) → void
| arg | type | description |
|---|
| setId | string | |
inList(list: ?, a: ?, b: ?) → void
conditions
| arg | type | description |
|---|
| list | ? | |
| a | ? | |
| b | ? | |
sharesTag(a: ?, b: ?, keys: ?) → void
| arg | type | description |
|---|
| a | ? | |
| b | ? | |
| keys | ? | |
costOf(s: ?, a: ?, b: ?, kind: ?, recipe: ?) → void
| arg | type | description |
|---|
| s | ? | |
| a | ? | |
| b | ? | |
| kind | ? | |
| recipe | ? | |
compute(s: ?, a: ?, b: ?, ctx: ?) → void
Computes the result for a and b (already resolved), or nil + reason.
| arg | type | description |
|---|
| s | ? | |
| a | ? | |
| b | ? | |
| ctx | ? | |
resolveId(s: ?, ref: ?) → void
| arg | type | description |
|---|
| s | ? | |
| ref | ? | |
resolveId(setId: ?, ref: ?) → void
| arg | type | description |
|---|
| setId | ? | |
| ref | ? | |
combine(setId: string, aRef: ?, bRef: ?, ctx: ?) → void
Main entry. Returns a fresh result table (and caches it as an item of the
set so the result can itself be combined), or nil + reason code.
| arg | type | description |
|---|
| setId | string | |
| aRef | ? | |
| bRef | ? | |
| ctx | ? | |
canCombine(setId: string, aRef: ?, bRef: ?, ctx: ?) → void
| arg | type | description |
|---|
| setId | string | |
| aRef | ? | |
| bRef | ? | |
| ctx | ? | |
reasonText(reason: ?) → string
| arg | type | description |
|---|
| reason | ? | |
allPairs(setId: string, opts: ?) → void
Every unordered pair of base items (and merges of equals) with its result.
| arg | type | description |
|---|
| setId | string | |
| opts | ? | |
partners(setId: string, aRef: ?, candidates: ?, ctx: ?) → void
partners: what can a combine with (for radial / highlight)
| arg | type | description |
|---|
| setId | string | |
| aRef | ? | |
| candidates | ? | |
| ctx | ? | |