roguelike-cli 1.3.3 → 1.3.4

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.
package/README.md CHANGED
@@ -163,7 +163,8 @@ Or select "Custom" during `init` to enter your own rules.
163
163
  | Command | Description |
164
164
  |---------|-------------|
165
165
  | `stats` | XP, level, streaks |
166
- | `achievements` | Achievement list |
166
+ | `achievements` | Achievement list (infinite) |
167
+ | `inventory` | Loot collection |
167
168
  | `map` | Dungeon map |
168
169
  | `map --ai` | AI-generated map |
169
170
 
@@ -218,15 +219,49 @@ Tree shows deadlines:
218
219
 
219
220
  ## Achievements
220
221
 
221
- | Achievement | How to unlock |
222
- |-------------|---------------|
223
- | First Blood | Complete first task |
224
- | Getting Started | Complete 10 tasks |
225
- | Centurion | Complete 100 tasks |
226
- | Deep Diver | Task at depth 5+ |
227
- | Boss Slayer | Complete a boss |
228
- | Speedrunner | Same-day completion |
229
- | Streak Master | 7 day streak |
222
+ Achievements are infinite and level-based. Keep progressing to unlock more!
223
+
224
+ | Category | Milestones |
225
+ |----------|------------|
226
+ | Tasks | 1, 10, 50, 100, 500, 1000, 2500, 5000... |
227
+ | Bosses | 1, 5, 10, 25, 50, 100... |
228
+ | Streaks | 3, 7, 14, 30, 60, 90, 180, 365 days |
229
+ | Depth | 3, 5, 7, 10, 15, 20 levels |
230
+ | Special | Speedrunner, Night Owl, Early Bird |
231
+
232
+ ## Loot System
233
+
234
+ Complete tasks to find loot! Higher level = rarer drops.
235
+
236
+ | Rarity | Drop Rate | Symbol |
237
+ |--------|-----------|--------|
238
+ | Common | ~25% | [.] |
239
+ | Uncommon | ~15% | [+] |
240
+ | Rare | ~8% | [*] |
241
+ | Epic | ~3% | [#] |
242
+ | Legendary | ~1% | [!] |
243
+
244
+ Bonus drops on:
245
+ - Level up: 3x chance
246
+ - Achievement: 2.5x chance
247
+ - Boss completion: 2x chance
248
+
249
+ ```
250
+ > inventory
251
+
252
+ === Inventory (5 items) ===
253
+
254
+ Legendary:
255
+ [!] Excalibur
256
+
257
+ Rare:
258
+ [*] Ring of Protection
259
+ [*] Boots of Speed
260
+
261
+ Common:
262
+ [.] Health Potion
263
+ [.] Torch
264
+ ```
230
265
 
231
266
  ## Supported Models
232
267
 
@@ -244,6 +279,10 @@ grok-beta
244
279
 
245
280
  **https://www.rlc.rocks**
246
281
 
282
+ **Open Source:** [GitHub](https://github.com/creative-ventures/roguelike-cli) | [npm](https://www.npmjs.com/package/roguelike-cli)
283
+
284
+ Designed by [Creative Ventures](https://www.cv.rocks)
285
+
247
286
  ## License
248
287
 
249
288
  MIT
@@ -0,0 +1,450 @@
1
+ "use strict";
2
+ // Base dictionaries for different rule presets
3
+ // Keys are used everywhere, values are localized based on rules
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.DICTIONARIES = exports.WESTERN_DICTIONARY = exports.PIRATE_DICTIONARY = exports.CYBERPUNK_DICTIONARY = exports.STARWARS_DICTIONARY = exports.SPACE_DICTIONARY = exports.FANTASY_DICTIONARY = exports.DEFAULT_DICTIONARY = void 0;
6
+ exports.getDictionary = getDictionary;
7
+ // Default dictionary (no theme)
8
+ exports.DEFAULT_DICTIONARY = {
9
+ messages: {
10
+ questCompleted: 'TASK COMPLETED',
11
+ levelUp: 'LEVEL UP!',
12
+ newAchievement: 'NEW ACHIEVEMENT',
13
+ lootDropped: 'ITEM FOUND',
14
+ bossDefeated: 'BOSS COMPLETED',
15
+ streakBonus: 'STREAK BONUS',
16
+ taskBlocked: 'Task blocked',
17
+ taskUnblocked: 'Task unblocked',
18
+ deadlineSet: 'Deadline set',
19
+ deadlineOverdue: 'OVERDUE',
20
+ welcomeBack: 'Welcome back',
21
+ },
22
+ achievements: {
23
+ firstTask: { name: 'First Step', desc: 'Complete your first task' },
24
+ tasks10: { name: 'Getting Started', desc: 'Complete 10 tasks' },
25
+ tasks50: { name: 'Productive', desc: 'Complete 50 tasks' },
26
+ tasks100: { name: 'Centurion', desc: 'Complete 100 tasks' },
27
+ tasks500: { name: 'Veteran', desc: 'Complete 500 tasks' },
28
+ tasks1000: { name: 'Legend', desc: 'Complete 1000 tasks' },
29
+ boss1: { name: 'Boss Hunter', desc: 'Complete first boss task' },
30
+ boss5: { name: 'Boss Slayer', desc: 'Complete 5 boss tasks' },
31
+ boss10: { name: 'Boss Master', desc: 'Complete 10 boss tasks' },
32
+ boss25: { name: 'Boss Legend', desc: 'Complete 25 boss tasks' },
33
+ streak3: { name: 'On Fire', desc: '3 day streak' },
34
+ streak7: { name: 'Streak Master', desc: '7 day streak' },
35
+ streak14: { name: 'Unstoppable', desc: '14 day streak' },
36
+ streak30: { name: 'Legendary Streak', desc: '30 day streak' },
37
+ depth3: { name: 'Deep Diver', desc: 'Task at depth 3+' },
38
+ depth5: { name: 'Explorer', desc: 'Task at depth 5+' },
39
+ depth10: { name: 'Spelunker', desc: 'Task at depth 10+' },
40
+ speedrun: { name: 'Speedrunner', desc: 'Complete task same day' },
41
+ nightOwl: { name: 'Night Owl', desc: 'Complete task after midnight' },
42
+ earlyBird: { name: 'Early Bird', desc: 'Complete task before 6am' },
43
+ },
44
+ loot: {
45
+ common: ['Notebook', 'Pencil', 'Coffee Mug', 'Sticky Notes', 'Timer'],
46
+ uncommon: ['Planner', 'Headphones', 'Desk Lamp', 'Whiteboard', 'Calendar'],
47
+ rare: ['Mechanical Keyboard', 'Standing Desk', 'Monitor', 'Ergonomic Chair', 'Tablet'],
48
+ epic: ['Home Office', 'AI Assistant', 'Time Machine', 'Focus Crystal', 'Productivity Aura'],
49
+ legendary: ['Infinite Focus', 'Time Bender', 'Mind Palace', 'Quantum Planner', 'Zen Master Badge'],
50
+ },
51
+ rarities: {
52
+ common: 'Common',
53
+ uncommon: 'Uncommon',
54
+ rare: 'Rare',
55
+ epic: 'Epic',
56
+ legendary: 'Legendary',
57
+ },
58
+ stats: {
59
+ level: 'Level',
60
+ xp: 'XP',
61
+ tasksCompleted: 'Tasks Completed',
62
+ bossesDefeated: 'Bosses Defeated',
63
+ currentStreak: 'Current Streak',
64
+ longestStreak: 'Longest Streak',
65
+ inventory: 'Inventory',
66
+ },
67
+ };
68
+ // Fantasy RPG dictionary
69
+ exports.FANTASY_DICTIONARY = {
70
+ messages: {
71
+ questCompleted: 'QUEST COMPLETED',
72
+ levelUp: 'LEVEL UP! Your power grows!',
73
+ newAchievement: 'ACHIEVEMENT UNLOCKED',
74
+ lootDropped: 'LOOT DROPPED',
75
+ bossDefeated: 'BOSS SLAIN',
76
+ streakBonus: 'COMBO BONUS',
77
+ taskBlocked: 'Quest blocked by dark magic',
78
+ taskUnblocked: 'The path is clear',
79
+ deadlineSet: 'The prophecy speaks',
80
+ deadlineOverdue: 'THE DEADLINE HAS PASSED',
81
+ welcomeBack: 'Welcome back, adventurer',
82
+ },
83
+ achievements: {
84
+ firstTask: { name: 'First Blood', desc: 'Slay your first monster' },
85
+ tasks10: { name: 'Novice Adventurer', desc: 'Complete 10 quests' },
86
+ tasks50: { name: 'Seasoned Warrior', desc: 'Complete 50 quests' },
87
+ tasks100: { name: 'Hero of the Realm', desc: 'Complete 100 quests' },
88
+ tasks500: { name: 'Legendary Champion', desc: 'Complete 500 quests' },
89
+ tasks1000: { name: 'Mythical Godslayer', desc: 'Complete 1000 quests' },
90
+ boss1: { name: 'Dragon Slayer', desc: 'Defeat your first boss' },
91
+ boss5: { name: 'Beast Hunter', desc: 'Defeat 5 bosses' },
92
+ boss10: { name: 'Monster Bane', desc: 'Defeat 10 bosses' },
93
+ boss25: { name: 'Titan Crusher', desc: 'Defeat 25 bosses' },
94
+ streak3: { name: 'Battle Fury', desc: '3 day quest streak' },
95
+ streak7: { name: 'Relentless', desc: '7 day quest streak' },
96
+ streak14: { name: 'Unstoppable Force', desc: '14 day quest streak' },
97
+ streak30: { name: 'Legend Incarnate', desc: '30 day quest streak' },
98
+ depth3: { name: 'Dungeon Crawler', desc: 'Descend to depth 3' },
99
+ depth5: { name: 'Abyss Walker', desc: 'Descend to depth 5' },
100
+ depth10: { name: 'Void Explorer', desc: 'Descend to depth 10' },
101
+ speedrun: { name: 'Swift Strike', desc: 'Complete quest same day' },
102
+ nightOwl: { name: 'Shadow Walker', desc: 'Quest after midnight' },
103
+ earlyBird: { name: 'Dawn Warrior', desc: 'Quest before dawn' },
104
+ },
105
+ loot: {
106
+ common: ['Health Potion', 'Torch', 'Rope', 'Rations', 'Map Fragment'],
107
+ uncommon: ['Steel Sword', 'Leather Armor', 'Shield', 'Bow', 'Magic Scroll'],
108
+ rare: ['Enchanted Blade', 'Mithril Mail', 'Ring of Protection', 'Boots of Speed', 'Cloak of Shadows'],
109
+ epic: ['Dragonscale Armor', 'Vorpal Sword', 'Staff of Power', 'Helm of Brilliance', 'Amulet of the Planes'],
110
+ legendary: ['Excalibur', 'Aegis Shield', 'Crown of the Immortals', 'Infinity Gauntlet', 'Phoenix Feather'],
111
+ },
112
+ rarities: {
113
+ common: 'Common',
114
+ uncommon: 'Uncommon',
115
+ rare: 'Rare',
116
+ epic: 'Epic',
117
+ legendary: 'Legendary',
118
+ },
119
+ stats: {
120
+ level: 'Level',
121
+ xp: 'Experience',
122
+ tasksCompleted: 'Quests Completed',
123
+ bossesDefeated: 'Bosses Slain',
124
+ currentStreak: 'Quest Streak',
125
+ longestStreak: 'Longest Campaign',
126
+ inventory: 'Inventory',
127
+ },
128
+ };
129
+ // Space Opera dictionary
130
+ exports.SPACE_DICTIONARY = {
131
+ messages: {
132
+ questCompleted: 'MISSION ACCOMPLISHED',
133
+ levelUp: 'RANK PROMOTED!',
134
+ newAchievement: 'COMMENDATION RECEIVED',
135
+ lootDropped: 'SALVAGE ACQUIRED',
136
+ bossDefeated: 'TARGET ELIMINATED',
137
+ streakBonus: 'EFFICIENCY BONUS',
138
+ taskBlocked: 'Mission blocked - awaiting intel',
139
+ taskUnblocked: 'Green light received',
140
+ deadlineSet: 'Mission deadline set',
141
+ deadlineOverdue: 'MISSION OVERDUE',
142
+ welcomeBack: 'Welcome back, Commander',
143
+ },
144
+ achievements: {
145
+ firstTask: { name: 'First Contact', desc: 'Complete first mission' },
146
+ tasks10: { name: 'Ensign', desc: 'Complete 10 missions' },
147
+ tasks50: { name: 'Lieutenant', desc: 'Complete 50 missions' },
148
+ tasks100: { name: 'Commander', desc: 'Complete 100 missions' },
149
+ tasks500: { name: 'Admiral', desc: 'Complete 500 missions' },
150
+ tasks1000: { name: 'Fleet Admiral', desc: 'Complete 1000 missions' },
151
+ boss1: { name: 'Ace Pilot', desc: 'Eliminate first target' },
152
+ boss5: { name: 'Elite Squadron', desc: 'Eliminate 5 targets' },
153
+ boss10: { name: 'Galactic Hero', desc: 'Eliminate 10 targets' },
154
+ boss25: { name: 'Cosmic Legend', desc: 'Eliminate 25 targets' },
155
+ streak3: { name: 'On Duty', desc: '3 day mission streak' },
156
+ streak7: { name: 'Dedicated', desc: '7 day mission streak' },
157
+ streak14: { name: 'Elite Operative', desc: '14 day mission streak' },
158
+ streak30: { name: 'Living Legend', desc: '30 day mission streak' },
159
+ depth3: { name: 'Deep Space', desc: 'Mission at sector 3+' },
160
+ depth5: { name: 'Frontier Explorer', desc: 'Mission at sector 5+' },
161
+ depth10: { name: 'Void Pioneer', desc: 'Mission at sector 10+' },
162
+ speedrun: { name: 'Hyperdrive', desc: 'Same-day mission' },
163
+ nightOwl: { name: 'Night Shift', desc: 'Mission after midnight' },
164
+ earlyBird: { name: 'Early Launch', desc: 'Mission before dawn' },
165
+ },
166
+ loot: {
167
+ common: ['Ration Pack', 'Med Kit', 'Flashlight', 'Comm Device', 'Data Chip'],
168
+ uncommon: ['Laser Pistol', 'Shield Generator', 'Jetpack', 'Scanner', 'Translator'],
169
+ rare: ['Plasma Rifle', 'Power Armor', 'Cloaking Device', 'Teleporter', 'AI Companion'],
170
+ epic: ['Antimatter Core', 'Quantum Computer', 'Warp Drive', 'Dyson Sphere', 'Singularity Engine'],
171
+ legendary: ['Infinity Drive', 'Reality Manipulator', 'Time Crystal', 'Cosmic Key', 'Omega Device'],
172
+ },
173
+ rarities: {
174
+ common: 'Standard',
175
+ uncommon: 'Military',
176
+ rare: 'Prototype',
177
+ epic: 'Experimental',
178
+ legendary: 'Artifact',
179
+ },
180
+ stats: {
181
+ level: 'Rank',
182
+ xp: 'Credits',
183
+ tasksCompleted: 'Missions Completed',
184
+ bossesDefeated: 'Targets Eliminated',
185
+ currentStreak: 'Active Deployment',
186
+ longestStreak: 'Longest Tour',
187
+ inventory: 'Cargo Hold',
188
+ },
189
+ };
190
+ // Star Wars dictionary
191
+ exports.STARWARS_DICTIONARY = {
192
+ messages: {
193
+ questCompleted: 'THE FORCE IS WITH YOU',
194
+ levelUp: 'YOUR POWER IN THE FORCE GROWS!',
195
+ newAchievement: 'JEDI HONOR EARNED',
196
+ lootDropped: 'ARTIFACT DISCOVERED',
197
+ bossDefeated: 'SITH LORD DEFEATED',
198
+ streakBonus: 'FORCE MULTIPLIER',
199
+ taskBlocked: 'The dark side clouds this path',
200
+ taskUnblocked: 'The Force guides you forward',
201
+ deadlineSet: 'The prophecy is written',
202
+ deadlineOverdue: 'YOU HAVE FAILED THE COUNCIL',
203
+ welcomeBack: 'Welcome back, young Padawan',
204
+ },
205
+ achievements: {
206
+ firstTask: { name: 'Youngling', desc: 'Begin your training' },
207
+ tasks10: { name: 'Padawan', desc: 'Complete 10 trials' },
208
+ tasks50: { name: 'Jedi Knight', desc: 'Complete 50 trials' },
209
+ tasks100: { name: 'Jedi Master', desc: 'Complete 100 trials' },
210
+ tasks500: { name: 'Council Member', desc: 'Complete 500 trials' },
211
+ tasks1000: { name: 'Grand Master', desc: 'Complete 1000 trials' },
212
+ boss1: { name: 'Sith Slayer', desc: 'Defeat your first Sith' },
213
+ boss5: { name: 'Dark Hunter', desc: 'Defeat 5 Sith' },
214
+ boss10: { name: 'Order Champion', desc: 'Defeat 10 Sith' },
215
+ boss25: { name: 'Chosen One', desc: 'Defeat 25 Sith' },
216
+ streak3: { name: 'Focused Mind', desc: '3 day meditation streak' },
217
+ streak7: { name: 'Force Attuned', desc: '7 day meditation streak' },
218
+ streak14: { name: 'One with Force', desc: '14 day meditation streak' },
219
+ streak30: { name: 'Force Ghost', desc: '30 day meditation streak' },
220
+ depth3: { name: 'Temple Explorer', desc: 'Descend to level 3' },
221
+ depth5: { name: 'Holocron Seeker', desc: 'Descend to level 5' },
222
+ depth10: { name: 'Ancient Wisdom', desc: 'Descend to level 10' },
223
+ speedrun: { name: 'Force Speed', desc: 'Same-day completion' },
224
+ nightOwl: { name: 'Dark Side Aware', desc: 'Task after midnight' },
225
+ earlyBird: { name: 'Dawn Meditation', desc: 'Task before dawn' },
226
+ },
227
+ loot: {
228
+ common: ['Jedi Robes', 'Training Remote', 'Holocron Shard', 'Ration Cube', 'Glow Rod'],
229
+ uncommon: ['Blaster', 'Jedi Comlink', 'Bacta Tank', 'Datapad', 'Beskar Fragment'],
230
+ rare: ['Lightsaber Crystal', 'Mandalorian Armor', 'Force Pike', 'Sith Artifact', 'Jedi Holocron'],
231
+ epic: ['Darksaber', 'Yoda\'s Lightsaber', 'Vader\'s Helmet', 'Kyber Crystal', 'Force Bond'],
232
+ legendary: ['Chosen One Prophecy', 'Force Dyad', 'Skywalker Saber', 'World Between Worlds Key', 'Mortis Dagger'],
233
+ },
234
+ rarities: {
235
+ common: 'Common',
236
+ uncommon: 'Refined',
237
+ rare: 'Rare',
238
+ epic: 'Legendary',
239
+ legendary: 'Mythic',
240
+ },
241
+ stats: {
242
+ level: 'Force Level',
243
+ xp: 'Midichlorians',
244
+ tasksCompleted: 'Trials Completed',
245
+ bossesDefeated: 'Sith Defeated',
246
+ currentStreak: 'Meditation Streak',
247
+ longestStreak: 'Longest Training',
248
+ inventory: 'Utility Belt',
249
+ },
250
+ };
251
+ // Cyberpunk dictionary
252
+ exports.CYBERPUNK_DICTIONARY = {
253
+ messages: {
254
+ questCompleted: 'GIG COMPLETED',
255
+ levelUp: 'STREET CRED INCREASED!',
256
+ newAchievement: 'REP UNLOCKED',
257
+ lootDropped: 'LOOT SCANNED',
258
+ bossDefeated: 'TARGET FLATLINED',
259
+ streakBonus: 'COMBO MULTIPLIER',
260
+ taskBlocked: 'Gig blocked - need more intel',
261
+ taskUnblocked: 'Access granted, choom',
262
+ deadlineSet: 'Contract deadline set',
263
+ deadlineOverdue: 'CONTRACT BREACHED',
264
+ welcomeBack: 'Welcome back, choom',
265
+ },
266
+ achievements: {
267
+ firstTask: { name: 'Fresh Meat', desc: 'Complete first gig' },
268
+ tasks10: { name: 'Street Kid', desc: 'Complete 10 gigs' },
269
+ tasks50: { name: 'Merc', desc: 'Complete 50 gigs' },
270
+ tasks100: { name: 'Solo', desc: 'Complete 100 gigs' },
271
+ tasks500: { name: 'Legend', desc: 'Complete 500 gigs' },
272
+ tasks1000: { name: 'Night City Legend', desc: 'Complete 1000 gigs' },
273
+ boss1: { name: 'Corpo Killer', desc: 'Flatline first target' },
274
+ boss5: { name: 'Fixer Favorite', desc: 'Flatline 5 targets' },
275
+ boss10: { name: 'Most Wanted', desc: 'Flatline 10 targets' },
276
+ boss25: { name: 'Cyber Psycho', desc: 'Flatline 25 targets' },
277
+ streak3: { name: 'On a Roll', desc: '3 day gig streak' },
278
+ streak7: { name: 'Grinding', desc: '7 day gig streak' },
279
+ streak14: { name: 'No Sleep', desc: '14 day gig streak' },
280
+ streak30: { name: 'Machine', desc: '30 day gig streak' },
281
+ depth3: { name: 'Deep Net', desc: 'Hack depth 3+' },
282
+ depth5: { name: 'Black ICE Runner', desc: 'Hack depth 5+' },
283
+ depth10: { name: 'Ghost in Shell', desc: 'Hack depth 10+' },
284
+ speedrun: { name: 'Speedhack', desc: 'Same-day gig' },
285
+ nightOwl: { name: 'Night Runner', desc: 'Gig after midnight' },
286
+ earlyBird: { name: 'Early Bird', desc: 'Gig before dawn' },
287
+ },
288
+ loot: {
289
+ common: ['Stim Pack', 'Junk', 'Ammo', 'Food', 'Data Shard'],
290
+ uncommon: ['Smart Pistol', 'Tech Rifle', 'Mantis Blades', 'Kiroshi Optics', 'Subdermal Armor'],
291
+ rare: ['Sandevistan', 'Gorilla Arms', 'Monowire', 'Legendary Quickhack', 'Militech Gear'],
292
+ epic: ['Arasaka Prototype', 'Relic Chip', 'Soul Killer', 'Blackwall Gateway', 'Johnny\'s Arm'],
293
+ legendary: ['Soulkiller Immunity', 'Arasaka Tower Key', 'Alt\'s Engram', 'Mikoshi Access', 'V\'s Legacy'],
294
+ },
295
+ rarities: {
296
+ common: 'Common',
297
+ uncommon: 'Uncommon',
298
+ rare: 'Rare',
299
+ epic: 'Epic',
300
+ legendary: 'Iconic',
301
+ },
302
+ stats: {
303
+ level: 'Street Cred',
304
+ xp: 'Eddies',
305
+ tasksCompleted: 'Gigs Completed',
306
+ bossesDefeated: 'Targets Flatlined',
307
+ currentStreak: 'Gig Streak',
308
+ longestStreak: 'Longest Run',
309
+ inventory: 'Stash',
310
+ },
311
+ };
312
+ // Pirate dictionary
313
+ exports.PIRATE_DICTIONARY = {
314
+ messages: {
315
+ questCompleted: 'TREASURE CLAIMED',
316
+ levelUp: 'YE RANK BE PROMOTED!',
317
+ newAchievement: 'HONOR AMONG THIEVES',
318
+ lootDropped: 'BOOTY FOUND',
319
+ bossDefeated: 'CAPTAIN DEFEATED',
320
+ streakBonus: 'PLUNDER BONUS',
321
+ taskBlocked: 'Path blocked by Kraken',
322
+ taskUnblocked: 'The seas be clear',
323
+ deadlineSet: 'Deadline marked on chart',
324
+ deadlineOverdue: 'YE MISSED THE TIDE',
325
+ welcomeBack: 'Ahoy, welcome aboard',
326
+ },
327
+ achievements: {
328
+ firstTask: { name: 'Sea Dog', desc: 'Complete yer first voyage' },
329
+ tasks10: { name: 'Deckhand', desc: 'Complete 10 voyages' },
330
+ tasks50: { name: 'First Mate', desc: 'Complete 50 voyages' },
331
+ tasks100: { name: 'Captain', desc: 'Complete 100 voyages' },
332
+ tasks500: { name: 'Pirate Lord', desc: 'Complete 500 voyages' },
333
+ tasks1000: { name: 'King of Pirates', desc: 'Complete 1000 voyages' },
334
+ boss1: { name: 'Navy Hunter', desc: 'Defeat yer first captain' },
335
+ boss5: { name: 'Sea Terror', desc: 'Defeat 5 captains' },
336
+ boss10: { name: 'Dread Pirate', desc: 'Defeat 10 captains' },
337
+ boss25: { name: 'Scourge of Seas', desc: 'Defeat 25 captains' },
338
+ streak3: { name: 'Fair Winds', desc: '3 day sailing streak' },
339
+ streak7: { name: 'Sea Legs', desc: '7 day sailing streak' },
340
+ streak14: { name: 'Old Salt', desc: '14 day sailing streak' },
341
+ streak30: { name: 'Legend of Seas', desc: '30 day sailing streak' },
342
+ depth3: { name: 'Deep Diver', desc: 'Dive to depth 3' },
343
+ depth5: { name: 'Wreck Explorer', desc: 'Dive to depth 5' },
344
+ depth10: { name: 'Davy Jones', desc: 'Dive to depth 10' },
345
+ speedrun: { name: 'Full Sail', desc: 'Same-day voyage' },
346
+ nightOwl: { name: 'Night Watch', desc: 'Voyage after midnight' },
347
+ earlyBird: { name: 'Dawn Raid', desc: 'Voyage before dawn' },
348
+ },
349
+ loot: {
350
+ common: ['Rum Bottle', 'Rope', 'Compass', 'Hardtack', 'Cannonball'],
351
+ uncommon: ['Cutlass', 'Pistol', 'Spyglass', 'Map Fragment', 'Parrot'],
352
+ rare: ['Treasure Map', 'Golden Compass', 'Enchanted Sails', 'Kraken Tooth', 'Mermaid Scale'],
353
+ epic: ['Flying Dutchman Wheel', 'Poseidon\'s Trident', 'Blackbeard\'s Flag', 'Cursed Aztec Gold', 'Jack\'s Compass'],
354
+ legendary: ['One Piece', 'Fountain of Youth', 'Dead Man\'s Chest', 'Calypso\'s Heart', 'Pirate King Crown'],
355
+ },
356
+ rarities: {
357
+ common: 'Common',
358
+ uncommon: 'Fine',
359
+ rare: 'Rare',
360
+ epic: 'Legendary',
361
+ legendary: 'Mythical',
362
+ },
363
+ stats: {
364
+ level: 'Rank',
365
+ xp: 'Doubloons',
366
+ tasksCompleted: 'Voyages Completed',
367
+ bossesDefeated: 'Captains Defeated',
368
+ currentStreak: 'Sailing Streak',
369
+ longestStreak: 'Longest Voyage',
370
+ inventory: 'Treasure Chest',
371
+ },
372
+ };
373
+ // Western dictionary
374
+ exports.WESTERN_DICTIONARY = {
375
+ messages: {
376
+ questCompleted: 'BOUNTY COLLECTED',
377
+ levelUp: 'REPUTATION INCREASED!',
378
+ newAchievement: 'LEGEND EARNED',
379
+ lootDropped: 'LOOT FOUND',
380
+ bossDefeated: 'OUTLAW CAPTURED',
381
+ streakBonus: 'COMBO BONUS',
382
+ taskBlocked: 'Trail blocked, partner',
383
+ taskUnblocked: 'The way is clear',
384
+ deadlineSet: 'Deadline posted',
385
+ deadlineOverdue: 'BOUNTY EXPIRED',
386
+ welcomeBack: 'Howdy, partner',
387
+ },
388
+ achievements: {
389
+ firstTask: { name: 'Greenhorn', desc: 'Complete first bounty' },
390
+ tasks10: { name: 'Deputy', desc: 'Complete 10 bounties' },
391
+ tasks50: { name: 'Sheriff', desc: 'Complete 50 bounties' },
392
+ tasks100: { name: 'Marshal', desc: 'Complete 100 bounties' },
393
+ tasks500: { name: 'Legend', desc: 'Complete 500 bounties' },
394
+ tasks1000: { name: 'Frontier Legend', desc: 'Complete 1000 bounties' },
395
+ boss1: { name: 'Outlaw Hunter', desc: 'Capture first outlaw' },
396
+ boss5: { name: 'Bounty Hunter', desc: 'Capture 5 outlaws' },
397
+ boss10: { name: 'Lawman', desc: 'Capture 10 outlaws' },
398
+ boss25: { name: 'Wild West Legend', desc: 'Capture 25 outlaws' },
399
+ streak3: { name: 'On the Trail', desc: '3 day hunt streak' },
400
+ streak7: { name: 'Relentless', desc: '7 day hunt streak' },
401
+ streak14: { name: 'Unstoppable', desc: '14 day hunt streak' },
402
+ streak30: { name: 'Living Legend', desc: '30 day hunt streak' },
403
+ depth3: { name: 'Canyon Rider', desc: 'Track to depth 3' },
404
+ depth5: { name: 'Desert Fox', desc: 'Track to depth 5' },
405
+ depth10: { name: 'Ghost Rider', desc: 'Track to depth 10' },
406
+ speedrun: { name: 'Quick Draw', desc: 'Same-day bounty' },
407
+ nightOwl: { name: 'Night Rider', desc: 'Bounty after midnight' },
408
+ earlyBird: { name: 'Dawn Patrol', desc: 'Bounty before dawn' },
409
+ },
410
+ loot: {
411
+ common: ['Bullets', 'Whiskey', 'Rope', 'Beans', 'Tobacco'],
412
+ uncommon: ['Revolver', 'Rifle', 'Stetson Hat', 'Spurs', 'Saddle'],
413
+ rare: ['Golden Revolver', 'Legendary Horse', 'Sheriff Badge', 'Wanted Poster', 'Dynamite'],
414
+ epic: ['Doc Holliday\'s Gun', 'Buffalo Bill\'s Rifle', 'Wild Bill\'s Aces', 'Jesse James\' Loot', 'Wyatt Earp\'s Badge'],
415
+ legendary: ['Fastest Gun', 'Frontier Justice', 'Legend\'s Reputation', 'Golden Sunset', 'West\'s Crown'],
416
+ },
417
+ rarities: {
418
+ common: 'Common',
419
+ uncommon: 'Fine',
420
+ rare: 'Rare',
421
+ epic: 'Legendary',
422
+ legendary: 'Mythical',
423
+ },
424
+ stats: {
425
+ level: 'Reputation',
426
+ xp: 'Dollars',
427
+ tasksCompleted: 'Bounties Collected',
428
+ bossesDefeated: 'Outlaws Captured',
429
+ currentStreak: 'Hunt Streak',
430
+ longestStreak: 'Longest Trail',
431
+ inventory: 'Saddlebag',
432
+ },
433
+ };
434
+ // Map preset names to dictionaries
435
+ exports.DICTIONARIES = {
436
+ default: exports.DEFAULT_DICTIONARY,
437
+ fantasy: exports.FANTASY_DICTIONARY,
438
+ space: exports.SPACE_DICTIONARY,
439
+ starwars: exports.STARWARS_DICTIONARY,
440
+ cyberpunk: exports.CYBERPUNK_DICTIONARY,
441
+ pirate: exports.PIRATE_DICTIONARY,
442
+ western: exports.WESTERN_DICTIONARY,
443
+ };
444
+ // Get dictionary based on rules preset
445
+ function getDictionary(preset) {
446
+ if (preset && exports.DICTIONARIES[preset]) {
447
+ return exports.DICTIONARIES[preset];
448
+ }
449
+ return exports.DEFAULT_DICTIONARY;
450
+ }
@@ -0,0 +1,141 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.rollForLoot = rollForLoot;
4
+ exports.formatLootDrop = formatLootDrop;
5
+ exports.formatInventory = formatInventory;
6
+ exports.calculateInventoryValue = calculateInventoryValue;
7
+ const dictionaries_1 = require("./dictionaries");
8
+ // Rarity drop chances by player level
9
+ // Higher level = higher chance for rare items, but overall drop rate decreases
10
+ function getDropChances(level) {
11
+ // Base drop rate decreases with level (starts at 30%, min 5%)
12
+ const baseDropRate = Math.max(0.05, 0.30 - (level * 0.01));
13
+ // Rarity weights shift toward rarer items at higher levels
14
+ const legendaryWeight = Math.min(0.05, level * 0.002);
15
+ const epicWeight = Math.min(0.10, level * 0.004);
16
+ const rareWeight = Math.min(0.20, 0.05 + level * 0.005);
17
+ const uncommonWeight = Math.min(0.30, 0.15 + level * 0.005);
18
+ const commonWeight = 1 - legendaryWeight - epicWeight - rareWeight - uncommonWeight;
19
+ return {
20
+ dropRate: baseDropRate,
21
+ rarityWeights: {
22
+ common: commonWeight,
23
+ uncommon: uncommonWeight,
24
+ rare: rareWeight,
25
+ epic: epicWeight,
26
+ legendary: legendaryWeight,
27
+ },
28
+ };
29
+ }
30
+ // Bonus multipliers for different sources
31
+ const SOURCE_MULTIPLIERS = {
32
+ task: 1.0,
33
+ levelup: 3.0, // 3x chance on level up
34
+ achievement: 2.5, // 2.5x chance on achievement
35
+ boss: 2.0, // 2x chance on boss
36
+ };
37
+ // Select random rarity based on weights
38
+ function selectRarity(weights) {
39
+ const roll = Math.random();
40
+ let cumulative = 0;
41
+ const rarities = ['common', 'uncommon', 'rare', 'epic', 'legendary'];
42
+ for (const rarity of rarities) {
43
+ cumulative += weights[rarity];
44
+ if (roll < cumulative) {
45
+ return rarity;
46
+ }
47
+ }
48
+ return 'common';
49
+ }
50
+ // Select random item from rarity pool
51
+ function selectItem(rarity, dict) {
52
+ const pool = dict.loot[rarity];
53
+ return pool[Math.floor(Math.random() * pool.length)];
54
+ }
55
+ // Main function to roll for loot
56
+ function rollForLoot(level, source, rulesPreset) {
57
+ const dict = (0, dictionaries_1.getDictionary)(rulesPreset);
58
+ const { dropRate, rarityWeights } = getDropChances(level);
59
+ // Apply source multiplier
60
+ const adjustedDropRate = Math.min(0.95, dropRate * (SOURCE_MULTIPLIERS[source] || 1.0));
61
+ // Roll for drop
62
+ if (Math.random() > adjustedDropRate) {
63
+ return { dropped: false };
64
+ }
65
+ // Select rarity and item
66
+ const rarity = selectRarity(rarityWeights);
67
+ const name = selectItem(rarity, dict);
68
+ return {
69
+ dropped: true,
70
+ item: {
71
+ name,
72
+ rarity,
73
+ droppedAt: new Date().toISOString(),
74
+ source,
75
+ },
76
+ };
77
+ }
78
+ // Format loot drop message
79
+ function formatLootDrop(item, dict) {
80
+ const rarityName = dict.rarities[item.rarity];
81
+ const raritySymbol = getRaritySymbol(item.rarity);
82
+ return `
83
+ === ${dict.messages.lootDropped} ===
84
+
85
+ ${raritySymbol} [${rarityName}] ${item.name}
86
+ `.trim();
87
+ }
88
+ // Get rarity symbol/color indicator
89
+ function getRaritySymbol(rarity) {
90
+ switch (rarity) {
91
+ case 'common': return '[.]';
92
+ case 'uncommon': return '[+]';
93
+ case 'rare': return '[*]';
94
+ case 'epic': return '[#]';
95
+ case 'legendary': return '[!]';
96
+ }
97
+ }
98
+ // Format inventory display
99
+ function formatInventory(inventory, dict) {
100
+ if (!inventory || inventory.length === 0) {
101
+ return `${dict.stats.inventory}: (empty)`;
102
+ }
103
+ // Group by rarity
104
+ const byRarity = {
105
+ legendary: [],
106
+ epic: [],
107
+ rare: [],
108
+ uncommon: [],
109
+ common: [],
110
+ };
111
+ for (const item of inventory) {
112
+ byRarity[item.rarity].push(item);
113
+ }
114
+ const lines = [`=== ${dict.stats.inventory} (${inventory.length} items) ===`, ''];
115
+ for (const rarity of ['legendary', 'epic', 'rare', 'uncommon', 'common']) {
116
+ const items = byRarity[rarity];
117
+ if (items.length > 0) {
118
+ const symbol = getRaritySymbol(rarity);
119
+ const rarityName = dict.rarities[rarity];
120
+ lines.push(`${rarityName}:`);
121
+ for (const item of items) {
122
+ lines.push(` ${symbol} ${item.name}`);
123
+ }
124
+ lines.push('');
125
+ }
126
+ }
127
+ return lines.join('\n').trim();
128
+ }
129
+ // Calculate inventory value (for stats)
130
+ function calculateInventoryValue(inventory) {
131
+ if (!inventory)
132
+ return 0;
133
+ const values = {
134
+ common: 1,
135
+ uncommon: 5,
136
+ rare: 25,
137
+ epic: 100,
138
+ legendary: 500,
139
+ };
140
+ return inventory.reduce((sum, item) => sum + values[item.rarity], 0);
141
+ }