# 自定义 BOSS 阶段

## 什么是自定义 BOSS 阶段？

自定义 BOSS 阶段是一个自定义怪物的属性，可以使得一个怪物拥有多个阶段（形态），属性的示例如下：

```
phases:
- phase_2_boss.yml:0.X
- phase_3_boss.yml:0.Y
```

***请注意阶段属性内只需要提供其他阶段的文件即可，不需要提供怪物本身所在的文件，同时也只需要在第一个阶段的怪物配置中填写该属性，详情请见最下方的注意事项。***

## 示例自定义BOSS阶段

文件1：phase\_1\_boss.yml

```
isEnabled: true
level: 50
healthMultiplier: 10
entityType: STRAY
powers:
- attack_gravity.yml
phases:
- phase_2_boss.yml:0.60
- phase_3_boss.yml:0.30
```

文件2：phase\_2\_boss.yml

```
isEnabled: true
level: 50
healthMultiplier: 10
entityType: SKELETON
powers:
- attack_gravity.yml
- arrow_fireworks.yml
```

文件3：phase\_3\_boss.yml

```
isEnabled: true
level: 50
healthMultiplier: 10
entityType: WITHER_SKELETON
powers:
- arrow_rain
```

以上 3 个文件共同组成一个 BOSS，3 个文件分布为 3 个不同的阶段。你只需要生成 phase\_1\_boss.yml 文件的自定义怪物即可，当该怪物的血量低于 *60%* 时，该怪物将会被替换为 phase\_2\_boss.yml 文件的自定义怪物，因为在第一个文件中有这么一行配置：`- phase_2_boss.yml:0.60` (*phase\_2boss.yml 是文件的名称，而 0.60 是代表 60% 的血量)。*&#x4EE5;此类推，在低于 30% 血量时将会替换为 phase\_3\_boss.yml 的自定义怪物。这三个文件的配置内容是互相独立的，所以你可以设置每个阶段怪物的能力不同以增加游戏挑战性。

## 注意事项

* 你只需要在第一个阶段自定义怪物配置中设置 BOSS 阶段的 `phases` 选项即可，其他阶段不需要设置。
* 由于事实上每个阶段到达血量后怪物是被替换而不是杀死，因此只有最后一个阶段的怪物被击杀后才会被判定为怪物死亡，玩家击杀，这时才会掉落物品。
* 每个阶段怪物会继承上一阶段怪物的血量的百分比，因此每个阶段怪物的血量可以不同，在玩家看来怪物是莫名其妙多了很多血量或者少了很多血量而已。
* 各个阶段的怪物共用一个重生倒计时和脱战回血等机制。
* 请注意各个阶段的血量不能过于紧密，也不能太靠近0值，如果玩家造成的伤害过高导致怪物直接跳过了某个阶段所设置的值将会导致怪物直接跳阶段或者在没有到最后一个阶段就被玩家击杀。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.superiormc.cn/elitemobs-wiki/pei-zhi/zi-ding-yi-boss-jie-duan.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
