Hero
COEFFICIENTS = {
damageMin: 2,
damageMax: 3,
accuracy: 2,
dodge: 2.5,
devastate: 2.5,
durability: 2,
hp: 10,
capacity: 10,
arms: 5,
protection: 5,
};
accuracy = feature.dexterity * COEFFICIENTS.accuracy
damageMin = feature.strength * COEFFICIENTS.damageMin
damageMax = feature.strength * COEFFICIENTS.damageMax
accuracy = feature.dexterity * COEFFICIENTS.accuracy
dodge = feature.dexterity * COEFFICIENTS.dodge
devastate = feature.intuition * COEFFICIENTS.devastate
durability = feature.intuition * COEFFICIENTS.durability
hp = feature.health * COEFFICIENTS.hp
capacity = feature.strength * COEFFICIENTS.capacity
Drop
Condition: hero level <= opponent level
Each win
Money 33% => range "level" * 10
Thing 25% => any thing from "level" - 1 to "level" 1
Combat
Constants:
DODGE_COEFFICIENT = 150
DEVASTATE_COEFFICIENT = 150
BLOCK_BREAK_COEFFICIENT = 150
ARMOR_BREAK_COEFFICIENT = 150
DAMAGE_COEFFICIENT = 30
DODGE_BALANCER = 2
COMMON_BALANCE = (
blockWarrior.accuracy
blockWarrior.devastate
blockWarrior.dodge
blockWarrior.durability
) / 4
Damage: random(damageMin, damageMax)
Dodge:
preDodge = (blockWarrior.dodge - attackWarrior.accuracy) / attackWarrior.accuracy * 100
if preDodge > DODGE_COEFFICIENT then !random(DODGE_BALANCER)
else range(preDodge).includes(random(DODGE_COEFFICIENT))
Devastate: range(attackWarrior.devastate - blockWarrior.durability) / blockWarrior.durability * 100).includes(random(DEVASTATE_COEFFICIENT))
BlockBreak: range((attackWarrior.blockBreak - COMMON_BALANCE) / COMMON_BALANCE * 100).includes(random(BLOCK_BREAK_COEFFICIENT))
ArmorBreak: range((attackWarrior.armorBreak - COMMON_BALANCE) / COMMON_BALANCE * 100).includes(random(ARMOR_BREAK_COEFFICIENT))
StrikeDamage:
if !ArmorBreak then Damage - random(protection - protection * DAMAGE_COEFFICIENT / 100, protection)
else Damage
if (devastate) then *2
if (block && !blockBreak) then 0
if (dodge) then 0