Class GreedyBot

Namespace
SurvivorsMaker.Balance
Assembly
SurvivorsMaker.Balance.dll

Bot that avoids nearby threats and scores upgrades and purchases using configurable stat weights.

public sealed class GreedyBot : RandomBot, IRunBot
Inheritance
GreedyBot
Implements
Inherited Members

Constructors

GreedyBot(GreedyBotSettings, RandomBotSettings)

public GreedyBot(GreedyBotSettings settings = null, RandomBotSettings movement = null)

Parameters

settings GreedyBotSettings
movement RandomBotSettings

Fields

GreedySettings

public readonly GreedyBotSettings GreedySettings

Field Value

GreedyBotSettings

Properties

Name

Short name shown in reports, e.g. "random" or "greedy".

public override string Name { get; }

Property Value

string

Methods

ChooseLevelUp(RunState)

Index into Choices. Must be a choice the controller accepts.

public override int ChooseLevelUp(RunState run)

Parameters

run RunState

Returns

int

Move(SimWorld)

Movement for the next tick, length 0–1.

public override Vec2 Move(SimWorld world)

Parameters

world SimWorld

Returns

Vec2

Score(RunState, ItemDef)

Scores a prospective acquisition using the configured stat weights and current build context.

public float Score(RunState run, ItemDef item)

Parameters

run RunState
item ItemDef

Returns

float

Score(RunState, WeaponItemDef)

Scores a prospective acquisition using the configured stat weights and current build context.

public float Score(RunState run, WeaponItemDef weapon)

Parameters

run RunState
weapon WeaponItemDef

Returns

float

Shop(RunController)

Spend the shop phase through the controller (buy, reroll, lock, merge, recycle). Do not call NextWave.

public override void Shop(RunController controller)

Parameters

controller RunController