Closed mayhem-shazzrah closed 4 years ago
This is expected behavior. A lot of users were confused about answers like 8.6, when you can only get hit % in integers from gear, hence the change.
This is documented in this commit c517fabbe94a7943fca7097a367229ddfbf960f4
This is expected behavior. A lot of users were confused about answers like 8.6, when you can only get hit % in integers from gear, hence the change.
Ok, but can we then update the message from hit cap (rounded up to nearest 1/10th)
to hit cap (rounded up to nearest integer)
? (along with the example). Otherwise you will generate misleading captchas for odd-level mobs, like this one, where following the literal instructions and formulas don't give the correct answer:
btw if you give me the permissions i can make a PR for this and maybe help with other stuff you might need in the future.
otherwise, here is a patch file you can apply on top of the latest master
diff --git a/src/captchas.ts b/src/captchas.ts
index e17bec3..d211534 100644
--- a/src/captchas.ts
+++ b/src/captchas.ts
@@ -158,8 +158,8 @@ function calc_mitigation(
answer = Math.ceil(miss_chance + miss_penalty);
query = `the hit from gear required to reach your **${
yellow_hits ? "yellow" : "white"
- }** hit cap (rounded up to nearest 1/10th)?`;
- example = "13.1";
+ }** hit cap (rounded up to nearest integer)?`;
+ example = "13";
}
return { answer, query, example };
You should have permissions to make a PR, just create a fork and apply your changes.
Hit/Miss Chance is incorrectly rounded up to the nearest integer instead of preserving one digit of accuracy. More specifically https://github.com/Kruhlmann/gatekeeper/blob/f79eeb11f7b029730f9f50c91bb9781314037112/src/captchas.ts#L158 should read: