Bug - Fixed Summon Rad Libs should be restricted in Standard

ckb

Minion
Staff member
In a Standard run,

> ash is_unrestricted($skill[summon rad libs])

Returned: true

> ash have_skill($skill[summon rad libs])

Returned: true

From the bookshelf:
You have a Tome of Rad Libs
But, that item is too old to be used on this path.
 

Veracity

Developer
Staff member
Back before I started Ed, I think I noticed the same thing; I saw it on the Use Skills frame, but it didn't use it in Breakfast.

What does standard.php say?

Can you turn on debug logging, log in, and find the response to that request in the log and paste it in here, please?

Thanks.
 

Veracity

Developer
Staff member
This is a bug in what standard.php returns. I simplified the parsing a bit and added logging for each object it found and ran it.

Here are the Bookshelf Books:

Code:
Bookshelf Books: gygaxian libram
Bookshelf Books: libram of brickos
Bookshelf Books: libram of candy heart summoning
Bookshelf Books: libram of divine favors
Bookshelf Books: libram of love songs
Bookshelf Books: libram of resolutions
Bookshelf Books: mcphee's grimoire of hilarious object summoning
Bookshelf Books: scratch 'n' sniff sticker tome
Bookshelf Books: sp'n-zor's grimoire of "tasteful" gifts
Bookshelf Books: tome of clip art
Bookshelf Books: tome of snowcone summoning

Bookshelf Books: sorcerers of the shore grimoire
Bookshelf Books: tome of sugar shummoning
Here are the items for each possible bookshelf book:

Code:
Items: gygaxian libram
Items: libram of brickos
Items: libram of candy heart summoning
Items: libram of divine favors
Items: libram of love songs
Items: libram of resolutions
Items: mcphee's grimoire of hilarious object summoning
Items: scratch 'n' sniff sticker tome
Items: sp'n-zor's grimoire of "tasteful" gifts
Items: tome of clip art
Items: tome of snowcone summoning

Items: tome of rad libs
Notice that the tome of rad libs is listed under Items but NOT under Bookshelf Books.
Notice that the sorcerers of the shore grimoire and tome of sugar shummoning appear under Bookshelf Books, but NOT under Items.

The way we check if a Skill is restricted is this:

If it is a Bookshelf Skill, we find the item that corresponds to it and look up that item under Bookshelf Books.

Since Tome of Rad Libs is restricted as an item but is not listed as a Bookshelf Book, we don't find it, and claim it is unrestricted.

Note that if we looked the item up under items rather than Bookshelf Books, we'd find the Tome of Rad Libs and would properly claim Summon Rad Libs is restricted - but we would fail on Summon Alice's Army Cards and Summon Sugar Sheets, since their corresponding items are not listed under items.

Those are KoL bugs.

I can put in a kludge which will check both Bookshelf Books and Items (if necessary) for Bookshelf skills. That will work around the KoL bug, at least.
 

Veracity

Developer
Staff member
Revision 15649 works around the KoL bug: is_unrestricted( skill) requires that a bookshelf skill be unrestricted on both the Bookshelf Books list and the Items list.
 

ckb

Minion
Staff member
> version

KoLmafia v16.8 r15658

> ash is_unrestricted($skill[summon rad libs])

Returned: false

> ash have_skill($skill[summon rad libs])

Returned: true

I believe restricted skills should return false for have_skill(). The others seem to. Am I missing something here? Or is something else unaligned?
 

Veracity

Developer
Staff member
Yeah, OK. Revision 15675 now works around the KoL bug in another place. Summon Rad Libs will no longer appear as an "available" skill on a Standard path.
 
Top