package thb.jeanluc.adventure.model.item;

import lombok.experimental.SuperBuilder;
import thb.jeanluc.adventure.game.GameContext;

/**
 * Item with no inherent behaviour. Exists so that every item in the
 * world can polymorphically answer {@link #use(GameContext)} and so the
 * YAML schema can rely on a uniform {@code type} discriminator.
 */
@SuperBuilder
public class PlainItem extends Item {

    /**
     * Writes a generic message that this item cannot be used on its own.
     *
     * @param ctx active game context
     */
    @Override
    public void use(GameContext ctx) {
        ctx.getIo().write("You can't use the " + name + " by itself.");
    }
}
