JsonEffectDefinitionBattleDataLoader

class JsonEffectDefinitionBattleDataLoader(resourcePaths: List<String>, objectMapper: ObjectMapper = ObjectMapper()) : BattleDataLoader

从 JSON 资源加载 EffectDefinition 的基础实现。

设计意图:

  • 为第一版测试与样例数据提供真实文件加载入口。

  • 先支持当前已落地测试需要的 DSL 子集,再逐步扩展。

当前支持的条件类型:

  • all

  • any

  • not

  • chance

  • hp_ratio

  • has_status

  • has_volatile

  • has_type

  • has_item

  • has_ability

  • weather_is

  • terrain_is

  • boost_compare

  • stat_compare

  • move_has_tag

  • target_relation

  • turn_compare

  • battle_format_is

当前支持的动作类型:

  • add_status

  • remove_status

  • add_volatile

  • remove_volatile

  • damage

  • heal

  • boost

  • clear_boosts

  • set_weather

  • clear_weather

  • set_terrain

  • clear_terrain

  • consume_item

  • restore_pp

  • change_type

  • force_switch

  • fail_move

  • trigger_event

  • apply_condition

  • remove_condition

  • modify_multiplier

  • add_relay

  • set_relay

  • invert_boost_relay

  • boost_from_relay

  • copy_boosts

  • swap_boosts

  • invert_stored_boosts

  • steal_boosts

  • prepare_boost_pass

  • set_probe

  • clear_probe

Constructors

Link copied to clipboard
constructor(resourcePaths: List<String>, objectMapper: ObjectMapper = ObjectMapper())

Functions

Link copied to clipboard
open override fun loadEffects(): List<EffectDefinition>

加载所有 effect 定义。