Skip to content

Instantly share code, notes, and snippets.

@ButuzGOL
Last active February 27, 2024 08:25
Show Gist options
  • Save ButuzGOL/4494bd22950230818ccacf58bd4b122a to your computer and use it in GitHub Desktop.
Save ButuzGOL/4494bd22950230818ccacf58bd4b122a to your computer and use it in GitHub Desktop.
StormFire Data

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

id name name_ru klass features
0 Big mount Большая гора strength strength +2
accuracy +5
durability +5
1 Tree leaf Лист дерева dexterity dexterity +2
dodge +5
durability +5
2 Hot fire Горячий огонь intuition intuition +2
devastate +5
accuracy +5
3 Power Мощность health +3
strength +3
4 Arms master Мастер оружия swords +1
axes +1
knifes +1
clubs +1
shields +1
5 Rock Cкала protectionBelly +10
protectionBreast +10
protectionGroin +10
protectionHead +10
protectionLegs +10
6 Breaker Брекер damageMax +5
damageMin +5
blockBreak +10
armorBreak +10
id level experience coefficient numberOfParameters numberOfAbilities numberOfSkills money
0 0 0 0.6 4 1 1 40
1 1 1000 0.8 6 1 2 80
2 2 3000 1 8 2 3 160
3 3 9000 1.2 10 2 4 320
4 4 27000 1.4 12 3 5 640
5 5 81000 1.6 14 3 6 1000
6 6 243000 1.8 16 4 7 1280
7 7 729000 2 18 4 8 2560
8 8 2187000 2.2 20 5 9 5120
9 9 6561000 2.4 22 5 10 10240
10 10 19683000 2.6 24 6 11 20480
11 11 59049000 2.8 26 6 12 40960
12 12 177147000 3 28 7 13 81920
13 13 531441000 3.2 30 7 14 163840
14 14 1594323000 3.4 32 8 15 327680
15 15 4782969000 3.6 34 8 16 655360
16 16 14348907000 3.8 36 9 17 1310720
17 17 43046721000 4 38 9 18 2621440
18 18 129140163000 4.2 40 10 19 5242880
19 19 387420489000 4.4 42 10 20 10485760
20 20 1162261467000 4.6 44 11 21 20971520
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment