package thb.jeanluc.adventure.model;

import lombok.Builder;
import lombok.Getter;
import thb.jeanluc.adventure.model.item.Item;

import java.util.List;

/**
 * A single trigger/response pair on an NPC. When the player gives the
 * NPC an item matching {@link #consumes}, the NPC writes {@link #response}
 * and optionally hands back {@link #gives}.
 */
@Getter
@Builder
public class NpcReaction {

    /** Item taken from the player's inventory; may be {@code null} if nothing is consumed. */
    private final Item consumes;

    /** Item handed back to the player; may be {@code null} if nothing is given. */
    private final Item gives;

    /** Text the NPC says after a successful exchange. */
    private final String response;

    /** Conditions that must hold for the exchange; null/empty = always. */
    private final List<Condition> requires;

    /** Effects applied after a successful exchange; null = none. */
    private final List<Effect> effects;
}
