diablo2-web/src/game/demo-data.ts

45 lines
2.7 KiB
TypeScript

import type { MonsterStats } from './combat'
import type { ItemBase, Affix } from './items'
import type { SkillDef } from './skills'
import type { NpcDef, QuestDef } from './quests'
export const DEMO_MONSTERS: readonly MonsterStats[] = [
{ id: 'demo-fallen', name: 'Fallen', hp: 12, damage: 3, cooldownTicks: 24, reach: 36, aggroRadius: 220, speed: 80, xp: 8 },
{ id: 'demo-zombie', name: 'Zombie', hp: 30, damage: 6, cooldownTicks: 32, reach: 40, aggroRadius: 170, speed: 46, xp: 15 },
{ id: 'demo-skeleton', name: 'Skeleton', hp: 18, damage: 4, cooldownTicks: 28, reach: 38, aggroRadius: 260, speed: 70, xp: 12 },
]
/** Fallback experience thresholds, index 1 = level 1. */
export const DEMO_EXPERIENCE: readonly number[] = [0, 0, 20, 60, 140, 280]
/** Fallback item bases and affixes, used when an archive ships no item tables. */
export const DEMO_BASES: readonly ItemBase[] = [
{ id: 'demo-sword', name: 'Sword', kind: 'weapon', invWidth: 1, invHeight: 3, maxStack: 1, value: 40, damage: 6, defense: 0, tags: ['weap'], level: 1 },
{ id: 'demo-cap', name: 'Cap', kind: 'armor', invWidth: 2, invHeight: 2, maxStack: 1, value: 30, damage: 0, defense: 5, tags: ['armo'], level: 1 },
{ id: 'demo-potion', name: 'Potion', kind: 'misc', invWidth: 1, invHeight: 1, maxStack: 5, value: 20, damage: 0, defense: 0, tags: ['misc'], level: 1 },
]
export const DEMO_AFFIXES: readonly Affix[] = [
{ id: 'demo-cruel', name: 'Cruel', kind: 'prefix', level: 3, itemTypes: ['weap'], modifiers: [{ stat: 'maxdamage', min: 3, max: 8 }] },
{ id: 'demo-might', name: 'of Might', kind: 'suffix', level: 2, itemTypes: [], modifiers: [{ stat: 'strength', min: 1, max: 4 }] },
]
/** Fallback skills, used when an archive ships no skill table. */
export const DEMO_SKILLS: readonly SkillDef[] = [
{ id: 'attack', name: 'Attack', manaCost: 0, cooldownTicks: 10, range: 48, projectile: false, speed: 0, baseMinDamage: 4, baseMaxDamage: 6, damagePerLevel: 1, radius: 20 },
{ id: 'firebolt', name: 'Fire Bolt', manaCost: 6, cooldownTicks: 20, range: 260, projectile: true, speed: 320, baseMinDamage: 7, baseMaxDamage: 10, damagePerLevel: 3, radius: 20 },
]
/** Fallback NPC, used when an archive ships no NPC table. */
export const DEMO_NPCS: readonly NpcDef[] = [{
id: 'elder', name: 'Elder', questId: 'demo',
offerLines: ['The moor is crawling with vermin.', 'Will you thin them out?'],
progressLines: ['Still at it?'], doneLines: ['The moor is quieter. Thank you.'],
}]
/** Fallback quest, used when an archive ships no quest table. */
export const DEMO_QUESTS: readonly QuestDef[] = [{
id: 'demo', name: 'Clear the Moor', description: 'Slay three monsters',
monsterId: '*', killCount: 3, rewardXp: 40, rewardGold: 80,
}]