#MTCG version whatever, pick a number
#The MTCG will allow you to create a Traveller character
#going through each step.
#Rather than having players roll stats, then shut down the
#program so they can roll again, this program allows as
#many re-rolls as desired. However, this process includes
#some concessions:
# 1) The stats are all rolled and assigned in order
# 2) Only the stat die modifiers (dm) are displayed during generation
# The stats are only displayed once the character is finalized
# 3) Characters are limited to a maximum of six terms
# Custom Rule: In addition, career survival is handled differently.
# If a survival roll is failed, the character risks being KIA
# The program rolls 1d6 and compares it to the number of terms
# the character currently has. If the roll is less than the number of terms,
# the character suffers an injury. Otherwise, the character is killed.
# The idea is, a character with more experience (terms) is
# more likely to survive.
#
# replicant
#
import random
import os
import time
import sys
random.seed()
#DICTIONARIES#
Character_data = [0,0,0,0,0,0,0,0,0,0,0,0,18,0,0,'','','','','','',
0,'',-1,0,0,0,0,0,'','',0,0,'','','','','',0,0,0,0,0,0,'','','','','','',0,1]
Character_skills = [
'Admin ',#0
'Advocate ',#1
'Animals ',#2
'Athletics ',#3
'Art ',#4
'Astrogation ',#5
'Battle Dress ',#6
'Broker ',#7
'Carouse ',#8
'Comms ',#9
'Computers ',#10
'Deception ',#11
'Diplomat ',#12
'Drive ',#13
'Engineer ',#14
'Explosives ',#15
'Flyer ',#16
'Gambler ',#17
'Gunner ',#18
'Gun Combat ',#19
'Heavy Weapons ',#20
'Investigate ',#21
'Jack of all Trades',#22
'Language ',#23
'Leadership ',#24
'Life Sciences ',#25
'Mechanic ',#26
'Medic ',#27
'Melee ',#28
'Navagation ',#29
'Persuade ',#30
'Pilot ',#31
'Physical Sciences ',#32
'Recon ',#33
'Remote Operations ',#34
'Science ',#35
'Seafarer ',#36
'Sensors ',#37
'Social Sciences ',#38
'Space Sciences ',#39
'Stealth ',#40
'Steward ',#41
'Streetwise ',#42
'Survival ',#43
'Tactics ',#44
'Trade ',#45
'Vacc Suit ',#46
'Zero-G ',#47
]
Skill_levels = [-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,
-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,
-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3,-3]
Term_career_event = ['','','','','','','','','','','','']
Career = ['Placeholder','Agent','Army','Citizen','Drifter','Entertainer','Marines',
'Merchants','Navy','Nobility','Rogue','Scholar','Scout']
Specializations = ['Placeholder',
'Law Enforcement','Intelligence','Corporate',
'Support','Infantry','Cavalry',
'Corporate','Worker','Colonist',
'Barbarian','Wanderer','Scavenger',
'Artist','Journalist','Performer',
'Support','Star Marine','Ground Assault',
'Merchant Marine','Free Trader','Broker',
'Line-Crew','Engineering-Gunnery','Flight',
'Administrator','Diplomat','Dilettante',
'Thief','Enforcer','Pirate',
'Field Researcher','Scientist','Physician',
'Courier','Survey','Exploration']
Career_avail = ['Placeholder',0,0,0,0,0,0,0,0,0,0,0,0]
StatList = [0,0,0,0,0,0]
Career_qual = ['Placeholder',6,5,5,-10,5,6,4,6,10,6,6,5,9,8,10,0,9,8,9,9,11,7,9,9]
special_message = "---------------------------------------------------------------------"
term = 0
Term_career = ''
Term_spec = ''
career_selection = 0
misc_qual = 0
career_tm = 0
spec_tm = 0
Spec_mod = 0
sklvl = 0
Rank = 0
final = 0
leave_career = 0
career_selection = 0
career_number = 0
def Clear_screen():
Operating_system = os.name
if Operating_system == "posix":
command = "clear"
else:
command = "cls"
os.system(command)
def Any_key():
raw_input("Press enter to continue...")
def Roll_d6():
six_sided = random.randint(1,6)
return six_sided
def Roll_2d6():
total = Roll_d6() + Roll_d6()
return total
def Roll_d3():
three_sided = random.randint(1,3)
return three_sided
def Roll_d66():
#d66 gives one of 36 possible results. As it is not an average, this
#can simply return a value from 1 to 36.
thirty_six = random.randint(1,36)
return thirty_six
def Calc_bonus(statval):
if statval <= 0:
bonus = -3
elif statval >0 and statval <=2:
bonus = -2
elif statval >=3 and statval <=5:
bonus = -1
elif statval >=6 and statval <=8:
bonus = 0
elif statval >=9 and statval <=11:
bonus = 1
elif statval >=12 and statval <=14:
bonus = 2
else:
bonus = 3
return bonus
def Answer_test(low,high):
answer = ''
while answer <low or answer >high:
try:
answer = int(raw_input())
except ValueError:
print "Please enter a valid number."
return answer
def Display_check(target,roll1,roll2,statdm,bonus,penalty,total):
print "Target number: %i" % target
print " [%i]" % roll1
time.sleep(1)
print " +"
print " [%i]" % roll2
time.sleep(1)
#statdm of -66 means a stat DM is not used
if statdm != -66:
if statdm < 0:
print " -"
else:
print " +"
print " %i Stat DM" % statdm
time.sleep(1)
if bonus > 0:
print " +"
print " %i Bonus" % bonus
time.sleep(1)
if penalty > 0:
#penalty is the actual integer, not the negative value
print " -"
print " %i Penalty" % penalty
time.sleep(1)
print "---------"
print " %i" % total
time.sleep(1)
def Display_skill_tables():
low = 1
high = 0
print #put fancy formatting here
print "Select a table:"
print " 1 - Personal Development"
print " 2 - Service Skills"
print " 3 - Specialist"
if Character_data[4] >= 8:
print " 4 - Advanced Education"
high = 4
else:
high = 3
table = Answer_test(low,high)
return table
def Check_age():
if Character_data[12] >= 34:
roll1 = Roll_d6()
roll2 = Roll_d6()
print "Current Age: %i" % Character_data[12]
print " [%i]" % roll1
time.sleep(1)
print " + "
print " [%i]" % roll2
time.sleep(1)
print " - "
print " %i" % Character_data[13]
result = roll1 + roll2 - Character_data[13]
print " --------"
time.sleep(1)
print " %i" % result
Age_effect(result)
else:
print " No aging check required."
#Remove StatList if unused
def Age_effect(result):
p = 0
m = 0
x = 0
#result = Check_age()
if result >= 1:
print "No age effects."
elif result == 0:
print "Reduce one physical by one."
print "1)STR 2)DEX 3)END"
p = Answer_test(1,3)
Character_data[p-1] = Character_data[p-1] -1
elif result == -1:
print "Reduce two physical by one."
x = 2
while x >= 1:
print "1)STR 2)DEX 3)END"
p = Answer_test(1,3)
Character_data[p-1] = Character_data[p-1] -1
x = x - 1
elif result == -2:
print "Reduce each physical by one."
x = 2
while x >= 0:
Character_data[x] = Character_data[x] -1
x = x - 1
elif result == -3:
print "Reduce one physical by two and two by one."
print "Which stat drops by two?"
print "1)STR 2)DEX 3)END"
p = Answer_test(1,3)
Character_data[p-1] = Character_data[p-1] -2
if p == 1:
Character_data[1] = Character_data[1] -1
Character_data[2] = Character_data[2] -1
elif p == 2:
Character_data[2] = Character_data[2] -1
Character_data[0] = Character_data[0] -1
else:
Character_data[1] = Character_data[1] -1
Character_data[0] = Character_data[0] -1
elif result == -4:
print "Reduce two physical by two and one by one."
print "Which stat drops by one?"
print "1)STR 2)DEX 3)END"
p = Answer_test(1,3)
Character_data[p-1] = Character_data[p-1] -1
if p == 1:
Character_data[1] = Character_data[1] -2
Character_data[2] = Character_data[2] -2
elif p == 2:
Character_data[2] = Character_data[2] -2
Character_data[0] = Character_data[0] -2
else:
Character_data[1] = Character_data[1] -2
Character_data[0] = Character_data[0] -2
elif result == -5:
p = 2
print "All three physical drop by two."
while p >= 0:
Character_data[p] = Character_data[p] - 2
p = p -1
elif result <= -6:
print "All three physical are reduced by two and"
print "one mental reduced by one."
print "Which mental stat drops by one?"
print "1)INT 2)EDU 3)SOC"
p = Answer_test(1,3) + 2
Character_data[p] = Character_data[p] -1
x = 2
while x >= 0:
Character_data[x] = Character_data[x] - 2
x = x - 1
Update_bonuses()
def Add_skill(skill,sklvl):
if Skill_levels[skill] <= 0 and sklvl == 0:
Skill_levels[skill] = 0
elif Skill_levels[skill] <= 1 and sklvl == 1:
Skill_levels[skill] = 1
elif Skill_levels[skill] <= 0 and sklvl == 2:
Skill_levels[skill] = 1
else:
Skill_levels[skill] = Skill_levels[skill] + 1
def Roll_stats():
ans = 'n'
rolls = 1
while ans != 'y':
Clear_screen()
print " Rolls: %i" % rolls
if rolls == 6:
print "Rolling again, eh?"
elif rolls == 12:
print "I can do this all day."
elif rolls == 18:
print "Seriously, all day long if I have to."
elif rolls == 25:
print "You're a stubborn one, aren't you?"
elif rolls == 32:
print "I would have kept that last guy."
elif rolls == 39:
print "Just keep rolling, I don't care."
elif rolls == 45:
print "I'm not afraid of you."
elif rolls == 51:
print "Seriously, come at me bro.."
elif rolls == 66:
print "Critical Hit! Foe stunned and rolls characters"
print "all day long."
elif rolls == 75:
print "Wow. Just...wow."
elif rolls == 101:
print "You may as well order a pizza. You're"
print "clearly not going anywhere for awhile."
elif rolls == 128:
print "Rolling, rolling, rolling, keep those"
print "doggies rolling..."
elif rolls == 152:
print " I give up."
else:
print " * Stat bonuses *"
#str = Roll_2d6()
#Character_data[0] = str
x = 0
while x <= 5:
Character_data[x] = Roll_2d6()
x = x + 1
Update_bonuses()
print " STR: %i" % Character_data[6]
print " DEX: %i" % Character_data[7]
print " END: %i" % Character_data[8]
print " INT: %i" % Character_data[9]
print " EDU: %i" % Character_data[10]
print " SOC: %i" % Character_data[11]
print "\n Are these acceptable?"
print " (y)es or (n)o :"
ans = raw_input()
rolls = rolls + 1
#
Character_data[50] = 1 #first term
Character_data[51] = 1 #career first term
Career_selection()
def Update_bonuses():
Character_data[6] = Calc_bonus(Character_data[0])
Character_data[7] = Calc_bonus(Character_data[1])
Character_data[8] = Calc_bonus(Character_data[2])
Character_data[9] = Calc_bonus(Character_data[3])
Character_data[10] = Calc_bonus(Character_data[4])
Character_data[11] = Calc_bonus(Character_data[5])
def Career_selection():
Clear_screen()
x = 1
print "Select Career for term: %d" % (Character_data[13]+1)
#table = 0
#table = Display_skill_tables()
while x <= 12:
if Career_avail[x] == 1:
print " *** Not Available ***"
else:
print " %i - %s " % (x,Career[x])
x = x + 1
leave_career = 0
print "TERM: %i AGE: %i " % ((Character_data[13]+1),Character_data[12])
print "\n Select a career for this term."
print " Or, enter 0 to take no further terms"
print " and finalize character."
career_test = 'X'
while career_test == 'X':
career_selection = Answer_test(1,12)
if Career_avail[career_selection] == 1:
print "Sorry, that career is no longer available."
print "Select another or enter 0 to end term selection."
else:
Character_data[13] = Character_data[13] + 1
career_tm = 14 + Character_data[13]
spec_tm = 43 + Character_data[13]
Character_data[career_tm] = Career[career_selection]
career_test = 'Y'
Clear_screen()
print "\n You have selected:"
print Character_data[career_tm]
if career_selection == 4:
#DRIFTER()
AGENT()
print "Attempting to qualify..."
qualroll1 = Roll_d6()
qualroll2 = Roll_d6()
statdm = Character_data[Career_qual[career_selection + 12]]
target_number = Career_qual[career_selection]
penalty = Character_data[31]
check = qualroll1 + qualroll2 + statdm - penalty
Display_check(target_number, qualroll1,qualroll2,abs(statdm),0,abs(penalty),check)
if check < target_number:
print "Failed..."
if Character_data[32] == 0:
print "\n Would you like to enter the draft or"
print " become a Drifter?"
print " 1 - Draft"
print " 2 - Drifter"
draft_choice = Answer_test(1,2)
if draft_choice == 1:
Character_data[32] = 1
Enter_draft()
else:
print "\n You are a Drifter for this term."
career_selection = 4
else:
print "Success!"
Career_determination(career_selection)
def Career_determination(career_selection):
#if career_selection == 1:
AGENT()
#if career_selection == 2:
# ARMY()
#if career_selection == 3:
# CITIZEN()
#if career_selection == 4:
# DRIFTER()
#if career_selection == 5:
# ENTERTAINER()
#if career_selection == 6:
# MARINES()
#if career_selection == 7:
# MERCHANTS()
#if career_selection == 8:
# NAVY()
#if career_selection == 9:
# NOBILITY()
#if career_selection == 10:
# ROGUE()
#if career_selection == 11:
# SCHOLAR()
#if career_selection == 12:
# SCOUT()
def Display_skills():
sklist = 0
while sklist <= 47:
if Skill_levels[sklist] >= 0:
print "%s%s" % (Character_skills[sklist],Skill_levels[sklist])
sklist = sklist + 1
def Display_UPP():
#print " FINAL UPP: %c%c%c%c%c%c " % (hex(Character_data[0]),hex(Character_data[1]),
#hex(Character_data[2]),hex(Character_data[3]),hex(Character_data[4]),hex(Character_data[5]))
def Display_character():
#Clear_screen()
print "====================================================================="
if final == 1:
Display_UPP()
print "Term: %i Age: %i " % (Character_data[13],Character_data[12])
print "Stat Bonuses"
stat_num = 6
temp_stat = ['','','','','','']
while stat_num <= 11:
if Character_data[stat_num] >= 0:
temp_stat[stat_num - 6] = '+'
stat_num = stat_num + 1
print "STR: %s%i DEX: %s%i END: %s%i Term 1: %s - %s" % (temp_stat[0],Character_data[6],
temp_stat[1],Character_data[7],
temp_stat[2],Character_data[8],
Character_data[15],Character_data[44])
print "INT: %s%i EDU: %s%i SOC: %s%i Term 2: %s - %s" % (temp_stat[3],Character_data[9],
temp_stat[4],Character_data[10],
temp_stat[5],Character_data[11],
Character_data[16],Character_data[45])
print "Contacts: %i Term 3: %s - %s" % (Character_data[24],Character_data[17],Character_data[46])
print "Allies: %i Term 4: %s - %s" % (Character_data[25],Character_data[18],Character_data[47])
print "Rivals: %i Term 5: %s - %s" % (Character_data[27],Character_data[19],Character_data[48])
print "Enemies: %i Term 6: %s - %s" % (Character_data[26],Character_data[20],Character_data[49])
print "Title: %s Bank: %i" % (Character_data[22],Character_data[14])
print "---------------------------------------------------------------------"
print " Skills:"
Display_skills()
print "%s" % special_message
#special_message = "---------------------------------------------------------------------"
Any_key()
def Enter_draft():
branch = 0
print "Entering the draft."
time.sleep(2)
print "Branch:"
time.sleep(1)
branch = Roll_d6
if branch == 1:
print "NAVY"
Any_key()
Clear_screen()
AGENT()
elif branch == 2:
print "ARMY"
Any_key()
Clear_screen()
AGENT()
elif branch == 3:
print "MARINES"
Any_key()
Clear_screen()
AGENT()
elif branch == 4:
print "MERCHANTS"
Any_key()
Clear_screen()
AGENT()
elif branch == 5:
print "SCOUTS"
Any_key()
Clear_screen()
AGENT()
else:
print "AGENT"
Any_key()
Clear_screen()
AGENT()
def Promotion_test(target,dm):
print "Checking for promotion..."
print "Target number: %i" % target
roll1 = Roll_d6()
roll2 = Roll_d6()
check = roll1 + roll2 + dm
Display_check(target,roll1,roll2,dm,0,0,check)
if check < target:
return 0
else:
return 1
def Survival_test(target,dm):
print "Checking survival..."
print "Target number: %i" % target
roll1 = Roll_d6()
roll2 = Roll_d6()
check = roll1 + roll2 + dm
Display_check(target,roll1,roll2,dm,0,0,check)
if check < target:
return 1
else:
return 0
def Survival_failure():
Clear_screen()
leave_career = 1
print " The character did not survive the term. At this point,"
print " a single die is cast: If the number is less than or"
print " equal to the number of terms, the character is injured."
print " Otherwise, they perish."
print " Enter 1 to continue"
print " or 2 to retire character."
temp = Answer_test(1,2)
if temp == 2:
Character_MIA()
result = Roll_d6()
print "Term: "
time.sleep(1)
print " %i" % Character_data[13]
time.sleep(1)
print "Roll: "
time.sleep(1)
print " %i" % result
time.sleep(2)
if result <= Character_data[13]:
Character_injured()
return 1
else:
Character_KIA()
def Character_MIA():
Clear_screen()
Display_character()
print "====================================================================="
print " ***MISSING IN ACTION ~ RETIRED*** "
print "====================================================================="
Display_UPP()
sys.exit()
def Character_KIA():
Clear_screen()
Display_character()
print "====================================================================="
print " ***KILLED IN ACTION*** "
print "====================================================================="
Display_UPP()
sys.exit()
def Character_injured():
p = 0
x = 0
injury = Roll_d6
print " Character injury: %i" % injury
if injury == 6:
print "No effects."
time.sleep(2)
elif injury == 5:
print "Reduce one stat by one."
print "1)STR 2)DEX 3)END"
p = Answer_test(1,3)
Character_data[p-1] = Character_data[p-1] -1
elif injury == 4:
print "Reduce one stat by two."
print "1)STR 2)DEX 3)END"
p = Answer_test(1,3)
Character_data[p-1] = Character_data[p-1] -2
elif injury == 3:
print "Reduce 1)STR or 2)DEX by two."
p = Answer_test(1,2)
Character_data[p-1] = Character_data[p-1] -2
elif injury == 2:
print "Reduce which stat by 1d6?"
print "1)STR 2)DEX 3)END"
p = Answer_test(1,3)
loss = Roll_d6
Character_data[p-1] = Character_data[p-1] - loss
else:
print "Reduce which stat by 1d6?"
print "1)STR 2)DEX 3)END"
print "The other two will drop by two each."
p = Answer_test(1,3)
loss = Roll_d6
if p == 1:
Character_data[0] = Character_data[0] - loss
Character_data[1] = Character_data[1] - 2
Character_data[2] = Character_data[2] - 2
elif p == 2:
Character_data[1] = Character_data[1] - loss
Character_data[0] = Character_data[0] - 2
Character_data[2] = Character_data[2] - 2
else:
Character_data[2] = Character_data[2] - loss
Character_data[1] = Character_data[1] - 2
Character_data[0] = Character_data[0] - 2
def Check_zero_stat():
p = 0
x = 0
while p <= 5:
if Character_data[p] <= 0:
print " One or more stats have been reduced to zero or less."
cost = Roll_d6 * 10000
print " It will cost %i in medical treatment to raise" % cost
print " all of these stats to one. This is deducted from the"
print " character's funds and may cause them to start"
print " with a large debt owed."
print " In addition, due to these injuries, all further"
print " qualification rolls are modified by -12."
print " Current Bank: %i" % Character_data[14]
print " Enter 1 to continue or 2 to retire character."
ans = Answer_test(1,2)
if ans == 2:
Character_MIA()
else:
Character_data[14] = Character_data[14] - cost
#MONEY=Character_data [money]
while x <= 5:
if Character_data[x] < 0:
Character_data[x] = 1
x = x + 1
Display_character()
p = p + 1
def Rank_gain(RANK,CareerMod,rank_title,rank_bonus):
Character_data[23] = Character_data[23] + 1
GainedSkill = ''
#Character_data[21] = Rank
Character_data[22] = rank_title[Character_data[21]+CareerMod+1]
GainedSkill = rank_bonus[Character_data[21]+CareerMod+1]
if GainedSkill != '':
if GainedSkill == 'str1':
Character_data[0] = Character_data[0] + 1
print " Rank bonus: STR stat gain"
elif GainedSkill == 'dex1':
Character_data[1] = Character_data[1] + 1
print " Rank bonus: DEX stat gain"
elif GainedSkill == 'end1':
Character_data[2] = Character_data[2] + 1
print " Rank bonus: END stat gain"
elif GainedSkill == 'int1':
Character_data[3] = Character_data[3] + 1
print " Rank bonus: INT stat gain"
elif GainedSkill == 'edu1':
Character_data[4] = Character_data[4] + 1
print " Rank bonus: EDU stat gain"
elif GainedSkill == 'soc1':
Character_data[5] = Character_data[5] + 1
print " Rank bonus: SOC stat gain"
else:
Add_skill(GainedSkill,1)
print " Rank bonus: Skill at level 1"
else:
print " No rank bonus at this time."
Any_key()
def Skill_from_table(personal_development,service_skill,spec_skills,advanced_education,CareerMod,sklvl):
roll = Roll_d6()
table = Display_skill_tables()
if table == 1:
#if Stat_bonus(personal_development[roll]) == 0:
if personal_development[roll] == 'str1':
Character_data[0] = Character_data[0] + 1
print " STR stat gain"
elif personal_development[roll] == 'dex1':
Character_data[1] = Character_data[1] + 1
print " DEX stat gain"
elif personal_development[roll] == 'end1':
Character_data[2] = Character_data[2] + 1
print " END stat gain"
elif personal_development[roll] == 'int1':
Character_data[3] = Character_data[3] + 1
print " INT stat gain"
elif personal_development[roll] == 'edu1':
Character_data[4] = Character_data[4] + 1
print " EDU stat gain"
elif personal_development[roll] == 'soc1':
Character_data[5] = Character_data[5] + 1
print " SOC stat gain"
else:
Add_skill(personal_development[roll],sklvl)
print " Skill increase"
Update_bonuses()
elif table == 2:
Add_skill(service_skill[roll],sklvl)
elif table == 3:
Add_skill(spec_skills[roll+CareerMod],sklvl)
elif table == 4:
Add_skill(advanced_education[roll],sklvl)
def Term_end():
Character_data[13] = Character_data[13] + 1
Character_data[12] = Character_data[12] + 4
##Display_character()
Check_age()
Check_zero_stat()
if leave_career == 1:
Career_avail[career_number] = 1
print "*You are forced out of this career.*"
else:
print "Do you wish to spend the next term"
print "with the same career?" #Career[career_selection]
print "1)YES 2)NO 3)End terms and finalize character"
ans = Answer_test(1,3)
if ans == 1:
Character_data[14+Character_data[13]] = Character_data[14+Character_data[13]-1]
Career_determination(career_number)
if ans == 2:
Career_avail[career_number] = 1
career_selection = 0
Career_selection()
else:
final = 1
Finalize_character()
def Finalize_character():
Clear_screen()
print "====================================================================="
print " Final Stats - STR: %i DEX: %i END: %i INT: %i EDU: %i SOC: %i " % (Character_data[0],Character_data[1],
Character_data[2],Character_data[3],Character_data[4],Character_data[5])
Display_character()
print " *SECRET CODE GOES HERE*"
sys.exit()
def AGENT():
career_number = 1
service_skills = [0,42,13,21,10,33,19]
personal_development = [0,19,'dex1','end1',28,'int1',3]
advanced_education = [0,1,9,10,27,40,34]
spec_skills = [0,21,33,42,40,28,1,21,33,9,40,30,11,21,10,40,19,11,42]
rank_title = ['Placeholder','Rookie','Corporal','Sergeant','Lieutenant','Detective','Chief','Commissioner',
'','Agent','Field Agent','','Special Agent','Assistant Director','Director',
'','Agent','Field Agent','','Special Agent','Assistant Director','Director']
rank_bonus = ['X','',42,'','',21,0,'soc1','',42,'','',21,0,'soc1','',11,21,'',19,'','']
sur_target = 0
pro_target = 0
sur_dm = 0
pro_dm = 0
misc_sm = 0
misc_pm = 0
muster_cash = [0,1000,2000,5000,7500,10000,25000,50000]
muster_other = [0,'Scientific Equipment','+1int','ss','Weapon','Implant','+1soc','TAS Membership']
sk = 0
spec_select = 0
roll = 0
mishap = 0
event = 0
Spec_mod = 1
#The next career has a Spec_mod of 4, then 7, and so on
print "Which specialization do you select?"
print " 1 - %s" % Specializations[Spec_mod]
print " 2 - %s" % Specializations[Spec_mod+1]
print " 3 - %s" % Specializations[Spec_mod+2]
spec_select = Answer_test(1,3)
if spec_select == 1:
CareerMod = 0
sur_dm = Character_data[8]
sur_target = 6
pro_dm = Character_data[9]
pro_target = 6
elif spec_select == 2:
CareerMod = 6
sur_dm = Character_data[9]
sur_target = 7
pro_dm = Character_data[9]
pro_target = 5
else:
CareerMod = 12
sur_dm = Character_data[9]
sur_target = 5
pro_dm = Character_data[9]
pro_target = 7
print "===================================="
Character_data[Character_data[13]+43] = Specializations[spec_select]
if Character_data[51] == 1 and Character_data[13] == 1:
#if Character_data[13] == 1: #Character_data[51] needs changed back to 1 at start of new career
sk = 1
print "You gain all service skills this term."
time.sleep(1)
Character_data[51] = 0
sklvl = 0
while sk <=6:
Add_skill(service_skills[sk],sklvl)
sk = sk + 1
#FIRST_TERM = 0
Any_key()
elif Character_data[51] == 1 and Character_data[13] > 1:
print " Select a service skill to gain at level zero (1 - 6):"
ans = Answer_test(1,6)
Add_skill(service_skills[ans],0)
Any_key()
#Pick normal skill
Clear_screen()
Skill_from_table(personal_development,service_skills,spec_skills,advanced_education,CareerMod,2)
#missing basic for second and further careers
Any_key()
Clear_screen()
Display_character()
Clear_screen()
# Custom #
survive = Survival_test(sur_target,sur_dm)
if survive == 1:
print "Failure!"
#character_data muster - 1
time.sleep(2)
fail = Survival_failure()
if fail == 1:
print "Character lives on to fight another day."
else:
print "Character survives!"
# Test
leave_career = 0
#
if leave_career == 0:
temp = raw_input("Press enter to continue.")
Clear_screen()
print "Event:"
time.sleep(1)
event = Roll_2d6()
if event == 2:
print "Disaster! Character injured, but not ejected from career."
Character_injured()
elif event == 3:
print " 1 - Investigate"
print " -or-"
print " 2 - Streetwise"
elif event == 4:
print "Gain +1 DM to first benefit roll."
elif event == 5:
contacts_gained = Roll_d3()
Character_data[24] = Character_data[24] + contacts_gained
elif event == 6:
print "Rolling Education..."
elif event == 7:
print "Life Event:"
elif event == 8:
print "Rolling Deception..."
elif event == 9:
print "+2 DM next advancement check"
elif event == 10:
print "Gain Drive"
elif event == 11:
print "investigate by one"
else:
print "Auto promotion"
time.sleep(2)
Display_character()
Clear_screen()
#Check promotion
char_promoted = Promotion_test(pro_target,pro_dm)
if char_promoted == 1:
print "Promoted!"
Character_data[21] = Character_data[21] + 1
#CURRENT_MUSTER = CURRENT_MUSTER + 2
Rank_gain(Character_data[21],CareerMod,rank_title,rank_bonus)
Skill_from_table(personal_development,service_skills,spec_skills,advanced_education,CareerMod,2)
else:
print "No promotion this term."
#CURRENT_MUSTER = CURRENT_MUSTER + 1
Any_key()
Clear_screen()
Display_character()
char_promoted = 0
Term_end()
#################################
Roll_stats()
#Career_selection()
#Display_skill_tables()
#AGENT()
Display_character()
#################################