Spell Effects Reference

Complete reference for all available spell effects in the OpenRoads spell system.

📚 Table of Contents

🎯 Effect Overview

Effects define what your spell actually does when cast. Every spell must have at least one effect, but you can combine multiple effects for complex spells.

Basic Structure

Available Effect Types

  • "damage" - Deal damage to targets

  • "heal" - Restore health

  • "teleport" - Move players to different locations

  • "summon_creature" - Summon creatures

  • "stat_mod" - Modify player statistics

  • "custom" - Custom effects (advanced)

⚔️ Damage Effects

Deal damage to enemy targets.

Basic Damage

Properties

Property
Type
Required
Description

damage_min

number

Minimum damage dealt

damage_max

number

Maximum damage dealt

damage_type

string

⚠️

Damage type for flavor (fire, ice, lightning, etc.)

Damage Types

Common damage types (for flavor and future resistance systems):

  • "fire" - Fire damage

  • "ice" - Ice/cold damage

  • "lightning" - Electrical damage

  • "earth" - Earth/stone damage

  • "magic" - Pure magical damage

  • "dark" - Dark/shadow damage

  • "light" - Light/holy damage

  • "poison" - Poison damage

  • "physical" - Physical damage

Examples

Basic Fire Spell:

High-Level Lightning Spell:

Variable Damage Spell:

💚 Healing Effects

Restore health to the caster or other targets.

Basic Healing

Properties

Property
Type
Required
Description

heal_min

number

Minimum health restored

heal_max

number

Maximum health restored

Examples

Basic Heal Spell:

Powerful Healing Spell:

Consistent Healing:

🌀 Teleportation Effects

Move players to different locations.

Basic Teleportation

Teleport Modes

Element Room Teleport

Teleports to the player's elemental room:

Specific Room Teleport

Teleports to a specific room (usually from spell arguments):

Random Room Teleport

Teleports to a random room within a range:

Properties

Property
Type
Required
Description

element_room

boolean

⚠️

Teleport to player's element room

target_room

string

⚠️

Specific room ID (usually from args)

random_room

boolean

⚠️

Random teleportation

room_range

array

⚠️

[min, max] room range for random teleport

Examples

Recall Spell:

Teleport Spell:

Random Teleport:

👹 Summoning Effects

Summon creatures to assist the player.

Basic Summoning

Properties

Property
Type
Required
Description

creature

string

Name of creature to summon

duration

number

⚠️

Duration in seconds (-1 for permanent)

max_instances

number

⚠️

Maximum active instances

Examples

Wolf Companion:

Temporary Elemental:

Multiple Minions:

📊 Stat Modification Effects

Temporarily or permanently modify player statistics.

Basic Stat Modification

Available Stats

Stat
Description

str

Strength

dex

Dexterity

int

Intelligence

ego

Ego

spd

Speed

hp

Maximum Hit Points

sp

Maximum Spell Points

Properties

Property
Type
Required
Description

stat_mod

object

Map of stat changes

duration

number

⚠️

Duration in seconds (omit for permanent)

Examples

Strength Buff:

Balanced Enhancement:

Permanent Stat Gain:

🔧 Custom Effects

For advanced spell behaviors that can't be achieved with standard effects.

Basic Custom Effect

Properties

Property
Type
Required
Description

custom

object

Custom parameters for the effect

Note: Custom effects require implementation in the Go code. They're primarily used for unique spell behaviors that can't be achieved with standard effects.

🔗 Multiple Effects

Spells can have multiple effects that all trigger when the spell is cast.

Multiple Effect Example

This spell would:

  1. Deal 30-45 fire damage to the target

  2. Heal the caster for 10-15 HP

  3. Increase the caster's strength by 2 for 1 minute

🎯 Effect Combinations

Vampiric Spell (Damage + Heal)

Berserker Spell (Damage + Stat Mod)

Escape Spell (Damage + Teleport)

Summoner's Blessing (Summon + Stat Mod)

🚀 Advanced Examples

Progressive Damage Spell

Conditional Healing Spell

Area Effect Simulation

Transformation Spell

📋 Best Practices

Effect Design

  • Start Simple: Begin with single effects, add complexity gradually

  • Balance Power: More powerful effects should cost more SP or have longer cooldowns

  • Consider Combinations: Think about how effects work together

  • Test Thoroughly: Verify all effects work as intended

Performance

  • Limit Multiple Effects: Too many effects can impact performance

  • Reasonable Durations: Very long stat modifications can accumulate

  • Instance Limits: Always set max_instances for summoning spells

Game Balance

  • Damage Scaling: Higher level spells should have proportionally higher costs

  • Healing Limits: Prevent healing from trivializing combat

  • Stat Modifications: Temporary buffs should be meaningful but not overpowered

  • Teleportation: Consider escape potential and balance accordingly

🎓 Conclusion

The spell effects system provides powerful building blocks for creating diverse and interesting spells. By combining different effect types, you can create unique magical experiences that enhance gameplay.

Next Steps

  1. YAML Spell Tutorial - Learn to implement these effects

  2. JSON Spell Guide - Advanced custom effects

  3. Custom Spells Directoryarrow-up-right - See practical examples

  4. Experiment - Try combining effects in creative ways!

Remember: The best spells are balanced, fun to use, and add meaningful choices to gameplay. Happy spell crafting! ✨

Last updated

Was this helpful?