变量总表
本页用于固化当前项目中应复用的变量名体系。
它不是“示例建议”,而是后续词条维护、解析器实现、校验器实现时的统一基线。
本页依据两个来源建立:
- 旧站数据源
scripts/popologyData.js b2popology.com的术语页
已确认的事实如下:
- 旧站正文中最频繁的战斗缩写依次包括
s、d、p、r、md、j、cd等。 - 旧站正文中高频语义结构包括:
sizeplaceable onUnlock Costcooldowndurationcrosspathreplaced bysubtower
- 旧站与现有注册表已经覆盖的核心项包括:
- 基础伤害
- 陶瓷加伤
- 迷彩加伤
- 穿透
- 索敌方式
- 伤害类型
- 仍需专项补强的项包括:
- 击退
- 弹射方式 / 连锁方式
- 条件性
xx 加伤 - 气球 buff / debuff
- 论文式交叉引用
- 术语页对以下缩写给出了稳定定义:
dmdfdfmdcdldcadfrdsdjpirsjrjspjsds
后续变量命名不得直接沿用旧站缩写作为最终字段名。
旧站缩写只作为:
- 读者熟悉的展示符号
- 历史数据导入时的映射来源
- 解析器中的别名层
本项目内部正式字段必须使用全称英文 snake_case 语义名。
缩写映射总表
Section titled “缩写映射总表”| 旧站缩写 | 正式字段名 | 含义 |
|---|---|---|
d | damage | 基础伤害 |
md | moab_damage | 对 MOAB 类额外伤害 |
fd | fortified_damage | 对强化目标额外伤害 |
fmd | fortified_moab_damage | 对强化 MOAB 额外伤害 |
cd | ceramic_damage | 对陶瓷额外伤害 |
ld | lead_damage | 对铅额外伤害 |
cad | camo_damage | 对迷彩额外伤害 |
frd | frozen_damage | 对冻结目标额外伤害 |
sd | stunned_damage | 对眩晕目标额外伤害 |
j | projectiles | 同时发射弹体数 |
p | pierce | 穿透 |
i | impact | 不可被穿透增益影响的命中次数 |
r | range | 攻击或探测半径 |
s | attack_cooldown | 攻击冷却 |
jr | projectile_radius | 投射物半径 |
jsp | projectile_speed | 投射物速度 |
js | projectile_lifespan | 投射物持续时间 |
ds | emission_delay | 发射延迟 |
所有变量必须按层级命名,不允许临时缩写。
hero_id.level.{level}.component.field示例:
quincy.level.3.ability.rapid_shot.cooldownquincy.level.10.ability.storm_of_arrows.durationbonnie.level.7.minecart.upgrade_1.purchase_price猴塔基础属性
Section titled “猴塔基础属性”tower_id.base.field示例:
dart_monkey.base.place_costdart_monkey.base.sizedart_monkey.base.placementdart_monkey.base.range猴塔升级节点
Section titled “猴塔升级节点”tower_id.path.{top|middle|bottom}.t{tier}.component.field示例:
dart_monkey.path.top.t3.attack.main.damagedart_monkey.path.middle.t4.ability.fan_club.cooldownbanana_farm.path.middle.t3.economy.bank_capacity表格型连续数据
Section titled “表格型连续数据”entity_id.table.{table_name}.{row_key}.field示例:
bonnie.table.minecart_upgrade.lv1.purchase_pricebonnie.table.minecart_upgrade.lv1.sell_valuebanana_farm.table.sellback.top_t3.sell_value后续任何新变量必须先挂入以下一级域之一。
用于版本和显示元数据。
推荐字段:
versionofficial_versionsite_fix_versionlanguage_modesummary
用于实体的基础信息。
推荐字段:
place_costunlock_costsell_valuesellback_ratesizefootprint_radiusplacementrangeline_of_sightcan_see_over_obstaclesleveling_multiplierleveling_curve
attack
Section titled “attack”这是最核心的复用域。
推荐字段:
damagebase_damagemoab_damagefortified_damagefortified_moab_damageceramic_damagelead_damagecamo_damagefrozen_damagestunned_damageprojectilesspread_degreespierceimpactrangeattack_cooldownattack_speeddamage_typedamage_flagsknockback_distanceknockback_forceknockback_durationknockback_modeprojectile_radiusprojectile_speedprojectile_lifespanemission_delaychain_countchain_rangechain_falloffbounce_modebounce_countbounce_anglericochet_modeblast_modezone_modepassive_modecan_hit_camodecamoderegrowdefortcan_rehitcan_rebound
这里的对应关系如下:
基础伤害->damage或base_damage陶瓷加伤->ceramic_damage迷彩加伤->camo_damagexx 加伤-> 优先拆成对应专门字段;若没有专门字段,则写入modifier.*.conditional_vs弹射方式->chain_*、bounce_*、ricochet_mode击退->knockback_*
targeting
Section titled “targeting”用于索敌与攻击路径逻辑。
推荐字段:
targeting_modepriority_modearc_modearc_directionseekingretarget_ratelock_in_placeminimum_rangemaximum_rangedetect_camotarget_filters
这里用于承载你提到的 索敌方式。
modifier
Section titled “modifier”这是猴子 buff 与气球 buff/debuff 的统一模型。
推荐字段:
target_kindtarget_scopestatus_kinddurationuptimestack_countstack_capdamage_adddamage_multpierce_addpierce_multrange_addrange_multattack_cooldown_multattack_speed_multprojectiles_addprojectiles_multmove_speed_multturn_speed_multstatus_damage_addcash_multconditional_vsapplies_to
其中:
猴子 buff:target_kind = monkey气球 buff / debuff:target_kind = bloonxx 加伤的条件表达优先写入conditional_vs
ability
Section titled “ability”用于主动/被动技能。
推荐字段:
cooldowndurationinitial_cooldownbattle_readychargescharge_intervalmax_targetsradiusrangeuptimebuff_type
用于加成或减益。
推荐字段:
target_scopetarget_kinddamage_adddamage_multpierce_addpierce_multrange_addrange_multattack_cooldown_multattack_speed_multprojectiles_addprojectiles_multspecial_damage_addconditional_vsapplies_to
buff 保留为旧模型兼容层;后续新字段优先写入 modifier。
reference
Section titled “reference”这是新增的交叉引用域,用于实现你要求的“论文式交叉引用机制”。
推荐字段:
ref_idref_kindref_labeltarget_keytarget_keystarget_sectionrelation_typecitation_textexplanationdepends_onconflicts_withderived_fromsee_also
这类引用不是给读者看的纯装饰,而是给系统建立:
- 变量到变量
- 变量到正文段
- 正文段到表格行
- 结论到依据
的正式链接关系。
economy
Section titled “economy”用于所有货币、存储、收益与出售逻辑。
推荐字段:
purchase_priceupgrade_costsell_valuesellback_rateincome_per_roundincome_per_tickincome_intervalstoragestorage_capbank_capacitywithdraw_bonuscash_per_popcash_per_usedrop_valuepayout_valuegeneration_countgeneration_cap
用于副单位、召唤物、轨道物、持续物。
推荐字段:
unit_namespawn_countspawn_intervalspawn_caplifetimehealthrangespeeddurationinherits_buffsinherits_crosspathplacement_mode
用于具有阶段、受伤、累积、充能、掉落的对象。
推荐字段:
healthshieldchargecharge_capstack_countstack_capphasestate_namedamage_thresholddestroyed_drop_valuetransform_target
crosspath
Section titled “crosspath”用于明确记录交叉升级改写。
推荐字段:
crosspath_codeaffected_fieldoverride_valuebonus_valuereplacement_value
通用组件模板
Section titled “通用组件模板”为了避免反复造轮子,优先复用以下组件层。
通用基础模板
Section titled “通用基础模板”entity.base.place_costentity.base.unlock_costentity.base.sizeentity.base.placemententity.base.range通用攻击模板
Section titled “通用攻击模板”entity.[path/level/...].attack.main.damageentity.[path/level/...].attack.main.pierceentity.[path/level/...].attack.main.rangeentity.[path/level/...].attack.main.attack_cooldownentity.[path/level/...].attack.main.damage_type通用投射物行为模板
Section titled “通用投射物行为模板”entity.[path/level/...].attack.main.chain_countentity.[path/level/...].attack.main.chain_rangeentity.[path/level/...].attack.main.bounce_modeentity.[path/level/...].attack.main.ricochet_modeentity.[path/level/...].attack.main.knockback_distance通用技能模板
Section titled “通用技能模板”entity.[path/level/...].ability.main.cooldownentity.[path/level/...].ability.main.durationentity.[path/level/...].ability.main.initial_cooldown通用经济模板
Section titled “通用经济模板”entity.[path/level/...].economy.purchase_priceentity.[path/level/...].economy.sell_valueentity.[path/level/...].economy.sellback_rate通用猴子 Buff 模板
Section titled “通用猴子 Buff 模板”entity.[path/level/...].modifier.main.target_kindentity.[path/level/...].modifier.main.damage_addentity.[path/level/...].modifier.main.pierce_addentity.[path/level/...].modifier.main.attack_cooldown_multentity.[path/level/...].modifier.main.applies_to通用气球 Buff / Debuff 模板
Section titled “通用气球 Buff / Debuff 模板”entity.[path/level/...].modifier.main.target_kindentity.[path/level/...].modifier.main.status_kindentity.[path/level/...].modifier.main.durationentity.[path/level/...].modifier.main.move_speed_multentity.[path/level/...].modifier.main.damage_add高风险专项模板
Section titled “高风险专项模板”以下对象必须使用专门命名簇,不允许临时字段。
Bonnie 矿车
Section titled “Bonnie 矿车”bonnie.minecart.upgrade.{index}.hero_level_requiredbonnie.minecart.upgrade.{index}.purchase_pricebonnie.minecart.upgrade.{index}.sell_valuebonnie.minecart.upgrade.{index}.minecart_hp_after_purchasebonnie.minecart.upgrade.{index}.destroyed_drop_valuebonnie.minecart.upgrade.{index}.cap_after_purchasebanana_farm.path.{path}.t{tier}.economy.income_per_roundbanana_farm.path.{path}.t{tier}.economy.storage_capbanana_farm.path.{path}.t{tier}.economy.bank_capacitybanana_farm.path.{path}.t{tier}.economy.withdraw_bonusbanana_farm.path.{path}.t{tier}.economy.sell_value交叉引用机制
Section titled “交叉引用机制”后续所有关键机制都要允许建立“论文式交叉引用”。
正式关系类型固定为:
definesmodifiesinheritsreplacesdepends_onconflicts_withderived_fromsee_also
推荐命名模板:
entity.[path|level|table|system].component.refs.{ref_name}.field示例 1:
dart_monkey.path.top.t3.attack.main.refs.spikeball_replace.ref_iddart_monkey.path.top.t3.attack.main.refs.spikeball_replace.relation_typedart_monkey.path.top.t3.attack.main.refs.spikeball_replace.target_key示例 2:
bonnie.minecart.upgrade.1.refs.sell_value_rule.ref_idbonnie.minecart.upgrade.1.refs.sell_value_rule.derived_frombonnie.minecart.upgrade.1.refs.sell_value_rule.target_key这意味着后续页面可以实现:
- 点击
陶瓷加伤,跳到对应攻击条目 - 点击
猴子 buff,跳到该 buff 影响的攻击字段 - 点击
卖价,追溯其来自哪条矿车等级规则 - 点击结论,查看其正文依据和表格依据
以下写法以后都视为不合规:
- 直接把
d、p、s当正式字段名 - 使用
damage2、extraDamage、new_price这类语义不稳定字段 - 同一字段既表示基础值,又表示总值
- 同时用
sell_price和sell_value指同一概念 - 同时用
cooldown和attack_speed表示同一个冷却概念而不说明换算关系 - 把
击退、弹射方式、气球 buff继续写成无法复用的自由文本而不建立变量 - 写了关键结论却不给
reference关系
对应的机器可读注册表已固化在:
src/data/entity-variable-registry.js
后续解析器、校验器和编辑 UI 应直接复用该文件,而不是在各自模块重新定义字段集。
从当前英雄与猴塔数据可稳定提炼出一套统一变量体系。
后续新词条、新机制或新版本更新时:
- 优先在本页已有域内选字段
- 若字段不存在,优先扩展已有域
- 只有在整个机制无法归入现有域时,才允许新增专项命名簇