Digital Dungeon Assets Docs
  • Welcome to the Magic Spell system docs
  • Getting Started
    • Welcome
    • Quick Start Migrating to existing Project
    • Quick Start Using Demo Character
    • Quick Start integration to ALS
  • Spell System
    • Components
    • Spell Component Overview
    • Stats Component Overview
    • Targeting Component
    • UI Component
    • Animation Notifiers
    • Damage Types
    • The Data Table
    • Function Library
    • Interfaces
    • Macro Library
    • Spells
    • UI
    • Multiplayer
  • VFX
    • Page 1
Powered by GitBook
On this page
  • Event Graph
  • Functions
  1. Spell System

Stats Component Overview

PreviousSpell Component OverviewNextTargeting Component

Last updated 8 months ago

Event Graph

It has two timers that react on two events Spell Cast Event: When a spell is cast it reduces the mana, based on the spell cost and starts a timer to slowly restore mana

On Take Any Damage Event: When the owner takes damage, it reduces the HP by the damage amount and starts a timer to slowly restore HP, It also fires an event that can be listened to when the player dies

Functions

Refresh Mana

Used by the timer, it restores mana over time by the gain rate defined in the settings

Refresh Health

Used by the timer, it restores hp over time by the gain rate defined in the settings

Add mana (Server)

This can be used from outside to add mana to the owner's pool, could be for example if the owner uses a mana potion then this event can be called from the potion logic

Add HP (Server)

This can be used from outside to add HP to the owner's pool, could be for example if the owner uses a Health potion then this event can be called from the potion logic

Remove mana (Server)

This can be used from outside to remove mana from the owner's pool, could be for example if the owner affected by a mana burn spell or trap, then this event can be called from the logic

Remove HP (Server)

This can be used from outside to remove HP from the owner's pool, could be for example if the owner affected by a damage tick event (burning) then this function can be called from that logic