- type: entity
  id: BaseSpellbook
  name: spellbook
  parent: [ BaseItem, BaseMagicalContraband ]
  abstract: true
  components:
    - type: Sprite
      sprite: Objects/Misc/books.rsi
      layers:
      - state: paper_blood
      - state: cover_strong
        color: "#645a5a"
      - state: decor_wingette_flat
        color: "#4d0303"
      - state: icon_pentagramm
        color: "#f7e19f"
    - type: Spellbook
    - type: Tag
      tags:
      - Spellbook

# For the Wizard Antag
# Do not add discounts or price inflation
- type: entity
  id: WizardsGrimoire
  name: wizards grimoire
  suffix: Wizard
  parent: [ BaseItem, StorePresetSpellbook, BaseMagicalContraband ]
  components:
    - type: Sprite
      sprite: Objects/Misc/books.rsi
      layers:
      - state: paper_blood
      - state: cover_strong
        color: "#645a5a"
      - state: decor_wingette_flat
        color: "#4d0303"
      - state: icon_pentagramm
        color: "#f7e19f"
    - type: UserInterface
      interfaces:
        enum.StoreUiKey.Key:
          type: StoreBoundUserInterface
    - type: ActivatableUI
      key: enum.StoreUiKey.Key
    - type: Store
      refundAllowed: true
      ownerOnly: true # get your own tome!
      balance:
        WizCoin: 10 # prices are balanced around this 10 point maximum and how strong the spells are

# Not meant for wizard antag but meant for spawning, so people can't abuse refund if they were given a tome
- type: entity
  id: WizardsGrimoireNoRefund
  name: wizards grimoire
  suffix: Wizard, No Refund
  parent: [ WizardsGrimoire, StorePresetSpellbook ]
  components:
    - type: Store
      refundAllowed: false
      ownerOnly: true # get your own tome!
      balance:
        WizCoin: 10 # prices are balanced around this 10 point maximum and how strong the spells are

- type: entity
  id: SpawnSpellbook
  name: spawn spellbook
  parent: BaseSpellbook
  components:
    - type: Spellbook
      spellActions:
        ActionSpawnMagicarpSpell: null

- type: entity
  id: ForceWallSpellbook
  name: force wall spellbook
  parent: BaseSpellbook
  components:
    - type: Sprite
      sprite: Objects/Misc/books.rsi
      layers:
      - state: paper
      - state: cover_strong
        color: "#366ed6"
      - state: decor_vertical_middle
        color: "#95ffff"
      - state: decor_wingette_circle
        color: "#95ffff"
      - state: icon_magic_forcewall
        shader: unshaded
      - state: detail_rivets
        color: gold
    - type: Spellbook
      spellActions:
        ActionForceWall: null

- type: entity
  id: BlinkBook
  name: blink spellbook
  parent: BaseSpellbook
  components:
    - type: Sprite
      sprite: Objects/Misc/books.rsi
      layers:
      - state: paper
      - state: cover_old
        color: "#657e9c"
      - state: icon_text3
      - state: decor_wingette_circle
        color: gold
      - state: icon_magic
      - state: detail_rivets
        color: gold
    - type: Spellbook
      spellActions:
        ActionBlink: null

- type: entity
  id: SmiteBook
  name: smite spellbook
  parent: BaseSpellbook
  components:
    - type: Sprite
      sprite: Objects/Misc/books.rsi
      layers:
      - state: paper
      - state: cover_old
        color: "#c42b40"
      - state: decor_wingette_circle
        color: gold
      - state: icon_magic
      - state: detail_rivets
        color: gold
      - state: detail_bookmark
        color: red
      - state: overlay_blood
    - type: Spellbook
      spellActions:
        ActionSmiteNoReq: null

- type: entity
  id: KnockSpellbook
  name: knock spellbook
  parent: BaseSpellbook
  components:
    - type: Sprite
      sprite: Objects/Misc/books.rsi
      layers:
      - state: paper
      - state: cover_strong
        color: "#117045"
      - state: decor_wingette_circle
        color: gold
      - state: icon_magic_knock
      - state: detail_rivets
        color: gold
      - state: detail_bookmark
        color: "#98c495"
    - type: Spellbook
      spellActions:
        ActionKnock: null

- type: entity
  id: FireballSpellbook
  name: fireball spellbook
  parent: BaseSpellbook
  components:
    - type: Sprite
      sprite: Objects/Misc/books.rsi
      layers:
      - state: paper
      - state: cover_old
        color: "#ba5a14"
      - state: decor_wingette_circle
        color: gold
      - state: detail_rivets
        color: gold
      - state: detail_bookmark
        color: "#e89b3c"
      - state: overlay_blood
      - state: icon_magic_fireball
        shader: unshaded
    - type: Spellbook
      spellActions:
        ActionFireball: null

- type: entity
  id: ScrollRunes
  name: scroll of runes
  parent: BaseSpellbook
  components:
  - type: Item
    size: Normal
  - type: Sprite
    sprite: Objects/Magic/magicactions.rsi
    layers:
    - state: spell_default
  - type: Spellbook
    spellActions:
      ActionFlashRune: null
      ActionExplosionRune: null
      ActionIgniteRune: null
      ActionStunRune: null
