Пример #1
0
    def analyze(self, chtr: AbstractCharacter, result: ResultObject) -> None:
        if result.damage > 0:
            mdf = chtr.get_modifier() + result.mdf
            deal, loss = mdf.calculate_damage(result.damage, result.hit,
                                              result.spec)
        else:
            deal = 0
            loss = 0

        self.total_damage += deal
        self.total_loss += loss
        self.total_hit += result.hit

        if deal > 0:
            self.logList.append({
                "time": result.time,
                "name": result.sname,
                "deal": deal,
                "loss": loss,
                "hit": result.hit,
                "mdf": result.mdf.as_dict(),
                "spec": result.spec,
            })
Пример #2
0
 def analyze(self, chtr: AbstractCharacter, result: ResultObject) -> None:
     self.add_damage_from_result_with_log(chtr.get_modifier(), result)