hands of wind

Posted by Ithildin on Mon 31 May 2004 06:34 PM — 4 posts, 16,904 views.

USA #0
ok, i added a haste spell to my mud. what this does is gives characters another attack in a round. here's my code for it in fight.c

if ( IS_AFFECTED(ch, AFF_HASTE))
	retcode = one_hit( ch, victim, dt );
	return retcode;

now, this works fine. but i also added a spell hands of wind. this spell would give them two attacks in a round and i put this code.

if ( IS_AFFECTED(ch, AFF_HANDS_OF_WIND))
	retcode = one_hit( ch, victim, dt );
	retcode = two_hit( ch, victim, dt );
	return retcode;

two_hit is copied exactly like one_hit beacuse i wanted the person with the spell to get two hits in. this doesn't seem to be working. i'm trying it on a mage with only one attack per round. when she is hasted she has her single, plus the hasted one_hit, but when she's hands of wind, she still only has her one attack per round. so the one_hit in the hands of wind if check isn't even workin.

any thoughts?
Amended on Mon 31 May 2004 06:44 PM by Ithildin
USA #1
i went ahead and took out the two_hit and just made it exactly like haste and it's still not working.


chance = IS_NPC(ch) ? ch->level
	   : (int) ((LEARNED(ch, gsn_fifth_attack)+(dual_bonus*3))/4);
    if ( number_percent( ) < chance )
    {
	learn_from_success( ch, gsn_fifth_attack );
	retcode = one_hit( ch, victim, dt );
	if ( retcode != rNONE || who_fighting( ch ) != victim )
	    return retcode;
    }
    else
	learn_from_failure( ch, gsn_fifth_attack );


	if ( IS_AFFECTED(ch, AFF_HASTE))
	retcode = one_hit( ch, victim, dt );
	return retcode;

	if ( IS_AFFECTED(ch, AFF_HANDS_OF_WIND))
	retcode = one_hit( ch, victim, dt );
//	retcode = one_hit( ch, victim, dt );
	return retcode;


this is where i'm at.
USA #2
got it to work.


if ( IS_AFFECTED(ch, AFF_HASTE))
	{
		retcode = one_hit( ch, victim, dt );
	if ( retcode != rNONE || who_fighting( ch ) != victim )
	    return retcode;
	}

	if ( IS_AFFECTED(ch, AFF_HANDS_OF_WIND))
	{
		retcode = one_hit( ch, victim, dt );
		retcode = two_hit( ch, victim, dt );
	if ( retcode != rNONE || who_fighting( ch ) != victim )
	    return retcode;
	}
USA #3
Yes, I was just going to say that you needed to be careful with your curlies. :)