  We develop a technique to study curves in a variety which has a degeneration
into some union of varieties. The class of such varieties is very broad, but
the theory becomes particularly useful when the variety has a degeneration into
a union of toric varieties. Hypersurfaces are typical examples, and we study
lines on K3 surfaces and quintic Calabi-Yau hypersurfaces in detail. In
particular, we combinatorially prove the existence of 2875 lines in a generic
quintic Calabi-Yau 3-fold. Also, we give a geometric construction of walls in
the Gross-Siebert construction of Calabi-Yau varieties.
