-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcareer_navy.py
69 lines (59 loc) · 2.21 KB
/
career_navy.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
import b5_data #unique book 5 data
#from career import check_reenlist()
import career
def navy_term(grunt):
'Work through a 4 year term in the Imperial Navy'
year = 1
if (grunt.term == 1):
if b5_data.navy_year_one(grunt):
grunt.term += 1
return True #Completed College or the Academy in four years
else:
if grunt.college_fail == True:
year += 1 #Didn't complete college
grunt.history.append('Finish 3 years of term')
if grunt.academy_fail == True:
year += 1 #Didn't complete the Academy
grunt.history.append('Finish 3 years of term')
if grunt.term == 2 and grunt.honors:
#Medical school or flight school
if b5_data.navy_med_or_flight(grunt):
if grunt.medschool:
grunt.term += 1
return True #completed four year term
if grunt.flight:
grunt.history.append('Finish 3 years of term')
year += 1
if grunt.flight_fail or grunt.med_fail:
year += 1 #failing flight or medical school takes a year
if grunt.navalBranch == False:
b5_data.select_navy_branch(grunt)
if grunt.bat == False:
s = 'Basic & Advanced Training in year %d of term %d' % (year, grunt.term)
grunt.history.append(s)
b5_data.navy_bat(grunt)
year += 1
#complete the term
while year <= 4 and grunt.alive:
s = 'Term %d Year %d' % (grunt.term, year)
grunt.history.append(s)
b5_data.navy_year(grunt, year)
year += 1
if grunt.alive:
grunt.term += 1
if grunt.term >= 7:
if 2 == career.check_reenlist(grunt):
s = 'Manditory reenlistment after term %d' % grunt.term
grunt.history.append(s)
grunt.reenlist = True
else:
grunt.reenlist = False
elif True == career.check_reenlist(grunt):
grunt.reenlist = True
else:
grunt.reenlist = False
else:
grunt.die(year)
grunt.history.append('#####')
return True
# end of navy_term()