Created
          February 10, 2015 02:31 
        
      - 
      
- 
        Save CptKirklnd/cf0f7b5169fdf25623df to your computer and use it in GitHub Desktop. 
    D&D Stat Roller
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | from random import randint | |
| statList = [] #the stored list of computed ability scores | |
| statConpList = [] #the stored list of the conponents that went into the score | |
| for y in range (0,6): | |
| stat = [] | |
| for x in range(0,4): | |
| stat.append(randint(1,6)) | |
| #print stat TESTING PURPOSES | |
| statConpList.append(stat) | |
| smallest = stat[0] | |
| for z in range (1,4): | |
| if smallest > stat[z]: | |
| smallest = stat[z] | |
| stat[stat.index(smallest)] = 0 | |
| total = 0 | |
| for h in range (0,4): | |
| total += stat[h] | |
| #print stat TESTING PURPOSES | |
| statList.append(total) | |
| print statList | |
| input("Press Enter to continue...") | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment