Fix the numbers
This commit is contained in:
@ -38,16 +38,22 @@ class SkillsTable {
|
||||
}
|
||||
|
||||
computeCost(skill: Skill) {
|
||||
const _STAT_TO_TRIPS: Record<Stat, number> = {
|
||||
"AGI": 1/7.2, // 8.4 is what I measured, but this seems very overpriced in practice
|
||||
"INT": 1/5.4,
|
||||
"CHA": 1/4.8,
|
||||
"PSI": 1/7.0,
|
||||
};
|
||||
let data = this.get(skill);
|
||||
|
||||
let governingStatValue = 0;
|
||||
for (let stat of data.governing.stats.values()) {
|
||||
governingStatValue +=
|
||||
getPlayerProgress().getStat(stat) / data.governing.stats.length;
|
||||
getPlayerProgress().getStat(stat) * _STAT_TO_TRIPS[stat] / data.governing.stats.length;
|
||||
}
|
||||
|
||||
if (data.governing.flipped) {
|
||||
governingStatValue = -governingStatValue + 10;
|
||||
governingStatValue = -governingStatValue + 1;
|
||||
}
|
||||
|
||||
let mult = getCostMultiplier(getPlayerProgress().getWish(), skill);
|
||||
@ -94,7 +100,7 @@ function geomInterpolate(
|
||||
return lowOut * Math.pow(highOut / lowOut, proportion);
|
||||
}
|
||||
|
||||
type Difficulty = 0 | 1 | 1.25 | 2 | 3;
|
||||
type Difficulty = -0.25 | -0.125 | 0 | 1 | 1.25 | 2 | 3;
|
||||
type GoverningTemplate = {
|
||||
stats: Stat[];
|
||||
note: string;
|
||||
@ -158,34 +164,46 @@ function governing(
|
||||
let cost: number;
|
||||
let mortalServantValue: number;
|
||||
switch (difficulty) {
|
||||
case -0.25:
|
||||
underTarget = 0.0;
|
||||
target = 3.9;
|
||||
cost = 50;
|
||||
mortalServantValue = 1;
|
||||
break;
|
||||
case -0.125:
|
||||
underTarget = 0.25;
|
||||
target = 4.25;
|
||||
cost = 50;
|
||||
mortalServantValue = 1;
|
||||
break;
|
||||
case 0:
|
||||
underTarget = 5;
|
||||
target = 15;
|
||||
underTarget = 0.5;
|
||||
target = 4.5;
|
||||
cost = 50;
|
||||
mortalServantValue = 1;
|
||||
break;
|
||||
case 1:
|
||||
underTarget = 15;
|
||||
target = 40;
|
||||
cost = 100;
|
||||
underTarget = 4;
|
||||
target = 10;
|
||||
cost = 50;
|
||||
mortalServantValue = 2;
|
||||
break;
|
||||
case 1.25:
|
||||
underTarget = 17;
|
||||
target = 42;
|
||||
cost = 100;
|
||||
underTarget = 5;
|
||||
target = 12;
|
||||
cost = 50;
|
||||
mortalServantValue = 2;
|
||||
break;
|
||||
case 2:
|
||||
underTarget = 30;
|
||||
target = 70;
|
||||
cost = 125;
|
||||
underTarget = 10;
|
||||
target = 18;
|
||||
cost = 75;
|
||||
mortalServantValue = 3;
|
||||
break;
|
||||
case 3:
|
||||
underTarget = 50;
|
||||
target = 100;
|
||||
cost = 150;
|
||||
underTarget = 14;
|
||||
target = 23;
|
||||
cost = 100;
|
||||
mortalServantValue = 10;
|
||||
break;
|
||||
}
|
||||
@ -247,7 +265,7 @@ export let bat3 = table.add({
|
||||
});
|
||||
|
||||
export let stealth0 = table.add({
|
||||
governing: governing("stealth", 0),
|
||||
governing: governing("stealth", -0.25),
|
||||
profile: {
|
||||
name: "Be Quiet",
|
||||
description:
|
||||
@ -284,7 +302,7 @@ export let stealth3 = table.add({
|
||||
});
|
||||
|
||||
export let charm0 = table.add({
|
||||
governing: governing("charm", 0),
|
||||
governing: governing("charm", -0.125),
|
||||
profile: {
|
||||
name: "Flatter",
|
||||
description:
|
||||
|
Reference in New Issue
Block a user