[暗黑2词缀 / D2 Operation] D2 Affix — Beta
英文部分 (机器翻译。如有语法错误,敬请谅解。)
概述
D2 Affix 是一款适用于 Minecraft Forge 1.20.1 的模组,将《暗黑破坏神 II》中精英怪的词缀系统引入 Minecraft。
怪物可以以带有随机词缀(如冰霜附魔、极速、传送……)和光环(力量、神圣冰冻、审判……)的精英形态生成。精英怪分为 5 个等级,具有基于难度的权重平衡、小怪生成、装备池、动态弩箭弹药以及自定义属性与伤害类型框架。精英类型定义由数据驱动(JSON),并可在 config/d2affix/elite_types/ 下进行覆盖。
精英类型(等级)
每个等级都在 data/d2affix/elite_types/*.json 中定义为模板,然后注册一个 ID。设置了 applicableTags 或 applicableEntities 的类型仅在匹配的怪物上生成;未设置这两项限制的类型则适用于所有符合条件的生物。子类型使用 extends 继承并重写父类型的字段。
等级对比
| 等级 |
显示颜色 |
权重 (普通/梦魇/地狱) |
词缀数量 |
小怪 |
| 普通 |
无 |
1500 |
0 |
0 |
| 冠军 |
蓝色 |
10 / 20 / 30 |
1 |
2 (冠军类型的小怪) |
| 独特 |
金色 |
10 / 20 / 30 |
2 / 2 / 3 |
0 / 3 / 4 (小怪类型) |
| 超级独特 |
红色 |
1 / 2 / 5 |
2 / 3 / 4 |
3 / 4 / 6 (小怪类型) |
| 小怪 |
灰色 |
0 |
0 |
0 |
已注册类型
common — 无限制的基准等级,适用于所有符合条件的生物
champion — 冠军小怪的精英类型
unique — 无限制,完整的词缀 + 光环词缀池
minion — 独特/超级独特小怪的精英类型,继承父级名称
super_unique — 超级独特基准模板(红色,翻译键命名)
bonebreaker — 不死系,固有 spectral_hit,木剑
bonesaw — 不死系,固有 extra_strong + magic_resistant,铁斧 + 盾牌
rakanishu — 不死系,固有 lightning_enchanted + extra_fast
treehead — 野兽标签,固有 extra_fast + extra_strong
corpsefire — 不死系,固有 spectral_hit,木剑
bishibosh — 野兽标签,固有 magic_resistant + fire_enchanted
属性修正器(全部为 MULTIPLY_TOTAL;数值分别为普通/梦魇/地狱难度)
| 等级 |
最大生命值 |
攻击伤害 |
护甲值 |
护甲韧性 |
移动速度 |
| 普通 |
-30/-10/+10% |
-25/-15/0% |
-25/-15/0% |
-25/-15/0% |
0/+5/+10% |
| 冠军 |
+50/+60/+140% |
0/+30/+70% |
0/+30/+70% |
0/+30/+70% |
+5/+10/+20% |
| 独特 |
+50/+100/+200% |
+25/+50/+100% |
+25/+50/+100% |
+25/+50/+100% |
+10/+20/+30% |
| 超级独特 |
+75/+150/+300% |
+25/+75/+150% |
+25/+75/+150% |
+25/+75/+150% |
+15/+25/+40% |
| 小怪 |
-30/0/+20% |
-15/0/+10% |
-30/0/+20% |
-30/0/+20% |
0/+15/+30% |
难度系统
| 值 |
名称 |
触发条件 |
| 0 |
普通 |
默认 |
| 1 |
梦魇 |
首次击杀末影龙 |
| 2 |
地狱 |
首次击杀凋灵 |
通过主世界中的 SavedData 进行持久化存储。击杀标志可防止重复触发。玩家可使用 /d2affix difficult <0-2> 手动设置。词缀数量随难度等级缩放。
所有词缀
前缀(13种)— 由独特和超级独特怪使用
| ID |
效果 |
cold_enchanted |
冰霜抗性 +75%;命中时造成冰霜伤害(攻击力的 25/50/100%);减速 80/120/160 刻;死亡时冰霜新星(半径 6 格,50/75/100% 伤害) |
fire_enchanted |
火焰抗性 +75%;命中时造成火焰伤害(25/50/100%);死亡时尸体爆炸(半径 4 格,目标最大生命值的 75~100% 火焰伤害) |
lightning_enchanted |
闪电抗性 +75%;命中时造成闪电伤害(150/200/350%);受伤时有 10/20/50% 几率释放连锁闪电 |
poison_enchanted |
毒素抗性 +75%;命中时造成毒素伤害(25/50/100%);中毒 60/120/240 刻;死亡时毒素新星(半径 6 格,50/75/100% 伤害) |
extra_strong |
最大生命值 ×1.5/×1.75/×2.0;攻击伤害 ×1.5/×1.75/×2.0;暴击率 +5% |
extra_fast |
移动速度 ×1.5;暴击伤害 +50% |
stone_skin |
物理抗性 +50%;护甲值 ×2/×2.5/×3 |
magic_resistant |
火/冰/电/毒/魔法抗性各增加 20/40/60% |
multiple_shots |
向左右各 30° 扩散额外发射 2 枚弹射物 |
teleportation |
当生命值低于 33% 时传送到安全位置;冷却时间 60 秒;距离 8~15 格 |
cursed |
50% 几率:伤害加深(降低 50% 物理抗性),持续 240 刻 |
soul_burn |
100% 几率:灵魂燃烧 3/5/8 秒(挖掘疲劳 lv1/2/4 + 攻击力降低 lv*5%) |
spectral_hit |
随机元素(火/冰/电),造成相当于攻击力 75% 的该元素伤害;火/冰/电抗性 +40% |
光环(17种)— 每个生物最多 1 个,半径 10~15(因光环而异)
| ID |
盟友增益 |
敌方减益 |
might_aura |
攻击力 ×1.75/×1.95/×2.20 |
— |
defense_aura |
护甲 ×1.5/×1.65/×1.9,坚韧度 ×1.25/×1.35/×1.5 |
— |
blessed_aim_aura |
暴击率 +10/20/40% |
— |
concentration_aura |
暴击伤害 ×1.90/×2.05/×2.20 |
— |
fanaticism_aura |
攻击力 ×1.75/×2.00/×2.20,暴击率 +3/3.5/4%,暴击伤害 +21/25/28% |
— |
thorns_aura |
荆棘 10/15/30% |
— |
holy_fire_aura |
火焰抗性 +0.1/0.2/0.4 |
火焰抗性 -0.05/0.1/0.2;攻击火焰伤害 4.5/5.5/7% |
holy_freeze_aura |
冰霜抗性 +0.1/0.2/0.4 |
冰霜抗性 -0.05/0.1/0.2;攻击冰霜伤害 4.5/5.5/7% |
holy_lightning_aura |
闪电抗性 +0.1/0.2/0.4 |
闪电抗性 -0.05/0.1/0.2;攻击闪电伤害 4.5/5.5/7% |
conviction_aura |
— |
护甲 ×0.25/×0.17/×0.10;所有抗性 -0.25/0.30/0.35 |
sanctuary_aura |
魔法抗性 +0.1/0.2/0.4 |
魔法伤害 6.75/8.25/10.5%(仅对不死生物造成攻击伤害) |
salvation_aura |
全部6种元素抗性(物理/魔法/火焰/冰霜/闪电/毒素)+0.3/0.4/0.5 |
— |
prayer_aura |
范围内每脉冲治疗盟友 1/3/6 点生命值(每4刻钟一次) |
— |
redemption_aura |
范围内生物死亡时,恢复持有者其最大生命值的 10%(最低1点) |
— |
fire_resistance_aura |
火焰抗性 +0.5/0.6/0.7 |
— |
cold_resistance_aura |
冰霜抗性 +0.5/0.6/0.7 |
— |
lightning_resistance_aura |
闪电抗性 +0.5/0.6/0.7 |
— |
冠军词缀 (5) — 由冠军类型池使用
| ID |
效果 |
champion |
生命值 ×3/×2.5/×2,伤害 ×1.5,暴击 +10% |
berserker |
生命值 ×0.8/0.6/0.4,伤害 ×3/4/5,暴击伤害 +50%,暴击率 +15%,红色色调 |
ghostly |
物理抗性 +50%,移动速度 ×0.8,+4种元素抗性 20%,透明度 -0.7,20% 冰冻命中效果 |
fanatical |
生命值 ×3,伤害 ×2,暴击伤害 +30%,暴击率 +10%,免疫诅咒 |
leader |
生命值 +20%,攻击时附带随机元素伤害(攻击力的 40%) |
自定义属性 (D2Attributes)
所有 RangedAttribute 均为同步属性,抗性范围 [-2, 0.75]。
| ID |
默认值 |
最小值 |
最大值 |
描述 |
physical_resistance |
0.0 |
-2.0 |
0.75 |
物理伤害减免(上限 75%) |
magic_resistance |
0.0 |
-2.0 |
0.75 |
魔法伤害减免 |
fire_resistance |
0.0 |
-2.0 |
0.75 |
火焰伤害减免 |
cold_resistance |
0.0 |
-2.0 |
0.75 |
冰霜伤害减免 |
lightning_resistance |
0.0 |
-2.0 |
0.75 |
闪电伤害减免 |
poison_resistance |
0.0 |
-2.0 |
0.75 |
毒素伤害减免 |
thorns |
0.0 |
0.0 |
1024.0 |
反弹伤害百分比 |
crit_chance |
0.2 |
0.0 |
1.0 |
暴击率(默认 20%) |
crit_damage |
1.2 |
1.0 |
1024.0 |
暴击倍率(默认 120%) |
red_channel |
-1.0 |
-1.0 |
255.0 |
红色渲染通道 |
green_channel |
-1.0 |
-1.0 |
255.0 |
绿色渲染通道 |
blue_channel |
-1.0 |
-1.0 |
255.0 |
蓝色渲染通道 |
alpha_channel |
-1.0 |
-1.0 |
255.0 |
透明度渲染通道 |
自定义伤害类型
| Key |
用法 |
d2affix:cold |
基础冰霜伤害 |
d2affix:fire |
基础火焰伤害(用于尸体爆炸) |
d2affix:lightning |
基础闪电伤害 |
d2affix:poison |
基础毒素伤害 |
d2affix:holy_freeze |
神圣冰冻光环伤害 |
d2affix:holy_fire |
神圣火焰光环伤害 |
d2affix:holy_lightning |
神圣闪电光环伤害 |
自定义药水与效果
可饮用药水
| 药水 |
效果 |
持续时间 |
cold_immunity |
冰霜免疫 |
3 分钟 |
long_cold_immunity |
冰霜免疫 |
8 分钟 |
lightning_immunity |
闪电免疫 |
3 分钟 |
long_lightning_immunity |
闪电免疫 |
8 分钟 |
poison_immunity |
毒素免疫 |
3 分钟 |
long_poison_immunity |
毒素免疫 |
8 分钟 |
所有药水均可作为投掷型和滞留型变体获取。
生物效果
包含:amplify_damage, soul_burn, poison, thorns_aura, might_aura, defense_aura, blessed_aim_aura, concentration_aura, fanaticism_aura, holy_fire_aura_buff/debuff, holy_freeze_aura_buff/debuff, holy_lightning_aura_buff/debuff, conviction_aura, salvation_aura, fire_resistance_aura, cold_resistance_aura, lightning_resistance_aura, sanctuary_aura_buff, prayer_aura, redemption_aura。
自定义实体
d2affix:charged_bolt — 投射物实体(碰撞箱 0.25×0.25,追踪距离 64 格,更新间隔 1 刻)
自定义 AI 目标
所有目标均继承自 RangedWeaponGoal(基于原版 Goal):
| 目标 |
武器 |
范围 |
冷却时间 |
备注 |
BowAttackGoal |
弓 |
>6 格 |
60 刻 |
标准箭矢射击 |
TridentAttackGoal |
三叉戟 |
>3 格 |
60 刻 |
投掷三叉戟 |
CrossbowAttackGoal |
弩 |
>6 格 |
60 刻 |
状态机(充能 25 刻)。非普通精英怪使用烟花(充能 3 倍,爆炸威力随难度缩放) |
配置文件
全部位于 config/d2affix/(首次运行时创建;可通过 /d2affix reload 热重载):
| 文件 |
内容 |
elite_whitelist.json |
精英怪资格的白名单和黑名单 |
faction_settings.json |
阵营/标签系统,用于友军伤害免疫 |
equipment_params.json |
装备池:不同难度下的工具/盔甲/材料权重 |
elite_types/*.json |
各类型精英怪定义(覆盖同名的内置类型) |
装备池示例
每种材质等级的武器优先级(剑/斧/镐/锄/锹比例 10:7:5:2:2):
- 皮革/木质:N=100, H=30, E=0
- 锁链/石质:N=50, H=70, E=0
- 铁:N=10, H=150, E=100
- 金:N=50, H=100, E=50
- 钻石:N=0, H=10, E=50
- 下界合金:N=0, H=0, E=1
副手物品:燧石(所有难度),盾牌(困难及以上),图腾(地狱及以上)。空手权重:N=2000, H=700, E=0。所有物品掉落设置 drop=false。
标签
实体标签
d2affix:undead — 不死生物(僵尸、骷髅等)
d2affix:illager — 灾厄村民
d2affix:beast — 野兽生物
d2affix:enhance_remote_ai — 适用于远程武器 AI 的生物
伤害标签
d2affix:on_crit — 无视暴击伤害
minecraft:is_fire — 火焰伤害
minecraft:is_lightning — 闪电伤害
minecraft:is_freezing — 冰冻伤害
d2affix:is_poison — 中毒伤害
d2affix:no_knockback — 无击退伤害
minecraft:bypasses_armor — 穿透护甲伤害
minecraft:bypasses_invulnerability — 穿透无敌状态伤害
d2affix:is_thorns — 荆棘反射伤害(防止反射循环)
物品标签
d2affix:unlock_0 — 普通难度可用
d2affix:unlock_1 — 噩梦难度可用
d2affix:unlock_2 — 地狱难度可用
命令
所有命令都需要权限等级 2(OP)。
/d2affix
| 子命令 |
语法 |
描述 |
affix |
/d2affix affix <affix_id> <targets> |
手动为实体附加词缀 |
summon |
/d2affix summon <type_id> <entity_type> [x y z] |
生成指定类型的精英怪 |
difficult |
/d2affix difficult |
查询当前难度 |
difficult |
/d2affix difficult <0-2> |
设置全局难度 |
reload |
/d2affix reload |
热重载配置和精英类型文件 |
debug |
/d2affix debug |
切换调试日志 |
info |
/d2affix info |
显示你正在查看的实体的精英信息 |
| set | /d2affix set <目标> <类型ID> | 强制设置实体的精英类型(绕过资格检查) |
NBT 数据结构
全部存储在 PersistentData → d2affix 中:
d2affix/
├── affixes/ [ { id: "cold_enchanted" }, ... ]
├── component/ { teleport_cooldown: ... }
└── elite/
├── is_processed: bool
├── type_id: string
├── steps/ { fill_affixes, spawn_minions, ... } (每步完成标志)
└── parent_key: string (用于小怪显示)
技术信息
- 模组 ID:
d2affix
- Minecraft: 1.20.1
- Forge: 47.4.10+
- 版本: 0.1.0-Beta
- 作者: PyroStella
Chinese Version
概述
暗黑2操作 是一个 Minecraft Forge 1.20.1 模组,将暗黑破坏神 2 的精英怪物词缀系统完整移植到 Minecraft 中。
怪物可以带有随机词缀(冰冷强化、特别快速、传送……)和光环(力量灵气、神圣冰冻、信念灵气……)生成。精英分为 5 个等级,按难度权重分配,支持随从生成、装备池、动态弩箭弹药切换,以及自定义属性和伤害类型框架。精英类型定义由数据驱动(JSON),可在 config/d2affix/elite_types/ 下覆盖。
精英类型(等级)
每个等级在 data/d2affix/elite_types/*.json 中定义,再以 ID 注册。设置了 applicableTags 或 applicableEntities 的类型只在匹配的怪物上生成;两者皆未设置的类型适用于所有符合条件的敌对生物。子类型通过 extends 继承并覆盖父类型的字段。
等级对比
| 等级 |
显示颜色 |
权重(N/H/E) |
词缀数量 |
随从 |
| 普通 |
无色 |
1500 |
0 |
0 |
| 冠军 |
蓝色 |
10 / 20 / 30 |
1 |
2(冠军类型) |
| 独特 |
金色 |
10 / 20 / 30 |
2 / 2 / 3 |
0 / 3 / 4(随从类型) |
| 超级独特 |
红色 |
1 / 2 / 5 |
2 / 3 / 4 |
3 / 4 / 6(随从类型) |
| 随从 |
灰色 |
0 |
0 |
0 |
已注册类型
common — 普通,无限制,适用于所有符合条件的敌对生物
champion — 冠军随从专用
unique — 无限制,全量前缀 + 光环词缀池
minion — 独特/超级独特的随从专用,继承父级名称
super_unique — 超级独特基础模板(红色,使用翻译键命名)
bonebreaker — 亡灵生物,固有 spectral_hit,木剑
bonesaw — 亡灵生物,固有 extra_strong + magic_resistant,铁斧 + 盾牌
rakanishu — 亡灵生物,固有 lightning_enchanted + extra_fast
treehead — BEAST 标签,固有 extra_fast + extra_strong
corpsefire — 亡灵生物,固有 spectral_hit,木剑
bishibosh — BEAST 标签,固有 magic_resistant + fire_enchanted
属性修正(全部为 MULTIPLY_TOTAL;数值对应 普通 / 噩梦 / 地狱)
| 等级 |
生命 |
攻击 |
护甲 |
韧性 |
速度 |
| 普通 |
-30/-10/+10% |
-25/-15/0% |
-25/-15/0% |
-25/-15/0% |
0/+5/+10% |
| 冠军 |
+50/+60/+140% |
0/+30/+70% |
0/+30/+70% |
0/+30/+70% |
+5/+10/+20% |
| 独特 |
+50/+100/+200% |
+25/+50/+100% |
+25/+50/+100% |
+25/+50/+100% |
+10/+20/+30% |
| 超级独特 |
+75/+150/+300% |
+25/+75/+150% |
+25/+75/+150% |
+25/+75/+150% |
+15/+25/+40% |
| 随从 |
-30/0/+20% |
-15/0/+10% |
-30/0/+20% |
-30/0/+20% |
0/+15/+30% |
难度系统
| 值 |
名称 |
触发条件 |
| 0 |
普通 |
默认 |
| 1 |
噩梦 |
首次击杀末影龙 |
| 2 |
地狱 |
首次击杀凋灵 |
通过 SavedData 在主世界持久化存储,防止重复触发。玩家可使用 /d2affix difficult <0-2> 手动设置。词缀数值按难度档位进行缩放。
词缀列表
前缀(13 个)— 独特与超级独特使用
| ID |
效果 |
cold_enchanted |
冰抗+75%;命中造成冰霜伤害(攻击 25/50/100%);减速 80/120/160 ticks;死亡时释放冰霜新星(半径 6,50/75/100% 伤害) |
fire_enchanted |
火抗+75%;命中造成火焰伤害(25/50/100%);死亡时尸体爆炸(半径 4,目标最大生命值 75~100% 的火焰伤害) |
lightning_enchanted |
电抗+75%;命中造成闪电伤害(150/200/350%);受伤时 10/20/50% 概率触发充能弹 |
poison_enchanted |
毒抗+75%;命中造成毒素伤害(25/50/100%);中毒 60/120/240 ticks;死亡时释放毒新星(半径 6,50/75/100%) |
extra_strong |
生命 ×1.5/×1.75/×2.0;伤害 ×1.5/×1.75/×2.0;暴击率+5% |
extra_fast |
移速×1.5;暴击伤害+50% |
stone_skin |
物理抗性+50%;护甲×2/×2.5/×3 |
magic_resistant |
火/冰/电/毒/魔法抗性各 +20/40/60% |
multiple_shots |
额外发射 2 枚投射物,散布角度 ±30° |
teleportation |
HP<33% 传送至安全位置;60 秒冷却时间;距离 8~15 格 |
cursed |
50% 概率施加伤害加深(物理抗性 -50%),持续 240 刻 |
soul_burn |
100% 概率灵魂燃烧 3/5/8 秒(挖掘疲劳 lv1/2/4 + 攻击力降低 lv*5%) |
spectral_hit |
随机元素(火/冰/电)造成相当于 75% 攻击力的该元素伤害;火/冰/电抗性+40% |
光环(17 个)— 每个生物最多拥有 1 个,半径 10~15(随光环不同)
| ID |
友军增益 |
敌军减益 |
might_aura |
攻击力×1.75/×1.95/×2.20 |
— |
defense_aura |
护甲×1.5/×1.65/×1.9,韧性×1.25/×1.35/×1.5 |
— |
blessed_aim_aura |
暴击率+10/20/40% |
— |
concentration_aura |
暴击伤害×1.90/×2.05/×2.20 |
— |
fanaticism_aura |
攻击力×1.75/×2.00/×2.20,暴率+3/3.5/4%,暴伤+21/25/28% |
— |
thorns_aura |
荆棘反伤 10/15/30% |
— |
holy_fire_aura |
火抗+0.1/0.2/0.4 |
火抗-0.05/0.1/0.2;攻击 4.5/5.5/7% 火伤 |
holy_freeze_aura |
冰抗+0.1/0.2/0.4 |
冰抗-0.05/0.1/0.2;攻击 4.5/5.5/7% 冰伤 |
holy_lightning_aura |
电抗+0.1/0.2/0.4 |
电抗-0.05/0.1/0.2;攻击 4.5/5.5/7% 电伤 |
conviction_aura |
— |
护甲×0.25/×0.17/×0.10;全抗性-0.25/0.30/0.35 |
sanctuary_aura |
魔抗+0.1/0.2/0.4 |
仅对亡灵造成魔法伤害(攻击力的 6.75/8.25/10.5%) |
salvation_aura |
全 6 元素抗性(物/魔/火/冰/电/毒)+0.3/0.4/0.5 |
— |
prayer_aura |
每 4 ticks 为范围内友军恢复 1/3/6 点生命 |
— |
redemption_aura |
范围内生物死亡时,持有者回复其最大生命 10%(至少 1 点) |
— |
fire_resistance_aura |
火抗+0.5/0.6/0.7 |
— |
cold_resistance_aura |
冰抗+0.5/0.6/0.7 |
— |
lightning_resistance_aura |
电抗+0.5/0.6/0.7 |
— |
冠军词缀(5 个)— 冠军类型池使用
| ID |
效果 |
champion |
生命值×3/×2.5/×2,伤害×1.5,暴击率+10% |
berserker |
生命值×0.8/0.6/0.4,伤害×3/4/5,暴击伤害+50%,暴击率+15%,红色渲染 |
ghostly |
物理抗性+50%,移动速度×0.8,四元素抗性+20%,透明度 -0.7,命中时造成 20% 冰霜伤害 |
fanatical |
生命值×3,伤害×2,暴击伤害+30%,暴击率+10%,免疫诅咒 |
leader |
生命值+20%,攻击时有 40% 概率附加随机元素伤害 |
自定义属性(共 13 项)
全部为 RangedAttribute 类型,已同步,取值范围 [-2, 0.75]。
| ID |
默认值 |
最小值 |
最大值 |
描述 |
physical_resistance |
0.0 |
-2.0 |
0.75 |
物理伤害减免(上限 75%) |
magic_resistance |
0.0 |
-2.0 |
0.75 |
魔法伤害减免 |
fire_resistance |
0.0 |
-2.0 |
0.75 |
火焰伤害减免 |
cold_resistance |
0.0 |
-2.0 |
0.75 |
冰冷伤害减免 |
lightning_resistance |
0.0 |
-2.0 |
0.75 |
闪电伤害减免 |
poison_resistance |
0.0 |
-2.0 |
0.75 |
毒素伤害减免 |
thorns |
0.0 |
0.0 |
1024.0 |
反伤百分比 |
crit_chance |
0.2 |
0.0 |
1.0 |
暴击率(默认 20%) |
crit_damage |
1.2 |
1.0 |
1024.0 |
暴击倍率(默认 120%) |
red_channel |
-1.0 |
-1.0 |
255.0 |
红色渲染通道 |
green_channel |
-1.0 |
-1.0 |
255.0 |
绿色渲染通道 |
blue_channel |
-1.0 |
-1.0 |
255.0 |
蓝色渲染通道 |
alpha_channel |
-1.0 |
-1.0 |
255.0 |
透明度渲染通道 |
自定义伤害类型(共 7 种)
| 键 |
用途 |
d2affix:cold |
基础冰冷伤害 |
d2affix:fire |
基础火焰伤害(用于尸体爆炸) |
d2affix:lightning |
基础闪电伤害 |
d2affix:poison |
基础毒素伤害 |
d2affix:holy_freeze |
神圣冰冻光环伤害 |
d2affix:holy_fire |
神圣火焰光环伤害 |
d2affix:holy_lightning |
神圣闪电光环伤害 |
药水与效果
可饮用药水
| 药水 |
效果 |
持续时间 |
cold_immunity |
冰霜免疫 |
3 分钟 |
long_cold_immunity |
冰霜免疫 |
8 分钟 |
lightning_immunity |
闪电免疫 |
3 分钟 |
long_lightning_immunity |
闪电免疫 |
8 分钟 |
poison_immunity |
毒素免疫 |
3 分钟 |
long_poison_immunity |
毒素免疫 |
8 分钟 |
均提供喷溅型与滞留型版本。
生物效果
包括:amplify_damage、soul_burn、poison、thorns_aura、might_aura、defense_aura、blessed_aim_aura、concentration_aura、fanaticism_aura、holy_fire_aura_buff/debuff、holy_freeze_aura_buff/debuff、holy_lightning_aura_buff/debuff、conviction_aura、salvation_aura、fire_resistance_aura、cold_resistance_aura、lightning_resistance_aura、sanctuary_aura_buff、prayer_aura、redemption_aura。
自定义实体
d2affix:charged_bolt — 弹射物实体(碰撞箱大小 0.25×0.25,追踪范围 64 格,每游戏刻更新)。
自定义 AI
全部继承自 RangedWeaponGoal(基于原版 Goal):
| 目标类 |
武器 |
射程 |
冷却时间 |
备注 |
BowAttackGoal |
弓 |
>6 格 |
60 ticks |
标准箭矢射击 |
TridentAttackGoal |
三叉戟 |
>3 格 |
60 ticks |
投掷三叉戟 |
CrossbowAttackGoal |
弩 |
>6 格 |
60 ticks |
状态机逻辑(25 ticks 装填)。非普通精英使用烟花火箭(装填时间×3,爆炸强度随难度提升) |
配置文件
所有文件位于 config/d2affix/ 目录(首次运行自动生成,可通过 /d2affix reload 命令热重载):
| 文件名 |
内容说明 |
elite_whitelist.json |
精英化黑白名单 |
faction_settings.json |
阵营/友军标签设置(用于免疫友军伤害) |
equipment_params.json |
装备池配置:各材质工具/护甲在不同难度下的权重 |
elite_types/*.json |
各精英类型定义(同名文件可覆盖内置类型) |
装备池示例
各材质按难度权重分配(剑/斧/镐/锄/铲 比例为 10:7:5:2:2):
- 皮革/木:N=100, H=30, E=0
- 锁链/石:N=50, H=70, E=0
- 铁:N=10, H=150, E=100
- 金:N=50, H=100, E=50
- 钻石:N=0, H=10, E=50
- 下界合金:N=0, H=0, E=1
副手物品:打火石(全难度)、盾牌(噩梦及以上难度)、图腾(地狱及以上难度)。空手权重:N=2000, H=700, E=0。所有掉落物品 drop=false。
标签
实体标签
d2affix:undead — 亡灵生物(僵尸、骷髅等)
d2affix:illager — 灾厄村民生物
d2affix:beast — 野兽生物
d2affix:enhance_remote_ai — 可启用远程武器 AI 的生物
伤害标签
d2affix:on_crit — 无视暴击伤害
minecraft:is_fire — 火焰伤害
minecraft:is_lightning — 闪电伤害
minecraft:is_freezing — 冰冻伤害
d2affix:is_poison — 毒素伤害
d2affix:no_knockback — 无击退伤害
minecraft:bypasses_armor — 无视护甲伤害
minecraft:bypasses_invulnerability — 无视无敌状态伤害
d2affix:is_thorns — 荆棘反伤(防止反射循环)
物品标签
d2affix:unlock_0 — 普通难度解锁
d2affix:unlock_1 — 噩梦难度解锁
d2affix:unlock_2 — 地狱难度解锁
指令
所有指令需要权限等级 2(op)。
/d2affix
| 子命令 |
语法 |
描述 |
affix |
/d2affix affix <词缀id> <目标> |
手动将词缀附加到实体 |
summon |
/d2affix summon <类型id> <实体类型> [坐标] |
生成指定类型的精英怪 |
difficult |
/d2affix difficult |
查询当前全局难度 |
difficult |
/d2affix difficult <0-2> |
设置全局难度 |
reload |
/d2affix reload |
热重载配置与精英类型文件 |
debug |
/d2affix debug |
切换调试日志输出 |
info |
/d2affix info |
显示视线指向实体的精英信息 |
set |
/d2affix set <目标> <类型id> |
强制设置实体精英类型(绕过资格检查) |
NBT 数据结构
全部数据存储在 PersistentData → d2affix 中:
d2affix/
├── affixes/ [ { id: "cold_enchanted" }, ... ]
├── component/ { teleport_cooldown: ... }
└── elite/
├── is_processed: bool
├── type_id: string
├── steps/ { fill_affixes, spawn_minions, ... } (各步骤完成标记)
└── parent_key: string (随从的父类型显示用)
技术信息
- Mod ID:
d2affix
- Minecraft: 1.20.1
- Forge: 47.4.10+
- 版本: 0.1.0-Beta
- 作者: PyroStella
[暗黑2词缀 / D2 Operation] D2 Affix — Beta
English section (Machine-translated. Please excuse any grammatical errors.)
Overview
D2 Affix is a Minecraft Forge 1.20.1 mod that brings Diablo II's elite monster affix system into Minecraft.
Monsters can spawn as elites with randomized affixes (Cold Enchanted, Extra Fast, Teleportation...) and auras (Might, Holy Freeze, Conviction...). Elites are classified into 5 tiers with per-difficulty weight balancing, minion spawning, equipment pools, dynamic crossbow ammo, and a custom attribute + damage-type framework. Elite type definitions are data-driven (JSON) and can be overridden under config/d2affix/elite_types/.
Elite Types (Tiers)
Each tier is defined as a template in data/d2affix/elite_types/*.json, then registered with an ID. Types that set applicableTags or applicableEntities only spawn on matching monsters; types with neither restriction apply to all eligible mobs. Child types use extends to inherit and override a parent's fields.
Tier Comparison
| Tier |
Display Color |
Weight (N/H/E) |
Affix Count |
Minions |
| Common |
None |
1500 |
0 |
0 |
| Champion |
Blue |
10 / 20 / 30 |
1 |
2 (Champion type) |
| Unique |
Gold |
10 / 20 / 30 |
2 / 2 / 3 |
0 / 3 / 4 (Minion type) |
| Super Unique |
Red |
1 / 2 / 5 |
2 / 3 / 4 |
3 / 4 / 6 (Minion type) |
| Minion |
Gray |
0 |
0 |
0 |
Registered Types
common — unrestricted base tier, applies to all eligible mobs
champion — minion elite type for Champion minions
unique — unrestricted, full prefix + aura affix pool
minion — minion elite type for Unique / Super Unique minions, inherits parent name
super_unique — base Super Unique template (red, translation-key naming)
bonebreaker — UNDEAD, innate spectral_hit, wooden sword
bonesaw — UNDEAD, innate extra_strong + magic_resistant, iron axe + shield
rakanishu — UNDEAD, innate lightning_enchanted + extra_fast
treehead — BEAST tag, innate extra_fast + extra_strong
corpsefire — UNDEAD, innate spectral_hit, wooden sword
bishibosh — BEAST tag, innate magic_resistant + fire_enchanted
Attribute Modifiers (all MULTIPLY_TOTAL; values are Normal / Nightmare / Hell)
| Tier |
Max HP |
Atk Dmg |
Armor |
Armor Toughness |
Move Speed |
| Common |
-30/-10/+10% |
-25/-15/0% |
-25/-15/0% |
-25/-15/0% |
0/+5/+10% |
| Champion |
+50/+60/+140% |
0/+30/+70% |
0/+30/+70% |
0/+30/+70% |
+5/+10/+20% |
| Unique |
+50/+100/+200% |
+25/+50/+100% |
+25/+50/+100% |
+25/+50/+100% |
+10/+20/+30% |
| Super Unique |
+75/+150/+300% |
+25/+75/+150% |
+25/+75/+150% |
+25/+75/+150% |
+15/+25/+40% |
| Minion |
-30/0/+20% |
-15/0/+10% |
-30/0/+20% |
-30/0/+20% |
0/+15/+30% |
Difficulty System
| Value |
Name |
Trigger |
| 0 |
Normal |
Default |
| 1 |
Nightmare |
First Ender Dragon kill |
| 2 |
Hell |
First Wither kill |
Persistence via SavedData in the Overworld. Kill flags prevent repeated triggers. Players can manually set with /d2affix difficult <0-2>. Affix numbers scale per difficulty tier.
All Affixes
Prefixes (13) — used by Unique and Super Unique
| ID |
Effect |
cold_enchanted |
Cold resist +75%; on-hit cold dmg (25/50/100% of atk); slow 80/120/160 ticks; death frost nova (r6, 50/75/100% dmg) |
fire_enchanted |
Fire resist +75%; on-hit fire dmg (25/50/100%); death corpse explosion (r4, 75~100% of target max HP fire dmg) |
lightning_enchanted |
Lightning resist +75%; on-hit lightning dmg (150/200/350%); 10/20/50% chance charged bolt on hurt |
poison_enchanted |
Poison resist +75%; on-hit poison dmg (25/50/100%); poison 60/120/240 ticks; death poison nova (r6, 50/75/100%) |
extra_strong |
Max HP ×1.5/×1.75/×2.0; Atk dmg ×1.5/×1.75/×2.0; crit chance +5% |
extra_fast |
Move speed ×1.5; crit dmg +50% |
stone_skin |
Physical resist +50%; armor ×2/×2.5/×3 |
magic_resistant |
Fire/ice/ltg/poison/magic resist each +20/40/60% |
multiple_shots |
Fires 2 extra projectiles at ±30° spread |
teleportation |
Teleports to safety when HP < 33%; 60s cooldown; 8~15 blocks |
cursed |
50% chance: amplify damage (-50% phys resist), 240 ticks |
soul_burn |
100% chance soul burn 3/5/8s (mining fatigue lv1/2/4 + atk -lv*5%) |
spectral_hit |
Random element (fire/ice/ltg), 75% of atk as that element; fire/ice/ltg resist +40% |
Auras (17) — max 1 per mob, radius 10~15 (varies by aura)
| ID |
Ally Buff |
Enemy Debuff |
might_aura |
Atk ×1.75/×1.95/×2.20 |
— |
defense_aura |
Armor ×1.5/×1.65/×1.9, Toughness ×1.25/×1.35/×1.5 |
— |
blessed_aim_aura |
Crit chance +10/20/40% |
— |
concentration_aura |
Crit dmg ×1.90/×2.05/×2.20 |
— |
fanaticism_aura |
Atk ×1.75/×2.00/×2.20, crit rate +3/3.5/4%, crit dmg +21/25/28% |
— |
thorns_aura |
Thorns 10/15/30% |
— |
holy_fire_aura |
Fire resist +0.1/0.2/0.4 |
Fire resist -0.05/0.1/0.2; 4.5/5.5/7% atk fire dmg |
holy_freeze_aura |
Cold resist +0.1/0.2/0.4 |
Cold resist -0.05/0.1/0.2; 4.5/5.5/7% atk cold dmg |
holy_lightning_aura |
Lightning resist +0.1/0.2/0.4 |
Lightning resist -0.05/0.1/0.2; 4.5/5.5/7% atk lightning dmg |
conviction_aura |
— |
Armor ×0.25/×0.17/×0.10; all resists -0.25/0.30/0.35 |
sanctuary_aura |
Magic resist +0.1/0.2/0.4 |
Magic dmg 6.75/8.25/10.5% of atk to UNDEAD only |
salvation_aura |
All 6 elemental resists (phys/magic/fire/ice/ltg/poison) +0.3/0.4/0.5 |
— |
prayer_aura |
Heals allies in range 1/3/6 HP per pulse (every 4 ticks) |
— |
redemption_aura |
On death of a creature in range, heal holder 10% of its max HP (min 1) |
— |
fire_resistance_aura |
Fire resist +0.5/0.6/0.7 |
— |
cold_resistance_aura |
Cold resist +0.5/0.6/0.7 |
— |
lightning_resistance_aura |
Lightning resist +0.5/0.6/0.7 |
— |
Champion Affixes (5) — used by Champion type pool
| ID |
Effect |
champion |
HP ×3/×2.5/×2, dmg ×1.5, crit +10% |
berserker |
HP ×0.8/0.6/0.4, dmg ×3/4/5, crit dmg +50%, crit rate +15%, red tint |
ghostly |
Phys resist +50%, move ×0.8, +4 elem resist 20%, alpha -0.7, 20% ice on-hit |
fanatical |
HP ×3, dmg ×2, crit dmg +30%, crit rate +10%, immune to curse |
leader |
HP +20%, random element dmg (40% of atk) on attack |
Custom Attributes (D2Attributes)
All RangedAttribute, synced, range [-2, 0.75] for resists.
| ID |
Default |
Min |
Max |
Description |
physical_resistance |
0.0 |
-2.0 |
0.75 |
Physical dmg reduction (cap 75%) |
magic_resistance |
0.0 |
-2.0 |
0.75 |
Magic dmg reduction |
fire_resistance |
0.0 |
-2.0 |
0.75 |
Fire dmg reduction |
cold_resistance |
0.0 |
-2.0 |
0.75 |
Cold dmg reduction |
lightning_resistance |
0.0 |
-2.0 |
0.75 |
Lightning dmg reduction |
poison_resistance |
0.0 |
-2.0 |
0.75 |
Poison dmg reduction |
thorns |
0.0 |
0.0 |
1024.0 |
Reflect dmg percentage |
crit_chance |
0.2 |
0.0 |
1.0 |
Crit rate (default 20%) |
crit_damage |
1.2 |
1.0 |
1024.0 |
Crit multiplier (default 120%) |
red_channel |
-1.0 |
-1.0 |
255.0 |
Red render channel |
green_channel |
-1.0 |
-1.0 |
255.0 |
Green render channel |
blue_channel |
-1.0 |
-1.0 |
255.0 |
Blue render channel |
alpha_channel |
-1.0 |
-1.0 |
255.0 |
Alpha render channel |
Custom Damage Types
| Key |
Usage |
d2affix:cold |
Basic cold damage |
d2affix:fire |
Basic fire damage (used by corpse explosion) |
d2affix:lightning |
Basic lightning damage |
d2affix:poison |
Basic poison damage |
d2affix:holy_freeze |
Holy Freeze aura damage |
d2affix:holy_fire |
Holy Fire aura damage |
d2affix:holy_lightning |
Holy Lightning aura damage |
Custom Potions & Effects
Drinkable Potions
| Potion |
Effect |
Duration |
cold_immunity |
Cold immunity |
3 min |
long_cold_immunity |
Cold immunity |
8 min |
lightning_immunity |
Lightning immunity |
3 min |
long_lightning_immunity |
Lightning immunity |
8 min |
poison_immunity |
Poison immunity |
3 min |
long_poison_immunity |
Poison immunity |
8 min |
All available as splash and lingering variants.
Mob Effects
Includes: amplify_damage, soul_burn, poison, thorns_aura, might_aura, defense_aura, blessed_aim_aura, concentration_aura, fanaticism_aura, holy_fire_aura_buff/debuff, holy_freeze_aura_buff/debuff, holy_lightning_aura_buff/debuff, conviction_aura, salvation_aura, fire_resistance_aura, cold_resistance_aura, lightning_resistance_aura, sanctuary_aura_buff, prayer_aura, redemption_aura.
Custom Entity
d2affix:charged_bolt — projectile entity (0.25×0.25 hitbox, tracking 64 blocks, update interval 1 tick)
Custom AI Goals
All extend RangedWeaponGoal (based on vanilla Goal):
| Goal |
Weapon |
Range |
Cooldown |
Notes |
BowAttackGoal |
Bow |
>6 blocks |
60 ticks |
Standard arrow shooting |
TridentAttackGoal |
Trident |
>3 blocks |
60 ticks |
Trident throwing |
CrossbowAttackGoal |
Crossbow |
>6 blocks |
60 ticks |
State-machine (25t charge). Non-Common elites use fireworks (3× charge, explosion scales with difficulty) |
Config Files
All in config/d2affix/ (created on first run; hot-reloadable via /d2affix reload):
| File |
Content |
elite_whitelist.json |
Whitelist and blacklist for elite eligibility |
faction_settings.json |
Faction/tag system for friendly-fire immunity |
equipment_params.json |
Equipment pool: tool/armor/material weights per difficulty |
elite_types/*.json |
Per-type elite definitions (override built-in types of the same name) |
Equipment Pool Example
Weapon priority per material tier (sword/axe/pickaxe/hoe/shovel ratio 10:7:5:2:2):
- Leather/Wood: N=100, H=30, E=0
- Chain/Stone: N=50, H=70, E=0
- Iron: N=10, H=150, E=100
- Gold: N=50, H=100, E=50
- Diamond: N=0, H=10, E=50
- Netherite: N=0, H=0, E=1
Offhand items: Flint (all), Shield (NM+), Totem (Hell+). Empty hand weight: N=2000, H=700, E=0. All items drop=false.
Tags
Entity Tags
d2affix:undead — Undead entities (zombies, skeletons, etc.)
d2affix:illager — Illager entities
d2affix:beast — Beast entities
d2affix:enhance_remote_ai — Entities eligible for ranged weapon AI
Damage Tags
d2affix:on_crit — Bypasses critical damage
minecraft:is_fire — Fire damage
minecraft:is_lightning — Lightning damage
minecraft:is_freezing — Freezing damage
d2affix:is_poison — Poison damage
d2affix:no_knockback — No-knockback damage
minecraft:bypasses_armor — Armor-piercing damage
minecraft:bypasses_invulnerability — Invulnerability-piercing damage
d2affix:is_thorns — Thorns reflect damage (prevents reflection loops)
Item Tags
d2affix:unlock_0 — Available at Normal difficulty
d2affix:unlock_1 — Available at Nightmare difficulty
d2affix:unlock_2 — Available at Hell difficulty
Commands
All commands require permission level 2 (op).
/d2affix
| Subcommand |
Syntax |
Description |
affix |
/d2affix affix <affix_id> <targets> |
Manually attach an affix to entities |
summon |
/d2affix summon <type_id> <entity_type> [x y z] |
Spawn an elite of the given type |
difficult |
/d2affix difficult |
Query current difficulty |
difficult |
/d2affix difficult <0-2> |
Set global difficulty |
reload |
/d2affix reload |
Hot-reload config and elite-type files |
debug |
/d2affix debug |
Toggle debug logging |
info |
/d2affix info |
Show elite info of the entity you are looking at |
set |
/d2affix set <target> <type_id> |
Force-set an entity's elite type (bypasses eligibility) |
NBT Data Structure
All stored in PersistentData → d2affix:
d2affix/
├── affixes/ [ { id: "cold_enchanted" }, ... ]
├── component/ { teleport_cooldown: ... }
└── elite/
├── is_processed: bool
├── type_id: string
├── steps/ { fill_affixes, spawn_minions, ... } (per-step completion flags)
└── parent_key: string (for minion display)
Technical Info
- Mod ID:
d2affix
- Minecraft: 1.20.1
- Forge: 47.4.10+
- Version: 0.1.0-Beta
- Author: PyroStella
中文版
概述
暗黑2操作 是一个 Minecraft Forge 1.20.1 模组,将暗黑破坏神 2 的精英怪物词缀系统完整移植到 Minecraft 中。
怪物可以带有随机词缀(冰冷强化、特别快速、传送……)和光环(力量灵气、神圣冰冻、信念灵气……)生成。精英分为 5 个等级,按难度权重分配,支持随从生成、装备池、动态弩箭弹药切换,以及自定义属性和伤害类型框架。精英类型定义由数据驱动(JSON),可在 config/d2affix/elite_types/ 下覆盖。
精英类型(等级)
每个等级在 data/d2affix/elite_types/*.json 中定义,再以 ID 注册。设置了 applicableTags 或 applicableEntities 的类型只在匹配的怪物上生成;两者皆未设置的类型适用于所有符合条件的敌对生物。子类型通过 extends 继承并覆盖父类型的字段。
等级对比
| 等级 |
显示颜色 |
权重(N/H/E) |
词缀数量 |
随从 |
| 普通 |
无色 |
1500 |
0 |
0 |
| 冠军 |
蓝色 |
10 / 20 / 30 |
1 |
2(冠军类型) |
| 独特 |
金色 |
10 / 20 / 30 |
2 / 2 / 3 |
0 / 3 / 4(随从类型) |
| 超级独特 |
红色 |
1 / 2 / 5 |
2 / 3 / 4 |
3 / 4 / 6(随从类型) |
| 随从 |
灰色 |
0 |
0 |
0 |
已注册类型
common — 基础档,无限制,适用所有符合条件的敌对生物
champion — 冠军随从专用
unique — 无限制,全量前缀 + 光环词缀池
minion — 独特/超级独特的随从专用,继承父级名称
super_unique — 超级独特基础模板(红色,使用翻译键命名)
bonebreaker — 亡灵生物,固有 spectral_hit,木剑
bonesaw — 亡灵生物,固有 extra_strong + magic_resistant,铁斧 + 盾牌
rakanishu — 亡灵生物,固有 lightning_enchanted + extra_fast
treehead — BEAST 标签,固有 extra_fast + extra_strong
corpsefire — 亡灵生物,固有 spectral_hit,木剑
bishibosh — BEAST 标签,固有 magic_resistant + fire_enchanted
属性修正(全部 MULTIPLY_TOTAL;数值为 普通 / 噩梦 / 地狱)
| 等级 |
生命 |
攻击 |
护甲 |
韧性 |
速度 |
| 普通 |
-30/-10/+10% |
-25/-15/0% |
-25/-15/0% |
-25/-15/0% |
0/+5/+10% |
| 冠军 |
+50/+60/+140% |
0/+30/+70% |
0/+30/+70% |
0/+30/+70% |
+5/+10/+20% |
| 独特 |
+50/+100/+200% |
+25/+50/+100% |
+25/+50/+100% |
+25/+50/+100% |
+10/+20/+30% |
| 超级独特 |
+75/+150/+300% |
+25/+75/+150% |
+25/+75/+150% |
+25/+75/+150% |
+15/+25/+40% |
| 随从 |
-30/0/+20% |
-15/0/+10% |
-30/0/+20% |
-30/0/+20% |
0/+15/+30% |
难度系统
| 值 |
名称 |
触发条件 |
| 0 |
普通 |
默认 |
| 1 |
噩梦 |
首次击杀末影龙 |
| 2 |
地狱 |
首次击杀凋灵 |
通过 SavedData 在主世界持久化,防重复触发。玩家可用 /d2affix difficult <0-2> 手动设置。词缀数值按难度档位缩放。
词缀列表
前缀(13 个)— 独特与超级独特使用
| ID |
效果 |
cold_enchanted |
冰抗+75%;命中冰伤(攻击 25/50/100%);减速 80/120/160 ticks;死亡冰霜新星(r6,50/75/100% 伤害) |
fire_enchanted |
火抗+75%;命中火伤(25/50/100%);死亡尸体爆炸(r4,目标最大生命 75~100% 的火伤) |
lightning_enchanted |
电抗+75%;命中电伤(150/200/350%);受伤时 10/20/50% 概率触发充能弹 |
poison_enchanted |
毒抗+75%;命中毒伤(25/50/100%);中毒 60/120/240 ticks;死亡毒新星(r6,50/75/100%) |
extra_strong |
生命 ×1.5/×1.75/×2.0;伤害 ×1.5/×1.75/×2.0;暴击率+5% |
extra_fast |
移速×1.5;暴击伤害+50% |
stone_skin |
物抗+50%;护甲×2/×2.5/×3 |
magic_resistant |
火/冰/电/毒/魔抗各 +20/40/60% |
multiple_shots |
额外发射 2 枚弹射物,±30° 散布 |
teleportation |
HP<33% 传送至安全位置;60 秒冷却;8~15 格 |
cursed |
50% 概率施加伤害加深(物理抗性 -50%),240 刻 |
soul_burn |
100% 概率灵魂燃烧 3/5/8s(挖掘疲劳 lv1/2/4 + 攻击 -lv*5%) |
spectral_hit |
随机元素(火/冰/电)造成 75% 攻击力的该元素伤害;火/冰/电抗+40% |
光环(17 个)— 每个生物最多 1 个,半径 10~15(随光环不同)
| ID |
友军增益 |
敌军减益 |
might_aura |
攻击力×1.75/×1.95/×2.20 |
— |
defense_aura |
护甲×1.5/×1.65/×1.9,韧性×1.25/×1.35/×1.5 |
— |
blessed_aim_aura |
暴击率+10/20/40% |
— |
concentration_aura |
暴击伤害×1.90/×2.05/×2.20 |
— |
fanaticism_aura |
攻击力×1.75/×2.00/×2.20,暴率+3/3.5/4%,暴伤+21/25/28% |
— |
thorns_aura |
荆棘反伤 10/15/30% |
— |
holy_fire_aura |
火抗+0.1/0.2/0.4 |
火抗-0.05/0.1/0.2;攻击 4.5/5.5/7% 火伤 |
holy_freeze_aura |
冰抗+0.1/0.2/0.4 |
冰抗-0.05/0.1/0.2;攻击 4.5/5.5/7% 冰伤 |
holy_lightning_aura |
电抗+0.1/0.2/0.4 |
电抗-0.05/0.1/0.2;攻击 4.5/5.5/7% 电伤 |
conviction_aura |
— |
护甲×0.25/×0.17/×0.10;全抗性-0.25/0.30/0.35 |
sanctuary_aura |
魔抗+0.1/0.2/0.4 |
仅对亡灵造成魔法伤害(攻击力的 6.75/8.25/10.5%) |
salvation_aura |
全 6 元素抗性(物/魔/火/冰/电/毒)+0.3/0.4/0.5 |
— |
prayer_aura |
每 4 ticks 为范围内友军恢复 1/3/6 点生命 |
— |
redemption_aura |
范围内生物死亡时,持有者回复其最大生命 10%(至少 1 点) |
— |
fire_resistance_aura |
火抗+0.5/0.6/0.7 |
— |
cold_resistance_aura |
冰抗+0.5/0.6/0.7 |
— |
lightning_resistance_aura |
电抗+0.5/0.6/0.7 |
— |
冠军词缀(5 个)— 冠军类型池使用
| ID |
效果 |
champion |
生命×3/×2.5/×2,伤害×1.5,暴击率+10% |
berserker |
生命×0.8/0.6/0.4,伤害×3/4/5,暴击伤害+50%,暴击率+15%,红色渲染 |
ghostly |
物理抗性+50%,移动×0.8,四元素抗性+20%,透明度 -0.7,命中 20% 冰伤 |
fanatical |
生命×3,伤害×2,暴击伤害+30%,暴击率+10%,免疫诅咒 |
leader |
生命+20%,攻击时 40% 攻击力的随机元素伤害 |
自定义属性(13 个)
全部为 RangedAttribute,已同步,抗性范围 [-2, 0.75]。
| ID |
默认值 |
最小 |
最大 |
描述 |
physical_resistance |
0.0 |
-2.0 |
0.75 |
物理伤害减免(上限 75%) |
magic_resistance |
0.0 |
-2.0 |
0.75 |
魔法伤害减免 |
fire_resistance |
0.0 |
-2.0 |
0.75 |
火焰伤害减免 |
cold_resistance |
0.0 |
-2.0 |
0.75 |
冰冷伤害减免 |
lightning_resistance |
0.0 |
-2.0 |
0.75 |
闪电伤害减免 |
poison_resistance |
0.0 |
-2.0 |
0.75 |
毒素伤害减免 |
thorns |
0.0 |
0.0 |
1024.0 |
反伤百分比 |
crit_chance |
0.2 |
0.0 |
1.0 |
暴击率(默认 20%) |
crit_damage |
1.2 |
1.0 |
1024.0 |
暴击倍率(默认 120%) |
red_channel |
-1.0 |
-1.0 |
255.0 |
红色渲染通道 |
green_channel |
-1.0 |
-1.0 |
255.0 |
绿色渲染通道 |
blue_channel |
-1.0 |
-1.0 |
255.0 |
蓝色渲染通道 |
alpha_channel |
-1.0 |
-1.0 |
255.0 |
透明度渲染通道 |
自定义伤害类型(7 个)
| 键 |
用途 |
d2affix:cold |
基础冰冷伤害 |
d2affix:fire |
基础火焰伤害(尸体爆炸使用) |
d2affix:lightning |
基础闪电伤害 |
d2affix:poison |
基础毒素伤害 |
d2affix:holy_freeze |
神圣冰冻光环伤害 |
d2affix:holy_fire |
神圣火焰光环伤害 |
d2affix:holy_lightning |
神圣闪电光环伤害 |
药水与效果
可饮用药水
| 药水 |
效果 |
时长 |
cold_immunity |
冰霜免疫 |
3 分钟 |
long_cold_immunity |
冰霜免疫 |
8 分钟 |
lightning_immunity |
闪电免疫 |
3 分钟 |
long_lightning_immunity |
闪电免疫 |
8 分钟 |
poison_immunity |
毒素免疫 |
3 分钟 |
long_poison_immunity |
毒素免疫 |
8 分钟 |
均提供喷溅型与滞留型。
生物效果
包括:amplify_damage、soul_burn、poison、thorns_aura、might_aura、defense_aura、blessed_aim_aura、concentration_aura、fanaticism_aura、holy_fire_aura_buff/debuff、holy_freeze_aura_buff/debuff、holy_lightning_aura_buff/debuff、conviction_aura、salvation_aura、fire_resistance_aura、cold_resistance_aura、lightning_resistance_aura、sanctuary_aura_buff、prayer_aura、redemption_aura。
自定义实体
d2affix:charged_bolt — 弹射物实体(0.25×0.25 碰撞箱,追踪 64 格,每 tick 更新)。
自定义 AI
全部继承 RangedWeaponGoal(基于原版 Goal):
| 目标 |
武器 |
射程 |
冷却 |
备注 |
BowAttackGoal |
弓 |
>6 格 |
60 ticks |
标准箭矢射击 |
TridentAttackGoal |
三叉戟 |
>3 格 |
60 ticks |
投掷三叉戟 |
CrossbowAttackGoal |
弩 |
>6 格 |
60 ticks |
状态机(25t 装填)。非普通精英使用烟花火箭(3× 装填,爆炸强度随难度提升) |
配置文件
均位于 config/d2affix/(首次运行生成,可通过 /d2affix reload 热重载):
| 文件 |
内容 |
elite_whitelist.json |
精英化黑白名单 |
faction_settings.json |
阵营/友军标签(用于友军伤害免疫) |
equipment_params.json |
装备池:各材质按难度的工具/护甲权重 |
elite_types/*.json |
各精英类型定义(同名覆盖内置类型) |
装备池示例
各材质按难度权重(剑/斧/镐/锄/铲 比例 10:7:5:2:2):
- 皮革/木:N=100, H=30, E=0
- 锁链/石:N=50, H=70, E=0
- 铁:N=10, H=150, E=100
- 金:N=50, H=100, E=50
- 钻石:N=0, H=10, E=50
- 下界合金:N=0, H=0, E=1
副手物品:打火石(全部)、盾牌(噩梦+)、图腾(地狱+)。空手权重:N=2000, H=700, E=0。所有物品 drop=false。
标签
实体标签
d2affix:undead — 亡灵生物(僵尸、骷髅等)
d2affix:illager — 灾厄村民生物
d2affix:beast — 野兽生物
d2affix:enhance_remote_ai — 可启用远程武器 AI 的生物
伤害标签
d2affix:on_crit — 无视暴击伤害
minecraft:is_fire — 火焰伤害
minecraft:is_lightning — 闪电伤害
minecraft:is_freezing — 冰冻伤害
d2affix:is_poison — 毒素伤害
d2affix:no_knockback — 无击退伤害
minecraft:bypasses_armor — 无视护甲伤害
minecraft:bypasses_invulnerability — 无视无敌伤害
d2affix:is_thorns — 荆棘反伤(防止反射循环)
物品标签
d2affix:unlock_0 — 普通难度解锁
d2affix:unlock_1 — 噩梦难度解锁
d2affix:unlock_2 — 地狱难度解锁
指令
所有指令需要权限等级 2(op)。
/d2affix
| 子命令 |
语法 |
描述 |
affix |
/d2affix affix <词缀id> <目标> |
手动附加词缀到实体 |
summon |
/d2affix summon <类型id> <实体类型> [坐标] |
生成指定类型的精英怪 |
difficult |
/d2affix difficult |
查询当前难度 |
difficult |
/d2affix difficult <0-2> |
设置全局难度 |
reload |
/d2affix reload |
热重载配置与精英类型文件 |
debug |
/d2affix debug |
切换调试日志 |
info |
/d2affix info |
显示视线指向实体的精英信息 |
set |
/d2affix set <目标> <类型id> |
强制设置实体精英类型(绕过资格检查) |
NBT 数据结构
全部存储于 PersistentData → d2affix:
d2affix/
├── affixes/ [ { id: "cold_enchanted" }, ... ]
├── component/ { teleport_cooldown: ... }
└── elite/
├── is_processed: bool
├── type_id: string
├── steps/ { fill_affixes, spawn_minions, ... } (各步骤完成标记)
└── parent_key: string (随从的父类型显示用)
技术信息
- Mod ID:
d2affix
- Minecraft: 1.20.1
- Forge: 47.4.10+
- 版本: 0.1.0-Beta
- 作者: PyroStella
评论 0
登录后参与评分
还没有评论,来抢沙发吧