Ok, I got it bugless now (except for a couple of warnings, but yea, they aren't a big problem right now). What IS a problem, is that it only does the first case, and then quits. Next to that, you can't put it as a 'spell', but it won't work with 'cast'. It would be a pain to have it as a normal skill, because there will be more skills starting with 'water' and those can't be used then.
Current code:
void do_water_dragon_blast(CHAR_DATA *ch, char *argument)
{
CHAR_DATA *victim;
int dam;
int sn;
int level;
switch( ch->substate )
{
default:
level = UMAX(0, level);
level = UMIN(150, level);
dam = number_range( 1, 7 )*number_range( 50, 75 );
act( AT_MAGIC, "You start performing seals", ch, NULL, NULL, TO_CHAR);
act( AT_MAGIC, "$n starts performing seals", ch, NULL, NULL, TO_CHAR);
add_timer( ch, TIMER_DO_FUN, 1, do_water_dragon_blast, 1 );
ch->alloc_ptr = str_dup( victim->name );
return;
case 1:
act( AT_MAGIC, "...ox tiger bird monkey rat ox...", ch, NULL, NULL, TO_CHAR);
act( AT_MAGIC, "...ox tiger bird monkey rat ox...", ch, NULL, NULL, TO_ROOM);
DISPOSE( ch->alloc_ptr );
add_timer( ch, TIMER_DO_FUN, 1, do_water_dragon_blast, 2 );
ch->alloc_ptr = str_dup( victim->name );
return;
case 2:
act( AT_MAGIC, "You yell: '...Bird! Suiton Suiryuudan no Jutsu!'", ch, NULL, NULL, TO_CHAR);
act( AT_MAGIC, "$n yells: '...Bird! Suiton Suiryuudan no Jutsu!'", ch, NULL, NULL, TO_ROOM);
DISPOSE(ch->alloc_ptr );
add_timer( ch, TIMER_DO_FUN, 1, do_water_dragon_blast, 3 );
ch->alloc_ptr = str_dup( victim->name );
return;
case 3:
act( AT_MAGIC, "A large dragon made completely of water rises up and charges at $N", ch, NULL, NULL, TO_ROOM);
act( AT_MAGIC, "A large dragon made completely of water rises up and charges at $N", ch, NULL, NULL, TO_CHAR);
DISPOSE( ch->alloc_ptr );
if ( IS_AFFECTED( victim, AFF_SHARINGAN ) )
{
if( victim->pcdata->learned[sn] )
{
damage( ch, victim, dam, sn );
return;
}
if( victim->mana < 150 )
{
damage( ch, victim, dam, sn );
return;
}
victim->pcdata->learned[sn] = 20;
victim->mana -= 150;
act( AT_FIRE, "Your sharingan starts spinning at a fast rate!\n\r", victim, NULL, NULL, TO_CHAR);
act( AT_YELLOW, "You just copied Water Dragon Blast!\n\r", victim, NULL, NULL, TO_CHAR );
act( AT_FIRE, "$n's sharingan starts spinning!\n\r", victim, NULL, NULL, TO_ROOM );
damage( ch, victim, dam, sn );
return;
}
}
if ( saves_spell_staff( level, victim ) )
dam /= 2;
damage( ch, victim, dam, sn );
return;
}
What happens in mud:
-------
<Health: 30000 Chakra: 27380 Stamina: 30000> <#10300> test fish
You start performing seals
<Health: 30000 Chakra: 27380 Stamina: 30000> <#10300>
...ox tiger bird monkey rat ox...
-------
After that, it just stops.
Test is because it can't be used as a spell, so I made a temporary command that executes the skill. |