{
    onDamage(damage, target, source, effect) {
        if (effect.id === "recoil") {
            if (!this.activeMove)
                throw new Error("Battle.activeMove is null");
            if (this.activeMove.id !== "struggle")
                return null;
        }
    },
    onHit(target, source, move) {
        if (target.volatiles['lockedmove'] && target.volatiles['confusion']) {
            this.add('-activate', target, 'ability: Rock Head');
            target.removeVolatile('confusion');
        }
    },
    onTryAddVolatile(status, target) {
        if (status.id === 'confusion' && target.volatiles['lockedmove']) {
            this.add('-activate', target, 'ability: Rock head');
            return null;
        }
    },
    flags: {},
    name: "Rock Head",
    rating: 3,
    num: 69
}
