Beispiel #1
0
def show_character_confirmation():
    clear_screen()
    print_title_fancily(None, "final check")
    print_text_fancily(
        "- Now, let's check your character again before we start our journey...")
    global player
    input('Press any key to show the avatar of the player ... \n')
    player.draw_player_avatar()
    input('Press any key to show the skill tree ... \n')
    player.draw_player_skill_tree()
    input('Press any key to show the stats of the character ... \n')
    player.show_player_stats()
    time.sleep(1)
    print_text_fancily(" - Everything seems fine! Let the journey begins!")
    input('Press any key to begin your yourney ...')
    begin_journey()
Beispiel #2
0
 def print_all_stats(self):
     print_title_fancily(None, "Character Stats")
     print()
     print_text_fancily(" Combat stats")
     for i in (self.combat_perm_stats):
         s = ("     - %-10s : %d" % (i.upper(), getattr(self, i)))
         print_text_fancily(s, 0.01, False)
     print()
     print_text_fancily(" Adventure stats")
     for i in (self.adv_perm_stats):
         s = ('     - %-10s : %d' % (i.upper(), getattr(self, i)))
         print_text_fancily(s, 0.01, False)
Beispiel #3
0
def begin_journey():
    clear_screen()
    print_title_fancily("KnowLand")
    shape_by_line = WORLD_MAP.split('\n')
    for a_line in shape_by_line:
        print(a_line)
        time.sleep(0.05)
    time.sleep(0.5)
    print_text_fancily(
        "- Welcome to KnowLand, adventurer. Where do you want to go? \n")
    print(30 * '-')
    print("   D E S T I N A T I O N ")
    print(30 * '-')
    for i in range(len(islands)):
        print(f'{(i+1):d}. Go to {islands[i]}')
    print(30 * '-')

    choice = input('Enter your choice [{}] : '.format(len(islands)))
    ### Convert string to int type ##
    choice = islands[int(choice) - 1]
    explore_island(choice)
Beispiel #4
0
def get_player_name():
    clear_screen()
    print_title_fancily(None, "name selection")
    print_text_fancily(" - Hey adventurer, what is your name? ")
    player_name = input(" + My name is [Type in your name here]: ")
    print()
    global player
    player = Player(player_name)
    print_text_fancily(" - Nice to meet you, %s! " % player_name)
    time.sleep(0.5)
    clear_screen()
    print_text_fancily(
        " - Every knight needs a shiny armor. Please accept it ...")
    player.draw_player_avatar()
    time.sleep(1)
    print_text_fancily(" __ Press any key to accept the armor __ ")
    input()
Beispiel #5
0
def player_select_skill_tree():
    global player
    clear_screen()
    print_title_fancily(None, "skill-tree")
    print_text_fancily(
        ' - Now, your journey cannot begin without some skills.')
    print_text_fancily(' - Which skill tree do you want?')
    time.sleep(1)
    skill_tree = MathTree
    skill_tree.show()
    print(30 * '-', "\n")
    print("1. Select Math Tree")
    choice = input('Enter your choice [1] : ')
    print(30 * '-')

    ### Convert string to int type ##
    choice = int(choice)
    if choice == 1:
        player.skill_tree = skill_tree
    print_text_fancily(' - Congratulation! You have a skill tree of your own!')
    time.sleep(1)
    show_character_confirmation()
Beispiel #6
0
 def show_avatar(self):
     shape_by_line = self.shape.split('\n')
     for a_line in shape_by_line:
         print_text_fancily(a_line, 0.005, False)
     return self.shape
Beispiel #7
0
 def print_adventure_stats(self):
     print_text_fancily("Showing Secondary Stat ...")
     for i in self.adv_perm_stats:
         s = (' - %s = %d' % (i, getattr(self, i)))
         print_text_fancily(s, 0.02, False)
Beispiel #8
0
 def print_combat_stats(self):
     print_text_fancily("Showing Combat Stats ...")
     for i in self.combat_perm_stats:
         s = (' - %s = %d' % (i, getattr(self, i)))
         print_text_fancily(s, 0.02, False)