shield

package
v0.5.18 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ShieldCtrl

type ShieldCtrl struct {
	// contains filtered or unexported fields
}

func NewCtrl

func NewCtrl(c *core.Core) *ShieldCtrl

func (*ShieldCtrl) Add

func (s *ShieldCtrl) Add(shd core.Shield)

func (*ShieldCtrl) AddBonus

func (s *ShieldCtrl) AddBonus(f func() float64)

func (*ShieldCtrl) Count

func (s *ShieldCtrl) Count() int

func (*ShieldCtrl) Get

func (s *ShieldCtrl) Get(t core.ShieldType) core.Shield

func (*ShieldCtrl) IsShielded

func (s *ShieldCtrl) IsShielded(char int) bool

func (*ShieldCtrl) OnDamage

func (s *ShieldCtrl) OnDamage(dmg float64, ele core.EleType) float64

func (*ShieldCtrl) Tick

func (s *ShieldCtrl) Tick()

type Tmpl

type Tmpl struct {
	Name       string
	Src        int
	ShieldType core.ShieldType
	Ele        core.EleType
	HP         float64
	Expires    int
}

func (*Tmpl) CurrentHP

func (t *Tmpl) CurrentHP() float64

func (*Tmpl) Desc

func (t *Tmpl) Desc() string

func (*Tmpl) Element

func (t *Tmpl) Element() core.EleType

func (*Tmpl) Expiry

func (t *Tmpl) Expiry() int

func (*Tmpl) Key

func (t *Tmpl) Key() int

func (*Tmpl) OnDamage

func (t *Tmpl) OnDamage(dmg float64, ele core.EleType, bonus float64) (float64, bool)

func (*Tmpl) OnExpire

func (t *Tmpl) OnExpire()

func (*Tmpl) OnOverwrite

func (t *Tmpl) OnOverwrite()

func (*Tmpl) Type

func (t *Tmpl) Type() core.ShieldType

Jump to

Keyboard shortcuts

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