> For the complete documentation index, see [llms.txt](https://enchantedmobs.superiormc.cn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://enchantedmobs.superiormc.cn/enchantedmobs-zhong-wen-wen-dang/features/dong-zuo-lie-biao.md).

# 动作列表

### 通用选项

无论哪一个动作，它们都支持以下选项：

* type：这个选项是必须的，其他都是可选值。代表您要使用哪一种动作。
* target：动作作用于谁。支持：
  * SOURCE（触发实体）
  * SKILL（传递实体）
  * TARGET（目标实体）
* random：该动作执行的几率，`1.0` 代表百分之百。
* cooldown：该动作每次执行的冷却时间，以秒为单位。
* 您或许会发现，能力也提供了 `random` 和 `cooldown` 两个选项，如果能力的这两个选项都已满足，就会开始执行包含的动作。动作中的 `random` 和 `cooldown` 两个选项和能力互相独立，能力的 `cooldown` 不会因为动作正在处于 `cooldown` 而重置。
* 动作不提供 `times` 限制功能。
* location：对触发事件的位置进行偏移。
  * offset-x：偏移的 X 坐标。
  * offset-y：偏移的 Y 坐标。
  * offset-z：偏移的 Z 坐标。

一个示例如下：

```yaml
on-target-tick:
  abilities:
    1:
      type: arrow_rain
      location:
        offset-y: 5
      target: TARGET
      random: 0.5
      cooldown: 5
```

***

### 1) Mark

标记实体“已经使用过能力”，用于系统内部逻辑判断（例如防重复链路）。

```yaml
type: mark
```

默认 `target: SKILL`。

***

### 2) Delay

延迟一段时间后，再执行 `abilities` 子能力。

```yaml
type: delay
ticks: 20
abilities:
  1:
    type: Sound
    sound: ENTITY_ENDERMAN_SCREAM
```

#### 字段说明

**ticks**

作用：延迟 tick 数（20 tick = 1 秒）。

```yaml
ticks: 40
```

**delay**

作用：`ticks` 的旧别名；仅在 `ticks` 未设置时使用。

```yaml
delay: 40
```

**abilities**

作用：延迟后要执行的子能力列表。

```yaml
abilities:
  1:
    type: particle
    particle: FLAME
```

***

### 3) PlaceBlock

在执行位置放置临时方块，时间到后恢复。

临时方块不会生成掉落物，Spigot 服务端上对于一些特殊手段破坏的方块可能无法检测到，Paper 服务端上无此问题。

建议不要放置价值过高的方块，当服务器崩溃而又没有保存插件储存的临时方块信息时，临时方块在下一次服务器启动后就会被视为真实存在的方块，可以掉落物品。

```yaml
type: place_block
block: COBWEB
duration: 60
```

#### 字段说明

**block**

作用：要放置的方块材质。

```yaml
block: POWDER_SNOW
```

**duration**

作用：方块持续时间（tick）。

```yaml
duration: 80
```

***

### 4) Explosion

在位置制造爆炸，可控制是否起火、是否破坏方块。

```yaml
type: explosion
yield: 2.0
set-fire: false
break-blocks: false
```

默认 `target: TARGET`。

#### 字段说明

**yield**

作用：爆炸威力（越大范围越大）。

```yaml
yield: 4.0
```

**set-fire**

作用：爆炸后是否点燃周围。

```yaml
set-fire: true
```

**break-blocks**

作用：爆炸是否破坏方块。

```yaml
break-blocks: true
```

***

### 5) Remove

移除目标实体（玩家不会被移除）。

```yaml
type: remove
```

默认 `target: SKILL`。

***

### 6) CancelEvent

取消当前触发事件。

`on-death` 事件不能取消，若需取消，请使用 `on-death` 的 `revive-health` 事件修改功能实现类似功能。

```yaml
type: cancel_event
```

常用于“免疫某次伤害/行为”。

***

### 7) Lightning

在目标附近随机位置落雷，并可附加伤害。

```yaml
type: lightning
count: 2
radius: 3
damage: 4
```

默认 `target: TARGET`。

#### 字段说明

**count**

作用：落雷次数。

```yaml
count: 5
```

**radius**

作用：相对目标的随机半径。

```yaml
radius: 6
```

**damage**

作用：对命中生物追加伤害。

```yaml
damage: 8
```

***

### 8) Particle

在位置播放粒子。

```yaml
type: particle
particle: FLAME
count: 8
offset-x: 0.3
offset-y: 0.2
offset-z: 0.3
extra: 0
```

默认 `target: TARGET`。

#### 基础字段

**particle**

作用：粒子类型。

```yaml
particle: SMOKE
```

**count**

作用：每次播放粒子数量。

```yaml
count: 30
```

**offset-x / offset-y / offset-z**

作用：粒子散布范围。

```yaml
offset-x: 0.5
offset-y: 1.0
offset-z: 0.5
```

**extra**

作用：附加参数（不同粒子含义不同，如速度）。

```yaml
extra: 0.01
```

#### 特殊字段（按粒子类型生效）

**block**

作用：方块粒子的数据方块。

```yaml
particle: BLOCK
block: STONE
```

**item**

作用：物品粒子的数据物品。

```yaml
particle: ITEM
item: DIAMOND
```

**color / size**

作用：颜色粒子参数（如 `DUST`）。

```yaml
particle: DUST
color: "255,0,0"
size: 1
```

**from / to**

作用：渐变色粒子参数（如 `DUST_COLOR_TRANSITION`）。

```yaml
from: "255,0,0"
to: "0,0,255"
```

**value / delay / duration**

作用：震动粒子参数（如 vibration 目的地/时长相关）。

```yaml
value: 1.0
delay: 20
duration: 40
```

***

### 9) Sound

在位置播放音效。

```yaml
type: sound
sound: ENTITY_PLAYER_LEVELUP
volume: 1
pitch: 1
```

#### 字段说明

**sound**

作用：Bukkit 声音枚举名。

```yaml
sound: ENTITY_ENDERMAN_TELEPORT
```

**volume**

作用：音量。

```yaml
volume: 2
```

**pitch**

作用：音调。

```yaml
pitch: 0.8
```

***

### 10) SetAttribute

设置实体属性基础值。

```yaml
type: set_attribute
attribute: MAX_HEALTH
value: 40
```

默认 `target: SOURCE`。

#### 字段说明

**attribute**

作用：要修改的属性名。

```yaml
attribute: MOVEMENT_SPEED
```

**value**

作用：属性新数值。支持使用 `{max}` 代表实体此属性最大值，和 `{now}` 代表实体当前此属性值。

```yaml
value: 0.4
```

***

### 11) SetHealth

设置（或回复）目标生命值，结果不会超过最大生命。支持使用 `{max-health}` 代表实体血量最大值，和 `{health}` 代表实体当前血量值。

```yaml
type: set_health
amount: 10
```

默认 `target: SOURCE`。

#### 字段说明

**amount**

作用：设置后的生命值（支持公式变量）。

```yaml
amount: 20
```

***

### 12) PullTarget

将目标拉向来源实体。

```yaml
type: pull_target
strength: 1.0
```

默认 `target: TARGET`。

#### 字段说明

**strength**

作用：拉拽力度，越大越快。

```yaml
strength: 1.8
```

***

### 13) PotionCloud

生成药水效果云。

```yaml
type: potion_cloud
radius: 3
duration: 120
potion: POISON
potion-duration: 100
potion-amplifier: 1
```

默认 `target: TARGET`。

#### 字段说明

**radius**

作用：云半径。

```yaml
radius: 5
```

**duration**

作用：云本体持续 tick。

```yaml
duration: 200
```

**potion**

作用：云附带的药水类型。

```yaml
potion: SLOWNESS
```

**potion-duration**

作用：玩家获得药水后的持续 tick。

```yaml
potion-duration: 60
```

**potion-amplifier**

作用：药水等级（0=I，1=II）。

```yaml
potion-amplifier: 2
```

***

### 14) PotionEffect

直接给实体施加药水效果。

```yaml
type: potion_effect
potion: SLOWNESS
duration: 100
amplifier: 0
ambient: false
particles: true
icon: true
```

默认 `target: TARGET`。

#### 字段说明

**potion**

作用：药水类型。

```yaml
potion: WEAKNESS
```

**duration**

作用：药水持续 tick。

```yaml
duration: 200
```

**amplifier**

作用：药水等级（0=I）。

```yaml
amplifier: 1
```

**ambient**

作用：是否作为环境效果（视觉更淡）。

```yaml
ambient: true
```

**particles**

作用：是否显示药水粒子。

```yaml
particles: false
```

**icon**

作用：是否显示状态栏图标。

```yaml
icon: false
```

***

### 15) Freeze

设置目标冻伤时间。

```yaml
type: freeze
freeze-ticks: 60
```

默认 `target: TARGET`。

#### 字段说明

**freeze-ticks**

作用：冻结 tick 数。

```yaml
freeze-ticks: 120
```

***

### 16) Fire

设置目标燃烧时间。

```yaml
type: fire
fire-ticks: 60
```

默认 `target: TARGET`。

#### 字段说明

**fire-ticks**

作用：着火 tick 数。

```yaml
fire-ticks: 100
```

***

### 17) HomingProjectile

让传递实体（通常是投射物）追踪附近目标。

```yaml
type: homing_projectile
radius: 16
strength: 0.2
```

默认 `target: SKILL`。

#### 字段说明

**radius**

作用：搜索可追踪目标半径。

```yaml
radius: 24
```

**strength**

作用：转向强度，越大越“急转”。

```yaml
strength: 0.35
```

***

### 18) TeleportNearTarget

将实体传送到目标附近的安全落点。

```yaml
type: teleport_near_target
min-radius: 3
max-radius: 8
max-tries: 12
```

默认 `target: TARGET`。

#### 字段说明

**min-radius**

作用：与目标最小距离，避免贴脸重叠。

```yaml
min-radius: 4
```

**max-radius**

作用：与目标最大距离。

```yaml
max-radius: 10
```

**max-tries**

作用：寻找安全点最大尝试次数。

```yaml
max-tries: 20
```

***

### 19) GuardianBeam

模拟守卫者激光锁定，蓄力后造成伤害。

```yaml
type: guardian_beam
range: 18
charge-ticks: 30
damage: 6
```

默认 `target: TARGET`。

#### 字段说明

**range**

作用：可锁定目标最大距离。

```yaml
range: 24
```

**charge-ticks**

作用：激光蓄力时长。

```yaml
charge-ticks: 40
```

**damage**

作用：蓄力结束后的伤害值。

```yaml
damage: 10
```

***

### 20) VanillaAnimation

播放原版实体动画（EntityEffect）。

```yaml
type: vanilla_animation
animation: HURT
```

默认 `target: SOURCE`。

#### 字段说明

**animation**

作用：动画类型名（首选字段）。

```yaml
animation: HURT
```

**entity-effect**

作用：`animation` 旧别名。

```yaml
entity-effect: HURT
```

***

### 21) ArrowRain

在目标上空区域下落箭雨。

```yaml
type: arrow_rain
count: 10
radius: 4
height: 12
spread: 0.18
damage: -1
pierce-level: 0
critical: false
```

默认 `target: TARGET`。

#### 字段说明

**count**

作用：箭数量。

```yaml
count: 20
```

**radius**

作用：箭雨覆盖半径。

```yaml
radius: 6
```

**height**

作用：箭生成高度。

```yaml
height: 16
```

**spread**

作用：箭初速度随机偏移（控制散布感）。

```yaml
spread: 0.3
```

**damage**

作用：箭伤害；`< 0` 表示不覆盖默认伤害。

```yaml
damage: 5
```

**pierce-level**

作用：箭穿透等级。

```yaml
pierce-level: 2
```

**critical**

作用：是否设为暴击箭。

```yaml
critical: true
```

***

### 22) EnhanceEquipment

强化怪物护甲（替换材质/随机附魔）。

```yaml
type: enhance_equipment
armor-material: NETHERITE
pieces:
  - HELMET
  - CHESTPLATE
enchant:
  min-amount: 1
  max-amount: 3
  min-level: 1
  max-level: 4
  enchantments:
    - PROTECTION
```

默认 `target: SOURCE`。

#### 字段说明

**armor-material**

作用：护甲材质前缀（如 NETHERITE / DIAMOND）。

```yaml
armor-material: DIAMOND
```

**pieces**

作用：指定要处理的护甲部位。

```yaml
pieces:
  - HELMET
  - LEGGINGS
```

**enchant.min-amount**

作用：每件装备最少附魔条数。

```yaml
enchant:
  min-amount: 1
```

**enchant.max-amount**

作用：每件装备最多附魔条数。

```yaml
enchant:
  max-amount: 4
```

**enchant.min-level**

作用：附魔最小等级。

```yaml
enchant:
  min-level: 2
```

**enchant.max-level**

作用：附魔最大等级。

```yaml
enchant:
  max-level: 5
```

**enchant.enchantments**

作用：可被随机选中的附魔列表。

```yaml
enchant:
  enchantments:
    - PROTECTION
    - THORNS
```

***

### 23) EnhanceHeldItem

强化怪物主手/副手物品附魔。

```yaml
type: enhance_held_item
hand: MAIN_HAND
enchant:
  min-amount: 1
  max-amount: 3
  min-level: 1
  max-level: 4
```

默认 `target: SOURCE`。

#### 字段说明

**hand**

作用：处理哪只手。

```yaml
hand: OFF_HAND
```

**enchant.min-amount**

作用：最少附魔条数。

```yaml
enchant:
  min-amount: 1
```

**enchant.max-amount**

作用：最多附魔条数。

```yaml
enchant:
  max-amount: 3
```

**enchant.min-level**

作用：附魔最小等级。

```yaml
enchant:
  min-level: 1
```

**enchant.max-level**

作用：附魔最大等级。

```yaml
enchant:
  max-level: 4
```

***

### 24) ReplaceItem

替换指定槽位物品。

```yaml
type: replace_item
slot: MAIN_HAND
item:
  material: DIAMOND_SWORD
```

默认 `target: SOURCE`。

#### 字段说明

**slot**

作用：要替换的装备槽位。

```yaml
slot: HELMET
```

**item**

作用：物品构建配置（支持项目已有 BuildItem 格式）。

```yaml
item:
  material: SHIELD
```

***

### 25) Disarm

缴械玩家某个手持槽位，可选择是否掉落。

```yaml
type: disarm
slot: MAIN_HAND
drop: true
pickup-delay: 20
match-item:
  material:
    - diamond_sword
```

默认 `target: TARGET`。

#### 字段说明

**slot**

作用：缴械槽位（主手/副手）。

```yaml
slot: OFF_HAND
```

**drop**

作用：是否把移除物品丢在地上。

```yaml
drop: false
```

**pickup-delay**

作用：掉落物可被拾取前的延迟 tick。

```yaml
pickup-delay: 60
```

**match-item**

作用：设置哪些物品能够触发缴械。使用 Match Item Format。

```yaml
match-item:
  material:
    - diamond_sword
```

***

### 26) ShuffleInventory

随机打乱玩家背包某个槽位区间内的物品。

```yaml
type: shuffle_inventory
start-slot: 0
end-slot: 35
```

默认 `target: TARGET`。

#### 字段说明

**start-slot**

作用：起始槽位（含）。

```yaml
start-slot: 9
```

**end-slot**

作用：结束槽位（含）。

```yaml
end-slot: 35
```

***

### 27) LaunchProjectile

让来源实体主动发射一个投射物。

```yaml
type: launch_projectile
entity-type: ARROW
speed: 1.5
extra-y: 0
fireball-yield: 1.0
fireball-incendiary: true
```

默认 `target: SOURCE`。

#### 字段说明

**entity-type**

作用：发射实体类型（常见 `ARROW`、`FIREBALL`）。

```yaml
entity-type: FIREBALL
```

**speed**

作用：投射物初速度倍率。

```yaml
speed: 2.2
```

**extra-y**

作用：在朝向向量上附加向上偏移（抛物线更高）。

```yaml
extra-y: 0.2
```

**fireball-yield**

作用：火球爆炸强度（火球类实体生效）。

```yaml
fireball-yield: 2.5
```

**fireball-incendiary**

作用：火球爆炸是否点火。

```yaml
fireball-incendiary: false
```

***

### 28) SendMessage

向玩家发送文本消息（支持单条、多条、范围模式）。

```yaml
type: send_message
mode: target-player
messages:
  - "&c你被诅咒了，{player}!"
```

默认 `target: SOURCE`。

#### 字段说明

**messages**

作用：多条消息，按顺序发送。

```yaml
messages:
  - "&e第一条"
  - "&c第二条"
```

**message**

作用：单条消息；仅在 `messages` 为空时使用。

```yaml
message: "&aHello {player}"
```

**mode**

作用：选择消息作用玩家。

* `target-player`：只对仇恨目标玩家
* `nearby`：对附近所有玩家

```yaml
mode: nearby
```

**radius**

作用：`mode: nearby` 时的范围半径。

```yaml
radius: 12
```

#### 可用变量

* `{player}`：当前发送对象玩家
* `{target}`：怪物仇恨目标
* `{level}`：怪物等级

***

### 29) ExecuteCommand

执行 Minecraft 指令（可多条，支持控制台或玩家身份执行）。

```yaml
type: execute_command
commands:
  - give {player} diamond 1
```

默认 `target: SOURCE`。

#### 字段说明

**commands**

作用：多条命令列表，按顺序执行。

```yaml
commands:
  - effect give {player} slowness 5 1
  - say affected {player}
```

**command**

作用：单条命令；当 `commands` 没填时使用。

```yaml
command: give {player} golden_apple 1
```

**as-console**

作用：是否以控制台身份执行。

* `true`：控制台执行（默认）
* `false`：由目标玩家执行

```yaml
as-console: false
```

**mode**

作用：指令目标玩家选择方式。

* `target-player`：怪物当前仇恨目标
* `nearby`：附近所有玩家

```yaml
mode: nearby
```

**radius**

作用：`mode: nearby` 时搜索半径。

```yaml
radius: 16
```

#### 可用变量

* `{player}`：当前命令目标玩家
* `{target}`：怪物仇恨目标
* `{level}`：怪物等级

***

### 30) Limit

组合执行器：先应用限制参数，再执行内部 `abilities`。

```yaml
type: limit
cooldown: 5
random: 0.5
abilities:
  1:
    type: PotionEffect
    effect: WEAKNESS
    duration: 60
```

默认 `target: TARGET`。

#### 字段说明

**abilities**

作用：通过限制后要运行的子能力集合。

```yaml
abilities:
  1:
    type: Sound
    sound: ENTITY_WITHER_AMBIENT
```

**times / random / cooldown**

作用：直接复用通用限制字段，对整个内部能力组生效。

```yaml
times: 2
random: 0.4
cooldown: 8
```

***

### 31) Mythic Skills

执行 MythicMobs 的技能。

`@target` 目标符可能无法正常使用，如果是那样的话，请替换成 `@trigger`。

```yaml
type: mythic_skill
skill: FireBlast
power: 1.0
```

#### 字段说明

**skill：**&#x6280;能 ID。

```yaml
FireBlast:
  Skills:
    - effect:particles{particle=flame;amount=30;hS=0.4;vS=0.4;speed=0.02} @self
    - sound{s=entity.blaze.shoot;v=1;p=1} @self
    // 请避免使用 @target，请替换为 @trigger。
    - projectile{bulletType=ARROW;onTick=FireBlast-Tick;onHit=FireBlast-Hit;v=12;i=1;hR=1;vR=1;g=0.03} @trigger

FireBlast-Tick:
  Skills:
    - effect:particles{particle=flame;amount=4;hS=0.05;vS=0.05;speed=0.01} @origin

FireBlast-Hit:
  Skills:
    - damage{a=8} @trigger
    - ignite{ticks=60} @trigger
    - effect:particles{particle=explosion_large;amount=1} @origin
    - sound{s=entity.generic.explode;v=1;p=1} @origin
```

### 32) CreeperStats

**CreeperStats：修改苦力怕（Creeper）的爆炸属性。**&#x7528;于调整目标苦力怕的爆炸半径、引爆时间，以及是否为高压苦力怕。\
如果目标不是 `Creeper`，此能力不会生效。\
默认目标类型为 **SOURCE**。

#### 字段说明

**explosion-radius：** 设置苦力怕的爆炸半径。\
值会被限制为不小于 `0`。

**fuse-ticks：** 设置苦力怕的引爆时间（ticks）。\
值会被限制为至少 `1`。

**powered：** 设置是否为高压苦力怕。

* `true` = 高压苦力怕
* `false` = 普通苦力怕

#### 示例

```yaml
type: creeper_stats
explosion-radius: 6
fuse-ticks: 20
powered: true
```

#### 说明

* `explosion-radius`、`fuse-ticks`、`powered` 都是可选字段。
* 只会修改配置中已写出的字段；未写出的字段保持原值不变。

### 33) Summon

用于在目标位置生成一个新的实体。\
召唤出的实体必须是可生成的实体类型，并且后续附加属性时要求其为 `LivingEntity`。\
默认目标类型为 **SOURCE**。

#### 字段说明

**entity / entity-type：** 要召唤的实体类型。\
可使用 Bukkit `EntityType` 名称，例如：

```yaml
type: summon
entity: ZOMBIE
```

或

```yaml
type: summon
entity-type: CREEPER
```

***

**max-health：** 设置召唤实体的最大生命值。\
当该值大于 `0` 时，会修改实体的 `MAX_HEALTH` 属性，并将当前生命同步为该上限。

***

**health：** 设置召唤实体的当前生命值。\
当该值大于 `0` 时生效，最终生命值不会超过最大生命值。

***

**attack-damage：** 设置召唤实体的攻击伤害。\
当该值大于等于 `0` 时，会尝试设置实体的 `ATTACK_DAMAGE` 属性。

***

**power-level / power.level：** 给召唤实体附加 Power 时使用的等级。\
默认使用当前能力上下文等级。

***

**powers：** 给召唤实体直接指定多个 Power。\
只会应用插件中实际存在的 Power，重复项会被去重。

```yml
powers:
  - ExplosionArrow
  - WebTrap
```

***

**power.list：** `powers` 的备用写法。\
效果与 `powers` 相同。

***

**power：** 给召唤实体额外追加一个单独的 Power。\
如果同时配置了 `powers` 或 `power.list`，该值会一起加入列表。

```yaml
power: ExplosionArrow
```

***

**random-power-by-level / power.random-by-level：**\
若未配置有效的 `powers` / `power.list` / `power`，则可启用按等级随机分配 Power。

* `true` = 按等级随机分配 Power
* `false` = 不随机分配

***

#### Creeper 专属字段

当召唤实体是 `Creeper` 时，还可额外设置以下字段：

**creeper.explosion-radius：** 设置召唤出的苦力怕爆炸半径。\
值会四舍五入为整数，并限制不小于 `0`。

**creeper.fuse-ticks：** 设置召唤出的苦力怕引爆时间（ticks）。\
值会限制为至少 `1`。

**creeper.powered：** 设置召唤出的苦力怕是否为高压苦力怕。

### 34) RemovePotionEffect <a href="#id-34-removepotioneffect" id="id-34-removepotioneffect"></a>

移除目标的药水效果。

```yaml
type: remove_potion_effect
potion: INVISIBILITY
```

默认 `target: TARGET`。

#### 字段说明

**potion**: 药水效果类型。设置为 `ALL` 代表移除所有药水。

```yaml
potion: WEAKNESS
```

**potions:** 如果你想要移除多种药水，可以使用这种格式。

```yaml
potions: 
  - 'WEAKNESS'
  - 'INVISIBILI'
```
