# Gameplay Guide

## Purpose

This guide defines the core gameplay direction for the top-down survival RPG. It should help future design, asset, UI, balancing, and implementation work stay consistent.

The player starts plain: no class identity, no active skills, and no special power fantasy yet. The game should teach movement, pickups, danger, and survival first. As the player does useful things, they earn points, level up, choose a class direction, and shape their powers through stats and materials.

## Core Loop

The main loop should be simple and readable:

1. Explore the map.
2. Avoid or fight monsters.
3. Collect prizes, materials, and rewards.
4. Earn XP, score, and progression points.
5. Level Power, Agility, and Intelligence.
6. Improve class passives.
7. Find better materials that change the look and behavior of powers.
8. Push farther into more dangerous zones.

The player should always understand what they are trying to do next: survive, collect, level, unlock, and reach the next safe or valuable place.

## Starting State

At the start, the player should be classless and weak.

- Starting identity: plain wanderer, novice, or survivor.
- Starting combat: one basic attack or weak magic projectile.
- Starting stats: low Power, low Agility, low Intelligence.
- Starting class: none.
- Starting materials: basic/neutral material.
- Starting goal: learn movement, collect the first prizes, and survive the first simple threats.

Recommendation: do not ask the player to choose a class before they understand the game. Let them start classless, then choose or discover a class after the first tutorial/safe-zone loop.

## Progression Points

The player earns points by doing meaningful actions:

- collecting prizes
- defeating enemies
- surviving waves or danger pockets
- finding hidden rewards
- opening chests
- reading signs or shrine clues
- completing small map objectives
- reaching exits or landmarks

Use two kinds of progress if possible:

- XP/Level: fills automatically from play and gives level-up moments.
- Attribute points: spent by the player on Power, Agility, or Intelligence.

Keep the first version simple: one level-up grants one attribute point. More complex rewards can come later.

## Primary Stats

The canonical stats are Power, Agility, and Intelligence.

Power should improve force:

- attack damage
- knockback
- projectile size
- area size
- shield strength
- material effect intensity

Agility should improve action feel:

- movement speed
- attack cooldown
- cast speed
- dodge window
- pickup responsiveness
- recovery after attacks

Intelligence should improve control and magic quality:

- spell duration
- cooldown efficiency
- status-effect chance
- projectile count or targeting quality
- mana/energy efficiency if those systems are added later
- shrine, sign, or puzzle benefits

Do not make every stat increase every number. Each stat should have a clear identity, so level-up choices feel different.

## Classes

There are three class directions:

- Fighter
- Mage
- Sorcerer

Each class should have three passive skill tracks. Recommendation: give each class one passive that scales mainly with Power, one with Agility, and one with Intelligence. This keeps all three stats useful for every class while still making the classes feel different.

### Fighter

Fighter should feel direct, physical, and sturdy.

Passive tracks:

- Force Training: Power increases melee/projectile impact, damage, knockback, and break strength.
- Battle Footwork: Agility improves attack rhythm, movement while attacking, and recovery time.
- Combat Instinct: Intelligence improves timing bonuses, counter windows, weak-point chance, or tactical pickups.

Fighter should be easiest to understand and hardest to kill.

### Mage

Mage should feel controlled, elemental, and readable.

Passive tracks:

- Spell Focus: Intelligence improves spell duration, targeting, cooldown efficiency, and status chance.
- Channel Power: Power increases spell size, damage, and impact.
- Swift Casting: Agility improves cast speed, projectile rhythm, and repositioning after casts.

Mage should be strong at range and clear for players who like visible elemental powers.

### Sorcerer

Sorcerer should feel stranger, riskier, and more magical than Mage.

Passive tracks:

- Arcane Overflow: Intelligence increases chain effects, status spread, unusual procs, or curse strength.
- Forbidden Force: Power increases burst damage, drain strength, or high-risk payoff.
- Phase Rhythm: Agility improves dodge-like effects, blink timing, or afterimage movement.

Sorcerer should be more advanced than Fighter and Mage. It can be stronger, but should ask the player to manage risk, timing, or unstable effects.

## Class Unlock Recommendation

Recommended early-game flow:

1. Player starts plain.
2. Player learns movement, pickups, and basic danger.
3. Player earns the first few attribute points.
4. Player reaches a shrine, trainer, class gate, or story object.
5. Player chooses Fighter, Mage, or Sorcerer.
6. The chosen class activates its three passive tracks.

This avoids front-loading too many choices before the player understands what Power, Agility, and Intelligence actually do.

## Materials And Power Colors

Materials should change the color, visual effect, and secondary flavor of powers. Materials should not replace class identity.

Examples:

- Fire: red/orange powers, burn damage, explosive hits, aggressive lighting.
- Ice: blue/cyan powers, slow effects, brittle/shatter hits, crisp particles.
- Lightning: yellow/white powers, chain hits, stun chance, sharp flashes.
- Nature: green powers, poison, healing, vines, growth, life-drain.
- Shadow: purple/black powers, curse, drain, fear, teleport-like effects.
- Light: gold/white powers, protection, cleanse, bonus against dark enemies.
- Neutral/basic: white/gray powers, simple damage, no special status.

Recommendation: treat material as an equipment or attunement layer. A Fighter with Fire should still feel like a Fighter. A Mage with Fire should still feel like a Mage. The Fire material changes visuals and status flavor, not the whole class.

## Class Plus Material Examples

- Fire Fighter: heavier red-orange impacts, burn on strong hits, aggressive knockback.
- Ice Fighter: blue-white hit flashes, short slow on impact, defensive feel.
- Fire Mage: larger fire projectiles, burn zones, warm glow.
- Ice Mage: slowing bolts, frozen trails, clean blue cast effects.
- Lightning Sorcerer: chain procs, unstable flashes, risky burst.
- Shadow Sorcerer: dark drain, curse marks, phase-like movement effects.

Use these as examples, not hard requirements. The class/material combination should be data-driven so new materials can be added without rewriting the class system.

## Gameplay Data Contract

Future implementation should keep gameplay data separate from art files.

Useful data files later:

- `progression/stats.json`: stat names, max levels, level-up costs, and stat effects.
- `progression/classes.json`: class ids, class descriptions, passive tracks, scaling rules, and unlock requirements.
- `progression/materials.json`: material ids, colors, status effects, particles, sound hints, and unlock/drop rules.
- `progression/player_progression.json`: starting values, level-up rules, XP curve, and first-unlock flow.

Each passive should declare:

- passive id
- class id
- display name
- primary stat
- secondary stat if any
- level range
- effect formula
- visual cue
- unlock condition
- gameplay note

## UI Requirements

The player UI should eventually show:

- current class or classless state
- Power, Agility, and Intelligence levels
- available attribute points
- active material
- power color/material icon
- three class passive tracks after class unlock
- a short preview of what each stat upgrade changes

For the first playable version, keep this minimal: level-up text plus three stat buttons is enough.

## Balancing Notes

Start conservative:

- Each level-up gives one attribute point.
- Each stat has a visible effect every time it increases.
- Passives should improve gradually, not explode instantly.
- Materials should add flavor first and raw damage second.
- Avoid too many active skills early; passives are easier to understand and easier to balance.

Recommended first implementation:

1. Add XP and level-up.
2. Add Power, Agility, and Intelligence.
3. Let the player spend one point per level.
4. Add one class unlock moment.
5. Add one passive per class.
6. Add materials as power colors first.
7. Add material status effects after the basic loop feels good.

## Approval Checklist

Before implementing a gameplay system, confirm:

- The player starts plain/classless.
- Power, Agility, and Intelligence are the canonical stats.
- XP and attribute points are clearly separated or intentionally merged.
- Each class has a clear play style.
- Each class has three passive tracks.
- Each passive has a primary stat.
- Material changes color and elemental flavor without destroying class identity.
- The first playable version stays simple enough to test quickly.
- Level-up choices are readable on mobile.
- All systems can be represented as data later.
