// PORT: item bonuses added after 40250 (AVA2 numbering, server common/length.h). The packed uitooltip.py // only knows 40250's applies; add the new ones to its AFFECT_DICT so item and socket tooltips show them. static const char c_szAppliesScript[] = R"PY(# -*- coding: utf-8 -*- import item import player import uiToolTip L = player.AutoHuntLocalize TEXTS = ( ("APPLY_ATTBONUS_STONE", "对陨石伤害 +%d%%"), ("APPLY_ATTBONUS_BOSS", "对 Boss 伤害 +%d%%"), ("APPLY_ENCHANT_ELEC", "对雷属性怪物伤害 +%d%%"), ("APPLY_ENCHANT_FIRE", "对火属性怪物伤害 +%d%%"), ("APPLY_ENCHANT_ICE", "对冰属性怪物伤害 +%d%%"), ("APPLY_ENCHANT_WIND", "对风属性怪物伤害 +%d%%"), ("APPLY_ENCHANT_EARTH", "对土属性怪物伤害 +%d%%"), ("APPLY_ENCHANT_DARK", "对暗属性怪物伤害 +%d%%"), ) def Text(text): return lambda value: L(text % value) for name, text in TEXTS: if hasattr(item, name): uiToolTip.ItemToolTip.AFFECT_DICT[getattr(item, name)] = Text(text) )PY";