# 装备掉落等级

在击败怪物后获得的装备通常具有一个随机的等级，本文将介绍这一等级的计算方式和相关的参考数值。

## 掉落等级计算

每个怪物都有其对应的等级，其掉落的装备的等级通常基于这一等级。怪物的等级为`M`时，其掉落的装备等级`E`的计算过程为：

1. 生成5个随机数，取自`[0, 1]`的均匀分布。
2. 计算随机数的和`S`，取这5个随机数的平均值, 记为`R`。
3. 换算为掉落等级`E`: `E = floor((0.5 + R * 0.5) * M)`

## 掉落等级分布

上一节中的随机数和`S`符合参数为5的Irwin-Hall分布，（当随机数的数量逐渐增大时，Irwin-Hall分布趋近于正态分布）。

Irwin-Hall分布的概率密度和分布函数为：

$$PDF=\frac{1}{(n-1)!} \sum\_{k=0}^{\lfloor x \rfloor} (-1)^k \binom{n}{k} (x - k)^{n-1}$$

$$CDF=\frac{1}{n!} \sum\_{k=0}^{\lfloor x \rfloor} (-1)^k \binom{n}{k} (x - k)^n$$

其中`n`为随机数的数量，该函数为`x`的分段函数，`k`表示每一个长度为1的分段的整数部分。

转换为随机数的平均值后，其概率分布表格如下（`R`为平均值，`CDF`为累积分布函数，近似到四位小数）：

| R    | CDF    | R    | CDF    | R    | CDF    | R    | CDF    |
| ---- | ------ | ---- | ------ | ---- | ------ | ---- | ------ |
| 0.00 | 0.0000 | 0.25 | 0.0254 | 0.50 | 0.5000 | 0.75 | 0.9746 |
| 0.05 | 0.0000 | 0.30 | 0.0620 | 0.55 | 0.6465 | 0.80 | 0.9917 |
| 0.10 | 0.0003 | 0.35 | 0.1269 | 0.60 | 0.7750 | 0.85 | 0.9980 |
| 0.15 | 0.0020 | 0.40 | 0.2250 | 0.65 | 0.8731 | 0.90 | 0.9997 |
| 0.20 | 0.0083 | 0.45 | 0.3535 | 0.70 | 0.9380 | 0.95 | 1.0000 |

## 掉落等级概率参考

根据上述的分布函数，可以对应得到掉落等级的分布，以下表格列出了怪物掉落的装备的等级至少是多少的概率。 其中`P`表示装备等级在怪物等级`M`中的比例，实际的掉落等级`E`为`floor(P * M)`。

| P     | Rate    | P     | Rate   | P     | Rate   | P     | Rate  |
| ----- | ------- | ----- | ------ | ----- | ------ | ----- | ----- |
| 50%   | 100.00% | 62.5% | 97.46% | 75%   | 50.00% | 87.5% | 2.54% |
| 52.5% | 100.00% | 65%   | 93.80% | 77.5% | 35.35% | 90%   | 0.83% |
| 55%   | 99.97%  | 67.5% | 87.31% | 80%   | 22.50% | 92.5% | 0.20% |
| 57.5% | 99.70%  | 70%   | 76.47% | 82.5% | 12.69% | 95%   | 0.03% |
| 60%   | 99.17%  | 72.5% | 64.65% | 85%   | 6.20%  | 97.5% | 0.00% |

由上表可知，对于等级固定的怪物，其掉落的装备等级有50%的概率大于等于怪物等级的75%。

而大于等于怪物等级85%的装备掉落概率仅为6.20%，大于等于怪物等级95%的装备掉落概率只有0.03%。

装备图鉴和手册中的装备等级通常是怪物等级的75%附近的值，在实际游戏中有接近一半的概率可以获得至少为标出等级的装备。

装备掉落等级在各个区间内的分布概率如下表：

| P-P       | Rate  | P-P       | Rate   | P-P       | Rate   | P-P        | Rate  |
| --------- | ----- | --------- | ------ | --------- | ------ | ---------- | ----- |
| 50%-52.5% | 0.00% | 62.5%-65% | 3.66%  | 75%-77.5% | 14.65% | 87.5%-90%  | 1.71% |
| 52.5%-55% | 0.03% | 65%-67.5% | 6.49%  | 77.5%-80% | 12.85% | 90%-92.5%  | 0.63% |
| 55%-57.5% | 0.27% | 67.5%-70% | 10.84% | 80%-82.5% | 9.81%  | 92.5%-95%  | 0.17% |
| 57.5%-60% | 0.53% | 70%-72.5% | 11.82% | 82.5%-85% | 6.49%  | 95%-97.5%  | 0.03% |
| 60%-62.5% | 1.71% | 72.5%-75% | 14.65% | 85%-87.5% | 3.66%  | 97.5%-100% | 0.00% |


---

# 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://wiki.mcwcgb.top/attributes/equipment-drop-level.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.
