Notice something wrong, missing, or unsatisfactory? Feel free to fix it yourself, or contact Support

Difference between revisions of "Battle Engine"

From Medieval Europe
Jump to: navigation, search
(Blunt Damage and Armor Consumption)
 
(40 intermediate revisions by one user not shown)
Line 4: Line 4:
  
 
{|class='hor-minimalist-a'
 
{|class='hor-minimalist-a'
|-
+
|Match
!Match
+
|A complete fight between two characters. A match has n rounds.
!A complete fight between two characters. A match has n rounds.
+
 
|-  
 
|-  
 
|Round
 
|Round
Line 12: Line 11:
 
|-  
 
|-  
 
|Turn
 
|Turn
|A turn may includes n (consecutive)=Battle Engine Explained=
+
|A turn includes n hits with n between 1 and 3
 +
|-
 +
|Armor Encumbrance
 +
|Ratio between the Equipped Armor weight and the base transportable weight
 +
|-
 +
|Armor Penetration
 +
|Armor penetration represents a weapon's ability to overcome armor to deliver cutting damage.
 +
|}
  
==Definitions==
+
==How it works==
 +
 
 +
[[File:Battle Engine-1.png]]
 +
 
 +
==Initiative Computation==
 +
 
 +
Initiative determine '''who will attack first''' and is computed at the start of every round. It will depend on the reach attribute of each character’s weapon. '''A character using a weapon with a longer reach than his/her opponent will have better odds of gaining the initiative'''. If the weapons have the same reach, each character has a equal chance of gaining the initiative.
 +
 
 +
  Initiative = f( Attacker_Weapon_Length, Defender_Weapon_Length )
 +
 
 +
==Consecutive Hits Computation==
 +
 
 +
Range: 1-3
 +
 
 +
After initiative has been computed, the engine computer how many consecutive hits the attacker will deal.
 +
 
 +
'''Negative Variables'''
 +
 
 +
* Weapon Reach
 +
* Weapon Weight
 +
* Armor Encumbrance
 +
 
 +
'''Positive Variables'''
 +
 
 +
* Energy
 +
* Constitution
 +
* Strength
 +
 
 +
The variables values will be normalized and summed.
  
 
{|class='hor-minimalist-a'
 
{|class='hor-minimalist-a'
 
|-
 
|-
!Match
+
|
!A complete fight between two characters. A match has n rounds.
+
!colspan="10" style="text-align:center"|strength + energy + constitution (normalized) (normalized)
 
|-  
 
|-  
|Round
+
!rowspan="9" style="text-align:center"|weapon reach + <br/> weapon weight + <br/>armor encumberance<br/>
|A round includes two turns, one for the attacker and one for defender
+
(normalized)
 +
|
 +
|0
 +
|0,5
 +
|1
 +
|1,5
 +
|2
 +
|2,5
 +
|3
 
|-  
 
|-  
|Turn
+
|0
|A turn may includes n (consecutive) attacks or none
+
|1
 +
|1
 +
|2
 +
|3
 +
|3
 +
|3
 +
|3
 
|-  
 
|-  
 +
|0,5
 +
|1
 +
|1
 +
|2
 +
|3
 +
|3
 +
|3
 +
|3
 +
|-
 +
|1
 +
|1
 +
|1
 +
|1
 +
|2
 +
|3
 +
|3
 +
|3
 +
|-
 +
|1,5
 +
|1
 +
|1
 +
|1
 +
|1
 +
|2
 +
|3
 +
|3
 +
|-
 +
|2
 +
|1
 +
|1
 +
|1
 +
|1
 +
|2
 +
|3
 +
|3
 +
|-
 +
|2,5
 +
|1
 +
|1
 +
|1
 +
|1
 +
|1
 +
|2
 +
|3
 +
|-
 +
|3
 +
|1
 +
|1
 +
|1
 +
|1
 +
|1
 +
|2
 +
|3
 
|}
 
|}
  
==How it works==
+
==Hit and Miss Chance Computation==
  
==Initiative==
+
Logic to hit or miss depends on the ratio between Attacker and Defender Dexterities.
  
Initiative (who will attack first) will be computed at the start of every round and will depend on the reach attribute of each character’s weapon. A character using a weapon with a longer reach than his/her opponent will have better odds of gaining the initiative.  If the weapons have the same reach, each character has a equal chance of gaining the initiative.
+
  Hit_chance = f( Attacker_Dexterity, Defender_Dexterity )
  
  Initiative = f( Attacker Weapon Length, Defender Weapon Length )
+
'''If a character is stunned the attacker has a 100% chance to hit the opponent.'''
  
==Consecutive Attacks==
+
<u>Example:</u>
  
Range 1-3. Consecutive hits are negatively affected by the attacking character’s weapon weight and weapon length, and
+
* Attacker has dex 20, defender has dex 15. Hit_Chance will be about 71%.
positively affected by the attacking character’s strength and energy levels. Stunned characters cannot attack.
+
* Attacker has dex 20, defender has dex 2. Hit_Chance will be about 97%.
 +
* Attacker has dex 10, defender has dex 18. Hit_Chance will be about 55%.
 +
* Attacker has dex 1, defender has dex 18. Hit_Chance will be about 26%.  
  
  Consecutive attacks number = f( Weapon Length (Reach), Strength, Energy )
+
==Hit Logic==
  
===Energy consumption===
+
It will be possible to hit  on following body parts:
  
Energy is very important in battle; The energy consumed for each hit will depend on:
+
''head, armor, legs, feet, left arm, right arm''
  
* Weapon weight
+
Only with a weapon of reach at least 4, it will be possible to hit the part ''feet''.
* War encumbrance
+
* Strength
+
* Constitution
+
  
  Energy depleted for each attack = f( Weapon Weight, War Encumbrance, Strength )
+
The armors will do not (as before) covers only the part where they are equipped but they extend also on other parts.
  Energy restored for each attack = f( Constitution )
+
  
==Hit and Miss Chance==
+
For example, before the plate armor was equipped on slot ''armor'' and its defense was effective only when the attacker was hitting the part “armor”. Now, the plate armor defense is effective also against hits on ''left arm'' and ''right arm''.
  
Logic to hit or miss depends on the attacker and defender Dexterity.
+
{|class='hor-minimalist-a'
 +
|-
 +
!Armor
 +
!Equipped on
 +
!Covers
 +
|-
 +
|Chainmail
 +
|Torso
 +
|Armor, Left Arm, Right Arm
 +
|-
 +
|Leather Armor
 +
|Armor
 +
|Armor
 +
|-
 +
|Plate Armor
 +
|Armor
 +
|Armor, Left Arm, Right Arm
 +
|-
 +
|}
  
  hit percentage = f( Attacker Dexterity, Defender Dexterity )
 
  
Note: If a character is stunned the attacker has a 100% chance to hit the opponent.
+
<u>Example</u>
  
==Damage==
+
If the defender is wearing a chainmail (defense 4) under a Leather Armor (defense 2), and a hit goes on part Armor:
  
===Damage complete formula===
+
# The engine will recompute damage by applying the Leather Armor + chainmail defense (6)
 +
# The engine will consume only the Leather Armor but by his defense (2)
 +
 
 +
If the Leather Armor eventually breaks the engine will consider only the Chainmail Defense and then consume the Chainmail. If the hit is landed on the left arm and the defender holds a shield, the damage will be absorbed by all the Shield.
 +
 
 +
==Damage Computation==
  
 
Dealt damage depends from the following factors:  
 
Dealt damage depends from the following factors:  
Line 76: Line 197:
 
* Defender AC
 
* Defender AC
  
====The Base Damage====
+
===Base Damage===
  
  Base Damage = f ( Weapon Damage, Weapon Condition, Strength, Energy) + Strength / 6
 
[[File:DamageSkewFigure.png|thumb|alt=Figure showing how the Normal curve of damages is skewed depending on Strength, Energy, and Weapon condistion.|]]
 
 
The Base Damage is randomly selected within the range of damage values for the equipped weapon. With a Strength value of 10, an energy value of 50%, and a weapon condition of 50%, the damage will be randomly selected using a Normal (Gaussian) distribution centered on the mean of the weapon’s damage range. Thus, if the range is 1-7, a 4 will have the best odds of being rolled and a 1 and a 7 would have the worst odds of being rolled.  
 
The Base Damage is randomly selected within the range of damage values for the equipped weapon. With a Strength value of 10, an energy value of 50%, and a weapon condition of 50%, the damage will be randomly selected using a Normal (Gaussian) distribution centered on the mean of the weapon’s damage range. Thus, if the range is 1-7, a 4 will have the best odds of being rolled and a 1 and a 7 would have the worst odds of being rolled.  
  
Line 85: Line 204:
 
* With decreasing Strength, Energy and Weapon Condition, the distribution is skewed more toward the minimum of the range.
 
* With decreasing Strength, Energy and Weapon Condition, the distribution is skewed more toward the minimum of the range.
  
The Base Damage is then partitioned in Blunt Damage and Cutting Damage accordingly to the weapon Cutting Damage/Blunt Damage. For example if the Base Damage with a fauchard is 10, Blunt damage will be 5 and Cutting Damage 5. Check [[Weapons|Weapons Table]] for useful data.
+
[[File:DamageSkewFigure.png|thumb|alt=Figure showing how the Normal curve of damages is skewed depending on Strength, Energy, and Weapon condition.|]]
  
 +
  Base Damage = max(1, Weapon Damage + (Weapon Damage * Character Strength / 23) )
  
===Blunt Damage===
+
<u>Example</u>
  
====Stunning an opponent====
+
Attacker hits with a longsword, Computed Weapon Damage is 6. Attacker has strength 18.
  
===Cutting Damage===
+
  Base Damage = 6 + 6 * (18/23) = 10.7
  
====Bleed Damage====
+
The Base Damage is then partitioned in Blunt Damage and Cutting Damage accordingly to the weapon Cutting Damage/Blunt Damage.
  
===The Critical Hit===
+
<u>Example</u>
attacks or none
+
|-
+
|}
+
  
==How it works==
+
  Base Damage of longsword = 10.7. Longsword has Blunt 20% and Cut 80%. Blunt Damage = 2.14 and Cut Damage = 8.56
  
==Initiative==
+
[[File:Battle Engine-2.png||alt=Base Damage is split in Blunt and Cutting Damage.]]
  
Initiative (who will attack first) will be computed at the start of every round and will depend on the reach attribute of each character’s weapon. A character using a weapon with a longer reach than his/her opponent will have better odds of gaining the initiative.  If the weapons have the same reach, each character has a equal chance of gaining the initiative.
+
===Damage and Armor Consumption===
  
  Initiative = f( Attacker Weapon Length, Defender Weapon Length )
+
When the opponent is hit, damage is computed as follows:
  
==Consecutive Hits==
+
First, weapon damage is split into bluntdamage and cutdamage accordingly to weapon bluntperc and cutperc values.
  
Range 1-3. Consecutive hits are Negatively affected by the attacking character’s weapon weight and weapon length, and
+
<u>Example</u>
positively affected by the attacking character’s Strength and Energy.
+
Longsword damage = 15 -> Bluntdamage = 2, Cut Damage = 2
  
  Consecutive attacks number = f( Weapon Length (Reach), Strength, Energy )
+
Second, equipped armor defense is evaluated.
  
===Energy consumption===
+
===What is Blunt Damage?===
  
Energy is very important in battle; The energy consumed for each hit will depend on:
+
Blunt damage is the damage inflicted by the inertia of a weapon impacting an opponent and it depends from the choosen weapon. Weapons with high blunt damage are meant to destroy and consume opponent armor. In addition, blunt damage brings a chance to stun an opponent, which causes the character to:be unable to attack or defend. The chance of stunning an opponent is proportional to the amount of blunt damage inflicted.
  
* Weapon weight
+
===What is Cut Damage?===
* War encumbrance
+
Cutting damage is the damage inflicted by the weapon slicing into flesh of an opponent. Cutting damage causes the initial damage but also bleed damage, which is inflicted each turn until the battle is terminated.
* Strength
+
* Constitution
+
  
  Energy depleted for each hit = f( Weapon Weight, War Encumbrance, Strength )
+
===Damage and Armor Consumption===
  Energy restored for each hit = f( Constitution )
+
  
==Hit and Miss Chance==
+
Damage inflicted is computed as per the following algorithm:
  
Logic to hit or miss depends on the attacker and defender Dexterity.
+
  if (hit part is shield)
 +
      bluntdamageafterarmor = bluntdamagebeforearmor - equipment_defense * 0.4
 +
      cutdamageafterarmor = 0 // shield absorb all cut damage
 +
  else
 +
      bluntdamageafteraror = bluntdamagebeforearmor - equipment_defense
 +
      cutdamageafterarmor = cutdamagebeforearmor / ( 1 - (equipmentdefense * 3.5)/Armor penetration)
 +
 
 +
  bleed Damage = cuttingdamageafterarmor * 0.05
 +
   
 +
  if (bluntdamage > 0)
 +
      Armor consumption = max( $bluntdamage - $hitpart_info['hitobjdefense'], $equipment_defense/4) * 1 / wearfactor;
  
  hit percentage = f( Attacker Dexterity, Defender Dexterity )
+
<u>Example 1</u>
  
Note: If a character is stunned the attacker has a 100% chance to hit the opponent.
+
Attacker hits with a longsword for a damage 10 and hits the shield with defense 2
  
==Damage==
+
BEFORE DEFENSE
  
===Damage complete formula===
+
Bluntdamage = 8.56, Cut Damage = 2.14, Total Damage = 10.7
  
Dealt damage depends from the following factors:
+
AFTER DEFENSE
  
* Weapon Damage
+
Bluntdamage = 8.48, Cut Damage = 2.14, Total Damage = 8.48
* Weapon Condition
+
Shield Consumption = 8.56-2 = 6.56%
* Strength
+
* Energy
+
* Defender AC
+
  
====The Base Damage====
+
<u>Example 2</u>
  
  Base Damage = f ( Weapon Damage, Weapon Condition, Strength, Energy) + Strength / 6
+
Attacker hits with a longsword for a damage 10.7 and hits the shield with defense 10
  
The Base Damage is randomly selected within the range of damage values for the equipped weapon. With a Strength value of 10, an energy value of 50%, and a weapon condition of 50%, the damage will be randomly selected using a Normal (Gaussian) distribution centered on the mean of the weapon’s damage range. Thus, if the range is 1-7, a 4 will have the best odds of being rolled and a 1 and a 7 would have the worst odds of being rolled.
+
BEFORE DEFENSE
  
* With increasing Strength, Energy and Weapon Condition, the distribution is skewed more toward the maximum of the range.  
+
Bluntdamage = 8.57, Cut Damage = 2.16, Total Damage = 10.7
* With decreasing Strength, Energy and Weapon Condition, the distribution is skewed more toward the minimum of the range.
+
  
The Base Damage is then partitioned in Blunt Damage and Cutting Damage accordingly to the weapon Cutting Damage/Blunt Damage.For example if the Base Damage with a fauchard is 10, Bluntdamage will be 5 and Cutting Damage 5. Check [[Weapons|Weapons Table]] for useful data.
+
AFTER DEFENSE
  
===Blunt Damage===
+
Bluntdamage = 0, Cut Damage = 0, Total Damage = 0
 +
Damage = 0,
 +
Shield Consumption = 10%
  
====Stunning an opponent====
+
===Stun Effects===
 +
 
 +
If a character is stunned, he can be stunned for n turns, where the number of turns for which the opponent is stunned depends on opponent constitution:
 +
 
 +
  Rounds_stunned = f (constitution);
 +
 
 +
When the player is stunned:
 +
 
 +
# The player is unable to attack the opponent and to defend himself;
 +
# All of the opponent’s attack swings are successfully dealt;
 +
# Basic damage incurred from the opponent is increased by 150%
  
 
===Cutting Damage===
 
===Cutting Damage===
  
====Bleed Damage====
+
Cutting damage is the damage inflicted by the weapon slicing into flesh of an opponent. Cutting damage causes the initial damage but also bleed damage, which is inflicted each turn until the battle is terminated.
 +
 
 +
  Cuttingdamage After Defense = cuttingdamage / ( 1 - (equipmentdefense * 3.5)/Armor penetration)
 +
 
 +
  Bleed Damage = cuttingdamage * 0.05
 +
 
 +
<u>Example:</u>
 +
 
 +
''Attacker uses a longsword. Base Damage = 10,7. Cutting Damage = 8.57''
 +
 
 +
Mario hits Paolo for 8.57 cutting damage. This will result in about 1.714 HP Bleed Damage.
 +
...
 +
Mario hits Paolo for 8.57 cutting damage. This will result in about 1.714+1.714 = 3.42 HP Bleed Damage.
 +
 
 +
===Weapon Consumption===
 +
 
 +
Weapon is consumed accordingly to the following formula:
 +
 
 +
If the hit part had an equipment with defense:
 +
 
 +
  Weapon Consumption = max(1, equipment_defense * 0,5)/wearfactor * 0.25
 +
 
 +
else
 +
 
 +
  Weapon Consumption = 1/wearfactor * 0.25
 +
 
 +
<u>Example 1</u>
 +
 
 +
''Attacker hits with a longsword for a damage 10 and hits the shield with defense 10''
 +
 
 +
'''BEFORE DEFENSE'''
 +
 
 +
Bluntdamage = 8, Cut Damage = 2, Total Damage = 10
 +
 
 +
'''AFTER DEFENSE'''
 +
Damage = 0, Longsword wears off by 1.25%
 +
 
 +
<u>Example 2</u>
 +
 
 +
''Attacker hits with a longsword for a damage 10 and hits the head (no armor)''
 +
 
 +
'''BEFORE DEFENSE'''
 +
 
 +
Bluntdamage = 8, Cut Damage = 2, Total Damage = 10
 +
 
 +
'''AFTER DEFENSE'''
 +
 
 +
Damage = 10, Longsword wears off by 0.25%
 +
==Wear Factor==
 +
Weapons and Armor is consumed while fighting. Every Weapon and Armor has a Wear Factor that is used to correct the weapon consumption.
 +
 
 +
  Weapon/Armor Consumption = Consumption * Wear Factor
 +
 
 +
For example, if a weapon after a succesfull hit it should ne consumed by 0.01  and has a wear factor of 0.5, it will consumed by 0.005.
 +
 
 +
==The Critical Hit==
 +
 
 +
A Critical Hit can deal severe damage. Only some Weapons can deliver a Critical Hit. Please check [Weapons] page to find out. The chance of delivering a critical hit will depend from the weapon that the player is using and from the difference between attacker and defender intelligence and dexterity.
 +
 
 +
If a weapon has a Critical factor of 19x2 it means that to deliver a Critical Hit with that weapon one must score at least 19 on a d20. Once established that a weapon scores a Critical, opponentes Intelligence and Dexterity are evaluated.
 +
 
 +
{|class='hor-minimalist-a'
 +
|-
 +
!Intel + Dex Diff
 +
!Percentage to score a Critical
 +
!War Hammer<br/> Critical Chance: 5%
 +
!Long Sword<br/> Critical Chance: 10%
 +
!Scimitar<br/> Critical Chance: 15%
 +
!The Punisher<br/> Critical Chance;20%
 +
|-
 +
|
 +
|
 +
|colspan="4" style="text-align:center"|Combined Percentage
 +
|-
 +
|0
 +
|
 +
|1%
 +
|1%
 +
|2%
 +
|2%
 +
|-
 +
|1
 +
|1,00%
 +
|1%
 +
|1%
 +
|2%
 +
|2%
 +
|-
 +
|2
 +
|1,28%
 +
|1%
 +
|1%
 +
|2%
 +
|2%
 +
|-
 +
|3
 +
|1,41%
 +
|1%
 +
|1%
 +
|2%
 +
|3%
 +
|-
 +
|4
 +
|1,51%
 +
|1%
 +
|2%
 +
|2%
 +
|3%
 +
|-
 +
|5
 +
|1,58%
 +
|1%
 +
|2%
 +
|3%
 +
|3%
 +
|-
 +
|6
 +
|1,64%
 +
|1%
 +
|2%
 +
|3%
 +
|4%
 +
|-
 +
|7
 +
|1,70%
 +
|1%
 +
|2%
 +
|3%
 +
|4%
 +
|-
 +
|8
 +
|1,74%
 +
|1%
 +
|2%
 +
|3%
 +
|4%
 +
|-
 +
|9
 +
|1,79%
 +
|1%
 +
|2%
 +
|4%
 +
|5%
 +
|-
 +
|10
 +
|1,83%
 +
|1%
 +
|3%
 +
|4%
 +
|5%
 +
|-
 +
|11
 +
|1,86%
 +
|1%
 +
|3%
 +
|4%
 +
|5%
 +
|-
 +
|12
 +
|1,89%
 +
|1%
 +
|3%
 +
|4%
 +
|6%
 +
|-
 +
|13
 +
|1,92%
 +
|2%
 +
|3%
 +
|5%
 +
|6%
 +
|-
 +
|14
 +
|1,95%
 +
|2%
 +
|3%
 +
|5%
 +
|7%
 +
|-
 +
|15
 +
|1,98%
 +
|2%
 +
|4%
 +
|5%
 +
|7%
 +
|-
 +
|16
 +
|2,00%
 +
|2%
 +
|4%
 +
|6%
 +
|7%
 +
|-
 +
|17
 +
|2,03%
 +
|2%
 +
|4%
 +
|6%
 +
|8%
 +
|-
 +
|18
 +
|2,05%
 +
|2%
 +
|4%
 +
|6%
 +
|8%
 +
|-
 +
|19
 +
|2,07%
 +
|2%
 +
|4%
 +
|6%
 +
|9%
 +
|-
 +
|20
 +
|2,09%
 +
|2%
 +
|5%
 +
|7%
 +
|9%
 +
|-
 +
|21
 +
|2,11%
 +
|2%
 +
|5%
 +
|7%
 +
|9%
 +
|-
 +
|22
 +
|2,13%
 +
|2%
 +
|5%
 +
|7%
 +
|10%
 +
|-
 +
|23
 +
|2,15%
 +
|3%
 +
|5%
 +
|8%
 +
|10%
 +
|-
 +
|24
 +
|2,17%
 +
|3%
 +
|5%
 +
|8%
 +
|11%
 +
|-
 +
|25
 +
|2,19%
 +
|3%
 +
|6%
 +
|8%
 +
|11%
 +
|-
 +
|26
 +
|2,20%
 +
|3%
 +
|6%
 +
|9%
 +
|12%
 +
|-
 +
|27
 +
|2,22%
 +
|3%
 +
|6%
 +
|9%
 +
|12%
 +
|-
 +
|28
 +
|2,23%
 +
|3%
 +
|6%
 +
|9%
 +
|13%
 +
|-
 +
|29
 +
|2,25%
 +
|3%
 +
|6%
 +
|10%
 +
|13%
 +
|-
 +
|30
 +
|2,26%
 +
|3%
 +
|7%
 +
|10%
 +
|13%
 +
|-
 +
|31
 +
|2,28%
 +
|3%
 +
|7%
 +
|10%
 +
|14%
 +
|-
 +
|32
 +
|2,29%
 +
|4%
 +
|7%
 +
|11%
 +
|14%
 +
|-
 +
|33
 +
|2,31%
 +
|4%
 +
|7%
 +
|11%
 +
|15%
 +
|-
 +
|34
 +
|2,32%
 +
|4%
 +
|8%
 +
|11%
 +
|15%
 +
|-
 +
|35
 +
|2,33%
 +
|4%
 +
|8%
 +
|12%
 +
|16%
 +
|-
 +
|36
 +
|2,34%
 +
|4%
 +
|8%
 +
|12%
 +
|16%
 +
|-
 +
|37
 +
|2,36%
 +
|4%
 +
|8%
 +
|13%
 +
|17%
 +
|-
 +
|38
 +
|2,37%
 +
|4%
 +
|9%
 +
|13%
 +
|17%
 +
|-
 +
|39
 +
|2,38%
 +
|4%
 +
|9%
 +
|13%
 +
|18%
 +
|-
 +
|40
 +
|2,39%
 +
|5%
 +
|9%
 +
|14%
 +
|18%
 +
|-
 +
|41
 +
|2,40%
 +
|5%
 +
|9%
 +
|14%
 +
|19%
 +
|-
 +
|42
 +
|2,42%
 +
|5%
 +
|10%
 +
|14%
 +
|19%
 +
|-
 +
|43
 +
|2,43%
 +
|5%
 +
|10%
 +
|15%
 +
|20%
 +
|-
 +
|44
 +
|2,44%
 +
|5%
 +
|10%
 +
|15%
 +
|20%
 +
|}
 +
 
 +
==Energy consumption==
 +
 
 +
Energy is very important in battle (for example you see in the previous formula that impacts the number of consecutive hits).
 +
The Energy depletion formula will depends on the following variables
 +
 
 +
'''Negative variables'''
 +
* Weapon Reach
 +
* Weapon Weight
 +
* Armor Encumbrance
 +
 
 +
'''Positive variables'''
 +
* Constitution
 +
 
 +
The above variables values will  been normalized as per the following theory: [http://stats.stackexchange.com/questions/70801/how-to-normalize-data-to-0-1-range How to Normalize Data] so thwy will be converted to values between 0 to 1.
 +
 
 +
{|class='hor-minimalist-a'
 +
!
 +
!colspan="8" style="text-align:center"|weapon reach + weapon weight + armor encumbrance (normalized)
 +
|-
 +
!rowspan="9" style="text-align:center"|constitution (Normalized)
 +
|
 +
|0
 +
|0,5
 +
|1
 +
|1,5
 +
|2
 +
|2,5
 +
|3
 +
|-
 +
|0
 +
|1,33
 +
|1,50
 +
|1,67
 +
|1,83
 +
|2,00
 +
|2,17
 +
|2,33
 +
|-
 +
|0,5
 +
|1,17
 +
|1,33
 +
|1,50
 +
|1,67
 +
|1,83
 +
|2,00
 +
|2,17
 +
|-
 +
|1
 +
|1,00
 +
|1,17
 +
|1,33
 +
|1,50
 +
|1,67
 +
|1,83
 +
|2,00
 +
|-
 +
|1,5
 +
|0,83
 +
|1,00
 +
|1,17
 +
|1,33
 +
|1,50
 +
|1,67
 +
|1,83
 +
|-
 +
|2
 +
|0,67
 +
|0,83
 +
|1,00
 +
|1,17
 +
|1,33
 +
|1,50
 +
|1,67
 +
|-
 +
|2,5
 +
|0,50
 +
|0,67
 +
|0,83
 +
|1,00
 +
|1,17
 +
|1,33
 +
|1,50
 +
|-
 +
|3
 +
|0,33
 +
|0,50
 +
|0,67
 +
|0,83
 +
|1,00
 +
|1,17
 +
|1,33
 +
|}
 +
 
 +
==Armor Encumbrance==
 +
 
 +
Armor Encumbrance is computed as follows:
 +
 
 +
  Armor Encumbrance = (Equipped items weight (weapon excluded)/Base_Transportable_Weight
 +
 
 +
where
  
===The Critical Hit===
+
  Base_transportable_weight = 100 - power(abs(  strength  - 23 ), 1.3) Kg
  
[[Category:General Information]]
+
[[Category: General Information]]

Latest revision as of 08:06, 12 September 2018

Contents

[edit] Battle Engine Explained

[edit] Definitions

Match A complete fight between two characters. A match has n rounds.
Round A round includes two turns, one for the attacker and one for defender
Turn A turn includes n hits with n between 1 and 3
Armor Encumbrance Ratio between the Equipped Armor weight and the base transportable weight
Armor Penetration Armor penetration represents a weapon's ability to overcome armor to deliver cutting damage.

[edit] How it works

Battle Engine-1.png

[edit] Initiative Computation

Initiative determine who will attack first and is computed at the start of every round. It will depend on the reach attribute of each character’s weapon. A character using a weapon with a longer reach than his/her opponent will have better odds of gaining the initiative. If the weapons have the same reach, each character has a equal chance of gaining the initiative.

  Initiative = f( Attacker_Weapon_Length, Defender_Weapon_Length )

[edit] Consecutive Hits Computation

Range: 1-3

After initiative has been computed, the engine computer how many consecutive hits the attacker will deal.

Negative Variables

  • Weapon Reach
  • Weapon Weight
  • Armor Encumbrance

Positive Variables

  • Energy
  • Constitution
  • Strength

The variables values will be normalized and summed.

strength + energy + constitution (normalized) (normalized)
weapon reach +
weapon weight +
armor encumberance

(normalized)

0 0,5 1 1,5 2 2,5 3
0 1 1 2 3 3 3 3
0,5 1 1 2 3 3 3 3
1 1 1 1 2 3 3 3
1,5 1 1 1 1 2 3 3
2 1 1 1 1 2 3 3
2,5 1 1 1 1 1 2 3
3 1 1 1 1 1 2 3

[edit] Hit and Miss Chance Computation

Logic to hit or miss depends on the ratio between Attacker and Defender Dexterities.

  Hit_chance = f( Attacker_Dexterity, Defender_Dexterity )

If a character is stunned the attacker has a 100% chance to hit the opponent.

Example:

  • Attacker has dex 20, defender has dex 15. Hit_Chance will be about 71%.
  • Attacker has dex 20, defender has dex 2. Hit_Chance will be about 97%.
  • Attacker has dex 10, defender has dex 18. Hit_Chance will be about 55%.
  • Attacker has dex 1, defender has dex 18. Hit_Chance will be about 26%.

[edit] Hit Logic

It will be possible to hit on following body parts:

head, armor, legs, feet, left arm, right arm

Only with a weapon of reach at least 4, it will be possible to hit the part feet.

The armors will do not (as before) covers only the part where they are equipped but they extend also on other parts.

For example, before the plate armor was equipped on slot armor and its defense was effective only when the attacker was hitting the part “armor”. Now, the plate armor defense is effective also against hits on left arm and right arm.

Armor Equipped on Covers
Chainmail Torso Armor, Left Arm, Right Arm
Leather Armor Armor Armor
Plate Armor Armor Armor, Left Arm, Right Arm


Example

If the defender is wearing a chainmail (defense 4) under a Leather Armor (defense 2), and a hit goes on part Armor:

  1. The engine will recompute damage by applying the Leather Armor + chainmail defense (6)
  2. The engine will consume only the Leather Armor but by his defense (2)

If the Leather Armor eventually breaks the engine will consider only the Chainmail Defense and then consume the Chainmail. If the hit is landed on the left arm and the defender holds a shield, the damage will be absorbed by all the Shield.

[edit] Damage Computation

Dealt damage depends from the following factors:

  • Weapon Damage
  • Weapon Condition
  • Strength
  • Energy
  • Defender AC

[edit] Base Damage

The Base Damage is randomly selected within the range of damage values for the equipped weapon. With a Strength value of 10, an energy value of 50%, and a weapon condition of 50%, the damage will be randomly selected using a Normal (Gaussian) distribution centered on the mean of the weapon’s damage range. Thus, if the range is 1-7, a 4 will have the best odds of being rolled and a 1 and a 7 would have the worst odds of being rolled.

  • With increasing Strength, Energy and Weapon Condition, the distribution is skewed more toward the maximum of the range.
  • With decreasing Strength, Energy and Weapon Condition, the distribution is skewed more toward the minimum of the range.
Figure showing how the Normal curve of damages is skewed depending on Strength, Energy, and Weapon condition.
  Base Damage = max(1, Weapon Damage + (Weapon Damage * Character Strength / 23) )

Example

Attacker hits with a longsword, Computed Weapon Damage is 6. Attacker has strength 18.

  Base Damage = 6 + 6 * (18/23) = 10.7

The Base Damage is then partitioned in Blunt Damage and Cutting Damage accordingly to the weapon Cutting Damage/Blunt Damage.

Example

  Base Damage of longsword = 10.7. Longsword has Blunt 20% and Cut 80%. Blunt Damage = 2.14 and Cut Damage = 8.56

Base Damage is split in Blunt and Cutting Damage.

[edit] Damage and Armor Consumption

When the opponent is hit, damage is computed as follows:

First, weapon damage is split into bluntdamage and cutdamage accordingly to weapon bluntperc and cutperc values.

Example Longsword damage = 15 -> Bluntdamage = 2, Cut Damage = 2

Second, equipped armor defense is evaluated.

[edit] What is Blunt Damage?

Blunt damage is the damage inflicted by the inertia of a weapon impacting an opponent and it depends from the choosen weapon. Weapons with high blunt damage are meant to destroy and consume opponent armor. In addition, blunt damage brings a chance to stun an opponent, which causes the character to:be unable to attack or defend. The chance of stunning an opponent is proportional to the amount of blunt damage inflicted.

[edit] What is Cut Damage?

Cutting damage is the damage inflicted by the weapon slicing into flesh of an opponent. Cutting damage causes the initial damage but also bleed damage, which is inflicted each turn until the battle is terminated.

[edit] Damage and Armor Consumption

Damage inflicted is computed as per the following algorithm:

  if (hit part is shield)
     bluntdamageafterarmor = bluntdamagebeforearmor - equipment_defense * 0.4
     cutdamageafterarmor = 0 // shield absorb all cut damage
  else
     bluntdamageafteraror = bluntdamagebeforearmor - equipment_defense
     cutdamageafterarmor = cutdamagebeforearmor / ( 1 - (equipmentdefense * 3.5)/Armor penetration)
 
  bleed Damage = cuttingdamageafterarmor * 0.05
   
  if (bluntdamage > 0)
     Armor consumption = max( $bluntdamage - $hitpart_info['hitobjdefense'], $equipment_defense/4) * 1 / wearfactor;

Example 1

Attacker hits with a longsword for a damage 10 and hits the shield with defense 2

BEFORE DEFENSE

Bluntdamage = 8.56, Cut Damage = 2.14, Total Damage = 10.7

AFTER DEFENSE

Bluntdamage = 8.48, Cut Damage = 2.14, Total Damage = 8.48 Shield Consumption = 8.56-2 = 6.56%

Example 2

Attacker hits with a longsword for a damage 10.7 and hits the shield with defense 10

BEFORE DEFENSE

Bluntdamage = 8.57, Cut Damage = 2.16, Total Damage = 10.7

AFTER DEFENSE

Bluntdamage = 0, Cut Damage = 0, Total Damage = 0 Damage = 0, Shield Consumption = 10%

[edit] Stun Effects

If a character is stunned, he can be stunned for n turns, where the number of turns for which the opponent is stunned depends on opponent constitution:

  Rounds_stunned = f (constitution);

When the player is stunned:

  1. The player is unable to attack the opponent and to defend himself;
  2. All of the opponent’s attack swings are successfully dealt;
  3. Basic damage incurred from the opponent is increased by 150%

[edit] Cutting Damage

Cutting damage is the damage inflicted by the weapon slicing into flesh of an opponent. Cutting damage causes the initial damage but also bleed damage, which is inflicted each turn until the battle is terminated.

  Cuttingdamage After Defense = cuttingdamage / ( 1 - (equipmentdefense * 3.5)/Armor penetration)
  Bleed Damage = cuttingdamage * 0.05

Example:

Attacker uses a longsword. Base Damage = 10,7. Cutting Damage = 8.57

Mario hits Paolo for 8.57 cutting damage. This will result in about 1.714 HP Bleed Damage. ... Mario hits Paolo for 8.57 cutting damage. This will result in about 1.714+1.714 = 3.42 HP Bleed Damage.

[edit] Weapon Consumption

Weapon is consumed accordingly to the following formula:

If the hit part had an equipment with defense:

  Weapon Consumption = max(1, equipment_defense * 0,5)/wearfactor * 0.25

else

  Weapon Consumption = 1/wearfactor * 0.25

Example 1

Attacker hits with a longsword for a damage 10 and hits the shield with defense 10

BEFORE DEFENSE

Bluntdamage = 8, Cut Damage = 2, Total Damage = 10

AFTER DEFENSE Damage = 0, Longsword wears off by 1.25%

Example 2

Attacker hits with a longsword for a damage 10 and hits the head (no armor)

BEFORE DEFENSE

Bluntdamage = 8, Cut Damage = 2, Total Damage = 10

AFTER DEFENSE

Damage = 10, Longsword wears off by 0.25%

[edit] Wear Factor

Weapons and Armor is consumed while fighting. Every Weapon and Armor has a Wear Factor that is used to correct the weapon consumption.

  Weapon/Armor Consumption = Consumption * Wear Factor

For example, if a weapon after a succesfull hit it should ne consumed by 0.01 and has a wear factor of 0.5, it will consumed by 0.005.

[edit] The Critical Hit

A Critical Hit can deal severe damage. Only some Weapons can deliver a Critical Hit. Please check [Weapons] page to find out. The chance of delivering a critical hit will depend from the weapon that the player is using and from the difference between attacker and defender intelligence and dexterity.

If a weapon has a Critical factor of 19x2 it means that to deliver a Critical Hit with that weapon one must score at least 19 on a d20. Once established that a weapon scores a Critical, opponentes Intelligence and Dexterity are evaluated.

Intel + Dex Diff Percentage to score a Critical War Hammer
Critical Chance: 5%
Long Sword
Critical Chance: 10%
Scimitar
Critical Chance: 15%
The Punisher
Critical Chance;20%
Combined Percentage
0 1% 1% 2% 2%
1 1,00% 1% 1% 2% 2%
2 1,28% 1% 1% 2% 2%
3 1,41% 1% 1% 2% 3%
4 1,51% 1% 2% 2% 3%
5 1,58% 1% 2% 3% 3%
6 1,64% 1% 2% 3% 4%
7 1,70% 1% 2% 3% 4%
8 1,74% 1% 2% 3% 4%
9 1,79% 1% 2% 4% 5%
10 1,83% 1% 3% 4% 5%
11 1,86% 1% 3% 4% 5%
12 1,89% 1% 3% 4% 6%
13 1,92% 2% 3% 5% 6%
14 1,95% 2% 3% 5% 7%
15 1,98% 2% 4% 5% 7%
16 2,00% 2% 4% 6% 7%
17 2,03% 2% 4% 6% 8%
18 2,05% 2% 4% 6% 8%
19 2,07% 2% 4% 6% 9%
20 2,09% 2% 5% 7% 9%
21 2,11% 2% 5% 7% 9%
22 2,13% 2% 5% 7% 10%
23 2,15% 3% 5% 8% 10%
24 2,17% 3% 5% 8% 11%
25 2,19% 3% 6% 8% 11%
26 2,20% 3% 6% 9% 12%
27 2,22% 3% 6% 9% 12%
28 2,23% 3% 6% 9% 13%
29 2,25% 3% 6% 10% 13%
30 2,26% 3% 7% 10% 13%
31 2,28% 3% 7% 10% 14%
32 2,29% 4% 7% 11% 14%
33 2,31% 4% 7% 11% 15%
34 2,32% 4% 8% 11% 15%
35 2,33% 4% 8% 12% 16%
36 2,34% 4% 8% 12% 16%
37 2,36% 4% 8% 13% 17%
38 2,37% 4% 9% 13% 17%
39 2,38% 4% 9% 13% 18%
40 2,39% 5% 9% 14% 18%
41 2,40% 5% 9% 14% 19%
42 2,42% 5% 10% 14% 19%
43 2,43% 5% 10% 15% 20%
44 2,44% 5% 10% 15% 20%

[edit] Energy consumption

Energy is very important in battle (for example you see in the previous formula that impacts the number of consecutive hits). The Energy depletion formula will depends on the following variables

Negative variables

  • Weapon Reach
  • Weapon Weight
  • Armor Encumbrance

Positive variables

  • Constitution

The above variables values will been normalized as per the following theory: How to Normalize Data so thwy will be converted to values between 0 to 1.

weapon reach + weapon weight + armor encumbrance (normalized)
constitution (Normalized) 0 0,5 1 1,5 2 2,5 3
0 1,33 1,50 1,67 1,83 2,00 2,17 2,33
0,5 1,17 1,33 1,50 1,67 1,83 2,00 2,17
1 1,00 1,17 1,33 1,50 1,67 1,83 2,00
1,5 0,83 1,00 1,17 1,33 1,50 1,67 1,83
2 0,67 0,83 1,00 1,17 1,33 1,50 1,67
2,5 0,50 0,67 0,83 1,00 1,17 1,33 1,50
3 0,33 0,50 0,67 0,83 1,00 1,17 1,33

[edit] Armor Encumbrance

Armor Encumbrance is computed as follows:

  Armor Encumbrance = (Equipped items weight (weapon excluded)/Base_Transportable_Weight

where

  Base_transportable_weight =  100 - power(abs(  strength  - 23 ), 1.3) Kg
Personal tools