骷髅祝福

任务

按照下面物品配置的 Lore 的描述制作一个骷髅祝福护身符。

  - id: skeleton_hat
    name: "&5骷髅祝福"
    description:
      - "&7每 &a30 &7秒恢复一点祝福值,每次受到攻击可以"
      - "&7消耗一点祝福值直接抵消,最多积攒 4 点祝福值."
      - ""
      - "&5&l史诗"
    item: "player_head texture:eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMTRkNDQ5MDdhNjc5ZjE3MzAzOTJmY2ZhOGZkYWRkZjJhYzc5OGVhZWI4YzRlMTA5MmQ0YmIwMDM3N2I2MTliOCJ9fX0="
    craftable: false
    recipe: []
    effects: 我们还不知道呢

逐步分析

很明显我们使用 Tliamans 插件实现。

祝福值

很明显这里的祝福值我们通过积分系统实现,于是像法力值那样,我们制作第一个和第二个技能,那就是祝福值的恢复和判断玩家是否在战斗状态,如下:

      - id: give_points
        args:
          type: g_tzf
          amount: 1
        triggers:
          - static_600
        conditions:
          - id: below_points
            args:
              type: g_tzf
              amount: '4'
          - id: placeholder_contains
            args:
              placeholder: '%combatlogx_in_combat%'
              value: "Yes"
              ignore_case: true

躲避伤害

躲避伤害和消耗祝福值是两个技能需要同时触发的,我们使用 run_chain_inline 技能实现。躲避伤害通过 damage_multiplier 技能配合 take_damage 触发器实现。

参考答案

Tliamans

  - id: skeleton_hat
    name: "&5骷髅祝福"
    description:
      - "&7每 &a30 &7秒恢复一点祝福值,每次受到攻击可以"
      - "&7消耗一点祝福值直接抵消,最多积攒 4 点祝福值."
      - ""
      - "&5&l史诗"
    item: "player_head texture:eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMTRkNDQ5MDdhNjc5ZjE3MzAzOTJmY2ZhOGZkYWRkZjJhYzc5OGVhZWI4YzRlMTA5MmQ0YmIwMDM3N2I2MTliOCJ9fX0="
    craftable: false
    recipe: []
    effects:
      - id: run_chain_inline
        args:
          run-type: normal
          chain:
            effects:
              - id: damage_multiplier
                args:
                  multiplier: 0
                triggers:
                  - take_damage
                filters:
                  damageCause:
                    - ENTITY_ATTACK
                    - ENTITY_EXPLOSION
                    - ENTITY_SWEEP_ATTACK
      - id: add_points
        args:
          type: g_tzf
          amount: 0
      - id: give_points
        args:
          type: g_tzf
          amount: 1
        triggers:
          - static_600
        conditions:
          - id: below_points
            args:
              type: g_tzf
              amount: '4'
          - id: placeholder_contains
            args:
              placeholder: '%combatlogx_in_combat%'
              value: "Yes"
              ignore_case: true

最后更新于