New Content - Implemented Spring 2020 Challenge Path - Path of the Plumber

Crowther

Active member
Showing the code was why I was trying to make a simple example.
Code:
                        return useSkill($skill[[7336]Multi-Bounce]);
Code:
string useSkill(skill sk, boolean mark)
{
        if(mark)
                markAsUsed(sk);

        return "skill " + sk;
}

string useSkill(skill sk)
{
        return useSkill(sk, true);
}
I checked this string and it was indead "skill [7336]Multi-Bounce".

EDIT:

The full code (without my modifications) can be found here: https://github.com/Loathing-Associa...eta/RELEASE/scripts/autoscend/auto_combat.ash
 
Last edited:

Veracity

Developer
Staff member
Code:
        return "skill " + sk;
That is the line that matters. "sk" is a skill object, so you are doing to_string() on a skill.

Yeah, ambiguous items, effect, monsters, and skills now have their ID as part of the string representation.

I'll add proxy fields to those 4 data types so you can use sk.base_name, say.

Edit: make that .name - which we already have for items.
 
Last edited:

Veracity

Developer
Staff member
Right.

Code:
[color=green]> ash to_item( 7962 ).to_string()[/color]

Returned: [7962]Eye of Ed

[color=green]> ash to_item( 7962 ).name[/color]

Returned: Eye of Ed

[color=green]> ash to_effect( 597 ).to_string()[/color]

Returned: [597]A Little Bit Evil

[color=green]> ash to_effect( 597 ).name[/color]

Returned: A Little Bit Evil

[color=green]> ash to_monster( 2172 ).to_string()[/color]

Returned: [2172]Bowser

[color=green]> ash to_monster( 2172 ).name[/color]

Returned: Bowser

[color=green]> ash to_skill( 7336 ).to_string()[/color]

Returned: [7336]Multi-Bounce

[color=green]> ash to_skill( 7336 ).name[/color]

Returned: Multi-Bounce
Revision 19861
 

Veracity

Developer
Staff member
By the way - it's OK to not disambiguate skills in CCS or combat filter actions. Both of those look up only Combat skills - and that set contains no ambiguity.
One hopes that KoL will not add any.
 

Crowther

Active member
By the way - it's OK to not disambiguate skills in CCS or combat filter actions. Both of those look up only Combat skills - and that set contains no ambiguity.
One hopes that KoL will not add any.
Ah thanks, I was worried that would be a problem.
 

Crowther

Active member
Okay, took a while to get there, but yes, adding .name to avoid an automatic skill to string conversion fixed the issue. Thanks, again.
 

Veracity

Developer
Staff member
1) Maximum number of plumberPoints
We'll learn this soon enough, I expect. I won't be the one who discovers it; I am slow and have spent extra time in aftercore, so I only have 14.

2) I'd like to optimize HP restoration a bit.

We try to use mushrooms on hand first, and then buy mushrooms with coins. I'm happy with that, but when using mushrooms on hand, it uses them in order super deluxe mushroom, deluxe mushroom, mushroom. I'd like it to take how much restoration you need. E.g., if you need 40, use a deluxe mushroom and a mushroom, rather than a super deluxe mushroom. Similarly, if you don't have mushrooms, it should buy those two mushrooms. It already takes "efficiency" into account - one super deluxe mushroom is more "efficient" at healing 35 than 2 deluxe mushrooms or 4 mushrooms, but it won't look at combos. For 35, 1 deluxe mushroom and 1 mushroom will do it for fewer coins.

This is probably more work than is worth it, considering that by the time I'm doing "restore HP", I have plenty of coins.

I'll probably move plumber restoration into a new method, which can be tinkered with as desired.
Yeah, I refactored RecoveryManager.restore and put Plumber restoration (HP only) into RecoveryManager.plumberHPRecovery. As coded, it always tries to use mushrooms in inventory first and then moves to buying them, which leads to suboptimal things like using a deluxe mushroom to heal 30 of 90 needed, and then buying and using a super deluxe to cure the last 60.

Now, if you don't have enough coins to buy, restoring some is better than none, but it seems like we could look at desired recovery, mushrooms in inventory, and available coins, and come up with an optium combination of inventory + purchase to get the desired healing - or as close to it as possible.

That's not easy. Pondering.

I also intend:

3) Allow HP restoration before the Tower's hedge maze. I disabled that back before I added HP restoration for Plumbers.

That's easy, but we may or may not get #1 and #2 before I make a new point release this month. Current Plumber support is good enough for that, even if we can improve it later.
 

Veracity

Developer
Staff member
Revision 19920 adds an HP recovery algorithm for Plumbers which attempts to optimize item usage such that it doesn't do follish things with mushrooms you already have in inventory.
 

Veracity

Developer
Staff member
I think support for this path is done. I spent a whole day using my new Plumber HP recovery algorithm todaya and it went just as I expected.
I know of nothing we are missing.
 

zarqon

Well-known member
One more thing I'd request: make my_primestat() return your current highest unbuffed stat while Plumbing. Scripts that make decisions based on your primestat would then make (probably) more helpful decisions for you.
 

zarqon

Well-known member
Hehe, I'm finally getting around to being a Plumber. I usually wait till mafia support is mostly settled before diving in to a new path; then I can add support for the path where necessary to my family of scripts without having to rewrite it all when mafia support is added. Unfortunately this means I am usually late to the party with any suggestions for mafia's support -- fashionably, I hope in this case.
 

Veracity

Developer
Staff member
One more thing I'd request: make my_primestat() return your current highest unbuffed stat while Plumbing.
It does that.

Code:
[color=green]> ashq print( "muscle = " + my_basestat( $stat[ muscle ] ) + " mysticality = " + my_basestat( $stat[ mysticality ] ) + " moxie = " + my_basestat( $stat [ moxie ] ) + " primestat = " + my_primestat() )[/color]

muscle = 2 mysticality = 2 moxie = 16 primestat = Moxie
 

taltamir

Member
Would be great if the equip command automatically removed incompatible boots.

With work boots equipped to acc1 I get the following error
Code:
> equip acc1 work boots

Putting on work boots...
Equipment changed.

> equip acc3 fancy boots

Putting on fancy boots...
You can't equip a fancy boots because you're already wearing a work boots.

would be great if it instead removed the currently equipped work boots and then wore the fancy boots
and vice versa when trying to equip work boots with fancy boots already worn
 
Last edited:
Top