Пример #1
0
        public float AdjustedMeleeDamageAmount(Verb ownerVerb, Pawn attacker, Thing equipment)
        {
            if ((ownerVerb == null) ? (!typeof(Verb_MeleeAttack).IsAssignableFrom(this.verbClass)) : (!(ownerVerb is Verb_MeleeAttack)))
            {
                Log.ErrorOnce(string.Format("Attempting to get melee damage for a non-melee verb {0}", this), 26181238);
            }
            float num = (ownerVerb == null || ownerVerb.tool == null) ? ((float)this.meleeDamageBaseAmount) : ownerVerb.tool.AdjustedMeleeDamageAmount(ownerVerb.ownerEquipment, this.meleeDamageDef);

            if (attacker != null)
            {
                num *= ownerVerb.GetDamageFactorFor(attacker);
            }
            return(num);
        }
Пример #2
0
        public float AdjustedMeleeDamageAmount(Verb ownerVerb, Pawn attacker, Thing equipment)
        {
            if ((ownerVerb == null) ? (!this.IsMeleeAttack) : (!ownerVerb.IsMeleeAttack))
            {
                Log.ErrorOnce(string.Format("Attempting to get melee damage for a non-melee verb {0}", this), 26181238, false);
            }
            float num;

            if (ownerVerb != null && ownerVerb.tool != null)
            {
                num = ownerVerb.tool.AdjustedBaseMeleeDamageAmount(ownerVerb.ownerEquipment, this.meleeDamageDef);
            }
            else
            {
                num = (float)this.meleeDamageBaseAmount;
            }
            if (attacker != null)
            {
                num *= ownerVerb.GetDamageFactorFor(attacker);
            }
            return(num);
        }
 public float AdjustedDamageAmount(Verb verb, Pawn caster)
 {
     return((float)this.amount * verb.GetDamageFactorFor(caster));
 }