Files
aeternalis/docs/MILESTONE-7.md
T

8.4 KiB
Raw Blame History

Milestone 7: spells, weapon abilities, and corpse revival

This build adds playable character-owned spell learning/ranks, weapon proficiency, automatic ability unlocks, eight assignable action slots, controller controls, and durable corpse resurrection. Control has readable Spells and abilities and Weapon types editors; equipment can reference a weapon type. IDs are generated by the server. Publish/preview uses the existing catalog version and audit path.

Learning and combat

  • Inventory contains Spells and abilities, owned spell books, weapon levels, learned powers, and slot assignment. Consuming a book learns its spell at rank 1. Duplicate books and books with unmet requirements are retained.
  • Control can grant books and revival stones, put them in loot tables, and use them in recipes. Existing mob loot is unchanged; grant books for this playtest or author their drop sources. Spell books are normal loot until consumed.
  • Each learned power copies its definition and combat profile. Later catalog publications do not rewrite learned spells or acquired weapon metadata.
  • Useful spell casts and weapon hits award 10 XP, at most once per action, even for multiple area targets or aura pulses. Misses, zero damage, and healing a full-health target give none. Hub actions never award XP. Spell and weapon XP are separate from existing generic combat XP; no historical XP is converted.
  • Requirements include character level, stats, titles, and predecessor spell ranks. Abilities additionally require weapon proficiency and the matching equipped main-hand weapon when used. Equipment bonuses do not satisfy power stat prerequisites. Weapon proficiency is sampled when the attack is released.
  • Spells can have cast times, mana/stamina costs, cooldowns, and rank scaling. Costs are consumed on release after rechecking requirements and targets. Movement, incoming combat damage, death, disconnect, shelter, travel, and explicit cancellation interrupt pending casts. Pending casts do not resume after restart. Cooldowns and learned progression remain saved.
  • Supported effects reuse authoritative damage/healing, straight projectiles, burst and persistent areas, and moving auras. Auras follow their caster; one cast can earn XP only once. Terrain, range, target eligibility, and effect capacity limits are checked by Go.

Initial tuning lives in server/content/balance.yaml and is provisional:

Power Access Initial behavior
Arc bolt Spell book 5 mana, 0.5s cast, 2s cooldown, visible projectile
Mend Spell book 5 mana, instant targeted heal, 2s cooldown
Renewal Mend rank 2 10 mana, 10s cooldown, 6m healing aura lasting 8s
Revive Spell book 20 mana, instant corpse revival, 30s cooldown
Cleave Blades level 2 and Strength 2 Equipped blade, 5 stamina, nearby damage

Initial spell/weapon levels require 100 XP, then 50 more XP per subsequent level, with a maximum of 1,000. Ordinary seed spells use base power 10 plus the combat profile's stat contribution, increasing by 3% of that amount per spell rank. The seed knife trains Blades and the spear trains Polearms.

Controls

Eight HUD slots default to keys 1–8. Assign learned powers in Inventory. Q/R cycle nearby targets, including players and corpses; X cancels a cast. Settings contains keyboard and gamepad bindings. Esc remains reserved for closing the focused menu. Bindings persist on this browser; slot assignments are also scoped to the character. Text entry still requires a keyboard.

The first connected controller uses its left stick for movement. Defaults: buttons 0/1/2/3 jump/gather/attack/heal, 4/5 cycle targets, 6/7 use slots 1/2, 9 opens Inventory, and buttons 12–15 use slots 3–6. Rebind any action as needed. With a menu focused, up/down navigate controls, left/right change select values, button 0 activates buttons, and 1/9 close the focused menu. Button numbers follow the browser's controller mapping. Opening a menu stops gameplay movement.

Resurrection and finality

The dead player enables Allow revival for that death in the death/arrival panel. Another active player stands within 3m of the corpse with terrain line of sight, selects it, and uses a revival stone or learned resurrection spell. The stone is consumed once; the spell spends mana and starts its cooldown once. This first build uses instant revival. Consent can be disabled, and an offline player can be revived if they previously enabled it. These consent, cost, and restored-pool defaults are provisional choices for playtesting.

Revival returns the same character with only belongings still on the corpse. Remaining equipment goes into the bag. Completely looted player corpses stay targetable and revive with no items; stolen items and starting gear are never recreated. Progression and daily usage are preserved. Revival restores 25% maximum health, zero mana, and zero stamina. A character at the daily cap stays offline and uses the normal safe-zone/keystone protection with no additional play time.

Creating a replacement permanently blocks older-character revival, even if the replacement later dies. World destruction also blocks revival. There is no added short corpse expiry timer. After Harbinger victory, revival yields an eligible survivor who can use the portal, without replaying survival rewards or XP. Each subsequent death has a new corpse identity and requires new consent.

Storage stages revival and commits corpse removal, remaining loot, resource costs, character state, and death history in one owner/revision-fenced transaction. The account's latest-ever character pointer arbitrates replacement versus revival. A database trigger also maintains that pointer for older writers during deployment. Historical death snapshots remain in character_deaths; current registry state can return to alive only through the recorded revival transaction. Pre-milestone-7 deaths have no revival identity and remain final.

Manual playtest

  1. In Control, grant Arc bolt, Mend, and Revive books plus revival stones to test characters. Learn and assign powers in Inventory; try a duplicate book.
  2. Cast Arc bolt at a mob. Move during casting, try an out-of-range target, and check a moving-target miss. Successful hits train spells; canceled casts cost nothing and misses earn no spell XP.
  3. Heal an injured player with Mend and compare full-health casts. Train Mend to rank 2, verify Renewal unlocks, and move with its healing aura.
  4. Equip a knife, train Blades to level 2, and meet Strength 2. Verify Cleave unlocks and rejects use with a different weapon type.
  5. Preview/publish a new weapon type and power in Control, including stat, title, and predecessor requirements. Confirm invalid references are rejected.
  6. With two accounts, kill one character, enable consent, loot part/all of the corpse, and revive by item and spell on separate deaths. Confirm only remaining loot returns. Check rejected duplicate attempts do not spend costs.
  7. Create a replacement and confirm older revival stays blocked after that new character dies. Check world destruction also blocks revival.
  8. Travel with learned progression and verify it persists; heal in a hub and confirm no XP. Rebind slots, use controller targeting/menu navigation, and verify Esc closes the focused menu without a gameplay action.

Deploy updated world owners and client before testing travel with new progression; older binaries cannot preserve fields they do not understand. Legacy account-owned titles still require the separately planned character-ownership migration.

Limits and verification

Timed stat buffs/debuffs, crowd control, ground aiming, curved/seeking projectiles, PvP/friendly-fire policy, advanced aura stacking, spell-point/skill-point spending, resurrection channels, and dungeon corpse closure/reset rules remain future work. Housing, building, and cosmetics are later milestones. This build makes no new tested capacity claim.

Required verification: TypeScript check, production build, generated-contract check, and the full Go suite. New tests cover learning/rank unlocks, useful-action XP, auras, interrupted casts, daily caps, remaining-corpse loot, replacement finality, restart, stale-owner rollback, competing replacement/revival, travel progression, and mutation authentication/origin checks. PostgreSQL integration tests require TEST_DATABASE_URL; without it, those cases are skipped. Browser Playwright work stays in the deferred todo list; the user manually tests this build.