Combat: Difference between revisions

From Lootbox RPG Wiki
No edit summary
No edit summary
 
Line 32: Line 32:
7. IF a random number between 1 and 100 is LESS THAN the calculated chance, the attack HITS.
7. IF a random number between 1 and 100 is LESS THAN the calculated chance, the attack HITS.


8. when attacking a neutral target (e.g. Undead Gardener) it will become hostile if attacked more than once within 5 turns - no matter if the attack hits or not.
8. When attacking a neutral target (e.g. Undead Gardener) it will become hostile if attacked more than once within 5 turns - no matter if the attack hits or not.


=== Dealing Damage ===
=== Dealing Damage ===
Line 46: Line 46:
* if a random roll of 1-100 is less than the chance, it's a crit.
* if a random roll of 1-100 is less than the chance, it's a crit.


2. damage is determined by the weapon's Base Damage + Random Damage stat.
2. Damage is determined by the weapon's Base Damage + Random Damage stat.


3. Melee weapon: Strength is added. Ranged: Strength / 2 is added.
3. Melee weapon: Strength is added. Ranged: Strength / 2 is added.
Line 54: Line 54:
5. Resistances or Immunities to certain Damage Types are considered. E.G. if the player attacks a skeleton with a piercing weapon, the damage is halfed.
5. Resistances or Immunities to certain Damage Types are considered. E.G. if the player attacks a skeleton with a piercing weapon, the damage is halfed.


6. if the attack is NOT a crit...
6. If the attack is NOT a crit...


* subtract the target's armor class OR
* subtract the target's armor class OR
* subtract the Willpower value if it is a magic attack
* subtract the Willpower value if it is a magic attack


6. if damage is still > 0...
6. If damage is still > 0...


* the damage is subtracted from the target's health.
* the damage is subtracted from the target's health.
Line 67: Line 67:
* if the target has a damage shield effect active, the attacker receives damage from it if in melee range.
* if the target has a damage shield effect active, the attacker receives damage from it if in melee range.


7. the attacker loses 1 Stamina Point for each attack, until it has a Stamina Regeneration item equipped.
7. The attacker loses 1 Stamina Point for each attack, until it has a Stamina Regeneration item equipped.

Latest revision as of 10:33, 18 April 2024

How combat works

Hitting

When you try to hit an enemy, the following things happen:

1. The defense value of the enemy is determined.

  • defense = "Defense"-Attribute of the enemy.
  • if in hardmode, defense is multiplied by 3.
  • if the creature is Elite (Crown above head), 10 is added.

2. The offense value of the player is determined.

  • offense = Skill "Melee" if enemy is on adjacent tile and a melee weapon is used. Skill "Ranged" if enemy is more than 1 tile away and a ranged weapon is equipped.
  • if it is dark (player in dungeon without light source), the offense is halfed.

3. The hit Chance is calculated:

chance = 50 + (offense - defense) * 5

4. Bonus against the Creature Type is applied:

chance += Bonus against Creature Type * 5

The bonus is based on the amount of Creature Cards the player has collected.

5. Stamina is taken into account. If the player's stamina is 0, the chance is halfed.

6. If it is dark and the attack is ranged, the chance is set to 0.

7. IF a random number between 1 and 100 is LESS THAN the calculated chance, the attack HITS.

8. When attacking a neutral target (e.g. Undead Gardener) it will become hostile if attacked more than once within 5 turns - no matter if the attack hits or not.

Dealing Damage

After a successful hit, the damage is dealt.

1. Is this a critical hit?

  • if the attacker has the Pacify Effect active, it is automatically a critical hit.
  • the chance to Crit is initial 0. Luck is added.
  • if the target's defense is < 0, the chance is +100.
  • chance is adjusted by the Expertise for the target creature (see Bestiary).
  • if a random roll of 1-100 is less than the chance, it's a crit.

2. Damage is determined by the weapon's Base Damage + Random Damage stat.

3. Melee weapon: Strength is added. Ranged: Strength / 2 is added.

4. At this point, the damage is multiplied by 3 if the attacker is a hardmode enemy.

5. Resistances or Immunities to certain Damage Types are considered. E.G. if the player attacks a skeleton with a piercing weapon, the damage is halfed.

6. If the attack is NOT a crit...

  • subtract the target's armor class OR
  • subtract the Willpower value if it is a magic attack

6. If damage is still > 0...

  • the damage is subtracted from the target's health.
  • aggro is added to the target's aggro table (it hates the attacker more now).
  • if the attacking weapon has special damage effects (Poison, Leech etc.) these effects are applied.
  • if the enemy is in melee range, special effects from the shield slot's weapon are also applied.
  • if the target has a damage shield effect active, the attacker receives damage from it if in melee range.

7. The attacker loses 1 Stamina Point for each attack, until it has a Stamina Regeneration item equipped.