soolar / sl_ascend

An ascension script for kolmafia
11 stars 5 forks source link

don't use sing along unless actually needed #314

Open taltamir opened 4 years ago

taltamir commented 4 years ago

I have been dying/losing a lot of HP unnecessary because sl_ascend is casting sing along when it is really not necessary.

[452] The Hidden Park Encounter: grizzled rodeo clown Round 0: taltamir wins initiative! sl_combatHandler: 0 Round 1: taltamir casts SUMMON LOVE MOSQUITO! Round 2: grizzled rodeo clown takes 13 damage. Round 2: You gain 13 hit points Round 2: taltamir casts SUMMON LOVE GNATS! Round 3: taltamir casts SUMMON LOVE STINKBUG! Round 4: grizzled rodeo clown takes 2 damage. Round 4: taltamir casts SING ALONG! Round 5: grizzled rodeo clown takes 2 damage. Round 5: You lose 60 hit points

song is on total eclipse of your meat, class is beanslinger, there is really no point in singing along in the hidden park for additional meat (that does not even cover the cost of the HP lost from singing along)

jaspercb commented 4 years ago

We now sing along less aggressively (namely: we Sing Along when we can survive another 5 turns in combat, not 2.5 as previously). Hopefully this is a more reasonable cutoff. I'm going to leave this issue open since it's an attempted fix. If you notice you're dying less, please let us know and we can close the topic.

taltamir commented 4 years ago

Alright, thank you. I will observe the effects of this.

jaspercb commented 4 years ago

Does the issue seem resolved?

taltamir commented 4 years ago

Sorry. I ended up forgetting to test this. I am currently in the middle of something, but should ascend into beanslinger in 3 rollovers to test it. (got all skills permed and so many iotms that it is normally hard to encounter something that can even be a threat like this, but beanslinger is different, it is very squishy).

Actually, I was looking at the code change if(canUse($skill[Sing Along]) && canSurvive(5.0) && (get_property("boomBoxSong") == "Total Eclipse of Your Meat") && stunnable(enemy))

I noticed it checks for the monster being stunnable, but singalong does not actually stun monsters. As you can see from the log above, the monster was stunned by love mosqito, gnat, and stinkbugs, but was not stunned when it sang along.

====

Also, I think the cansurvive function might not be calculating beanslingers correctly. As death occured the instant singalong was done and that should not have happened even with the old value of 2.5. I will look into it a bit further

====

Actually thinking about it, I am actually iffy about the benefit of doing sing along at all. Not too long ago I updated the cost analysis calculations of restorers https://kol.coldfront.net/thekolwiki/index.php/Cost_Analysis_of_Restoring_HP_and_MP In west of loathing there is no good out of combat healing skill. This means healing from doc galactic. you are looking at 6.3 meat per HP restored. sing along on meat gives you 25 meat in return for letting the enemy hit you once. So if you take more than 3.97 HP damage, aka if you take 4 HP damage or more you are losing meat by singing along for total eclipse of your meat.

This test update switched it from being willing to sacrifice 40% of your HP for that 25 meat, to being willing to sacrifice 20% of your HP for 25 meat. While you are far less likely to die, you are still losing meat every time you use this skill. Even at level 1 I often have over 20 maxHP, which means 20% is 4 HP, which means losing meat on this exchage.

Now, if you have a powerful enough passive regen of HP or MP (with appropriate healing skill) to fully compensate for lost HP then you do not need to heal it and as such are actually turning a profit. Additionally if you have a proper MP to HP healing skill available it significantly cuts down on the costs. You can push as low as 0.35 meat per HP. So at that point 25 meat pays for 71.43 HP.

taltamir commented 4 years ago

Alright, tested it. I am still dying. It simply is not calculating west of loathing expected damage correctly. For example, I have a max HP of 154 as a beanslinger and it did this:

[183] The Neverending Party
Encounter: party girl
Round 0: taltamir wins initiative!
sl_combatHandler: 0
Round 1: taltamir casts SUMMON LOVE MOSQUITO!
Round 2: party girl takes 9 damage.
Round 2: You gain 9 hit points
Round 2: taltamir casts SUMMON LOVE GNATS!
Round 3: taltamir casts SUMMON LOVE STINKBUG!
Round 4: party girl takes 2 damage.
Round 4: taltamir casts SING ALONG!
Round 5: You lose 80 hit points

20% of 154 is 30.8 HP. but it is trading away 80 hit points of damage. Just raising the number in the canSurvive() function won't help if the cansurvive function is not correctly calculating things. I believe that it simply is not correctly calculating west of loathing + NEP combo (or possibly just not correctly calculating west of loathing at all anywhere, its just not really an issue against non scaling enemies since they are so weak normally and I do have lots of IOTM)

Additionally: bonerdagon is not staggerable nor stunable. And needs to be marked as such in the relevant functions. that is, stunnable(enemy) and whatever function checks for staggerable

sl_ascend still attempts to use the 3 lovebug skills against it, as well as sing along. (sing along incorrectly checks if the enemy is stunable, despite not causing a stun). Normally the lovebug skills used are (in order): SUMMON LOVE MOSQUITO! - staggers the enemy (make them do nothing current round) SUMMON LOVE GNATS! - stun the enemy for several rounds SUMMON LOVE STINKBUG! - adds DoT, relying on the stun from gnats to not get hit. https://kol.coldfront.net/thekolwiki/index.php/Stunning https://kol.coldfront.net/thekolwiki/index.php/Lovebug_abilities_and_encounters

None of those 3 should be used against the bonerdagon since it is immune to both staggers and stuns. And singalong should not be checking for stunnable since it doesn't stun anyways.

To be bonest, I think singalong should only be used if you can get a guarenteed no hit (or if doing the nuns meat quest). As per safe adventuring https://kol.coldfront.net/thekolwiki/index.php/Safe_Adventuring Or you could have an entire sprawling function to test if expected meat gain (25 meat) is more than expected cost. I think I will try and write a function that does that.