Code: Alles auswählen
import random, time
def Ausgabe_einfach(ausgabe, wartezeit):
print ausgabe + "\n"
time.sleep(wartezeit)
Stufe = 1
Erfahrung = 0
Erfahrung_b = 100
Lernpunkte = 1
Gold = 30
Intelligenz = 1
Geisteskraft = 10
Konzentration = 1
while True:
if Erfahrung >= Erfahrung_b:
pass
print "[1] Charackter"
print "[2] Attribute"
print "[3] Rechnen"
Eingabe = raw_input("Zahl eingeben: ")
print
if Eingabe == "1":
print "Stufe : " + str(Stufe)
print "Erfahrung : " + str(Erfahrung) + "/" + str(Erfahrung_b)
print "____________________"
print "Intelligenz : " + str(Intelligenz)
print "Geisteskraft : " + str(Geisteskraft)
print "Konzentration : " + str(Konzentration)
print
time.sleep(4)
elif Eingabe == "2":
while Eingabe != "z" or Eingabe != "Z":
print "Lernpunkte: " + str(Lernpunkte) + " Gold: " + str(Gold)
print "[1] Intelligenz: " + str(Intelligenz) + " Verbessern: 1 LP oder " + str(Intelligenz * 30) + " Gold"
print "[2] Geisteskraft: " + str(Geisteskraft) + " Verbessern: 1 LP oder " + str((Geisteskraft - 9) * 30) + " Gold"
print "[3] Konzentration: " + str(Konzentration) + " Verbessern: 1 LP oder " + str(Konzentration * 30) + " Gold"
Eingabe = raw_input("Zahl eingeben (z = Zurueck): ")
print
if Eingabe == "1" and Lernpunkte >= 1:
Ausgabe_einfach("Intelligenz erhoeht! (- 1 LP)", 1.2)
Lernpunkte -= 1
Intelligenz += 1
elif Eingabe == "1" and Lernpunkte == 0 and Gold >= Intelligenz * 30 and Intelligenz != 4:
Ausgabe_einfach("Intelligenz_erhoeht! (- " + str(Intelligenz * 30) + " Gold)", 1.2)
Gold -= Intelligenz * 30
Intelligenz += 1
elif Eingabe == "1" and Lernpunkte == 0 and Gold < Intelligenz * 30:
Ausgabe_einfach("Du hast keinen Lernpunkt und nicht genug Gold!", 1.4)
elif Eingabe == "1" and Intelligenz == 4: Ausgabe_einfach("Noch intelligenter kannst du nicht sein!", 1.4)
elif Eingabe == "2" and Lernpunkte >= 1:
Ausgabe_einfach("Geisteskraft erhoeht! (- 1 LP)", 1.2)
Lernpunkte -= 1
Geisteskraft += 1
elif Eingabe == "2" and Lernpunkte == 0 and Gold >= (Geisteskraft - 9) * 30:
Ausgabe_einfach("Geisteskraft erhoeht! (- " + str((Geisteskraft - 9) * 30) + " Gold)", 1.2)
Gold -= (Geisteskraft - 9) * 30
Geisteskraft += 1
elif Eingabe == "2" and Lernpunkte == 0 and Gold < (Geisteskraft - 9) * 30:
Ausgabe_einfach("Du hast keinen Lernpunkt und nicht genug Gold!", 1.4)
elif Eingabe == "3" and Lernpunkte >= 1:
Ausgabe_einfach("Konzentration erhoeht! (- 1 LP)", 1.2)
Lernpunkte -= 1
Konzentration += 1
elif Eingabe == "3" and Lernpunkte == 0 and Gold >= Konzentration * 30:
Ausgabe_einfach("Konzentration erhoeht!(- " + str(Konzentration * 30) + " Gold)", 1.4)
Gold -= Konzentration * 30
Konzentration += 1
elif Eingabe == "3" and Lernpunkte == 0 and Gold < Konzentration * 30:
Ausgabe_einfach("Du hast keinen Lernpunkt und nicht genug Gold!", 1.2)
elif Eingabe == "3":
pass
else: print "Eingabe ungueltig"