{
    onStart(pokemon) {
        if (pokemon.side.persistentState && pokemon.side.persistentState[pokemon.species.id] === 'slowstartended') {
            return;
        }

        this.add('-ability', pokemon, 'Slow Start');
        if (!pokemon.side.persistentState) {
            pokemon.side.persistentState = {};
        }

        if (!pokemon.side.persistentState[pokemon.species.id]) {
            pokemon.side.persistentState[pokemon.species.id] = 5;
        }

        pokemon.addVolatile('slowstart');
    },
    onResidualOrder: 27,
    onResidual(pokemon) {
        if (pokemon.side.persistentState[pokemon.species.id]) {
            pokemon.side.persistentState[pokemon.species.id]--;

            if (pokemon.side.persistentState[pokemon.species.id] <= 0) {
                pokemon.removeVolatile('slowstart');
                pokemon.side.persistentState[pokemon.species.id] = 'slowstartended';
                this.add('-end', pokemon, 'Slow Start');
            }
        }
    },
    condition: {
        onModifyAtk(atk, pokemon) {
            return this.chainModify(0.5);
        },
        onModifySpe(spe, pokemon) {
            return this.chainModify(0.5);
        },
    },
    name: "Slow Start",
    rating: -1,
    num: 112,
}
