allowing pbs with plus one and plus. closes #1566

This commit is contained in:
Jack 2021-06-23 17:53:17 +01:00
parent 590a40b4a9
commit acbb4597b6
2 changed files with 10 additions and 4 deletions

View file

@ -477,7 +477,11 @@ async function checkIfPB(uid, obj, userdata) {
if (obj.mode == "quote") {
return false;
}
if (obj.funbox !== "none") {
if (
obj.funbox !== "none" &&
obj.funbox !== "plus_one" &&
obj.funbox !== "plus_two"
) {
return false;
}
try {

View file

@ -478,14 +478,14 @@ export async function init() {
(wordset.length < 3 || PractiseMissed.before.mode !== null)
) {
randomWord = wordset[Math.floor(Math.random() * wordset.length)];
} else {
} else {
while (
randomWord == previousWord ||
randomWord == previousWord2 ||
(!Config.punctuation && randomWord == "I") ||
randomWord.indexOf(" ") > -1
) {
console.log('rerandomising');
console.log("rerandomising");
randomWord = wordset[Math.floor(Math.random() * wordset.length)];
}
}
@ -1600,7 +1600,9 @@ export function finish(difficultyFailed = false) {
}
});
if (
completedEvent.funbox === "none" &&
(completedEvent.funbox === "none" ||
completedEvent.funbox === "plus_one" ||
completedEvent.funbox === "plus_two") &&
completedEvent.language === "english" &&
completedEvent.mode === "time" &&
["15", "60"].includes(String(completedEvent.mode2))