Example #1
0
 def create_team(self, nb, red=True):
     if red:
         team = self._team_red
         color = 'Rouge'
     else:
         team = self._team_blue
         color = 'Bleu'
     for i in range(nb):
         choice_is_made = False
         while choice_is_made == False:
             choice = input(f'Quel sera ton personnage n°{i+1}?\n'
                            f'1: Magicien\n'
                            f'2: Guerrier\n'
                            f'3: Archer\n')
             if choice == '1':
                 team.append((color, characters.Wizard(f'magicien {i+1}')))
                 print('tu as choisi un Magicien')
                 choice_is_made = True
             elif choice == '2':
                 team.append((color, characters.Warrior(f'guerrier {i+1}')))
                 print('tu as choisi un Guerrier')
                 choice_is_made = True
             elif choice == '3':
                 team.append((color, characters.Archer(f'archer {i+1}')))
                 print('tu as choisi un Archer')
                 choice_is_made = True
             else:
                 print('choix non valide')
Example #2
0
def Setup():
	print("")
	inputName = input("Enter Your Name Adventurer: ")
	print("")
	print("Choose your Class:")
	print("w | Warrior")
	print("")
	classChoice = input(">")
	if classChoice == "w":
		player = characters.Warrior("plunger", "{}".format(inputName), 100, 100, 0, 100, 1)
	print("")

	worldType = input("Auto Generate [a], or Manual World Generation [m]?")
	print("")
	if worldType == "a":
		generatedWorld = world.worldGen("auto", random.randint(1,99),random.randint(1,99),random.randint(1,99),random.randint(1,99),random.randint(1,99),random.randint(1,99))
		print("")
	if worldType == "m":
		nLevels = input("Enter number of Levels: ")
		nEmpty = input("Enter number of Empty Levels :")
		nBosses = input("Enter number of Bosses: ")
		nChests = input("Enter number of Chests: ")
		nMonsters = input("Enter number of Monsters: ")
		nHiddenItems = input("Enter number of Hidden Items: ")
		
		generatedWorld = world.worldGen("manual", nLevels, nEmpty, nBosses, nChests, nMonsters, nHiddenItems)
		print("")

	introStory(player)
def creation_personnage():
    classe = input(
        "Bienvenu, choisissez votre classe :\n (M)agicien\n (A)rcher\n (G)uerrier\n"
    )
    nom = input("Quel sera votre nom ? ")
    if classe.lower() == "m":
        player = chars.Wizard(nom)
    elif classe.lower() == "a":
        player = chars.Archer(nom)
    else:
        player = chars.Warrior(nom)
    return player
Example #4
0
def introStory():
	inputName = input("Enter Your Name Adventurer: ")
	player = characters.Warrior("plunger", "{}".format(inputName), 100, 100, 0, 100)
	#print(player.weapon.damage)
	print("")
	inputSize = input("Choose your map size:")
	mapSize = inputSize
	print("")

	print("You begin your adventure {}, \nupon waking amidst the showing rain of the darkest forest...".format(inputName))
	print("")
	input("Press Enter to Get up from your long sleep...")
	print("")

	BattleMode(player)
Example #5
0
def main():

    merlin = char.ElfeWizard("Merlin")
    attack_result = merlin.attack()
    weapon = attack_result["weapon"]
    dmg = attack_result["dmg"]

    stark = char.DwarfWizard("Stark")
    stark.defense(weapon, dmg)
    attack_result = stark.attack()
    weapon = attack_result["weapon"]
    dmg = attack_result["dmg"]

    merlin.defense(weapon, dmg)


    eve = char.Archer("Eve")
    attack_result = eve.attack()
    weapon = attack_result["weapon"]
    dmg = attack_result["dmg"]

    garen = char.Warrior("Garen")
    garen.defense(weapon, dmg)
Example #6
0
lect = open(filename)
fitxer = csv.reader(lect)
inventory=[]

badans = True

theEnemy = choseEnemy()

print ("Hello Adventurer, What is your Name?")
crname = input("")

texts.intro(crname)

crclass = texts.chrType(charactDict)

print ("Great!")
  
'''atack, defence, base hp and level'''

if crclass == "warrior" :
  crstats = characters.Warrior(crname)
elif crclass == "mage":
  crstats = characters.Mage(crname)
elif crclass == 'rogue':
  crstats = characters.Rogue(crname)

print('Wellcome {} the {}'.format(crname, crclass.capitalize()))
crstats.printStats()

texts.chosePath()
Example #7
0
    # add formatter to file_handler
    file_handler.setFormatter(formatter)
    # add file_handler to logger
    logger.addHandler(file_handler)


if __name__ == '__main__':
    logger_sets()
    standard_equipement = [
        equipment.Helm(),
        equipment.Armor(),
        equipment.Shoes(),
        equipment.Sword(),
        equipment.Shield()
    ]
    warrior1 = characters.Warrior('WARRIOR 1')
    warrior1.select_equipement(standard_equipement)
    warrior2 = characters.Warrior('WARRIOR 2')
    warrior2.select_equipement(standard_equipement)
    knight1 = characters.Knight('KNIGHT 1')
    knight1.select_equipement(standard_equipement)
    knight2 = characters.Knight('KNIGHT 2')
    knight2.select_equipement(standard_equipement)
    thief1 = characters.Thief('THIEF 1')
    thief1.select_equipement(standard_equipement)
    thief2 = characters.Thief('THIEF 2')
    thief2.select_equipement(standard_equipement)
    warriorVSwarrior = [warrior1, warrior2]
    warriorVSknight = [warrior1, knight1]
    warriorVSthief = [warrior1, thief1]
    knightVSknight = [knight1, knight2]