Documentation
¶
Index ¶
- Variables
- type ActionResult
- type Actor
- func NewDropsFightingActor[C FightingCharacterAdapter](character *character.Character, code string, qty int, config *Config[C]) (Actor, error)
- func NewGatherActor[C GatheringCharacterAdapter](character *character.Character, goalCode string, goalQuantity int, ...) (Actor, error)
- func NewTaskFightingActor[C FightingCharacterAdapter](character *character.Character, exitOnRest bool, config *Config[C]) (Actor, error)
- type CharacterAdapter
- type Config
- type CraftingActor
- type CraftingCharacterAdapter
- type DropsFightingActor
- type FightResult
- type FightSimulator
- type FightingCharacterAdapter
- type GatherActor
- type GatheringCharacterAdapter
- type ItemAdapter
- type MapAdapter
- type MonsterAdapter
- type TaskFightingActor
Constants ¶
This section is empty.
Variables ¶
View Source
var ExitOnRest error = errors.New("Exit on rest")
View Source
var GatherSkills = [4]string{"mining", "woodcutting", "fishing", "alchemy"}
Functions ¶
This section is empty.
Types ¶
type ActionResult ¶
type CharacterAdapter ¶
type Config ¶
type Config[C CharacterAdapter] struct { // contains filtered or unexported fields }
func NewConfig ¶
func NewConfig[C CharacterAdapter](ca C, fs FightSimulator, ia ItemAdapter, ma MapAdapter, moa MonsterAdapter, logger *slog.Logger) *Config[C]
type CraftingActor ¶
type CraftingActor[C CraftingCharacterAdapter] struct { GoalItem *artifactsmmo.ItemSchema GoalQuantity int // contains filtered or unexported fields }
func NewCraftingActor ¶
func NewCraftingActor[C CraftingCharacterAdapter]( goalCode string, goalQuantity int, config *Config[C], ) (*CraftingActor[C], error)
type CraftingCharacterAdapter ¶
type CraftingCharacterAdapter interface {
CharacterAdapter
GatheringCharacterAdapter
Craft(character *character.Character, itemCode string, quantity int) (*ActionResult, error)
}
type DropsFightingActor ¶
type DropsFightingActor struct {
// contains filtered or unexported fields
}
type FightResult ¶
type FightSimulator ¶
type FightSimulator interface {
CalculateFightResult(character *character.Character, monster *artifactsmmo.MonsterSchema) (*FightResult, error)
}
type FightingCharacterAdapter ¶
type FightingCharacterAdapter interface {
CharacterAdapter
Fight(character *character.Character) (*ActionResult, error)
Rest(character *character.Character) (*ActionResult, error)
Use(character *character.Character, item *artifactsmmo.SimpleItemSchema) (*ActionResult, error)
}
type GatherActor ¶
type GatherActor struct {
GoalItem *artifactsmmo.ItemSchema
GoalQuantity int
// contains filtered or unexported fields
}
type GatheringCharacterAdapter ¶
type GatheringCharacterAdapter interface {
CharacterAdapter
FightingCharacterAdapter
Gather(character *character.Character) (*ActionResult, error)
}
type ItemAdapter ¶
type ItemAdapter interface {
GetItem(name string) (*artifactsmmo.ItemSchema, error)
GetAllResources(skill *artifactsmmo.GatheringSkill, code *string) ([]artifactsmmo.ResourceSchema, error)
GetCharacterEquipment(character *character.Character) *[]character.Equipment
IsGatherable(item *artifactsmmo.ItemSchema) bool
IsCraftable(item *artifactsmmo.ItemSchema) bool
}
type MapAdapter ¶
type MonsterAdapter ¶
type MonsterAdapter interface {
GetAllMonsters(
minLevel *int,
maxLevel *int,
drop *string,
page *int,
size *int,
) (*[]artifactsmmo.MonsterSchema, error)
GetMonster(code string) (*artifactsmmo.MonsterSchema, error)
}
type TaskFightingActor ¶
type TaskFightingActor struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.