# HikeMap RPG - Skills Reference This document contains base skill definitions for the HikeMap RPG system. ## Table of Contents - [Skill Types](#skill-types) - [Base Skills](#base-skills) - [Skill Unlock Levels](#skill-unlock-levels) - [Skill Loadout System](#skill-loadout-system) - [Combat Formulas](#combat-formulas) - [Database Schema](#database-schema) --- ## Skill Types | Type | Description | |------|-------------| | `damage` | Deals damage to enemy/enemies | | `heal` | Restores HP to self | | `buff` | Applies a temporary stat boost | | `status` | Applies a status effect (poison, etc.) | | `utility` | Out-of-combat effects (MP regen, etc.) | --- ## Base Skills ### Basic Attack | Property | Value | |----------|-------| | **ID** | `basic_attack` | | **Type** | Damage | | **MP Cost** | 0 | | **Base Power** | 100% ATK | | **Accuracy** | 95% | | **Target** | Single enemy | | **Description** | A basic physical attack | ### Double Attack | Property | Value | |----------|-------| | **ID** | `double_attack` | | **Type** | Damage | | **MP Cost** | 5 | | **Base Power** | 60% ATK | | **Hits** | 2 | | **Accuracy** | 85% | | **Target** | Single enemy | | **Description** | Strike twice in quick succession | ### Heal | Property | Value | |----------|-------| | **ID** | `heal` | | **Type** | Heal | | **MP Cost** | 8 | | **Base Power** | 50% of max HP | | **Accuracy** | 100% | | **Target** | Self | | **Description** | Restore HP | ### Power Strike | Property | Value | |----------|-------| | **ID** | `power_strike` | | **Type** | Damage | | **MP Cost** | 10 | | **Base Power** | 180% ATK | | **Accuracy** | 80% | | **Target** | Single enemy | | **Description** | A powerful blow with extra force | ### Defend | Property | Value | |----------|-------| | **ID** | `defend` | | **Type** | Buff | | **MP Cost** | 3 | | **Effect** | DEF +50% for 2 turns | | **Accuracy** | 100% | | **Target** | Self | | **Description** | Raise defense temporarily | ### Whirlwind | Property | Value | |----------|-------| | **ID** | `whirlwind` | | **Type** | Damage | | **MP Cost** | 12 | | **Base Power** | 75% ATK | | **Accuracy** | 85% | | **Target** | All enemies | | **Description** | A spinning attack that hits all enemies | ### Quick Strike | Property | Value | |----------|-------| | **ID** | `quick_strike` | | **Type** | Damage | | **MP Cost** | 4 | | **Base Power** | 80% ATK | | **Accuracy** | 98% | | **Target** | Single enemy | | **Description** | A fast attack with high accuracy | ### Focus | Property | Value | |----------|-------| | **ID** | `focus` | | **Type** | Buff | | **MP Cost** | 6 | | **Effect** | Accuracy +20% for 3 turns | | **Accuracy** | 100% | | **Target** | Self | | **Description** | Concentrate to boost accuracy | ### Second Wind | Property | Value | |----------|-------| | **ID** | `second_wind` | | **Type** | Utility | | **MP Cost** | 0 | | **Effect** | 2x MP regen while walking for 1 hour | | **Cooldown** | Once per day | | **Target** | Self | | **Description** | Double your MP regeneration while walking | ### Heavy Blow | Property | Value | |----------|-------| | **ID** | `heavy_blow` | | **Type** | Damage | | **MP Cost** | 15 | | **Base Power** | 250% ATK | | **Accuracy** | 60% | | **Target** | Single enemy | | **Description** | A devastating attack that is hard to land | ### Quick Heal | Property | Value | |----------|-------| | **ID** | `quick_heal` | | **Type** | Heal | | **MP Cost** | 4 | | **Base Power** | 25% of max HP | | **Accuracy** | 100% | | **Target** | Self | | **Description** | A small but efficient heal | ### Triple Strike | Property | Value | |----------|-------| | **ID** | `triple_strike` | | **Type** | Damage | | **MP Cost** | 18 | | **Base Power** | 50% ATK | | **Hits** | 3 | | **Accuracy** | 80% | | **Target** | Single enemy | | **Description** | Strike three times in rapid succession | ### Full Restore | Property | Value | |----------|-------| | **ID** | `full_restore` | | **Type** | Heal | | **MP Cost** | 30 | | **Base Power** | 100% of max HP | | **Accuracy** | 100% | | **Target** | Self | | **Description** | Fully restore HP at great MP cost | ### Poison (Monster Only) | Property | Value | |----------|-------| | **ID** | `poison` | | **Type** | Status | | **MP Cost** | 0 | | **Effect** | 5 damage per turn for 3 turns | | **Accuracy** | 75% | | **Target** | Single enemy | | **Player Usable** | No | | **Description** | Inflict poison that deals damage over time | --- ## Skill Unlock Levels Skills are unlocked at level milestones. Each level offers a choice between two skills: | Player Level | Choice A | Choice B | |--------------|----------|----------| | 1 | Basic Attack | - | | 2 | Double Attack | Heal | | 3 | Power Strike | Defend | | 4 | Whirlwind | Quick Strike | | 5 | Second Wind | Quick Heal | | 6 | Triple Strike | Focus | | 7 | Full Restore | Heavy Blow | --- ## Skill Loadout System ### How It Works 1. **On Level-Up**: When reaching a skill unlock level, the player chooses one skill to make **active**. However, **all skills offered at that level are unlocked**. 2. **Active vs Unlocked**: - `unlockedSkills`: All skills the player has learned - `activeSkills`: Skills currently equipped for combat (one per tier) 3. **Swapping Skills**: At home base, players can swap which skill is active for each tier. 4. **Combat**: Only skills in `activeSkills` appear in the combat skill menu. ### Skill Tiers | Tier | Level | Skills | |------|-------|--------| | 0 | 1 | Basic Attack (always active) | | 1 | 2 | Double Attack, Heal | | 2 | 3 | Power Strike, Defend | | 3 | 4 | Whirlwind, Quick Strike | | 4 | 5 | Second Wind, Quick Heal | | 5 | 6 | Triple Strike, Focus | | 6 | 7 | Full Restore, Heavy Blow | **Note**: Utility skills (like Second Wind) don't appear in combat loadout - they are activated from the character sheet. --- ## Combat Formulas ### Damage Calculation ``` finalDamage = (skillPower * playerATK / 100) - enemyDEF ``` ### Hit Chance ``` hitChance = skillAccuracy + (attackerAccuracy - 90) - defenderDodge ``` - Clamped between 5% and 99% ### Defense Buff When Defend is active: ``` effectiveDEF = baseDEF * 1.5 ``` --- ## Database Schema ### skills table | Column | Type | Description | |--------|------|-------------| | id | TEXT | Skill identifier (primary key) | | name | TEXT | Display name | | description | TEXT | Skill description | | type | TEXT | damage/heal/buff/status/utility | | mp_cost | INTEGER | MP required to use | | base_power | INTEGER | Base power percentage | | accuracy | INTEGER | Base accuracy (default 100) | | hit_count | INTEGER | Number of hits (default 1) | | target | TEXT | enemy/self/all_enemies | | status_effect | TEXT | JSON for status effects | | player_usable | BOOLEAN | Can players use this? | | monster_usable | BOOLEAN | Can monsters use this? | | enabled | BOOLEAN | Is skill active in game? | ### class_skills table | Column | Type | Description | |--------|------|-------------| | class_id | TEXT | Class ID | | skill_id | TEXT | Base skill ID | | unlock_level | INTEGER | Level when skill becomes available | | choice_group | INTEGER | Skills with same group are offered together | ### class_skill_names table | Column | Type | Description | |--------|------|-------------| | skill_id | TEXT | Base skill ID | | class_id | TEXT | Class ID | | custom_name | TEXT | Class-specific name | | custom_description | TEXT | Class-specific description |