Growth
Concerning Growth, Scaling
Functions
growth()
function growth(lvl): number;
Defined in: scaling/growth.ts:16
Stats in League of Legends do not increase linearly with champion level. Use this function to calculate the stat multiplier.
Parameters
Parameter | Type | Description |
---|---|---|
lvl | number | The current champion level |
Returns
number
the stat multiplier
Example
const base = 658;
const perLevel = 109;
const lvl = 13;
const stat = base + growth(lvl) * perLevel; // 1851.55
lerp()
function lerp(
min,
max,
ratio): number;
Defined in: scaling/lerp.ts:20
Interpolates a value between a minimum and maximum based on a given ratio.
Parameters
Parameter | Type | Description |
---|---|---|
min | number | The minimum value. |
max | number | The maximum value. |
ratio | number | The ratio between 0 and 1 to interpolate the value. |
Returns
number
The interpolated value.
Example
// Teemo Q: 80 / 125 / 170 / 215 / 260
const min = 80;
const max = 260;
const level = 3;
const damage = lerp(min, max, linear5(level)); // 170
lerp18()
function lerp18(
min,
max,
level): number;
Defined in: scaling/lerp.ts:71
Interpolates a value between min and max based on an 18-level scaling.
Parameters
Parameter | Type | Description |
---|---|---|
min | number | The minimum value. |
max | number | The maximum value. |
level | number | The current level (1 to 18). |
Returns
number
The interpolated value.
Example
const damage = lerp18(80, 260, 10); // 170
lerp3()
function lerp3(
min,
max,
level): number;
Defined in: scaling/lerp.ts:37
Interpolates a value between min and max based on a 3-level scaling.
Parameters
Parameter | Type | Description |
---|---|---|
min | number | The minimum value. |
max | number | The maximum value. |
level | number | The current level (1 to 3). |
Returns
number
The interpolated value.
Example
const damage = lerp3(80, 180, 2); // 130
lerp5()
function lerp5(
min,
max,
level): number;
Defined in: scaling/lerp.ts:54
Interpolates a value between min and max based on a 5-level scaling.
Parameters
Parameter | Type | Description |
---|---|---|
min | number | The minimum value. |
max | number | The maximum value. |
level | number | The current level (1 to 5). |
Returns
number
The interpolated value.
Example
const damage = lerp5(80, 260, 3); // 170
linear()
function linear(maxLvl, lvl): number;
Defined in: scaling/linear.ts:18
Linear scaling function. Returns a multiplier that is 0 at level 1 and 1 at maxLevel.
Parameters
Parameter | Type | Description |
---|---|---|
maxLvl | number | The level at which the scaling is 1 |
lvl | number | The current level of the ability |
Returns
number
the scaling multiplier
Example
// Teemo Q: 80 / 125 / 170 / 215 / 260
const base = 80;
const end = 180; // 260 - base
const maxLvl = 5;
const damage = base + linear(maxLvl, lvl) * end; // 105
linear18()
function linear18(lvl): number;
Defined in: scaling/linear.ts:48
The scaling for abilities that max out at level 18.
Parameters
Parameter | Type | Description |
---|---|---|
lvl | number | The current level of the ability |
Returns
number
the scaling multiplier
linear3()
function linear3(lvl): number;
Defined in: scaling/linear.ts:28
The scaling for abilities that max out at level 3.
Parameters
Parameter | Type | Description |
---|---|---|
lvl | number | The current level of the ability |
Returns
number
the scaling multiplier
linear5()
function linear5(lvl): number;
Defined in: scaling/linear.ts:38
The scaling for abilities that max out at level 5.
Parameters
Parameter | Type | Description |
---|---|---|
lvl | number | The current level of the ability |
Returns
number
the scaling multiplier