Repository navigation
feat(spells): a Soulstone lets a dead player resurrect - #618
Conversation
…Option A Character that dies with a Soulstone aura now holds a Self-Resurrection Option in the new game_self_resurrect_option table. The death hook reads it before the death aura shed. gw_self_resurrect and debug_self_resurrect use it: the Character revives in place at the option spell's vitals, without Resurrection Sickness, and the corpse goes. Release Spirit keeps the option. Every other revive and leaving the world delete it. The importer maps raw effect 94 to E_SELF_RESURRECT and the five Soulstone Resurrection aura ranks to A_SELF_RESURRECT with their option spell ids. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…F_RES The Gateway writes the option into the owner's PLAYER_SELF_RES_SPELL through the partial-VALUES path, and clears it when the row goes. CMSG_SELF_RES calls gw_self_resurrect for the session's own Character. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 10 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (35)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Code review: Standards and SpecI reviewed StandardsThe diff has no hard breach of
Spec (#11)I found no correctness bug in the main path. Missing or partial
Implemented, but it looks wrong
Scope creep: the Reincarnation-shaped percent branch and the 21169 test go past Soulstone. They are small, they share effect 94, and the PR body lists Reincarnation as remaining work, so this is acceptable. Summary. Standards: 8 findings, all soft. The worst is the CONTEXT.md entry, which promises the option survives Release Spirit while a Transfer drops it. Spec: 9 findings. The worst is the open real-client check, which blocks #11 but not this PR. The worst code-level finding is ghost self-res at the graveyard. Generated by Claude Code |
A Warlock's Soulstone does nothing today. A Character that dies with the Soulstone aura sees only Release Spirit. The 1.12.1 client shows a second button in the death dialog when the server writes a spell id into the player field
PLAYER_SELF_RES_SPELL. The button sendsCMSG_SELF_RES. This server wrote no such field and dropped the opcode. The importer also turned the Soulstone aura and its spell effect into inert no-ops.This PR adds the Self-Resurrection Option, from death to revive.
kill_playerreads the Soulstone aura before the death aura shed removes it. It writes one row to the new tablegame_self_resurrect_option. A death without a Soulstone deletes any old row.gw_self_resurrect(anddebug_self_resurrect) uses the option. The Character revives in place at the option spell's values: Minor Soulstone gives 400 health and 700 mana. Rage comes back at 0 and energy full. There is no Resurrection Sickness, and the corpse goes. A Refusal changes nothing.clear_resurrect_requestremoves only the ally request, andclear_resurrect_request_and_optionremoves both.PLAYER_SELF_RES_SPELLthrough the partial-VALUES path, with noOBJECT_FIELD_TYPE, and writes 0 when the row goes. Nobody else gets the packet.CMSG_SELF_REScalls the reducer for the session's own Character.E_SELF_RESURRECT(0x26) kind and the five Soulstone Resurrection aura ranks toA_SELF_RESURRECT(0xB5). A table keyed by aura spell id gives each rank its option spell (20707 to 3026 up to 20765 to 20761). I skipped kind 0x25 because feat(spells): Distract turns idle creatures toward the point #614 (Distract) uses it.CONTEXT.mdgets a "Death and resurrection" section with Self-Resurrection Option and Soulstone.docs/self-resurrection-client-check.mdis the checklist a human runs with a real client.Decisions a maintainer may want to flip:
CMSG_USE_ITEMtargets in the Gateway. That is a separate change.Where the code differed from the plan: the Dummy aura imports as
A_FLAG, notE_SCRIPTED, so the name rescue catches theA_FLAGresidue. The table holdscharacter_guidandspell_idonly. Nothing reads an identity or timestamp column, and the Gateway addresses the owner by guid. The Gateway wires insert, update and delete, because a replaced row reaches the SDK as an update.Verification on this Mac:
cargo test -p lyracore-module --lib: 1747 passed, including the pureself_resurrect_vitalscases and the updated taxonomy pins.cargo test -p lyracore-module --test self_resurrection -- --ignored: 5 durable tests passed against a published standalone. They cover the option at death, the revive values, the Refusals, Release Spirit, Spirit Healer, logout, and rage and energy.cargo test -p lyracore-importer: 399 passed, including all five Soulstone ranks and a Reincarnation-shaped percent row.cargo test -p lyracore-gateway --bin lyracore-gateway: 1969 passed, including a byte pin for field 1224, the owner-only relay, and theCMSG_SELF_RESdispatch and Refusal.cargo clippyon the three crates with--all-targets --all-features -D warnings: clean.scripts/check-gateway-bindings.py: all binding files current.schema_parityonly runs on Linux, so CI checks it.Not verified: no real client has seen the field, the button, the 30 minute duration or the 3 second cast. The corpse reclaim and the ally resurrect deletes have no durable test, because reclaim needs a 30 second delay and an ally resurrect needs a second caster.
Refs #11. Reincarnation and the real-client check remain.
Model and harness: Claude Opus 5.5 in Claude Code.
🤖 Generated with Claude Code