Well, have a 3 arrays: one stores the id of the buff or debuff, the other for how many points it deals, and the last for its turns left. At the beggining or end of each turn, use a loop to check the id list. If a valid id is there, check the points and apply the effect, and subtract a turn. If it is at 0, erase all the data for that buff.