> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/0x48lab/skills/llms.txt
> Use this file to discover all available pages before exploring further.

# Magic system overview

> How the 8-circle magic system works: mana, casting phases, skills, and spell categories.

The Skills plugin implements a full spellcasting system inspired by Ultima Online. Magic is organized into eight circles of increasing power. Casting any spell requires a spellbook, reagents, and mana — all governed by your **Magery** skill and the supporting INT stat.

## The eight circles

Spells are grouped into circles numbered 1st through 8th. Higher circles deal more damage, provide stronger effects, and take longer to cast. Each circle also sets the base mana cost for every spell it contains.

| Circle | Base mana | Casting time (Magery 0) | Casting time (Magery 100) |
| ------ | --------- | ----------------------- | ------------------------- |
| 1st    | 1         | 2.5 s                   | 1.75 s                    |
| 2nd    | 2         | 3.0 s                   | 2.1 s                     |
| 3rd    | 3         | 3.5 s                   | 2.45 s                    |
| 4th    | 4         | 4.0 s                   | 2.8 s                     |
| 5th    | 5         | 4.5 s                   | 3.15 s                    |
| 6th    | 6         | 5.0 s                   | 3.5 s                     |
| 7th    | 7         | 5.5 s                   | 3.85 s                    |
| 8th    | 8         | 6.0 s                   | 4.2 s                     |

## Two-phase casting

Every spell goes through two sequential phases after you run `/cast <spell>`.

<Steps>
  <Step title="Pre-flight checks">
    The game verifies you have a spellbook in main hand or off-hand, possess all required reagents, and have enough mana. Any missing item cancels the cast before it begins — no resources are consumed.
  </Step>

  <Step title="CASTING phase">
    A blue boss bar labelled `<Spell> Casting...` appears and drains over the cast time. Moving more than 0.5 blocks or taking damage interrupts casting and consumes mana but not reagents.
  </Step>

  <Step title="TARGETING phase">
    The boss bar turns red: `<Spell> Select Target!` You have **5 seconds** to left-click a target. Right-click or `/cast cancel` aborts with no resource cost. Hovering over an entity highlights it with a glow effect and the action bar shows the remaining time.
  </Step>

  <Step title="Resolution">
    The game rolls for cast success, consumes mana and reagents on both success and failure, and triggers the spell effect on a successful roll.
  </Step>
</Steps>

<Note>
  Self-targeting spells (Bless, Protection, Night Sight, Cure, Invisibility) skip the TARGETING phase and fire immediately after casting completes.
</Note>

### Cast time formula

```
cast_time = (2000 ms + circle × 500 ms) × (1 − magery_reduction)
magery_reduction = min(Magery / 100 × 0.3, 0.3)   // capped at 30%
```

At Magery 100 every spell is **30% faster** to cast. The 5-second targeting window is not affected by Magery.

### Cast success formula

```
base_success  = (Magery − circle × 10) + 50
int_bonus     = INT / 5
final_success = base_success + int_bonus   // clamped 5%–100%
```

**Example** — Magery 70, 5th-circle spell, INT 60:

* Base success = (70 − 50) + 50 = 70%
* INT bonus = 60 / 5 = 12%
* Final success = **82%**

Failing a cast consumes mana (and reagents if casting from the spellbook), but does not advance the spell effect.

## Mana system

Mana is tracked separately from hunger and displayed on the scoreboard sidebar. It is **never** connected to the vanilla hunger bar.

| Property     | Value                                                       |
| ------------ | ----------------------------------------------------------- |
| Maximum mana | 20                                                          |
| Actual cost  | `base_cost × (1 − INT / 200)` — INT 100 gives 50% reduction |

### Mana recovery

<AccordionGroup>
  <Accordion title="Natural regeneration">
    Every 5 seconds you recover `0.5 × (1 + INT / 100)` mana automatically.

    | INT | Recovery per 5 s |
    | --- | ---------------- |
    | 0   | 0.5              |
    | 50  | 0.75             |
    | 100 | 1.0              |
  </Accordion>

  <Accordion title="Meditation">
    While sneaking and standing still, you recover additional mana every 0.5 s:

    ```
    meditation_regen = 0.1 × (1 + Meditation / 100)
    ```

    Each tick also gives a Meditation skill-gain attempt. Stop moving or stop sneaking to exit meditation.
  </Accordion>

  <Accordion title="Golden apples">
    * **Golden Apple** — restores +5 mana in addition to its normal HP/absorption effects.
    * **Enchanted Golden Apple** — restores +10 mana.
  </Accordion>
</AccordionGroup>

## Magic skills

Four skills govern all aspects of spellcasting. Each contributes to the INT stat, which in turn reduces mana costs and boosts cast success.

| Skill                       | Effect                                                                              | Gains when                       |
| --------------------------- | ----------------------------------------------------------------------------------- | -------------------------------- |
| **Magery**                  | Cast success rate; shortens cast time by up to 30%                                  | Any cast attempt                 |
| **Evaluating Intelligence** | Magic damage +`(skill / 2)`%; lets you read a player's mana with `/evaluate`        | Dealing spell damage             |
| **Meditation**              | Additional mana regen while sneaking                                                | Mana recovered during meditation |
| **Resisting Spells**        | Incoming spell damage −`(skill × 0.7)`%; status-effect resistance +`(skill × 0.8)`% | Receiving spell damage           |

<Tip>
  Raising Magery, Evaluating Intelligence, Meditation, and Resisting Spells all increase INT, which further reduces mana costs and improves cast success — creating a compounding benefit for pure mage builds.
</Tip>

## Spell categories

Spells fall into four broad roles.

<Columns cols={2}>
  <Card title="Attack" icon="bolt" href="/magic/spells">
    Direct damage, area explosions, fire, lightning, and mind-affecting spells. Scale with Magery, Evaluating Intelligence, and the target's Resisting Spells.
  </Card>

  <Card title="Healing & buff" icon="heart" href="/magic/spells">
    Restore HP, remove status effects, and grant temporary combat bonuses. Duration scales with Magery.
  </Card>

  <Card title="Travel & utility" icon="map-pin" href="/magic/runes">
    Teleport, mark locations on runes, open bidirectional gates, and generate food. Require runes for long-range travel.
  </Card>

  <Card title="Reagents" icon="flask-round-potion" href="/magic/reagents">
    Each spell requires specific Minecraft items as catalysts. Consumed on every successful cast.
  </Card>
</Columns>

## Related pages

<Columns cols={3}>
  <Card title="Spellbook" icon="book-open" href="/magic/spellbook">
    How to obtain a spellbook and learn spells.
  </Card>

  <Card title="Spell reference" icon="list" href="/magic/spells">
    Full stats for every spell across all eight circles.
  </Card>

  <Card title="Reagents" icon="flask-round-potion" href="/magic/reagents">
    All reagent mappings and per-spell requirements.
  </Card>

  <Card title="Scrolls" icon="scroll" href="/magic/scrolls">
    Single-use spell items — no spellbook required.
  </Card>

  <Card title="Runes" icon="crystal-ball" href="/magic/runes">
    Mark locations and open gates with amethyst runes.
  </Card>
</Columns>
