AVA2 unlock P6: costume enchants (USE_CHANGE_ATTRIBUTE 54001-54267)
Enchant stones add one fixed attribute to an unequipped body / hair / mount-skin costume (max 3, no duplicates); gear and the switchbot refuse them. MTCATTR chat commands report the result. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
fb066e7046
commit
6199b2cbff
@@ -9,6 +9,7 @@ The 478 AVA2 drop items come from metin2-client `tools/server/ava2-items` (see F
|
||||
| P3 dragon armor | 21210–21219 暗龙 (warrior), 21230– 风龙 (assassin), 21250– 魔龙 (sura), 21270– 神龙 (shaman), +0..+9 | done (client) |
|
||||
| P4 sash | 85004 领主 / 85008 大师 / 85014 王朝 / 85018 皇家 披风 (`COSTUME_SASH`, grade 4) | done, not deployed |
|
||||
| P5 mounts | 71502 / 71505 / 71508 / 71511 坐骑时装 (`COSTUME_MOUNT`), 71234 / 71254 坐骑外观 (`COSTUME_MOUNT_SKIN`) + mobs 32012 / 32028 | done, not deployed |
|
||||
| P6 costume enchants | 54001–54078 时装 / 发型强化石, 54124–54174 坐骑外观强化石 (`USE_CHANGE_ATTRIBUTE`); weapon / sash-skin / effect ranges and 53996 stay locked | done, not deployed |
|
||||
|
||||
## P1: boxes and keys
|
||||
|
||||
@@ -73,3 +74,28 @@ AVA2's `ENABLE_MOUNT_COSTUME_SYSTEM` + `ENABLE_MOUNT_SKIN`, ported 1:1 into `gam
|
||||
- The models ship in the ava2items pack (`MOUNT_MOBS`).
|
||||
|
||||
Test: `tests/features/test_mount.py`.
|
||||
|
||||
## P6: costume enchants
|
||||
|
||||
AVA2's `ENABLE_SPECIAL_COSTUME_ATTR`, in `game/src/port_costume_attr.cpp`. The items are `ITEM_USE` / `USE_CHANGE_ATTRIBUTE`. value0 is the apply type and value1 the value; AVA2 apply numbers equal 203's (P2 aligned 139/140). value2 is the target mask `1 << bonus flag`.
|
||||
|
||||
- Unlocked ranges (make_items `ENCHANT_KEEP`):
|
||||
- 54001–54027 时装 (mask 2, body);
|
||||
- 54028–54078 发型 (4, hair);
|
||||
- 54124–54174 坐骑外观 (16, mount skin).
|
||||
- Still locked, since the target systems don't exist here: 54079– weapon costume (8), 54175– sash skin (32), 54220– effect (64). 53996 (talisman) waits for P7.
|
||||
- `CItem::IsCostumeEnchant` (vnum 54001–54267 with a nonzero value2) is checked first in the change/add-attribute case of `UseItemEx`, before the 40250 costume refusal. So an enchant never reaches the reroll code, and dragged onto gear it is refused (`MTCATTR target`).
|
||||
- `CostumeEnchantUse` follows AVA2's checks:
|
||||
- target kind and mask (`target`);
|
||||
- apply none (`none`);
|
||||
- not while worn (`equipped`, the 40250 switcher rule);
|
||||
- at most 3 attributes (`full`);
|
||||
- no duplicate apply (`has`).
|
||||
- Then `AddAttribute`, consume one, `ItemLog COSTUME_ENCHANT`, `done`.
|
||||
- The switchbot does not accept enchants as scrolls, on either the server (`PortSwitchScroll`) or the client.
|
||||
- Client `mt_costume_attr` (`CostumeAttrScript.inc`):
|
||||
- marks matching costumes as usable drop targets (the 40250 inventory already sends every `USE_CHANGE_ATTRIBUTE` drop);
|
||||
- adds the attribute and targets to the enchant tooltip;
|
||||
- renders `MTCATTR`.
|
||||
|
||||
Test: `tests/features/test_costume_attr.py`.
|
||||
|
||||
Reference in New Issue
Block a user