dev:ecoenchants:zidingyi

这是本文档旧的修订版!


自定义附魔

blackout.yml
display-name: "黑暗降临"
description: "有 &a%chance%%&r 的概率给予敌人 &a%seconds%&r 秒黑暗效果"
placeholders:
  seconds: 4 + ceil(%level% / 2)
  chance: 6 + %level%
type: normal

targets:
  - sword
conflicts: [ ]
rarity: legendary
max-level: 4

tradeable: true
discoverable: true
enchantable: true

effects:
  - id: potion_effect
    args:
      duration: 80 + ceil(%level% / 2) * 20
      chance: 6 + %level%
      level: 1
      effect: darkness
      apply-to-player: false
    triggers:
      - melee_attack

conditions: []
display-name: "黑暗降临"

定义附魔的名称

description: "有 &a%chance%%&r 的概率给予敌人 &a%seconds%&r 秒黑暗效果"

定义附魔的描述

placeholders:
  seconds: 4 + ceil(%level% / 2)
  chance: 6 + %level%

定义变量,你可以定义一些变量在描述中使用

type: normal

定义附魔的类型,可选的有:

  • normal
    • 单件物品上至多拥有 -1 个此类型附魔1)
    • 在获取高等级该类型附魔时的偏向为 02)
    • 附魔被砂轮洗去
  • curse
    • 单件物品上至多拥有 -1 个此类型附魔
    • 在获取高等级该类型附魔时的偏向为 0
    • 附魔不可被砂轮洗去
  • spell
    • 单件物品上至多拥有 1 个此类型附魔
    • 在获取高等级该类型附魔时的偏向为 0.5
    • 附魔被砂轮洗去
  • special
    • 单件物品上至多拥有 1 个此类型附魔
    • 在获取高等级该类型附魔时的偏向为 0.7
    • 附魔被砂轮洗去
targets:
  - sword

定义附魔可以应用的物品,可选的有:pickaxe(镐), axe(斧), hoe(锄), shovel(锹), sword(剑), helmet(头盔), chestplate(胸甲), leggings(护腿), boots(靴子), armor(防具), trident(三叉戟), bow(弓), crossbow(弩), shears(剪刀), shield(盾牌), fishing_rod(鱼竿), flint_and_steel(打火石), carrot_on_a_stick(萝卜钓竿), elytra(鞘翅)

conflicts: [ ]

定义与其冲突的附魔

rarity: legendary

定义附魔的稀有度,可选的有:

咕咕咕

1)
-1 为不做限制
2)
该值取值 0-1,越接近 1 在获取高等级附魔时越难获取,为 1 时只能获取等级为 1 的附魔
  • dev/ecoenchants/zidingyi.1671781668.txt.gz
  • 最后更改: 2022/12/23 15:47
  • UWiki Admin