Newsgroups: rec.games.moria Path: moe.ksu.ksu.edu!zaphod.mps.ohio-state.edu!qt.cs.utexas.edu!yale.edu!jvnc.net!glassboro.edu!kilroy From: kilroy@gboro.glassboro.edu (Dr Nancy's Sweetie) Subject: Re: Monster Weakness Indicators? Message-ID: <1992Apr16.155429.29674@gboro.glassboro.edu> Summary: Already done. Keywords: monsters, strength, ability, `Woof!' Organization: Glassboro State College Disclaimer: Brandy the WonderDog wants something to tell how many teeth have have been knocked out. References: Date: Thu, 16 Apr 1992 15:54:29 GMT Lines: 79 Christopher Petit writes about telling how dead a monster is: >80% or more of starting HP Strong >50%-79% Fit >29%-49% Wounded >10%-28% Badly Wounded ><10% Critically Wounded This will not work; a `Badly Wounded' AMHD could still have 582 hp, and be able to do 194 hp of damage with a single breath. I've implemented something like this already, as a part of the `look' feature, with a few additions. First, if the monster is asleep you are told. Second, if you are the wizard you get the monsters sleep counter, max/current hp. The formula for non-wizards is this: If the monster's max hit points is > 200, then we use 200 as our measure of `maximum health' else use the monsters max hit points. Depending on percentage of max health, we use one of the following descriptions: dying, faint, weak, tired, shaken, healthy. If the monster has drained mana/charges from you and his _above_ his max dice roll, then he is described as `energized'. This was made for umoria 5.4, but can probably be stuck into other versions with a little work. Here are the diffs for the file source/moria4.c (it's a little gross, I haven't gone back to it since I put it in because I've been doing other stuff): 617,620d616 < /* < * kilroy changed this to tell if the monster is asleep, and give its < * current health. 4 December 1991 < * old code: 625,659d620 < * new code: < */ < (void) sprintf(out_val, "%s a%s %s ", < dstring, < m_list[c_ptr->cptr].csleep ? " sleeping" : < ( is_a_vowel( c_list[j].name[0] ) ? "n" : "" ) , < c_list[j].name); < < { char health[25]; < char hack[25]; < int mhp; < < mhp = c_list[j].hd[0] * c_list[j].hd[1]; < < (void)sprintf(hack,"(%d-%d/%d) ", m_list[c_ptr->cptr].csleep, < m_list[c_ptr->cptr].hp, mhp); < < switch ( m_list[c_ptr->cptr].hp * 10 / < ( mhp < 200 ? mhp : 200 ) ) { < case 0: sprintf(health,"(dying"); break; < case 1: case 2: sprintf(health,"(faint"); break; < case 3: case 4: sprintf(health,"(weak"); break; < case 5: case 6: sprintf(health,"(tired"); break; < case 7: case 8: sprintf(health,"(shaken"); break; < default: sprintf(health,"(healthy"); break; < } < < if ( m_list[c_ptr->cptr].hp > mhp ) < sprintf(health,"(energized"); < < (void) strcat(out_val, health); < if (wizard) (void) strcat(out_val, hack); < (void) strcat(out_val, "). [(r)ecall]"); < } < Darren F Provine / kilroy@gboro.glassboro.edu "It only makes sense that every facet of our daily lives should depend upon the position of celestial bodies hundreds of millions of miles away." - Calvin