Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

L13_powerLevel() reworked #353

Merged
merged 4 commits into from
May 8, 2020
Merged

L13_powerLevel() reworked #353

merged 4 commits into from
May 8, 2020

Conversation

taltamir
Copy link
Contributor

@taltamir taltamir commented Apr 25, 2020

L13_powerLevel() reworked:
*Power leveling code was split between L13_powerLevel() and LX_attemptPowerLevel() in a messy fashion. Consolidated it into LX_attemptPowerLevel()
*moved The Source path specific powerleveling code to boolean LX_attemptPowerLevelTheSource()
*releasing the softblock on quests awaiting optimal conditions was done far too late in L13_powerLevel(). moved it to be done right before L13_powerLevel() is called, and inserted a mcall to getDigitalKey and getStarKey between those two.
*removed L13_powerLevel() entirely as the only thing it still does is serve as a wrapper for LX_attemptPowerLevel(). replaced it with calling on LX_attemptPowerLevel() if under level 13.
*boolean LX_unlockThinknerdWarehouse(boolean spend_resources) added and used in melvin quest and in zone_unlock(location loc)
*adventuring in thinknerd warehouse, either as part of melvign quest or by itself, removed from powerleveling function. While it is a scaling zone, it has a very low cap on max stats of enemies which means much lower XP than the haunted gallery. As such the side quest code is not called anywhere. But will likely be added later as a UI toggle to instruct us to do it despite being not optimal.

How it has been tested

Been running it on multiple accounts for several days. but only some of them needed to level.
Seems to work as expected though.

Checklist:

  • My code follows the style guidelines of this project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have based by pull request against the beta branch or have a good reason not to.

@taltamir
Copy link
Contributor Author

taltamir commented Apr 26, 2020

Hit it with ed on 0 IOTMs. it works. That said, can really feel the need for a function to unlock Thinknerd nerdhouse. As it would be much more efficient. Additionally it would mask the fact that if the only thing remaining to do is island war, and you do not have enough moxie, then it goes to powerlevel your mainstat instead of your moxie stat.
Specifically catching and handling leveling a specific stat to unlock the war is, I think, beyond the scope of this PR And should go in a subsequent one.

I confirmed that releasing the softblock on quests works. I can confirm that using clovers for mainstat works. I can confirm that haunted louvre works.

@taltamir
Copy link
Contributor Author

taltamir commented Apr 26, 2020

added boolean unlockThinknerdWarehouse()
used it in LX_melvignShirt() and LX_attemptPowerLevel()

this needs more testing so don't merge yet.

@taltamir
Copy link
Contributor Author

taltamir commented Apr 26, 2020

updated TODO

  1. Add foldable IOTM crafting to boolean unlockThinknerdWarehouse()

  2. [N/A] Add a different function that is willing to spend a wish or adventure in order to unlock Thinknerd Warehouse

  3. [done] half of LX_attemptPowerLevel() is "The Source" path specific code. Maybe move it to that path file in LX_theSourcePowerLevel(), calling on it from LX_attemptPowerLevel() if appropriate?

}
void tryShirtPull(item it)
{
if(!hasShirt() && can_equip(it) && canPull(it))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think canPull(it) is redundant here

Copy link
Contributor Author

@taltamir taltamir Apr 27, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can pull checks:

  1. is it in standard
  2. are we in hardcore
  3. do we have pulls left today
  4. do we have the item in hangk / is it cheap enough to mallbuy with hangk meat
  5. are there specific path restrictions forbidding it (ex: bees hate you)

can equip checks if we have enough mus, mox, or mys to equip it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh... actually can_equip also checks if you have torso awaregness. So it needs to be removed.
equip() also checks if you have it too so i need to handle this via visit_url too...

Copy link
Member

@Malibu-Stacey Malibu-Stacey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. half of LX_attemptPowerLevel() is "The Source" path specific code. Maybe move it to that path file in LX_theSourcePowerLevel(), calling on it from LX_attemptPowerLevel() if appropriate?

This should be in this PR. It's quick enough to do as it's a simple copy & paste and this PR is massively touching the LX_attemptPowerLevel() function already.

@taltamir
Copy link
Contributor Author

taltamir commented Apr 29, 2020

  1. half of LX_attemptPowerLevel() is "The Source" path specific code. Maybe move it to that path file in LX_theSourcePowerLevel(), calling on it from LX_attemptPowerLevel() if appropriate?

This should be in this PR. It's quick enough to do as it's a simple copy & paste and this PR is massively touching the LX_attemptPowerLevel() function already.

change made

Incidentally. I looked a little at that bit of code. It seems to:

  1. add doing... something... in the barrel full of barrels
  2. prioritize burning clovers, doing them before the main function would do scaling enemies or adventuring in the haunted gallery for the NC
  3. actually check if we are short offstats for the war outfit, and powerlevel those instead of mainstat.
  4. skip scaling enemies semi-entirely... well, it would do free scaling combats as they happen before its check (so, NEP) and also do thinknerd warehouse, but it will not spend adventures on rest of scaling combat.
  5. if you have no more clovers left it fallsback to LX_spookyBedroomCombat as a means of powerleveling

Anyone knows why it is doing those things? In particular is there a reason to exclude scaling combats? And if there is then we accidentally at some point added some before it via free fights in scaling IOTM zones like NEP.

@Malibu-Stacey
Copy link
Member

Anyone knows why it is doing those things?

First off, git blame is a thing which exists.
Secondly, 99/100 the answer is "because Cheesecookie wrote it that way".

@taltamir
Copy link
Contributor Author

Anyone knows why it is doing those things?

First off, git blame is a thing which exists.
Secondly, 99/100 the answer is "because Cheesecookie wrote it that way".

blame just points me towards #211
looking around it. it is pointing at a solar commit that says initial commit, copy of cc_ascend as of revision 1411

@taltamir taltamir requested a review from Malibu-Stacey April 29, 2020 12:11
@Malibu-Stacey
Copy link
Member

Malibu-Stacey commented Apr 29, 2020

Anyone knows why it is doing those things?

First off, git blame is a thing which exists.
Secondly, 99/100 the answer is "because Cheesecookie wrote it that way".

blame just points me towards #211
looking around it. it is pointing at a solar commit that says initial commit, copy of cc_ascend as of revision 1411

Thus see the second line of my reply above. That's literally what that commit message is telling you.

@taltamir
Copy link
Contributor Author

taltamir commented Apr 30, 2020

updated TODO (likely in future PR)

  1. Add foldable IOTM crafting to boolean LX_unlockThinknerdWarehouse(boolean allow_adv, boolean allow_wish)

  2. Add adventuring for a shirt drop.

  3. clover math to see if it is worth spending it on powerleveling. At the moment assume it isn't unless we are out of things to use it on.

@taltamir
Copy link
Contributor Author

taltamir commented Apr 30, 2020

Oh... there was actually already code for unlocking thinknerd in auto_zone.ash.
It was just unreachable so I didn't find it because I looked in places that should call it (those just had a todo asking someone to write such code). So I did not notice it.

In addition to being unreachable, it also does not work for various reasons.
Such as using autoEquip which just adds it to maximizer, which will not get the letter unless you have torso awaregness, but it specifically will not try to unlock it if you have torso awaregness.
You can't use mafia commands for that, you have to use visit_url.

Moved my own unlock function to auto_zone.ash
And I am going through the rest of the code and merging it with what I wrote to both remove duplicates and get working code

@taltamir taltamir force-pushed the 13pl branch 2 times, most recently from 8df6a10 to 3652541 Compare April 30, 2020 11:51
@taltamir
Copy link
Contributor Author

Alright. Finished merging duplicate code. and things at least nominally work.
However, I am noticing something odd. Namely I was getting surprisingly low stats in thinknerd warehouse. I am going to look into it further.
... also, probably should add buffing mainstat before doing scaling combat for XP.

@taltamir
Copy link
Contributor Author

taltamir commented May 2, 2020

Tested in ed and aftercore on an account with 1 ascension.
and in plumber on an account with 350+ ascensions.

The cap on the scaling stats for monsters in Thinknerd warehouse at 0ML are:
the 3 robots: HP 51, ATK 69, DEF 69
Amock Pudding: HP 66, ATK 89, DEF 89

As a result they give piddling amounts of XP. Less than some normal non scaling zones. This makes them actually unsuitable for grinding XP. So all this effort I spent fixing up that zone has pretty much been a waste.

@taltamir
Copy link
Contributor Author

taltamir commented May 2, 2020

@jeparo
@Malibu-Stacey
should I just delete boolean LX_melvignShirt() and boolean LX_unlockThinknerdWarehouse(boolean spend_resources)
Neither are used anywhere now that I figured out how low the XP they give is due to the low cap on those scaling monsters.

actually neither does boolean zone_unlock(location loc) the only zone it tried to unlock previously was thinknerd warehouse, but it was not doing it correctly so i replaced its unlock function with a call to LX_unlockThinknerdWarehouse(false). the false is so it does not spend a wish nor adventures

I mean, maybe it will come in handy one day? and it does feel like a shame to delete it... but on the other hand i find it unlikely it will come in handy after all. So I am leaning towards deleting those functions.

@taltamir taltamir force-pushed the 13pl branch 2 times, most recently from 3521eb2 to a0d8d41 Compare May 4, 2020 12:23
taltamir added 4 commits May 5, 2020 19:31
*Power leveling code was split between L13_powerLevel() and LX_attemptPowerLevel() in a messy fashion. Consolidated it into LX_attemptPowerLevel()
*moved The Source path specific code to boolean LX_attemptPowerLevelTheSource()
*releasing the softblock on quests awaiting optimal conditions was done far too late in L13_powerLevel(). Actually moved it to be done right before the function itself is called.
*renamed L13_powerLevel() to L13_startQuest()
*boolean LX_unlockThinknerdWarehouse(boolean spend_resources) added and used. either for the purpose of doing melvign quest or for powerleveling in thinknerd warehouse
it is scaling but very low caps on scaling. resulting in <30 substats per adv
@taltamir taltamir merged commit f4976df into loathers:beta May 8, 2020
@taltamir taltamir deleted the 13pl branch May 8, 2020 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants