Example #1
0
    def add_to_inventory(self, *args):
        id = self.box_list.curselection()
        luku = int(id[0])
        text = self.box_list.get(luku)
        if text=='Favor' or text=='Contact':
            x = Character()
            x.giveRandomName()
            name = x.get_attribute('Full name')
            text = text + '(' + name + ')'
        self.contr.set_to_ability_list(self.name, text, 1)
        #list = self.contr.get_from_ability_list(self.name)
        #value = self.contr.get_char_skill(text)
        value = self.contr.get_from_ability_list(self.name, text)

        text = text + '\t\t\t\t|' + str(value) + '\n'
        self.text_inventory.insert('end', text)

        
Example #2
0
    def get_r_name(self, nametype, gender="undecided"):
        x = Character()
        x.giveRandomName(gender)

        if nametype == "first":
            self.__char.set_attribute("First name", x.get_attribute("First name"))
            return x.get_attribute("First name")
        if nametype == "second":
            self.__char.set_attribute("Second name", x.get_attribute("Second name"))
            return x.get_attribute("Second name")
        if nametype == "last":
            self.__char.set_attribute("Last name", x.get_attribute("Last name"))
            return x.get_attribute("Last name")
        if nametype == "nick":
            self.__char.set_attribute("First alias", x.get_attribute("First alias"))
            self.__char.set_attribute("Last alias", x.get_attribute("Last alias"))
            alias = x.get_attribute("First alias") + " " + x.get_attribute("Last alias")
            self.__char.set_attribute("Alias", alias)
            return alias