Low Idle- Check engine light, worse in rain

My 94 Tercel has been idling somewhat low for the few months I’ve had it, but not too bad. A week ago, however, the check engine light came and since then its been idling lower and stalling out. It seems to do it hot and cold, and has nothing to do with accessories running. Last night when it was raining, it was doing it even when coming out a highway exit or driving in a parking lot. In that case it seemed to get better the more it drove, but that could have been cause it dried out. It’s a '94 so I haven’t been able to get the light tested at autozone. Any ideas?

Tonight go out in the garage.  Open the hood and turn out the lights.  Start the car and take a look under the hood.  Do you see sparks?  If so that's the problem, likely new plug wires are needed.  If so get OEM wires.  Don't buy the fancy expensive ones.  You are better off with OEM.  I even recommend the same brand that came with the car.