Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@12345ieee
Last active July 23, 2023 03:57
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save 12345ieee/4a81c78d4426a99c4bc3 to your computer and use it in GitHub Desktop.
Save 12345ieee/4a81c78d4426a99c4bc3 to your computer and use it in GitHub Desktop.
GC2 formulae
Gem combination:
Grade difference = 0:
gem.damageMin 0.83 0.71 1.2 * rand()
gem.damageMax 0.87 0.71 2.4 * rand()
gem.range 0.694 0.388
gem.reloadingSpeed 0.74 0.44
gem.bloodBoundRatioPerHitStep 0.78 0.31
gem.slowPower 0.81 0.35
gem.poisonDamage 0.96 0.85
gem.critHitChance 0.81 0.35
gem.critHitMultiplier 0.88 0.5
gem.chainHitLengthPower 0.88 0.5
gem.manaGainPerHit 0.88 0.5
gem.armorReduceAmountPerHit 0.94 0.69
gem.poolBoundPower 0.87 0.38
gem.regenSuppressingAmount 0.96 1.91
Grade difference = 1:
gem.damageMin 0.82 0.70 0.9 * rand()
gem.damageMax 0.86 0.70 2.0 * rand()
gem.range 0.80 0.25
gem.reloadingSpeed 0.80 0.25
gem.bloodBoundRatioPerHitStep 0.79 0.29
gem.slowPower 0.80 0.28
gem.poisonDamage 0.97 0.62
gem.critHitChance 0.80 0.28
gem.critHitMultiplier 0.88 0.44
gem.chainHitLengthPower 0.90 0.47
gem.manaGainPerHit 0.89 0.44
gem.armorReduceAmountPerHit 0.95 0.57
gem.poolBoundPower 0.87 0.38
gem.regenSuppressingAmount 0.92 1.13
Grade difference > 1:
gem.damageMin 0.81 0.69 0.7 * rand()
gem.damageMax 0.85 0.69 1.8 * rand()
gem.range 0.92 0.09
gem.reloadingSpeed 0.92 0.09
gem.bloodBoundRatioPerHitStep 0.80 0.27
gem.slowPower 0.79 0.26
gem.poisonDamage 0.98 0.42
gem.critHitChance 0.79 0.26
gem.critHitMultiplier 0.88 0.44
gem.chainHitLengthPower 0.92 0.44
gem.manaGainPerHit 0.90 0.38
gem.armorReduceAmountPerHit 0.96 0.45
gem.poolBoundPower 0.87 0.38
gem.regenSuppressingAmount 0.92 0.73
combined = c1*best + c2*worst + ( random part for damage )
Combined gem (min/max)damage can't go lower than the parent's.
Very low special values get thrown away.
Poolbound (per MP) real value:
Poolbound = 0.12 * (-1 + log(3.7 + pbound * (1 + TC_SKILL) * (1 + PB_SKILL[1])) / log(3.7) * (1 + PB_SKILL[0]))
if(Poolbound > 8)
Poolbound = 7 + pow(Poolbound - 7,0.7)
Slow power:
SlowRatio = boundMult * (1 - pow(1 + slowPower/2, -0.37))
capped at 90%
Chain hit length:
ChainHitLength = boundMult * log(3.7 + chainHitPower) / log(3.7) * (1 + CH_SKILL[0])
if(ChainHitLength > 8)
ChainHitLength = 7 + pow(ChainHitLength - 7, 0.7)
Second part of component skill is always applied at the end of the conversion, together with True Colors.
WL exp needed for lv L:
PlusXp = 235 + 9 * (L - 1) + 3 * (L - 1)^2
TotalXp = 240 + 240 * (L - 1) + 6 * (L - 1)^2 + (L - 1)^3
Monster exp:
mExp = log(monster.hpMax + 1) / log(12)
mExp = mExp * log(monster.armor + 1) / log(9)
mExp = mExp * pow(1.007,monster.shield)
mExp = mExp * pow(1.017,monster.speedMax)
if(Giant) mExp = mExp * 1.38
if(Swarmling) mExp = mExp * 0.583
mExp = mExp + 2
Beacon exp:
xpValue = (70 + WaveNumber * 9) * (1 + rand() * 0.2)
Beacons that are already on field are counted as generated from Wave 0
Endurance resets the WaveNumber counter to 1
Waves properties:
A demolition is given every 20 waves
Hp = F.HpFirstWave * pow((F.HpMult - 0.003) * [1,1.02,1.04][battleDifficulty] * (1 + HATRED), numWave)
if(isEndurance)
Hp = (Hp + 6) * 1.12 * pow(1.042, EnduranceWavesNum) + EnduranceWavesNum * 10;
ArmorLevel = [0,15,30][battleDifficulty] + F.armorFirstWave + round((1 + rand()) * F.armorIncrement * [1,1.25,1.4][battleDifficulty] * max(0, WaveNum - 3))
if (isEndurance)
ArmorLevel = ArmorLevel * 1.36 * Math.pow(1.025, EnduranceWavesNum)
if (isGiant) {
Hp = Hp * 5 / Wave.numOfMonsters * 0.67 * 37.3 * (1 + GIANT_DOMINATION)
ArmorLevel = (ArmorLevel + 4.2) * 2.47 * 0.52 * (1 + GIANT_DOMINATION)
}
if (isSwarmling) {
Hp = Hp * 0.187
ArmorLevel = ArmorLevel * 0.574
}
Mana pool initial values:
manaPoolLevel = 1
maxMana = 1200
Mana pool extension:
manaPoolLevel += 1
maxMana *= 1.41 + 0.035 * manaPoolLevel
manaReplenishMultiplier += 0.272
manaPoolXpGainMultiplier += 0.03
manaPoolManaGainMultiplier += 0.04
Enrage:
Reavers_summoned = pow(gem.grade,1.2) * 4 + 4
Giants_summoned = Reavers_summoned * 0.2
Swarmlings_summoned = Reavers_summoned * 1.5
XP = base_XP * (1+FURYEXP) // one time ONLY
HpDelta = (gem.grade * 0.03 + 0.1) * wave.hp * (1 - FURYRED)
ArmorDelta = max(2, 0.24 * wave.armorLevel * (1 - FURYRED))
Endurance wave composition:
Swarms_fraction = 0.15 + 0.05 * swarms_dom
Giants_fraction = 0.15 + 0.05 * giants_dom
Reaver_fraction = 1 - Giants_fraction - Swarms_fraction
Sparks:
Appears only after Wave 5 and not as last wave.
Probability of appearing is 13%.
Type is completely random.
If the rolled type is Wisdom, the spark does not appear.
Wisdom sparks appear in waves multiple of 50
Talisman Rarity:
Rarity = RarityMin + (RarityMax - RarityMin) * random() * random()
it gets rolled 2 times and the worst roll is dropped
Gem refund:
Mana_refunded = gem.value * 0.7
Gem bomb:
Damage = gem.damageMax * (1 + DEMOLITION) * (3.4 + gem.grade * 2.9)
Real_dmg = Damage/num_monsters*critmulti // if crit procs
Range = (47 + 2.6 * gem.grade) * (1 + DEMOLITION)
Useful numbers:
monsterSpeedCap = 5
bloodBoundFirstLevelHitsReq = 30
bloodBoundLevelReqMult = 1.65
Used classes:
ingame/ingameSpellcaster
entity/Gem has the displayed values computation
utils/calculator
ingame/ingamePopulator has waves and sparks
GV has several useful constants
POISON
{
damageMin = 5;
damageMax = 10;
poisonDamage = 1 * 8 * (1 + POISON[0]);
range = 79;
reloadingSpeed = 2.1;
}
CRITHIT
{
damageMin = 4;
damageMax = 11;
critHitChance = 0.111 * (1 + CRITHIT[0]);
critHitMultiplier = 0.35 * (1 + CRITHIT[0]);
range = 78;
reloadingSpeed = 2;
}
BLOODBOUND
{
damageMin = 4;
damageMax = 13;
bloodBoundRatioPerHitStep = 0.012 * 3 * (1 + BLOODBOUND[0]);
range = 80;
reloadingSpeed = 2;
}
SLOWING
{
damageMin = 5;
damageMax = 12;
slowPower = 1.04;
range = 77;
reloadingSpeed = 2.1;
}
CHAIN_HIT
{
damageMin = 6;
damageMax = 10;
chainHitLengthPower = 1.01;
range = 78;
reloadingSpeed = 2.2;
}
MANA_LEECHING
{
damageMin = 4;
damageMax = 8;
manaGainPerHit = 0.13 * 3 * (1 + MANA_LEECHING[0]);
range = 77;
reloadingSpeed = 1.8;
}
ARMOR_TEARING
{
damageMin = 3;
damageMax = 11;
armorReduceAmountPerHit = 1.73 * (1 + ARMOR_TEARING[0]);
range = 73;
reloadingSpeed = 2.2;
}
SUPPRESSING
{
damageMin = 3;
damageMax = 12;
regenSuppressingAmountPerHit = 13.3 * (1 + SUPPRESSING[0]);
range = 75;
reloadingSpeed = 2.1;
}
POOLBOUND
{
damageMin = 4;
damageMax = 12;
poolBoundPower = 1.01;
range = 76;
reloadingSpeed = 2.2;
}
damageMin = damageMin * 2;
damageMax = damageMax * 2;
range = range * (1 + RESONANCE[1]);
damageMin = damageMin * (1 + RESONANCE[0]);
damageMax = damageMax * (1 + RESONANCE[0]);
@attilaszivos
Copy link

Is it the same for GCL? If not, do you have formulas for GCL?

@12345ieee
Copy link
Author

Sorry, no formulae for GCL.

I know the general architecture is similar, but the precise coefficients are most likely all different.

@litmit
Copy link

litmit commented Aug 6, 2018

What units you are using for ranges?
The mana leeching gem has range 77 but the game shows range as '4.5'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment