Skip to content

MythicMobs 集成

EmakiAttribute 与 MythicMobs 深度集成,提供属性伤害技能机制、属性条件判断和怪物属性配置。

MythicMobs 为软依赖,未安装时相关功能静默跳过。

技能机制:emaki_damage

注册名:emaki_damage(别名:emakiattribute_damageattribute_damage

在 MythicMobs 技能中使用属性伤害系统对目标造成伤害。

参数类型默认值说明
damage / basedoubleskill power基础伤害值。
damage_typestring伤害类型 ID(如 physicalspell)。
allow_criticalbooleantrue是否允许暴击判定。
allow_target_dodgebooleanfalse是否允许目标闪避。
calculate_target_defensebooleantrue是否计算目标防御。
trigger_mythic_on_damagedbooleanfalse是否触发 MythicMobs 的 on_damaged 事件。

使用示例

yaml
# MythicMobs 技能配置
FireBlast:
  Skills:
    - emaki_damage{damage=50;damage_type=spell;allow_critical=true} @target

条件:emaki_attribute

注册名:emaki_attribute(别名:emakiattribute_attributeattribute_valueattribute_resource

检查实体的属性值或资源值。

参数类型说明
attributestring属性 ID(检查属性值时使用)。
resourcestring资源 ID(检查资源值时使用)。
fieldstring资源字段:current/max/default/bonus/percent
operatorstring比较运算符。
valuedouble比较值。
value_2doublebetween 运算符时的第二个值。

运算符

运算符别名说明
>gt大于。
>=gte大于等于。
<lt小于。
<=lte小于等于。
!=ne不等于。
between在 value 和 value_2 之间。

使用示例

yaml
# 当目标生命低于 30% 时触发
Conditions:
  - emaki_attribute{resource=health;field=percent;operator=<;value=30} true

怪物属性配置

在 MythicMobs 怪物配置文件中,通过 EmakiAttribute 节为怪物设置属性:

yaml
# MythicMobs 怪物配置
FireDragon:
  Type: ENDER_DRAGON
  Health: 500
  EmakiAttribute:
    - physical_attack: 100
    - physical_defense: 50
    - spell_attack: 80
    - health: 500
  • 属性值支持数学表达式(通过 ExpressionEngine 解析)。
  • 怪物生成时自动同步属性。
  • MythicMobs 重载后自动 resync 所有活跃怪物。

生命周期同步

事件行为
MythicMobSpawnEvent怪物生成时读取 EmakiAttribute 节并同步属性。
MythicPostReloadedEventMythicMobs 重载后自动 resync 所有活跃的 MythicMobs 怪物。