@rpg-engine/long-bow 0.3.33 → 0.3.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/dist/components/Spellbook/QuickSpells.d.ts +9 -0
  2. package/dist/components/Spellbook/Spell.d.ts +11 -0
  3. package/dist/components/Spellbook/Spellbook.d.ts +15 -0
  4. package/dist/components/Spellbook/SpellbookShortcuts.d.ts +10 -0
  5. package/dist/components/Spellbook/constants.d.ts +3 -0
  6. package/dist/components/Spellbook/mockSpells.d.ts +2 -0
  7. package/dist/index.d.ts +2 -0
  8. package/dist/long-bow.cjs.development.js +243 -7
  9. package/dist/long-bow.cjs.development.js.map +1 -1
  10. package/dist/long-bow.cjs.production.min.js +1 -1
  11. package/dist/long-bow.cjs.production.min.js.map +1 -1
  12. package/dist/long-bow.esm.js +243 -9
  13. package/dist/long-bow.esm.js.map +1 -1
  14. package/dist/stories/QuickSpells.stories.d.ts +5 -0
  15. package/dist/stories/Spellbook.stories.d.ts +5 -0
  16. package/package.json +2 -2
  17. package/src/components/Chat/Chat.tsx +1 -0
  18. package/src/components/CraftBook/CraftBook.tsx +1 -2
  19. package/src/components/Spellbook/QuickSpells.tsx +116 -0
  20. package/src/components/Spellbook/Spell.tsx +201 -0
  21. package/src/components/Spellbook/Spellbook.tsx +144 -0
  22. package/src/components/Spellbook/SpellbookShortcuts.tsx +77 -0
  23. package/src/components/Spellbook/constants.ts +12 -0
  24. package/src/components/Spellbook/mockSpells.ts +60 -0
  25. package/src/index.tsx +2 -0
  26. package/src/stories/QuickSpells.stories.tsx +38 -0
  27. package/src/stories/Spellbook.stories.tsx +107 -0
  28. package/src/.DS_Store +0 -0
  29. package/src/components/NPCDialog/.DS_Store +0 -0
  30. package/src/components/NPCDialog/img/.DS_Store +0 -0
  31. package/src/mocks/.DS_Store +0 -0
  32. package/src/mocks/atlas/.DS_Store +0 -0
@@ -0,0 +1,5 @@
1
+ import { Meta } from '@storybook/react';
2
+ import { QuickSpellsProps } from '../components/Spellbook/QuickSpells';
3
+ declare const meta: Meta;
4
+ export default meta;
5
+ export declare const Default: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactFramework, QuickSpellsProps>;
@@ -0,0 +1,5 @@
1
+ import { Meta } from '@storybook/react';
2
+ import { ISpellbookProps } from '../components/Spellbook/Spellbook';
3
+ declare const meta: Meta;
4
+ export default meta;
5
+ export declare const Default: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactFramework, ISpellbookProps>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpg-engine/long-bow",
3
- "version": "0.3.33",
3
+ "version": "0.3.35",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -83,7 +83,7 @@
83
83
  },
84
84
  "dependencies": {
85
85
  "@rollup/plugin-image": "^2.1.1",
86
- "@rpg-engine/shared": "^0.6.66",
86
+ "@rpg-engine/shared": "^0.6.71",
87
87
  "dayjs": "^1.11.2",
88
88
  "font-awesome": "^4.7.0",
89
89
  "fs-extra": "^10.1.0",
@@ -114,6 +114,7 @@ export const Chat: React.FC<IChatProps> = ({
114
114
  autoComplete="off"
115
115
  onFocus={onFocus}
116
116
  onBlur={onBlur}
117
+ onTouchStart={onFocus}
117
118
  />
118
119
  </Column>
119
120
  <Column justifyContent="flex-end">
@@ -82,7 +82,7 @@ export const CraftBook: React.FC<IItemCraftSelectorProps> = ({
82
82
  <DraggableContainer
83
83
  type={RPGUIContainerTypes.Framed}
84
84
  width="500px"
85
- cancelDrag=".equipment-container-body .arrow-selector"
85
+ cancelDrag=".equipment-container-body .arrow-selector .rpgui-dropdown-imp"
86
86
  onCloseButton={() => {
87
87
  if (onClose) {
88
88
  onClose();
@@ -125,7 +125,6 @@ export const CraftBook: React.FC<IItemCraftSelectorProps> = ({
125
125
  handleClick(option.key);
126
126
  }}
127
127
  onTouchStart={() => {
128
- handleClick(option.key);
129
128
  setIsShown({ show: true, index: index });
130
129
  }}
131
130
  style={{ display: 'flex', alignItems: 'center' }}
@@ -0,0 +1,116 @@
1
+ import { IRawSpell } from '@rpg-engine/shared';
2
+ import React, { useEffect } from 'react';
3
+ import styled from 'styled-components';
4
+ import { uiColors } from '../../constants/uiColors';
5
+
6
+ export type QuickSpellsProps = {
7
+ quickSpells: IRawSpell[];
8
+ onSpellCast: (spellKey: string) => void;
9
+ mana: number;
10
+ isBlockedCastingByKeyboard?: boolean;
11
+ };
12
+
13
+ export const QuickSpells: React.FC<QuickSpellsProps> = ({
14
+ quickSpells,
15
+ onSpellCast,
16
+ mana,
17
+ isBlockedCastingByKeyboard = false,
18
+ }) => {
19
+ useEffect(() => {
20
+ const handleKeyDown = (e: KeyboardEvent) => {
21
+ if (isBlockedCastingByKeyboard) return;
22
+
23
+ const shortcutIndex = Number(e.key) - 1;
24
+ if (shortcutIndex >= 0 && shortcutIndex <= 3) {
25
+ const shortcut = quickSpells[shortcutIndex];
26
+ if (shortcut?.key && mana >= shortcut?.manaCost) {
27
+ onSpellCast(shortcut.key);
28
+ }
29
+ }
30
+ };
31
+
32
+ window.addEventListener('keydown', handleKeyDown);
33
+
34
+ return () => {
35
+ window.removeEventListener('keydown', handleKeyDown);
36
+ };
37
+ }, [quickSpells, isBlockedCastingByKeyboard]);
38
+
39
+ return (
40
+ <List>
41
+ {Array.from({ length: 4 }).map((_, i) => (
42
+ <SpellShortcut
43
+ key={i}
44
+ onClick={onSpellCast.bind(null, quickSpells[i]?.key)}
45
+ disabled={mana < quickSpells[i]?.manaCost}
46
+ >
47
+ <span className="mana">
48
+ {quickSpells[i]?.key && quickSpells[i]?.manaCost}
49
+ </span>
50
+ <span className="magicWords">
51
+ {quickSpells[i]?.magicWords.split(' ').map(word => word[0])}
52
+ </span>
53
+ <span className="keyboard">{i + 1}</span>
54
+ </SpellShortcut>
55
+ ))}
56
+ </List>
57
+ );
58
+ };
59
+
60
+ const SpellShortcut = styled.button`
61
+ width: 3rem;
62
+ height: 3rem;
63
+ background-color: ${uiColors.lightGray};
64
+ border: 2px solid ${uiColors.darkGray};
65
+ border-radius: 50%;
66
+ text-transform: uppercase;
67
+ font-size: 0.7rem;
68
+ font-weight: bold;
69
+ display: flex;
70
+ align-items: center;
71
+ justify-content: center;
72
+ position: relative;
73
+
74
+ .mana {
75
+ position: absolute;
76
+ top: -5px;
77
+ right: 0;
78
+ font-size: 0.65rem;
79
+ color: ${uiColors.blue};
80
+ }
81
+
82
+ .magicWords {
83
+ margin-top: 4px;
84
+ }
85
+
86
+ .keyboard {
87
+ position: absolute;
88
+ bottom: -5px;
89
+ left: 0;
90
+ font-size: 0.65rem;
91
+ color: ${uiColors.yellow};
92
+ }
93
+
94
+ &:hover,
95
+ &:focus {
96
+ background-color: ${uiColors.darkGray};
97
+ }
98
+
99
+ &:active {
100
+ background-color: ${uiColors.gray};
101
+ }
102
+
103
+ &:disabled {
104
+ opacity: 0.5;
105
+ }
106
+ `;
107
+
108
+ const List = styled.p`
109
+ width: 100%;
110
+ display: flex;
111
+ align-items: center;
112
+ justify-content: center;
113
+ gap: 0.5rem;
114
+ box-sizing: border-box;
115
+ margin: 0 !important;
116
+ `;
@@ -0,0 +1,201 @@
1
+ import { IRawSpell } from '@rpg-engine/shared';
2
+ import React from 'react';
3
+ import styled from 'styled-components';
4
+ import { uiColors } from '../../constants/uiColors';
5
+ import { uiFonts } from '../../constants/uiFonts';
6
+
7
+ interface Props extends IRawSpell {
8
+ charMana: number;
9
+ charMagicLevel: number;
10
+ onClick?: (spellKey: string) => void;
11
+ isSettingShortcut?: boolean;
12
+ spellKey: string;
13
+ }
14
+
15
+ export const Spell: React.FC<Props> = ({
16
+ spellKey,
17
+ name,
18
+ description,
19
+ magicWords,
20
+ manaCost,
21
+ charMana,
22
+ charMagicLevel,
23
+ onClick,
24
+ isSettingShortcut,
25
+ minMagicLevelRequired,
26
+ }) => {
27
+ const disabled = isSettingShortcut
28
+ ? charMagicLevel < minMagicLevelRequired
29
+ : manaCost > charMana || charMagicLevel < minMagicLevelRequired;
30
+
31
+ return (
32
+ <Container
33
+ disabled={disabled}
34
+ onClick={onClick?.bind(null, spellKey)}
35
+ isSettingShortcut={isSettingShortcut && !disabled}
36
+ className="spell"
37
+ >
38
+ {disabled && (
39
+ <Overlay>
40
+ {charMagicLevel < minMagicLevelRequired
41
+ ? 'Low magic level'
42
+ : manaCost > charMana && 'No mana'}
43
+ </Overlay>
44
+ )}
45
+ <SpellImage>{magicWords.split(' ').map(word => word[0])}</SpellImage>
46
+ <Info>
47
+ <Title>
48
+ <span>{name}</span>
49
+ <span className="spell">({magicWords})</span>
50
+ </Title>
51
+ <Description>{description}</Description>
52
+ </Info>
53
+
54
+ <Divider />
55
+ <Cost>
56
+ <span>Mana cost:</span>
57
+ <span className="mana">{manaCost}</span>
58
+ </Cost>
59
+ </Container>
60
+ );
61
+ };
62
+
63
+ const Container = styled.button<{ isSettingShortcut?: boolean }>`
64
+ display: block;
65
+ background: none;
66
+ border: 2px solid transparent;
67
+ border-radius: 1rem;
68
+ width: 100%;
69
+ display: flex;
70
+ height: 5rem;
71
+ gap: 1rem;
72
+ align-items: center;
73
+ padding: 0 1rem;
74
+ text-align: left;
75
+ position: relative;
76
+
77
+ animation: ${({ isSettingShortcut }) =>
78
+ isSettingShortcut ? 'border-color-change 1s infinite' : 'none'};
79
+
80
+ @keyframes border-color-change {
81
+ 0% {
82
+ border-color: ${uiColors.yellow};
83
+ }
84
+ 50% {
85
+ border-color: transparent;
86
+ }
87
+ 100% {
88
+ border-color: ${uiColors.yellow};
89
+ }
90
+ }
91
+
92
+ &:hover,
93
+ &:focus {
94
+ background-color: ${uiColors.darkGray};
95
+ }
96
+
97
+ &:active {
98
+ background: none;
99
+ }
100
+ `;
101
+
102
+ const SpellImage = styled.div`
103
+ width: 4rem;
104
+ height: 4rem;
105
+ font-size: ${uiFonts.size.xLarge};
106
+ font-weight: bold;
107
+ background-color: ${uiColors.darkGray};
108
+ color: ${uiColors.lightGray};
109
+ display: flex;
110
+ justify-content: center;
111
+ align-items: center;
112
+ text-transform: uppercase;
113
+ `;
114
+
115
+ const Info = styled.span`
116
+ width: 0;
117
+ flex: 1;
118
+ `;
119
+
120
+ const Title = styled.p`
121
+ display: flex;
122
+ flex-wrap: wrap;
123
+ align-items: center;
124
+ margin-bottom: 5px;
125
+ margin: 0;
126
+
127
+ span {
128
+ font-size: ${uiFonts.size.medium} !important;
129
+ font-weight: bold !important;
130
+ color: ${uiColors.yellow} !important;
131
+ margin-right: 0.5rem;
132
+ }
133
+
134
+ .spell {
135
+ font-size: ${uiFonts.size.small} !important;
136
+ font-weight: normal !important;
137
+ color: ${uiColors.lightGray} !important;
138
+ }
139
+ `;
140
+
141
+ const Description = styled.div`
142
+ font-size: ${uiFonts.size.small} !important;
143
+ line-height: 1.1 !important;
144
+ `;
145
+
146
+ const Divider = styled.div`
147
+ width: 1px;
148
+ height: 100%;
149
+ margin: 0 1rem;
150
+ background-color: ${uiColors.lightGray};
151
+ `;
152
+
153
+ const Cost = styled.p`
154
+ display: flex;
155
+ align-items: center;
156
+ flex-direction: column;
157
+ gap: 0.5rem;
158
+
159
+ div {
160
+ z-index: 1;
161
+ }
162
+
163
+ .mana {
164
+ position: relative;
165
+ font-size: ${uiFonts.size.medium};
166
+ font-weight: bold;
167
+ z-index: 1;
168
+
169
+ &::after {
170
+ position: absolute;
171
+ content: '';
172
+ top: 0;
173
+ left: 0;
174
+ background-color: ${uiColors.blue};
175
+ width: 100%;
176
+ height: 100%;
177
+ border-radius: 50%;
178
+ transform: scale(1.8);
179
+ filter: blur(10px);
180
+ z-index: -1;
181
+ }
182
+ }
183
+ `;
184
+
185
+ const Overlay = styled.p`
186
+ margin: 0 !important;
187
+ position: absolute;
188
+ top: 0;
189
+ left: 0;
190
+ width: 100%;
191
+ height: 100%;
192
+ border-radius: 1rem;
193
+ display: flex;
194
+ justify-content: center;
195
+ align-items: center;
196
+ color: ${uiColors.yellow};
197
+ font-size: ${uiFonts.size.large} !important;
198
+ font-weight: bold;
199
+ z-index: 10;
200
+ background-color: rgba(0 0 0 / 0.2);
201
+ `;
@@ -0,0 +1,144 @@
1
+ import { IRawSpell } from '@rpg-engine/shared';
2
+ import React, { Fragment, useEffect, useMemo, useState } from 'react';
3
+ import styled from 'styled-components';
4
+ import { uiFonts } from '../../constants/uiFonts';
5
+ import { DraggableContainer } from '../DraggableContainer';
6
+ import { Input } from '../Input';
7
+ import { RPGUIContainerTypes } from '../RPGUIContainer';
8
+ import { Spell } from './Spell';
9
+ import { SpellbookShortcuts } from './SpellbookShortcuts';
10
+
11
+ export interface ISpellbookProps {
12
+ onClose?: () => void;
13
+ onInputFocus?: () => void;
14
+ onInputBlur?: () => void;
15
+ spells: IRawSpell[];
16
+ magicLevel: number;
17
+ mana: number;
18
+ onSpellClick: (spellKey: string) => void;
19
+ setSpellShortcut: (key: string, index: number) => void;
20
+ spellShortcuts: IRawSpell[];
21
+ removeSpellShortcut: (index: number) => void;
22
+ }
23
+
24
+ export const Spellbook: React.FC<ISpellbookProps> = ({
25
+ onClose,
26
+ onInputFocus,
27
+ onInputBlur,
28
+ spells,
29
+ magicLevel,
30
+ mana,
31
+ onSpellClick,
32
+ setSpellShortcut,
33
+ spellShortcuts,
34
+ removeSpellShortcut,
35
+ }) => {
36
+ const [search, setSearch] = useState('');
37
+ const [settingShortcutIndex, setSettingShortcutIndex] = useState(-1);
38
+
39
+ useEffect(() => {
40
+ const handleEscapeClose = (e: KeyboardEvent) => {
41
+ if (e.key === 'Escape') {
42
+ onClose?.();
43
+ }
44
+ };
45
+
46
+ document.addEventListener('keydown', handleEscapeClose);
47
+
48
+ return () => {
49
+ document.removeEventListener('keydown', handleEscapeClose);
50
+ };
51
+ }, [onClose]);
52
+
53
+ const spellsToDisplay = useMemo(() => {
54
+ return spells
55
+ .sort((a, b) => {
56
+ if (a.minMagicLevelRequired > b.minMagicLevelRequired) return 1;
57
+ if (a.minMagicLevelRequired < b.minMagicLevelRequired) return -1;
58
+ return 0;
59
+ })
60
+ .filter(
61
+ spell =>
62
+ spell.name.toLocaleLowerCase().includes(search.toLocaleLowerCase()) ||
63
+ spell.magicWords
64
+ .toLocaleLowerCase()
65
+ .includes(search.toLocaleLowerCase())
66
+ );
67
+ }, [search, spells]);
68
+
69
+ const setShortcut = (spellKey: string) => {
70
+ setSpellShortcut?.(spellKey, settingShortcutIndex);
71
+ setSettingShortcutIndex(-1);
72
+ };
73
+
74
+ return (
75
+ <DraggableContainer
76
+ type={RPGUIContainerTypes.Framed}
77
+ onCloseButton={onClose}
78
+ width="inherit"
79
+ height="inherit"
80
+ cancelDrag="#spellbook-search, #shortcuts_list, .spell"
81
+ >
82
+ <Container>
83
+ <Title>Learned Spells</Title>
84
+
85
+ <SpellbookShortcuts
86
+ setSettingShortcutIndex={setSettingShortcutIndex}
87
+ settingShortcutIndex={settingShortcutIndex}
88
+ shortcuts={spellShortcuts}
89
+ removeShortcut={removeSpellShortcut}
90
+ />
91
+
92
+ <Input
93
+ placeholder="Search for spell"
94
+ value={search}
95
+ onChange={e => setSearch(e.target.value)}
96
+ onFocus={onInputFocus}
97
+ onBlur={onInputBlur}
98
+ id="spellbook-search"
99
+ />
100
+
101
+ <SpellList>
102
+ {spellsToDisplay.map(spell => (
103
+ <Fragment key={spell.key}>
104
+ <Spell
105
+ charMana={mana}
106
+ charMagicLevel={magicLevel}
107
+ onClick={
108
+ settingShortcutIndex !== -1 ? setShortcut : onSpellClick
109
+ }
110
+ spellKey={spell.key}
111
+ isSettingShortcut={settingShortcutIndex !== -1}
112
+ {...spell}
113
+ />
114
+ </Fragment>
115
+ ))}
116
+ </SpellList>
117
+ </Container>
118
+ </DraggableContainer>
119
+ );
120
+ };
121
+
122
+ const Title = styled.h1`
123
+ font-size: ${uiFonts.size.large} !important;
124
+ margin-bottom: 0 !important;
125
+ `;
126
+
127
+ const Container = styled.div`
128
+ width: 100%;
129
+ height: 100%;
130
+ color: white;
131
+ display: flex;
132
+ flex-direction: column;
133
+ `;
134
+
135
+ const SpellList = styled.div`
136
+ width: 100%;
137
+ min-height: 0;
138
+ flex: 1;
139
+ overflow-y: auto;
140
+ display: flex;
141
+ flex-direction: column;
142
+ gap: 1.5rem;
143
+ margin-top: 1rem;
144
+ `;
@@ -0,0 +1,77 @@
1
+ import { IRawSpell } from '@rpg-engine/shared';
2
+ import React from 'react';
3
+ import styled from 'styled-components';
4
+ import { uiColors } from '../../constants/uiColors';
5
+
6
+ type Props = {
7
+ setSettingShortcutIndex: (index: number) => void;
8
+ settingShortcutIndex: number;
9
+ shortcuts: IRawSpell[];
10
+ removeShortcut: (index: number) => void;
11
+ };
12
+
13
+ export const SpellbookShortcuts: React.FC<Props> = ({
14
+ setSettingShortcutIndex,
15
+ settingShortcutIndex,
16
+ shortcuts,
17
+ removeShortcut,
18
+ }) => (
19
+ <List id="shortcuts_list">
20
+ Spells shortcuts:
21
+ {Array.from({ length: 4 }).map((_, i) => (
22
+ <SpellShortcut
23
+ key={i}
24
+ onClick={() => {
25
+ removeShortcut(i);
26
+ if (!shortcuts[i]?.key) setSettingShortcutIndex(i);
27
+ }}
28
+ disabled={settingShortcutIndex !== -1 && settingShortcutIndex !== i}
29
+ isBeingSet={settingShortcutIndex === i}
30
+ >
31
+ <span>{shortcuts[i]?.magicWords.split(' ').map(word => word[0])}</span>
32
+ </SpellShortcut>
33
+ ))}
34
+ </List>
35
+ );
36
+ const SpellShortcut = styled.button<{ isBeingSet?: boolean }>`
37
+ width: 2.6rem;
38
+ height: 2.6rem;
39
+ background-color: ${uiColors.lightGray};
40
+ border: 2px solid
41
+ ${({ isBeingSet }) => (isBeingSet ? uiColors.yellow : uiColors.darkGray)};
42
+ border-radius: 50%;
43
+ text-transform: uppercase;
44
+ font-size: 0.7rem;
45
+ font-weight: bold;
46
+ display: flex;
47
+ align-items: center;
48
+ justify-content: center;
49
+
50
+ span {
51
+ margin-top: 4px;
52
+ }
53
+
54
+ &:hover,
55
+ &:focus {
56
+ background-color: ${uiColors.darkGray};
57
+ }
58
+
59
+ &:active {
60
+ background-color: ${uiColors.gray};
61
+ }
62
+
63
+ &:disabled {
64
+ opacity: 0.5;
65
+ }
66
+ `;
67
+
68
+ const List = styled.p`
69
+ width: 100%;
70
+ display: flex;
71
+ align-items: center;
72
+ justify-content: flex-end;
73
+ gap: 0.5rem;
74
+ padding: 0.5rem;
75
+ box-sizing: border-box;
76
+ margin: 0 !important;
77
+ `;
@@ -0,0 +1,12 @@
1
+ import { IRawSpell } from '@rpg-engine/shared';
2
+
3
+ export const SPELL_SHORTCUTS_STORAGE_KEY = 'spellShortcuts';
4
+
5
+ export const defaultSpellShortcut: IRawSpell = {
6
+ key: '',
7
+ manaCost: 0,
8
+ magicWords: '',
9
+ name: '',
10
+ description: '',
11
+ minMagicLevelRequired: 0,
12
+ };
@@ -0,0 +1,60 @@
1
+ import { IRawSpell } from '@rpg-engine/shared';
2
+
3
+ enum SpellsBlueprint {
4
+ SelfHealingSpell = 'self-healing-spell',
5
+ FoodCreationSpell = 'food-creation-spell',
6
+ ArrowCreationSpell = 'arrow-creation-spell',
7
+ BoltCreationSpell = 'bolt-creation-spell',
8
+ BlankRuneCreationSpell = 'blank-rune-creation-spell',
9
+ SelfHasteSpell = 'self-haste-spell',
10
+ FireRuneCreationSpell = 'fire-rune-creation-spell',
11
+ HealRuneCreationSpell = 'healing-rune-creation-spell',
12
+ PoisonRuneCreationSpell = 'poison-rune-creation-spell',
13
+ DarkRuneCreationSpell = 'dark-rune-creation-spell',
14
+ GreaterHealingSpell = 'greater-healing-spell',
15
+ EnergyBoltCreationSpell = 'energy-bolt-creation-spell',
16
+ FireBoltCreationSpell = 'fire-bolt-creation-spell',
17
+ }
18
+
19
+ export const mockSpells: IRawSpell[] = [
20
+ {
21
+ key: SpellsBlueprint.ArrowCreationSpell,
22
+ name: 'Arrow Creation Spell',
23
+ description: 'A spell that creates arrow in your inventory.',
24
+ magicWords: 'iquar elandi',
25
+ manaCost: 10,
26
+ minMagicLevelRequired: 3,
27
+ },
28
+ {
29
+ key: SpellsBlueprint.BlankRuneCreationSpell,
30
+ name: 'Blank Rune Creation Spell',
31
+ description: 'A spell that creates a blank rune in your inventory.',
32
+ magicWords: 'iquar ansr ki',
33
+ manaCost: 5,
34
+ minMagicLevelRequired: 3,
35
+ },
36
+ {
37
+ key: SpellsBlueprint.BoltCreationSpell,
38
+ name: 'Bolt Creation Spell',
39
+ description: 'A spell that creates bolt in your inventory.',
40
+ magicWords: 'iquar lyn',
41
+ manaCost: 15,
42
+ minMagicLevelRequired: 3,
43
+ },
44
+ {
45
+ key: SpellsBlueprint.SelfHasteSpell,
46
+ name: 'Self Haste Spell',
47
+ description: 'A self haste spell.',
48
+ magicWords: 'talas hiz',
49
+ manaCost: 40,
50
+ minMagicLevelRequired: 5,
51
+ },
52
+ {
53
+ key: SpellsBlueprint.SelfHealingSpell,
54
+ name: 'Self Healing Spell',
55
+ description: 'A self healing spell.',
56
+ magicWords: 'talas faenya',
57
+ manaCost: 10,
58
+ minMagicLevelRequired: 1,
59
+ },
60
+ ];
package/src/index.tsx CHANGED
@@ -29,6 +29,8 @@ export * from './components/RPGUIRoot';
29
29
  export * from './components/shared/SpriteFromAtlas';
30
30
  export * from './components/SkillProgressBar';
31
31
  export * from './components/SkillsContainer';
32
+ export * from './components/Spellbook/QuickSpells';
33
+ export * from './components/Spellbook/Spellbook';
32
34
  export * from './components/TextArea';
33
35
  export * from './components/TimeWidget/TimeWidget';
34
36
  export * from './components/TradingMenu/TradingMenu';