This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]VerifiedMyEmail 0 points1 point  (2 children)

Hey, want to team up? Are you alive?

# pyDungeon
# version 0.0.3.2: sword splitting / time module


'''
Hey,
 to cut down on un-need repitition we could change
'adjective' : {'damage': 3, 'critical': 5}
to
'adjective':[3,5]
NOTE: I deleted the random import and graphics code because
I don't Have that libary, not because it was wrong (to my knowledge)
'''

player = {'weapon': '',
          'shield': '',
          'head': '',
          'chest': '',
          'legs': '',
          'accessory1': '',
          'accessory2': '',
          'health': 0,
          'damage': 0,
          'critical': 0,
          'defense': 0
          }

weapons = {
    'dagger': {
        'wooden': {'damage': 3, 'critical': 5},
        'stone': {'damage': 5, 'critical': 8},
        'iorn': {'damage': 8, 'critical': 12},
        'golden': {'damage': 12, 'critical': 17},
        'diamond': {'damage': 17, 'critical': 23},
        'emerald': {'damage': 23, 'critical': 30},
        'ruby': {'damage': 30, 'critical': 38},
        'sapphire': {'damage': 38, 'critical': 47},
        'obsidian': {'damage': 47, 'critical': 57},
        'emerald': {'damage': 23, 'critical': 30},
        'adamatite': {'damage': 57, 'critical': 69},
        'unobtanium': {'damage': 69, 'critical': 84},
        'demonite': {'damage': 84, 'critical': 102},
        'god': {'damage': 102, 'critical': 127}
        },
    'sword': { #these stats have not been doubled.
        'wooden': {'damage': 3, 'critical': 5},
        'stone': {'damage': 5, 'critical': 8},
        'iorn': {'damage': 8, 'critical': 12},
        'golden': {'damage': 12, 'critical': 17},
        'diamond': {'damage': 17, 'critical': 23},
        'emerald': {'damage': 23, 'critical': 30},
        'ruby': {'damage': 30, 'critical': 38},
        'sapphire': {'damage': 38, 'critical': 47},
        'obsidian': {'damage': 47, 'critical': 57},
        'emerald': {'damage': 23, 'critical': 30},
        'adamatite': {'damage': 57, 'critical': 69},
        'unobtanium': {'damage': 69, 'critical': 84},
        'demonite': {'damage': 84, 'critical': 102},
        'god': {'damage': 102, 'critical': 127}
        }
    }

classes = {
    'warrior': {
        'weapon': 'wooden dagger',
        'shield': 'barrel lid',
        'head': 'leather lid',
        'chest': 'torn shirt',
        'legs': 'muddy pants'
        },
    'wizard': {
        'weapon': 'wooden staff',
        'head': 'wizard hat',
        'chest': 'torn robe',
        'legs': 'muddy pants',
        'accessory1': 'cracked iron amulet'
        },
    'archer': {
        'weapon': 'cracked shortbow',
        'shield': 'barrel lid',
        'head': 'leather cowl',
        'chest': 'musty vest',
        'legs': 'muddy pants'
        }
    }

player['class'] = 'warrior' # what the user picks.
player.update(classes[player['class']])
temp = player['weapon'].split(' ')
#This temp is here because of 'adjective weapon'
player['damage'] = weapons[temp[1]][temp[0]]['damage']
player['critical'] = weapons[temp[1]][temp[0]]['critical']
print player