Bug Scripts fail to cast skills granted by equipment after r28434

Malibu Stacey

Active member
Code:
use_skill(1, $skill[Cincho: Fiesta Exit]);
fails with
Code:
Could not find a known, usable skill of yours uniquely matching "1 Cincho: Fiesta Exit"

Skills from the designer sweatpants are also failing similarly according to other users running autoscend (I haven't hit that myself as I haven't run autoscend with r29434 or later yet).
 
Can confirm Autoscend was failing when trying to cast "Sip Some Sweat" from designer sweatpants. When I tried casting it from the CLI (via "cast sip some sweat"), Mafia could not cast it. Solutions I found that worked were to either equip the design sweatpants and then cast it via cli, or to go to the skills page in the browser and cast via the kol-native button (did not require equipping designer sweatpants as best i could tell)
 
Looks like it failed for me the second time my script tried to use Fiesta Exit.

First time it worked without issue
Code:
equip acc2 Cincho de Mayo

cast 1 Cincho: Fiesta Exit
Preference noncombatForcerActive changed from false to true
Preference _cinchUsed changed from 0 to 60
Preference noncombatForcers changed from  to cincho exit

equip acc2 pro skateboard
Second time
Code:
[340917] Rest in your dwelling
You gain 39 hit points
You gain 80 Mana Points
You gain 17 Muscleboundness
You gain 27 Mysteriousness
You gain 14 Sarcasm
Preference timesRested changed from 0 to 1
Preference _cinchUsed changed from 60 to 30
Preference _cinchoRests changed from 0 to 1
There's no error in the session log but that's where it printed the error in the first post to the CLI.

I worked around it by forcing my script to equip the Cincho de Mayo before attempting to cast the skill.
 
When a skill-granting item is added and removed, we should only add and remove that skill from the "skills you have" (as far as scripts are concerned) if it is a combat-only skill.

This hopefully fixes that: https://github.com/kolmafia/kolmafia/pull/2826

I'll run autoscend with it today and see
 
At the very least, this is promising:

> cast party soundtrack

Putting on Cincho de Mayo...
Equipment changed.
You acquire an effect: Party Soundtrack (30)
Preference _cinchUsed changed from 0 to 25
Cincho: Party Soundtrack was successfully cast.
Taking off Cincho de Mayo...
Equipment changed.

> cast party soundtrack

Putting on Cincho de Mayo...
Equipment changed.
You acquire an effect: Party Soundtrack (30)
Preference _cinchUsed changed from 25 to 50
Cincho: Party Soundtrack was successfully cast.
Taking off Cincho de Mayo...
Equipment changed.
 
we should only add and remove that skill from the "skills you have" (as far as scripts are concerned) if it is a combat-only skill.
Hm. It seems that to date, there are no skills granted by equipment that can be used both in-combat and out-of-combat.

In fact, the list of combat skills with other purposes is quite small, and hasn't been expanded in over ten years:
Code:
$ grep -E 'combat,|,combat' data/classskills.txt
3009	Lasagna Bandages	lasbandage.gif	combat,nc,heal	6	0	Level: 3
12006	Devour Minions	gnashteeth.gif	combat,nc,heal	4	0	Level: 6
12010	Ravenous Pounce	gashes.gif	passive,combat	2	0	Level: 10
12030	Zombie Maestro	operamask.gif	passive,combat	9	0	Level: 10
 
Back
Top