Example #1
0
    def put_bullet(self, grid, jetpacker, board):
        if (self._xcoo - 1 == "o" or self._xcoo - 1 == "<" or self._xcoo - 1
                == "^") or (self._num - 1 == "o" or self._num - 1 == "<"
                            or self._num - 1 == "^"):
            if jetpacker.get_powermode(
            ) == True:  # powermode is for the shield
                jetpacker.set_powermode(False)
                jetpacker.set_life(jetpacker.get_life() + 1)
            jetpacker.set_life(jetpacker.get_life() - 1)
            board.revive(jetpacker)
            jetpacker.set_did_he_die(0)
        if (self._num + 1 == "o" or self._num + 1 == "<" or self._num + 1
                == "^") or (self._xcoo + 1 == "o" or self._xcoo + 1 == "<"
                            or self._xcoo + 1 == "^"):
            if jetpacker.get_powermode(
            ) == True:  # powermode is for the shield
                jetpacker.set_powermode(False)
                jetpacker.set_life(jetpacker.get_life() + 1)
            jetpacker.set_life(jetpacker.get_life() - 1)
            board.revive(jetpacker)
            jetpacker.set_did_he_die(0)
        if self._xcoo - 1 >= 0:
            self._xcoo = self._xcoo - 1

        if self._num == 0:
            self._num = jetpacker.ycoo + 1
            grid[jetpacker.ycoo + 1][self._xcoo] = colors.color_text(
                self._shape1, "Pink")
        else:
            grid[self._num][self._xcoo] = colors.color_text(
                self._shape1, "Pink")
Example #2
0
    def create_coins_platforms(self, obj_board):

        for i in range(115, 130):
            obj_board.matrix[16][i] = colors.color_text("$","Yellow")
        for i in range(115, 130):
            obj_board.matrix[17][i] = colors.color_text("$","Yellow")

        for i in range(320, 334):
            obj_board.matrix[23][i] = colors.color_text("$","Yellow")
            obj_board.matrix[21][i] = colors.color_text("$","Yellow")
            obj_board.matrix[22][i] = colors.color_text("$","Yellow")
Example #3
0
    def reapper(self, obj_board):

        for i in range(self.ycoo, self.ycoo + 3 + self._falsecheck, 1):
            for j in range(self.xcoo, self.xcoo + 3 + self._falsecheck, 1):
                if self.direction == 1 + self._falsecheck and self._powermode == False and True:
                    obj_board.matrix[i][
                        j + self._falsecheck] = colors.color_text(
                            self.__shape1[i - self.ycoo][j - self.xcoo],
                            "Cyan")
                elif self.direction == -1 and self._powermode == False and True:
                    obj_board.matrix[i][
                        j + self._falsecheck] = colors.color_text(
                            self.__shape2[i - self.ycoo][j - self.xcoo],
                            "Cyan")
                elif self._powermode == True:
                    obj_board.matrix[i][j] = colors.color_text(
                        self.__shape3[i - self.ycoo][j - self.xcoo], "Cyan")
Example #4
0
 def reprintdragon(self, jetpacker):
     for i in range(0, 3):
         for j in range(0, len(self._shape[0])):
             print('\033[' + str(jetpacker.ycoo + i) + ';' + str(111 + j) +
                   'H' + colors.color_text(self._shape[i][j], "Pink"),
                   end='')
             self._ycoo = jetpacker.ycoo + i
             self._xcoo = 111 + j
Example #5
0
def log_end_message(log):
    """
    End a log message with a status
    defined by log
    """
    if not log in MESSAGE_LOG.keys():
        log = -1

    res = colors.color_text(*MESSAGE_LOG[log][1])

    sys.stdout.write("\r[" + res + "] " + MESSAGE + "\n")
Example #6
0
    def __init__(self, ycoo, xcoo, dire):

        Structure.__init__(self, ycoo, xcoo, dire)
        self._powermode = False
        self._life = 100
        self._allowed_collision = [" ", colors.color_text("$", "Yellow"), "8"]
        self.__shape2 = [[" ", 'O', " "], [">", "|", "]"], [" ", "^", " "]]
        self._did_he_die = 0
        self.mode = False
        self.keypress = True
        self.__shape3 = [["!", "!", '!'], ["!", "!", '!'], ["!", "!", '!']]
        self._falsecheck = 0
        self.__shape1 = [[" ", 'O', " "], ["[", "|", "<"], [" ", "^", " "]]
Example #7
0
"""
ItemShops configurator for BossShopPro
by workonfire
"""

from colors import color_text

print(color_text('green', 'back', "ItemShops configurator for BossShopPro"))
print(color_text('green', 'none', "by workonfire"))
print("\n")

category = input("Category: ")
with open(category.lower() + '.yml', 'a') as category_file:
    category_file.write('ShopName: ' + category + "\n" + 'DisplayName: ' +
                        category + " (%page%/%maxpage%)" + "\n" + 'Command: ' +
                        category.lower() + "\n" + 'itemshop:' + "\n")

while True:
    item = input(color_text('cyan', 'none', "Item: "))
    price_buy = input(color_text('red', 'bright', "Buy ($): "))
    reward_sell = input(color_text('green', 'bright', "Sell ($): "))
    try:
        with open(category.lower() + '.yml', 'a') as category_file:
            category_file.write('  ' + item + ':' + "\n" + '    ' +
                                'PriceBuy: ' + str(float(price_buy)) + "\n" +
                                '    ' + 'RewardSell: ' +
                                str(float(reward_sell)) + "\n" + '    ' +
                                'AllowBuyAll: false' + "\n" + '    ' +
                                'AllowSellAll: true' + "\n" + '    ' +
                                'Item: ' + "\n" + '    ' + '- type:' +
                                item.upper() + "\n" + '    ' + '- amount:64' +
Example #8
0
    def starting_position(self, grid):

        for i in range(25 + self._falsecheck, 28 + self._falsecheck, 1):
            for j in range(0, 3, 1):
                grid[i][j] = colors.color_text(
                    self.__shape1[i - 25][j + self._falsecheck], "Cyan")
Example #9
0
	def starting_position3(self, grid):
		for i in range(self.ycoo, self.ycoo + 3, 1):
			for j in range(self.xcoo, self.xcoo + 3, 1):
				grid[i][j] = colors.color_text(self.shape3[i - self.ycoo][j - self.xcoo],"Red")
Example #10
0
	def starting_position2(self, grid):
		for i in range(self.xcoo, self.xcoo + 6):
			grid[self.ycoo][i] = colors.color_text('+',"Red")
Example #11
0
 def __init__(self, jetpacker):
     self._shape1 = colors.color_text("+", "Red")
     self._xcoo = 495
     self._num = 0
Example #12
0
 def printdragon(self):
     for i in range(0, 3):
         for j in range(0, len(self._shape[0])):
             print('\033[' + str(26 + i) + ';' + str(111 + j) + 'H' +
                   colors.color_text(self._shape[i][j], "Pink"),
                   end='')
Example #13
0
 def __init__(self):
     self.__sky = colors.color_text("^","Blue") #Fore.RED + "^" + '\033[42m' + '\033[0m'
     self.__ground1 = colors.color_text("^",'Water Color')#'' + "^" + '\x1b[0m'
     self.__cloud = []
     self.__check=0
Example #14
0
 def create_ground(self, grid):
     for i in range(500):
         grid[29+self.__check][i] = self.__ground1
         grid[28+self.__check][i+self.__check] = colors.color_text("^","Water Color") #+ "^" + '\x1b[0m'