Closed OrenAudeles closed 4 years ago
My current workaround, as I don't have Watch or Lead unlocked, is to add false &&
at the start of their conditions.
if( false &&
(100*(game.c2.<challenge>/(game.global.highestLevelCleared+1))) < getPageSetting('c2runnerpercent') ) {
[...]
}
I added a check if challenge is completed
Awesome, thanks for the fast resolution :D
Possible relation to #61
Problem Description
When using
C2 Runner
with HZE 175 got stuck attempting to run theWatch
C2 which is not unlocked yet.Watch
unlocks at Z180. Will probably get stuck again for any other C2 where the challenge is unlocked at a higher than HZE zone.Possible solution
Add check that the challenge is unlocked using a mapping between the Challenge name and its unlock zone. Eg.
"Watch" : 180
,"Lead" : 180
.EG: https://github.com/Zorn192/AutoTrimps/blob/1bfc70c6835b271c7981fa5b5eac870d89efb561/modules/portal.js#L152-L156
to
where
challenge_unlocked
is along the lines ofand
should_run_c2
the current condition, split off to its own function for readability purposes