+10
-2
@@ -306,7 +306,15 @@ export function adjustedStatFromFinal(finalStat: number, skillPassive: number):
|
|||||||
return finalStat - skillPassive;
|
return finalStat - skillPassive;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function baseStatFromAdjusted(stat: Stat, adjStat: number, career: boolean, surface: Surface, conditions: GroundConditions, styleApt: AptitudeLevel, thresholdMod: number): number {
|
export function baseStatFromAdjusted(
|
||||||
|
stat: Stat,
|
||||||
|
adjStat: number,
|
||||||
|
career: boolean,
|
||||||
|
surface: Surface,
|
||||||
|
conditions: GroundConditions,
|
||||||
|
styleApt: AptitudeLevel,
|
||||||
|
thresholdMod: number,
|
||||||
|
): number {
|
||||||
const careerMod = career ? 400 : 0;
|
const careerMod = career ? 400 : 0;
|
||||||
switch (stat) {
|
switch (stat) {
|
||||||
case Stat.Speed:
|
case Stat.Speed:
|
||||||
@@ -324,7 +332,7 @@ export function baseStatFromAdjusted(stat: Stat, adjStat: number, career: boolea
|
|||||||
|
|
||||||
export function rawStatFromBase(baseStat: number, mood: Mood): number {
|
export function rawStatFromBase(baseStat: number, mood: Mood): number {
|
||||||
// Round to half-integers in case we have a component above 1200.
|
// Round to half-integers in case we have a component above 1200.
|
||||||
const s = Math.round(2 * baseStat / MOOD_COEF[mood]) / 2;
|
const s = Math.round((2 * baseStat) / MOOD_COEF[mood]) / 2;
|
||||||
const r = math.min(s, 1200) + math.max(s - 1200, 0) * 2;
|
const r = math.min(s, 1200) + math.max(s - 1200, 0) * 2;
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user