def burst10(args): preset = get_preset(args.id) template = get_template_generator("high_standard")().get_template( args.ulevel) target: ItemedCharacter = template(weaponList[preset.job], args.cdr) gen: JobGenerator = jobMap[preset.job].JobGenerator() v_builder = core.AlwaysMaximumVBuilder() graph = gen.package( target, v_builder, options=preset.options, ulevel=args.ulevel, weaponstat=[4, 9], ability_grade=Ability_grade(4, 1), ) sche = policy.AdvancedGraphScheduler( graph, policy.ListedFetchingPolicy( skill_ids=gen.get_skill_rotation_10sec(graph)), [rules.UniquenessRule()], ) analytics = core.StatAnalytics() control = core.Simulator(sche, target, analytics) control.start_simulation(args.time * 1000) start, end, dpm, loss = analytics.get_peak(10000) print(dpm) return analytics.get_log()
def dpm(args): preset = get_preset(args.id) template = get_template_generator("high_standard")().get_template( args.ulevel) target: ItemedCharacter = template(weaponList[preset.job], args.cdr) gen: JobGenerator = jobMap[preset.job].JobGenerator() v_builder = core.AlwaysMaximumVBuilder() graph = gen.package( target, v_builder, options=preset.options, ulevel=args.ulevel, weaponstat=[4, 9], ability_grade=Ability_grade(4, 1), ) sche = policy.AdvancedGraphScheduler( graph, policy.TypebaseFetchingPolicy(priority_list=[ core.BuffSkillWrapper, core.SummonSkillWrapper, core.DamageSkillWrapper, ]), [rules.UniquenessRule()] + gen.get_predefined_rules(rules.RuleSet.BASE), ) analytics = core.StatAnalytics() control = core.Simulator(sche, target, analytics) control.start_simulation(args.time * 1000) dpm = analytics.get_dpm() print(preset.job, dpm) return analytics.get_log()
def test(args): jobname, ulevel, runtime = args template = get_template_generator('high_standard')().get_template(ulevel) parser = IndividualDPMGenerator(jobname, template) parser.set_runtime(runtime * 1000) dpm = parser.get_dpm(ulevel=ulevel) return jobname, dpm
def test_job_generator_creation(): with open('../dpmModule/jobs/configs/archmageFb.json', encoding='utf-8') as f: test_conf = json.load(f) vEhc = None gen = JobGenerator() character = get_template_generator("high_standard")().get_template(8000)('스태프') gen.load(test_conf) passive_skill_list = gen.get_passive_skill_list(vEhc, character, None) not_implied_skill_list = gen.get_not_implied_skill_list(vEhc, character, None) print(passive_skill_list) print(not_implied_skill_list)
def export_configuration(jobname): template, _ = get_template_generator('high_standard')().query(6000) target = template(maplejobs.weaponList[jobname]) supplier = maplejobs.jobMap[jobname] v_builder = core.NjbStyleVBuilder(skill_core_level=25, each_enhanced_amount=17) gen = supplier.JobGenerator() gen.vEhc = v_builder.build_enhancer(target, gen) graph = gen.build(target) return graph.storage.export()
def export_configuration(jobname): template, _ = get_template_generator('high_standard')().query(6000) target = template(maplejobs.weaponList[jobname]) supplier = maplejobs.jobMap[jobname] v_builder = core.AlwaysMaximumVBuilder() gen = supplier.JobGenerator() gen.vEhc = v_builder.build_enhancer(target, gen) graph = gen.build(target) return graph.storage.export()
def test(args): preset, ulevel, cdr, runtime = args id, jobname, description, options, alt = preset template = get_template_generator("high_standard")().get_template(ulevel) parser = IndividualDPMGenerator(jobname, template) parser.set_runtime(runtime * 1000) result = parser.get_detailed_dpm(ulevel=ulevel, cdr=cdr, options=options) dpm = result["dpm"] loss = result["loss"] return jobname, cdr, description, dpm, loss, alt
def test(args): jobname, ulevel, runtime, cdr = args start = time.time() print(f"{jobname} {ulevel} 계산중") template = get_template_generator("high_standard")().get_template(ulevel) parser = IndividualDPMGenerator(jobname, template) parser.set_runtime(runtime * 1000) dpm = parser.get_dpm(ulevel=ulevel, cdr=cdr, weaponstat=[4, 9]) end = time.time() print(f"{jobname} {ulevel} 계산완료, {end - start:.3f}초") return jobname, ulevel, dpm
def dpm(args): template = get_template_generator("high_standard")().get_template( args.ulevel) parser = IndividualDPMGenerator(args.job, template) parser.set_runtime(args.time * 1000) try: dpm = parser.get_dpm( ulevel=args.ulevel, cdr=args.cdr, level=args.level, weaponstat=[4, 9], printFlag=args.log, statistics=args.stat or args.log, ) finally: print(args.job, dpm)
def dpm(args): if args.job == 'all': jobs = jobMap.keys() else: jobs = [args.job] for jobname in jobs: template = get_template_generator('high_standard')().get_template(args.ulevel) parser = IndividualDPMGenerator(jobname, template) try: dpm = parser.get_dpm(ulevel = args.ulevel, level = args.level, weaponstat = weaponstat, printFlag=args.log) except: raise finally: print(jobname, dpm)