Combat

From Idle Clans wiki
Revision as of 02:16, 2 June 2023 by PatheticQuacken (talk | contribs) (added a back to top button)

Something something combat is killing monsters. Bars fill, damage is done. Something about respawn time, clan perks, other potions, etc.

Combat Styles

For melee combat, the Attack skill is used to determine your melee hit chance, and the Strength skill is used to determine your melee max hit.

For archery combat, the Archery skill is used to determine both archery hit chance and archery max hit.

For magic combat, the Magic skill is used to determine both magic hit chance and magic max hit.

Based on what combat style is used by the attacker, the defender uses different stats to calculate their defence.

Hit Chance

Hit Chance is calculated as a contest between the attacker's augmented accuracy and the defender's augmented defence. These augmented stats are calculated as (stat + 64) * (level + 8) / 10. The result is truncated, so all digits after the decimal point are lost.

For example, consider a player fighting vampires with a scimitar.

The player has 100 melee accuracy and level 90 Attack; which gives them an augmented melee accuracy of (100 + 64) * (90 + 8) / 10 = 1607

Vampires have 72 melee defence and level 66 defence; which gives them an augmented defence of (72 + 64) * (66 + 8) / 10 = 1006

Vampires have a weakness to slash weapons, so the player using a scimitar reduces the vampires' augmented defence by 20%; reducing it to 1006 * (1 - 20%) = 804.8

The base chance to hit is calculated based on which of the two is bigger. If ACC < DEF; base hit chance = (ACC - 1) / (2 * DEF) If ACC >= DEF; base hit chance = 1 - (DEF + 1) / (2 * ACC)

In the example, the base hit chance = 1 - (804.8 + 1) / (2 * 1607) = 74%. This percentage is truncated again.

Accuracy related effects are applied at this point, so if the player has a 12% Attack enchantment boost, and is using a Potion of Pure Power giving a 20% boost to accuracy; the total hit chance becomes 74% * (1 + 12% + 20%) = 97%

For enemies, the hit chance is reduced by your defence enchantment. This is done correctly on the server, but on the client, this boost is applied to the augmented defence too. This means that the displayed enemy hit chance is lower than the actual hit chance.

Damage

When something hits an attack, it deals damage randomly between 0 and their max hit. This includes both ends, so you can hit and still do 0 damage.

Max Hit is calculated as (stat/8 + level + 13 + stat*level/64) / 10.

So if a player has 96 melee strength and level 90 Strength; they will have a max hit of (96/8 + 90 + 13 + 96*90/64) / 10 = 25

This number is then boosted by enemy weakness, enchantment boosts, and potions. If the player for example;

  • has a matching type, giving a 20% boost,
  • has full strength enchanted golden jewellery, giving a 12% boost, and
  • is using a Potion of Pure Power, giving a 20% boost,

the final max hit becomes 25 * (1+ 20% + 12% + 20%) = 38


Evasion

Your chance to dodge is the first thing processed when an enemy hits you. Let's consider a scenario where you have a 20% dodge chance and the enemy has a 75% chance to hit you. First, your odds to dodge are rolled. If you land within that 20%, you take 0 damage. If it fails, the rest of the enemy's damage calculations will be ran and you'll have a 25% chance to be hit a 0.

Back to top