Loading...
Searching...
No Matches
AdventureCore.EquipmentItem Class Reference

Detailed Description

prefab item that can modify attributes and stats while it is equipped
whether it is equippable can be restricted with attribute and stat requirements

https://adventure.softleitner.com/manual/item

Inheritance diagram for AdventureCore.EquipmentItem:
AdventureCore.PrefabItem AdventureCore.IAttributeModifier AdventureCore.IStatModifier AdventureCore.ItemBase

Public Member Functions

override bool CanEquip (CharacterBase character)
 
override void OnEquip (CharacterBase character)
 
override void OnUnequip (CharacterBase character)
 
int Modify (AttributeStat stat, int value)
 applies the modification
 
- Public Member Functions inherited from AdventureCore.ItemBase
virtual bool CanAdd (InventoryBase inventory, int quantity=1)
 
virtual bool OnAdd (InventoryBase inventory, int quantity, out InventoryItem inventoryItem)
 
virtual bool CanUse (CharacterBase character, int quantity=1)
 
virtual bool OnUse (CharacterBase character, int quantity=1)
 
void Add (CharacterBase character)
 
void Remove (CharacterBase character)
 
void Add (CharacterActionBase action)
 
void Remove (CharacterActionBase action)
 
override string ToString ()
 

Public Attributes

AttributeValue[] AttributeRequirements
 
AttributeValue[] StatRequirements
 
AttributeValue[] AttributeValues
 
AttributeStatValue[] StatValues
 
EffectType[] Effects
 
- Public Attributes inherited from AdventureCore.PrefabItem
Transform Prefab
 
- Public Attributes inherited from AdventureCore.ItemBase
string Key
 
string Name
 
string Description
 
Sprite Image
 
GameObject Visual
 
ItemCategory Category
 
ItemSlotCategory Slot
 

Properties

override bool IsEquippable [get]
 
- Properties inherited from AdventureCore.PrefabItem
override bool IsEquippable [get]
 
- Properties inherited from AdventureCore.ItemBase
virtual bool IsStackable [get]
 
virtual bool IsEquippable [get]
 
virtual bool IsUsable [get]
 
- Properties inherited from AdventureCore.IAttributeModifier
- Properties inherited from AdventureCore.IStatModifier

Member Function Documentation

◆ CanEquip()

override bool AdventureCore.EquipmentItem.CanEquip ( CharacterBase character)
inlinevirtual

Reimplemented from AdventureCore.ItemBase.

◆ Modify()

int AdventureCore.EquipmentItem.Modify ( AttributeStat stat,
int value )
inline

applies the modification

Parameters
attributethe stat that will be modified
valuethe value before modification
Returns
the modified value

Implements AdventureCore.IStatModifier.

◆ OnEquip()

override void AdventureCore.EquipmentItem.OnEquip ( CharacterBase character)
inlinevirtual

Reimplemented from AdventureCore.ItemBase.

◆ OnUnequip()

override void AdventureCore.EquipmentItem.OnUnequip ( CharacterBase character)
inlinevirtual

Reimplemented from AdventureCore.ItemBase.