Another problem with merc 2.2 with high explosive

Posted by Gunner on Thu 28 Aug 2014 12:01 AM — 2 posts, 12,115 views.

Argentina #0
Hi! I have another problem with merc 2.2
the spell 'high explosive', has a bug that does not allow to start a fight using that spell.
Does not start the fight, or starts but does not hurt, as if he had sent the command to kill.

the code here , any idea to solve this problem?
I'm sorry for my f****** english :/

void spell_high_explosive( int sn, int level, CHAR_DATA *ch, void *vo )
{
    CHAR_DATA *victim = (CHAR_DATA *) vo;
    int dam;
    int pmove;
    int i;
    int max;

    dam = number_range( level/2, 100 );
    pmove = ch->move / 10;
    ch->move -= 3*pmove;
    dam += 6 * pmove ;
    max = ch->level*5 + 300;
    if (ch->max_move > max ) ch->max_move-=10;
    if ( saves_spell( level, victim ) )
	dam = (dam*2)/3;
    if (ch->in_room)
    {
	victim=ch->in_room->people;
	while (victim)
	{
	    if (victim->fighting == ch)
	    {
		damage( ch, victim, dam, sn );
		if (ch->pcdata)
		{
		    for (i=0;i<ch->pcdata->remorts;i++)
		    {
			if (victim->fighting)
			damage( ch, victim, dam, sn );
		    }
		}
		
	    }
	    victim=victim->next_in_room;
	}
    }
return;
}
USA Global Moderator #1
Try comparing the code for that function with the code for a spell that works correctly to see what might be missing.