brando56894 / dungeon-quest Goto Github PK
View Code? Open in Web Editor NEWA dungeon crawler written in Python 2
License: GNU General Public License v3.0
A dungeon crawler written in Python 2
License: GNU General Public License v3.0
Traceback (most recent call last):
File "main.py", line 132, in <module>
menu(new_player)
File "main.py", line 108, in menu
choices[choice](player)
File "/mnt/c/Users/bran/dungeon-quest/actions.py", line 283, in save_game
pickle.dump(player,oput,pickle.HIGHEST_PROTOCOL)
File "/usr/lib/python2.7/pickle.py", line 1370, in dump
Pickler(file, protocol).dump(obj)
File "/usr/lib/python2.7/pickle.py", line 224, in dump
self.save(obj)
File "/usr/lib/python2.7/pickle.py", line 331, in save
self.save_reduce(obj=obj, *rv)
File "/usr/lib/python2.7/pickle.py", line 419, in save_reduce
save(state)
File "/usr/lib/python2.7/pickle.py", line 286, in save
f(self, obj) # Call unbound method with explicit self
File "/usr/lib/python2.7/pickle.py", line 649, in save_dict
self._batch_setitems(obj.iteritems())
File "/usr/lib/python2.7/pickle.py", line 681, in _batch_setitems
save(v)
File "/usr/lib/python2.7/pickle.py", line 286, in save
f(self, obj) # Call unbound method with explicit self
File "/usr/lib/python2.7/pickle.py", line 748, in save_global
(obj, module, name))
pickle.PicklingError: Can't pickle <function <lambda> at 0x7fdfa2767d70>: it's not found as character.<lambda>
round 3
Brandon attacked zombie!
zombie took 18 damage!
zombie attacked Brandon!
That's gonna leave a mark!
Brandon took 29 damage!
Add more weapons that the player can use, ideas?
Cure
--------------
Target: You
Accuracy: 100
MP Used: 2
Spell that heals wounds a little bit.
Cost: 20
Pres Enter To Go Back
How many do you want to buy? 1
Traceback (most recent call last):
File "main.py", line 132, in <module>
menu(new_player)
File "main.py", line 108, in menu
choices[choice](player)
File "/home/bran/dungeon-quest/actions.py", line 152, in visit_shop
visit_shop_section(area, areas[area], player)
File "/home/bran/dungeon-quest/actions.py", line 181, in visit_shop_section
area, player)
File "/home/bran/dungeon-quest/actions.py", line 205, in checkout_item
visit_shop_section(section, section_dict, player)
File "/home/bran/dungeon-quest/actions.py", line 181, in visit_shop_section
area, player)
File "/home/bran/dungeon-quest/actions.py", line 210, in checkout_item
section_dict, player, True)
File "/home/bran/dungeon-quest/actions.py", line 224, in checkout_item
if amount and player.gold_handle(cost*amount):
File "/home/bran/dungeon-quest/player.py", line 360, in gold_handle
self.stat_modifier({"gold", -cost})
File "/home/bran/dungeon-quest/character.py", line 117, in stat_modifier
mod = stat_mod[stat]
TypeError: 'set' object does not support indexing
Add a check in the monster_attack method in Monsters.py to make sure the player is using the best weapon in their inventory.
When choosing to change your weapon after you have just found a new one, the list of available weapons doesn't include the newest one, although if you type it in, it works as expected.
Right now the battle sequence is non-interactive. I'm thinking of implementing a interactive battle sequence that should also work with team battles. For this to work I would need to define stats (like accuracy, evasiveness, defense, base damage, critical hit chance, etc). It should take me a max of a week to get it up and running.
Selecting 'q' from the main menu doesn't do anything.
You found a locked door...
You opened it with the key that you found
Traceback (most recent call last):
File "main.py", line 132, in <module>
menu(new_player)
File "main.py", line 108, in menu
choices[choice](player)
File "/mnt/c/Users/bran/dungeon-quest/actions.py", line 49, in roll_dice
find_weapon(player)
File "/mnt/c/Users/bran/dungeon-quest/actions.py", line 105, in find_weapon
weapon_list += weapon_type.keys()
AttributeError: 'str' object has no attribute 'keys'
Listing the player's available weapons in the set_current_weapon method in Player.py doesn't include a weapon that was added to the players inventory a turn or so before.
For example, I found a rifle and once it brought me back to the main menu I went to change my weapon but under Available Weapons it only showed the dagger, yet if I list my inventory it will show that I also have a rifle. Also if I type rifle it will tell me that my current weapon has been changed to the rifle, which is true.
During the battle it gets pretty repetitive typing the monster name every time, especially the longer the battle gets. I see why you did this, but currently it's kind of useless if there is only monster attacking at a time, so if the game detects only one monster it should know that's the monster that you want to attack.
After I merged in your pull requests, it now throws an error at line 97 in actions.py and I can't figure why. Here's the chunk of code
def visit_shop(Player):
clearscreen()
print ("\nWhat would you like to purchase?\n"
"You currently have %d gold coins.\n"
"\nP) Health Potions\n""W) Weapons\n"
"N) Nothing/Leave Store", %(Player.gold))
Here's the error:
[bran@archvm]: ~/dungeon-quest>$ python2 main.py
Traceback (most recent call last):
File "main.py", line 5, in <module>
import actions
File "/home/bran/dungeon-quest/actions.py", line 97
"N) Nothing/Leave Store", %(Player.gold))
^
SyntaxError: invalid syntax
You found a locked door...
You opened it with the key that you found
Traceback (most recent call last):
File "main.py", line 132, in <module>
menu(new_player)
File "main.py", line 108, in menu
choices[choice](player)
File "/home/bran/dungeon-quest/actions.py", line 49, in roll_dice
find_weapon(player)
File "/home/bran/dungeon-quest/actions.py", line 104, in find_weapon
for weapon_type in weapons:
NameError: global name 'weapons' is not defined
Only make shop available every X amount of turns, currently it's too easy since you can access it anytime.
Brandon
hp: 167/200
sp: 10/10
mp: 10/10
Level: 1
Gold: 64
Brandon
Brandon
demon
Press Enter To Go Back
Who is your target?
While I have made it simple to add new equipment, items, or skills, it can be cumbersome because of all the typing. I'm thinking of making a small script that adds equipment, item, and skill definitions without all the hassle.
You stumbled upon a dead body, you look through it's backpack....
Traceback (most recent call last):
File "main.py", line 132, in <module>
menu(new_player)
File "main.py", line 108, in menu
choices[choice](player)
File "/home/bran/dungeon-quest/actions.py", line 62, in roll_dice
find_potions(player)
File "/home/bran/dungeon-quest/actions.py", line 118, in find_potions
% player.inventory["potions"])
KeyError: 'potions'
Have the load_game method load the player object from the savegame.pkl file
Have to look into both, Zork-style would probably make it less repetitive.
Rewrite main menu so that it supports hiding multiple things because currently it only supports hiding the debug menu, which just re-displays the menu with an additional line. I'd like to be able to conditionally hide visit shop, change weapon, use potion and debug menu.
Currently it does nothing.
If you purchase a weapon, it subtracts the gold amount but doesn't add it to the player's inventory.
Use already implemented (or brand new!) XP system to allow the player to increase levels, which will possibly do the following:
Implement Kivy to make the game more visually appealing.
Your latest commit (40f7412) introduced a new bug that silently quits the game now after one turn.
You stepped on a booby trap!
**Press any button**
[bran@arch-vm]: ~/dungeon-quest>$
I went to buy a rifle and typed 1 and it crashed.
Rifle
--------------
Defense: -5
Strength: 15
Speed: -5
Hands Needed: 2
Cost: 50
Pres Enter To Go Back
How many do you want to buy? 1
Traceback (most recent call last):
File "main.py", line 132, in <module>
menu(new_player)
File "main.py", line 108, in menu
choices[choice](player)
File "/home/bran/dungeon-quest/actions.py", line 152, in visit_shop
visit_shop_section(area, areas[area], player)
File "/home/bran/dungeon-quest/actions.py", line 176, in visit_shop_section
visit_shop(player)
File "/home/bran/dungeon-quest/actions.py", line 152, in visit_shop
visit_shop_section(area, areas[area], player)
File "/home/bran/dungeon-quest/actions.py", line 176, in visit_shop_section
visit_shop(player)
File "/home/bran/dungeon-quest/actions.py", line 152, in visit_shop
visit_shop_section(area, areas[area], player)
File "/home/bran/dungeon-quest/actions.py", line 176, in visit_shop_section
visit_shop(player)
File "/home/bran/dungeon-quest/actions.py", line 152, in visit_shop
visit_shop_section(area, areas[area], player)
File "/home/bran/dungeon-quest/actions.py", line 181, in visit_shop_section
area, player)
File "/home/bran/dungeon-quest/actions.py", line 240, in checkout_item
visit_shop_section(section, section_dict, player)
File "/home/bran/dungeon-quest/actions.py", line 181, in visit_shop_section
area, player)
File "/home/bran/dungeon-quest/actions.py", line 210, in checkout_item
section_dict, player, True)
File "/home/bran/dungeon-quest/actions.py", line 224, in checkout_item
if amount and player.gold_handle(cost*amount):
File "/home/bran/dungeon-quest/player.py", line 360, in gold_handle
self.stat_modifier({"gold", -cost})
File "/home/bran/dungeon-quest/character.py", line 117, in stat_modifier
mod = stat_mod[stat]
TypeError: 'set' object has no attribute '__getitem__'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.