I'm trying to make an RPG game which is only consisted of texts. But, it doesn't work!
thanks. ------------------------------------------------------------------------------------------------------------------------------------------- import random print \ """Warrior - damage: 10~60 Archer - damage: 0~100 HP of Player: 100 HP of the monster: 300""" wp = raw_input("\n\nSelect between warrior and Archer ") mob = 300 hit = 0 hp = 100 run = "" while True: while (mob > 0): hit += 1 mob = mob - dmg hp = hp - atk if (hp < 0): print "\nYour", wp, "has died by the monster(", mob, "hp)" break elif wp == "warrior": dmg = random.randrange(50) + 10 atk = random.randrange(10) elif wp == "archer": dmg = random.randrange(100) atk - random.randrage(5) print "\n", hit, "hits" print "HP of", wp,":", hp,"/100" print "HP of the monster:", mob,"/300" print "\nYou defeated the monster by", hit,"hits,", dmg,"damage" run = raw_input("\n\nrun or exit ") if run == "exit": break elif run == "run": continue else: raw_input("\nError") break ------------------------------------------------------------------------------------------------------------------------------------------- _________________________________________________________________ Don't just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/ _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor