Open Eselce opened 2 years ago
Vorabfunktion innerhalb von OS2.master-SLC
war vorläufig:
// Gibt Anzahl trainierter Skillpunkte und Michael Bertrams "Talent" zurueck
function getTrainiertUndTalent(age, skills) {
const [__SETRAINIERB, __SEEQ19] = trainierb.reduce(
function (res, skillIdx) {
const __SKILL = skills[skillIdx];
res[0] += __SKILL;
res[1] += dauer[__SKILL];
return res;
}, [0, 0]);
const __ALTER = Math.floor(age);
const __RESTZAT = Math.round(72 * (age - __ALTER));
const __TRAINIERT = tage[__ALTER] + Math.round(__RESTZAT * faktor[__ALTER] / 100);
const __EQ19 = __SEEQ19 - __TRAINIERT;
return [__SETRAINIERB, __EQ19];
}
unter Zuhilfenahme von
// Tabellen fuer Spielertalent...
const trainierb = new Array(0,1,2,3,4,5,8,9,10,11,15); // Indizes der trainierbaren Skills
const dauer = new Array(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,58,59,60,62,63,65,66,68,70,71,73,75,77,79,82,84,87,89,92,95,98,101,104,108,112,116,120,125,130,136,142,148,155,163,171,181,192,205,220,238,261,292,340);
const tage = new Array(-1505,-1426,-1346,-1267,-1188,-1109,-1030,-950,-871,-792,-713,-634,-554,-475,-396,-317,-238,-158,-79,0,72,138,198,254,304,350,392,431,465,497,526,551,575,596,615,632,648,662,674,685);
const faktor = new Array(110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,100,92,84,77,70,64,58,53,48,44,40,36,33,29,26,24,21,19,17,15,14);
Nach Absprache mit mehreren Leuten ist die Wahl auf Potential
gefallen.
Die Daten könnten noch für Spieler des Alters 40+ erweitert werden...
Sven-Odessa — 04.02.2022