Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
Development
Nov 28, 2018, 10:10 am
By Keirath
First Immortal
Oct 12, 2018, 12:02 pm
By GatewaySysop
Bug in do_climb( )
Jun 5, 2018, 5:31 pm
By joeyfogas
question on overland code
May 31, 2018, 10:03 am
By joeyfogas
KaVir's Protocol Snip
May 15, 2018, 7:57 pm
By joeyfogas
tintin++ ogg sound player script for linux
Author: Robert Smith
Submitted by: Vladaar
6Dragons ogg Soundpack
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.4
Author: Vladaar
Submitted by: Vladaar
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
Users Online
CommonCrawl, Bing

Members: 0
Guests: 12
Stats
Files
Topics
Posts
Members
Newest Member
481
3,740
19,397
633
Rhyader
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » SmaugFUSS » breath mobs are biased based ...
Forum Rules | Mark all | Recent Posts

breath mobs are biased based on room order
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Sep 1, 2006, 11:35 am   Last edited Sep 2, 2006, 6:47 am by Valcados
Go to the top of the page
Go to the bottom of the page

Valcados
Apprentice
GroupMembers
Posts63
JoinedAug 25, 2006

In special.c, find this:

bool dragon( CHAR_DATA * ch, char *fspell_name )
{
   CHAR_DATA *victim;
   CHAR_DATA *v_next;
   int sn;

   if( ch->position != POS_FIGHTING
       && ch->position != POS_EVASIVE
       && ch->position != POS_DEFENSIVE && ch->position != POS_AGGRESSIVE && ch->position != POS_BERSERK )
      return FALSE;

   for( victim = ch->in_room->first_person; victim; victim = v_next )
   {
      v_next = victim->next_in_room;
      if( who_fighting( victim ) == ch && number_bits( 2 ) == 0 )
         break;
   }

   if( !victim )
      return FALSE;

   if( ( sn = skill_lookup( fspell_name ) ) < 0 )
      return FALSE;
   ( *skill_table[sn]->spell_fun ) ( sn, ch->level, ch, victim );
   return TRUE;
}


Change it to this:
bool dragon( CHAR_DATA * ch, char *fspell_name )
{
   CHAR_DATA *victim, *chosen = NULL;
   int sn, count=0;

   if( ch->position != POS_FIGHTING
       && ch->position != POS_EVASIVE
       && ch->position != POS_DEFENSIVE && ch->position != POS_AGGRESSIVE && ch->position != POS_BERSERK )
      return FALSE;

   for( victim = ch->in_room->first_person; victim; victim = v->next_in_room )
   {
      if( who_fighting( victim ) != ch )
        continue;
      if ( !number_range(0,count) )
        chosen = victim, count++;        
   }

   if( !chosen )
      return FALSE;

   if( ( sn = skill_lookup( fspell_name ) ) < 0 )
      return FALSE;
   ( *skill_table[sn]->spell_fun ) ( sn, ch->level, ch, chosen );
   return TRUE;
}


EDIT: Fixed a typo.
       
Pages:<< prev 1 next >>