From: J. A. H. <al...@av...> - 2004-02-04 13:43:04
|
On 2004.02.03 08:35 Clive Crous wrote: > I was looking at this bug last night, it's a section of code that's a > bit unfamiliar to me, so i thought i'd bounce the diffs I came up > with off this list for comments first ... > > as far as the "null" for poisoned is concerned, its a fairly easy fix, > except that i'm not too sure if it has other outside implications, but > as far as I can tell, it shouldn't. one question though ... should the > artifact_score list show the state of artiffact ? should it show, for > example, "poisoned excalibur" or not ? this diff results simply in > "Excalibur". > > diff as follows : > > - --start-- > - --- slashem-0.0.7E5-lnx-tty/src/artifact.c 2004-01-10 > 18:51:39.000000000 +0200 > +++ slashem-0.0.7E5-lnx-tty_stake/src/artifact.c 2004-02-02 > 23:22:50.000000000 > +0200 > @@ -250,6 +250,7 @@ > register const char *aname; > > if(!strncmpi(name, "the ", 4)) name += 4; > + if(!strncmpi(name, "poisoned ", 9)) name += 9; > > for (a = artilist+1; a->otyp; a++) { > aname = a->name; > - -- end -- That looks fine to me. If the player wants to see that an artifact is poisoned then they can use the disclosed possessions list for that purpose. The point of the artifact name in the score list is only to identify where the relevant points come from. > the user who submitted the bug mentioned it might happen for > hallucination aswell. this is true, however for a different reason. > same question as before, should it display "hallucinogen-distorted > foo" or simply "foo", this time however i put in the > "halluginogen-distorted". > > again small diff : > > - --start-- > - --- slashem-0.0.7E5-lnx-tty/src/objnam.c 2004-01-10 > 18:51:39.000000000 > +0200 > +++ slashem-0.0.7E5-lnx-tty_stake/src/objnam.c 2004-02-03 > 10:12:57.000000000 > +0200 > @@ -508,7 +508,7 @@ > #endif > register char *buf = &(bufr[PREFIX]); /* leave room for "17 > -3 " */ > > - - if (Hallucination) { > + if (Hallucination && !(program_state.gameover && > obj->oartifact)) { > hobj = mkobj(obj->oclass, 0); > hobj->quan = obj->quan; > /* WAC clean up */ > - -- end -- This doesn't appear to do what you claim above (I see no mechanism to add a "halluginogen-distorted" tag). Happily, I don't think we want one for the same reasons as I gave for a potential "poisoned" tag. On the other hand, I see no reason to limit the checks for artifacts so I'd just use: if (Hallucination && !program_state.gameover) { Cheers, Ali. |