various fixes
@@ -0,0 +1,13 @@
1
<IfModule mod_rewrite.c>
2
RewriteEngine On
3
4
# Remove .php from URLs (optional, depends on your setup)
5
# RewriteCond %{REQUEST_FILENAME} !-f
6
# RewriteCond %{REQUEST_FILENAME} !-d
7
# RewriteRule ^(.*)\.php$ $1 [L,R=301]
8
9
# Route all requests to index.php except for actual files and directories
10
RewriteCond %{REQUEST_FILENAME} !-f
11
RewriteCond %{REQUEST_FILENAME} !-d
12
RewriteRule ^(.*)$ index.php [QSA,L]
13
</IfModule>
@@ -0,0 +1,13 @@1
<IfModule mod_rewrite.c>2
RewriteEngine On3
4
# Remove .php from URLs (optional, depends on your setup)5
# RewriteCond %{REQUEST_FILENAME} !-f6
# RewriteCond %{REQUEST_FILENAME} !-d7
# RewriteRule ^(.*)\.php$ $1 [L,R=301]8
9
# Route all requests to index.php except for actual files and directories10
RewriteCond %{REQUEST_FILENAME} !-f11
RewriteCond %{REQUEST_FILENAME} !-d12
RewriteRule ^(.*)$ index.php [QSA,L]13
</IfModule>@@ -1,13 +0,0 @@
1
{
2
"name": "tribegen/game",
3
"description": "A browser-based Kobold tribe management game",
4
"type": "project",
5
"require": {
6
"php": ">=7.4"
7
},
8
"autoload": {
9
"psr-4": {
10
"TribeGen\\": "src/"
11
}
12
}
13
}
@@ -1,13 +0,0 @@1
{2
"name": "tribegen/game",3
"description": "A browser-based Kobold tribe management game",4
"type": "project",5
"require": {6
"php": ">=7.4"7
},8
"autoload": {9
"psr-4": {10
"TribeGen\\": "src/"11
}12
}13
}@@ -0,0 +1 @@
1
[]
@@ -0,0 +1 @@1
[]@@ -0,0 +1,442 @@
1
[
2
{
3
"id": "kob_69792c23573bd",
4
"name": "Kobold 1",
5
"age": 16,
6
"stats": {
7
"vitality": 80,
8
"intelligence": 97,
9
"tinkering": 57,
10
"medicine": 28,
11
"crafting": 70,
12
"personality": 78,
13
"will": 79
14
},
15
"sprite_morph": null,
16
"is_leader": false,
17
"is_alive": true,
18
"is_expelled": false,
19
"injuries": [],
20
"items": [],
21
"father_id": null,
22
"mother_id": null
23
},
24
{
25
"id": "kob_69792c2358404",
26
"name": "Kobold 2",
27
"age": 9,
28
"stats": {
29
"vitality": 39,
30
"intelligence": 85,
31
"tinkering": 16,
32
"medicine": 11,
33
"crafting": 8,
34
"personality": 68,
35
"will": 91
36
},
37
"sprite_morph": null,
38
"is_leader": false,
39
"is_alive": true,
40
"is_expelled": false,
41
"injuries": [],
42
"items": [],
43
"father_id": null,
44
"mother_id": null
45
},
46
{
47
"id": "kob_69792c2358ea1",
48
"name": "Kobold 3",
49
"age": 10,
50
"stats": {
51
"vitality": 65,
52
"intelligence": 6,
53
"tinkering": 78,
54
"medicine": 52,
55
"crafting": 25,
56
"personality": 64,
57
"will": 25
58
},
59
"sprite_morph": null,
60
"is_leader": false,
61
"is_alive": true,
62
"is_expelled": false,
63
"injuries": [],
64
"items": [],
65
"father_id": null,
66
"mother_id": null
67
},
68
{
69
"id": "kob_69792c2359963",
70
"name": "Kobold 4",
71
"age": 9,
72
"stats": {
73
"vitality": 90,
74
"intelligence": 24,
75
"tinkering": 56,
76
"medicine": 74,
77
"crafting": 30,
78
"personality": 87,
79
"will": 81
80
},
81
"sprite_morph": null,
82
"is_leader": false,
83
"is_alive": true,
84
"is_expelled": false,
85
"injuries": [],
86
"items": [],
87
"father_id": null,
88
"mother_id": null
89
},
90
{
91
"id": "kob_69792c235a165",
92
"name": "Kobold 5",
93
"age": 18,
94
"stats": {
95
"vitality": 80,
96
"intelligence": 99,
97
"tinkering": 92,
98
"medicine": 39,
99
"crafting": 87,
100
"personality": 34,
101
"will": 40
102
},
103
"sprite_morph": null,
104
"is_leader": false,
105
"is_alive": true,
106
"is_expelled": false,
107
"injuries": [],
108
"items": [],
109
"father_id": null,
110
"mother_id": null
111
},
112
{
113
"id": "kob_69792c235a988",
114
"name": "Kobold 6",
115
"age": 18,
116
"stats": {
117
"vitality": 17,
118
"intelligence": 58,
119
"tinkering": 89,
120
"medicine": 38,
121
"crafting": 69,
122
"personality": 34,
123
"will": 69
124
},
125
"sprite_morph": null,
126
"is_leader": false,
127
"is_alive": true,
128
"is_expelled": false,
129
"injuries": [],
130
"items": [],
131
"father_id": null,
132
"mother_id": null
133
},
134
{
135
"id": "kob_69792c235b30b",
136
"name": "Kobold 7",
137
"age": 13,
138
"stats": {
139
"vitality": 42,
140
"intelligence": 51,
141
"tinkering": 20,
142
"medicine": 26,
143
"crafting": 39,
144
"personality": 96,
145
"will": 90
146
},
147
"sprite_morph": null,
148
"is_leader": false,
149
"is_alive": true,
150
"is_expelled": false,
151
"injuries": [],
152
"items": [],
153
"father_id": null,
154
"mother_id": null
155
},
156
{
157
"id": "kob_69792c235bc80",
158
"name": "Kobold 8",
159
"age": 16,
160
"stats": {
161
"vitality": 98,
162
"intelligence": 1,
163
"tinkering": 96,
164
"medicine": 81,
165
"crafting": 58,
166
"personality": 93,
167
"will": 37
168
},
169
"sprite_morph": null,
170
"is_leader": false,
171
"is_alive": true,
172
"is_expelled": false,
173
"injuries": [],
174
"items": [],
175
"father_id": null,
176
"mother_id": null
177
},
178
{
179
"id": "kob_69792c235c46d",
180
"name": "Kobold 9",
181
"age": 11,
182
"stats": {
183
"vitality": 36,
184
"intelligence": 32,
185
"tinkering": 63,
186
"medicine": 1,
187
"crafting": 66,
188
"personality": 99,
189
"will": 58
190
},
191
"sprite_morph": null,
192
"is_leader": false,
193
"is_alive": true,
194
"is_expelled": false,
195
"injuries": [],
196
"items": [],
197
"father_id": null,
198
"mother_id": null
199
},
200
{
201
"id": "kob_69792c235d37a",
202
"name": "Kobold 10",
203
"age": 11,
204
"stats": {
205
"vitality": 78,
206
"intelligence": 88,
207
"tinkering": 24,
208
"medicine": 92,
209
"crafting": 37,
210
"personality": 89,
211
"will": 83
212
},
213
"sprite_morph": null,
214
"is_leader": false,
215
"is_alive": true,
216
"is_expelled": false,
217
"injuries": [],
218
"items": [],
219
"father_id": null,
220
"mother_id": null
221
},
222
{
223
"id": "kob_69792c235ddd6",
224
"name": "Kobold 11",
225
"age": 6,
226
"stats": {
227
"vitality": 82,
228
"intelligence": 77,
229
"tinkering": 36,
230
"medicine": 24,
231
"crafting": 90,
232
"personality": 44,
233
"will": 89
234
},
235
"sprite_morph": null,
236
"is_leader": false,
237
"is_alive": true,
238
"is_expelled": false,
239
"injuries": [],
240
"items": [],
241
"father_id": null,
242
"mother_id": null
243
},
244
{
245
"id": "kob_69792c235e6e7",
246
"name": "Kobold 12",
247
"age": 15,
248
"stats": {
249
"vitality": 22,
250
"intelligence": 69,
251
"tinkering": 29,
252
"medicine": 82,
253
"crafting": 18,
254
"personality": 63,
255
"will": 48
256
},
257
"sprite_morph": null,
258
"is_leader": false,
259
"is_alive": true,
260
"is_expelled": false,
261
"injuries": [],
262
"items": [],
263
"father_id": null,
264
"mother_id": null
265
},
266
{
267
"id": "kob_69792c235efe9",
268
"name": "Kobold 13",
269
"age": 11,
270
"stats": {
271
"vitality": 74,
272
"intelligence": 15,
273
"tinkering": 3,
274
"medicine": 21,
275
"crafting": 19,
276
"personality": 68,
277
"will": 48
278
},
279
"sprite_morph": null,
280
"is_leader": false,
281
"is_alive": true,
282
"is_expelled": false,
283
"injuries": [],
284
"items": [],
285
"father_id": null,
286
"mother_id": null
287
},
288
{
289
"id": "kob_69792c235f806",
290
"name": "Kobold 14",
291
"age": 13,
292
"stats": {
293
"vitality": 89,
294
"intelligence": 79,
295
"tinkering": 6,
296
"medicine": 48,
297
"crafting": 63,
298
"personality": 82,
299
"will": 77
300
},
301
"sprite_morph": null,
302
"is_leader": false,
303
"is_alive": true,
304
"is_expelled": false,
305
"injuries": [],
306
"items": [],
307
"father_id": null,
308
"mother_id": null
309
},
310
{
311
"id": "kob_69792c235ff99",
312
"name": "Kobold 15",
313
"age": 9,
314
"stats": {
315
"vitality": 91,
316
"intelligence": 91,
317
"tinkering": 9,
318
"medicine": 85,
319
"crafting": 18,
320
"personality": 81,
321
"will": 46
322
},
323
"sprite_morph": null,
324
"is_leader": false,
325
"is_alive": true,
326
"is_expelled": false,
327
"injuries": [],
328
"items": [],
329
"father_id": null,
330
"mother_id": null
331
},
332
{
333
"id": "kob_69792c2360769",
334
"name": "Kobold 16",
335
"age": 13,
336
"stats": {
337
"vitality": 65,
338
"intelligence": 78,
339
"tinkering": 39,
340
"medicine": 78,
341
"crafting": 82,
342
"personality": 72,
343
"will": 61
344
},
345
"sprite_morph": null,
346
"is_leader": false,
347
"is_alive": true,
348
"is_expelled": false,
349
"injuries": [],
350
"items": [],
351
"father_id": null,
352
"mother_id": null
353
},
354
{
355
"id": "kob_69792c236147b",
356
"name": "Kobold 17",
357
"age": 6,
358
"stats": {
359
"vitality": 10,
360
"intelligence": 68,
361
"tinkering": 26,
362
"medicine": 45,
363
"crafting": 88,
364
"personality": 74,
365
"will": 44
366
},
367
"sprite_morph": null,
368
"is_leader": false,
369
"is_alive": true,
370
"is_expelled": false,
371
"injuries": [],
372
"items": [],
373
"father_id": null,
374
"mother_id": null
375
},
376
{
377
"id": "kob_69792c2361ced",
378
"name": "Kobold 18",
379
"age": 7,
380
"stats": {
381
"vitality": 9,
382
"intelligence": 29,
383
"tinkering": 13,
384
"medicine": 81,
385
"crafting": 95,
386
"personality": 91,
387
"will": 65
388
},
389
"sprite_morph": null,
390
"is_leader": false,
391
"is_alive": true,
392
"is_expelled": false,
393
"injuries": [],
394
"items": [],
395
"father_id": null,
396
"mother_id": null
397
},
398
{
399
"id": "kob_69792c23627bf",
400
"name": "Kobold 19",
401
"age": 7,
402
"stats": {
403
"vitality": 0,
404
"intelligence": 56,
405
"tinkering": 54,
406
"medicine": 61,
407
"crafting": 53,
408
"personality": 89,
409
"will": 65
410
},
411
"sprite_morph": null,
412
"is_leader": false,
413
"is_alive": true,
414
"is_expelled": false,
415
"injuries": [],
416
"items": [],
417
"father_id": null,
418
"mother_id": null
419
},
420
{
421
"id": "kob_69792c2362fbb",
422
"name": "Kobold 20",
423
"age": 10,
424
"stats": {
425
"vitality": 11,
426
"intelligence": 71,
427
"tinkering": 75,
428
"medicine": 94,
429
"crafting": 76,
430
"personality": 98,
431
"will": 55
432
},
433
"sprite_morph": null,
434
"is_leader": false,
435
"is_alive": true,
436
"is_expelled": false,
437
"injuries": [],
438
"items": [],
439
"father_id": null,
440
"mother_id": null
441
}
442
]
@@ -0,0 +1,442 @@1
[2
{3
"id": "kob_69792c23573bd",4
"name": "Kobold 1",5
"age": 16,6
"stats": {7
"vitality": 80,8
"intelligence": 97,9
"tinkering": 57,10
"medicine": 28,11
"crafting": 70,12
"personality": 78,13
"will": 7914
},15
"sprite_morph": null,16
"is_leader": false,17
"is_alive": true,18
"is_expelled": false,19
"injuries": [],20
"items": [],21
"father_id": null,22
"mother_id": null23
},24
{25
"id": "kob_69792c2358404",26
"name": "Kobold 2",27
"age": 9,28
"stats": {29
"vitality": 39,30
"intelligence": 85,31
"tinkering": 16,32
"medicine": 11,33
"crafting": 8,34
"personality": 68,35
"will": 9136
},37
"sprite_morph": null,38
"is_leader": false,39
"is_alive": true,40
"is_expelled": false,41
"injuries": [],42
"items": [],43
"father_id": null,44
"mother_id": null45
},46
{47
"id": "kob_69792c2358ea1",48
"name": "Kobold 3",49
"age": 10,50
"stats": {51
"vitality": 65,52
"intelligence": 6,53
"tinkering": 78,54
"medicine": 52,55
"crafting": 25,56
"personality": 64,57
"will": 2558
},59
"sprite_morph": null,60
"is_leader": false,61
"is_alive": true,62
"is_expelled": false,63
"injuries": [],64
"items": [],65
"father_id": null,66
"mother_id": null67
},68
{69
"id": "kob_69792c2359963",70
"name": "Kobold 4",71
"age": 9,72
"stats": {73
"vitality": 90,74
"intelligence": 24,75
"tinkering": 56,76
"medicine": 74,77
"crafting": 30,78
"personality": 87,79
"will": 8180
},81
"sprite_morph": null,82
"is_leader": false,83
"is_alive": true,84
"is_expelled": false,85
"injuries": [],86
"items": [],87
"father_id": null,88
"mother_id": null89
},90
{91
"id": "kob_69792c235a165",92
"name": "Kobold 5",93
"age": 18,94
"stats": {95
"vitality": 80,96
"intelligence": 99,97
"tinkering": 92,98
"medicine": 39,99
"crafting": 87,100
"personality": 34,101
"will": 40102
},103
"sprite_morph": null,104
"is_leader": false,105
"is_alive": true,106
"is_expelled": false,107
"injuries": [],108
"items": [],109
"father_id": null,110
"mother_id": null111
},112
{113
"id": "kob_69792c235a988",114
"name": "Kobold 6",115
"age": 18,116
"stats": {117
"vitality": 17,118
"intelligence": 58,119
"tinkering": 89,120
"medicine": 38,121
"crafting": 69,122
"personality": 34,123
"will": 69124
},125
"sprite_morph": null,126
"is_leader": false,127
"is_alive": true,128
"is_expelled": false,129
"injuries": [],130
"items": [],131
"father_id": null,132
"mother_id": null133
},134
{135
"id": "kob_69792c235b30b",136
"name": "Kobold 7",137
"age": 13,138
"stats": {139
"vitality": 42,140
"intelligence": 51,141
"tinkering": 20,142
"medicine": 26,143
"crafting": 39,144
"personality": 96,145
"will": 90146
},147
"sprite_morph": null,148
"is_leader": false,149
"is_alive": true,150
"is_expelled": false,151
"injuries": [],152
"items": [],153
"father_id": null,154
"mother_id": null155
},156
{157
"id": "kob_69792c235bc80",158
"name": "Kobold 8",159
"age": 16,160
"stats": {161
"vitality": 98,162
"intelligence": 1,163
"tinkering": 96,164
"medicine": 81,165
"crafting": 58,166
"personality": 93,167
"will": 37168
},169
"sprite_morph": null,170
"is_leader": false,171
"is_alive": true,172
"is_expelled": false,173
"injuries": [],174
"items": [],175
"father_id": null,176
"mother_id": null177
},178
{179
"id": "kob_69792c235c46d",180
"name": "Kobold 9",181
"age": 11,182
"stats": {183
"vitality": 36,184
"intelligence": 32,185
"tinkering": 63,186
"medicine": 1,187
"crafting": 66,188
"personality": 99,189
"will": 58190
},191
"sprite_morph": null,192
"is_leader": false,193
"is_alive": true,194
"is_expelled": false,195
"injuries": [],196
"items": [],197
"father_id": null,198
"mother_id": null199
},200
{201
"id": "kob_69792c235d37a",202
"name": "Kobold 10",203
"age": 11,204
"stats": {205
"vitality": 78,206
"intelligence": 88,207
"tinkering": 24,208
"medicine": 92,209
"crafting": 37,210
"personality": 89,211
"will": 83212
},213
"sprite_morph": null,214
"is_leader": false,215
"is_alive": true,216
"is_expelled": false,217
"injuries": [],218
"items": [],219
"father_id": null,220
"mother_id": null221
},222
{223
"id": "kob_69792c235ddd6",224
"name": "Kobold 11",225
"age": 6,226
"stats": {227
"vitality": 82,228
"intelligence": 77,229
"tinkering": 36,230
"medicine": 24,231
"crafting": 90,232
"personality": 44,233
"will": 89234
},235
"sprite_morph": null,236
"is_leader": false,237
"is_alive": true,238
"is_expelled": false,239
"injuries": [],240
"items": [],241
"father_id": null,242
"mother_id": null243
},244
{245
"id": "kob_69792c235e6e7",246
"name": "Kobold 12",247
"age": 15,248
"stats": {249
"vitality": 22,250
"intelligence": 69,251
"tinkering": 29,252
"medicine": 82,253
"crafting": 18,254
"personality": 63,255
"will": 48256
},257
"sprite_morph": null,258
"is_leader": false,259
"is_alive": true,260
"is_expelled": false,261
"injuries": [],262
"items": [],263
"father_id": null,264
"mother_id": null265
},266
{267
"id": "kob_69792c235efe9",268
"name": "Kobold 13",269
"age": 11,270
"stats": {271
"vitality": 74,272
"intelligence": 15,273
"tinkering": 3,274
"medicine": 21,275
"crafting": 19,276
"personality": 68,277
"will": 48278
},279
"sprite_morph": null,280
"is_leader": false,281
"is_alive": true,282
"is_expelled": false,283
"injuries": [],284
"items": [],285
"father_id": null,286
"mother_id": null287
},288
{289
"id": "kob_69792c235f806",290
"name": "Kobold 14",291
"age": 13,292
"stats": {293
"vitality": 89,294
"intelligence": 79,295
"tinkering": 6,296
"medicine": 48,297
"crafting": 63,298
"personality": 82,299
"will": 77300
},301
"sprite_morph": null,302
"is_leader": false,303
"is_alive": true,304
"is_expelled": false,305
"injuries": [],306
"items": [],307
"father_id": null,308
"mother_id": null309
},310
{311
"id": "kob_69792c235ff99",312
"name": "Kobold 15",313
"age": 9,314
"stats": {315
"vitality": 91,316
"intelligence": 91,317
"tinkering": 9,318
"medicine": 85,319
"crafting": 18,320
"personality": 81,321
"will": 46322
},323
"sprite_morph": null,324
"is_leader": false,325
"is_alive": true,326
"is_expelled": false,327
"injuries": [],328
"items": [],329
"father_id": null,330
"mother_id": null331
},332
{333
"id": "kob_69792c2360769",334
"name": "Kobold 16",335
"age": 13,336
"stats": {337
"vitality": 65,338
"intelligence": 78,339
"tinkering": 39,340
"medicine": 78,341
"crafting": 82,342
"personality": 72,343
"will": 61344
},345
"sprite_morph": null,346
"is_leader": false,347
"is_alive": true,348
"is_expelled": false,349
"injuries": [],350
"items": [],351
"father_id": null,352
"mother_id": null353
},354
{355
"id": "kob_69792c236147b",356
"name": "Kobold 17",357
"age": 6,358
"stats": {359
"vitality": 10,360
"intelligence": 68,361
"tinkering": 26,362
"medicine": 45,363
"crafting": 88,364
"personality": 74,365
"will": 44366
},367
"sprite_morph": null,368
"is_leader": false,369
"is_alive": true,370
"is_expelled": false,371
"injuries": [],372
"items": [],373
"father_id": null,374
"mother_id": null375
},376
{377
"id": "kob_69792c2361ced",378
"name": "Kobold 18",379
"age": 7,380
"stats": {381
"vitality": 9,382
"intelligence": 29,383
"tinkering": 13,384
"medicine": 81,385
"crafting": 95,386
"personality": 91,387
"will": 65388
},389
"sprite_morph": null,390
"is_leader": false,391
"is_alive": true,392
"is_expelled": false,393
"injuries": [],394
"items": [],395
"father_id": null,396
"mother_id": null397
},398
{399
"id": "kob_69792c23627bf",400
"name": "Kobold 19",401
"age": 7,402
"stats": {403
"vitality": 0,404
"intelligence": 56,405
"tinkering": 54,406
"medicine": 61,407
"crafting": 53,408
"personality": 89,409
"will": 65410
},411
"sprite_morph": null,412
"is_leader": false,413
"is_alive": true,414
"is_expelled": false,415
"injuries": [],416
"items": [],417
"father_id": null,418
"mother_id": null419
},420
{421
"id": "kob_69792c2362fbb",422
"name": "Kobold 20",423
"age": 10,424
"stats": {425
"vitality": 11,426
"intelligence": 71,427
"tinkering": 75,428
"medicine": 94,429
"crafting": 76,430
"personality": 98,431
"will": 55432
},433
"sprite_morph": null,434
"is_leader": false,435
"is_alive": true,436
"is_expelled": false,437
"injuries": [],438
"items": [],439
"father_id": null,440
"mother_id": null441
}442
]@@ -0,0 +1,8 @@
1
{
2
"name": "Tester",
3
"current_month": 0,
4
"current_season": "spring",
5
"food_count": 0,
6
"created_at": "2026-01-27 21:20:35",
7
"last_played": "2026-01-27 21:20:35"
8
}
@@ -0,0 +1,8 @@1
{2
"name": "Tester",3
"current_month": 0,4
"current_season": "spring",5
"food_count": 0,6
"created_at": "2026-01-27 21:20:35",7
"last_played": "2026-01-27 21:20:35"8
}@@ -0,0 +1 @@
1
[]
@@ -0,0 +1 @@1
[]@@ -0,0 +1,442 @@
1
[
2
{
3
"id": "kob_69792c4ca960e",
4
"name": "Kobold 1",
5
"age": 7,
6
"stats": {
7
"vitality": 44,
8
"intelligence": 16,
9
"tinkering": 27,
10
"medicine": 69,
11
"crafting": 48,
12
"personality": 54,
13
"will": 77
14
},
15
"sprite_morph": null,
16
"is_leader": false,
17
"is_alive": true,
18
"is_expelled": false,
19
"injuries": [],
20
"items": [],
21
"father_id": null,
22
"mother_id": null
23
},
24
{
25
"id": "kob_69792c4ca9d99",
26
"name": "Kobold 2",
27
"age": 20,
28
"stats": {
29
"vitality": 77,
30
"intelligence": 43,
31
"tinkering": 23,
32
"medicine": 39,
33
"crafting": 74,
34
"personality": 48,
35
"will": 75
36
},
37
"sprite_morph": null,
38
"is_leader": false,
39
"is_alive": true,
40
"is_expelled": false,
41
"injuries": [],
42
"items": [],
43
"father_id": null,
44
"mother_id": null
45
},
46
{
47
"id": "kob_69792c4caa90b",
48
"name": "Kobold 3",
49
"age": 10,
50
"stats": {
51
"vitality": 35,
52
"intelligence": 64,
53
"tinkering": 74,
54
"medicine": 16,
55
"crafting": 95,
56
"personality": 85,
57
"will": 54
58
},
59
"sprite_morph": null,
60
"is_leader": false,
61
"is_alive": true,
62
"is_expelled": false,
63
"injuries": [],
64
"items": [],
65
"father_id": null,
66
"mother_id": null
67
},
68
{
69
"id": "kob_69792c4cab2b6",
70
"name": "Kobold 4",
71
"age": 8,
72
"stats": {
73
"vitality": 91,
74
"intelligence": 26,
75
"tinkering": 56,
76
"medicine": 87,
77
"crafting": 60,
78
"personality": 49,
79
"will": 94
80
},
81
"sprite_morph": null,
82
"is_leader": false,
83
"is_alive": true,
84
"is_expelled": false,
85
"injuries": [],
86
"items": [],
87
"father_id": null,
88
"mother_id": null
89
},
90
{
91
"id": "kob_69792c4caba83",
92
"name": "Kobold 5",
93
"age": 8,
94
"stats": {
95
"vitality": 36,
96
"intelligence": 4,
97
"tinkering": 55,
98
"medicine": 69,
99
"crafting": 11,
100
"personality": 35,
101
"will": 28
102
},
103
"sprite_morph": null,
104
"is_leader": false,
105
"is_alive": true,
106
"is_expelled": false,
107
"injuries": [],
108
"items": [],
109
"father_id": null,
110
"mother_id": null
111
},
112
{
113
"id": "kob_69792c4cac2a6",
114
"name": "Kobold 6",
115
"age": 19,
116
"stats": {
117
"vitality": 40,
118
"intelligence": 15,
119
"tinkering": 18,
120
"medicine": 51,
121
"crafting": 45,
122
"personality": 51,
123
"will": 65
124
},
125
"sprite_morph": null,
126
"is_leader": false,
127
"is_alive": true,
128
"is_expelled": false,
129
"injuries": [],
130
"items": [],
131
"father_id": null,
132
"mother_id": null
133
},
134
{
135
"id": "kob_69792c4caca28",
136
"name": "Kobold 7",
137
"age": 14,
138
"stats": {
139
"vitality": 6,
140
"intelligence": 53,
141
"tinkering": 81,
142
"medicine": 52,
143
"crafting": 86,
144
"personality": 10,
145
"will": 42
146
},
147
"sprite_morph": null,
148
"is_leader": false,
149
"is_alive": true,
150
"is_expelled": false,
151
"injuries": [],
152
"items": [],
153
"father_id": null,
154
"mother_id": null
155
},
156
{
157
"id": "kob_69792c4cad1d9",
158
"name": "Kobold 8",
159
"age": 8,
160
"stats": {
161
"vitality": 36,
162
"intelligence": 37,
163
"tinkering": 95,
164
"medicine": 53,
165
"crafting": 37,
166
"personality": 65,
167
"will": 76
168
},
169
"sprite_morph": null,
170
"is_leader": false,
171
"is_alive": true,
172
"is_expelled": false,
173
"injuries": [],
174
"items": [],
175
"father_id": null,
176
"mother_id": null
177
},
178
{
179
"id": "kob_69792c4cad987",
180
"name": "Kobold 9",
181
"age": 14,
182
"stats": {
183
"vitality": 90,
184
"intelligence": 54,
185
"tinkering": 44,
186
"medicine": 85,
187
"crafting": 51,
188
"personality": 41,
189
"will": 77
190
},
191
"sprite_morph": null,
192
"is_leader": false,
193
"is_alive": true,
194
"is_expelled": false,
195
"injuries": [],
196
"items": [],
197
"father_id": null,
198
"mother_id": null
199
},
200
{
201
"id": "kob_69792c4cae21f",
202
"name": "Kobold 10",
203
"age": 11,
204
"stats": {
205
"vitality": 64,
206
"intelligence": 80,
207
"tinkering": 30,
208
"medicine": 15,
209
"crafting": 16,
210
"personality": 9,
211
"will": 44
212
},
213
"sprite_morph": null,
214
"is_leader": false,
215
"is_alive": true,
216
"is_expelled": false,
217
"injuries": [],
218
"items": [],
219
"father_id": null,
220
"mother_id": null
221
},
222
{
223
"id": "kob_69792c4caee65",
224
"name": "Kobold 11",
225
"age": 10,
226
"stats": {
227
"vitality": 74,
228
"intelligence": 8,
229
"tinkering": 74,
230
"medicine": 17,
231
"crafting": 65,
232
"personality": 22,
233
"will": 82
234
},
235
"sprite_morph": null,
236
"is_leader": false,
237
"is_alive": true,
238
"is_expelled": false,
239
"injuries": [],
240
"items": [],
241
"father_id": null,
242
"mother_id": null
243
},
244
{
245
"id": "kob_69792c4caf800",
246
"name": "Kobold 12",
247
"age": 7,
248
"stats": {
249
"vitality": 37,
250
"intelligence": 58,
251
"tinkering": 78,
252
"medicine": 73,
253
"crafting": 82,
254
"personality": 32,
255
"will": 61
256
},
257
"sprite_morph": null,
258
"is_leader": false,
259
"is_alive": true,
260
"is_expelled": false,
261
"injuries": [],
262
"items": [],
263
"father_id": null,
264
"mother_id": null
265
},
266
{
267
"id": "kob_69792c4caff89",
268
"name": "Kobold 13",
269
"age": 8,
270
"stats": {
271
"vitality": 33,
272
"intelligence": 67,
273
"tinkering": 27,
274
"medicine": 83,
275
"crafting": 100,
276
"personality": 11,
277
"will": 46
278
},
279
"sprite_morph": null,
280
"is_leader": false,
281
"is_alive": true,
282
"is_expelled": false,
283
"injuries": [],
284
"items": [],
285
"father_id": null,
286
"mother_id": null
287
},
288
{
289
"id": "kob_69792c4cb06b5",
290
"name": "Kobold 14",
291
"age": 19,
292
"stats": {
293
"vitality": 79,
294
"intelligence": 15,
295
"tinkering": 94,
296
"medicine": 81,
297
"crafting": 3,
298
"personality": 65,
299
"will": 96
300
},
301
"sprite_morph": null,
302
"is_leader": false,
303
"is_alive": true,
304
"is_expelled": false,
305
"injuries": [],
306
"items": [],
307
"father_id": null,
308
"mother_id": null
309
},
310
{
311
"id": "kob_69792c4cb0eab",
312
"name": "Kobold 15",
313
"age": 8,
314
"stats": {
315
"vitality": 16,
316
"intelligence": 84,
317
"tinkering": 61,
318
"medicine": 89,
319
"crafting": 62,
320
"personality": 22,
321
"will": 27
322
},
323
"sprite_morph": null,
324
"is_leader": false,
325
"is_alive": true,
326
"is_expelled": false,
327
"injuries": [],
328
"items": [],
329
"father_id": null,
330
"mother_id": null
331
},
332
{
333
"id": "kob_69792c4cb16ad",
334
"name": "Kobold 16",
335
"age": 16,
336
"stats": {
337
"vitality": 56,
338
"intelligence": 43,
339
"tinkering": 43,
340
"medicine": 57,
341
"crafting": 14,
342
"personality": 67,
343
"will": 13
344
},
345
"sprite_morph": null,
346
"is_leader": false,
347
"is_alive": true,
348
"is_expelled": false,
349
"injuries": [],
350
"items": [],
351
"father_id": null,
352
"mother_id": null
353
},
354
{
355
"id": "kob_69792c4cb1f22",
356
"name": "Kobold 17",
357
"age": 20,
358
"stats": {
359
"vitality": 29,
360
"intelligence": 13,
361
"tinkering": 25,
362
"medicine": 21,
363
"crafting": 98,
364
"personality": 65,
365
"will": 1
366
},
367
"sprite_morph": null,
368
"is_leader": false,
369
"is_alive": true,
370
"is_expelled": false,
371
"injuries": [],
372
"items": [],
373
"father_id": null,
374
"mother_id": null
375
},
376
{
377
"id": "kob_69792c4cb2bb3",
378
"name": "Kobold 18",
379
"age": 15,
380
"stats": {
381
"vitality": 74,
382
"intelligence": 93,
383
"tinkering": 43,
384
"medicine": 65,
385
"crafting": 37,
386
"personality": 7,
387
"will": 34
388
},
389
"sprite_morph": null,
390
"is_leader": false,
391
"is_alive": true,
392
"is_expelled": false,
393
"injuries": [],
394
"items": [],
395
"father_id": null,
396
"mother_id": null
397
},
398
{
399
"id": "kob_69792c4cb3356",
400
"name": "Kobold 19",
401
"age": 12,
402
"stats": {
403
"vitality": 37,
404
"intelligence": 64,
405
"tinkering": 100,
406
"medicine": 12,
407
"crafting": 98,
408
"personality": 25,
409
"will": 23
410
},
411
"sprite_morph": null,
412
"is_leader": false,
413
"is_alive": true,
414
"is_expelled": false,
415
"injuries": [],
416
"items": [],
417
"father_id": null,
418
"mother_id": null
419
},
420
{
421
"id": "kob_69792c4cb3d8c",
422
"name": "Kobold 20",
423
"age": 6,
424
"stats": {
425
"vitality": 95,
426
"intelligence": 67,
427
"tinkering": 46,
428
"medicine": 64,
429
"crafting": 62,
430
"personality": 32,
431
"will": 98
432
},
433
"sprite_morph": null,
434
"is_leader": false,
435
"is_alive": true,
436
"is_expelled": false,
437
"injuries": [],
438
"items": [],
439
"father_id": null,
440
"mother_id": null
441
}
442
]
@@ -0,0 +1,442 @@1
[2
{3
"id": "kob_69792c4ca960e",4
"name": "Kobold 1",5
"age": 7,6
"stats": {7
"vitality": 44,8
"intelligence": 16,9
"tinkering": 27,10
"medicine": 69,11
"crafting": 48,12
"personality": 54,13
"will": 7714
},15
"sprite_morph": null,16
"is_leader": false,17
"is_alive": true,18
"is_expelled": false,19
"injuries": [],20
"items": [],21
"father_id": null,22
"mother_id": null23
},24
{25
"id": "kob_69792c4ca9d99",26
"name": "Kobold 2",27
"age": 20,28
"stats": {29
"vitality": 77,30
"intelligence": 43,31
"tinkering": 23,32
"medicine": 39,33
"crafting": 74,34
"personality": 48,35
"will": 7536
},37
"sprite_morph": null,38
"is_leader": false,39
"is_alive": true,40
"is_expelled": false,41
"injuries": [],42
"items": [],43
"father_id": null,44
"mother_id": null45
},46
{47
"id": "kob_69792c4caa90b",48
"name": "Kobold 3",49
"age": 10,50
"stats": {51
"vitality": 35,52
"intelligence": 64,53
"tinkering": 74,54
"medicine": 16,55
"crafting": 95,56
"personality": 85,57
"will": 5458
},59
"sprite_morph": null,60
"is_leader": false,61
"is_alive": true,62
"is_expelled": false,63
"injuries": [],64
"items": [],65
"father_id": null,66
"mother_id": null67
},68
{69
"id": "kob_69792c4cab2b6",70
"name": "Kobold 4",71
"age": 8,72
"stats": {73
"vitality": 91,74
"intelligence": 26,75
"tinkering": 56,76
"medicine": 87,77
"crafting": 60,78
"personality": 49,79
"will": 9480
},81
"sprite_morph": null,82
"is_leader": false,83
"is_alive": true,84
"is_expelled": false,85
"injuries": [],86
"items": [],87
"father_id": null,88
"mother_id": null89
},90
{91
"id": "kob_69792c4caba83",92
"name": "Kobold 5",93
"age": 8,94
"stats": {95
"vitality": 36,96
"intelligence": 4,97
"tinkering": 55,98
"medicine": 69,99
"crafting": 11,100
"personality": 35,101
"will": 28102
},103
"sprite_morph": null,104
"is_leader": false,105
"is_alive": true,106
"is_expelled": false,107
"injuries": [],108
"items": [],109
"father_id": null,110
"mother_id": null111
},112
{113
"id": "kob_69792c4cac2a6",114
"name": "Kobold 6",115
"age": 19,116
"stats": {117
"vitality": 40,118
"intelligence": 15,119
"tinkering": 18,120
"medicine": 51,121
"crafting": 45,122
"personality": 51,123
"will": 65124
},125
"sprite_morph": null,126
"is_leader": false,127
"is_alive": true,128
"is_expelled": false,129
"injuries": [],130
"items": [],131
"father_id": null,132
"mother_id": null133
},134
{135
"id": "kob_69792c4caca28",136
"name": "Kobold 7",137
"age": 14,138
"stats": {139
"vitality": 6,140
"intelligence": 53,141
"tinkering": 81,142
"medicine": 52,143
"crafting": 86,144
"personality": 10,145
"will": 42146
},147
"sprite_morph": null,148
"is_leader": false,149
"is_alive": true,150
"is_expelled": false,151
"injuries": [],152
"items": [],153
"father_id": null,154
"mother_id": null155
},156
{157
"id": "kob_69792c4cad1d9",158
"name": "Kobold 8",159
"age": 8,160
"stats": {161
"vitality": 36,162
"intelligence": 37,163
"tinkering": 95,164
"medicine": 53,165
"crafting": 37,166
"personality": 65,167
"will": 76168
},169
"sprite_morph": null,170
"is_leader": false,171
"is_alive": true,172
"is_expelled": false,173
"injuries": [],174
"items": [],175
"father_id": null,176
"mother_id": null177
},178
{179
"id": "kob_69792c4cad987",180
"name": "Kobold 9",181
"age": 14,182
"stats": {183
"vitality": 90,184
"intelligence": 54,185
"tinkering": 44,186
"medicine": 85,187
"crafting": 51,188
"personality": 41,189
"will": 77190
},191
"sprite_morph": null,192
"is_leader": false,193
"is_alive": true,194
"is_expelled": false,195
"injuries": [],196
"items": [],197
"father_id": null,198
"mother_id": null199
},200
{201
"id": "kob_69792c4cae21f",202
"name": "Kobold 10",203
"age": 11,204
"stats": {205
"vitality": 64,206
"intelligence": 80,207
"tinkering": 30,208
"medicine": 15,209
"crafting": 16,210
"personality": 9,211
"will": 44212
},213
"sprite_morph": null,214
"is_leader": false,215
"is_alive": true,216
"is_expelled": false,217
"injuries": [],218
"items": [],219
"father_id": null,220
"mother_id": null221
},222
{223
"id": "kob_69792c4caee65",224
"name": "Kobold 11",225
"age": 10,226
"stats": {227
"vitality": 74,228
"intelligence": 8,229
"tinkering": 74,230
"medicine": 17,231
"crafting": 65,232
"personality": 22,233
"will": 82234
},235
"sprite_morph": null,236
"is_leader": false,237
"is_alive": true,238
"is_expelled": false,239
"injuries": [],240
"items": [],241
"father_id": null,242
"mother_id": null243
},244
{245
"id": "kob_69792c4caf800",246
"name": "Kobold 12",247
"age": 7,248
"stats": {249
"vitality": 37,250
"intelligence": 58,251
"tinkering": 78,252
"medicine": 73,253
"crafting": 82,254
"personality": 32,255
"will": 61256
},257
"sprite_morph": null,258
"is_leader": false,259
"is_alive": true,260
"is_expelled": false,261
"injuries": [],262
"items": [],263
"father_id": null,264
"mother_id": null265
},266
{267
"id": "kob_69792c4caff89",268
"name": "Kobold 13",269
"age": 8,270
"stats": {271
"vitality": 33,272
"intelligence": 67,273
"tinkering": 27,274
"medicine": 83,275
"crafting": 100,276
"personality": 11,277
"will": 46278
},279
"sprite_morph": null,280
"is_leader": false,281
"is_alive": true,282
"is_expelled": false,283
"injuries": [],284
"items": [],285
"father_id": null,286
"mother_id": null287
},288
{289
"id": "kob_69792c4cb06b5",290
"name": "Kobold 14",291
"age": 19,292
"stats": {293
"vitality": 79,294
"intelligence": 15,295
"tinkering": 94,296
"medicine": 81,297
"crafting": 3,298
"personality": 65,299
"will": 96300
},301
"sprite_morph": null,302
"is_leader": false,303
"is_alive": true,304
"is_expelled": false,305
"injuries": [],306
"items": [],307
"father_id": null,308
"mother_id": null309
},310
{311
"id": "kob_69792c4cb0eab",312
"name": "Kobold 15",313
"age": 8,314
"stats": {315
"vitality": 16,316
"intelligence": 84,317
"tinkering": 61,318
"medicine": 89,319
"crafting": 62,320
"personality": 22,321
"will": 27322
},323
"sprite_morph": null,324
"is_leader": false,325
"is_alive": true,326
"is_expelled": false,327
"injuries": [],328
"items": [],329
"father_id": null,330
"mother_id": null331
},332
{333
"id": "kob_69792c4cb16ad",334
"name": "Kobold 16",335
"age": 16,336
"stats": {337
"vitality": 56,338
"intelligence": 43,339
"tinkering": 43,340
"medicine": 57,341
"crafting": 14,342
"personality": 67,343
"will": 13344
},345
"sprite_morph": null,346
"is_leader": false,347
"is_alive": true,348
"is_expelled": false,349
"injuries": [],350
"items": [],351
"father_id": null,352
"mother_id": null353
},354
{355
"id": "kob_69792c4cb1f22",356
"name": "Kobold 17",357
"age": 20,358
"stats": {359
"vitality": 29,360
"intelligence": 13,361
"tinkering": 25,362
"medicine": 21,363
"crafting": 98,364
"personality": 65,365
"will": 1366
},367
"sprite_morph": null,368
"is_leader": false,369
"is_alive": true,370
"is_expelled": false,371
"injuries": [],372
"items": [],373
"father_id": null,374
"mother_id": null375
},376
{377
"id": "kob_69792c4cb2bb3",378
"name": "Kobold 18",379
"age": 15,380
"stats": {381
"vitality": 74,382
"intelligence": 93,383
"tinkering": 43,384
"medicine": 65,385
"crafting": 37,386
"personality": 7,387
"will": 34388
},389
"sprite_morph": null,390
"is_leader": false,391
"is_alive": true,392
"is_expelled": false,393
"injuries": [],394
"items": [],395
"father_id": null,396
"mother_id": null397
},398
{399
"id": "kob_69792c4cb3356",400
"name": "Kobold 19",401
"age": 12,402
"stats": {403
"vitality": 37,404
"intelligence": 64,405
"tinkering": 100,406
"medicine": 12,407
"crafting": 98,408
"personality": 25,409
"will": 23410
},411
"sprite_morph": null,412
"is_leader": false,413
"is_alive": true,414
"is_expelled": false,415
"injuries": [],416
"items": [],417
"father_id": null,418
"mother_id": null419
},420
{421
"id": "kob_69792c4cb3d8c",422
"name": "Kobold 20",423
"age": 6,424
"stats": {425
"vitality": 95,426
"intelligence": 67,427
"tinkering": 46,428
"medicine": 64,429
"crafting": 62,430
"personality": 32,431
"will": 98432
},433
"sprite_morph": null,434
"is_leader": false,435
"is_alive": true,436
"is_expelled": false,437
"injuries": [],438
"items": [],439
"father_id": null,440
"mother_id": null441
}442
]@@ -0,0 +1,8 @@
1
{
2
"name": "Tester",
3
"current_month": 0,
4
"current_season": "spring",
5
"food_count": 0,
6
"created_at": "2026-01-27 21:21:16",
7
"last_played": "2026-01-27 21:21:16"
8
}
@@ -0,0 +1,8 @@1
{2
"name": "Tester",3
"current_month": 0,4
"current_season": "spring",5
"food_count": 0,6
"created_at": "2026-01-27 21:21:16",7
"last_played": "2026-01-27 21:21:16"8
}@@ -0,0 +1 @@
1
[]
@@ -0,0 +1 @@1
[]@@ -0,0 +1,442 @@
1
[
2
{
3
"id": "kob_69792c6084f10",
4
"name": "Kobold 1",
5
"age": 13,
6
"stats": {
7
"vitality": 13,
8
"intelligence": 41,
9
"tinkering": 4,
10
"medicine": 91,
11
"crafting": 43,
12
"personality": 40,
13
"will": 78
14
},
15
"sprite_morph": null,
16
"is_leader": false,
17
"is_alive": true,
18
"is_expelled": false,
19
"injuries": [],
20
"items": [],
21
"father_id": null,
22
"mother_id": null
23
},
24
{
25
"id": "kob_69792c6085b9c",
26
"name": "Kobold 2",
27
"age": 17,
28
"stats": {
29
"vitality": 29,
30
"intelligence": 53,
31
"tinkering": 13,
32
"medicine": 67,
33
"crafting": 13,
34
"personality": 83,
35
"will": 20
36
},
37
"sprite_morph": null,
38
"is_leader": false,
39
"is_alive": true,
40
"is_expelled": false,
41
"injuries": [],
42
"items": [],
43
"father_id": null,
44
"mother_id": null
45
},
46
{
47
"id": "kob_69792c60867c2",
48
"name": "Kobold 3",
49
"age": 9,
50
"stats": {
51
"vitality": 23,
52
"intelligence": 89,
53
"tinkering": 53,
54
"medicine": 58,
55
"crafting": 62,
56
"personality": 46,
57
"will": 45
58
},
59
"sprite_morph": null,
60
"is_leader": false,
61
"is_alive": true,
62
"is_expelled": false,
63
"injuries": [],
64
"items": [],
65
"father_id": null,
66
"mother_id": null
67
},
68
{
69
"id": "kob_69792c6086fc3",
70
"name": "Kobold 4",
71
"age": 20,
72
"stats": {
73
"vitality": 88,
74
"intelligence": 21,
75
"tinkering": 96,
76
"medicine": 59,
77
"crafting": 23,
78
"personality": 6,
79
"will": 7
80
},
81
"sprite_morph": null,
82
"is_leader": false,
83
"is_alive": true,
84
"is_expelled": false,
85
"injuries": [],
86
"items": [],
87
"father_id": null,
88
"mother_id": null
89
},
90
{
91
"id": "kob_69792c60877f2",
92
"name": "Kobold 5",
93
"age": 19,
94
"stats": {
95
"vitality": 51,
96
"intelligence": 64,
97
"tinkering": 90,
98
"medicine": 72,
99
"crafting": 28,
100
"personality": 62,
101
"will": 28
102
},
103
"sprite_morph": null,
104
"is_leader": false,
105
"is_alive": true,
106
"is_expelled": false,
107
"injuries": [],
108
"items": [],
109
"father_id": null,
110
"mother_id": null
111
},
112
{
113
"id": "kob_69792c608800b",
114
"name": "Kobold 6",
115
"age": 11,
116
"stats": {
117
"vitality": 41,
118
"intelligence": 49,
119
"tinkering": 81,
120
"medicine": 14,
121
"crafting": 33,
122
"personality": 65,
123
"will": 85
124
},
125
"sprite_morph": null,
126
"is_leader": false,
127
"is_alive": true,
128
"is_expelled": false,
129
"injuries": [],
130
"items": [],
131
"father_id": null,
132
"mother_id": null
133
},
134
{
135
"id": "kob_69792c60887eb",
136
"name": "Kobold 7",
137
"age": 11,
138
"stats": {
139
"vitality": 77,
140
"intelligence": 67,
141
"tinkering": 6,
142
"medicine": 56,
143
"crafting": 12,
144
"personality": 81,
145
"will": 5
146
},
147
"sprite_morph": null,
148
"is_leader": false,
149
"is_alive": true,
150
"is_expelled": false,
151
"injuries": [],
152
"items": [],
153
"father_id": null,
154
"mother_id": null
155
},
156
{
157
"id": "kob_69792c6088ff7",
158
"name": "Kobold 8",
159
"age": 12,
160
"stats": {
161
"vitality": 88,
162
"intelligence": 15,
163
"tinkering": 75,
164
"medicine": 64,
165
"crafting": 35,
166
"personality": 61,
167
"will": 72
168
},
169
"sprite_morph": null,
170
"is_leader": false,
171
"is_alive": true,
172
"is_expelled": false,
173
"injuries": [],
174
"items": [],
175
"father_id": null,
176
"mother_id": null
177
},
178
{
179
"id": "kob_69792c60899df",
180
"name": "Kobold 9",
181
"age": 15,
182
"stats": {
183
"vitality": 0,
184
"intelligence": 10,
185
"tinkering": 94,
186
"medicine": 46,
187
"crafting": 21,
188
"personality": 84,
189
"will": 99
190
},
191
"sprite_morph": null,
192
"is_leader": false,
193
"is_alive": true,
194
"is_expelled": false,
195
"injuries": [],
196
"items": [],
197
"father_id": null,
198
"mother_id": null
199
},
200
{
201
"id": "kob_69792c608a371",
202
"name": "Kobold 10",
203
"age": 8,
204
"stats": {
205
"vitality": 100,
206
"intelligence": 15,
207
"tinkering": 80,
208
"medicine": 98,
209
"crafting": 50,
210
"personality": 15,
211
"will": 84
212
},
213
"sprite_morph": null,
214
"is_leader": false,
215
"is_alive": true,
216
"is_expelled": false,
217
"injuries": [],
218
"items": [],
219
"father_id": null,
220
"mother_id": null
221
},
222
{
223
"id": "kob_69792c608ac34",
224
"name": "Kobold 11",
225
"age": 14,
226
"stats": {
227
"vitality": 89,
228
"intelligence": 5,
229
"tinkering": 10,
230
"medicine": 61,
231
"crafting": 11,
232
"personality": 23,
233
"will": 33
234
},
235
"sprite_morph": null,
236
"is_leader": false,
237
"is_alive": true,
238
"is_expelled": false,
239
"injuries": [],
240
"items": [],
241
"father_id": null,
242
"mother_id": null
243
},
244
{
245
"id": "kob_69792c608b4e1",
246
"name": "Kobold 12",
247
"age": 6,
248
"stats": {
249
"vitality": 95,
250
"intelligence": 78,
251
"tinkering": 77,
252
"medicine": 22,
253
"crafting": 28,
254
"personality": 47,
255
"will": 30
256
},
257
"sprite_morph": null,
258
"is_leader": false,
259
"is_alive": true,
260
"is_expelled": false,
261
"injuries": [],
262
"items": [],
263
"father_id": null,
264
"mother_id": null
265
},
266
{
267
"id": "kob_69792c608be21",
268
"name": "Kobold 13",
269
"age": 10,
270
"stats": {
271
"vitality": 27,
272
"intelligence": 42,
273
"tinkering": 53,
274
"medicine": 52,
275
"crafting": 56,
276
"personality": 83,
277
"will": 70
278
},
279
"sprite_morph": null,
280
"is_leader": false,
281
"is_alive": true,
282
"is_expelled": false,
283
"injuries": [],
284
"items": [],
285
"father_id": null,
286
"mother_id": null
287
},
288
{
289
"id": "kob_69792c608c6e4",
290
"name": "Kobold 14",
291
"age": 17,
292
"stats": {
293
"vitality": 62,
294
"intelligence": 46,
295
"tinkering": 28,
296
"medicine": 53,
297
"crafting": 79,
298
"personality": 70,
299
"will": 44
300
},
301
"sprite_morph": null,
302
"is_leader": false,
303
"is_alive": true,
304
"is_expelled": false,
305
"injuries": [],
306
"items": [],
307
"father_id": null,
308
"mother_id": null
309
},
310
{
311
"id": "kob_69792c608d19b",
312
"name": "Kobold 15",
313
"age": 10,
314
"stats": {
315
"vitality": 82,
316
"intelligence": 32,
317
"tinkering": 15,
318
"medicine": 63,
319
"crafting": 24,
320
"personality": 30,
321
"will": 27
322
},
323
"sprite_morph": null,
324
"is_leader": false,
325
"is_alive": true,
326
"is_expelled": false,
327
"injuries": [],
328
"items": [],
329
"father_id": null,
330
"mother_id": null
331
},
332
{
333
"id": "kob_69792c608de63",
334
"name": "Kobold 16",
335
"age": 12,
336
"stats": {
337
"vitality": 31,
338
"intelligence": 70,
339
"tinkering": 95,
340
"medicine": 14,
341
"crafting": 36,
342
"personality": 93,
343
"will": 80
344
},
345
"sprite_morph": null,
346
"is_leader": false,
347
"is_alive": true,
348
"is_expelled": false,
349
"injuries": [],
350
"items": [],
351
"father_id": null,
352
"mother_id": null
353
},
354
{
355
"id": "kob_69792c608e89e",
356
"name": "Kobold 17",
357
"age": 14,
358
"stats": {
359
"vitality": 78,
360
"intelligence": 84,
361
"tinkering": 65,
362
"medicine": 17,
363
"crafting": 94,
364
"personality": 29,
365
"will": 42
366
},
367
"sprite_morph": null,
368
"is_leader": false,
369
"is_alive": true,
370
"is_expelled": false,
371
"injuries": [],
372
"items": [],
373
"father_id": null,
374
"mother_id": null
375
},
376
{
377
"id": "kob_69792c608f057",
378
"name": "Kobold 18",
379
"age": 12,
380
"stats": {
381
"vitality": 22,
382
"intelligence": 33,
383
"tinkering": 65,
384
"medicine": 10,
385
"crafting": 76,
386
"personality": 9,
387
"will": 97
388
},
389
"sprite_morph": null,
390
"is_leader": false,
391
"is_alive": true,
392
"is_expelled": false,
393
"injuries": [],
394
"items": [],
395
"father_id": null,
396
"mother_id": null
397
},
398
{
399
"id": "kob_69792c608f811",
400
"name": "Kobold 19",
401
"age": 12,
402
"stats": {
403
"vitality": 9,
404
"intelligence": 53,
405
"tinkering": 74,
406
"medicine": 8,
407
"crafting": 81,
408
"personality": 84,
409
"will": 80
410
},
411
"sprite_morph": null,
412
"is_leader": false,
413
"is_alive": true,
414
"is_expelled": false,
415
"injuries": [],
416
"items": [],
417
"father_id": null,
418
"mother_id": null
419
},
420
{
421
"id": "kob_69792c6090040",
422
"name": "Kobold 20",
423
"age": 20,
424
"stats": {
425
"vitality": 33,
426
"intelligence": 15,
427
"tinkering": 66,
428
"medicine": 16,
429
"crafting": 19,
430
"personality": 70,
431
"will": 55
432
},
433
"sprite_morph": null,
434
"is_leader": false,
435
"is_alive": true,
436
"is_expelled": false,
437
"injuries": [],
438
"items": [],
439
"father_id": null,
440
"mother_id": null
441
}
442
]
@@ -0,0 +1,442 @@1
[2
{3
"id": "kob_69792c6084f10",4
"name": "Kobold 1",5
"age": 13,6
"stats": {7
"vitality": 13,8
"intelligence": 41,9
"tinkering": 4,10
"medicine": 91,11
"crafting": 43,12
"personality": 40,13
"will": 7814
},15
"sprite_morph": null,16
"is_leader": false,17
"is_alive": true,18
"is_expelled": false,19
"injuries": [],20
"items": [],21
"father_id": null,22
"mother_id": null23
},24
{25
"id": "kob_69792c6085b9c",26
"name": "Kobold 2",27
"age": 17,28
"stats": {29
"vitality": 29,30
"intelligence": 53,31
"tinkering": 13,32
"medicine": 67,33
"crafting": 13,34
"personality": 83,35
"will": 2036
},37
"sprite_morph": null,38
"is_leader": false,39
"is_alive": true,40
"is_expelled": false,41
"injuries": [],42
"items": [],43
"father_id": null,44
"mother_id": null45
},46
{47
"id": "kob_69792c60867c2",48
"name": "Kobold 3",49
"age": 9,50
"stats": {51
"vitality": 23,52
"intelligence": 89,53
"tinkering": 53,54
"medicine": 58,55
"crafting": 62,56
"personality": 46,57
"will": 4558
},59
"sprite_morph": null,60
"is_leader": false,61
"is_alive": true,62
"is_expelled": false,63
"injuries": [],64
"items": [],65
"father_id": null,66
"mother_id": null67
},68
{69
"id": "kob_69792c6086fc3",70
"name": "Kobold 4",71
"age": 20,72
"stats": {73
"vitality": 88,74
"intelligence": 21,75
"tinkering": 96,76
"medicine": 59,77
"crafting": 23,78
"personality": 6,79
"will": 780
},81
"sprite_morph": null,82
"is_leader": false,83
"is_alive": true,84
"is_expelled": false,85
"injuries": [],86
"items": [],87
"father_id": null,88
"mother_id": null89
},90
{91
"id": "kob_69792c60877f2",92
"name": "Kobold 5",93
"age": 19,94
"stats": {95
"vitality": 51,96
"intelligence": 64,97
"tinkering": 90,98
"medicine": 72,99
"crafting": 28,100
"personality": 62,101
"will": 28102
},103
"sprite_morph": null,104
"is_leader": false,105
"is_alive": true,106
"is_expelled": false,107
"injuries": [],108
"items": [],109
"father_id": null,110
"mother_id": null111
},112
{113
"id": "kob_69792c608800b",114
"name": "Kobold 6",115
"age": 11,116
"stats": {117
"vitality": 41,118
"intelligence": 49,119
"tinkering": 81,120
"medicine": 14,121
"crafting": 33,122
"personality": 65,123
"will": 85124
},125
"sprite_morph": null,126
"is_leader": false,127
"is_alive": true,128
"is_expelled": false,129
"injuries": [],130
"items": [],131
"father_id": null,132
"mother_id": null133
},134
{135
"id": "kob_69792c60887eb",136
"name": "Kobold 7",137
"age": 11,138
"stats": {139
"vitality": 77,140
"intelligence": 67,141
"tinkering": 6,142
"medicine": 56,143
"crafting": 12,144
"personality": 81,145
"will": 5146
},147
"sprite_morph": null,148
"is_leader": false,149
"is_alive": true,150
"is_expelled": false,151
"injuries": [],152
"items": [],153
"father_id": null,154
"mother_id": null155
},156
{157
"id": "kob_69792c6088ff7",158
"name": "Kobold 8",159
"age": 12,160
"stats": {161
"vitality": 88,162
"intelligence": 15,163
"tinkering": 75,164
"medicine": 64,165
"crafting": 35,166
"personality": 61,167
"will": 72168
},169
"sprite_morph": null,170
"is_leader": false,171
"is_alive": true,172
"is_expelled": false,173
"injuries": [],174
"items": [],175
"father_id": null,176
"mother_id": null177
},178
{179
"id": "kob_69792c60899df",180
"name": "Kobold 9",181
"age": 15,182
"stats": {183
"vitality": 0,184
"intelligence": 10,185
"tinkering": 94,186
"medicine": 46,187
"crafting": 21,188
"personality": 84,189
"will": 99190
},191
"sprite_morph": null,192
"is_leader": false,193
"is_alive": true,194
"is_expelled": false,195
"injuries": [],196
"items": [],197
"father_id": null,198
"mother_id": null199
},200
{201
"id": "kob_69792c608a371",202
"name": "Kobold 10",203
"age": 8,204
"stats": {205
"vitality": 100,206
"intelligence": 15,207
"tinkering": 80,208
"medicine": 98,209
"crafting": 50,210
"personality": 15,211
"will": 84212
},213
"sprite_morph": null,214
"is_leader": false,215
"is_alive": true,216
"is_expelled": false,217
"injuries": [],218
"items": [],219
"father_id": null,220
"mother_id": null221
},222
{223
"id": "kob_69792c608ac34",224
"name": "Kobold 11",225
"age": 14,226
"stats": {227
"vitality": 89,228
"intelligence": 5,229
"tinkering": 10,230
"medicine": 61,231
"crafting": 11,232
"personality": 23,233
"will": 33234
},235
"sprite_morph": null,236
"is_leader": false,237
"is_alive": true,238
"is_expelled": false,239
"injuries": [],240
"items": [],241
"father_id": null,242
"mother_id": null243
},244
{245
"id": "kob_69792c608b4e1",246
"name": "Kobold 12",247
"age": 6,248
"stats": {249
"vitality": 95,250
"intelligence": 78,251
"tinkering": 77,252
"medicine": 22,253
"crafting": 28,254
"personality": 47,255
"will": 30256
},257
"sprite_morph": null,258
"is_leader": false,259
"is_alive": true,260
"is_expelled": false,261
"injuries": [],262
"items": [],263
"father_id": null,264
"mother_id": null265
},266
{267
"id": "kob_69792c608be21",268
"name": "Kobold 13",269
"age": 10,270
"stats": {271
"vitality": 27,272
"intelligence": 42,273
"tinkering": 53,274
"medicine": 52,275
"crafting": 56,276
"personality": 83,277
"will": 70278
},279
"sprite_morph": null,280
"is_leader": false,281
"is_alive": true,282
"is_expelled": false,283
"injuries": [],284
"items": [],285
"father_id": null,286
"mother_id": null287
},288
{289
"id": "kob_69792c608c6e4",290
"name": "Kobold 14",291
"age": 17,292
"stats": {293
"vitality": 62,294
"intelligence": 46,295
"tinkering": 28,296
"medicine": 53,297
"crafting": 79,298
"personality": 70,299
"will": 44300
},301
"sprite_morph": null,302
"is_leader": false,303
"is_alive": true,304
"is_expelled": false,305
"injuries": [],306
"items": [],307
"father_id": null,308
"mother_id": null309
},310
{311
"id": "kob_69792c608d19b",312
"name": "Kobold 15",313
"age": 10,314
"stats": {315
"vitality": 82,316
"intelligence": 32,317
"tinkering": 15,318
"medicine": 63,319
"crafting": 24,320
"personality": 30,321
"will": 27322
},323
"sprite_morph": null,324
"is_leader": false,325
"is_alive": true,326
"is_expelled": false,327
"injuries": [],328
"items": [],329
"father_id": null,330
"mother_id": null331
},332
{333
"id": "kob_69792c608de63",334
"name": "Kobold 16",335
"age": 12,336
"stats": {337
"vitality": 31,338
"intelligence": 70,339
"tinkering": 95,340
"medicine": 14,341
"crafting": 36,342
"personality": 93,343
"will": 80344
},345
"sprite_morph": null,346
"is_leader": false,347
"is_alive": true,348
"is_expelled": false,349
"injuries": [],350
"items": [],351
"father_id": null,352
"mother_id": null353
},354
{355
"id": "kob_69792c608e89e",356
"name": "Kobold 17",357
"age": 14,358
"stats": {359
"vitality": 78,360
"intelligence": 84,361
"tinkering": 65,362
"medicine": 17,363
"crafting": 94,364
"personality": 29,365
"will": 42366
},367
"sprite_morph": null,368
"is_leader": false,369
"is_alive": true,370
"is_expelled": false,371
"injuries": [],372
"items": [],373
"father_id": null,374
"mother_id": null375
},376
{377
"id": "kob_69792c608f057",378
"name": "Kobold 18",379
"age": 12,380
"stats": {381
"vitality": 22,382
"intelligence": 33,383
"tinkering": 65,384
"medicine": 10,385
"crafting": 76,386
"personality": 9,387
"will": 97388
},389
"sprite_morph": null,390
"is_leader": false,391
"is_alive": true,392
"is_expelled": false,393
"injuries": [],394
"items": [],395
"father_id": null,396
"mother_id": null397
},398
{399
"id": "kob_69792c608f811",400
"name": "Kobold 19",401
"age": 12,402
"stats": {403
"vitality": 9,404
"intelligence": 53,405
"tinkering": 74,406
"medicine": 8,407
"crafting": 81,408
"personality": 84,409
"will": 80410
},411
"sprite_morph": null,412
"is_leader": false,413
"is_alive": true,414
"is_expelled": false,415
"injuries": [],416
"items": [],417
"father_id": null,418
"mother_id": null419
},420
{421
"id": "kob_69792c6090040",422
"name": "Kobold 20",423
"age": 20,424
"stats": {425
"vitality": 33,426
"intelligence": 15,427
"tinkering": 66,428
"medicine": 16,429
"crafting": 19,430
"personality": 70,431
"will": 55432
},433
"sprite_morph": null,434
"is_leader": false,435
"is_alive": true,436
"is_expelled": false,437
"injuries": [],438
"items": [],439
"father_id": null,440
"mother_id": null441
}442
]@@ -0,0 +1,8 @@
1
{
2
"name": "Tester",
3
"current_month": 0,
4
"current_season": "spring",
5
"food_count": 0,
6
"created_at": "2026-01-27 21:21:36",
7
"last_played": "2026-01-27 21:21:36"
8
}
@@ -0,0 +1,8 @@1
{2
"name": "Tester",3
"current_month": 0,4
"current_season": "spring",5
"food_count": 0,6
"created_at": "2026-01-27 21:21:36",7
"last_played": "2026-01-27 21:21:36"8
}@@ -0,0 +1 @@
1
[]
@@ -0,0 +1 @@1
[]@@ -0,0 +1 @@
1
[]
@@ -0,0 +1 @@1
[]@@ -0,0 +1,8 @@
1
{
2
"name": "Tester",
3
"current_month": 0,
4
"current_season": "spring",
5
"food_count": 0,
6
"created_at": "2026-01-27 21:21:59",
7
"last_played": "2026-01-27 21:21:59"
8
}
@@ -0,0 +1,8 @@1
{2
"name": "Tester",3
"current_month": 0,4
"current_season": "spring",5
"food_count": 0,6
"created_at": "2026-01-27 21:21:59",7
"last_played": "2026-01-27 21:21:59"8
}@@ -0,0 +1 @@
1
[]
@@ -0,0 +1 @@1
[]@@ -0,0 +1 @@
1
[]
@@ -0,0 +1 @@1
[]@@ -0,0 +1,8 @@
1
{
2
"name": "Tester",
3
"current_month": 0,
4
"current_season": "spring",
5
"food_count": 0,
6
"created_at": "2026-01-27 21:24:58",
7
"last_played": "2026-01-27 21:24:58"
8
}
@@ -0,0 +1,8 @@1
{2
"name": "Tester",3
"current_month": 0,4
"current_season": "spring",5
"food_count": 0,6
"created_at": "2026-01-27 21:24:58",7
"last_played": "2026-01-27 21:24:58"8
}The contents of this binary file are not shown.
@@ -1,2 +0,0 @@
1
# This directory stores user save data and temporary files
2
# It will be automatically populated when users create tribes
@@ -1,2 +0,0 @@1
# This directory stores user save data and temporary files2
# It will be automatically populated when users create tribes@@ -284,7 +284,7 @@ End the current month and progress the game.
284
284
285
285
```javascript
286
286
// Registration
287
const response = await fetch('/tribegen/api/auth/register', {
287
const response = await fetch('/api/auth/register', {
288
288
method: 'POST',
289
289
headers: { 'Content-Type': 'application/json' },
290
290
body: JSON.stringify({
@@ -295,7 +295,7 @@ const response = await fetch('/tribegen/api/auth/register', {
295
295
const data = await response.json();
296
296
297
297
// Use token for authenticated requests
298
const gameResponse = await fetch('/tribegen/api/game/list', {
298
const gameResponse = await fetch('/api/game/list', {
299
299
method: 'GET',
300
300
headers: { 'Authorization': `Bearer ${data.user.token}` }
301
301
});
@@ -284,7 +284,7 @@ End the current month and progress the game.284
284
285
```javascript285
```javascript286
// Registration286
// Registration287
const response = await fetch('/tribegen/api/auth/register', {287
const response = await fetch('/api/auth/register', {288
method: 'POST',288
method: 'POST',289
headers: { 'Content-Type': 'application/json' },289
headers: { 'Content-Type': 'application/json' },290
body: JSON.stringify({ 290
body: JSON.stringify({ @@ -295,7 +295,7 @@ const response = await fetch('/tribegen/api/auth/register', {295
const data = await response.json();295
const data = await response.json();296
296
297
// Use token for authenticated requests297
// Use token for authenticated requests298
const gameResponse = await fetch('/tribegen/api/game/list', {298
const gameResponse = await fetch('/api/game/list', {299
method: 'GET',299
method: 'GET',300
headers: { 'Authorization': `Bearer ${data.user.token}` }300
headers: { 'Authorization': `Bearer ${data.user.token}` }301
});301
});@@ -1,10 +1,8 @@
1
1
<?php
2
2
session_start();
3
3
4
require_once __DIR__ . '/../vendor/autoload.php';
5
6
use TribeGen\Database\Database;
7
4
require_once __DIR__ . '/vendor/autoload.php';
5
require_once __DIR__ . '/src/Database/Database.php';
8
6
// Initialize database if needed
9
7
Database::getInstance()->initializeTables();
10
8
@@ -13,6 +11,10 @@ $path = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
13
11
$path = str_replace('/tribegen', '', $path);
14
12
15
13
// API routes
14
if (strpos($path, '/web') === 0) {
15
$path = substr($path, 4);
16
}
17
16
18
if (strpos($path, '/api/') === 0) {
17
19
header('Content-Type: application/json');
18
20
@@ -20,26 +22,26 @@ if (strpos($path, '/api/') === 0) {
20
22
21
23
// Auth routes
22
24
if ($apiPath === 'auth/register') {
23
include __DIR__ . '/../src/api/auth.php';
25
include __DIR__ . '/src/api/auth.php';
24
26
} elseif ($apiPath === 'auth/login') {
25
include __DIR__ . '/../src/api/auth.php';
27
include __DIR__ . '/src/api/auth.php';
26
28
} elseif ($apiPath === 'auth/logout') {
27
include __DIR__ . '/../src/api/auth.php';
29
include __DIR__ . '/src/api/auth.php';
28
30
} elseif ($apiPath === 'game/new') {
29
include __DIR__ . '/../src/api/game.php';
31
include __DIR__ . '/src/api/game.php';
30
32
} elseif ($apiPath === 'game/load') {
31
include __DIR__ . '/../src/api/game.php';
33
include __DIR__ . '/src/api/game.php';
32
34
} elseif ($apiPath === 'game/save') {
33
include __DIR__ . '/../src/api/game.php';
35
include __DIR__ . '/src/api/game.php';
34
36
} elseif ($apiPath === 'game/generation') {
35
include __DIR__ . '/../src/api/game.php';
37
include __DIR__ . '/src/api/game.php';
36
38
} elseif ($apiPath === 'game/event') {
37
include __DIR__ . '/../src/api/game.php';
39
include __DIR__ . '/src/api/game.php';
38
40
} else {
39
41
http_response_code(404);
40
42
echo json_encode(['error' => 'Not found']);
41
43
}
42
44
} else {
43
45
// Serve index.html for all other routes (SPA)
44
include __DIR__ . '/index.html';
46
include __DIR__ . '/indexHtml.html';
45
47
}
@@ -1,10 +1,8 @@1
<?php1
<?php2
session_start();2
session_start();3
3
4
require_once __DIR__ . '/../vendor/autoload.php';4
require_once __DIR__ . '/vendor/autoload.php';5
5
require_once __DIR__ . '/src/Database/Database.php';6
use TribeGen\Database\Database;7
8
// Initialize database if needed6
// Initialize database if needed9
Database::getInstance()->initializeTables();7
Database::getInstance()->initializeTables();10
8
@@ -13,6 +11,10 @@ $path = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);13
$path = str_replace('/tribegen', '', $path);11
$path = str_replace('/tribegen', '', $path);14
12
15
// API routes13
// API routes14
if (strpos($path, '/web') === 0) {15
$path = substr($path, 4);16
}17
16
if (strpos($path, '/api/') === 0) {18
if (strpos($path, '/api/') === 0) {17
header('Content-Type: application/json');19
header('Content-Type: application/json');18
20
@@ -20,26 +22,26 @@ if (strpos($path, '/api/') === 0) {20
22
21
// Auth routes23
// Auth routes22
if ($apiPath === 'auth/register') {24
if ($apiPath === 'auth/register') {23
include __DIR__ . '/../src/api/auth.php';25
include __DIR__ . '/src/api/auth.php';24
} elseif ($apiPath === 'auth/login') {26
} elseif ($apiPath === 'auth/login') {25
include __DIR__ . '/../src/api/auth.php';27
include __DIR__ . '/src/api/auth.php';26
} elseif ($apiPath === 'auth/logout') {28
} elseif ($apiPath === 'auth/logout') {27
include __DIR__ . '/../src/api/auth.php';29
include __DIR__ . '/src/api/auth.php';28
} elseif ($apiPath === 'game/new') {30
} elseif ($apiPath === 'game/new') {29
include __DIR__ . '/../src/api/game.php';31
include __DIR__ . '/src/api/game.php';30
} elseif ($apiPath === 'game/load') {32
} elseif ($apiPath === 'game/load') {31
include __DIR__ . '/../src/api/game.php';33
include __DIR__ . '/src/api/game.php';32
} elseif ($apiPath === 'game/save') {34
} elseif ($apiPath === 'game/save') {33
include __DIR__ . '/../src/api/game.php';35
include __DIR__ . '/src/api/game.php';34
} elseif ($apiPath === 'game/generation') {36
} elseif ($apiPath === 'game/generation') {35
include __DIR__ . '/../src/api/game.php';37
include __DIR__ . '/src/api/game.php';36
} elseif ($apiPath === 'game/event') {38
} elseif ($apiPath === 'game/event') {37
include __DIR__ . '/../src/api/game.php';39
include __DIR__ . '/src/api/game.php';38
} else {40
} else {39
http_response_code(404);41
http_response_code(404);40
echo json_encode(['error' => 'Not found']);42
echo json_encode(['error' => 'Not found']);41
}43
}42
} else {44
} else {43
// Serve index.html for all other routes (SPA)45
// Serve index.html for all other routes (SPA)44
include __DIR__ . '/index.html';46
include __DIR__ . '/indexHtml.html';45
}47
}@@ -5,7 +5,7 @@
5
5
<meta charset="UTF-8">
6
6
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7
7
<title>TribeGen - Kobold Tribe Manager</title>
8
<link rel="stylesheet" href="/tribegen/css/style.css">
8
<link rel="stylesheet" href="css/style.css">
9
9
</head>
10
10
11
11
<body>
@@ -147,7 +147,7 @@
147
147
</div>
148
148
</div>
149
149
150
<script src="/tribegen/js/app.js"></script>
150
<script src="js/app.js"></script>
151
151
</body>
152
152
153
153
</html>
@@ -5,7 +5,7 @@5
<meta charset="UTF-8">5
<meta charset="UTF-8">6
<meta name="viewport" content="width=device-width, initial-scale=1.0">6
<meta name="viewport" content="width=device-width, initial-scale=1.0">7
<title>TribeGen - Kobold Tribe Manager</title>7
<title>TribeGen - Kobold Tribe Manager</title>8
<link rel="stylesheet" href="/tribegen/css/style.css">8
<link rel="stylesheet" href="css/style.css">9
</head>9
</head>10
10
11
<body>11
<body>@@ -147,7 +147,7 @@147
</div>147
</div>148
</div>148
</div>149
149
150
<script src="/tribegen/js/app.js"></script>150
<script src="js/app.js"></script>151
</body>151
</body>152
152
153
</html>153
</html>@@ -74,13 +74,15 @@ class TribeGenApp
74
74
75
75
try
76
76
{
77
const response = await fetch('/tribegen/api/auth/login', {
77
const response = await fetch('api/auth/login', {
78
78
method: 'POST',
79
79
headers: { 'Content-Type': 'application/json' },
80
80
body: JSON.stringify({ email, password })
81
81
});
82
82
83
const data = await response.json();
83
const dataJson = await response;
84
const dataText = await dataJson.text();
85
const data = JSON.parse(dataText);
84
86
85
87
if (data.success)
86
88
{
@@ -113,13 +115,15 @@ class TribeGenApp
113
115
114
116
try
115
117
{
116
const response = await fetch('/tribegen/api/auth/register', {
118
const response = await fetch('api/auth/register', {
117
119
method: 'POST',
118
120
headers: { 'Content-Type': 'application/json' },
119
121
body: JSON.stringify({ email, password })
120
122
});
121
123
122
const data = await response.json();
124
const dataRaw = await response;
125
const dataText = await dataRaw.text();
126
const data = JSON.parse(dataText);
123
127
124
128
if (data.success)
125
129
{
@@ -170,7 +174,7 @@ class TribeGenApp
170
174
{
171
175
try
172
176
{
173
const response = await fetch('/tribegen/api/game/list', {
177
const response = await fetch('api/game/list', {
174
178
method: 'GET',
175
179
headers: { 'Authorization': `Bearer ${this.currentUser.token}` }
176
180
});
@@ -222,7 +226,7 @@ class TribeGenApp
222
226
223
227
try
224
228
{
225
const response = await fetch('/tribegen/api/game/generation', {
229
const response = await fetch('api/game/generation', {
226
230
method: 'POST',
227
231
headers: {
228
232
'Content-Type': 'application/json',
@@ -234,7 +238,8 @@ class TribeGenApp
234
238
})
235
239
});
236
240
237
const data = await response.json();
241
const dataText = await response.text();
242
const data = JSON.parse(dataText);
238
243
239
244
if (data.success)
240
245
{
@@ -264,7 +269,7 @@ class TribeGenApp
264
269
const card = document.createElement('div');
265
270
card.className = 'kobold-card';
266
271
267
const spriteUrl = `/tribegen/api/game/sprite?userId=${this.currentUser.id}&koboldId=${kobold.id}&age=${kobold.ageCategory}`;
272
const spriteUrl = `api/game/sprite?userId=${this.currentUser.id}&koboldId=${kobold.id}&age=${kobold.ageCategory}`;
268
273
269
274
card.innerHTML = `
270
275
<img src="${spriteUrl}" alt="Kobold sprite" class="kobold-sprite">
@@ -338,7 +343,7 @@ class TribeGenApp
338
343
// Load the game
339
344
try
340
345
{
341
const response = await fetch('/tribegen/api/game/save', {
346
const response = await fetch('api/game/save', {
342
347
method: 'POST',
343
348
headers: {
344
349
'Content-Type': 'application/json',
@@ -368,7 +373,7 @@ class TribeGenApp
368
373
{
369
374
try
370
375
{
371
const response = await fetch(`/tribegen/api/game/load?saveId=${saveId}`, {
376
const response = await fetch(`api/game/load?saveId=${saveId}`, {
372
377
method: 'GET',
373
378
headers: { 'Authorization': `Bearer ${this.currentUser.token}` }
374
379
});
@@ -445,7 +450,7 @@ class TribeGenApp
445
450
{
446
451
try
447
452
{
448
const response = await fetch('/tribegen/api/game/event', {
453
const response = await fetch('api/game/event', {
449
454
method: 'POST',
450
455
headers: {
451
456
'Content-Type': 'application/json',
@@ -475,7 +480,7 @@ class TribeGenApp
475
480
{
476
481
try
477
482
{
478
const response = await fetch('/tribegen/api/game/endMonth', {
483
const response = await fetch('api/game/endMonth', {
479
484
method: 'POST',
480
485
headers: {
481
486
'Content-Type': 'application/json',
@@ -74,13 +74,15 @@ class TribeGenApp74
74
75
try75
try76
{76
{77
const response = await fetch('/tribegen/api/auth/login', {77
const response = await fetch('api/auth/login', {78
method: 'POST',78
method: 'POST',79
headers: { 'Content-Type': 'application/json' },79
headers: { 'Content-Type': 'application/json' },80
body: JSON.stringify({ email, password })80
body: JSON.stringify({ email, password })81
});81
});82
82
83
const data = await response.json();83
const dataJson = await response;84
const dataText = await dataJson.text();85
const data = JSON.parse(dataText);84
86
85
if (data.success)87
if (data.success)86
{88
{@@ -113,13 +115,15 @@ class TribeGenApp113
115
114
try116
try115
{117
{116
const response = await fetch('/tribegen/api/auth/register', {118
const response = await fetch('api/auth/register', {117
method: 'POST',119
method: 'POST',118
headers: { 'Content-Type': 'application/json' },120
headers: { 'Content-Type': 'application/json' },119
body: JSON.stringify({ email, password })121
body: JSON.stringify({ email, password })120
});122
});121
123
122
const data = await response.json();124
const dataRaw = await response;125
const dataText = await dataRaw.text();126
const data = JSON.parse(dataText);123
127
124
if (data.success)128
if (data.success)125
{129
{@@ -170,7 +174,7 @@ class TribeGenApp170
{174
{171
try175
try172
{176
{173
const response = await fetch('/tribegen/api/game/list', {177
const response = await fetch('api/game/list', {174
method: 'GET',178
method: 'GET',175
headers: { 'Authorization': `Bearer ${this.currentUser.token}` }179
headers: { 'Authorization': `Bearer ${this.currentUser.token}` }176
});180
});@@ -222,7 +226,7 @@ class TribeGenApp222
226
223
try227
try224
{228
{225
const response = await fetch('/tribegen/api/game/generation', {229
const response = await fetch('api/game/generation', {226
method: 'POST',230
method: 'POST',227
headers: {231
headers: {228
'Content-Type': 'application/json',232
'Content-Type': 'application/json',@@ -234,7 +238,8 @@ class TribeGenApp234
})238
})235
});239
});236
240
237
const data = await response.json();241
const dataText = await response.text();242
const data = JSON.parse(dataText);238
243
239
if (data.success)244
if (data.success)240
{245
{@@ -264,7 +269,7 @@ class TribeGenApp264
const card = document.createElement('div');269
const card = document.createElement('div');265
card.className = 'kobold-card';270
card.className = 'kobold-card';266
271
267
const spriteUrl = `/tribegen/api/game/sprite?userId=${this.currentUser.id}&koboldId=${kobold.id}&age=${kobold.ageCategory}`;272
const spriteUrl = `api/game/sprite?userId=${this.currentUser.id}&koboldId=${kobold.id}&age=${kobold.ageCategory}`;268
273
269
card.innerHTML = `274
card.innerHTML = `270
<img src="${spriteUrl}" alt="Kobold sprite" class="kobold-sprite">275
<img src="${spriteUrl}" alt="Kobold sprite" class="kobold-sprite">@@ -338,7 +343,7 @@ class TribeGenApp338
// Load the game343
// Load the game339
try344
try340
{345
{341
const response = await fetch('/tribegen/api/game/save', {346
const response = await fetch('api/game/save', {342
method: 'POST',347
method: 'POST',343
headers: {348
headers: {344
'Content-Type': 'application/json',349
'Content-Type': 'application/json',@@ -368,7 +373,7 @@ class TribeGenApp368
{373
{369
try374
try370
{375
{371
const response = await fetch(`/tribegen/api/game/load?saveId=${saveId}`, {376
const response = await fetch(`api/game/load?saveId=${saveId}`, {372
method: 'GET',377
method: 'GET',373
headers: { 'Authorization': `Bearer ${this.currentUser.token}` }378
headers: { 'Authorization': `Bearer ${this.currentUser.token}` }374
});379
});@@ -445,7 +450,7 @@ class TribeGenApp445
{450
{446
try451
try447
{452
{448
const response = await fetch('/tribegen/api/game/event', {453
const response = await fetch('api/game/event', {449
method: 'POST',454
method: 'POST',450
headers: {455
headers: {451
'Content-Type': 'application/json',456
'Content-Type': 'application/json',@@ -475,7 +480,7 @@ class TribeGenApp475
{480
{476
try481
try477
{482
{478
const response = await fetch('/tribegen/api/game/endMonth', {483
const response = await fetch('api/game/endMonth', {479
method: 'POST',484
method: 'POST',480
headers: {485
headers: {481
'Content-Type': 'application/json',486
'Content-Type': 'application/json',@@ -1,8 +1,6 @@
1
1
<?php
2
2
3
namespace TribeGen\Classes;
4
5
use TribeGen\Database\Database;
3
require_once __DIR__ . '/../../src/Database/Database.php';
6
4
7
5
class Injury
8
6
{
@@ -1,8 +1,6 @@1
<?php1
<?php2
2
3
namespace TribeGen\Classes;3
require_once __DIR__ . '/../../src/Database/Database.php';4
5
use TribeGen\Database\Database;6
4
7
class Injury5
class Injury8
{6
{@@ -1,7 +1,5 @@
1
1
<?php
2
2
3
namespace TribeGen\Classes;
4
5
3
class Item
6
4
{
7
5
private $id;
@@ -1,7 +1,5 @@1
<?php1
<?php2
2
3
namespace TribeGen\Classes;4
5
class Item3
class Item6
{4
{7
private $id;5
private $id;@@ -1,8 +1,6 @@
1
1
<?php
2
2
3
namespace TribeGen\Classes;
4
5
use TribeGen\System\SaveManager;
3
require_once __DIR__ . '/../../src/System/SaveManager.php';
6
4
7
5
class Kobold
8
6
{
@@ -41,6 +39,28 @@ class Kobold
41
39
$this->age = $age;
42
40
$this->spriteMorph = $spriteMorph;
43
41
$this->isLeader = $isLeader;
42
43
$this->colourPrimary = sprintf(
44
"#%02X%02X%02X",
45
random_int(50, 230),
46
random_int(50, 230),
47
random_int(50, 230)
48
);
49
50
$this->colourSecondary = sprintf(
51
"#%02X%02X%02X",
52
random_int(50, 230),
53
random_int(50, 230),
54
random_int(50, 230)
55
);
56
57
$this->colourTertiary = sprintf(
58
"#%02X%02X%02X",
59
random_int(50, 230),
60
random_int(50, 230),
61
random_int(50, 230)
62
);
63
44
64
$this->saveManager = new SaveManager();
45
65
46
66
// Initialize stats with random values
@@ -75,6 +95,8 @@ class Kobold
75
95
return is_dir($morphsPath . '/' . $item) && $item[0] !== '.';
76
96
});
77
97
98
$morphs = array_values($morphs);
99
78
100
return !empty($morphs) ? array_values($morphs)[array_rand($morphs)] : 'default';
79
101
}
80
102
@@ -399,11 +421,6 @@ class Kobold
399
421
$this->desaturateImage($image);
400
422
}
401
423
402
// Apply leadership marking if this kobold has high will stat
403
if ($this->getStat('will') > 70) {
404
$this->addLeadershipMarkings($image);
405
}
406
407
424
// Save modified image back to the sprite file
408
425
imagepng($image, $spritePath);
409
426
imagedestroy($image);
@@ -470,29 +487,4 @@ class Kobold
470
487
}
471
488
}
472
489
}
473
474
/**
475
* Add leadership marking (gold crown) to indicate a leader
476
*/
477
private function addLeadershipMarkings(&$image)
478
{
479
$gold = imagecolorallocate($image, 255, 215, 0);
480
$darkGold = imagecolorallocate($image, 184, 155, 0);
481
482
$imageWidth = imagesx($image);
483
$topY = 5;
484
$crownX = intval($imageWidth / 2);
485
486
// Draw a simple crown shape at the top center
487
// Left peak
488
imageline($image, $crownX - 15, $topY + 10, $crownX - 10, $topY, $gold);
489
// Center peak
490
imageline($image, $crownX - 10, $topY, $crownX, $topY - 5, $gold);
491
imageline($image, $crownX, $topY - 5, $crownX + 10, $topY, $gold);
492
// Right peak
493
imageline($image, $crownX + 10, $topY, $crownX + 15, $topY + 10, $gold);
494
495
// Base of crown
496
imageline($image, $crownX - 15, $topY + 10, $crownX + 15, $topY + 10, $darkGold);
497
}
498
490
}
@@ -1,8 +1,6 @@1
<?php1
<?php2
2
3
namespace TribeGen\Classes;3
require_once __DIR__ . '/../../src/System/SaveManager.php';4
5
use TribeGen\System\SaveManager;6
4
7
class Kobold5
class Kobold8
{6
{@@ -41,6 +39,28 @@ class Kobold41
$this->age = $age;39
$this->age = $age;42
$this->spriteMorph = $spriteMorph;40
$this->spriteMorph = $spriteMorph;43
$this->isLeader = $isLeader;41
$this->isLeader = $isLeader;42
43
$this->colourPrimary = sprintf(44
"#%02X%02X%02X",45
random_int(50, 230),46
random_int(50, 230),47
random_int(50, 230)48
);49
50
$this->colourSecondary = sprintf(51
"#%02X%02X%02X",52
random_int(50, 230),53
random_int(50, 230),54
random_int(50, 230)55
);56
57
$this->colourTertiary = sprintf(58
"#%02X%02X%02X",59
random_int(50, 230),60
random_int(50, 230),61
random_int(50, 230)62
);63
44
$this->saveManager = new SaveManager();64
$this->saveManager = new SaveManager();45
65
46
// Initialize stats with random values66
// Initialize stats with random values@@ -75,6 +95,8 @@ class Kobold75
return is_dir($morphsPath . '/' . $item) && $item[0] !== '.';95
return is_dir($morphsPath . '/' . $item) && $item[0] !== '.';76
});96
});77
97
98
$morphs = array_values($morphs);99
78
return !empty($morphs) ? array_values($morphs)[array_rand($morphs)] : 'default';100
return !empty($morphs) ? array_values($morphs)[array_rand($morphs)] : 'default';79
}101
}80
102
@@ -399,11 +421,6 @@ class Kobold399
$this->desaturateImage($image);421
$this->desaturateImage($image);400
}422
}401
423
402
// Apply leadership marking if this kobold has high will stat403
if ($this->getStat('will') > 70) {404
$this->addLeadershipMarkings($image);405
}406
407
// Save modified image back to the sprite file424
// Save modified image back to the sprite file408
imagepng($image, $spritePath);425
imagepng($image, $spritePath);409
imagedestroy($image);426
imagedestroy($image);@@ -470,29 +487,4 @@ class Kobold470
}487
}471
}488
}472
}489
}473
474
/**475
* Add leadership marking (gold crown) to indicate a leader476
*/477
private function addLeadershipMarkings(&$image)478
{479
$gold = imagecolorallocate($image, 255, 215, 0);480
$darkGold = imagecolorallocate($image, 184, 155, 0);481
482
$imageWidth = imagesx($image);483
$topY = 5;484
$crownX = intval($imageWidth / 2);485
486
// Draw a simple crown shape at the top center487
// Left peak488
imageline($image, $crownX - 15, $topY + 10, $crownX - 10, $topY, $gold);489
// Center peak490
imageline($image, $crownX - 10, $topY, $crownX, $topY - 5, $gold);491
imageline($image, $crownX, $topY - 5, $crownX + 10, $topY, $gold);492
// Right peak493
imageline($image, $crownX + 10, $topY, $crownX + 15, $topY + 10, $gold);494
495
// Base of crown496
imageline($image, $crownX - 15, $topY + 10, $crownX + 15, $topY + 10, $darkGold);497
}498
}490
}@@ -1,7 +1,5 @@
1
1
<?php
2
2
3
namespace TribeGen\Classes;
4
5
3
class NPC
6
4
{
7
5
private $id;
@@ -1,7 +1,5 @@1
<?php1
<?php2
2
3
namespace TribeGen\Classes;4
5
class NPC3
class NPC6
{4
{7
private $id;5
private $id;@@ -1,8 +1,7 @@
1
1
<?php
2
2
3
namespace TribeGen\Classes;
4
5
use TribeGen\System\SaveManager;
3
require_once __DIR__ . '/../../src/System/SaveManager.php';
4
require_once __DIR__ . '/../../src/Classes/Kobold.php';
6
5
7
6
class Tribe
8
7
{
@@ -1,8 +1,7 @@1
<?php1
<?php2
2
3
namespace TribeGen\Classes;3
require_once __DIR__ . '/../../src/System/SaveManager.php';4
4
require_once __DIR__ . '/../../src/Classes/Kobold.php';5
use TribeGen\System\SaveManager;6
5
7
class Tribe6
class Tribe8
{7
{@@ -1,9 +1,7 @@
1
1
<?php
2
2
3
namespace TribeGen\Classes;
4
5
use TribeGen\Database\Database;
6
use TribeGen\System\SaveManager;
3
require_once __DIR__ . '/../../src/Database/Database.php';
4
require_once __DIR__ . '/../../src/System/SaveManager.php';
7
5
8
6
class User
9
7
{
@@ -1,9 +1,7 @@1
<?php1
<?php2
2
3
namespace TribeGen\Classes;3
require_once __DIR__ . '/../../src/Database/Database.php';4
4
require_once __DIR__ . '/../../src/System/SaveManager.php';5
use TribeGen\Database\Database;6
use TribeGen\System\SaveManager;7
5
8
class User6
class User9
{7
{@@ -1,7 +1,5 @@
1
1
<?php
2
2
3
namespace TribeGen\Database;
4
5
3
class Database
6
4
{
7
5
private static $instance = null;
@@ -9,7 +7,7 @@ class Database
9
7
10
8
private function __construct()
11
9
{
12
$dbPath = __DIR__ . '/../../data/tribegen.db';
10
$dbPath = __DIR__ . '\\..\\..\\data\\tribegen.db';
13
11
$this->pdo = new \PDO('sqlite:' . $dbPath);
14
12
$this->pdo->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);
15
13
$this->pdo->setAttribute(\PDO::ATTR_DEFAULT_FETCH_MODE, \PDO::FETCH_ASSOC);
@@ -1,7 +1,5 @@1
<?php1
<?php2
2
3
namespace TribeGen\Database;4
5
class Database3
class Database6
{4
{7
private static $instance = null;5
private static $instance = null;@@ -9,7 +7,7 @@ class Database9
7
10
private function __construct()8
private function __construct()11
{9
{12
$dbPath = __DIR__ . '/../../data/tribegen.db';10
$dbPath = __DIR__ . '\\..\\..\\data\\tribegen.db';13
$this->pdo = new \PDO('sqlite:' . $dbPath);11
$this->pdo = new \PDO('sqlite:' . $dbPath);14
$this->pdo->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);12
$this->pdo->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);15
$this->pdo->setAttribute(\PDO::ATTR_DEFAULT_FETCH_MODE, \PDO::FETCH_ASSOC);13
$this->pdo->setAttribute(\PDO::ATTR_DEFAULT_FETCH_MODE, \PDO::FETCH_ASSOC);@@ -1,8 +1,6 @@
1
1
<?php
2
2
3
namespace TribeGen\Events;
4
5
use TribeGen\Classes\Tribe;
3
require_once __DIR__ . '/../../src/Classes/Tribe.php';
6
4
7
5
abstract class Event
8
6
{
@@ -1,8 +1,6 @@1
<?php1
<?php2
2
3
namespace TribeGen\Events;3
require_once __DIR__ . '/../../src/Classes/Tribe.php';4
5
use TribeGen\Classes\Tribe;6
4
7
abstract class Event5
abstract class Event8
{6
{@@ -1,7 +1,5 @@
1
1
<?php
2
2
3
namespace TribeGen\Events;
4
5
3
use TribeGen\Database\Database;
6
4
use TribeGen\Classes\Tribe;
7
5
@@ -1,7 +1,5 @@1
<?php1
<?php2
2
3
namespace TribeGen\Events;4
5
use TribeGen\Database\Database;3
use TribeGen\Database\Database;6
use TribeGen\Classes\Tribe;4
use TribeGen\Classes\Tribe;7
5
@@ -1,6 +1,6 @@
1
1
<?php
2
2
3
namespace TribeGen\Events;
3
require_once __DIR__ . '/../../src/Events/Event.php';
4
4
5
5
class ExplorationEvent extends Event
6
6
{
@@ -18,7 +18,7 @@ class ExplorationEvent extends Event
18
18
// Randomly select 1-3 explorers
19
19
$explorerCount = rand(1, min(3, count($kobolds)));
20
20
$explorers = array_slice(array_values($kobolds), 0, $explorerCount);
21
21
22
22
$this->story .= "A group of " . count($explorers) . " intrepid explorers set out:\n";
23
23
foreach ($explorers as $explorer) {
24
24
$this->story .= "- " . $explorer->getName() . " (Intelligence: " . $this->statDisplay($explorer->getStat('intelligence')) . ")\n";
@@ -30,10 +30,11 @@ class ExplorationEvent extends Event
30
30
if ($foodFound) {
31
31
$baseFood = rand(5, 15);
32
32
// Intelligence affects food discovery - smarter kobolds find more
33
$avgIntelligence = array_sum(array_map(function($k) { return $k->getStat('intelligence'); }, $explorers)) / count($explorers);
33
$avgIntelligence = array_sum(array_map(function ($k) {
34
return $k->getStat('intelligence'); }, $explorers)) / count($explorers);
34
35
$foodBonus = intval($avgIntelligence / 20); // Max +5 food from intelligence
35
36
$totalFood = $baseFood + $foodBonus;
36
37
37
38
$this->tribe->addFood($totalFood);
38
39
$this->story .= "Success! The explorers discovered edible plants and small game.\n";
39
40
$this->story .= "The tribe gained " . $totalFood . " units of food.\n\n";
@@ -45,15 +46,16 @@ class ExplorationEvent extends Event
45
46
$injuryChance = rand(1, 100) <= 35;
46
47
if ($injuryChance && count($explorers) > 0) {
47
48
// Vitality affects injury chance - higher vitality = less likely to be injured
48
$avgVitality = array_sum(array_map(function($k) { return $k->getStat('vitality'); }, $explorers)) / count($explorers);
49
$avgVitality = array_sum(array_map(function ($k) {
50
return $k->getStat('vitality'); }, $explorers)) / count($explorers);
49
51
$injuryProbability = (100 - $avgVitality) / 100;
50
52
51
53
if (rand(1, 100) / 100 <= $injuryProbability) {
52
54
// Select a random explorer to get injured
53
55
$injuredKobold = $explorers[array_rand($explorers)];
54
56
55
57
$this->story .= "Disaster! " . $injuredKobold->getName() . " tripped over a loose stone!\n";
56
58
57
59
// Create injury array (since we're in file-based storage)
58
60
$injuries = $injuredKobold->getInjuries();
59
61
$newInjury = [
@@ -66,7 +68,7 @@ class ExplorationEvent extends Event
66
68
];
67
69
$injuries[] = $newInjury;
68
70
$injuredKobold->setInjuries($injuries);
69
71
70
72
$this->story .= $injuredKobold->getName() . " suffered a twisted ankle (severity: " . $newInjury['severity'] . "/10).\n";
71
73
}
72
74
}
@@ -81,15 +83,24 @@ class ExplorationEvent extends Event
81
83
*/
82
84
private function statDisplay($stat)
83
85
{
84
if ($stat <= 10) return "terrible";
85
if ($stat <= 20) return "bad";
86
if ($stat <= 30) return "unskilled";
87
if ($stat <= 40) return "decent";
88
if ($stat <= 50) return "good";
89
if ($stat <= 60) return "excellent";
90
if ($stat <= 70) return "fantastic";
91
if ($stat <= 80) return "master";
92
if ($stat <= 90) return "divine";
86
if ($stat <= 10)
87
return "terrible";
88
if ($stat <= 20)
89
return "bad";
90
if ($stat <= 30)
91
return "unskilled";
92
if ($stat <= 40)
93
return "decent";
94
if ($stat <= 50)
95
return "good";
96
if ($stat <= 60)
97
return "excellent";
98
if ($stat <= 70)
99
return "fantastic";
100
if ($stat <= 80)
101
return "master";
102
if ($stat <= 90)
103
return "divine";
93
104
return "godlike";
94
105
}
95
106
}
@@ -1,6 +1,6 @@1
<?php1
<?php2
2
3
namespace TribeGen\Events;3
require_once __DIR__ . '/../../src/Events/Event.php';4
4
5
class ExplorationEvent extends Event5
class ExplorationEvent extends Event6
{6
{@@ -18,7 +18,7 @@ class ExplorationEvent extends Event18
// Randomly select 1-3 explorers18
// Randomly select 1-3 explorers19
$explorerCount = rand(1, min(3, count($kobolds)));19
$explorerCount = rand(1, min(3, count($kobolds)));20
$explorers = array_slice(array_values($kobolds), 0, $explorerCount);20
$explorers = array_slice(array_values($kobolds), 0, $explorerCount);21
21
22
$this->story .= "A group of " . count($explorers) . " intrepid explorers set out:\n";22
$this->story .= "A group of " . count($explorers) . " intrepid explorers set out:\n";23
foreach ($explorers as $explorer) {23
foreach ($explorers as $explorer) {24
$this->story .= "- " . $explorer->getName() . " (Intelligence: " . $this->statDisplay($explorer->getStat('intelligence')) . ")\n";24
$this->story .= "- " . $explorer->getName() . " (Intelligence: " . $this->statDisplay($explorer->getStat('intelligence')) . ")\n";@@ -30,10 +30,11 @@ class ExplorationEvent extends Event30
if ($foodFound) {30
if ($foodFound) {31
$baseFood = rand(5, 15);31
$baseFood = rand(5, 15);32
// Intelligence affects food discovery - smarter kobolds find more32
// Intelligence affects food discovery - smarter kobolds find more33
$avgIntelligence = array_sum(array_map(function($k) { return $k->getStat('intelligence'); }, $explorers)) / count($explorers);33
$avgIntelligence = array_sum(array_map(function ($k) {34
return $k->getStat('intelligence'); }, $explorers)) / count($explorers);34
$foodBonus = intval($avgIntelligence / 20); // Max +5 food from intelligence35
$foodBonus = intval($avgIntelligence / 20); // Max +5 food from intelligence35
$totalFood = $baseFood + $foodBonus;36
$totalFood = $baseFood + $foodBonus;36
37
37
$this->tribe->addFood($totalFood);38
$this->tribe->addFood($totalFood);38
$this->story .= "Success! The explorers discovered edible plants and small game.\n";39
$this->story .= "Success! The explorers discovered edible plants and small game.\n";39
$this->story .= "The tribe gained " . $totalFood . " units of food.\n\n";40
$this->story .= "The tribe gained " . $totalFood . " units of food.\n\n";@@ -45,15 +46,16 @@ class ExplorationEvent extends Event45
$injuryChance = rand(1, 100) <= 35;46
$injuryChance = rand(1, 100) <= 35;46
if ($injuryChance && count($explorers) > 0) {47
if ($injuryChance && count($explorers) > 0) {47
// Vitality affects injury chance - higher vitality = less likely to be injured48
// Vitality affects injury chance - higher vitality = less likely to be injured48
$avgVitality = array_sum(array_map(function($k) { return $k->getStat('vitality'); }, $explorers)) / count($explorers);49
$avgVitality = array_sum(array_map(function ($k) {50
return $k->getStat('vitality'); }, $explorers)) / count($explorers);49
$injuryProbability = (100 - $avgVitality) / 100;51
$injuryProbability = (100 - $avgVitality) / 100;50
52
51
if (rand(1, 100) / 100 <= $injuryProbability) {53
if (rand(1, 100) / 100 <= $injuryProbability) {52
// Select a random explorer to get injured54
// Select a random explorer to get injured53
$injuredKobold = $explorers[array_rand($explorers)];55
$injuredKobold = $explorers[array_rand($explorers)];54
56
55
$this->story .= "Disaster! " . $injuredKobold->getName() . " tripped over a loose stone!\n";57
$this->story .= "Disaster! " . $injuredKobold->getName() . " tripped over a loose stone!\n";56
58
57
// Create injury array (since we're in file-based storage)59
// Create injury array (since we're in file-based storage)58
$injuries = $injuredKobold->getInjuries();60
$injuries = $injuredKobold->getInjuries();59
$newInjury = [61
$newInjury = [@@ -66,7 +68,7 @@ class ExplorationEvent extends Event66
];68
];67
$injuries[] = $newInjury;69
$injuries[] = $newInjury;68
$injuredKobold->setInjuries($injuries);70
$injuredKobold->setInjuries($injuries);69
71
70
$this->story .= $injuredKobold->getName() . " suffered a twisted ankle (severity: " . $newInjury['severity'] . "/10).\n";72
$this->story .= $injuredKobold->getName() . " suffered a twisted ankle (severity: " . $newInjury['severity'] . "/10).\n";71
}73
}72
}74
}@@ -81,15 +83,24 @@ class ExplorationEvent extends Event81
*/83
*/82
private function statDisplay($stat)84
private function statDisplay($stat)83
{85
{84
if ($stat <= 10) return "terrible";86
if ($stat <= 10)85
if ($stat <= 20) return "bad";87
return "terrible";86
if ($stat <= 30) return "unskilled";88
if ($stat <= 20)87
if ($stat <= 40) return "decent";89
return "bad";88
if ($stat <= 50) return "good";90
if ($stat <= 30)89
if ($stat <= 60) return "excellent";91
return "unskilled";90
if ($stat <= 70) return "fantastic";92
if ($stat <= 40)91
if ($stat <= 80) return "master";93
return "decent";92
if ($stat <= 90) return "divine";94
if ($stat <= 50)95
return "good";96
if ($stat <= 60)97
return "excellent";98
if ($stat <= 70)99
return "fantastic";100
if ($stat <= 80)101
return "master";102
if ($stat <= 90)103
return "divine";93
return "godlike";104
return "godlike";94
}105
}95
}106
}@@ -1,6 +1,6 @@
1
1
<?php
2
2
3
namespace TribeGen\Events;
3
require_once __DIR__ . '/../../src/Events/Event.php';
4
4
5
5
class FarmingEvent extends Event
6
6
{
@@ -1,6 +1,6 @@1
<?php1
<?php2
2
3
namespace TribeGen\Events;3
require_once __DIR__ . '/../../src/Events/Event.php';4
4
5
class FarmingEvent extends Event5
class FarmingEvent extends Event6
{6
{@@ -1,8 +1,7 @@
1
1
<?php
2
2
3
namespace TribeGen\Events;
4
5
use TribeGen\Classes\Kobold;
3
require_once __DIR__ . '/../../src/Events/Event.php';
4
require_once __DIR__ . '/../../src/Classes/Kobold.php';
6
5
7
6
class HuntingEvent extends Event
8
7
{
@@ -1,8 +1,7 @@1
<?php1
<?php2
2
3
namespace TribeGen\Events;3
require_once __DIR__ . '/../../src/Events/Event.php';4
4
require_once __DIR__ . '/../../src/Classes/Kobold.php';5
use TribeGen\Classes\Kobold;6
5
7
class HuntingEvent extends Event6
class HuntingEvent extends Event8
{7
{@@ -1,7 +1,5 @@
1
1
<?php
2
2
3
namespace TribeGen\System;
4
5
3
class SaveManager
6
4
{
7
5
private $basePath;
@@ -1,7 +1,5 @@1
<?php1
<?php2
2
3
namespace TribeGen\System;4
5
class SaveManager3
class SaveManager6
{4
{7
private $basePath;5
private $basePath;@@ -1,7 +1,5 @@
1
1
<?php
2
2
3
namespace TribeGen\Utilities;
4
5
3
class GameHelper
6
4
{
7
5
@@ -1,7 +1,5 @@1
<?php1
<?php2
2
3
namespace TribeGen\Utilities;4
5
class GameHelper3
class GameHelper6
{4
{7
5
@@ -1,10 +1,6 @@
1
1
<?php
2
2
3
namespace TribeGen\API;
4
5
use TribeGen\Classes\User;
6
7
require_once __DIR__ . '/../../vendor/autoload.php';
3
require_once __DIR__ . '/../../src/Classes/User.php';
8
4
9
5
$method = $_SERVER['REQUEST_METHOD'];
10
6
@@ -1,10 +1,6 @@1
<?php1
<?php2
2
3
namespace TribeGen\API;3
require_once __DIR__ . '/../../src/Classes/User.php';4
5
use TribeGen\Classes\User;6
7
require_once __DIR__ . '/../../vendor/autoload.php';8
4
9
$method = $_SERVER['REQUEST_METHOD'];5
$method = $_SERVER['REQUEST_METHOD'];10
6
@@ -1,13 +1,11 @@
1
1
<?php
2
2
3
namespace TribeGen\API;
4
5
use TribeGen\Classes\User;
6
use TribeGen\Classes\Tribe;
7
use TribeGen\Classes\Kobold;
8
use TribeGen\System\SaveManager;
9
10
3
require_once __DIR__ . '/../../vendor/autoload.php';
4
require_once __DIR__ . '/../../src/Database/Database.php';
5
require_once __DIR__ . '/../../src/Classes/User.php';
6
require_once __DIR__ . '/../../src/Classes/Tribe.php';
7
require_once __DIR__ . '/../../src/Classes/Kobold.php';
8
require_once __DIR__ . '/../../src/System/SaveManager.php';
11
9
12
10
$method = $_SERVER['REQUEST_METHOD'];
13
11
@@ -1,13 +1,11 @@1
<?php1
<?php2
2
3
namespace TribeGen\API;4
5
use TribeGen\Classes\User;6
use TribeGen\Classes\Tribe;7
use TribeGen\Classes\Kobold;8
use TribeGen\System\SaveManager;9
10
require_once __DIR__ . '/../../vendor/autoload.php';3
require_once __DIR__ . '/../../vendor/autoload.php';4
require_once __DIR__ . '/../../src/Database/Database.php';5
require_once __DIR__ . '/../../src/Classes/User.php';6
require_once __DIR__ . '/../../src/Classes/Tribe.php';7
require_once __DIR__ . '/../../src/Classes/Kobold.php';8
require_once __DIR__ . '/../../src/System/SaveManager.php';11
9
12
$method = $_SERVER['REQUEST_METHOD'];10
$method = $_SERVER['REQUEST_METHOD'];13
11