def lvl1valinta(): print "|--------------------------------------------------------------------|" empty(1) print "| Next we'll pick your 2 lvl 1 spells |" print "| (input both numbers separately) |" empty(1) for i in range(1, len(numlvl1) + 1, 1): print "|", menu.space(25 - len(str(i))), str(i) + ":", wizlvl1[ i - 1], menu.space(12 + max(pituuslvl1) - pituuslvl1[i - 1]), "|" valittu1 = menu.retry(menu.valinta, 1, len(wizlvl1)) valittu2 = menu.retry(menu.valinta, 1, len(wizlvl1)) print "| So do you want to pick: |" empty(1) print "| ", wizlvl1[ valittu1 - 1], "and", menu.space(8 + max(pituuslvl1) - (pituuslvl1[valittu1 - 1])), "|" print "| ", wizlvl1[ valittu2 - 1], "?", menu.space(10 + max(pituuslvl1) - (pituuslvl1[valittu2 - 1])), "|" empty(1) yesno = menu.YN() valitut = [valittu1, valittu2] if yesno == 1: empty(1) return valitut elif yesno == 2: empty(1) valitut = lvl1valinta() return valitut
def cantripvalinta(): print "|--------------------------------------------------------------------|" empty(1) print "| Spellcasting |" empty(1) print "|--------------------------------------------------------------------|" empty(1) print "| As you would imagine, spells are a major part of being a sorcerer |" print "| As a sorcerer you'll choose 2 lvl 1 spells to learn |" print "| alongside 4 so called cantrips that can be used anytime anywhere |" empty(1) print "|--------------------------------------------------------------------|" empty(1) print "| First let's pick your 4 cantrips |" print "| (input all 4 numbers separately) |" empty(1) for i in range(1, len(numlvl0) + 1, 1): print "|", menu.space(25 - len(str(i))), str(i) + ":", wizlvl0[ i - 1], menu.space(27 + max(pituuslvl0) - pituuslvl0[i - 1]), "|" valittu1 = menu.retry(menu.valinta, 1, len(wizlvl0)) valittu2 = menu.retry(menu.valinta, 1, len(wizlvl0)) valittu3 = menu.retry(menu.valinta, 1, len(wizlvl0)) valittu4 = menu.retry(menu.valinta, 1, len(wizlvl0)) print "| So do you want to pick: |" empty(1) print "| ", wizlvl0[ valittu1 - 1], " ", menu.space(25 + max(pituuslvl0) - (pituuslvl0[valittu1 - 1])), "|" print "| ", wizlvl0[ valittu2 - 1], " ", menu.space(25 + max(pituuslvl0) - (pituuslvl0[valittu2 - 1])), "|" print "| ", wizlvl0[ valittu3 - 1], "and", menu.space(23 + max(pituuslvl0) - (pituuslvl0[valittu3 - 1])), "|" print "| ", wizlvl0[ valittu4 - 1], "?", menu.space(25 + max(pituuslvl0) - (pituuslvl0[valittu4 - 1])), "|" empty(1) yesno = menu.YN() valitut = [valittu1, valittu2, valittu3, valittu4] if yesno == 1: empty(1) return valitut elif yesno == 2: empty(1) valitut = cantripvalinta() return valitut
def cantripvalinta(): print "|--------------------------------------------------------------------|" empty(1) print "| Spellcasting |" empty(1) print "|--------------------------------------------------------------------|" empty(1) print "| As you would imagine, spells are a major part of being a cleric |" print "| As a cleric, you can cast any spells from the cleric spell list |" print "| alongside 3 so called cantrips that can be used anytime anywhere |" empty(1) print "|--------------------------------------------------------------------|" empty(1) print "| First let's pick your 3 cantrips |" print "| (input both numbers separately) |" empty(1) for i in range(1, len(numlvl0) + 1, 1): print "|", menu.space(25 - len(str(i))), str(i) + ":", wizlvl0[ i - 1], menu.space(26 + max(pituuslvl0) - pituuslvl0[i - 1]), "|" valittu1 = menu.retry(menu.valinta, 1, len(wizlvl0)) valittu2 = menu.retry(menu.valinta, 1, len(wizlvl0)) valittu3 = menu.retry(menu.valinta, 1, len(wizlvl0)) print "| So do you want to pick: |" empty(1) print "| ", wizlvl0[ valittu1 - 1], " ", menu.space(24 + max(pituuslvl0) - (pituuslvl0[valittu1 - 1])), "|" print "| ", wizlvl0[ valittu2 - 1], "and", menu.space(22 + max(pituuslvl0) - (pituuslvl0[valittu2 - 1])), "|" print "| ", wizlvl0[ valittu3 - 1], "?", menu.space(24 + max(pituuslvl0) - (pituuslvl0[valittu3 - 1])), "|" empty(1) yesno = menu.YN() valitut = [valittu1, valittu2, valittu3] if yesno == 1: empty(1) return valitut elif yesno == 2: empty(1) valitut = cantripvalinta() return valitut
import time import menu menu.mainmenu() valinta = menu.retry(menu.valinta(),1,4) while valinta in range (1,5,1): if valinta == 4: menu.end() quit() if valinta == 3: menu.credits() valinta=menu.valinta() if valinta == 2: menu.info() valinta=menu.valinta() if valinta == 1: menu.menu1() valinta = 0 noppavairandom = menu.retry(menu.valinta(),1,2) if noppavairandom == 1: allstats=menu.menu1_1() if noppavairandom == 2: allstats=menu.menu1_2() abilityscore = menu.menu2(allstats)