Port the AVA2 switchbot (自动洗练) 1:1
AVA2 new_switchbot ported as port_switchbot.{h,cpp}: SWITCHBOT item window (7),
CG/GC 171 and GG 31 with AVA2 subheaders and field order, pack(1) structs pinned
by static_assert, 0.1 s roll, P2P hand-over on warp, boot ALTER of
player.item.window. Switchers come from the inventory; current checks and
ItemLog are kept. Clients sending "mt20261016" or newer as the version
timestamp get the switchbot; older clients are left alone.
The v1 /mt_switchbot chat command, its lock verb and query capability bit 64
are removed (cap mask 1023 -> 959).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
c6813cd653
commit
a28393b16b
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env python3
|
||||
"""AVA2 talisman (docs/FEATURE-AVA2-UNLOCK.md P7): ARMOR_PENDANT worn in WEAR_PENDANT, element enchant applies,
|
||||
its own attribute pool changed only by 71301/71302/53996/53997, which are no switchbot scrolls."""
|
||||
its own attribute pool changed only by 71301/71302/53996/53997; the switchbot rolls talismans with 71302 only."""
|
||||
from pathlib import Path
|
||||
ROOT=Path(__file__).resolve().parents[2]
|
||||
SRC=ROOT/'src/server'
|
||||
@@ -17,7 +17,8 @@ assert fec.index('if (IsTalisman())\n\t\treturn WEAR_PENDANT;')<fec.index('0 ==
|
||||
items=source('game/src/char_item.cpp')
|
||||
case=items[items.index('case USE_CHANGE_ATTRIBUTE2 :'):]
|
||||
assert case.index('return CostumeEnchantUse(item, item2);')<case.index('if (item->GetPendantScrollKind() || item2->IsTalisman())\n\t\t\t\t\t\t\t\treturn PendantScrollUse(item, item2);')<case.index('BuffOnAttr_RemoveBuffsFromItem(item2)')
|
||||
assert '!scroll->GetPendantScrollKind()' in source('game/src/port_switchbot.h')
|
||||
sb=source('game/src/port_switchbot.cpp')
|
||||
assert 'if (pkItem->IsTalisman())\n\t\t\treturn FindUsableSwitcher(ch, 71302);' in sb and 'GetPendantAttrMaxValue(' in sb
|
||||
assert 'port_pendant.cpp' in source('game/src/Makefile')
|
||||
port=source('game/src/port_pendant.cpp')
|
||||
pool=port[port.index('s_aPendantAttr[] ='):];pool=pool[:pool.index('};')]
|
||||
@@ -33,4 +34,4 @@ script=ROOT.parent/'metin2-client/src/platform/ScriptLib/PendantScript.inc'
|
||||
if script.is_file():
|
||||
s=script.read_text()
|
||||
for code in codes:assert "'%s':"%code in s,code
|
||||
print('PASS: talisman slot/equip, enchant switch routing before the switcher path, 20-row pool, max 5, switchbot excluded, MTPENDANT codes')
|
||||
print('PASS: talisman slot/equip, enchant switch routing before the switcher path, 20-row pool, max 5, switchbot 71302 only, MTPENDANT codes')
|
||||
|
||||
Reference in New Issue
Block a user