示例#1
0
    /// <summary>
    /// Calculates the attack value without the eventual passives against the enemy
    /// </summary>
    private int GetAttack()
    {
        var returnDamage = this.attack + Unit.OtherBoostLevel[this.Level] + Unit.OtherBoostLevel[Unit.ATKGroupLevel[(int)this.UnitType]];

        returnDamage += Passives.GetAbsolutPassive(this.UnitType, Passives.Value.ATTACK);
        returnDamage  = (int)(returnDamage * Passives.GetPassive(this.UnitType, Passives.Value.ATTACK));

        returnDamage += Passives.GetAbsolutPassiveArmortype(this.ArmorTypeUnit, Passives.Value.ATTACK);
        returnDamage  = (int)(returnDamage * Passives.GetPassiveArmortype(this.ArmorTypeUnit, Passives.Value.ATTACK));

        return(returnDamage);
    }
示例#2
0
    /// <summary>
    /// Calculates the attack value against an enemy unit type
    /// </summary>
    /// <param name="enemyUnitType">The enemy unit type which the attack value should be calculated for.</param>
    /// <param name="armorUnitType">The enemy unit armor type which the attack value should be calculated for.</param>
    /// <returns>Returns the attack value/the damage calculated</returns>
    public int GetAttack(Unit.Type enemyUnitType, Unit.ArmorType armorUnitType)
    {
        var returnDamage = this.attack + Unit.OtherBoostLevel[this.Level] + Unit.OtherBoostLevel[Unit.ATKGroupLevel[(int)this.UnitType]];

        returnDamage += Passives.GetAbsolutPassive(this.UnitType, Passives.Value.ATTACK);
        returnDamage  = (int)(returnDamage * Passives.GetPassive(this.UnitType, Passives.Value.ATTACK));

        returnDamage += Passives.GetAbsolutPassiveArmortype(this.ArmorTypeUnit, Passives.Value.ATTACK);
        returnDamage  = (int)(returnDamage * Passives.GetPassiveArmortype(this.ArmorTypeUnit, Passives.Value.ATTACK));

        returnDamage += Passives.GetAbsolutPassiveAgainstType(enemyUnitType, Passives.Value.ATTACK);
        returnDamage  = (int)(returnDamage * Passives.GetPassiveAgainstType(enemyUnitType, Passives.Value.ATTACK));

        returnDamage += Passives.GetAbsolutPassiveAgainstArmortype(armorUnitType, Passives.Value.ATTACK);
        returnDamage  = (int)(returnDamage * Passives.GetPassiveAgainstArmortype(armorUnitType, Passives.Value.ATTACK));

        return(returnDamage);
    }