private void CalculateDamages(Mech attacker, AbstractActor target)
        {
            Mod.MeleeLog.Info?.Write($"Calculating PHYSICAL WEAPON damage for attacker: {CombatantUtils.Label(attacker)} " +
                                     $"vs. target: {CombatantUtils.Label(target)}");

            float damage = attacker.PhysicalWeaponDamage();

            damage = target.ApplyPhysicalWeaponDamageReduction(damage);

            // Target damage applies as a single modifier
            this.TargetDamageClusters = AttackHelper.CreateDamageClustersWithExtraAttacks(attacker, damage, ModStats.PhysicalWeaponExtraHitsCount);
            StringBuilder sb = new StringBuilder(" - Target damage clusters: ");

            foreach (float cluster in this.TargetDamageClusters)
            {
                sb.Append(cluster);
                sb.Append(", ");
            }
            Mod.MeleeLog.Info?.Write(sb.ToString());
        }
Esempio n. 2
0
        private void CalculateDamages(Mech attacker, AbstractActor target)
        {
            Mod.MeleeLog.Info?.Write($"Calculating KICK damage for attacker: {CombatantUtils.Label(attacker)} @ {attacker.tonnage} tons " +
                                     $"vs. target: {CombatantUtils.Label(target)}");

            float damage = attacker.KickDamage();

            // Adjust damage for any target resistance
            damage = target.ApplyKickDamageReduction(damage);

            this.TargetDamageClusters = AttackHelper.CreateDamageClustersWithExtraAttacks(attacker, damage, ModStats.KickExtraHitsCount);
            StringBuilder sb = new StringBuilder(" - Target damage clusters: ");

            foreach (float cluster in this.TargetDamageClusters)
            {
                sb.Append(cluster);
                sb.Append(", ");
            }
            Mod.MeleeLog.Info?.Write(sb.ToString());
        }