Documentation ¶
Overview ¶
Package for effects.
Index ¶
- func ModifiersData(mods ...Modifier) (data res.ModifiersData)
- type AddItemMod
- type AddSkillMod
- type AreaMod
- type AttributeMod
- type ChapterMod
- type Effect
- func (e *Effect) Data() res.EffectData
- func (e *Effect) Duration() int64
- func (e *Effect) ID() string
- func (e *Effect) Infinite() bool
- func (e *Effect) MeleeHit() bool
- func (e *Effect) Serial() string
- func (e *Effect) SetSerial(serial string)
- func (e *Effect) SetSource(id, serial string)
- func (e *Effect) SetTarget(t Target)
- func (e *Effect) SetTime(time int64)
- func (e *Effect) Source() (string, string)
- func (e *Effect) Time() int64
- func (e *Effect) Update(delta int64)
- type FlagMod
- type HealthMod
- type ManaMod
- type MemoryMod
- type Modifier
- type QuestMod
- type RemoveItemMod
- type Target
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ModifiersData ¶
func ModifiersData(mods ...Modifier) (data res.ModifiersData)
ModifiersData creates data resource for modifiers.
Types ¶
type AddItemMod ¶
type AddItemMod struct {
// contains filtered or unexported fields
}
Struct for add item modifier.
func NewAddItemMod ¶
func NewAddItemMod(data res.AddItemModData) *AddItemMod
NewAddItemMod creates new add item modifier.
func (*AddItemMod) Amount ¶
func (aim *AddItemMod) Amount() int
Amount returns number of items to add.
func (*AddItemMod) Data ¶
func (aim *AddItemMod) Data() res.AddItemModData
Data creates data resource for modifier.
func (*AddItemMod) ItemID ¶
func (aim *AddItemMod) ItemID() string
ItemID returns ID of the item to add.
type AddSkillMod ¶
type AddSkillMod struct {
// contains filtered or unexported fields
}
Struct for add skill modifier.
func NewAddSkillMod ¶
func NewAddSkillMod(data res.AddSkillModData) *AddSkillMod
NewAddSkillMod creates new add skill modifier.
func (*AddSkillMod) Data ¶
func (asm *AddSkillMod) Data() res.AddSkillModData
Data creates data resource for modifier.
func (*AddSkillMod) SkillID ¶
func (asm *AddSkillMod) SkillID() string
SkillID returns ID of skill to add.
type AreaMod ¶
type AreaMod struct {
// contains filtered or unexported fields
}
Interface for area modifier.
func NewAreaMod ¶
func NewAreaMod(data res.AreaModData) *AreaMod
NewAreaMod creates new area modifier.
func (*AreaMod) Data ¶
func (am *AreaMod) Data() res.AreaModData
Data creates data resource for modifier.
func (*AreaMod) EnterPosition ¶
EnterPosition returns position for object after area change.
type AttributeMod ¶
type AttributeMod struct {
// contains filtered or unexported fields
}
Struct for attribute modifier.
func NewAttributeMod ¶
func NewAttributeMod(data res.AttributeModData) *AttributeMod
NewAttributeMod creates new attribute modifier.
func (*AttributeMod) Constitution ¶
func (am *AttributeMod) Constitution() int
Constitution returns modifier value for constitution attribute.
func (*AttributeMod) Data ¶
func (am *AttributeMod) Data() res.AttributeModData
Data creates data resource for modifier.
func (*AttributeMod) Dexterity ¶
func (am *AttributeMod) Dexterity() int
Dexterity returns modifier value for dexterity attribute.
func (*AttributeMod) Intelligence ¶
func (am *AttributeMod) Intelligence() int
Intelligence returns modifier value for intelligence attribute.
func (*AttributeMod) Strength ¶
func (am *AttributeMod) Strength() int
Strength returns modifier value for strength attribute.
func (*AttributeMod) Wisdom ¶
func (am *AttributeMod) Wisdom() int
Wisdom returns modifer value for wisom attribute.
type ChapterMod ¶
type ChapterMod struct {
// contains filtered or unexported fields
}
Struct for chapter modifier.
func NewChapterMod ¶
func NewChapterMod(data res.ChapterModData) *ChapterMod
NewChapterMod creates new chapter modifier.
func (*ChapterMod) ChapterID ¶
func (cm *ChapterMod) ChapterID() string
ChapterID returns ID of chapter to change to.
func (*ChapterMod) Data ¶
func (cm *ChapterMod) Data() res.ChapterModData
Data returns data resource for chapter modifier.
type Effect ¶
type Effect struct {
// contains filtered or unexported fields
}
Struct for effects.
func (*Effect) SetSource ¶
SetSource sets targetable object with specified ID and serial value as effect source.
type FlagMod ¶
type FlagMod struct {
// contains filtered or unexported fields
}
Struct for flag modifier.
func NewFlagMod ¶
func NewFlagMod(data res.FlagModData) *FlagMod
NewFlagMod create new flag modifier.
func (*FlagMod) Data ¶
func (fm *FlagMod) Data() res.FlagModData
Data creates data resource for modifier.
type HealthMod ¶
type HealthMod struct {
// contains filtered or unexported fields
}
Struct for health modifier.
func NewHealthMod ¶
func NewHealthMod(data res.HealthModData) *HealthMod
NewHealthMod creates new health modifier.
func (*HealthMod) Data ¶
func (hm *HealthMod) Data() res.HealthModData
Data creates data resource for modifier.
func (*HealthMod) RandomValue ¶
RandomValue returns random number from Min - Max range of modifier.
type ManaMod ¶
type ManaMod struct {
// contains filtered or unexported fields
}
Struct for mana modifier.
func NewManaMod ¶
func NewManaMod(data res.ManaModData) *ManaMod
NewManaMod creates new mana modifier.
func (*ManaMod) Data ¶
func (mm *ManaMod) Data() res.ManaModData
Data returns data resource for modifier.
func (*ManaMod) RandomValue ¶
RandomValue returns random number from Min - Max range of modifier.
type MemoryMod ¶
type MemoryMod struct {
// contains filtered or unexported fields
}
Struct for memory modifier.
func NewMemoryMod ¶
func NewMemoryMod(data res.MemoryModData) *MemoryMod
NewMemoryModifer creates new memory modifer.
func (*MemoryMod) Data ¶
func (mm *MemoryMod) Data() res.MemoryModData
Data returns data resource for modifier.
type Modifier ¶
type Modifier interface{}
Interface for object modifiers.
func NewModifiers ¶
func NewModifiers(data res.ModifiersData) (mods []Modifier)
NewModifiers creatas modifiers for specified data.
type QuestMod ¶
type QuestMod struct {
// contains filtered or unexported fields
}
Struct for quest modifier.
func NewQuestMod ¶
func NewQuestMod(data res.QuestModData) *QuestMod
NewQuestMod creates new quest modifier.
func (*QuestMod) Data ¶
func (qm *QuestMod) Data() res.QuestModData
Data creates data resource for modifier.
type RemoveItemMod ¶
type RemoveItemMod AddItemMod
Type for remove item modifier.
func NewRemoveItemMod ¶
func NewRemoveItemMod(data res.RemoveItemModData) *RemoveItemMod
NewRemoveItemMod creates new remove item modifier.
func (*RemoveItemMod) Amount ¶
func (rim *RemoveItemMod) Amount() int
Amount returns number of items to remove.
func (*RemoveItemMod) Data ¶
func (rim *RemoveItemMod) Data() res.RemoveItemModData
Data creates data resource for modifier.
func (*RemoveItemMod) ItemID ¶
func (rim *RemoveItemMod) ItemID() string
ItemID returns ID of the item to remove.