Combat: Difference between revisions

From Idle Clans wiki
(WIP)
m (fixed untrue statement about respawn timer being 1 second. linked to monster page. will add respawn timers column to monster page)
Line 4: Line 4:
The player and enemy automatically attacks when their attack meter fills then it will reset.  
The player and enemy automatically attacks when their attack meter fills then it will reset.  


After the enemy is killed they have a chance to drop loot and will start a 1 second respawn timer before respawning.  
After the enemy is killed they have a chance to drop loot and will start a fixed [[Monsters|variable fixed delay]] respawn timer before respawning.  


The player can eat to regain lost health, but if the player loses all of their health they will lose any unclaimed loot from the enemies and will be removed from combat.  
The player can eat to regain lost health, but if the player loses all of their health they will lose any unclaimed loot from the enemies and will be removed from combat.  

Revision as of 20:59, 11 November 2023

Combat is an activity where you kill animals or monsters that can drop loot.

The player and enemy automatically attacks when their attack meter fills then it will reset.

After the enemy is killed they have a chance to drop loot and will start a fixed variable fixed delay respawn timer before respawning.

The player can eat to regain lost health, but if the player loses all of their health they will lose any unclaimed loot from the enemies and will be removed from combat.

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 jewelry, 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