From: daly@ecs.umass.edu (Bryon Daly, ECE dept, UMass, Amherst)
Newsgroups: rec.games.hack
Subject: Re: Poison resistance
Date: 7 Nov 92 11:29:51 GMT

In article <1992Nov6.222944.9769@bmers95.bnr.ca>, snelling@bnr.ca (Peter Snelling) writes:
> In article <18939.2af9a63a@ecs.umass.edu>, daly@ecs.umass.edu (Bryon Daly, ECE dept, UMass, Amherst) writes:
>>In article <1992Nov5.195413.24374@bmers95.bnr.ca>, snelling@bnr.ca (Peter Snelling) writes:
>>> Here are the chances of getting intrisic poison resistance from all
>>> non-poisonous monsters.  The chance is (monster leve)/15 * (chance of
>>> not getting another intrisic instead).  Surprisingly, these chances 
>>> don't depend on what intrinsics you currently have.
>>
>>Yeah, the game just goes down the list of intrinsics in the following order:
>>(according to the NH spoiler file-I've changed their order in my own source...)
>>Intrinsic        Fractional Probability
>>---------        ----------------------
>>Teleport       - monster level / 10
>>Tel. Cont.     - monster level / 15
>>Fire Res       - monster level / 15
>>Cold Res       - monster level / 15
>>Disin Res      - monster level / 15
>>Pois Res       - monster level / 15 (killer bee and scorpion are 1/4)
>>Shock Res      - monster level / 15
>>Sleep Res      - monster level / 15 (undead cannot confer this)
>>
>>And for each, it checks if the monster offers that intrinsic, then it
>>randomly decides whether to give it according to the above probability.
>>If not, it goes down the list.  If it does decide to give that intrinsic,
>>it then checks to see if you already have it, and gives it to you if you don't.
>>Either way, though, it exits the loop without checking for other intrinsics.
> 
> This is exactly right.  Keep it in mind below.

Whooops!  You were right!  I completely forgot to combine this fact with
the fact that the wizard is high enough level to give you whatever intrinsic
he has that is tested for...

>>> The following are also not poisonous, and have poison resistance, but
>>> for one reason or another, probably aren't worth eating to get poison
>>> resistance.
> 
>>> 30 Wizard of Yendor (only gives intrisic teleportation, human)
>>
>>Why do you say that it only gives intrinsic telep?  I don't see anything in 
>>the eat.c code to verify this, and I know I've received intrinsic telep.
>>control from him, also.  I think you should be able to get any of the
>>intrinsics he has to offer (tport, tport control, fire res, poison res)
>>I think he is useful to eat especially in the case of teleport control,
>>which is a hard intrinsic to get since so few monsters offer it.  If you
>>unluckily manage to get down to him without getting tport control from a
>>tengu, he's your best bet, since he's 30th level, and will automatically
>>guarantee getting the rare intrinsic (and also aggravate monster, if you're 
>>human).
> 
> Since the Wizard is a level 30 monster, the random number from 1-15
> (or 1-10) will always be less than the monster level, so with him
> you always get the first intrinsic on the list, and you never get
> any of the others. ("exits the loop without checking for other intrinsics").

Ok.  Somehow, I realized both these facts, but hadn't connected them.  I was
thinking you had meant some kind of "if (mon == PM_WIZARD_OF_YENDOR)" type
of thing was going on...
 
> I suspect that the reason you got teleport control from him is that you
> changed the order of the intrinsics.  Now, I'll bet you ALWAYS get 
> teleport control from him and never anything else.
> 
> Perhaps this code should be rewritten to allow you to get intrinsics
> you don't have and skip the rest.  Right now the code looks like this:
> 
> If (monster has teleport) and (random[1-10] <= monster level) then
>   if (you don't have teleport) then give you teleport intrinsic
> else if (monster has tel.cont.) and (random[1-15] <= monster level) then
>   if (you don't have tel.cont.) then give you tel.cont. intrinsic
> else if ...
> 
> [Yes, that is only pseudo-code]
> 
> It could be rewritten:
> If (monster has teleport) and (random[1-10] <= monster level) and 
>    (you don't have teleport) then give you teleport intrinsic
> else if (monster has tel.cont.) and (random[1-15] <= monster level) and
>    (you don't have tel.cont.) then give you tel.cont. intrinsic
> else if ...
> 
> That would probably make it a lot easier to get those last few 
> intrinsics you don't have.  Maybe it should work this way if you
> don't have HARD defined.

I think I will change this in my source.  I've done other things to make the
game harder, and I don't think the balance will be screwed up by changing
this...(And I'm the only one playing my version, so there's no one to 
complain  :-)  )

Thanks for straightening me out on that point, Peter...

-Bryon