Example #1
0
    def __init__(self, game_map):

        self.game_map = game_map
        self.boss_defeated = False
        # Position is taken as an array where position [0][0] = y and [1][0] = x
        player_pos = np.where(self.game_map.map_data == 'P')
        player_name = input("Please enter Player Name: ")
        print(
            dedent("""
        Choose character from list:
        [1]. 'Paladin'
        Health: 100, Strength: 20, Defence: 15, Agility: 5
        [2]. 'Ranger'
        Health: 70, Strength: 15, Defence: 10, Agility: 15
        [3]. 'Thief'
        Health: 60, Strength: 10, Defence: 10, Agility: 20
        [4]. 'Sorcerer'
        Health: 75, Strength: 15, Defence: 10, Agility: 10
        """))

        chosen = False
        while not chosen:
            chosen = True
            player_character = input("Please enter Player Character: ")
            self.player1 = None
            if player_character.lower(
            ) == 'paladin' or player_character == '1':
                self.player1 = p.Paladin(player_pos[1][0], player_pos[0][0],
                                         player_name, self.game_map.map_data)
            elif player_character.lower(
            ) == 'ranger' or player_character == '2':
                self.player1 = p.Ranger(player_pos[1][0], player_pos[0][0],
                                        player_name, self.game_map.map_data)
            elif player_character.lower(
            ) == 'thief' or player_character == '3':
                self.player1 = p.Thief(player_pos[1][0], player_pos[0][0],
                                       player_name, self.game_map.map_data)
            elif player_character.lower(
            ) == 'sorcerer' or player_character == '4':
                self.player1 = p.Sorcerer(player_pos[1][0], player_pos[0][0],
                                          player_name, self.game_map.map_data)
            else:
                print(
                    "Choose character from list. Enter number or character type."
                )
                chosen = False
Example #2
0
import player
import troll
# sorcerer = Player(40,80,"Sorcerer","Rayo Hielo")
sorcerer = player.Sorcerer(hit_points=40, mana=80)
print(sorcerer)

knight = player.Knight(hit_points=80, mana=40)
print(knight)

paladin = player.Paladin(hit_points=60, mana=60)
print(paladin)

druida = player.Druida(hit_points=50, mana=70)
print(druida)

# Trolls

normal_troll = troll.Troll(hit_points=50, mana=290, experience=20, loot=[
    "gold coins", "hand axes", "leather boots", "leather helmets", "meat"])

print(normal_troll)
# print(normal_troll.atacar())

frost_Troll = troll.FrostTroll(hit_points=55, mana=300, experience=23, loot=[
                               "carry fish", "gold coins", "rapiers", "spears", "wooden shields"])
print(frost_Troll)
# print(frost_Troll.atacar())
Example #3
0
import player

#el metodo antiguo
sorcerer = player.Sorcerer(hit_points=40, mana=80)
print(sorcerer)

knight = player.Knight(hit_points=40, mana=80)

print(knight)
#paladin
#druid

paladin = player.Paladin(hit_points=70,
                         mana=50,
                         vocation="Paladin",
                         spell="Blessed cross")

print(paladin)

druid = player.Druid(hit_points=50,
                     mana=70,
                     vocation="Druid",
                     spell="Fire wave")
print(druid)

goblin = player.Goblin(hit_points=20, mana=10, race="Goblin")
print(goblin)
Example #4
0
#video 72
def clear_screen():
    import os
    os.system("clear")


clear_screen()

#Importa toda la libreria player.py
import player

sorcerer = player.Sorcerer(hit_points=40, mana=80)
knight = player.Knight(hit_points=433, mana=8080)
paladin = player.Paladin()
enano = player.Enano()
druid = player.Druid(hit_points=433, mana=8080)

print()
print()
print(sorcerer)
print()
print(knight)
print()
print(paladin)
print()
print(enano)
print()
print(druid)
input()
print("Fin del programa!!!!")
input()
Example #5
0
import player

Sorcerer = player.Sorcerer(vida=200, mana=5000)
caballero = player.Knight(vida=1000, mana=500)
paladin = player.Paladin(vida=500, mana=1000)
druida = player.Druida(vida=150, mana=6500)

print(Sorcerer)
print()
print(caballero)
print()
print(paladin)
print()
print(druida)
Example #6
0
import player

sorcerer = player.Sorcerer(hit_point=40, mana=80)
knight = player.Knight(hit_point=80, mana=20)
druid = player.Druid(hit_point=60, mana=50)
paladin = player.Paladin(hit_point=70, mana=50)

print(sorcerer)

print(knight)

print(druid)

print(paladin)
Example #7
0
import player
import enemy
dir(enemy)
#pjjllayer = player.Player()

#nuevo= player.Player()
druid = player.Druid(hitpoints=50, mana=80)
paladin = player.Paladin(hitpoints=80, mana=80)
knight = player.Knight(hitpoints=80, mana=60)

trolDeFuego = enemy.Fire_troll()
trolDeHIelo = enemy.Ice_troll()
trolDeTierra = enemy.Earth_troll()
trolDeAire = enemy.Air_troll()

print(knight)
print(druid)
print(paladin)

print(trolDeAire)
print(trolDeFuego)
print(trolDeHIelo)
print(trolDeTierra)