package thb.jeanluc.adventure.loader.dto;

import java.util.List;

/**
 * YAML representation of a single NPC reaction.
 *
 * @param onReceive id of the item that triggers this reaction
 * @param response  text the NPC says after the exchange
 * @param gives     id of the item handed back; nullable
 * @param consumes  id of the item taken from the player; nullable
 * @param requires  conditions that must hold; nullable
 * @param effects   effects applied after a successful exchange; nullable
 */
public record ReactionDto(
        String onReceive,
        String response,
        String gives,
        String consumes,
        List<ConditionDto> requires,
        List<EffectDto> effects
) {
    /** Backward-compatible constructor without requires/effects. */
    public ReactionDto(String onReceive, String response, String gives, String consumes) {
        this(onReceive, response, gives, consumes, null, null);
    }
}
