Skip to content

Consumable cures, timed item buffs and CANCEL_ITEM_EFFECT - #514

Merged
neeerp merged 1 commit into
v83/mob-skills-restfrom
v83/consumables
Oct 17, 2026
Merged

neeerp merged 1 commit into
v83/mob-skills-restfrom
v83/consumables

Conversation

@neeerp

@neeerp neeerp commented Oct 17, 2026 •

Copy link
Copy Markdown
Owner

USE_ITEM applied only HP and MP. The cures (All Cure and the single cures) and the timed stat pills and elixirs did nothing, and an item buff couldn't be cancelled.

What changed

  • Item data: consumable specs carry their time (ms), the stats they raise (pad, pdd, mad, mdd, acc, eva, speed, jump) and the diseases they cure (poison, darkness, weakness, seal, curse).
  • USE_ITEM: after HP/MP, the item cures its diseases (CANCEL_BUFF, plus a foreign cancel for those others see). With a time, it gives its stats as a buff of id -item_id, which the client lists with the item's icon.
  • CANCEL_ITEM_EFFECT (0x49) ends an item buff.
    • HeavenClient now sends it when an item buff's icon is right-clicked, as v83 does (FUN_0045b9fc, FUN_00a096af); before, it sent nothing for item buffs.

Not covered

  • Morph items (221xxxx): v83 refuses to cancel these while morphed (notice 0x10fc); HeavenClient doesn't track morphs.
  • Rarer spec keys: the *Rate variants, mhpR, booster, berserk, thaw, and the meso and EXP bonuses.

Verification

  • New server unit test: a Warrior Pill buffs Pad 5 for 180 s under id -2002004, and All Cure ends Poison and Seal but not Stun. The game-data test reads both items' specs.
  • New harness test item_buffs: GIVE_BUFF (-2002004, 5, 180000); CANCEL_ITEM_EFFECT ends it, and a second cancel does nothing.
  • Live on the harness stack: a Warrior Pill's icon appeared in the buff row, and right-clicking it sent 0x49 and removed it.
  • At the top of this stack: the full harness (harnessctl test) passes, as do all 68 client tests (ctest) in a debug build. Each layer of the stack passes cargo fmt --check and the workspace unit tests, and builds the harness tests.

Reviewed with sol-loop: 2 rounds with gpt-6.1-sol on high.

Stacked on #513

Item specs now carry their duration, the stats they raise and the
diseases they cure. USE_ITEM cures those diseases (All Cure and the
single cures) and gives the stats as a buff of id -item_id for the spec's
time, which the client lists with the item's icon. CANCEL_ITEM_EFFECT
(0x49) ends it, and HeavenClient now sends it when an item buff's icon is
right-clicked, as v83 does (FUN_0045b9fc / FUN_00a096af).
@neeerp
neeerp added this pull request to stack #515 October 17, 2026 23:30
@neeerp
neeerp merged commit e1c49ee into v83/skill-and-mob-details Oct 17, 2026
2 checks passed
neeerp added a commit that referenced this pull request Oct 18, 2026
Bring the merged v83 stack (#497–#514) to master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant