Beispiel #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
Beispiel #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())
Beispiel #3
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)