-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmenu_hire.py
75 lines (59 loc) · 2.79 KB
/
menu_hire.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
from globals import *
#This document contains screens for:
# hireAndRecruit
# hireThieves
# hireWarriors
def HireMenu(screen, userStronghold):
global currentPage
#This is a menu for hiring and recruiting troops
#----------------------------------------------------------------------------------
if screen == "hireAndRecruit":
os.system("clear")
header(userStronghold.name)
print('\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n')
print(" Avalible Commands:")
print(' -------------------------------------------------------')
print(' {1}: Return to Stronghold')
print(' {2}: Hire Warriors')
print(' {3}: Hire Thieves')
print(' --------------------------------------------------------')
print('')
command = input(" Enter your command: ")
if command == '1':
screen = 'stronghold'
if command == '2':
screen = 'hireWarriors'
if command == '3':
screen = 'hireThieves'
#This is the screen for purchacing thieves
#----------------------------------------------------------------------------------
if screen == "hireThieves":
os.system("clear")
header(userStronghold.name)
art_placeholder(" Art of a dagger and cloak")
flavorText = '''
As in all cities, your stronghold is home to a number of seedy characters who frequent the criminal underbelly
of society. For a price, they will be loyal to you.
Thieves do not contribute to your gold production, but they can infilitrate other player strongholds
and return with stolen gold.
'''
costModifier = 0
HireUnit(userStronghold, "Thief", UCOST_THIEF, costModifier, UCAP_THIEF, userStronghold.thieves, COLOR_THIEF, flavorText)
return "stronghold"
#This is the screen for purchacing soldiers
#----------------------------------------------------------------------------------
if screen == "hireWarriors":
os.system("clear")
header(userStronghold.name)
art_placeholder(" Art of a sword and shield")
flavorText = '''
With these fighting machines and meat shields at your command, lay waste to your adversaries and defend
what's yours.
Warriors are your means to survive and conquer.
'''
costModifier = float(userStronghold.attLevel) * 0.5 #Scales with attack - 10/15/15/20/20/25/25/30....etc.
#Note that the cost modifier currently does nothing, may need to add it back into the loop somehow.
#Add a unitCap modifier later based on some kind of stronghold capacity upgrade?
HireUnit(userStronghold, "Warrior", UCOST_WARRIOR, costModifier, UCAP_WARRIOR, userStronghold.defenders, COLOR_WARRIOR, flavorText)
return "stronghold"
return screen