When the Torah says that G‑d “destroyed the earth,” it means that He destroyed “earthiness” – i.e., the mistaken belief that the world exists independent of G‑d. The Flood completely submerged the world in Divine awareness, and thus purified it from its moral degeneration and made it permanently receptive to Divine consciousness. Thus, no further Flood would ever be necessary.
Now, thanks to the Flood, we can bring Divine consciousness even into our “earthly” lives. First, we must periodically immerse ourselves in Divinity – in daily prayer and Torah study, the weekly observance of the Sabbath, and the annual Jewish holidays. Then, we must bring this Divine awareness into every facet of our daily lives. These efforts will hasten the world’s attainment of complete Divine consciousness in the Messianic Era.1

Peace and blessings,
It would appear that the will to good or evil was in man before the flood, those inclinations were a part of man from the time of the garden. Perhaps there is more to the story of the flood than we are to know. But the Torah teaches us that we should do good and shun evil.
When you speak of earthiness I think man, because we are made of the earth, and yet there was a little of the earthiness on the ark, carried to dry ground manifest in Ham. As things get worse, and evil grows HASHEM’s light grows brighter, his truth burning, his justice true, so that even the simple can see and know. Today it is easy to the truth.