import ItemBuilder from '../../engine/builders/item';

export default new ItemBuilder()
.withID("statue1")
.withName("a huge ant statue")
.withDescription(
    `Before you stands a big ant statue. One of its six legs is extended outwards, attached to a round device.`
)
.isTakeable(false)
.isUsable(true)
.withUseCallback(async function (context) {
    context.print(`You press the button on the round device attached to the statue's arm.`);
    let value = context.state.get("statue1.pressed", 0);
    value++;
    context.state.set("statue1.pressed", value);
    if (value  == 3) {
        context.print(`You hear a sattisfying click.`);
        context.state.set("statues.unlocked", true);
    }
    if (context.state.get('statue1.pressed') > 2 && context.state.get('statue2.pressed') > 1) {
        context.print(`You hear a low rumble somewhere deep within the bowels of the structure.`);
        context.state.set("statues.unlocked", true);
    }
})
.create();