Feature - Implemented Increasing turns of hobo songs in the relay browser doesn't consider records

roippi

Developer
EffectDatabase.getDefaultAction() can just apply some logic to see if what it's returning is possible, and if not, to try the next action. No ash needed.
 

slyz

Developer
That would need a lot of redundant code, wouldn't it? Even if we limit ourselves to "use" and "cast", checking if we can retrieve an item or restore MP isn't trivial. It sounds easier and error-proof-er to check a return value (KoLmafia.permitsContinue() in these cases).

EDIT: I had a doubt and checked RuntimeLibrary.java. The use() and use_skill() ASH commands actually call the "use" and "cast" CLI commands anyway, and return what is essentially KoLmafia.permitsContinue(). ASH doesn't bring anything in this case, then.

If we only use a limited number of CLI commands in statuseffects.txt, it's easy to modify Catch-22's patch to make ExtendEffectCommand do that.
 
Last edited:

Catch-22

Active member
Looks okay, a different approach but still effective. The sim commands you added could prove useful elsewhere down the track, wish those existed earlier :) I won't have much time to test this and I've been having to buy a lot of recordings/maple syrup, so hopefully someone else can test it.

Edit: I haven't tried it, but it looks like your skill use won't try to restore MP. Maybe someone can confirm.
 
Last edited:

roippi

Developer
Nicely done!

Thanks.

Code:
[COLOR=olive]> cast 4 inigo[/COLOR]

Casting Inigo's      Incantation of Inspiration 4 times...
You acquire an effect: Inigo's      Incantation of Inspiration (duration: 40 Adventures)
Inigo's      Incantation of Inspiration was successfully cast.

[COLOR=olive]> up inigo[/COLOR]

Casting Inigo's Incantation of Inspiration 1      times...
You acquire an effect: Inigo's Incantation of Inspiration      (duration: 10 Adventures)
Inigo's Incantation of Inspiration was      successfully cast.

[COLOR=olive]> up inigo[/COLOR]

Searching      for "recording of Inigo's Incantation of Inspiration"...
Search      complete.
Purchasing recording of Inigo's Incantation of Inspiration (1      @ 1,800)...
You acquire an item: recording of Inigo's Incantation of      Inspiration
Purchases complete.
Using 1 recording of Inigo's      Incantation of Inspiration...
You acquire an effect: Inigo's      Incantation of Inspiration (duration: 20 Adventures)
Finished using 1      recording of Inigo's Incantation of Inspiration.

Looks good I think? There was an issue with the maximizer complaining about stuff that hopefully was fixed in r11314. I'll mark implemented, can re-reopen if not.
 

Darzil

Developer
Is it planned to make this code check if you can cast the spells, or is that tricky? I'm in a SC DB run at level 7 and maximiser suggests I cast Thingfinder to improve my +items. If I pull a Thingfinder recording it does add it as an option.
 

Darzil

Developer
I believe it is supposed to do that already, but I might be misunderstanding what you are saying.

I have one of the three requirements to cast the spell. I know the spell. The other two are being an AT (I'm a DB) and being level 15 or higher (I'm 7).
 

roippi

Developer
Which skill?

Edit: oh, nevermind. I'll have to think about what to do for the maximizer.
 
Last edited:

lostcalpolydude

Developer
Staff member
All 5 of them (thingfinder, chorale, benetton, elron, and prelude) if I put in a relevant maximizer string. Default settings were used for maximizing.
 
Top