Every spell is defined by a set of properties that control its behavior, requirements, and effects. This reference covers all available properties and their usage.
Properties that are omitted use these default values:
Property
Default Value
Notes
element_required
""
No element restriction
min_spell_level
0
No level requirement
min_phys_level
0
No physical level requirement
cast_time
0
Instant cast
cooldown
0
No cooldown
required_items
[]
No items required
messages
{}
Default messages used
restrictions
{}
No restrictions
📋 Examples by Category
Beginner Spell
Intermediate Spell
Advanced Spell
Utility Spell
Support Spell
🎓 Conclusion
Understanding spell configuration is essential for creating balanced, functional spells. Use this reference to ensure your spells have all required properties and follow best practices.
Practice - Create your own spells using this reference!
Remember: Well-configured spells enhance gameplay and provide clear feedback to players. Take time to craft good messages and appropriate restrictions! ✨
messages:
success: "Your spell succeeds!"
miss: "Your spell fails!"
failure_element: "Only fire mages can cast this."
failure_level: "You need spell level %d or higher. (Current: %d)"
failure_sp: "Not enough spell points. (Need: %d, Have: %d)"
failure_target: "You must specify a target."
failure_items: "You need %s to cast this spell."
failure_cooldown: "This spell is still on cooldown."
messages:
cast_start: "You begin casting..."
cast_complete: "Your spell is complete!"
cast_interrupt: "Your casting was interrupted!"
messages:
broadcast_cast: "%s begins casting a spell!"
broadcast_effect: "%s casts a powerful spell!"
restrictions:
combat_only: true # Can only cast during combat
non_combat_only: true # Cannot cast during combat
restrictions:
max_instances: 1 # Maximum active instances of this spell
restrictions:
required_rooms: # Can only cast in these rooms
- "1"
- "2"
- "3"
forbidden_rooms: # Cannot cast in these rooms
- "10"
- "11"
restrictions:
required_element: true # Must match player's element
name: "Fireball"
description: "Hurls a ball of fire"
element_required: "fire"
min_spell_level: 10
sp_cost: 15
cooldown: 3
target_type: "enemy"
effects:
- type: "damage"
damage_min: 20
damage_max: 35
damage_type: "fire"
messages:
success: "Your fireball engulfs %s in flames!"
failure_element: "Only fire mages can cast fireball."
name: "Meteor"
description: "Calls down a devastating meteor"
element_required: "fire"
min_spell_level: 25
sp_cost: 50
cast_time: 5
cooldown: 120
target_type: "enemy"
required_items:
- "meteor stone"
effects:
- type: "damage"
damage_min: 80
damage_max: 120
damage_type: "fire"
messages:
success: "A massive meteor crashes down upon %s!"
failure_items: "You need %s to call down a meteor."
cast_start: "You raise your hands to the sky..."
cast_complete: "The sky darkens as a meteor streaks down!"
restrictions:
max_instances: 1
name: "Recall"
description: "Return to your elemental sanctuary"
min_spell_level: 3
sp_cost: 20
cast_time: 5
cooldown: 30
target_type: "self"
effects:
- type: "teleport"
teleport:
element_room: true
messages:
cast_start: "You begin the recall incantation..."
success: "You recall to your elemental sanctuary!"
restrictions:
non_combat_only: true