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

Yvain

Member
When I click on the up arrow next to a hobo song buff in the relay browser mafia tries to cast the spell (and fails as I don't have the skill nor am I an AT). It would be nice if Mafia could check if I can cast it and if I can't use a recording instead.
 

lostcalpolydude

Developer
Staff member
Changed from Bug to Feature request.

One thing you can do is add the hobo song to your mood, and in that entry tell mafia to use recordings instead of cast the song. Then mafia will use recordings instead of casting it (even if you can cast it).
 

Bale

Minion
I believe he really wants mafia to figure that out for itself.

It would be even better, switch seamlessly from one to the other if you run out of casts. That'd need to be scripted right now. (I'd even have to do the cast with a visit_url() and parse the result to find out if there are casts remaining.)
 

zarqon

Well-known member
I've just made a feature request for other reasons which, if implemented, would also make this much easier to script. It might even mean mafia could get a bit smarter about these skills.
 
Broken link to increase turns of chorale from relay browser

As a disco bandit, when I click on the arrow next to the remaining duration of chorale in the relay browser to increase its remaining turns, it attempts to do so by casting it, despite that fact that I can't cast it and have recordings in my inventory.
 

Catch-22

Active member
I have fixed this particular issue, but I noticed a lot of | conditions in the default actions of statuseffects.txt (eg. Ham-Fisted default action is "use 1 jug of hamethyst juice|use 1 flask of hamethyst juice|use 1 vial of hamethyst juice"). I don't know if someone either thought these would work, planned on adding | to the CLI interpreter but didn't or simply left them there as a place-holder.

I went ahead and retroactively fixed other occurrences of | in the database. For item using in the CLI, it's simple enough to do "use either 1 x, 1 y, 1 z" so I did that where possible. There are a few things (such as recordings) that needed to be handled using an ash one-liner. Not fully tested, as I don't have all these items/skills.
 

Attachments

  • statuseffects.txt.patch
    9.5 KB · Views: 37

Catch-22

Active member
I'd even have to do the cast with a visit_url() and parse the result to find out if there are casts remaining.

I would hope that if there are no uses left that use_skill() would return false, if that's the case then the patch I have posted should handle this too.
 

Bale

Minion
The message you quoted is from over a year ago! It is no longer accurate. Mafia now offers tracking of maximum daily casting as proxy records.
 

Bale

Minion
Well, then I'm just sayin' that you shouldn't rely on a failed execution of use_skill() to tell you that you're out of casts when mafia is trackin' that shit.
 

Catch-22

Active member
Well, then I'm just sayin' that you shouldn't rely on a failed execution of use_skill() to tell you that you're out of casts when mafia is trackin' that shit.

I know :( but for an ash one liner
Code:
if ((have_skill($skill[Donho's Bubbly Ballad])) && (get_property("_donhosCasts") < 50) && ( my_maxmp() > mp_cost($skill[Donho's Bubbly Ballad])) && (restore_mp(mp_cost($skill[Donho's Bubbly Ballad]))) && (my_mp >= mp_cost($skill[Donho's Bubbly Ballad])) ) { use_skill(1, $skill[Donho's Bubbly Ballad]) } else { use_item(1, $item[Recording of Donho's Bubbly Ballad]) };
seemed like overkill...

;)
 

fronobulax

Developer
Staff member
Just commit the patch already ;)

This combined with your next post almost triggered my knee jerk reaction to entitlement but I decided that was my problem not yours. r11243

In the future, though, if you have patches that are languishing try a PM.
 

Catch-22

Active member
This combined with your next post almost triggered my knee jerk reaction to entitlement but I decided that was my problem not yours. r11243

In the future, though, if you have patches that are languishing try a PM.

Ah sorry, I didn't mean to sound entitled :) Thanks, I'll keep it in mind.
 
Top