import random
import time
skillnumber = []
strengthnumber = []
character1 = raw_input("What would you like to call your character?")
dicefour = [1,2,3,4]
dicesix = [1,2,3,4,5,6]
dicetwelve = [1,2,3,4,5,6,7,8,9,10,11,12]
skill = 10
strength = 10
dicefourscore = random.choice(dicefour)
dicetwelvescore = random.choice(dicetwelve)
attribute = int(input("Please choose an attribute, 1:Strength, 2:Skill"))
if attribute == 1:
totalscore = dicetwelvescore // dicefourscore
strength1 = totalscore + strength
print ("%s's strength level is now %s") % (character1, strength1)
strengthnumber.append(strength1)
print ("Let's determine the character's skill level")
time.sleep(1)
dicefourscore = random.choice(dicefour)
dicetwelvescore = random.choice(dicetwelve)
totalscore = dicetwelvescore // dicefourscore
skill1 = skill + totalscore
print ("%s's skill level is now %s") % (character1, skill1)
skillnumber.append(skill1)
elif attribute == 2:
totalscore = dicetwelvescore % dicefourscore
skill1 = skill + totalscore
print ("%s's skill level is now %s") % (character1, skill1)
skillnumber.append(skill)
print ("Let's determine the character's strength level")
time.sleep(2)
dicefourscore = random.choice(dicefour)
dicetwelvescore = random.choice(dicetwelve)
totalscore = dicetwelvescore // dicefourscore
strength1 = strength + totalscore
print ("%s's strength level is now %s") % (character1, strength1)
strengthnumber.append(strength)
elif attribute != 1 and attribute != 2:
print ("Could you either choose one of the attributes skill or strength")
character2 = raw_input("What would you like to call your character?")
dicefour = [1,2,3,4]
dicetwelve = [1,2,3,4,5,6,7,8,9,10,11,12]
skill = 10
strength = 10
dicefourscore = random.choice(dicefour)
dicetwelvescore = random.choice(dicetwelve)
attribute = int(input("Please choose an attribute, 1:Strength, 2:Skill"))
if attribute == 1:
totalscore = dicetwelvescore // dicefourscore
strength2 = totalscore + strength
print ("%s's strength level is now %s") % (character2, strength2)
strengthnumber.append(strength2)
print ("Let's determine the character's skill level")
time.sleep(1)
dicefourscore = random.choice(dicefour)
dicetwelvescore = random.choice(dicetwelve)
totalscore = dicetwelvescore // dicefourscore
skill2 = skill + totalscore
print ("%s's skill level is now %s") % (character2, skill2)
skillnumber.append(skill2)
elif attribute == 2:
totalscore = dicetwelvescore % dicefourscore
skill2 = skill + totalscore
print ("%s's skill level is now %s") % (character2, skill2)
skillnumber.append(skill2)
print ("Let's determine the character's strength level")
time.sleep(2)
dicefourscore = random.choice(dicefour)
dicetwelvescore = random.choice(dicetwelve)
totalscore = dicetwelvescore // dicefourscore
strength2 = strength + totalscore
print ("%s's strength level is now %s") % (character2, strength2)
strengthnumber.append(strength2)
elif attribute != 1 and 2:
print ("Could you either choose one of the attributes skill or strength")
if strength1 < strength2:
difference = strength2-strength1
strengthmodifier = difference // 5
if strengthmodifier == 0:
strengthmodifier = strengthmodifier + 1
print (" the strength modifier is %s") % (strengthmodifier)
if strength1 > strength2:
difference = strength1-strength2
strengthmodifier = difference // 5
if strengthmodifier == 0:
strengthmodifier = strengthmodifier + 1
print (" the strength modifier is %s") % (strengthmodifier)
if strength1 == strength2:
print (" The strength modifier is 1")
if skill1 == skill2:
print (" the skill modifier is 1")
if skill1 < skill2:
difference = skill2-skill1
skillmodifier = difference // 5
if skillmodifier == 0:
skillmodifier = skillmodifier+1
print (" the skill modifier is %s") % (skillmodifier)
if skill1 > skill2:
difference = skill1 - skill2
skillmodifier = difference // 5
if skillmodifier == 0:
skillmodifier = skillmodifier + 1
print (" the skill modifier is %s") % (skillmodifier)
character1dice = random.choice(dicesix)
print character1dice
character2dice = random.choice(dicesix)
print character2dice
while 1 == 1:
if skill1 < 0:
skill1 = 0
if skill2 < 0:
skill2 = 0
if strength1 <= 0:
print ("%s is dead") %(character1)
break
if strength2 <= 0:
print ("%s is dead") %(character2)
break
while skill1>=0 and skill2>=0 and strength1>0 and strength2>0:
if character1dice > character2dice:
strength1 = strength1 + strengthmodifier
skill1 = skill1 + skillmodifier
strength2 = strength2 - strengthmodifier
skill2 = skill2 - skillmodifier
print ("%s's strength level is %s") %(character1,strength1)
print ("%s's skill level is %s") %(character1,skill1)
print ("%s's strength level is %s") %(character2,strength2)
print ("%s's skill level is %s") %(character2,skill2)
if character2dice > character1dice:
strength2 = strength2 + strengthmodifier
skill2 = skill2 + skillmodifier
strength1 = strength1 - strengthmodifier
skill1 = skill1 - skillmodifier
print ("%s's strength level is %s") %(character1,strength1)
print ("%s's skill level is %s") %(character1,skill1)
print ("%s's strength level is %s") %(character2,strength2)
print ("%s's skill level is %s") %(character2,skill2)
if character1dice == character2dice:
print ("%s's strength level is %s") %(character1,strength1)
print ("%s's skill level is %s") %(character1,skill1)
print ("%s's strength level is %s") %(character2,strength2)
print ("%s's skill level is %s") %(character2,skill2)