Resistance 效果
基本信息
| 属性 | 值 |
|---|---|
| 来源 | EffectsList 内置(builder name "resistance") |
| 关联 Potion | Potion.resistance(原版 Minecraft) |
| 检测类型 | EnumDetectionType.AVERAGE |
| 营养区间 | [80, 100] |
功能
当玩家 5 大 Nutrient 平均值高于 80 时,应用原版 Resistance,减少受到的所有伤害。
注册
EFFECTS.add(
Effect.builder("resistance", Potion.resistance)
.nutrientRange(80, 100)
.detectionType(EnumDetectionType.AVERAGE)
.build());
行为
nutrientRange(80, 100):平均 Nutrient 值在 [80, 100] 区间触发- AVERAGE 检测:所有 Nutrient 的算术平均落入区间即触发
- amplifier 固定 0(Resistance I),减少 20% 受到的所有伤害
与 Strength / Haste 的差异
- Strength(70-100):近战攻击 +3
- Resistance(80-100):所有伤害 -20%
- Haste(90-100):挖掘速度 +20%
阈值越高奖励越丰厚,形成阶梯。