Explorar o código

Fix sinistea and polteageist display + beta metric def

Kirk Trombley %!s(int64=3) %!d(string=hai) anos
pai
achega
bd6823cd67
Modificáronse 2 ficheiros con 3 adicións e 2 borrados
  1. 2 2
      web/metrics.js
  2. 1 0
      web/render.js

+ 2 - 2
web/metrics.js

@@ -118,8 +118,8 @@ const metrics = {
     displayBody: p => String.raw`
       \begin{aligned}
       &C\left(${p}\right) \\
-      - &\left|\frac{L\left(${p}\right)}{0.75} - 1\right| \\
-      + &\frac{1}{2}\tanh{10\left( \frac{\left|${p}\right|}{\left|P\right|} - 0.25 \right)}
+      - &\left|\frac{\max(\left\{0.4, L\left(${p}\right)\right\})}{0.75} - 1\right| \\
+      + &\frac{1}{2}\tanh{\left(10\left( \frac{\left|${p}\right|}{\left|P\right|} - 0.25 \right)\right)}
       \end{aligned}
     `,
     evaluate: data => data.importance,

+ 1 - 0
web/render.js

@@ -4,6 +4,7 @@ const getSprite = (() => {
     pokemon = pokemon
       .replace("-alola", "-alolan")
       .replace("-galar", "-galarian")
+      .replace("-phony", "") // sinistea and polteageist
       .replace("darmanitan-galarian", "darmanitan-galarian-standard");
     if (stripForm.find(s => pokemon.includes(s))) {
       pokemon = pokemon.replace(/-.*$/, "");