yes, I think you’d need some kind of A* that allows to backtrack once you reached certain points of interest, taking into account that you cannot have over 3 hearts, that monsters disappear when killed with a sword, etc.
Some people can probably do this in a few minutes, but it’s not something I would tackle in a 48h game jam :p