コード例 #1
0
def contineu():
	os.system('clear')
	roll_stats()
	roll_stats_print()
	continue_submenu = Menu(menus.fourth_menu)
	return_menu_name.get_name(menus.fourth_menu)
	continue_submenu.menu_summary()
コード例 #2
0
def resume():
	os.system('clear')
	
	new_game_submenu = Menu(return_menu_name.return_name())
	prev_menu_name = new_game_submenu.get_menu_name()
	prev_menu = Menu(prev_menu_name)
	prev_menu.menu_summary()
コード例 #3
0
def save():
	os.system('clear')
	print('\n')
	for files in list_json():
		print(' '*5 + files)
	save_submenu = Menu(menus.eighth_menu)
	save_submenu.menu_summary()
コード例 #4
0
def potion_selector():
	os.system('clear')

	if 'Potion of' in player1.inventory[2]:
		print('\nYou chose: ' + player1.inventory[2])

	potion_selector_submenu = Menu(menus.sixth_menu)
	return_menu_name.get_name(menus.sixth_menu)
	potion_selector_submenu.menu_summary()
コード例 #5
0
def strike():
	os.system('clear')
	global player_hit

	while True:
		player1_dexter = menus.random_cube_double() + player1.dexterity
		monster_dexter = menus.random_cube_double() + monster.dexterity

		if player1_dexter > monster_dexter:
			print('\nYou hit the monster')
			player_hit = True
			monster.health -= 2
			break
			
		elif player1_dexter < monster_dexter:
			print('\nThe monster hit you')
			player_hit = False
			player1.health -= 2
			break

	after_fight = Menu(menus.strike_submenu)
	after_fight.menu_summary()
コード例 #6
0
def begin(character):
	os.system('clear')
	global player_luck
	global player1

	if player_luck is None:
		pass
	elif player_luck is True:
		print('You tried your luck and succeeded')
	elif player_luck is False:
		print('You tried your luck and failed')
	
	player_luck = None

	if player_hit is None:
		print('\nTest your Sword in a test fight!\n')
	
	pre_fight_print(character, monster)
	player1 = character
	begin_fight = Menu(menus.begin_menu)
	return_menu_name.get_name(menus.begin_menu)
	begin_fight.menu_summary()
コード例 #7
0
import os
from menu import Menu
from menus import *

os.system("clear")
main_menu = Menu(first_menu)
main_menu.menu_summary()
コード例 #8
0
def character():
	os.system('clear')
	print(player1.character_table())
	begin_game_menu = Menu(menus.seventh_menu)
	return_menu_name.get_name(menus.seventh_menu)
	begin_game_menu.menu_summary()
コード例 #9
0
def quit():
	os.system('clear')
	quit_submenu = Menu(menus.third_menu)
	quit_submenu.menu_summary()
コード例 #10
0
def new_game():
	os.system('clear')
	username_print(username_input())
	new_game_submenu = Menu(menus.second_menu)
	return_menu_name.get_name(menus.second_menu)
	new_game_submenu.menu_summary()
コード例 #11
0
def save_character():
	filename = open('save.json', 'w')
	json.dump(player1.create_dictionary(), filename)
	filename.close()
	return_menu = Menu(return_menu_name.return_name())
	return_menu.menu_summary()