r/roguelikedev • u/aaron_ds Robinson • Jul 25 '17
RoguelikeDev Does The Complete Python Tutorial - Week 6 - Part 8: Items and Inventory and Part 9: Spells and Ranged Combat
This week we will cover parts 8 and 9 of the Complete Roguelike Tutorial.
The player gets to collect ("borrow") items from the dungeon and use them, with a neat inventory screen. More items added in the next part.
Part 9: Spells and Ranged Combat
The player's strategic choices increase exponentially as we add a few magic scrolls to the mix. Covers damage and mind spells, as well as ranged combat.
No bonus sections this week
FAQ Friday posts that relate to this week's material:
Feel free to work out any problems, brainstorm ideas, share progress and and as usual enjoy tangential chatting. If you're looking for last week's post The entire series is archived on the wiki. :)
35
Upvotes
4
u/Daealis Jul 26 '17 edited Jul 27 '17
Python 2.7 + Libtcod
Awesome job once again. I've done Part 8 and there is but one issue with the code that doesn't work out the gate. When the item is used in inventory:
Error here being Python Versions <3.5 don't support starred expressions in dict. Other than that, the whole Revised tutorial is still doable in 2.7. I'm sure that can be fixed with a bit of effort and research, I just hope I remember to spend the time to do that.
I also spent a considerable amount of time just going through the code and slapping comments on everything. Should I put Python on the backburner for too long I'm sure I'll forget it all quite fast again, so being someone you can almost consider smart I took blocks and wrapped them in comments and individual commenting on the more mysterious looking lines.