"""Effect handler system for Mantimon TCG.

This module implements a data-driven effect system where card effects are
defined by effect IDs that map to handler functions. This allows cards to
be defined in JSON/database while effect logic lives in Python.

Key Components:
    - base: EffectContext and EffectResult types
    - registry: Effect handler registration and lookup
    - handlers: Built-in effect handlers (deal_damage, heal, etc.)

Usage:
    from app.core.effects import effect_handler, resolve_effect, EffectContext, EffectResult

    @effect_handler("custom_effect")
    def handle_custom(ctx: EffectContext) -> EffectResult:
        # Effect implementation
        return EffectResult.success("Effect applied")

    # Resolve an effect by ID
    result = resolve_effect("deal_damage", context)
"""

# Import handlers to register them
from app.core.effects import handlers as _handlers  # noqa: F401
from app.core.effects.base import EffectContext, EffectResult, EffectType
from app.core.effects.registry import (
    EffectHandler,
    clear_registry,
    effect_handler,
    get_handler,
    is_registered,
    list_effects,
    register_handler,
    resolve_effect,
    unregister_handler,
)

__all__ = [
    # Base types
    "EffectContext",
    "EffectResult",
    "EffectType",
    # Registry
    "EffectHandler",
    "effect_handler",
    "resolve_effect",
    "list_effects",
    "get_handler",
    "is_registered",
    "register_handler",
    "unregister_handler",
    "clear_registry",
]
