{
    name: 'Friend Guard Singles',
    flags: { breakable: 1 },
    effectType: 'sideCondition',
    duration: 1,
    onSideStart(side, source) {
            this.add('-sidestart', side, 'ability: Friend Guard');
    },
    onAnyModifyDamage(damage, source, target, move) {
        if (target !== source && this.effectState.target.hasAlly(target)) {
            if ((target.side.getSideCondition('reflect') && this.getCategory(move) === 'Physical') ||
                (target.side.getSideCondition('lightscreen') && this.getCategory(move) === 'Special')) {
                return;
                }
                if (!target.getMoveHitData(move).crit && !move.infiltrates && !move.ignoreAbility) {
                    this.debug('Friend Guard Singles weaken');
                    if (this.activePerHalf > 1) return this.chainModify([2732, 4096]);
                    return this.chainModify(0.75);
                }
        }
    },
    onSideResidualOrder: 26,
    onSideResidualSubOrder: 5,
    onSideEnd(side) {
        this.add('-sideend', side, 'ability: Friend Guard');
    },
}
