<gh_stars>0
'''Create a game with races and some classes of an ordinary fantasy medieval rpg where: 

1. You choose a race, a class and start 1v1 battles against some monsters, gaining points 
for each monster defeated. Each race and class will have some unique traits and skills.

2. The battle system will use some dices (like a Tabletop RPG) that will influence on the 
results of the battle. There will be three main options to choose to act: Attack (with at 
least 2 different attacks by class), Defend (where the dice results are used as shields to 
reduce the enemy attack), Evade (where if your dice results are greater than the enemy, you 
nullify the enemy damage else you take the entire damage, and use some item).

3. When your character dies you will receive your points acumulated for each enemy
defeated.'''

from tkinter import *
from tkinter import ttk
import os
from RPG_module.classes import *
from RPG_module.functions import *

dir = os.path.dirname(__file__)

game = Tk()
game.title('RPG Horde Game')
game.geometry('700x400')

screen_fr = Frame(game, borderwidth=1, relief='flat', background='lightblue')
screen_fr.place(x=0, y=0, width=1280, height=660)

img = PhotoImage(file=dir+r'\Images\rpg_screen.gif')
lb_img = Label(screen_fr, image=img, borderwidth=0).pack()

start_fr = Frame(lb_img, borderwidth=1, relief='raised', background='black', width=400, height=400)
start_fr.pack(pady=60, ipady=20)

start_title = Label(start_fr, text='RPG Horde Game', font=('Comic Sans MS', 15), foreground='white', background='darkred', width=30)
start_title.grid(columnspan=2, row=0, sticky='n')

Label(start_fr, text='Character Name', bg='darkred', fg='white', font=('Comic Sans MS', 12)).grid(columnspan=2, row=1, pady=20)

c_name = Entry(start_fr, width=23)
c_name.grid(columnspan=2, row=2)

Label(start_fr, text='Race', font=('Comic Sans MS', 12), background='darkred', foreground='white').grid(columnspan=2, row=3, pady=20)

races = ['Human', 'Elf', 'Dwarf', 'Half Orc']
start_race = ttk.Combobox(start_fr, values=races)
start_race.set(races[0])
start_race.grid(columnspan=2, row=4)

Label(start_fr, text='Class', font=('Comic Sans MS', 12), background='darkred', foreground='white').grid(columnspan=2, row=5, pady=20)

classes = ['Knight', 'Mage', 'Archer', 'Swordsman', 'Barbarian', 'Rogue']
start_class = ttk.Combobox(start_fr, values=classes)
start_class.set(classes[0])
start_class.grid(columnspan=2, row=6)


Label(start_fr, text='Battle Scene', font=('Comic Sans MS', 12), bg='darkred', fg='white').grid(columnspan=2, row=7, pady=20)

scenes = ['Scene 1', 'Scene 2', 'Scene 3']
scene = ttk.Combobox(start_fr, values=scenes)
scene.set(value=scenes[0])
scene.grid(columnspan=2, row=8)

btn_play = Button(start_fr, text='Play Game', font=('Comic Sans MS', 12), background='darkred', foreground='white', command=play)
btn_play.grid(column=0, row=9, pady=25, sticky='e', padx=15)

btn_exit = Button(start_fr, text='Exit Game', font=('Comic Sans MS', 12), background='darkred', foreground='white', command=game.quit)
btn_exit.grid(column=1, row=9, pady=25, sticky='w', padx=15)

game.mainloop()
