Bug - Waiting for Info Auto-remove malignant status effects is causing a problem

icefall5

Member
I have the option selected to auto-remove malignant status effects, and mafia's having some issues. I have never had Tongue of the Otter (as far as I know; I'm in a SC SC run and I don't have it permed), but mafia wants to use it to remove Beaten Up and quits when it can't find the skill. The entirety of the debug is below. I am using Universal Recovery, but the problem persisted after removing it to test. I also quit and restarted mafia, but the problem persisted. I also tried manually removing Beaten Up (using a soft green whatever) and fully healing my HP (using scroll of drastic healing), but the problem continued. It originally happened several days ago, but I came back today (under a different mafia build, the current one, r10759) and it worked for awhile, then the problem came back. Unchecking the box to remove malignant status effects did allow me to adventure again, but it immediately sent me to the hot tub because I supposedly was Beaten Up, even though I was not, and I had ~60% HP (I have it set to restore at 15%). I do currently have the issue, and would be happy to provide any more information that I can.

Validating adventure sequence...

Beaten Up will be removed by ongue of the Otter...
You don't have a skill uniquely matching "Tongue of the Otter"
Executing top-level commands
[EXIT] <- void
Autorecovery failed.
Executing top-level commands
[EXIT] <- void

Executing top-level commands
[EXIT] <- void
Autorecovery failed.

> restore hp

Beaten Up will be removed by ongue of the Otter...
You don't have a skill uniquely matching "Tongue of the Otter"
Executing top-level commands
[EXIT] <- void
Autorecovery failed.
 

icefall5

Member
Double post for clarity, sorry if it should all be in one. Theraze just posted the following post in response to my post in the Universal Recovery thread; don't know if this will help.

Looks like, for some reason, the part of UneffectRequest.java that turns
PHP:
		removableEffects = new HashSet();
		skillRemoveMap.put( "cast Tongue of the Otter", removableEffects );
		removableEffects.add( "Beaten Up" );
into a skill
PHP:
		if ( action.startsWith( "cast " ) )
		{
			String skillName = action.substring( 5 );

			if ( !KoLCharacter.hasSkill( skillName ) )
			{
				action = "";
			}
		}
is pulling off an extra character, turning tongue of the otter into ongue of the otter. Anytime you don't have the skill, which should happen if the skill name becomes malformed as is evidenced in your debug log, it's supposed to disable it as a valid recovery option... but isn't, for some reason. Definitely looks like a mafia bug, but it'd take someone with more Java chops than me to figure out how "c[0]a[1]s[2]t[3] [4]T[5]o[6]ngue".substring(5) starts at the o, character 6, instead of the T, character 5. My read of the character numbers included in brackets following the character. :)

But yeah, mafia bug with (probably) UneffectRequest, not UR bug. And hola will probably be happy if you keep trying out things for him and let him finally nip this bug, so we stop advising people to turn off his preferences. ;)
 

Theraze

Active member
The one I mentioned in that is from an earlier part of getAction(), but this is the part that's actually failing and giving that message:
PHP:
			if ( remover.startsWith( "cast " ) )
			{
				String skillName = remover.substring( 5 );

				if ( KoLCharacter.hasSkill( skillName ) )
				{
					KoLmafia.updateDisplay( name + " will be removed by " + skillName + "..." );

					return remover;
				}
			}
For some reason, mafia believes that icefall5 has a skill named "ongue of the Otter" and validates it, twice, posts that it's about to use it... then tries to use it, at which point it matches to Tongue of the Otter and realizes that the skill isn't actually known, fails, and the entire restoration sequence goes down.
 

MCroft

Developer
Staff member
Also happening to me in a SC Avatar of Boris run (out of Ronin). I don't have the skill permed, and I don't see it in my UI.
 

Paragon

Member
I have had similiar problems on a character attempting to remove an effect using disco nap on a char that has never had this skill.
 

Theraze

Active member
Paragon, any chance you remember if the error message also called it "isco Nap" or if it called it "Disco Nap", because on this bug, it's cutting off the first letter of the skill name. When MCroft posted initially in a different thread, though their run is SC AoB instead of SC SC, it had the same exact message that icefall5 reported.
 

holatuwol

Developer
10777 should eliminate substring weirdness. I don't think the error will go away, but it's worth checking?
 

Paragon

Member
the message was that I did not have a skill uniquely named .... it was spelled correctly. Sorry, when I read the post it sounded like the same thing. Actually, now that I look at the OP it looks like it is spelled correctly on the second line, but not on the first. I do not remember if it was spelled correctly on both lines or just the last one, It shouldn't be too hard to replicate to check though... omw to do that now.
 

Veracity

Developer
Staff member
the message was that I did not have a skill uniquely named .... it was spelled correctly. Sorry, when I read the post it sounded like the same thing. Actually, now that I look at the OP it looks like it is spelled correctly on the second line, but not on the first. I do not remember if it was spelled correctly on both lines or just the last one.
The original bug report:

Beaten Up will be removed by ongue of the Otter...
You don't have a skill uniquely matching "Tongue of the Otter"
...had the truncated skill on the informational line and the real skill name of the error message.

It shouldn't be too hard to replicate to check though... omw to do that now
If it "isn't too hard to replicate", tell us exactly what you do so that WE can replicate it. Thanks.
 

Paragon

Member
Wording:
Cunctatitis will be removed by isco Power Nap...
You don't have a skill uniquely matching "Disco Power Nap"

For me to replicate it, I just need to obtain the effect Cunctatitis, and have no soft-green-echo-antidotes... So, have the effect and have Disco Power Nap be a method it checks for removing status, without having a working method used prior? or something?
 

Veracity

Developer
Staff member
> uneffect cunctatitis

Cunctatitis cannot be removed with an available item or skill...
You need 1 more soft green echo eyedrop antidote to continue.
After turning on "auto-remove malignant status effects:

> adventure 1 giant's castle

Cunctatitis cannot be removed with an available item or skill...
You need 1 more soft green echo eyedrop antidote to continue.

Do you have an active mood? What does it say about Cunctatitis?
 
Last edited:

holatuwol

Developer
If it was from an active mood, it wouldn't have printed out the debug message because it would have returned earlier.

So, for whatever reason, the hasSkill() check really is returning true at that point, but returns false later on.
 
Top