Appearance
sdk.lure
Pack-pull decision. Does not walk or attack. CaveBot and farm_planner consume the phase; Path / fight stay elsewhere.
lua
local M = require("sdk.lure")match
function · match(name: string, pattern: string): boolean
Case-insensitive name match against a glob ignore pattern.
Parameters
| Name | Type | Summary |
|---|---|---|
name | string | — |
pattern | string | — |
Returns
| Type | Summary |
|---|---|
boolean | — |
ignored
function · ignored(name: string, patterns?: string[]): boolean
True if any ignore glob matches the creature name.
Parameters
| Name | Type | Summary |
|---|---|---|
name | string | — |
patterns | string[] | — |
Returns
| Type | Summary |
|---|---|
boolean | — |
defaults
function · defaults(): LureOptions
Default pack-pull knobs. enabled is false so an empty plan does not lure.
Returns
| Type | Summary |
|---|---|
LureOptions | — |
normalize
function · normalize(opts?: LureOptions|table): LureOptions
Clamp planner camelCase/snake_case into defaults. stop is never below run.
Parameters
| Name | Type | Summary |
|---|---|---|
opts | LureOptions|table | — |
Returns
| Type | Summary |
|---|---|
LureOptions | — |
classify
function · classify(here: Position|nil, creatures: table[], opts?: LureOptions|table): table
Split nearby creatures into eligible / ignored / skipped / near. Does not walk.
Parameters
| Name | Type | Summary |
|---|---|---|
here | Position|nil | — |
creatures | table[] | — |
opts | LureOptions|table | — |
Returns
| Type | Summary |
|---|---|
table | — |
decide
function · decide(here, creatures, opts, prev)
Returns table: decision
Parameters
| Name | Type | Summary |
|---|---|---|
here | table|{x:number,y:number,z:number}|nil | — |
creatures | table[] | — |
opts | table|nil | — |
prev | table|nil | {phase, since} |
Returns
| Type | Summary |
|---|---|
table | decision |