Update Spells authored by Taiyou06's avatar Taiyou06
Spells are just special [Mythic metaskills](/../../../MythicMobs/-/wikis/Skills/Metaskills) that are castable by players. Spells are just special [Mythic metaskills](/../../../MythicMobs/-/wikis/Skills/Metaskills) that are castable by players.
Making a skill into a spell unlocks new options you can use to control how the spell is cast. Making a skill into a spell unlocks new options you can use to control how the spell is cast.
[[_TOC_]] [[_TOC_]]
# Making a Spell # Making a Spell
Turning a regular skill into a spell is simple and can be done with any existing Mythic metaskill - it just requires adding the option `Spell: true` to the metaskill. It will then be registered as a spell after the next reload and all of the extra casting options will be unlocked. Turning a regular skill into a spell is simple and can be done with any existing Mythic metaskill - it just requires adding the option `Spell: true` to the metaskill. It will then be registered as a spell after the next reload and all of the extra casting options will be unlocked.
## Spell Options ## Spell Options
Spells are just Mythic Skills with extra options. All regular Mythic metaskill options are also applicable! Spells are just Mythic Skills with extra options. All regular Mythic metaskill options are also applicable!
### Functional Options ### Functional Options
| Option | Description | | Option | Description |
|------------------------------|-------------------------------------------------------------------------| |------------------------------|-------------------------------------------------------------------------|
| Spell: true | Turns the skill into a spell and allows players to learn it if set to true | | Spell: true | Turns the skill into a spell and allows players to learn it if set to true |
| LearnConditions: [conditions]| A list of conditions that must be met to learn the spell. | | LearnConditions: [conditions]| A list of conditions that must be met to learn the spell. |
| Trigger: [trigger] | What triggers the spell. Defaults to `~onCombat` | | Trigger: [trigger] | What triggers the spell. Defaults to `~onCombat` |
| Targeter: [targeter] | The main targeter for the spell. If this is set the spell will fail to cast and not consume resources if a valid target isn't found. Defaults to `@self`. <br> *Remember to put the targeter between string delimiters such as `"` or `'` so that the yaml file can parse correctly* | | Targeter: [targeter] | The main targeter for the spell. If this is set the spell will fail to cast and not consume resources if a valid target isn't found. Defaults to `@self`. <br> *Remember to put the targeter between string delimiters such as `"` or `'` so that the yaml file can parse correctly* |
| Cost: [reagents] | A list of reagents this spell costs to cast. | | Cost: [reagents] | A list of [reagents](Spells/Reagents) this spell costs to cast. |
| Global: true | Makes it a [global spell], causing it to be automatically applied to all players | | Global: true | Makes it a [global spell], causing it to be automatically applied to all players |
| Upgrades: [integer] | The maximum level the spell can reach. Defaults to `1` | | Upgrades: [integer] | The maximum level the spell can reach. Defaults to `1` |
| Bindable: [true/false] | Whether the slot from which this spell can be cast can be binded. Defaults to `false`<br><br>Once binded, the `~onUse` trigger is needed to cast the skill | | Bindable: [true/false] | Whether the slot from which this spell can be cast can be bound. Defaults to `false`<br><br>Once bound, the `~onUse` trigger is needed to cast the skill |
| Binding: [1-9] | Forces the spell into a specific hotbar slot when bound (slots are 1-indexed) |
| ClickCombo: [combo] | A click combo string that triggers this spell (e.g. `LRR`). See [Casting](Spells/Casting) |
### Aesthetic Options | ClickCombos: [list] | A list of click combo strings, any of which can trigger this spell |
| Option | Description | | ChildSpells: [list] | A list of other spell ids that are auto-learned alongside this one. They share this spell's level |
|------------------------------|-------------------------------------------------------------------------| | Modifiers | Per-level scaling values used in the spell's description and skill mechanics. See [Modifiers](#modifiers) |
| Display: [name] | The display name of the spell | | Stats | Stat modifiers granted to the player as long as they know the spell. See [Stats](#stats) |
| Description: [list] | A description of what the spell does for GUIs and info commands |
| Icon.Material: [material] | | ### Aesthetic Options
| Icon.Model: [material] | | | Option | Description |
| Icon.Generation | [Crucible's Generation Option](/../../../mythiccrucible/-/wikis/ResourcePack-Generator#item-configurations) | |------------------------------|-------------------------------------------------------------------------|
| KillMessage: [list] | | | Display: [name] | The display name of the spell |
| DisplayOrder: [integer] | Sort order in menus. Lower values appear first. Defaults to `0` |
# Examples | Description: [list] | A description of what the spell does for GUIs and info commands |
| Icon.Material: [material] | |
```yaml | Icon.Model: [material] | |
MAGIC_MISSILE: | Icon.Generation | [Crucible's Generation Option](/../../../mythiccrucible/-/wikis/ResourcePack-Generator#item-configurations) |
Cooldown: 2 | KillMessages: [list] | Random kill-message lines used when this spell finishes off a target |
Display: 'Magic Missile'
Description: ## Modifiers
- 'Shoots a magic missile'
Icon: Modifiers are per-level numeric values that you can reference inside `Description:` lines and inside the spell's mechanics via `<spell.modifier.<key>>` placeholders. They come in two forms:
Material: NETHER_STAR
Model: 20 **Block form** (with per-level scaling):
Learnable: true ```yaml
LearnConditions: Modifiers:
- archetype{group=class;type=wizard} DAMAGE:
Targeter: "@target" Base: 5
Trigger: ~onUse PerLevel: 2
Cost: Min: 0
- mana 40 Max: 50
TargetConditions: ```
- distance{d=<20} true
Skills: **Line form** (formula expressions):
- missile{} ```yaml
``` Modifiers:
- DAMAGE 5+(level*2)
```
<!-- LINKS -->
[global spell]: /Spells/Learning#globally-available-spells | Option | Description | Default |
\ No newline at end of file |----------|------------------------------------------------------------------------------|------------------|
| Base | Value at level 1 | 1 |
| PerLevel | Amount added per additional level (`Base + (level - 1) * PerLevel`) | 0 |
| Min | Lower clamp | unbounded |
| Max | Upper clamp | unbounded |
`{KEY}` placeholders in the `Description:` are substituted with the modifier's value at the player's current spell level.
## Stats
Stats let a spell directly grant the player stat bonuses for as long as they know the spell — no need for an aura. Each entry under `Stats:` is keyed by a stat name and configures how it scales with spell level.
```yaml
passive_health:
Spell: true
Bindable: false
Trigger: ~onJoin
Display: 'Bonus Health'
Description:
- '&b&lPassive &f- Grants {HEALTH} maximum health per spell level'
Stats:
HEALTH:
Base: 1
PerLevel: 1
Max: 3
```
| Option | Description | Default |
|-----------|----------------------------------------------------------------------------------------------------------------------------------------------------|-----------------|
| Base | Value granted at level 1 | 0 |
| PerLevel | Amount added per additional spell level (`Base + (level - 1) * PerLevel`) | 0 |
| Min | Lower clamp | unbounded |
| Max | Upper clamp | unbounded |
| Operation | Modifier operation: `Additive`, `Multiply`, `Compound`, or `Set` | `Additive` |
The stat name (`HEALTH` in the example) can also be used inside `Description:` as a placeholder — `{HEALTH}` is replaced with the current value at the player's spell level.
Stats are applied automatically when the spell is learned and removed when it's forgotten.
# Examples
```yaml
MAGIC_MISSILE:
Cooldown: 2
Display: 'Magic Missile'
Description:
- 'Shoots a magic missile dealing {DAMAGE} damage'
Icon:
Material: NETHER_STAR
Model: 20
Spell: true
LearnConditions:
- archetype{group=class;type=wizard}
Targeter: "@target"
Trigger: ~onUse
Upgrades: 5
Modifiers:
DAMAGE:
Base: 5
PerLevel: 2
Cost:
- mana 40
TargetConditions:
- distance{d=<20} true
Skills:
- damage{a=<spell.modifier.DAMAGE>} @target
```
<!-- LINKS -->
[global spell]: /Spells/Learning#globally-available-spells