Portugués
Damage

//------------------------------------
// Constants that affect the formulas
//------------------------------------

// Attribute Bonus (AB). First takes into account the subclass, and if no subclass is present, uses the class.
attribute_bonus =

Barbarian: (STR - 20) * 2.0
Warrior: (STR - 20) * 1.5
Marksman: (DXT - 20) * 1.5
Archer: (DXT) - 20) * 1
Warlock: (INT - 20) * 1.75
Mage: (INT - 20) * 1.3

//---------------------------
// STEP 1. Get Weapon Damage
//---------------------------

// a. Get the minimum and maximum damage from the weapon nominal damage (seen in the weapon tooltip). Here is also added the damage from "[type] Damage +X" modifiers (such as Accurate Swings, for example).
total_damage_min = sum(weapon_damage[type].min)
total_damage_max = sum(weapon_damage[type].max)

// b. Apply Weapon Damage per Type % found in items or spells as " Damage +%".
weapon_damage[type].min += weapon_damage[type].min / 100 * weapon_percent_bonus[type]
weapon_damage[type].max += weapon_damage[type].max / 100 * weapon_percent_bonus[type]

//----------------------
// STEP 2. Bonus Factor
//----------------------

// a. Get extra damage. This is comprised of the Attribute Bonus (AB) and the Quality-Material-Kind Bonus (QMKB, which is shown in the tooltip as (+X)).
extra_damage_per_type[type] = attribute_bonus + QMKB

// b. The extra damage needs to be calculated in relation to each individual type of damage, so the extra damage is proportionally distributed.
extra_damage_per_type[type] = extra_damage_per_type[type] * (weapon_damage[type].max / total_damage_max)

//------------------------------
// STEP 3. Get the Final Damage
//------------------------------

// a. Iterate through all kinds of damage (Slashing, Piercing, Blunt, Fire, Ice, Lightning), randomizing the difference between the minimum and the maximum.
resulting_damage[type] = weapon_damage[type].min + random(weapon_damage[type].max - weapon_damage[type].min)

// b. Apply the Weapon Damage % modifier, found mostly in spells as "Weapon Damage +%" and applies to all damage types.
resulting_damage[type] += resulting_damage[type] / 100 * weapon_damage_percent

// c. Add the extra damage per damage type
resulting_damage[type] += extra_damage_per_type[type]

// d. Add the Damage Bonus modifiers, both non-percentual and percentual. This is what can be found in spells as "Damage Bonus +X" or "Damage Bonus +%".
resulting_damage[type] = (resulting_damage[type] + damage_bonus) * (1 + (damage_bonus_percent / 100))

// e. Sum all the damage types and add all the "[type] Damage Bonus +X" (which is mostly used by magical gems embedded to items). This is considered as "special damage" and will be absorbed only by the armor and then added to the damage almost at the end of the reduction of damage.
resulting_damage[type] = sum(resulting_damage[type]) + sum(special_damage[type])

// f. Round up the resulting damage
resulting_damage[type] = floor(resulting_damage[type])

//------------------------------
// Get the Character Sheet info
//------------------------------

To get the weapon damage potential as shown in the Character Sheet, just replace the initial resulting damage in 3.a directly as the minimum, keep on calculating until you get the minimum resulting damage, and then repeat from step 3.a again with the maximum resulting damage.

//---------------------
// Damage: Case of Use
//---------------------

Two Handed Ancestral Sword of Magnanite (Arcane)

1.a)
total_damage_min = 323
total_damage_max = 351

1.b)
weapon_damage[slashing].min = 323
weapon_damage[slashing].max = 351

Add Athletic Passive +10% Slashing Damage:

weapon_damage[slashing].min += 323 / 100 * 10 = 355.3
weapon_damage[slashing].max += 351 / 100 * 10 = 386.1

2.a)
// Character stats without equipping the weapon
89 DXT + Warmaster's Might +15% = 102.35 DXT

attribute_bonus = (102.35 - 20) * 2 = 164.7

extra_damage_per_type[slashing] = (164.7 + 69) = 233.7

2.b)
extra_damage_per_type[slashing] = 233.7 * (386.1 / 351) = 257.07

3.a)
resulting_damage[slashing].min = 355.3
resulting_damage[slashing].max = 386.1

3.b)
resulting_damage[slashing].min += 355.3 / 100 * 0 = 355.3
resulting_damage[slashing].max += 386.1 / 100 * 0 = 386.1

3.c)
resulting_damage[slashing].min += 257.07 = 612.37
resulting_damage[slashing].max += 257.07 = 643.17

3.d)
Add Fulminating Active
resulting_damage[slashing].min = 612.37 * (1 + (50/100)) = 918.555
resulting_damage[slashing].max = 643.17 * (1 + (50/100)) = 964.755

3.e)
resulting_damage[slashing].min = 918.555 + 0 = 918.555
resulting_damage[slashing].max = 964.755 + 0 = 964.755

3.f)
resulting_damage[slashing].min = floor(918.555) = 918
resulting_damage[slashing].max = floor(964.755) = 964


Armor and Resistances

Armour is the first reduction of damage, taken as "protection". That ends up in a "protected damage", then the player receives the damage to its body and "resistance" reduces the "protected damage".

//------------------------------------
// Constants that affect the formulas
//------------------------------------

[Armor Class]

// These are not so different due to the subclasses being more differentiated spell-wise than equipment-wise. But this exception will come to an end, so Armor Class (AC) will be officialised in the game and taken into account for balance.

Warrior: 1.40
Archer: 1.30
Mage: 1.20

Barbarian: 1.40
Knight: 1.40
Hunter: 1.30
Marksman: 1.35
Conjurer: 1.20
Warlock: 1.20

Default: 1.30
Monsters: 0.26

[Item Distribution]

// Each part contributes a different percentage of the Armor Base Points (ABP) to the Armor Points (AP).

Torso: 28%
Head: 24%
Legs: 20%
Arms: 16%
Gauntlets: 12%
Shield: 25%
Right hand: 20%

Breastplate: Torso
Tunic: Torso, Arms, Legs
Helmet/Hat: Head
Leggings: Legs
Pauldrons: Arms
Gauntlets: Gauntlets
Shield: Shield
Bracelet: Right hand

[Protection Quality Factors]

Very Bad: 0.2
Bad: 0.35
Normal: 0.5
Good: 0.65
Very Good: 0.8

//---------------------------
// STEP 1. Obtain Protection
//---------------------------

// a. Protection per damage type (type). Calculated from the ABP ("Armor: X", as shown in the tooltip) fractioned by the percentage that armor part contributes to the armor (Item Distribution) and affected by the Protection Factor (PF) (Very Bad, Bad, Normal, Good, Very Good).
protection[type] = ceil(armor_base_points * (item_distribution / 100) * protection_factor)

// b. Add the Quality-Material-Kind Bonus (QMKB) to all the damage types. This value is the one found after the ABP shown as "(+X)"
protection[type] += QMKB

// c. Add the percentual bonus that is specific to the type. This is rare or not used currently as a modifier.
protection[type] += protection[type] * {Protection Type Armor Bonus %} / 100

// d. Add the percentual bonus that is related to all damages. This is the modifier you see as "Protection: X%" in the tooltip.
protection[type] += protection[type] * {Armor Bonus %} / 100

// e. Multiply by the AC
protection[type] *= armor_class

//--------------------------------------
// STEP 2. Obtain Resistances to Damage
//--------------------------------------

// a. Resistance to Damage per general type. These ones are always percentual and the types can be Magical and Physical.
general_resistance[general_type] = {Resistance to Physical/Magical Damage %}

// b. Resistance to Damage per type. These are the individual damage types.
resistance[type] = {Resistance to Damage Type %}

//--------------------------
// STEP 3. Damage Reduction
//--------------------------

// a. In case of multiple damages, calculate the influence of each in the total damage to reduce the correct amount. Also, get the minimum damage, which ranges between 4% and 8%. This applies to every individual damage.
protection_influence[type] = (100 / total_damage) * damage[type]
minimum_damage_percent = 4 + random(0,4)
minimum_damage[type] = damage[type] / 100 * minimum_damage_percent

// b. Reduce the damage by protection.
damage[type] -= protection[type] * (protection_influence / 100)

// c. Reduce the damage by general type of resistance percentage.
damage[type] -= damage[type] * general_resistance[general_type] / 100

// d. Reduce the damage by individual type of resistance percentage.
damage[type] -= damage[type] * resistance[type] / 100

// e. Make sure that at this step the damage per type is not lower than the minimum damage.
if damage[type] < minimum_damage[type] then damage[type] = minimum_damage[type]

// f. Reduce the special damage that comes from the "[Type] Damage Bonus +X" usually found in gems. This damage is only reduced by the armor depending on the Protection Factor and then added to the normal damage.
special_damage[type] = ceil(special_damage[type] - (special_damage[type] * PF[type]))

// g. Obtain the total damage summing all the types of damage and then add the special damage as well.
total_damage = sum(damage[type]) + sum(special_damage[type])

// h. Reduce damage by barrier points. Usually, magical barriers are for all damages. Also, reduce the total that we obtained in the previous step.
damage[type] -= barrier_points[type]
total_barrier_points = sum(barrier_points[type])
total_damage -= total_barrier_points

// i. Apply the reduction by "Ranged Received Damage %" o "Melee Received Damage %", if they are present. (Ranged is determined from 3 meters or more).
reduced_damage = total_damage - (total_damage * (ranged_damage || melee_damage) / 100))

// j. Round up the total reduced damage.
reduced_damage = ceil(reduced_damage)

//-------------------------------------
// Protection, Resistance: Case of Use
//-------------------------------------

Warmaster Barbarian Armor of Alloy Steel (Artisan) - Kind: Common - Receiving Damage: 410 Piercing and 15 Fire Damage Bonus from a gem in the weapon.

ABP: 235
PF[slashing]: Good
PF[fire]: Very Bad
QMKB: 11

1.a,b,c,d,e)
Helmet: (ceil(235 * (0.24) * 0.65) + 11) * 1.4 = 67.2
Torso: (ceil(235 * (0.28) * 0.65) + 11) * 1.4 = 75.6
Pauldron: (ceil(235 * (0.16) * 0.65) + 11) * 1.4 = 50.4
Gauntlets: (ceil(235 * (0.12) * 0.65) + 11) * 1.4 = 42
Leggings: (ceil(235 * (0.20) * 0.65) + 11) * 1.4 = 58.8

protection[piercing] = 294

2.a,b)
general_resistance[general_type] = 0

Add Passive Steel Temper 10% Resistance to Piercing Damage
resistance[piercing] = 10

3.a)
protection_influence[piercing] = 100 / 410 * 410 = 1
minimum_damage_percent = 4 + 0
minimum_damage[punzante] = 410 / 100 * 4 = 16.4

3.b)
damage[piercing] = 410
damage[piercing] -= 294 * (100/100) = 116

3.c)
damage[piercing] -= 116 * 0 / 100 = 116

3.d)
damage[piercing] -= 116 * 10 / 100 = 104.4

3.e)
116.4 > 16.4

3.f)
special_damage[fire] = special_damage[fire] - (special_damage[fire] * PF[fire]) = 15 - (15 * 0.2) = 12
damage[fire] = 12

3.g)
total_damage = 104.4 + 12 = 116.4

3.h)
damage[type] -= 0
total_barrier_points = 0
total_damage -= 0

3.i)
reduced_damage = 116.4 - (116.4 * 0 / 100) = 116.4

3.j)
reduced_damage = ceil(116.4) = 117
Contato | Política de Privacidade | Regras de conduta | Copyright © 2002-2024 Nimble Giant Entertainment (NGD Studios AB). Todos os direitos reservados.