Really fun little puzzle!
It took copious savescumming for good heals and damage rolls, but I did just barely manage to get the pie. I didn't think it'd be possible to do better than 6 berries until I checked the author's notes and remembered that the defend command exists ahahahaha.
The recruitment system is a bit odd, but being forced to start from scratch if you want to replace any members is kind of an interesting dynamic?