itemhelpers

package
v1.0.12 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2026 License: MIT Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddWeaponProcAura

func AddWeaponProcAura(character *core.Character, config WeaponProcAura)

Adds a "Chance on hit" weapon proc for a custom aura to an existing item effect.

func CreateWeaponCoHProcDamage

func CreateWeaponCoHProcDamage(config WeaponProcDamage)

Registers a "Chance on hit" weapon damage proc.

func CreateWeaponEquipProcDamage

func CreateWeaponEquipProcDamage(config WeaponProcDamage)

Registers an "Equip" weapon damage proc.

func CreateWeaponProcAura

func CreateWeaponProcAura(config WeaponProcAura)

Registers a "Chance on hit" weapon proc that activates a custom aura on the wearer.

func CreateWeaponProcDamage

func CreateWeaponProcDamage(config WeaponProcDamage)

Registers a weapon proc that deals flat damage.

func CreateWeaponProcSpell

func CreateWeaponProcSpell(config WeaponProcSpell)

Registers a "Chance on hit" weapon proc that casts a custom spell on the target that was hit.

func CreateWeaponProcTrigger

func CreateWeaponProcTrigger(config WeaponProcTrigger)

Registers a weapon proc whose handler runs on every landed hit that passes the weapon's PPM roll. The other helpers build on this one.

Types

type WeaponProcAura

type WeaponProcAura struct {
	ItemID int32
	Name   string
	PPM    float64

	// Runs once per character and returns the aura the proc activates on the wearer. A stacking
	// aura is filled to its maximum on every proc.
	Aura func(character *core.Character) *core.Aura
}

type WeaponProcDamage

type WeaponProcDamage struct {
	ItemID int32
	Name   string
	PPM    float64

	SpellID int32
	School  core.SpellSchool
	// From SpellCategories. Picks the hit table and crit multiplier.
	DefenseType      core.DefenseType
	MinDmg           float64
	MaxDmg           float64
	BonusCoefficient float64

	// See WeaponProcTrigger. CreateWeaponCoHProcDamage and CreateWeaponEquipProcDamage set it.
	EquipProc bool
}

type WeaponProcSpell

type WeaponProcSpell struct {
	ItemID int32
	Name   string
	PPM    float64

	// Runs once per character and returns the spell to cast at the hit target, or nil to opt
	// the character out (e.g. a resource proc on a class without that resource).
	Spell func(character *core.Character) *core.Spell
}

type WeaponProcTrigger

type WeaponProcTrigger struct {
	ItemID int32
	Name   string
	PPM    float64

	// Set for an "Equip" proc, which is an aura the game matches by proc flags and which never
	// hears proc hits. Left unset it means a "Chance on hit" proc: a weapon proc that rolls on
	// every hit of its weapon except those suppressing weapon procs.
	EquipProc          bool
	TriggerImmediately bool

	// Runs once per character and returns the proc handler, or nil to opt the character out.
	Handler func(character *core.Character) core.ProcHandler
}

Jump to

Keyboard shortcuts

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