enhance: special case dx rating calculate
This commit is contained in:
@@ -80,11 +80,15 @@ impl Level {
|
||||
_ if achievement > dec!(101.0) => return 0,
|
||||
|
||||
_ if achievement >= SSS_PLUS_THRESHOLD => SSS_PLUS_FACTOR,
|
||||
_ if achievement >= SSS_PRO_THRESHOLD => SSS_PRO_FACTOR,
|
||||
_ if achievement >= SSS_THRESHOLD => SSS_FACTOR,
|
||||
_ if achievement >= SS_PLUS_PRO_THRESHOLD => SS_PLUS_PRO_FACTOR,
|
||||
_ if achievement >= SS_PLUS_THRESHOLD => SS_PLUS_FACTOR,
|
||||
_ if achievement >= SS_THRESHOLD => SS_FACTOR,
|
||||
_ if achievement >= S_PLUS_PRO_THRESHOLD => S_PLUS_PRO_FACTOR,
|
||||
_ if achievement >= S_PLUS_THRESHOLD => S_PLUS_FACTOR,
|
||||
_ if achievement >= S_THRESHOLD => S_FACTOR,
|
||||
_ if achievement >= AAA_PRO_THRESHOLD => AAA_PRO_FACTOR,
|
||||
_ if achievement >= AAA_THRESHOLD => AAA_FACTOR,
|
||||
_ if achievement >= AA_THRESHOLD => AA_FACTOR,
|
||||
_ if achievement >= A_THRESHOLD => A_FACTOR,
|
||||
@@ -104,21 +108,33 @@ impl Level {
|
||||
const SSS_PLUS_THRESHOLD: Decimal = dec!(100.5);
|
||||
const SSS_PLUS_FACTOR: Decimal = dec!(0.224);
|
||||
|
||||
const SSS_PRO_THRESHOLD: Decimal = dec!(100.4999);
|
||||
const SSS_PRO_FACTOR: Decimal = dec!(0.222);
|
||||
|
||||
const SSS_THRESHOLD: Decimal = dec!(100);
|
||||
const SSS_FACTOR: Decimal = dec!(0.216);
|
||||
|
||||
const SS_PLUS_PRO_THRESHOLD: Decimal = dec!(99.9999);
|
||||
const SS_PLUS_PRO_FACTOR: Decimal = dec!(0.214);
|
||||
|
||||
const SS_PLUS_THRESHOLD: Decimal = dec!(99.5);
|
||||
const SS_PLUS_FACTOR: Decimal = dec!(0.211);
|
||||
|
||||
const SS_THRESHOLD: Decimal = dec!(99);
|
||||
const SS_FACTOR: Decimal = dec!(0.208);
|
||||
|
||||
const S_PLUS_PRO_THRESHOLD: Decimal = dec!(98.9999);
|
||||
const S_PLUS_PRO_FACTOR: Decimal = dec!(0.206);
|
||||
|
||||
const S_PLUS_THRESHOLD: Decimal = dec!(98);
|
||||
const S_PLUS_FACTOR: Decimal = dec!(0.203);
|
||||
|
||||
const S_THRESHOLD: Decimal = dec!(97);
|
||||
const S_FACTOR: Decimal = dec!(0.2);
|
||||
|
||||
const AAA_PRO_THRESHOLD: Decimal = dec!(96.9999);
|
||||
const AAA_PRO_FACTOR: Decimal = dec!(0.176);
|
||||
|
||||
const AAA_THRESHOLD: Decimal = dec!(94);
|
||||
const AAA_FACTOR: Decimal = dec!(0.168);
|
||||
|
||||
@@ -127,3 +143,17 @@ const AA_FACTOR: Decimal = dec!(0.152);
|
||||
|
||||
const A_THRESHOLD: Decimal = dec!(80);
|
||||
const A_FACTOR: Decimal = dec!(0.136);
|
||||
|
||||
/*
|
||||
TODO: calculate (below) BBB dx rating
|
||||
[0, 0, 'd'],
|
||||
[10, 1.6, 'd'],
|
||||
[20, 3.2, 'd'],
|
||||
[30, 4.8, 'd'],
|
||||
[40, 6.4, 'd'],
|
||||
[50, 8, 'c'],
|
||||
[60, 9.6, 'b'],
|
||||
[70, 11.2, 'bb'],
|
||||
[75, 12.0, 'bbb'],
|
||||
[79.9999, 12.8, 'bbb'],
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user