# HentaiVerse — Complete Game Analysis & Automation Architecture ## Prepared for headless automation / Chrome extension / harness design ============================================================================= ## 1. GAME ARCHITECTURE HentaiVerse is a **server-authoritative browser RPG**. All logic runs server-side; the browser is a thin client rendering HTML pages. Key architectural facts: - **URL**: https://hentaiverse.org/ (subdomain of e-hentai.org) - **Transport**: HTTP(S) POST/GET with session cookies from e-hentai.org - **State**: Pure server-side. Browser refreshes the full page per turn/round. - **Page structure**: The battle page is a single HTML document. Each turn ("attack", "cast spell", "use skill", "use item") is an HTTP POST that returns a new page with updated state. - **Anti-automation**: Server-side rate limit of **4 turns per second**. RiddleMaster anti-bot popups appear between rounds at random intervals. - **Stamina**: Anti-cheating mechanic — only 99 stamina max, regenerates 1/hr. You cannot grind indefinitely without items or waiting. ### HTTP Flow (Battle) ``` GET /?s=BATTLE&... ← Enter battle (from Arena/Grindfest/etc.) POST /?s=BATTLE&action=attack ← Click "Attack" → server processes → returns new HTML POST /?s=BATTLE&action=cast&spell=14&target=2 ← Cast spell on monster #2 POST /?s=BATTLE&action=skill&skill=1 ← Use skill POST /?s=BATTLE&action=item&item=3&target=player ← Use item on self POST /?s=BATTLE&action=flee ← Flee POST /?s=BATTLE&action=defend ← Defend POST /?s=BATTLE&action=focus ← Focus ``` The response HTML contains: - Updated monster HP/MP/status bars (parsed from HTML tables) - Updated player vitals - New battle log text - Buff/debuff durations - If monsters are dead → link to "next round" or "exit to bazaar" ### Key Observation Because the game is **server-authoritative** and every action returns full HTML, an automation tool doesn't need to simulate complex state. It just needs to: 1. Parse the current page HTML to extract game state 2. Decide the optimal action based on state + strategy 3. POST the action form 4. Parse the new page HTML 5. Repeat This is exactly how existing userscripts (jpx, Monsterbation) work. ============================================================================= ## 2. GAMEPLAY LOOP ``` LOGIN → BAZAAR → SELECT BATTLE MODE → [ENTER BATTLE] → ROUND 1: fight monsters → ROUND N: ... → EXIT → BAZAAR ``` ### Pre-Battle (Bazaar) - Equip gear (Character → Equipment) - Allocate ability/mastery points (Character → Abilities) - Train skills (Character → Training) - Shrine artifacts - Manage items/inventory - Monster Lab management ### Battle Loop (per round) ``` 1. Page loads → parse enemy list, player vitals, buffs/debuffs 2. Select action: - Physical Attack (target monster) - Cast Spell (target monster(s)) - Use Skill (target monster or self) - Use Item (target self) - Defend / Focus / Flee - Toggle Spirit Stance 3. POST action → server resolves: - Player attack lands/misses/crits - Elemental strike proc checks - Equipment proc checks - Monster attacks resolved (speed-based, can be multiple) - Status effect durations decremented - Vital regeneration ticks 4. New HTML page loads → go to step 2 or "Next Round" ``` ### Post-Battle - Loot popup (equipment/items/credits) - Return to Bazaar - Train / shrine / sell / repair equipment - Repeat from Step 1 until stamina exhausted ============================================================================= ## 3. CHARACTER SYSTEM — COMPLETE FORMULAS ### 3.1 Primary Attributes (6 stats) | Stat | Key Effects | |-------|------------------------------------------------------| | STR | +2 phys dmg / pt, +1% Overwhelming Strikes per 100 | | END | +6 HP/pt, +1 phys mit/pt, +1 mag mit/pt | | DEX | +1 phys dmg/pt, +0.5 acc, +0.4 parry | | INT | +2 mag dmg/pt, +1% Coalesced Mana per 100 | | AGI | +0.5 phys mit/pt, +0.4 evade, +attack speed | | WIS | +1 MP/pt, +1 mag dmg/pt, +0.5 mag acc, +0.4 resist | **EXP cost to raise**: (current_stat + 1)^(2.5475566751265^(1+(current_stat/950))) ### 3.2 Derived Stats — Key Formulas **Physical Base Damage:** ``` = (log(3330 + STR*2 + DEX, 1.0003) - 27039.81) + (weapon_prof * TYPE) + sum(all_equip_ADB) ``` Where TYPE = 5 (DW), 4 (1H), 3 (2H/Staff) **Magic Base Damage:** ``` = (log(3330 + INT*2 + WIS, 1.0003) - 27039.81) + (staff_prof * 0.5) + sum(all_equip_MDB) ``` **Physical Hit Chance:** ``` = 80% + DEX*0.04% + prof_bonus + sum(equip_acc) ``` **Magical Hit Chance:** ``` = 80% + WIS*0.04% + prof_bonus + sum(equip_mag_acc) ``` **Physical Crit (layered):** ``` = 1 - Π(1 - layer_n) ``` Layers: base (5%), stats, prof, each equipment piece independently. Burden penalty: crit_chance *= Max(1 - (Max(burden-70,0) * 0.02)^1.5, 0) **Magic Crit (layered):** Same structure, interference penalty instead of burden. **Attack Speed:** ``` 1 - Π(1 - layer_n) with layers from AGI, prof, each equipment piece Burden penalty: speed *= (1 - Min((Max(burden-40, 0) * 0.02)^1.5, 1)) ``` **Cast Speed (additive):** ``` = (1 + equip_bonus + prof_bonus) ``` **Evade:** ``` = 1 - (1 - shadow_veil) * (burden_penalty) * (1-eq) * (1-title) * (1 - AGI*0.04%) ``` **Parry:** ``` = 1 - Π(1 - layer_n) // layers from DEX, prof, equipment ``` **Mitigation:** ``` Phys: 1 - (1 - eq_bonus) * (900/(900 + END + AGI/2)) Mag: 1 - (1 - eq_bonus) * (900/(900 + END + WIS/2)) ``` **HP / MP / SP:** ``` HP = (500 + level*10 + END*6) * HP_Tank * vigorous_vitality MP = (10 + level + WIS) * MP_Tank * effluent_ether SP = (1 + sum(all_6_stats)/5) * SP_Tank * suffusive_spirit ``` **Battle Regen (per "tick" = 100 time units):** ``` MP/tick = 5 + (WIS/25) * perk_bonus SP/tick = 1 + (sum_all_stats/600) * perk_bonus ``` ### 3.3 Action Speed & Time Units ``` action_speed = 100 / (1 - cast_speed) / specific_action_speed / prof_factor_multiplier * (1 + haste) time_units = clamp(20, 10000 / action_speed, 500) ``` **Key action base speeds:** - Physical attack: 1.0 - T1 offensive spell: 1.2 - T2 offensive spell: 1.4 - T3 offensive spell: 1.6 - Curative spells: ~0.2 - Support spells: ~0.1 A "tick" = 100 time units. Buffs/debuffs decrement every tick. Faster actions = more attacks per tick before buffs expire. **Server bottleneck: max 4 turns/sec** (anti-bot measure). ============================================================================= ## 4. COMBAT SYSTEM ### 4.1 Damage Formula **Physical damage delivered:** ``` damage = base_physical_dmg * (1 + hath_bonus) // Daemon Duality 10-50% * (1 + tower_bonus) // 0.1% per isekai floor * (1 + crit_mod) // +50% base, +equip bonuses * (1 + heartseeker_bonus) // 25% if active * (1 + spirit_stance) // 100% if active ``` **Then applied to target:** ``` damage_taken = damage * (1 - phys_mitigation) * (1 - specific_mitigation) ``` Where specific mitigation = elemental type (fire/cold/elec/wind/holy/dark) OR physical type (slash/pierce/crush). Mitigations are multiplicative, cannot go below 0. ### 4.2 Elemental Strikes Weapons may have elemental strikes (Fire/Cold/Elec/Wind/Holy/Dark/Void). Each strike deals ~50% of normal physical damage as a separate attack in the same turn. Counts as physical for mitigation purposes (goes through phys mit + specific elemental mit). ### 4.3 Avoidance (layered multiplicative) ``` Physical avoidance = 1 - (1-evade') * (1-block') * (1-parry') Magical avoidance = 1 - (1-evade') * (1-block') * (1-resist') ``` Where primed values account for anti-evade/anti-block/anti-parry/anti-resist from custom monsters. **Resist rolls** (for spells): 3 independent rolls. - 0 rolls: 0% reduction - 1 roll: 50% reduction - 2 rolls: 75% reduction - 3 rolls: 90% reduction ### 4.4 Equipment Procs Weapon-specific procs trigger on hit: - **Bleeding Wound** (Axe, Shortsword, Wakizashi, Longsword, Katana) — DoT - **Stun** (Club, Mace) — target can't act - **Penetrated Armor** (Rapier, Estoc) — reduces phys/mag mitigation by 25%/stack - **Ether Theft** (Staff) — steal MP Stacking: Penetrated Armor up to 3 stacks (75%). Bleeding Wound up to 100 stacks. ### 4.5 Skills (Overcharge-based) Skills cost Overcharge (yellow bar built by dealing/taking damage). Key skills by fighting style: **1H + Shield:** - Shield Bash (25 OC, 10 CD) — Stun 5 turns - Vital Strike (50 OC, 10 CD) — 100 Bleeding Wound stacks on stunned enemy - Merciful Blow (100 OC, 10 CD) — execute <25% HP bleeding target **Dual Wield:** - Iris Strike (50 OC, 5 CD) — Blind 100 turns - Backstab (50 OC, 5 CD) — 2x damage to blinded, poison - Frenzied Blows (75 OC, 10 CD) — 10-20 hits across 5 targets **2H:** - Great Cleave (50 OC, 5 CD) — guaranteed crit - Rending Blow (50 OC, 5 CD) — 3 Penetrated Armor to 5 targets, bypasses phys mit - Shatter Strike (50 OC, 5 CD) — Stun 5 turns to 5 targets with Penetrated Armor **Staff (Mage):** - Concussive Strike (50 OC, 10 CD) — Stun 5 turns, magic damage ### 4.6 Spirit Stance - Toggle state: +100% damage dealt, +25% mana costs - Drains SP while active (10% of base overcharge per turn) - Cannot be maintained without sufficient SP ### 4.7 Core Spells (for automation strategy) **Offensive (Elemental):** | Tier | Fire | Cold | Elec | Wind | Lvl | Cost | |------|------|------|------|------|-----|------| | 1 | Fiery Blast | Freeze | Shockblast | Gale | 15-45 | 6% | | 2 | Inferno | Blizzard | Chained Lightning | Downburst | 95-125 | 14% | | 3 | Flames of Loki | Fimbulvetr | Wrath of Thor | Storms of Njord | 175-205 | 21% | Cost is % of player level. T2/T3 hit multiple targets (5-10 depending on abilities). **Deprecating (mandatory for mages):** - **Imperil** (Lvl 130, 10% cost, 3 CD) — REDUCES enemy phys/mag/elemental mitigation - **Weaken** (Lvl 70, 10% cost, 3 CD) — REDUCES enemy damage by 50% - **Slow** (Lvl 10, 18% cost, 3 CD) — slows enemy actions - **Sleep** (Lvl 80, 22% cost, 7 CD) — incapacitates target - **MagNet** (Lvl 250, 22% cost, 15 CD) — prevents evade AND resist **Supportive:** - **Haste** (Lvl 60, 30% cost, 0 CD) — +50% action speed - **Protection** (Lvl 10, 25% cost, 0 CD) — -25% damage taken - **Shadow Veil** (Lvl ~130) — base evade that ignores burden - **Regen** (Lvl 50, 22.5% cost, 0 CD) — HP regen/turn - **Cure** (Lvl 5, 20% cost, 5 CD) — instant heal - **Heartseeker** (Lvl 200+) — +25% phys damage - **Spirit Shield** (Lvl 200+) — absorb damage with SP **Spell cost modified by:** ``` MP_cost = roundup(level * base_cost/100 * (1 + interference*0.5%) * (1 - mana_conservation) * (1 - spirit_stance) * (1 - coalesced)) ``` ============================================================================= ## 5. BATTLE MODES ### Arena - Fixed monster sets, fixed round counts - **Best credits/hour in early-mid game** - Available once/day per challenge - Higher level challenges have more rounds, better credit bonuses - Max: "Eve of Death" (Lvl 180, 70 rounds) - First clear bonus is higher than subsequent clears ### Grindfest - **Infinite rounds** (until you die or flee) - Monsters scale with rounds (harder over time) - 1 stamina entry cost, no per-round stamina - **Best EXP/proficiency grind for sustained play** - Drop multiplier increases at high round counts ### Item World - Level up equipment stats (potency) - Costs all stamina upfront based on rounds to clear - Quality of equipment affects difficulty - Higher difficulty → better potency gains ### Random Encounter - Triggered randomly while browsing E-Hentai - Does NOT cost stamina - Special loot tables - Scripts (HV Utils) auto-detect and notify ### Ring of Blood - Boss fights - 1/day attempt - Unique rewards ### The Tower (Isekai) - Seasonal competitive mode - Separate character (Isekai mode) - Rankings and special rewards ============================================================================= ## 6. ECONOMY ### Credits (primary currency) - Earned from battles (Arena most reliable) - Spent on: training, equipment repairs, item shop, market ### Credits per Arena (first clear): | Challenge | Rounds | First Clear Credits | |-----------|--------|---------------------| | Fresh Meat (Lvl 50) | 12 | 5,000 C | | Endgame (Lvl 100) | 35 | 10,000 C | | Exile (Lvl 130) | 50 | 20,000 C | | To Kill a God (Lvl 165) | 65 | 35,000 C | | Eve of Death (Lvl 180) | 70 | 40,000 C | ### Hath (premium currency) - Earned from H@H (our other project) and donations - Buy Hath Perks (permanent account upgrades) - Exchange for Credits on Hath Exchange (currently ~3,038 C/Hath) ### Gallery Points (GP) - Earned from H@H hits (0.1 GP/hit) - Earned from HV battles (slower) - Used in bounty system ### Training (credit sink, permanent upgrades) | Training | Effect | Levels | Initial Cost | |----------|--------|--------|-------------| | Adept Learner | +1% EXP/level | 300 | 100 C | | Scavenger | +1% loot drop chance | 50 | 500 C | | Ability Boost | +1 Ability Point | 500 | 100 C | | Assimilator | +10% prof gain rate | 25 | 50K C | | Quartermaster | +5% equip drop chance | 20 | 5K C | | Archaeologist | +10% artifact drop chance | 10 | 25K C | | Luck of the Draw | +1% rare equip chance | 25 | 2K C | ### Items (battle consumables) - Energy Drink: +10 stamina (from donator daily reward) - Caffeinated Candy: +5 stamina (lottery) - Potions/Scrolls/Gems: various battle effects - Infusions: temporary elemental damage ============================================================================= ## 7. AUTOMATION RULES (CRITICAL) **From the official wiki ("Scripts & Tools" → "Forbidden Actions"):** ### EXPLICITLY FORBIDDEN (full ban): 1. **Fully automated/unattended play** — clearing multiple battles without ANY manual input from the player 2. **Automatic monster feeding** — collecting benefits without player input 3. **Automating RiddleMaster** — including ML-based solving 4. **Auto-starting new battles** — anything that chains battles together ### ALLOWED: 1. Per-round auto-battlers that require a **human click to advance** (jpx) 2. UI enhancements (HV Utils, Monsterbation) 3. Statistical tracking, alerts, quality-of-life scripts 4. Hotkey rebinding **The grey area**: "per round" means a script may decide what action to take this round, but the player must manually click to execute or advance. The existing approved script jpx works exactly this way — it recommends the optimal action, the player clicks to execute, the script processes the result and recommends the next action. ### PENALTIES **Full account ban** — not just the HV game. You lose: - Access to e-hentai.org galleries - Forum account - All H@H clients - All Hath, Credits, equipment ============================================================================= ## 8. EXISTING AUTOMATION TOOLS (patterns to study) ### jpx (approved, active) - Type: Tampermonkey userscript - Function: "Manually triggered per round auto-battler" - Pattern: Press a hotkey → script recommends action → press another hotkey → script submits the action → page reloads → script parses new state → repeat - Has: auto-battle ruleset manager, battle statistics tracker - URL: Listed on wiki's Scripts & Tools page (v2026.07.06) ### Monsterbation (approved) - Type: Tampermonkey userscript (v1.4.1.3) - Function: "All-purpose hovering script for melee and mage" - Pattern: Hover-based UI that overlays recommendations ### HV Utils (approved) - Type: Tampermonkey userscript (v4.2.3) - Function: Out-of-battle automation - Automates: shrine, equipment shop (auto-sell/salvage bad gear), RE detection, inline equipment changer ### HV Toolbox - Type: Tampermonkey userscript - Function: Shop management, MoogleMail, shrine --- ## 9. IMPLEMENTATION OPTIONS ### Option A: Tampermonkey Userscript (Recommended) **What:** JavaScript userscript injected into hentaiverse.org **How:** Leverages the browser's DOM + cookies for authenticated requests. **Compliance:** Requires one human click per round = fully within rules. **Architecture:** ``` ┌─────────────────────────────────────┐ │ hentaiverse.org page (browser) │ │ ┌─────────────────────────────────┐ │ │ │ Tampermonkey Userscript │ │ │ │ ┌─────────┐ ┌──────┐ ┌───────┐ │ │ │ │ │ Parser │ │ Strat │ │Action │ │ │ │ │ │(DOM→obj)│→│ Engine│→│ Submitter│ │ │ │ └─────────┘ └──────┘ └──┬────┘ │ │ │ │ │ POST │ │ │ └────────────────────────┼───────┘ │ │ ← HTML response ←─┘ │ └─────────────────────────────────────┘ ``` **Pros:** - Low development effort (pure JS, ~2000-3000 lines) - Uses existing browser session/cookies (no auth headache) - Can be published as a Tampermonkey script - Hotkey-driven: press "F" to execute recommended action **Cons:** - Requires a browser open (can't be fully headless) - Must comply with per-round click requirement - Cannot auto-chain battles (within rules anyway) ### Option B: Headless Browser + Puppeteer/Playwright **What:** Node.js script controlling headless Chromium with puppeteer **How:** Full browser automation — can click buttons, fill forms, parse HTML **Compliance:** DANGER ZONE — easy to accidentally cross into full automation **Pros:** - Can run on VPS headless 24/7 - Full DOM access - Can take screenshots for debugging **Cons:** - Resource heavy (Chromium + Node.js) - Very easy to get banned if fully automated - The 4-turns/sec rate limit still applies - RiddleMaster will appear faster with full automation and flag you ### Option C: Direct HTTP Client (Python/Node.js) **What:** Script that directly sends HTTP POST requests to hentaiverse.org **How:** Parse HTML responses, POST action forms, manage cookies **Compliance:** HIGH RISK — indistinguishable from botting **Pros:** - Zero overhead (no browser) - Can run on VPS headless - Fastest possible throughput **Cons:** - Must reverse-engineer exact form fields, CSRF tokens, cookie handling - No JavaScript execution — some game mechanics may rely on JS - **Extremely high ban risk** if performed unattended - Cannot solve RiddleMaster without AI/OCR (which is explicitly forbidden) ### Option D: Hybrid — Chrome Extension **What:** Chrome extension that bridges between manual and headless **How:** Extension runs a WebSocket server; a remote harness connects and controls **Pros:** - Browser handles auth/rendering - Remote harness can run on VPS - Clean separation of concerns **Cons:** - Browser still needs to be open - Complex architecture - Extension review policy may flag it ============================================================================= ## 10. RECOMMENDED STRATEGY ### Short-term: Tampermonkey script (Option A) Build a **per-round auto-battler** modeled after jpx: ``` ┌──────────────────────────────────────────────┐ │ Strategy Engine (what the script decides) │ │ │ │ MAGE MODE (simplest to automate): │ │ 1. Check if Imperil needed → cast │ │ 2. Check if Weaken needed → cast │ │ 3. Check mana → if low, use Draught/Focus │ │ 4. Check if Haste active → if not, cast │ │ 5. Check if Shadow Veil active → cast │ │ 6. Cast strongest available AoE spell │ │ Pick element based on target weakness: │ │ - Scan each monster for lowest resist │ │ - Match spell element to weakness │ │ ALL BY HOTKEY: PRESS ONE KEY TO EXECUTE │ │ │ │ MELEE MODE: │ │ 1. Check Overcharge → use skills if enough │ │ 2. Attack lowest-HP monster first (sweep) │ │ 3. Use Spirit Stance when full OC/SP │ │ 4. Heartseeker before big skills │ │ │ │ ITEM MODE (optional, stamina recovery): │ │ - Consume Energy Drink if stamina < 10 │ └──────────────────────────────────────────────┘ ``` ### Mid-term: Add out-of-battle automation like HV Utils - Auto-sell/salvage low-quality equipment - Auto-shrine artifacts - Auto-train when credits available - Monster Lab feeding reminders ### Long-term (IF server offset goal is serious): Run H@H 24/7 for passive Hath (our primary project), and supplement with Hath→Credit exchange (3,038 Cr/Hath). This is the **legit, no-ban-risk path** to monetize the game's economy without botting. ### NEVER build: - Fully automated battle chaining (Arena → exit → next Arena → ...) - RiddleMaster auto-solver - Anything that runs with zero human interaction for >1 round ============================================================================= ## 11. KEY TECHNICAL NOTES FOR IMPLEMENTATION ### HTML Parsing The battle page structure (from wiki screenshots): - Top bar: stamina, credits, HP/MP/SP bars - Center: enemy list (table with HP bars, status icons, names) - Bottom: action buttons (Attack dropdown, Spell grid, Skill list, Item list) - Battle log: text output of last action ### Monster Data Extraction (from HTML tables) ```
| HP bar (width = current/max %) | Status icons | Name (text) | Level/PL |