I just had to read the slab item. it said something about purifying water, so I had a feeling it would be the water which uncursed the people of one of the villages. after getting the dragon, Agni, I beat the last boss again. she turns into her true form, but she's easy as hell with the dragon taking 999 out each turn. I got the good ending then.
