home *** CD-ROM | disk | FTP | other *** search
/ Freelog 32 / Freelog032.iso / Prog / tirage_perso.pyc (.txt) < prev   
Python Compiled Bytecode  |  2002-03-08  |  2KB  |  39 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.1)
  3.  
  4. from whrandom import *
  5.  
  6. def d10():
  7.     resultd10 = int(random() * 10) + 1
  8.     return resultd10
  9.  
  10.  
  11. def d6():
  12.     resultd6 = int(random() * 6) + 1
  13.     return resultd6
  14.  
  15. print '\n creation du personnage \n'
  16. strengh = d6() + d6() + d6()
  17. print 'force de ', strengh
  18. points_vie = d6() + d6() + d6()
  19. print 'points de vie', points_vie
  20. wisdom = d6() + d6() + d6()
  21. print 'sagesse ', wisdom
  22. dexter = d6() + d6() + d6()
  23. print 'dext\xe9rit\xe9 ', dexter
  24. intell = d6() + d6() + d6()
  25. print 'intelligence ', intell
  26. if strengh > 12:
  27.     print ' Vous devriez jouer un guerrier'
  28.  
  29. print '\n alignement lawfull good \n '
  30. sentiment = d10()
  31. print 'sentiment n\xb0 ', sentiment
  32. toto = open('c:\\Art_Freelog\\Perso AD&D\\sentim.txt', 'r')
  33. for i in range(1, sentiment):
  34.     gazpacho = toto.readline()
  35.  
  36. vie_sent = toto.readline()
  37. print vie_sent
  38. toto.close()
  39.