Пример #1
0
    def setup(self, csv_row):
        self.name = csv_row[self.header.index("Name")]
        self.output_data["Type"] = util.ensure_string(
            csv_row[self.header.index("Type")])
        self.output_data["Move Power"] = util.ensure_list(
            csv_row[self.header.index("Move Power")], "/")
        self.output_data["Move Time"] = util.ensure_string(
            csv_row[self.header.index("Move Time")])

        pp = csv_row[self.header.index("PP")]
        if pp == "Unlimited":
            self.output_data["PP"] = pp
        else:
            self.output_data["PP"] = util.ensure_int(pp)
        self.output_data["Duration"] = util.ensure_string(
            csv_row[self.header.index("Duration")])
        self.output_data["Range"] = util.ensure_string(
            csv_row[self.header.index("Range")])
        self.output_data["Description"] = util.ensure_string(
            csv_row[self.header.index("Description")])
        self.setup_extra(csv_row)
        self.setup_damage(csv_row)
        if self.name in util.MERGE_MOVE_DATA:
            util.merge(self.output_data, util.MERGE_MOVE_DATA[self.name])

        util.clean_object(self.output_data["Move Power"])
        if not self.output_data["Move Power"]:
            del self.output_data["Move Power"]

        remove_dice_in_description.remove_dice(self.output_data)
Пример #2
0
 def setup_abilities(self, csv_row):
     self.output_data["Abilities"] = []
     self.output_data["Abilities"].append(
         csv_row[self.header.index("Ability1")])
     self.output_data["Abilities"].append(
         csv_row[self.header.index("Ability2")])
     self.output_data["Hidden Ability"] = util.ensure_string(
         csv_row[self.header.index("HiddenAbility")])
Пример #3
0
 def setup_basic_stats(self, csv_row):
     self.output_data["index"] = util.ensure_int(
         csv_row[self.header.index("Index Number")])
     self.output_data["SR"] = util.ensure_float(
         csv_row[self.header.index("SR")])
     self.output_data["Hit Dice"] = util.ensure_int(
         csv_row[self.header.index("Hit Dice")])
     self.output_data["MIN LVL FD"] = util.ensure_int(
         csv_row[self.header.index("MIN LVL FD")])
     self.output_data["HP"] = util.ensure_int(
         csv_row[self.header.index("HP")])
     self.output_data["AC"] = util.ensure_int(
         csv_row[self.header.index("AC")])
     self.output_data["Evolve"] = util.ensure_string(
         csv_row[self.header.index("Evolve")])
Пример #4
0
 def setup_size(self, csv_row):
     self.output_data["size"] = util.ensure_string(
         csv_row[self.header.index("Size")])