hv-unified/src/public-api.js
GaboGG 402db6bb2f Initial commit: HV Unified v0.11.0 structure
- 23 source files in src/ (build via scripts/build.sh)
- Forum-sourced player knowledge in references/
- DESIGN.md with architecture and corrections
- References to existing scripts (Monsterbation, jpx, HV Utils)
2026-07-20 19:30:26 -04:00

23 lines
1.2 KiB
JavaScript

// ═══════════════════════════════════════════════════════════════════════
// PUBLIC API — window.HV for console power users
// ═══════════════════════════════════════════════════════════════════════
window.HV = {
state: () => STATE,
config: () => CFG,
set: (k, v) => setConfig(k, v),
action: () => getRecommendedAction(),
execute: (a) => executeAction(a || getRecommendedAction()),
tier: () => STATE.tier,
stats: () => JSON.parse(localStorage[SP + 'stats'] || '{"battles":0,"credits":0,"drops":0}'),
settings: () => toggleSettings(),
advice: () => {
const s = detectFightingStyle();
return { style: s, attrs: getAttrAdvice(s), spells: getSpellAdvice(), difficulty: getDifficultyAdvice() };
},
difficulty: () => getDifficultyAdvice(),
// Battle log analysis
log: () => getBattleLog(),
summary: () => getBattleSummary(),
saveLog: () => {}, // Auto-saves in real-time now
};