Character stats
Each wizard in the game has a set of core stats managed through the Character struct:float
default:"300.0f"
Current health points. When health reaches 0.0f, the character dies.
float
default:"300.0f"
Current mana points. Required for casting spells and healing.
Rectangle
default:"{ 0, 0, 20, 40 }"
Character collision box (20 pixels wide, 40 pixels tall).
Health system
Starting health
All characters begin with 300.0f health. This is displayed as a red bar above each character.Death mechanic
When health drops to or below 0.0f, the character enters death state:Mana system
Starting mana
All characters begin with 300.0f mana. This is displayed as a purple bar above each character.Mana regeneration
Mana regenerates slowly when camera zoom is above 5.0f:Mana regenerates at 0.01f per frame when zoomed in past 5.0f and below max mana.
Mana drain from zoom
Zooming out below 5.0f drains mana at a rate proportional to zoom level:Healing mechanic
Hold the right mouse button to convert mana into health:float
10.0f mana per frame
float
2.0f health per frame
float
12.0f (healing disabled below this threshold)
The healing conversion ratio is 5:1 (mana to health). At 60 FPS, you can heal 120 health per second while draining 600 mana per second.
Shields system
When health exceeds 300.0f through healing, shields activate:Shield mechanics
- Activation
- Decay
- Strategy
Shields activate automatically when health > 300.0fThe game displays “SHIELDS UP” message on screen
Collision detection
Player-tree collision
Players cannot move through trees. The game checks collision using rectangles:Player hitbox: 20x40 pixelsTree hitbox: 20x60 pixels
Spell-tree collision
Spells can collide with and destroy trees:float
4.0f - spells smaller than this bounce off trees without destroying them
float
5.0f - each tree collision reduces spell radius by this amount
Combat tips
- Resource management
- Positioning
- Spell usage
- Keep mana above 35.0f to have both spell options available
- Don’t overheal unless you need the shield buffer
- Avoid zooming out below 5.0f for extended periods