Documentation ¶
Index ¶
- Constants
- type AbilityCaster
- type CustomAction
- type CustomCondition
- type CustomRotation
- type CustomRotationType
- type CustomSpell
- type GCDScheduler
- func (gs *GCDScheduler) DoNextAbility(sim *core.Simulation, character *core.Character) bool
- func (gs *GCDScheduler) Reset(sim *core.Simulation, character *core.Character)
- func (gs *GCDScheduler) Schedule(newAbility ScheduledAbility) time.Duration
- func (gs *GCDScheduler) ScheduleGroup(newAbilities []ScheduledAbility) time.Duration
- func (gs *GCDScheduler) ScheduleMCD(character *core.Character, mcdID core.ActionID)
- type ScheduledAbility
- type WaitAction
- func (action WaitAction) Cast(sim *core.Simulation) bool
- func (action WaitAction) GetActionID() core.ActionID
- func (action WaitAction) GetDuration() time.Duration
- func (action WaitAction) GetManaCost() float64
- func (action WaitAction) GetName() string
- func (action WaitAction) GetTag() int32
- func (action WaitAction) GetUnit() *core.Unit
- type WaitReason
Constants ¶
View Source
const Unresolved = time.Duration(-1)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AbilityCaster ¶
type AbilityCaster func(sim *core.Simulation) bool
Returns whether the cast was successful.
type CustomAction ¶ added in v0.1.1
Custom action based on a condition. Returns a bool and the CurCast cost.
type CustomCondition ¶ added in v0.1.1
type CustomCondition func(*core.Simulation) bool
Custom condition for an action.
type CustomRotation ¶
type CustomRotation struct {
// contains filtered or unexported fields
}
func NewCustomRotation ¶
func NewCustomRotation(crProto *proto.CustomRotation, character *core.Character, spellsMap map[int32]CustomSpell) *CustomRotation
func (*CustomRotation) Cast ¶
func (cr *CustomRotation) Cast(sim *core.Simulation) bool
func (*CustomRotation) ChooseSpell ¶
func (cr *CustomRotation) ChooseSpell(sim *core.Simulation) *CustomSpell
type CustomRotationType ¶ added in v0.1.6
type CustomRotationType byte
const ( Basic CustomRotationType = iota CPM )
type CustomSpell ¶
type CustomSpell struct { Spell *core.Spell // Might be nil if this is not a spell action. Action CustomAction Condition CustomCondition DesiredCPM float64 // contains filtered or unexported fields }
func (*CustomSpell) CPM ¶ added in v0.1.6
func (cs *CustomSpell) CPM(sim *core.Simulation) float64
type GCDScheduler ¶
type GCDScheduler struct {
// contains filtered or unexported fields
}
func (*GCDScheduler) DoNextAbility ¶
func (gs *GCDScheduler) DoNextAbility(sim *core.Simulation, character *core.Character) bool
Returns whether the cast was a success.
func (*GCDScheduler) Reset ¶
func (gs *GCDScheduler) Reset(sim *core.Simulation, character *core.Character)
func (*GCDScheduler) Schedule ¶
func (gs *GCDScheduler) Schedule(newAbility ScheduledAbility) time.Duration
Returns the actual time at which the ability will be cast.
func (*GCDScheduler) ScheduleGroup ¶
func (gs *GCDScheduler) ScheduleGroup(newAbilities []ScheduledAbility) time.Duration
Schedules a group of abilities that must be cast back-to-back. Most settings are taken from the first ability.
func (*GCDScheduler) ScheduleMCD ¶
func (gs *GCDScheduler) ScheduleMCD(character *core.Character, mcdID core.ActionID)
Takes ownership of a MCD, adding it to the schedule and removing it from the character's managed cooldowns.
type ScheduledAbility ¶
type ScheduledAbility struct { // When to cast this ability. Might not cast at this time if there are conflicts. DesiredCastAt time.Duration // Limits the search window for conflict resolution. MinCastAt time.Duration MaxCastAt time.Duration // Override the default conflict resolution behavior of searching after the // desired cast time first. Instead, search before the desired cast time first. PrioritizeEarlierForConflicts bool // How much GCD time will be used by this ability. Duration time.Duration // How to cast this ability. TryCast AbilityCaster // contains filtered or unexported fields }
type WaitAction ¶
type WaitAction struct {
// contains filtered or unexported fields
}
func NewWaitAction ¶
func NewWaitAction(sim *core.Simulation, unit *core.Unit, duration time.Duration, reason WaitReason) WaitAction
func (WaitAction) Cast ¶
func (action WaitAction) Cast(sim *core.Simulation) bool
func (WaitAction) GetActionID ¶
func (action WaitAction) GetActionID() core.ActionID
func (WaitAction) GetDuration ¶
func (action WaitAction) GetDuration() time.Duration
func (WaitAction) GetManaCost ¶
func (action WaitAction) GetManaCost() float64
func (WaitAction) GetName ¶
func (action WaitAction) GetName() string
func (WaitAction) GetTag ¶
func (action WaitAction) GetTag() int32
func (WaitAction) GetUnit ¶
func (action WaitAction) GetUnit() *core.Unit
type WaitReason ¶
type WaitReason byte
const ( WaitReasonNone WaitReason = iota // unknown why we waited WaitReasonOOM // no mana to cast WaitReasonRotation // waiting on rotation WaitReasonOptimal // waiting because its more optimal than casting. )
Click to show internal directories.
Click to hide internal directories.