simulation

package
v1.15.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 4, 2023 License: MIT Imports: 287 Imported by: 0

Documentation

Overview

Package simulation provide the functionality required to run one simulation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoMoreActions = errors.New("no more actions left")

Functions

func NewCore

func NewCore(seed int64, debug bool, cfg *ast.ActionList) (*core.Core, error)

func SetupCharactersInCore added in v1.0.0

func SetupCharactersInCore(core *core.Core, chars []profile.CharacterProfile, initial keys.Char) error

func SetupMisc added in v1.0.0

func SetupMisc(c *core.Core)

func SetupResonance added in v1.0.0

func SetupResonance(s *core.Core)

func SetupTargetsInCore added in v1.0.0

func SetupTargetsInCore(core *core.Core, p geometry.Point, r float64, targets []enemy.EnemyProfile) error

Types

type CharacterDetail added in v1.2.2

type CharacterDetail struct {
	Name          string         `json:"name"`
	Element       string         `json:"element"`
	Level         int            `json:"level"`
	MaxLevel      int            `json:"max_level"`
	Cons          int            `json:"cons"`
	Weapon        WeaponDetail   `json:"weapon"`
	Talents       TalentDetail   `json:"talents"`
	Sets          map[string]int `json:"sets"`
	Stats         []float64      `json:"stats"`
	SnapshotStats []float64      `json:"snapshot"`
}

type EnergyEvent added in v1.0.0

type EnergyEvent struct {
	Active         bool
	Once           bool //how often
	Start          int
	End            int
	Particles      int
	LastEnergyDrop int
}

type HurtEvent added in v1.0.0

type HurtEvent struct {
	Active bool
	Once   bool //how often
	Start  int  //
	End    int
	Min    float64
	Max    float64
	Ele    attributes.Element
}

type Simulation

type Simulation struct {
	C *core.Core
	// contains filtered or unexported fields
}

func New

func New(cfg *ast.ActionList, c *core.Core) (*Simulation, error)

func (*Simulation) AdvanceFrame

func (s *Simulation) AdvanceFrame() error

func (*Simulation) CharacterDetails added in v1.2.2

func (sim *Simulation) CharacterDetails() []CharacterDetail

func (*Simulation) Run

func (s *Simulation) Run() (stats.Result, error)

type TalentDetail

type TalentDetail struct {
	Attack int `json:"attack"`
	Skill  int `json:"skill"`
	Burst  int `json:"burst"`
}

type WeaponDetail

type WeaponDetail struct {
	Name     string `json:"name"`
	Refine   int    `json:"refine"`
	Level    int    `json:"level"`
	MaxLevel int    `json:"max_level"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL