Skip to content

怪物属性与等级公式 ​

安装 MythicMobs 后,可以在怪物配置文件(Mobs/*.yml)下直接用 attributes 列表给怪物添加属性。怪物生成时会自动获得名为 assiya:mythic-mobs:attributes 的属性源(优先级在 config.yml 的 mythicmobs.source-priority 中设置,默认 100)。

固定属性与等级计算 ​

yaml
test_zombie:
  Type: ZOMBIE
  Display: "&7测试僵尸"
  Health: 200
  attributes:
    - "物理伤害: 40"
    - "物理防御: 15"
    - "暴击几率: 20"
yaml
skeleton_king:
  Type: SKELETON
  Display: "&c骷髅王 Lv.<caster.level>"
  Health: 500
  calculator-attribute: true
  attributes:
    - "物理伤害: ${50 + <level> * 15}"
    - "护甲: ${min(80, 10 + <level> * 2)}"
    - "暴击几率: 25"
    - "暴伤倍率: ${120 + <level> * 3}"
怪物配置节点说明
attributes
List<String>必填
怪物出生时获得的属性
calculator-attribute
Booleanfalse
开启后,可以在属性文本中使用 ${算式} 计算数值,算式内使用 代表怪物的当前等级,支持 min / max / random 之类的函数。