What does electron affinity depend on?

A. Both the effective nuclear charge and the number of shells in the atom containing electrons
B. Attraction between the protons and neutrons
C. Only the effective nuclear charge
D. Attraction between the valence electrons and core electrons