Re: Multiple Attacks

From: ????? (ricky.newson@nashville.com)
Date: 06/27/96


At 01:19 PM 6/27/96 +0200, you wrote:
>And my perform_violence() looks something like this (taken from head):
>
>void perform_violence(int attack)
>{
>	/* variable declaration */
>	struct char_data *ch;
>
>	for (ch = combat_list; ch; ch = ch->next_fighting)
>	{
>		/* misc stuff to check positions and such */
>
>		/* the old hit() statement */
>		/* hit(ch, FIGHTING(ch), TYPE_UNDEFINED); */
>
>		switch (attack)
>		{
>			case 1:
>				percent = number(1, 101);
>				prob    = GET_SKILL(ch, SKILL_ATTACK1);
>				if (percent > prob)
>				{
>					hit(ch, FIGHTING(ch), TYPE_UNDEFINED,
>						attack);
>				}
>				break;
>			case 2:
>				percent = number(1, 101);
>				prob    = GET_SKILL(ch, SKILL_ATTACK1);
>				if (percent > prob)
>				{
>					hit(ch, FIGHTING(ch), TYPE_UNDEFINED, 
>						attack);
>				}
>				break;
>
>			/* and so on */
>		}
>	}
>}
>
>As you can see, I added a new argument to the hit() function, the attack 
>number.
Wouldn't it also work if the person did this:

void perform_violence(int APT) /* APT Attacks Per Turn */
{
	/* variable declaration */
	struct char_data *ch;
        int lwp;

	for (ch = combat_list; ch; ch = ch->next_fighting)
	{
	
		/* the old hit() statement */
		/* hit(ch, FIGHTING(ch), TYPE_UNDEFINED); */
                for (lwp = apt; lwp <= 0; lwp--)
                    {
                      hit(ch, FIGHTING(ch), TYPE_UNDEFINED);
                    }
         }
}

I know it's missing something but I'm not looking at the code and my code is
so different from stock Circle that it would confuse the people looking at it.



This archive was generated by hypermail 2b30 : 12/18/00 PST