// Sample data for the Fangame Archive prototype.
// Original fictional games inspired by the needle / fangame community vocabulary.

const TAGS = [
  { name: 'needle', count: 1842 },
  { name: 'avoidance', count: 967 },
  { name: 'adventure', count: 1203 },
  { name: 'boss', count: 583 },
  { name: 'gimmick', count: 802 },
  { name: 'trap', count: 421 },
  { name: 'art', count: 318 },
  { name: 'story', count: 287 },
  { name: 'puzzle', count: 196 },
  { name: 'gauntlet', count: 154 },
  { name: 'jam', count: 89 },
  { name: 'short', count: 271 },
  { name: 'long', count: 142 },
  { name: 'deathless-friendly', count: 612 },
  { name: 'rng', count: 96 },
];

const GAMES = [
  {
    id: 14782, title: 'Needle Garden Vol. III', creator: 'drift_n',
    rating: 7.8, difficulty: 78, reviews: 142, hours: 18.3,
    tags: ['needle', 'deathless-friendly', 'gauntlet'],
    status: 'cleared', personal: 8,
    flags: { local: true, shots: true, perf: false, broken: false, missing: false },
    desc: '90-screen needle gauntlet across four biomes. Save anchors every 3 screens. Gravity flip at S78 is intentional.',
    notes: 'Use locale emulator (JP). v1.2 fixes the S52 softlock. Backup .ini before patching.',
    url: 'https://kid-mirror.example/needle-garden-vol3.zip',
    df_id: 'id-14782',
  },
  {
    id: 9241, title: 'Avoidance Atelier', creator: 'yuuka_77',
    rating: 8.9, difficulty: 92, reviews: 311, hours: 41.0,
    tags: ['avoidance', 'art', 'story'],
    status: 'in_progress', personal: 9,
    flags: { local: true, shots: true, perf: false, broken: false, missing: false },
    desc: 'Six avoidances synchronized to original score by yuuka_77. Pattern recognition over reflex.',
    notes: 'Buffer attack 4 by 2 frames. Don\'t skip the intro — RNG seed is set during it.',
    url: 'https://kid-mirror.example/avoidance-atelier-v2.zip',
    df_id: 'id-09241',
  },
  {
    id: 3617, title: 'Sakura Saves', creator: 'miharu',
    rating: 7.2, difficulty: 45, reviews: 88, hours: 4.5,
    tags: ['adventure', 'short', 'deathless-friendly'],
    status: 'perfected', personal: 7,
    flags: { local: true, shots: true, perf: true, broken: false, missing: false },
    desc: 'A 20-minute adventure with abundant saves. Recommended starter.',
    notes: 'Deathless run in 18:42. Confirm the secret room behind S9.',
    url: 'https://kid-mirror.example/sakura-saves.zip',
    df_id: 'id-03617',
  },
  {
    id: 22041, title: 'Frozen Conveyor', creator: 'jumpfox',
    rating: 6.5, difficulty: 60, reviews: 47, hours: 7.1,
    tags: ['gimmick', 'trap', 'long'],
    status: 'dropped', personal: 5,
    flags: { local: false, shots: true, perf: false, broken: false, missing: true },
    desc: 'Conveyor-based gimmick stages. Subzero friction model. Long, occasionally tedious.',
    notes: '',
    url: 'https://hosted-elsewhere.example/frozen-conveyor.zip',
    df_id: 'id-22041',
  },
  {
    id: 11598, title: 'Spike Cathedral', creator: 'hexagon',
    rating: 8.4, difficulty: 81, reviews: 203, hours: 12.7,
    tags: ['needle', 'art', 'gauntlet'],
    status: 'cleared', personal: 8,
    flags: { local: true, shots: true, perf: false, broken: false, missing: false },
    desc: 'Gothic-style needle with custom sprite work throughout. Six chapels, one organ room.',
    notes: '',
    url: 'https://kid-mirror.example/spike-cathedral.zip',
    df_id: 'id-11598',
  },
  {
    id: 6890, title: 'Trial of the Apple Knight', creator: 'archeon',
    rating: 5.9, difficulty: 35, reviews: 24, hours: 1.8,
    tags: ['adventure', 'short', 'jam'],
    status: 'unplayed', personal: 0,
    flags: { local: false, shots: false, perf: false, broken: false, missing: true },
    desc: 'Jam submission, ~25 minute clear. Apple-themed mini-platformer.',
    notes: '',
    url: 'https://jam-archive.example/apple-knight.zip',
    df_id: 'id-06890',
  },
  {
    id: 18043, title: 'Misery Saw', creator: 'patrickk',
    rating: 9.1, difficulty: 88, reviews: 412, hours: 28.4,
    tags: ['trap', 'art', 'long'],
    status: 'in_progress', personal: 9,
    flags: { local: true, shots: true, perf: false, broken: false, missing: false },
    desc: 'Trap-heavy adventure with hand-drawn cutscenes. Five chapters, hidden ending.',
    notes: 'Chapter 4 has 3 missables. Save before the elevator.',
    url: 'https://kid-mirror.example/misery-saw.zip',
    df_id: 'id-18043',
  },
  {
    id: 14991, title: 'Deathless Drift', creator: 'drift_n',
    rating: 7.5, difficulty: 70, reviews: 89, hours: 6.2,
    tags: ['needle', 'deathless-friendly', 'short'],
    status: 'perfected', personal: 8,
    flags: { local: true, shots: true, perf: true, broken: false, missing: false },
    desc: '40-screen forgiving needle, designed for deathless attempts.',
    notes: 'Deathless run in 11:08. PB worth chasing.',
    url: 'https://kid-mirror.example/deathless-drift.zip',
    df_id: 'id-14991',
  },
  {
    id: 7322, title: 'Reverse Gravity Jam', creator: 'jam_co',
    rating: 6.8, difficulty: 55, reviews: 71, hours: 3.4,
    tags: ['gimmick', 'jam', 'short'],
    status: 'cleared', personal: 7,
    flags: { local: true, shots: false, perf: false, broken: false, missing: false },
    desc: 'Jam collab. Each stage by a different author, gravity flips constantly.',
    notes: '',
    url: 'https://jam-archive.example/reverse-gravity.zip',
    df_id: 'id-07322',
  },
  {
    id: 4117, title: '1-Up Memorial', creator: 'retroline',
    rating: 6.2, difficulty: 25, reviews: 38, hours: 1.1,
    tags: ['art', 'story', 'short'],
    status: 'cleared', personal: 6,
    flags: { local: true, shots: true, perf: false, broken: false, missing: false },
    desc: 'A short, sentimental tribute fangame. Ten minutes, no combat.',
    notes: '',
    url: 'https://kid-mirror.example/1up-memorial.zip',
    df_id: 'id-04117',
  },
  {
    id: 21115, title: 'Boshiy Variations', creator: 'solnine',
    rating: 8.0, difficulty: 76, reviews: 178, hours: 14.6,
    tags: ['boss', 'adventure', 'long'],
    status: 'unplayed', personal: 0,
    flags: { local: false, shots: true, perf: false, broken: true, missing: true },
    desc: 'Six boss fights remixed from classic encounters. Mirror is down — needs new URL.',
    notes: '',
    url: 'https://defunct-host.example/boshiy-variations.zip',
    df_id: 'id-21115',
  },
  {
    id: 9802, title: 'Klazor\'s Caves', creator: 'klazor',
    rating: 7.1, difficulty: 50, reviews: 62, hours: 5.0,
    tags: ['adventure', 'gimmick', 'puzzle'],
    status: 'in_progress', personal: 7,
    flags: { local: true, shots: true, perf: false, broken: false, missing: false },
    desc: 'Cave-themed adventure with light puzzle elements and a hub overworld.',
    notes: 'Skip C-3 if you don\'t want to backtrack.',
    url: 'https://kid-mirror.example/klazors-caves.zip',
    df_id: 'id-09802',
  },
];

const REVIEWS = {
  9241: [
    { user: 'kid_seamstress', date: '2026-04-12', rating: 9, diff: 92, liked: 34, tags: ['avoidance', 'art'],
      body: 'A genuine art piece. Avoidance 4 is the best in the genre — the silence before the drop is everything.' },
    { user: 'pixel_grief',    date: '2026-03-08', rating: 9, diff: 90, liked: 21, tags: ['avoidance', 'story'],
      body: 'Phenomenal pacing. I dropped it for two weeks on Avd 5 and came back changed.' },
    { user: 'aether_save',    date: '2026-02-21', rating: 8, diff: 95, liked: 12, tags: ['avoidance'],
      body: 'Hard. Worth it. RNG-light, mostly readable. Score is unforgettable.' },
  ],
  14782: [
    { user: 'aether_save', date: '2026-05-02', rating: 8, diff: 78, liked: 18, tags: ['needle', 'gauntlet'],
      body: 'Solid mid-range gauntlet. S78\'s gravity flip is divisive but I think it works.' },
    { user: 'klazor_fan',  date: '2026-04-18', rating: 7, diff: 80, liked: 6, tags: ['needle'],
      body: 'Tight needle, generous saves. Not much else to say. Recommend for clear-hunters.' },
  ],
};

const SCREENSHOTS = {
  9241:  [{ by: 'kid_seamstress', cap: 'avd_03.png' }, { by: 'pixel_grief',  cap: 'final.png' }, { by: 'yuuka_77', cap: 'title.png' }],
  14782: [{ by: 'drift_n', cap: 'biome_a.png' }, { by: 'drift_n', cap: 's78_gravity.png' }, { by: 'aether_save', cap: 'clear.png' }],
  18043: [{ by: 'patrickk', cap: 'ch01.png' }, { by: 'patrickk', cap: 'ch04.png' }, { by: 'patrickk', cap: 'ending.png' }],
};

const COLLECTIONS = [
  { id: 'c1', name: 'Practice needle maps', color: 'oklch(0.65 0.13 152)',
    desc: 'Forgiving needle for warm-ups. Saves every 3-5 screens.',
    games: [14991, 14782, 11598], notes: { 14991: 'Warm up with this map first.', 14782: 'S78 is a wall — skip if rushed.', 11598: '' } },
  { id: 'c2', name: 'To stream this weekend', color: 'oklch(0.65 0.13 30)',
    desc: 'Queued for Sat 8pm. Mix of short + 1 long anchor.',
    games: [3617, 4117, 18043], notes: { 3617: 'Opener — chat-friendly.', 4117: '10-min palette cleanser.', 18043: 'Closer. Mute on cutscenes.' } },
  { id: 'c3', name: 'Avoidance only',  color: 'oklch(0.65 0.13 280)',
    desc: 'For practice runs of pattern-style avoidances.',
    games: [9241], notes: { 9241: 'Buffer attack 4. Don\'t skip intro.' } },
  { id: 'c4', name: 'Jam favorites \'25', color: 'oklch(0.7 0.12 70)',
    desc: 'Best entries from last year\'s community jams.',
    games: [7322, 6890], notes: {} },
];

const MISSING_ASSETS = [
  { id: 22041, title: 'Frozen Conveyor', missing: 'zip',         size: '~ 18 MB',  source: 'dl-mirror.example', age: '4d' },
  { id: 6890,  title: 'Trial of the Apple Knight', missing: 'all', size: '~ 6 MB',  source: 'jam-archive.example', age: '11d' },
  { id: 21115, title: 'Boshiy Variations', missing: 'zip',       size: '~ 92 MB',  source: 'defunct-host.example', age: '32d' },
  { id: 19044, title: 'Lava Loops Redux', missing: 'screenshots', size: '~ 1.2 MB', source: 'dl-mirror.example', age: '2d' },
];

const DEAD_URLS = [
  { id: 21115, title: 'Boshiy Variations', url: 'https://defunct-host.example/boshiy-variations.zip', code: 'HTTP 404', checked: '2026-05-21' },
  { id: 18299, title: 'Cherry Trap Tactics', url: 'https://oldmirror.kid.example/cherry-tt.zip', code: 'DNS_FAIL', checked: '2026-05-21' },
  { id: 14001, title: 'Spike Bath',         url: 'https://fanhost.example/spike-bath.zip',     code: 'HTTP 503', checked: '2026-05-19' },
];

const ORPHANED = [
  { path: 'archive/binaries/old_v1.4_kamilia3.zip', size: '124 MB', modified: '2024-12-08' },
  { path: 'archive/screens/_tmp_capture_2025-03-12_03-22.png', size: '880 KB', modified: '2025-03-12' },
  { path: 'archive/binaries/UNSORTED/_to_review/jamentry_x.zip', size: '8.4 MB', modified: '2025-09-01' },
  { path: 'archive/screens/_dupes_/2025-11/aaa (copy).png', size: '1.1 MB', modified: '2025-11-04' },
  { path: 'archive/binaries/.partial_download.crdownload', size: '42 MB', modified: '2026-04-30' },
];

const CRAWLER_LOG = [
  { t: '14:02:11', tag: 'info', msg: 'crawler.exe v0.7.3 ready' },
  { t: '14:02:11', tag: 'info', msg: 'reading config from ./archive.toml' },
  { t: '14:02:12', tag: 'info', msg: 'connecting to <accent>delicious-fruit-mirror.local</accent>...' },
  { t: '14:02:13', tag: 'ok',   msg: 'handshake complete · 1842 known game IDs' },
  { t: '14:02:14', tag: 'info', msg: 'fetching index.json (<num>1.4 MB</num>)' },
  { t: '14:02:16', tag: 'ok',   msg: 'index parsed · <num>+3</num> new · <num>17</num> updated · <num>1822</num> unchanged' },
  { t: '14:02:17', tag: 'info', msg: 'enqueued screenshot jobs (<num>43</num>)' },
  { t: '14:02:19', tag: 'ok',   msg: 'GET /img/14782/s78_gravity.png · <num>240 KB</num>' },
  { t: '14:02:21', tag: 'ok',   msg: 'GET /img/9241/avd_03.png · <num>180 KB</num>' },
  { t: '14:02:23', tag: 'warn', msg: 'HTTP 503 from defunct-host.example — marking 1 URL dead' },
  { t: '14:02:24', tag: 'ok',   msg: 'GET /img/18043/ch04.png · <num>312 KB</num>' },
  { t: '14:02:26', tag: 'info', msg: 'reviews: paging /api/reviews?since=2026-05-21' },
  { t: '14:02:28', tag: 'ok',   msg: '<num>+34</num> reviews ingested' },
  { t: '14:02:30', tag: 'info', msg: 'writing db deltas (<num>52</num> ops)' },
  { t: '14:02:31', tag: 'ok',   msg: 'commit · games.json (<num>4.8 MB</num>) saved' },
  { t: '14:02:31', tag: 'info', msg: 'next sync scheduled in 6h' },
];

window.DATA = { TAGS, GAMES, REVIEWS, SCREENSHOTS, COLLECTIONS, MISSING_ASSETS, DEAD_URLS, ORPHANED, CRAWLER_LOG };
