Skip to content

技能扩展

这里列出 LyAttributeMythicMobs 注册的 MythicMobs 技能方法。

示例只写最小用法,具体技能触发器、目标选择器和 MythicMobs 原生字段按你的怪物配置继续组合。

属性伤害

damage-ap

使用 AttributePlus 计算一次属性伤害。

yaml
Skills:
  - damage-ap{清除属性=true;物理伤害=%ap_damage:max% * 1.1;暴击几率=5} @target
参数说明
清除属性 / clear是否先临时抵消施法者原有属性,默认 true
其它键名AttributePlus 属性名,值支持 PAPI 和四则运算

damage-ap 会优先追溯召唤链的最上级召唤者。用于召唤物技能时,伤害会按召唤者的变量和属性环境计算。

临时属性

attr-ap

给目标临时添加 AttributePlus 属性。

yaml
Skills:
  - attr-ap{time=200;物理伤害=100;暴击几率=5} @self
参数说明
time持续时间,单位 tick,最低按 1 处理
唯一唯一来源 ID,相同 ID 会互相覆盖
其它键名AttributePlus 属性名

召唤

ly-summon

ly-summon 与 MythicMobs 原版 summon 用法接近,但会记录召唤关系。

yaml
Skills:
  - ly-summon{type=测试;amount=1} @self

常用参数:

参数别名说明
typetmobm怪物 ID
amounta召唤数量
levell怪物等级,-1 时继承施法者等级
radiusrnoise随机生成半径
yradiusyrynoiseY 轴随机半径
summonerisownersio是否写入 owner
inheritfactionif是否继承阵营
inheritthreattableitt是否继承仇恨表
copythreattablectt是否复制仇恨表

attribute-summon

召唤怪物,并额外写入生命和属性。

yaml
Skills:
  - attribute-summon{type=测试;amount=1;插件=ap;生命={math:1330*%player_level%};属性=攻击力+{math:13*%player_level%},生命恢复+2} @self
参数别名说明
typetmobm怪物 ID
amounta召唤数量
插件pluginattributepluginapsx2sx3
生命healthhp召唤物最大生命和当前生命
属性additionalattributesaa逗号分隔的属性列表

玩家作为召唤者时,生命属性 支持 PlaceholderAPI 与四则运算。

血量

heal-papi

给目标恢复生命。

yaml
Skills:
  - heal-papi{v=10} @self
参数说明
v / value恢复数值,支持变量和四则运算
o / origin变量来源,target 为目标,me 为最上级召唤者

sethealth-papi

设置目标当前生命。

yaml
Skills:
  - sethealth-papi{v=10} @target

生命值低于 0.01 时会按 0.01 处理,高于最大生命时会按最大生命处理。

setmaxhealth-papi

设置目标最大生命。

yaml
Skills:
  - setmaxhealth-papi{v=100} @target

实体标记

标记用于配合 gtagltagetag 条件制作层数效果。

yaml
Skills:
  - ly-settag{t=bleed;v=1} @target
  - ly-addtag{t=bleed;v=1} @target
  - ly-taketag{t=bleed;v=1} @target
技能说明
ly-settag设置指定标记层数
ly-addtag增加指定标记层数
ly-taketag扣除指定标记层数

参数 t / tag 是标记 ID,v / value / layer / l 是层数。

移动

autofollow

让施法者向目标移动。距离超过边界时,会传送到目标身后。

yaml
Skills:
  - autofollow{speed=0.35;border=30} @Owner

moveto

让施法者向目标位置移动。

yaml
Skills:
  - moveto{speed=0.35} @target

这两个技能依赖 1.12.2 的实体寻路实现,适合有 AI 的生物。

指令

lycmd

让目标玩家执行支持变量的命令。

yaml
Skills:
  - lycmd{cmd=[console]bc %player_name% 放了一个技能} @self

目标必须是玩家。命令前缀按插件内部命令工具处理,例如 [console] 代表控制台执行。

DragonCore

runfunc

向目标玩家执行 DragonCore runfunction。

yaml
Skills:
  - runfunc{s=方法.屏幕抖动(3,15,10,3)} @self

bindentity

向目标玩家发送实体位置绑定。

yaml
Skills:
  - bindentity{entity=<实体UUID>;owner=<绑定目标UUID>;forward=0;offsetY=0;sideways=0;bindYaw=true;bindPitch=true} @self
参数说明
entity被绑定实体 UUID
owner绑定目标 UUID
forward前后偏移
offsetYY 偏移
sideways左右偏移
bindYaw是否绑定水平朝向
bindPitch是否绑定俯仰朝向

GermPlugin 镜头

camera

给玩家发送萌芽镜头效果。

yaml
Skills:
  - camera{t=ROLL;m=10;s=10;v=1;r=false} @self
参数说明
t镜头类型,如 CAMERA_PITCHCAMERA_ROLLCAMERA_YAWOFFSET_XOFFSET_YOFFSET_ZPITCHROLLYAW
m移动到该镜头所需时间
s持续时间,-1 表示持续
v镜头值
r是否旋转,truefalse

目标必须是玩家。