info

package
v0.0.0-...-dff1495 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertProtoElement

func ConvertProtoElement(e model.Element) attributes.Element

func ConvertProtoStat

func ConvertProtoStat(s model.StatType) attributes.Stat

func ConvertRarity

func ConvertRarity(q model.QualityType) int

Types

type ActionList

type ActionList struct {
	Targets          []EnemyProfile     `json:"targets"`
	InitialPlayerPos Coord              `json:"initial_player_pos"`
	Characters       []CharacterProfile `json:"characters"`
	InitialChar      keys.Char          `json:"initial_char"`
	EnergySettings   EnergySettings     `json:"energy_settings"`
	HurtSettings     HurtSettings       `json:"hurt_settings"`
	Settings         SimulatorSettings  `json:"settings"`
	Errors           []error            `json:"-"` // These represents errors preventing ActionList from being executed
	ErrorMsgs        []string           `json:"error_msgs"`
}

func (*ActionList) Copy

func (a *ActionList) Copy() *ActionList

func (*ActionList) PrettyPrint

func (a *ActionList) PrettyPrint() string

type BodyType

type BodyType int
const (
	BodyBoy BodyType = iota
	BodyGirl
	BodyMale
	BodyLady
	BodyLoli
)

func ConvertBodyType

func ConvertBodyType(b model.BodyType) BodyType

type CharacterBase

type CharacterBase struct {
	Key       keys.Char          `json:"key"`
	Rarity    int                `json:"rarity"`
	Element   attributes.Element `json:"element"`
	Level     int                `json:"level"`
	MaxLevel  int                `json:"max_level"`
	Ascension int                `json:"ascension"`
	HP        float64            `json:"hp"`
	Atk       float64            `json:"atk"`
	Def       float64            `json:"def"`
	Cons      int                `json:"cons"`
}

type CharacterProfile

type CharacterProfile struct {
	Base           CharacterBase               `json:"base"`
	Weapon         WeaponProfile               `json:"weapon"`
	Talents        TalentProfile               `json:"talents"`
	Stats          []float64                   `json:"stats"`
	StatsByLabel   map[string][]float64        `json:"stats_by_label"`
	RandomSubstats *RandomSubstats             `json:"random_substats"`
	Sets           Sets                        `json:"sets"`
	SetParams      map[keys.Set]map[string]int `json:"-"`
	Params         map[string]int              `json:"-"`
}

func (*CharacterProfile) Clone

type Coord

type Coord struct {
	X float64 `json:"x"`
	Y float64 `json:"y"`
	R float64 `json:"r"`
}

type Delays

type Delays struct {
	Skill  int `json:"skill"`
	Burst  int `json:"burst"`
	Attack int `json:"attack"`
	Charge int `json:"charge"`
	Aim    int `json:"aim"`
	Dash   int `json:"dash"`
	Jump   int `json:"jump"`
	Swap   int `json:"swap"`
}

type DrainInfo

type DrainInfo struct {
	ActorIndex int
	Abil       string
	Amount     float64
	External   bool
}

type EnemyProfile

type EnemyProfile struct {
	Level                 int                    `json:"level"`
	HP                    float64                `json:"hp"`
	Resist                attributes.ElementMap  `json:"resist"`
	Pos                   Coord                  `json:"-"`
	ParticleDropThreshold float64                `json:"particle_drop_threshold"` // drop particle every x dmg dealt
	ParticleDropCount     float64                `json:"particle_drop_count"`
	ParticleElement       attributes.Element     `json:"particle_element"`
	FreezeResist          float64                `json:"freeze_resist"`
	ParticleDrops         []*model.MonsterHPDrop `json:"-"`
	HpBase                float64                `json:"-"`
	HpGrowCurve           model.MonsterCurveType `json:"-"`
	Id                    int                    `json:"-"`
	MonsterName           string                 `json:"monster_name"`
	Modified              bool                   `json:"modified"`
}

func (*EnemyProfile) Clone

func (e *EnemyProfile) Clone() EnemyProfile

type EnergySettings

type EnergySettings struct {
	Active         bool `json:"active"`
	Once           bool `json:"once"` // how often
	Start          int  `json:"start"`
	End            int  `json:"end"`
	Amount         int  `json:"amount"`
	LastEnergyDrop int  `json:"last_energy_drop"`
}

type HealInfo

type HealInfo struct {
	Caller  int // index of healing character
	Target  int // index of char receiving the healing. use -1 to heal all characters
	Type    HealType
	Message string
	Src     float64 // depends on the type
	Bonus   float64
}

type HealType

type HealType int
const (
	HealTypeAbsolute HealType = iota // regular number
	HealTypePercent                  // percent of the target's max hp
)

type HurtSettings

type HurtSettings struct {
	Active   bool               `json:"active"`
	Once     bool               `json:"once"`
	Start    int                `json:"start"`
	End      int                `json:"end"`
	Min      float64            `json:"min"`
	Max      float64            `json:"max"`
	Element  attributes.Element `json:"element"`
	LastHurt int                `json:"last_hurt"`
}

type RandomSubstats

type RandomSubstats struct {
	Rarity  int `json:"rarity"`
	Sand    attributes.Stat
	Goblet  attributes.Stat
	Circlet attributes.Stat
}

func (RandomSubstats) Validate

func (r RandomSubstats) Validate() error

type Set

type Set interface {
	SetIndex(int)
	GetCount() int
	Init() error
}

type Sets

type Sets map[keys.Set]int

func (Sets) MarshalJSON

func (s Sets) MarshalJSON() ([]byte, error)

type SimulatorSettings

type SimulatorSettings struct {
	Duration          float64 `json:"-"`
	DamageMode        bool    `json:"damage_mode"`
	EnableHitlag      bool    `json:"enable_hitlag"`
	DefHalt           bool    `json:"def_halt"` // for hitlag
	IgnoreBurstEnergy bool    `json:"ignore_burst_energy"`
	// other stuff
	NumberOfWorkers int    `json:"-"`          // how many workers to run the simulation
	Iterations      int    `json:"iterations"` // how many iterations to run
	Delays          Delays `json:"delays"`
	// Specify which stats to collect. An empty/nil slice enables all
	CollectStats []string `json:"-"`
}

type TalentProfile

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

type Weapon

type Weapon interface {
	SetIndex(int)
	Init() error
	Data() *model.WeaponData
}

type WeaponClass

type WeaponClass int
const (
	WeaponClassSword WeaponClass = iota
	WeaponClassClaymore
	WeaponClassSpear
	WeaponClassBow
	WeaponClassCatalyst
	EndWeaponClass
)

func ConvertWeaponClass

func ConvertWeaponClass(w model.WeaponClass) WeaponClass

func (WeaponClass) MarshalJSON

func (w WeaponClass) MarshalJSON() ([]byte, error)

func (WeaponClass) String

func (w WeaponClass) String() string

func (*WeaponClass) UnmarshalJSON

func (w *WeaponClass) UnmarshalJSON(b []byte) error

type WeaponProfile

type WeaponProfile struct {
	Name     string         `json:"name"`
	Key      keys.Weapon    `json:"key"` // use this to match with weapon curve mapping
	Class    WeaponClass    `json:"-"`
	Refine   int            `json:"refine"`
	Level    int            `json:"level"`
	MaxLevel int            `json:"max_level"`
	Params   map[string]int `json:"-"`
}

type ZoneType

type ZoneType int
const (
	ZoneUnknown ZoneType = iota
	ZoneMondstadt
	ZoneLiyue
	ZoneInazuma
	ZoneSumeru
	ZoneFontaine
	ZoneNatlan
	ZoneSnezhnaya
)

func ConvertRegion

func ConvertRegion(z model.ZoneType) ZoneType

Jump to

Keyboard shortcuts

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