Difference between revisions of "Combat mechanics"

From Wildermyth Wiki
m (→‎Defense Strength: removed extra space between paragraphs)
(31 intermediate revisions by 8 users not shown)
Line 1: Line 1:
== Line of Sight ==
== Line of sight ==


Ranged attacks require '''line of sight''', which is blocked by other enemies and by solid walls. For some attacks such as Discus, Cover objects also block line of sight. Crevasses in the map do ''not'' block line of sight.
Ranged attacks require '''line of sight''', which is blocked by other enemies and by solid walls. For some attacks such as Discus, Cover objects also block line of sight. Crevasses in the map do ''not'' block line of sight.


Attackers can "lean" to see around obstacles in some cases. Specifically:
Attackers can "lean" to see around obstacles in some cases. Specifically:
* The attacker consider five possible '''firing positions''': the center of their current tile and positions offset by 0.7 to the north, south, east and west.  
* The attacker considers five possible '''firing positions''': the center of their current tile and positions offset by 0.7 to the north, south, east and west.  
** For each firing position, check the line of sight to each tile of the target.
* For each firing position, the game checks five lines to the target (or to each of the target's tiles, if it is large): from the firing position to the center of the tile and to positions offset by 0.49 to the north, south, east, and west. These are the '''target points'''.
*** For each target tile, check five lines to the target (or to each of the target's tiles, if it is large): from the firing position to the midpoint of the tile and to just inside the midpoint of each edge—technically, to offsets (0,0), (-0.49,0), (0.49,0), (0,-0.49), and (0,0.49). These are the '''target points'''.
* If there is any unobstructed line from a firing position to a target point, the attacker has line of sight on the target.
 
If there is any unobstructed line from a valid firing position to a target point, the attacker has line of sight on the target.


== Attack Strength ==
== Attack Strength ==
Line 16: Line 14:
== Defense Strength ==
== Defense Strength ==


Also called "Defense Roll" in some places. The target's Block, Effective Dodge, and Cover are added together to give Defense Strength.  
Also called "Defense Roll" in some places. The target's Block, Dodge, and Cover are added together to give Defense Strength.  


=== Block ===
=== Block ===


Block is straightforward. Just add Block to Defense Strength.
Block is straightforward. Just add Block to the target's Defense Strength. (The only difference between Block and Dodge is flavor.)


=== Dodge ===
=== Dodge ===


The defender's Dodge is modified by the attacker's weapon [[Wield]]. Heavy weapons (low wield) are easier to dodge; light weapons (high wield) are harder.
Dodge is straightforward. Just add Dodge to the target's Defense Strength. (The only difference between Block and Dodge is flavor.)
 
Multiply by the following to get effective Dodge:
 
{| class="wikitable"
! Wield !! Weight !! Modifier
|-
| 1 || Ultraheavy || 135%
|-
| 2 || Heavy || 115%
|-
| 3 || Balanced || 100%
|-
| 4 || Light || 85%
|-
| 5 || Ultralight || 65%
|}


<!-- Dodge used to be modified by a stat called Wield, but Wield was removed from the game in version 0.11+103 Opellia Bluster. -->
=== Cover ===
=== Cover ===


A defender must be standing adjacent to cover to get benefit from it. Diagonal adjacency counts. Solid walls, door frames and the like also give Good Cover though they do not say so.  
A defender must be standing adjacent to cover to benefit from it. Diagonal adjacency counts. Solid walls, door frames and such also give Good Cover even though they do not say so.  


Partial cover is worth up to +30 Defense Strength; Good cover is worth up to +60. It is reduced if the attacker is firing from an angle, and they can "lean" to further improve their shot.
Partial cover is worth up to +30 Defense Strength, while Good cover is worth up to +60. However, the cover's value is reduced if part of the target's body is exposed. Attackers also automatically "lean" a small amount in whichever direction maximizes the target's exposure.


Specifically, for each firing position and each target tile as described above for [[#Line_of_sight|line of sight]], test the five lines from the firing position to the target points. For each one that passes through any part of the cover tile, the target gets 20% of the potential cover value. The attacker picks their best firing position and the most exposed (lowest cover) tile of the target.
Specifically, for each firing position and each target point described above for [[#Line_of_sight|line of sight]], the game tests the five lines from the firing position to all target points. For each line that passes through any part of the cover tile, the target gets 20% of the potential cover value. The attacker picks their best firing position. If the target occupies multiple tiles, this calculation is carried out for each tile, and the attacker picks the most exposed (lowest cover) target tile.


This means a defender very rarely can get full cover value from a single-tile cover object. (They would have to be diagonally adjacent to it with an attacker on the far diagonal.)
For example, this means that a defender can very rarely get full cover value from a single-tile cover object. They would have to be diagonally adjacent to it with an attacker on the far diagonal.


== Resolution ==
== Resolution ==
Line 72: Line 55:
=== Misses ===
=== Misses ===


If the attack fails, the system will randomly determine whether the target Dodged, Blocked, or Took Cover. Cover is the first line of defense—if the hit strength is less than the cover value, the shot hits and does damage to the cover. Otherwise, Dodge or Block is selected, weighted by the target's defense ratings. (Sometimes this matters for triggering Abilities like [[Riposte]].)
If the attack fails, the system will randomly determine whether the target Dodged, Blocked, or Took Cover. Cover is the first line of defense—if the hit strength is less than the cover value, the shot hits and does damage to the cover. Otherwise, Dodge or Block is selected, weighted by the target's defense ratings.


== Damage ==
== Damage ==


When an attack hits:
When an attack hits:
# Determine the total attack damage, with [[Stat#Bonus Damage|Bonus Damage]] or [[Stat#Potency|Potency]], and any additions from abilities or special effects.
# Determine the total attack damage, with [[bonus damage]], [[spell damage]] and [[potency]], and any additions from abilities or special effects.
# If the attack is physical, take the target's [[armor]], or if it's magical take the target's [[[Stat#warding[warding]].
# If the attack is physical, take the target's [[Armor (Stat)|armor]], or if it's magical take the target's [[Stat#Warding|Warding]].
#* If the defender has [[walling]], add 1 to the effective armor or warding.  
#* If the defender has [[walling]], add 1 to the effective armor or warding.  
#* If the attack has '''piercing''', subtract it from the effective armor or warding, minimum 0.
#* If the attack has '''piercing''', subtract it from the effective armor or warding, minimum 0.
# Subtract the remaining effective armor or warding from the attack damage to get true damage.
# Subtract the remaining effective armor or warding from the attack damage to get true damage.
# If the defender has '''temporary health''', apply the damage against temporary health first. The temporary hp are lost.
# If the defender has '''[[temporary health]]''', apply the damage against temporary health first. The temporary health points are lost.
# Add the remaining true damage to the hero's '''Injury'''.
# Add the remaining true damage to the hero's '''injury'''.
# If Injury is equal or greater than [[Stat#Health|Health]], the defender falls. Heroes may get a [[mortal choice]].
# If '''injury''' is equal to or greater than [[Stat#Health|Health]], the defender falls. Heroes may get a [[mortal choice]].
# After evaluating the damage for this attack, subtract '''shred''' from the target's armor or warding.
# After evaluating the damage for this attack, subtract '''shred''' from the target's armor.


=== Physical / Magical ===
=== Types of Attacks; Physical / Magical ===


Normal ''damage'' is physical and is benefited by [[bonus damage]]. Magic damage is benefited by [[Stat#potency|potency]].
*Normal damage from weapons is physical and benefits from [[bonus damage]].  
*Damage from interfusions benefit from [[potency]] and [[spell damage]]. Depending on the interfusion this may produce magical or physical damage
*Some transformations result in attacks that benefit from [[potency]] and [[bonus damage]]. Depending on the tranformation this may produce magical (e.g. [[flamesoul]]) or physical damage (e.g. [[elmsoul]]).


=== Armor / Warding ===
=== Armor / Warding ===


'''Armor''' is subtracted from incoming physical damage before inflicting injury. '''Warding''' is subtracted from incoming magic damage. If armor or warding reduces damage to zero, the attack destroys 1 armor or warding  instead.
'''Armor''' is subtracted from incoming physical damage before inflicting injury. If armor reduces a physical attack's damage to zero, the attack shreds 1 point of armor instead.
 
'''Warding''' is subtracted from incoming magic damage. Each piece of warding absorbs one damage before breaking, but all warding regenerates at the start of the unit's next turn.


==== Shred ====
==== Shred ====


Attacks can have '''shred''' effects. Each point of shred removes one point of armor for the remainder of the [[mission]]. Shred is applied after damage for the current attack is calculated; for instance, if a monster with 6 hp and 2 armor gets hit by an attack doing 7 dmg and 1 shred, the monster takes (7 - 2) = 5 hp damage, and survives with 1 hp and 1 armor remaining.
Attacks can have '''shred''' effects. Each point of shred removes one point of armor for the remainder of the [[mission]]. Shred is applied after damage for the current attack is calculated; for instance, if a monster with 6 hp and 2 armor gets hit by an attack doing 7 dmg and 1 shred, the monster takes (7 - 2) = 5 hp damage, and survives with 1 hp and 1 armor remaining. Warding cannot be shredded.


==== Pierce ====
==== Pierce ====
Line 107: Line 94:
==== Walling ====
==== Walling ====


When two [[hero]]es are next to each other, both reduce the damage they take by 1. This effect works against both physical and magic damage. It does not stack.  
When two [[hero]]es are next to each other, both reduce the damage they take by 1. This effect works against both physical and magic damage. It does not stack. Adjacency must be orthogonal; diagonal is not close enough.


The power of friendship! Or, at least, being near an ally.
The power of friendship! Or, at least, being near an ally.
Line 113: Line 100:
=== Temporary Health ===
=== Temporary Health ===


Characters can gain temporary hit points from abilities, buffs from pre-combat events, and other sources.
Characters can gain temporary hit points from abilities, buffs from pre-combat events, and other sources. Incoming damage is applied to temporary health first. Temporary health is lost at the end of the combat. A character does not have to be injured before gaining temporary health; they can exceed their base hit point total.


=== Injury ===
=== Injury ===


Injuries [[Hero#Injury_and_Healing|heal]] as days pass in the [[Overland]] phase.
Injury is a stat equal to the number of hitpoints a hero is missing. It's used to calculate a hero's HP in combat, and for other things, like the [[Bloodrage]] ability. Injuries heal in the [[Overland]] phase; see [[Hero#Injuries and Healing|Injuries and Healing]] for details.


== Status effects ==
== Status effects ==
Line 124: Line 111:


* See [[:Category:Status effects]]
* See [[:Category:Status effects]]
== Combat Modifiers ==
Various modifiers to stats (good and bad) for a single hero, the entire party, and/or all enemies.
* See [[Combat Modifiers]]


[[Category:Battle]]
[[Category:Battle]]

Revision as of 14:42, 22 April 2022

Line of sight

Ranged attacks require line of sight, which is blocked by other enemies and by solid walls. For some attacks such as Discus, Cover objects also block line of sight. Crevasses in the map do not block line of sight.

Attackers can "lean" to see around obstacles in some cases. Specifically:

  • The attacker considers five possible firing positions: the center of their current tile and positions offset by 0.7 to the north, south, east and west.
  • For each firing position, the game checks five lines to the target (or to each of the target's tiles, if it is large): from the firing position to the center of the tile and to positions offset by 0.49 to the north, south, east, and west. These are the target points.
  • If there is any unobstructed line from a firing position to a target point, the attacker has line of sight on the target.

Attack Strength

Also called "Attack Roll" in some places. For basic attacks, simply pick one of Melee Accuracy or Range Accuracy.

Defense Strength

Also called "Defense Roll" in some places. The target's Block, Dodge, and Cover are added together to give Defense Strength.

Block

Block is straightforward. Just add Block to the target's Defense Strength. (The only difference between Block and Dodge is flavor.)

Dodge

Dodge is straightforward. Just add Dodge to the target's Defense Strength. (The only difference between Block and Dodge is flavor.)

Cover

A defender must be standing adjacent to cover to benefit from it. Diagonal adjacency counts. Solid walls, door frames and such also give Good Cover even though they do not say so.

Partial cover is worth up to +30 Defense Strength, while Good cover is worth up to +60. However, the cover's value is reduced if part of the target's body is exposed. Attackers also automatically "lean" a small amount in whichever direction maximizes the target's exposure.

Specifically, for each firing position and each target point described above for line of sight, the game tests the five lines from the firing position to all target points. For each line that passes through any part of the cover tile, the target gets 20% of the potential cover value. The attacker picks their best firing position. If the target occupies multiple tiles, this calculation is carried out for each tile, and the attacker picks the most exposed (lowest cover) target tile.

For example, this means that a defender can very rarely get full cover value from a single-tile cover object. They would have to be diagonally adjacent to it with an attacker on the far diagonal.

Resolution

Subtract Defense Strength from Attack Strength to get hit strength. If the result is -75 or below, the attack cannot hit. Above that, the hit chance increases by +1% per point of hit strength until it reaches 85% at hit strength +10. Then it increases by +0.5% per point of hit strength until hit chance reaches 100% at hit strength +40.

Technically, interpolate hit chance on this table:

Hit Strength Hit Chance
-75 0%
0 75%
10 85%
40 100%

Misses

If the attack fails, the system will randomly determine whether the target Dodged, Blocked, or Took Cover. Cover is the first line of defense—if the hit strength is less than the cover value, the shot hits and does damage to the cover. Otherwise, Dodge or Block is selected, weighted by the target's defense ratings.

Damage

When an attack hits:

  1. Determine the total attack damage, with bonus damage, spell damage and potency, and any additions from abilities or special effects.
  2. If the attack is physical, take the target's armor, or if it's magical take the target's Warding.
    • If the defender has walling, add 1 to the effective armor or warding.
    • If the attack has piercing, subtract it from the effective armor or warding, minimum 0.
  3. Subtract the remaining effective armor or warding from the attack damage to get true damage.
  4. If the defender has temporary health, apply the damage against temporary health first. The temporary health points are lost.
  5. Add the remaining true damage to the hero's injury.
  6. If injury is equal to or greater than Health, the defender falls. Heroes may get a mortal choice.
  7. After evaluating the damage for this attack, subtract shred from the target's armor.

Types of Attacks; Physical / Magical

  • Normal damage from weapons is physical and benefits from bonus damage.
  • Damage from interfusions benefit from potency and spell damage. Depending on the interfusion this may produce magical or physical damage
  • Some transformations result in attacks that benefit from potency and bonus damage. Depending on the tranformation this may produce magical (e.g. flamesoul) or physical damage (e.g. elmsoul).

Armor / Warding

Armor is subtracted from incoming physical damage before inflicting injury. If armor reduces a physical attack's damage to zero, the attack shreds 1 point of armor instead.

Warding is subtracted from incoming magic damage. Each piece of warding absorbs one damage before breaking, but all warding regenerates at the start of the unit's next turn.

Shred

Attacks can have shred effects. Each point of shred removes one point of armor for the remainder of the mission. Shred is applied after damage for the current attack is calculated; for instance, if a monster with 6 hp and 2 armor gets hit by an attack doing 7 dmg and 1 shred, the monster takes (7 - 2) = 5 hp damage, and survives with 1 hp and 1 armor remaining. Warding cannot be shredded.

Pierce

An attack with a pierce value ignores up to that amount of armor or warding. For instance, if a monster with 6 hp and 3 armor gets hit by an attack doing 7 dmg and 1 pierce, the monster takes (7 - (3-1)) = 5 hp damage, and survives with 1 hp and 3 armor remaining.

Attacks from grayplane ignore armor entirely.

Walling

When two heroes are next to each other, both reduce the damage they take by 1. This effect works against both physical and magic damage. It does not stack. Adjacency must be orthogonal; diagonal is not close enough.

The power of friendship! Or, at least, being near an ally.

Temporary Health

Characters can gain temporary hit points from abilities, buffs from pre-combat events, and other sources. Incoming damage is applied to temporary health first. Temporary health is lost at the end of the combat. A character does not have to be injured before gaining temporary health; they can exceed their base hit point total.

Injury

Injury is a stat equal to the number of hitpoints a hero is missing. It's used to calculate a hero's HP in combat, and for other things, like the Bloodrage ability. Injuries heal in the Overland phase; see Injuries and Healing for details.

Status effects

Various debuffs can be inflicted upon opponents.

Combat Modifiers

Various modifiers to stats (good and bad) for a single hero, the entire party, and/or all enemies.