> For the complete documentation index, see [llms.txt](https://enchantedmobs.superiormc.cn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://enchantedmobs.superiormc.cn/ultimatequest-zhong-wen-wen-dang/pei-zhi/objectives.md).

# 目标与来源

目标描述玩家需要进行的操作和完成数量。触发器决定统计什么行为，条件用于限制计入进度的方块、生物、物品或玩家状态。可复用目标可以让多个任务共用同一套要求。

## 可复用目标

`quests/<id>.yml` 定义可复用目标，不是已接取任务。例如 `quests/miner.yml`：

```yaml
enabled: true
categories:
- gathering
name: '{lang:defaults.objectives.miner}'
icon:
  material: STONE_PICKAXE
trigger: block_break
amount: 16
count: events
conditions:
  survival:
    type: game_mode
    target: PLAYER
    modes:
    - SURVIVAL
    - ADVENTURE
  blocks:
    type: block_type
    types:
    - STONE
    - DEEPSLATE
    - ANDESITE
    - DIORITE
    - GRANITE
    - TUFF
anti-abuse:
  ignore-spawner-mobs: true
  ignore-internal-block-breaks: true
  ignore-player-placed: true
```

`trigger` 为已注册 ID，如 `block_break` 或 `ultimatequest:block_break`。`amount` 是正整数完成数量。`count` 为 `events`（默认）或 `items`。`name` 优先于自动文案，`display` 可指定备用格式。conditions 筛选事件，`anti-abuse` 限制重复进度。

`events` 每次匹配增加 1，`items` 当前只对钓获物品使用堆叠数量，其他事件仍增加 1。两者均不直接统计伤害、经验值或距离。钓鱼应加 `catch_match_item` 限制为钓获物品。

```yaml
objectives:
  stone:
    source:
      quest: miner
      amount: 64
  zombies:
    source:
      trigger: kill
      amount: 10
      conditions:
        target:
          type: match_entity
          match:
            entity-types: [ZOMBIE]
```

先复制模板，再用 `source` 覆盖，最后用 source 同级字段覆盖。根节点 `source` 是单目标简写。`source.quest` 引用已启用目标，不能引用普通任务。目标池 source（pool、count）用于[周期](/ultimatequest-zhong-wen-wen-dang/pei-zhi/periods.md)/[卷轴](/ultimatequest-zhong-wen-wen-dang/pei-zhi/scrolls.md)生成，不是普通任务通用目标。[里程碑来源](/ultimatequest-zhong-wen-wen-dang/pei-zhi/milestones.md)通过正整数 `value` 设置事件贡献，不使用普通完成数量。

见[触发器](/ultimatequest-zhong-wen-wen-dang/pei-zhi/triggers.md)、[条件](/ultimatequest-zhong-wen-wen-dang/pei-zhi/conditions.md)和[防刷](/ultimatequest-zhong-wen-wen-dang/gong-neng/anti-abuse.md)。事件条件需要相应数据，接取条件没有事件上下文。
