def get_dps(self, item, reload): cycle_parameters = self.get_cycle_parameters(item, reload) if cycle_parameters is None: return DmgStats(0, 0, 0, 0) volley = self.get_volley(item) return DmgStats(volley.em, volley.thermal, volley.kinetic, volley.explosive, 1 / cycle_parameters.average_time)
def get_volley(self, item): if not self.get_cycles_until_reload(item): return DmgStats(0, 0, 0, 0) em = item.attrs.get(AttrId.fighter_ability_kamikaze_dmg_em, 0) therm = item.attrs.get(AttrId.fighter_ability_kamikaze_dmg_therm, 0) kin = item.attrs.get(AttrId.fighter_ability_kamikaze_dmg_kin, 0) expl = item.attrs.get(AttrId.fighter_ability_kamikaze_dmg_expl, 0) squad_size = self.get_squad_size(item) return DmgStats(em, therm, kin, expl, squad_size)
def get_volley(self, item): if not self.get_cycles_until_reload(item): return DmgStats(0, 0, 0, 0) em = item.attrs.get(AttrId.fighter_ability_missiles_dmg_em, 0) therm = item.attrs.get(AttrId.fighter_ability_missiles_dmg_therm, 0) kin = item.attrs.get(AttrId.fighter_ability_missiles_dmg_kin, 0) expl = item.attrs.get(AttrId.fighter_ability_missiles_dmg_expl, 0) dmg_mult = item.attrs.get(AttrId.fighter_ability_missiles_dmg_mult, 1) squad_size = self.get_squad_size(item) mult = dmg_mult * squad_size return DmgStats(em, therm, kin, expl, mult)
def get_volley(self, item): if not self.get_cycles_until_reload(item): return DmgStats(0, 0, 0, 0) base_dmg_item = self._get_base_dmg_item(item) if base_dmg_item is None: return DmgStats(0, 0, 0, 0) em = base_dmg_item.attrs.get(AttrId.em_dmg, 0) therm = base_dmg_item.attrs.get(AttrId.therm_dmg, 0) kin = base_dmg_item.attrs.get(AttrId.kin_dmg, 0) expl = base_dmg_item.attrs.get(AttrId.expl_dmg, 0) mult = item.attrs.get(AttrId.dmg_mult) return DmgStats(em, therm, kin, expl, mult)
def get_volley(self, item): if not self.get_cycles_until_reload(item): return DmgStats(0, 0, 0, 0) charge = self.get_charge(item) if charge is None: return DmgStats(0, 0, 0, 0) charge_defeff_id = charge._type_default_effect_id if (charge_defeff_id != EffectId.bomb_launching or charge_defeff_id not in charge._running_effect_ids): return DmgStats(0, 0, 0, 0) em = charge.attrs.get(AttrId.em_dmg, 0) therm = charge.attrs.get(AttrId.therm_dmg, 0) kin = charge.attrs.get(AttrId.kin_dmg, 0) expl = charge.attrs.get(AttrId.expl_dmg, 0) squad_size = self.get_squad_size(item) return DmgStats(em, therm, kin, expl, squad_size)
def get_volley(self, item): volley = TurretDmgEffect.get_volley(self, item) try: spoolup_mult = item.attrs[AttrId.dmg_mult_bonus_max] except KeyError: return volley return DmgStats(volley.em, volley.thermal, volley.kinetic, volley.explosive, 1 + spoolup_mult)
def get_volley(self, item): if not self.get_cycles_until_reload(item): return DmgStats(0, 0, 0, 0) # If module can cycle until reload, it means we can assume that there's # a charge loaded charge = self.get_charge(item) charge_defeff_id = charge._type_default_effect_id if (charge_defeff_id is None or charge_defeff_id not in charge._running_effect_ids or charge_defeff_id not in (EffectId.missile_launching, EffectId.fof_missile_launching, EffectId.bomb_launching)): return DmgStats(0, 0, 0, 0) em = charge.attrs.get(AttrId.em_dmg, 0) therm = charge.attrs.get(AttrId.therm_dmg, 0) kin = charge.attrs.get(AttrId.kin_dmg, 0) expl = charge.attrs.get(AttrId.expl_dmg, 0) return DmgStats(em, therm, kin, expl)
def get_applied_dps(self, item, tgt_data, reload): return DmgStats(0, 0, 0, 0)
def get_dps(self, item, reload): return DmgStats(0, 0, 0, 0)
def get_volley(self, item): em = item.attrs.get(AttrId.em_dmg, 0) therm = item.attrs.get(AttrId.therm_dmg, 0) kin = item.attrs.get(AttrId.kin_dmg, 0) expl = item.attrs.get(AttrId.expl_dmg, 0) return DmgStats(em, therm, kin, expl)
def get_dps(self, item_filter, reload, tgt_resists): dpss = [] for item in self.__dd_iter(item_filter): dps = item.get_dps(reload, tgt_resists) dpss.append(dps) return DmgStats._combine(dpss)
def get_volley(self, item_filter, tgt_resists): volleys = [] for item in self.__dd_iter(item_filter): volley = item.get_volley(tgt_resists) volleys.append(volley) return DmgStats._combine(volleys)
def get_dps(self, reload=False, tgt_resists=None): dpss = [] for effect in self.__dd_effect_iter(): dps = effect.get_dps(self, reload) dpss.append(dps) return DmgStats._combine(dpss, tgt_resists)
def get_volley(self, tgt_resists=None): volleys = [] for effect in self.__dd_effect_iter(): volley = effect.get_volley(self) volleys.append(volley) return DmgStats._combine(volleys, tgt_resists)