# AVA2 items: unlocking the locked systems The 478 AVA2 drop items come from metin2-client `tools/server/ava2-items` (see FEATURE-AVA2-DROPS.md). Items of systems 40250 lacks were imported as ITEM_NONE. This branch turns them back into usable items one system at a time. Each phase keeps the AVA2 row (type, subtype, values, applies) once the server and client understand it. | Phase | Items | State | |---|---|---| | P1 boxes and keys | 77918–77920 boxes, 77921–77923 keys (`ITEM_TREASURE_BOX` / `ITEM_TREASURE_KEY`, value0 3–5) | done | | P2 stones | 28444 破碑之石+4 (`APPLY_ATTBONUS_STONE`), 28445 Boss stone (`APPLY_ATTBONUS_BOSS`) | done | ## P1: boxes and keys 40250 already has both types. A key opens a box when their value0 match (char_item.cpp, `ITEM_TREASURE_KEY`); the box then hands out its special_item_group group (live since the drops deploy). 203's own boxes use value0 0–2, so AVA2's 3–5 don't clash. ## P2: stone and Boss bonus The points exist from the biolog port (POINT_ATTBONUS_STONE 240, POINT_ATTBONUS_BOSS 241, damage in battle.cpp); the apply types did not. - `APPLY_ATTBONUS_STONE = 139`, `APPLY_ATTBONUS_BOSS = 140` (common/length.h), the same numbers as AVA2 and the client (`ItemData.h`). 92–138 are reserved for AVA2 applies not ported yet: `aApplyInfo` maps them to POINT_NONE and ProtoReader's `arApplyType` names them `APPLY_RESERVED_`, so array index = apply number. - `CHARACTER::ApplyPoint` handles both like the other additive applies. - ProtoReader is in the db, so **the db binary must be redeployed with the game**; an old db rejects the items' `APPLY_ATTBONUS_*` columns. - The two stones share AVA2's stone family 31 (value5), so a weapon holds only one of them. The 7 guardian weapons keep their AVA2 `APPLY_ATTBONUS_BOSS 5`. Test: `tests/features/test_applies.py` (numbering in length.h, constants.cpp, ProtoReader and the client header).