On Tue, 22 Aug 1995, Graham Gilmore wrote:
> Exactly what I was saying. Perhaps I didn't make myself very
> clear, because a number of people seem to have been confused by what I
> said ;)
> What I meant to say was, using a mod of -1 for APPLY_HUNGER (or
> whatever the precise bit is) would do GET_COND(ch, FULL) += -1... which
> would make the person 1 notch hungrier, not eliminate their hunger. To
> eliminate their hunger, you would need GET_COND(ch, FULL) = -1.
>
>
> > Changing GET_COND(ch, FULL) = -1 to GET_COND(ch, FULL) <= -1
> > isn't a suggested method.
> ^^ not meant to be an assignment in
> this case, but rather a simple equals... sorry if this caused even more
> confusion ;)
> I was proposing to set the condition of elimination of hunger to
> GET_COND(ch, FULL) <= -1 instead of GET_COND(ch, FULL) == -1 , if the
> latter is what it currently is.
> I haven't looked into this, but the reason I suggested it was so
> that you could set your mod to -25, and so have GET_COND(ch, FULL) -=
> 25.. regardless of your hunger at the time of wearing the item or
> whatever, it would be <= -1 with the APPLY_HUNGER..
>
> Graham Gilmore
It is my understanding, although I've not looked at the code, having FULL
being 0 means you ARE hungry, while at 25 your full. This makes more
English logic, which I believe Jeremy was trying to follow with most of
his code. Where as having a DRUNK of 0 would convert to simple English
as "Your not drunk," having a FULL of 0 would convert to simple English
as "Your not full". Although it is presumptious to assume he is
following English grammar with his code, I would assume he named the
specific defines as such to prevent this type of confusion.
Also, following "simple" math rules:
GET_COND(ch, FULL) -= mod;
Would decrease FULL by the mod UNLESS mod was negative.
GET_COND(ch, FULL) -= -25;
This ADDs 25 to the condition because your taking away the negative value
(basically, it's like saying you don't have no money (hence you do) --
it's a double negative).
If I'm correct:
GET_COND(ch, FULL) <= -1;
Is not a valid statement, if it is then I've either forgot about it or
no-one ever used it (I am a self-taught programmer, after 4 or 5 years
it's difficult to tell the difference anyway :)). Unless you mean that
you would want to set FULL condition under -1, which would probably make
Circle vomit or treat it as if it were -1. (or it could just be that
it's early, I haven't slept yet, and I'm not reading what your saying
right).
If the way full is determined is for 25 to be full and 0 to be empty
(this would be more logical, I feel like a vulcan..), this whole thing is
pointless and the following code should work:
case APPLY_HUNGER:
GET_COND(ch, FULL) += mod;
break;
Since I'm on a nice Pentium w/ Win95 right now (game development machine
for ShadowDragon, Ent.), if you wouldn't mind looking into the Circle
code and reporting back to me on this issue. Although I am not running
my MUD at current, it does interest me.
_____ ____ _______ |
\ _\ \ __\ + Daniel Koepke : dkoepke@california.com
\ _ \ \ \ _\_ | Global Infonet is a low cost internet
\____\_____\_____\ + provider for the San Fransisco Bay Area
ShadowDragon Entertainment |
This archive was generated by hypermail 2b30 : 12/18/00 PST