Yay, "What a hero".
See, told you it was easy, or I probably didn't tell you that, and its probably not that easy either
High stamina probably helped a bit but most likely it was that hard-earned roguelikers innate skill which can only be gotten through years of painful deaths. plus a +4 hand axe is nothing to be sneezed at.
Hopefully the chest will always open now, at least it does for me. As for the Cyclops eye drop, and all item drops for that matter, there is a complex formula that calculates the chance of each item in the creatures inventory being dropped. Otherwise it disappears from the game. Hence the reason you don't always get the butchers weapons/armour or cyclops eye.
FYI the eye will drop 50% or 66% of the time. (even I cant understand my 10+ year old code, see below)
Fixed typo, and yes the 'x' thing is something that I know but have never remembered to fix. All my game that are based off this code (there are many), use ESC as the cancel key. I have not retrospectively remembered to fix this. Thanks for reminding me again. It is now
in my TODO list.
I have been thinking on and off to finally release the final version of this game, but I keep thinking that a graphics release probably would be a good way to finish development.
Hopefully I will get the developers bug again during the next 7drl comp. We will see.
// Calculate chance and drop random monster item
int rand_item_pos = getInt(monster->inventory.size() + 1, 0); // getInt returns a random number between arg1 and arg2 (inclusive of arg2 but maybe not arg1, hence the plus 1??)
// possibly [arg1:arg2) or (arg1:arg2) but most likely the first.
if (rand_item_pos== monster->inventory.size()) //no drop
if (monster->inventory.size() > 0) //more items to drop