def _get_dmg_for_dmg_type(dmg: str, reload_time: str, max_power: str, volley: str, volley_delay: str, print_percent: bool) -> str: """Returns base dps and dps per power""" if dmg: dmg = float(dmg) reload_time = int(reload_time) reload_seconds = util.convert_ticks_to_seconds(reload_time) max_power = int(max_power) volley = int(volley) if volley_delay: volley_delay = int(volley_delay) else: volley_delay = 0 volley_duration_seconds = util.convert_ticks_to_seconds( (volley - 1) * volley_delay) reload_seconds += volley_duration_seconds full_volley_dmg = dmg * float(volley) dps = full_volley_dmg / reload_seconds dps_per_power = dps / max_power if print_percent: percent = '%' else: percent = '' if volley > 1: single_volley_dmg = f'per shot: {util.format_up_to_decimals(dmg, 2)}, ' else: single_volley_dmg = '' full_volley_dmg = util.format_up_to_decimals(full_volley_dmg, 2) dps = util.format_up_to_decimals(dps, 3) dps_per_power = util.format_up_to_decimals(dps_per_power, 3) result = f'{full_volley_dmg}{percent} ({single_volley_dmg}dps: {dps}{percent}, per power: {dps_per_power}{percent})' return result else: return ''
def _get_capacity_per_tick(capacity: str, room_type: str) -> str: if capacity: cap_per_tick = util.convert_ticks_to_seconds(int(capacity)) result = f'{util.format_up_to_decimals(cap_per_tick, 3)}{CAPACITY_PER_TICK_UNITS[room_type]}' return result else: return ''
def _get_cooldown(cooldown: str) -> str: if cooldown: cooldown_seconds = util.convert_ticks_to_seconds(int(cooldown)) result = f'{util.format_up_to_decimals(cooldown_seconds, 3)}s' return result else: return ''
def _get_emp_length(emp_length: str) -> str: if emp_length: emp_length_seconds = util.convert_ticks_to_seconds(int(emp_length)) result = util.get_formatted_duration(emp_length_seconds, include_relative_indicator=False) return result else: return ''
def _get_shots_fired(volley: str, volley_delay: str) -> str: if volley and volley != '1': volley = int(volley) volley_delay = int(volley_delay) volley_delay_seconds = util.format_up_to_decimals( util.convert_ticks_to_seconds(volley_delay), 3) result = f'{volley:d} (Delay: {volley_delay_seconds}s)' return result else: return ''