-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathloreModule2.js
More file actions
157 lines (150 loc) · 5.32 KB
/
loreModule2.js
File metadata and controls
157 lines (150 loc) · 5.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
/**
* loreModule2.js — V2 Lore Fragment Library
* 21 fragments: 6 element-based, 7 star/constellation, 8 conscience/moral.
* (c) 2026 NicholaiMadias — MIT License
*/
/**
* @typedef {object} LoreFragment
* @property {string} id
* @property {string} title
* @property {string} text
* @property {string} [element] - For element-based fragments
* @property {string} [constellation] - For star/constellation fragments
* @property {string} [stat] - For conscience-based fragments
* @property {number} [threshold] - Conscience stat value that unlocks this fragment
*/
/** @type {LoreFragment[]} */
export const LORE_FRAGMENTS = [
// ── Element-based fragments (6) ─────────────────────────────────────────────
{
id: 'lore-radiant-1', element: 'radiant',
title: 'The First Light',
text: 'Before the stars were named, radiance was the language of creation.',
},
{
id: 'lore-tide-1', element: 'tide',
title: 'The Flowing Mind',
text: 'Wisdom runs like water — carving canyons where none existed.',
},
{
id: 'lore-verdant-1', element: 'verdant',
title: 'The Root Network',
text: 'Community is the mycelium beneath: unseen, essential, binding all.',
},
{
id: 'lore-forge-1', element: 'forge',
title: 'The Tempered Will',
text: 'Integrity is not given; it is hammered out in the heat of consequence.',
},
{
id: 'lore-aether-1', element: 'aether',
title: 'The Sky Between Skies',
text: 'Between thought and action lies aether — the space where choice is made.',
},
{
id: 'lore-umbra-1', element: 'umbra',
title: 'The Necessary Shadow',
text: 'Umbra is not darkness but depth — the dimension that gives light its meaning.',
},
// ── Star / constellation fragments (7) ──────────────────────────────────────
{
id: 'lore-star-1', constellation: 'solaris',
title: 'Omen of Solaris',
text: 'The star of warmth rises when hearts align.',
},
{
id: 'lore-star-2', constellation: 'tidemere',
title: 'Omen of Tidemere',
text: 'The flowing star descends when wisdom fills the tidal pools of the mind.',
},
{
id: 'lore-star-3', constellation: 'verdaxis',
title: 'Omen of Verdaxis',
text: 'The green star blossoms when community is rooted.',
},
{
id: 'lore-star-4', constellation: 'forgion',
title: 'Omen of Forgion',
text: 'The forge star ignites when integrity is tested and holds.',
},
{
id: 'lore-star-5', constellation: 'aethelon',
title: 'Omen of Aethelon',
text: 'The sky star appears only to those who pause between thought and deed.',
},
{
id: 'lore-star-6', constellation: 'umbraxis',
title: 'Omen of Umbraxis',
text: 'The shadow star reveals that all illuminated things cast a shape.',
},
{
id: 'lore-star-7', constellation: 'voidheart',
title: 'Omen of the Void',
text: 'The seventh star is all and none — the wild card that rewrites the sky.',
},
// ── Conscience / moral fragments (8: 2 per stat) ────────────────────────────
{
id: 'lore-karma-1', stat: 'karma', threshold: 25,
title: 'The Karma Awakens',
text: 'Each act of radiance ripples outward — what you send returns as starlight.',
},
{
id: 'lore-karma-2', stat: 'karma', threshold: 75,
title: 'The Karma Crests',
text: 'The lattice sings with your name when karma reaches full resonance.',
},
{
id: 'lore-wisdom-1', stat: 'wisdom', threshold: 25,
title: 'The Tide Turns',
text: 'Wisdom is not the absence of error — it is the grace to learn from flow.',
},
{
id: 'lore-wisdom-2', stat: 'wisdom', threshold: 75,
title: 'The Deep Current',
text: 'When wisdom runs deep, even the void becomes navigable.',
},
{
id: 'lore-integrity-1', stat: 'integrity', threshold: 25,
title: 'The Forge Kindles',
text: 'A single true act is worth a thousand hollow promises.',
},
{
id: 'lore-integrity-2', stat: 'integrity', threshold: 75,
title: 'The Forge Blazes',
text: 'The board does not forget — every move of integrity is written in light.',
},
{
id: 'lore-community-1', stat: 'community', threshold: 25,
title: 'The Root Spreads',
text: 'Community does not shout; it grows quietly until it cannot be uprooted.',
},
{
id: 'lore-community-2', stat: 'community', threshold: 75,
title: 'The Forest Rises',
text: 'When all act as one, the lattice becomes unbreakable.',
},
];
/**
* Finds a lore fragment by its unique ID.
* @param {string} id
* @returns {LoreFragment|null}
*/
export function getFragmentById(id) {
return LORE_FRAGMENTS.find(f => f.id === id) || null;
}
/**
* Returns all fragments for a given element type.
* @param {string} element
* @returns {LoreFragment[]}
*/
export function getFragmentsByElement(element) {
return LORE_FRAGMENTS.filter(f => f.element === element);
}
/**
* Returns all fragments tied to a conscience stat.
* @param {string} stat - 'karma' | 'wisdom' | 'integrity' | 'community'
* @returns {LoreFragment[]}
*/
export function getFragmentsByStat(stat) {
return LORE_FRAGMENTS.filter(f => f.stat === stat);
}