loathers / autoscend

An ascension script for KoLMafia
Other
45 stars 70 forks source link

Change Bonerdagon evilness check to 999 #1439

Closed dizzydis closed 5 months ago

dizzydis commented 6 months ago

Checking for 999 evilness instead of <= 0 to determine if Bonerdagon is ready to be fought

Description

Currently autoscend doesn't kill the Bonerdagon. It checks totalEvilness to be less than or equal to 0 before trying to adventure in the Haert of the Cyrpt.

This changes the evilness check to be 999 - which should only be reached if all 4 sub-zones are cleared and the Haert is open.

How Has This Been Tested?

Fairly minimal testing.

Before change:

[DEBUG] Attempting to execute task 48 L7_crypt
Using 1 Evilometer...
Finished using 1 Evilometer.
Updating inventory...
Preference _concoctionDatabaseRefreshes changed from 430 to 431
[DEBUG] Attempting to execute task 49 L6_friarsGetParts

Added some debug statements to check, and its getting to the end of L7_crypt function, and returning false. Current prefs:

questL07Cyrptic - started
cyrptAlcoveEvilness - 0
cyrptCrannyEvilness - 0
cyrptNicheEvilness  - 0
cyrptNookEvilness  - 0
cyrptTotalEvilness - 999

After change:

[DEBUG] Attempting to execute task 48 L7_crypt
Using 1 Evilometer...
Finished using 1 Evilometer.
Updating inventory...
Preference _concoctionDatabaseRefreshes changed from 434 to 435
--> [INFO] Target hp => 901 - Considering restore options at 784/901 HP with 1560/1680 MP
--> [INFO] Active Negative Effects => []
--> [DEBUG] Calculating restore objective values.
--> [INFO] Loading restoration data.
--> [INFO] Using skill cannelloni cocoon as restore.
--> Casting Cannelloni Cocoon 1 times...
--> You gain 117 hit points
--> Cannelloni Cocoon was successfully cast.
--> Preference auto_mcd_target changed from 0 to 10
--> Preference auto_nextEncounter changed from to Bonerdagon
// These last 3 lines were a custom check I'd placed initially, which wasn't being reached. Its now being reached. I added a wait so I could cancel the script for testing without it progressing
--> Testing to see if we even get here...
--> Countdown: 15 seconds...
--> KoLmafia declares world peace.

Checklist:

dizzydis commented 5 months ago

Tested again today on a fresh hardcore standard run.

Monitored the prefs in the Mafia UI as well. cyrptTotalEvilness goes straight to 999 as soon as the 4th sub-boss is killed. After the Bonerdagon is killed, it goes to 0.