Exemplo n.º 1
0
def main():
    args = parser.parse_args()
    print('Input args: %s' % args)

    file_name = args.source_data

    mitama_type_limit = sep_utf_str_to_dict(args.mitama_suit)
    prop_limit = sep_utf_str_to_dict(args.prop_limit)
    upper_prop_limit = sep_utf_str_to_dict(args.upper_prop_limit)

    l2_prop, l2_prop_value = sep_utf_str(args.sec_prop_value)
    l4_prop, l4_prop_value = sep_utf_str(args.fth_prop_value)
    l6_prop, l6_prop_value = sep_utf_str(args.sth_prop_value)

    ignore_serial = sep_utf_str(args.ignore_serial)

    base_att, base_critdamage_att, damage_limit = \
        map(float, sep_utf_str(args.damage_limit))

    base_hp, base_critdamage_hp, hp_crit_limit = \
        map(float, sep_utf_str(args.health_limit))

    if (base_critdamage_att and base_critdamage_hp
            and base_critdamage_att != base_critdamage_hp):
        print('WARN: crit_damage between DL and HL is different')

    if base_critdamage_att:
        base_critdamage = base_critdamage_att
    else:
        base_critdamage = base_critdamage_hp

    origin_data = load_data.get_mitama_data(file_name, ignore_serial)
    print('Loading data finish')

    locate_sep_data = load_data.sep_mitama_by_loc(origin_data)

    print('Start calculating')
    locate_sep_data = cal.filter_loc(locate_sep_data, l2_prop,
                                     int(l2_prop_value), l4_prop,
                                     int(l4_prop_value), l6_prop,
                                     int(l6_prop_value))

    mitama_comb = cal.make_combination(locate_sep_data, mitama_type_limit,
                                       args.all_suit)

    filter_result = cal.filter_mitama(mitama_comb,
                                      mitama_type_limit,
                                      prop_limit,
                                      upper_prop_limit,
                                      all_suit=args.all_suit)

    if damage_limit > 0:
        filter_result = cal.fit_damage_limit(filter_result, base_att,
                                             base_critdamage, damage_limit)
    if hp_crit_limit > 0:
        filter_result = cal.fit_hp_crit_limit(filter_result, base_hp,
                                              base_critdamage, hp_crit_limit)

    write_data.write_mitama_result(args.output_file, filter_result, base_att,
                                   base_hp, base_critdamage)
Exemplo n.º 2
0
def main():
    args = parser.parse_args()
    print('Input args: %s' % args)

    file_name = args.source_data

    mitama_type_limit = sep_utf_str_to_dict(args.mitama_suit)
    prop_limit = sep_utf_str_to_dict(args.prop_limit)

    l2_prop, l2_prop_value = sep_utf_str(args.sec_prop_value)
    l4_prop, l4_prop_value = sep_utf_str(args.fth_prop_value)
    l6_prop, l6_prop_value = sep_utf_str(args.sth_prop_value)

    ignore_serial = sep_utf_str(args.ignore_serial)

    origin_data = load_data.get_mitama_data(file_name, ignore_serial)
    print('Loading data finish')

    locate_sep_data = load_data.sep_mitama_by_loc(origin_data)

    print('Start calculating')
    locate_sep_data = cal.filter_loc(locate_sep_data,
                                     l2_prop, int(l2_prop_value),
                                     l4_prop, int(l4_prop_value),
                                     l6_prop, int(l6_prop_value))

    mitama_comb = cal.make_combination(locate_sep_data,
                                       mitama_type_limit, args.all_suit)

    filter_result = cal.filter_mitama(mitama_comb,
                                      mitama_type_limit,
                                      prop_limit,
                                      all_suit=args.all_suit)

    write_data.write_mitama_result(args.output_file, filter_result)
Exemplo n.º 3
0
def main():
    args = parser.parse_args()
    file_name = args.source_data

    mitama_type, type_min_num = sep_utf_str(args.mitama_suit)
    prop_limit = format_prop_limit(args.prop_limit)

    l2_prop, l2_prop_value = sep_utf_str(args.sec_prop_value)
    l4_prop, l4_prop_value = sep_utf_str(args.fth_prop_value)
    l6_prop, l6_prop_value = sep_utf_str(args.sth_prop_value)

    ignore_serial = sep_utf_str(args.ignore_serial)

    origin_data = load_data.get_mitama_data(file_name, ignore_serial)
    suit_enhance = load_data.get_mitama_enhance(file_name)
    print('load data finish')

    locate_sep_data = load_data.sep_mitama_by_loc(origin_data)
    print('sep data by loc finish')

    mitama_comb = cal.filter_loc2make_combination(locate_sep_data, l2_prop,
                                                  int(l2_prop_value), l4_prop,
                                                  int(l4_prop_value), l6_prop,
                                                  int(l6_prop_value))
    print('make combination finish')

    filter_result = cal.filter_mitama(mitama_comb,
                                      suit_enhance,
                                      mitama_type=mitama_type,
                                      type_min_num=int(type_min_num),
                                      prop_limit=prop_limit,
                                      all_suit=args.all_suit)
    print('filter mitama finish')

    write_data.write_mitama_result(args.output_file, filter_result)
Exemplo n.º 4
0
    def run(self):
        self.pre_check()
        origin_data = load_data.get_mitama_data(self.file_name,
                                                self.ignore_serial)
        print('Loading data finish')

        locate_sep_data = load_data.sep_mitama_by_loc(origin_data)

        print('Start calculating')
        self.combs = algorithm.MitamaComb(locate_sep_data,
                                          self.l2_prop_limit,
                                          self.l4_prop_limit,
                                          self.l6_prop_limit,
                                          self.mitama_type_limit,
                                          self.all_suit,
                                          self.attack_only,
                                          self.es_prop, self.es_prop_num,
                                          self.prop_limit,
                                          self.upper_prop_limit,
                                          self.base_att, self.base_critdamage,
                                          self.damage_limit,
                                          self.base_hp, self.hp_crit_limit)

        filter_result = self.combs.get_comb()

        result_num = write_data.write_mitama_result(self.output_file,
                                                    filter_result,
                                                    self.es_prop,
                                                    self.base_att,
                                                    self.base_hp,
                                                    self.base_critdamage)

        return result_num
Exemplo n.º 5
0
def main():
    args = parser.parse_args()
    #print('Input args: %s' % args)

    file_name = args.source_data

    mitama_type_limit = sep_utf_str_to_dict(args.mitama_suit)
    prop_limit = sep_utf_str_to_dict(args.prop_limit)
    upper_prop_limit = sep_utf_str_to_dict(args.upper_prop_limit)

    l2_prop, l2_prop_value = sep_utf_str(args.sec_prop_value)
    l4_prop, l4_prop_value = sep_utf_str(args.fth_prop_value)
    l6_prop, l6_prop_value = sep_utf_str(args.sth_prop_value)

    ignore_serial = sep_utf_str(args.ignore_serial)

    base_att, base_critdamage_att, damage_limit = \
        map(float, sep_utf_str(args.damage_limit))

    base_hp, base_critdamage_hp, hp_crit_limit = \
        map(float, sep_utf_str(args.health_limit))

    if (base_critdamage_att and base_critdamage_hp and
            base_critdamage_att != base_critdamage_hp):
        print('WARN: crit_damage between DL and HL is different')

    if base_critdamage_att:
        base_critdamage = base_critdamage_att
    else:
        base_critdamage = base_critdamage_hp

    origin_data = load_data.get_mitama_data(file_name, ignore_serial)
    #print('Loading data finish')

    locate_sep_data = load_data.sep_mitama_by_loc(origin_data)

    #print('Start calculating')
    filter_result = cal.filter_fast(locate_sep_data)

    if 1:
        write_data.write_mitama_result(args.output_file, filter_result,
                                      base_att, base_hp, base_critdamage)
    else:
        for c in filter_result:
            pass
    def run(self):
        origin_data = load_data.get_mitama_data(self.file_name,
                                                self.ignore_serial)
        print('Loading data finish')

        locate_sep_data = load_data.sep_mitama_by_loc(origin_data)

        print('Start calculating')
        locate_sep_data = cal.filter_loc_and_type(
            locate_sep_data, self.l2_prop_limit, self.l4_prop_limit,
            self.l6_prop_limit, self.mitama_type_limit, self.attack_only,
            self.es_prop, self.es_prop_num)

        mitama_comb, total_comb = cal.make_combination(locate_sep_data,
                                                       self.mitama_type_limit,
                                                       self.all_suit)

        filter_result = cal.filter_mitama(mitama_comb,
                                          self.mitama_type_limit,
                                          self.prop_limit,
                                          self.upper_prop_limit,
                                          total_comb,
                                          all_suit=self.all_suit)

        if self.damage_limit > 0:
            filter_result = cal.fit_damage_limit(filter_result, self.base_att,
                                                 self.base_critdamage,
                                                 self.damage_limit)
        if self.hp_crit_limit > 0:
            filter_result = cal.fit_hp_crit_limit(filter_result, self.base_hp,
                                                  self.base_critdamage,
                                                  self.hp_crit_limit)

        write_data.write_mitama_result(self.output_file, filter_result,
                                       self.es_prop, self.base_att,
                                       self.base_hp, self.base_critdamage)