Random Lycanthropy?

Nov 29, 2014, 8:55 am
#1
Joined: Dec 17, 2007
Occupation: Taking Names, Formerly Kicking Ass
Location: New Jersey
Posts: 946
I was resting on GC 4 (after accidently kicking in the door of Merka shop Ruh-Roh) and the game randomly asked me if I wanted to turn into a werewolf. I had not eaten a werewolf corpses, and I checked myself wit ha stethescope and i did not have Lycanthropy.

and ideas what caused this?
Booooooooooo!
Nov 29, 2014, 3:40 pm
#2
Joined: Feb 20, 2012
Posts: 231
I've had this happen a few times, though I never bothered to look into the cause. Did you have polycontrol when it happened?
Nov 29, 2014, 4:34 pm
#3
Joined: Dec 17, 2007
Occupation: Taking Names, Formerly Kicking Ass
Location: New Jersey
Posts: 946
No polycontrol
Booooooooooo!
Nov 29, 2014, 4:35 pm
#4
Joined: Dec 17, 2007
Occupation: Taking Names, Formerly Kicking Ass
Location: New Jersey
Posts: 946
I did have a chameleon corpse in my inventory
Booooooooooo!
Nov 29, 2014, 6:52 pm
#5
Joined: Feb 20, 2012
Posts: 231
Hmm... I tried taking a look, but nothing stood out in the code. The only hunch I have is that it somehow confused another state you had with lycanthropy, but that would probably result in another state not working, which would be more noticeable; do you remember what states you had when it happened?
Nov 29, 2014, 7:11 pm
#6
Joined: Sep 8, 2010
Occupation: Petty Functionary
Location: Drinking pea soup in the world map
Interests: Mangoes
Posts: 1,180
Did you drink from any fountains? I can't remember whether this is a source of lycanthropy or not.
Batman? wrote
its been so long since i had gotten that far i didnt think it through. arrrr!!!!!!
Nov 29, 2014, 9:51 pm
#7
Joined: Feb 20, 2012
Posts: 231
It is. I remember the good ol' days when the only way I could manage to kill Jenny was to drink from all of the fountains and hope I'd turn into a werewolf. But in this case it just asks you randomly when you don't even have the lycanthropy state. It's happened to me a few times, but I can't remember if I've ever taken it up on the offer.
Nov 30, 2014, 4:30 pm
#8
Joined: Dec 17, 2007
Occupation: Taking Names, Formerly Kicking Ass
Location: New Jersey
Posts: 946
i had been panicked, i had a chameleon corpse rot away in my inventory, and was healing. thats about it.
Booooooooooo!
Dec 1, 2014, 12:02 am
#9
Joined: Dec 3, 2007
Occupation: Chaos Weaver
Location: Standing between all life and death
Posts: 2,850
Had the chameleon turned into a werewolf? I seem to recall their bites are infectious.
Uchuudonge wrote
creating stable chaos
making patterns where there should be none
sewing order into the chaos
you spit in the face of random numbers, of chaos
Dec 1, 2014, 8:42 am
#10
Joined: Dec 17, 2007
Occupation: Taking Names, Formerly Kicking Ass
Location: New Jersey
Posts: 946
yes, i think it had, it only happened once though, and long after i defeated it.
Booooooooooo!
Dec 1, 2014, 12:02 pm
#11
Joined: Dec 2, 2007
Location: New Attnam
Interests: bananas
Posts: 2,228
Wait, the chameleon changed into a werewolf after it was defeated (dead)?
Dec 1, 2014, 1:12 pm
#12
Joined: Feb 20, 2012
Posts: 231
capristo wrote
Wait, the chameleon changed into a werewolf after it was defeated (dead)?

No, I think he's saying it turned into a werewolf at some point when it was alive. I can confirm though that you do sometimes get a "Would you like to turn into a werewolf?" prompt even when you don't have the lycanthropy state. There's nothing in the code that supports this happening, so I've just chalked it up to a wonky bug.

EDIT: I can't check right now, but it's possible that a different character on the floor had lycanthropy, but that the state is only programmed to ask the player if they want to become a werewolf. I'll look over the code again later. It's under LycanthropyHandler() in char.cpp if anyone wants to check it out.
Dec 1, 2014, 1:33 pm
#13
Joined: Sep 8, 2010
Occupation: Petty Functionary
Location: Drinking pea soup in the world map
Interests: Mangoes
Posts: 1,180
Well, it seems to be a real poser. From the code, you have to have the PolyControl state activated in order to be asked the question.
Batman? wrote
its been so long since i had gotten that far i didnt think it through. arrrr!!!!!!
Dec 1, 2014, 2:37 pm
#14
Joined: Feb 20, 2012
Posts: 231
Alright, I took another look at the code:

void character::LycanthropyHandler()
{
  if(!(RAND() % 2000))
  {
    if(StateIsActivated(POLYMORPH_CONTROL)
        && !game::TruthQuestion(CONST_S("Do you wish to change into a werewolf? [y/N]")))
      return;
    Polymorph(werewolfwolf::Spawn(), 1000 + RAND() % 2000);
  }
}

As I thought, it doesn't ever check whether the affected character is the player. Since TruthQuestions apply to the game itself, and not a specific character, you're actually seeing the prompt for another lycanthropic character that has polycontrol.

I just tested it in wizmode: I gave the werewolf from the GC a ring of polycontrol then sat around until he transformed. Sure enough, it prompted me, and selecting yes caused him to change into a werewolf.
Dec 1, 2014, 3:44 pm
#15
Joined: Sep 8, 2010
Occupation: Petty Functionary
Location: Drinking pea soup in the world map
Interests: Mangoes
Posts: 1,180
Holy banana! Good spotting Pent. Well, looks like a bug after all. Pretty rare bug though I suppose we can add this to the list. I'd say the second if statement needs an
 && IsPlayer()
somewhere.
Batman? wrote
its been so long since i had gotten that far i didnt think it through. arrrr!!!!!!
Dec 1, 2014, 5:00 pm
#16
Joined: Dec 2, 2007
Location: New Attnam
Interests: bananas
Posts: 2,228
Nice work Batman? for identifying and Pent for investigating It always makes me happy to see a bug squashed
Dec 1, 2014, 5:15 pm
#17
Joined: Dec 2, 2007
Occupation: Big Daddy
Location: Under a pile of my own offspring
Interests: Caves
Posts: 612
Probably magic mushroom related or somebody ate a bunny, though it might be a good way to find a ring of polycontrol.
Dec 1, 2014, 9:27 pm
#18
Joined: Feb 20, 2012
Posts: 231
I pushed the fix to the repo.

I'd also like to point out that I'm very proud of the fact that I figured this out while on the toilet.
Dec 1, 2014, 9:58 pm
#19
Joined: Dec 3, 2007
Occupation: Chaos Weaver
Location: Standing between all life and death
Posts: 2,850
Best place to figure things out.
Uchuudonge wrote
creating stable chaos
making patterns where there should be none
sewing order into the chaos
you spit in the face of random numbers, of chaos
Jump to