Пример #1
0
def gambleMenu(myNation, year):
    clearScreen()
    print('My Team: ' + str(myNation[1]))
    print('Year: ' + str(year))
    print('Trade Credits: ' + str(myNation[0]['Finance']['wealth']))
    print(' ')
    print('')

    # CHECK MAX MOVES
    returnCode = checkMoves(myNation, 'gamble')[1]
    if returnCode > 0:
        input('Moves used up or already gambled this round. \n')
        return (myNation)

    returnCode, gambleAmount = enterMoney(
        myNation, 'How much money do you wish to gamble?')
    if returnCode > 0: return (myNation)

    # Decrement wealth now.
    myNation[0]['Finance'][
        'wealth'] = myNation[0]['Finance']['wealth'] - gambleAmount
    myNation[0]['Nextmoves'] = myNation[0]['Nextmoves'] + [[
        'gamble', gambleAmount
    ]]

    print('You will gamble ' + str(gambleAmount) + ' in the next round')
    buffer = input('Press enter to continue \n')
    skipflag = 'y'
    return (myNation)
Пример #2
0
def showAssets(myNation, year, flag):
    if flag == 'yes':
        universities = myNation[0]['Tech']['assets']['universities']
        techHubs = myNation[0]['Tech']['assets']['techHubs']
        scientists = myNation[0]['Tech']['assets']['scientists']
        engineers = myNation[0]['Tech']['assets']['engineers']
        mathematicians = myNation[0]['Tech']['assets']['mathematicians']
        entrepreneurs = myNation[0]['Tech']['assets']['entrepreneurs']
        print('Institues      : ' + str(universities + techHubs))
        print('--------------')
        print('Universities : ' + str(universities))
        print('TechHubs  : ' + str(techHubs))
        print('')
        print('Staff      : ' + str(gunboats + destroyers + carriers))
        print('--------------')
        print('Scientists: ' + str(scientists))
        print('Engineers: ' + str(engineers))
        print('Mathematicians : ' + str(mathematicians))
        print('Entrepreneurs : ' + str(entrepreneurs))
        print('')
        print('Total Prestige : ' + str(myNation[0]['Tech']['prestigue']))
        print(' ')
        input('Enter to continue \n')
        clearScreen()
        flag = 'no'
    return (flag)
Пример #3
0
def sell(credits, price, myNation, name):
    myStock = myNation[0]['Finance'][name]
    print('You can sell up to ' + str(myStock) + ' ' + str(name) + ' for $' +
          str(price) + ' each')

    try:
        sellAmount = int(input('Enter amount \n'))
    except:
        print("Entered incorrectly, please try again")
        return (myNation)
    clearScreen()
    value = sellAmount * price
    if sellAmount > myStock:
        input('Not enough to sell \n')
        return (myNation)
    if sellAmount < 1:
        input('Enter a correct amount \n')
        return (myNation)

    # reduce stock and place order
    myNation[0]['Finance'][name] = myNation[0]['Finance'][name] - sellAmount
    myNation[0]['Nextmoves'] = myNation[0]['Nextmoves'] + [[
        'sell', name, sellAmount, value
    ]]

    fast_print('Sold ' + str(name) + ' at a value of ' + str(value) + '\n')
    input('You will get paid next round \n')
    return (myNation)
Пример #4
0
def selectNation(NATION_ARRAY):
    clearScreen()
    NationChoice = ''
    nationSelected = ''
    while nationSelected != 'Y':
        print('')
        print('Printing nation list')
        print('')

        for x in range(0, len(NATION_ARRAY)):
            print(str(x) + '. ' + str(NATION_ARRAY[x][-1]))
        print('')
        while NationChoice not in range(0, len(NATION_ARRAY)):
            try:
                NationChoice = int(input('Please chose a country \n'))
            except:
                print("Entered incorrectly, please try again")

        fast_print('Your chosen country is : ' +    str(NATION_ARRAY[NationChoice][-1]) + '\n')
        print('')
        buffer = input('Press Enter to continue \n')
        clearScreen()
        myNation = NATION_ARRAY[NationChoice]
        playerNationIndex = NationChoice
        nationSelected = 'Y'
    return(myNation,playerNationIndex)
Пример #5
0
def drill(myNation, branch, units, WAR_BRIEFING):
    print('')
    # CHECK MAX MOVES
    returnCode = checkMoves(myNation, 'drill')[1]
    if returnCode > 0:
        fast_print('All moves used up, or already drilling this round.')
        return (myNation)

    intensity = 'low'
    while intensity != 'XYZFFJJJJJJ':
        print('[S] Soft')
        print('[M] Medium')
        print('[H] Hard')
        print('[I] More Info')
        print('[R] Return')
        intensity = input('How hard do you want to train your ' + str(branch) +
                          '?\n').upper()
        clearScreen()
        if intensity == 'S':
            drillOrder = ['drill', branch, 'soft', units]
            break
        if intensity == 'M':
            drillOrder = ['drill', branch, 'medium', units]
            break
        if intensity == 'H':
            drillOrder = ['drill', branch, 'hard', units]
            break
        if intensity == 'I':
            fast_print(
                'The harder you drill your units the more benefits you will gain, but the risk of loss also increases. \n'
            )
            print('Soft  : Might ++, low probability of loss')
            print('Medium: Might ++, credits ++, medium probability of loss')
            print(
                'Hard  : Might ++, credits ++ newUnits ++, high probability of loss'
            )
            print(
                'Remember drilling your units means they are off standby and unavailable for the next round, be vigilant incase you come under attack.'
            )
            input('Enter to continue \n')
        if intensity == 'R' or intensity == '':
            return (myNation)

    # Deduct units
    for unit in units:
        unit = unit[0]
        myNation[0]['War']['weapons'][unit][1] = 0

    # Place Order
    myNation[0]['Nextmoves'] = myNation[0]['Nextmoves'] + [drillOrder]

    print('You will drill your ' + str(branch) + ' at ' + str(drillOrder[2]) +
          ' intensity')
    print(
        'Your ' + str(branch) +
        ' will embark on training, the units will be returned to you next round.'
    )
    buffer = input('Press enter to continue \n ')
    return (myNation)
Пример #6
0
def selectTech(myNation, one, two, three, four, five, TECH_MAP):
    # Check isn't already researching a tech
    returnCode = checkMoves(myNation, 'research')[1]
    if returnCode > 0:
        for item in myNation[0]['Nextmoves']:
            if 'research' in item:
                clearScreen()
                input('You are currently developing ' + str(item[3]) +
                      ' please wait until this is complete. \n')
        return (myNation)

    era = str(myNation[0]['Tech']['era'])
    researched = myNation[0]['Tech']['researched']
    techSelected = ''
    accepted = ['1', '2', '3', '4', '5']
    choiceArray = ['one', 'two', 'three', 'four', 'five']
    choice = ''

    clearScreen()
    while techSelected != 'Y':
        print('-----SELECT A TECHNOLOGY------')
        print('')
        print('1. ' + str(one[1]))
        print('2. ' + str(two[1]))
        print('3. ' + str(three[1]))
        print('4. ' + str(four[1]))
        print('5. ' + str(five[1]))
        selection = str(input('Select a Tech to Research \n'))
        if selection in accepted:
            choice = choiceArray[accepted.index(selection)]
            techSelected = 'Y'

    required = TECH_MAP['EraCost'][era][choice]['rp']
    myTechPoints = researched[choice][0]
    remaining = required - myTechPoints

    if myTechPoints > (required - 1):
        input(
            'You have already maxed this Tech stream. Please try another. Once all streams complete, Era will progress \n'
        )
        return (myNation)

    input('You selected : ' + str(researched[choice][1]))
    # Nextmove contains = submitted flag(changes to pending), research flag, era for lookup, techname, pointsremaining
    myNation[0]['Nextmoves'] = myNation[0]['Nextmoves'] + [[
        'submitted', 'research', era, choice, required
    ]]

    print('Next moves are ' + str(myNation[0]['Nextmoves']))

    return (myNation)
Пример #7
0
def nextYear(year, myNation, ARRAY_DICT, playerNationIndex, p):
    NATION_ARRAY = ARRAY_DICT['NATION_ARRAY']
    PRICE_TRACKER = ARRAY_DICT['PRICE_TRACKER']
    WAR_BRIEFING = ARRAY_DICT['WAR_BRIEFING']
    TECH_MAP = ARRAY_DICT['TECH_MAP']

    clearScreen()
    fast_print('Processing next year....')
    print('')

    previousPrices = copy.deepcopy(PRICE_TRACKER)

    # ITERATE FOR EACH TEAM
    for x in range(0, len(NATION_ARRAY)):
        currentNation = NATION_ARRAY[x]
        index = x

        # AI TEAM DECISION
        if currentNation != myNation:
            currentNation = AI.setAIMoves(index, currentNation, ARRAY_DICT)

        # ACTION CARRIED OUT FOR ALL USERS
        NATION_ARRAY, PRICE_TRACKER = action(index, ARRAY_DICT, currentNation,
                                             p, playerNationIndex)

        # BRANCH PROMOTIONS
        currentNation = financeFunction.promotion(currentNation, p, index,
                                                  playerNationIndex)
        currentNation = warFunction.promotion(currentNation, p, index,
                                              playerNationIndex)
        #currentNation = financeFunction.promotion(currentNation,p,index,playerNationIndex)
        #currentNation = financeFunction.promotion(currentNation,p,index,playerNationIndex)

    # Only talling scores at the end....may need to change
    print('Tallying scores')
    NATION_ARRAY = tallyScores(NATION_ARRAY)
    NATION_ARRAY = defaultNextStep(NATION_ARRAY)

    # UPDATE PRICE
    PRICE_TRACKER = updatePrice(PRICE_TRACKER, previousPrices)

    # UPDATE WAR

    # UPDATE TECH

    myNation = menu(myNation, PRICE_TRACKER, previousPrices, p, year)
    # INCREMENT THE YEARS
    year = year + 1

    return (year, NATION_ARRAY, PRICE_TRACKER, WAR_BRIEFING, p)
Пример #8
0
def academiaMenu(myNation, year, TECH_MAP):
    flag = ''
    academicSelection = ' '
    while academicSelection != 'XYZFFJJJJJJ':
        clearScreen()
        print('+++++++++++++++++++++++++++++++++++++++++++++++++++')
        print('        + x % THIS IS ACADEMIA + X %               ')
        print('+++++++++++++++++++++++++++++++++++++++++++++++++++')
        print('')
        print('My Team                : ' + str(myNation[1]))
        print('Year                   : ' + str(year))
        print('Knowledge       (KP)   : ' +
              str(myNation[0]['Tech']['knowledge']))
        print('Era                    : ' + str(myNation[0]['Tech']['era']))
        print('Research Points (RP)   : ' +
              str(myNation[0]['Tech']['research points']))
        print('Level                  : ' + str(myNation[0]['Tech']['level']))
        print(' ')
        print('')
        flag = showAssets(myNation, year, flag)
        print('')
        print('[R] Research Grant')
        print('[C] Collaborate')
        print('[G] Grant')
        print('[R] Return')
        print(' ')
        print(' ')
        print(' ')
        print('Moves: ' + str(checkMoves(myNation, "%^")[0]))
        print('****************************************')
        print(' ')
        print(' ')
        academicSelection = str(input('Please chose an option \n')).upper()
        if academicSelection == 'A':
            fast_print('not ready')
            #myNation = drillMenu(myNation,year,WAR_BRIEFING)
        if academicSelection == 'R':
            fast_print('not ready')
        if academicSelection == 'O':
            fast_print('not ready')
        if academicSelection == 'T':
            fast_print('not ready')
        if academicSelection == 'T':
            fast_print('not ready')
        if academicSelection == 'S':
            flag = 'yes'
        if academicSelection == 'R' or academicSelection == '':
            return (myNation)
    return (myNation)
Пример #9
0
def techMenu(myNation, year, PRICE_TRACKER, TECH_MAP):
    flag = ''
    techSelection = ' '
    while techSelection != 'XYZFFJJJJJJ':
        clearScreen()
        print('+++++++++++++++++++++++++++++++++++++++++++++++++++')
        print('        WELCOME TO THE TECHNOLOGY INSTITUE %       ')
        print('+++++++++++++++++++++++++++++++++++++++++++++++++++')
        print('')
        print('My Team                : ' + str(myNation[1]))
        print('Year                   : ' + str(year))
        print('Knowledge       (KP)   : ' +
              str(myNation[0]['Tech']['knowledge']))
        print('Era                    : ' + str(myNation[0]['Tech']['era']))
        print('Research Points (RP)   : ' +
              str(myNation[0]['Tech']['research points']))
        print('Level                  : ' + str(myNation[0]['Tech']['level']))
        print(' ')
        print('')
        flag = showAssets(myNation, year, flag)
        print('')
        print('[A] Academia')
        print('[R] Research')
        print('[S] Show Tech Assets')
        print('[R] Return')
        print(' ')
        print(' ')
        print(' ')
        print('Moves: ' + str(checkMoves(myNation, "%^")[0]))
        print('****************************************')
        print(' ')
        print(' ')
        techSelection = str(input('Please chose an option \n')).upper()
        if techSelection == 'A':
            print('Not ready yet..')
            #myNation = academiaMenu(myNation,year,TECH_MAP)
        if techSelection == 'R':
            myNation = researchMenu(myNation, year, TECH_MAP)
        if techSelection == 'O':
            fast_print('not ready')
        if techSelection == 'T':
            fast_print('not ready')
        if techSelection == 'T':
            fast_print('not ready')
        if techSelection == 'S':
            flag = 'yes'
        if techSelection == 'R' or techSelection == '':
            return (myNation)
    return (myNation)
Пример #10
0
def showFriendship(myNation, friendshipFlag):
    if friendshipFlag == 'Y':
        print(str(myNation[1]) + ' INTERNATIONAL RELATIONS')
        print('---------------------------------------------')
        for nation in myNation[0]['Friendship'].keys():
            paddingLen = 15 - len(nation)
            padding = ''
            for x in range(0, paddingLen):
                padding = padding + ' '

            print(
                str(nation) + str(padding) + ': Friendship Level = ' +
                str(myNation[0]['Friendship'][nation]['level']))
        input('Enter to continue \n')
        clearScreen()
        friendshipFlag = 'N'
    return (friendshipFlag)
Пример #11
0
def financeBeuro(myNation, year, PRICE_TRACKER, NATION_ARRAY):
    financeSelection = ' '
    while financeSelection != 'XYZFFJJJJJJ':
        clearScreen()
        print('$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$')
        print('     WELCOME TO THE FINANCE BEURO    😊💰        ')
        print('$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$')
        # print('$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$')
        # print('     WELCOME TO THE FINANCE BEURO    ;-)         ')
        # print('$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$')
        print('')
        print('My Team: ' + str(myNation[1]))
        print('Year: ' + str(year))
        print('Wealth : ' + str(myNation[0]['Finance']['wealth']))
        print('Level  : ' + str(myNation[0]['Finance']['level']))
        print('')
        print('[G] Gamble')
        print('[I] Invest')
        print('[T] Trade Exchange')
        print('[R] Return')
        print(' ')
        print(' ')
        print('Moves: ' +
              str(myNation[0]['Special']['moveLimit'] -
                  len(myNation[0]['Nextmoves']) +
                  str(sum(myNation[0]['Nextmoves'], [])).count('pending')))
        print('**************************************************')
        print(' ')
        print(' ')
        financeSelection = str(input('Please chose an option \n')).upper()
        if financeSelection == 'G':
            myNation = gambleMenu(myNation, year)
        if financeSelection == 'I':
            myNation = investMenu(myNation, year, PRICE_TRACKER, NATION_ARRAY)
        if financeSelection == 'T':
            myNation = tradeMenu(myNation, year, PRICE_TRACKER)
        if financeSelection == 'R' or financeSelection == '':
            return (myNation)
    return (myNation)
Пример #12
0
def showResources(myNation, year, PRICE_TRACKER, investFlag):
    if investFlag == 'Y':
        clearScreen()
        goldPrice = PRICE_TRACKER['gold']['price']
        gemPrice = PRICE_TRACKER['gems']['price']
        metalPrice = PRICE_TRACKER['raremetals']['price']
        oilPrice = PRICE_TRACKER['oil']['price']
        myWealth = myNation[0]['Finance']['wealth']
        print('     ***EXCHANGE RATES***')
        print('')
        print('     Gold        : ' + '$' + str(goldPrice) + ' ' +
              str(PRICE_TRACKER['gold']['priceChange']))
        print('     Gems        : ' + '$' + str(gemPrice) + ' ' +
              str(PRICE_TRACKER['gems']['priceChange']))
        print('     Rare Metals : ' + '$' + str(metalPrice) + ' ' +
              str(PRICE_TRACKER['raremetals']['priceChange']))
        print('     Oil         : ' + '$' + str(oilPrice) + ' ' +
              str(PRICE_TRACKER['oil']['priceChange']))
        print('')
        input('Enter to continue \n')
        clearScreen()
        investFlag = 'N'
    return (investFlag)
Пример #13
0
def showAssets(myNation, year, flag):
    if flag == 'yes':
        unitOne = myNation[0]['War']['weapons']['1']
        unitTwo = myNation[0]['War']['weapons']['2']
        unitThree = myNation[0]['War']['weapons']['3']
        unitFour = myNation[0]['War']['weapons']['4']
        unitFive = myNation[0]['War']['weapons']['5']
        unitSix = myNation[0]['War']['weapons']['6']
        unitSeven = myNation[0]['War']['weapons']['7']
        unitEight = myNation[0]['War']['weapons']['8']
        print('Light Unit : ' + str(unitOne[1] + unitTwo[1]))
        print('--------------')
        print(str(unitOne[0]) + ' : ' + str(unitOne[1]))
        print(str(unitTwo[0]) + ' : ' + str(unitTwo[1]))
        print('')
        print('Core Division : ' +
              str(unitThree[1] + unitFour[1] + unitFive[1]))
        print('--------------')
        print(str(unitThree[0]) + ' : ' + str(unitThree[1]))
        print(str(unitFour[0]) + ' : ' + str(unitFour[1]))
        print(str(unitFive[0]) + ' : ' + str(unitFive[1]))
        print('')
        print('Heavy Forces: ' + str(unitSix[1] + unitSeven[1]))
        print('--------------')
        print(str(unitSix[0]) + ' : ' + str(unitSix[1]))
        print(str(unitSeven[0]) + ' : ' + str(unitSeven[1]))
        print('')
        print('Super Weapon')
        print('--------------')
        print(str(unitEight[0]) + ' : ' + str(unitEight[1]))
        print('Total Firepower : ' + str(myNation[0]['War']['firePower']))
        print(' ')
        input('Enter to continue \n')
        clearScreen()
        flag = 'no'
    return (flag)
Пример #14
0
def sellMenu(myNation, year, PRICE_TRACKER):
    financeSelection = ' '

    while financeSelection != 'XYZFFJJJJJJ':
        clearScreen()
        goldPrice = PRICE_TRACKER['gold']['price']
        gemPrice = PRICE_TRACKER['gems']['price']
        metalPrice = PRICE_TRACKER['raremetals']['price']
        oilPrice = PRICE_TRACKER['oil']['price']
        myWealth = myNation[0]['Finance']['wealth']

        print('$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$')
        print('         💰💰💰  SELL SELL SELL   💰💰💰💰     ')
        print('$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$')
        # print('$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$')
        # print('            £££  SELL SELL SELL     $$$          ')
        # print('$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$')
        print('')
        print('My Team: ' + str(myNation[1]))
        print('Year: ' + str(year))
        print('Wealth : ' + str(myWealth))
        print('Level  : ' + str(myNation[0]['Finance']['level']))
        print('Stash: Gld:' + str(myNation[0]['Finance']['gold']) + ' Gms: ' +
              str(myNation[0]['Finance']['gems']) + ' Rm: ' +
              str(myNation[0]['Finance']['raremetals']) + ' Oil: ' +
              str(myNation[0]['Finance']['oil']))
        print('')
        print('')
        print('     ***EXCHANGE RATES***')
        print('')
        print('     Gold        : ' + '$' + str(goldPrice) + ' ' +
              str(PRICE_TRACKER['gold']['priceChange']))
        print('     Gems        : ' + '$' + str(gemPrice) + ' ' +
              str(PRICE_TRACKER['gems']['priceChange']))
        print('     Rare Metals : ' + '$' + str(metalPrice) + ' ' +
              str(PRICE_TRACKER['raremetals']['priceChange']))
        print('     Oil         : ' + '$' + str(oilPrice) + ' ' +
              str(PRICE_TRACKER['oil']['priceChange']))
        print('')
        print('')
        print('')
        print('[G] Sell Gold')
        print('[P] Sell Precious Gems')
        print('[R] Sell Rare Metals')
        print('[O] Sell Oil')
        print('[A] Show median rates')
        print('[H] Show historical prices')
        print('[M] Show Marketplace stock')
        print('')
        print('')
        print('[R] Return')
        #print('[M] Main Menu')
        print(' ')
        print('Moves: ' +
              str(myNation[0]['Special']['moveLimit'] -
                  len(myNation[0]['Nextmoves']) +
                  str(sum(myNation[0]['Nextmoves'], [])).count('pending')))
        print('***************************************************')
        print(' ')
        print(' ')

        # CHECK MAX MOVES SINCE INSIDE WHILE LOOP
        moveLimit = int(
            myNation[0]['Special']['moveLimit'] -
            len(myNation[0]['Nextmoves']) +
            str(sum(myNation[0]['Nextmoves'], [])).count('pending'))
        if moveLimit < 1:
            input('you have used up all your moves for this round')
            return (myNation)

        financeSelection = str(input('Please chose an option \n')).upper()
        if financeSelection == 'G':
            myNation = sell(myWealth, goldPrice, myNation, 'gold')
        if financeSelection == 'P':
            myNation = sell(myWealth, gemPrice, myNation, 'gems')
        if financeSelection == 'R':
            myNation = sell(myWealth, metalPrice, myNation, 'raremetals')
        if financeSelection == 'O':
            myNation = sell(myWealth, oilPrice, myNation, 'oil')
        if financeSelection == 'A':
            for item in PRICE_TRACKER:
                print('Average ' + str(item) + ' price: ' +
                      str(PRICE_TRACKER[item]['average']))
            input('Press enter to continue \n')
        if financeSelection == 'H':
            for item in PRICE_TRACKER:
                print('Historical ' + str(item) + ' prices: ' +
                      str((PRICE_TRACKER[item]['history'])))
                print('')
            input('Press enter to continue \n')
        if financeSelection == 'M':
            for item in PRICE_TRACKER:
                print(
                    str(item) + ' stock available to buy : ' +
                    str((PRICE_TRACKER[item]['stock'])))
                print('')
            input('Press enter to continue \n')
        if financeSelection == 'R' or financeSelection == 'r' or financeSelection == '':
            return (myNation)
        if financeSelection == 'M' or financeSelection == 'm':
            print('exiting...')
            return (myNation)
Пример #15
0
def researchMenu(myNation, year, TECH_MAP):
    flag = ''
    advanceFlag = 'On'
    researchSelection = ' '
    while researchSelection != 'XYZFFJJJJJJ':
        one = myNation[0]['Tech']['researched']['one']
        two = myNation[0]['Tech']['researched']['two']
        three = myNation[0]['Tech']['researched']['three']
        four = myNation[0]['Tech']['researched']['four']
        five = myNation[0]['Tech']['researched']['five']
        clearScreen()
        print('+++++++++++++++++++++++++++++++++++++++++++++++++++')
        print('        777777 RESEARCH HUB 7777777                ')
        print('+++++++++++++++++++++++++++++++++++++++++++++++++++')
        print('')
        print('My Team                : ' + str(myNation[1]))
        print('Year                   : ' + str(year))
        print('Knowledge       (KP)   : ' +
              str(myNation[0]['Tech']['knowledge']))
        print('Era                    : ' + str(myNation[0]['Tech']['era']))
        print('Research Points (RP)   : ' +
              str(myNation[0]['Tech']['research points']))
        print('Level                  : ' + str(myNation[0]['Tech']['level']))
        print(' ')
        print('')
        print('Development Completion')
        print('===================')
        if advanceFlag == 'On':
            advanceFlag = PrintResearch([one, two, three, four, five])
        flag = showAssets(myNation, year, flag)
        print('')
        printCurrentResearch(myNation)
        print('')
        print('[A] Advance Era')
        print('[D] Develop Technology')
        print('[G] Research Grant')
        print('[P] Purchase Technology')
        print('[R] Return')
        print(' ')
        print(' ')
        print(' ')
        print('Moves: ' + str(checkMoves(myNation, "%^")[0]))
        print('****************************************')
        print(' ')
        print(' ')
        researchSelection = str(input('Please chose an option \n')).upper()
        if researchSelection == 'A':
            myNation = advanceEra(myNation,
                                  one,
                                  two,
                                  three,
                                  four,
                                  five,
                                  TECH_MAP,
                                  era=myNation[0]['Tech']['era'])
        if researchSelection == 'D':
            myNation = selectTech(myNation, one, two, three, four, five,
                                  TECH_MAP)
        if researchSelection == 'G':
            myNation = gainResearchPoints(myNation)
        if researchSelection == 'P':
            print('not ready..')
        if researchSelection == 'S':
            flag = 'yes'
        if researchSelection == 'R' or researchSelection == '':
            return (myNation)
    return (myNation)
Пример #16
0
def weaponsMenu(myNation, year, WAR_BRIEFING):
    flag = ''
    warSelection = ' '
    while warSelection != 'XYZFFJJJJJJ':
        clearScreen()
        unitOne = myNation[0]['War']['weapons']['1']
        unitTwo = myNation[0]['War']['weapons']['2']
        unitThree = myNation[0]['War']['weapons']['3']
        unitFour = myNation[0]['War']['weapons']['4']
        unitFive = myNation[0]['War']['weapons']['5']
        unitSix = myNation[0]['War']['weapons']['6']
        unitSeven = myNation[0]['War']['weapons']['7']
        unitEight = myNation[0]['War']['weapons']['8']
        print('+++++++++++++++++++++++++++++++++++++++++++++++++++')
        print('                 WEAPONS DEPOT           :X        ')
        print('+++++++++++++++++++++++++++++++++++++++++++++++++++')
        print('')
        print('My Team        : ' + str(myNation[1]))
        print('Year           : ' + str(year))
        print('Might          : ' + str(myNation[0]['War']['might']))
        print('Rank           : ' + str(myNation[0]['War']['level']))
        print('Light Unit     : ' + str(unitOne[1] + unitTwo[1]))
        print('Core Division  : ' +
              str(unitThree[1] + unitFour[1] + unitFive[1]))
        print('Heavy Forces   : ' + str(unitSix[1] + unitSeven[1]))
        print('SuperWeapons   : ' + str(unitEight[1]))
        print('Firepower      : ' + str(myNation[0]['War']['firePower']))
        print(' ')
        print('')
        print("""
(╯°□°)--︻╦╤─ - - - 
                """)
        flag = showAssets(myNation, year, flag)
        print('')
        print('[B] Build')
        print('[S] Scrap')
        print(' ')
        print(' ')
        print('[V] View my units')
        print('[R] Return')
        print(' ')
        print(' ')
        print(' ')
        print('Moves: ' + str(checkMoves(myNation, "%^")[0]))
        print('****************************************')
        print(' ')
        print(' ')
        # CHECK MAX MOVES SINCE INSIDE WHILE LOOP
        returnCode = checkMoves(myNation, '%^')[1]
        if returnCode > 0:
            fast_print('All moves used up')
            return (myNation)
        warSelection = str(input('Please chose an option \n')).upper()
        if warSelection == 'B':
            myNation = buildMenu(myNation, year, WAR_BRIEFING)
        if warSelection == 'S':
            myNation = scrapMenu(myNation, year, WAR_BRIEFING)
        if warSelection == 'T':
            fast_print('not ready')
        if warSelection == 'T':
            fast_print('not ready')
        if warSelection == 'V':
            flag = 'yes'
        if warSelection == 'R' or warSelection == '':
            return (myNation)
    return (myNation)
Пример #17
0
def stats(NATION_ARRAY):
    clearScreen()
    print('Printing nation list')
    print('')
    
    print('|    NAME      |  SCORE   |  WEALTH  |     MIGHT    |KNOWLEDGE |INFLUENCE |   ')
    print('___________________________________________________________________________')

    rankCounter = []
    for x in range(0, len(NATION_ARRAY)):
        rankCounter.append((NATION_ARRAY[x][0]['Score'],x))
    rankCounter.sort(reverse=True)

    for x in range(0, len(rankCounter)):
        index = rankCounter[x][1]

        name = str(NATION_ARRAY[index][-1])
        for a in range(0, (14 - len(name))): name = name + ' '

        score = str(NATION_ARRAY[index][0]['Score'])
        for b in range(0, (10 - len(score))): score = score + ' '

        tradeScore = str(NATION_ARRAY[index][0]['Finance']['wealth'])
        for c in range(0, (10 - len(tradeScore))): tradeScore = tradeScore + ' '

        techScore = str(NATION_ARRAY[index][0]['Tech']['knowledge'])
        for d in range(0, (10 - len(techScore))): techScore = techScore + ' '

        warScore = str(NATION_ARRAY[index][0]['War']['might'])
        for e in range(0, (14 - len(warScore))): warScore = warScore + ' '

        politics = str(NATION_ARRAY[index][0]['Politics']['influence'])
        for f in range(0, (10 - len(politics))): politics = politics + ' '

        print( '|' + name + '|' + score + '|' + tradeScore + '|' + warScore + '|' + techScore + '|' + politics + '|' + '   '  )
    print('___________________________________________________________________________')
    print('')
    print('')
    buffer = input('Press enter to continue \n')
    clearScreen()
    print('Printing nation list')
    print('')
    print('|    NAME      |SCIENCE ERA              |FINANCE RANK        |FIREPOWER   |POLITICS LEVEL |   ')
    print('____________________________________________________________________________________________')

    for x in range(0, len(rankCounter)):
        index = rankCounter[x][1]

        name = str(NATION_ARRAY[index][-1])
        for a in range(0, (14 - len(name))): name = name + ' '

        era = str(NATION_ARRAY[index][0]['Tech']['era'])
        for b in range(0, (25 - len(era))): era = era + ' '

        fLevel = str(NATION_ARRAY[index][0]['Finance']['level'])
        for c in range(0, (20 - len(fLevel))): fLevel = fLevel + ' '

        firepower = str(NATION_ARRAY[index][0]['War']['firePower'])
        for d in range(0, (12 - len(firepower))): firepower = firepower + ' '

        pLevel = str(NATION_ARRAY[index][0]['Politics']['level'])
        for e in range(0, (15 - len(pLevel))): pLevel = pLevel + ' '

        print( '|' + name + '|' + era + '|' + fLevel + '|' + firepower + '|' + pLevel  + '|' + '   '  )
    
    print('____________________________________________________________________________________________')
    print('')
    print('')
    buffer = input('Press enter to continue \n')
    clearScreen()
    print('Printing Research Completion')
    print('')


    print('|    NAME      |' + 'Tech Stream One          ' + '|' + 'Tech Stream Two          ' + '|' + 'Tech Stream Three        ' + '|' + 'Tech Stream Four         '  + '|' +  'Tech Stream Five         '  + '|    ' )
    print('_________________________________________________________________________________________________________________________________________________')

    for x in range(0, len(rankCounter)):
        index = rankCounter[x][1]

        name = str(NATION_ARRAY[index][-1]) 
        for f in range(0, (14 - len(name))): name = name + ' '

        one = str(NATION_ARRAY[index][0]['Tech']['researched']['one'][1]) + ':' + str(NATION_ARRAY[index][0]['Tech']['researched']['one'][2]) + str('%')
        for g in range(0, (25 - len(one))): one = one + ' '

        two = str(NATION_ARRAY[index][0]['Tech']['researched']['two'][1]) + ':' +  str(NATION_ARRAY[index][0]['Tech']['researched']['two'][2]) + str('%')
        for h in range(0, (25 - len(two))): two = two + ' '

        three = str(NATION_ARRAY[index][0]['Tech']['researched']['three'][1])  + ':' +  str(NATION_ARRAY[index][0]['Tech']['researched']['three'][2]) + str('%')
        for i in range(0, (25 - len(three))): three = three + ' '

        four = str(NATION_ARRAY[index][0]['Tech']['researched']['four'][1]) + ':' +  str(NATION_ARRAY[index][0]['Tech']['researched']['four'][2]) + str('%')
        for j in range(0, (25 - len(four))): four = four + ' '

        five = str(NATION_ARRAY[index][0]['Tech']['researched']['five'][1]) + ':' +  str(NATION_ARRAY[index][0]['Tech']['researched']['five'][2]) + str('%')
        for k in range(0, (25 - len(five))): five = five + ' '

        print( '|' + name + '|' + one + '|' + two + '|' + three + '|' + four  + '|' + five  + '|' + '   '  )

    print('_________________________________________________________________________________________________________________________________________________')
    print('')
    print('')
    buffer = input('Press enter to continue \n')
    clearScreen()
    clearScreen()
    print('Printing Military Disposition')
    print('')

    print('|    NAME      |' + 'Light Units                   ' + '|' + '                          Core Division                     '  + '|    ' )
    print('___________________________________________________________________________________________________________')


    for x in range(0, len(rankCounter)):
        index = rankCounter[x][1]
        unitOne      = NATION_ARRAY[index][0]['War']['weapons']['1']
        unitTwo      = NATION_ARRAY[index][0]['War']['weapons']['2']
        unitThree    = NATION_ARRAY[index][0]['War']['weapons']['3']
        unitFour     = NATION_ARRAY[index][0]['War']['weapons']['4']
        unitFive     = NATION_ARRAY[index][0]['War']['weapons']['5']
        unitSix      = NATION_ARRAY[index][0]['War']['weapons']['6']
        unitSeven    = NATION_ARRAY[index][0]['War']['weapons']['7']
        unitEight    = NATION_ARRAY[index][0]['War']['weapons']['8']

        name = str(NATION_ARRAY[index][-1]) 
        for f in range(0, (14 - len(name))): name = name + ' '

        light = str(unitOne[0]) + ':' + str(unitOne[1]) + ' '  + str(unitTwo[0]) + ':' + str(unitTwo[1])
        for g in range(0, (30 - len(light))): light = light + ' '

        core = str(unitThree[0]) + ':' + str(unitThree[1]) + ' '  + str(unitFour[0]) + ':' + str(unitFour[1]) + ' '  + str(unitFive[0]) + ':' + str(unitFive[1])
        for h in range(0, (60 - len(core))): core = core + ' '

        print( '|' + name + '|' + light + '|' + core + '|' + '   '  )

    print('_________________________________________________________________________________________________________')
    print('')
    print('')
    buffer = input('Press enter to continue \n')
    clearScreen()

    print('')

    print('|    NAME      |' + '             Heavy Forces               ' + '|' + 'Super Weapons            '  + '|    ' )
    print('________________________________________________________________________________')


    for x in range(0, len(rankCounter)):
        index = rankCounter[x][1]
        unitOne      = NATION_ARRAY[index][0]['War']['weapons']['1']
        unitTwo      = NATION_ARRAY[index][0]['War']['weapons']['2']
        unitThree    = NATION_ARRAY[index][0]['War']['weapons']['3']
        unitFour     = NATION_ARRAY[index][0]['War']['weapons']['4']
        unitFive     = NATION_ARRAY[index][0]['War']['weapons']['5']
        unitSix      = NATION_ARRAY[index][0]['War']['weapons']['6']
        unitSeven    = NATION_ARRAY[index][0]['War']['weapons']['7']
        unitEight    = NATION_ARRAY[index][0]['War']['weapons']['8']

        name = str(NATION_ARRAY[index][-1]) 
        for f in range(0, (14 - len(name))): name = name + ' '

        heavy = str(unitSix[0]) + ':' + str(unitSix[1]) + ' '  + str(unitSeven[0]) + ':' + str(unitSeven[1])
        for i in range(0, (40 - len(heavy))): heavy = heavy + ' '

        superW = str(unitEight[0]) + ':' + str(unitEight[1])
        for j in range(0, (25 - len(superW))): superW = superW + ' '

        print( '|' + name + '|'  + heavy + '|' + superW  + '|' + '   '  )

    print('___________________________________________________________________________________')
    print('')
    print('')
    buffer = input('Press enter to continue \n')
    clearScreen()
Пример #18
0
def warMinistry(myNation, NATION_ARRAY, year, WAR_BRIEFING):
    flag = ''
    warSelection = ' '
    while warSelection != 'XYZFFJJJJJJ':
        clearScreen()
        # NUMER
        unitOne = myNation[0]['War']['weapons']['1'][1]
        unitTwo = myNation[0]['War']['weapons']['2'][1]
        unitThree = myNation[0]['War']['weapons']['3'][1]
        unitFour = myNation[0]['War']['weapons']['4'][1]
        unitFive = myNation[0]['War']['weapons']['5'][1]
        unitSix = myNation[0]['War']['weapons']['6'][1]
        unitSeven = myNation[0]['War']['weapons']['7'][1]
        unitEight = myNation[0]['War']['weapons']['8'][1]
        print('+++++++++++++++++++++++++++++++++++++++++++++++++++')
        print('        WELCOME TO THE MINISTRY OF WAR   :X        ')
        print('+++++++++++++++++++++++++++++++++++++++++++++++++++')
        print('')
        print('My Team   : ' + str(myNation[1]))
        print('Year      : ' + str(year))
        print('Might     : ' + str(myNation[0]['War']['might']))
        print('Rank     : ' + str(myNation[0]['War']['level']))
        print('Firepower : ' + str(myNation[0]['War']['firePower']))
        print(' ')
        print('')
        print("""
(╯°□°)--︻╦╤─ - - - 
                """)
        flag = showAssets(myNation, year, flag)
        print('')
        print('[C] Combat Manevres')
        print('[W] Weapons')
        print('[O] Offensive Missions')
        print(' ')
        print(' ')
        print(' ')
        print(' ')
        print('[A] Show Military Assets')
        print('[R] Return')
        print(' ')
        print(' ')
        print(' ')
        print('Moves: ' + str(checkMoves(myNation, "%^")[0]))
        print('****************************************')
        print(' ')
        print(' ')
        warSelection = str(input('Please chose an option \n')).upper()
        if warSelection == 'C':
            myNation = manoeuvresMenu(myNation, year, WAR_BRIEFING)
        if warSelection == 'W':
            myNation = weaponsMenu(myNation, year, WAR_BRIEFING)
        if warSelection == 'O':
            myNation = missionsMenu(myNation, NATION_ARRAY, year, WAR_BRIEFING)
        if warSelection == 'T':
            fast_print('not ready')
        if warSelection == 'T':
            fast_print('not ready')
        if warSelection == 'A':
            flag = 'yes'
        if warSelection == 'R' or warSelection == '':
            return (myNation)
    return (myNation)
Пример #19
0
def manoeuvresMenu(myNation, year, WAR_BRIEFING):
    manoeuvresSelection = ' '
    flag = ''
    while manoeuvresSelection != 'XYZFFJJJJJJ':
        clearScreen()
        unitOne = myNation[0]['War']['weapons']['1']
        unitTwo = myNation[0]['War']['weapons']['2']
        unitThree = myNation[0]['War']['weapons']['3']
        unitFour = myNation[0]['War']['weapons']['4']
        unitFive = myNation[0]['War']['weapons']['5']
        unitSix = myNation[0]['War']['weapons']['6']
        unitSeven = myNation[0]['War']['weapons']['7']
        unitEight = myNation[0]['War']['weapons']['8']

        print('+++++++++++++++++++++++++++++++++++++++++++++++++++')
        print('       !!MILITARY MANOEUVRES HQ!!        :X        ')
        print('+++++++++++++++++++++++++++++++++++++++++++++++++++')
        print('')
        print('My Team        : ' + str(myNation[1]))
        print('Year           : ' + str(year))
        print('Might          : ' + str(myNation[0]['War']['might']))
        print('Rank           : ' + str(myNation[0]['War']['level']))
        print('Light Unit     : ' + str(unitOne[1] + unitTwo[1]))
        print('Core Division  : ' +
              str(unitThree[1] + unitFour[1] + unitFive[1]))
        print('Heavy Forces   : ' + str(unitSix[1] + unitSeven[1]))
        print('SuperWeapons   : ' + str(unitEight[1]))
        print('Firepower      : ' + str(myNation[0]['War']['firePower']))
        print(' ')
        print(' ')
        flag = showAssets(myNation, year, flag)
        print('')
        print('[D] Drill your forces')
        print('[J] Joint manoeuvres')
        print('[I] Intimidation manoeuvres')
        print(' ')
        print(' ')
        print('[D] Detailed forces review')
        print('[R] Return')
        print(' ')
        print(' ')
        print(' ')
        print('Moves: ' + str(checkMoves(myNation, "%^")[0]))
        print('****************************************')
        print(' ')
        print(' ')
        # CHECK MAX MOVES SINCE INSIDE WHILE LOOP
        returnCode = checkMoves(myNation, '%^')[1]
        if returnCode > 0:
            fast_print('All moves used up')
            return (myNation)

        manoeuvresSelection = input('Select an option \n').upper()
        clearScreen()
        if manoeuvresSelection == 'D':
            myNation = drillMenu(myNation, year, WAR_BRIEFING)
        if manoeuvresSelection == 'J':
            print('Not ready')
        if manoeuvresSelection == 'I':
            print('Not ready')
        if manoeuvresSelection == 'D':
            flag = 'yes'
        if manoeuvresSelection == 'R' or manoeuvresSelection == '':
            return (myNation)
    return (myNation)
Пример #20
0
def scrapMenu(myNation, year, WAR_BRIEFING):
    era = myNation[0]['Tech']['era']
    WARONE = WAR_BRIEFING['weapons'][era]['1']
    WARTWO = WAR_BRIEFING['weapons'][era]['2']
    WARTHREE = WAR_BRIEFING['weapons'][era]['3']
    WARFOUR = WAR_BRIEFING['weapons'][era]['4']
    WARFIVE = WAR_BRIEFING['weapons'][era]['5']
    WARSIX = WAR_BRIEFING['weapons'][era]['6']
    WARSEVEN = WAR_BRIEFING['weapons'][era]['7']
    WAREIGHT = WAR_BRIEFING['weapons'][era]['8']
    flag = ''
    buildSelection = ' '
    show = 'off'
    price = 'off'
    while buildSelection != 'XYZFFJJJJJJ':
        clearScreen()
        unitOne = myNation[0]['War']['weapons']['1']
        unitTwo = myNation[0]['War']['weapons']['2']
        unitThree = myNation[0]['War']['weapons']['3']
        unitFour = myNation[0]['War']['weapons']['4']
        unitFive = myNation[0]['War']['weapons']['5']
        unitSix = myNation[0]['War']['weapons']['6']
        unitSeven = myNation[0]['War']['weapons']['7']
        unitEight = myNation[0]['War']['weapons']['8']
        techLevel = myNation[0]['Tech']['level']
        print('+++++++++++++++++++++++++++++++++++++++++++++++++++')
        print('                    SCRAP YARD           :X        ')
        print('+++++++++++++++++++++++++++++++++++++++++++++++++++')
        print('')
        print('My Team   : ' + str(myNation[1]))
        print('Year      : ' + str(year))
        print('Might     : ' + str(myNation[0]['War']['might']))
        print('Wealth    : ' + str(myNation[0]['Finance']['wealth']))
        print('Tech Lv   : ' + str(techLevel))
        print('')
        print('')
        print('SuperWeapons: ' + str(unitEight[1]))
        print('Total Firepower : ' + str(myNation[0]['War']['firePower']))
        print(' ')
        print('')
        print("""
(╯°□°)--︻╦╤─ - - - 
                """)
        print('')
        print('Scrap')
        print('[A] ' + str(unitOne[0]))
        print('[B] ' + str(unitTwo[0]))
        print('[C] ' + str(unitThree[0]))
        print('[D] ' + str(unitFour[0]))
        print('[E] ' + str(unitFive[0]))
        print('[F] ' + str(unitSix[0]))
        print('[G] ' + str(unitSeven[0]))
        print('[H] ' + str(unitEight[0]))
        print('')
        print('')
        if price == 'on':
            print('======================')
            print('       VALUATIONS     ')
            print('======================')
            print('______________________')
            print('Light Unit            :')
            print('----------------------')
            print(str(WARONE[0]) + ' = $' + str(WARONE[2]))
            print('buildTime    = ' + str(WARONE[3]))
            print('MightPoints  = +' + str(WARONE[4]) + '%')
            print('')
            print(str(WARTWO[0]) + ' = $' + str(WARTWO[2]))
            print('buildTime    = ' + str(WARTWO[3]))
            print('MightPoints  = +' + str(WARTWO[4]) + '%')
            print('')
            print('______________')
            print('Core Division         : ')
            print('--------------')
            print(str(WARTHREE[0]) + ' = $' + str(WARTHREE[2]))
            print('buildTime    = ' + str(WARTHREE[3]))
            print('MightPoints  = +' + str(WARTHREE[4]) + '%')
            print('')
            print(str(WARFOUR[0]) + ' = $' + str(WARFOUR[2]))
            print('buildTime    = ' + str(WARFOUR[3]))
            print('MightPoints  = +' + str(WARFOUR[4]) + '%')
            print('')
            print(str(WARFIVE[0]) + ' = $' + str(WARFIVE[2]))
            print('buildTime    = ' + str(WARFIVE[3]))
            print('MightPoints  = +' + str(WARFIVE[4]) + '%')
            print('')
            print('______________')
            print('Heavy Forces     : ')
            print('--------------')
            print(str(WARSIX[0]) + ' = $' + str(WARSIX[2]))
            print('buildTime    = ' + str(WARSIX[3]))
            print('MightPoints  = +' + str(WARSIX[4]) + '%')
            print('')
            print(str(WARSEVEN[0]) + ' = $' + str(WARSEVEN[2]))
            print('buildTime    = ' + str(WARSEVEN[3]))
            print('MightPoints  = +' + str(WARSEVEN[4]) + '%')
            print('')
            print('')
            print(str(WAREIGHT[0]) + ' = $' + str(WAREIGHT[2]))
            print('buildTime    = ' + str(WAREIGHT[3]))
            print('MightPoints  = +' + str(WAREIGHT[4]) + '%')
            print('')
            fast_print('Press Enter to clear ')
            print('')
            price = 'off'
        if show == 'on':
            print('Light Unit : ' + str(unitOne[1] + unitTwo[1]))
            print('--------------')
            print(str(unitOne[0]) + ' : ' + str(unitOne[1]))
            print(str(unitTwo[0]) + ' : ' + str(unitTwo[1]))
            print('')
            print('Core Division : ' +
                  str(unitThree[1] + unitFour[1] + unitFive[1]))
            print('--------------')
            print(str(unitThree[0]) + ' : ' + str(unitThree[1]))
            print(str(unitFour[0]) + ' : ' + str(unitFour[1]))
            print(str(unitFive[0]) + ' : ' + str(unitFive[1]))
            print('')
            print('Heavy Forces: ' + str(unitSix[1] + unitSeven[1]))
            print('--------------')
            print(str(unitSix[0]) + ' : ' + str(unitSix[1]))
            print(str(unitSeven[0]) + ' : ' + str(unitSeven[1]))
            print('')
            print('Super Weapon')
            print('--------------')
            print(str(unitEight[0]) + ' : ' + str(unitEight[1]))
            print('')
            fast_print('press Enter to clear')
            print(' ')
            show = 'off'
        print('Options')
        print('[V] View your units')
        print('[P] Get Unit scrap valuation')
        print('[R] Return')
        print(' ')
        print(' ')
        print(' ')
        print('Moves: ' + str(checkMoves(myNation, "%^")[0]))
        print('****************************************')
        print(' ')
        print(' ')
        # CHECK MAX MOVES SINCE INSIDE WHILE LOOP
        returnCode = checkMoves(myNation, '%^')[1]
        if returnCode > 0:
            print('Moves used up.')
            return (myNation)

        buildSelection = str(input('Please chose an option \n')).upper()
        if buildSelection == 'A':
            clearScreen()
            if unitOne[1] < 1:
                fast_print('You dont have any to scrap..')
                continue
            myNation = scrapUnits(myNation, year, WAR_BRIEFING, '1')
        if buildSelection == 'B':
            clearScreen()
            if unitTwo[1] < 1:
                fast_print('You dont have any to scrap..')
                continue
            myNation = scrapUnits(myNation, year, WAR_BRIEFING, '2')
        if buildSelection == 'C':
            clearScreen()
            if unitThree[1] < 1:
                fast_print('You dont have any to scrap..')
                continue
            myNation = scrapUnits(myNation, year, WAR_BRIEFING, '3')
        if buildSelection == 'D':
            clearScreen()
            if unitFour[1] < 1:
                fast_print('You dont have any to scrap..')
                continue
            myNation = scrapUnits(myNation, year, WAR_BRIEFING, '4')
        if buildSelection == 'E':
            clearScreen()
            if unitFive[1] < 1:
                fast_print('You dont have any to scrap..')
                continue
            myNation = scrapUnits(myNation, year, WAR_BRIEFING, '5')
        if buildSelection == 'F':
            clearScreen()
            if unitSix[1] < 1:
                fast_print('You dont have any to scrap..')
                continue
            myNation = scrapUnits(myNation, year, WAR_BRIEFING, '6')
        if buildSelection == 'G':
            clearScreen()
            if unitSeven[1] < 1:
                fast_print('You dont have any to scrap..')
                continue
            myNation = scrapUnits(myNation, year, WAR_BRIEFING, '7')
        if buildSelection == 'H':
            clearScreen()
            if unitEight[1] < 1:
                fast_print('You dont have any to scrap..')
                continue
            myNation = scrapUnits(myNation, year, WAR_BRIEFING, '8')
        if buildSelection == 'V':
            clearScreen()
            show = 'on'
        if buildSelection == 'P':
            clearScreen()
            price = 'on'
        if buildSelection == 'R' or buildSelection == '':
            return (myNation)
    return (myNation)
Пример #21
0
def buildMenu(myNation, year, WAR_BRIEFING):
    era = myNation[0]['Tech']['era']
    WARONE = WAR_BRIEFING['weapons'][era]['1']
    WARTWO = WAR_BRIEFING['weapons'][era]['2']
    WARTHREE = WAR_BRIEFING['weapons'][era]['3']
    WARFOUR = WAR_BRIEFING['weapons'][era]['4']
    WARFIVE = WAR_BRIEFING['weapons'][era]['5']
    WARSIX = WAR_BRIEFING['weapons'][era]['6']
    WARSEVEN = WAR_BRIEFING['weapons'][era]['7']
    WAREIGHT = WAR_BRIEFING['weapons'][era]['8']
    flag = ''
    buildSelection = ' '
    show = 'off'
    price = 'off'
    while buildSelection != 'XYZFFJJJJJJ':
        clearScreen()
        unitOne = myNation[0]['War']['weapons']['1']
        unitTwo = myNation[0]['War']['weapons']['2']
        unitThree = myNation[0]['War']['weapons']['3']
        unitFour = myNation[0]['War']['weapons']['4']
        unitFive = myNation[0]['War']['weapons']['5']
        unitSix = myNation[0]['War']['weapons']['6']
        unitSeven = myNation[0]['War']['weapons']['7']
        unitEight = myNation[0]['War']['weapons']['8']
        firstTech = myNation[0]['Tech']['researched']['one']
        secondTech = myNation[0]['Tech']['researched']['two']
        thirdTech = myNation[0]['Tech']['researched']['three']
        fourthTech = myNation[0]['Tech']['researched']['four']
        fifthTech = myNation[0]['Tech']['researched']['five']
        techLevel = myNation[0]['Tech']['level']
        print('+++++++++++++++++++++++++++++++++++++++++++++++++++')
        print('               WEAPONS PROCUREMENT       :X        ')
        print('+++++++++++++++++++++++++++++++++++++++++++++++++++')
        print('')
        print('My Team   : ' + str(myNation[1]))
        print('Year      : ' + str(year))
        print('Might     : ' + str(myNation[0]['War']['might']))
        print('Wealth    : ' + str(myNation[0]['Finance']['wealth']))
        print('Tech Lv   : ' + str(techLevel))
        print('')
        print('')
        print('SuperWeapons: ' + str(unitEight[1]))
        print('Total Firepower : ' + str(myNation[0]['War']['firePower']))
        print(' ')
        print('')
        print("""
(╯°□°)--︻╦╤─ - - - 
                """)
        print('')
        print('Build')
        print('[A] ' + str(unitOne[0]))
        print('[B] ' + str(unitTwo[0]))
        print('[C] ' + str(unitThree[0]))
        print('[D] ' + str(unitFour[0]))
        print('[E] ' + str(unitFive[0]))
        print('[F] ' + str(unitSix[0]))
        print('[G] ' + str(unitSeven[0]))
        print('[H] ' + str(unitEight[0]))
        print('')
        print('')
        if price == 'on':
            print('======================')
            print('       Pricings       ')
            print('======================')
            print('______________________')
            print('Light Unit            :')
            print('----------------------')
            print(str(WARONE[0]) + ' = $' + str(WARONE[2]))
            print('buildTime    = ' + str(WARONE[3]))
            print('MightPoints  = +' + str(WARONE[4]) + '%')
            print('')
            print(str(WARTWO[0]) + ' = $' + str(WARTWO[2]))
            print('buildTime    = ' + str(WARTWO[3]))
            print('MightPoints  = +' + str(WARTWO[4]) + '%')
            print('')
            print('______________')
            print('Core Division         : ')
            print('--------------')
            print(str(WARTHREE[0]) + ' = $' + str(WARTHREE[2]))
            print('buildTime    = ' + str(WARTHREE[3]))
            print('MightPoints  = +' + str(WARTHREE[4]) + '%')
            print('')
            print(str(WARFOUR[0]) + ' = $' + str(WARFOUR[2]))
            print('buildTime    = ' + str(WARFOUR[3]))
            print('MightPoints  = +' + str(WARFOUR[4]) + '%')
            print('')
            print(str(WARFIVE[0]) + ' = $' + str(WARFIVE[2]))
            print('buildTime    = ' + str(WARFIVE[3]))
            print('MightPoints  = +' + str(WARFIVE[4]) + '%')
            print('')
            print('______________')
            print('Heavy Forces     : ')
            print('--------------')
            print(str(WARSIX[0]) + ' = $' + str(WARSIX[2]))
            print('buildTime    = ' + str(WARSIX[3]))
            print('MightPoints  = +' + str(WARSIX[4]) + '%')
            print('')
            print(str(WARSEVEN[0]) + ' = $' + str(WARSEVEN[2]))
            print('buildTime    = ' + str(WARSEVEN[3]))
            print('MightPoints  = +' + str(WARSEVEN[4]) + '%')
            print('')
            print('')
            print(str(WAREIGHT[0]) + ' = $' + str(WAREIGHT[2]))
            print('buildTime    = ' + str(WAREIGHT[3]))
            print('MightPoints  = +' + str(WAREIGHT[4]) + '%')
            print('')
            fast_print('Press Enter to clear ')
            price = 'off'
            print('')
        if show == 'on':
            print('Light Unit : ' + str(unitOne[1] + unitTwo[1]))
            print('--------------')
            print(str(unitOne[0]) + ' : ' + str(unitOne[1]))
            print(str(unitTwo[0]) + ' : ' + str(unitTwo[1]))
            print('')
            print('Core Division : ' +
                  str(unitThree[1] + unitFour[1] + unitFive[1]))
            print('--------------')
            print(str(unitThree[0]) + ' : ' + str(unitThree[1]))
            print(str(unitFour[0]) + ' : ' + str(unitFour[1]))
            print(str(unitFive[0]) + ' : ' + str(unitFive[1]))
            print('')
            print('Heavy Forces: ' + str(unitSix[1] + unitSeven[1]))
            print('--------------')
            print(str(unitSix[0]) + ' : ' + str(unitSix[1]))
            print(str(unitSeven[0]) + ' : ' + str(unitSeven[1]))
            print('')
            print('Super Weapon')
            print('--------------')
            print(str(unitEight[0]) + ' : ' + str(unitEight[1]))
            fast_print('press Enter to clear')
            print(' ')
            show = 'off'
        print('Options')
        print('[V] View your units')
        print('[P] Get Unit pricings')
        print('[R] Return')
        print(' ')
        print(' ')
        print(' ')
        print('Moves: ' + str(checkMoves(myNation, "%^")[0]))
        print('****************************************')
        print(' ')
        print(' ')
        # CHECK MAX MOVES SINCE INSIDE WHILE LOOP
        returnCode = checkMoves(myNation, '%^')[1]
        if returnCode > 0:
            fast_print('All moves used up')
            return (myNation)

        buildSelection = str(input('Please chose an option \n')).upper()

        # LIGHT UNIT
        if buildSelection == 'A':
            clearScreen()
            myNation = buildUnits(myNation, year, WAR_BRIEFING, unit='1')
        if buildSelection == 'B':
            clearScreen()
            if firstTech[2] < 100:
                print('You need to complete ' + str(firstTech[1]) +
                      ' development to unlock.')
                fast_print('Your Tech level is not high enough')
                continue
            myNation = buildUnits(myNation, year, WAR_BRIEFING, unit='2')

        # CORE DIVISION
        if buildSelection == 'C':
            clearScreen()
            if secondTech[2] < 100:
                print('You need to complete ' + str(secondTech[1]) +
                      ' development to unlock.')
                fast_print('Your Tech level is not high enough')
                continue
            myNation = buildUnits(myNation, year, WAR_BRIEFING, unit='3')
        if buildSelection == 'D':
            clearScreen()
            if thirdTech[2] < 100:
                print('You need to complete ' + str(thirdTech[1]) +
                      ' development to unlock.')
                fast_print('Your Tech level is not high enough')
                continue
            myNation = buildUnits(myNation, year, WAR_BRIEFING, unit='4')
        if buildSelection == 'E':
            clearScreen()
            if thirdTech[2] < 100:
                print('You need to complete ' + str(thirdTech[1]) +
                      ' development to unlock.')
                fast_print('Your Tech level is not high enough')
                continue
            myNation = buildUnits(myNation, year, WAR_BRIEFING, unit='5')

        # HEAVY FORCES
        if buildSelection == 'F':
            clearScreen()
            if fourthTech[2] < 100:
                print('You need to complete ' + str(fourthTech[1]) +
                      ' development to unlock.')
                fast_print('Your Tech level is not high enough')
                continue
            myNation = buildUnits(myNation, year, WAR_BRIEFING, unit='6')
        if buildSelection == 'G':
            clearScreen()
            if fourthTech[2] < 100:
                print('You need to complete ' + str(fourthTech[1]) +
                      ' development to unlock.')
                fast_print('Your Tech level is not high enough')
                continue
            myNation = buildUnits(myNation, year, WAR_BRIEFING, unit='7')

        # SUPER WEAPON
        if buildSelection == 'H':
            clearScreen()
            if fifthTech[2] < 100:
                print('You need to complete ' + str(fifthTech[1]) +
                      ' development to unlock.')
                fast_print('Your Tech level is not high enough')
                continue
            myNation = buildUnits(myNation, year, WAR_BRIEFING, unit='8')
        if buildSelection == 'V':
            clearScreen()
            show = 'on'
        if buildSelection == 'P':
            clearScreen()
            price = 'on'
        if buildSelection == 'R' or buildSelection == '':
            return (myNation)
    return (myNation)
Пример #22
0
def tradeMenu(myNation, year, PRICE_TRACKER):
    financeSelection = ' '
    while financeSelection != 'XYZFFJJJJJJ':
        clearScreen()
        goldPrice = PRICE_TRACKER['gold']['price']
        gemPrice = PRICE_TRACKER['gems']['price']
        metalPrice = PRICE_TRACKER['raremetals']['price']
        oilPrice = PRICE_TRACKER['oil']['price']
        myWealth = myNation[0]['Finance']['wealth']
        print('$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$')
        print('         💰💰💰  TRADE EXCHANGE   💰💰💰💰     ')
        print('$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$')
        # print('$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$')
        # print('           $$$$  TRADE EXCHANGE   ££££           ')
        # print('$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$')
        print('')
        print('My Team: ' + str(myNation[1]))
        print('Year: ' + str(year))
        print('Wealth : ' + str(myNation[0]['Finance']['wealth']))
        print('Level  : ' + str(myNation[0]['Finance']['level']))
        print('')
        print('     ***EXCHANGE RATES***')
        print('')
        print('     Gold        : ' + '$' + str(goldPrice) + ' ' +
              str(PRICE_TRACKER['gold']['priceChange']))
        print('     Gems        : ' + '$' + str(gemPrice) + ' ' +
              str(PRICE_TRACKER['gems']['priceChange']))
        print('     Rare Metals : ' + '$' + str(metalPrice) + ' ' +
              str(PRICE_TRACKER['raremetals']['priceChange']))
        print('     Oil         : ' + '$' + str(oilPrice) + ' ' +
              str(PRICE_TRACKER['oil']['priceChange']))
        print('')
        print('')
        print('Gold        : ' + str(myNation[0]['Finance']['gold']))
        print('Gems        : ' + str(myNation[0]['Finance']['gems']))
        print('Rare Metals : ' + str(myNation[0]['Finance']['raremetals']))
        print('Oil         : ' + str(myNation[0]['Finance']['oil']))
        print('')
        print('[B] Buy')
        print('[S] Sell')
        print('')
        print('')
        print('[A] Show median rates')
        print('[H] Show historical prices')
        print('[M] Show Marketplace stock')
        print('[R] Return')
        print(' ')
        print(' ')
        print('Moves: ' +
              str(myNation[0]['Special']['moveLimit'] -
                  len(myNation[0]['Nextmoves']) +
                  str(sum(myNation[0]['Nextmoves'], [])).count('pending')))
        print('***************************************************')
        print(' ')
        print(' ')
        financeSelection = str(input('Please chose an option \n')).upper()
        if financeSelection == 'B':
            myNation = buyMenu(myNation, year, PRICE_TRACKER)
        if financeSelection == 'S':
            myNation = sellMenu(myNation, year, PRICE_TRACKER)
        if financeSelection == 'A':
            for item in PRICE_TRACKER:
                print('Average ' + str(item) + ' price: ' +
                      str(PRICE_TRACKER[item]['average']))
            input('Press enter to continue \n')
        if financeSelection == 'H':
            for item in PRICE_TRACKER:
                print('Historical ' + str(item) + ' prices: ' +
                      str((PRICE_TRACKER[item]['history'])))
                print('')
            input('Press enter to continue \n')
        if financeSelection == 'M':
            for item in PRICE_TRACKER:
                print(
                    str(item) + ' stock available to buy : ' +
                    str((PRICE_TRACKER[item]['stock'])))
                print('')
            input('Press enter to continue \n')
        if financeSelection == 'R' or financeSelection == '':
            print('exiting...')
            return (myNation)
Пример #23
0
def investMenu(myNation, year, PRICE_TRACKER, NATION_ARRAY):
    investFlag = ''
    friendshipFlag = 'n'
    investSelection = ' '
    while investSelection != 'XYZFFJJJJJJ':
        clearScreen()
        myWealth = myNation[0]['Finance']['wealth']
        print('+++++++++++++++++++++++++++++++++++++++++++++++++++')
        print('         $$$      INVESTMENT HUB      $$$          ')
        print('+++++++++++++++++++++++++++++++++++++++++++++++++++')
        print('')
        print('My Team: ' + str(myNation[1]))
        print('Year: ' + str(year))
        print('Wealth : ' + str(myNation[0]['Finance']['wealth']))
        print('Level  : ' + str(myNation[0]['Finance']['level']))
        print(' ')
        investFlag = showResources(myNation, year, PRICE_TRACKER, investFlag)
        friendshipFlag = showFriendship(myNation, friendshipFlag)
        print('')
        print('[C] Invest in Countries')
        print('[G] Speculate on Gold')
        print('[O] Speculate on Oil')
        print('[D] Speculate on Diamonds and Gems')
        print('[M] Speculate on Rare Metals')
        print(' ')
        print(' ')
        print(' ')
        print('[R] Show My Resources')
        print('[S] Show Marketplace stock')
        print('[H] Show historical prices')
        print('[F] Show Friendships')
        print('[X] Exit')
        print(' ')
        print(' ')
        print(' ')
        print('Moves: ' + str(checkMoves(myNation, "%^")[0]))
        print('****************************************')
        print(' ')
        print(' ')
        returnCode = checkMoves(myNation, '%^')[1]
        if returnCode > 0:
            fast_print('All moves used up')
            return (myNation)
        investSelection = str(input('Please chose an option \n')).upper()
        if investSelection == 'C':
            myNation = investCountry(myNation, NATION_ARRAY)
        if investSelection == 'G':
            myNation = investResource(myNation, NATION_ARRAY, PRICE_TRACKER,
                                      'gold')
        if investSelection == 'O':
            myNation = investResource(myNation, NATION_ARRAY, PRICE_TRACKER,
                                      'oil')
        if investSelection == 'D':
            myNation = investResource(myNation, NATION_ARRAY, PRICE_TRACKER,
                                      'gems')
        if investSelection == 'M':
            myNation = investResource(myNation, NATION_ARRAY, PRICE_TRACKER,
                                      'raremetals')
        if investSelection == 'S':
            for item in PRICE_TRACKER:
                print(
                    str(item) + ' stock available to buy : ' +
                    str((PRICE_TRACKER[item]['stock'])))
                print('')
            input('Press enter to continue \n')
        if investSelection == 'H':
            for item in PRICE_TRACKER:
                print('Historical ' + str(item) + ' prices: ' +
                      str((PRICE_TRACKER[item]['history'])))
                print('')
            input('Press enter to continue \n')
        if investSelection == 'F':
            friendshipFlag = 'Y'
        if investSelection == 'R':
            investFlag = 'Y'
        if investSelection == 'X' or investSelection == '':
            return (myNation)
    return (myNation)
Пример #24
0
def menu(myNation, PRICE_TRACKER, previousPrices, p, year):

    # MENU
    hintSwitch = 'off'
    if myNation[0]['hints'] == 'on':
        hintSwitch = 'off'
    else:
        hintSwitch = 'on'

    choice = 'x'
    while choice != 'xnsdfaoiga':
        print('')
        print('----Processing Complete----')
        print('[1] View prices')
        print('[2] View Previous Prices')
        print('[3] Print Json (for developers)')
        print('[4] Switch hints ' + str(hintSwitch))
        print('[5] Change Next Year Updates')
        print('[x] Skip')
        choice = str(input('Press enter to skip \n'))
        if choice == '1':
            clearScreen()
            for item in PRICE_TRACKER:
                print('*****' + str(item) + '*******')
                print('Price          : ' + str(PRICE_TRACKER[item]['price']))
                print('Market Stock   : ' + str(PRICE_TRACKER[item]['stock']))
                print('Price Change   : ' +
                      str(PRICE_TRACKER[item]['priceChange']))
                print('Average        : ' +
                      str(PRICE_TRACKER[item]['average']))
            print(" ")
            input('Press enter to continue \n')
        if choice == '2':
            clearScreen()
            for item in previousPrices:
                print('*****' + str(item) + '*******')
                print('Price          : ' + str(previousPrices[item]['price']))
                print('Market Stock   : ' + str(previousPrices[item]['stock']))
                print('Price Change   : ' +
                      str(previousPrices[item]['priceChange']))
                print('Average        : ' +
                      str(previousPrices[item]['priceChange']))
            print(" ")
            input('Press enter to continue \n')
        if choice == '3':
            clearScreen()
            print(previousPrices)
            print(PRICE_TRACKER)
            input('Press enter to continue \n')
        if choice == '4':
            myNation[0]['hints'] = hintSwitch
            if hintSwitch == 'off':
                hintSwitch = 'on'
            else:
                hintSwitch = 'off'
        if choice == '5':
            p = options(p)
        if choice == 'x' or choice == '':
            break

    # lazy coding...
    if hintSwitch == 'off':
        hints = [
            '****Hint**** \n You can change what you see in next round updates from the options menu',
            '****Hint**** \n Pressing enter exits or skips most menu`s or takes you back',
            '****Hint**** \n Resources like gold have a market stock, prices reflect the availability in the market.'
        ]
        print(str(random.choice(hints)))
    print('')
    print('')
    buffer = input('Press enter to continue \n')

    return (myNation)
Пример #25
0
def missionsMenu(myNation, NATION_ARRAY, year, WAR_BRIEFING):
    flag = ''
    friendshipFlag = ''
    missionSelection = ' '
    while missionSelection != 'XYZFFJJJJJJ':
        clearScreen()
        unitOne = myNation[0]['War']['weapons']['1']
        unitTwo = myNation[0]['War']['weapons']['2']
        unitThree = myNation[0]['War']['weapons']['3']
        unitFour = myNation[0]['War']['weapons']['4']
        unitFive = myNation[0]['War']['weapons']['5']
        unitSix = myNation[0]['War']['weapons']['6']
        unitSeven = myNation[0]['War']['weapons']['7']
        unitEight = myNation[0]['War']['weapons']['8']
        print('+++++++++++++++++++++++++++++++++++++++++++++++++++')
        print('                 MISSION PLANNING        :X        ')
        print('+++++++++++++++++++++++++++++++++++++++++++++++++++')
        print('')
        print('My Team        : ' + str(myNation[1]))
        print('Year           : ' + str(year))
        print('Might          : ' + str(myNation[0]['War']['might']))
        print('Rank           : ' + str(myNation[0]['War']['level']))
        print('Light Unit     : ' + str(unitOne[1] + unitTwo[1]))
        print('Core Division  : ' +
              str(unitThree[1] + unitFour[1] + unitFive[1]))
        print('Heavy Forces   : ' + str(unitSix[1] + unitSeven[1]))
        print('SuperWeapons   : ' + str(unitEight[1]))
        print('Firepower      : ' + str(myNation[0]['War']['firePower']))
        print(' ')
        flag = showAssets(myNation, year, flag)
        friendshipFlag = showFriendship(myNation, friendshipFlag)
        print('')
        print('[E] Espionage')
        print('[C] Covert Operations')
        print('[T] Tactical Strike')
        print('[D] Declare War')
        print(' ')
        print(' ')
        print(' ')
        print('[F] Show Friendships (Internaitonal Relations)')
        print('[S] Show Military Assets')
        print('[H] Help & Explanation')
        print('[R] Return')
        print(' ')
        print(' ')
        print(' ')
        print('Moves: ' + str(checkMoves(myNation, "%^")[0]))
        print('****************************************')
        print(' ')
        print(' ')
        returnCode = checkMoves(myNation, '%^')[1]
        if returnCode > 0:
            fast_print('All moves used up')
            return (myNation)
        missionSelection = str(input('Please chose an option \n')).upper()
        if missionSelection == 'E':
            myNation = espionage(myNation, NATION_ARRAY, WAR_BRIEFING)
        if missionSelection == 'C':
            myNation = covert(myNation, NATION_ARRAY, WAR_BRIEFING)
        if missionSelection == 'T':
            fast_print('not ready')
        if missionSelection == 'D':
            fast_print('not ready')
        if missionSelection == 'F':
            friendshipFlag = 'Y'
        if missionSelection == 'S':
            flag = 'yes'
        if missionSelection == 'H':
            print('*****Explanation of Options *****')
            print('')
            print(
                'ESPIONAGE: Obtains intel about enemy, a small amount of points and forces them to skip a round. May incur loss in friendship if found out.'
            )
            print(
                'COVERT OPERATIONS: Damage an enemy moderately, possibility of stealing resources, May incur signiciant loss in friendship if found out.'
            )
            print(
                'TACTICAL STRIKE: Damage an enemy severely, signiciant drop in friendship and possible repercussions.'
            )
            print(
                'DECLARE WAR: Forces the enemy into a round by round battle of attrition, only military moves can be carried out. You can win, lose, surrender or offer a truce. Will lose some global backing.'
            )
            print(
                '***All Options depend on your frienship levels with the nation state.'
            )
            print('')
            input('Enter to continue')
        if missionSelection == 'R' or missionSelection == '':
            return (myNation)
    return (myNation)
Пример #26
0
def covert(myNation, NATION_ARRAY, WAR_BRIEFING):
    covertThreshold = -20
    # CHECK MAX MOVES
    returnCode = checkMoves(myNation, 'covert')[1]
    if returnCode > 0: return (myNation)

    returnCode, NationChoice = selectCountry(NATION_ARRAY, myNation,
                                             '****CHOOSE A TARGET****')
    if returnCode > 0: return (myNation)

    # CHECK FRIENDSHIP
    if myNation[0]['Friendship'][NATION_ARRAY[NationChoice]
                                 [-1]]['level'] > covertThreshold:
        print(
            'Sorry, your friendship with ' +
            str(NATION_ARRAY[NationChoice][-1]) + ' is ' +
            str(myNation[0]['Friendship'][NATION_ARRAY[NationChoice][-1]]
                ['level']) +
            '.  \n Covert operations are only available when friendship deteriorates below < '
            + str(covertThreshold) +
            '. \n Please check international relations option to view friendship levels.'
        )
        input('')
        return (myNation)

    covertOrder = ''
    covertChoice = ""
    while covertChoice != 'XYZFFJJJJJJ':
        print('[E] Economy')
        print('[M] Military')
        print('[S] Science')
        print('[P] Politics')
        print(' ')
        print(' ')
        print('[I] More Info')
        print('[R] Return')
        covertChoice = input('What branch of the ' + str(NationChoice) +
                             ' government do you wish to attack? \n').upper()
        clearScreen()
        if covertChoice == 'E':
            covertOrder = ['covert', NationChoice, 'economy']
            break
        if covertChoice == 'M':
            covertOrder = ['covert', NationChoice, 'military']
            break
        if covertChoice == 'S':
            covertOrder = ['covert', NationChoice, 'science']
            break
        if covertChoice == 'P':
            covertOrder = ['covert', NationChoice, 'politics']
            break
        if covertChoice == 'I':
            fast_print(
                'Covert lets you steal and damage enemy assets significantly, this gains benefits but can be risky and lead to war \n'
            )
            print(
                'Depending on what branch you target, will result in corresponding gains i.e. . \n'
            )
            print(
                'As your rank increases you can chose to target a specific branch of the government. \n'
            )
            print('Military  : Might ++')
            print(
                '******IF YOUR GAMBIT FAILS, THE CONSEQUENCES COULD BE SEVERE****'
            )
            input('Enter to continue \n')
        if covertChoice == 'R' or covertChoice == '':
            return (myNation)

    myNation[0]['Nextmoves'] = myNation[0]['Nextmoves'] + [covertOrder]

    return (myNation)
Пример #27
0
def drillMenu(myNation, year, WAR_BRIEFING):
    drillSelection = ' '
    flag = ''
    while drillSelection != 'XYZFFJJJJJJ':
        clearScreen()
        unitOne = myNation[0]['War']['weapons']['1']
        unitTwo = myNation[0]['War']['weapons']['2']
        unitThree = myNation[0]['War']['weapons']['3']
        unitFour = myNation[0]['War']['weapons']['4']
        unitFive = myNation[0]['War']['weapons']['5']
        unitSix = myNation[0]['War']['weapons']['6']
        unitSeven = myNation[0]['War']['weapons']['7']
        unitEight = myNation[0]['War']['weapons']['8']

        print('+++++++++++++++++++++++++++++++++++++++++++++++++++')
        print('       !!MILITARY DRILL HEADQUARTERS!!   :X        ')
        print('+++++++++++++++++++++++++++++++++++++++++++++++++++')
        print('')
        print('My Team        : ' + str(myNation[1]))
        print('Year           : ' + str(year))
        print('Might          : ' + str(myNation[0]['War']['might']))
        print('Rank           : ' + str(myNation[0]['War']['level']))
        print('Light Unit     : ' + str(unitOne[1] + unitTwo[1]))
        print('Core Division  : ' +
              str(unitThree[1] + unitFour[1] + unitFive[1]))
        print('Heavy Forces   : ' + str(unitSix[1] + unitSeven[1]))
        print('SuperWeapons   : ' + str(unitEight[1]))
        print('Firepower      : ' + str(myNation[0]['War']['firePower']))
        print(' ')
        print(' ')
        flag = showAssets(myNation, year, flag)
        print('')
        print('[L] Light Unit')
        print('[C] Core Division ')
        print('[H] Heavy Forces')
        print(' ')
        print(' ')
        print('[D] Detailed forces review')
        print('[R] Return')
        print(' ')
        print(' ')
        print(' ')
        print('Moves: ' + str(checkMoves(myNation, "%^")[0]))
        print('****************************************')
        print(' ')
        print(' ')
        # CHECK MAX MOVES SINCE INSIDE WHILE LOOP
        returnCode = checkMoves(myNation, '%^')[1]
        if returnCode > 0:
            fast_print('All moves used up')
            return (myNation)

        drillSelection = input('Select a divison to train \n').upper()
        clearScreen()
        if drillSelection == 'L':
            if (unitOne[1] + unitTwo[1]) < 1:
                input('No Light assets to train... \n')
                break
            units = [('1', unitOne[1]), ('2', unitTwo[1])]
            myNation = drill(myNation, 'Light Units', units, WAR_BRIEFING)
        if drillSelection == 'C':
            if (unitThree[1] + unitFour[1] + unitFive[1]) < 1:
                input('No navy assets to train... \n')
                break
            units = [('3', unitThree[1]), ('4', unitFour[1]),
                     ('5', unitFive[1])]
            myNation = drill(myNation, 'Core Division', units, WAR_BRIEFING)
        if drillSelection == 'H':
            if (unitSix[1] + unitSeven[1]) < 1:
                input('No airforce assets to train... \n')
                break
            units = [('6', unitSix[1]), ('7', unitSeven[1])]
            myNation = drill(myNation, 'Heavy Forces', units, WAR_BRIEFING)
        if drillSelection == 'D':
            flag = 'yes'
        if drillSelection == 'R' or drillSelection == '':
            return (myNation)
    return (myNation)
Пример #28
0
def gainResearchPoints(myNation):
    wealth = myNation[0]['Finance']['wealth']

    if wealth < 100:
        input('You dont have enough money to engage in research.')
        return (myNation)

    # CHECK MAX MOVES
    returnCode = checkMoves(myNation, 'gainResearch')[1]
    if returnCode > 0:
        fast_print('You are already collecting research points.')
        return (myNation)

    intensity = 'low'
    while intensity != 'XYZFFJJJJJJ':
        print('[S] Soft       ')
        print('[M] Medium     ')
        print('[H] Hard      ')
        print('[O] Overtime   ')
        print('[I] More Info')
        print('')
        print('[R] Return')
        intensity = input(
            'How hard do you want to invest in research grants? \n').upper()
        clearScreen()
        if intensity == 'S':
            researchOrder = ['submitted', 'gainResearch', 'Soft', 0, 2]
            break
        if intensity == 'M':
            researchOrder = ['submitted', 'gainResearch', 'Medium', 10, 4]
            break
        if intensity == 'H':
            researchOrder = ['submitted', 'gainResearch', 'Hard', 15, 6]
            break
        if intensity == 'O':
            researchOrder = ['submitted', 'gainResearch', 'Overtime', 25, 8]
            break
        if intensity == 'I':
            fast_print(
                'Research grants awards knowledge and research points (RP) that will be rewarded each round but comes at a cost of wealth and time. \n'
            )
            print(
                '[S] Soft       : 2 rounds at no cost     - small bonus each round.'
            )
            print(
                '[M] Medium     : 4 rounds at 10% wealth  - small rp & knowledge bonus each round.'
            )
            print(
                '[H] Hard       : 6 rounds at 15% wealth  - medium rp and knowledge bonus each round.'
            )
            print(
                '[O] Overtime   : 8 rounds at 25% wealth  - Large rp and knowledge bonus each round.'
            )
            input('Enter to continue \n')
        if intensity == 'R' or intensity == '':
            return (myNation)

    # Deduct credits
    amount = round((researchOrder[3] / 100) * wealth)
    print('Amount spent on research is  $' + str(amount))
    myNation[0]['Finance']['wealth'] -= amount

    #Add spend amount to order array to improve reward calculation
    researchOrder.append(amount)

    # Place Order
    myNation[0]['Nextmoves'] = myNation[0]['Nextmoves'] + [researchOrder]
    print('')
    input(
        'Your ' + str(researchOrder[2]) +
        ' research grant will award you points each round that can be spent on developing technology. \nPress enter to continue  \n'
    )
    return (myNation)
Пример #29
0
# =====================================================================
# =====================================================================
#                           START MENU
#     1. SELECT NATION OPTION
#     2. VIEW COUNTRY
#     3. VIEW RULES
#     4. VIEW CREDITS
#     5. START GAME 
# =====================================================================
# =====================================================================
# =====================================================================
"""

selection = ''
while selection != 'Done':
    clearScreen()
    print('*****************MENU*******************')
    print('')
    print('')
    print('[1] Start Game')
    print('[2] Select your Nation')
    print('[3] Country Stats')
    print('[4] Game rules')
    print('[5] Credits')
    print('[6] JukeBox')
    print('[7] Back')
    print('')
    print('')

    try:
        selection = int(input('Please chose an option \n'))
Пример #30
0
def start(userName, myNation):
    assistant = 'Arbiter: '
    print(""" 
    @('_')@
                """)
    fast_print('**rustle**....**clunk** ..."oh not again!" \n')
    fast_print(str(assistant) + '....wait... \n')
    time.sleep(0.7)
    fast_print(
        str(assistant) +
        '..who the hell are you? How did you get in here? ... \n')
    userName = input('Enter your name \n')
    clearScreen()
    print(' ')
    med_print(str(userName) + ': ... im ' + str(userName) + '\n')
    clearScreen()
    print("""
    @('_')@
                """)
    fast_print(str(assistant) + 'ah, so YOU are the one. \n')
    time.sleep(0.4)
    fast_print(
        str(assistant) + 'Its truly an honour to meet you ' + str(userName) +
        ' please know that we all appreciate your sacrifice  \n')
    fast_print(str(assistant) + '...are you ready?  \n ')
    print('')
    input(' Press enter to continue..')
    clearScreen()
    print(""" 
    @('_')@
                """)
    fast_print(
        str(assistant) +
        'executing dynamic cascade sequence now, this should feel... uh..uh....  \n '
    )
    time.sleep(0.6)
    fast_print('....a little weird \n ')
    time.sleep(1.50)
    clearScreen()
    time.sleep(1.50)

    for y in range(0, 3):
        for x in range(0, 10):
            print('XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
        time.sleep(0.50)
    fast_print('..........universe destruction in progress......\n')
    for x in range(0, 10):
        print('XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
    time.sleep(0.50)
    for x in range(0, 10):
        print('XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
    time.sleep(0.50)
    for x in range(0, 10):
        print('XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
    fast_print('....booting up universe simulation #734 omega .......\n')
    for y in range(0, 3):
        for x in range(0, 10):
            print('><><><>><><><>><><><>><><><>><><><>><><><>><><><>><><><')
        time.sleep(0.50)
    time.sleep(0.580)
    for y in range(0, 3):
        for x in range(0, 5):
            print('asklfdj;l;j;adfj;kj;afdkjaklsdjfaghaldg;asdkjf;lkja;ajd')
        time.sleep(0.30)
        for x in range(0, 5):
            print('skakdf 9873472393khgfas lalsdjhf lkladf iuhwer 82348989')
        time.sleep(0.30)
        for x in range(0, 5):
            print('sweir;nvda;eradf jasd;klfjasfjghlaadsljfh lasdhfhdlafdd')
        time.sleep(0.50)
    for y in range(0, 3):
        for x in range(0, 10):
            print('XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
        time.sleep(0.50)
    clearScreen()
    time.sleep(1.10)
    med_print('....Lead me, follow me, or get out of my way ........ \n')
    print('(George S Patton)')
    time.sleep(1.90)
    clearScreen()
    for x in range(0, 20):
        print(' ')
    time.sleep(0.50)
    print('')
    y = 5
    for x in range(0, 5):
        print(str(y))
        y = y - 1
        time.sleep(1.20)
        clearScreen()

    fast_print('Good morning commander ' + str(userName) + '..... \n')
    fast_print('')
    time.sleep(0.80)
    fast_print(
        'The year is 1949, the devestating and costly war has finally come to an end.\nIt is your responsibility to lead '
        + str(myNation[-1]) + ' to greatness. \n')
    time.sleep(0.80)
    fast_print(
        'There are many ways to win, trade, politics, war....the path is up to you? \n'
    )
    time.sleep(1.50)
    return (userName)