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

export default new ItemBuilder()
.withID("statue2")
.withName("a huge ant statue")
.withDescription(
    `Before you stands a big ant statue. Two of its six legs is extended outwards, attached to a rectangular device.`
)
.isTakeable(false)
.isUsable(true)
.withUseCallback(async function (context) {
    context.print(`You press the button on the rectangular device attached to the statue's arm.`);
    let value = context.state.get("statue2.pressed", 0);
    value++;
    context.state.set("statue2.pressed", value);
    if (value == 2) {
        context.print(`You hear a sattisfying click.`);
    }
    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();