Example #1
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);
    }
Example #2
0
 /// <summary>
 /// Gets Bonus stat against a specific armor type (absolut)
 /// </summary>
 /// <param name="type">Armortype of the unit against which the bonus will be granted</param>
 /// <param name="whichValue">Which value to apply the buff to</param>
 /// <returns>Value of the bonus (0 means no buff or nerf)</returns>
 public static int GetAbsolutPassiveAgainstArmortype(Unit.ArmorType type, Value whichValue)
 {
     return(skillValuesVersusArmortypeAbsolut[(int)type, (int)whichValue]);
 }
Example #3
0
 /// <summary>
 /// Sets Bonus stat against a specific armor type (absolut)
 /// </summary>
 /// <param name="type">Armortype of the unit against which the bonus will be granted</param>
 /// <param name="whichValue">Which value to apply the buff to</param>
 /// <param name="valueToSetTo">Value to set the bonus to (0 means no buff or nerf)</param>
 public static void SetAbsolutPassiveAgainstArmortype(Unit.ArmorType type, Value whichValue, int valueToSetTo)
 {
     skillValuesVersusArmortypeAbsolut[(int)type, (int)whichValue] = valueToSetTo;
 }
Example #4
0
 /// <summary>
 /// Gets Bonus stat for specific armor type (absolut)
 /// </summary>
 /// <param name="type">The type of the armor to get the effect for</param>
 /// <param name="whichValue">Which value to get the effect for</param>
 /// <returns>Value of the bonus (0 means no buff or nerf)</returns>
 public static int GetAbsolutPassiveArmortype(Unit.ArmorType type, Value whichValue)
 {
     return(skillValuesAbsolutArmortype[(int)type, (int)whichValue]);
 }
Example #5
0
 /// <summary>
 /// Gets Bonus stat for specific armor type (percentage)
 /// </summary>
 /// <param name="type">The type of the armor to get the effect for</param>
 /// <param name="whichValue">Which value to get the effect for</param>
 /// <returns>Value of the bonus (1.0f means no buff or nerf)</returns>
 public static float GetPassiveArmortype(Unit.ArmorType type, Value whichValue)
 {
     return(skillValuesArmortype[(int)type, (int)whichValue]);
 }
Example #6
0
    // Passiv Buffs & Nerfs for specific ArmorTypes

    /// <summary>
    /// Sets Bonus stat for specific armor type (percentage)
    /// </summary>
    /// <param name="type">Type of the armor to grant the bonus to</param>
    /// <param name="whichValue">Which value to apply the buff to</param>
    /// <param name="valueToSetTo">Value to set the bonus to (1.0f means no buff or nerf)</param>
    public static void SetPassiveArmortype(Unit.ArmorType type, Value whichValue, float valueToSetTo)
    {
        skillValuesArmortype[(int)type, (int)whichValue] = valueToSetTo;
    }