📂能力
能力会在触发器条件和能力修改器之后执行。每个分类页面都会提供用途、确切上下文、带默认值的完整专用字段、可直接运行的 YAML 示例,以及行为与限制说明。
EnchantmentReform 注册了 78 个内置能力键。
参考页面
通用格式
abilities:
unique-entry-id:
type: damage_entity
target: TARGET
amount: '2 + level'
conditions: {}
random: 1
cooldown: 0
times: 0通用字段
type
必填
已注册的能力键。键不区分大小写,且 - 会被规范化为 _。
target
由能力决定
选择 SOURCE、SKILL 或 TARGET 等实体角色。
source
使用时默认为 SOURCE
用于归属、方向、发射者、所有者或其他来源角色。
conditions
空
带类型的能力条件;每个子条件都必须通过。
random
1
执行概率。
cooldown
0
按来源、能力和配置路径分别计算的冷却时间,单位为秒。
times
0
此配置路径允许的最大成功尝试次数;零表示无限制。
cooldown-message
空
可选的冷却提示消息,可使用 {remaining} 和 {power_id}。
location
CONTEXT
扁平或嵌套的扩展位置选择器。
location.offset.x/y/z
0
解析位置后应用的偏移量。
item
CONTEXT
物品相关能力使用的扁平或嵌套物品选择器。
item-holder
由能力决定
物品选择器使用的装备持有者。
通用执行顺序
能力自身的带类型条件。
使用次数检查。
已存在的冷却检查。
随机概率判定。
获取冷却。
增加使用次数。
执行该类型的专用实现。
由于通用冷却和次数状态会在能力的专用实现之前获取,因此当所需的事件、实体、物品、方块或集成上下文不存在时,能力可能已经消耗一次尝试,随后才跳过执行。
动态数值
受支持的字段可以解析 level、能力变量、等级选择映射、数字范围、运行时占位符,以及存在玩家上下文时的 PlaceholderAPI 占位符。每个能力条目都会注明重要的显式占位符。
类型索引
mark
cancel_event
remove
place_block
place_temp_block
particle
sound
vanilla_animation
set_attribute
refresh_attribute
set_health
set_absorption
set_air
set_food
set_velocity
set_invulnerable
potion_effect
remove_potion_effect
extend_potion_effects
potion_cloud
freeze
fire
experience
explosion
lightning
damage_entity
damage_item
pull_target
pull_location
teleport_near_target
teleport
guardian_beam
sonic_boom
evoker_fangs
arrow_rain
creeper_stats
swap_health
swap_potion_effects
swap_locations
launch_projectile
shulker_bullet
homing_projectile
consume_food
auto_feed
enhance_equipment
enhance_helditem
replace_item
shuffle_inventory
change_item
modify_repair_cost
cost_price
drop_item
preserve_inventory
preserve_item
preserve_experience
use_on
delay
conditional
any_of
limit
repeat
nearby_entities
nearby_block
summon
mythic_skill
send_message
execute_command
execute_action
break_blocks
break_block
replace_block
change_block_face
grow_crop
scan_blocks
locate_structure
locate_biome
state
auto_fishing
disable_enchantments
最后更新于